diff --git a/node_modules/.bin/esbuild b/node_modules/.bin/esbuild deleted file mode 100644 index 26bef54..0000000 --- a/node_modules/.bin/esbuild +++ /dev/null @@ -1,12 +0,0 @@ -#!/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/../esbuild/bin/esbuild" "$@" -else - exec node "$basedir/../esbuild/bin/esbuild" "$@" -fi diff --git a/node_modules/.bin/esbuild.cmd b/node_modules/.bin/esbuild.cmd deleted file mode 100644 index cc920c5..0000000 --- a/node_modules/.bin/esbuild.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@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%\..\esbuild\bin\esbuild" %* diff --git a/node_modules/.bin/esbuild.ps1 b/node_modules/.bin/esbuild.ps1 deleted file mode 100644 index 81ffbf9..0000000 --- a/node_modules/.bin/esbuild.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/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/../esbuild/bin/esbuild" $args - } else { - & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../esbuild/bin/esbuild" $args - } else { - & "node$exe" "$basedir/../esbuild/bin/esbuild" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/he b/node_modules/.bin/he deleted file mode 100644 index 70e18de..0000000 --- a/node_modules/.bin/he +++ /dev/null @@ -1,12 +0,0 @@ -#!/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/../he/bin/he" "$@" -else - exec node "$basedir/../he/bin/he" "$@" -fi diff --git a/node_modules/.bin/he.cmd b/node_modules/.bin/he.cmd deleted file mode 100644 index 611a864..0000000 --- a/node_modules/.bin/he.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@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%\..\he\bin\he" %* diff --git a/node_modules/.bin/he.ps1 b/node_modules/.bin/he.ps1 deleted file mode 100644 index b0010bc..0000000 --- a/node_modules/.bin/he.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/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/../he/bin/he" $args - } else { - & "$basedir/node$exe" "$basedir/../he/bin/he" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../he/bin/he" $args - } else { - & "node$exe" "$basedir/../he/bin/he" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/http-server b/node_modules/.bin/http-server deleted file mode 100644 index a936b17..0000000 --- a/node_modules/.bin/http-server +++ /dev/null @@ -1,12 +0,0 @@ -#!/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/../http-server/bin/http-server" "$@" -else - exec node "$basedir/../http-server/bin/http-server" "$@" -fi diff --git a/node_modules/.bin/http-server.cmd b/node_modules/.bin/http-server.cmd deleted file mode 100644 index 6eda955..0000000 --- a/node_modules/.bin/http-server.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@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%\..\http-server\bin\http-server" %* diff --git a/node_modules/.bin/http-server.ps1 b/node_modules/.bin/http-server.ps1 deleted file mode 100644 index 4dbffb3..0000000 --- a/node_modules/.bin/http-server.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/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/../http-server/bin/http-server" $args - } else { - & "$basedir/node$exe" "$basedir/../http-server/bin/http-server" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../http-server/bin/http-server" $args - } else { - & "node$exe" "$basedir/../http-server/bin/http-server" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime deleted file mode 100644 index 0a62a1b..0000000 --- a/node_modules/.bin/mime +++ /dev/null @@ -1,12 +0,0 @@ -#!/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/node_modules/.bin/mime.cmd b/node_modules/.bin/mime.cmd deleted file mode 100644 index 54491f1..0000000 --- a/node_modules/.bin/mime.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@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/node_modules/.bin/mime.ps1 b/node_modules/.bin/mime.ps1 deleted file mode 100644 index 2222f40..0000000 --- a/node_modules/.bin/mime.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/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/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp deleted file mode 100644 index 6ba5765..0000000 --- a/node_modules/.bin/mkdirp +++ /dev/null @@ -1,12 +0,0 @@ -#!/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/node_modules/.bin/mkdirp.cmd b/node_modules/.bin/mkdirp.cmd deleted file mode 100644 index a865dd9..0000000 --- a/node_modules/.bin/mkdirp.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@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/node_modules/.bin/mkdirp.ps1 b/node_modules/.bin/mkdirp.ps1 deleted file mode 100644 index 911e854..0000000 --- a/node_modules/.bin/mkdirp.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/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/node_modules/.bin/nanoid b/node_modules/.bin/nanoid deleted file mode 100644 index 23254eb..0000000 --- a/node_modules/.bin/nanoid +++ /dev/null @@ -1,12 +0,0 @@ -#!/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/../nanoid/bin/nanoid.cjs" "$@" -else - exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@" -fi diff --git a/node_modules/.bin/nanoid.cmd b/node_modules/.bin/nanoid.cmd deleted file mode 100644 index 9c40107..0000000 --- a/node_modules/.bin/nanoid.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@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%\..\nanoid\bin\nanoid.cjs" %* diff --git a/node_modules/.bin/nanoid.ps1 b/node_modules/.bin/nanoid.ps1 deleted file mode 100644 index d8a4d7a..0000000 --- a/node_modules/.bin/nanoid.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/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/../nanoid/bin/nanoid.cjs" $args - } else { - & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args - } else { - & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/opener b/node_modules/.bin/opener deleted file mode 100644 index 8852090..0000000 --- a/node_modules/.bin/opener +++ /dev/null @@ -1,12 +0,0 @@ -#!/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/../opener/bin/opener-bin.js" "$@" -else - exec node "$basedir/../opener/bin/opener-bin.js" "$@" -fi diff --git a/node_modules/.bin/opener.cmd b/node_modules/.bin/opener.cmd deleted file mode 100644 index 61feaf3..0000000 --- a/node_modules/.bin/opener.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@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%\..\opener\bin\opener-bin.js" %* diff --git a/node_modules/.bin/opener.ps1 b/node_modules/.bin/opener.ps1 deleted file mode 100644 index b3825e5..0000000 --- a/node_modules/.bin/opener.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/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/../opener/bin/opener-bin.js" $args - } else { - & "$basedir/node$exe" "$basedir/../opener/bin/opener-bin.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../opener/bin/opener-bin.js" $args - } else { - & "node$exe" "$basedir/../opener/bin/opener-bin.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/parser b/node_modules/.bin/parser deleted file mode 100644 index cb5b10d..0000000 --- a/node_modules/.bin/parser +++ /dev/null @@ -1,12 +0,0 @@ -#!/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/../@babel/parser/bin/babel-parser.js" "$@" -else - exec node "$basedir/../@babel/parser/bin/babel-parser.js" "$@" -fi diff --git a/node_modules/.bin/parser.cmd b/node_modules/.bin/parser.cmd deleted file mode 100644 index 1ad5c81..0000000 --- a/node_modules/.bin/parser.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@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%\..\@babel\parser\bin\babel-parser.js" %* diff --git a/node_modules/.bin/parser.ps1 b/node_modules/.bin/parser.ps1 deleted file mode 100644 index 8926517..0000000 --- a/node_modules/.bin/parser.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/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/../@babel/parser/bin/babel-parser.js" $args - } else { - & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args - } else { - & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/rollup b/node_modules/.bin/rollup deleted file mode 100644 index 11bd86d..0000000 --- a/node_modules/.bin/rollup +++ /dev/null @@ -1,12 +0,0 @@ -#!/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/node_modules/.bin/rollup.cmd b/node_modules/.bin/rollup.cmd deleted file mode 100644 index b3f110b..0000000 --- a/node_modules/.bin/rollup.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@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/node_modules/.bin/rollup.ps1 b/node_modules/.bin/rollup.ps1 deleted file mode 100644 index 10f657d..0000000 --- a/node_modules/.bin/rollup.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/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/node_modules/.bin/vite b/node_modules/.bin/vite deleted file mode 100644 index a85d325..0000000 --- a/node_modules/.bin/vite +++ /dev/null @@ -1,12 +0,0 @@ -#!/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/../vite/bin/vite.js" "$@" -else - exec node "$basedir/../vite/bin/vite.js" "$@" -fi diff --git a/node_modules/.bin/vite.cmd b/node_modules/.bin/vite.cmd deleted file mode 100644 index f62e966..0000000 --- a/node_modules/.bin/vite.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@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%\..\vite\bin\vite.js" %* diff --git a/node_modules/.bin/vite.ps1 b/node_modules/.bin/vite.ps1 deleted file mode 100644 index a7759bc..0000000 --- a/node_modules/.bin/vite.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/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/../vite/bin/vite.js" $args - } else { - & "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../vite/bin/vite.js" $args - } else { - & "node$exe" "$basedir/../vite/bin/vite.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json deleted file mode 100644 index 804a551..0000000 --- a/node_modules/.package-lock.json +++ /dev/null @@ -1,1085 +0,0 @@ -{ - "name": "app", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.26.8", - "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.26.8.tgz", - "integrity": "sha512-TZIQ25pkSoaKEYYaHbbxkfL36GNsQ6iFiBbeuzAkLnXayKR1yP1zFe+NxuZWWsUyvt8icPU9CCq0sgWGXR1GEw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/types": "^7.26.8" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/types": { - "version": "7.26.8", - "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.26.8.tgz", - "integrity": "sha512-eUuWapzEGWFEpHFxgEaBG8e3n6S8L3MSu0oda755rOfabWPnh0Our1AozNFVUxGFIhbKgd1ksprsoDGMinTOTA==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", - "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "peer": true - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.34.6", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.6.tgz", - "integrity": "sha512-0PVwmgzZ8+TZ9oGBmdZoQVXflbvuwzN/HRclujpl4N/q3i+y0lqLw8n1bXA8ru3sApDjlmONaNAuYr38y1Kr9w==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true - }, - "node_modules/@vitejs/plugin-vue": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-5.2.1.tgz", - "integrity": "sha512-cxh314tzaWwOLqVes2gnnCtvBDcM1UMdn+iFR+UjAn411dPT3tOmqrJjbMd7koZpMAmBM/GqeV4n9ge7JSiJJQ==", - "dev": true, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "vite": "^5.0.0 || ^6.0.0", - "vue": "^3.2.25" - } - }, - "node_modules/@vue/compiler-core": { - "version": "3.5.13", - "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.13.tgz", - "integrity": "sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/parser": "^7.25.3", - "@vue/shared": "3.5.13", - "entities": "^4.5.0", - "estree-walker": "^2.0.2", - "source-map-js": "^1.2.0" - } - }, - "node_modules/@vue/compiler-dom": { - "version": "3.5.13", - "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz", - "integrity": "sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==", - "dev": true, - "peer": true, - "dependencies": { - "@vue/compiler-core": "3.5.13", - "@vue/shared": "3.5.13" - } - }, - "node_modules/@vue/compiler-sfc": { - "version": "3.5.13", - "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.13.tgz", - "integrity": "sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/parser": "^7.25.3", - "@vue/compiler-core": "3.5.13", - "@vue/compiler-dom": "3.5.13", - "@vue/compiler-ssr": "3.5.13", - "@vue/shared": "3.5.13", - "estree-walker": "^2.0.2", - "magic-string": "^0.30.11", - "postcss": "^8.4.48", - "source-map-js": "^1.2.0" - } - }, - "node_modules/@vue/compiler-ssr": { - "version": "3.5.13", - "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.5.13.tgz", - "integrity": "sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==", - "dev": true, - "peer": true, - "dependencies": { - "@vue/compiler-dom": "3.5.13", - "@vue/shared": "3.5.13" - } - }, - "node_modules/@vue/reactivity": { - "version": "3.5.13", - "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.5.13.tgz", - "integrity": "sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==", - "dev": true, - "peer": true, - "dependencies": { - "@vue/shared": "3.5.13" - } - }, - "node_modules/@vue/runtime-core": { - "version": "3.5.13", - "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.5.13.tgz", - "integrity": "sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==", - "dev": true, - "peer": true, - "dependencies": { - "@vue/reactivity": "3.5.13", - "@vue/shared": "3.5.13" - } - }, - "node_modules/@vue/runtime-dom": { - "version": "3.5.13", - "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.5.13.tgz", - "integrity": "sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==", - "dev": true, - "peer": true, - "dependencies": { - "@vue/reactivity": "3.5.13", - "@vue/runtime-core": "3.5.13", - "@vue/shared": "3.5.13", - "csstype": "^3.1.3" - } - }, - "node_modules/@vue/server-renderer": { - "version": "3.5.13", - "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.5.13.tgz", - "integrity": "sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==", - "dev": true, - "peer": true, - "dependencies": { - "@vue/compiler-ssr": "3.5.13", - "@vue/shared": "3.5.13" - }, - "peerDependencies": { - "vue": "3.5.13" - } - }, - "node_modules/@vue/shared": { - "version": "3.5.13", - "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.13.tgz", - "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==", - "dev": true, - "peer": true - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmmirror.com/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/async": { - "version": "2.6.4", - "resolved": "https://registry.npmmirror.com/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "dev": true, - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", - "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/call-bound/-/call-bound-1.0.3.tgz", - "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", - "dev": true, - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmmirror.com/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/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/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/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/corser": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/corser/-/corser-2.0.1.tgz", - "integrity": "sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true, - "peer": true - }, - "node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/esbuild": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.24.2.tgz", - "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.2", - "@esbuild/android-arm": "0.24.2", - "@esbuild/android-arm64": "0.24.2", - "@esbuild/android-x64": "0.24.2", - "@esbuild/darwin-arm64": "0.24.2", - "@esbuild/darwin-x64": "0.24.2", - "@esbuild/freebsd-arm64": "0.24.2", - "@esbuild/freebsd-x64": "0.24.2", - "@esbuild/linux-arm": "0.24.2", - "@esbuild/linux-arm64": "0.24.2", - "@esbuild/linux-ia32": "0.24.2", - "@esbuild/linux-loong64": "0.24.2", - "@esbuild/linux-mips64el": "0.24.2", - "@esbuild/linux-ppc64": "0.24.2", - "@esbuild/linux-riscv64": "0.24.2", - "@esbuild/linux-s390x": "0.24.2", - "@esbuild/linux-x64": "0.24.2", - "@esbuild/netbsd-arm64": "0.24.2", - "@esbuild/netbsd-x64": "0.24.2", - "@esbuild/openbsd-arm64": "0.24.2", - "@esbuild/openbsd-x64": "0.24.2", - "@esbuild/sunos-x64": "0.24.2", - "@esbuild/win32-arm64": "0.24.2", - "@esbuild/win32-ia32": "0.24.2", - "@esbuild/win32-x64": "0.24.2" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true, - "peer": true - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.7", - "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.7.tgz", - "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", - "dev": true, - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "function-bind": "^1.1.2", - "get-proto": "^1.0.0", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/html-encoding-sniffer": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", - "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", - "dev": true, - "dependencies": { - "whatwg-encoding": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmmirror.com/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "dev": true, - "dependencies": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/http-server": { - "version": "14.1.1", - "resolved": "https://registry.npmmirror.com/http-server/-/http-server-14.1.1.tgz", - "integrity": "sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A==", - "dev": true, - "dependencies": { - "basic-auth": "^2.0.1", - "chalk": "^4.1.2", - "corser": "^2.0.1", - "he": "^1.2.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy": "^1.18.1", - "mime": "^1.6.0", - "minimist": "^1.2.6", - "opener": "^1.5.1", - "portfinder": "^1.0.28", - "secure-compare": "3.0.1", - "union": "~0.5.0", - "url-join": "^4.0.1" - }, - "bin": { - "http-server": "bin/http-server" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/magic-string": { - "version": "0.30.17", - "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.17.tgz", - "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.3.8", - "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.8.tgz", - "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/opener": { - "version": "1.5.2", - "resolved": "https://registry.npmmirror.com/opener/-/opener-1.5.2.tgz", - "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", - "dev": true, - "bin": { - "opener": "bin/opener-bin.js" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true - }, - "node_modules/portfinder": { - "version": "1.0.32", - "resolved": "https://registry.npmmirror.com/portfinder/-/portfinder-1.0.32.tgz", - "integrity": "sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==", - "dev": true, - "dependencies": { - "async": "^2.6.4", - "debug": "^3.2.7", - "mkdirp": "^0.5.6" - }, - "engines": { - "node": ">= 0.12.0" - } - }, - "node_modules/postcss": { - "version": "8.5.1", - "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.1.tgz", - "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.8", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmmirror.com/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", - "dev": true, - "dependencies": { - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, - "node_modules/rollup": { - "version": "4.34.6", - "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.34.6.tgz", - "integrity": "sha512-wc2cBWqJgkU3Iz5oztRkQbfVkbxoz5EhnCGOrnJvnLnQ7O0WhQUYyv18qQI79O8L7DdHrrlJNeCHd4VGpnaXKQ==", - "dev": true, - "dependencies": { - "@types/estree": "1.0.6" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.34.6", - "@rollup/rollup-android-arm64": "4.34.6", - "@rollup/rollup-darwin-arm64": "4.34.6", - "@rollup/rollup-darwin-x64": "4.34.6", - "@rollup/rollup-freebsd-arm64": "4.34.6", - "@rollup/rollup-freebsd-x64": "4.34.6", - "@rollup/rollup-linux-arm-gnueabihf": "4.34.6", - "@rollup/rollup-linux-arm-musleabihf": "4.34.6", - "@rollup/rollup-linux-arm64-gnu": "4.34.6", - "@rollup/rollup-linux-arm64-musl": "4.34.6", - "@rollup/rollup-linux-loongarch64-gnu": "4.34.6", - "@rollup/rollup-linux-powerpc64le-gnu": "4.34.6", - "@rollup/rollup-linux-riscv64-gnu": "4.34.6", - "@rollup/rollup-linux-s390x-gnu": "4.34.6", - "@rollup/rollup-linux-x64-gnu": "4.34.6", - "@rollup/rollup-linux-x64-musl": "4.34.6", - "@rollup/rollup-win32-arm64-msvc": "4.34.6", - "@rollup/rollup-win32-ia32-msvc": "4.34.6", - "@rollup/rollup-win32-x64-msvc": "4.34.6", - "fsevents": "~2.3.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/secure-compare": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/secure-compare/-/secure-compare-3.0.1.tgz", - "integrity": "sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw==", - "dev": true - }, - "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "dev": true, - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmmirror.com/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/union": { - "version": "0.5.0", - "resolved": "https://registry.npmmirror.com/union/-/union-0.5.0.tgz", - "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==", - "dev": true, - "dependencies": { - "qs": "^6.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/url-join": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/url-join/-/url-join-4.0.1.tgz", - "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", - "dev": true - }, - "node_modules/vite": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/vite/-/vite-6.1.0.tgz", - "integrity": "sha512-RjjMipCKVoR4hVfPY6GQTgveinjNuyLw+qruksLDvA5ktI1150VmcMBKmQaEWJhg/j6Uaf6dNCNA0AfdzUb/hQ==", - "dev": true, - "dependencies": { - "esbuild": "^0.24.2", - "postcss": "^8.5.1", - "rollup": "^4.30.1" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "jiti": ">=1.21.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/vue": { - "version": "3.5.13", - "resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.13.tgz", - "integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==", - "dev": true, - "peer": true, - "dependencies": { - "@vue/compiler-dom": "3.5.13", - "@vue/compiler-sfc": "3.5.13", - "@vue/runtime-dom": "3.5.13", - "@vue/server-renderer": "3.5.13", - "@vue/shared": "3.5.13" - }, - "peerDependencies": { - "typescript": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", - "dev": true, - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=12" - } - } - } -} diff --git a/node_modules/.vue-global-types/vue_3.3_false.d.ts b/node_modules/.vue-global-types/vue_3.3_false.d.ts deleted file mode 100644 index 98efa7e..0000000 --- a/node_modules/.vue-global-types/vue_3.3_false.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -// @ts-nocheck -export {}; - -; declare module 'vue' { - export interface GlobalComponents { } - export interface GlobalDirectives { } -} -; declare global { - const __VLS_intrinsicElements: __VLS_IntrinsicElements; - const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any }; - const __VLS_unref: typeof import('vue').unref; - const __VLS_placeholder: any; - - const __VLS_nativeElements = { - ...{} as SVGElementTagNameMap, - ...{} as HTMLElementTagNameMap, - }; - - type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements; - type __VLS_Element = import('vue/jsx-runtime').JSX.Element; - type __VLS_GlobalComponents = import('vue').GlobalComponents & Pick; - type __VLS_GlobalDirectives = import('vue').GlobalDirectives; - type __VLS_IsAny = 0 extends 1 & T ? true : false; - type __VLS_PickNotAny = __VLS_IsAny extends true ? B : A; - type __VLS_unknownDirective = (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void; - type __VLS_WithComponent = - N1 extends keyof LocalComponents ? N1 extends N0 ? Pick : { [K in N0]: LocalComponents[N1] } : - N2 extends keyof LocalComponents ? N2 extends N0 ? Pick : { [K in N0]: LocalComponents[N2] } : - N3 extends keyof LocalComponents ? N3 extends N0 ? Pick : { [K in N0]: LocalComponents[N3] } : - N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N1] } : - N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } : - N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } : - { [K in N0]: unknown }; - type __VLS_FunctionalComponentProps = - '__ctx' extends keyof __VLS_PickNotAny ? K extends { __ctx?: { props?: infer P } } ? NonNullable

: never - : T extends (props: infer P, ...args: any) => any ? P : - {}; - type __VLS_IsFunction = K extends keyof T - ? __VLS_IsAny extends false - ? unknown extends T[K] - ? false - : true - : false - : false; - type __VLS_NormalizeComponentEvent = ( - __VLS_IsFunction extends true - ? Props - : __VLS_IsFunction extends true - ? { [K in onEvent]?: Events[Event] } - : __VLS_IsFunction extends true - ? { [K in onEvent]?: Events[CamelizedEvent] } - : Props - ) & Record; - // fix https://github.com/vuejs/language-tools/issues/926 - type __VLS_UnionToIntersection = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never; - type __VLS_OverloadUnionInner = U & T extends (...args: infer A) => infer R - ? U extends T - ? never - : __VLS_OverloadUnionInner & U & ((...args: A) => R)> | ((...args: A) => R) - : never; - type __VLS_OverloadUnion = Exclude< - __VLS_OverloadUnionInner<(() => never) & T>, - T extends () => never ? never : () => never - >; - type __VLS_ConstructorOverloads = __VLS_OverloadUnion extends infer F - ? F extends (event: infer E, ...args: infer A) => any - ? { [K in E & string]: (...args: A) => void; } - : never - : never; - type __VLS_NormalizeEmits = __VLS_PrettifyGlobal< - __VLS_UnionToIntersection< - __VLS_ConstructorOverloads & { - [K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never - } - > - >; - type __VLS_PrettifyGlobal = { [K in keyof T]: T[K]; } & {}; - type __VLS_PickFunctionalComponentCtx = NonNullable<__VLS_PickNotAny< - '__ctx' extends keyof __VLS_PickNotAny ? K extends { __ctx?: infer Ctx } ? Ctx : never : any - , T extends (props: any, ctx: infer Ctx) => any ? Ctx : any - >>; - type __VLS_UseTemplateRef = Readonly>; - - function __VLS_getVForSourceType(source: number): [number, number, number][]; - function __VLS_getVForSourceType(source: string): [string, number, number][]; - function __VLS_getVForSourceType(source: T): [ - item: T[number], - key: number, - index: number, - ][]; - function __VLS_getVForSourceType }>(source: T): [ - item: T extends { [Symbol.iterator](): Iterator } ? T1 : never, - key: number, - index: undefined, - ][]; - // #3845 - function __VLS_getVForSourceType }>(source: T): [ - item: number | (Exclude extends { [Symbol.iterator](): Iterator } ? T1 : never), - key: number, - index: undefined, - ][]; - function __VLS_getVForSourceType(source: T): [ - item: T[keyof T], - key: keyof T, - index: number, - ][]; - // @ts-ignore - function __VLS_getSlotParams(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>; - // @ts-ignore - function __VLS_getSlotParam(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>[0]; - function __VLS_asFunctionalDirective(dir: T): T extends import('vue').ObjectDirective - ? NonNullable - : T extends (...args: any) => any - ? T - : __VLS_unknownDirective; - function __VLS_withScope(ctx: T, scope: K): ctx is T & K; - function __VLS_makeOptional(t: T): { [K in keyof T]?: T[K] }; - function __VLS_asFunctionalComponent any ? InstanceType : unknown>(t: T, instance?: K): - T extends new (...args: any) => any - ? (props: (K extends { $props: infer Props } ? Props : any) & Record, ctx?: any) => __VLS_Element & { __ctx?: { - attrs?: any, - slots?: K extends { $slots: infer Slots } ? Slots : any, - emit?: K extends { $emit: infer Emit } ? Emit : any - } & { props?: (K extends { $props: infer Props } ? Props : any) & Record; expose?(exposed: K): void; } } - : T extends () => any ? (props: {}, ctx?: any) => ReturnType - : T extends (...args: any) => any ? T - : (_: {} & Record, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record } }; - function __VLS_elementAsFunction(tag: T, endTag?: T): (_: T & Record) => void; - function __VLS_functionalComponentArgsRest any>(t: T): 2 extends Parameters['length'] ? [any] : []; - function __VLS_normalizeSlot(s: S): S extends () => infer R ? (props: {}) => R : S; - function __VLS_tryAsConstant(t: T): T; -} diff --git a/node_modules/@babel/helper-string-parser/LICENSE b/node_modules/@babel/helper-string-parser/LICENSE deleted file mode 100644 index f31575e..0000000 --- a/node_modules/@babel/helper-string-parser/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -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/node_modules/@babel/helper-string-parser/README.md b/node_modules/@babel/helper-string-parser/README.md deleted file mode 100644 index 771b470..0000000 --- a/node_modules/@babel/helper-string-parser/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/helper-string-parser - -> A utility package to parse strings - -See our website [@babel/helper-string-parser](https://babeljs.io/docs/babel-helper-string-parser) for more information. - -## Install - -Using npm: - -```sh -npm install --save @babel/helper-string-parser -``` - -or using yarn: - -```sh -yarn add @babel/helper-string-parser -``` diff --git a/node_modules/@babel/helper-string-parser/lib/index.js b/node_modules/@babel/helper-string-parser/lib/index.js deleted file mode 100644 index 2d94115..0000000 --- a/node_modules/@babel/helper-string-parser/lib/index.js +++ /dev/null @@ -1,295 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.readCodePoint = readCodePoint; -exports.readInt = readInt; -exports.readStringContents = readStringContents; -var _isDigit = function isDigit(code) { - return code >= 48 && code <= 57; -}; -const forbiddenNumericSeparatorSiblings = { - decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]), - hex: new Set([46, 88, 95, 120]) -}; -const isAllowedNumericSeparatorSibling = { - bin: ch => ch === 48 || ch === 49, - oct: ch => ch >= 48 && ch <= 55, - dec: ch => ch >= 48 && ch <= 57, - hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102 -}; -function readStringContents(type, input, pos, lineStart, curLine, errors) { - const initialPos = pos; - const initialLineStart = lineStart; - const initialCurLine = curLine; - let out = ""; - let firstInvalidLoc = null; - let chunkStart = pos; - const { - length - } = input; - for (;;) { - if (pos >= length) { - errors.unterminated(initialPos, initialLineStart, initialCurLine); - out += input.slice(chunkStart, pos); - break; - } - const ch = input.charCodeAt(pos); - if (isStringEnd(type, ch, input, pos)) { - out += input.slice(chunkStart, pos); - break; - } - if (ch === 92) { - out += input.slice(chunkStart, pos); - const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors); - if (res.ch === null && !firstInvalidLoc) { - firstInvalidLoc = { - pos, - lineStart, - curLine - }; - } else { - out += res.ch; - } - ({ - pos, - lineStart, - curLine - } = res); - chunkStart = pos; - } else if (ch === 8232 || ch === 8233) { - ++pos; - ++curLine; - lineStart = pos; - } else if (ch === 10 || ch === 13) { - if (type === "template") { - out += input.slice(chunkStart, pos) + "\n"; - ++pos; - if (ch === 13 && input.charCodeAt(pos) === 10) { - ++pos; - } - ++curLine; - chunkStart = lineStart = pos; - } else { - errors.unterminated(initialPos, initialLineStart, initialCurLine); - } - } else { - ++pos; - } - } - return { - pos, - str: out, - firstInvalidLoc, - lineStart, - curLine, - containsInvalid: !!firstInvalidLoc - }; -} -function isStringEnd(type, ch, input, pos) { - if (type === "template") { - return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123; - } - return ch === (type === "double" ? 34 : 39); -} -function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) { - const throwOnInvalid = !inTemplate; - pos++; - const res = ch => ({ - pos, - ch, - lineStart, - curLine - }); - const ch = input.charCodeAt(pos++); - switch (ch) { - case 110: - return res("\n"); - case 114: - return res("\r"); - case 120: - { - let code; - ({ - code, - pos - } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors)); - return res(code === null ? null : String.fromCharCode(code)); - } - case 117: - { - let code; - ({ - code, - pos - } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors)); - return res(code === null ? null : String.fromCodePoint(code)); - } - case 116: - return res("\t"); - case 98: - return res("\b"); - case 118: - return res("\u000b"); - case 102: - return res("\f"); - case 13: - if (input.charCodeAt(pos) === 10) { - ++pos; - } - case 10: - lineStart = pos; - ++curLine; - case 8232: - case 8233: - return res(""); - case 56: - case 57: - if (inTemplate) { - return res(null); - } else { - errors.strictNumericEscape(pos - 1, lineStart, curLine); - } - default: - if (ch >= 48 && ch <= 55) { - const startPos = pos - 1; - const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2)); - let octalStr = match[0]; - let octal = parseInt(octalStr, 8); - if (octal > 255) { - octalStr = octalStr.slice(0, -1); - octal = parseInt(octalStr, 8); - } - pos += octalStr.length - 1; - const next = input.charCodeAt(pos); - if (octalStr !== "0" || next === 56 || next === 57) { - if (inTemplate) { - return res(null); - } else { - errors.strictNumericEscape(startPos, lineStart, curLine); - } - } - return res(String.fromCharCode(octal)); - } - return res(String.fromCharCode(ch)); - } -} -function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) { - const initialPos = pos; - let n; - ({ - n, - pos - } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid)); - if (n === null) { - if (throwOnInvalid) { - errors.invalidEscapeSequence(initialPos, lineStart, curLine); - } else { - pos = initialPos - 1; - } - } - return { - code: n, - pos - }; -} -function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) { - const start = pos; - const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; - const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin; - let invalid = false; - let total = 0; - for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) { - const code = input.charCodeAt(pos); - let val; - if (code === 95 && allowNumSeparator !== "bail") { - const prev = input.charCodeAt(pos - 1); - const next = input.charCodeAt(pos + 1); - if (!allowNumSeparator) { - if (bailOnError) return { - n: null, - pos - }; - errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine); - } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) { - if (bailOnError) return { - n: null, - pos - }; - errors.unexpectedNumericSeparator(pos, lineStart, curLine); - } - ++pos; - continue; - } - if (code >= 97) { - val = code - 97 + 10; - } else if (code >= 65) { - val = code - 65 + 10; - } else if (_isDigit(code)) { - val = code - 48; - } else { - val = Infinity; - } - if (val >= radix) { - if (val <= 9 && bailOnError) { - return { - n: null, - pos - }; - } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) { - val = 0; - } else if (forceLen) { - val = 0; - invalid = true; - } else { - break; - } - } - ++pos; - total = total * radix + val; - } - if (pos === start || len != null && pos - start !== len || invalid) { - return { - n: null, - pos - }; - } - return { - n: total, - pos - }; -} -function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) { - const ch = input.charCodeAt(pos); - let code; - if (ch === 123) { - ++pos; - ({ - code, - pos - } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors)); - ++pos; - if (code !== null && code > 0x10ffff) { - if (throwOnInvalid) { - errors.invalidCodePoint(pos, lineStart, curLine); - } else { - return { - code: null, - pos - }; - } - } - } else { - ({ - code, - pos - } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors)); - } - return { - code, - pos - }; -} - -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/helper-string-parser/lib/index.js.map b/node_modules/@babel/helper-string-parser/lib/index.js.map deleted file mode 100644 index cd50797..0000000 --- a/node_modules/@babel/helper-string-parser/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["isDigit","code","forbiddenNumericSeparatorSiblings","decBinOct","Set","hex","isAllowedNumericSeparatorSibling","bin","ch","oct","dec","readStringContents","type","input","pos","lineStart","curLine","errors","initialPos","initialLineStart","initialCurLine","out","firstInvalidLoc","chunkStart","length","unterminated","slice","charCodeAt","isStringEnd","res","readEscapedChar","str","containsInvalid","inTemplate","throwOnInvalid","readHexChar","String","fromCharCode","readCodePoint","fromCodePoint","strictNumericEscape","startPos","match","exec","octalStr","octal","parseInt","next","len","forceLen","n","readInt","invalidEscapeSequence","radix","allowNumSeparator","bailOnError","start","forbiddenSiblings","isAllowedSibling","invalid","total","i","e","Infinity","val","prev","numericSeparatorInEscapeSequence","Number","isNaN","has","unexpectedNumericSeparator","_isDigit","invalidDigit","indexOf","invalidCodePoint"],"sources":["../src/index.ts"],"sourcesContent":["// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// The following character codes are forbidden from being\n// an immediate sibling of NumericLiteralSeparator _\nconst forbiddenNumericSeparatorSiblings = {\n decBinOct: new Set([\n charCodes.dot,\n charCodes.uppercaseB,\n charCodes.uppercaseE,\n charCodes.uppercaseO,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseB,\n charCodes.lowercaseE,\n charCodes.lowercaseO,\n ]),\n hex: new Set([\n charCodes.dot,\n charCodes.uppercaseX,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseX,\n ]),\n};\n\nconst isAllowedNumericSeparatorSibling = {\n // 0 - 1\n bin: (ch: number) => ch === charCodes.digit0 || ch === charCodes.digit1,\n\n // 0 - 7\n oct: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit7,\n\n // 0 - 9\n dec: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit9,\n\n // 0 - 9, A - F, a - f,\n hex: (ch: number) =>\n (ch >= charCodes.digit0 && ch <= charCodes.digit9) ||\n (ch >= charCodes.uppercaseA && ch <= charCodes.uppercaseF) ||\n (ch >= charCodes.lowercaseA && ch <= charCodes.lowercaseF),\n};\n\nexport type StringContentsErrorHandlers = EscapedCharErrorHandlers & {\n unterminated(\n initialPos: number,\n initialLineStart: number,\n initialCurLine: number,\n ): void;\n};\n\nexport function readStringContents(\n type: \"single\" | \"double\" | \"template\",\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n errors: StringContentsErrorHandlers,\n) {\n const initialPos = pos;\n const initialLineStart = lineStart;\n const initialCurLine = curLine;\n\n let out = \"\";\n let firstInvalidLoc = null;\n let chunkStart = pos;\n const { length } = input;\n for (;;) {\n if (pos >= length) {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n out += input.slice(chunkStart, pos);\n break;\n }\n const ch = input.charCodeAt(pos);\n if (isStringEnd(type, ch, input, pos)) {\n out += input.slice(chunkStart, pos);\n break;\n }\n if (ch === charCodes.backslash) {\n out += input.slice(chunkStart, pos);\n const res = readEscapedChar(\n input,\n pos,\n lineStart,\n curLine,\n type === \"template\",\n errors,\n );\n if (res.ch === null && !firstInvalidLoc) {\n firstInvalidLoc = { pos, lineStart, curLine };\n } else {\n out += res.ch;\n }\n ({ pos, lineStart, curLine } = res);\n chunkStart = pos;\n } else if (\n ch === charCodes.lineSeparator ||\n ch === charCodes.paragraphSeparator\n ) {\n ++pos;\n ++curLine;\n lineStart = pos;\n } else if (ch === charCodes.lineFeed || ch === charCodes.carriageReturn) {\n if (type === \"template\") {\n out += input.slice(chunkStart, pos) + \"\\n\";\n ++pos;\n if (\n ch === charCodes.carriageReturn &&\n input.charCodeAt(pos) === charCodes.lineFeed\n ) {\n ++pos;\n }\n ++curLine;\n chunkStart = lineStart = pos;\n } else {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n }\n } else {\n ++pos;\n }\n }\n return process.env.BABEL_8_BREAKING\n ? { pos, str: out, firstInvalidLoc, lineStart, curLine }\n : {\n pos,\n str: out,\n firstInvalidLoc,\n lineStart,\n curLine,\n containsInvalid: !!firstInvalidLoc,\n };\n}\n\nfunction isStringEnd(\n type: \"single\" | \"double\" | \"template\",\n ch: number,\n input: string,\n pos: number,\n) {\n if (type === \"template\") {\n return (\n ch === charCodes.graveAccent ||\n (ch === charCodes.dollarSign &&\n input.charCodeAt(pos + 1) === charCodes.leftCurlyBrace)\n );\n }\n return (\n ch === (type === \"double\" ? charCodes.quotationMark : charCodes.apostrophe)\n );\n}\n\ntype EscapedCharErrorHandlers = HexCharErrorHandlers &\n CodePointErrorHandlers & {\n strictNumericEscape(pos: number, lineStart: number, curLine: number): void;\n };\n\nfunction readEscapedChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n inTemplate: boolean,\n errors: EscapedCharErrorHandlers,\n) {\n const throwOnInvalid = !inTemplate;\n pos++; // skip '\\'\n\n const res = (ch: string | null) => ({ pos, ch, lineStart, curLine });\n\n const ch = input.charCodeAt(pos++);\n switch (ch) {\n case charCodes.lowercaseN:\n return res(\"\\n\");\n case charCodes.lowercaseR:\n return res(\"\\r\");\n case charCodes.lowercaseX: {\n let code;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 2,\n false,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCharCode(code));\n }\n case charCodes.lowercaseU: {\n let code;\n ({ code, pos } = readCodePoint(\n input,\n pos,\n lineStart,\n curLine,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCodePoint(code));\n }\n case charCodes.lowercaseT:\n return res(\"\\t\");\n case charCodes.lowercaseB:\n return res(\"\\b\");\n case charCodes.lowercaseV:\n return res(\"\\u000b\");\n case charCodes.lowercaseF:\n return res(\"\\f\");\n case charCodes.carriageReturn:\n if (input.charCodeAt(pos) === charCodes.lineFeed) {\n ++pos;\n }\n // fall through\n case charCodes.lineFeed:\n lineStart = pos;\n ++curLine;\n // fall through\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return res(\"\");\n case charCodes.digit8:\n case charCodes.digit9:\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(pos - 1, lineStart, curLine);\n }\n // fall through\n default:\n if (ch >= charCodes.digit0 && ch <= charCodes.digit7) {\n const startPos = pos - 1;\n const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2));\n\n let octalStr = match[0];\n\n let octal = parseInt(octalStr, 8);\n if (octal > 255) {\n octalStr = octalStr.slice(0, -1);\n octal = parseInt(octalStr, 8);\n }\n pos += octalStr.length - 1;\n const next = input.charCodeAt(pos);\n if (\n octalStr !== \"0\" ||\n next === charCodes.digit8 ||\n next === charCodes.digit9\n ) {\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(startPos, lineStart, curLine);\n }\n }\n\n return res(String.fromCharCode(octal));\n }\n\n return res(String.fromCharCode(ch));\n }\n}\n\ntype HexCharErrorHandlers = IntErrorHandlers & {\n invalidEscapeSequence(pos: number, lineStart: number, curLine: number): void;\n};\n\n// Used to read character escape sequences ('\\x', '\\u').\nfunction readHexChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n len: number,\n forceLen: boolean,\n throwOnInvalid: boolean,\n errors: HexCharErrorHandlers,\n) {\n const initialPos = pos;\n let n;\n ({ n, pos } = readInt(\n input,\n pos,\n lineStart,\n curLine,\n 16,\n len,\n forceLen,\n false,\n errors,\n /* bailOnError */ !throwOnInvalid,\n ));\n if (n === null) {\n if (throwOnInvalid) {\n errors.invalidEscapeSequence(initialPos, lineStart, curLine);\n } else {\n pos = initialPos - 1;\n }\n }\n return { code: n, pos };\n}\n\nexport type IntErrorHandlers = {\n numericSeparatorInEscapeSequence(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n unexpectedNumericSeparator(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n // It can return \"true\" to indicate that the error was handled\n // and the int parsing should continue.\n invalidDigit(\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n ): boolean;\n};\n\nexport function readInt(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n len: number | undefined,\n forceLen: boolean,\n allowNumSeparator: boolean | \"bail\",\n errors: IntErrorHandlers,\n bailOnError: boolean,\n) {\n const start = pos;\n const forbiddenSiblings =\n radix === 16\n ? forbiddenNumericSeparatorSiblings.hex\n : forbiddenNumericSeparatorSiblings.decBinOct;\n const isAllowedSibling =\n radix === 16\n ? isAllowedNumericSeparatorSibling.hex\n : radix === 10\n ? isAllowedNumericSeparatorSibling.dec\n : radix === 8\n ? isAllowedNumericSeparatorSibling.oct\n : isAllowedNumericSeparatorSibling.bin;\n\n let invalid = false;\n let total = 0;\n\n for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {\n const code = input.charCodeAt(pos);\n let val;\n\n if (code === charCodes.underscore && allowNumSeparator !== \"bail\") {\n const prev = input.charCodeAt(pos - 1);\n const next = input.charCodeAt(pos + 1);\n\n if (!allowNumSeparator) {\n if (bailOnError) return { n: null, pos };\n errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);\n } else if (\n Number.isNaN(next) ||\n !isAllowedSibling(next) ||\n forbiddenSiblings.has(prev) ||\n forbiddenSiblings.has(next)\n ) {\n if (bailOnError) return { n: null, pos };\n errors.unexpectedNumericSeparator(pos, lineStart, curLine);\n }\n\n // Ignore this _ character\n ++pos;\n continue;\n }\n\n if (code >= charCodes.lowercaseA) {\n val = code - charCodes.lowercaseA + charCodes.lineFeed;\n } else if (code >= charCodes.uppercaseA) {\n val = code - charCodes.uppercaseA + charCodes.lineFeed;\n } else if (charCodes.isDigit(code)) {\n val = code - charCodes.digit0; // 0-9\n } else {\n val = Infinity;\n }\n if (val >= radix) {\n // If we found a digit which is too big, errors.invalidDigit can return true to avoid\n // breaking the loop (this is used for error recovery).\n if (val <= 9 && bailOnError) {\n return { n: null, pos };\n } else if (\n val <= 9 &&\n errors.invalidDigit(pos, lineStart, curLine, radix)\n ) {\n val = 0;\n } else if (forceLen) {\n val = 0;\n invalid = true;\n } else {\n break;\n }\n }\n ++pos;\n total = total * radix + val;\n }\n if (pos === start || (len != null && pos - start !== len) || invalid) {\n return { n: null, pos };\n }\n\n return { n: total, pos };\n}\n\nexport type CodePointErrorHandlers = HexCharErrorHandlers & {\n invalidCodePoint(pos: number, lineStart: number, curLine: number): void;\n};\n\nexport function readCodePoint(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n throwOnInvalid: boolean,\n errors: CodePointErrorHandlers,\n) {\n const ch = input.charCodeAt(pos);\n let code;\n\n if (ch === charCodes.leftCurlyBrace) {\n ++pos;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n input.indexOf(\"}\", pos) - pos,\n true,\n throwOnInvalid,\n errors,\n ));\n ++pos;\n if (code !== null && code > 0x10ffff) {\n if (throwOnInvalid) {\n errors.invalidCodePoint(pos, lineStart, curLine);\n } else {\n return { code: null, pos };\n }\n }\n } else {\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 4,\n false,\n throwOnInvalid,\n errors,\n ));\n }\n return { code, pos };\n}\n"],"mappings":";;;;;;;;eAAA,SAASA,OAAOA,CAACC,IAAI,EAAE;EACrB,OAAOA,IAAI,MAAU,IAAIA,IAAI,MAAU;AACzC,CAAC;AAID,MAAMC,iCAAiC,GAAG;EACxCC,SAAS,EAAE,IAAIC,GAAG,CAAS,kCAS1B,CAAC;EACFC,GAAG,EAAE,IAAID,GAAG,CAAS,iBAKpB;AACH,CAAC;AAED,MAAME,gCAAgC,GAAG;EAEvCC,GAAG,EAAGC,EAAU,IAAKA,EAAE,OAAqB,IAAIA,EAAE,OAAqB;EAGvEC,GAAG,EAAGD,EAAU,IAAKA,EAAE,MAAoB,IAAIA,EAAE,MAAoB;EAGrEE,GAAG,EAAGF,EAAU,IAAKA,EAAE,MAAoB,IAAIA,EAAE,MAAoB;EAGrEH,GAAG,EAAGG,EAAU,IACbA,EAAE,MAAoB,IAAIA,EAAE,MAAoB,IAChDA,EAAE,MAAwB,IAAIA,EAAE,MAAyB,IACzDA,EAAE,MAAwB,IAAIA,EAAE;AACrC,CAAC;AAUM,SAASG,kBAAkBA,CAChCC,IAAsC,EACtCC,KAAa,EACbC,GAAW,EACXC,SAAiB,EACjBC,OAAe,EACfC,MAAmC,EACnC;EACA,MAAMC,UAAU,GAAGJ,GAAG;EACtB,MAAMK,gBAAgB,GAAGJ,SAAS;EAClC,MAAMK,cAAc,GAAGJ,OAAO;EAE9B,IAAIK,GAAG,GAAG,EAAE;EACZ,IAAIC,eAAe,GAAG,IAAI;EAC1B,IAAIC,UAAU,GAAGT,GAAG;EACpB,MAAM;IAAEU;EAAO,CAAC,GAAGX,KAAK;EACxB,SAAS;IACP,IAAIC,GAAG,IAAIU,MAAM,EAAE;MACjBP,MAAM,CAACQ,YAAY,CAACP,UAAU,EAAEC,gBAAgB,EAAEC,cAAc,CAAC;MACjEC,GAAG,IAAIR,KAAK,CAACa,KAAK,CAACH,UAAU,EAAET,GAAG,CAAC;MACnC;IACF;IACA,MAAMN,EAAE,GAAGK,KAAK,CAACc,UAAU,CAACb,GAAG,CAAC;IAChC,IAAIc,WAAW,CAAChB,IAAI,EAAEJ,EAAE,EAAEK,KAAK,EAAEC,GAAG,CAAC,EAAE;MACrCO,GAAG,IAAIR,KAAK,CAACa,KAAK,CAACH,UAAU,EAAET,GAAG,CAAC;MACnC;IACF;IACA,IAAIN,EAAE,OAAwB,EAAE;MAC9Ba,GAAG,IAAIR,KAAK,CAACa,KAAK,CAACH,UAAU,EAAET,GAAG,CAAC;MACnC,MAAMe,GAAG,GAAGC,eAAe,CACzBjB,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,OAAO,EACPJ,IAAI,KAAK,UAAU,EACnBK,MACF,CAAC;MACD,IAAIY,GAAG,CAACrB,EAAE,KAAK,IAAI,IAAI,CAACc,eAAe,EAAE;QACvCA,eAAe,GAAG;UAAER,GAAG;UAAEC,SAAS;UAAEC;QAAQ,CAAC;MAC/C,CAAC,MAAM;QACLK,GAAG,IAAIQ,GAAG,CAACrB,EAAE;MACf;MACA,CAAC;QAAEM,GAAG;QAAEC,SAAS;QAAEC;MAAQ,CAAC,GAAGa,GAAG;MAClCN,UAAU,GAAGT,GAAG;IAClB,CAAC,MAAM,IACLN,EAAE,SAA4B,IAC9BA,EAAE,SAAiC,EACnC;MACA,EAAEM,GAAG;MACL,EAAEE,OAAO;MACTD,SAAS,GAAGD,GAAG;IACjB,CAAC,MAAM,IAAIN,EAAE,OAAuB,IAAIA,EAAE,OAA6B,EAAE;MACvE,IAAII,IAAI,KAAK,UAAU,EAAE;QACvBS,GAAG,IAAIR,KAAK,CAACa,KAAK,CAACH,UAAU,EAAET,GAAG,CAAC,GAAG,IAAI;QAC1C,EAAEA,GAAG;QACL,IACEN,EAAE,OAA6B,IAC/BK,KAAK,CAACc,UAAU,CAACb,GAAG,CAAC,OAAuB,EAC5C;UACA,EAAEA,GAAG;QACP;QACA,EAAEE,OAAO;QACTO,UAAU,GAAGR,SAAS,GAAGD,GAAG;MAC9B,CAAC,MAAM;QACLG,MAAM,CAACQ,YAAY,CAACP,UAAU,EAAEC,gBAAgB,EAAEC,cAAc,CAAC;MACnE;IACF,CAAC,MAAM;MACL,EAAEN,GAAG;IACP;EACF;EACA,OAEI;IACEA,GAAG;IACHiB,GAAG,EAAEV,GAAG;IACRC,eAAe;IACfP,SAAS;IACTC,OAAO;IACPgB,eAAe,EAAE,CAAC,CAACV;EACrB,CAAC;AACP;AAEA,SAASM,WAAWA,CAClBhB,IAAsC,EACtCJ,EAAU,EACVK,KAAa,EACbC,GAAW,EACX;EACA,IAAIF,IAAI,KAAK,UAAU,EAAE;IACvB,OACEJ,EAAE,OAA0B,IAC3BA,EAAE,OAAyB,IAC1BK,KAAK,CAACc,UAAU,CAACb,GAAG,GAAG,CAAC,CAAC,QAA8B;EAE7D;EACA,OACEN,EAAE,MAAMI,IAAI,KAAK,QAAQ,UAAiD,CAAC;AAE/E;AAOA,SAASkB,eAAeA,CACtBjB,KAAa,EACbC,GAAW,EACXC,SAAiB,EACjBC,OAAe,EACfiB,UAAmB,EACnBhB,MAAgC,EAChC;EACA,MAAMiB,cAAc,GAAG,CAACD,UAAU;EAClCnB,GAAG,EAAE;EAEL,MAAMe,GAAG,GAAIrB,EAAiB,KAAM;IAAEM,GAAG;IAAEN,EAAE;IAAEO,SAAS;IAAEC;EAAQ,CAAC,CAAC;EAEpE,MAAMR,EAAE,GAAGK,KAAK,CAACc,UAAU,CAACb,GAAG,EAAE,CAAC;EAClC,QAAQN,EAAE;IACR;MACE,OAAOqB,GAAG,CAAC,IAAI,CAAC;IAClB;MACE,OAAOA,GAAG,CAAC,IAAI,CAAC;IAClB;MAA2B;QACzB,IAAI5B,IAAI;QACR,CAAC;UAAEA,IAAI;UAAEa;QAAI,CAAC,GAAGqB,WAAW,CAC1BtB,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,OAAO,EACP,CAAC,EACD,KAAK,EACLkB,cAAc,EACdjB,MACF,CAAC;QACD,OAAOY,GAAG,CAAC5B,IAAI,KAAK,IAAI,GAAG,IAAI,GAAGmC,MAAM,CAACC,YAAY,CAACpC,IAAI,CAAC,CAAC;MAC9D;IACA;MAA2B;QACzB,IAAIA,IAAI;QACR,CAAC;UAAEA,IAAI;UAAEa;QAAI,CAAC,GAAGwB,aAAa,CAC5BzB,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,OAAO,EACPkB,cAAc,EACdjB,MACF,CAAC;QACD,OAAOY,GAAG,CAAC5B,IAAI,KAAK,IAAI,GAAG,IAAI,GAAGmC,MAAM,CAACG,aAAa,CAACtC,IAAI,CAAC,CAAC;MAC/D;IACA;MACE,OAAO4B,GAAG,CAAC,IAAI,CAAC;IAClB;MACE,OAAOA,GAAG,CAAC,IAAI,CAAC;IAClB;MACE,OAAOA,GAAG,CAAC,QAAQ,CAAC;IACtB;MACE,OAAOA,GAAG,CAAC,IAAI,CAAC;IAClB;MACE,IAAIhB,KAAK,CAACc,UAAU,CAACb,GAAG,CAAC,OAAuB,EAAE;QAChD,EAAEA,GAAG;MACP;IAEF;MACEC,SAAS,GAAGD,GAAG;MACf,EAAEE,OAAO;IAEX;IACA;MACE,OAAOa,GAAG,CAAC,EAAE,CAAC;IAChB;IACA;MACE,IAAII,UAAU,EAAE;QACd,OAAOJ,GAAG,CAAC,IAAI,CAAC;MAClB,CAAC,MAAM;QACLZ,MAAM,CAACuB,mBAAmB,CAAC1B,GAAG,GAAG,CAAC,EAAEC,SAAS,EAAEC,OAAO,CAAC;MACzD;IAEF;MACE,IAAIR,EAAE,MAAoB,IAAIA,EAAE,MAAoB,EAAE;QACpD,MAAMiC,QAAQ,GAAG3B,GAAG,GAAG,CAAC;QACxB,MAAM4B,KAAK,GAAG,SAAS,CAACC,IAAI,CAAC9B,KAAK,CAACa,KAAK,CAACe,QAAQ,EAAE3B,GAAG,GAAG,CAAC,CAAC,CAAC;QAE5D,IAAI8B,QAAQ,GAAGF,KAAK,CAAC,CAAC,CAAC;QAEvB,IAAIG,KAAK,GAAGC,QAAQ,CAACF,QAAQ,EAAE,CAAC,CAAC;QACjC,IAAIC,KAAK,GAAG,GAAG,EAAE;UACfD,QAAQ,GAAGA,QAAQ,CAAClB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;UAChCmB,KAAK,GAAGC,QAAQ,CAACF,QAAQ,EAAE,CAAC,CAAC;QAC/B;QACA9B,GAAG,IAAI8B,QAAQ,CAACpB,MAAM,GAAG,CAAC;QAC1B,MAAMuB,IAAI,GAAGlC,KAAK,CAACc,UAAU,CAACb,GAAG,CAAC;QAClC,IACE8B,QAAQ,KAAK,GAAG,IAChBG,IAAI,OAAqB,IACzBA,IAAI,OAAqB,EACzB;UACA,IAAId,UAAU,EAAE;YACd,OAAOJ,GAAG,CAAC,IAAI,CAAC;UAClB,CAAC,MAAM;YACLZ,MAAM,CAACuB,mBAAmB,CAACC,QAAQ,EAAE1B,SAAS,EAAEC,OAAO,CAAC;UAC1D;QACF;QAEA,OAAOa,GAAG,CAACO,MAAM,CAACC,YAAY,CAACQ,KAAK,CAAC,CAAC;MACxC;MAEA,OAAOhB,GAAG,CAACO,MAAM,CAACC,YAAY,CAAC7B,EAAE,CAAC,CAAC;EACvC;AACF;AAOA,SAAS2B,WAAWA,CAClBtB,KAAa,EACbC,GAAW,EACXC,SAAiB,EACjBC,OAAe,EACfgC,GAAW,EACXC,QAAiB,EACjBf,cAAuB,EACvBjB,MAA4B,EAC5B;EACA,MAAMC,UAAU,GAAGJ,GAAG;EACtB,IAAIoC,CAAC;EACL,CAAC;IAAEA,CAAC;IAAEpC;EAAI,CAAC,GAAGqC,OAAO,CACnBtC,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,OAAO,EACP,EAAE,EACFgC,GAAG,EACHC,QAAQ,EACR,KAAK,EACLhC,MAAM,EACY,CAACiB,cACrB,CAAC;EACD,IAAIgB,CAAC,KAAK,IAAI,EAAE;IACd,IAAIhB,cAAc,EAAE;MAClBjB,MAAM,CAACmC,qBAAqB,CAAClC,UAAU,EAAEH,SAAS,EAAEC,OAAO,CAAC;IAC9D,CAAC,MAAM;MACLF,GAAG,GAAGI,UAAU,GAAG,CAAC;IACtB;EACF;EACA,OAAO;IAAEjB,IAAI,EAAEiD,CAAC;IAAEpC;EAAI,CAAC;AACzB;AAuBO,SAASqC,OAAOA,CACrBtC,KAAa,EACbC,GAAW,EACXC,SAAiB,EACjBC,OAAe,EACfqC,KAAa,EACbL,GAAuB,EACvBC,QAAiB,EACjBK,iBAAmC,EACnCrC,MAAwB,EACxBsC,WAAoB,EACpB;EACA,MAAMC,KAAK,GAAG1C,GAAG;EACjB,MAAM2C,iBAAiB,GACrBJ,KAAK,KAAK,EAAE,GACRnD,iCAAiC,CAACG,GAAG,GACrCH,iCAAiC,CAACC,SAAS;EACjD,MAAMuD,gBAAgB,GACpBL,KAAK,KAAK,EAAE,GACR/C,gCAAgC,CAACD,GAAG,GACpCgD,KAAK,KAAK,EAAE,GACV/C,gCAAgC,CAACI,GAAG,GACpC2C,KAAK,KAAK,CAAC,GACT/C,gCAAgC,CAACG,GAAG,GACpCH,gCAAgC,CAACC,GAAG;EAE9C,IAAIoD,OAAO,GAAG,KAAK;EACnB,IAAIC,KAAK,GAAG,CAAC;EAEb,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAGd,GAAG,IAAI,IAAI,GAAGe,QAAQ,GAAGf,GAAG,EAAEa,CAAC,GAAGC,CAAC,EAAE,EAAED,CAAC,EAAE;IAC5D,MAAM5D,IAAI,GAAGY,KAAK,CAACc,UAAU,CAACb,GAAG,CAAC;IAClC,IAAIkD,GAAG;IAEP,IAAI/D,IAAI,OAAyB,IAAIqD,iBAAiB,KAAK,MAAM,EAAE;MACjE,MAAMW,IAAI,GAAGpD,KAAK,CAACc,UAAU,CAACb,GAAG,GAAG,CAAC,CAAC;MACtC,MAAMiC,IAAI,GAAGlC,KAAK,CAACc,UAAU,CAACb,GAAG,GAAG,CAAC,CAAC;MAEtC,IAAI,CAACwC,iBAAiB,EAAE;QACtB,IAAIC,WAAW,EAAE,OAAO;UAAEL,CAAC,EAAE,IAAI;UAAEpC;QAAI,CAAC;QACxCG,MAAM,CAACiD,gCAAgC,CAACpD,GAAG,EAAEC,SAAS,EAAEC,OAAO,CAAC;MAClE,CAAC,MAAM,IACLmD,MAAM,CAACC,KAAK,CAACrB,IAAI,CAAC,IAClB,CAACW,gBAAgB,CAACX,IAAI,CAAC,IACvBU,iBAAiB,CAACY,GAAG,CAACJ,IAAI,CAAC,IAC3BR,iBAAiB,CAACY,GAAG,CAACtB,IAAI,CAAC,EAC3B;QACA,IAAIQ,WAAW,EAAE,OAAO;UAAEL,CAAC,EAAE,IAAI;UAAEpC;QAAI,CAAC;QACxCG,MAAM,CAACqD,0BAA0B,CAACxD,GAAG,EAAEC,SAAS,EAAEC,OAAO,CAAC;MAC5D;MAGA,EAAEF,GAAG;MACL;IACF;IAEA,IAAIb,IAAI,MAAwB,EAAE;MAChC+D,GAAG,GAAG/D,IAAI,KAAuB,KAAqB;IACxD,CAAC,MAAM,IAAIA,IAAI,MAAwB,EAAE;MACvC+D,GAAG,GAAG/D,IAAI,KAAuB,KAAqB;IACxD,CAAC,MAAM,IAAIsE,QAAA,CAAkBtE,IAAI,CAAC,EAAE;MAClC+D,GAAG,GAAG/D,IAAI,KAAmB;IAC/B,CAAC,MAAM;MACL+D,GAAG,GAAGD,QAAQ;IAChB;IACA,IAAIC,GAAG,IAAIX,KAAK,EAAE;MAGhB,IAAIW,GAAG,IAAI,CAAC,IAAIT,WAAW,EAAE;QAC3B,OAAO;UAAEL,CAAC,EAAE,IAAI;UAAEpC;QAAI,CAAC;MACzB,CAAC,MAAM,IACLkD,GAAG,IAAI,CAAC,IACR/C,MAAM,CAACuD,YAAY,CAAC1D,GAAG,EAAEC,SAAS,EAAEC,OAAO,EAAEqC,KAAK,CAAC,EACnD;QACAW,GAAG,GAAG,CAAC;MACT,CAAC,MAAM,IAAIf,QAAQ,EAAE;QACnBe,GAAG,GAAG,CAAC;QACPL,OAAO,GAAG,IAAI;MAChB,CAAC,MAAM;QACL;MACF;IACF;IACA,EAAE7C,GAAG;IACL8C,KAAK,GAAGA,KAAK,GAAGP,KAAK,GAAGW,GAAG;EAC7B;EACA,IAAIlD,GAAG,KAAK0C,KAAK,IAAKR,GAAG,IAAI,IAAI,IAAIlC,GAAG,GAAG0C,KAAK,KAAKR,GAAI,IAAIW,OAAO,EAAE;IACpE,OAAO;MAAET,CAAC,EAAE,IAAI;MAAEpC;IAAI,CAAC;EACzB;EAEA,OAAO;IAAEoC,CAAC,EAAEU,KAAK;IAAE9C;EAAI,CAAC;AAC1B;AAMO,SAASwB,aAAaA,CAC3BzB,KAAa,EACbC,GAAW,EACXC,SAAiB,EACjBC,OAAe,EACfkB,cAAuB,EACvBjB,MAA8B,EAC9B;EACA,MAAMT,EAAE,GAAGK,KAAK,CAACc,UAAU,CAACb,GAAG,CAAC;EAChC,IAAIb,IAAI;EAER,IAAIO,EAAE,QAA6B,EAAE;IACnC,EAAEM,GAAG;IACL,CAAC;MAAEb,IAAI;MAAEa;IAAI,CAAC,GAAGqB,WAAW,CAC1BtB,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,OAAO,EACPH,KAAK,CAAC4D,OAAO,CAAC,GAAG,EAAE3D,GAAG,CAAC,GAAGA,GAAG,EAC7B,IAAI,EACJoB,cAAc,EACdjB,MACF,CAAC;IACD,EAAEH,GAAG;IACL,IAAIb,IAAI,KAAK,IAAI,IAAIA,IAAI,GAAG,QAAQ,EAAE;MACpC,IAAIiC,cAAc,EAAE;QAClBjB,MAAM,CAACyD,gBAAgB,CAAC5D,GAAG,EAAEC,SAAS,EAAEC,OAAO,CAAC;MAClD,CAAC,MAAM;QACL,OAAO;UAAEf,IAAI,EAAE,IAAI;UAAEa;QAAI,CAAC;MAC5B;IACF;EACF,CAAC,MAAM;IACL,CAAC;MAAEb,IAAI;MAAEa;IAAI,CAAC,GAAGqB,WAAW,CAC1BtB,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,OAAO,EACP,CAAC,EACD,KAAK,EACLkB,cAAc,EACdjB,MACF,CAAC;EACH;EACA,OAAO;IAAEhB,IAAI;IAAEa;EAAI,CAAC;AACtB","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/helper-string-parser/package.json b/node_modules/@babel/helper-string-parser/package.json deleted file mode 100644 index 0d0a31a..0000000 --- a/node_modules/@babel/helper-string-parser/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "@babel/helper-string-parser", - "version": "7.25.9", - "description": "A utility package to parse strings", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel.git", - "directory": "packages/babel-helper-string-parser" - }, - "homepage": "https://babel.dev/docs/en/next/babel-helper-string-parser", - "license": "MIT", - "publishConfig": { - "access": "public" - }, - "main": "./lib/index.js", - "devDependencies": { - "charcodes": "^0.2.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "author": "The Babel Team (https://babel.dev/team)", - "exports": { - ".": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - }, - "./package.json": "./package.json" - }, - "type": "commonjs" -} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/LICENSE b/node_modules/@babel/helper-validator-identifier/LICENSE deleted file mode 100644 index f31575e..0000000 --- a/node_modules/@babel/helper-validator-identifier/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -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/node_modules/@babel/helper-validator-identifier/README.md b/node_modules/@babel/helper-validator-identifier/README.md deleted file mode 100644 index 05c19e6..0000000 --- a/node_modules/@babel/helper-validator-identifier/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/helper-validator-identifier - -> Validate identifier/keywords name - -See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/babel-helper-validator-identifier) for more information. - -## Install - -Using npm: - -```sh -npm install --save @babel/helper-validator-identifier -``` - -or using yarn: - -```sh -yarn add @babel/helper-validator-identifier -``` diff --git a/node_modules/@babel/helper-validator-identifier/lib/identifier.js b/node_modules/@babel/helper-validator-identifier/lib/identifier.js deleted file mode 100644 index fdb9aec..0000000 --- a/node_modules/@babel/helper-validator-identifier/lib/identifier.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isIdentifierChar = isIdentifierChar; -exports.isIdentifierName = isIdentifierName; -exports.isIdentifierStart = isIdentifierStart; -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-\u1c8a\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-\ua7cd\ua7d0\ua7d1\ua7d3\ua7d5-\ua7dc\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 = "\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\u0897-\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\u0cf3\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-\u0ece\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\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\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\uff65"; -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, 4, 51, 13, 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, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 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, 20, 1, 64, 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, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 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, 200, 32, 32, 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, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 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, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 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, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; -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, 7, 9, 32, 4, 318, 1, 80, 3, 71, 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, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 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, 343, 9, 54, 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, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 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, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 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; -} - -//# sourceMappingURL=identifier.js.map diff --git a/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map b/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map deleted file mode 100644 index ecf0952..0000000 --- a/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["nonASCIIidentifierStartChars","nonASCIIidentifierChars","nonASCIIidentifierStart","RegExp","nonASCIIidentifier","astralIdentifierStartCodes","astralIdentifierCodes","isInAstralSet","code","set","pos","i","length","isIdentifierStart","test","String","fromCharCode","isIdentifierChar","isIdentifierName","name","isFirst","cp","charCodeAt","trail"],"sources":["../src/identifier.ts"],"sourcesContent":["// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.cjs`.\n\n/* prettier-ignore */\nlet 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-\\u1c8a\\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-\\ua7cd\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7dc\\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\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\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\\u0897-\\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\\u0cf3\\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-\\u0ece\\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\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\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\\uff65\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.cjs`.\n/* prettier-ignore */\nconst 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,4,51,13,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,39,27,10,22,251,41,7,1,17,2,60,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,20,1,64,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,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,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,200,32,32,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,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,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191];\n/* prettier-ignore */\nconst 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,7,9,32,4,318,1,80,3,71,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,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,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,343,9,54,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,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,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,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (let i = 0; i < name.length; i++) {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = name.charCodeAt(i);\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n if (isFirst) {\n isFirst = false;\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n"],"mappings":";;;;;;;;AAaA,IAAIA,4BAA4B,GAAG,8qIAA8qI;AAEjtI,IAAIC,uBAAuB,GAAG,+kFAA+kF;AAE7mF,MAAMC,uBAAuB,GAAG,IAAIC,MAAM,CACxC,GAAG,GAAGH,4BAA4B,GAAG,GACvC,CAAC;AACD,MAAMI,kBAAkB,GAAG,IAAID,MAAM,CACnC,GAAG,GAAGH,4BAA4B,GAAGC,uBAAuB,GAAG,GACjE,CAAC;AAEDD,4BAA4B,GAAGC,uBAAuB,GAAG,IAAI;AAQ7D,MAAMI,0BAA0B,GAAG,CAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,GAAG,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAC,EAAE,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,IAAI,EAAC,KAAK,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,CAAC;AAEjkD,MAAMC,qBAAqB,GAAG,CAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,MAAM,EAAC,GAAG,CAAC;AAK/0B,SAASC,aAAaA,CAACC,IAAY,EAAEC,GAAsB,EAAW;EACpE,IAAIC,GAAG,GAAG,OAAO;EACjB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEC,MAAM,GAAGH,GAAG,CAACG,MAAM,EAAED,CAAC,GAAGC,MAAM,EAAED,CAAC,IAAI,CAAC,EAAE;IACvDD,GAAG,IAAID,GAAG,CAACE,CAAC,CAAC;IACb,IAAID,GAAG,GAAGF,IAAI,EAAE,OAAO,KAAK;IAE5BE,GAAG,IAAID,GAAG,CAACE,CAAC,GAAG,CAAC,CAAC;IACjB,IAAID,GAAG,IAAIF,IAAI,EAAE,OAAO,IAAI;EAC9B;EACA,OAAO,KAAK;AACd;AAIO,SAASK,iBAAiBA,CAACL,IAAY,EAAW;EACvD,IAAIA,IAAI,KAAuB,EAAE,OAAOA,IAAI,OAAyB;EACrE,IAAIA,IAAI,MAAwB,EAAE,OAAO,IAAI;EAC7C,IAAIA,IAAI,KAAuB,EAAE,OAAOA,IAAI,OAAyB;EACrE,IAAIA,IAAI,OAAwB,EAAE,OAAO,IAAI;EAC7C,IAAIA,IAAI,IAAI,MAAM,EAAE;IAClB,OACEA,IAAI,IAAI,IAAI,IAAIN,uBAAuB,CAACY,IAAI,CAACC,MAAM,CAACC,YAAY,CAACR,IAAI,CAAC,CAAC;EAE3E;EACA,OAAOD,aAAa,CAACC,IAAI,EAAEH,0BAA0B,CAAC;AACxD;AAIO,SAASY,gBAAgBA,CAACT,IAAY,EAAW;EACtD,IAAIA,IAAI,KAAmB,EAAE,OAAOA,IAAI,OAAyB;EACjE,IAAIA,IAAI,KAAkB,EAAE,OAAO,IAAI;EACvC,IAAIA,IAAI,KAAuB,EAAE,OAAO,KAAK;EAC7C,IAAIA,IAAI,MAAwB,EAAE,OAAO,IAAI;EAC7C,IAAIA,IAAI,KAAuB,EAAE,OAAOA,IAAI,OAAyB;EACrE,IAAIA,IAAI,OAAwB,EAAE,OAAO,IAAI;EAC7C,IAAIA,IAAI,IAAI,MAAM,EAAE;IAClB,OAAOA,IAAI,IAAI,IAAI,IAAIJ,kBAAkB,CAACU,IAAI,CAACC,MAAM,CAACC,YAAY,CAACR,IAAI,CAAC,CAAC;EAC3E;EACA,OACED,aAAa,CAACC,IAAI,EAAEH,0BAA0B,CAAC,IAC/CE,aAAa,CAACC,IAAI,EAAEF,qBAAqB,CAAC;AAE9C;AAIO,SAASY,gBAAgBA,CAACC,IAAY,EAAW;EACtD,IAAIC,OAAO,GAAG,IAAI;EAClB,KAAK,IAAIT,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGQ,IAAI,CAACP,MAAM,EAAED,CAAC,EAAE,EAAE;IAKpC,IAAIU,EAAE,GAAGF,IAAI,CAACG,UAAU,CAACX,CAAC,CAAC;IAC3B,IAAI,CAACU,EAAE,GAAG,MAAM,MAAM,MAAM,IAAIV,CAAC,GAAG,CAAC,GAAGQ,IAAI,CAACP,MAAM,EAAE;MACnD,MAAMW,KAAK,GAAGJ,IAAI,CAACG,UAAU,CAAC,EAAEX,CAAC,CAAC;MAClC,IAAI,CAACY,KAAK,GAAG,MAAM,MAAM,MAAM,EAAE;QAC/BF,EAAE,GAAG,OAAO,IAAI,CAACA,EAAE,GAAG,KAAK,KAAK,EAAE,CAAC,IAAIE,KAAK,GAAG,KAAK,CAAC;MACvD;IACF;IACA,IAAIH,OAAO,EAAE;MACXA,OAAO,GAAG,KAAK;MACf,IAAI,CAACP,iBAAiB,CAACQ,EAAE,CAAC,EAAE;QAC1B,OAAO,KAAK;MACd;IACF,CAAC,MAAM,IAAI,CAACJ,gBAAgB,CAACI,EAAE,CAAC,EAAE;MAChC,OAAO,KAAK;IACd;EACF;EACA,OAAO,CAACD,OAAO;AACjB","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/lib/index.js b/node_modules/@babel/helper-validator-identifier/lib/index.js deleted file mode 100644 index 76b2282..0000000 --- a/node_modules/@babel/helper-validator-identifier/lib/index.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "isIdentifierChar", { - enumerable: true, - get: function () { - return _identifier.isIdentifierChar; - } -}); -Object.defineProperty(exports, "isIdentifierName", { - enumerable: true, - get: function () { - return _identifier.isIdentifierName; - } -}); -Object.defineProperty(exports, "isIdentifierStart", { - enumerable: true, - get: function () { - return _identifier.isIdentifierStart; - } -}); -Object.defineProperty(exports, "isKeyword", { - enumerable: true, - get: function () { - return _keyword.isKeyword; - } -}); -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; - } -}); -var _identifier = require("./identifier.js"); -var _keyword = require("./keyword.js"); - -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/helper-validator-identifier/lib/index.js.map b/node_modules/@babel/helper-validator-identifier/lib/index.js.map deleted file mode 100644 index d985f3b..0000000 --- a/node_modules/@babel/helper-validator-identifier/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_identifier","require","_keyword"],"sources":["../src/index.ts"],"sourcesContent":["export {\n isIdentifierName,\n isIdentifierChar,\n isIdentifierStart,\n} from \"./identifier.ts\";\nexport {\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"./keyword.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/lib/keyword.js b/node_modules/@babel/helper-validator-identifier/lib/keyword.js deleted file mode 100644 index 054cf84..0000000 --- a/node_modules/@babel/helper-validator-identifier/lib/keyword.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isKeyword = isKeyword; -exports.isReservedWord = isReservedWord; -exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; -exports.isStrictBindReservedWord = isStrictBindReservedWord; -exports.isStrictReservedWord = isStrictReservedWord; -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); -} - -//# sourceMappingURL=keyword.js.map diff --git a/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map b/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map deleted file mode 100644 index 3471f78..0000000 --- a/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["reservedWords","keyword","strict","strictBind","keywords","Set","reservedWordsStrictSet","reservedWordsStrictBindSet","isReservedWord","word","inModule","isStrictReservedWord","has","isStrictBindOnlyReservedWord","isStrictBindReservedWord","isKeyword"],"sources":["../src/keyword.ts"],"sourcesContent":["const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n"],"mappings":";;;;;;;;;;AAAA,MAAMA,aAAa,GAAG;EACpBC,OAAO,EAAE,CACP,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,CACT;EACDC,MAAM,EAAE,CACN,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,CACR;EACDC,UAAU,EAAE,CAAC,MAAM,EAAE,WAAW;AAClC,CAAC;AACD,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAACL,aAAa,CAACC,OAAO,CAAC;AAC/C,MAAMK,sBAAsB,GAAG,IAAID,GAAG,CAACL,aAAa,CAACE,MAAM,CAAC;AAC5D,MAAMK,0BAA0B,GAAG,IAAIF,GAAG,CAACL,aAAa,CAACG,UAAU,CAAC;AAK7D,SAASK,cAAcA,CAACC,IAAY,EAAEC,QAAiB,EAAW;EACvE,OAAQA,QAAQ,IAAID,IAAI,KAAK,OAAO,IAAKA,IAAI,KAAK,MAAM;AAC1D;AAOO,SAASE,oBAAoBA,CAACF,IAAY,EAAEC,QAAiB,EAAW;EAC7E,OAAOF,cAAc,CAACC,IAAI,EAAEC,QAAQ,CAAC,IAAIJ,sBAAsB,CAACM,GAAG,CAACH,IAAI,CAAC;AAC3E;AAMO,SAASI,4BAA4BA,CAACJ,IAAY,EAAW;EAClE,OAAOF,0BAA0B,CAACK,GAAG,CAACH,IAAI,CAAC;AAC7C;AAOO,SAASK,wBAAwBA,CACtCL,IAAY,EACZC,QAAiB,EACR;EACT,OACEC,oBAAoB,CAACF,IAAI,EAAEC,QAAQ,CAAC,IAAIG,4BAA4B,CAACJ,IAAI,CAAC;AAE9E;AAEO,SAASM,SAASA,CAACN,IAAY,EAAW;EAC/C,OAAOL,QAAQ,CAACQ,GAAG,CAACH,IAAI,CAAC;AAC3B","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/package.json b/node_modules/@babel/helper-validator-identifier/package.json deleted file mode 100644 index 0147740..0000000 --- a/node_modules/@babel/helper-validator-identifier/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "@babel/helper-validator-identifier", - "version": "7.25.9", - "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": { - ".": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - }, - "./package.json": "./package.json" - }, - "devDependencies": { - "@unicode/unicode-16.0.0": "^1.0.0", - "charcodes": "^0.2.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "author": "The Babel Team (https://babel.dev/team)", - "type": "commonjs" -} \ No newline at end of file diff --git a/node_modules/@babel/parser/CHANGELOG.md b/node_modules/@babel/parser/CHANGELOG.md deleted file mode 100644 index b3840ac..0000000 --- a/node_modules/@babel/parser/CHANGELOG.md +++ /dev/null @@ -1,1073 +0,0 @@ -# Changelog - -> **Tags:** -> - :boom: [Breaking Change] -> - :eyeglasses: [Spec Compliance] -> - :rocket: [New Feature] -> - :bug: [Bug Fix] -> - :memo: [Documentation] -> - :house: [Internal] -> - :nail_care: [Polish] - -> Semver Policy: https://github.com/babel/babel/tree/main/packages/babel-parser#semver - -_Note: Gaps between patch versions are faulty, broken or test releases._ - -See the [Babel Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) for the pre-6.8.0 version Changelog. - -## 6.17.1 (2017-05-10) - -### :bug: Bug Fix - * Fix typo in flow spread operator error (Brian Ng) - * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko) - * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko) - * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng) - * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng) - * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng) - * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng) - -## 6.17.0 (2017-04-20) - -### :bug: Bug Fix - * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie) - * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons) - * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng) - * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons) - * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng) - * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng) - -## 7.0.0-beta.8 (2017-04-04) - -### New Feature -* Add support for flow type spread (#418) (Conrad Buck) -* Allow statics in flow interfaces (#427) (Brian Ng) - -### Bug Fix -* Fix predicate attachment to match flow parser (#428) (Brian Ng) -* Add extra.raw back to JSXText and JSXAttribute (#344) (Alex Rattray) -* Fix rest parameters with array and objects (#424) (Brian Ng) -* Fix number parser (#433) (Alex Kuzmenko) - -### Docs -* Fix CONTRIBUTING.md [skip ci] (#432) (Alex Kuzmenko) - -### Internal -* Use babel-register script when running babel smoke tests (#442) (Brian Ng) - -## 7.0.0-beta.7 (2017-03-22) - -### Spec Compliance -* Remove babylon plugin for template revision since it's stage-4 (#426) (Henry Zhu) - -### Bug Fix - -* Fix push-pop logic in flow (#405) (Daniel Tschinder) - -## 7.0.0-beta.6 (2017-03-21) - -### New Feature -* Add support for invalid escapes in tagged templates (#274) (Kevin Gibbons) - -### Polish -* Improves error message when super is called outside of constructor (#408) (Arshabh Kumar Agarwal) - -### Docs - -* [7.0] Moved value field in spec from ObjectMember to ObjectProperty as ObjectMethod's don't have it (#415) [skip ci] (James Browning) - -## 7.0.0-beta.5 (2017-03-21) - -### Bug Fix -* Throw error if new.target is used outside of a function (#402) (Brian Ng) -* Fix parsing of class properties (#351) (Kevin Gibbons) - -### Other - * Test runner: Detect extra property in 'actual' but not in 'expected'. (#407) (Andy) - * Optimize travis builds (#419) (Daniel Tschinder) - * Update codecov to 2.0 (#412) (Daniel Tschinder) - * Fix spec for ClassMethod: It doesn't have a function, it *is* a function. (#406) [skip ci] (Andy) - * Changed Non-existent RestPattern to RestElement which is what is actually parsed (#409) [skip ci] (James Browning) - * Upgrade flow to 0.41 (Daniel Tschinder) - * Fix watch command (#403) (Brian Ng) - * Update yarn lock (Daniel Tschinder) - * Fix watch command (#403) (Brian Ng) - * chore(package): update flow-bin to version 0.41.0 (#395) (greenkeeper[bot]) - * Add estree test for correct order of directives (Daniel Tschinder) - * Add DoExpression to spec (#364) (Alex Kuzmenko) - * Mention cloning of repository in CONTRIBUTING.md (#391) [skip ci] (Sumedh Nimkarde) - * Explain how to run only one test (#389) [skip ci] (Aaron Ang) - - ## 7.0.0-beta.4 (2017-03-01) - -* Don't consume async when checking for async func decl (#377) (Brian Ng) -* add `ranges` option [skip ci] (Henry Zhu) -* Don't parse class properties without initializers when classProperties is disabled and Flow is enabled (#300) (Andrew Levine) - -## 7.0.0-beta.3 (2017-02-28) - -- [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement (#384) -- Merge changes from 6.x - -## 7.0.0-beta.2 (2017-02-20) - -- estree: correctly change literals in all cases (#368) (Daniel Tschinder) - -## 7.0.0-beta.1 (2017-02-20) - -- Fix negative number literal typeannotations (#366) (Daniel Tschinder) -- Update contributing with more test info [skip ci] (#355) (Brian Ng) - -## 7.0.0-beta.0 (2017-02-15) - -- Reintroduce Variance node (#333) (Daniel Tschinder) -- Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation (#332) (Charles Pick) -- [7.0] Remove ForAwaitStatement, add await flag to ForOfStatement (#349) (Brandon Dail) -- chore(package): update ava to version 0.18.0 (#345) (greenkeeper[bot]) -- chore(package): update babel-plugin-istanbul to version 4.0.0 (#350) (greenkeeper[bot]) -- Change location of ObjectTypeIndexer to match flow (#228) (Daniel Tschinder) -- Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation (#322) (Toru Kobayashi) -- Revert "Temporary rollback for erroring on trailing comma with spread (#154)" (#290) (Daniel Tschinder) -- Remove classConstructorCall plugin (#291) (Brian Ng) -- Update yarn.lock (Daniel Tschinder) -- Update cross-env to 3.x (Daniel Tschinder) -- [7.0] Remove node 0.10, 0.12 and 5 from Travis (#284) (Sergey Rubanov) -- Remove `String.fromCodePoint` shim (#279) (Mathias Bynens) - -## 6.16.1 (2017-02-23) - -### :bug: Regression - -- Revert "Fix export default async function to be FunctionDeclaration" ([#375](https://github.com/babel/babylon/pull/375)) - -Need to modify Babel for this AST node change, so moving to 7.0. - -- Revert "Don't parse class properties without initializers when classProperties plugin is disabled, and Flow is enabled" ([#376](https://github.com/babel/babylon/pull/376)) - -[react-native](https://github.com/facebook/react-native/issues/12542) broke with this so we reverted. - -## 6.16.0 (2017-02-23) - -### :rocket: New Feature - -***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder) - -We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/) - -We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc. - -To enable `estree` mode simply add the plugin in the config: -```json -{ - "plugins": [ "estree" ] -} -``` - -If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned. - -Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew) - -Babylon exports a new function to parse a single expression - -```js -import { parseExpression } from 'babylon'; - -const ast = parseExpression('x || y && z', options); -``` - -The returned AST will only consist of the expression. The options are the same as for `parse()` - -Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu) - -A new option was added to babylon allowing to change the initial linenumber for the first line which is usually `1`. -Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ... - -Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris) - -Added support for function predicates which flow introduced in version 0.33.0 - -```js -declare function is_number(x: mixed): boolean %checks(typeof x === "number"); -``` - -Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder) - -Added support for imports within module declarations which flow introduced in version 0.37.0 - -```js -declare module "C" { - import type { DT } from "D"; - declare export type CT = { D: DT }; -} -``` - -### :eyeglasses: Spec Compliance - -Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons) - -This example now correctly throws an error when there is a semicolon after the decorator: - -```js -class A { -@a; -foo(){} -} -``` - -Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder) - -Using keywords in imports is not allowed anymore: - -```js -import { default } from "foo"; -import { a as debugger } from "foo"; -``` - -Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder) - -In flow it is now forbidden to overwrite the primitive types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration. - -Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder) - -The following code now correctly throws an error - -```js -import type { type a } from "foo"; -``` - -Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine) - -Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour. - -If you enable the flow plugin you can only define the type of the class properties, but not initialize them. - -Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder) - -Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`. - -```js -export default async function bar() {}; -``` - -### :nail_care: Polish - -Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng) - -### :bug: Bug Fix - -Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder) - -Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng) - -ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder) - -Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder) - -Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder) - -Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder) - -Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng) - -Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper) - - -### :house: Internal - -Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray) - -Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray) - -Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder) - -chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot]) - -Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder) - -Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot]) - -Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot]) - -devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo) - -Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder) - -Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder) - -### :memo: Documentation - -Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng) - -Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu) - -Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro) - -AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens) - -## 6.15.0 (2017-01-10) - -### :eyeglasses: Spec Compliance - -Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison) - -This change implements flows new shorthand import syntax -and where previously you had to write this code: - -```js -import {someValue} from "blah"; -import type {someType} from "blah"; -import typeof {someOtherValue} from "blah"; -``` - -you can now write it like this: - -```js -import { - someValue, - type someType, - typeof someOtherValue, -} from "blah"; -``` - -For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request. - -flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin) - -This change now allows a leading pipe everywhere types can be used: -```js -var f = (x): | 1 | 2 => 1; -``` - -Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo) - -Previously babylon parsed the following exports, although they are not valid: -```js -export typeof foo; -export new Foo(); -export function() {}; -export for (;;); -export while(foo); -``` - -### :bug: Bug Fix - -Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin) - -This fixes parsing of this case: - -```js -const map = { - [age <= 17] : 'Too young' -}; -``` - -Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long) - -The following case produced an invalid AST -```js -

{/* foo */}
-``` - -Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy) - -When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST. - -Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant) - -Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray) - -### :house: Internal - -User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder) - -Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo) - -Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine) - -Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder) - -Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine) - -Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU) - -Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot]) - -chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot]) - -chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot]) - -## 6.14.1 (2016-11-17) - -### :bug: Bug Fix - -Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder) - -```js -{ - "plugins": ["*"] -} -``` - -Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer. - -## 6.14.0 (2016-11-16) - -### :eyeglasses: Spec Compliance - -Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo) - -[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words) - -Babylon will throw for more reserved words such as `enum` or `await` (in strict mode). - -``` -class enum {} // throws -class await {} // throws in strict mode (module) -``` - -Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi) - -So where you used to have to write - -```js -type A = (x: string, y: boolean) => number; -type B = (z: string) => number; -type C = { [key: string]: number }; -``` - -you can now write (with flow 0.34.0) - -```js -type A = (string, boolean) => number; -type B = string => number; -type C = { [string]: number }; -``` - -Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner) - -Supports these form now of specifying array types: - -```js -var a: number[][][][]; -var b: string[][]; -``` - -### :bug: Bug Fix - -Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder) - -``` -declare module "foo" { declare module.exports: number } -declare module "foo" { declare module.exports: number; } // also allowed now -``` - -### :house: Internal - - * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman) - * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger) - * Add node 7 (Daniel Tschinder) - * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper) - -## v6.13.1 (2016-10-26) - -### :nail_care: Polish - -- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML)) - -```js -const babylon = require('babylon'); -const ast = babylon.parse('var foo = "lol";'); -``` - -With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph. - -**Without bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png) - -**With bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png) - -- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu) -- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu) - -## v6.13.0 (2016-10-21) - -### :eyeglasses: Spec Compliance - -Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman) - -> See https://flowtype.org/docs/variance.html for more information - -```js -type T = { +p: T }; -interface T { -p: T }; -declare class T { +[k:K]: V }; -class T { -[k:K]: V }; -class C2 { +p: T = e }; -``` - -Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman) - -```js -({ __proto__: 1, __proto__: 2 }) // Throws an error now -``` - -### :bug: Bug Fix - -Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman) - -```js -declare class A { - static: T; -} -``` - -Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine) - -```js -var foo = { async, bar }; -``` - -### :nail_care: Polish - -Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder) - -> This improves the performance slightly (because of hidden classes) - -### :house: Internal - -Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman) - -Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman) - -Readd missin .eslinignore for IDEs (Daniel Tschinder) - -Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman) - -Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman) - -Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman) - -## v6.12.0 (2016-10-14) - -### :eyeglasses: Spec Compliance - -Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler) - -#### Dynamic Import - -- Proposal Repo: https://github.com/domenic/proposal-dynamic-import -- Championed by [@domenic](https://github.com/domenic) -- stage-2 -- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import) - -> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript - -```js -import(`./section-modules/${link.dataset.entryModule}.js`) -.then(module => { - module.loadPageInto(main); -}) -``` - -Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman) - -#### EmptyTypeAnnotation - -Just wasn't covered before. - -```js -type T = empty; -``` - -### :bug: Bug Fix - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing due to sparse array -export const { foo: [ ,, qux7 ] } = bar; -``` - -Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper) - -```js -declare class X { - foobar(): void; - static foobar(): void; -} -``` - -Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper) - -```js -class Foo { - delete(item: T): T { - return item; - } -} -``` - -Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder) - -```js -function *foo() { - const x = (yield 5: any); -} -``` - -### :nail_care: Polish - -Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman) - -```js -// Unexpected token, expected ; (1:6) -{ set 1 } -``` - -### :house: Internal - -Remove kcheck ([#173](https://github.com/babel/babylon/pull/173))) (Daniel Tschinder) - -Also run flow, linting, babel tests on separate instances (add back node 0.10) - -## v6.11.6 (2016-10-12) - -### :bug: Bug Fix/Regression - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing with `Cannot read property 'type' of null` because of null identifiers -export const { foo: [ ,, qux7 ] } = bar; -``` - -## v6.11.5 (2016-10-12) - -### :eyeglasses: Spec Compliance - -Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:20) -export function foo() {}; -export const { a: [{foo}] } = bar; -``` - -Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:22) -export const foo = 1; -export const [bar, ...foo] = baz; -``` - -### :bug: Bug Fix - -Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo) - -```js -// this is ok now -const test = ({async = true}) => {}; -``` - -### :nail_care: Polish - -Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder) - -```bash -# So in the case of a missing ending curly (`}`) -Module build failed: SyntaxError: Unexpected token, expected } (30:0) - 28 | } - 29 | -> 30 | - | ^ -``` - -## v6.11.4 (2016-10-03) - -Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu) - -## v6.11.3 (2016-10-01) - -### :eyeglasses: Spec Compliance - -Add static errors for object rest (#149) ([@danez](https://github.com/danez)) - -> https://github.com/sebmarkbage/ecmascript-rest-spread - -Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right. - -```js -let { x, y, ...z } = { x: 1, y: 2, z: 3 }; -// x = 1 -// y = 2 -// z = { z: 3 } -``` - -#### New Syntax Errors: - -**SyntaxError**: The rest element has to be the last element when destructuring (1:10) -```bash -> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = { x: 1, y: 2, z: 3 } -# y = 2 -# z = 3 -``` - -Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think. - -**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13) - -```bash -> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = 1 -# y = { y: 2, z: 3 } -# z = { y: 2, z: 3 } -``` - -Before y and z would just be the same value anyway so there is no reason to need to have both. - -**SyntaxError**: A trailing comma is not permitted after the rest element (1:16) - -```js -let { x, y, ...z, } = obj; -``` - -The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense. - ---- - -get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell)) - -```js -// valid -function something({ set = null, get = null }) {} -``` - -## v6.11.2 (2016-09-23) - -### Bug Fix - -- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo - -```js -// regression with duplicate export check -SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13) - 20 | - 21 | export const { rhythm } = typography; -> 22 | export const { TypographyStyle } = typography -``` - -Bail out for now, and make a change to account for destructuring in the next release. - -## 6.11.1 (2016-09-22) - -### Bug Fix -- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez - -```javascript -export toString from './toString'; -``` - -```bash -`toString` has already been exported. Exported identifiers must be unique. (1:7) -> 1 | export toString from './toString'; - | ^ - 2 | -``` - -## 6.11.0 (2016-09-22) - -### Spec Compliance (will break CI) - -- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo - -```js -// Only one default export allowed per module. (2:9) -export default function() {}; -export { foo as default }; - -// Only one default export allowed per module. (2:0) -export default {}; -export default function() {}; - -// `Foo` has already been exported. Exported identifiers must be unique. (2:0) -export { Foo }; -export class Foo {}; -``` - -### New Feature (Syntax) - -- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88 - -```js -// AST -interface ClassProperty <: Node { - type: "ClassProperty"; - key: Identifier; - value: Expression; - computed: boolean; // added -} -``` - -```js -// with "plugins": ["classProperties"] -class Foo { - [x] - ['y'] -} - -class Bar { - [p] - [m] () {} -} - ``` - -### Bug Fix - -- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper - -```js -declare class X { - a: number; - static b: number; // static - c: number; // this was being marked as static in the AST as well -} -``` - -### Polish - -- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88 - -```js -// Used to error with: -// SyntaxError: Assigning to rvalue (1:0) - -// Now: -// Invalid left-hand side in assignment expression (1:0) -3 = 4 - -// Invalid left-hand side in for-in statement (1:5) -for (+i in {}); -``` - -### Internal - -- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez -- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo - -## 6.10.0 (2016-09-19) - -> We plan to include some spec compliance bugs in patch versions. An example was the multiple default exports issue. - -### Spec Compliance - -* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu) - -> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors - -More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists) - -For example: - -```js -// this errors because it uses destructuring and default parameters -// in a function with a "use strict" directive -function a([ option1, option2 ] = []) { - "use strict"; -} - ``` - -The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to. - -### New Feature - -* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer) - -Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8 - -Looks like: - -```js -var a : {| x: number, y: string |} = { x: 0, y: 'foo' }; -``` - -### Bug Fixes - -* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder) -* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper) -* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper) - -### Misc - -* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder) -* Fix Contributing guidelines [skip ci] (Daniel Tschinder) - -## 6.9.2 (2016-09-09) - -The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller. - -## 6.9.1 (2016-08-23) - -This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops. - -### Bug Fixes - -- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez -- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez -- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper -- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez -- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez - -## 6.9.0 (2016-08-16) - -### New syntax support - -- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer - -(Be aware that React is not going to support this syntax) - -```js -
- {...todos.map(todo => )} -
-``` - -- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez - -```js -declare module "foo" { - declare module.exports: {} -} -``` - -### New Features - -- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain -- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens - -### Bug Fixes - -- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez -- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez -- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi -- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez -- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi -- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez -- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez - -### Internal - -- Add codecoverage to tests @danez -- Fix tests to not save expected output if we expect the test to fail @danez -- Make a shallow clone of babel for testing @danez -- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot -- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot -- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot -- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot - -## 6.8.4 (2016-07-06) - -### Bug Fixes - -- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez - -## 6.8.3 (2016-07-02) - -### Bug Fixes - -- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez - -## 6.8.2 (2016-06-24) - -### Bug Fixes - -- Fix parse error with yielding jsx elements in generators `function* it() { yield
; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal -- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez -- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez -- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez -- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez -- Support negative numeric type literals @kittens -- Remove line terminator restriction after await keyword @kittens -- Remove grouped type arrow restriction as it seems flow no longer has it @kittens -- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin -- Fix parse error with arrow functions that have flow type parameter declarations `(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi - -### Documentation - -- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene -- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo - -### Internal - -- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez -- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez -- Upgrade test runner ava @kittens -- Add missing generate-identifier-regex script @kittens -- Rename parser context types @kittens -- Add node v6 to travis testing @hzoo -- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens - -## 6.8.1 (2016-06-06) - -### New Feature - -- Parse type parameter declarations with defaults like `type Foo = T` - -### Bug Fixes -- Type parameter declarations need 1 or more type parameters. -- The existential type `*` is not a valid type parameter. -- The existential type `*` is a primary type - -### Spec Compliance -- The param list for type parameter declarations now consists of `TypeParameter` nodes -- New `TypeParameter` AST Node (replaces using the `Identifier` node before) - -``` -interface TypeParameter <: Node { - bound: TypeAnnotation; - default: TypeAnnotation; - name: string; - variance: "plus" | "minus"; -} -``` - -## 6.8.0 (2016-05-02) - -#### New Feature - -##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12)) - -> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md). - -Examples: - -```js -class Foo { - constructor(@foo() x, @bar({ a: 123 }) @baz() y) {} -} - -export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {} - -var obj = { - method(@foo() x, @bar({ a: 123 }) @baz() y) {} -}; -``` - -##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17)) - -There is also a new node type, `ForAwaitStatement`. - -> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals). - -Example: - -```js -async function f() { - for await (let x of y); -} -``` diff --git a/node_modules/@babel/parser/LICENSE b/node_modules/@babel/parser/LICENSE deleted file mode 100644 index d4c7fc5..0000000 --- a/node_modules/@babel/parser/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2014 by various contributors (see AUTHORS) - -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/node_modules/@babel/parser/README.md b/node_modules/@babel/parser/README.md deleted file mode 100644 index a9463e8..0000000 --- a/node_modules/@babel/parser/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/parser - -> A JavaScript parser - -See our website [@babel/parser](https://babeljs.io/docs/babel-parser) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20parser%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/parser -``` - -or using yarn: - -```sh -yarn add @babel/parser --dev -``` diff --git a/node_modules/@babel/parser/bin/babel-parser.js b/node_modules/@babel/parser/bin/babel-parser.js deleted file mode 100644 index 3aca314..0000000 --- a/node_modules/@babel/parser/bin/babel-parser.js +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env node -/* eslint no-var: 0 */ - -var parser = require(".."); -var fs = require("fs"); - -var filename = process.argv[2]; -if (!filename) { - console.error("no filename specified"); -} else { - var file = fs.readFileSync(filename, "utf8"); - var ast = parser.parse(file); - - console.log(JSON.stringify(ast, null, " ")); -} diff --git a/node_modules/@babel/parser/index.cjs b/node_modules/@babel/parser/index.cjs deleted file mode 100644 index 89863a9..0000000 --- a/node_modules/@babel/parser/index.cjs +++ /dev/null @@ -1,5 +0,0 @@ -try { - module.exports = require("./lib/index.cjs"); -} catch { - module.exports = require("./lib/index.js"); -} diff --git a/node_modules/@babel/parser/lib/index.js b/node_modules/@babel/parser/lib/index.js deleted file mode 100644 index 1b0c6a6..0000000 --- a/node_modules/@babel/parser/lib/index.js +++ /dev/null @@ -1,14214 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -function _objectWithoutPropertiesLoose(r, e) { - if (null == r) return {}; - var t = {}; - for (var n in r) if ({}.hasOwnProperty.call(r, n)) { - if (e.includes(n)) continue; - t[n] = r[n]; - } - return t; -} -class Position { - constructor(line, col, index) { - this.line = void 0; - this.column = void 0; - this.index = void 0; - this.line = line; - this.column = col; - this.index = index; - } -} -class SourceLocation { - constructor(start, end) { - this.start = void 0; - this.end = void 0; - this.filename = void 0; - this.identifierName = void 0; - this.start = start; - this.end = end; - } -} -function createPositionWithColumnOffset(position, columnOffset) { - const { - line, - column, - index - } = position; - return new Position(line, column + columnOffset, index + columnOffset); -} -const code = "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"; -var ModuleErrors = { - ImportMetaOutsideModule: { - message: `import.meta may appear only with 'sourceType: "module"'`, - code - }, - ImportOutsideModule: { - message: `'import' and 'export' may appear only with 'sourceType: "module"'`, - code - } -}; -const NodeDescriptions = { - ArrayPattern: "array destructuring pattern", - AssignmentExpression: "assignment expression", - AssignmentPattern: "assignment expression", - ArrowFunctionExpression: "arrow function expression", - ConditionalExpression: "conditional expression", - CatchClause: "catch clause", - ForOfStatement: "for-of statement", - ForInStatement: "for-in statement", - ForStatement: "for-loop", - FormalParameters: "function parameter list", - Identifier: "identifier", - ImportSpecifier: "import specifier", - ImportDefaultSpecifier: "import default specifier", - ImportNamespaceSpecifier: "import namespace specifier", - ObjectPattern: "object destructuring pattern", - ParenthesizedExpression: "parenthesized expression", - RestElement: "rest element", - UpdateExpression: { - true: "prefix operation", - false: "postfix operation" - }, - VariableDeclarator: "variable declaration", - YieldExpression: "yield expression" -}; -const toNodeDescription = node => node.type === "UpdateExpression" ? NodeDescriptions.UpdateExpression[`${node.prefix}`] : NodeDescriptions[node.type]; -var StandardErrors = { - AccessorIsGenerator: ({ - kind - }) => `A ${kind}ter cannot be a generator.`, - ArgumentsInClass: "'arguments' is only allowed in functions and class methods.", - AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.", - AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.", - AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.", - AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.", - AwaitUsingNotInAsyncContext: "'await using' is only allowed within async functions and at the top levels of modules.", - AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.", - AwaitNotInAsyncFunction: "'await' is only allowed within async functions.", - BadGetterArity: "A 'get' accessor must not have any formal parameters.", - BadSetterArity: "A 'set' accessor must have exactly one formal parameter.", - BadSetterRestParameter: "A 'set' accessor function argument must not be a rest parameter.", - ConstructorClassField: "Classes may not have a field named 'constructor'.", - ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.", - ConstructorIsAccessor: "Class constructor may not be an accessor.", - ConstructorIsAsync: "Constructor can't be an async function.", - ConstructorIsGenerator: "Constructor can't be a generator.", - DeclarationMissingInitializer: ({ - kind - }) => `Missing initializer in ${kind} declaration.`, - DecoratorArgumentsOutsideParentheses: "Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.", - DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.", - DecoratorsBeforeAfterExport: "Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.", - DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?", - DecoratorExportClass: "Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.", - DecoratorSemicolon: "Decorators must not be followed by a semicolon.", - DecoratorStaticBlock: "Decorators can't be used with a static block.", - DeferImportRequiresNamespace: 'Only `import defer * as x from "./module"` is valid.', - DeletePrivateField: "Deleting a private field is not allowed.", - DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.", - DuplicateConstructor: "Duplicate constructor in the same class.", - DuplicateDefaultExport: "Only one default export allowed per module.", - DuplicateExport: ({ - exportName - }) => `\`${exportName}\` has already been exported. Exported identifiers must be unique.`, - DuplicateProto: "Redefinition of __proto__ property.", - DuplicateRegExpFlags: "Duplicate regular expression flag.", - DynamicImportPhaseRequiresImportExpressions: ({ - phase - }) => `'import.${phase}(...)' can only be parsed when using the 'createImportExpressions' option.`, - ElementAfterRest: "Rest element must be last element.", - EscapedCharNotAnIdentifier: "Invalid Unicode escape.", - ExportBindingIsString: ({ - localName, - exportName - }) => `A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${localName}' as '${exportName}' } from 'some-module'\`?`, - ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.", - ForInOfLoopInitializer: ({ - type - }) => `'${type === "ForInStatement" ? "for-in" : "for-of"}' loop variable declaration may not have an initializer.`, - ForInUsing: "For-in loop may not start with 'using' declaration.", - ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.", - ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.", - GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.", - IllegalBreakContinue: ({ - type - }) => `Unsyntactic ${type === "BreakStatement" ? "break" : "continue"}.`, - IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.", - IllegalReturn: "'return' outside of function.", - ImportAttributesUseAssert: "The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.", - ImportBindingIsString: ({ - importName - }) => `A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${importName}" as foo }\`?`, - ImportCallArity: `\`import()\` requires exactly one or two arguments.`, - ImportCallNotNewExpression: "Cannot use new with import(...).", - ImportCallSpreadArgument: "`...` is not allowed in `import()`.", - ImportJSONBindingNotDefault: "A JSON module can only be imported with `default`.", - ImportReflectionHasAssertion: "`import module x` cannot have assertions.", - ImportReflectionNotBinding: 'Only `import module x from "./module"` is valid.', - IncompatibleRegExpUVFlags: "The 'u' and 'v' regular expression flags cannot be enabled at the same time.", - InvalidBigIntLiteral: "Invalid BigIntLiteral.", - InvalidCodePoint: "Code point out of bounds.", - InvalidCoverInitializedName: "Invalid shorthand property initializer.", - InvalidDecimal: "Invalid decimal.", - InvalidDigit: ({ - radix - }) => `Expected number in radix ${radix}.`, - InvalidEscapeSequence: "Bad character escape sequence.", - InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.", - InvalidEscapedReservedWord: ({ - reservedWord - }) => `Escape sequence in keyword ${reservedWord}.`, - InvalidIdentifier: ({ - identifierName - }) => `Invalid identifier ${identifierName}.`, - InvalidLhs: ({ - ancestor - }) => `Invalid left-hand side in ${toNodeDescription(ancestor)}.`, - InvalidLhsBinding: ({ - ancestor - }) => `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`, - InvalidLhsOptionalChaining: ({ - ancestor - }) => `Invalid optional chaining in the left-hand side of ${toNodeDescription(ancestor)}.`, - InvalidNumber: "Invalid number.", - InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.", - InvalidOrUnexpectedToken: ({ - unexpected - }) => `Unexpected character '${unexpected}'.`, - InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.", - InvalidPrivateFieldResolution: ({ - identifierName - }) => `Private name #${identifierName} is not defined.`, - InvalidPropertyBindingPattern: "Binding member expression.", - InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.", - InvalidRestAssignmentPattern: "Invalid rest operator's argument.", - LabelRedeclaration: ({ - labelName - }) => `Label '${labelName}' is already declared.`, - LetInLexicalBinding: "'let' is disallowed as a lexically bound name.", - LineTerminatorBeforeArrow: "No line break is allowed before '=>'.", - MalformedRegExpFlags: "Invalid regular expression flag.", - MissingClassName: "A class name is required.", - MissingEqInAssignment: "Only '=' operator can be used for specifying default value.", - MissingSemicolon: "Missing semicolon.", - MissingPlugin: ({ - missingPlugin - }) => `This experimental syntax requires enabling the parser plugin: ${missingPlugin.map(name => JSON.stringify(name)).join(", ")}.`, - MissingOneOfPlugins: ({ - missingPlugin - }) => `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin.map(name => JSON.stringify(name)).join(", ")}.`, - MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.", - MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.", - ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.", - ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.", - ModuleAttributesWithDuplicateKeys: ({ - key - }) => `Duplicate key "${key}" is not allowed in module attributes.`, - ModuleExportNameHasLoneSurrogate: ({ - surrogateCharCode - }) => `An export name cannot include a lone surrogate, found '\\u${surrogateCharCode.toString(16)}'.`, - ModuleExportUndefined: ({ - localName - }) => `Export '${localName}' is not defined.`, - MultipleDefaultsInSwitch: "Multiple default clauses.", - NewlineAfterThrow: "Illegal newline after throw.", - NoCatchOrFinally: "Missing catch or finally clause.", - NumberIdentifier: "Identifier directly after number.", - NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.", - ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.", - OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.", - OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.", - OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.", - ParamDupe: "Argument name clash.", - PatternHasAccessor: "Object pattern can't contain getter or setter.", - PatternHasMethod: "Object pattern can't contain methods.", - PrivateInExpectedIn: ({ - identifierName - }) => `Private names are only allowed in property accesses (\`obj.#${identifierName}\`) or in \`in\` expressions (\`#${identifierName} in obj\`).`, - PrivateNameRedeclaration: ({ - identifierName - }) => `Duplicate private name #${identifierName}.`, - RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", - RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", - RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", - RecordNoProto: "'__proto__' is not allowed in Record expressions.", - RestTrailingComma: "Unexpected trailing comma after rest element.", - SloppyFunction: "In non-strict mode code, functions can only be declared at top level or inside a block.", - SloppyFunctionAnnexB: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.", - SourcePhaseImportRequiresDefault: 'Only `import source x from "./module"` is valid.', - StaticPrototype: "Classes may not have static property named prototype.", - SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?", - SuperPrivateField: "Private fields can't be accessed on super.", - TrailingDecorator: "Decorators must be attached to a class element.", - TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", - TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", - TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", - UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.", - UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.', - UnexpectedDigitAfterHash: "Unexpected digit after hash token.", - UnexpectedImportExport: "'import' and 'export' may only appear at the top level.", - UnexpectedKeyword: ({ - keyword - }) => `Unexpected keyword '${keyword}'.`, - UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.", - UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.", - UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.", - UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.", - UnexpectedPrivateField: "Unexpected private name.", - UnexpectedReservedWord: ({ - reservedWord - }) => `Unexpected reserved word '${reservedWord}'.`, - UnexpectedSuper: "'super' is only allowed in object methods and classes.", - UnexpectedToken: ({ - expected, - unexpected - }) => `Unexpected token${unexpected ? ` '${unexpected}'.` : ""}${expected ? `, expected "${expected}"` : ""}`, - UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.", - UnexpectedUsingDeclaration: "Using declaration cannot appear in the top level when source type is `script`.", - UnsupportedBind: "Binding should be performed on object property.", - UnsupportedDecoratorExport: "A decorated export must export a class declaration.", - UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.", - UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.", - UnsupportedMetaProperty: ({ - target, - onlyValidPropertyName - }) => `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`, - UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.", - UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.", - UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).", - UnterminatedComment: "Unterminated comment.", - UnterminatedRegExp: "Unterminated regular expression.", - UnterminatedString: "Unterminated string constant.", - UnterminatedTemplate: "Unterminated template.", - UsingDeclarationExport: "Using declaration cannot be exported.", - UsingDeclarationHasBindingPattern: "Using declaration cannot have destructuring patterns.", - VarRedeclaration: ({ - identifierName - }) => `Identifier '${identifierName}' has already been declared.`, - YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.", - YieldInParameter: "Yield expression is not allowed in formal parameters.", - ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0." -}; -var StrictModeErrors = { - StrictDelete: "Deleting local variable in strict mode.", - StrictEvalArguments: ({ - referenceName - }) => `Assigning to '${referenceName}' in strict mode.`, - StrictEvalArgumentsBinding: ({ - bindingName - }) => `Binding '${bindingName}' in strict mode.`, - StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.", - StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.", - StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.", - StrictWith: "'with' in strict mode." -}; -const UnparenthesizedPipeBodyDescriptions = new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]); -var PipelineOperatorErrors = Object.assign({ - PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.", - PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.', - PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.", - PipeTopicUnconfiguredToken: ({ - token - }) => `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${token}" }.`, - PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.", - PipeUnparenthesizedBody: ({ - type - }) => `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({ - type - })}; please wrap it in parentheses.` -}, { - PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.', - PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.", - PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.", - PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.", - PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.", - PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.' -}); -const _excluded = ["message"]; -function defineHidden(obj, key, value) { - Object.defineProperty(obj, key, { - enumerable: false, - configurable: true, - value - }); -} -function toParseErrorConstructor({ - toMessage, - code, - reasonCode, - syntaxPlugin -}) { - const hasMissingPlugin = reasonCode === "MissingPlugin" || reasonCode === "MissingOneOfPlugins"; - { - const oldReasonCodes = { - AccessorCannotDeclareThisParameter: "AccesorCannotDeclareThisParameter", - AccessorCannotHaveTypeParameters: "AccesorCannotHaveTypeParameters", - ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference", - SetAccessorCannotHaveOptionalParameter: "SetAccesorCannotHaveOptionalParameter", - SetAccessorCannotHaveRestParameter: "SetAccesorCannotHaveRestParameter", - SetAccessorCannotHaveReturnType: "SetAccesorCannotHaveReturnType" - }; - if (oldReasonCodes[reasonCode]) { - reasonCode = oldReasonCodes[reasonCode]; - } - } - return function constructor(loc, details) { - const error = new SyntaxError(); - error.code = code; - error.reasonCode = reasonCode; - error.loc = loc; - error.pos = loc.index; - error.syntaxPlugin = syntaxPlugin; - if (hasMissingPlugin) { - error.missingPlugin = details.missingPlugin; - } - defineHidden(error, "clone", function clone(overrides = {}) { - var _overrides$loc; - const { - line, - column, - index - } = (_overrides$loc = overrides.loc) != null ? _overrides$loc : loc; - return constructor(new Position(line, column, index), Object.assign({}, details, overrides.details)); - }); - defineHidden(error, "details", details); - Object.defineProperty(error, "message", { - configurable: true, - get() { - const message = `${toMessage(details)} (${loc.line}:${loc.column})`; - this.message = message; - return message; - }, - set(value) { - Object.defineProperty(this, "message", { - value, - writable: true - }); - } - }); - return error; - }; -} -function ParseErrorEnum(argument, syntaxPlugin) { - if (Array.isArray(argument)) { - return parseErrorTemplates => ParseErrorEnum(parseErrorTemplates, argument[0]); - } - const ParseErrorConstructors = {}; - for (const reasonCode of Object.keys(argument)) { - const template = argument[reasonCode]; - const _ref = typeof template === "string" ? { - message: () => template - } : typeof template === "function" ? { - message: template - } : template, - { - message - } = _ref, - rest = _objectWithoutPropertiesLoose(_ref, _excluded); - const toMessage = typeof message === "string" ? () => message : message; - ParseErrorConstructors[reasonCode] = toParseErrorConstructor(Object.assign({ - code: "BABEL_PARSER_SYNTAX_ERROR", - reasonCode, - toMessage - }, syntaxPlugin ? { - syntaxPlugin - } : {}, rest)); - } - return ParseErrorConstructors; -} -const Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors)); -function createDefaultOptions() { - return { - sourceType: "script", - sourceFilename: undefined, - startIndex: 0, - startColumn: 0, - startLine: 1, - allowAwaitOutsideFunction: false, - allowReturnOutsideFunction: false, - allowNewTargetOutsideFunction: false, - allowImportExportEverywhere: false, - allowSuperOutsideMethod: false, - allowUndeclaredExports: false, - plugins: [], - strictMode: null, - ranges: false, - tokens: false, - createImportExpressions: false, - createParenthesizedExpressions: false, - errorRecovery: false, - attachComment: true, - annexB: true - }; -} -function getOptions(opts) { - const options = createDefaultOptions(); - if (opts == null) { - return options; - } - if (opts.annexB != null && opts.annexB !== false) { - throw new Error("The `annexB` option can only be set to `false`."); - } - for (const key of Object.keys(options)) { - if (opts[key] != null) options[key] = opts[key]; - } - if (options.startLine === 1) { - if (opts.startIndex == null && options.startColumn > 0) { - options.startIndex = options.startColumn; - } else if (opts.startColumn == null && options.startIndex > 0) { - options.startColumn = options.startIndex; - } - } else if (opts.startColumn == null || opts.startIndex == null) { - if (opts.startIndex != null) { - throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`."); - } - } - return options; -} -const { - defineProperty -} = Object; -const toUnenumerable = (object, key) => { - if (object) { - defineProperty(object, key, { - enumerable: false, - value: object[key] - }); - } -}; -function toESTreeLocation(node) { - toUnenumerable(node.loc.start, "index"); - toUnenumerable(node.loc.end, "index"); - return node; -} -var estree = superClass => class ESTreeParserMixin extends superClass { - parse() { - const file = toESTreeLocation(super.parse()); - if (this.optionFlags & 128) { - file.tokens = file.tokens.map(toESTreeLocation); - } - return file; - } - parseRegExpLiteral({ - pattern, - flags - }) { - let regex = null; - try { - regex = new RegExp(pattern, flags); - } catch (_) {} - const node = this.estreeParseLiteral(regex); - node.regex = { - pattern, - flags - }; - return node; - } - parseBigIntLiteral(value) { - let bigInt; - try { - bigInt = BigInt(value); - } catch (_unused) { - bigInt = null; - } - const node = this.estreeParseLiteral(bigInt); - node.bigint = String(node.value || value); - return node; - } - parseDecimalLiteral(value) { - const decimal = null; - const node = this.estreeParseLiteral(decimal); - node.decimal = String(node.value || value); - return node; - } - estreeParseLiteral(value) { - return this.parseLiteral(value, "Literal"); - } - parseStringLiteral(value) { - return this.estreeParseLiteral(value); - } - parseNumericLiteral(value) { - return this.estreeParseLiteral(value); - } - parseNullLiteral() { - return this.estreeParseLiteral(null); - } - parseBooleanLiteral(value) { - return this.estreeParseLiteral(value); - } - directiveToStmt(directive) { - const expression = directive.value; - delete directive.value; - expression.type = "Literal"; - expression.raw = expression.extra.raw; - expression.value = expression.extra.expressionValue; - const stmt = directive; - stmt.type = "ExpressionStatement"; - stmt.expression = expression; - stmt.directive = expression.extra.rawValue; - delete expression.extra; - return stmt; - } - initFunction(node, isAsync) { - super.initFunction(node, isAsync); - node.expression = false; - } - checkDeclaration(node) { - if (node != null && this.isObjectProperty(node)) { - this.checkDeclaration(node.value); - } else { - super.checkDeclaration(node); - } - } - getObjectOrClassMethodParams(method) { - return method.value.params; - } - isValidDirective(stmt) { - var _stmt$expression$extr; - return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized); - } - parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) { - super.parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse); - const directiveStatements = node.directives.map(d => this.directiveToStmt(d)); - node.body = directiveStatements.concat(node.body); - delete node.directives; - } - parsePrivateName() { - const node = super.parsePrivateName(); - { - if (!this.getPluginOption("estree", "classFeatures")) { - return node; - } - } - return this.convertPrivateNameToPrivateIdentifier(node); - } - convertPrivateNameToPrivateIdentifier(node) { - const name = super.getPrivateNameSV(node); - node = node; - delete node.id; - node.name = name; - node.type = "PrivateIdentifier"; - return node; - } - isPrivateName(node) { - { - if (!this.getPluginOption("estree", "classFeatures")) { - return super.isPrivateName(node); - } - } - return node.type === "PrivateIdentifier"; - } - getPrivateNameSV(node) { - { - if (!this.getPluginOption("estree", "classFeatures")) { - return super.getPrivateNameSV(node); - } - } - return node.name; - } - parseLiteral(value, type) { - const node = super.parseLiteral(value, type); - node.raw = node.extra.raw; - delete node.extra; - return node; - } - parseFunctionBody(node, allowExpression, isMethod = false) { - super.parseFunctionBody(node, allowExpression, isMethod); - node.expression = node.body.type !== "BlockStatement"; - } - parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { - let funcNode = this.startNode(); - funcNode.kind = node.kind; - funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); - funcNode.type = "FunctionExpression"; - delete funcNode.kind; - node.value = funcNode; - const { - typeParameters - } = node; - if (typeParameters) { - delete node.typeParameters; - funcNode.typeParameters = typeParameters; - this.resetStartLocationFromNode(funcNode, typeParameters); - } - if (type === "ClassPrivateMethod") { - node.computed = false; - } - return this.finishNode(node, "MethodDefinition"); - } - nameIsConstructor(key) { - if (key.type === "Literal") return key.value === "constructor"; - return super.nameIsConstructor(key); - } - parseClassProperty(...args) { - const propertyNode = super.parseClassProperty(...args); - { - if (!this.getPluginOption("estree", "classFeatures")) { - return propertyNode; - } - } - { - propertyNode.type = "PropertyDefinition"; - } - return propertyNode; - } - parseClassPrivateProperty(...args) { - const propertyNode = super.parseClassPrivateProperty(...args); - { - if (!this.getPluginOption("estree", "classFeatures")) { - return propertyNode; - } - } - { - propertyNode.type = "PropertyDefinition"; - } - propertyNode.computed = false; - return propertyNode; - } - parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { - const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor); - if (node) { - node.type = "Property"; - if (node.kind === "method") { - node.kind = "init"; - } - node.shorthand = false; - } - return node; - } - parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) { - const node = super.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors); - if (node) { - node.kind = "init"; - node.type = "Property"; - } - return node; - } - isValidLVal(type, isUnparenthesizedInAssign, binding) { - return type === "Property" ? "value" : super.isValidLVal(type, isUnparenthesizedInAssign, binding); - } - isAssignable(node, isBinding) { - if (node != null && this.isObjectProperty(node)) { - return this.isAssignable(node.value, isBinding); - } - return super.isAssignable(node, isBinding); - } - toAssignable(node, isLHS = false) { - if (node != null && this.isObjectProperty(node)) { - const { - key, - value - } = node; - if (this.isPrivateName(key)) { - this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); - } - this.toAssignable(value, isLHS); - } else { - super.toAssignable(node, isLHS); - } - } - toAssignableObjectExpressionProp(prop, isLast, isLHS) { - if (prop.type === "Property" && (prop.kind === "get" || prop.kind === "set")) { - this.raise(Errors.PatternHasAccessor, prop.key); - } else if (prop.type === "Property" && prop.method) { - this.raise(Errors.PatternHasMethod, prop.key); - } else { - super.toAssignableObjectExpressionProp(prop, isLast, isLHS); - } - } - finishCallExpression(unfinished, optional) { - const node = super.finishCallExpression(unfinished, optional); - if (node.callee.type === "Import") { - var _ref, _ref2; - node.type = "ImportExpression"; - node.source = node.arguments[0]; - node.options = (_ref = node.arguments[1]) != null ? _ref : null; - node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null; - delete node.arguments; - delete node.callee; - } - return node; - } - toReferencedArguments(node) { - if (node.type === "ImportExpression") { - return; - } - super.toReferencedArguments(node); - } - parseExport(unfinished, decorators) { - const exportStartLoc = this.state.lastTokStartLoc; - const node = super.parseExport(unfinished, decorators); - switch (node.type) { - case "ExportAllDeclaration": - node.exported = null; - break; - case "ExportNamedDeclaration": - if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") { - node.type = "ExportAllDeclaration"; - node.exported = node.specifiers[0].exported; - delete node.specifiers; - } - case "ExportDefaultDeclaration": - { - var _declaration$decorato; - const { - declaration - } = node; - if ((declaration == null ? void 0 : declaration.type) === "ClassDeclaration" && ((_declaration$decorato = declaration.decorators) == null ? void 0 : _declaration$decorato.length) > 0 && declaration.start === node.start) { - this.resetStartLocation(node, exportStartLoc); - } - } - break; - } - return node; - } - parseSubscript(base, startLoc, noCalls, state) { - const node = super.parseSubscript(base, startLoc, noCalls, state); - if (state.optionalChainMember) { - if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") { - node.type = node.type.substring(8); - } - if (state.stop) { - const chain = this.startNodeAtNode(node); - chain.expression = node; - return this.finishNode(chain, "ChainExpression"); - } - } else if (node.type === "MemberExpression" || node.type === "CallExpression") { - node.optional = false; - } - return node; - } - isOptionalMemberExpression(node) { - if (node.type === "ChainExpression") { - return node.expression.type === "MemberExpression"; - } - return super.isOptionalMemberExpression(node); - } - hasPropertyAsPrivateName(node) { - if (node.type === "ChainExpression") { - node = node.expression; - } - return super.hasPropertyAsPrivateName(node); - } - isObjectProperty(node) { - return node.type === "Property" && node.kind === "init" && !node.method; - } - isObjectMethod(node) { - return node.type === "Property" && (node.method || node.kind === "get" || node.kind === "set"); - } - finishNodeAt(node, type, endLoc) { - return toESTreeLocation(super.finishNodeAt(node, type, endLoc)); - } - resetStartLocation(node, startLoc) { - super.resetStartLocation(node, startLoc); - toESTreeLocation(node); - } - resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { - super.resetEndLocation(node, endLoc); - toESTreeLocation(node); - } -}; -class TokContext { - constructor(token, preserveSpace) { - this.token = void 0; - this.preserveSpace = void 0; - this.token = token; - this.preserveSpace = !!preserveSpace; - } -} -const types = { - brace: new TokContext("{"), - j_oTag: new TokContext("...", true) -}; -{ - types.template = new TokContext("`", true); -} -const beforeExpr = true; -const startsExpr = true; -const isLoop = true; -const isAssign = true; -const prefix = true; -const postfix = true; -class ExportedTokenType { - constructor(label, conf = {}) { - this.label = void 0; - this.keyword = void 0; - this.beforeExpr = void 0; - this.startsExpr = void 0; - this.rightAssociative = void 0; - this.isLoop = void 0; - this.isAssign = void 0; - this.prefix = void 0; - this.postfix = void 0; - this.binop = void 0; - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.rightAssociative = !!conf.rightAssociative; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop != null ? conf.binop : null; - { - this.updateContext = null; - } - } -} -const keywords$1 = new Map(); -function createKeyword(name, options = {}) { - options.keyword = name; - const token = createToken(name, options); - keywords$1.set(name, token); - return token; -} -function createBinop(name, binop) { - return createToken(name, { - beforeExpr, - binop - }); -} -let tokenTypeCounter = -1; -const tokenTypes = []; -const tokenLabels = []; -const tokenBinops = []; -const tokenBeforeExprs = []; -const tokenStartsExprs = []; -const tokenPrefixes = []; -function createToken(name, options = {}) { - var _options$binop, _options$beforeExpr, _options$startsExpr, _options$prefix; - ++tokenTypeCounter; - tokenLabels.push(name); - tokenBinops.push((_options$binop = options.binop) != null ? _options$binop : -1); - tokenBeforeExprs.push((_options$beforeExpr = options.beforeExpr) != null ? _options$beforeExpr : false); - tokenStartsExprs.push((_options$startsExpr = options.startsExpr) != null ? _options$startsExpr : false); - tokenPrefixes.push((_options$prefix = options.prefix) != null ? _options$prefix : false); - tokenTypes.push(new ExportedTokenType(name, options)); - return tokenTypeCounter; -} -function createKeywordLike(name, options = {}) { - var _options$binop2, _options$beforeExpr2, _options$startsExpr2, _options$prefix2; - ++tokenTypeCounter; - keywords$1.set(name, tokenTypeCounter); - tokenLabels.push(name); - tokenBinops.push((_options$binop2 = options.binop) != null ? _options$binop2 : -1); - tokenBeforeExprs.push((_options$beforeExpr2 = options.beforeExpr) != null ? _options$beforeExpr2 : false); - tokenStartsExprs.push((_options$startsExpr2 = options.startsExpr) != null ? _options$startsExpr2 : false); - tokenPrefixes.push((_options$prefix2 = options.prefix) != null ? _options$prefix2 : false); - tokenTypes.push(new ExportedTokenType("name", options)); - return tokenTypeCounter; -} -const tt = { - bracketL: createToken("[", { - beforeExpr, - startsExpr - }), - bracketHashL: createToken("#[", { - beforeExpr, - startsExpr - }), - bracketBarL: createToken("[|", { - beforeExpr, - startsExpr - }), - bracketR: createToken("]"), - bracketBarR: createToken("|]"), - braceL: createToken("{", { - beforeExpr, - startsExpr - }), - braceBarL: createToken("{|", { - beforeExpr, - startsExpr - }), - braceHashL: createToken("#{", { - beforeExpr, - startsExpr - }), - braceR: createToken("}"), - braceBarR: createToken("|}"), - parenL: createToken("(", { - beforeExpr, - startsExpr - }), - parenR: createToken(")"), - comma: createToken(",", { - beforeExpr - }), - semi: createToken(";", { - beforeExpr - }), - colon: createToken(":", { - beforeExpr - }), - doubleColon: createToken("::", { - beforeExpr - }), - dot: createToken("."), - question: createToken("?", { - beforeExpr - }), - questionDot: createToken("?."), - arrow: createToken("=>", { - beforeExpr - }), - template: createToken("template"), - ellipsis: createToken("...", { - beforeExpr - }), - backQuote: createToken("`", { - startsExpr - }), - dollarBraceL: createToken("${", { - beforeExpr, - startsExpr - }), - templateTail: createToken("...`", { - startsExpr - }), - templateNonTail: createToken("...${", { - beforeExpr, - startsExpr - }), - at: createToken("@"), - hash: createToken("#", { - startsExpr - }), - interpreterDirective: createToken("#!..."), - eq: createToken("=", { - beforeExpr, - isAssign - }), - assign: createToken("_=", { - beforeExpr, - isAssign - }), - slashAssign: createToken("_=", { - beforeExpr, - isAssign - }), - xorAssign: createToken("_=", { - beforeExpr, - isAssign - }), - moduloAssign: createToken("_=", { - beforeExpr, - isAssign - }), - incDec: createToken("++/--", { - prefix, - postfix, - startsExpr - }), - bang: createToken("!", { - beforeExpr, - prefix, - startsExpr - }), - tilde: createToken("~", { - beforeExpr, - prefix, - startsExpr - }), - doubleCaret: createToken("^^", { - startsExpr - }), - doubleAt: createToken("@@", { - startsExpr - }), - pipeline: createBinop("|>", 0), - nullishCoalescing: createBinop("??", 1), - logicalOR: createBinop("||", 1), - logicalAND: createBinop("&&", 2), - bitwiseOR: createBinop("|", 3), - bitwiseXOR: createBinop("^", 4), - bitwiseAND: createBinop("&", 5), - equality: createBinop("==/!=/===/!==", 6), - lt: createBinop("/<=/>=", 7), - gt: createBinop("/<=/>=", 7), - relational: createBinop("/<=/>=", 7), - bitShift: createBinop("<>/>>>", 8), - bitShiftL: createBinop("<>/>>>", 8), - bitShiftR: createBinop("<>/>>>", 8), - plusMin: createToken("+/-", { - beforeExpr, - binop: 9, - prefix, - startsExpr - }), - modulo: createToken("%", { - binop: 10, - startsExpr - }), - star: createToken("*", { - binop: 10 - }), - slash: createBinop("/", 10), - exponent: createToken("**", { - beforeExpr, - binop: 11, - rightAssociative: true - }), - _in: createKeyword("in", { - beforeExpr, - binop: 7 - }), - _instanceof: createKeyword("instanceof", { - beforeExpr, - binop: 7 - }), - _break: createKeyword("break"), - _case: createKeyword("case", { - beforeExpr - }), - _catch: createKeyword("catch"), - _continue: createKeyword("continue"), - _debugger: createKeyword("debugger"), - _default: createKeyword("default", { - beforeExpr - }), - _else: createKeyword("else", { - beforeExpr - }), - _finally: createKeyword("finally"), - _function: createKeyword("function", { - startsExpr - }), - _if: createKeyword("if"), - _return: createKeyword("return", { - beforeExpr - }), - _switch: createKeyword("switch"), - _throw: createKeyword("throw", { - beforeExpr, - prefix, - startsExpr - }), - _try: createKeyword("try"), - _var: createKeyword("var"), - _const: createKeyword("const"), - _with: createKeyword("with"), - _new: createKeyword("new", { - beforeExpr, - startsExpr - }), - _this: createKeyword("this", { - startsExpr - }), - _super: createKeyword("super", { - startsExpr - }), - _class: createKeyword("class", { - startsExpr - }), - _extends: createKeyword("extends", { - beforeExpr - }), - _export: createKeyword("export"), - _import: createKeyword("import", { - startsExpr - }), - _null: createKeyword("null", { - startsExpr - }), - _true: createKeyword("true", { - startsExpr - }), - _false: createKeyword("false", { - startsExpr - }), - _typeof: createKeyword("typeof", { - beforeExpr, - prefix, - startsExpr - }), - _void: createKeyword("void", { - beforeExpr, - prefix, - startsExpr - }), - _delete: createKeyword("delete", { - beforeExpr, - prefix, - startsExpr - }), - _do: createKeyword("do", { - isLoop, - beforeExpr - }), - _for: createKeyword("for", { - isLoop - }), - _while: createKeyword("while", { - isLoop - }), - _as: createKeywordLike("as", { - startsExpr - }), - _assert: createKeywordLike("assert", { - startsExpr - }), - _async: createKeywordLike("async", { - startsExpr - }), - _await: createKeywordLike("await", { - startsExpr - }), - _defer: createKeywordLike("defer", { - startsExpr - }), - _from: createKeywordLike("from", { - startsExpr - }), - _get: createKeywordLike("get", { - startsExpr - }), - _let: createKeywordLike("let", { - startsExpr - }), - _meta: createKeywordLike("meta", { - startsExpr - }), - _of: createKeywordLike("of", { - startsExpr - }), - _sent: createKeywordLike("sent", { - startsExpr - }), - _set: createKeywordLike("set", { - startsExpr - }), - _source: createKeywordLike("source", { - startsExpr - }), - _static: createKeywordLike("static", { - startsExpr - }), - _using: createKeywordLike("using", { - startsExpr - }), - _yield: createKeywordLike("yield", { - startsExpr - }), - _asserts: createKeywordLike("asserts", { - startsExpr - }), - _checks: createKeywordLike("checks", { - startsExpr - }), - _exports: createKeywordLike("exports", { - startsExpr - }), - _global: createKeywordLike("global", { - startsExpr - }), - _implements: createKeywordLike("implements", { - startsExpr - }), - _intrinsic: createKeywordLike("intrinsic", { - startsExpr - }), - _infer: createKeywordLike("infer", { - startsExpr - }), - _is: createKeywordLike("is", { - startsExpr - }), - _mixins: createKeywordLike("mixins", { - startsExpr - }), - _proto: createKeywordLike("proto", { - startsExpr - }), - _require: createKeywordLike("require", { - startsExpr - }), - _satisfies: createKeywordLike("satisfies", { - startsExpr - }), - _keyof: createKeywordLike("keyof", { - startsExpr - }), - _readonly: createKeywordLike("readonly", { - startsExpr - }), - _unique: createKeywordLike("unique", { - startsExpr - }), - _abstract: createKeywordLike("abstract", { - startsExpr - }), - _declare: createKeywordLike("declare", { - startsExpr - }), - _enum: createKeywordLike("enum", { - startsExpr - }), - _module: createKeywordLike("module", { - startsExpr - }), - _namespace: createKeywordLike("namespace", { - startsExpr - }), - _interface: createKeywordLike("interface", { - startsExpr - }), - _type: createKeywordLike("type", { - startsExpr - }), - _opaque: createKeywordLike("opaque", { - startsExpr - }), - name: createToken("name", { - startsExpr - }), - placeholder: createToken("%%", { - startsExpr: true - }), - string: createToken("string", { - startsExpr - }), - num: createToken("num", { - startsExpr - }), - bigint: createToken("bigint", { - startsExpr - }), - decimal: createToken("decimal", { - startsExpr - }), - regexp: createToken("regexp", { - startsExpr - }), - privateName: createToken("#name", { - startsExpr - }), - eof: createToken("eof"), - jsxName: createToken("jsxName"), - jsxText: createToken("jsxText", { - beforeExpr: true - }), - jsxTagStart: createToken("jsxTagStart", { - startsExpr: true - }), - jsxTagEnd: createToken("jsxTagEnd") -}; -function tokenIsIdentifier(token) { - return token >= 93 && token <= 133; -} -function tokenKeywordOrIdentifierIsKeyword(token) { - return token <= 92; -} -function tokenIsKeywordOrIdentifier(token) { - return token >= 58 && token <= 133; -} -function tokenIsLiteralPropertyName(token) { - return token >= 58 && token <= 137; -} -function tokenComesBeforeExpression(token) { - return tokenBeforeExprs[token]; -} -function tokenCanStartExpression(token) { - return tokenStartsExprs[token]; -} -function tokenIsAssignment(token) { - return token >= 29 && token <= 33; -} -function tokenIsFlowInterfaceOrTypeOrOpaque(token) { - return token >= 129 && token <= 131; -} -function tokenIsLoop(token) { - return token >= 90 && token <= 92; -} -function tokenIsKeyword(token) { - return token >= 58 && token <= 92; -} -function tokenIsOperator(token) { - return token >= 39 && token <= 59; -} -function tokenIsPostfix(token) { - return token === 34; -} -function tokenIsPrefix(token) { - return tokenPrefixes[token]; -} -function tokenIsTSTypeOperator(token) { - return token >= 121 && token <= 123; -} -function tokenIsTSDeclarationStart(token) { - return token >= 124 && token <= 130; -} -function tokenLabelName(token) { - return tokenLabels[token]; -} -function tokenOperatorPrecedence(token) { - return tokenBinops[token]; -} -function tokenIsRightAssociative(token) { - return token === 57; -} -function tokenIsTemplate(token) { - return token >= 24 && token <= 25; -} -function getExportedToken(token) { - return tokenTypes[token]; -} -{ - tokenTypes[8].updateContext = context => { - context.pop(); - }; - tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = context => { - context.push(types.brace); - }; - tokenTypes[22].updateContext = context => { - if (context[context.length - 1] === types.template) { - context.pop(); - } else { - context.push(types.template); - } - }; - tokenTypes[143].updateContext = context => { - context.push(types.j_expr, types.j_oTag); - }; -} -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-\u1c8a\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-\ua7cd\ua7d0\ua7d1\ua7d3\ua7d5-\ua7dc\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 = "\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\u0897-\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\u0cf3\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-\u0ece\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\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\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\uff65"; -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, 4, 51, 13, 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, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 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, 20, 1, 64, 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, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 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, 200, 32, 32, 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, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 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, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 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, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; -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, 7, 9, 32, 4, 318, 1, 80, 3, 71, 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, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 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, 343, 9, 54, 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, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 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, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 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); -} -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); -} -function isIteratorStart(current, next, next2) { - return current === 64 && next === 64 && isIdentifierStart(next2); -} -const reservedWordLikeSet = new Set(["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", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]); -function canBeReservedWord(word) { - return reservedWordLikeSet.has(word); -} -class Scope { - constructor(flags) { - this.flags = 0; - this.names = new Map(); - this.firstLexicalName = ""; - this.flags = flags; - } -} -class ScopeHandler { - constructor(parser, inModule) { - this.parser = void 0; - this.scopeStack = []; - this.inModule = void 0; - this.undefinedExports = new Map(); - this.parser = parser; - this.inModule = inModule; - } - get inTopLevel() { - return (this.currentScope().flags & 1) > 0; - } - get inFunction() { - return (this.currentVarScopeFlags() & 2) > 0; - } - get allowSuper() { - return (this.currentThisScopeFlags() & 16) > 0; - } - get allowDirectSuper() { - return (this.currentThisScopeFlags() & 32) > 0; - } - get inClass() { - return (this.currentThisScopeFlags() & 64) > 0; - } - get inClassAndNotInNonArrowFunction() { - const flags = this.currentThisScopeFlags(); - return (flags & 64) > 0 && (flags & 2) === 0; - } - get inStaticBlock() { - for (let i = this.scopeStack.length - 1;; i--) { - const { - flags - } = this.scopeStack[i]; - if (flags & 128) { - return true; - } - if (flags & (387 | 64)) { - return false; - } - } - } - get inNonArrowFunction() { - return (this.currentThisScopeFlags() & 2) > 0; - } - get treatFunctionsAsVar() { - return this.treatFunctionsAsVarInScope(this.currentScope()); - } - createScope(flags) { - return new Scope(flags); - } - enter(flags) { - this.scopeStack.push(this.createScope(flags)); - } - exit() { - const scope = this.scopeStack.pop(); - return scope.flags; - } - treatFunctionsAsVarInScope(scope) { - return !!(scope.flags & (2 | 128) || !this.parser.inModule && scope.flags & 1); - } - declareName(name, bindingType, loc) { - let scope = this.currentScope(); - if (bindingType & 8 || bindingType & 16) { - this.checkRedeclarationInScope(scope, name, bindingType, loc); - let type = scope.names.get(name) || 0; - if (bindingType & 16) { - type = type | 4; - } else { - if (!scope.firstLexicalName) { - scope.firstLexicalName = name; - } - type = type | 2; - } - scope.names.set(name, type); - if (bindingType & 8) { - this.maybeExportDefined(scope, name); - } - } else if (bindingType & 4) { - for (let i = this.scopeStack.length - 1; i >= 0; --i) { - scope = this.scopeStack[i]; - this.checkRedeclarationInScope(scope, name, bindingType, loc); - scope.names.set(name, (scope.names.get(name) || 0) | 1); - this.maybeExportDefined(scope, name); - if (scope.flags & 387) break; - } - } - if (this.parser.inModule && scope.flags & 1) { - this.undefinedExports.delete(name); - } - } - maybeExportDefined(scope, name) { - if (this.parser.inModule && scope.flags & 1) { - this.undefinedExports.delete(name); - } - } - checkRedeclarationInScope(scope, name, bindingType, loc) { - if (this.isRedeclaredInScope(scope, name, bindingType)) { - this.parser.raise(Errors.VarRedeclaration, loc, { - identifierName: name - }); - } - } - isRedeclaredInScope(scope, name, bindingType) { - if (!(bindingType & 1)) return false; - if (bindingType & 8) { - return scope.names.has(name); - } - const type = scope.names.get(name); - if (bindingType & 16) { - return (type & 2) > 0 || !this.treatFunctionsAsVarInScope(scope) && (type & 1) > 0; - } - return (type & 2) > 0 && !(scope.flags & 8 && scope.firstLexicalName === name) || !this.treatFunctionsAsVarInScope(scope) && (type & 4) > 0; - } - checkLocalExport(id) { - const { - name - } = id; - const topLevelScope = this.scopeStack[0]; - if (!topLevelScope.names.has(name)) { - this.undefinedExports.set(name, id.loc.start); - } - } - currentScope() { - return this.scopeStack[this.scopeStack.length - 1]; - } - currentVarScopeFlags() { - for (let i = this.scopeStack.length - 1;; i--) { - const { - flags - } = this.scopeStack[i]; - if (flags & 387) { - return flags; - } - } - } - currentThisScopeFlags() { - for (let i = this.scopeStack.length - 1;; i--) { - const { - flags - } = this.scopeStack[i]; - if (flags & (387 | 64) && !(flags & 4)) { - return flags; - } - } - } -} -class FlowScope extends Scope { - constructor(...args) { - super(...args); - this.declareFunctions = new Set(); - } -} -class FlowScopeHandler extends ScopeHandler { - createScope(flags) { - return new FlowScope(flags); - } - declareName(name, bindingType, loc) { - const scope = this.currentScope(); - if (bindingType & 2048) { - this.checkRedeclarationInScope(scope, name, bindingType, loc); - this.maybeExportDefined(scope, name); - scope.declareFunctions.add(name); - return; - } - super.declareName(name, bindingType, loc); - } - isRedeclaredInScope(scope, name, bindingType) { - if (super.isRedeclaredInScope(scope, name, bindingType)) return true; - if (bindingType & 2048 && !scope.declareFunctions.has(name)) { - const type = scope.names.get(name); - return (type & 4) > 0 || (type & 2) > 0; - } - return false; - } - checkLocalExport(id) { - if (!this.scopeStack[0].declareFunctions.has(id.name)) { - super.checkLocalExport(id); - } - } -} -class BaseParser { - constructor() { - this.sawUnambiguousESM = false; - this.ambiguousScriptDifferentAst = false; - } - sourceToOffsetPos(sourcePos) { - return sourcePos + this.startIndex; - } - offsetToSourcePos(offsetPos) { - return offsetPos - this.startIndex; - } - hasPlugin(pluginConfig) { - if (typeof pluginConfig === "string") { - return this.plugins.has(pluginConfig); - } else { - const [pluginName, pluginOptions] = pluginConfig; - if (!this.hasPlugin(pluginName)) { - return false; - } - const actualOptions = this.plugins.get(pluginName); - for (const key of Object.keys(pluginOptions)) { - if ((actualOptions == null ? void 0 : actualOptions[key]) !== pluginOptions[key]) { - return false; - } - } - return true; - } - } - getPluginOption(plugin, name) { - var _this$plugins$get; - return (_this$plugins$get = this.plugins.get(plugin)) == null ? void 0 : _this$plugins$get[name]; - } -} -function setTrailingComments(node, comments) { - if (node.trailingComments === undefined) { - node.trailingComments = comments; - } else { - node.trailingComments.unshift(...comments); - } -} -function setLeadingComments(node, comments) { - if (node.leadingComments === undefined) { - node.leadingComments = comments; - } else { - node.leadingComments.unshift(...comments); - } -} -function setInnerComments(node, comments) { - if (node.innerComments === undefined) { - node.innerComments = comments; - } else { - node.innerComments.unshift(...comments); - } -} -function adjustInnerComments(node, elements, commentWS) { - let lastElement = null; - let i = elements.length; - while (lastElement === null && i > 0) { - lastElement = elements[--i]; - } - if (lastElement === null || lastElement.start > commentWS.start) { - setInnerComments(node, commentWS.comments); - } else { - setTrailingComments(lastElement, commentWS.comments); - } -} -class CommentsParser extends BaseParser { - addComment(comment) { - if (this.filename) comment.loc.filename = this.filename; - const { - commentsLen - } = this.state; - if (this.comments.length !== commentsLen) { - this.comments.length = commentsLen; - } - this.comments.push(comment); - this.state.commentsLen++; - } - processComment(node) { - const { - commentStack - } = this.state; - const commentStackLength = commentStack.length; - if (commentStackLength === 0) return; - let i = commentStackLength - 1; - const lastCommentWS = commentStack[i]; - if (lastCommentWS.start === node.end) { - lastCommentWS.leadingNode = node; - i--; - } - const { - start: nodeStart - } = node; - for (; i >= 0; i--) { - const commentWS = commentStack[i]; - const commentEnd = commentWS.end; - if (commentEnd > nodeStart) { - commentWS.containingNode = node; - this.finalizeComment(commentWS); - commentStack.splice(i, 1); - } else { - if (commentEnd === nodeStart) { - commentWS.trailingNode = node; - } - break; - } - } - } - finalizeComment(commentWS) { - const { - comments - } = commentWS; - if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) { - if (commentWS.leadingNode !== null) { - setTrailingComments(commentWS.leadingNode, comments); - } - if (commentWS.trailingNode !== null) { - setLeadingComments(commentWS.trailingNode, comments); - } - } else { - const { - containingNode: node, - start: commentStart - } = commentWS; - if (this.input.charCodeAt(this.offsetToSourcePos(commentStart) - 1) === 44) { - switch (node.type) { - case "ObjectExpression": - case "ObjectPattern": - case "RecordExpression": - adjustInnerComments(node, node.properties, commentWS); - break; - case "CallExpression": - case "OptionalCallExpression": - adjustInnerComments(node, node.arguments, commentWS); - break; - case "FunctionDeclaration": - case "FunctionExpression": - case "ArrowFunctionExpression": - case "ObjectMethod": - case "ClassMethod": - case "ClassPrivateMethod": - adjustInnerComments(node, node.params, commentWS); - break; - case "ArrayExpression": - case "ArrayPattern": - case "TupleExpression": - adjustInnerComments(node, node.elements, commentWS); - break; - case "ExportNamedDeclaration": - case "ImportDeclaration": - adjustInnerComments(node, node.specifiers, commentWS); - break; - case "TSEnumDeclaration": - { - adjustInnerComments(node, node.members, commentWS); - } - break; - case "TSEnumBody": - adjustInnerComments(node, node.members, commentWS); - break; - default: - { - setInnerComments(node, comments); - } - } - } else { - setInnerComments(node, comments); - } - } - } - finalizeRemainingComments() { - const { - commentStack - } = this.state; - for (let i = commentStack.length - 1; i >= 0; i--) { - this.finalizeComment(commentStack[i]); - } - this.state.commentStack = []; - } - resetPreviousNodeTrailingComments(node) { - const { - commentStack - } = this.state; - const { - length - } = commentStack; - if (length === 0) return; - const commentWS = commentStack[length - 1]; - if (commentWS.leadingNode === node) { - commentWS.leadingNode = null; - } - } - resetPreviousIdentifierLeadingComments(node) { - const { - commentStack - } = this.state; - const { - length - } = commentStack; - if (length === 0) return; - if (commentStack[length - 1].trailingNode === node) { - commentStack[length - 1].trailingNode = null; - } else if (length >= 2 && commentStack[length - 2].trailingNode === node) { - commentStack[length - 2].trailingNode = null; - } - } - takeSurroundingComments(node, start, end) { - const { - commentStack - } = this.state; - const commentStackLength = commentStack.length; - if (commentStackLength === 0) return; - let i = commentStackLength - 1; - for (; i >= 0; i--) { - const commentWS = commentStack[i]; - const commentEnd = commentWS.end; - const commentStart = commentWS.start; - if (commentStart === end) { - commentWS.leadingNode = node; - } else if (commentEnd === start) { - commentWS.trailingNode = node; - } else if (commentEnd < start) { - break; - } - } - } -} -const lineBreak = /\r\n|[\r\n\u2028\u2029]/; -const lineBreakG = new RegExp(lineBreak.source, "g"); -function isNewLine(code) { - switch (code) { - case 10: - case 13: - case 8232: - case 8233: - return true; - default: - return false; - } -} -function hasNewLine(input, start, end) { - for (let i = start; i < end; i++) { - if (isNewLine(input.charCodeAt(i))) { - return true; - } - } - return false; -} -const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; -const skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g; -function isWhitespace(code) { - switch (code) { - case 0x0009: - case 0x000b: - case 0x000c: - case 32: - case 160: - case 5760: - case 0x2000: - case 0x2001: - case 0x2002: - case 0x2003: - case 0x2004: - case 0x2005: - case 0x2006: - case 0x2007: - case 0x2008: - case 0x2009: - case 0x200a: - case 0x202f: - case 0x205f: - case 0x3000: - case 0xfeff: - return true; - default: - return false; - } -} -class State { - constructor() { - this.flags = 1024; - this.startIndex = void 0; - this.curLine = void 0; - this.lineStart = void 0; - this.startLoc = void 0; - this.endLoc = void 0; - this.errors = []; - this.potentialArrowAt = -1; - this.noArrowAt = []; - this.noArrowParamsConversionAt = []; - this.topicContext = { - maxNumOfResolvableTopics: 0, - maxTopicIndex: null - }; - this.labels = []; - this.commentsLen = 0; - this.commentStack = []; - this.pos = 0; - this.type = 140; - this.value = null; - this.start = 0; - this.end = 0; - this.lastTokEndLoc = null; - this.lastTokStartLoc = null; - this.context = [types.brace]; - this.firstInvalidTemplateEscapePos = null; - this.strictErrors = new Map(); - this.tokensLength = 0; - } - get strict() { - return (this.flags & 1) > 0; - } - set strict(v) { - if (v) this.flags |= 1;else this.flags &= -2; - } - init({ - strictMode, - sourceType, - startIndex, - startLine, - startColumn - }) { - this.strict = strictMode === false ? false : strictMode === true ? true : sourceType === "module"; - this.startIndex = startIndex; - this.curLine = startLine; - this.lineStart = -startColumn; - this.startLoc = this.endLoc = new Position(startLine, startColumn, startIndex); - } - get maybeInArrowParameters() { - return (this.flags & 2) > 0; - } - set maybeInArrowParameters(v) { - if (v) this.flags |= 2;else this.flags &= -3; - } - get inType() { - return (this.flags & 4) > 0; - } - set inType(v) { - if (v) this.flags |= 4;else this.flags &= -5; - } - get noAnonFunctionType() { - return (this.flags & 8) > 0; - } - set noAnonFunctionType(v) { - if (v) this.flags |= 8;else this.flags &= -9; - } - get hasFlowComment() { - return (this.flags & 16) > 0; - } - set hasFlowComment(v) { - if (v) this.flags |= 16;else this.flags &= -17; - } - get isAmbientContext() { - return (this.flags & 32) > 0; - } - set isAmbientContext(v) { - if (v) this.flags |= 32;else this.flags &= -33; - } - get inAbstractClass() { - return (this.flags & 64) > 0; - } - set inAbstractClass(v) { - if (v) this.flags |= 64;else this.flags &= -65; - } - get inDisallowConditionalTypesContext() { - return (this.flags & 128) > 0; - } - set inDisallowConditionalTypesContext(v) { - if (v) this.flags |= 128;else this.flags &= -129; - } - get soloAwait() { - return (this.flags & 256) > 0; - } - set soloAwait(v) { - if (v) this.flags |= 256;else this.flags &= -257; - } - get inFSharpPipelineDirectBody() { - return (this.flags & 512) > 0; - } - set inFSharpPipelineDirectBody(v) { - if (v) this.flags |= 512;else this.flags &= -513; - } - get canStartJSXElement() { - return (this.flags & 1024) > 0; - } - set canStartJSXElement(v) { - if (v) this.flags |= 1024;else this.flags &= -1025; - } - get containsEsc() { - return (this.flags & 2048) > 0; - } - set containsEsc(v) { - if (v) this.flags |= 2048;else this.flags &= -2049; - } - get hasTopLevelAwait() { - return (this.flags & 4096) > 0; - } - set hasTopLevelAwait(v) { - if (v) this.flags |= 4096;else this.flags &= -4097; - } - curPosition() { - return new Position(this.curLine, this.pos - this.lineStart, this.pos + this.startIndex); - } - clone() { - const state = new State(); - state.flags = this.flags; - state.startIndex = this.startIndex; - state.curLine = this.curLine; - state.lineStart = this.lineStart; - state.startLoc = this.startLoc; - state.endLoc = this.endLoc; - state.errors = this.errors.slice(); - state.potentialArrowAt = this.potentialArrowAt; - state.noArrowAt = this.noArrowAt.slice(); - state.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice(); - state.topicContext = this.topicContext; - state.labels = this.labels.slice(); - state.commentsLen = this.commentsLen; - state.commentStack = this.commentStack.slice(); - state.pos = this.pos; - state.type = this.type; - state.value = this.value; - state.start = this.start; - state.end = this.end; - state.lastTokEndLoc = this.lastTokEndLoc; - state.lastTokStartLoc = this.lastTokStartLoc; - state.context = this.context.slice(); - state.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos; - state.strictErrors = this.strictErrors; - state.tokensLength = this.tokensLength; - return state; - } -} -var _isDigit = function isDigit(code) { - return code >= 48 && code <= 57; -}; -const forbiddenNumericSeparatorSiblings = { - decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]), - hex: new Set([46, 88, 95, 120]) -}; -const isAllowedNumericSeparatorSibling = { - bin: ch => ch === 48 || ch === 49, - oct: ch => ch >= 48 && ch <= 55, - dec: ch => ch >= 48 && ch <= 57, - hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102 -}; -function readStringContents(type, input, pos, lineStart, curLine, errors) { - const initialPos = pos; - const initialLineStart = lineStart; - const initialCurLine = curLine; - let out = ""; - let firstInvalidLoc = null; - let chunkStart = pos; - const { - length - } = input; - for (;;) { - if (pos >= length) { - errors.unterminated(initialPos, initialLineStart, initialCurLine); - out += input.slice(chunkStart, pos); - break; - } - const ch = input.charCodeAt(pos); - if (isStringEnd(type, ch, input, pos)) { - out += input.slice(chunkStart, pos); - break; - } - if (ch === 92) { - out += input.slice(chunkStart, pos); - const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors); - if (res.ch === null && !firstInvalidLoc) { - firstInvalidLoc = { - pos, - lineStart, - curLine - }; - } else { - out += res.ch; - } - ({ - pos, - lineStart, - curLine - } = res); - chunkStart = pos; - } else if (ch === 8232 || ch === 8233) { - ++pos; - ++curLine; - lineStart = pos; - } else if (ch === 10 || ch === 13) { - if (type === "template") { - out += input.slice(chunkStart, pos) + "\n"; - ++pos; - if (ch === 13 && input.charCodeAt(pos) === 10) { - ++pos; - } - ++curLine; - chunkStart = lineStart = pos; - } else { - errors.unterminated(initialPos, initialLineStart, initialCurLine); - } - } else { - ++pos; - } - } - return { - pos, - str: out, - firstInvalidLoc, - lineStart, - curLine, - containsInvalid: !!firstInvalidLoc - }; -} -function isStringEnd(type, ch, input, pos) { - if (type === "template") { - return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123; - } - return ch === (type === "double" ? 34 : 39); -} -function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) { - const throwOnInvalid = !inTemplate; - pos++; - const res = ch => ({ - pos, - ch, - lineStart, - curLine - }); - const ch = input.charCodeAt(pos++); - switch (ch) { - case 110: - return res("\n"); - case 114: - return res("\r"); - case 120: - { - let code; - ({ - code, - pos - } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors)); - return res(code === null ? null : String.fromCharCode(code)); - } - case 117: - { - let code; - ({ - code, - pos - } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors)); - return res(code === null ? null : String.fromCodePoint(code)); - } - case 116: - return res("\t"); - case 98: - return res("\b"); - case 118: - return res("\u000b"); - case 102: - return res("\f"); - case 13: - if (input.charCodeAt(pos) === 10) { - ++pos; - } - case 10: - lineStart = pos; - ++curLine; - case 8232: - case 8233: - return res(""); - case 56: - case 57: - if (inTemplate) { - return res(null); - } else { - errors.strictNumericEscape(pos - 1, lineStart, curLine); - } - default: - if (ch >= 48 && ch <= 55) { - const startPos = pos - 1; - const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2)); - let octalStr = match[0]; - let octal = parseInt(octalStr, 8); - if (octal > 255) { - octalStr = octalStr.slice(0, -1); - octal = parseInt(octalStr, 8); - } - pos += octalStr.length - 1; - const next = input.charCodeAt(pos); - if (octalStr !== "0" || next === 56 || next === 57) { - if (inTemplate) { - return res(null); - } else { - errors.strictNumericEscape(startPos, lineStart, curLine); - } - } - return res(String.fromCharCode(octal)); - } - return res(String.fromCharCode(ch)); - } -} -function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) { - const initialPos = pos; - let n; - ({ - n, - pos - } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid)); - if (n === null) { - if (throwOnInvalid) { - errors.invalidEscapeSequence(initialPos, lineStart, curLine); - } else { - pos = initialPos - 1; - } - } - return { - code: n, - pos - }; -} -function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) { - const start = pos; - const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; - const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin; - let invalid = false; - let total = 0; - for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) { - const code = input.charCodeAt(pos); - let val; - if (code === 95 && allowNumSeparator !== "bail") { - const prev = input.charCodeAt(pos - 1); - const next = input.charCodeAt(pos + 1); - if (!allowNumSeparator) { - if (bailOnError) return { - n: null, - pos - }; - errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine); - } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) { - if (bailOnError) return { - n: null, - pos - }; - errors.unexpectedNumericSeparator(pos, lineStart, curLine); - } - ++pos; - continue; - } - if (code >= 97) { - val = code - 97 + 10; - } else if (code >= 65) { - val = code - 65 + 10; - } else if (_isDigit(code)) { - val = code - 48; - } else { - val = Infinity; - } - if (val >= radix) { - if (val <= 9 && bailOnError) { - return { - n: null, - pos - }; - } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) { - val = 0; - } else if (forceLen) { - val = 0; - invalid = true; - } else { - break; - } - } - ++pos; - total = total * radix + val; - } - if (pos === start || len != null && pos - start !== len || invalid) { - return { - n: null, - pos - }; - } - return { - n: total, - pos - }; -} -function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) { - const ch = input.charCodeAt(pos); - let code; - if (ch === 123) { - ++pos; - ({ - code, - pos - } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors)); - ++pos; - if (code !== null && code > 0x10ffff) { - if (throwOnInvalid) { - errors.invalidCodePoint(pos, lineStart, curLine); - } else { - return { - code: null, - pos - }; - } - } - } else { - ({ - code, - pos - } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors)); - } - return { - code, - pos - }; -} -function buildPosition(pos, lineStart, curLine) { - return new Position(curLine, pos - lineStart, pos); -} -const VALID_REGEX_FLAGS = new Set([103, 109, 115, 105, 121, 117, 100, 118]); -class Token { - constructor(state) { - const startIndex = state.startIndex || 0; - this.type = state.type; - this.value = state.value; - this.start = startIndex + state.start; - this.end = startIndex + state.end; - this.loc = new SourceLocation(state.startLoc, state.endLoc); - } -} -class Tokenizer extends CommentsParser { - constructor(options, input) { - super(); - this.isLookahead = void 0; - this.tokens = []; - this.errorHandlers_readInt = { - invalidDigit: (pos, lineStart, curLine, radix) => { - if (!(this.optionFlags & 1024)) return false; - this.raise(Errors.InvalidDigit, buildPosition(pos, lineStart, curLine), { - radix - }); - return true; - }, - numericSeparatorInEscapeSequence: this.errorBuilder(Errors.NumericSeparatorInEscapeSequence), - unexpectedNumericSeparator: this.errorBuilder(Errors.UnexpectedNumericSeparator) - }; - this.errorHandlers_readCodePoint = Object.assign({}, this.errorHandlers_readInt, { - invalidEscapeSequence: this.errorBuilder(Errors.InvalidEscapeSequence), - invalidCodePoint: this.errorBuilder(Errors.InvalidCodePoint) - }); - this.errorHandlers_readStringContents_string = Object.assign({}, this.errorHandlers_readCodePoint, { - strictNumericEscape: (pos, lineStart, curLine) => { - this.recordStrictModeErrors(Errors.StrictNumericEscape, buildPosition(pos, lineStart, curLine)); - }, - unterminated: (pos, lineStart, curLine) => { - throw this.raise(Errors.UnterminatedString, buildPosition(pos - 1, lineStart, curLine)); - } - }); - this.errorHandlers_readStringContents_template = Object.assign({}, this.errorHandlers_readCodePoint, { - strictNumericEscape: this.errorBuilder(Errors.StrictNumericEscape), - unterminated: (pos, lineStart, curLine) => { - throw this.raise(Errors.UnterminatedTemplate, buildPosition(pos, lineStart, curLine)); - } - }); - this.state = new State(); - this.state.init(options); - this.input = input; - this.length = input.length; - this.comments = []; - this.isLookahead = false; - } - pushToken(token) { - this.tokens.length = this.state.tokensLength; - this.tokens.push(token); - ++this.state.tokensLength; - } - next() { - this.checkKeywordEscapes(); - if (this.optionFlags & 128) { - this.pushToken(new Token(this.state)); - } - this.state.lastTokEndLoc = this.state.endLoc; - this.state.lastTokStartLoc = this.state.startLoc; - this.nextToken(); - } - eat(type) { - if (this.match(type)) { - this.next(); - return true; - } else { - return false; - } - } - match(type) { - return this.state.type === type; - } - createLookaheadState(state) { - return { - pos: state.pos, - value: null, - type: state.type, - start: state.start, - end: state.end, - context: [this.curContext()], - inType: state.inType, - startLoc: state.startLoc, - lastTokEndLoc: state.lastTokEndLoc, - curLine: state.curLine, - lineStart: state.lineStart, - curPosition: state.curPosition - }; - } - lookahead() { - const old = this.state; - this.state = this.createLookaheadState(old); - this.isLookahead = true; - this.nextToken(); - this.isLookahead = false; - const curr = this.state; - this.state = old; - return curr; - } - nextTokenStart() { - return this.nextTokenStartSince(this.state.pos); - } - nextTokenStartSince(pos) { - skipWhiteSpace.lastIndex = pos; - return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos; - } - lookaheadCharCode() { - return this.input.charCodeAt(this.nextTokenStart()); - } - nextTokenInLineStart() { - return this.nextTokenInLineStartSince(this.state.pos); - } - nextTokenInLineStartSince(pos) { - skipWhiteSpaceInLine.lastIndex = pos; - return skipWhiteSpaceInLine.test(this.input) ? skipWhiteSpaceInLine.lastIndex : pos; - } - lookaheadInLineCharCode() { - return this.input.charCodeAt(this.nextTokenInLineStart()); - } - codePointAtPos(pos) { - let cp = this.input.charCodeAt(pos); - if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) { - const trail = this.input.charCodeAt(pos); - if ((trail & 0xfc00) === 0xdc00) { - cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff); - } - } - return cp; - } - setStrict(strict) { - this.state.strict = strict; - if (strict) { - this.state.strictErrors.forEach(([toParseError, at]) => this.raise(toParseError, at)); - this.state.strictErrors.clear(); - } - } - curContext() { - return this.state.context[this.state.context.length - 1]; - } - nextToken() { - this.skipSpace(); - this.state.start = this.state.pos; - if (!this.isLookahead) this.state.startLoc = this.state.curPosition(); - if (this.state.pos >= this.length) { - this.finishToken(140); - return; - } - this.getTokenFromCode(this.codePointAtPos(this.state.pos)); - } - skipBlockComment(commentEnd) { - let startLoc; - if (!this.isLookahead) startLoc = this.state.curPosition(); - const start = this.state.pos; - const end = this.input.indexOf(commentEnd, start + 2); - if (end === -1) { - throw this.raise(Errors.UnterminatedComment, this.state.curPosition()); - } - this.state.pos = end + commentEnd.length; - lineBreakG.lastIndex = start + 2; - while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) { - ++this.state.curLine; - this.state.lineStart = lineBreakG.lastIndex; - } - if (this.isLookahead) return; - const comment = { - type: "CommentBlock", - value: this.input.slice(start + 2, end), - start: this.sourceToOffsetPos(start), - end: this.sourceToOffsetPos(end + commentEnd.length), - loc: new SourceLocation(startLoc, this.state.curPosition()) - }; - if (this.optionFlags & 128) this.pushToken(comment); - return comment; - } - skipLineComment(startSkip) { - const start = this.state.pos; - let startLoc; - if (!this.isLookahead) startLoc = this.state.curPosition(); - let ch = this.input.charCodeAt(this.state.pos += startSkip); - if (this.state.pos < this.length) { - while (!isNewLine(ch) && ++this.state.pos < this.length) { - ch = this.input.charCodeAt(this.state.pos); - } - } - if (this.isLookahead) return; - const end = this.state.pos; - const value = this.input.slice(start + startSkip, end); - const comment = { - type: "CommentLine", - value, - start: this.sourceToOffsetPos(start), - end: this.sourceToOffsetPos(end), - loc: new SourceLocation(startLoc, this.state.curPosition()) - }; - if (this.optionFlags & 128) this.pushToken(comment); - return comment; - } - skipSpace() { - const spaceStart = this.state.pos; - const comments = this.optionFlags & 2048 ? [] : null; - loop: while (this.state.pos < this.length) { - const ch = this.input.charCodeAt(this.state.pos); - switch (ch) { - case 32: - case 160: - case 9: - ++this.state.pos; - break; - case 13: - if (this.input.charCodeAt(this.state.pos + 1) === 10) { - ++this.state.pos; - } - case 10: - case 8232: - case 8233: - ++this.state.pos; - ++this.state.curLine; - this.state.lineStart = this.state.pos; - break; - case 47: - switch (this.input.charCodeAt(this.state.pos + 1)) { - case 42: - { - const comment = this.skipBlockComment("*/"); - if (comment !== undefined) { - this.addComment(comment); - comments == null || comments.push(comment); - } - break; - } - case 47: - { - const comment = this.skipLineComment(2); - if (comment !== undefined) { - this.addComment(comment); - comments == null || comments.push(comment); - } - break; - } - default: - break loop; - } - break; - default: - if (isWhitespace(ch)) { - ++this.state.pos; - } else if (ch === 45 && !this.inModule && this.optionFlags & 4096) { - const pos = this.state.pos; - if (this.input.charCodeAt(pos + 1) === 45 && this.input.charCodeAt(pos + 2) === 62 && (spaceStart === 0 || this.state.lineStart > spaceStart)) { - const comment = this.skipLineComment(3); - if (comment !== undefined) { - this.addComment(comment); - comments == null || comments.push(comment); - } - } else { - break loop; - } - } else if (ch === 60 && !this.inModule && this.optionFlags & 4096) { - const pos = this.state.pos; - if (this.input.charCodeAt(pos + 1) === 33 && this.input.charCodeAt(pos + 2) === 45 && this.input.charCodeAt(pos + 3) === 45) { - const comment = this.skipLineComment(4); - if (comment !== undefined) { - this.addComment(comment); - comments == null || comments.push(comment); - } - } else { - break loop; - } - } else { - break loop; - } - } - } - if ((comments == null ? void 0 : comments.length) > 0) { - const end = this.state.pos; - const commentWhitespace = { - start: this.sourceToOffsetPos(spaceStart), - end: this.sourceToOffsetPos(end), - comments, - leadingNode: null, - trailingNode: null, - containingNode: null - }; - this.state.commentStack.push(commentWhitespace); - } - } - finishToken(type, val) { - this.state.end = this.state.pos; - this.state.endLoc = this.state.curPosition(); - const prevType = this.state.type; - this.state.type = type; - this.state.value = val; - if (!this.isLookahead) { - this.updateContext(prevType); - } - } - replaceToken(type) { - this.state.type = type; - this.updateContext(); - } - readToken_numberSign() { - if (this.state.pos === 0 && this.readToken_interpreter()) { - return; - } - const nextPos = this.state.pos + 1; - const next = this.codePointAtPos(nextPos); - if (next >= 48 && next <= 57) { - throw this.raise(Errors.UnexpectedDigitAfterHash, this.state.curPosition()); - } - if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) { - this.expectPlugin("recordAndTuple"); - if (this.getPluginOption("recordAndTuple", "syntaxType") === "bar") { - throw this.raise(next === 123 ? Errors.RecordExpressionHashIncorrectStartSyntaxType : Errors.TupleExpressionHashIncorrectStartSyntaxType, this.state.curPosition()); - } - this.state.pos += 2; - if (next === 123) { - this.finishToken(7); - } else { - this.finishToken(1); - } - } else if (isIdentifierStart(next)) { - ++this.state.pos; - this.finishToken(139, this.readWord1(next)); - } else if (next === 92) { - ++this.state.pos; - this.finishToken(139, this.readWord1()); - } else { - this.finishOp(27, 1); - } - } - readToken_dot() { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next >= 48 && next <= 57) { - this.readNumber(true); - return; - } - if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) { - this.state.pos += 3; - this.finishToken(21); - } else { - ++this.state.pos; - this.finishToken(16); - } - } - readToken_slash() { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 61) { - this.finishOp(31, 2); - } else { - this.finishOp(56, 1); - } - } - readToken_interpreter() { - if (this.state.pos !== 0 || this.length < 2) return false; - let ch = this.input.charCodeAt(this.state.pos + 1); - if (ch !== 33) return false; - const start = this.state.pos; - this.state.pos += 1; - while (!isNewLine(ch) && ++this.state.pos < this.length) { - ch = this.input.charCodeAt(this.state.pos); - } - const value = this.input.slice(start + 2, this.state.pos); - this.finishToken(28, value); - return true; - } - readToken_mult_modulo(code) { - let type = code === 42 ? 55 : 54; - let width = 1; - let next = this.input.charCodeAt(this.state.pos + 1); - if (code === 42 && next === 42) { - width++; - next = this.input.charCodeAt(this.state.pos + 2); - type = 57; - } - if (next === 61 && !this.state.inType) { - width++; - type = code === 37 ? 33 : 30; - } - this.finishOp(type, width); - } - readToken_pipe_amp(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === code) { - if (this.input.charCodeAt(this.state.pos + 2) === 61) { - this.finishOp(30, 3); - } else { - this.finishOp(code === 124 ? 41 : 42, 2); - } - return; - } - if (code === 124) { - if (next === 62) { - this.finishOp(39, 2); - return; - } - if (this.hasPlugin("recordAndTuple") && next === 125) { - if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { - throw this.raise(Errors.RecordExpressionBarIncorrectEndSyntaxType, this.state.curPosition()); - } - this.state.pos += 2; - this.finishToken(9); - return; - } - if (this.hasPlugin("recordAndTuple") && next === 93) { - if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { - throw this.raise(Errors.TupleExpressionBarIncorrectEndSyntaxType, this.state.curPosition()); - } - this.state.pos += 2; - this.finishToken(4); - return; - } - } - if (next === 61) { - this.finishOp(30, 2); - return; - } - this.finishOp(code === 124 ? 43 : 45, 1); - } - readToken_caret() { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 61 && !this.state.inType) { - this.finishOp(32, 2); - } else if (next === 94 && this.hasPlugin(["pipelineOperator", { - proposal: "hack", - topicToken: "^^" - }])) { - this.finishOp(37, 2); - const lookaheadCh = this.input.codePointAt(this.state.pos); - if (lookaheadCh === 94) { - this.unexpected(); - } - } else { - this.finishOp(44, 1); - } - } - readToken_atSign() { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 64 && this.hasPlugin(["pipelineOperator", { - proposal: "hack", - topicToken: "@@" - }])) { - this.finishOp(38, 2); - } else { - this.finishOp(26, 1); - } - } - readToken_plus_min(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === code) { - this.finishOp(34, 2); - return; - } - if (next === 61) { - this.finishOp(30, 2); - } else { - this.finishOp(53, 1); - } - } - readToken_lt() { - const { - pos - } = this.state; - const next = this.input.charCodeAt(pos + 1); - if (next === 60) { - if (this.input.charCodeAt(pos + 2) === 61) { - this.finishOp(30, 3); - return; - } - this.finishOp(51, 2); - return; - } - if (next === 61) { - this.finishOp(49, 2); - return; - } - this.finishOp(47, 1); - } - readToken_gt() { - const { - pos - } = this.state; - const next = this.input.charCodeAt(pos + 1); - if (next === 62) { - const size = this.input.charCodeAt(pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(pos + size) === 61) { - this.finishOp(30, size + 1); - return; - } - this.finishOp(52, size); - return; - } - if (next === 61) { - this.finishOp(49, 2); - return; - } - this.finishOp(48, 1); - } - readToken_eq_excl(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 61) { - this.finishOp(46, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); - return; - } - if (code === 61 && next === 62) { - this.state.pos += 2; - this.finishToken(19); - return; - } - this.finishOp(code === 61 ? 29 : 35, 1); - } - readToken_question() { - const next = this.input.charCodeAt(this.state.pos + 1); - const next2 = this.input.charCodeAt(this.state.pos + 2); - if (next === 63) { - if (next2 === 61) { - this.finishOp(30, 3); - } else { - this.finishOp(40, 2); - } - } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { - this.state.pos += 2; - this.finishToken(18); - } else { - ++this.state.pos; - this.finishToken(17); - } - } - getTokenFromCode(code) { - switch (code) { - case 46: - this.readToken_dot(); - return; - case 40: - ++this.state.pos; - this.finishToken(10); - return; - case 41: - ++this.state.pos; - this.finishToken(11); - return; - case 59: - ++this.state.pos; - this.finishToken(13); - return; - case 44: - ++this.state.pos; - this.finishToken(12); - return; - case 91: - if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) { - if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { - throw this.raise(Errors.TupleExpressionBarIncorrectStartSyntaxType, this.state.curPosition()); - } - this.state.pos += 2; - this.finishToken(2); - } else { - ++this.state.pos; - this.finishToken(0); - } - return; - case 93: - ++this.state.pos; - this.finishToken(3); - return; - case 123: - if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) { - if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { - throw this.raise(Errors.RecordExpressionBarIncorrectStartSyntaxType, this.state.curPosition()); - } - this.state.pos += 2; - this.finishToken(6); - } else { - ++this.state.pos; - this.finishToken(5); - } - return; - case 125: - ++this.state.pos; - this.finishToken(8); - return; - case 58: - if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { - this.finishOp(15, 2); - } else { - ++this.state.pos; - this.finishToken(14); - } - return; - case 63: - this.readToken_question(); - return; - case 96: - this.readTemplateToken(); - return; - case 48: - { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 120 || next === 88) { - this.readRadixNumber(16); - return; - } - if (next === 111 || next === 79) { - this.readRadixNumber(8); - return; - } - if (next === 98 || next === 66) { - this.readRadixNumber(2); - return; - } - } - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - this.readNumber(false); - return; - case 34: - case 39: - this.readString(code); - return; - case 47: - this.readToken_slash(); - return; - case 37: - case 42: - this.readToken_mult_modulo(code); - return; - case 124: - case 38: - this.readToken_pipe_amp(code); - return; - case 94: - this.readToken_caret(); - return; - case 43: - case 45: - this.readToken_plus_min(code); - return; - case 60: - this.readToken_lt(); - return; - case 62: - this.readToken_gt(); - return; - case 61: - case 33: - this.readToken_eq_excl(code); - return; - case 126: - this.finishOp(36, 1); - return; - case 64: - this.readToken_atSign(); - return; - case 35: - this.readToken_numberSign(); - return; - case 92: - this.readWord(); - return; - default: - if (isIdentifierStart(code)) { - this.readWord(code); - return; - } - } - throw this.raise(Errors.InvalidOrUnexpectedToken, this.state.curPosition(), { - unexpected: String.fromCodePoint(code) - }); - } - finishOp(type, size) { - const str = this.input.slice(this.state.pos, this.state.pos + size); - this.state.pos += size; - this.finishToken(type, str); - } - readRegexp() { - const startLoc = this.state.startLoc; - const start = this.state.start + 1; - let escaped, inClass; - let { - pos - } = this.state; - for (;; ++pos) { - if (pos >= this.length) { - throw this.raise(Errors.UnterminatedRegExp, createPositionWithColumnOffset(startLoc, 1)); - } - const ch = this.input.charCodeAt(pos); - if (isNewLine(ch)) { - throw this.raise(Errors.UnterminatedRegExp, createPositionWithColumnOffset(startLoc, 1)); - } - if (escaped) { - escaped = false; - } else { - if (ch === 91) { - inClass = true; - } else if (ch === 93 && inClass) { - inClass = false; - } else if (ch === 47 && !inClass) { - break; - } - escaped = ch === 92; - } - } - const content = this.input.slice(start, pos); - ++pos; - let mods = ""; - const nextPos = () => createPositionWithColumnOffset(startLoc, pos + 2 - start); - while (pos < this.length) { - const cp = this.codePointAtPos(pos); - const char = String.fromCharCode(cp); - if (VALID_REGEX_FLAGS.has(cp)) { - if (cp === 118) { - if (mods.includes("u")) { - this.raise(Errors.IncompatibleRegExpUVFlags, nextPos()); - } - } else if (cp === 117) { - if (mods.includes("v")) { - this.raise(Errors.IncompatibleRegExpUVFlags, nextPos()); - } - } - if (mods.includes(char)) { - this.raise(Errors.DuplicateRegExpFlags, nextPos()); - } - } else if (isIdentifierChar(cp) || cp === 92) { - this.raise(Errors.MalformedRegExpFlags, nextPos()); - } else { - break; - } - ++pos; - mods += char; - } - this.state.pos = pos; - this.finishToken(138, { - pattern: content, - flags: mods - }); - } - readInt(radix, len, forceLen = false, allowNumSeparator = true) { - const { - n, - pos - } = readInt(this.input, this.state.pos, this.state.lineStart, this.state.curLine, radix, len, forceLen, allowNumSeparator, this.errorHandlers_readInt, false); - this.state.pos = pos; - return n; - } - readRadixNumber(radix) { - const start = this.state.pos; - const startLoc = this.state.curPosition(); - let isBigInt = false; - this.state.pos += 2; - const val = this.readInt(radix); - if (val == null) { - this.raise(Errors.InvalidDigit, createPositionWithColumnOffset(startLoc, 2), { - radix - }); - } - const next = this.input.charCodeAt(this.state.pos); - if (next === 110) { - ++this.state.pos; - isBigInt = true; - } else if (next === 109) { - throw this.raise(Errors.InvalidDecimal, startLoc); - } - if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { - throw this.raise(Errors.NumberIdentifier, this.state.curPosition()); - } - if (isBigInt) { - const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); - this.finishToken(136, str); - return; - } - this.finishToken(135, val); - } - readNumber(startsWithDot) { - const start = this.state.pos; - const startLoc = this.state.curPosition(); - let isFloat = false; - let isBigInt = false; - let hasExponent = false; - let isOctal = false; - if (!startsWithDot && this.readInt(10) === null) { - this.raise(Errors.InvalidNumber, this.state.curPosition()); - } - const hasLeadingZero = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48; - if (hasLeadingZero) { - const integer = this.input.slice(start, this.state.pos); - this.recordStrictModeErrors(Errors.StrictOctalLiteral, startLoc); - if (!this.state.strict) { - const underscorePos = integer.indexOf("_"); - if (underscorePos > 0) { - this.raise(Errors.ZeroDigitNumericSeparator, createPositionWithColumnOffset(startLoc, underscorePos)); - } - } - isOctal = hasLeadingZero && !/[89]/.test(integer); - } - let next = this.input.charCodeAt(this.state.pos); - if (next === 46 && !isOctal) { - ++this.state.pos; - this.readInt(10); - isFloat = true; - next = this.input.charCodeAt(this.state.pos); - } - if ((next === 69 || next === 101) && !isOctal) { - next = this.input.charCodeAt(++this.state.pos); - if (next === 43 || next === 45) { - ++this.state.pos; - } - if (this.readInt(10) === null) { - this.raise(Errors.InvalidOrMissingExponent, startLoc); - } - isFloat = true; - hasExponent = true; - next = this.input.charCodeAt(this.state.pos); - } - if (next === 110) { - if (isFloat || hasLeadingZero) { - this.raise(Errors.InvalidBigIntLiteral, startLoc); - } - ++this.state.pos; - isBigInt = true; - } - if (next === 109) { - this.expectPlugin("decimal", this.state.curPosition()); - if (hasExponent || hasLeadingZero) { - this.raise(Errors.InvalidDecimal, startLoc); - } - ++this.state.pos; - var isDecimal = true; - } - if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { - throw this.raise(Errors.NumberIdentifier, this.state.curPosition()); - } - const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, ""); - if (isBigInt) { - this.finishToken(136, str); - return; - } - if (isDecimal) { - this.finishToken(137, str); - return; - } - const val = isOctal ? parseInt(str, 8) : parseFloat(str); - this.finishToken(135, val); - } - readCodePoint(throwOnInvalid) { - const { - code, - pos - } = readCodePoint(this.input, this.state.pos, this.state.lineStart, this.state.curLine, throwOnInvalid, this.errorHandlers_readCodePoint); - this.state.pos = pos; - return code; - } - readString(quote) { - const { - str, - pos, - curLine, - lineStart - } = readStringContents(quote === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string); - this.state.pos = pos + 1; - this.state.lineStart = lineStart; - this.state.curLine = curLine; - this.finishToken(134, str); - } - readTemplateContinuation() { - if (!this.match(8)) { - this.unexpected(null, 8); - } - this.state.pos--; - this.readTemplateToken(); - } - readTemplateToken() { - const opening = this.input[this.state.pos]; - const { - str, - firstInvalidLoc, - pos, - curLine, - lineStart - } = readStringContents("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template); - this.state.pos = pos + 1; - this.state.lineStart = lineStart; - this.state.curLine = curLine; - if (firstInvalidLoc) { - this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, this.sourceToOffsetPos(firstInvalidLoc.pos)); - } - if (this.input.codePointAt(pos) === 96) { - this.finishToken(24, firstInvalidLoc ? null : opening + str + "`"); - } else { - this.state.pos++; - this.finishToken(25, firstInvalidLoc ? null : opening + str + "${"); - } - } - recordStrictModeErrors(toParseError, at) { - const index = at.index; - if (this.state.strict && !this.state.strictErrors.has(index)) { - this.raise(toParseError, at); - } else { - this.state.strictErrors.set(index, [toParseError, at]); - } - } - readWord1(firstCode) { - this.state.containsEsc = false; - let word = ""; - const start = this.state.pos; - let chunkStart = this.state.pos; - if (firstCode !== undefined) { - this.state.pos += firstCode <= 0xffff ? 1 : 2; - } - while (this.state.pos < this.length) { - const ch = this.codePointAtPos(this.state.pos); - if (isIdentifierChar(ch)) { - this.state.pos += ch <= 0xffff ? 1 : 2; - } else if (ch === 92) { - this.state.containsEsc = true; - word += this.input.slice(chunkStart, this.state.pos); - const escStart = this.state.curPosition(); - const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar; - if (this.input.charCodeAt(++this.state.pos) !== 117) { - this.raise(Errors.MissingUnicodeEscape, this.state.curPosition()); - chunkStart = this.state.pos - 1; - continue; - } - ++this.state.pos; - const esc = this.readCodePoint(true); - if (esc !== null) { - if (!identifierCheck(esc)) { - this.raise(Errors.EscapedCharNotAnIdentifier, escStart); - } - word += String.fromCodePoint(esc); - } - chunkStart = this.state.pos; - } else { - break; - } - } - return word + this.input.slice(chunkStart, this.state.pos); - } - readWord(firstCode) { - const word = this.readWord1(firstCode); - const type = keywords$1.get(word); - if (type !== undefined) { - this.finishToken(type, tokenLabelName(type)); - } else { - this.finishToken(132, word); - } - } - checkKeywordEscapes() { - const { - type - } = this.state; - if (tokenIsKeyword(type) && this.state.containsEsc) { - this.raise(Errors.InvalidEscapedReservedWord, this.state.startLoc, { - reservedWord: tokenLabelName(type) - }); - } - } - raise(toParseError, at, details = {}) { - const loc = at instanceof Position ? at : at.loc.start; - const error = toParseError(loc, details); - if (!(this.optionFlags & 1024)) throw error; - if (!this.isLookahead) this.state.errors.push(error); - return error; - } - raiseOverwrite(toParseError, at, details = {}) { - const loc = at instanceof Position ? at : at.loc.start; - const pos = loc.index; - const errors = this.state.errors; - for (let i = errors.length - 1; i >= 0; i--) { - const error = errors[i]; - if (error.loc.index === pos) { - return errors[i] = toParseError(loc, details); - } - if (error.loc.index < pos) break; - } - return this.raise(toParseError, at, details); - } - updateContext(prevType) {} - unexpected(loc, type) { - throw this.raise(Errors.UnexpectedToken, loc != null ? loc : this.state.startLoc, { - expected: type ? tokenLabelName(type) : null - }); - } - expectPlugin(pluginName, loc) { - if (this.hasPlugin(pluginName)) { - return true; - } - throw this.raise(Errors.MissingPlugin, loc != null ? loc : this.state.startLoc, { - missingPlugin: [pluginName] - }); - } - expectOnePlugin(pluginNames) { - if (!pluginNames.some(name => this.hasPlugin(name))) { - throw this.raise(Errors.MissingOneOfPlugins, this.state.startLoc, { - missingPlugin: pluginNames - }); - } - } - errorBuilder(error) { - return (pos, lineStart, curLine) => { - this.raise(error, buildPosition(pos, lineStart, curLine)); - }; - } -} -class ClassScope { - constructor() { - this.privateNames = new Set(); - this.loneAccessors = new Map(); - this.undefinedPrivateNames = new Map(); - } -} -class ClassScopeHandler { - constructor(parser) { - this.parser = void 0; - this.stack = []; - this.undefinedPrivateNames = new Map(); - this.parser = parser; - } - current() { - return this.stack[this.stack.length - 1]; - } - enter() { - this.stack.push(new ClassScope()); - } - exit() { - const oldClassScope = this.stack.pop(); - const current = this.current(); - for (const [name, loc] of Array.from(oldClassScope.undefinedPrivateNames)) { - if (current) { - if (!current.undefinedPrivateNames.has(name)) { - current.undefinedPrivateNames.set(name, loc); - } - } else { - this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, { - identifierName: name - }); - } - } - } - declarePrivateName(name, elementType, loc) { - const { - privateNames, - loneAccessors, - undefinedPrivateNames - } = this.current(); - let redefined = privateNames.has(name); - if (elementType & 3) { - const accessor = redefined && loneAccessors.get(name); - if (accessor) { - const oldStatic = accessor & 4; - const newStatic = elementType & 4; - const oldKind = accessor & 3; - const newKind = elementType & 3; - redefined = oldKind === newKind || oldStatic !== newStatic; - if (!redefined) loneAccessors.delete(name); - } else if (!redefined) { - loneAccessors.set(name, elementType); - } - } - if (redefined) { - this.parser.raise(Errors.PrivateNameRedeclaration, loc, { - identifierName: name - }); - } - privateNames.add(name); - undefinedPrivateNames.delete(name); - } - usePrivateName(name, loc) { - let classScope; - for (classScope of this.stack) { - if (classScope.privateNames.has(name)) return; - } - if (classScope) { - classScope.undefinedPrivateNames.set(name, loc); - } else { - this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, { - identifierName: name - }); - } - } -} -class ExpressionScope { - constructor(type = 0) { - this.type = type; - } - canBeArrowParameterDeclaration() { - return this.type === 2 || this.type === 1; - } - isCertainlyParameterDeclaration() { - return this.type === 3; - } -} -class ArrowHeadParsingScope extends ExpressionScope { - constructor(type) { - super(type); - this.declarationErrors = new Map(); - } - recordDeclarationError(ParsingErrorClass, at) { - const index = at.index; - this.declarationErrors.set(index, [ParsingErrorClass, at]); - } - clearDeclarationError(index) { - this.declarationErrors.delete(index); - } - iterateErrors(iterator) { - this.declarationErrors.forEach(iterator); - } -} -class ExpressionScopeHandler { - constructor(parser) { - this.parser = void 0; - this.stack = [new ExpressionScope()]; - this.parser = parser; - } - enter(scope) { - this.stack.push(scope); - } - exit() { - this.stack.pop(); - } - recordParameterInitializerError(toParseError, node) { - const origin = node.loc.start; - const { - stack - } = this; - let i = stack.length - 1; - let scope = stack[i]; - while (!scope.isCertainlyParameterDeclaration()) { - if (scope.canBeArrowParameterDeclaration()) { - scope.recordDeclarationError(toParseError, origin); - } else { - return; - } - scope = stack[--i]; - } - this.parser.raise(toParseError, origin); - } - recordArrowParameterBindingError(error, node) { - const { - stack - } = this; - const scope = stack[stack.length - 1]; - const origin = node.loc.start; - if (scope.isCertainlyParameterDeclaration()) { - this.parser.raise(error, origin); - } else if (scope.canBeArrowParameterDeclaration()) { - scope.recordDeclarationError(error, origin); - } else { - return; - } - } - recordAsyncArrowParametersError(at) { - const { - stack - } = this; - let i = stack.length - 1; - let scope = stack[i]; - while (scope.canBeArrowParameterDeclaration()) { - if (scope.type === 2) { - scope.recordDeclarationError(Errors.AwaitBindingIdentifier, at); - } - scope = stack[--i]; - } - } - validateAsPattern() { - const { - stack - } = this; - const currentScope = stack[stack.length - 1]; - if (!currentScope.canBeArrowParameterDeclaration()) return; - currentScope.iterateErrors(([toParseError, loc]) => { - this.parser.raise(toParseError, loc); - let i = stack.length - 2; - let scope = stack[i]; - while (scope.canBeArrowParameterDeclaration()) { - scope.clearDeclarationError(loc.index); - scope = stack[--i]; - } - }); - } -} -function newParameterDeclarationScope() { - return new ExpressionScope(3); -} -function newArrowHeadScope() { - return new ArrowHeadParsingScope(1); -} -function newAsyncArrowScope() { - return new ArrowHeadParsingScope(2); -} -function newExpressionScope() { - return new ExpressionScope(); -} -class ProductionParameterHandler { - constructor() { - this.stacks = []; - } - enter(flags) { - this.stacks.push(flags); - } - exit() { - this.stacks.pop(); - } - currentFlags() { - return this.stacks[this.stacks.length - 1]; - } - get hasAwait() { - return (this.currentFlags() & 2) > 0; - } - get hasYield() { - return (this.currentFlags() & 1) > 0; - } - get hasReturn() { - return (this.currentFlags() & 4) > 0; - } - get hasIn() { - return (this.currentFlags() & 8) > 0; - } -} -function functionFlags(isAsync, isGenerator) { - return (isAsync ? 2 : 0) | (isGenerator ? 1 : 0); -} -class UtilParser extends Tokenizer { - addExtra(node, key, value, enumerable = true) { - if (!node) return; - let { - extra - } = node; - if (extra == null) { - extra = {}; - node.extra = extra; - } - if (enumerable) { - extra[key] = value; - } else { - Object.defineProperty(extra, key, { - enumerable, - value - }); - } - } - isContextual(token) { - return this.state.type === token && !this.state.containsEsc; - } - isUnparsedContextual(nameStart, name) { - const nameEnd = nameStart + name.length; - if (this.input.slice(nameStart, nameEnd) === name) { - const nextCh = this.input.charCodeAt(nameEnd); - return !(isIdentifierChar(nextCh) || (nextCh & 0xfc00) === 0xd800); - } - return false; - } - isLookaheadContextual(name) { - const next = this.nextTokenStart(); - return this.isUnparsedContextual(next, name); - } - eatContextual(token) { - if (this.isContextual(token)) { - this.next(); - return true; - } - return false; - } - expectContextual(token, toParseError) { - if (!this.eatContextual(token)) { - if (toParseError != null) { - throw this.raise(toParseError, this.state.startLoc); - } - this.unexpected(null, token); - } - } - canInsertSemicolon() { - return this.match(140) || this.match(8) || this.hasPrecedingLineBreak(); - } - hasPrecedingLineBreak() { - return hasNewLine(this.input, this.offsetToSourcePos(this.state.lastTokEndLoc.index), this.state.start); - } - hasFollowingLineBreak() { - return hasNewLine(this.input, this.state.end, this.nextTokenStart()); - } - isLineTerminator() { - return this.eat(13) || this.canInsertSemicolon(); - } - semicolon(allowAsi = true) { - if (allowAsi ? this.isLineTerminator() : this.eat(13)) return; - this.raise(Errors.MissingSemicolon, this.state.lastTokEndLoc); - } - expect(type, loc) { - if (!this.eat(type)) { - this.unexpected(loc, type); - } - } - tryParse(fn, oldState = this.state.clone()) { - const abortSignal = { - node: null - }; - try { - const node = fn((node = null) => { - abortSignal.node = node; - throw abortSignal; - }); - if (this.state.errors.length > oldState.errors.length) { - const failState = this.state; - this.state = oldState; - this.state.tokensLength = failState.tokensLength; - return { - node, - error: failState.errors[oldState.errors.length], - thrown: false, - aborted: false, - failState - }; - } - return { - node, - error: null, - thrown: false, - aborted: false, - failState: null - }; - } catch (error) { - const failState = this.state; - this.state = oldState; - if (error instanceof SyntaxError) { - return { - node: null, - error, - thrown: true, - aborted: false, - failState - }; - } - if (error === abortSignal) { - return { - node: abortSignal.node, - error: null, - thrown: false, - aborted: true, - failState - }; - } - throw error; - } - } - checkExpressionErrors(refExpressionErrors, andThrow) { - if (!refExpressionErrors) return false; - const { - shorthandAssignLoc, - doubleProtoLoc, - privateKeyLoc, - optionalParametersLoc - } = refExpressionErrors; - const hasErrors = !!shorthandAssignLoc || !!doubleProtoLoc || !!optionalParametersLoc || !!privateKeyLoc; - if (!andThrow) { - return hasErrors; - } - if (shorthandAssignLoc != null) { - this.raise(Errors.InvalidCoverInitializedName, shorthandAssignLoc); - } - if (doubleProtoLoc != null) { - this.raise(Errors.DuplicateProto, doubleProtoLoc); - } - if (privateKeyLoc != null) { - this.raise(Errors.UnexpectedPrivateField, privateKeyLoc); - } - if (optionalParametersLoc != null) { - this.unexpected(optionalParametersLoc); - } - } - isLiteralPropertyName() { - return tokenIsLiteralPropertyName(this.state.type); - } - isPrivateName(node) { - return node.type === "PrivateName"; - } - getPrivateNameSV(node) { - return node.id.name; - } - hasPropertyAsPrivateName(node) { - return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property); - } - isObjectProperty(node) { - return node.type === "ObjectProperty"; - } - isObjectMethod(node) { - return node.type === "ObjectMethod"; - } - initializeScopes(inModule = this.options.sourceType === "module") { - const oldLabels = this.state.labels; - this.state.labels = []; - const oldExportedIdentifiers = this.exportedIdentifiers; - this.exportedIdentifiers = new Set(); - const oldInModule = this.inModule; - this.inModule = inModule; - const oldScope = this.scope; - const ScopeHandler = this.getScopeHandler(); - this.scope = new ScopeHandler(this, inModule); - const oldProdParam = this.prodParam; - this.prodParam = new ProductionParameterHandler(); - const oldClassScope = this.classScope; - this.classScope = new ClassScopeHandler(this); - const oldExpressionScope = this.expressionScope; - this.expressionScope = new ExpressionScopeHandler(this); - return () => { - this.state.labels = oldLabels; - this.exportedIdentifiers = oldExportedIdentifiers; - this.inModule = oldInModule; - this.scope = oldScope; - this.prodParam = oldProdParam; - this.classScope = oldClassScope; - this.expressionScope = oldExpressionScope; - }; - } - enterInitialScopes() { - let paramFlags = 0; - if (this.inModule) { - paramFlags |= 2; - } - this.scope.enter(1); - this.prodParam.enter(paramFlags); - } - checkDestructuringPrivate(refExpressionErrors) { - const { - privateKeyLoc - } = refExpressionErrors; - if (privateKeyLoc !== null) { - this.expectPlugin("destructuringPrivate", privateKeyLoc); - } - } -} -class ExpressionErrors { - constructor() { - this.shorthandAssignLoc = null; - this.doubleProtoLoc = null; - this.privateKeyLoc = null; - this.optionalParametersLoc = null; - } -} -class Node { - constructor(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - this.loc = new SourceLocation(loc); - if ((parser == null ? void 0 : parser.optionFlags) & 64) this.range = [pos, 0]; - if (parser != null && parser.filename) this.loc.filename = parser.filename; - } -} -const NodePrototype = Node.prototype; -{ - NodePrototype.__clone = function () { - const newNode = new Node(undefined, this.start, this.loc.start); - const keys = Object.keys(this); - for (let i = 0, length = keys.length; i < length; i++) { - const key = keys[i]; - if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") { - newNode[key] = this[key]; - } - } - return newNode; - }; -} -function clonePlaceholder(node) { - return cloneIdentifier(node); -} -function cloneIdentifier(node) { - const { - type, - start, - end, - loc, - range, - extra, - name - } = node; - const cloned = Object.create(NodePrototype); - cloned.type = type; - cloned.start = start; - cloned.end = end; - cloned.loc = loc; - cloned.range = range; - cloned.extra = extra; - cloned.name = name; - if (type === "Placeholder") { - cloned.expectedNode = node.expectedNode; - } - return cloned; -} -function cloneStringLiteral(node) { - const { - type, - start, - end, - loc, - range, - extra - } = node; - if (type === "Placeholder") { - return clonePlaceholder(node); - } - const cloned = Object.create(NodePrototype); - cloned.type = type; - cloned.start = start; - cloned.end = end; - cloned.loc = loc; - cloned.range = range; - if (node.raw !== undefined) { - cloned.raw = node.raw; - } else { - cloned.extra = extra; - } - cloned.value = node.value; - return cloned; -} -class NodeUtils extends UtilParser { - startNode() { - const loc = this.state.startLoc; - return new Node(this, loc.index, loc); - } - startNodeAt(loc) { - return new Node(this, loc.index, loc); - } - startNodeAtNode(type) { - return this.startNodeAt(type.loc.start); - } - finishNode(node, type) { - return this.finishNodeAt(node, type, this.state.lastTokEndLoc); - } - finishNodeAt(node, type, endLoc) { - node.type = type; - node.end = endLoc.index; - node.loc.end = endLoc; - if (this.optionFlags & 64) node.range[1] = endLoc.index; - if (this.optionFlags & 2048) { - this.processComment(node); - } - return node; - } - resetStartLocation(node, startLoc) { - node.start = startLoc.index; - node.loc.start = startLoc; - if (this.optionFlags & 64) node.range[0] = startLoc.index; - } - resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { - node.end = endLoc.index; - node.loc.end = endLoc; - if (this.optionFlags & 64) node.range[1] = endLoc.index; - } - resetStartLocationFromNode(node, locationNode) { - this.resetStartLocation(node, locationNode.loc.start); - } -} -const reservedTypes = new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]); -const FlowErrors = ParseErrorEnum`flow`({ - AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.", - AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.", - AssignReservedType: ({ - reservedType - }) => `Cannot overwrite reserved type ${reservedType}.`, - DeclareClassElement: "The `declare` modifier can only appear on class fields.", - DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.", - DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.", - EnumBooleanMemberNotInitialized: ({ - memberName, - enumName - }) => `Boolean enum members need to be initialized. Use either \`${memberName} = true,\` or \`${memberName} = false,\` in enum \`${enumName}\`.`, - EnumDuplicateMemberName: ({ - memberName, - enumName - }) => `Enum member names need to be unique, but the name \`${memberName}\` has already been used before in enum \`${enumName}\`.`, - EnumInconsistentMemberValues: ({ - enumName - }) => `Enum \`${enumName}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`, - EnumInvalidExplicitType: ({ - invalidEnumType, - enumName - }) => `Enum type \`${invalidEnumType}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`, - EnumInvalidExplicitTypeUnknownSupplied: ({ - enumName - }) => `Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`, - EnumInvalidMemberInitializerPrimaryType: ({ - enumName, - memberName, - explicitType - }) => `Enum \`${enumName}\` has type \`${explicitType}\`, so the initializer of \`${memberName}\` needs to be a ${explicitType} literal.`, - EnumInvalidMemberInitializerSymbolType: ({ - enumName, - memberName - }) => `Symbol enum members cannot be initialized. Use \`${memberName},\` in enum \`${enumName}\`.`, - EnumInvalidMemberInitializerUnknownType: ({ - enumName, - memberName - }) => `The enum member initializer for \`${memberName}\` needs to be a literal (either a boolean, number, or string) in enum \`${enumName}\`.`, - EnumInvalidMemberName: ({ - enumName, - memberName, - suggestion - }) => `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${memberName}\`, consider using \`${suggestion}\`, in enum \`${enumName}\`.`, - EnumNumberMemberNotInitialized: ({ - enumName, - memberName - }) => `Number enum members need to be initialized, e.g. \`${memberName} = 1\` in enum \`${enumName}\`.`, - EnumStringMemberInconsistentlyInitialized: ({ - enumName - }) => `String enum members need to consistently either all use initializers, or use no initializers, in enum \`${enumName}\`.`, - GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.", - ImportReflectionHasImportType: "An `import module` declaration can not use `type` or `typeof` keyword.", - ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.", - InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.", - InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.", - InexactVariance: "Explicit inexact syntax cannot have variance.", - InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.", - MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.", - NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.", - NestedFlowComment: "Cannot have a flow comment inside another flow comment.", - PatternIsOptional: Object.assign({ - message: "A binding pattern parameter cannot be optional in an implementation signature." - }, { - reasonCode: "OptionalBindingPattern" - }), - SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.", - SpreadVariance: "Spread properties cannot have variance.", - ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.", - ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.", - ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.", - ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.", - ThisParamNoDefault: "The `this` parameter may not have a default value.", - TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", - TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.", - UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.", - UnexpectedReservedType: ({ - reservedType - }) => `Unexpected reserved type ${reservedType}.`, - UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.", - UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.", - UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.", - UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".', - UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.", - UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.", - UnsupportedDeclareExportKind: ({ - unsupportedExportKind, - suggestion - }) => `\`declare export ${unsupportedExportKind}\` is not supported. Use \`${suggestion}\` instead.`, - UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.", - UnterminatedFlowComment: "Unterminated flow-comment." -}); -function isEsModuleType(bodyElement) { - return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); -} -function hasTypeImportKind(node) { - return node.importKind === "type" || node.importKind === "typeof"; -} -const exportSuggestions = { - const: "declare export var", - let: "declare export var", - type: "export type", - interface: "export interface" -}; -function partition(list, test) { - const list1 = []; - const list2 = []; - for (let i = 0; i < list.length; i++) { - (test(list[i], i, list) ? list1 : list2).push(list[i]); - } - return [list1, list2]; -} -const FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/; -var flow = superClass => class FlowParserMixin extends superClass { - constructor(...args) { - super(...args); - this.flowPragma = undefined; - } - getScopeHandler() { - return FlowScopeHandler; - } - shouldParseTypes() { - return this.getPluginOption("flow", "all") || this.flowPragma === "flow"; - } - finishToken(type, val) { - if (type !== 134 && type !== 13 && type !== 28) { - if (this.flowPragma === undefined) { - this.flowPragma = null; - } - } - super.finishToken(type, val); - } - addComment(comment) { - if (this.flowPragma === undefined) { - const matches = FLOW_PRAGMA_REGEX.exec(comment.value); - if (!matches) ;else if (matches[1] === "flow") { - this.flowPragma = "flow"; - } else if (matches[1] === "noflow") { - this.flowPragma = "noflow"; - } else { - throw new Error("Unexpected flow pragma"); - } - } - super.addComment(comment); - } - flowParseTypeInitialiser(tok) { - const oldInType = this.state.inType; - this.state.inType = true; - this.expect(tok || 14); - const type = this.flowParseType(); - this.state.inType = oldInType; - return type; - } - flowParsePredicate() { - const node = this.startNode(); - const moduloLoc = this.state.startLoc; - this.next(); - this.expectContextual(110); - if (this.state.lastTokStartLoc.index > moduloLoc.index + 1) { - this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks, moduloLoc); - } - if (this.eat(10)) { - node.value = super.parseExpression(); - this.expect(11); - return this.finishNode(node, "DeclaredPredicate"); - } else { - return this.finishNode(node, "InferredPredicate"); - } - } - flowParseTypeAndPredicateInitialiser() { - const oldInType = this.state.inType; - this.state.inType = true; - this.expect(14); - let type = null; - let predicate = null; - if (this.match(54)) { - this.state.inType = oldInType; - predicate = this.flowParsePredicate(); - } else { - type = this.flowParseType(); - this.state.inType = oldInType; - if (this.match(54)) { - predicate = this.flowParsePredicate(); - } - } - return [type, predicate]; - } - flowParseDeclareClass(node) { - this.next(); - this.flowParseInterfaceish(node, true); - return this.finishNode(node, "DeclareClass"); - } - flowParseDeclareFunction(node) { - this.next(); - const id = node.id = this.parseIdentifier(); - const typeNode = this.startNode(); - const typeContainer = this.startNode(); - if (this.match(47)) { - typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - typeNode.typeParameters = null; - } - this.expect(10); - const tmp = this.flowParseFunctionTypeParams(); - typeNode.params = tmp.params; - typeNode.rest = tmp.rest; - typeNode.this = tmp._this; - this.expect(11); - [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); - typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); - id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); - this.resetEndLocation(id); - this.semicolon(); - this.scope.declareName(node.id.name, 2048, node.id.loc.start); - return this.finishNode(node, "DeclareFunction"); - } - flowParseDeclare(node, insideModule) { - if (this.match(80)) { - return this.flowParseDeclareClass(node); - } else if (this.match(68)) { - return this.flowParseDeclareFunction(node); - } else if (this.match(74)) { - return this.flowParseDeclareVariable(node); - } else if (this.eatContextual(127)) { - if (this.match(16)) { - return this.flowParseDeclareModuleExports(node); - } else { - if (insideModule) { - this.raise(FlowErrors.NestedDeclareModule, this.state.lastTokStartLoc); - } - return this.flowParseDeclareModule(node); - } - } else if (this.isContextual(130)) { - return this.flowParseDeclareTypeAlias(node); - } else if (this.isContextual(131)) { - return this.flowParseDeclareOpaqueType(node); - } else if (this.isContextual(129)) { - return this.flowParseDeclareInterface(node); - } else if (this.match(82)) { - return this.flowParseDeclareExportDeclaration(node, insideModule); - } else { - this.unexpected(); - } - } - flowParseDeclareVariable(node) { - this.next(); - node.id = this.flowParseTypeAnnotatableIdentifier(true); - this.scope.declareName(node.id.name, 5, node.id.loc.start); - this.semicolon(); - return this.finishNode(node, "DeclareVariable"); - } - flowParseDeclareModule(node) { - this.scope.enter(0); - if (this.match(134)) { - node.id = super.parseExprAtom(); - } else { - node.id = this.parseIdentifier(); - } - const bodyNode = node.body = this.startNode(); - const body = bodyNode.body = []; - this.expect(5); - while (!this.match(8)) { - let bodyNode = this.startNode(); - if (this.match(83)) { - this.next(); - if (!this.isContextual(130) && !this.match(87)) { - this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc); - } - super.parseImport(bodyNode); - } else { - this.expectContextual(125, FlowErrors.UnsupportedStatementInDeclareModule); - bodyNode = this.flowParseDeclare(bodyNode, true); - } - body.push(bodyNode); - } - this.scope.exit(); - this.expect(8); - this.finishNode(bodyNode, "BlockStatement"); - let kind = null; - let hasModuleExport = false; - body.forEach(bodyElement => { - if (isEsModuleType(bodyElement)) { - if (kind === "CommonJS") { - this.raise(FlowErrors.AmbiguousDeclareModuleKind, bodyElement); - } - kind = "ES"; - } else if (bodyElement.type === "DeclareModuleExports") { - if (hasModuleExport) { - this.raise(FlowErrors.DuplicateDeclareModuleExports, bodyElement); - } - if (kind === "ES") { - this.raise(FlowErrors.AmbiguousDeclareModuleKind, bodyElement); - } - kind = "CommonJS"; - hasModuleExport = true; - } - }); - node.kind = kind || "CommonJS"; - return this.finishNode(node, "DeclareModule"); - } - flowParseDeclareExportDeclaration(node, insideModule) { - this.expect(82); - if (this.eat(65)) { - if (this.match(68) || this.match(80)) { - node.declaration = this.flowParseDeclare(this.startNode()); - } else { - node.declaration = this.flowParseType(); - this.semicolon(); - } - node.default = true; - return this.finishNode(node, "DeclareExportDeclaration"); - } else { - if (this.match(75) || this.isLet() || (this.isContextual(130) || this.isContextual(129)) && !insideModule) { - const label = this.state.value; - throw this.raise(FlowErrors.UnsupportedDeclareExportKind, this.state.startLoc, { - unsupportedExportKind: label, - suggestion: exportSuggestions[label] - }); - } - if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(131)) { - node.declaration = this.flowParseDeclare(this.startNode()); - node.default = false; - return this.finishNode(node, "DeclareExportDeclaration"); - } else if (this.match(55) || this.match(5) || this.isContextual(129) || this.isContextual(130) || this.isContextual(131)) { - node = this.parseExport(node, null); - if (node.type === "ExportNamedDeclaration") { - node.type = "ExportDeclaration"; - node.default = false; - delete node.exportKind; - } - node.type = "Declare" + node.type; - return node; - } - } - this.unexpected(); - } - flowParseDeclareModuleExports(node) { - this.next(); - this.expectContextual(111); - node.typeAnnotation = this.flowParseTypeAnnotation(); - this.semicolon(); - return this.finishNode(node, "DeclareModuleExports"); - } - flowParseDeclareTypeAlias(node) { - this.next(); - const finished = this.flowParseTypeAlias(node); - finished.type = "DeclareTypeAlias"; - return finished; - } - flowParseDeclareOpaqueType(node) { - this.next(); - const finished = this.flowParseOpaqueType(node, true); - finished.type = "DeclareOpaqueType"; - return finished; - } - flowParseDeclareInterface(node) { - this.next(); - this.flowParseInterfaceish(node, false); - return this.finishNode(node, "DeclareInterface"); - } - flowParseInterfaceish(node, isClass) { - node.id = this.flowParseRestrictedIdentifier(!isClass, true); - this.scope.declareName(node.id.name, isClass ? 17 : 8201, node.id.loc.start); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - node.extends = []; - if (this.eat(81)) { - do { - node.extends.push(this.flowParseInterfaceExtends()); - } while (!isClass && this.eat(12)); - } - if (isClass) { - node.implements = []; - node.mixins = []; - if (this.eatContextual(117)) { - do { - node.mixins.push(this.flowParseInterfaceExtends()); - } while (this.eat(12)); - } - if (this.eatContextual(113)) { - do { - node.implements.push(this.flowParseInterfaceExtends()); - } while (this.eat(12)); - } - } - node.body = this.flowParseObjectType({ - allowStatic: isClass, - allowExact: false, - allowSpread: false, - allowProto: isClass, - allowInexact: false - }); - } - flowParseInterfaceExtends() { - const node = this.startNode(); - node.id = this.flowParseQualifiedTypeIdentifier(); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - return this.finishNode(node, "InterfaceExtends"); - } - flowParseInterface(node) { - this.flowParseInterfaceish(node, false); - return this.finishNode(node, "InterfaceDeclaration"); - } - checkNotUnderscore(word) { - if (word === "_") { - this.raise(FlowErrors.UnexpectedReservedUnderscore, this.state.startLoc); - } - } - checkReservedType(word, startLoc, declaration) { - if (!reservedTypes.has(word)) return; - this.raise(declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, startLoc, { - reservedType: word - }); - } - flowParseRestrictedIdentifier(liberal, declaration) { - this.checkReservedType(this.state.value, this.state.startLoc, declaration); - return this.parseIdentifier(liberal); - } - flowParseTypeAlias(node) { - node.id = this.flowParseRestrictedIdentifier(false, true); - this.scope.declareName(node.id.name, 8201, node.id.loc.start); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - node.right = this.flowParseTypeInitialiser(29); - this.semicolon(); - return this.finishNode(node, "TypeAlias"); - } - flowParseOpaqueType(node, declare) { - this.expectContextual(130); - node.id = this.flowParseRestrictedIdentifier(true, true); - this.scope.declareName(node.id.name, 8201, node.id.loc.start); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - node.supertype = null; - if (this.match(14)) { - node.supertype = this.flowParseTypeInitialiser(14); - } - node.impltype = null; - if (!declare) { - node.impltype = this.flowParseTypeInitialiser(29); - } - this.semicolon(); - return this.finishNode(node, "OpaqueType"); - } - flowParseTypeParameter(requireDefault = false) { - const nodeStartLoc = this.state.startLoc; - const node = this.startNode(); - const variance = this.flowParseVariance(); - const ident = this.flowParseTypeAnnotatableIdentifier(); - node.name = ident.name; - node.variance = variance; - node.bound = ident.typeAnnotation; - if (this.match(29)) { - this.eat(29); - node.default = this.flowParseType(); - } else { - if (requireDefault) { - this.raise(FlowErrors.MissingTypeParamDefault, nodeStartLoc); - } - } - return this.finishNode(node, "TypeParameter"); - } - flowParseTypeParameterDeclaration() { - const oldInType = this.state.inType; - const node = this.startNode(); - node.params = []; - this.state.inType = true; - if (this.match(47) || this.match(143)) { - this.next(); - } else { - this.unexpected(); - } - let defaultRequired = false; - do { - const typeParameter = this.flowParseTypeParameter(defaultRequired); - node.params.push(typeParameter); - if (typeParameter.default) { - defaultRequired = true; - } - if (!this.match(48)) { - this.expect(12); - } - } while (!this.match(48)); - this.expect(48); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterDeclaration"); - } - flowInTopLevelContext(cb) { - if (this.curContext() !== types.brace) { - const oldContext = this.state.context; - this.state.context = [oldContext[0]]; - try { - return cb(); - } finally { - this.state.context = oldContext; - } - } else { - return cb(); - } - } - flowParseTypeParameterInstantiationInExpression() { - if (this.reScan_lt() !== 47) return; - return this.flowParseTypeParameterInstantiation(); - } - flowParseTypeParameterInstantiation() { - const node = this.startNode(); - const oldInType = this.state.inType; - this.state.inType = true; - node.params = []; - this.flowInTopLevelContext(() => { - this.expect(47); - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = false; - while (!this.match(48)) { - node.params.push(this.flowParseType()); - if (!this.match(48)) { - this.expect(12); - } - } - this.state.noAnonFunctionType = oldNoAnonFunctionType; - }); - this.state.inType = oldInType; - if (!this.state.inType && this.curContext() === types.brace) { - this.reScan_lt_gt(); - } - this.expect(48); - return this.finishNode(node, "TypeParameterInstantiation"); - } - flowParseTypeParameterInstantiationCallOrNew() { - if (this.reScan_lt() !== 47) return; - const node = this.startNode(); - const oldInType = this.state.inType; - node.params = []; - this.state.inType = true; - this.expect(47); - while (!this.match(48)) { - node.params.push(this.flowParseTypeOrImplicitInstantiation()); - if (!this.match(48)) { - this.expect(12); - } - } - this.expect(48); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterInstantiation"); - } - flowParseInterfaceType() { - const node = this.startNode(); - this.expectContextual(129); - node.extends = []; - if (this.eat(81)) { - do { - node.extends.push(this.flowParseInterfaceExtends()); - } while (this.eat(12)); - } - node.body = this.flowParseObjectType({ - allowStatic: false, - allowExact: false, - allowSpread: false, - allowProto: false, - allowInexact: false - }); - return this.finishNode(node, "InterfaceTypeAnnotation"); - } - flowParseObjectPropertyKey() { - return this.match(135) || this.match(134) ? super.parseExprAtom() : this.parseIdentifier(true); - } - flowParseObjectTypeIndexer(node, isStatic, variance) { - node.static = isStatic; - if (this.lookahead().type === 14) { - node.id = this.flowParseObjectPropertyKey(); - node.key = this.flowParseTypeInitialiser(); - } else { - node.id = null; - node.key = this.flowParseType(); - } - this.expect(3); - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - return this.finishNode(node, "ObjectTypeIndexer"); - } - flowParseObjectTypeInternalSlot(node, isStatic) { - node.static = isStatic; - node.id = this.flowParseObjectPropertyKey(); - this.expect(3); - this.expect(3); - if (this.match(47) || this.match(10)) { - node.method = true; - node.optional = false; - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start)); - } else { - node.method = false; - if (this.eat(17)) { - node.optional = true; - } - node.value = this.flowParseTypeInitialiser(); - } - return this.finishNode(node, "ObjectTypeInternalSlot"); - } - flowParseObjectTypeMethodish(node) { - node.params = []; - node.rest = null; - node.typeParameters = null; - node.this = null; - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - this.expect(10); - if (this.match(78)) { - node.this = this.flowParseFunctionTypeParam(true); - node.this.name = null; - if (!this.match(11)) { - this.expect(12); - } - } - while (!this.match(11) && !this.match(21)) { - node.params.push(this.flowParseFunctionTypeParam(false)); - if (!this.match(11)) { - this.expect(12); - } - } - if (this.eat(21)) { - node.rest = this.flowParseFunctionTypeParam(false); - } - this.expect(11); - node.returnType = this.flowParseTypeInitialiser(); - return this.finishNode(node, "FunctionTypeAnnotation"); - } - flowParseObjectTypeCallProperty(node, isStatic) { - const valueNode = this.startNode(); - node.static = isStatic; - node.value = this.flowParseObjectTypeMethodish(valueNode); - return this.finishNode(node, "ObjectTypeCallProperty"); - } - flowParseObjectType({ - allowStatic, - allowExact, - allowSpread, - allowProto, - allowInexact - }) { - const oldInType = this.state.inType; - this.state.inType = true; - const nodeStart = this.startNode(); - nodeStart.callProperties = []; - nodeStart.properties = []; - nodeStart.indexers = []; - nodeStart.internalSlots = []; - let endDelim; - let exact; - let inexact = false; - if (allowExact && this.match(6)) { - this.expect(6); - endDelim = 9; - exact = true; - } else { - this.expect(5); - endDelim = 8; - exact = false; - } - nodeStart.exact = exact; - while (!this.match(endDelim)) { - let isStatic = false; - let protoStartLoc = null; - let inexactStartLoc = null; - const node = this.startNode(); - if (allowProto && this.isContextual(118)) { - const lookahead = this.lookahead(); - if (lookahead.type !== 14 && lookahead.type !== 17) { - this.next(); - protoStartLoc = this.state.startLoc; - allowStatic = false; - } - } - if (allowStatic && this.isContextual(106)) { - const lookahead = this.lookahead(); - if (lookahead.type !== 14 && lookahead.type !== 17) { - this.next(); - isStatic = true; - } - } - const variance = this.flowParseVariance(); - if (this.eat(0)) { - if (protoStartLoc != null) { - this.unexpected(protoStartLoc); - } - if (this.eat(0)) { - if (variance) { - this.unexpected(variance.loc.start); - } - nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic)); - } else { - nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); - } - } else if (this.match(10) || this.match(47)) { - if (protoStartLoc != null) { - this.unexpected(protoStartLoc); - } - if (variance) { - this.unexpected(variance.loc.start); - } - nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); - } else { - let kind = "init"; - if (this.isContextual(99) || this.isContextual(104)) { - const lookahead = this.lookahead(); - if (tokenIsLiteralPropertyName(lookahead.type)) { - kind = this.state.value; - this.next(); - } - } - const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact); - if (propOrInexact === null) { - inexact = true; - inexactStartLoc = this.state.lastTokStartLoc; - } else { - nodeStart.properties.push(propOrInexact); - } - } - this.flowObjectTypeSemicolon(); - if (inexactStartLoc && !this.match(8) && !this.match(9)) { - this.raise(FlowErrors.UnexpectedExplicitInexactInObject, inexactStartLoc); - } - } - this.expect(endDelim); - if (allowSpread) { - nodeStart.inexact = inexact; - } - const out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); - this.state.inType = oldInType; - return out; - } - flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact) { - if (this.eat(21)) { - const isInexactToken = this.match(12) || this.match(13) || this.match(8) || this.match(9); - if (isInexactToken) { - if (!allowSpread) { - this.raise(FlowErrors.InexactInsideNonObject, this.state.lastTokStartLoc); - } else if (!allowInexact) { - this.raise(FlowErrors.InexactInsideExact, this.state.lastTokStartLoc); - } - if (variance) { - this.raise(FlowErrors.InexactVariance, variance); - } - return null; - } - if (!allowSpread) { - this.raise(FlowErrors.UnexpectedSpreadType, this.state.lastTokStartLoc); - } - if (protoStartLoc != null) { - this.unexpected(protoStartLoc); - } - if (variance) { - this.raise(FlowErrors.SpreadVariance, variance); - } - node.argument = this.flowParseType(); - return this.finishNode(node, "ObjectTypeSpreadProperty"); - } else { - node.key = this.flowParseObjectPropertyKey(); - node.static = isStatic; - node.proto = protoStartLoc != null; - node.kind = kind; - let optional = false; - if (this.match(47) || this.match(10)) { - node.method = true; - if (protoStartLoc != null) { - this.unexpected(protoStartLoc); - } - if (variance) { - this.unexpected(variance.loc.start); - } - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start)); - if (kind === "get" || kind === "set") { - this.flowCheckGetterSetterParams(node); - } - if (!allowSpread && node.key.name === "constructor" && node.value.this) { - this.raise(FlowErrors.ThisParamBannedInConstructor, node.value.this); - } - } else { - if (kind !== "init") this.unexpected(); - node.method = false; - if (this.eat(17)) { - optional = true; - } - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - } - node.optional = optional; - return this.finishNode(node, "ObjectTypeProperty"); - } - } - flowCheckGetterSetterParams(property) { - const paramCount = property.kind === "get" ? 0 : 1; - const length = property.value.params.length + (property.value.rest ? 1 : 0); - if (property.value.this) { - this.raise(property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam, property.value.this); - } - if (length !== paramCount) { - this.raise(property.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, property); - } - if (property.kind === "set" && property.value.rest) { - this.raise(Errors.BadSetterRestParameter, property); - } - } - flowObjectTypeSemicolon() { - if (!this.eat(13) && !this.eat(12) && !this.match(8) && !this.match(9)) { - this.unexpected(); - } - } - flowParseQualifiedTypeIdentifier(startLoc, id) { - var _startLoc; - (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc; - let node = id || this.flowParseRestrictedIdentifier(true); - while (this.eat(16)) { - const node2 = this.startNodeAt(startLoc); - node2.qualification = node; - node2.id = this.flowParseRestrictedIdentifier(true); - node = this.finishNode(node2, "QualifiedTypeIdentifier"); - } - return node; - } - flowParseGenericType(startLoc, id) { - const node = this.startNodeAt(startLoc); - node.typeParameters = null; - node.id = this.flowParseQualifiedTypeIdentifier(startLoc, id); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } - return this.finishNode(node, "GenericTypeAnnotation"); - } - flowParseTypeofType() { - const node = this.startNode(); - this.expect(87); - node.argument = this.flowParsePrimaryType(); - return this.finishNode(node, "TypeofTypeAnnotation"); - } - flowParseTupleType() { - const node = this.startNode(); - node.types = []; - this.expect(0); - while (this.state.pos < this.length && !this.match(3)) { - node.types.push(this.flowParseType()); - if (this.match(3)) break; - this.expect(12); - } - this.expect(3); - return this.finishNode(node, "TupleTypeAnnotation"); - } - flowParseFunctionTypeParam(first) { - let name = null; - let optional = false; - let typeAnnotation = null; - const node = this.startNode(); - const lh = this.lookahead(); - const isThis = this.state.type === 78; - if (lh.type === 14 || lh.type === 17) { - if (isThis && !first) { - this.raise(FlowErrors.ThisParamMustBeFirst, node); - } - name = this.parseIdentifier(isThis); - if (this.eat(17)) { - optional = true; - if (isThis) { - this.raise(FlowErrors.ThisParamMayNotBeOptional, node); - } - } - typeAnnotation = this.flowParseTypeInitialiser(); - } else { - typeAnnotation = this.flowParseType(); - } - node.name = name; - node.optional = optional; - node.typeAnnotation = typeAnnotation; - return this.finishNode(node, "FunctionTypeParam"); - } - reinterpretTypeAsFunctionTypeParam(type) { - const node = this.startNodeAt(type.loc.start); - node.name = null; - node.optional = false; - node.typeAnnotation = type; - return this.finishNode(node, "FunctionTypeParam"); - } - flowParseFunctionTypeParams(params = []) { - let rest = null; - let _this = null; - if (this.match(78)) { - _this = this.flowParseFunctionTypeParam(true); - _this.name = null; - if (!this.match(11)) { - this.expect(12); - } - } - while (!this.match(11) && !this.match(21)) { - params.push(this.flowParseFunctionTypeParam(false)); - if (!this.match(11)) { - this.expect(12); - } - } - if (this.eat(21)) { - rest = this.flowParseFunctionTypeParam(false); - } - return { - params, - rest, - _this - }; - } - flowIdentToTypeAnnotation(startLoc, node, id) { - switch (id.name) { - case "any": - return this.finishNode(node, "AnyTypeAnnotation"); - case "bool": - case "boolean": - return this.finishNode(node, "BooleanTypeAnnotation"); - case "mixed": - return this.finishNode(node, "MixedTypeAnnotation"); - case "empty": - return this.finishNode(node, "EmptyTypeAnnotation"); - case "number": - return this.finishNode(node, "NumberTypeAnnotation"); - case "string": - return this.finishNode(node, "StringTypeAnnotation"); - case "symbol": - return this.finishNode(node, "SymbolTypeAnnotation"); - default: - this.checkNotUnderscore(id.name); - return this.flowParseGenericType(startLoc, id); - } - } - flowParsePrimaryType() { - const startLoc = this.state.startLoc; - const node = this.startNode(); - let tmp; - let type; - let isGroupedType = false; - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - switch (this.state.type) { - case 5: - return this.flowParseObjectType({ - allowStatic: false, - allowExact: false, - allowSpread: true, - allowProto: false, - allowInexact: true - }); - case 6: - return this.flowParseObjectType({ - allowStatic: false, - allowExact: true, - allowSpread: true, - allowProto: false, - allowInexact: false - }); - case 0: - this.state.noAnonFunctionType = false; - type = this.flowParseTupleType(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - return type; - case 47: - { - const node = this.startNode(); - node.typeParameters = this.flowParseTypeParameterDeclaration(); - this.expect(10); - tmp = this.flowParseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; - node.this = tmp._this; - this.expect(11); - this.expect(19); - node.returnType = this.flowParseType(); - return this.finishNode(node, "FunctionTypeAnnotation"); - } - case 10: - { - const node = this.startNode(); - this.next(); - if (!this.match(11) && !this.match(21)) { - if (tokenIsIdentifier(this.state.type) || this.match(78)) { - const token = this.lookahead().type; - isGroupedType = token !== 17 && token !== 14; - } else { - isGroupedType = true; - } - } - if (isGroupedType) { - this.state.noAnonFunctionType = false; - type = this.flowParseType(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - if (this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) { - this.expect(11); - return type; - } else { - this.eat(12); - } - } - if (type) { - tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); - } else { - tmp = this.flowParseFunctionTypeParams(); - } - node.params = tmp.params; - node.rest = tmp.rest; - node.this = tmp._this; - this.expect(11); - this.expect(19); - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - } - case 134: - return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); - case 85: - case 86: - node.value = this.match(85); - this.next(); - return this.finishNode(node, "BooleanLiteralTypeAnnotation"); - case 53: - if (this.state.value === "-") { - this.next(); - if (this.match(135)) { - return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node); - } - if (this.match(136)) { - return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node); - } - throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc); - } - this.unexpected(); - return; - case 135: - return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); - case 136: - return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation"); - case 88: - this.next(); - return this.finishNode(node, "VoidTypeAnnotation"); - case 84: - this.next(); - return this.finishNode(node, "NullLiteralTypeAnnotation"); - case 78: - this.next(); - return this.finishNode(node, "ThisTypeAnnotation"); - case 55: - this.next(); - return this.finishNode(node, "ExistsTypeAnnotation"); - case 87: - return this.flowParseTypeofType(); - default: - if (tokenIsKeyword(this.state.type)) { - const label = tokenLabelName(this.state.type); - this.next(); - return super.createIdentifier(node, label); - } else if (tokenIsIdentifier(this.state.type)) { - if (this.isContextual(129)) { - return this.flowParseInterfaceType(); - } - return this.flowIdentToTypeAnnotation(startLoc, node, this.parseIdentifier()); - } - } - this.unexpected(); - } - flowParsePostfixType() { - const startLoc = this.state.startLoc; - let type = this.flowParsePrimaryType(); - let seenOptionalIndexedAccess = false; - while ((this.match(0) || this.match(18)) && !this.canInsertSemicolon()) { - const node = this.startNodeAt(startLoc); - const optional = this.eat(18); - seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional; - this.expect(0); - if (!optional && this.match(3)) { - node.elementType = type; - this.next(); - type = this.finishNode(node, "ArrayTypeAnnotation"); - } else { - node.objectType = type; - node.indexType = this.flowParseType(); - this.expect(3); - if (seenOptionalIndexedAccess) { - node.optional = optional; - type = this.finishNode(node, "OptionalIndexedAccessType"); - } else { - type = this.finishNode(node, "IndexedAccessType"); - } - } - } - return type; - } - flowParsePrefixType() { - const node = this.startNode(); - if (this.eat(17)) { - node.typeAnnotation = this.flowParsePrefixType(); - return this.finishNode(node, "NullableTypeAnnotation"); - } else { - return this.flowParsePostfixType(); - } - } - flowParseAnonFunctionWithoutParens() { - const param = this.flowParsePrefixType(); - if (!this.state.noAnonFunctionType && this.eat(19)) { - const node = this.startNodeAt(param.loc.start); - node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; - node.rest = null; - node.this = null; - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - } - return param; - } - flowParseIntersectionType() { - const node = this.startNode(); - this.eat(45); - const type = this.flowParseAnonFunctionWithoutParens(); - node.types = [type]; - while (this.eat(45)) { - node.types.push(this.flowParseAnonFunctionWithoutParens()); - } - return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); - } - flowParseUnionType() { - const node = this.startNode(); - this.eat(43); - const type = this.flowParseIntersectionType(); - node.types = [type]; - while (this.eat(43)) { - node.types.push(this.flowParseIntersectionType()); - } - return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); - } - flowParseType() { - const oldInType = this.state.inType; - this.state.inType = true; - const type = this.flowParseUnionType(); - this.state.inType = oldInType; - return type; - } - flowParseTypeOrImplicitInstantiation() { - if (this.state.type === 132 && this.state.value === "_") { - const startLoc = this.state.startLoc; - const node = this.parseIdentifier(); - return this.flowParseGenericType(startLoc, node); - } else { - return this.flowParseType(); - } - } - flowParseTypeAnnotation() { - const node = this.startNode(); - node.typeAnnotation = this.flowParseTypeInitialiser(); - return this.finishNode(node, "TypeAnnotation"); - } - flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { - const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); - if (this.match(14)) { - ident.typeAnnotation = this.flowParseTypeAnnotation(); - this.resetEndLocation(ident); - } - return ident; - } - typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); - return node.expression; - } - flowParseVariance() { - let variance = null; - if (this.match(53)) { - variance = this.startNode(); - if (this.state.value === "+") { - variance.kind = "plus"; - } else { - variance.kind = "minus"; - } - this.next(); - return this.finishNode(variance, "Variance"); - } - return variance; - } - parseFunctionBody(node, allowExpressionBody, isMethod = false) { - if (allowExpressionBody) { - this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod)); - return; - } - super.parseFunctionBody(node, false, isMethod); - } - parseFunctionBodyAndFinish(node, type, isMethod = false) { - if (this.match(14)) { - const typeNode = this.startNode(); - [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); - node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; - } - return super.parseFunctionBodyAndFinish(node, type, isMethod); - } - parseStatementLike(flags) { - if (this.state.strict && this.isContextual(129)) { - const lookahead = this.lookahead(); - if (tokenIsKeywordOrIdentifier(lookahead.type)) { - const node = this.startNode(); - this.next(); - return this.flowParseInterface(node); - } - } else if (this.isContextual(126)) { - const node = this.startNode(); - this.next(); - return this.flowParseEnumDeclaration(node); - } - const stmt = super.parseStatementLike(flags); - if (this.flowPragma === undefined && !this.isValidDirective(stmt)) { - this.flowPragma = null; - } - return stmt; - } - parseExpressionStatement(node, expr, decorators) { - if (expr.type === "Identifier") { - if (expr.name === "declare") { - if (this.match(80) || tokenIsIdentifier(this.state.type) || this.match(68) || this.match(74) || this.match(82)) { - return this.flowParseDeclare(node); - } - } else if (tokenIsIdentifier(this.state.type)) { - if (expr.name === "interface") { - return this.flowParseInterface(node); - } else if (expr.name === "type") { - return this.flowParseTypeAlias(node); - } else if (expr.name === "opaque") { - return this.flowParseOpaqueType(node, false); - } - } - } - return super.parseExpressionStatement(node, expr, decorators); - } - shouldParseExportDeclaration() { - const { - type - } = this.state; - if (type === 126 || tokenIsFlowInterfaceOrTypeOrOpaque(type)) { - return !this.state.containsEsc; - } - return super.shouldParseExportDeclaration(); - } - isExportDefaultSpecifier() { - const { - type - } = this.state; - if (type === 126 || tokenIsFlowInterfaceOrTypeOrOpaque(type)) { - return this.state.containsEsc; - } - return super.isExportDefaultSpecifier(); - } - parseExportDefaultExpression() { - if (this.isContextual(126)) { - const node = this.startNode(); - this.next(); - return this.flowParseEnumDeclaration(node); - } - return super.parseExportDefaultExpression(); - } - parseConditional(expr, startLoc, refExpressionErrors) { - if (!this.match(17)) return expr; - if (this.state.maybeInArrowParameters) { - const nextCh = this.lookaheadCharCode(); - if (nextCh === 44 || nextCh === 61 || nextCh === 58 || nextCh === 41) { - this.setOptionalParametersError(refExpressionErrors); - return expr; - } - } - this.expect(17); - const state = this.state.clone(); - const originalNoArrowAt = this.state.noArrowAt; - const node = this.startNodeAt(startLoc); - let { - consequent, - failed - } = this.tryParseConditionalConsequent(); - let [valid, invalid] = this.getArrowLikeExpressions(consequent); - if (failed || invalid.length > 0) { - const noArrowAt = [...originalNoArrowAt]; - if (invalid.length > 0) { - this.state = state; - this.state.noArrowAt = noArrowAt; - for (let i = 0; i < invalid.length; i++) { - noArrowAt.push(invalid[i].start); - } - ({ - consequent, - failed - } = this.tryParseConditionalConsequent()); - [valid, invalid] = this.getArrowLikeExpressions(consequent); - } - if (failed && valid.length > 1) { - this.raise(FlowErrors.AmbiguousConditionalArrow, state.startLoc); - } - if (failed && valid.length === 1) { - this.state = state; - noArrowAt.push(valid[0].start); - this.state.noArrowAt = noArrowAt; - ({ - consequent, - failed - } = this.tryParseConditionalConsequent()); - } - } - this.getArrowLikeExpressions(consequent, true); - this.state.noArrowAt = originalNoArrowAt; - this.expect(14); - node.test = expr; - node.consequent = consequent; - node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(undefined, undefined)); - return this.finishNode(node, "ConditionalExpression"); - } - tryParseConditionalConsequent() { - this.state.noArrowParamsConversionAt.push(this.state.start); - const consequent = this.parseMaybeAssignAllowIn(); - const failed = !this.match(14); - this.state.noArrowParamsConversionAt.pop(); - return { - consequent, - failed - }; - } - getArrowLikeExpressions(node, disallowInvalid) { - const stack = [node]; - const arrows = []; - while (stack.length !== 0) { - const node = stack.pop(); - if (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") { - if (node.typeParameters || !node.returnType) { - this.finishArrowValidation(node); - } else { - arrows.push(node); - } - stack.push(node.body); - } else if (node.type === "ConditionalExpression") { - stack.push(node.consequent); - stack.push(node.alternate); - } - } - if (disallowInvalid) { - arrows.forEach(node => this.finishArrowValidation(node)); - return [arrows, []]; - } - return partition(arrows, node => node.params.every(param => this.isAssignable(param, true))); - } - finishArrowValidation(node) { - var _node$extra; - this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingCommaLoc, false); - this.scope.enter(2 | 4); - super.checkParams(node, false, true); - this.scope.exit(); - } - forwardNoArrowParamsConversionAt(node, parse) { - let result; - if (this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))) { - this.state.noArrowParamsConversionAt.push(this.state.start); - result = parse(); - this.state.noArrowParamsConversionAt.pop(); - } else { - result = parse(); - } - return result; - } - parseParenItem(node, startLoc) { - const newNode = super.parseParenItem(node, startLoc); - if (this.eat(17)) { - newNode.optional = true; - this.resetEndLocation(node); - } - if (this.match(14)) { - const typeCastNode = this.startNodeAt(startLoc); - typeCastNode.expression = newNode; - typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TypeCastExpression"); - } - return newNode; - } - assertModuleNodeAllowed(node) { - if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { - return; - } - super.assertModuleNodeAllowed(node); - } - parseExportDeclaration(node) { - if (this.isContextual(130)) { - node.exportKind = "type"; - const declarationNode = this.startNode(); - this.next(); - if (this.match(5)) { - node.specifiers = this.parseExportSpecifiers(true); - super.parseExportFrom(node); - return null; - } else { - return this.flowParseTypeAlias(declarationNode); - } - } else if (this.isContextual(131)) { - node.exportKind = "type"; - const declarationNode = this.startNode(); - this.next(); - return this.flowParseOpaqueType(declarationNode, false); - } else if (this.isContextual(129)) { - node.exportKind = "type"; - const declarationNode = this.startNode(); - this.next(); - return this.flowParseInterface(declarationNode); - } else if (this.isContextual(126)) { - node.exportKind = "value"; - const declarationNode = this.startNode(); - this.next(); - return this.flowParseEnumDeclaration(declarationNode); - } else { - return super.parseExportDeclaration(node); - } - } - eatExportStar(node) { - if (super.eatExportStar(node)) return true; - if (this.isContextual(130) && this.lookahead().type === 55) { - node.exportKind = "type"; - this.next(); - this.next(); - return true; - } - return false; - } - maybeParseExportNamespaceSpecifier(node) { - const { - startLoc - } = this.state; - const hasNamespace = super.maybeParseExportNamespaceSpecifier(node); - if (hasNamespace && node.exportKind === "type") { - this.unexpected(startLoc); - } - return hasNamespace; - } - parseClassId(node, isStatement, optionalId) { - super.parseClassId(node, isStatement, optionalId); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - } - parseClassMember(classBody, member, state) { - const { - startLoc - } = this.state; - if (this.isContextual(125)) { - if (super.parseClassMemberFromModifier(classBody, member)) { - return; - } - member.declare = true; - } - super.parseClassMember(classBody, member, state); - if (member.declare) { - if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") { - this.raise(FlowErrors.DeclareClassElement, startLoc); - } else if (member.value) { - this.raise(FlowErrors.DeclareClassFieldInitializer, member.value); - } - } - } - isIterator(word) { - return word === "iterator" || word === "asyncIterator"; - } - readIterator() { - const word = super.readWord1(); - const fullWord = "@@" + word; - if (!this.isIterator(word) || !this.state.inType) { - this.raise(Errors.InvalidIdentifier, this.state.curPosition(), { - identifierName: fullWord - }); - } - this.finishToken(132, fullWord); - } - getTokenFromCode(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - if (code === 123 && next === 124) { - this.finishOp(6, 2); - } else if (this.state.inType && (code === 62 || code === 60)) { - this.finishOp(code === 62 ? 48 : 47, 1); - } else if (this.state.inType && code === 63) { - if (next === 46) { - this.finishOp(18, 2); - } else { - this.finishOp(17, 1); - } - } else if (isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))) { - this.state.pos += 2; - this.readIterator(); - } else { - super.getTokenFromCode(code); - } - } - isAssignable(node, isBinding) { - if (node.type === "TypeCastExpression") { - return this.isAssignable(node.expression, isBinding); - } else { - return super.isAssignable(node, isBinding); - } - } - toAssignable(node, isLHS = false) { - if (!isLHS && node.type === "AssignmentExpression" && node.left.type === "TypeCastExpression") { - node.left = this.typeCastToParameter(node.left); - } - super.toAssignable(node, isLHS); - } - toAssignableList(exprList, trailingCommaLoc, isLHS) { - for (let i = 0; i < exprList.length; i++) { - const expr = exprList[i]; - if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") { - exprList[i] = this.typeCastToParameter(expr); - } - } - super.toAssignableList(exprList, trailingCommaLoc, isLHS); - } - toReferencedList(exprList, isParenthesizedExpr) { - for (let i = 0; i < exprList.length; i++) { - var _expr$extra; - const expr = exprList[i]; - if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) { - this.raise(FlowErrors.TypeCastInPattern, expr.typeAnnotation); - } - } - return exprList; - } - parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { - const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors); - if (canBePattern && !this.state.maybeInArrowParameters) { - this.toReferencedList(node.elements); - } - return node; - } - isValidLVal(type, isParenthesized, binding) { - return type === "TypeCastExpression" || super.isValidLVal(type, isParenthesized, binding); - } - parseClassProperty(node) { - if (this.match(14)) { - node.typeAnnotation = this.flowParseTypeAnnotation(); - } - return super.parseClassProperty(node); - } - parseClassPrivateProperty(node) { - if (this.match(14)) { - node.typeAnnotation = this.flowParseTypeAnnotation(); - } - return super.parseClassPrivateProperty(node); - } - isClassMethod() { - return this.match(47) || super.isClassMethod(); - } - isClassProperty() { - return this.match(14) || super.isClassProperty(); - } - isNonstaticConstructor(method) { - return !this.match(14) && super.isNonstaticConstructor(method); - } - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - if (method.variance) { - this.unexpected(method.variance.loc.start); - } - delete method.variance; - if (this.match(47)) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); - if (method.params && isConstructor) { - const params = method.params; - if (params.length > 0 && this.isThisParam(params[0])) { - this.raise(FlowErrors.ThisParamBannedInConstructor, method); - } - } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) { - const params = method.value.params; - if (params.length > 0 && this.isThisParam(params[0])) { - this.raise(FlowErrors.ThisParamBannedInConstructor, method); - } - } - } - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - if (method.variance) { - this.unexpected(method.variance.loc.start); - } - delete method.variance; - if (this.match(47)) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); - } - parseClassSuper(node) { - super.parseClassSuper(node); - if (node.superClass && (this.match(47) || this.match(51))) { - { - node.superTypeParameters = this.flowParseTypeParameterInstantiationInExpression(); - } - } - if (this.isContextual(113)) { - this.next(); - const implemented = node.implements = []; - do { - const node = this.startNode(); - node.id = this.flowParseRestrictedIdentifier(true); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - implemented.push(this.finishNode(node, "ClassImplements")); - } while (this.eat(12)); - } - } - checkGetterSetterParams(method) { - super.checkGetterSetterParams(method); - const params = this.getObjectOrClassMethodParams(method); - if (params.length > 0) { - const param = params[0]; - if (this.isThisParam(param) && method.kind === "get") { - this.raise(FlowErrors.GetterMayNotHaveThisParam, param); - } else if (this.isThisParam(param)) { - this.raise(FlowErrors.SetterMayNotHaveThisParam, param); - } - } - } - parsePropertyNamePrefixOperator(node) { - node.variance = this.flowParseVariance(); - } - parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { - if (prop.variance) { - this.unexpected(prop.variance.loc.start); - } - delete prop.variance; - let typeParameters; - if (this.match(47) && !isAccessor) { - typeParameters = this.flowParseTypeParameterDeclaration(); - if (!this.match(10)) this.unexpected(); - } - const result = super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); - if (typeParameters) { - (result.value || result).typeParameters = typeParameters; - } - return result; - } - parseFunctionParamType(param) { - if (this.eat(17)) { - if (param.type !== "Identifier") { - this.raise(FlowErrors.PatternIsOptional, param); - } - if (this.isThisParam(param)) { - this.raise(FlowErrors.ThisParamMayNotBeOptional, param); - } - param.optional = true; - } - if (this.match(14)) { - param.typeAnnotation = this.flowParseTypeAnnotation(); - } else if (this.isThisParam(param)) { - this.raise(FlowErrors.ThisParamAnnotationRequired, param); - } - if (this.match(29) && this.isThisParam(param)) { - this.raise(FlowErrors.ThisParamNoDefault, param); - } - this.resetEndLocation(param); - return param; - } - parseMaybeDefault(startLoc, left) { - const node = super.parseMaybeDefault(startLoc, left); - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(FlowErrors.TypeBeforeInitializer, node.typeAnnotation); - } - return node; - } - checkImportReflection(node) { - super.checkImportReflection(node); - if (node.module && node.importKind !== "value") { - this.raise(FlowErrors.ImportReflectionHasImportType, node.specifiers[0].loc.start); - } - } - parseImportSpecifierLocal(node, specifier, type) { - specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier(); - node.specifiers.push(this.finishImportSpecifier(specifier, type)); - } - isPotentialImportPhase(isExport) { - if (super.isPotentialImportPhase(isExport)) return true; - if (this.isContextual(130)) { - if (!isExport) return true; - const ch = this.lookaheadCharCode(); - return ch === 123 || ch === 42; - } - return !isExport && this.isContextual(87); - } - applyImportPhase(node, isExport, phase, loc) { - super.applyImportPhase(node, isExport, phase, loc); - if (isExport) { - if (!phase && this.match(65)) { - return; - } - node.exportKind = phase === "type" ? phase : "value"; - } else { - if (phase === "type" && this.match(55)) this.unexpected(); - node.importKind = phase === "type" || phase === "typeof" ? phase : "value"; - } - } - parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { - const firstIdent = specifier.imported; - let specifierTypeKind = null; - if (firstIdent.type === "Identifier") { - if (firstIdent.name === "type") { - specifierTypeKind = "type"; - } else if (firstIdent.name === "typeof") { - specifierTypeKind = "typeof"; - } - } - let isBinding = false; - if (this.isContextual(93) && !this.isLookaheadContextual("as")) { - const as_ident = this.parseIdentifier(true); - if (specifierTypeKind !== null && !tokenIsKeywordOrIdentifier(this.state.type)) { - specifier.imported = as_ident; - specifier.importKind = specifierTypeKind; - specifier.local = cloneIdentifier(as_ident); - } else { - specifier.imported = firstIdent; - specifier.importKind = null; - specifier.local = this.parseIdentifier(); - } - } else { - if (specifierTypeKind !== null && tokenIsKeywordOrIdentifier(this.state.type)) { - specifier.imported = this.parseIdentifier(true); - specifier.importKind = specifierTypeKind; - } else { - if (importedIsString) { - throw this.raise(Errors.ImportBindingIsString, specifier, { - importName: firstIdent.value - }); - } - specifier.imported = firstIdent; - specifier.importKind = null; - } - if (this.eatContextual(93)) { - specifier.local = this.parseIdentifier(); - } else { - isBinding = true; - specifier.local = cloneIdentifier(specifier.imported); - } - } - const specifierIsTypeImport = hasTypeImportKind(specifier); - if (isInTypeOnlyImport && specifierIsTypeImport) { - this.raise(FlowErrors.ImportTypeShorthandOnlyInPureImport, specifier); - } - if (isInTypeOnlyImport || specifierIsTypeImport) { - this.checkReservedType(specifier.local.name, specifier.local.loc.start, true); - } - if (isBinding && !isInTypeOnlyImport && !specifierIsTypeImport) { - this.checkReservedWord(specifier.local.name, specifier.loc.start, true, true); - } - return this.finishImportSpecifier(specifier, "ImportSpecifier"); - } - parseBindingAtom() { - switch (this.state.type) { - case 78: - return this.parseIdentifier(true); - default: - return super.parseBindingAtom(); - } - } - parseFunctionParams(node, isConstructor) { - const kind = node.kind; - if (kind !== "get" && kind !== "set" && this.match(47)) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - super.parseFunctionParams(node, isConstructor); - } - parseVarId(decl, kind) { - super.parseVarId(decl, kind); - if (this.match(14)) { - decl.id.typeAnnotation = this.flowParseTypeAnnotation(); - this.resetEndLocation(decl.id); - } - } - parseAsyncArrowFromCallExpression(node, call) { - if (this.match(14)) { - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - node.returnType = this.flowParseTypeAnnotation(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - } - return super.parseAsyncArrowFromCallExpression(node, call); - } - shouldParseAsyncArrow() { - return this.match(14) || super.shouldParseAsyncArrow(); - } - parseMaybeAssign(refExpressionErrors, afterLeftParse) { - var _jsx; - let state = null; - let jsx; - if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) { - state = this.state.clone(); - jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); - if (!jsx.error) return jsx.node; - const { - context - } = this.state; - const currentContext = context[context.length - 1]; - if (currentContext === types.j_oTag || currentContext === types.j_expr) { - context.pop(); - } - } - if ((_jsx = jsx) != null && _jsx.error || this.match(47)) { - var _jsx2, _jsx3; - state = state || this.state.clone(); - let typeParameters; - const arrow = this.tryParse(abort => { - var _arrowExpression$extr; - typeParameters = this.flowParseTypeParameterDeclaration(); - const arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, () => { - const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse); - this.resetStartLocationFromNode(result, typeParameters); - return result; - }); - if ((_arrowExpression$extr = arrowExpression.extra) != null && _arrowExpression$extr.parenthesized) abort(); - const expr = this.maybeUnwrapTypeCastExpression(arrowExpression); - if (expr.type !== "ArrowFunctionExpression") abort(); - expr.typeParameters = typeParameters; - this.resetStartLocationFromNode(expr, typeParameters); - return arrowExpression; - }, state); - let arrowExpression = null; - if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") { - if (!arrow.error && !arrow.aborted) { - if (arrow.node.async) { - this.raise(FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction, typeParameters); - } - return arrow.node; - } - arrowExpression = arrow.node; - } - if ((_jsx2 = jsx) != null && _jsx2.node) { - this.state = jsx.failState; - return jsx.node; - } - if (arrowExpression) { - this.state = arrow.failState; - return arrowExpression; - } - if ((_jsx3 = jsx) != null && _jsx3.thrown) throw jsx.error; - if (arrow.thrown) throw arrow.error; - throw this.raise(FlowErrors.UnexpectedTokenAfterTypeParameter, typeParameters); - } - return super.parseMaybeAssign(refExpressionErrors, afterLeftParse); - } - parseArrow(node) { - if (this.match(14)) { - const result = this.tryParse(() => { - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - const typeNode = this.startNode(); - [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - if (this.canInsertSemicolon()) this.unexpected(); - if (!this.match(19)) this.unexpected(); - return typeNode; - }); - if (result.thrown) return null; - if (result.error) this.state = result.failState; - node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null; - } - return super.parseArrow(node); - } - shouldParseArrow(params) { - return this.match(14) || super.shouldParseArrow(params); - } - setArrowFunctionParameters(node, params) { - if (this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))) { - node.params = params; - } else { - super.setArrowFunctionParameters(node, params); - } - } - checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { - if (isArrowFunction && this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))) { - return; - } - for (let i = 0; i < node.params.length; i++) { - if (this.isThisParam(node.params[i]) && i > 0) { - this.raise(FlowErrors.ThisParamMustBeFirst, node.params[i]); - } - } - super.checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged); - } - parseParenAndDistinguishExpression(canBeArrow) { - return super.parseParenAndDistinguishExpression(canBeArrow && !this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start))); - } - parseSubscripts(base, startLoc, noCalls) { - if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.includes(startLoc.index)) { - this.next(); - const node = this.startNodeAt(startLoc); - node.callee = base; - node.arguments = super.parseCallExpressionArguments(11); - base = this.finishNode(node, "CallExpression"); - } else if (base.type === "Identifier" && base.name === "async" && this.match(47)) { - const state = this.state.clone(); - const arrow = this.tryParse(abort => this.parseAsyncArrowWithTypeParameters(startLoc) || abort(), state); - if (!arrow.error && !arrow.aborted) return arrow.node; - const result = this.tryParse(() => super.parseSubscripts(base, startLoc, noCalls), state); - if (result.node && !result.error) return result.node; - if (arrow.node) { - this.state = arrow.failState; - return arrow.node; - } - if (result.node) { - this.state = result.failState; - return result.node; - } - throw arrow.error || result.error; - } - return super.parseSubscripts(base, startLoc, noCalls); - } - parseSubscript(base, startLoc, noCalls, subscriptState) { - if (this.match(18) && this.isLookaheadToken_lt()) { - subscriptState.optionalChainMember = true; - if (noCalls) { - subscriptState.stop = true; - return base; - } - this.next(); - const node = this.startNodeAt(startLoc); - node.callee = base; - node.typeArguments = this.flowParseTypeParameterInstantiationInExpression(); - this.expect(10); - node.arguments = this.parseCallExpressionArguments(11); - node.optional = true; - return this.finishCallExpression(node, true); - } else if (!noCalls && this.shouldParseTypes() && (this.match(47) || this.match(51))) { - const node = this.startNodeAt(startLoc); - node.callee = base; - const result = this.tryParse(() => { - node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(); - this.expect(10); - node.arguments = super.parseCallExpressionArguments(11); - if (subscriptState.optionalChainMember) { - node.optional = false; - } - return this.finishCallExpression(node, subscriptState.optionalChainMember); - }); - if (result.node) { - if (result.error) this.state = result.failState; - return result.node; - } - } - return super.parseSubscript(base, startLoc, noCalls, subscriptState); - } - parseNewCallee(node) { - super.parseNewCallee(node); - let targs = null; - if (this.shouldParseTypes() && this.match(47)) { - targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node; - } - node.typeArguments = targs; - } - parseAsyncArrowWithTypeParameters(startLoc) { - const node = this.startNodeAt(startLoc); - this.parseFunctionParams(node, false); - if (!this.parseArrow(node)) return; - return super.parseArrowExpression(node, undefined, true); - } - readToken_mult_modulo(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - if (code === 42 && next === 47 && this.state.hasFlowComment) { - this.state.hasFlowComment = false; - this.state.pos += 2; - this.nextToken(); - return; - } - super.readToken_mult_modulo(code); - } - readToken_pipe_amp(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - if (code === 124 && next === 125) { - this.finishOp(9, 2); - return; - } - super.readToken_pipe_amp(code); - } - parseTopLevel(file, program) { - const fileNode = super.parseTopLevel(file, program); - if (this.state.hasFlowComment) { - this.raise(FlowErrors.UnterminatedFlowComment, this.state.curPosition()); - } - return fileNode; - } - skipBlockComment() { - if (this.hasPlugin("flowComments") && this.skipFlowComment()) { - if (this.state.hasFlowComment) { - throw this.raise(FlowErrors.NestedFlowComment, this.state.startLoc); - } - this.hasFlowCommentCompletion(); - const commentSkip = this.skipFlowComment(); - if (commentSkip) { - this.state.pos += commentSkip; - this.state.hasFlowComment = true; - } - return; - } - return super.skipBlockComment(this.state.hasFlowComment ? "*-/" : "*/"); - } - skipFlowComment() { - const { - pos - } = this.state; - let shiftToFirstNonWhiteSpace = 2; - while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) { - shiftToFirstNonWhiteSpace++; - } - const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); - const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1); - if (ch2 === 58 && ch3 === 58) { - return shiftToFirstNonWhiteSpace + 2; - } - if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") { - return shiftToFirstNonWhiteSpace + 12; - } - if (ch2 === 58 && ch3 !== 58) { - return shiftToFirstNonWhiteSpace; - } - return false; - } - hasFlowCommentCompletion() { - const end = this.input.indexOf("*/", this.state.pos); - if (end === -1) { - throw this.raise(Errors.UnterminatedComment, this.state.curPosition()); - } - } - flowEnumErrorBooleanMemberNotInitialized(loc, { - enumName, - memberName - }) { - this.raise(FlowErrors.EnumBooleanMemberNotInitialized, loc, { - memberName, - enumName - }); - } - flowEnumErrorInvalidMemberInitializer(loc, enumContext) { - return this.raise(!enumContext.explicitType ? FlowErrors.EnumInvalidMemberInitializerUnknownType : enumContext.explicitType === "symbol" ? FlowErrors.EnumInvalidMemberInitializerSymbolType : FlowErrors.EnumInvalidMemberInitializerPrimaryType, loc, enumContext); - } - flowEnumErrorNumberMemberNotInitialized(loc, details) { - this.raise(FlowErrors.EnumNumberMemberNotInitialized, loc, details); - } - flowEnumErrorStringMemberInconsistentlyInitialized(node, details) { - this.raise(FlowErrors.EnumStringMemberInconsistentlyInitialized, node, details); - } - flowEnumMemberInit() { - const startLoc = this.state.startLoc; - const endOfInit = () => this.match(12) || this.match(8); - switch (this.state.type) { - case 135: - { - const literal = this.parseNumericLiteral(this.state.value); - if (endOfInit()) { - return { - type: "number", - loc: literal.loc.start, - value: literal - }; - } - return { - type: "invalid", - loc: startLoc - }; - } - case 134: - { - const literal = this.parseStringLiteral(this.state.value); - if (endOfInit()) { - return { - type: "string", - loc: literal.loc.start, - value: literal - }; - } - return { - type: "invalid", - loc: startLoc - }; - } - case 85: - case 86: - { - const literal = this.parseBooleanLiteral(this.match(85)); - if (endOfInit()) { - return { - type: "boolean", - loc: literal.loc.start, - value: literal - }; - } - return { - type: "invalid", - loc: startLoc - }; - } - default: - return { - type: "invalid", - loc: startLoc - }; - } - } - flowEnumMemberRaw() { - const loc = this.state.startLoc; - const id = this.parseIdentifier(true); - const init = this.eat(29) ? this.flowEnumMemberInit() : { - type: "none", - loc - }; - return { - id, - init - }; - } - flowEnumCheckExplicitTypeMismatch(loc, context, expectedType) { - const { - explicitType - } = context; - if (explicitType === null) { - return; - } - if (explicitType !== expectedType) { - this.flowEnumErrorInvalidMemberInitializer(loc, context); - } - } - flowEnumMembers({ - enumName, - explicitType - }) { - const seenNames = new Set(); - const members = { - booleanMembers: [], - numberMembers: [], - stringMembers: [], - defaultedMembers: [] - }; - let hasUnknownMembers = false; - while (!this.match(8)) { - if (this.eat(21)) { - hasUnknownMembers = true; - break; - } - const memberNode = this.startNode(); - const { - id, - init - } = this.flowEnumMemberRaw(); - const memberName = id.name; - if (memberName === "") { - continue; - } - if (/^[a-z]/.test(memberName)) { - this.raise(FlowErrors.EnumInvalidMemberName, id, { - memberName, - suggestion: memberName[0].toUpperCase() + memberName.slice(1), - enumName - }); - } - if (seenNames.has(memberName)) { - this.raise(FlowErrors.EnumDuplicateMemberName, id, { - memberName, - enumName - }); - } - seenNames.add(memberName); - const context = { - enumName, - explicitType, - memberName - }; - memberNode.id = id; - switch (init.type) { - case "boolean": - { - this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "boolean"); - memberNode.init = init.value; - members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember")); - break; - } - case "number": - { - this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "number"); - memberNode.init = init.value; - members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember")); - break; - } - case "string": - { - this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "string"); - memberNode.init = init.value; - members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember")); - break; - } - case "invalid": - { - throw this.flowEnumErrorInvalidMemberInitializer(init.loc, context); - } - case "none": - { - switch (explicitType) { - case "boolean": - this.flowEnumErrorBooleanMemberNotInitialized(init.loc, context); - break; - case "number": - this.flowEnumErrorNumberMemberNotInitialized(init.loc, context); - break; - default: - members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember")); - } - } - } - if (!this.match(8)) { - this.expect(12); - } - } - return { - members, - hasUnknownMembers - }; - } - flowEnumStringMembers(initializedMembers, defaultedMembers, { - enumName - }) { - if (initializedMembers.length === 0) { - return defaultedMembers; - } else if (defaultedMembers.length === 0) { - return initializedMembers; - } else if (defaultedMembers.length > initializedMembers.length) { - for (const member of initializedMembers) { - this.flowEnumErrorStringMemberInconsistentlyInitialized(member, { - enumName - }); - } - return defaultedMembers; - } else { - for (const member of defaultedMembers) { - this.flowEnumErrorStringMemberInconsistentlyInitialized(member, { - enumName - }); - } - return initializedMembers; - } - } - flowEnumParseExplicitType({ - enumName - }) { - if (!this.eatContextual(102)) return null; - if (!tokenIsIdentifier(this.state.type)) { - throw this.raise(FlowErrors.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, { - enumName - }); - } - const { - value - } = this.state; - this.next(); - if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") { - this.raise(FlowErrors.EnumInvalidExplicitType, this.state.startLoc, { - enumName, - invalidEnumType: value - }); - } - return value; - } - flowEnumBody(node, id) { - const enumName = id.name; - const nameLoc = id.loc.start; - const explicitType = this.flowEnumParseExplicitType({ - enumName - }); - this.expect(5); - const { - members, - hasUnknownMembers - } = this.flowEnumMembers({ - enumName, - explicitType - }); - node.hasUnknownMembers = hasUnknownMembers; - switch (explicitType) { - case "boolean": - node.explicitType = true; - node.members = members.booleanMembers; - this.expect(8); - return this.finishNode(node, "EnumBooleanBody"); - case "number": - node.explicitType = true; - node.members = members.numberMembers; - this.expect(8); - return this.finishNode(node, "EnumNumberBody"); - case "string": - node.explicitType = true; - node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, { - enumName - }); - this.expect(8); - return this.finishNode(node, "EnumStringBody"); - case "symbol": - node.members = members.defaultedMembers; - this.expect(8); - return this.finishNode(node, "EnumSymbolBody"); - default: - { - const empty = () => { - node.members = []; - this.expect(8); - return this.finishNode(node, "EnumStringBody"); - }; - node.explicitType = false; - const boolsLen = members.booleanMembers.length; - const numsLen = members.numberMembers.length; - const strsLen = members.stringMembers.length; - const defaultedLen = members.defaultedMembers.length; - if (!boolsLen && !numsLen && !strsLen && !defaultedLen) { - return empty(); - } else if (!boolsLen && !numsLen) { - node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, { - enumName - }); - this.expect(8); - return this.finishNode(node, "EnumStringBody"); - } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) { - for (const member of members.defaultedMembers) { - this.flowEnumErrorBooleanMemberNotInitialized(member.loc.start, { - enumName, - memberName: member.id.name - }); - } - node.members = members.booleanMembers; - this.expect(8); - return this.finishNode(node, "EnumBooleanBody"); - } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) { - for (const member of members.defaultedMembers) { - this.flowEnumErrorNumberMemberNotInitialized(member.loc.start, { - enumName, - memberName: member.id.name - }); - } - node.members = members.numberMembers; - this.expect(8); - return this.finishNode(node, "EnumNumberBody"); - } else { - this.raise(FlowErrors.EnumInconsistentMemberValues, nameLoc, { - enumName - }); - return empty(); - } - } - } - } - flowParseEnumDeclaration(node) { - const id = this.parseIdentifier(); - node.id = id; - node.body = this.flowEnumBody(this.startNode(), id); - return this.finishNode(node, "EnumDeclaration"); - } - jsxParseOpeningElementAfterName(node) { - if (this.shouldParseTypes()) { - if (this.match(47) || this.match(51)) { - node.typeArguments = this.flowParseTypeParameterInstantiationInExpression(); - } - } - return super.jsxParseOpeningElementAfterName(node); - } - isLookaheadToken_lt() { - const next = this.nextTokenStart(); - if (this.input.charCodeAt(next) === 60) { - const afterNext = this.input.charCodeAt(next + 1); - return afterNext !== 60 && afterNext !== 61; - } - return false; - } - reScan_lt_gt() { - const { - type - } = this.state; - if (type === 47) { - this.state.pos -= 1; - this.readToken_lt(); - } else if (type === 48) { - this.state.pos -= 1; - this.readToken_gt(); - } - } - reScan_lt() { - const { - type - } = this.state; - if (type === 51) { - this.state.pos -= 2; - this.finishOp(47, 1); - return 47; - } - return type; - } - maybeUnwrapTypeCastExpression(node) { - return node.type === "TypeCastExpression" ? node.expression : node; - } -}; -const entities = { - __proto__: null, - quot: "\u0022", - amp: "&", - apos: "\u0027", - lt: "<", - gt: ">", - nbsp: "\u00A0", - iexcl: "\u00A1", - cent: "\u00A2", - pound: "\u00A3", - curren: "\u00A4", - yen: "\u00A5", - brvbar: "\u00A6", - sect: "\u00A7", - uml: "\u00A8", - copy: "\u00A9", - ordf: "\u00AA", - laquo: "\u00AB", - not: "\u00AC", - shy: "\u00AD", - reg: "\u00AE", - macr: "\u00AF", - deg: "\u00B0", - plusmn: "\u00B1", - sup2: "\u00B2", - sup3: "\u00B3", - acute: "\u00B4", - micro: "\u00B5", - para: "\u00B6", - middot: "\u00B7", - cedil: "\u00B8", - sup1: "\u00B9", - ordm: "\u00BA", - raquo: "\u00BB", - frac14: "\u00BC", - frac12: "\u00BD", - frac34: "\u00BE", - iquest: "\u00BF", - Agrave: "\u00C0", - Aacute: "\u00C1", - Acirc: "\u00C2", - Atilde: "\u00C3", - Auml: "\u00C4", - Aring: "\u00C5", - AElig: "\u00C6", - Ccedil: "\u00C7", - Egrave: "\u00C8", - Eacute: "\u00C9", - Ecirc: "\u00CA", - Euml: "\u00CB", - Igrave: "\u00CC", - Iacute: "\u00CD", - Icirc: "\u00CE", - Iuml: "\u00CF", - ETH: "\u00D0", - Ntilde: "\u00D1", - Ograve: "\u00D2", - Oacute: "\u00D3", - Ocirc: "\u00D4", - Otilde: "\u00D5", - Ouml: "\u00D6", - times: "\u00D7", - Oslash: "\u00D8", - Ugrave: "\u00D9", - Uacute: "\u00DA", - Ucirc: "\u00DB", - Uuml: "\u00DC", - Yacute: "\u00DD", - THORN: "\u00DE", - szlig: "\u00DF", - agrave: "\u00E0", - aacute: "\u00E1", - acirc: "\u00E2", - atilde: "\u00E3", - auml: "\u00E4", - aring: "\u00E5", - aelig: "\u00E6", - ccedil: "\u00E7", - egrave: "\u00E8", - eacute: "\u00E9", - ecirc: "\u00EA", - euml: "\u00EB", - igrave: "\u00EC", - iacute: "\u00ED", - icirc: "\u00EE", - iuml: "\u00EF", - eth: "\u00F0", - ntilde: "\u00F1", - ograve: "\u00F2", - oacute: "\u00F3", - ocirc: "\u00F4", - otilde: "\u00F5", - ouml: "\u00F6", - divide: "\u00F7", - oslash: "\u00F8", - ugrave: "\u00F9", - uacute: "\u00FA", - ucirc: "\u00FB", - uuml: "\u00FC", - yacute: "\u00FD", - thorn: "\u00FE", - yuml: "\u00FF", - OElig: "\u0152", - oelig: "\u0153", - Scaron: "\u0160", - scaron: "\u0161", - Yuml: "\u0178", - fnof: "\u0192", - circ: "\u02C6", - tilde: "\u02DC", - Alpha: "\u0391", - Beta: "\u0392", - Gamma: "\u0393", - Delta: "\u0394", - Epsilon: "\u0395", - Zeta: "\u0396", - Eta: "\u0397", - Theta: "\u0398", - Iota: "\u0399", - Kappa: "\u039A", - Lambda: "\u039B", - Mu: "\u039C", - Nu: "\u039D", - Xi: "\u039E", - Omicron: "\u039F", - Pi: "\u03A0", - Rho: "\u03A1", - Sigma: "\u03A3", - Tau: "\u03A4", - Upsilon: "\u03A5", - Phi: "\u03A6", - Chi: "\u03A7", - Psi: "\u03A8", - Omega: "\u03A9", - alpha: "\u03B1", - beta: "\u03B2", - gamma: "\u03B3", - delta: "\u03B4", - epsilon: "\u03B5", - zeta: "\u03B6", - eta: "\u03B7", - theta: "\u03B8", - iota: "\u03B9", - kappa: "\u03BA", - lambda: "\u03BB", - mu: "\u03BC", - nu: "\u03BD", - xi: "\u03BE", - omicron: "\u03BF", - pi: "\u03C0", - rho: "\u03C1", - sigmaf: "\u03C2", - sigma: "\u03C3", - tau: "\u03C4", - upsilon: "\u03C5", - phi: "\u03C6", - chi: "\u03C7", - psi: "\u03C8", - omega: "\u03C9", - thetasym: "\u03D1", - upsih: "\u03D2", - piv: "\u03D6", - ensp: "\u2002", - emsp: "\u2003", - thinsp: "\u2009", - zwnj: "\u200C", - zwj: "\u200D", - lrm: "\u200E", - rlm: "\u200F", - ndash: "\u2013", - mdash: "\u2014", - lsquo: "\u2018", - rsquo: "\u2019", - sbquo: "\u201A", - ldquo: "\u201C", - rdquo: "\u201D", - bdquo: "\u201E", - dagger: "\u2020", - Dagger: "\u2021", - bull: "\u2022", - hellip: "\u2026", - permil: "\u2030", - prime: "\u2032", - Prime: "\u2033", - lsaquo: "\u2039", - rsaquo: "\u203A", - oline: "\u203E", - frasl: "\u2044", - euro: "\u20AC", - image: "\u2111", - weierp: "\u2118", - real: "\u211C", - trade: "\u2122", - alefsym: "\u2135", - larr: "\u2190", - uarr: "\u2191", - rarr: "\u2192", - darr: "\u2193", - harr: "\u2194", - crarr: "\u21B5", - lArr: "\u21D0", - uArr: "\u21D1", - rArr: "\u21D2", - dArr: "\u21D3", - hArr: "\u21D4", - forall: "\u2200", - part: "\u2202", - exist: "\u2203", - empty: "\u2205", - nabla: "\u2207", - isin: "\u2208", - notin: "\u2209", - ni: "\u220B", - prod: "\u220F", - sum: "\u2211", - minus: "\u2212", - lowast: "\u2217", - radic: "\u221A", - prop: "\u221D", - infin: "\u221E", - ang: "\u2220", - and: "\u2227", - or: "\u2228", - cap: "\u2229", - cup: "\u222A", - int: "\u222B", - there4: "\u2234", - sim: "\u223C", - cong: "\u2245", - asymp: "\u2248", - ne: "\u2260", - equiv: "\u2261", - le: "\u2264", - ge: "\u2265", - sub: "\u2282", - sup: "\u2283", - nsub: "\u2284", - sube: "\u2286", - supe: "\u2287", - oplus: "\u2295", - otimes: "\u2297", - perp: "\u22A5", - sdot: "\u22C5", - lceil: "\u2308", - rceil: "\u2309", - lfloor: "\u230A", - rfloor: "\u230B", - lang: "\u2329", - rang: "\u232A", - loz: "\u25CA", - spades: "\u2660", - clubs: "\u2663", - hearts: "\u2665", - diams: "\u2666" -}; -const JsxErrors = ParseErrorEnum`jsx`({ - AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.", - MissingClosingTagElement: ({ - openingTagName - }) => `Expected corresponding JSX closing tag for <${openingTagName}>.`, - MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.", - UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?", - UnexpectedToken: ({ - unexpected, - HTMLEntity - }) => `Unexpected token \`${unexpected}\`. Did you mean \`${HTMLEntity}\` or \`{'${unexpected}'}\`?`, - UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.", - UnterminatedJsxContent: "Unterminated JSX contents.", - UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?" -}); -function isFragment(object) { - return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; -} -function getQualifiedJSXName(object) { - if (object.type === "JSXIdentifier") { - return object.name; - } - if (object.type === "JSXNamespacedName") { - return object.namespace.name + ":" + object.name.name; - } - if (object.type === "JSXMemberExpression") { - return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); - } - throw new Error("Node had unexpected type: " + object.type); -} -var jsx = superClass => class JSXParserMixin extends superClass { - jsxReadToken() { - let out = ""; - let chunkStart = this.state.pos; - for (;;) { - if (this.state.pos >= this.length) { - throw this.raise(JsxErrors.UnterminatedJsxContent, this.state.startLoc); - } - const ch = this.input.charCodeAt(this.state.pos); - switch (ch) { - case 60: - case 123: - if (this.state.pos === this.state.start) { - if (ch === 60 && this.state.canStartJSXElement) { - ++this.state.pos; - this.finishToken(143); - } else { - super.getTokenFromCode(ch); - } - return; - } - out += this.input.slice(chunkStart, this.state.pos); - this.finishToken(142, out); - return; - case 38: - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - break; - case 62: - case 125: - default: - if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(true); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - } - } - jsxReadNewLine(normalizeCRLF) { - const ch = this.input.charCodeAt(this.state.pos); - let out; - ++this.state.pos; - if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - out = normalizeCRLF ? "\n" : "\r\n"; - } else { - out = String.fromCharCode(ch); - } - ++this.state.curLine; - this.state.lineStart = this.state.pos; - return out; - } - jsxReadString(quote) { - let out = ""; - let chunkStart = ++this.state.pos; - for (;;) { - if (this.state.pos >= this.length) { - throw this.raise(Errors.UnterminatedString, this.state.startLoc); - } - const ch = this.input.charCodeAt(this.state.pos); - if (ch === quote) break; - if (ch === 38) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(false); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - out += this.input.slice(chunkStart, this.state.pos++); - this.finishToken(134, out); - } - jsxReadEntity() { - const startPos = ++this.state.pos; - if (this.codePointAtPos(this.state.pos) === 35) { - ++this.state.pos; - let radix = 10; - if (this.codePointAtPos(this.state.pos) === 120) { - radix = 16; - ++this.state.pos; - } - const codePoint = this.readInt(radix, undefined, false, "bail"); - if (codePoint !== null && this.codePointAtPos(this.state.pos) === 59) { - ++this.state.pos; - return String.fromCodePoint(codePoint); - } - } else { - let count = 0; - let semi = false; - while (count++ < 10 && this.state.pos < this.length && !(semi = this.codePointAtPos(this.state.pos) === 59)) { - ++this.state.pos; - } - if (semi) { - const desc = this.input.slice(startPos, this.state.pos); - const entity = entities[desc]; - ++this.state.pos; - if (entity) { - return entity; - } - } - } - this.state.pos = startPos; - return "&"; - } - jsxReadWord() { - let ch; - const start = this.state.pos; - do { - ch = this.input.charCodeAt(++this.state.pos); - } while (isIdentifierChar(ch) || ch === 45); - this.finishToken(141, this.input.slice(start, this.state.pos)); - } - jsxParseIdentifier() { - const node = this.startNode(); - if (this.match(141)) { - node.name = this.state.value; - } else if (tokenIsKeyword(this.state.type)) { - node.name = tokenLabelName(this.state.type); - } else { - this.unexpected(); - } - this.next(); - return this.finishNode(node, "JSXIdentifier"); - } - jsxParseNamespacedName() { - const startLoc = this.state.startLoc; - const name = this.jsxParseIdentifier(); - if (!this.eat(14)) return name; - const node = this.startNodeAt(startLoc); - node.namespace = name; - node.name = this.jsxParseIdentifier(); - return this.finishNode(node, "JSXNamespacedName"); - } - jsxParseElementName() { - const startLoc = this.state.startLoc; - let node = this.jsxParseNamespacedName(); - if (node.type === "JSXNamespacedName") { - return node; - } - while (this.eat(16)) { - const newNode = this.startNodeAt(startLoc); - newNode.object = node; - newNode.property = this.jsxParseIdentifier(); - node = this.finishNode(newNode, "JSXMemberExpression"); - } - return node; - } - jsxParseAttributeValue() { - let node; - switch (this.state.type) { - case 5: - node = this.startNode(); - this.setContext(types.brace); - this.next(); - node = this.jsxParseExpressionContainer(node, types.j_oTag); - if (node.expression.type === "JSXEmptyExpression") { - this.raise(JsxErrors.AttributeIsEmpty, node); - } - return node; - case 143: - case 134: - return this.parseExprAtom(); - default: - throw this.raise(JsxErrors.UnsupportedJsxValue, this.state.startLoc); - } - } - jsxParseEmptyExpression() { - const node = this.startNodeAt(this.state.lastTokEndLoc); - return this.finishNodeAt(node, "JSXEmptyExpression", this.state.startLoc); - } - jsxParseSpreadChild(node) { - this.next(); - node.expression = this.parseExpression(); - this.setContext(types.j_expr); - this.state.canStartJSXElement = true; - this.expect(8); - return this.finishNode(node, "JSXSpreadChild"); - } - jsxParseExpressionContainer(node, previousContext) { - if (this.match(8)) { - node.expression = this.jsxParseEmptyExpression(); - } else { - const expression = this.parseExpression(); - node.expression = expression; - } - this.setContext(previousContext); - this.state.canStartJSXElement = true; - this.expect(8); - return this.finishNode(node, "JSXExpressionContainer"); - } - jsxParseAttribute() { - const node = this.startNode(); - if (this.match(5)) { - this.setContext(types.brace); - this.next(); - this.expect(21); - node.argument = this.parseMaybeAssignAllowIn(); - this.setContext(types.j_oTag); - this.state.canStartJSXElement = true; - this.expect(8); - return this.finishNode(node, "JSXSpreadAttribute"); - } - node.name = this.jsxParseNamespacedName(); - node.value = this.eat(29) ? this.jsxParseAttributeValue() : null; - return this.finishNode(node, "JSXAttribute"); - } - jsxParseOpeningElementAt(startLoc) { - const node = this.startNodeAt(startLoc); - if (this.eat(144)) { - return this.finishNode(node, "JSXOpeningFragment"); - } - node.name = this.jsxParseElementName(); - return this.jsxParseOpeningElementAfterName(node); - } - jsxParseOpeningElementAfterName(node) { - const attributes = []; - while (!this.match(56) && !this.match(144)) { - attributes.push(this.jsxParseAttribute()); - } - node.attributes = attributes; - node.selfClosing = this.eat(56); - this.expect(144); - return this.finishNode(node, "JSXOpeningElement"); - } - jsxParseClosingElementAt(startLoc) { - const node = this.startNodeAt(startLoc); - if (this.eat(144)) { - return this.finishNode(node, "JSXClosingFragment"); - } - node.name = this.jsxParseElementName(); - this.expect(144); - return this.finishNode(node, "JSXClosingElement"); - } - jsxParseElementAt(startLoc) { - const node = this.startNodeAt(startLoc); - const children = []; - const openingElement = this.jsxParseOpeningElementAt(startLoc); - let closingElement = null; - if (!openingElement.selfClosing) { - contents: for (;;) { - switch (this.state.type) { - case 143: - startLoc = this.state.startLoc; - this.next(); - if (this.eat(56)) { - closingElement = this.jsxParseClosingElementAt(startLoc); - break contents; - } - children.push(this.jsxParseElementAt(startLoc)); - break; - case 142: - children.push(this.parseLiteral(this.state.value, "JSXText")); - break; - case 5: - { - const node = this.startNode(); - this.setContext(types.brace); - this.next(); - if (this.match(21)) { - children.push(this.jsxParseSpreadChild(node)); - } else { - children.push(this.jsxParseExpressionContainer(node, types.j_expr)); - } - break; - } - default: - this.unexpected(); - } - } - if (isFragment(openingElement) && !isFragment(closingElement) && closingElement !== null) { - this.raise(JsxErrors.MissingClosingTagFragment, closingElement); - } else if (!isFragment(openingElement) && isFragment(closingElement)) { - this.raise(JsxErrors.MissingClosingTagElement, closingElement, { - openingTagName: getQualifiedJSXName(openingElement.name) - }); - } else if (!isFragment(openingElement) && !isFragment(closingElement)) { - if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { - this.raise(JsxErrors.MissingClosingTagElement, closingElement, { - openingTagName: getQualifiedJSXName(openingElement.name) - }); - } - } - } - if (isFragment(openingElement)) { - node.openingFragment = openingElement; - node.closingFragment = closingElement; - } else { - node.openingElement = openingElement; - node.closingElement = closingElement; - } - node.children = children; - if (this.match(47)) { - throw this.raise(JsxErrors.UnwrappedAdjacentJSXElements, this.state.startLoc); - } - return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); - } - jsxParseElement() { - const startLoc = this.state.startLoc; - this.next(); - return this.jsxParseElementAt(startLoc); - } - setContext(newContext) { - const { - context - } = this.state; - context[context.length - 1] = newContext; - } - parseExprAtom(refExpressionErrors) { - if (this.match(143)) { - return this.jsxParseElement(); - } else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) { - this.replaceToken(143); - return this.jsxParseElement(); - } else { - return super.parseExprAtom(refExpressionErrors); - } - } - skipSpace() { - const curContext = this.curContext(); - if (!curContext.preserveSpace) super.skipSpace(); - } - getTokenFromCode(code) { - const context = this.curContext(); - if (context === types.j_expr) { - this.jsxReadToken(); - return; - } - if (context === types.j_oTag || context === types.j_cTag) { - if (isIdentifierStart(code)) { - this.jsxReadWord(); - return; - } - if (code === 62) { - ++this.state.pos; - this.finishToken(144); - return; - } - if ((code === 34 || code === 39) && context === types.j_oTag) { - this.jsxReadString(code); - return; - } - } - if (code === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) { - ++this.state.pos; - this.finishToken(143); - return; - } - super.getTokenFromCode(code); - } - updateContext(prevType) { - const { - context, - type - } = this.state; - if (type === 56 && prevType === 143) { - context.splice(-2, 2, types.j_cTag); - this.state.canStartJSXElement = false; - } else if (type === 143) { - context.push(types.j_oTag); - } else if (type === 144) { - const out = context[context.length - 1]; - if (out === types.j_oTag && prevType === 56 || out === types.j_cTag) { - context.pop(); - this.state.canStartJSXElement = context[context.length - 1] === types.j_expr; - } else { - this.setContext(types.j_expr); - this.state.canStartJSXElement = true; - } - } else { - this.state.canStartJSXElement = tokenComesBeforeExpression(type); - } - } -}; -class TypeScriptScope extends Scope { - constructor(...args) { - super(...args); - this.tsNames = new Map(); - } -} -class TypeScriptScopeHandler extends ScopeHandler { - constructor(...args) { - super(...args); - this.importsStack = []; - } - createScope(flags) { - this.importsStack.push(new Set()); - return new TypeScriptScope(flags); - } - enter(flags) { - if (flags === 256) { - this.importsStack.push(new Set()); - } - super.enter(flags); - } - exit() { - const flags = super.exit(); - if (flags === 256) { - this.importsStack.pop(); - } - return flags; - } - hasImport(name, allowShadow) { - const len = this.importsStack.length; - if (this.importsStack[len - 1].has(name)) { - return true; - } - if (!allowShadow && len > 1) { - for (let i = 0; i < len - 1; i++) { - if (this.importsStack[i].has(name)) return true; - } - } - return false; - } - declareName(name, bindingType, loc) { - if (bindingType & 4096) { - if (this.hasImport(name, true)) { - this.parser.raise(Errors.VarRedeclaration, loc, { - identifierName: name - }); - } - this.importsStack[this.importsStack.length - 1].add(name); - return; - } - const scope = this.currentScope(); - let type = scope.tsNames.get(name) || 0; - if (bindingType & 1024) { - this.maybeExportDefined(scope, name); - scope.tsNames.set(name, type | 16); - return; - } - super.declareName(name, bindingType, loc); - if (bindingType & 2) { - if (!(bindingType & 1)) { - this.checkRedeclarationInScope(scope, name, bindingType, loc); - this.maybeExportDefined(scope, name); - } - type = type | 1; - } - if (bindingType & 256) { - type = type | 2; - } - if (bindingType & 512) { - type = type | 4; - } - if (bindingType & 128) { - type = type | 8; - } - if (type) scope.tsNames.set(name, type); - } - isRedeclaredInScope(scope, name, bindingType) { - const type = scope.tsNames.get(name); - if ((type & 2) > 0) { - if (bindingType & 256) { - const isConst = !!(bindingType & 512); - const wasConst = (type & 4) > 0; - return isConst !== wasConst; - } - return true; - } - if (bindingType & 128 && (type & 8) > 0) { - if (scope.names.get(name) & 2) { - return !!(bindingType & 1); - } else { - return false; - } - } - if (bindingType & 2 && (type & 1) > 0) { - return true; - } - return super.isRedeclaredInScope(scope, name, bindingType); - } - checkLocalExport(id) { - const { - name - } = id; - if (this.hasImport(name)) return; - const len = this.scopeStack.length; - for (let i = len - 1; i >= 0; i--) { - const scope = this.scopeStack[i]; - const type = scope.tsNames.get(name); - if ((type & 1) > 0 || (type & 16) > 0) { - return; - } - } - super.checkLocalExport(id); - } -} -const unwrapParenthesizedExpression = node => { - return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node; -}; -class LValParser extends NodeUtils { - toAssignable(node, isLHS = false) { - var _node$extra, _node$extra3; - let parenthesized = undefined; - if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) { - parenthesized = unwrapParenthesizedExpression(node); - if (isLHS) { - if (parenthesized.type === "Identifier") { - this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, node); - } else if (parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized)) { - this.raise(Errors.InvalidParenthesizedAssignment, node); - } - } else { - this.raise(Errors.InvalidParenthesizedAssignment, node); - } - } - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - case "RestElement": - break; - case "ObjectExpression": - node.type = "ObjectPattern"; - for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) { - var _node$extra2; - const prop = node.properties[i]; - const isLast = i === last; - this.toAssignableObjectExpressionProp(prop, isLast, isLHS); - if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingCommaLoc) { - this.raise(Errors.RestTrailingComma, node.extra.trailingCommaLoc); - } - } - break; - case "ObjectProperty": - { - const { - key, - value - } = node; - if (this.isPrivateName(key)) { - this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); - } - this.toAssignable(value, isLHS); - break; - } - case "SpreadElement": - { - throw new Error("Internal @babel/parser error (this is a bug, please report it)." + " SpreadElement should be converted by .toAssignable's caller."); - } - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingCommaLoc, isLHS); - break; - case "AssignmentExpression": - if (node.operator !== "=") { - this.raise(Errors.MissingEqInAssignment, node.left.loc.end); - } - node.type = "AssignmentPattern"; - delete node.operator; - this.toAssignable(node.left, isLHS); - break; - case "ParenthesizedExpression": - this.toAssignable(parenthesized, isLHS); - break; - } - } - toAssignableObjectExpressionProp(prop, isLast, isLHS) { - if (prop.type === "ObjectMethod") { - this.raise(prop.kind === "get" || prop.kind === "set" ? Errors.PatternHasAccessor : Errors.PatternHasMethod, prop.key); - } else if (prop.type === "SpreadElement") { - prop.type = "RestElement"; - const arg = prop.argument; - this.checkToRestConversion(arg, false); - this.toAssignable(arg, isLHS); - if (!isLast) { - this.raise(Errors.RestTrailingComma, prop); - } - } else { - this.toAssignable(prop, isLHS); - } - } - toAssignableList(exprList, trailingCommaLoc, isLHS) { - const end = exprList.length - 1; - for (let i = 0; i <= end; i++) { - const elt = exprList[i]; - if (!elt) continue; - if (elt.type === "SpreadElement") { - elt.type = "RestElement"; - const arg = elt.argument; - this.checkToRestConversion(arg, true); - this.toAssignable(arg, isLHS); - } else { - this.toAssignable(elt, isLHS); - } - if (elt.type === "RestElement") { - if (i < end) { - this.raise(Errors.RestTrailingComma, elt); - } else if (trailingCommaLoc) { - this.raise(Errors.RestTrailingComma, trailingCommaLoc); - } - } - } - } - isAssignable(node, isBinding) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - case "RestElement": - return true; - case "ObjectExpression": - { - const last = node.properties.length - 1; - return node.properties.every((prop, i) => { - return prop.type !== "ObjectMethod" && (i === last || prop.type !== "SpreadElement") && this.isAssignable(prop); - }); - } - case "ObjectProperty": - return this.isAssignable(node.value); - case "SpreadElement": - return this.isAssignable(node.argument); - case "ArrayExpression": - return node.elements.every(element => element === null || this.isAssignable(element)); - case "AssignmentExpression": - return node.operator === "="; - case "ParenthesizedExpression": - return this.isAssignable(node.expression); - case "MemberExpression": - case "OptionalMemberExpression": - return !isBinding; - default: - return false; - } - } - toReferencedList(exprList, isParenthesizedExpr) { - return exprList; - } - toReferencedListDeep(exprList, isParenthesizedExpr) { - this.toReferencedList(exprList, isParenthesizedExpr); - for (const expr of exprList) { - if ((expr == null ? void 0 : expr.type) === "ArrayExpression") { - this.toReferencedListDeep(expr.elements); - } - } - } - parseSpread(refExpressionErrors) { - const node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, undefined); - return this.finishNode(node, "SpreadElement"); - } - parseRestBinding() { - const node = this.startNode(); - this.next(); - node.argument = this.parseBindingAtom(); - return this.finishNode(node, "RestElement"); - } - parseBindingAtom() { - switch (this.state.type) { - case 0: - { - const node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(3, 93, 1); - return this.finishNode(node, "ArrayPattern"); - } - case 5: - return this.parseObjectLike(8, true); - } - return this.parseIdentifier(); - } - parseBindingList(close, closeCharCode, flags) { - const allowEmpty = flags & 1; - const elts = []; - let first = true; - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(12); - } - if (allowEmpty && this.match(12)) { - elts.push(null); - } else if (this.eat(close)) { - break; - } else if (this.match(21)) { - let rest = this.parseRestBinding(); - if (this.hasPlugin("flow") || flags & 2) { - rest = this.parseFunctionParamType(rest); - } - elts.push(rest); - if (!this.checkCommaAfterRest(closeCharCode)) { - this.expect(close); - break; - } - } else { - const decorators = []; - if (this.match(26) && this.hasPlugin("decorators")) { - this.raise(Errors.UnsupportedParameterDecorator, this.state.startLoc); - } - while (this.match(26)) { - decorators.push(this.parseDecorator()); - } - elts.push(this.parseAssignableListItem(flags, decorators)); - } - } - return elts; - } - parseBindingRestProperty(prop) { - this.next(); - prop.argument = this.parseIdentifier(); - this.checkCommaAfterRest(125); - return this.finishNode(prop, "RestElement"); - } - parseBindingProperty() { - const { - type, - startLoc - } = this.state; - if (type === 21) { - return this.parseBindingRestProperty(this.startNode()); - } - const prop = this.startNode(); - if (type === 139) { - this.expectPlugin("destructuringPrivate", startLoc); - this.classScope.usePrivateName(this.state.value, startLoc); - prop.key = this.parsePrivateName(); - } else { - this.parsePropertyName(prop); - } - prop.method = false; - return this.parseObjPropValue(prop, startLoc, false, false, true, false); - } - parseAssignableListItem(flags, decorators) { - const left = this.parseMaybeDefault(); - if (this.hasPlugin("flow") || flags & 2) { - this.parseFunctionParamType(left); - } - const elt = this.parseMaybeDefault(left.loc.start, left); - if (decorators.length) { - left.decorators = decorators; - } - return elt; - } - parseFunctionParamType(param) { - return param; - } - parseMaybeDefault(startLoc, left) { - var _startLoc, _left; - (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc; - left = (_left = left) != null ? _left : this.parseBindingAtom(); - if (!this.eat(29)) return left; - const node = this.startNodeAt(startLoc); - node.left = left; - node.right = this.parseMaybeAssignAllowIn(); - return this.finishNode(node, "AssignmentPattern"); - } - isValidLVal(type, isUnparenthesizedInAssign, binding) { - switch (type) { - case "AssignmentPattern": - return "left"; - case "RestElement": - return "argument"; - case "ObjectProperty": - return "value"; - case "ParenthesizedExpression": - return "expression"; - case "ArrayPattern": - return "elements"; - case "ObjectPattern": - return "properties"; - } - return false; - } - isOptionalMemberExpression(expression) { - return expression.type === "OptionalMemberExpression"; - } - checkLVal(expression, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false) { - var _expression$extra; - const type = expression.type; - if (this.isObjectMethod(expression)) return; - const isOptionalMemberExpression = this.isOptionalMemberExpression(expression); - if (isOptionalMemberExpression || type === "MemberExpression") { - if (isOptionalMemberExpression) { - this.expectPlugin("optionalChainingAssign", expression.loc.start); - if (ancestor.type !== "AssignmentExpression") { - this.raise(Errors.InvalidLhsOptionalChaining, expression, { - ancestor - }); - } - } - if (binding !== 64) { - this.raise(Errors.InvalidPropertyBindingPattern, expression); - } - return; - } - if (type === "Identifier") { - this.checkIdentifier(expression, binding, strictModeChanged); - const { - name - } = expression; - if (checkClashes) { - if (checkClashes.has(name)) { - this.raise(Errors.ParamDupe, expression); - } else { - checkClashes.add(name); - } - } - return; - } - const validity = this.isValidLVal(type, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding); - if (validity === true) return; - if (validity === false) { - const ParseErrorClass = binding === 64 ? Errors.InvalidLhs : Errors.InvalidLhsBinding; - this.raise(ParseErrorClass, expression, { - ancestor - }); - return; - } - let key, isParenthesizedExpression; - if (typeof validity === "string") { - key = validity; - isParenthesizedExpression = type === "ParenthesizedExpression"; - } else { - [key, isParenthesizedExpression] = validity; - } - const nextAncestor = type === "ArrayPattern" || type === "ObjectPattern" ? { - type - } : ancestor; - const val = expression[key]; - if (Array.isArray(val)) { - for (const child of val) { - if (child) { - this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression); - } - } - } else if (val) { - this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression); - } - } - checkIdentifier(at, bindingType, strictModeChanged = false) { - if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name))) { - if (bindingType === 64) { - this.raise(Errors.StrictEvalArguments, at, { - referenceName: at.name - }); - } else { - this.raise(Errors.StrictEvalArgumentsBinding, at, { - bindingName: at.name - }); - } - } - if (bindingType & 8192 && at.name === "let") { - this.raise(Errors.LetInLexicalBinding, at); - } - if (!(bindingType & 64)) { - this.declareNameFromIdentifier(at, bindingType); - } - } - declareNameFromIdentifier(identifier, binding) { - this.scope.declareName(identifier.name, binding, identifier.loc.start); - } - checkToRestConversion(node, allowPattern) { - switch (node.type) { - case "ParenthesizedExpression": - this.checkToRestConversion(node.expression, allowPattern); - break; - case "Identifier": - case "MemberExpression": - break; - case "ArrayExpression": - case "ObjectExpression": - if (allowPattern) break; - default: - this.raise(Errors.InvalidRestAssignmentPattern, node); - } - } - checkCommaAfterRest(close) { - if (!this.match(12)) { - return false; - } - this.raise(this.lookaheadCharCode() === close ? Errors.RestTrailingComma : Errors.ElementAfterRest, this.state.startLoc); - return true; - } -} -function nonNull(x) { - if (x == null) { - throw new Error(`Unexpected ${x} value.`); - } - return x; -} -function assert(x) { - if (!x) { - throw new Error("Assert fail"); - } -} -const TSErrors = ParseErrorEnum`typescript`({ - AbstractMethodHasImplementation: ({ - methodName - }) => `Method '${methodName}' cannot have an implementation because it is marked abstract.`, - AbstractPropertyHasInitializer: ({ - propertyName - }) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`, - AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.", - AccessorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", - AccessorCannotHaveTypeParameters: "An accessor cannot have type parameters.", - ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", - ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", - ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", - ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.", - DeclareAccessor: ({ - kind - }) => `'declare' is not allowed in ${kind}ters.`, - DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.", - DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.", - DuplicateAccessibilityModifier: ({ - modifier - }) => `Accessibility modifier already seen.`, - DuplicateModifier: ({ - modifier - }) => `Duplicate modifier: '${modifier}'.`, - EmptyHeritageClauseType: ({ - token - }) => `'${token}' list cannot be empty.`, - EmptyTypeArguments: "Type argument list cannot be empty.", - EmptyTypeParameters: "Type parameter list cannot be empty.", - ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.", - ImportAliasHasImportType: "An import alias can not use 'import type'.", - ImportReflectionHasImportType: "An `import module` declaration can not use `type` modifier", - IncompatibleModifiers: ({ - modifiers - }) => `'${modifiers[0]}' modifier cannot be used with '${modifiers[1]}' modifier.`, - IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.", - IndexSignatureHasAccessibility: ({ - modifier - }) => `Index signatures cannot have an accessibility modifier ('${modifier}').`, - IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.", - IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.", - IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.", - InitializerNotAllowedInAmbientContext: "Initializers are not allowed in ambient contexts.", - InvalidModifierOnTypeMember: ({ - modifier - }) => `'${modifier}' modifier cannot appear on a type member.`, - InvalidModifierOnTypeParameter: ({ - modifier - }) => `'${modifier}' modifier cannot appear on a type parameter.`, - InvalidModifierOnTypeParameterPositions: ({ - modifier - }) => `'${modifier}' modifier can only appear on a type parameter of a class, interface or type alias.`, - InvalidModifiersOrder: ({ - orderedModifiers - }) => `'${orderedModifiers[0]}' modifier must precede '${orderedModifiers[1]}' modifier.`, - InvalidPropertyAccessAfterInstantiationExpression: "Invalid property access after an instantiation expression. " + "You can either wrap the instantiation expression in parentheses, or delete the type arguments.", - InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.", - MissingInterfaceName: "'interface' declarations must be followed by an identifier.", - NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.", - NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.", - OptionalTypeBeforeRequired: "A required element cannot follow an optional element.", - OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.", - PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.", - PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.", - PrivateElementHasAccessibility: ({ - modifier - }) => `Private elements cannot have an accessibility modifier ('${modifier}').`, - ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.", - ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.", - ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.", - SetAccessorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", - SetAccessorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", - SetAccessorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", - SingleTypeParameterWithoutTrailingComma: ({ - typeParameterName - }) => `Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`, - StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", - TupleOptionalAfterType: "A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).", - TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", - TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", - TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", - TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", - UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", - UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", - UnexpectedTypeAnnotation: "Did not expect a type annotation here.", - UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", - UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", - UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", - UnsupportedSignatureParameterKind: ({ - type - }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.` -}); -function keywordTypeFromName(value) { - switch (value) { - case "any": - return "TSAnyKeyword"; - case "boolean": - return "TSBooleanKeyword"; - case "bigint": - return "TSBigIntKeyword"; - case "never": - return "TSNeverKeyword"; - case "number": - return "TSNumberKeyword"; - case "object": - return "TSObjectKeyword"; - case "string": - return "TSStringKeyword"; - case "symbol": - return "TSSymbolKeyword"; - case "undefined": - return "TSUndefinedKeyword"; - case "unknown": - return "TSUnknownKeyword"; - default: - return undefined; - } -} -function tsIsAccessModifier(modifier) { - return modifier === "private" || modifier === "public" || modifier === "protected"; -} -function tsIsVarianceAnnotations(modifier) { - return modifier === "in" || modifier === "out"; -} -var typescript = superClass => class TypeScriptParserMixin extends superClass { - constructor(...args) { - super(...args); - this.tsParseInOutModifiers = this.tsParseModifiers.bind(this, { - allowedModifiers: ["in", "out"], - disallowedModifiers: ["const", "public", "private", "protected", "readonly", "declare", "abstract", "override"], - errorTemplate: TSErrors.InvalidModifierOnTypeParameter - }); - this.tsParseConstModifier = this.tsParseModifiers.bind(this, { - allowedModifiers: ["const"], - disallowedModifiers: ["in", "out"], - errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions - }); - this.tsParseInOutConstModifiers = this.tsParseModifiers.bind(this, { - allowedModifiers: ["in", "out", "const"], - disallowedModifiers: ["public", "private", "protected", "readonly", "declare", "abstract", "override"], - errorTemplate: TSErrors.InvalidModifierOnTypeParameter - }); - } - getScopeHandler() { - return TypeScriptScopeHandler; - } - tsIsIdentifier() { - return tokenIsIdentifier(this.state.type); - } - tsTokenCanFollowModifier() { - return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(139) || this.isLiteralPropertyName(); - } - tsNextTokenOnSameLineAndCanFollowModifier() { - this.next(); - if (this.hasPrecedingLineBreak()) { - return false; - } - return this.tsTokenCanFollowModifier(); - } - tsNextTokenCanFollowModifier() { - if (this.match(106)) { - this.next(); - return this.tsTokenCanFollowModifier(); - } - return this.tsNextTokenOnSameLineAndCanFollowModifier(); - } - tsParseModifier(allowedModifiers, stopOnStartOfClassStaticBlock) { - if (!tokenIsIdentifier(this.state.type) && this.state.type !== 58 && this.state.type !== 75) { - return undefined; - } - const modifier = this.state.value; - if (allowedModifiers.includes(modifier)) { - if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) { - return undefined; - } - if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { - return modifier; - } - } - return undefined; - } - tsParseModifiers({ - allowedModifiers, - disallowedModifiers, - stopOnStartOfClassStaticBlock, - errorTemplate = TSErrors.InvalidModifierOnTypeMember - }, modified) { - const enforceOrder = (loc, modifier, before, after) => { - if (modifier === before && modified[after]) { - this.raise(TSErrors.InvalidModifiersOrder, loc, { - orderedModifiers: [before, after] - }); - } - }; - const incompatible = (loc, modifier, mod1, mod2) => { - if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) { - this.raise(TSErrors.IncompatibleModifiers, loc, { - modifiers: [mod1, mod2] - }); - } - }; - for (;;) { - const { - startLoc - } = this.state; - const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []), stopOnStartOfClassStaticBlock); - if (!modifier) break; - if (tsIsAccessModifier(modifier)) { - if (modified.accessibility) { - this.raise(TSErrors.DuplicateAccessibilityModifier, startLoc, { - modifier - }); - } else { - enforceOrder(startLoc, modifier, modifier, "override"); - enforceOrder(startLoc, modifier, modifier, "static"); - enforceOrder(startLoc, modifier, modifier, "readonly"); - modified.accessibility = modifier; - } - } else if (tsIsVarianceAnnotations(modifier)) { - if (modified[modifier]) { - this.raise(TSErrors.DuplicateModifier, startLoc, { - modifier - }); - } - modified[modifier] = true; - enforceOrder(startLoc, modifier, "in", "out"); - } else { - if (hasOwnProperty.call(modified, modifier)) { - this.raise(TSErrors.DuplicateModifier, startLoc, { - modifier - }); - } else { - enforceOrder(startLoc, modifier, "static", "readonly"); - enforceOrder(startLoc, modifier, "static", "override"); - enforceOrder(startLoc, modifier, "override", "readonly"); - enforceOrder(startLoc, modifier, "abstract", "override"); - incompatible(startLoc, modifier, "declare", "override"); - incompatible(startLoc, modifier, "static", "abstract"); - } - modified[modifier] = true; - } - if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) { - this.raise(errorTemplate, startLoc, { - modifier - }); - } - } - } - tsIsListTerminator(kind) { - switch (kind) { - case "EnumMembers": - case "TypeMembers": - return this.match(8); - case "HeritageClauseElement": - return this.match(5); - case "TupleElementTypes": - return this.match(3); - case "TypeParametersOrArguments": - return this.match(48); - } - } - tsParseList(kind, parseElement) { - const result = []; - while (!this.tsIsListTerminator(kind)) { - result.push(parseElement()); - } - return result; - } - tsParseDelimitedList(kind, parseElement, refTrailingCommaPos) { - return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true, refTrailingCommaPos)); - } - tsParseDelimitedListWorker(kind, parseElement, expectSuccess, refTrailingCommaPos) { - const result = []; - let trailingCommaPos = -1; - for (;;) { - if (this.tsIsListTerminator(kind)) { - break; - } - trailingCommaPos = -1; - const element = parseElement(); - if (element == null) { - return undefined; - } - result.push(element); - if (this.eat(12)) { - trailingCommaPos = this.state.lastTokStartLoc.index; - continue; - } - if (this.tsIsListTerminator(kind)) { - break; - } - if (expectSuccess) { - this.expect(12); - } - return undefined; - } - if (refTrailingCommaPos) { - refTrailingCommaPos.value = trailingCommaPos; - } - return result; - } - tsParseBracketedList(kind, parseElement, bracket, skipFirstToken, refTrailingCommaPos) { - if (!skipFirstToken) { - if (bracket) { - this.expect(0); - } else { - this.expect(47); - } - } - const result = this.tsParseDelimitedList(kind, parseElement, refTrailingCommaPos); - if (bracket) { - this.expect(3); - } else { - this.expect(48); - } - return result; - } - tsParseImportType() { - const node = this.startNode(); - this.expect(83); - this.expect(10); - if (!this.match(134)) { - this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc); - { - node.argument = super.parseExprAtom(); - } - } else { - { - node.argument = this.parseStringLiteral(this.state.value); - } - } - if (this.eat(12) && !this.match(11)) { - node.options = super.parseMaybeAssignAllowIn(); - this.eat(12); - } else { - node.options = null; - } - this.expect(11); - if (this.eat(16)) { - node.qualifier = this.tsParseEntityName(1 | 2); - } - if (this.match(47)) { - { - node.typeParameters = this.tsParseTypeArguments(); - } - } - return this.finishNode(node, "TSImportType"); - } - tsParseEntityName(flags) { - let entity; - if (flags & 1 && this.match(78)) { - if (flags & 2) { - entity = this.parseIdentifier(true); - } else { - const node = this.startNode(); - this.next(); - entity = this.finishNode(node, "ThisExpression"); - } - } else { - entity = this.parseIdentifier(!!(flags & 1)); - } - while (this.eat(16)) { - const node = this.startNodeAtNode(entity); - node.left = entity; - node.right = this.parseIdentifier(!!(flags & 1)); - entity = this.finishNode(node, "TSQualifiedName"); - } - return entity; - } - tsParseTypeReference() { - const node = this.startNode(); - node.typeName = this.tsParseEntityName(1); - if (!this.hasPrecedingLineBreak() && this.match(47)) { - { - node.typeParameters = this.tsParseTypeArguments(); - } - } - return this.finishNode(node, "TSTypeReference"); - } - tsParseThisTypePredicate(lhs) { - this.next(); - const node = this.startNodeAtNode(lhs); - node.parameterName = lhs; - node.typeAnnotation = this.tsParseTypeAnnotation(false); - node.asserts = false; - return this.finishNode(node, "TSTypePredicate"); - } - tsParseThisTypeNode() { - const node = this.startNode(); - this.next(); - return this.finishNode(node, "TSThisType"); - } - tsParseTypeQuery() { - const node = this.startNode(); - this.expect(87); - if (this.match(83)) { - node.exprName = this.tsParseImportType(); - } else { - { - node.exprName = this.tsParseEntityName(1 | 2); - } - } - if (!this.hasPrecedingLineBreak() && this.match(47)) { - { - node.typeParameters = this.tsParseTypeArguments(); - } - } - return this.finishNode(node, "TSTypeQuery"); - } - tsParseTypeParameter(parseModifiers) { - const node = this.startNode(); - parseModifiers(node); - node.name = this.tsParseTypeParameterName(); - node.constraint = this.tsEatThenParseType(81); - node.default = this.tsEatThenParseType(29); - return this.finishNode(node, "TSTypeParameter"); - } - tsTryParseTypeParameters(parseModifiers) { - if (this.match(47)) { - return this.tsParseTypeParameters(parseModifiers); - } - } - tsParseTypeParameters(parseModifiers) { - const node = this.startNode(); - if (this.match(47) || this.match(143)) { - this.next(); - } else { - this.unexpected(); - } - const refTrailingCommaPos = { - value: -1 - }; - node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, parseModifiers), false, true, refTrailingCommaPos); - if (node.params.length === 0) { - this.raise(TSErrors.EmptyTypeParameters, node); - } - if (refTrailingCommaPos.value !== -1) { - this.addExtra(node, "trailingComma", refTrailingCommaPos.value); - } - return this.finishNode(node, "TSTypeParameterDeclaration"); - } - tsFillSignature(returnToken, signature) { - const returnTokenRequired = returnToken === 19; - const paramsKey = "parameters"; - const returnTypeKey = "typeAnnotation"; - signature.typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); - this.expect(10); - signature[paramsKey] = this.tsParseBindingListForSignature(); - if (returnTokenRequired) { - signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } else if (this.match(returnToken)) { - signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } - } - tsParseBindingListForSignature() { - const list = super.parseBindingList(11, 41, 2); - for (const pattern of list) { - const { - type - } = pattern; - if (type === "AssignmentPattern" || type === "TSParameterProperty") { - this.raise(TSErrors.UnsupportedSignatureParameterKind, pattern, { - type - }); - } - } - return list; - } - tsParseTypeMemberSemicolon() { - if (!this.eat(12) && !this.isLineTerminator()) { - this.expect(13); - } - } - tsParseSignatureMember(kind, node) { - this.tsFillSignature(14, node); - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, kind); - } - tsIsUnambiguouslyIndexSignature() { - this.next(); - if (tokenIsIdentifier(this.state.type)) { - this.next(); - return this.match(14); - } - return false; - } - tsTryParseIndexSignature(node) { - if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { - return; - } - this.expect(0); - const id = this.parseIdentifier(); - id.typeAnnotation = this.tsParseTypeAnnotation(); - this.resetEndLocation(id); - this.expect(3); - node.parameters = [id]; - const type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, "TSIndexSignature"); - } - tsParsePropertyOrMethodSignature(node, readonly) { - if (this.eat(17)) node.optional = true; - const nodeAny = node; - if (this.match(10) || this.match(47)) { - if (readonly) { - this.raise(TSErrors.ReadonlyForMethodSignature, node); - } - const method = nodeAny; - if (method.kind && this.match(47)) { - this.raise(TSErrors.AccessorCannotHaveTypeParameters, this.state.curPosition()); - } - this.tsFillSignature(14, method); - this.tsParseTypeMemberSemicolon(); - const paramsKey = "parameters"; - const returnTypeKey = "typeAnnotation"; - if (method.kind === "get") { - if (method[paramsKey].length > 0) { - this.raise(Errors.BadGetterArity, this.state.curPosition()); - if (this.isThisParam(method[paramsKey][0])) { - this.raise(TSErrors.AccessorCannotDeclareThisParameter, this.state.curPosition()); - } - } - } else if (method.kind === "set") { - if (method[paramsKey].length !== 1) { - this.raise(Errors.BadSetterArity, this.state.curPosition()); - } else { - const firstParameter = method[paramsKey][0]; - if (this.isThisParam(firstParameter)) { - this.raise(TSErrors.AccessorCannotDeclareThisParameter, this.state.curPosition()); - } - if (firstParameter.type === "Identifier" && firstParameter.optional) { - this.raise(TSErrors.SetAccessorCannotHaveOptionalParameter, this.state.curPosition()); - } - if (firstParameter.type === "RestElement") { - this.raise(TSErrors.SetAccessorCannotHaveRestParameter, this.state.curPosition()); - } - } - if (method[returnTypeKey]) { - this.raise(TSErrors.SetAccessorCannotHaveReturnType, method[returnTypeKey]); - } - } else { - method.kind = "method"; - } - return this.finishNode(method, "TSMethodSignature"); - } else { - const property = nodeAny; - if (readonly) property.readonly = true; - const type = this.tsTryParseTypeAnnotation(); - if (type) property.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(property, "TSPropertySignature"); - } - } - tsParseTypeMember() { - const node = this.startNode(); - if (this.match(10) || this.match(47)) { - return this.tsParseSignatureMember("TSCallSignatureDeclaration", node); - } - if (this.match(77)) { - const id = this.startNode(); - this.next(); - if (this.match(10) || this.match(47)) { - return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node); - } else { - node.key = this.createIdentifier(id, "new"); - return this.tsParsePropertyOrMethodSignature(node, false); - } - } - this.tsParseModifiers({ - allowedModifiers: ["readonly"], - disallowedModifiers: ["declare", "abstract", "private", "protected", "public", "static", "override"] - }, node); - const idx = this.tsTryParseIndexSignature(node); - if (idx) { - return idx; - } - super.parsePropertyName(node); - if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) { - node.kind = node.key.name; - super.parsePropertyName(node); - } - return this.tsParsePropertyOrMethodSignature(node, !!node.readonly); - } - tsParseTypeLiteral() { - const node = this.startNode(); - node.members = this.tsParseObjectTypeMembers(); - return this.finishNode(node, "TSTypeLiteral"); - } - tsParseObjectTypeMembers() { - this.expect(5); - const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); - this.expect(8); - return members; - } - tsIsStartOfMappedType() { - this.next(); - if (this.eat(53)) { - return this.isContextual(122); - } - if (this.isContextual(122)) { - this.next(); - } - if (!this.match(0)) { - return false; - } - this.next(); - if (!this.tsIsIdentifier()) { - return false; - } - this.next(); - return this.match(58); - } - tsParseMappedType() { - const node = this.startNode(); - this.expect(5); - if (this.match(53)) { - node.readonly = this.state.value; - this.next(); - this.expectContextual(122); - } else if (this.eatContextual(122)) { - node.readonly = true; - } - this.expect(0); - { - const typeParameter = this.startNode(); - typeParameter.name = this.tsParseTypeParameterName(); - typeParameter.constraint = this.tsExpectThenParseType(58); - node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); - } - node.nameType = this.eatContextual(93) ? this.tsParseType() : null; - this.expect(3); - if (this.match(53)) { - node.optional = this.state.value; - this.next(); - this.expect(17); - } else if (this.eat(17)) { - node.optional = true; - } - node.typeAnnotation = this.tsTryParseType(); - this.semicolon(); - this.expect(8); - return this.finishNode(node, "TSMappedType"); - } - tsParseTupleType() { - const node = this.startNode(); - node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false); - let seenOptionalElement = false; - node.elementTypes.forEach(elementNode => { - const { - type - } = elementNode; - if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) { - this.raise(TSErrors.OptionalTypeBeforeRequired, elementNode); - } - seenOptionalElement || (seenOptionalElement = type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType"); - }); - return this.finishNode(node, "TSTupleType"); - } - tsParseTupleElementType() { - const restStartLoc = this.state.startLoc; - const rest = this.eat(21); - const { - startLoc - } = this.state; - let labeled; - let label; - let optional; - let type; - const isWord = tokenIsKeywordOrIdentifier(this.state.type); - const chAfterWord = isWord ? this.lookaheadCharCode() : null; - if (chAfterWord === 58) { - labeled = true; - optional = false; - label = this.parseIdentifier(true); - this.expect(14); - type = this.tsParseType(); - } else if (chAfterWord === 63) { - optional = true; - const wordName = this.state.value; - const typeOrLabel = this.tsParseNonArrayType(); - if (this.lookaheadCharCode() === 58) { - labeled = true; - label = this.createIdentifier(this.startNodeAt(startLoc), wordName); - this.expect(17); - this.expect(14); - type = this.tsParseType(); - } else { - labeled = false; - type = typeOrLabel; - this.expect(17); - } - } else { - type = this.tsParseType(); - optional = this.eat(17); - labeled = this.eat(14); - } - if (labeled) { - let labeledNode; - if (label) { - labeledNode = this.startNodeAt(startLoc); - labeledNode.optional = optional; - labeledNode.label = label; - labeledNode.elementType = type; - if (this.eat(17)) { - labeledNode.optional = true; - this.raise(TSErrors.TupleOptionalAfterType, this.state.lastTokStartLoc); - } - } else { - labeledNode = this.startNodeAt(startLoc); - labeledNode.optional = optional; - this.raise(TSErrors.InvalidTupleMemberLabel, type); - labeledNode.label = type; - labeledNode.elementType = this.tsParseType(); - } - type = this.finishNode(labeledNode, "TSNamedTupleMember"); - } else if (optional) { - const optionalTypeNode = this.startNodeAt(startLoc); - optionalTypeNode.typeAnnotation = type; - type = this.finishNode(optionalTypeNode, "TSOptionalType"); - } - if (rest) { - const restNode = this.startNodeAt(restStartLoc); - restNode.typeAnnotation = type; - type = this.finishNode(restNode, "TSRestType"); - } - return type; - } - tsParseParenthesizedType() { - const node = this.startNode(); - this.expect(10); - node.typeAnnotation = this.tsParseType(); - this.expect(11); - return this.finishNode(node, "TSParenthesizedType"); - } - tsParseFunctionOrConstructorType(type, abstract) { - const node = this.startNode(); - if (type === "TSConstructorType") { - node.abstract = !!abstract; - if (abstract) this.next(); - this.next(); - } - this.tsInAllowConditionalTypesContext(() => this.tsFillSignature(19, node)); - return this.finishNode(node, type); - } - tsParseLiteralTypeNode() { - const node = this.startNode(); - switch (this.state.type) { - case 135: - case 136: - case 134: - case 85: - case 86: - node.literal = super.parseExprAtom(); - break; - default: - this.unexpected(); - } - return this.finishNode(node, "TSLiteralType"); - } - tsParseTemplateLiteralType() { - { - const node = this.startNode(); - node.literal = super.parseTemplate(false); - return this.finishNode(node, "TSLiteralType"); - } - } - parseTemplateSubstitution() { - if (this.state.inType) return this.tsParseType(); - return super.parseTemplateSubstitution(); - } - tsParseThisTypeOrThisTypePredicate() { - const thisKeyword = this.tsParseThisTypeNode(); - if (this.isContextual(116) && !this.hasPrecedingLineBreak()) { - return this.tsParseThisTypePredicate(thisKeyword); - } else { - return thisKeyword; - } - } - tsParseNonArrayType() { - switch (this.state.type) { - case 134: - case 135: - case 136: - case 85: - case 86: - return this.tsParseLiteralTypeNode(); - case 53: - if (this.state.value === "-") { - const node = this.startNode(); - const nextToken = this.lookahead(); - if (nextToken.type !== 135 && nextToken.type !== 136) { - this.unexpected(); - } - node.literal = this.parseMaybeUnary(); - return this.finishNode(node, "TSLiteralType"); - } - break; - case 78: - return this.tsParseThisTypeOrThisTypePredicate(); - case 87: - return this.tsParseTypeQuery(); - case 83: - return this.tsParseImportType(); - case 5: - return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); - case 0: - return this.tsParseTupleType(); - case 10: - return this.tsParseParenthesizedType(); - case 25: - case 24: - return this.tsParseTemplateLiteralType(); - default: - { - const { - type - } = this.state; - if (tokenIsIdentifier(type) || type === 88 || type === 84) { - const nodeType = type === 88 ? "TSVoidKeyword" : type === 84 ? "TSNullKeyword" : keywordTypeFromName(this.state.value); - if (nodeType !== undefined && this.lookaheadCharCode() !== 46) { - const node = this.startNode(); - this.next(); - return this.finishNode(node, nodeType); - } - return this.tsParseTypeReference(); - } - } - } - this.unexpected(); - } - tsParseArrayTypeOrHigher() { - const { - startLoc - } = this.state; - let type = this.tsParseNonArrayType(); - while (!this.hasPrecedingLineBreak() && this.eat(0)) { - if (this.match(3)) { - const node = this.startNodeAt(startLoc); - node.elementType = type; - this.expect(3); - type = this.finishNode(node, "TSArrayType"); - } else { - const node = this.startNodeAt(startLoc); - node.objectType = type; - node.indexType = this.tsParseType(); - this.expect(3); - type = this.finishNode(node, "TSIndexedAccessType"); - } - } - return type; - } - tsParseTypeOperator() { - const node = this.startNode(); - const operator = this.state.value; - this.next(); - node.operator = operator; - node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); - if (operator === "readonly") { - this.tsCheckTypeAnnotationForReadOnly(node); - } - return this.finishNode(node, "TSTypeOperator"); - } - tsCheckTypeAnnotationForReadOnly(node) { - switch (node.typeAnnotation.type) { - case "TSTupleType": - case "TSArrayType": - return; - default: - this.raise(TSErrors.UnexpectedReadonly, node); - } - } - tsParseInferType() { - const node = this.startNode(); - this.expectContextual(115); - const typeParameter = this.startNode(); - typeParameter.name = this.tsParseTypeParameterName(); - typeParameter.constraint = this.tsTryParse(() => this.tsParseConstraintForInferType()); - node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); - return this.finishNode(node, "TSInferType"); - } - tsParseConstraintForInferType() { - if (this.eat(81)) { - const constraint = this.tsInDisallowConditionalTypesContext(() => this.tsParseType()); - if (this.state.inDisallowConditionalTypesContext || !this.match(17)) { - return constraint; - } - } - } - tsParseTypeOperatorOrHigher() { - const isTypeOperator = tokenIsTSTypeOperator(this.state.type) && !this.state.containsEsc; - return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual(115) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher()); - } - tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { - const node = this.startNode(); - const hasLeadingOperator = this.eat(operator); - const types = []; - do { - types.push(parseConstituentType()); - } while (this.eat(operator)); - if (types.length === 1 && !hasLeadingOperator) { - return types[0]; - } - node.types = types; - return this.finishNode(node, kind); - } - tsParseIntersectionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), 45); - } - tsParseUnionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 43); - } - tsIsStartOfFunctionType() { - if (this.match(47)) { - return true; - } - return this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); - } - tsSkipParameterStart() { - if (tokenIsIdentifier(this.state.type) || this.match(78)) { - this.next(); - return true; - } - if (this.match(5)) { - const { - errors - } = this.state; - const previousErrorCount = errors.length; - try { - this.parseObjectLike(8, true); - return errors.length === previousErrorCount; - } catch (_unused) { - return false; - } - } - if (this.match(0)) { - this.next(); - const { - errors - } = this.state; - const previousErrorCount = errors.length; - try { - super.parseBindingList(3, 93, 1); - return errors.length === previousErrorCount; - } catch (_unused2) { - return false; - } - } - return false; - } - tsIsUnambiguouslyStartOfFunctionType() { - this.next(); - if (this.match(11) || this.match(21)) { - return true; - } - if (this.tsSkipParameterStart()) { - if (this.match(14) || this.match(12) || this.match(17) || this.match(29)) { - return true; - } - if (this.match(11)) { - this.next(); - if (this.match(19)) { - return true; - } - } - } - return false; - } - tsParseTypeOrTypePredicateAnnotation(returnToken) { - return this.tsInType(() => { - const t = this.startNode(); - this.expect(returnToken); - const node = this.startNode(); - const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this)); - if (asserts && this.match(78)) { - let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate(); - if (thisTypePredicate.type === "TSThisType") { - node.parameterName = thisTypePredicate; - node.asserts = true; - node.typeAnnotation = null; - thisTypePredicate = this.finishNode(node, "TSTypePredicate"); - } else { - this.resetStartLocationFromNode(thisTypePredicate, node); - thisTypePredicate.asserts = true; - } - t.typeAnnotation = thisTypePredicate; - return this.finishNode(t, "TSTypeAnnotation"); - } - const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); - if (!typePredicateVariable) { - if (!asserts) { - return this.tsParseTypeAnnotation(false, t); - } - node.parameterName = this.parseIdentifier(); - node.asserts = asserts; - node.typeAnnotation = null; - t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); - return this.finishNode(t, "TSTypeAnnotation"); - } - const type = this.tsParseTypeAnnotation(false); - node.parameterName = typePredicateVariable; - node.typeAnnotation = type; - node.asserts = asserts; - t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); - return this.finishNode(t, "TSTypeAnnotation"); - }); - } - tsTryParseTypeOrTypePredicateAnnotation() { - if (this.match(14)) { - return this.tsParseTypeOrTypePredicateAnnotation(14); - } - } - tsTryParseTypeAnnotation() { - if (this.match(14)) { - return this.tsParseTypeAnnotation(); - } - } - tsTryParseType() { - return this.tsEatThenParseType(14); - } - tsParseTypePredicatePrefix() { - const id = this.parseIdentifier(); - if (this.isContextual(116) && !this.hasPrecedingLineBreak()) { - this.next(); - return id; - } - } - tsParseTypePredicateAsserts() { - if (this.state.type !== 109) { - return false; - } - const containsEsc = this.state.containsEsc; - this.next(); - if (!tokenIsIdentifier(this.state.type) && !this.match(78)) { - return false; - } - if (containsEsc) { - this.raise(Errors.InvalidEscapedReservedWord, this.state.lastTokStartLoc, { - reservedWord: "asserts" - }); - } - return true; - } - tsParseTypeAnnotation(eatColon = true, t = this.startNode()) { - this.tsInType(() => { - if (eatColon) this.expect(14); - t.typeAnnotation = this.tsParseType(); - }); - return this.finishNode(t, "TSTypeAnnotation"); - } - tsParseType() { - assert(this.state.inType); - const type = this.tsParseNonConditionalType(); - if (this.state.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(81)) { - return type; - } - const node = this.startNodeAtNode(type); - node.checkType = type; - node.extendsType = this.tsInDisallowConditionalTypesContext(() => this.tsParseNonConditionalType()); - this.expect(17); - node.trueType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); - this.expect(14); - node.falseType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); - return this.finishNode(node, "TSConditionalType"); - } - isAbstractConstructorSignature() { - return this.isContextual(124) && this.lookahead().type === 77; - } - tsParseNonConditionalType() { - if (this.tsIsStartOfFunctionType()) { - return this.tsParseFunctionOrConstructorType("TSFunctionType"); - } - if (this.match(77)) { - return this.tsParseFunctionOrConstructorType("TSConstructorType"); - } else if (this.isAbstractConstructorSignature()) { - return this.tsParseFunctionOrConstructorType("TSConstructorType", true); - } - return this.tsParseUnionTypeOrHigher(); - } - tsParseTypeAssertion() { - if (this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { - this.raise(TSErrors.ReservedTypeAssertion, this.state.startLoc); - } - const node = this.startNode(); - node.typeAnnotation = this.tsInType(() => { - this.next(); - return this.match(75) ? this.tsParseTypeReference() : this.tsParseType(); - }); - this.expect(48); - node.expression = this.parseMaybeUnary(); - return this.finishNode(node, "TSTypeAssertion"); - } - tsParseHeritageClause(token) { - const originalStartLoc = this.state.startLoc; - const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => { - const node = this.startNode(); - { - node.expression = this.tsParseEntityName(1 | 2); - if (this.match(47)) { - node.typeParameters = this.tsParseTypeArguments(); - } - return this.finishNode(node, "TSExpressionWithTypeArguments"); - } - }); - if (!delimitedList.length) { - this.raise(TSErrors.EmptyHeritageClauseType, originalStartLoc, { - token - }); - } - return delimitedList; - } - tsParseInterfaceDeclaration(node, properties = {}) { - if (this.hasFollowingLineBreak()) return null; - this.expectContextual(129); - if (properties.declare) node.declare = true; - if (tokenIsIdentifier(this.state.type)) { - node.id = this.parseIdentifier(); - this.checkIdentifier(node.id, 130); - } else { - node.id = null; - this.raise(TSErrors.MissingInterfaceName, this.state.startLoc); - } - node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers); - if (this.eat(81)) { - node.extends = this.tsParseHeritageClause("extends"); - } - const body = this.startNode(); - body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); - node.body = this.finishNode(body, "TSInterfaceBody"); - return this.finishNode(node, "TSInterfaceDeclaration"); - } - tsParseTypeAliasDeclaration(node) { - node.id = this.parseIdentifier(); - this.checkIdentifier(node.id, 2); - node.typeAnnotation = this.tsInType(() => { - node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers); - this.expect(29); - if (this.isContextual(114) && this.lookahead().type !== 16) { - const node = this.startNode(); - this.next(); - return this.finishNode(node, "TSIntrinsicKeyword"); - } - return this.tsParseType(); - }); - this.semicolon(); - return this.finishNode(node, "TSTypeAliasDeclaration"); - } - tsInTopLevelContext(cb) { - if (this.curContext() !== types.brace) { - const oldContext = this.state.context; - this.state.context = [oldContext[0]]; - try { - return cb(); - } finally { - this.state.context = oldContext; - } - } else { - return cb(); - } - } - tsInType(cb) { - const oldInType = this.state.inType; - this.state.inType = true; - try { - return cb(); - } finally { - this.state.inType = oldInType; - } - } - tsInDisallowConditionalTypesContext(cb) { - const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext; - this.state.inDisallowConditionalTypesContext = true; - try { - return cb(); - } finally { - this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; - } - } - tsInAllowConditionalTypesContext(cb) { - const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext; - this.state.inDisallowConditionalTypesContext = false; - try { - return cb(); - } finally { - this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; - } - } - tsEatThenParseType(token) { - if (this.match(token)) { - return this.tsNextThenParseType(); - } - } - tsExpectThenParseType(token) { - return this.tsInType(() => { - this.expect(token); - return this.tsParseType(); - }); - } - tsNextThenParseType() { - return this.tsInType(() => { - this.next(); - return this.tsParseType(); - }); - } - tsParseEnumMember() { - const node = this.startNode(); - node.id = this.match(134) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(true); - if (this.eat(29)) { - node.initializer = super.parseMaybeAssignAllowIn(); - } - return this.finishNode(node, "TSEnumMember"); - } - tsParseEnumDeclaration(node, properties = {}) { - if (properties.const) node.const = true; - if (properties.declare) node.declare = true; - this.expectContextual(126); - node.id = this.parseIdentifier(); - this.checkIdentifier(node.id, node.const ? 8971 : 8459); - { - this.expect(5); - node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); - this.expect(8); - } - return this.finishNode(node, "TSEnumDeclaration"); - } - tsParseEnumBody() { - const node = this.startNode(); - this.expect(5); - node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); - this.expect(8); - return this.finishNode(node, "TSEnumBody"); - } - tsParseModuleBlock() { - const node = this.startNode(); - this.scope.enter(0); - this.expect(5); - super.parseBlockOrModuleBlockBody(node.body = [], undefined, true, 8); - this.scope.exit(); - return this.finishNode(node, "TSModuleBlock"); - } - tsParseModuleOrNamespaceDeclaration(node, nested = false) { - node.id = this.parseIdentifier(); - if (!nested) { - this.checkIdentifier(node.id, 1024); - } - if (this.eat(16)) { - const inner = this.startNode(); - this.tsParseModuleOrNamespaceDeclaration(inner, true); - node.body = inner; - } else { - this.scope.enter(256); - this.prodParam.enter(0); - node.body = this.tsParseModuleBlock(); - this.prodParam.exit(); - this.scope.exit(); - } - return this.finishNode(node, "TSModuleDeclaration"); - } - tsParseAmbientExternalModuleDeclaration(node) { - if (this.isContextual(112)) { - node.kind = "global"; - { - node.global = true; - } - node.id = this.parseIdentifier(); - } else if (this.match(134)) { - node.kind = "module"; - node.id = super.parseStringLiteral(this.state.value); - } else { - this.unexpected(); - } - if (this.match(5)) { - this.scope.enter(256); - this.prodParam.enter(0); - node.body = this.tsParseModuleBlock(); - this.prodParam.exit(); - this.scope.exit(); - } else { - this.semicolon(); - } - return this.finishNode(node, "TSModuleDeclaration"); - } - tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, isExport) { - { - node.isExport = isExport || false; - } - node.id = maybeDefaultIdentifier || this.parseIdentifier(); - this.checkIdentifier(node.id, 4096); - this.expect(29); - const moduleReference = this.tsParseModuleReference(); - if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") { - this.raise(TSErrors.ImportAliasHasImportType, moduleReference); - } - node.moduleReference = moduleReference; - this.semicolon(); - return this.finishNode(node, "TSImportEqualsDeclaration"); - } - tsIsExternalModuleReference() { - return this.isContextual(119) && this.lookaheadCharCode() === 40; - } - tsParseModuleReference() { - return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(0); - } - tsParseExternalModuleReference() { - const node = this.startNode(); - this.expectContextual(119); - this.expect(10); - if (!this.match(134)) { - this.unexpected(); - } - node.expression = super.parseExprAtom(); - this.expect(11); - this.sawUnambiguousESM = true; - return this.finishNode(node, "TSExternalModuleReference"); - } - tsLookAhead(f) { - const state = this.state.clone(); - const res = f(); - this.state = state; - return res; - } - tsTryParseAndCatch(f) { - const result = this.tryParse(abort => f() || abort()); - if (result.aborted || !result.node) return; - if (result.error) this.state = result.failState; - return result.node; - } - tsTryParse(f) { - const state = this.state.clone(); - const result = f(); - if (result !== undefined && result !== false) { - return result; - } - this.state = state; - } - tsTryParseDeclare(nany) { - if (this.isLineTerminator()) { - return; - } - let startType = this.state.type; - let kind; - if (this.isContextual(100)) { - startType = 74; - kind = "let"; - } - return this.tsInAmbientContext(() => { - switch (startType) { - case 68: - nany.declare = true; - return super.parseFunctionStatement(nany, false, false); - case 80: - nany.declare = true; - return this.parseClass(nany, true, false); - case 126: - return this.tsParseEnumDeclaration(nany, { - declare: true - }); - case 112: - return this.tsParseAmbientExternalModuleDeclaration(nany); - case 75: - case 74: - if (!this.match(75) || !this.isLookaheadContextual("enum")) { - nany.declare = true; - return this.parseVarStatement(nany, kind || this.state.value, true); - } - this.expect(75); - return this.tsParseEnumDeclaration(nany, { - const: true, - declare: true - }); - case 129: - { - const result = this.tsParseInterfaceDeclaration(nany, { - declare: true - }); - if (result) return result; - } - default: - if (tokenIsIdentifier(startType)) { - return this.tsParseDeclaration(nany, this.state.value, true, null); - } - } - }); - } - tsTryParseExportDeclaration() { - return this.tsParseDeclaration(this.startNode(), this.state.value, true, null); - } - tsParseExpressionStatement(node, expr, decorators) { - switch (expr.name) { - case "declare": - { - const declaration = this.tsTryParseDeclare(node); - if (declaration) { - declaration.declare = true; - } - return declaration; - } - case "global": - if (this.match(5)) { - this.scope.enter(256); - this.prodParam.enter(0); - const mod = node; - mod.kind = "global"; - { - node.global = true; - } - mod.id = expr; - mod.body = this.tsParseModuleBlock(); - this.scope.exit(); - this.prodParam.exit(); - return this.finishNode(mod, "TSModuleDeclaration"); - } - break; - default: - return this.tsParseDeclaration(node, expr.name, false, decorators); - } - } - tsParseDeclaration(node, value, next, decorators) { - switch (value) { - case "abstract": - if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) { - return this.tsParseAbstractDeclaration(node, decorators); - } - break; - case "module": - if (this.tsCheckLineTerminator(next)) { - if (this.match(134)) { - return this.tsParseAmbientExternalModuleDeclaration(node); - } else if (tokenIsIdentifier(this.state.type)) { - node.kind = "module"; - return this.tsParseModuleOrNamespaceDeclaration(node); - } - } - break; - case "namespace": - if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { - node.kind = "namespace"; - return this.tsParseModuleOrNamespaceDeclaration(node); - } - break; - case "type": - if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { - return this.tsParseTypeAliasDeclaration(node); - } - break; - } - } - tsCheckLineTerminator(next) { - if (next) { - if (this.hasFollowingLineBreak()) return false; - this.next(); - return true; - } - return !this.isLineTerminator(); - } - tsTryParseGenericAsyncArrowFunction(startLoc) { - if (!this.match(47)) return; - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - this.state.maybeInArrowParameters = true; - const res = this.tsTryParseAndCatch(() => { - const node = this.startNodeAt(startLoc); - node.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); - super.parseFunctionParams(node); - node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(); - this.expect(19); - return node; - }); - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - if (!res) return; - return super.parseArrowExpression(res, null, true); - } - tsParseTypeArgumentsInExpression() { - if (this.reScan_lt() !== 47) return; - return this.tsParseTypeArguments(); - } - tsParseTypeArguments() { - const node = this.startNode(); - node.params = this.tsInType(() => this.tsInTopLevelContext(() => { - this.expect(47); - return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this)); - })); - if (node.params.length === 0) { - this.raise(TSErrors.EmptyTypeArguments, node); - } else if (!this.state.inType && this.curContext() === types.brace) { - this.reScan_lt_gt(); - } - this.expect(48); - return this.finishNode(node, "TSTypeParameterInstantiation"); - } - tsIsDeclarationStart() { - return tokenIsTSDeclarationStart(this.state.type); - } - isExportDefaultSpecifier() { - if (this.tsIsDeclarationStart()) return false; - return super.isExportDefaultSpecifier(); - } - parseAssignableListItem(flags, decorators) { - const startLoc = this.state.startLoc; - const modified = {}; - this.tsParseModifiers({ - allowedModifiers: ["public", "private", "protected", "override", "readonly"] - }, modified); - const accessibility = modified.accessibility; - const override = modified.override; - const readonly = modified.readonly; - if (!(flags & 4) && (accessibility || readonly || override)) { - this.raise(TSErrors.UnexpectedParameterModifier, startLoc); - } - const left = this.parseMaybeDefault(); - if (flags & 2) { - this.parseFunctionParamType(left); - } - const elt = this.parseMaybeDefault(left.loc.start, left); - if (accessibility || readonly || override) { - const pp = this.startNodeAt(startLoc); - if (decorators.length) { - pp.decorators = decorators; - } - if (accessibility) pp.accessibility = accessibility; - if (readonly) pp.readonly = readonly; - if (override) pp.override = override; - if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { - this.raise(TSErrors.UnsupportedParameterPropertyKind, pp); - } - pp.parameter = elt; - return this.finishNode(pp, "TSParameterProperty"); - } - if (decorators.length) { - left.decorators = decorators; - } - return elt; - } - isSimpleParameter(node) { - return node.type === "TSParameterProperty" && super.isSimpleParameter(node.parameter) || super.isSimpleParameter(node); - } - tsDisallowOptionalPattern(node) { - for (const param of node.params) { - if (param.type !== "Identifier" && param.optional && !this.state.isAmbientContext) { - this.raise(TSErrors.PatternIsOptional, param); - } - } - } - setArrowFunctionParameters(node, params, trailingCommaLoc) { - super.setArrowFunctionParameters(node, params, trailingCommaLoc); - this.tsDisallowOptionalPattern(node); - } - parseFunctionBodyAndFinish(node, type, isMethod = false) { - if (this.match(14)) { - node.returnType = this.tsParseTypeOrTypePredicateAnnotation(14); - } - const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" || type === "ClassPrivateMethod" ? "TSDeclareMethod" : undefined; - if (bodilessType && !this.match(5) && this.isLineTerminator()) { - return this.finishNode(node, bodilessType); - } - if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) { - this.raise(TSErrors.DeclareFunctionHasImplementation, node); - if (node.declare) { - return super.parseFunctionBodyAndFinish(node, bodilessType, isMethod); - } - } - this.tsDisallowOptionalPattern(node); - return super.parseFunctionBodyAndFinish(node, type, isMethod); - } - registerFunctionStatementId(node) { - if (!node.body && node.id) { - this.checkIdentifier(node.id, 1024); - } else { - super.registerFunctionStatementId(node); - } - } - tsCheckForInvalidTypeCasts(items) { - items.forEach(node => { - if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") { - this.raise(TSErrors.UnexpectedTypeAnnotation, node.typeAnnotation); - } - }); - } - toReferencedList(exprList, isInParens) { - this.tsCheckForInvalidTypeCasts(exprList); - return exprList; - } - parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { - const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors); - if (node.type === "ArrayExpression") { - this.tsCheckForInvalidTypeCasts(node.elements); - } - return node; - } - parseSubscript(base, startLoc, noCalls, state) { - if (!this.hasPrecedingLineBreak() && this.match(35)) { - this.state.canStartJSXElement = false; - this.next(); - const nonNullExpression = this.startNodeAt(startLoc); - nonNullExpression.expression = base; - return this.finishNode(nonNullExpression, "TSNonNullExpression"); - } - let isOptionalCall = false; - if (this.match(18) && this.lookaheadCharCode() === 60) { - if (noCalls) { - state.stop = true; - return base; - } - state.optionalChainMember = isOptionalCall = true; - this.next(); - } - if (this.match(47) || this.match(51)) { - let missingParenErrorLoc; - const result = this.tsTryParseAndCatch(() => { - if (!noCalls && this.atPossibleAsyncArrow(base)) { - const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startLoc); - if (asyncArrowFn) { - return asyncArrowFn; - } - } - const typeArguments = this.tsParseTypeArgumentsInExpression(); - if (!typeArguments) return; - if (isOptionalCall && !this.match(10)) { - missingParenErrorLoc = this.state.curPosition(); - return; - } - if (tokenIsTemplate(this.state.type)) { - const result = super.parseTaggedTemplateExpression(base, startLoc, state); - { - result.typeParameters = typeArguments; - } - return result; - } - if (!noCalls && this.eat(10)) { - const node = this.startNodeAt(startLoc); - node.callee = base; - node.arguments = this.parseCallExpressionArguments(11); - this.tsCheckForInvalidTypeCasts(node.arguments); - { - node.typeParameters = typeArguments; - } - if (state.optionalChainMember) { - node.optional = isOptionalCall; - } - return this.finishCallExpression(node, state.optionalChainMember); - } - const tokenType = this.state.type; - if (tokenType === 48 || tokenType === 52 || tokenType !== 10 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) { - return; - } - const node = this.startNodeAt(startLoc); - node.expression = base; - { - node.typeParameters = typeArguments; - } - return this.finishNode(node, "TSInstantiationExpression"); - }); - if (missingParenErrorLoc) { - this.unexpected(missingParenErrorLoc, 10); - } - if (result) { - if (result.type === "TSInstantiationExpression" && (this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40)) { - this.raise(TSErrors.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc); - } - return result; - } - } - return super.parseSubscript(base, startLoc, noCalls, state); - } - parseNewCallee(node) { - var _callee$extra; - super.parseNewCallee(node); - const { - callee - } = node; - if (callee.type === "TSInstantiationExpression" && !((_callee$extra = callee.extra) != null && _callee$extra.parenthesized)) { - { - node.typeParameters = callee.typeParameters; - } - node.callee = callee.expression; - } - } - parseExprOp(left, leftStartLoc, minPrec) { - let isSatisfies; - if (tokenOperatorPrecedence(58) > minPrec && !this.hasPrecedingLineBreak() && (this.isContextual(93) || (isSatisfies = this.isContextual(120)))) { - const node = this.startNodeAt(leftStartLoc); - node.expression = left; - node.typeAnnotation = this.tsInType(() => { - this.next(); - if (this.match(75)) { - if (isSatisfies) { - this.raise(Errors.UnexpectedKeyword, this.state.startLoc, { - keyword: "const" - }); - } - return this.tsParseTypeReference(); - } - return this.tsParseType(); - }); - this.finishNode(node, isSatisfies ? "TSSatisfiesExpression" : "TSAsExpression"); - this.reScan_lt_gt(); - return this.parseExprOp(node, leftStartLoc, minPrec); - } - return super.parseExprOp(left, leftStartLoc, minPrec); - } - checkReservedWord(word, startLoc, checkKeywords, isBinding) { - if (!this.state.isAmbientContext) { - super.checkReservedWord(word, startLoc, checkKeywords, isBinding); - } - } - checkImportReflection(node) { - super.checkImportReflection(node); - if (node.module && node.importKind !== "value") { - this.raise(TSErrors.ImportReflectionHasImportType, node.specifiers[0].loc.start); - } - } - checkDuplicateExports() {} - isPotentialImportPhase(isExport) { - if (super.isPotentialImportPhase(isExport)) return true; - if (this.isContextual(130)) { - const ch = this.lookaheadCharCode(); - return isExport ? ch === 123 || ch === 42 : ch !== 61; - } - return !isExport && this.isContextual(87); - } - applyImportPhase(node, isExport, phase, loc) { - super.applyImportPhase(node, isExport, phase, loc); - if (isExport) { - node.exportKind = phase === "type" ? "type" : "value"; - } else { - node.importKind = phase === "type" || phase === "typeof" ? phase : "value"; - } - } - parseImport(node) { - if (this.match(134)) { - node.importKind = "value"; - return super.parseImport(node); - } - let importNode; - if (tokenIsIdentifier(this.state.type) && this.lookaheadCharCode() === 61) { - node.importKind = "value"; - return this.tsParseImportEqualsDeclaration(node); - } else if (this.isContextual(130)) { - const maybeDefaultIdentifier = this.parseMaybeImportPhase(node, false); - if (this.lookaheadCharCode() === 61) { - return this.tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier); - } else { - importNode = super.parseImportSpecifiersAndAfter(node, maybeDefaultIdentifier); - } - } else { - importNode = super.parseImport(node); - } - if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") { - this.raise(TSErrors.TypeImportCannotSpecifyDefaultAndNamed, importNode); - } - return importNode; - } - parseExport(node, decorators) { - if (this.match(83)) { - const nodeImportEquals = node; - this.next(); - let maybeDefaultIdentifier = null; - if (this.isContextual(130) && this.isPotentialImportPhase(false)) { - maybeDefaultIdentifier = this.parseMaybeImportPhase(nodeImportEquals, false); - } else { - nodeImportEquals.importKind = "value"; - } - const declaration = this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, true); - { - return declaration; - } - } else if (this.eat(29)) { - const assign = node; - assign.expression = super.parseExpression(); - this.semicolon(); - this.sawUnambiguousESM = true; - return this.finishNode(assign, "TSExportAssignment"); - } else if (this.eatContextual(93)) { - const decl = node; - this.expectContextual(128); - decl.id = this.parseIdentifier(); - this.semicolon(); - return this.finishNode(decl, "TSNamespaceExportDeclaration"); - } else { - return super.parseExport(node, decorators); - } - } - isAbstractClass() { - return this.isContextual(124) && this.lookahead().type === 80; - } - parseExportDefaultExpression() { - if (this.isAbstractClass()) { - const cls = this.startNode(); - this.next(); - cls.abstract = true; - return this.parseClass(cls, true, true); - } - if (this.match(129)) { - const result = this.tsParseInterfaceDeclaration(this.startNode()); - if (result) return result; - } - return super.parseExportDefaultExpression(); - } - parseVarStatement(node, kind, allowMissingInitializer = false) { - const { - isAmbientContext - } = this.state; - const declaration = super.parseVarStatement(node, kind, allowMissingInitializer || isAmbientContext); - if (!isAmbientContext) return declaration; - for (const { - id, - init - } of declaration.declarations) { - if (!init) continue; - if (kind !== "const" || !!id.typeAnnotation) { - this.raise(TSErrors.InitializerNotAllowedInAmbientContext, init); - } else if (!isValidAmbientConstInitializer(init, this.hasPlugin("estree"))) { - this.raise(TSErrors.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, init); - } - } - return declaration; - } - parseStatementContent(flags, decorators) { - if (this.match(75) && this.isLookaheadContextual("enum")) { - const node = this.startNode(); - this.expect(75); - return this.tsParseEnumDeclaration(node, { - const: true - }); - } - if (this.isContextual(126)) { - return this.tsParseEnumDeclaration(this.startNode()); - } - if (this.isContextual(129)) { - const result = this.tsParseInterfaceDeclaration(this.startNode()); - if (result) return result; - } - return super.parseStatementContent(flags, decorators); - } - parseAccessModifier() { - return this.tsParseModifier(["public", "protected", "private"]); - } - tsHasSomeModifiers(member, modifiers) { - return modifiers.some(modifier => { - if (tsIsAccessModifier(modifier)) { - return member.accessibility === modifier; - } - return !!member[modifier]; - }); - } - tsIsStartOfStaticBlocks() { - return this.isContextual(106) && this.lookaheadCharCode() === 123; - } - parseClassMember(classBody, member, state) { - const modifiers = ["declare", "private", "public", "protected", "override", "abstract", "readonly", "static"]; - this.tsParseModifiers({ - allowedModifiers: modifiers, - disallowedModifiers: ["in", "out"], - stopOnStartOfClassStaticBlock: true, - errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions - }, member); - const callParseClassMemberWithIsStatic = () => { - if (this.tsIsStartOfStaticBlocks()) { - this.next(); - this.next(); - if (this.tsHasSomeModifiers(member, modifiers)) { - this.raise(TSErrors.StaticBlockCannotHaveModifier, this.state.curPosition()); - } - super.parseClassStaticBlock(classBody, member); - } else { - this.parseClassMemberWithIsStatic(classBody, member, state, !!member.static); - } - }; - if (member.declare) { - this.tsInAmbientContext(callParseClassMemberWithIsStatic); - } else { - callParseClassMemberWithIsStatic(); - } - } - parseClassMemberWithIsStatic(classBody, member, state, isStatic) { - const idx = this.tsTryParseIndexSignature(member); - if (idx) { - classBody.body.push(idx); - if (member.abstract) { - this.raise(TSErrors.IndexSignatureHasAbstract, member); - } - if (member.accessibility) { - this.raise(TSErrors.IndexSignatureHasAccessibility, member, { - modifier: member.accessibility - }); - } - if (member.declare) { - this.raise(TSErrors.IndexSignatureHasDeclare, member); - } - if (member.override) { - this.raise(TSErrors.IndexSignatureHasOverride, member); - } - return; - } - if (!this.state.inAbstractClass && member.abstract) { - this.raise(TSErrors.NonAbstractClassHasAbstractMethod, member); - } - if (member.override) { - if (!state.hadSuperClass) { - this.raise(TSErrors.OverrideNotInSubClass, member); - } - } - super.parseClassMemberWithIsStatic(classBody, member, state, isStatic); - } - parsePostMemberNameModifiers(methodOrProp) { - const optional = this.eat(17); - if (optional) methodOrProp.optional = true; - if (methodOrProp.readonly && this.match(10)) { - this.raise(TSErrors.ClassMethodHasReadonly, methodOrProp); - } - if (methodOrProp.declare && this.match(10)) { - this.raise(TSErrors.ClassMethodHasDeclare, methodOrProp); - } - } - parseExpressionStatement(node, expr, decorators) { - const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr, decorators) : undefined; - return decl || super.parseExpressionStatement(node, expr, decorators); - } - shouldParseExportDeclaration() { - if (this.tsIsDeclarationStart()) return true; - return super.shouldParseExportDeclaration(); - } - parseConditional(expr, startLoc, refExpressionErrors) { - if (!this.state.maybeInArrowParameters || !this.match(17)) { - return super.parseConditional(expr, startLoc, refExpressionErrors); - } - const result = this.tryParse(() => super.parseConditional(expr, startLoc)); - if (!result.node) { - if (result.error) { - super.setOptionalParametersError(refExpressionErrors, result.error); - } - return expr; - } - if (result.error) this.state = result.failState; - return result.node; - } - parseParenItem(node, startLoc) { - const newNode = super.parseParenItem(node, startLoc); - if (this.eat(17)) { - newNode.optional = true; - this.resetEndLocation(node); - } - if (this.match(14)) { - const typeCastNode = this.startNodeAt(startLoc); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TSTypeCastExpression"); - } - return node; - } - parseExportDeclaration(node) { - if (!this.state.isAmbientContext && this.isContextual(125)) { - return this.tsInAmbientContext(() => this.parseExportDeclaration(node)); - } - const startLoc = this.state.startLoc; - const isDeclare = this.eatContextual(125); - if (isDeclare && (this.isContextual(125) || !this.shouldParseExportDeclaration())) { - throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare, this.state.startLoc); - } - const isIdentifier = tokenIsIdentifier(this.state.type); - const declaration = isIdentifier && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(node); - if (!declaration) return null; - if (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare) { - node.exportKind = "type"; - } - if (isDeclare && declaration.type !== "TSImportEqualsDeclaration") { - this.resetStartLocation(declaration, startLoc); - declaration.declare = true; - } - return declaration; - } - parseClassId(node, isStatement, optionalId, bindingType) { - if ((!isStatement || optionalId) && this.isContextual(113)) { - return; - } - super.parseClassId(node, isStatement, optionalId, node.declare ? 1024 : 8331); - const typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers); - if (typeParameters) node.typeParameters = typeParameters; - } - parseClassPropertyAnnotation(node) { - if (!node.optional) { - if (this.eat(35)) { - node.definite = true; - } else if (this.eat(17)) { - node.optional = true; - } - } - const type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - } - parseClassProperty(node) { - this.parseClassPropertyAnnotation(node); - if (this.state.isAmbientContext && !(node.readonly && !node.typeAnnotation) && this.match(29)) { - this.raise(TSErrors.DeclareClassFieldHasInitializer, this.state.startLoc); - } - if (node.abstract && this.match(29)) { - const { - key - } = node; - this.raise(TSErrors.AbstractPropertyHasInitializer, this.state.startLoc, { - propertyName: key.type === "Identifier" && !node.computed ? key.name : `[${this.input.slice(this.offsetToSourcePos(key.start), this.offsetToSourcePos(key.end))}]` - }); - } - return super.parseClassProperty(node); - } - parseClassPrivateProperty(node) { - if (node.abstract) { - this.raise(TSErrors.PrivateElementHasAbstract, node); - } - if (node.accessibility) { - this.raise(TSErrors.PrivateElementHasAccessibility, node, { - modifier: node.accessibility - }); - } - this.parseClassPropertyAnnotation(node); - return super.parseClassPrivateProperty(node); - } - parseClassAccessorProperty(node) { - this.parseClassPropertyAnnotation(node); - if (node.optional) { - this.raise(TSErrors.AccessorCannotBeOptional, node); - } - return super.parseClassAccessorProperty(node); - } - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); - if (typeParameters && isConstructor) { - this.raise(TSErrors.ConstructorHasTypeParameters, typeParameters); - } - const { - declare = false, - kind - } = method; - if (declare && (kind === "get" || kind === "set")) { - this.raise(TSErrors.DeclareAccessor, method, { - kind - }); - } - if (typeParameters) method.typeParameters = typeParameters; - super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); - } - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); - if (typeParameters) method.typeParameters = typeParameters; - super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); - } - declareClassPrivateMethodInScope(node, kind) { - if (node.type === "TSDeclareMethod") return; - if (node.type === "MethodDefinition" && !hasOwnProperty.call(node.value, "body")) { - return; - } - super.declareClassPrivateMethodInScope(node, kind); - } - parseClassSuper(node) { - super.parseClassSuper(node); - if (node.superClass && (this.match(47) || this.match(51))) { - { - node.superTypeParameters = this.tsParseTypeArgumentsInExpression(); - } - } - if (this.eatContextual(113)) { - node.implements = this.tsParseHeritageClause("implements"); - } - } - parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { - const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); - if (typeParameters) prop.typeParameters = typeParameters; - return super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); - } - parseFunctionParams(node, isConstructor) { - const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); - if (typeParameters) node.typeParameters = typeParameters; - super.parseFunctionParams(node, isConstructor); - } - parseVarId(decl, kind) { - super.parseVarId(decl, kind); - if (decl.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.eat(35)) { - decl.definite = true; - } - const type = this.tsTryParseTypeAnnotation(); - if (type) { - decl.id.typeAnnotation = type; - this.resetEndLocation(decl.id); - } - } - parseAsyncArrowFromCallExpression(node, call) { - if (this.match(14)) { - node.returnType = this.tsParseTypeAnnotation(); - } - return super.parseAsyncArrowFromCallExpression(node, call); - } - parseMaybeAssign(refExpressionErrors, afterLeftParse) { - var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2; - let state; - let jsx; - let typeCast; - if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) { - state = this.state.clone(); - jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); - if (!jsx.error) return jsx.node; - const { - context - } = this.state; - const currentContext = context[context.length - 1]; - if (currentContext === types.j_oTag || currentContext === types.j_expr) { - context.pop(); - } - } - if (!((_jsx = jsx) != null && _jsx.error) && !this.match(47)) { - return super.parseMaybeAssign(refExpressionErrors, afterLeftParse); - } - if (!state || state === this.state) state = this.state.clone(); - let typeParameters; - const arrow = this.tryParse(abort => { - var _expr$extra, _typeParameters; - typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); - const expr = super.parseMaybeAssign(refExpressionErrors, afterLeftParse); - if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) { - abort(); - } - if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) { - this.resetStartLocationFromNode(expr, typeParameters); - } - expr.typeParameters = typeParameters; - return expr; - }, state); - if (!arrow.error && !arrow.aborted) { - if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); - return arrow.node; - } - if (!jsx) { - assert(!this.hasPlugin("jsx")); - typeCast = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); - if (!typeCast.error) return typeCast.node; - } - if ((_jsx2 = jsx) != null && _jsx2.node) { - this.state = jsx.failState; - return jsx.node; - } - if (arrow.node) { - this.state = arrow.failState; - if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); - return arrow.node; - } - if ((_typeCast = typeCast) != null && _typeCast.node) { - this.state = typeCast.failState; - return typeCast.node; - } - throw ((_jsx3 = jsx) == null ? void 0 : _jsx3.error) || arrow.error || ((_typeCast2 = typeCast) == null ? void 0 : _typeCast2.error); - } - reportReservedArrowTypeParam(node) { - var _node$extra; - if (node.params.length === 1 && !node.params[0].constraint && !((_node$extra = node.extra) != null && _node$extra.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { - this.raise(TSErrors.ReservedArrowTypeParam, node); - } - } - parseMaybeUnary(refExpressionErrors, sawUnary) { - if (!this.hasPlugin("jsx") && this.match(47)) { - return this.tsParseTypeAssertion(); - } - return super.parseMaybeUnary(refExpressionErrors, sawUnary); - } - parseArrow(node) { - if (this.match(14)) { - const result = this.tryParse(abort => { - const returnType = this.tsParseTypeOrTypePredicateAnnotation(14); - if (this.canInsertSemicolon() || !this.match(19)) abort(); - return returnType; - }); - if (result.aborted) return; - if (!result.thrown) { - if (result.error) this.state = result.failState; - node.returnType = result.node; - } - } - return super.parseArrow(node); - } - parseFunctionParamType(param) { - if (this.eat(17)) { - param.optional = true; - } - const type = this.tsTryParseTypeAnnotation(); - if (type) param.typeAnnotation = type; - this.resetEndLocation(param); - return param; - } - isAssignable(node, isBinding) { - switch (node.type) { - case "TSTypeCastExpression": - return this.isAssignable(node.expression, isBinding); - case "TSParameterProperty": - return true; - default: - return super.isAssignable(node, isBinding); - } - } - toAssignable(node, isLHS = false) { - switch (node.type) { - case "ParenthesizedExpression": - this.toAssignableParenthesizedExpression(node, isLHS); - break; - case "TSAsExpression": - case "TSSatisfiesExpression": - case "TSNonNullExpression": - case "TSTypeAssertion": - if (isLHS) { - this.expressionScope.recordArrowParameterBindingError(TSErrors.UnexpectedTypeCastInParameter, node); - } else { - this.raise(TSErrors.UnexpectedTypeCastInParameter, node); - } - this.toAssignable(node.expression, isLHS); - break; - case "AssignmentExpression": - if (!isLHS && node.left.type === "TSTypeCastExpression") { - node.left = this.typeCastToParameter(node.left); - } - default: - super.toAssignable(node, isLHS); - } - } - toAssignableParenthesizedExpression(node, isLHS) { - switch (node.expression.type) { - case "TSAsExpression": - case "TSSatisfiesExpression": - case "TSNonNullExpression": - case "TSTypeAssertion": - case "ParenthesizedExpression": - this.toAssignable(node.expression, isLHS); - break; - default: - super.toAssignable(node, isLHS); - } - } - checkToRestConversion(node, allowPattern) { - switch (node.type) { - case "TSAsExpression": - case "TSSatisfiesExpression": - case "TSTypeAssertion": - case "TSNonNullExpression": - this.checkToRestConversion(node.expression, false); - break; - default: - super.checkToRestConversion(node, allowPattern); - } - } - isValidLVal(type, isUnparenthesizedInAssign, binding) { - switch (type) { - case "TSTypeCastExpression": - return true; - case "TSParameterProperty": - return "parameter"; - case "TSNonNullExpression": - case "TSInstantiationExpression": - return "expression"; - case "TSAsExpression": - case "TSSatisfiesExpression": - case "TSTypeAssertion": - return (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true]; - default: - return super.isValidLVal(type, isUnparenthesizedInAssign, binding); - } - } - parseBindingAtom() { - if (this.state.type === 78) { - return this.parseIdentifier(true); - } - return super.parseBindingAtom(); - } - parseMaybeDecoratorArguments(expr, startLoc) { - if (this.match(47) || this.match(51)) { - const typeArguments = this.tsParseTypeArgumentsInExpression(); - if (this.match(10)) { - const call = super.parseMaybeDecoratorArguments(expr, startLoc); - { - call.typeParameters = typeArguments; - } - return call; - } - this.unexpected(null, 10); - } - return super.parseMaybeDecoratorArguments(expr, startLoc); - } - checkCommaAfterRest(close) { - if (this.state.isAmbientContext && this.match(12) && this.lookaheadCharCode() === close) { - this.next(); - return false; - } - return super.checkCommaAfterRest(close); - } - isClassMethod() { - return this.match(47) || super.isClassMethod(); - } - isClassProperty() { - return this.match(35) || this.match(14) || super.isClassProperty(); - } - parseMaybeDefault(startLoc, left) { - const node = super.parseMaybeDefault(startLoc, left); - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(TSErrors.TypeAnnotationAfterAssign, node.typeAnnotation); - } - return node; - } - getTokenFromCode(code) { - if (this.state.inType) { - if (code === 62) { - this.finishOp(48, 1); - return; - } - if (code === 60) { - this.finishOp(47, 1); - return; - } - } - super.getTokenFromCode(code); - } - reScan_lt_gt() { - const { - type - } = this.state; - if (type === 47) { - this.state.pos -= 1; - this.readToken_lt(); - } else if (type === 48) { - this.state.pos -= 1; - this.readToken_gt(); - } - } - reScan_lt() { - const { - type - } = this.state; - if (type === 51) { - this.state.pos -= 2; - this.finishOp(47, 1); - return 47; - } - return type; - } - toAssignableList(exprList, trailingCommaLoc, isLHS) { - for (let i = 0; i < exprList.length; i++) { - const expr = exprList[i]; - if ((expr == null ? void 0 : expr.type) === "TSTypeCastExpression") { - exprList[i] = this.typeCastToParameter(expr); - } - } - super.toAssignableList(exprList, trailingCommaLoc, isLHS); - } - typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); - return node.expression; - } - shouldParseArrow(params) { - if (this.match(14)) { - return params.every(expr => this.isAssignable(expr, true)); - } - return super.shouldParseArrow(params); - } - shouldParseAsyncArrow() { - return this.match(14) || super.shouldParseAsyncArrow(); - } - canHaveLeadingDecorator() { - return super.canHaveLeadingDecorator() || this.isAbstractClass(); - } - jsxParseOpeningElementAfterName(node) { - if (this.match(47) || this.match(51)) { - const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression()); - if (typeArguments) { - { - node.typeParameters = typeArguments; - } - } - } - return super.jsxParseOpeningElementAfterName(node); - } - getGetterSetterExpectedParamCount(method) { - const baseCount = super.getGetterSetterExpectedParamCount(method); - const params = this.getObjectOrClassMethodParams(method); - const firstParam = params[0]; - const hasContextParam = firstParam && this.isThisParam(firstParam); - return hasContextParam ? baseCount + 1 : baseCount; - } - parseCatchClauseParam() { - const param = super.parseCatchClauseParam(); - const type = this.tsTryParseTypeAnnotation(); - if (type) { - param.typeAnnotation = type; - this.resetEndLocation(param); - } - return param; - } - tsInAmbientContext(cb) { - const { - isAmbientContext: oldIsAmbientContext, - strict: oldStrict - } = this.state; - this.state.isAmbientContext = true; - this.state.strict = false; - try { - return cb(); - } finally { - this.state.isAmbientContext = oldIsAmbientContext; - this.state.strict = oldStrict; - } - } - parseClass(node, isStatement, optionalId) { - const oldInAbstractClass = this.state.inAbstractClass; - this.state.inAbstractClass = !!node.abstract; - try { - return super.parseClass(node, isStatement, optionalId); - } finally { - this.state.inAbstractClass = oldInAbstractClass; - } - } - tsParseAbstractDeclaration(node, decorators) { - if (this.match(80)) { - node.abstract = true; - return this.maybeTakeDecorators(decorators, this.parseClass(node, true, false)); - } else if (this.isContextual(129)) { - if (!this.hasFollowingLineBreak()) { - node.abstract = true; - this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifer, node); - return this.tsParseInterfaceDeclaration(node); - } - } else { - this.unexpected(null, 80); - } - } - parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) { - const method = super.parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); - if (method.abstract) { - const hasEstreePlugin = this.hasPlugin("estree"); - const methodFn = hasEstreePlugin ? method.value : method; - if (methodFn.body) { - const { - key - } = method; - this.raise(TSErrors.AbstractMethodHasImplementation, method, { - methodName: key.type === "Identifier" && !method.computed ? key.name : `[${this.input.slice(this.offsetToSourcePos(key.start), this.offsetToSourcePos(key.end))}]` - }); - } - } - return method; - } - tsParseTypeParameterName() { - const typeName = this.parseIdentifier(); - return typeName.name; - } - shouldParseAsAmbientContext() { - return !!this.getPluginOption("typescript", "dts"); - } - parse() { - if (this.shouldParseAsAmbientContext()) { - this.state.isAmbientContext = true; - } - return super.parse(); - } - getExpression() { - if (this.shouldParseAsAmbientContext()) { - this.state.isAmbientContext = true; - } - return super.getExpression(); - } - parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { - if (!isString && isMaybeTypeOnly) { - this.parseTypeOnlyImportExportSpecifier(node, false, isInTypeExport); - return this.finishNode(node, "ExportSpecifier"); - } - node.exportKind = "value"; - return super.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly); - } - parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { - if (!importedIsString && isMaybeTypeOnly) { - this.parseTypeOnlyImportExportSpecifier(specifier, true, isInTypeOnlyImport); - return this.finishNode(specifier, "ImportSpecifier"); - } - specifier.importKind = "value"; - return super.parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, isInTypeOnlyImport ? 4098 : 4096); - } - parseTypeOnlyImportExportSpecifier(node, isImport, isInTypeOnlyImportExport) { - const leftOfAsKey = isImport ? "imported" : "local"; - const rightOfAsKey = isImport ? "local" : "exported"; - let leftOfAs = node[leftOfAsKey]; - let rightOfAs; - let hasTypeSpecifier = false; - let canParseAsKeyword = true; - const loc = leftOfAs.loc.start; - if (this.isContextual(93)) { - const firstAs = this.parseIdentifier(); - if (this.isContextual(93)) { - const secondAs = this.parseIdentifier(); - if (tokenIsKeywordOrIdentifier(this.state.type)) { - hasTypeSpecifier = true; - leftOfAs = firstAs; - rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName(); - canParseAsKeyword = false; - } else { - rightOfAs = secondAs; - canParseAsKeyword = false; - } - } else if (tokenIsKeywordOrIdentifier(this.state.type)) { - canParseAsKeyword = false; - rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName(); - } else { - hasTypeSpecifier = true; - leftOfAs = firstAs; - } - } else if (tokenIsKeywordOrIdentifier(this.state.type)) { - hasTypeSpecifier = true; - if (isImport) { - leftOfAs = this.parseIdentifier(true); - if (!this.isContextual(93)) { - this.checkReservedWord(leftOfAs.name, leftOfAs.loc.start, true, true); - } - } else { - leftOfAs = this.parseModuleExportName(); - } - } - if (hasTypeSpecifier && isInTypeOnlyImportExport) { - this.raise(isImport ? TSErrors.TypeModifierIsUsedInTypeImports : TSErrors.TypeModifierIsUsedInTypeExports, loc); - } - node[leftOfAsKey] = leftOfAs; - node[rightOfAsKey] = rightOfAs; - const kindKey = isImport ? "importKind" : "exportKind"; - node[kindKey] = hasTypeSpecifier ? "type" : "value"; - if (canParseAsKeyword && this.eatContextual(93)) { - node[rightOfAsKey] = isImport ? this.parseIdentifier() : this.parseModuleExportName(); - } - if (!node[rightOfAsKey]) { - node[rightOfAsKey] = cloneIdentifier(node[leftOfAsKey]); - } - if (isImport) { - this.checkIdentifier(node[rightOfAsKey], hasTypeSpecifier ? 4098 : 4096); - } - } -}; -function isPossiblyLiteralEnum(expression) { - if (expression.type !== "MemberExpression") return false; - const { - computed, - property - } = expression; - if (computed && property.type !== "StringLiteral" && (property.type !== "TemplateLiteral" || property.expressions.length > 0)) { - return false; - } - return isUncomputedMemberExpressionChain(expression.object); -} -function isValidAmbientConstInitializer(expression, estree) { - var _expression$extra; - const { - type - } = expression; - if ((_expression$extra = expression.extra) != null && _expression$extra.parenthesized) { - return false; - } - if (estree) { - if (type === "Literal") { - const { - value - } = expression; - if (typeof value === "string" || typeof value === "boolean") { - return true; - } - } - } else { - if (type === "StringLiteral" || type === "BooleanLiteral") { - return true; - } - } - if (isNumber(expression, estree) || isNegativeNumber(expression, estree)) { - return true; - } - if (type === "TemplateLiteral" && expression.expressions.length === 0) { - return true; - } - if (isPossiblyLiteralEnum(expression)) { - return true; - } - return false; -} -function isNumber(expression, estree) { - if (estree) { - return expression.type === "Literal" && (typeof expression.value === "number" || "bigint" in expression); - } - return expression.type === "NumericLiteral" || expression.type === "BigIntLiteral"; -} -function isNegativeNumber(expression, estree) { - if (expression.type === "UnaryExpression") { - const { - operator, - argument - } = expression; - if (operator === "-" && isNumber(argument, estree)) { - return true; - } - } - return false; -} -function isUncomputedMemberExpressionChain(expression) { - if (expression.type === "Identifier") return true; - if (expression.type !== "MemberExpression" || expression.computed) { - return false; - } - return isUncomputedMemberExpressionChain(expression.object); -} -const PlaceholderErrors = ParseErrorEnum`placeholders`({ - ClassNameIsRequired: "A class name is required.", - UnexpectedSpace: "Unexpected space in placeholder." -}); -var placeholders = superClass => class PlaceholdersParserMixin extends superClass { - parsePlaceholder(expectedNode) { - if (this.match(133)) { - const node = this.startNode(); - this.next(); - this.assertNoSpace(); - node.name = super.parseIdentifier(true); - this.assertNoSpace(); - this.expect(133); - return this.finishPlaceholder(node, expectedNode); - } - } - finishPlaceholder(node, expectedNode) { - let placeholder = node; - if (!placeholder.expectedNode || !placeholder.type) { - placeholder = this.finishNode(placeholder, "Placeholder"); - } - placeholder.expectedNode = expectedNode; - return placeholder; - } - getTokenFromCode(code) { - if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) { - this.finishOp(133, 2); - } else { - super.getTokenFromCode(code); - } - } - parseExprAtom(refExpressionErrors) { - return this.parsePlaceholder("Expression") || super.parseExprAtom(refExpressionErrors); - } - parseIdentifier(liberal) { - return this.parsePlaceholder("Identifier") || super.parseIdentifier(liberal); - } - checkReservedWord(word, startLoc, checkKeywords, isBinding) { - if (word !== undefined) { - super.checkReservedWord(word, startLoc, checkKeywords, isBinding); - } - } - parseBindingAtom() { - return this.parsePlaceholder("Pattern") || super.parseBindingAtom(); - } - isValidLVal(type, isParenthesized, binding) { - return type === "Placeholder" || super.isValidLVal(type, isParenthesized, binding); - } - toAssignable(node, isLHS) { - if (node && node.type === "Placeholder" && node.expectedNode === "Expression") { - node.expectedNode = "Pattern"; - } else { - super.toAssignable(node, isLHS); - } - } - chStartsBindingIdentifier(ch, pos) { - if (super.chStartsBindingIdentifier(ch, pos)) { - return true; - } - const nextToken = this.lookahead(); - if (nextToken.type === 133) { - return true; - } - return false; - } - verifyBreakContinue(node, isBreak) { - if (node.label && node.label.type === "Placeholder") return; - super.verifyBreakContinue(node, isBreak); - } - parseExpressionStatement(node, expr) { - var _expr$extra; - if (expr.type !== "Placeholder" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) { - return super.parseExpressionStatement(node, expr); - } - if (this.match(14)) { - const stmt = node; - stmt.label = this.finishPlaceholder(expr, "Identifier"); - this.next(); - stmt.body = super.parseStatementOrSloppyAnnexBFunctionDeclaration(); - return this.finishNode(stmt, "LabeledStatement"); - } - this.semicolon(); - const stmtPlaceholder = node; - stmtPlaceholder.name = expr.name; - return this.finishPlaceholder(stmtPlaceholder, "Statement"); - } - parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse) { - return this.parsePlaceholder("BlockStatement") || super.parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse); - } - parseFunctionId(requireId) { - return this.parsePlaceholder("Identifier") || super.parseFunctionId(requireId); - } - parseClass(node, isStatement, optionalId) { - const type = isStatement ? "ClassDeclaration" : "ClassExpression"; - this.next(); - const oldStrict = this.state.strict; - const placeholder = this.parsePlaceholder("Identifier"); - if (placeholder) { - if (this.match(81) || this.match(133) || this.match(5)) { - node.id = placeholder; - } else if (optionalId || !isStatement) { - node.id = null; - node.body = this.finishPlaceholder(placeholder, "ClassBody"); - return this.finishNode(node, type); - } else { - throw this.raise(PlaceholderErrors.ClassNameIsRequired, this.state.startLoc); - } - } else { - this.parseClassId(node, isStatement, optionalId); - } - super.parseClassSuper(node); - node.body = this.parsePlaceholder("ClassBody") || super.parseClassBody(!!node.superClass, oldStrict); - return this.finishNode(node, type); - } - parseExport(node, decorators) { - const placeholder = this.parsePlaceholder("Identifier"); - if (!placeholder) return super.parseExport(node, decorators); - const node2 = node; - if (!this.isContextual(98) && !this.match(12)) { - node2.specifiers = []; - node2.source = null; - node2.declaration = this.finishPlaceholder(placeholder, "Declaration"); - return this.finishNode(node2, "ExportNamedDeclaration"); - } - this.expectPlugin("exportDefaultFrom"); - const specifier = this.startNode(); - specifier.exported = placeholder; - node2.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - return super.parseExport(node2, decorators); - } - isExportDefaultSpecifier() { - if (this.match(65)) { - const next = this.nextTokenStart(); - if (this.isUnparsedContextual(next, "from")) { - if (this.input.startsWith(tokenLabelName(133), this.nextTokenStartSince(next + 4))) { - return true; - } - } - } - return super.isExportDefaultSpecifier(); - } - maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier) { - var _specifiers; - if ((_specifiers = node.specifiers) != null && _specifiers.length) { - return true; - } - return super.maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier); - } - checkExport(node) { - const { - specifiers - } = node; - if (specifiers != null && specifiers.length) { - node.specifiers = specifiers.filter(node => node.exported.type === "Placeholder"); - } - super.checkExport(node); - node.specifiers = specifiers; - } - parseImport(node) { - const placeholder = this.parsePlaceholder("Identifier"); - if (!placeholder) return super.parseImport(node); - node.specifiers = []; - if (!this.isContextual(98) && !this.match(12)) { - node.source = this.finishPlaceholder(placeholder, "StringLiteral"); - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - } - const specifier = this.startNodeAtNode(placeholder); - specifier.local = placeholder; - node.specifiers.push(this.finishNode(specifier, "ImportDefaultSpecifier")); - if (this.eat(12)) { - const hasStarImport = this.maybeParseStarImportSpecifier(node); - if (!hasStarImport) this.parseNamedImportSpecifiers(node); - } - this.expectContextual(98); - node.source = this.parseImportSource(); - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - } - parseImportSource() { - return this.parsePlaceholder("StringLiteral") || super.parseImportSource(); - } - assertNoSpace() { - if (this.state.start > this.offsetToSourcePos(this.state.lastTokEndLoc.index)) { - this.raise(PlaceholderErrors.UnexpectedSpace, this.state.lastTokEndLoc); - } - } -}; -var v8intrinsic = superClass => class V8IntrinsicMixin extends superClass { - parseV8Intrinsic() { - if (this.match(54)) { - const v8IntrinsicStartLoc = this.state.startLoc; - const node = this.startNode(); - this.next(); - if (tokenIsIdentifier(this.state.type)) { - const name = this.parseIdentifierName(); - const identifier = this.createIdentifier(node, name); - identifier.type = "V8IntrinsicIdentifier"; - if (this.match(10)) { - return identifier; - } - } - this.unexpected(v8IntrinsicStartLoc); - } - } - parseExprAtom(refExpressionErrors) { - return this.parseV8Intrinsic() || super.parseExprAtom(refExpressionErrors); - } -}; -const PIPELINE_PROPOSALS = ["minimal", "fsharp", "hack", "smart"]; -const TOPIC_TOKENS = ["^^", "@@", "^", "%", "#"]; -function validatePlugins(pluginsMap) { - if (pluginsMap.has("decorators")) { - if (pluginsMap.has("decorators-legacy")) { - throw new Error("Cannot use the decorators and decorators-legacy plugin together"); - } - const decoratorsBeforeExport = pluginsMap.get("decorators").decoratorsBeforeExport; - if (decoratorsBeforeExport != null && typeof decoratorsBeforeExport !== "boolean") { - throw new Error("'decoratorsBeforeExport' must be a boolean, if specified."); - } - const allowCallParenthesized = pluginsMap.get("decorators").allowCallParenthesized; - if (allowCallParenthesized != null && typeof allowCallParenthesized !== "boolean") { - throw new Error("'allowCallParenthesized' must be a boolean."); - } - } - if (pluginsMap.has("flow") && pluginsMap.has("typescript")) { - throw new Error("Cannot combine flow and typescript plugins."); - } - if (pluginsMap.has("placeholders") && pluginsMap.has("v8intrinsic")) { - throw new Error("Cannot combine placeholders and v8intrinsic plugins."); - } - if (pluginsMap.has("pipelineOperator")) { - var _pluginsMap$get; - const proposal = pluginsMap.get("pipelineOperator").proposal; - if (!PIPELINE_PROPOSALS.includes(proposal)) { - const proposalList = PIPELINE_PROPOSALS.map(p => `"${p}"`).join(", "); - throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`); - } - const tupleSyntaxIsHash = ((_pluginsMap$get = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get.syntaxType) === "hash"; - if (proposal === "hack") { - if (pluginsMap.has("placeholders")) { - throw new Error("Cannot combine placeholders plugin and Hack-style pipes."); - } - if (pluginsMap.has("v8intrinsic")) { - throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes."); - } - const topicToken = pluginsMap.get("pipelineOperator").topicToken; - if (!TOPIC_TOKENS.includes(topicToken)) { - const tokenList = TOPIC_TOKENS.map(t => `"${t}"`).join(", "); - throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`); - } - if (topicToken === "#" && tupleSyntaxIsHash) { - throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`); - } - } else if (proposal === "smart" && tupleSyntaxIsHash) { - throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`); - } - } - if (pluginsMap.has("moduleAttributes")) { - { - if (pluginsMap.has("deprecatedImportAssert") || pluginsMap.has("importAssertions")) { - throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins."); - } - const moduleAttributesVersionPluginOption = pluginsMap.get("moduleAttributes").version; - if (moduleAttributesVersionPluginOption !== "may-2020") { - throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'."); - } - } - } - if (pluginsMap.has("importAssertions")) { - if (pluginsMap.has("deprecatedImportAssert")) { - throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins."); - } - } - if (!pluginsMap.has("deprecatedImportAssert") && pluginsMap.has("importAttributes") && pluginsMap.get("importAttributes").deprecatedAssertSyntax) { - { - pluginsMap.set("deprecatedImportAssert", {}); - } - } - if (pluginsMap.has("recordAndTuple")) { - const syntaxType = pluginsMap.get("recordAndTuple").syntaxType; - if (syntaxType != null) { - { - const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"]; - if (!RECORD_AND_TUPLE_SYNTAX_TYPES.includes(syntaxType)) { - throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(", ")); - } - } - } - } - if (pluginsMap.has("asyncDoExpressions") && !pluginsMap.has("doExpressions")) { - const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins."); - error.missingPlugins = "doExpressions"; - throw error; - } - if (pluginsMap.has("optionalChainingAssign") && pluginsMap.get("optionalChainingAssign").version !== "2023-07") { - throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is '2023-07'."); - } -} -const mixinPlugins = { - estree, - jsx, - flow, - typescript, - v8intrinsic, - placeholders -}; -const mixinPluginNames = Object.keys(mixinPlugins); -class ExpressionParser extends LValParser { - checkProto(prop, isRecord, protoRef, refExpressionErrors) { - if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) { - return; - } - const key = prop.key; - const name = key.type === "Identifier" ? key.name : key.value; - if (name === "__proto__") { - if (isRecord) { - this.raise(Errors.RecordNoProto, key); - return; - } - if (protoRef.used) { - if (refExpressionErrors) { - if (refExpressionErrors.doubleProtoLoc === null) { - refExpressionErrors.doubleProtoLoc = key.loc.start; - } - } else { - this.raise(Errors.DuplicateProto, key); - } - } - protoRef.used = true; - } - } - shouldExitDescending(expr, potentialArrowAt) { - return expr.type === "ArrowFunctionExpression" && this.offsetToSourcePos(expr.start) === potentialArrowAt; - } - getExpression() { - this.enterInitialScopes(); - this.nextToken(); - const expr = this.parseExpression(); - if (!this.match(140)) { - this.unexpected(); - } - this.finalizeRemainingComments(); - expr.comments = this.comments; - expr.errors = this.state.errors; - if (this.optionFlags & 128) { - expr.tokens = this.tokens; - } - return expr; - } - parseExpression(disallowIn, refExpressionErrors) { - if (disallowIn) { - return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors)); - } - return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors)); - } - parseExpressionBase(refExpressionErrors) { - const startLoc = this.state.startLoc; - const expr = this.parseMaybeAssign(refExpressionErrors); - if (this.match(12)) { - const node = this.startNodeAt(startLoc); - node.expressions = [expr]; - while (this.eat(12)) { - node.expressions.push(this.parseMaybeAssign(refExpressionErrors)); - } - this.toReferencedList(node.expressions); - return this.finishNode(node, "SequenceExpression"); - } - return expr; - } - parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse) { - return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); - } - parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse) { - return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); - } - setOptionalParametersError(refExpressionErrors, resultError) { - var _resultError$loc; - refExpressionErrors.optionalParametersLoc = (_resultError$loc = resultError == null ? void 0 : resultError.loc) != null ? _resultError$loc : this.state.startLoc; - } - parseMaybeAssign(refExpressionErrors, afterLeftParse) { - const startLoc = this.state.startLoc; - if (this.isContextual(108)) { - if (this.prodParam.hasYield) { - let left = this.parseYield(); - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startLoc); - } - return left; - } - } - let ownExpressionErrors; - if (refExpressionErrors) { - ownExpressionErrors = false; - } else { - refExpressionErrors = new ExpressionErrors(); - ownExpressionErrors = true; - } - const { - type - } = this.state; - if (type === 10 || tokenIsIdentifier(type)) { - this.state.potentialArrowAt = this.state.start; - } - let left = this.parseMaybeConditional(refExpressionErrors); - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startLoc); - } - if (tokenIsAssignment(this.state.type)) { - const node = this.startNodeAt(startLoc); - const operator = this.state.value; - node.operator = operator; - if (this.match(29)) { - this.toAssignable(left, true); - node.left = left; - const startIndex = startLoc.index; - if (refExpressionErrors.doubleProtoLoc != null && refExpressionErrors.doubleProtoLoc.index >= startIndex) { - refExpressionErrors.doubleProtoLoc = null; - } - if (refExpressionErrors.shorthandAssignLoc != null && refExpressionErrors.shorthandAssignLoc.index >= startIndex) { - refExpressionErrors.shorthandAssignLoc = null; - } - if (refExpressionErrors.privateKeyLoc != null && refExpressionErrors.privateKeyLoc.index >= startIndex) { - this.checkDestructuringPrivate(refExpressionErrors); - refExpressionErrors.privateKeyLoc = null; - } - } else { - node.left = left; - } - this.next(); - node.right = this.parseMaybeAssign(); - this.checkLVal(left, this.finishNode(node, "AssignmentExpression")); - return node; - } else if (ownExpressionErrors) { - this.checkExpressionErrors(refExpressionErrors, true); - } - return left; - } - parseMaybeConditional(refExpressionErrors) { - const startLoc = this.state.startLoc; - const potentialArrowAt = this.state.potentialArrowAt; - const expr = this.parseExprOps(refExpressionErrors); - if (this.shouldExitDescending(expr, potentialArrowAt)) { - return expr; - } - return this.parseConditional(expr, startLoc, refExpressionErrors); - } - parseConditional(expr, startLoc, refExpressionErrors) { - if (this.eat(17)) { - const node = this.startNodeAt(startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssignAllowIn(); - this.expect(14); - node.alternate = this.parseMaybeAssign(); - return this.finishNode(node, "ConditionalExpression"); - } - return expr; - } - parseMaybeUnaryOrPrivate(refExpressionErrors) { - return this.match(139) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors); - } - parseExprOps(refExpressionErrors) { - const startLoc = this.state.startLoc; - const potentialArrowAt = this.state.potentialArrowAt; - const expr = this.parseMaybeUnaryOrPrivate(refExpressionErrors); - if (this.shouldExitDescending(expr, potentialArrowAt)) { - return expr; - } - return this.parseExprOp(expr, startLoc, -1); - } - parseExprOp(left, leftStartLoc, minPrec) { - if (this.isPrivateName(left)) { - const value = this.getPrivateNameSV(left); - if (minPrec >= tokenOperatorPrecedence(58) || !this.prodParam.hasIn || !this.match(58)) { - this.raise(Errors.PrivateInExpectedIn, left, { - identifierName: value - }); - } - this.classScope.usePrivateName(value, left.loc.start); - } - const op = this.state.type; - if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(58))) { - let prec = tokenOperatorPrecedence(op); - if (prec > minPrec) { - if (op === 39) { - this.expectPlugin("pipelineOperator"); - if (this.state.inFSharpPipelineDirectBody) { - return left; - } - this.checkPipelineAtInfixOperator(left, leftStartLoc); - } - const node = this.startNodeAt(leftStartLoc); - node.left = left; - node.operator = this.state.value; - const logical = op === 41 || op === 42; - const coalesce = op === 40; - if (coalesce) { - prec = tokenOperatorPrecedence(42); - } - this.next(); - if (op === 39 && this.hasPlugin(["pipelineOperator", { - proposal: "minimal" - }])) { - if (this.state.type === 96 && this.prodParam.hasAwait) { - throw this.raise(Errors.UnexpectedAwaitAfterPipelineBody, this.state.startLoc); - } - } - node.right = this.parseExprOpRightExpr(op, prec); - const finishedNode = this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression"); - const nextOp = this.state.type; - if (coalesce && (nextOp === 41 || nextOp === 42) || logical && nextOp === 40) { - throw this.raise(Errors.MixingCoalesceWithLogical, this.state.startLoc); - } - return this.parseExprOp(finishedNode, leftStartLoc, minPrec); - } - } - return left; - } - parseExprOpRightExpr(op, prec) { - const startLoc = this.state.startLoc; - switch (op) { - case 39: - switch (this.getPluginOption("pipelineOperator", "proposal")) { - case "hack": - return this.withTopicBindingContext(() => { - return this.parseHackPipeBody(); - }); - case "fsharp": - return this.withSoloAwaitPermittingContext(() => { - return this.parseFSharpPipelineBody(prec); - }); - } - if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { - return this.withTopicBindingContext(() => { - if (this.prodParam.hasYield && this.isContextual(108)) { - throw this.raise(Errors.PipeBodyIsTighter, this.state.startLoc); - } - return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startLoc); - }); - } - default: - return this.parseExprOpBaseRightExpr(op, prec); - } - } - parseExprOpBaseRightExpr(op, prec) { - const startLoc = this.state.startLoc; - return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, tokenIsRightAssociative(op) ? prec - 1 : prec); - } - parseHackPipeBody() { - var _body$extra; - const { - startLoc - } = this.state; - const body = this.parseMaybeAssign(); - const requiredParentheses = UnparenthesizedPipeBodyDescriptions.has(body.type); - if (requiredParentheses && !((_body$extra = body.extra) != null && _body$extra.parenthesized)) { - this.raise(Errors.PipeUnparenthesizedBody, startLoc, { - type: body.type - }); - } - if (!this.topicReferenceWasUsedInCurrentContext()) { - this.raise(Errors.PipeTopicUnused, startLoc); - } - return body; - } - checkExponentialAfterUnary(node) { - if (this.match(57)) { - this.raise(Errors.UnexpectedTokenUnaryExponentiation, node.argument); - } - } - parseMaybeUnary(refExpressionErrors, sawUnary) { - const startLoc = this.state.startLoc; - const isAwait = this.isContextual(96); - if (isAwait && this.recordAwaitIfAllowed()) { - this.next(); - const expr = this.parseAwait(startLoc); - if (!sawUnary) this.checkExponentialAfterUnary(expr); - return expr; - } - const update = this.match(34); - const node = this.startNode(); - if (tokenIsPrefix(this.state.type)) { - node.operator = this.state.value; - node.prefix = true; - if (this.match(72)) { - this.expectPlugin("throwExpressions"); - } - const isDelete = this.match(89); - this.next(); - node.argument = this.parseMaybeUnary(null, true); - this.checkExpressionErrors(refExpressionErrors, true); - if (this.state.strict && isDelete) { - const arg = node.argument; - if (arg.type === "Identifier") { - this.raise(Errors.StrictDelete, node); - } else if (this.hasPropertyAsPrivateName(arg)) { - this.raise(Errors.DeletePrivateField, node); - } - } - if (!update) { - if (!sawUnary) { - this.checkExponentialAfterUnary(node); - } - return this.finishNode(node, "UnaryExpression"); - } - } - const expr = this.parseUpdate(node, update, refExpressionErrors); - if (isAwait) { - const { - type - } = this.state; - const startsExpr = this.hasPlugin("v8intrinsic") ? tokenCanStartExpression(type) : tokenCanStartExpression(type) && !this.match(54); - if (startsExpr && !this.isAmbiguousAwait()) { - this.raiseOverwrite(Errors.AwaitNotInAsyncContext, startLoc); - return this.parseAwait(startLoc); - } - } - return expr; - } - parseUpdate(node, update, refExpressionErrors) { - if (update) { - const updateExpressionNode = node; - this.checkLVal(updateExpressionNode.argument, this.finishNode(updateExpressionNode, "UpdateExpression")); - return node; - } - const startLoc = this.state.startLoc; - let expr = this.parseExprSubscripts(refExpressionErrors); - if (this.checkExpressionErrors(refExpressionErrors, false)) return expr; - while (tokenIsPostfix(this.state.type) && !this.canInsertSemicolon()) { - const node = this.startNodeAt(startLoc); - node.operator = this.state.value; - node.prefix = false; - node.argument = expr; - this.next(); - this.checkLVal(expr, expr = this.finishNode(node, "UpdateExpression")); - } - return expr; - } - parseExprSubscripts(refExpressionErrors) { - const startLoc = this.state.startLoc; - const potentialArrowAt = this.state.potentialArrowAt; - const expr = this.parseExprAtom(refExpressionErrors); - if (this.shouldExitDescending(expr, potentialArrowAt)) { - return expr; - } - return this.parseSubscripts(expr, startLoc); - } - parseSubscripts(base, startLoc, noCalls) { - const state = { - optionalChainMember: false, - maybeAsyncArrow: this.atPossibleAsyncArrow(base), - stop: false - }; - do { - base = this.parseSubscript(base, startLoc, noCalls, state); - state.maybeAsyncArrow = false; - } while (!state.stop); - return base; - } - parseSubscript(base, startLoc, noCalls, state) { - const { - type - } = this.state; - if (!noCalls && type === 15) { - return this.parseBind(base, startLoc, noCalls, state); - } else if (tokenIsTemplate(type)) { - return this.parseTaggedTemplateExpression(base, startLoc, state); - } - let optional = false; - if (type === 18) { - if (noCalls) { - this.raise(Errors.OptionalChainingNoNew, this.state.startLoc); - if (this.lookaheadCharCode() === 40) { - state.stop = true; - return base; - } - } - state.optionalChainMember = optional = true; - this.next(); - } - if (!noCalls && this.match(10)) { - return this.parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional); - } else { - const computed = this.eat(0); - if (computed || optional || this.eat(16)) { - return this.parseMember(base, startLoc, state, computed, optional); - } else { - state.stop = true; - return base; - } - } - } - parseMember(base, startLoc, state, computed, optional) { - const node = this.startNodeAt(startLoc); - node.object = base; - node.computed = computed; - if (computed) { - node.property = this.parseExpression(); - this.expect(3); - } else if (this.match(139)) { - if (base.type === "Super") { - this.raise(Errors.SuperPrivateField, startLoc); - } - this.classScope.usePrivateName(this.state.value, this.state.startLoc); - node.property = this.parsePrivateName(); - } else { - node.property = this.parseIdentifier(true); - } - if (state.optionalChainMember) { - node.optional = optional; - return this.finishNode(node, "OptionalMemberExpression"); - } else { - return this.finishNode(node, "MemberExpression"); - } - } - parseBind(base, startLoc, noCalls, state) { - const node = this.startNodeAt(startLoc); - node.object = base; - this.next(); - node.callee = this.parseNoCallExpr(); - state.stop = true; - return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc, noCalls); - } - parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional) { - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - let refExpressionErrors = null; - this.state.maybeInArrowParameters = true; - this.next(); - const node = this.startNodeAt(startLoc); - node.callee = base; - const { - maybeAsyncArrow, - optionalChainMember - } = state; - if (maybeAsyncArrow) { - this.expressionScope.enter(newAsyncArrowScope()); - refExpressionErrors = new ExpressionErrors(); - } - if (optionalChainMember) { - node.optional = optional; - } - if (optional) { - node.arguments = this.parseCallExpressionArguments(11); - } else { - node.arguments = this.parseCallExpressionArguments(11, base.type !== "Super", node, refExpressionErrors); - } - let finishedNode = this.finishCallExpression(node, optionalChainMember); - if (maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) { - state.stop = true; - this.checkDestructuringPrivate(refExpressionErrors); - this.expressionScope.validateAsPattern(); - this.expressionScope.exit(); - finishedNode = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startLoc), finishedNode); - } else { - if (maybeAsyncArrow) { - this.checkExpressionErrors(refExpressionErrors, true); - this.expressionScope.exit(); - } - this.toReferencedArguments(finishedNode); - } - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - return finishedNode; - } - toReferencedArguments(node, isParenthesizedExpr) { - this.toReferencedListDeep(node.arguments, isParenthesizedExpr); - } - parseTaggedTemplateExpression(base, startLoc, state) { - const node = this.startNodeAt(startLoc); - node.tag = base; - node.quasi = this.parseTemplate(true); - if (state.optionalChainMember) { - this.raise(Errors.OptionalChainingNoTemplate, startLoc); - } - return this.finishNode(node, "TaggedTemplateExpression"); - } - atPossibleAsyncArrow(base) { - return base.type === "Identifier" && base.name === "async" && this.state.lastTokEndLoc.index === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && this.offsetToSourcePos(base.start) === this.state.potentialArrowAt; - } - finishCallExpression(node, optional) { - if (node.callee.type === "Import") { - if (node.arguments.length === 0 || node.arguments.length > 2) { - this.raise(Errors.ImportCallArity, node); - } else { - for (const arg of node.arguments) { - if (arg.type === "SpreadElement") { - this.raise(Errors.ImportCallSpreadArgument, arg); - } - } - } - } - return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression"); - } - parseCallExpressionArguments(close, allowPlaceholder, nodeForExtra, refExpressionErrors) { - const elts = []; - let first = true; - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = false; - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(12); - if (this.match(close)) { - if (nodeForExtra) { - this.addTrailingCommaExtraToNode(nodeForExtra); - } - this.next(); - break; - } - } - elts.push(this.parseExprListItem(false, refExpressionErrors, allowPlaceholder)); - } - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return elts; - } - shouldParseAsyncArrow() { - return this.match(19) && !this.canInsertSemicolon(); - } - parseAsyncArrowFromCallExpression(node, call) { - var _call$extra; - this.resetPreviousNodeTrailingComments(call); - this.expect(19); - this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingCommaLoc); - if (call.innerComments) { - setInnerComments(node, call.innerComments); - } - if (call.callee.trailingComments) { - setInnerComments(node, call.callee.trailingComments); - } - return node; - } - parseNoCallExpr() { - const startLoc = this.state.startLoc; - return this.parseSubscripts(this.parseExprAtom(), startLoc, true); - } - parseExprAtom(refExpressionErrors) { - let node; - let decorators = null; - const { - type - } = this.state; - switch (type) { - case 79: - return this.parseSuper(); - case 83: - node = this.startNode(); - this.next(); - if (this.match(16)) { - return this.parseImportMetaProperty(node); - } - if (this.match(10)) { - if (this.optionFlags & 256) { - return this.parseImportCall(node); - } else { - return this.finishNode(node, "Import"); - } - } else { - this.raise(Errors.UnsupportedImport, this.state.lastTokStartLoc); - return this.finishNode(node, "Import"); - } - case 78: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression"); - case 90: - { - return this.parseDo(this.startNode(), false); - } - case 56: - case 31: - { - this.readRegexp(); - return this.parseRegExpLiteral(this.state.value); - } - case 135: - return this.parseNumericLiteral(this.state.value); - case 136: - return this.parseBigIntLiteral(this.state.value); - case 134: - return this.parseStringLiteral(this.state.value); - case 84: - return this.parseNullLiteral(); - case 85: - return this.parseBooleanLiteral(true); - case 86: - return this.parseBooleanLiteral(false); - case 10: - { - const canBeArrow = this.state.potentialArrowAt === this.state.start; - return this.parseParenAndDistinguishExpression(canBeArrow); - } - case 2: - case 1: - { - return this.parseArrayLike(this.state.type === 2 ? 4 : 3, false, true); - } - case 0: - { - return this.parseArrayLike(3, true, false, refExpressionErrors); - } - case 6: - case 7: - { - return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true); - } - case 5: - { - return this.parseObjectLike(8, false, false, refExpressionErrors); - } - case 68: - return this.parseFunctionOrFunctionSent(); - case 26: - decorators = this.parseDecorators(); - case 80: - return this.parseClass(this.maybeTakeDecorators(decorators, this.startNode()), false); - case 77: - return this.parseNewOrNewTarget(); - case 25: - case 24: - return this.parseTemplate(false); - case 15: - { - node = this.startNode(); - this.next(); - node.object = null; - const callee = node.callee = this.parseNoCallExpr(); - if (callee.type === "MemberExpression") { - return this.finishNode(node, "BindExpression"); - } else { - throw this.raise(Errors.UnsupportedBind, callee); - } - } - case 139: - { - this.raise(Errors.PrivateInExpectedIn, this.state.startLoc, { - identifierName: this.state.value - }); - return this.parsePrivateName(); - } - case 33: - { - return this.parseTopicReferenceThenEqualsSign(54, "%"); - } - case 32: - { - return this.parseTopicReferenceThenEqualsSign(44, "^"); - } - case 37: - case 38: - { - return this.parseTopicReference("hack"); - } - case 44: - case 54: - case 27: - { - const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); - if (pipeProposal) { - return this.parseTopicReference(pipeProposal); - } - this.unexpected(); - break; - } - case 47: - { - const lookaheadCh = this.input.codePointAt(this.nextTokenStart()); - if (isIdentifierStart(lookaheadCh) || lookaheadCh === 62) { - this.expectOnePlugin(["jsx", "flow", "typescript"]); - } else { - this.unexpected(); - } - break; - } - default: - if (type === 137) { - return this.parseDecimalLiteral(this.state.value); - } - if (tokenIsIdentifier(type)) { - if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123) { - return this.parseModuleExpression(); - } - const canBeArrow = this.state.potentialArrowAt === this.state.start; - const containsEsc = this.state.containsEsc; - const id = this.parseIdentifier(); - if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) { - const { - type - } = this.state; - if (type === 68) { - this.resetPreviousNodeTrailingComments(id); - this.next(); - return this.parseAsyncFunctionExpression(this.startNodeAtNode(id)); - } else if (tokenIsIdentifier(type)) { - if (this.lookaheadCharCode() === 61) { - return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id)); - } else { - return id; - } - } else if (type === 90) { - this.resetPreviousNodeTrailingComments(id); - return this.parseDo(this.startNodeAtNode(id), true); - } - } - if (canBeArrow && this.match(19) && !this.canInsertSemicolon()) { - this.next(); - return this.parseArrowExpression(this.startNodeAtNode(id), [id], false); - } - return id; - } else { - this.unexpected(); - } - } - } - parseTopicReferenceThenEqualsSign(topicTokenType, topicTokenValue) { - const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); - if (pipeProposal) { - this.state.type = topicTokenType; - this.state.value = topicTokenValue; - this.state.pos--; - this.state.end--; - this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1); - return this.parseTopicReference(pipeProposal); - } else { - this.unexpected(); - } - } - parseTopicReference(pipeProposal) { - const node = this.startNode(); - const startLoc = this.state.startLoc; - const tokenType = this.state.type; - this.next(); - return this.finishTopicReference(node, startLoc, pipeProposal, tokenType); - } - finishTopicReference(node, startLoc, pipeProposal, tokenType) { - if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) { - if (pipeProposal === "hack") { - if (!this.topicReferenceIsAllowedInCurrentContext()) { - this.raise(Errors.PipeTopicUnbound, startLoc); - } - this.registerTopicReference(); - return this.finishNode(node, "TopicReference"); - } else { - if (!this.topicReferenceIsAllowedInCurrentContext()) { - this.raise(Errors.PrimaryTopicNotAllowed, startLoc); - } - this.registerTopicReference(); - return this.finishNode(node, "PipelinePrimaryTopicReference"); - } - } else { - throw this.raise(Errors.PipeTopicUnconfiguredToken, startLoc, { - token: tokenLabelName(tokenType) - }); - } - } - testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType) { - switch (pipeProposal) { - case "hack": - { - return this.hasPlugin(["pipelineOperator", { - topicToken: tokenLabelName(tokenType) - }]); - } - case "smart": - return tokenType === 27; - default: - throw this.raise(Errors.PipeTopicRequiresHackPipes, startLoc); - } - } - parseAsyncArrowUnaryFunction(node) { - this.prodParam.enter(functionFlags(true, this.prodParam.hasYield)); - const params = [this.parseIdentifier()]; - this.prodParam.exit(); - if (this.hasPrecedingLineBreak()) { - this.raise(Errors.LineTerminatorBeforeArrow, this.state.curPosition()); - } - this.expect(19); - return this.parseArrowExpression(node, params, true); - } - parseDo(node, isAsync) { - this.expectPlugin("doExpressions"); - if (isAsync) { - this.expectPlugin("asyncDoExpressions"); - } - node.async = isAsync; - this.next(); - const oldLabels = this.state.labels; - this.state.labels = []; - if (isAsync) { - this.prodParam.enter(2); - node.body = this.parseBlock(); - this.prodParam.exit(); - } else { - node.body = this.parseBlock(); - } - this.state.labels = oldLabels; - return this.finishNode(node, "DoExpression"); - } - parseSuper() { - const node = this.startNode(); - this.next(); - if (this.match(10) && !this.scope.allowDirectSuper && !(this.optionFlags & 16)) { - this.raise(Errors.SuperNotAllowed, node); - } else if (!this.scope.allowSuper && !(this.optionFlags & 16)) { - this.raise(Errors.UnexpectedSuper, node); - } - if (!this.match(10) && !this.match(0) && !this.match(16)) { - this.raise(Errors.UnsupportedSuper, node); - } - return this.finishNode(node, "Super"); - } - parsePrivateName() { - const node = this.startNode(); - const id = this.startNodeAt(createPositionWithColumnOffset(this.state.startLoc, 1)); - const name = this.state.value; - this.next(); - node.id = this.createIdentifier(id, name); - return this.finishNode(node, "PrivateName"); - } - parseFunctionOrFunctionSent() { - const node = this.startNode(); - this.next(); - if (this.prodParam.hasYield && this.match(16)) { - const meta = this.createIdentifier(this.startNodeAtNode(node), "function"); - this.next(); - if (this.match(103)) { - this.expectPlugin("functionSent"); - } else if (!this.hasPlugin("functionSent")) { - this.unexpected(); - } - return this.parseMetaProperty(node, meta, "sent"); - } - return this.parseFunction(node); - } - parseMetaProperty(node, meta, propertyName) { - node.meta = meta; - const containsEsc = this.state.containsEsc; - node.property = this.parseIdentifier(true); - if (node.property.name !== propertyName || containsEsc) { - this.raise(Errors.UnsupportedMetaProperty, node.property, { - target: meta.name, - onlyValidPropertyName: propertyName - }); - } - return this.finishNode(node, "MetaProperty"); - } - parseImportMetaProperty(node) { - const id = this.createIdentifier(this.startNodeAtNode(node), "import"); - this.next(); - if (this.isContextual(101)) { - if (!this.inModule) { - this.raise(Errors.ImportMetaOutsideModule, id); - } - this.sawUnambiguousESM = true; - } else if (this.isContextual(105) || this.isContextual(97)) { - const isSource = this.isContextual(105); - this.expectPlugin(isSource ? "sourcePhaseImports" : "deferredImportEvaluation"); - if (!(this.optionFlags & 256)) { - throw this.raise(Errors.DynamicImportPhaseRequiresImportExpressions, this.state.startLoc, { - phase: this.state.value - }); - } - this.next(); - node.phase = isSource ? "source" : "defer"; - return this.parseImportCall(node); - } - return this.parseMetaProperty(node, id, "meta"); - } - parseLiteralAtNode(value, type, node) { - this.addExtra(node, "rawValue", value); - this.addExtra(node, "raw", this.input.slice(this.offsetToSourcePos(node.start), this.state.end)); - node.value = value; - this.next(); - return this.finishNode(node, type); - } - parseLiteral(value, type) { - const node = this.startNode(); - return this.parseLiteralAtNode(value, type, node); - } - parseStringLiteral(value) { - return this.parseLiteral(value, "StringLiteral"); - } - parseNumericLiteral(value) { - return this.parseLiteral(value, "NumericLiteral"); - } - parseBigIntLiteral(value) { - return this.parseLiteral(value, "BigIntLiteral"); - } - parseDecimalLiteral(value) { - return this.parseLiteral(value, "DecimalLiteral"); - } - parseRegExpLiteral(value) { - const node = this.startNode(); - this.addExtra(node, "raw", this.input.slice(this.offsetToSourcePos(node.start), this.state.end)); - node.pattern = value.pattern; - node.flags = value.flags; - this.next(); - return this.finishNode(node, "RegExpLiteral"); - } - parseBooleanLiteral(value) { - const node = this.startNode(); - node.value = value; - this.next(); - return this.finishNode(node, "BooleanLiteral"); - } - parseNullLiteral() { - const node = this.startNode(); - this.next(); - return this.finishNode(node, "NullLiteral"); - } - parseParenAndDistinguishExpression(canBeArrow) { - const startLoc = this.state.startLoc; - let val; - this.next(); - this.expressionScope.enter(newArrowHeadScope()); - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.maybeInArrowParameters = true; - this.state.inFSharpPipelineDirectBody = false; - const innerStartLoc = this.state.startLoc; - const exprList = []; - const refExpressionErrors = new ExpressionErrors(); - let first = true; - let spreadStartLoc; - let optionalCommaStartLoc; - while (!this.match(11)) { - if (first) { - first = false; - } else { - this.expect(12, refExpressionErrors.optionalParametersLoc === null ? null : refExpressionErrors.optionalParametersLoc); - if (this.match(11)) { - optionalCommaStartLoc = this.state.startLoc; - break; - } - } - if (this.match(21)) { - const spreadNodeStartLoc = this.state.startLoc; - spreadStartLoc = this.state.startLoc; - exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartLoc)); - if (!this.checkCommaAfterRest(41)) { - break; - } - } else { - exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem)); - } - } - const innerEndLoc = this.state.lastTokEndLoc; - this.expect(11); - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - let arrowNode = this.startNodeAt(startLoc); - if (canBeArrow && this.shouldParseArrow(exprList) && (arrowNode = this.parseArrow(arrowNode))) { - this.checkDestructuringPrivate(refExpressionErrors); - this.expressionScope.validateAsPattern(); - this.expressionScope.exit(); - this.parseArrowExpression(arrowNode, exprList, false); - return arrowNode; - } - this.expressionScope.exit(); - if (!exprList.length) { - this.unexpected(this.state.lastTokStartLoc); - } - if (optionalCommaStartLoc) this.unexpected(optionalCommaStartLoc); - if (spreadStartLoc) this.unexpected(spreadStartLoc); - this.checkExpressionErrors(refExpressionErrors, true); - this.toReferencedListDeep(exprList, true); - if (exprList.length > 1) { - val = this.startNodeAt(innerStartLoc); - val.expressions = exprList; - this.finishNode(val, "SequenceExpression"); - this.resetEndLocation(val, innerEndLoc); - } else { - val = exprList[0]; - } - return this.wrapParenthesis(startLoc, val); - } - wrapParenthesis(startLoc, expression) { - if (!(this.optionFlags & 512)) { - this.addExtra(expression, "parenthesized", true); - this.addExtra(expression, "parenStart", startLoc.index); - this.takeSurroundingComments(expression, startLoc.index, this.state.lastTokEndLoc.index); - return expression; - } - const parenExpression = this.startNodeAt(startLoc); - parenExpression.expression = expression; - return this.finishNode(parenExpression, "ParenthesizedExpression"); - } - shouldParseArrow(params) { - return !this.canInsertSemicolon(); - } - parseArrow(node) { - if (this.eat(19)) { - return node; - } - } - parseParenItem(node, startLoc) { - return node; - } - parseNewOrNewTarget() { - const node = this.startNode(); - this.next(); - if (this.match(16)) { - const meta = this.createIdentifier(this.startNodeAtNode(node), "new"); - this.next(); - const metaProp = this.parseMetaProperty(node, meta, "target"); - if (!this.scope.inNonArrowFunction && !this.scope.inClass && !(this.optionFlags & 4)) { - this.raise(Errors.UnexpectedNewTarget, metaProp); - } - return metaProp; - } - return this.parseNew(node); - } - parseNew(node) { - this.parseNewCallee(node); - if (this.eat(10)) { - const args = this.parseExprList(11); - this.toReferencedList(args); - node.arguments = args; - } else { - node.arguments = []; - } - return this.finishNode(node, "NewExpression"); - } - parseNewCallee(node) { - const isImport = this.match(83); - const callee = this.parseNoCallExpr(); - node.callee = callee; - if (isImport && (callee.type === "Import" || callee.type === "ImportExpression")) { - this.raise(Errors.ImportCallNotNewExpression, callee); - } - } - parseTemplateElement(isTagged) { - const { - start, - startLoc, - end, - value - } = this.state; - const elemStart = start + 1; - const elem = this.startNodeAt(createPositionWithColumnOffset(startLoc, 1)); - if (value === null) { - if (!isTagged) { - this.raise(Errors.InvalidEscapeSequenceTemplate, createPositionWithColumnOffset(this.state.firstInvalidTemplateEscapePos, 1)); - } - } - const isTail = this.match(24); - const endOffset = isTail ? -1 : -2; - const elemEnd = end + endOffset; - elem.value = { - raw: this.input.slice(elemStart, elemEnd).replace(/\r\n?/g, "\n"), - cooked: value === null ? null : value.slice(1, endOffset) - }; - elem.tail = isTail; - this.next(); - const finishedNode = this.finishNode(elem, "TemplateElement"); - this.resetEndLocation(finishedNode, createPositionWithColumnOffset(this.state.lastTokEndLoc, endOffset)); - return finishedNode; - } - parseTemplate(isTagged) { - const node = this.startNode(); - let curElt = this.parseTemplateElement(isTagged); - const quasis = [curElt]; - const substitutions = []; - while (!curElt.tail) { - substitutions.push(this.parseTemplateSubstitution()); - this.readTemplateContinuation(); - quasis.push(curElt = this.parseTemplateElement(isTagged)); - } - node.expressions = substitutions; - node.quasis = quasis; - return this.finishNode(node, "TemplateLiteral"); - } - parseTemplateSubstitution() { - return this.parseExpression(); - } - parseObjectLike(close, isPattern, isRecord, refExpressionErrors) { - if (isRecord) { - this.expectPlugin("recordAndTuple"); - } - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = false; - const propHash = Object.create(null); - let first = true; - const node = this.startNode(); - node.properties = []; - this.next(); - while (!this.match(close)) { - if (first) { - first = false; - } else { - this.expect(12); - if (this.match(close)) { - this.addTrailingCommaExtraToNode(node); - break; - } - } - let prop; - if (isPattern) { - prop = this.parseBindingProperty(); - } else { - prop = this.parsePropertyDefinition(refExpressionErrors); - this.checkProto(prop, isRecord, propHash, refExpressionErrors); - } - if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") { - this.raise(Errors.InvalidRecordProperty, prop); - } - { - if (prop.shorthand) { - this.addExtra(prop, "shorthand", true); - } - } - node.properties.push(prop); - } - this.next(); - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - let type = "ObjectExpression"; - if (isPattern) { - type = "ObjectPattern"; - } else if (isRecord) { - type = "RecordExpression"; - } - return this.finishNode(node, type); - } - addTrailingCommaExtraToNode(node) { - this.addExtra(node, "trailingComma", this.state.lastTokStartLoc.index); - this.addExtra(node, "trailingCommaLoc", this.state.lastTokStartLoc, false); - } - maybeAsyncOrAccessorProp(prop) { - return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(55)); - } - parsePropertyDefinition(refExpressionErrors) { - let decorators = []; - if (this.match(26)) { - if (this.hasPlugin("decorators")) { - this.raise(Errors.UnsupportedPropertyDecorator, this.state.startLoc); - } - while (this.match(26)) { - decorators.push(this.parseDecorator()); - } - } - const prop = this.startNode(); - let isAsync = false; - let isAccessor = false; - let startLoc; - if (this.match(21)) { - if (decorators.length) this.unexpected(); - return this.parseSpread(); - } - if (decorators.length) { - prop.decorators = decorators; - decorators = []; - } - prop.method = false; - if (refExpressionErrors) { - startLoc = this.state.startLoc; - } - let isGenerator = this.eat(55); - this.parsePropertyNamePrefixOperator(prop); - const containsEsc = this.state.containsEsc; - this.parsePropertyName(prop, refExpressionErrors); - if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) { - const { - key - } = prop; - const keyName = key.name; - if (keyName === "async" && !this.hasPrecedingLineBreak()) { - isAsync = true; - this.resetPreviousNodeTrailingComments(key); - isGenerator = this.eat(55); - this.parsePropertyName(prop); - } - if (keyName === "get" || keyName === "set") { - isAccessor = true; - this.resetPreviousNodeTrailingComments(key); - prop.kind = keyName; - if (this.match(55)) { - isGenerator = true; - this.raise(Errors.AccessorIsGenerator, this.state.curPosition(), { - kind: keyName - }); - this.next(); - } - this.parsePropertyName(prop); - } - } - return this.parseObjPropValue(prop, startLoc, isGenerator, isAsync, false, isAccessor, refExpressionErrors); - } - getGetterSetterExpectedParamCount(method) { - return method.kind === "get" ? 0 : 1; - } - getObjectOrClassMethodParams(method) { - return method.params; - } - checkGetterSetterParams(method) { - var _params; - const paramCount = this.getGetterSetterExpectedParamCount(method); - const params = this.getObjectOrClassMethodParams(method); - if (params.length !== paramCount) { - this.raise(method.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, method); - } - if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") { - this.raise(Errors.BadSetterRestParameter, method); - } - } - parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { - if (isAccessor) { - const finishedProp = this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod"); - this.checkGetterSetterParams(finishedProp); - return finishedProp; - } - if (isAsync || isGenerator || this.match(10)) { - if (isPattern) this.unexpected(); - prop.kind = "method"; - prop.method = true; - return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod"); - } - } - parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) { - prop.shorthand = false; - if (this.eat(14)) { - prop.value = isPattern ? this.parseMaybeDefault(this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors); - return this.finishNode(prop, "ObjectProperty"); - } - if (!prop.computed && prop.key.type === "Identifier") { - this.checkReservedWord(prop.key.name, prop.key.loc.start, true, false); - if (isPattern) { - prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key)); - } else if (this.match(29)) { - const shorthandAssignLoc = this.state.startLoc; - if (refExpressionErrors != null) { - if (refExpressionErrors.shorthandAssignLoc === null) { - refExpressionErrors.shorthandAssignLoc = shorthandAssignLoc; - } - } else { - this.raise(Errors.InvalidCoverInitializedName, shorthandAssignLoc); - } - prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key)); - } else { - prop.value = cloneIdentifier(prop.key); - } - prop.shorthand = true; - return this.finishNode(prop, "ObjectProperty"); - } - } - parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { - const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors); - if (!node) this.unexpected(); - return node; - } - parsePropertyName(prop, refExpressionErrors) { - if (this.eat(0)) { - prop.computed = true; - prop.key = this.parseMaybeAssignAllowIn(); - this.expect(3); - } else { - const { - type, - value - } = this.state; - let key; - if (tokenIsKeywordOrIdentifier(type)) { - key = this.parseIdentifier(true); - } else { - switch (type) { - case 135: - key = this.parseNumericLiteral(value); - break; - case 134: - key = this.parseStringLiteral(value); - break; - case 136: - key = this.parseBigIntLiteral(value); - break; - case 139: - { - const privateKeyLoc = this.state.startLoc; - if (refExpressionErrors != null) { - if (refExpressionErrors.privateKeyLoc === null) { - refExpressionErrors.privateKeyLoc = privateKeyLoc; - } - } else { - this.raise(Errors.UnexpectedPrivateField, privateKeyLoc); - } - key = this.parsePrivateName(); - break; - } - default: - if (type === 137) { - key = this.parseDecimalLiteral(value); - break; - } - this.unexpected(); - } - } - prop.key = key; - if (type !== 139) { - prop.computed = false; - } - } - } - initFunction(node, isAsync) { - node.id = null; - node.generator = false; - node.async = isAsync; - } - parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { - this.initFunction(node, isAsync); - node.generator = isGenerator; - this.scope.enter(2 | 16 | (inClassScope ? 64 : 0) | (allowDirectSuper ? 32 : 0)); - this.prodParam.enter(functionFlags(isAsync, node.generator)); - this.parseFunctionParams(node, isConstructor); - const finishedNode = this.parseFunctionBodyAndFinish(node, type, true); - this.prodParam.exit(); - this.scope.exit(); - return finishedNode; - } - parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { - if (isTuple) { - this.expectPlugin("recordAndTuple"); - } - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = false; - const node = this.startNode(); - this.next(); - node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node); - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression"); - } - parseArrowExpression(node, params, isAsync, trailingCommaLoc) { - this.scope.enter(2 | 4); - let flags = functionFlags(isAsync, false); - if (!this.match(5) && this.prodParam.hasIn) { - flags |= 8; - } - this.prodParam.enter(flags); - this.initFunction(node, isAsync); - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - if (params) { - this.state.maybeInArrowParameters = true; - this.setArrowFunctionParameters(node, params, trailingCommaLoc); - } - this.state.maybeInArrowParameters = false; - this.parseFunctionBody(node, true); - this.prodParam.exit(); - this.scope.exit(); - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - return this.finishNode(node, "ArrowFunctionExpression"); - } - setArrowFunctionParameters(node, params, trailingCommaLoc) { - this.toAssignableList(params, trailingCommaLoc, false); - node.params = params; - } - parseFunctionBodyAndFinish(node, type, isMethod = false) { - this.parseFunctionBody(node, false, isMethod); - return this.finishNode(node, type); - } - parseFunctionBody(node, allowExpression, isMethod = false) { - const isExpression = allowExpression && !this.match(5); - this.expressionScope.enter(newExpressionScope()); - if (isExpression) { - node.body = this.parseMaybeAssign(); - this.checkParams(node, false, allowExpression, false); - } else { - const oldStrict = this.state.strict; - const oldLabels = this.state.labels; - this.state.labels = []; - this.prodParam.enter(this.prodParam.currentFlags() | 4); - node.body = this.parseBlock(true, false, hasStrictModeDirective => { - const nonSimple = !this.isSimpleParamList(node.params); - if (hasStrictModeDirective && nonSimple) { - this.raise(Errors.IllegalLanguageModeDirective, (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.loc.end : node); - } - const strictModeChanged = !oldStrict && this.state.strict; - this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged); - if (this.state.strict && node.id) { - this.checkIdentifier(node.id, 65, strictModeChanged); - } - }); - this.prodParam.exit(); - this.state.labels = oldLabels; - } - this.expressionScope.exit(); - } - isSimpleParameter(node) { - return node.type === "Identifier"; - } - isSimpleParamList(params) { - for (let i = 0, len = params.length; i < len; i++) { - if (!this.isSimpleParameter(params[i])) return false; - } - return true; - } - checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { - const checkClashes = !allowDuplicates && new Set(); - const formalParameters = { - type: "FormalParameters" - }; - for (const param of node.params) { - this.checkLVal(param, formalParameters, 5, checkClashes, strictModeChanged); - } - } - parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) { - const elts = []; - let first = true; - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(12); - if (this.match(close)) { - if (nodeForExtra) { - this.addTrailingCommaExtraToNode(nodeForExtra); - } - this.next(); - break; - } - } - elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors)); - } - return elts; - } - parseExprListItem(allowEmpty, refExpressionErrors, allowPlaceholder) { - let elt; - if (this.match(12)) { - if (!allowEmpty) { - this.raise(Errors.UnexpectedToken, this.state.curPosition(), { - unexpected: "," - }); - } - elt = null; - } else if (this.match(21)) { - const spreadNodeStartLoc = this.state.startLoc; - elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartLoc); - } else if (this.match(17)) { - this.expectPlugin("partialApplication"); - if (!allowPlaceholder) { - this.raise(Errors.UnexpectedArgumentPlaceholder, this.state.startLoc); - } - const node = this.startNode(); - this.next(); - elt = this.finishNode(node, "ArgumentPlaceholder"); - } else { - elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem); - } - return elt; - } - parseIdentifier(liberal) { - const node = this.startNode(); - const name = this.parseIdentifierName(liberal); - return this.createIdentifier(node, name); - } - createIdentifier(node, name) { - node.name = name; - node.loc.identifierName = name; - return this.finishNode(node, "Identifier"); - } - parseIdentifierName(liberal) { - let name; - const { - startLoc, - type - } = this.state; - if (tokenIsKeywordOrIdentifier(type)) { - name = this.state.value; - } else { - this.unexpected(); - } - const tokenIsKeyword = tokenKeywordOrIdentifierIsKeyword(type); - if (liberal) { - if (tokenIsKeyword) { - this.replaceToken(132); - } - } else { - this.checkReservedWord(name, startLoc, tokenIsKeyword, false); - } - this.next(); - return name; - } - checkReservedWord(word, startLoc, checkKeywords, isBinding) { - if (word.length > 10) { - return; - } - if (!canBeReservedWord(word)) { - return; - } - if (checkKeywords && isKeyword(word)) { - this.raise(Errors.UnexpectedKeyword, startLoc, { - keyword: word - }); - return; - } - const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord; - if (reservedTest(word, this.inModule)) { - this.raise(Errors.UnexpectedReservedWord, startLoc, { - reservedWord: word - }); - return; - } else if (word === "yield") { - if (this.prodParam.hasYield) { - this.raise(Errors.YieldBindingIdentifier, startLoc); - return; - } - } else if (word === "await") { - if (this.prodParam.hasAwait) { - this.raise(Errors.AwaitBindingIdentifier, startLoc); - return; - } - if (this.scope.inStaticBlock) { - this.raise(Errors.AwaitBindingIdentifierInStaticBlock, startLoc); - return; - } - this.expressionScope.recordAsyncArrowParametersError(startLoc); - } else if (word === "arguments") { - if (this.scope.inClassAndNotInNonArrowFunction) { - this.raise(Errors.ArgumentsInClass, startLoc); - return; - } - } - } - recordAwaitIfAllowed() { - const isAwaitAllowed = this.prodParam.hasAwait || this.optionFlags & 1 && !this.scope.inFunction; - if (isAwaitAllowed && !this.scope.inFunction) { - this.state.hasTopLevelAwait = true; - } - return isAwaitAllowed; - } - parseAwait(startLoc) { - const node = this.startNodeAt(startLoc); - this.expressionScope.recordParameterInitializerError(Errors.AwaitExpressionFormalParameter, node); - if (this.eat(55)) { - this.raise(Errors.ObsoleteAwaitStar, node); - } - if (!this.scope.inFunction && !(this.optionFlags & 1)) { - if (this.isAmbiguousAwait()) { - this.ambiguousScriptDifferentAst = true; - } else { - this.sawUnambiguousESM = true; - } - } - if (!this.state.soloAwait) { - node.argument = this.parseMaybeUnary(null, true); - } - return this.finishNode(node, "AwaitExpression"); - } - isAmbiguousAwait() { - if (this.hasPrecedingLineBreak()) return true; - const { - type - } = this.state; - return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type === 138 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54; - } - parseYield() { - const node = this.startNode(); - this.expressionScope.recordParameterInitializerError(Errors.YieldInParameter, node); - this.next(); - let delegating = false; - let argument = null; - if (!this.hasPrecedingLineBreak()) { - delegating = this.eat(55); - switch (this.state.type) { - case 13: - case 140: - case 8: - case 11: - case 3: - case 9: - case 14: - case 12: - if (!delegating) break; - default: - argument = this.parseMaybeAssign(); - } - } - node.delegate = delegating; - node.argument = argument; - return this.finishNode(node, "YieldExpression"); - } - parseImportCall(node) { - this.next(); - node.source = this.parseMaybeAssignAllowIn(); - node.options = null; - if (this.eat(12)) { - if (!this.match(11)) { - node.options = this.parseMaybeAssignAllowIn(); - if (this.eat(12) && !this.match(11)) { - do { - this.parseMaybeAssignAllowIn(); - } while (this.eat(12) && !this.match(11)); - this.raise(Errors.ImportCallArity, node); - } - } - } - this.expect(11); - return this.finishNode(node, "ImportExpression"); - } - checkPipelineAtInfixOperator(left, leftStartLoc) { - if (this.hasPlugin(["pipelineOperator", { - proposal: "smart" - }])) { - if (left.type === "SequenceExpression") { - this.raise(Errors.PipelineHeadSequenceExpression, leftStartLoc); - } - } - } - parseSmartPipelineBodyInStyle(childExpr, startLoc) { - if (this.isSimpleReference(childExpr)) { - const bodyNode = this.startNodeAt(startLoc); - bodyNode.callee = childExpr; - return this.finishNode(bodyNode, "PipelineBareFunction"); - } else { - const bodyNode = this.startNodeAt(startLoc); - this.checkSmartPipeTopicBodyEarlyErrors(startLoc); - bodyNode.expression = childExpr; - return this.finishNode(bodyNode, "PipelineTopicExpression"); - } - } - isSimpleReference(expression) { - switch (expression.type) { - case "MemberExpression": - return !expression.computed && this.isSimpleReference(expression.object); - case "Identifier": - return true; - default: - return false; - } - } - checkSmartPipeTopicBodyEarlyErrors(startLoc) { - if (this.match(19)) { - throw this.raise(Errors.PipelineBodyNoArrow, this.state.startLoc); - } - if (!this.topicReferenceWasUsedInCurrentContext()) { - this.raise(Errors.PipelineTopicUnused, startLoc); - } - } - withTopicBindingContext(callback) { - const outerContextTopicState = this.state.topicContext; - this.state.topicContext = { - maxNumOfResolvableTopics: 1, - maxTopicIndex: null - }; - try { - return callback(); - } finally { - this.state.topicContext = outerContextTopicState; - } - } - withSmartMixTopicForbiddingContext(callback) { - if (this.hasPlugin(["pipelineOperator", { - proposal: "smart" - }])) { - const outerContextTopicState = this.state.topicContext; - this.state.topicContext = { - maxNumOfResolvableTopics: 0, - maxTopicIndex: null - }; - try { - return callback(); - } finally { - this.state.topicContext = outerContextTopicState; - } - } else { - return callback(); - } - } - withSoloAwaitPermittingContext(callback) { - const outerContextSoloAwaitState = this.state.soloAwait; - this.state.soloAwait = true; - try { - return callback(); - } finally { - this.state.soloAwait = outerContextSoloAwaitState; - } - } - allowInAnd(callback) { - const flags = this.prodParam.currentFlags(); - const prodParamToSet = 8 & ~flags; - if (prodParamToSet) { - this.prodParam.enter(flags | 8); - try { - return callback(); - } finally { - this.prodParam.exit(); - } - } - return callback(); - } - disallowInAnd(callback) { - const flags = this.prodParam.currentFlags(); - const prodParamToClear = 8 & flags; - if (prodParamToClear) { - this.prodParam.enter(flags & ~8); - try { - return callback(); - } finally { - this.prodParam.exit(); - } - } - return callback(); - } - registerTopicReference() { - this.state.topicContext.maxTopicIndex = 0; - } - topicReferenceIsAllowedInCurrentContext() { - return this.state.topicContext.maxNumOfResolvableTopics >= 1; - } - topicReferenceWasUsedInCurrentContext() { - return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0; - } - parseFSharpPipelineBody(prec) { - const startLoc = this.state.startLoc; - this.state.potentialArrowAt = this.state.start; - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = true; - const ret = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, prec); - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return ret; - } - parseModuleExpression() { - this.expectPlugin("moduleBlocks"); - const node = this.startNode(); - this.next(); - if (!this.match(5)) { - this.unexpected(null, 5); - } - const program = this.startNodeAt(this.state.endLoc); - this.next(); - const revertScopes = this.initializeScopes(true); - this.enterInitialScopes(); - try { - node.body = this.parseProgram(program, 8, "module"); - } finally { - revertScopes(); - } - return this.finishNode(node, "ModuleExpression"); - } - parsePropertyNamePrefixOperator(prop) {} -} -const loopLabel = { - kind: 1 - }, - switchLabel = { - kind: 2 - }; -const loneSurrogate = /[\uD800-\uDFFF]/u; -const keywordRelationalOperator = /in(?:stanceof)?/y; -function babel7CompatTokens(tokens, input, startIndex) { - for (let i = 0; i < tokens.length; i++) { - const token = tokens[i]; - const { - type - } = token; - if (typeof type === "number") { - { - if (type === 139) { - const { - loc, - start, - value, - end - } = token; - const hashEndPos = start + 1; - const hashEndLoc = createPositionWithColumnOffset(loc.start, 1); - tokens.splice(i, 1, new Token({ - type: getExportedToken(27), - value: "#", - start: start, - end: hashEndPos, - startLoc: loc.start, - endLoc: hashEndLoc - }), new Token({ - type: getExportedToken(132), - value: value, - start: hashEndPos, - end: end, - startLoc: hashEndLoc, - endLoc: loc.end - })); - i++; - continue; - } - if (tokenIsTemplate(type)) { - const { - loc, - start, - value, - end - } = token; - const backquoteEnd = start + 1; - const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1); - let startToken; - if (input.charCodeAt(start - startIndex) === 96) { - startToken = new Token({ - type: getExportedToken(22), - value: "`", - start: start, - end: backquoteEnd, - startLoc: loc.start, - endLoc: backquoteEndLoc - }); - } else { - startToken = new Token({ - type: getExportedToken(8), - value: "}", - start: start, - end: backquoteEnd, - startLoc: loc.start, - endLoc: backquoteEndLoc - }); - } - let templateValue, templateElementEnd, templateElementEndLoc, endToken; - if (type === 24) { - templateElementEnd = end - 1; - templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1); - templateValue = value === null ? null : value.slice(1, -1); - endToken = new Token({ - type: getExportedToken(22), - value: "`", - start: templateElementEnd, - end: end, - startLoc: templateElementEndLoc, - endLoc: loc.end - }); - } else { - templateElementEnd = end - 2; - templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2); - templateValue = value === null ? null : value.slice(1, -2); - endToken = new Token({ - type: getExportedToken(23), - value: "${", - start: templateElementEnd, - end: end, - startLoc: templateElementEndLoc, - endLoc: loc.end - }); - } - tokens.splice(i, 1, startToken, new Token({ - type: getExportedToken(20), - value: templateValue, - start: backquoteEnd, - end: templateElementEnd, - startLoc: backquoteEndLoc, - endLoc: templateElementEndLoc - }), endToken); - i += 2; - continue; - } - } - token.type = getExportedToken(type); - } - } - return tokens; -} -class StatementParser extends ExpressionParser { - parseTopLevel(file, program) { - file.program = this.parseProgram(program); - file.comments = this.comments; - if (this.optionFlags & 128) { - file.tokens = babel7CompatTokens(this.tokens, this.input, this.startIndex); - } - return this.finishNode(file, "File"); - } - parseProgram(program, end = 140, sourceType = this.options.sourceType) { - program.sourceType = sourceType; - program.interpreter = this.parseInterpreterDirective(); - this.parseBlockBody(program, true, true, end); - if (this.inModule) { - if (!(this.optionFlags & 32) && this.scope.undefinedExports.size > 0) { - for (const [localName, at] of Array.from(this.scope.undefinedExports)) { - this.raise(Errors.ModuleExportUndefined, at, { - localName - }); - } - } - this.addExtra(program, "topLevelAwait", this.state.hasTopLevelAwait); - } - let finishedProgram; - if (end === 140) { - finishedProgram = this.finishNode(program, "Program"); - } else { - finishedProgram = this.finishNodeAt(program, "Program", createPositionWithColumnOffset(this.state.startLoc, -1)); - } - return finishedProgram; - } - stmtToDirective(stmt) { - const directive = stmt; - directive.type = "Directive"; - directive.value = directive.expression; - delete directive.expression; - const directiveLiteral = directive.value; - const expressionValue = directiveLiteral.value; - const raw = this.input.slice(this.offsetToSourcePos(directiveLiteral.start), this.offsetToSourcePos(directiveLiteral.end)); - const val = directiveLiteral.value = raw.slice(1, -1); - this.addExtra(directiveLiteral, "raw", raw); - this.addExtra(directiveLiteral, "rawValue", val); - this.addExtra(directiveLiteral, "expressionValue", expressionValue); - directiveLiteral.type = "DirectiveLiteral"; - return directive; - } - parseInterpreterDirective() { - if (!this.match(28)) { - return null; - } - const node = this.startNode(); - node.value = this.state.value; - this.next(); - return this.finishNode(node, "InterpreterDirective"); - } - isLet() { - if (!this.isContextual(100)) { - return false; - } - return this.hasFollowingBindingAtom(); - } - chStartsBindingIdentifier(ch, pos) { - if (isIdentifierStart(ch)) { - keywordRelationalOperator.lastIndex = pos; - if (keywordRelationalOperator.test(this.input)) { - const endCh = this.codePointAtPos(keywordRelationalOperator.lastIndex); - if (!isIdentifierChar(endCh) && endCh !== 92) { - return false; - } - } - return true; - } else if (ch === 92) { - return true; - } else { - return false; - } - } - chStartsBindingPattern(ch) { - return ch === 91 || ch === 123; - } - hasFollowingBindingAtom() { - const next = this.nextTokenStart(); - const nextCh = this.codePointAtPos(next); - return this.chStartsBindingPattern(nextCh) || this.chStartsBindingIdentifier(nextCh, next); - } - hasInLineFollowingBindingIdentifierOrBrace() { - const next = this.nextTokenInLineStart(); - const nextCh = this.codePointAtPos(next); - return nextCh === 123 || this.chStartsBindingIdentifier(nextCh, next); - } - startsUsingForOf() { - const { - type, - containsEsc - } = this.lookahead(); - if (type === 102 && !containsEsc) { - return false; - } else if (tokenIsIdentifier(type) && !this.hasFollowingLineBreak()) { - this.expectPlugin("explicitResourceManagement"); - return true; - } - } - startsAwaitUsing() { - let next = this.nextTokenInLineStart(); - if (this.isUnparsedContextual(next, "using")) { - next = this.nextTokenInLineStartSince(next + 5); - const nextCh = this.codePointAtPos(next); - if (this.chStartsBindingIdentifier(nextCh, next)) { - this.expectPlugin("explicitResourceManagement"); - return true; - } - } - return false; - } - parseModuleItem() { - return this.parseStatementLike(1 | 2 | 4 | 8); - } - parseStatementListItem() { - return this.parseStatementLike(2 | 4 | (!this.options.annexB || this.state.strict ? 0 : 8)); - } - parseStatementOrSloppyAnnexBFunctionDeclaration(allowLabeledFunction = false) { - let flags = 0; - if (this.options.annexB && !this.state.strict) { - flags |= 4; - if (allowLabeledFunction) { - flags |= 8; - } - } - return this.parseStatementLike(flags); - } - parseStatement() { - return this.parseStatementLike(0); - } - parseStatementLike(flags) { - let decorators = null; - if (this.match(26)) { - decorators = this.parseDecorators(true); - } - return this.parseStatementContent(flags, decorators); - } - parseStatementContent(flags, decorators) { - const startType = this.state.type; - const node = this.startNode(); - const allowDeclaration = !!(flags & 2); - const allowFunctionDeclaration = !!(flags & 4); - const topLevel = flags & 1; - switch (startType) { - case 60: - return this.parseBreakContinueStatement(node, true); - case 63: - return this.parseBreakContinueStatement(node, false); - case 64: - return this.parseDebuggerStatement(node); - case 90: - return this.parseDoWhileStatement(node); - case 91: - return this.parseForStatement(node); - case 68: - if (this.lookaheadCharCode() === 46) break; - if (!allowFunctionDeclaration) { - this.raise(this.state.strict ? Errors.StrictFunction : this.options.annexB ? Errors.SloppyFunctionAnnexB : Errors.SloppyFunction, this.state.startLoc); - } - return this.parseFunctionStatement(node, false, !allowDeclaration && allowFunctionDeclaration); - case 80: - if (!allowDeclaration) this.unexpected(); - return this.parseClass(this.maybeTakeDecorators(decorators, node), true); - case 69: - return this.parseIfStatement(node); - case 70: - return this.parseReturnStatement(node); - case 71: - return this.parseSwitchStatement(node); - case 72: - return this.parseThrowStatement(node); - case 73: - return this.parseTryStatement(node); - case 96: - if (!this.state.containsEsc && this.startsAwaitUsing()) { - if (!this.recordAwaitIfAllowed()) { - this.raise(Errors.AwaitUsingNotInAsyncContext, node); - } else if (!allowDeclaration) { - this.raise(Errors.UnexpectedLexicalDeclaration, node); - } - this.next(); - return this.parseVarStatement(node, "await using"); - } - break; - case 107: - if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifierOrBrace()) { - break; - } - this.expectPlugin("explicitResourceManagement"); - if (!this.scope.inModule && this.scope.inTopLevel) { - this.raise(Errors.UnexpectedUsingDeclaration, this.state.startLoc); - } else if (!allowDeclaration) { - this.raise(Errors.UnexpectedLexicalDeclaration, this.state.startLoc); - } - return this.parseVarStatement(node, "using"); - case 100: - { - if (this.state.containsEsc) { - break; - } - const next = this.nextTokenStart(); - const nextCh = this.codePointAtPos(next); - if (nextCh !== 91) { - if (!allowDeclaration && this.hasFollowingLineBreak()) break; - if (!this.chStartsBindingIdentifier(nextCh, next) && nextCh !== 123) { - break; - } - } - } - case 75: - { - if (!allowDeclaration) { - this.raise(Errors.UnexpectedLexicalDeclaration, this.state.startLoc); - } - } - case 74: - { - const kind = this.state.value; - return this.parseVarStatement(node, kind); - } - case 92: - return this.parseWhileStatement(node); - case 76: - return this.parseWithStatement(node); - case 5: - return this.parseBlock(); - case 13: - return this.parseEmptyStatement(node); - case 83: - { - const nextTokenCharCode = this.lookaheadCharCode(); - if (nextTokenCharCode === 40 || nextTokenCharCode === 46) { - break; - } - } - case 82: - { - if (!(this.optionFlags & 8) && !topLevel) { - this.raise(Errors.UnexpectedImportExport, this.state.startLoc); - } - this.next(); - let result; - if (startType === 83) { - result = this.parseImport(node); - if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { - this.sawUnambiguousESM = true; - } - } else { - result = this.parseExport(node, decorators); - if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { - this.sawUnambiguousESM = true; - } - } - this.assertModuleNodeAllowed(result); - return result; - } - default: - { - if (this.isAsyncFunction()) { - if (!allowDeclaration) { - this.raise(Errors.AsyncFunctionInSingleStatementContext, this.state.startLoc); - } - this.next(); - return this.parseFunctionStatement(node, true, !allowDeclaration && allowFunctionDeclaration); - } - } - } - const maybeName = this.state.value; - const expr = this.parseExpression(); - if (tokenIsIdentifier(startType) && expr.type === "Identifier" && this.eat(14)) { - return this.parseLabeledStatement(node, maybeName, expr, flags); - } else { - return this.parseExpressionStatement(node, expr, decorators); - } - } - assertModuleNodeAllowed(node) { - if (!(this.optionFlags & 8) && !this.inModule) { - this.raise(Errors.ImportOutsideModule, node); - } - } - decoratorsEnabledBeforeExport() { - if (this.hasPlugin("decorators-legacy")) return true; - return this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") !== false; - } - maybeTakeDecorators(maybeDecorators, classNode, exportNode) { - if (maybeDecorators) { - var _classNode$decorators; - if ((_classNode$decorators = classNode.decorators) != null && _classNode$decorators.length) { - if (typeof this.getPluginOption("decorators", "decoratorsBeforeExport") !== "boolean") { - this.raise(Errors.DecoratorsBeforeAfterExport, classNode.decorators[0]); - } - classNode.decorators.unshift(...maybeDecorators); - } else { - classNode.decorators = maybeDecorators; - } - this.resetStartLocationFromNode(classNode, maybeDecorators[0]); - if (exportNode) this.resetStartLocationFromNode(exportNode, classNode); - } - return classNode; - } - canHaveLeadingDecorator() { - return this.match(80); - } - parseDecorators(allowExport) { - const decorators = []; - do { - decorators.push(this.parseDecorator()); - } while (this.match(26)); - if (this.match(82)) { - if (!allowExport) { - this.unexpected(); - } - if (!this.decoratorsEnabledBeforeExport()) { - this.raise(Errors.DecoratorExportClass, this.state.startLoc); - } - } else if (!this.canHaveLeadingDecorator()) { - throw this.raise(Errors.UnexpectedLeadingDecorator, this.state.startLoc); - } - return decorators; - } - parseDecorator() { - this.expectOnePlugin(["decorators", "decorators-legacy"]); - const node = this.startNode(); - this.next(); - if (this.hasPlugin("decorators")) { - const startLoc = this.state.startLoc; - let expr; - if (this.match(10)) { - const startLoc = this.state.startLoc; - this.next(); - expr = this.parseExpression(); - this.expect(11); - expr = this.wrapParenthesis(startLoc, expr); - const paramsStartLoc = this.state.startLoc; - node.expression = this.parseMaybeDecoratorArguments(expr, startLoc); - if (this.getPluginOption("decorators", "allowCallParenthesized") === false && node.expression !== expr) { - this.raise(Errors.DecoratorArgumentsOutsideParentheses, paramsStartLoc); - } - } else { - expr = this.parseIdentifier(false); - while (this.eat(16)) { - const node = this.startNodeAt(startLoc); - node.object = expr; - if (this.match(139)) { - this.classScope.usePrivateName(this.state.value, this.state.startLoc); - node.property = this.parsePrivateName(); - } else { - node.property = this.parseIdentifier(true); - } - node.computed = false; - expr = this.finishNode(node, "MemberExpression"); - } - node.expression = this.parseMaybeDecoratorArguments(expr, startLoc); - } - } else { - node.expression = this.parseExprSubscripts(); - } - return this.finishNode(node, "Decorator"); - } - parseMaybeDecoratorArguments(expr, startLoc) { - if (this.eat(10)) { - const node = this.startNodeAt(startLoc); - node.callee = expr; - node.arguments = this.parseCallExpressionArguments(11); - this.toReferencedList(node.arguments); - return this.finishNode(node, "CallExpression"); - } - return expr; - } - parseBreakContinueStatement(node, isBreak) { - this.next(); - if (this.isLineTerminator()) { - node.label = null; - } else { - node.label = this.parseIdentifier(); - this.semicolon(); - } - this.verifyBreakContinue(node, isBreak); - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); - } - verifyBreakContinue(node, isBreak) { - let i; - for (i = 0; i < this.state.labels.length; ++i) { - const lab = this.state.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === 1)) { - break; - } - if (node.label && isBreak) break; - } - } - if (i === this.state.labels.length) { - const type = isBreak ? "BreakStatement" : "ContinueStatement"; - this.raise(Errors.IllegalBreakContinue, node, { - type - }); - } - } - parseDebuggerStatement(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); - } - parseHeaderExpression() { - this.expect(10); - const val = this.parseExpression(); - this.expect(11); - return val; - } - parseDoWhileStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); - this.state.labels.pop(); - this.expect(92); - node.test = this.parseHeaderExpression(); - this.eat(13); - return this.finishNode(node, "DoWhileStatement"); - } - parseForStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - let awaitAt = null; - if (this.isContextual(96) && this.recordAwaitIfAllowed()) { - awaitAt = this.state.startLoc; - this.next(); - } - this.scope.enter(0); - this.expect(10); - if (this.match(13)) { - if (awaitAt !== null) { - this.unexpected(awaitAt); - } - return this.parseFor(node, null); - } - const startsWithLet = this.isContextual(100); - { - const startsWithAwaitUsing = this.isContextual(96) && this.startsAwaitUsing(); - const starsWithUsingDeclaration = startsWithAwaitUsing || this.isContextual(107) && this.startsUsingForOf(); - const isLetOrUsing = startsWithLet && this.hasFollowingBindingAtom() || starsWithUsingDeclaration; - if (this.match(74) || this.match(75) || isLetOrUsing) { - const initNode = this.startNode(); - let kind; - if (startsWithAwaitUsing) { - kind = "await using"; - if (!this.recordAwaitIfAllowed()) { - this.raise(Errors.AwaitUsingNotInAsyncContext, this.state.startLoc); - } - this.next(); - } else { - kind = this.state.value; - } - this.next(); - this.parseVar(initNode, true, kind); - const init = this.finishNode(initNode, "VariableDeclaration"); - const isForIn = this.match(58); - if (isForIn && starsWithUsingDeclaration) { - this.raise(Errors.ForInUsing, init); - } - if ((isForIn || this.isContextual(102)) && init.declarations.length === 1) { - return this.parseForIn(node, init, awaitAt); - } - if (awaitAt !== null) { - this.unexpected(awaitAt); - } - return this.parseFor(node, init); - } - } - const startsWithAsync = this.isContextual(95); - const refExpressionErrors = new ExpressionErrors(); - const init = this.parseExpression(true, refExpressionErrors); - const isForOf = this.isContextual(102); - if (isForOf) { - if (startsWithLet) { - this.raise(Errors.ForOfLet, init); - } - if (awaitAt === null && startsWithAsync && init.type === "Identifier") { - this.raise(Errors.ForOfAsync, init); - } - } - if (isForOf || this.match(58)) { - this.checkDestructuringPrivate(refExpressionErrors); - this.toAssignable(init, true); - const type = isForOf ? "ForOfStatement" : "ForInStatement"; - this.checkLVal(init, { - type - }); - return this.parseForIn(node, init, awaitAt); - } else { - this.checkExpressionErrors(refExpressionErrors, true); - } - if (awaitAt !== null) { - this.unexpected(awaitAt); - } - return this.parseFor(node, init); - } - parseFunctionStatement(node, isAsync, isHangingDeclaration) { - this.next(); - return this.parseFunction(node, 1 | (isHangingDeclaration ? 2 : 0) | (isAsync ? 8 : 0)); - } - parseIfStatement(node) { - this.next(); - node.test = this.parseHeaderExpression(); - node.consequent = this.parseStatementOrSloppyAnnexBFunctionDeclaration(); - node.alternate = this.eat(66) ? this.parseStatementOrSloppyAnnexBFunctionDeclaration() : null; - return this.finishNode(node, "IfStatement"); - } - parseReturnStatement(node) { - if (!this.prodParam.hasReturn && !(this.optionFlags & 2)) { - this.raise(Errors.IllegalReturn, this.state.startLoc); - } - this.next(); - if (this.isLineTerminator()) { - node.argument = null; - } else { - node.argument = this.parseExpression(); - this.semicolon(); - } - return this.finishNode(node, "ReturnStatement"); - } - parseSwitchStatement(node) { - this.next(); - node.discriminant = this.parseHeaderExpression(); - const cases = node.cases = []; - this.expect(5); - this.state.labels.push(switchLabel); - this.scope.enter(0); - let cur; - for (let sawDefault; !this.match(8);) { - if (this.match(61) || this.match(65)) { - const isCase = this.match(61); - if (cur) this.finishNode(cur, "SwitchCase"); - cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) { - this.raise(Errors.MultipleDefaultsInSwitch, this.state.lastTokStartLoc); - } - sawDefault = true; - cur.test = null; - } - this.expect(14); - } else { - if (cur) { - cur.consequent.push(this.parseStatementListItem()); - } else { - this.unexpected(); - } - } - } - this.scope.exit(); - if (cur) this.finishNode(cur, "SwitchCase"); - this.next(); - this.state.labels.pop(); - return this.finishNode(node, "SwitchStatement"); - } - parseThrowStatement(node) { - this.next(); - if (this.hasPrecedingLineBreak()) { - this.raise(Errors.NewlineAfterThrow, this.state.lastTokEndLoc); - } - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); - } - parseCatchClauseParam() { - const param = this.parseBindingAtom(); - this.scope.enter(this.options.annexB && param.type === "Identifier" ? 8 : 0); - this.checkLVal(param, { - type: "CatchClause" - }, 9); - return param; - } - parseTryStatement(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.match(62)) { - const clause = this.startNode(); - this.next(); - if (this.match(10)) { - this.expect(10); - clause.param = this.parseCatchClauseParam(); - this.expect(11); - } else { - clause.param = null; - this.scope.enter(0); - } - clause.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(false, false)); - this.scope.exit(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.finalizer = this.eat(67) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) { - this.raise(Errors.NoCatchOrFinally, node); - } - return this.finishNode(node, "TryStatement"); - } - parseVarStatement(node, kind, allowMissingInitializer = false) { - this.next(); - this.parseVar(node, false, kind, allowMissingInitializer); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); - } - parseWhileStatement(node) { - this.next(); - node.test = this.parseHeaderExpression(); - this.state.labels.push(loopLabel); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); - this.state.labels.pop(); - return this.finishNode(node, "WhileStatement"); - } - parseWithStatement(node) { - if (this.state.strict) { - this.raise(Errors.StrictWith, this.state.startLoc); - } - this.next(); - node.object = this.parseHeaderExpression(); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); - return this.finishNode(node, "WithStatement"); - } - parseEmptyStatement(node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); - } - parseLabeledStatement(node, maybeName, expr, flags) { - for (const label of this.state.labels) { - if (label.name === maybeName) { - this.raise(Errors.LabelRedeclaration, expr, { - labelName: maybeName - }); - } - } - const kind = tokenIsLoop(this.state.type) ? 1 : this.match(71) ? 2 : null; - for (let i = this.state.labels.length - 1; i >= 0; i--) { - const label = this.state.labels[i]; - if (label.statementStart === node.start) { - label.statementStart = this.sourceToOffsetPos(this.state.start); - label.kind = kind; - } else { - break; - } - } - this.state.labels.push({ - name: maybeName, - kind: kind, - statementStart: this.sourceToOffsetPos(this.state.start) - }); - node.body = flags & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(true) : this.parseStatement(); - this.state.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); - } - parseExpressionStatement(node, expr, decorators) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); - } - parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) { - const node = this.startNode(); - if (allowDirectives) { - this.state.strictErrors.clear(); - } - this.expect(5); - if (createNewLexicalScope) { - this.scope.enter(0); - } - this.parseBlockBody(node, allowDirectives, false, 8, afterBlockParse); - if (createNewLexicalScope) { - this.scope.exit(); - } - return this.finishNode(node, "BlockStatement"); - } - isValidDirective(stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; - } - parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) { - const body = node.body = []; - const directives = node.directives = []; - this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end, afterBlockParse); - } - parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) { - const oldStrict = this.state.strict; - let hasStrictModeDirective = false; - let parsedNonDirective = false; - while (!this.match(end)) { - const stmt = topLevel ? this.parseModuleItem() : this.parseStatementListItem(); - if (directives && !parsedNonDirective) { - if (this.isValidDirective(stmt)) { - const directive = this.stmtToDirective(stmt); - directives.push(directive); - if (!hasStrictModeDirective && directive.value.value === "use strict") { - hasStrictModeDirective = true; - this.setStrict(true); - } - continue; - } - parsedNonDirective = true; - this.state.strictErrors.clear(); - } - body.push(stmt); - } - afterBlockParse == null || afterBlockParse.call(this, hasStrictModeDirective); - if (!oldStrict) { - this.setStrict(false); - } - this.next(); - } - parseFor(node, init) { - node.init = init; - this.semicolon(false); - node.test = this.match(13) ? null : this.parseExpression(); - this.semicolon(false); - node.update = this.match(11) ? null : this.parseExpression(); - this.expect(11); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); - this.scope.exit(); - this.state.labels.pop(); - return this.finishNode(node, "ForStatement"); - } - parseForIn(node, init, awaitAt) { - const isForIn = this.match(58); - this.next(); - if (isForIn) { - if (awaitAt !== null) this.unexpected(awaitAt); - } else { - node.await = awaitAt !== null; - } - if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || !this.options.annexB || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) { - this.raise(Errors.ForInOfLoopInitializer, init, { - type: isForIn ? "ForInStatement" : "ForOfStatement" - }); - } - if (init.type === "AssignmentPattern") { - this.raise(Errors.InvalidLhs, init, { - ancestor: { - type: "ForStatement" - } - }); - } - node.left = init; - node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn(); - this.expect(11); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); - this.scope.exit(); - this.state.labels.pop(); - return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement"); - } - parseVar(node, isFor, kind, allowMissingInitializer = false) { - const declarations = node.declarations = []; - node.kind = kind; - for (;;) { - const decl = this.startNode(); - this.parseVarId(decl, kind); - decl.init = !this.eat(29) ? null : isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn(); - if (decl.init === null && !allowMissingInitializer) { - if (decl.id.type !== "Identifier" && !(isFor && (this.match(58) || this.isContextual(102)))) { - this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, { - kind: "destructuring" - }); - } else if ((kind === "const" || kind === "using" || kind === "await using") && !(this.match(58) || this.isContextual(102))) { - this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, { - kind - }); - } - } - declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(12)) break; - } - return node; - } - parseVarId(decl, kind) { - const id = this.parseBindingAtom(); - if (kind === "using" || kind === "await using") { - if (id.type === "ArrayPattern" || id.type === "ObjectPattern") { - this.raise(Errors.UsingDeclarationHasBindingPattern, id.loc.start); - } - } - this.checkLVal(id, { - type: "VariableDeclarator" - }, kind === "var" ? 5 : 8201); - decl.id = id; - } - parseAsyncFunctionExpression(node) { - return this.parseFunction(node, 8); - } - parseFunction(node, flags = 0) { - const hangingDeclaration = flags & 2; - const isDeclaration = !!(flags & 1); - const requireId = isDeclaration && !(flags & 4); - const isAsync = !!(flags & 8); - this.initFunction(node, isAsync); - if (this.match(55)) { - if (hangingDeclaration) { - this.raise(Errors.GeneratorInSingleStatementContext, this.state.startLoc); - } - this.next(); - node.generator = true; - } - if (isDeclaration) { - node.id = this.parseFunctionId(requireId); - } - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - this.state.maybeInArrowParameters = false; - this.scope.enter(2); - this.prodParam.enter(functionFlags(isAsync, node.generator)); - if (!isDeclaration) { - node.id = this.parseFunctionId(); - } - this.parseFunctionParams(node, false); - this.withSmartMixTopicForbiddingContext(() => { - this.parseFunctionBodyAndFinish(node, isDeclaration ? "FunctionDeclaration" : "FunctionExpression"); - }); - this.prodParam.exit(); - this.scope.exit(); - if (isDeclaration && !hangingDeclaration) { - this.registerFunctionStatementId(node); - } - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - return node; - } - parseFunctionId(requireId) { - return requireId || tokenIsIdentifier(this.state.type) ? this.parseIdentifier() : null; - } - parseFunctionParams(node, isConstructor) { - this.expect(10); - this.expressionScope.enter(newParameterDeclarationScope()); - node.params = this.parseBindingList(11, 41, 2 | (isConstructor ? 4 : 0)); - this.expressionScope.exit(); - } - registerFunctionStatementId(node) { - if (!node.id) return; - this.scope.declareName(node.id.name, !this.options.annexB || this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? 5 : 8201 : 17, node.id.loc.start); - } - parseClass(node, isStatement, optionalId) { - this.next(); - const oldStrict = this.state.strict; - this.state.strict = true; - this.parseClassId(node, isStatement, optionalId); - this.parseClassSuper(node); - node.body = this.parseClassBody(!!node.superClass, oldStrict); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); - } - isClassProperty() { - return this.match(29) || this.match(13) || this.match(8); - } - isClassMethod() { - return this.match(10); - } - nameIsConstructor(key) { - return key.type === "Identifier" && key.name === "constructor" || key.type === "StringLiteral" && key.value === "constructor"; - } - isNonstaticConstructor(method) { - return !method.computed && !method.static && this.nameIsConstructor(method.key); - } - parseClassBody(hadSuperClass, oldStrict) { - this.classScope.enter(); - const state = { - hadConstructor: false, - hadSuperClass - }; - let decorators = []; - const classBody = this.startNode(); - classBody.body = []; - this.expect(5); - this.withSmartMixTopicForbiddingContext(() => { - while (!this.match(8)) { - if (this.eat(13)) { - if (decorators.length > 0) { - throw this.raise(Errors.DecoratorSemicolon, this.state.lastTokEndLoc); - } - continue; - } - if (this.match(26)) { - decorators.push(this.parseDecorator()); - continue; - } - const member = this.startNode(); - if (decorators.length) { - member.decorators = decorators; - this.resetStartLocationFromNode(member, decorators[0]); - decorators = []; - } - this.parseClassMember(classBody, member, state); - if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { - this.raise(Errors.DecoratorConstructor, member); - } - } - }); - this.state.strict = oldStrict; - this.next(); - if (decorators.length) { - throw this.raise(Errors.TrailingDecorator, this.state.startLoc); - } - this.classScope.exit(); - return this.finishNode(classBody, "ClassBody"); - } - parseClassMemberFromModifier(classBody, member) { - const key = this.parseIdentifier(true); - if (this.isClassMethod()) { - const method = member; - method.kind = "method"; - method.computed = false; - method.key = key; - method.static = false; - this.pushClassMethod(classBody, method, false, false, false, false); - return true; - } else if (this.isClassProperty()) { - const prop = member; - prop.computed = false; - prop.key = key; - prop.static = false; - classBody.body.push(this.parseClassProperty(prop)); - return true; - } - this.resetPreviousNodeTrailingComments(key); - return false; - } - parseClassMember(classBody, member, state) { - const isStatic = this.isContextual(106); - if (isStatic) { - if (this.parseClassMemberFromModifier(classBody, member)) { - return; - } - if (this.eat(5)) { - this.parseClassStaticBlock(classBody, member); - return; - } - } - this.parseClassMemberWithIsStatic(classBody, member, state, isStatic); - } - parseClassMemberWithIsStatic(classBody, member, state, isStatic) { - const publicMethod = member; - const privateMethod = member; - const publicProp = member; - const privateProp = member; - const accessorProp = member; - const method = publicMethod; - const publicMember = publicMethod; - member.static = isStatic; - this.parsePropertyNamePrefixOperator(member); - if (this.eat(55)) { - method.kind = "method"; - const isPrivateName = this.match(139); - this.parseClassElementName(method); - if (isPrivateName) { - this.pushClassPrivateMethod(classBody, privateMethod, true, false); - return; - } - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(Errors.ConstructorIsGenerator, publicMethod.key); - } - this.pushClassMethod(classBody, publicMethod, true, false, false, false); - return; - } - const isContextual = !this.state.containsEsc && tokenIsIdentifier(this.state.type); - const key = this.parseClassElementName(member); - const maybeContextualKw = isContextual ? key.name : null; - const isPrivate = this.isPrivateName(key); - const maybeQuestionTokenStartLoc = this.state.startLoc; - this.parsePostMemberNameModifiers(publicMember); - if (this.isClassMethod()) { - method.kind = "method"; - if (isPrivate) { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - return; - } - const isConstructor = this.isNonstaticConstructor(publicMethod); - let allowsDirectSuper = false; - if (isConstructor) { - publicMethod.kind = "constructor"; - if (state.hadConstructor && !this.hasPlugin("typescript")) { - this.raise(Errors.DuplicateConstructor, key); - } - if (isConstructor && this.hasPlugin("typescript") && member.override) { - this.raise(Errors.OverrideOnConstructor, key); - } - state.hadConstructor = true; - allowsDirectSuper = state.hadSuperClass; - } - this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper); - } else if (this.isClassProperty()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else if (maybeContextualKw === "async" && !this.isLineTerminator()) { - this.resetPreviousNodeTrailingComments(key); - const isGenerator = this.eat(55); - if (publicMember.optional) { - this.unexpected(maybeQuestionTokenStartLoc); - } - method.kind = "method"; - const isPrivate = this.match(139); - this.parseClassElementName(method); - this.parsePostMemberNameModifiers(publicMember); - if (isPrivate) { - this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(Errors.ConstructorIsAsync, publicMethod.key); - } - this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false); - } - } else if ((maybeContextualKw === "get" || maybeContextualKw === "set") && !(this.match(55) && this.isLineTerminator())) { - this.resetPreviousNodeTrailingComments(key); - method.kind = maybeContextualKw; - const isPrivate = this.match(139); - this.parseClassElementName(publicMethod); - if (isPrivate) { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(Errors.ConstructorIsAccessor, publicMethod.key); - } - this.pushClassMethod(classBody, publicMethod, false, false, false, false); - } - this.checkGetterSetterParams(publicMethod); - } else if (maybeContextualKw === "accessor" && !this.isLineTerminator()) { - this.expectPlugin("decoratorAutoAccessors"); - this.resetPreviousNodeTrailingComments(key); - const isPrivate = this.match(139); - this.parseClassElementName(publicProp); - this.pushClassAccessorProperty(classBody, accessorProp, isPrivate); - } else if (this.isLineTerminator()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else { - this.unexpected(); - } - } - parseClassElementName(member) { - const { - type, - value - } = this.state; - if ((type === 132 || type === 134) && member.static && value === "prototype") { - this.raise(Errors.StaticPrototype, this.state.startLoc); - } - if (type === 139) { - if (value === "constructor") { - this.raise(Errors.ConstructorClassPrivateField, this.state.startLoc); - } - const key = this.parsePrivateName(); - member.key = key; - return key; - } - this.parsePropertyName(member); - return member.key; - } - parseClassStaticBlock(classBody, member) { - var _member$decorators; - this.scope.enter(64 | 128 | 16); - const oldLabels = this.state.labels; - this.state.labels = []; - this.prodParam.enter(0); - const body = member.body = []; - this.parseBlockOrModuleBlockBody(body, undefined, false, 8); - this.prodParam.exit(); - this.scope.exit(); - this.state.labels = oldLabels; - classBody.body.push(this.finishNode(member, "StaticBlock")); - if ((_member$decorators = member.decorators) != null && _member$decorators.length) { - this.raise(Errors.DecoratorStaticBlock, member); - } - } - pushClassProperty(classBody, prop) { - if (!prop.computed && this.nameIsConstructor(prop.key)) { - this.raise(Errors.ConstructorClassField, prop.key); - } - classBody.body.push(this.parseClassProperty(prop)); - } - pushClassPrivateProperty(classBody, prop) { - const node = this.parseClassPrivateProperty(prop); - classBody.body.push(node); - this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), 0, node.key.loc.start); - } - pushClassAccessorProperty(classBody, prop, isPrivate) { - if (!isPrivate && !prop.computed && this.nameIsConstructor(prop.key)) { - this.raise(Errors.ConstructorClassField, prop.key); - } - const node = this.parseClassAccessorProperty(prop); - classBody.body.push(node); - if (isPrivate) { - this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), 0, node.key.loc.start); - } - } - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true)); - } - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true); - classBody.body.push(node); - const kind = node.kind === "get" ? node.static ? 6 : 2 : node.kind === "set" ? node.static ? 5 : 1 : 0; - this.declareClassPrivateMethodInScope(node, kind); - } - declareClassPrivateMethodInScope(node, kind) { - this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.loc.start); - } - parsePostMemberNameModifiers(methodOrProp) {} - parseClassPrivateProperty(node) { - this.parseInitializer(node); - this.semicolon(); - return this.finishNode(node, "ClassPrivateProperty"); - } - parseClassProperty(node) { - this.parseInitializer(node); - this.semicolon(); - return this.finishNode(node, "ClassProperty"); - } - parseClassAccessorProperty(node) { - this.parseInitializer(node); - this.semicolon(); - return this.finishNode(node, "ClassAccessorProperty"); - } - parseInitializer(node) { - this.scope.enter(64 | 16); - this.expressionScope.enter(newExpressionScope()); - this.prodParam.enter(0); - node.value = this.eat(29) ? this.parseMaybeAssignAllowIn() : null; - this.expressionScope.exit(); - this.prodParam.exit(); - this.scope.exit(); - } - parseClassId(node, isStatement, optionalId, bindingType = 8331) { - if (tokenIsIdentifier(this.state.type)) { - node.id = this.parseIdentifier(); - if (isStatement) { - this.declareNameFromIdentifier(node.id, bindingType); - } - } else { - if (optionalId || !isStatement) { - node.id = null; - } else { - throw this.raise(Errors.MissingClassName, this.state.startLoc); - } - } - } - parseClassSuper(node) { - node.superClass = this.eat(81) ? this.parseExprSubscripts() : null; - } - parseExport(node, decorators) { - const maybeDefaultIdentifier = this.parseMaybeImportPhase(node, true); - const hasDefault = this.maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier); - const parseAfterDefault = !hasDefault || this.eat(12); - const hasStar = parseAfterDefault && this.eatExportStar(node); - const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node); - const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(12)); - const isFromRequired = hasDefault || hasStar; - if (hasStar && !hasNamespace) { - if (hasDefault) this.unexpected(); - if (decorators) { - throw this.raise(Errors.UnsupportedDecoratorExport, node); - } - this.parseExportFrom(node, true); - return this.finishNode(node, "ExportAllDeclaration"); - } - const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node); - if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) { - this.unexpected(null, 5); - } - if (hasNamespace && parseAfterNamespace) { - this.unexpected(null, 98); - } - let hasDeclaration; - if (isFromRequired || hasSpecifiers) { - hasDeclaration = false; - if (decorators) { - throw this.raise(Errors.UnsupportedDecoratorExport, node); - } - this.parseExportFrom(node, isFromRequired); - } else { - hasDeclaration = this.maybeParseExportDeclaration(node); - } - if (isFromRequired || hasSpecifiers || hasDeclaration) { - var _node2$declaration; - const node2 = node; - this.checkExport(node2, true, false, !!node2.source); - if (((_node2$declaration = node2.declaration) == null ? void 0 : _node2$declaration.type) === "ClassDeclaration") { - this.maybeTakeDecorators(decorators, node2.declaration, node2); - } else if (decorators) { - throw this.raise(Errors.UnsupportedDecoratorExport, node); - } - return this.finishNode(node2, "ExportNamedDeclaration"); - } - if (this.eat(65)) { - const node2 = node; - const decl = this.parseExportDefaultExpression(); - node2.declaration = decl; - if (decl.type === "ClassDeclaration") { - this.maybeTakeDecorators(decorators, decl, node2); - } else if (decorators) { - throw this.raise(Errors.UnsupportedDecoratorExport, node); - } - this.checkExport(node2, true, true); - return this.finishNode(node2, "ExportDefaultDeclaration"); - } - this.unexpected(null, 5); - } - eatExportStar(node) { - return this.eat(55); - } - maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier) { - if (maybeDefaultIdentifier || this.isExportDefaultSpecifier()) { - this.expectPlugin("exportDefaultFrom", maybeDefaultIdentifier == null ? void 0 : maybeDefaultIdentifier.loc.start); - const id = maybeDefaultIdentifier || this.parseIdentifier(true); - const specifier = this.startNodeAtNode(id); - specifier.exported = id; - node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - return true; - } - return false; - } - maybeParseExportNamespaceSpecifier(node) { - if (this.isContextual(93)) { - var _ref, _ref$specifiers; - (_ref$specifiers = (_ref = node).specifiers) != null ? _ref$specifiers : _ref.specifiers = []; - const specifier = this.startNodeAt(this.state.lastTokStartLoc); - this.next(); - specifier.exported = this.parseModuleExportName(); - node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier")); - return true; - } - return false; - } - maybeParseExportNamedSpecifiers(node) { - if (this.match(5)) { - const node2 = node; - if (!node2.specifiers) node2.specifiers = []; - const isTypeExport = node2.exportKind === "type"; - node2.specifiers.push(...this.parseExportSpecifiers(isTypeExport)); - node2.source = null; - node2.declaration = null; - if (this.hasPlugin("importAssertions")) { - node2.assertions = []; - } - return true; - } - return false; - } - maybeParseExportDeclaration(node) { - if (this.shouldParseExportDeclaration()) { - node.specifiers = []; - node.source = null; - if (this.hasPlugin("importAssertions")) { - node.assertions = []; - } - node.declaration = this.parseExportDeclaration(node); - return true; - } - return false; - } - isAsyncFunction() { - if (!this.isContextual(95)) return false; - const next = this.nextTokenInLineStart(); - return this.isUnparsedContextual(next, "function"); - } - parseExportDefaultExpression() { - const expr = this.startNode(); - if (this.match(68)) { - this.next(); - return this.parseFunction(expr, 1 | 4); - } else if (this.isAsyncFunction()) { - this.next(); - this.next(); - return this.parseFunction(expr, 1 | 4 | 8); - } - if (this.match(80)) { - return this.parseClass(expr, true, true); - } - if (this.match(26)) { - if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") === true) { - this.raise(Errors.DecoratorBeforeExport, this.state.startLoc); - } - return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(false), this.startNode()), true, true); - } - if (this.match(75) || this.match(74) || this.isLet()) { - throw this.raise(Errors.UnsupportedDefaultExport, this.state.startLoc); - } - const res = this.parseMaybeAssignAllowIn(); - this.semicolon(); - return res; - } - parseExportDeclaration(node) { - if (this.match(80)) { - const node = this.parseClass(this.startNode(), true, false); - return node; - } - return this.parseStatementListItem(); - } - isExportDefaultSpecifier() { - const { - type - } = this.state; - if (tokenIsIdentifier(type)) { - if (type === 95 && !this.state.containsEsc || type === 100) { - return false; - } - if ((type === 130 || type === 129) && !this.state.containsEsc) { - const { - type: nextType - } = this.lookahead(); - if (tokenIsIdentifier(nextType) && nextType !== 98 || nextType === 5) { - this.expectOnePlugin(["flow", "typescript"]); - return false; - } - } - } else if (!this.match(65)) { - return false; - } - const next = this.nextTokenStart(); - const hasFrom = this.isUnparsedContextual(next, "from"); - if (this.input.charCodeAt(next) === 44 || tokenIsIdentifier(this.state.type) && hasFrom) { - return true; - } - if (this.match(65) && hasFrom) { - const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4)); - return nextAfterFrom === 34 || nextAfterFrom === 39; - } - return false; - } - parseExportFrom(node, expect) { - if (this.eatContextual(98)) { - node.source = this.parseImportSource(); - this.checkExport(node); - this.maybeParseImportAttributes(node); - this.checkJSONModuleImport(node); - } else if (expect) { - this.unexpected(); - } - this.semicolon(); - } - shouldParseExportDeclaration() { - const { - type - } = this.state; - if (type === 26) { - this.expectOnePlugin(["decorators", "decorators-legacy"]); - if (this.hasPlugin("decorators")) { - if (this.getPluginOption("decorators", "decoratorsBeforeExport") === true) { - this.raise(Errors.DecoratorBeforeExport, this.state.startLoc); - } - return true; - } - } - if (this.isContextual(107)) { - this.raise(Errors.UsingDeclarationExport, this.state.startLoc); - return true; - } - if (this.isContextual(96) && this.startsAwaitUsing()) { - this.raise(Errors.UsingDeclarationExport, this.state.startLoc); - return true; - } - return type === 74 || type === 75 || type === 68 || type === 80 || this.isLet() || this.isAsyncFunction(); - } - checkExport(node, checkNames, isDefault, isFrom) { - if (checkNames) { - var _node$specifiers; - if (isDefault) { - this.checkDuplicateExports(node, "default"); - if (this.hasPlugin("exportDefaultFrom")) { - var _declaration$extra; - const declaration = node.declaration; - if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) { - this.raise(Errors.ExportDefaultFromAsIdentifier, declaration); - } - } - } else if ((_node$specifiers = node.specifiers) != null && _node$specifiers.length) { - for (const specifier of node.specifiers) { - const { - exported - } = specifier; - const exportName = exported.type === "Identifier" ? exported.name : exported.value; - this.checkDuplicateExports(specifier, exportName); - if (!isFrom && specifier.local) { - const { - local - } = specifier; - if (local.type !== "Identifier") { - this.raise(Errors.ExportBindingIsString, specifier, { - localName: local.value, - exportName - }); - } else { - this.checkReservedWord(local.name, local.loc.start, true, false); - this.scope.checkLocalExport(local); - } - } - } - } else if (node.declaration) { - const decl = node.declaration; - if (decl.type === "FunctionDeclaration" || decl.type === "ClassDeclaration") { - const { - id - } = decl; - if (!id) throw new Error("Assertion failure"); - this.checkDuplicateExports(node, id.name); - } else if (decl.type === "VariableDeclaration") { - for (const declaration of decl.declarations) { - this.checkDeclaration(declaration.id); - } - } - } - } - } - checkDeclaration(node) { - if (node.type === "Identifier") { - this.checkDuplicateExports(node, node.name); - } else if (node.type === "ObjectPattern") { - for (const prop of node.properties) { - this.checkDeclaration(prop); - } - } else if (node.type === "ArrayPattern") { - for (const elem of node.elements) { - if (elem) { - this.checkDeclaration(elem); - } - } - } else if (node.type === "ObjectProperty") { - this.checkDeclaration(node.value); - } else if (node.type === "RestElement") { - this.checkDeclaration(node.argument); - } else if (node.type === "AssignmentPattern") { - this.checkDeclaration(node.left); - } - } - checkDuplicateExports(node, exportName) { - if (this.exportedIdentifiers.has(exportName)) { - if (exportName === "default") { - this.raise(Errors.DuplicateDefaultExport, node); - } else { - this.raise(Errors.DuplicateExport, node, { - exportName - }); - } - } - this.exportedIdentifiers.add(exportName); - } - parseExportSpecifiers(isInTypeExport) { - const nodes = []; - let first = true; - this.expect(5); - while (!this.eat(8)) { - if (first) { - first = false; - } else { - this.expect(12); - if (this.eat(8)) break; - } - const isMaybeTypeOnly = this.isContextual(130); - const isString = this.match(134); - const node = this.startNode(); - node.local = this.parseModuleExportName(); - nodes.push(this.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly)); - } - return nodes; - } - parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { - if (this.eatContextual(93)) { - node.exported = this.parseModuleExportName(); - } else if (isString) { - node.exported = cloneStringLiteral(node.local); - } else if (!node.exported) { - node.exported = cloneIdentifier(node.local); - } - return this.finishNode(node, "ExportSpecifier"); - } - parseModuleExportName() { - if (this.match(134)) { - const result = this.parseStringLiteral(this.state.value); - const surrogate = loneSurrogate.exec(result.value); - if (surrogate) { - this.raise(Errors.ModuleExportNameHasLoneSurrogate, result, { - surrogateCharCode: surrogate[0].charCodeAt(0) - }); - } - return result; - } - return this.parseIdentifier(true); - } - isJSONModuleImport(node) { - if (node.assertions != null) { - return node.assertions.some(({ - key, - value - }) => { - return value.value === "json" && (key.type === "Identifier" ? key.name === "type" : key.value === "type"); - }); - } - return false; - } - checkImportReflection(node) { - const { - specifiers - } = node; - const singleBindingType = specifiers.length === 1 ? specifiers[0].type : null; - if (node.phase === "source") { - if (singleBindingType !== "ImportDefaultSpecifier") { - this.raise(Errors.SourcePhaseImportRequiresDefault, specifiers[0].loc.start); - } - } else if (node.phase === "defer") { - if (singleBindingType !== "ImportNamespaceSpecifier") { - this.raise(Errors.DeferImportRequiresNamespace, specifiers[0].loc.start); - } - } else if (node.module) { - var _node$assertions; - if (singleBindingType !== "ImportDefaultSpecifier") { - this.raise(Errors.ImportReflectionNotBinding, specifiers[0].loc.start); - } - if (((_node$assertions = node.assertions) == null ? void 0 : _node$assertions.length) > 0) { - this.raise(Errors.ImportReflectionHasAssertion, specifiers[0].loc.start); - } - } - } - checkJSONModuleImport(node) { - if (this.isJSONModuleImport(node) && node.type !== "ExportAllDeclaration") { - const { - specifiers - } = node; - if (specifiers != null) { - const nonDefaultNamedSpecifier = specifiers.find(specifier => { - let imported; - if (specifier.type === "ExportSpecifier") { - imported = specifier.local; - } else if (specifier.type === "ImportSpecifier") { - imported = specifier.imported; - } - if (imported !== undefined) { - return imported.type === "Identifier" ? imported.name !== "default" : imported.value !== "default"; - } - }); - if (nonDefaultNamedSpecifier !== undefined) { - this.raise(Errors.ImportJSONBindingNotDefault, nonDefaultNamedSpecifier.loc.start); - } - } - } - } - isPotentialImportPhase(isExport) { - if (isExport) return false; - return this.isContextual(105) || this.isContextual(97) || this.isContextual(127); - } - applyImportPhase(node, isExport, phase, loc) { - if (isExport) { - return; - } - if (phase === "module") { - this.expectPlugin("importReflection", loc); - node.module = true; - } else if (this.hasPlugin("importReflection")) { - node.module = false; - } - if (phase === "source") { - this.expectPlugin("sourcePhaseImports", loc); - node.phase = "source"; - } else if (phase === "defer") { - this.expectPlugin("deferredImportEvaluation", loc); - node.phase = "defer"; - } else if (this.hasPlugin("sourcePhaseImports")) { - node.phase = null; - } - } - parseMaybeImportPhase(node, isExport) { - if (!this.isPotentialImportPhase(isExport)) { - this.applyImportPhase(node, isExport, null); - return null; - } - const phaseIdentifier = this.parseIdentifier(true); - const { - type - } = this.state; - const isImportPhase = tokenIsKeywordOrIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12; - if (isImportPhase) { - this.resetPreviousIdentifierLeadingComments(phaseIdentifier); - this.applyImportPhase(node, isExport, phaseIdentifier.name, phaseIdentifier.loc.start); - return null; - } else { - this.applyImportPhase(node, isExport, null); - return phaseIdentifier; - } - } - isPrecedingIdImportPhase(phase) { - const { - type - } = this.state; - return tokenIsIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12; - } - parseImport(node) { - if (this.match(134)) { - return this.parseImportSourceAndAttributes(node); - } - return this.parseImportSpecifiersAndAfter(node, this.parseMaybeImportPhase(node, false)); - } - parseImportSpecifiersAndAfter(node, maybeDefaultIdentifier) { - node.specifiers = []; - const hasDefault = this.maybeParseDefaultImportSpecifier(node, maybeDefaultIdentifier); - const parseNext = !hasDefault || this.eat(12); - const hasStar = parseNext && this.maybeParseStarImportSpecifier(node); - if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node); - this.expectContextual(98); - return this.parseImportSourceAndAttributes(node); - } - parseImportSourceAndAttributes(node) { - var _node$specifiers2; - (_node$specifiers2 = node.specifiers) != null ? _node$specifiers2 : node.specifiers = []; - node.source = this.parseImportSource(); - this.maybeParseImportAttributes(node); - this.checkImportReflection(node); - this.checkJSONModuleImport(node); - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - } - parseImportSource() { - if (!this.match(134)) this.unexpected(); - return this.parseExprAtom(); - } - parseImportSpecifierLocal(node, specifier, type) { - specifier.local = this.parseIdentifier(); - node.specifiers.push(this.finishImportSpecifier(specifier, type)); - } - finishImportSpecifier(specifier, type, bindingType = 8201) { - this.checkLVal(specifier.local, { - type - }, bindingType); - return this.finishNode(specifier, type); - } - parseImportAttributes() { - this.expect(5); - const attrs = []; - const attrNames = new Set(); - do { - if (this.match(8)) { - break; - } - const node = this.startNode(); - const keyName = this.state.value; - if (attrNames.has(keyName)) { - this.raise(Errors.ModuleAttributesWithDuplicateKeys, this.state.startLoc, { - key: keyName - }); - } - attrNames.add(keyName); - if (this.match(134)) { - node.key = this.parseStringLiteral(keyName); - } else { - node.key = this.parseIdentifier(true); - } - this.expect(14); - if (!this.match(134)) { - throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc); - } - node.value = this.parseStringLiteral(this.state.value); - attrs.push(this.finishNode(node, "ImportAttribute")); - } while (this.eat(12)); - this.expect(8); - return attrs; - } - parseModuleAttributes() { - const attrs = []; - const attributes = new Set(); - do { - const node = this.startNode(); - node.key = this.parseIdentifier(true); - if (node.key.name !== "type") { - this.raise(Errors.ModuleAttributeDifferentFromType, node.key); - } - if (attributes.has(node.key.name)) { - this.raise(Errors.ModuleAttributesWithDuplicateKeys, node.key, { - key: node.key.name - }); - } - attributes.add(node.key.name); - this.expect(14); - if (!this.match(134)) { - throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc); - } - node.value = this.parseStringLiteral(this.state.value); - attrs.push(this.finishNode(node, "ImportAttribute")); - } while (this.eat(12)); - return attrs; - } - maybeParseImportAttributes(node) { - let attributes; - { - var useWith = false; - } - if (this.match(76)) { - if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40) { - return; - } - this.next(); - if (this.hasPlugin("moduleAttributes")) { - attributes = this.parseModuleAttributes(); - } else { - attributes = this.parseImportAttributes(); - } - { - useWith = true; - } - } else if (this.isContextual(94) && !this.hasPrecedingLineBreak()) { - if (!this.hasPlugin("deprecatedImportAssert") && !this.hasPlugin("importAssertions")) { - this.raise(Errors.ImportAttributesUseAssert, this.state.startLoc); - } - if (!this.hasPlugin("importAssertions")) { - this.addExtra(node, "deprecatedAssertSyntax", true); - } - this.next(); - attributes = this.parseImportAttributes(); - } else { - attributes = []; - } - if (!useWith && this.hasPlugin("importAssertions")) { - node.assertions = attributes; - } else { - node.attributes = attributes; - } - } - maybeParseDefaultImportSpecifier(node, maybeDefaultIdentifier) { - if (maybeDefaultIdentifier) { - const specifier = this.startNodeAtNode(maybeDefaultIdentifier); - specifier.local = maybeDefaultIdentifier; - node.specifiers.push(this.finishImportSpecifier(specifier, "ImportDefaultSpecifier")); - return true; - } else if (tokenIsKeywordOrIdentifier(this.state.type)) { - this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier"); - return true; - } - return false; - } - maybeParseStarImportSpecifier(node) { - if (this.match(55)) { - const specifier = this.startNode(); - this.next(); - this.expectContextual(93); - this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier"); - return true; - } - return false; - } - parseNamedImportSpecifiers(node) { - let first = true; - this.expect(5); - while (!this.eat(8)) { - if (first) { - first = false; - } else { - if (this.eat(14)) { - throw this.raise(Errors.DestructureNamedImport, this.state.startLoc); - } - this.expect(12); - if (this.eat(8)) break; - } - const specifier = this.startNode(); - const importedIsString = this.match(134); - const isMaybeTypeOnly = this.isContextual(130); - specifier.imported = this.parseModuleExportName(); - const importSpecifier = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly, undefined); - node.specifiers.push(importSpecifier); - } - } - parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { - if (this.eatContextual(93)) { - specifier.local = this.parseIdentifier(); - } else { - const { - imported - } = specifier; - if (importedIsString) { - throw this.raise(Errors.ImportBindingIsString, specifier, { - importName: imported.value - }); - } - this.checkReservedWord(imported.name, specifier.loc.start, true, true); - if (!specifier.local) { - specifier.local = cloneIdentifier(imported); - } - } - return this.finishImportSpecifier(specifier, "ImportSpecifier", bindingType); - } - isThisParam(param) { - return param.type === "Identifier" && param.name === "this"; - } -} -class Parser extends StatementParser { - constructor(options, input, pluginsMap) { - options = getOptions(options); - super(options, input); - this.options = options; - this.initializeScopes(); - this.plugins = pluginsMap; - this.filename = options.sourceFilename; - this.startIndex = options.startIndex; - let optionFlags = 0; - if (options.allowAwaitOutsideFunction) { - optionFlags |= 1; - } - if (options.allowReturnOutsideFunction) { - optionFlags |= 2; - } - if (options.allowImportExportEverywhere) { - optionFlags |= 8; - } - if (options.allowSuperOutsideMethod) { - optionFlags |= 16; - } - if (options.allowUndeclaredExports) { - optionFlags |= 32; - } - if (options.allowNewTargetOutsideFunction) { - optionFlags |= 4; - } - if (options.ranges) { - optionFlags |= 64; - } - if (options.tokens) { - optionFlags |= 128; - } - if (options.createImportExpressions) { - optionFlags |= 256; - } - if (options.createParenthesizedExpressions) { - optionFlags |= 512; - } - if (options.errorRecovery) { - optionFlags |= 1024; - } - if (options.attachComment) { - optionFlags |= 2048; - } - if (options.annexB) { - optionFlags |= 4096; - } - this.optionFlags = optionFlags; - } - getScopeHandler() { - return ScopeHandler; - } - parse() { - this.enterInitialScopes(); - const file = this.startNode(); - const program = this.startNode(); - this.nextToken(); - file.errors = null; - this.parseTopLevel(file, program); - file.errors = this.state.errors; - file.comments.length = this.state.commentsLen; - return file; - } -} -function parse(input, options) { - var _options; - if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") { - options = Object.assign({}, options); - try { - options.sourceType = "module"; - const parser = getParser(options, input); - const ast = parser.parse(); - if (parser.sawUnambiguousESM) { - return ast; - } - if (parser.ambiguousScriptDifferentAst) { - try { - options.sourceType = "script"; - return getParser(options, input).parse(); - } catch (_unused) {} - } else { - ast.program.sourceType = "script"; - } - return ast; - } catch (moduleError) { - try { - options.sourceType = "script"; - return getParser(options, input).parse(); - } catch (_unused2) {} - throw moduleError; - } - } else { - return getParser(options, input).parse(); - } -} -function parseExpression(input, options) { - const parser = getParser(options, input); - if (parser.options.strictMode) { - parser.state.strict = true; - } - return parser.getExpression(); -} -function generateExportedTokenTypes(internalTokenTypes) { - const tokenTypes = {}; - for (const typeName of Object.keys(internalTokenTypes)) { - tokenTypes[typeName] = getExportedToken(internalTokenTypes[typeName]); - } - return tokenTypes; -} -const tokTypes = generateExportedTokenTypes(tt); -function getParser(options, input) { - let cls = Parser; - const pluginsMap = new Map(); - if (options != null && options.plugins) { - for (const plugin of options.plugins) { - let name, opts; - if (typeof plugin === "string") { - name = plugin; - } else { - [name, opts] = plugin; - } - if (!pluginsMap.has(name)) { - pluginsMap.set(name, opts || {}); - } - } - validatePlugins(pluginsMap); - cls = getParserClass(pluginsMap); - } - return new cls(options, input, pluginsMap); -} -const parserClassCache = new Map(); -function getParserClass(pluginsMap) { - const pluginList = []; - for (const name of mixinPluginNames) { - if (pluginsMap.has(name)) { - pluginList.push(name); - } - } - const key = pluginList.join("|"); - let cls = parserClassCache.get(key); - if (!cls) { - cls = Parser; - for (const plugin of pluginList) { - cls = mixinPlugins[plugin](cls); - } - parserClassCache.set(key, cls); - } - return cls; -} -exports.parse = parse; -exports.parseExpression = parseExpression; -exports.tokTypes = tokTypes; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/parser/lib/index.js.map b/node_modules/@babel/parser/lib/index.js.map deleted file mode 100644 index ccb1f49..0000000 --- a/node_modules/@babel/parser/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../src/util/location.ts","../src/parse-error/module-errors.ts","../src/parse-error/to-node-description.ts","../src/parse-error/standard-errors.ts","../src/parse-error/strict-mode-errors.ts","../src/parse-error/pipeline-operator-errors.ts","../src/parse-error.ts","../src/options.ts","../src/plugins/estree.ts","../src/tokenizer/context.ts","../src/tokenizer/types.ts","../../babel-helper-validator-identifier/src/identifier.ts","../../babel-helper-validator-identifier/src/keyword.ts","../src/util/identifier.ts","../src/util/scope.ts","../src/plugins/flow/scope.ts","../src/parser/base.ts","../src/parser/comments.ts","../src/util/whitespace.ts","../src/tokenizer/state.ts","../../babel-helper-string-parser/src/index.ts","../src/tokenizer/index.ts","../src/util/class-scope.ts","../src/util/expression-scope.ts","../src/util/production-parameter.ts","../src/parser/util.ts","../src/parser/node.ts","../src/plugins/flow/index.ts","../src/plugins/jsx/xhtml.ts","../src/plugins/jsx/index.ts","../src/plugins/typescript/scope.ts","../src/parser/lval.ts","../src/plugins/typescript/index.ts","../src/plugins/placeholders.ts","../src/plugins/v8intrinsic.ts","../src/plugin-utils.ts","../src/parser/expression.ts","../src/parser/statement.ts","../src/parser/index.ts","../src/index.ts"],"sourcesContent":["export type Pos = {\n start: number;\n};\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nexport class Position {\n line: number;\n column: number;\n index: number;\n\n constructor(line: number, col: number, index: number) {\n this.line = line;\n this.column = col;\n this.index = index;\n }\n}\n\nexport class SourceLocation {\n start: Position;\n end: Position;\n filename: string;\n identifierName: string | undefined | null;\n\n constructor(start: Position, end?: Position) {\n this.start = start;\n // (may start as null, but initialized later)\n this.end = end;\n }\n}\n\n/**\n * creates a new position with a non-zero column offset from the given position.\n * This function should be only be used when we create AST node out of the token\n * boundaries, such as TemplateElement ends before tt.templateNonTail. This\n * function does not skip whitespaces.\n */\nexport function createPositionWithColumnOffset(\n position: Position,\n columnOffset: number,\n) {\n const { line, column, index } = position;\n return new Position(line, column + columnOffset, index + columnOffset);\n}\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\n\nconst code = \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\";\n\nexport default {\n ImportMetaOutsideModule: {\n message: `import.meta may appear only with 'sourceType: \"module\"'`,\n code,\n },\n ImportOutsideModule: {\n message: `'import' and 'export' may appear only with 'sourceType: \"module\"'`,\n code,\n },\n} satisfies ParseErrorTemplates;\n","const NodeDescriptions = {\n ArrayPattern: \"array destructuring pattern\",\n AssignmentExpression: \"assignment expression\",\n AssignmentPattern: \"assignment expression\",\n ArrowFunctionExpression: \"arrow function expression\",\n ConditionalExpression: \"conditional expression\",\n CatchClause: \"catch clause\",\n ForOfStatement: \"for-of statement\",\n ForInStatement: \"for-in statement\",\n ForStatement: \"for-loop\",\n FormalParameters: \"function parameter list\",\n Identifier: \"identifier\",\n ImportSpecifier: \"import specifier\",\n ImportDefaultSpecifier: \"import default specifier\",\n ImportNamespaceSpecifier: \"import namespace specifier\",\n ObjectPattern: \"object destructuring pattern\",\n ParenthesizedExpression: \"parenthesized expression\",\n RestElement: \"rest element\",\n UpdateExpression: {\n true: \"prefix operation\",\n false: \"postfix operation\",\n },\n VariableDeclarator: \"variable declaration\",\n YieldExpression: \"yield expression\",\n};\n\ntype NodeTypesWithDescriptions = keyof Omit<\n typeof NodeDescriptions,\n \"UpdateExpression\"\n>;\n\ntype NodeWithDescription =\n | {\n type: \"UpdateExpression\";\n prefix: boolean;\n }\n | {\n type: NodeTypesWithDescriptions;\n };\n\nconst toNodeDescription = (node: NodeWithDescription) =>\n node.type === \"UpdateExpression\"\n ? NodeDescriptions.UpdateExpression[`${node.prefix}`]\n : NodeDescriptions[node.type];\n\nexport default toNodeDescription;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\nimport toNodeDescription from \"./to-node-description.ts\";\n\nexport type LValAncestor =\n | { type: \"UpdateExpression\"; prefix: boolean }\n | {\n type:\n | \"ArrayPattern\"\n | \"AssignmentExpression\"\n | \"CatchClause\"\n | \"ForOfStatement\"\n | \"FormalParameters\"\n | \"ForInStatement\"\n | \"ForStatement\"\n | \"ImportSpecifier\"\n | \"ImportNamespaceSpecifier\"\n | \"ImportDefaultSpecifier\"\n | \"ParenthesizedExpression\"\n | \"ObjectPattern\"\n | \"RestElement\"\n | \"VariableDeclarator\";\n };\n\nexport default {\n AccessorIsGenerator: ({ kind }: { kind: \"get\" | \"set\" }) =>\n `A ${kind}ter cannot be a generator.`,\n ArgumentsInClass:\n \"'arguments' is only allowed in functions and class methods.\",\n AsyncFunctionInSingleStatementContext:\n \"Async functions can only be declared at the top level or inside a block.\",\n AwaitBindingIdentifier:\n \"Can not use 'await' as identifier inside an async function.\",\n AwaitBindingIdentifierInStaticBlock:\n \"Can not use 'await' as identifier inside a static block.\",\n AwaitExpressionFormalParameter:\n \"'await' is not allowed in async function parameters.\",\n AwaitUsingNotInAsyncContext:\n \"'await using' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncContext:\n \"'await' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncFunction: \"'await' is only allowed within async functions.\",\n BadGetterArity: \"A 'get' accessor must not have any formal parameters.\",\n BadSetterArity: \"A 'set' accessor must have exactly one formal parameter.\",\n BadSetterRestParameter:\n \"A 'set' accessor function argument must not be a rest parameter.\",\n ConstructorClassField: \"Classes may not have a field named 'constructor'.\",\n ConstructorClassPrivateField:\n \"Classes may not have a private field named '#constructor'.\",\n ConstructorIsAccessor: \"Class constructor may not be an accessor.\",\n ConstructorIsAsync: \"Constructor can't be an async function.\",\n ConstructorIsGenerator: \"Constructor can't be a generator.\",\n DeclarationMissingInitializer: ({\n kind,\n }: {\n kind: \"await using\" | \"const\" | \"destructuring\" | \"using\";\n }) => `Missing initializer in ${kind} declaration.`,\n DecoratorArgumentsOutsideParentheses:\n \"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.\",\n DecoratorBeforeExport:\n \"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.\",\n DecoratorsBeforeAfterExport:\n \"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.\",\n DecoratorConstructor:\n \"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?\",\n DecoratorExportClass:\n \"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.\",\n DecoratorSemicolon: \"Decorators must not be followed by a semicolon.\",\n DecoratorStaticBlock: \"Decorators can't be used with a static block.\",\n DeferImportRequiresNamespace:\n 'Only `import defer * as x from \"./module\"` is valid.',\n DeletePrivateField: \"Deleting a private field is not allowed.\",\n DestructureNamedImport:\n \"ES2015 named imports do not destructure. Use another statement for destructuring after the import.\",\n DuplicateConstructor: \"Duplicate constructor in the same class.\",\n DuplicateDefaultExport: \"Only one default export allowed per module.\",\n DuplicateExport: ({ exportName }: { exportName: string }) =>\n `\\`${exportName}\\` has already been exported. Exported identifiers must be unique.`,\n DuplicateProto: \"Redefinition of __proto__ property.\",\n DuplicateRegExpFlags: \"Duplicate regular expression flag.\",\n DynamicImportPhaseRequiresImportExpressions: ({ phase }: { phase: string }) =>\n `'import.${phase}(...)' can only be parsed when using the 'createImportExpressions' option.`,\n ElementAfterRest: \"Rest element must be last element.\",\n EscapedCharNotAnIdentifier: \"Invalid Unicode escape.\",\n ExportBindingIsString: ({\n localName,\n exportName,\n }: {\n localName: string;\n exportName: string;\n }) =>\n `A string literal cannot be used as an exported binding without \\`from\\`.\\n- Did you mean \\`export { '${localName}' as '${exportName}' } from 'some-module'\\`?`,\n ExportDefaultFromAsIdentifier:\n \"'from' is not allowed as an identifier after 'export default'.\",\n\n ForInOfLoopInitializer: ({\n type,\n }: {\n type: \"ForInStatement\" | \"ForOfStatement\";\n }) =>\n `'${\n type === \"ForInStatement\" ? \"for-in\" : \"for-of\"\n }' loop variable declaration may not have an initializer.`,\n ForInUsing: \"For-in loop may not start with 'using' declaration.\",\n\n ForOfAsync: \"The left-hand side of a for-of loop may not be 'async'.\",\n ForOfLet: \"The left-hand side of a for-of loop may not start with 'let'.\",\n GeneratorInSingleStatementContext:\n \"Generators can only be declared at the top level or inside a block.\",\n\n IllegalBreakContinue: ({\n type,\n }: {\n type: \"BreakStatement\" | \"ContinueStatement\";\n }) => `Unsyntactic ${type === \"BreakStatement\" ? \"break\" : \"continue\"}.`,\n\n IllegalLanguageModeDirective:\n \"Illegal 'use strict' directive in function with non-simple parameter list.\",\n IllegalReturn: \"'return' outside of function.\",\n ImportAttributesUseAssert:\n \"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.\",\n ImportBindingIsString: ({ importName }: { importName: string }) =>\n `A string literal cannot be used as an imported binding.\\n- Did you mean \\`import { \"${importName}\" as foo }\\`?`,\n ImportCallArity: `\\`import()\\` requires exactly one or two arguments.`,\n ImportCallNotNewExpression: \"Cannot use new with import(...).\",\n ImportCallSpreadArgument: \"`...` is not allowed in `import()`.\",\n ImportJSONBindingNotDefault:\n \"A JSON module can only be imported with `default`.\",\n ImportReflectionHasAssertion: \"`import module x` cannot have assertions.\",\n ImportReflectionNotBinding:\n 'Only `import module x from \"./module\"` is valid.',\n IncompatibleRegExpUVFlags:\n \"The 'u' and 'v' regular expression flags cannot be enabled at the same time.\",\n InvalidBigIntLiteral: \"Invalid BigIntLiteral.\",\n InvalidCodePoint: \"Code point out of bounds.\",\n InvalidCoverInitializedName: \"Invalid shorthand property initializer.\",\n InvalidDecimal: \"Invalid decimal.\",\n InvalidDigit: ({ radix }: { radix: number }) =>\n `Expected number in radix ${radix}.`,\n InvalidEscapeSequence: \"Bad character escape sequence.\",\n InvalidEscapeSequenceTemplate: \"Invalid escape sequence in template.\",\n InvalidEscapedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n `Escape sequence in keyword ${reservedWord}.`,\n InvalidIdentifier: ({ identifierName }: { identifierName: string }) =>\n `Invalid identifier ${identifierName}.`,\n InvalidLhs: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n InvalidLhsBinding: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n InvalidLhsOptionalChaining: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Invalid optional chaining in the left-hand side of ${toNodeDescription(\n ancestor,\n )}.`,\n InvalidNumber: \"Invalid number.\",\n InvalidOrMissingExponent:\n \"Floating-point numbers require a valid exponent after the 'e'.\",\n InvalidOrUnexpectedToken: ({ unexpected }: { unexpected: string }) =>\n `Unexpected character '${unexpected}'.`,\n InvalidParenthesizedAssignment: \"Invalid parenthesized assignment pattern.\",\n InvalidPrivateFieldResolution: ({\n identifierName,\n }: {\n identifierName: string;\n }) => `Private name #${identifierName} is not defined.`,\n InvalidPropertyBindingPattern: \"Binding member expression.\",\n InvalidRecordProperty:\n \"Only properties and spread elements are allowed in record definitions.\",\n InvalidRestAssignmentPattern: \"Invalid rest operator's argument.\",\n LabelRedeclaration: ({ labelName }: { labelName: string }) =>\n `Label '${labelName}' is already declared.`,\n LetInLexicalBinding: \"'let' is disallowed as a lexically bound name.\",\n LineTerminatorBeforeArrow: \"No line break is allowed before '=>'.\",\n MalformedRegExpFlags: \"Invalid regular expression flag.\",\n MissingClassName: \"A class name is required.\",\n MissingEqInAssignment:\n \"Only '=' operator can be used for specifying default value.\",\n MissingSemicolon: \"Missing semicolon.\",\n MissingPlugin: ({ missingPlugin }: { missingPlugin: [string] }) =>\n `This experimental syntax requires enabling the parser plugin: ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\n // FIXME: Would be nice to make this \"missingPlugins\" instead.\n // Also, seems like we can drop the \"(s)\" from the message and just make it \"s\".\n MissingOneOfPlugins: ({ missingPlugin }: { missingPlugin: string[] }) =>\n `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\n MissingUnicodeEscape: \"Expecting Unicode escape sequence \\\\uXXXX.\",\n MixingCoalesceWithLogical:\n \"Nullish coalescing operator(??) requires parens when mixing with logical operators.\",\n ModuleAttributeDifferentFromType:\n \"The only accepted module attribute is `type`.\",\n ModuleAttributeInvalidValue:\n \"Only string literals are allowed as module attribute values.\",\n ModuleAttributesWithDuplicateKeys: ({ key }: { key: string }) =>\n `Duplicate key \"${key}\" is not allowed in module attributes.`,\n ModuleExportNameHasLoneSurrogate: ({\n surrogateCharCode,\n }: {\n surrogateCharCode: number;\n }) =>\n `An export name cannot include a lone surrogate, found '\\\\u${surrogateCharCode.toString(\n 16,\n )}'.`,\n ModuleExportUndefined: ({ localName }: { localName: string }) =>\n `Export '${localName}' is not defined.`,\n MultipleDefaultsInSwitch: \"Multiple default clauses.\",\n NewlineAfterThrow: \"Illegal newline after throw.\",\n NoCatchOrFinally: \"Missing catch or finally clause.\",\n NumberIdentifier: \"Identifier directly after number.\",\n NumericSeparatorInEscapeSequence:\n \"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.\",\n ObsoleteAwaitStar:\n \"'await*' has been removed from the async functions proposal. Use Promise.all() instead.\",\n OptionalChainingNoNew:\n \"Constructors in/after an Optional Chain are not allowed.\",\n OptionalChainingNoTemplate:\n \"Tagged Template Literals are not allowed in optionalChain.\",\n OverrideOnConstructor:\n \"'override' modifier cannot appear on a constructor declaration.\",\n ParamDupe: \"Argument name clash.\",\n PatternHasAccessor: \"Object pattern can't contain getter or setter.\",\n PatternHasMethod: \"Object pattern can't contain methods.\",\n PrivateInExpectedIn: ({ identifierName }: { identifierName: string }) =>\n `Private names are only allowed in property accesses (\\`obj.#${identifierName}\\`) or in \\`in\\` expressions (\\`#${identifierName} in obj\\`).`,\n PrivateNameRedeclaration: ({ identifierName }: { identifierName: string }) =>\n `Duplicate private name #${identifierName}.`,\n RecordExpressionBarIncorrectEndSyntaxType:\n \"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionBarIncorrectStartSyntaxType:\n \"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionHashIncorrectStartSyntaxType:\n \"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n RecordNoProto: \"'__proto__' is not allowed in Record expressions.\",\n RestTrailingComma: \"Unexpected trailing comma after rest element.\",\n SloppyFunction:\n \"In non-strict mode code, functions can only be declared at top level or inside a block.\",\n SloppyFunctionAnnexB:\n \"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.\",\n SourcePhaseImportRequiresDefault:\n 'Only `import source x from \"./module\"` is valid.',\n StaticPrototype: \"Classes may not have static property named prototype.\",\n SuperNotAllowed:\n \"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?\",\n SuperPrivateField: \"Private fields can't be accessed on super.\",\n TrailingDecorator: \"Decorators must be attached to a class element.\",\n TupleExpressionBarIncorrectEndSyntaxType:\n \"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionBarIncorrectStartSyntaxType:\n \"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionHashIncorrectStartSyntaxType:\n \"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n UnexpectedArgumentPlaceholder: \"Unexpected argument placeholder.\",\n UnexpectedAwaitAfterPipelineBody:\n 'Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal.',\n UnexpectedDigitAfterHash: \"Unexpected digit after hash token.\",\n UnexpectedImportExport:\n \"'import' and 'export' may only appear at the top level.\",\n UnexpectedKeyword: ({ keyword }: { keyword: string }) =>\n `Unexpected keyword '${keyword}'.`,\n UnexpectedLeadingDecorator:\n \"Leading decorators must be attached to a class declaration.\",\n UnexpectedLexicalDeclaration:\n \"Lexical declaration cannot appear in a single-statement context.\",\n UnexpectedNewTarget:\n \"`new.target` can only be used in functions or class properties.\",\n UnexpectedNumericSeparator:\n \"A numeric separator is only allowed between two digits.\",\n UnexpectedPrivateField: \"Unexpected private name.\",\n UnexpectedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n `Unexpected reserved word '${reservedWord}'.`,\n UnexpectedSuper: \"'super' is only allowed in object methods and classes.\",\n UnexpectedToken: ({\n expected,\n unexpected,\n }: {\n expected?: string | null;\n unexpected?: string | null;\n }) =>\n `Unexpected token${unexpected ? ` '${unexpected}'.` : \"\"}${\n expected ? `, expected \"${expected}\"` : \"\"\n }`,\n UnexpectedTokenUnaryExponentiation:\n \"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.\",\n UnexpectedUsingDeclaration:\n \"Using declaration cannot appear in the top level when source type is `script`.\",\n UnsupportedBind: \"Binding should be performed on object property.\",\n UnsupportedDecoratorExport:\n \"A decorated export must export a class declaration.\",\n UnsupportedDefaultExport:\n \"Only expressions, functions or classes are allowed as the `default` export.\",\n UnsupportedImport:\n \"`import` can only be used in `import()` or `import.meta`.\",\n UnsupportedMetaProperty: ({\n target,\n onlyValidPropertyName,\n }: {\n target: string;\n onlyValidPropertyName: string;\n }) =>\n `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`,\n UnsupportedParameterDecorator:\n \"Decorators cannot be used to decorate parameters.\",\n UnsupportedPropertyDecorator:\n \"Decorators cannot be used to decorate object literal properties.\",\n UnsupportedSuper:\n \"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).\",\n UnterminatedComment: \"Unterminated comment.\",\n UnterminatedRegExp: \"Unterminated regular expression.\",\n UnterminatedString: \"Unterminated string constant.\",\n UnterminatedTemplate: \"Unterminated template.\",\n UsingDeclarationExport: \"Using declaration cannot be exported.\",\n UsingDeclarationHasBindingPattern:\n \"Using declaration cannot have destructuring patterns.\",\n VarRedeclaration: ({ identifierName }: { identifierName: string }) =>\n `Identifier '${identifierName}' has already been declared.`,\n YieldBindingIdentifier:\n \"Can not use 'yield' as identifier inside a generator.\",\n YieldInParameter: \"Yield expression is not allowed in formal parameters.\",\n ZeroDigitNumericSeparator:\n \"Numeric separator can not be used after leading 0.\",\n} satisfies ParseErrorTemplates;\n","import type { ParseErrorTemplates } from \"../parse-error\";\n\nexport default {\n StrictDelete: \"Deleting local variable in strict mode.\",\n\n // `referenceName` is the StringValue[1] of an IdentifierReference[2], which\n // is represented as just an `Identifier`[3] in the Babel AST.\n // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n // 2. https://tc39.es/ecma262/#prod-IdentifierReference\n // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n StrictEvalArguments: ({ referenceName }: { referenceName: string }) =>\n `Assigning to '${referenceName}' in strict mode.`,\n\n // `bindingName` is the StringValue[1] of a BindingIdentifier[2], which is\n // represented as just an `Identifier`[3] in the Babel AST.\n // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n // 2. https://tc39.es/ecma262/#prod-BindingIdentifier\n // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n StrictEvalArgumentsBinding: ({ bindingName }: { bindingName: string }) =>\n `Binding '${bindingName}' in strict mode.`,\n\n StrictFunction:\n \"In strict mode code, functions can only be declared at top level or inside a block.\",\n\n StrictNumericEscape: \"The only valid numeric escape in strict mode is '\\\\0'.\",\n\n StrictOctalLiteral: \"Legacy octal literals are not allowed in strict mode.\",\n\n StrictWith: \"'with' in strict mode.\",\n} satisfies ParseErrorTemplates;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\nimport toNodeDescription from \"./to-node-description.ts\";\n\nexport const UnparenthesizedPipeBodyDescriptions = new Set([\n \"ArrowFunctionExpression\",\n \"AssignmentExpression\",\n \"ConditionalExpression\",\n \"YieldExpression\",\n] as const);\n\ntype GetSetMemberType> =\n T extends Set ? M : unknown;\n\nexport type UnparenthesizedPipeBodyTypes = GetSetMemberType<\n typeof UnparenthesizedPipeBodyDescriptions\n>;\n\nexport default {\n // This error is only used by the smart-mix proposal\n PipeBodyIsTighter:\n \"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.\",\n PipeTopicRequiresHackPipes: process.env.BABEL_8_BREAKING\n ? 'Topic references are only supported when using the `\"proposal\": \"hack\"` version of the pipeline proposal.'\n : 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n PipeTopicUnbound:\n \"Topic reference is unbound; it must be inside a pipe body.\",\n PipeTopicUnconfiguredToken: ({ token }: { token: string }) =>\n `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { \"proposal\": \"hack\", \"topicToken\": \"${token}\" }.`,\n PipeTopicUnused:\n \"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.\",\n PipeUnparenthesizedBody: ({ type }: { type: UnparenthesizedPipeBodyTypes }) =>\n `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({\n type,\n })}; please wrap it in parentheses.`,\n\n ...(process.env.BABEL_8_BREAKING\n ? {}\n : {\n // Messages whose codes start with “Pipeline” or “PrimaryTopic”\n // are retained for backwards compatibility\n // with the deprecated smart-mix pipe operator proposal plugin.\n // They are subject to removal in a future major version.\n PipelineBodyNoArrow:\n 'Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized.',\n PipelineBodySequenceExpression:\n \"Pipeline body may not be a comma-separated sequence expression.\",\n PipelineHeadSequenceExpression:\n \"Pipeline head should not be a comma-separated sequence expression.\",\n PipelineTopicUnused:\n \"Pipeline is in topic style but does not use topic reference.\",\n PrimaryTopicNotAllowed:\n \"Topic reference was used in a lexical context without topic binding.\",\n PrimaryTopicRequiresSmartPipeline:\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n }),\n} satisfies ParseErrorTemplates;\n","import { Position } from \"./util/location.ts\";\n\ntype SyntaxPlugin =\n | \"flow\"\n | \"typescript\"\n | \"jsx\"\n | \"pipelineOperator\"\n | \"placeholders\";\n\ntype ParseErrorCode =\n | \"BABEL_PARSER_SYNTAX_ERROR\"\n | \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\";\n\n// Babel uses \"normal\" SyntaxErrors for it's errors, but adds some extra\n// functionality. This functionality is defined in the\n// `ParseErrorSpecification` interface below. We may choose to change to someday\n// give our errors their own full-blown class, but until then this allow us to\n// keep all the desirable properties of SyntaxErrors (like their name in stack\n// traces, etc.), and also allows us to punt on any publicly facing\n// class-hierarchy decisions until Babel 8.\ninterface ParseErrorSpecification {\n // Look, these *could* be readonly, but then Flow complains when we initially\n // set them. We could do a whole dance and make a special interface that's not\n // readonly for when we create the error, then cast it to the readonly\n // interface for public use, but the previous implementation didn't have them\n // as readonly, so let's just not worry about it for now.\n code: ParseErrorCode;\n reasonCode: string;\n syntaxPlugin?: SyntaxPlugin;\n missingPlugin?: string | string[];\n loc: Position;\n details: ErrorDetails;\n\n // We should consider removing this as it now just contains the same\n // information as `loc.index`.\n pos: number;\n}\n\nexport type ParseError = SyntaxError &\n ParseErrorSpecification;\n\n// By `ParseErrorConstructor`, we mean something like the new-less style\n// `ErrorConstructor`[1], since `ParseError`'s are not themselves actually\n// separate classes from `SyntaxError`'s.\n//\n// 1. https://github.com/microsoft/TypeScript/blob/v4.5.5/lib/lib.es5.d.ts#L1027\nexport type ParseErrorConstructor = (\n loc: Position,\n details: ErrorDetails,\n) => ParseError;\n\ntype ToMessage = (self: ErrorDetails) => string;\n\ntype ParseErrorCredentials = {\n code: string;\n reasonCode: string;\n syntaxPlugin?: SyntaxPlugin;\n toMessage: ToMessage;\n};\n\nfunction defineHidden(obj: object, key: string, value: unknown) {\n Object.defineProperty(obj, key, {\n enumerable: false,\n configurable: true,\n value,\n });\n}\n\nfunction toParseErrorConstructor({\n toMessage,\n code,\n reasonCode,\n syntaxPlugin,\n}: ParseErrorCredentials): ParseErrorConstructor {\n const hasMissingPlugin =\n reasonCode === \"MissingPlugin\" || reasonCode === \"MissingOneOfPlugins\";\n\n if (!process.env.BABEL_8_BREAKING) {\n const oldReasonCodes: Record = {\n AccessorCannotDeclareThisParameter: \"AccesorCannotDeclareThisParameter\",\n AccessorCannotHaveTypeParameters: \"AccesorCannotHaveTypeParameters\",\n ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:\n \"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference\",\n SetAccessorCannotHaveOptionalParameter:\n \"SetAccesorCannotHaveOptionalParameter\",\n SetAccessorCannotHaveRestParameter: \"SetAccesorCannotHaveRestParameter\",\n SetAccessorCannotHaveReturnType: \"SetAccesorCannotHaveReturnType\",\n };\n if (oldReasonCodes[reasonCode]) {\n reasonCode = oldReasonCodes[reasonCode];\n }\n }\n\n return function constructor(loc: Position, details: ErrorDetails) {\n const error: ParseError = new SyntaxError() as any;\n\n error.code = code as ParseErrorCode;\n error.reasonCode = reasonCode;\n error.loc = loc;\n error.pos = loc.index;\n\n error.syntaxPlugin = syntaxPlugin;\n if (hasMissingPlugin) {\n error.missingPlugin = (details as any).missingPlugin;\n }\n\n type Overrides = {\n loc?: Position;\n details?: ErrorDetails;\n };\n defineHidden(error, \"clone\", function clone(overrides: Overrides = {}) {\n const { line, column, index } = overrides.loc ?? loc;\n return constructor(new Position(line, column, index), {\n ...details,\n ...overrides.details,\n });\n });\n\n defineHidden(error, \"details\", details);\n\n Object.defineProperty(error, \"message\", {\n configurable: true,\n get(this: ParseError): string {\n const message = `${toMessage(details)} (${loc.line}:${loc.column})`;\n this.message = message;\n return message;\n },\n set(value: string) {\n Object.defineProperty(this, \"message\", { value, writable: true });\n },\n });\n\n return error;\n };\n}\n\ntype ParseErrorTemplate =\n | string\n | ToMessage\n | { message: string | ToMessage; code?: ParseErrorCode };\n\nexport type ParseErrorTemplates = { [reasonCode: string]: ParseErrorTemplate };\n\n// This is the templated form of `ParseErrorEnum`.\n//\n// Note: We could factor out the return type calculation into something like\n// `ParseErrorConstructor`, and then we could\n// reuse it in the non-templated form of `ParseErrorEnum`, but TypeScript\n// doesn't seem to drill down that far when showing you the computed type of\n// an object in an editor, so we'll leave it inlined for now.\nexport function ParseErrorEnum(a: TemplateStringsArray): <\n T extends ParseErrorTemplates,\n>(\n parseErrorTemplates: T,\n) => {\n [K in keyof T]: ParseErrorConstructor<\n T[K] extends { message: string | ToMessage }\n ? T[K][\"message\"] extends ToMessage\n ? Parameters[0]\n : object\n : T[K] extends ToMessage\n ? Parameters[0]\n : object\n >;\n};\n\nexport function ParseErrorEnum(\n parseErrorTemplates: T,\n syntaxPlugin?: SyntaxPlugin,\n): {\n [K in keyof T]: ParseErrorConstructor<\n T[K] extends { message: string | ToMessage }\n ? T[K][\"message\"] extends ToMessage\n ? Parameters[0]\n : object\n : T[K] extends ToMessage\n ? Parameters[0]\n : object\n >;\n};\n\n// You call `ParseErrorEnum` with a mapping from `ReasonCode`'s to either:\n//\n// 1. a static error message,\n// 2. `toMessage` functions that define additional necessary `details` needed by\n// the `ParseError`, or\n// 3. Objects that contain a `message` of one of the above and overridden `code`\n// and/or `reasonCode`:\n//\n// ParseErrorEnum `optionalSyntaxPlugin` ({\n// ErrorWithStaticMessage: \"message\",\n// ErrorWithDynamicMessage: ({ type } : { type: string }) => `${type}`),\n// ErrorWithOverriddenCodeAndOrReasonCode: {\n// message: ({ type }: { type: string }) => `${type}`),\n// code: \"AN_ERROR_CODE\",\n// ...(BABEL_8_BREAKING ? { } : { reasonCode: \"CustomErrorReasonCode\" })\n// }\n// });\n//\nexport function ParseErrorEnum(\n argument: TemplateStringsArray | ParseErrorTemplates,\n syntaxPlugin?: SyntaxPlugin,\n) {\n // If the first parameter is an array, that means we were called with a tagged\n // template literal. Extract the syntaxPlugin from this, and call again in\n // the \"normalized\" form.\n if (Array.isArray(argument)) {\n return (parseErrorTemplates: ParseErrorTemplates) =>\n ParseErrorEnum(parseErrorTemplates, argument[0]);\n }\n\n const ParseErrorConstructors = {} as Record<\n string,\n ParseErrorConstructor\n >;\n\n for (const reasonCode of Object.keys(argument)) {\n const template = (argument as ParseErrorTemplates)[reasonCode];\n const { message, ...rest } =\n typeof template === \"string\"\n ? { message: () => template }\n : typeof template === \"function\"\n ? { message: template }\n : template;\n const toMessage = typeof message === \"string\" ? () => message : message;\n\n ParseErrorConstructors[reasonCode] = toParseErrorConstructor({\n code: \"BABEL_PARSER_SYNTAX_ERROR\",\n reasonCode,\n toMessage,\n ...(syntaxPlugin ? { syntaxPlugin } : {}),\n ...rest,\n });\n }\n\n return ParseErrorConstructors;\n}\n\nimport ModuleErrors from \"./parse-error/module-errors.ts\";\nimport StandardErrors from \"./parse-error/standard-errors.ts\";\nimport StrictModeErrors from \"./parse-error/strict-mode-errors.ts\";\nimport PipelineOperatorErrors from \"./parse-error/pipeline-operator-errors.ts\";\n\nexport const Errors = {\n ...ParseErrorEnum(ModuleErrors),\n ...ParseErrorEnum(StandardErrors),\n ...ParseErrorEnum(StrictModeErrors),\n ...ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors),\n};\n\nexport type { LValAncestor } from \"./parse-error/standard-errors.ts\";\n","import type { PluginList } from \"./plugin-utils.ts\";\n\n// A second optional argument can be given to further configure\n// the parser process. These options are recognized:\n\nexport type SourceType = \"script\" | \"module\" | \"unambiguous\";\n\nexport interface Options {\n sourceType?: SourceType;\n sourceFilename?: string;\n startIndex?: number;\n startColumn?: number;\n startLine?: number;\n allowAwaitOutsideFunction?: boolean;\n allowReturnOutsideFunction?: boolean;\n allowNewTargetOutsideFunction?: boolean;\n allowImportExportEverywhere?: boolean;\n allowSuperOutsideMethod?: boolean;\n allowUndeclaredExports?: boolean;\n plugins?: PluginList;\n strictMode?: boolean | undefined | null;\n ranges?: boolean;\n tokens?: boolean;\n createImportExpressions?: boolean;\n createParenthesizedExpressions?: boolean;\n errorRecovery?: boolean;\n attachComment?: boolean;\n annexB?: boolean;\n}\n\nexport const enum OptionFlags {\n AllowAwaitOutsideFunction = 1 << 0,\n AllowReturnOutsideFunction = 1 << 1,\n AllowNewTargetOutsideFunction = 1 << 2,\n AllowImportExportEverywhere = 1 << 3,\n AllowSuperOutsideMethod = 1 << 4,\n AllowUndeclaredExports = 1 << 5,\n Ranges = 1 << 6,\n Tokens = 1 << 7,\n CreateImportExpressions = 1 << 8,\n CreateParenthesizedExpressions = 1 << 9,\n ErrorRecovery = 1 << 10,\n AttachComment = 1 << 11,\n AnnexB = 1 << 12,\n}\n\ntype OptionsWithDefaults = { [P in keyof Options]-?: Options[P] };\n\nfunction createDefaultOptions(): OptionsWithDefaults {\n return {\n // Source type (\"script\" or \"module\") for different semantics\n sourceType: \"script\",\n // Source filename.\n sourceFilename: undefined,\n // Index (0-based) from which to start counting source. Useful for\n // integration with other tools.\n startIndex: 0,\n // Column (0-based) from which to start counting source. Useful for\n // integration with other tools.\n startColumn: 0,\n // Line (1-based) from which to start counting source. Useful for\n // integration with other tools.\n startLine: 1,\n // When enabled, await at the top level is not considered an\n // error.\n allowAwaitOutsideFunction: false,\n // When enabled, a return at the top level is not considered an\n // error.\n allowReturnOutsideFunction: false,\n // When enabled, new.target outside a function or class is not\n // considered an error.\n allowNewTargetOutsideFunction: false,\n // When enabled, import/export statements are not constrained to\n // appearing at the top of the program.\n allowImportExportEverywhere: false,\n // TODO\n allowSuperOutsideMethod: false,\n // When enabled, export statements can reference undeclared variables.\n allowUndeclaredExports: false,\n // An array of plugins to enable\n plugins: [],\n // TODO\n strictMode: null,\n // Nodes have their start and end characters offsets recorded in\n // `start` and `end` properties (directly on the node, rather than\n // the `loc` object, which holds line/column data. To also add a\n // [semi-standardized][range] `range` property holding a `[start,\n // end]` array with the same numbers, set the `ranges` option to\n // `true`.\n //\n // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678\n ranges: false,\n // Adds all parsed tokens to a `tokens` property on the `File` node\n tokens: false,\n // Whether to create ImportExpression AST nodes (if false\n // `import(foo)` will be parsed as CallExpression(Import, [Identifier(foo)])\n createImportExpressions: process.env.BABEL_8_BREAKING ? true : false,\n // Whether to create ParenthesizedExpression AST nodes (if false\n // the parser sets extra.parenthesized on the expression nodes instead).\n createParenthesizedExpressions: false,\n // When enabled, errors are attached to the AST instead of being directly thrown.\n // Some errors will still throw, because @babel/parser can't always recover.\n errorRecovery: false,\n // When enabled, comments will be attached to adjacent AST nodes as one of\n // `leadingComments`, `trailingComments` and `innerComments`. The comment attachment\n // is vital to preserve comments after transform. If you don't print AST back,\n // consider set this option to `false` for performance\n attachComment: true,\n // When enabled, the parser will support Annex B syntax.\n // https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers\n annexB: true,\n };\n}\n\n// Interpret and default an options object\n\nexport function getOptions(opts?: Options | null): OptionsWithDefaults {\n // https://github.com/babel/babel/pull/16918\n // `options` is accessed frequently, please make sure it is a fast object.\n // `%ToFastProperties` can make it a fast object, but the performance is the same as the slow object.\n const options: any = createDefaultOptions();\n\n if (opts == null) {\n return options;\n }\n if (opts.annexB != null && opts.annexB !== false) {\n throw new Error(\"The `annexB` option can only be set to `false`.\");\n }\n\n for (const key of Object.keys(options) as (keyof Options)[]) {\n if (opts[key] != null) options[key] = opts[key];\n }\n\n if (options.startLine === 1) {\n if (opts.startIndex == null && options.startColumn > 0) {\n options.startIndex = options.startColumn;\n } else if (opts.startColumn == null && options.startIndex > 0) {\n options.startColumn = options.startIndex;\n }\n } else if (opts.startColumn == null || opts.startIndex == null) {\n if (opts.startIndex != null || process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"With a `startLine > 1` you must also specify `startIndex` and `startColumn`.\",\n );\n }\n }\n\n return options;\n}\n","import type { TokenType } from \"../tokenizer/types.ts\";\nimport type Parser from \"../parser/index.ts\";\nimport type { ExpressionErrors } from \"../parser/util.ts\";\nimport type * as N from \"../types.ts\";\nimport type { Node as NodeType, NodeBase, File } from \"../types.ts\";\nimport type { Position } from \"../util/location.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport type { Undone } from \"../parser/node.ts\";\nimport type { BindingFlag } from \"../util/scopeflags.ts\";\nimport { OptionFlags } from \"../options.ts\";\n\nconst { defineProperty } = Object;\nconst toUnenumerable = (object: any, key: string) => {\n if (object) {\n defineProperty(object, key, { enumerable: false, value: object[key] });\n }\n};\n\nfunction toESTreeLocation(node: any) {\n toUnenumerable(node.loc.start, \"index\");\n toUnenumerable(node.loc.end, \"index\");\n\n return node;\n}\n\nexport default (superClass: typeof Parser) =>\n class ESTreeParserMixin extends superClass implements Parser {\n parse(): File {\n const file = toESTreeLocation(super.parse());\n\n if (this.optionFlags & OptionFlags.Tokens) {\n file.tokens = file.tokens.map(toESTreeLocation);\n }\n\n return file;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseRegExpLiteral({ pattern, flags }): N.EstreeRegExpLiteral {\n let regex: RegExp | null = null;\n try {\n regex = new RegExp(pattern, flags);\n } catch (_) {\n // In environments that don't support these flags value will\n // be null as the regex can't be represented natively.\n }\n const node = this.estreeParseLiteral(regex);\n node.regex = { pattern, flags };\n\n return node;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseBigIntLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/es2020.md#bigintliteral\n let bigInt: bigint | null;\n try {\n bigInt = BigInt(value);\n } catch {\n bigInt = null;\n }\n const node = this.estreeParseLiteral(bigInt);\n node.bigint = String(node.value || value);\n\n return node;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseDecimalLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/experimental/decimal.md\n // todo: use BigDecimal when node supports it.\n const decimal: null = null;\n const node = this.estreeParseLiteral(decimal);\n node.decimal = String(node.value || value);\n\n return node;\n }\n\n estreeParseLiteral(value: any) {\n // @ts-expect-error ESTree plugin changes node types\n return this.parseLiteral(value, \"Literal\");\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseStringLiteral(value: any): N.Node {\n return this.estreeParseLiteral(value);\n }\n\n parseNumericLiteral(value: any): any {\n return this.estreeParseLiteral(value);\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseNullLiteral(): N.Node {\n return this.estreeParseLiteral(null);\n }\n\n parseBooleanLiteral(value: boolean): N.BooleanLiteral {\n // @ts-expect-error ESTree plugin changes node types\n return this.estreeParseLiteral(value);\n }\n\n // Cast a Directive to an ExpressionStatement. Mutates the input Directive.\n directiveToStmt(directive: N.Directive): N.ExpressionStatement {\n const expression = directive.value as any as N.EstreeLiteral;\n delete directive.value;\n\n expression.type = \"Literal\";\n // @ts-expect-error N.EstreeLiteral.raw is not defined.\n expression.raw = expression.extra.raw;\n expression.value = expression.extra.expressionValue;\n\n const stmt = directive as any as N.ExpressionStatement;\n stmt.type = \"ExpressionStatement\";\n stmt.expression = expression;\n // @ts-expect-error N.ExpressionStatement.directive is not defined\n stmt.directive = expression.extra.rawValue;\n\n delete expression.extra;\n\n return stmt;\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n initFunction(node: N.BodilessFunctionOrMethodBase, isAsync: boolean): void {\n super.initFunction(node, isAsync);\n node.expression = false;\n }\n\n checkDeclaration(node: N.Pattern | N.ObjectProperty): void {\n if (node != null && this.isObjectProperty(node)) {\n // @ts-expect-error plugin typings\n this.checkDeclaration((node as unknown as N.EstreeProperty).value);\n } else {\n super.checkDeclaration(node);\n }\n }\n\n getObjectOrClassMethodParams(method: N.ObjectMethod | N.ClassMethod) {\n return (method as unknown as N.EstreeMethodDefinition).value.params;\n }\n\n isValidDirective(stmt: N.Statement): boolean {\n return (\n stmt.type === \"ExpressionStatement\" &&\n stmt.expression.type === \"Literal\" &&\n typeof stmt.expression.value === \"string\" &&\n !stmt.expression.extra?.parenthesized\n );\n }\n\n parseBlockBody(\n node: N.BlockStatementLike,\n allowDirectives: boolean | undefined | null,\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): void {\n super.parseBlockBody(\n node,\n allowDirectives,\n topLevel,\n end,\n afterBlockParse,\n );\n\n const directiveStatements = node.directives.map(d =>\n this.directiveToStmt(d),\n );\n // @ts-expect-error estree plugin typings\n node.body = directiveStatements.concat(node.body);\n delete node.directives;\n }\n\n parsePrivateName(): any {\n const node = super.parsePrivateName();\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return node;\n }\n }\n return this.convertPrivateNameToPrivateIdentifier(node);\n }\n\n convertPrivateNameToPrivateIdentifier(\n node: N.PrivateName,\n ): N.EstreePrivateIdentifier {\n const name = super.getPrivateNameSV(node);\n node = node as any;\n delete node.id;\n // @ts-expect-error mutate AST types\n node.name = name;\n // @ts-expect-error mutate AST types\n node.type = \"PrivateIdentifier\";\n return node as unknown as N.EstreePrivateIdentifier;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n isPrivateName(node: N.Node): node is N.EstreePrivateIdentifier {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.isPrivateName(node);\n }\n }\n return node.type === \"PrivateIdentifier\";\n }\n\n // @ts-expect-error ESTree plugin changes node types\n getPrivateNameSV(node: N.EstreePrivateIdentifier): string {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.getPrivateNameSV(node as unknown as N.PrivateName);\n }\n }\n return node.name;\n }\n\n // @ts-expect-error plugin may override interfaces\n parseLiteral(value: any, type: T[\"type\"]): T {\n const node = super.parseLiteral(value, type);\n // @ts-expect-error mutating AST types\n node.raw = node.extra.raw;\n delete node.extra;\n\n return node;\n }\n\n parseFunctionBody(\n node: N.Function,\n allowExpression?: boolean | null,\n isMethod: boolean = false,\n ): void {\n super.parseFunctionBody(node, allowExpression, isMethod);\n node.expression = node.body.type !== \"BlockStatement\";\n }\n\n // @ts-expect-error plugin may override interfaces\n parseMethod<\n T extends N.ClassPrivateMethod | N.ObjectMethod | N.ClassMethod,\n >(\n node: Undone,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowDirectSuper: boolean,\n type: T[\"type\"],\n inClassScope: boolean = false,\n ): N.EstreeMethodDefinition | N.EstreeTSAbstractMethodDefinition {\n let funcNode = this.startNode();\n funcNode.kind = node.kind; // provide kind, so super method correctly sets state\n funcNode = super.parseMethod(\n // @ts-expect-error todo(flow->ts)\n funcNode,\n isGenerator,\n isAsync,\n isConstructor,\n allowDirectSuper,\n type,\n inClassScope,\n );\n // @ts-expect-error mutate AST types\n funcNode.type = \"FunctionExpression\";\n delete funcNode.kind;\n // @ts-expect-error mutate AST types\n node.value = funcNode;\n const { typeParameters } = node;\n if (typeParameters) {\n delete node.typeParameters;\n funcNode.typeParameters = typeParameters;\n this.resetStartLocationFromNode(funcNode, typeParameters);\n }\n if (type === \"ClassPrivateMethod\") {\n node.computed = false;\n }\n if (process.env.BABEL_8_BREAKING && this.hasPlugin(\"typescript\")) {\n if (!funcNode.body) {\n (funcNode as unknown as N.EstreeTSEmptyBodyFunctionExpression).type =\n \"TSEmptyBodyFunctionExpression\";\n }\n // @ts-expect-error todo(flow->ts) property not defined for all types in union\n if (node.abstract) {\n return this.finishNode(\n // @ts-expect-error cast methods to estree types\n node as Undone,\n \"TSAbstractMethodDefinition\",\n );\n }\n }\n return this.finishNode(\n // @ts-expect-error cast methods to estree types\n node as Undone,\n \"MethodDefinition\",\n );\n }\n\n nameIsConstructor(key: N.Expression | N.PrivateName): boolean {\n if (key.type === \"Literal\") return key.value === \"constructor\";\n return super.nameIsConstructor(key);\n }\n\n parseClassProperty(...args: [N.ClassProperty]): any {\n const propertyNode = super.parseClassProperty(...args);\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return propertyNode as unknown as N.EstreePropertyDefinition;\n }\n }\n if (\n process.env.BABEL_8_BREAKING &&\n propertyNode.abstract &&\n this.hasPlugin(\"typescript\")\n ) {\n (propertyNode as unknown as N.EstreeTSAbstractPropertyDefinition).type =\n \"TSAbstractPropertyDefinition\";\n } else {\n (propertyNode as unknown as N.EstreePropertyDefinition).type =\n \"PropertyDefinition\";\n }\n return propertyNode;\n }\n\n parseClassPrivateProperty(...args: [N.ClassPrivateProperty]): any {\n const propertyNode = super.parseClassPrivateProperty(...args);\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return propertyNode as unknown as N.EstreePropertyDefinition;\n }\n }\n if (\n process.env.BABEL_8_BREAKING &&\n propertyNode.abstract &&\n this.hasPlugin(\"typescript\")\n ) {\n (propertyNode as unknown as N.EstreeTSAbstractPropertyDefinition).type =\n \"TSAbstractPropertyDefinition\";\n } else {\n (propertyNode as unknown as N.EstreePropertyDefinition).type =\n \"PropertyDefinition\";\n }\n propertyNode.computed = false;\n return propertyNode;\n }\n\n parseObjectMethod(\n prop: N.ObjectMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n ): N.ObjectMethod | undefined | null {\n const node: N.EstreeProperty = super.parseObjectMethod(\n prop,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n ) as any;\n\n if (node) {\n node.type = \"Property\";\n if ((node as any as N.ClassMethod).kind === \"method\") {\n node.kind = \"init\";\n }\n node.shorthand = false;\n }\n\n return node as any;\n }\n\n parseObjectProperty(\n prop: N.ObjectProperty,\n startLoc: Position | undefined | null,\n isPattern: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.ObjectProperty | undefined | null {\n const node: N.EstreeProperty = super.parseObjectProperty(\n prop,\n startLoc,\n isPattern,\n refExpressionErrors,\n ) as any;\n\n if (node) {\n node.kind = \"init\";\n node.type = \"Property\";\n }\n\n return node as any;\n }\n\n isValidLVal(\n type: string,\n isUnparenthesizedInAssign: boolean,\n binding: BindingFlag,\n ) {\n return type === \"Property\"\n ? \"value\"\n : super.isValidLVal(type, isUnparenthesizedInAssign, binding);\n }\n\n isAssignable(node: N.Node, isBinding?: boolean): boolean {\n if (node != null && this.isObjectProperty(node)) {\n return this.isAssignable(node.value, isBinding);\n }\n return super.isAssignable(node, isBinding);\n }\n\n toAssignable(node: N.Node, isLHS: boolean = false): void {\n if (node != null && this.isObjectProperty(node)) {\n const { key, value } = node;\n if (this.isPrivateName(key)) {\n this.classScope.usePrivateName(\n this.getPrivateNameSV(key),\n key.loc.start,\n );\n }\n this.toAssignable(value, isLHS);\n } else {\n super.toAssignable(node, isLHS);\n }\n }\n\n toAssignableObjectExpressionProp(\n prop: N.Node,\n isLast: boolean,\n isLHS: boolean,\n ) {\n if (\n prop.type === \"Property\" &&\n (prop.kind === \"get\" || prop.kind === \"set\")\n ) {\n this.raise(Errors.PatternHasAccessor, prop.key);\n } else if (prop.type === \"Property\" && prop.method) {\n this.raise(Errors.PatternHasMethod, prop.key);\n } else {\n super.toAssignableObjectExpressionProp(prop, isLast, isLHS);\n }\n }\n\n finishCallExpression(\n unfinished: Undone,\n optional: boolean,\n ): T {\n const node = super.finishCallExpression(unfinished, optional);\n\n if (node.callee.type === \"Import\") {\n (node as N.Node as N.EstreeImportExpression).type = \"ImportExpression\";\n (node as N.Node as N.EstreeImportExpression).source = node\n .arguments[0] as N.Expression;\n (node as N.Node as N.EstreeImportExpression).options =\n (node.arguments[1] as N.Expression) ?? null;\n // compatibility with previous ESTree AST\n // TODO(Babel 8): Remove this\n (node as N.Node as N.EstreeImportExpression).attributes =\n (node.arguments[1] as N.Expression) ?? null;\n // arguments isn't optional in the type definition\n delete node.arguments;\n // callee isn't optional in the type definition\n delete node.callee;\n }\n\n return node;\n }\n\n toReferencedArguments(\n node:\n | N.CallExpression\n | N.OptionalCallExpression\n | N.EstreeImportExpression,\n /* isParenthesizedExpr?: boolean, */\n ) {\n // ImportExpressions do not have an arguments array.\n if (node.type === \"ImportExpression\") {\n return;\n }\n\n super.toReferencedArguments(node);\n }\n\n parseExport(\n unfinished: Undone,\n decorators: N.Decorator[] | null,\n ) {\n const exportStartLoc = this.state.lastTokStartLoc;\n const node = super.parseExport(unfinished, decorators);\n\n switch (node.type) {\n case \"ExportAllDeclaration\":\n // @ts-expect-error mutating AST types\n node.exported = null;\n break;\n\n case \"ExportNamedDeclaration\":\n if (\n node.specifiers.length === 1 &&\n node.specifiers[0].type === \"ExportNamespaceSpecifier\"\n ) {\n // @ts-expect-error mutating AST types\n node.type = \"ExportAllDeclaration\";\n // @ts-expect-error mutating AST types\n node.exported = node.specifiers[0].exported;\n delete node.specifiers;\n }\n\n // fallthrough\n case \"ExportDefaultDeclaration\":\n {\n const { declaration } = node;\n if (\n declaration?.type === \"ClassDeclaration\" &&\n declaration.decorators?.length > 0 &&\n // decorator comes before export\n declaration.start === node.start\n ) {\n this.resetStartLocation(\n node,\n // For compatibility with ESLint's keyword-spacing rule, which assumes that an\n // export declaration must start with export.\n // https://github.com/babel/babel/issues/15085\n // Here we reset export declaration's start to be the start of the export token\n exportStartLoc,\n );\n }\n }\n\n break;\n }\n\n return node;\n }\n\n parseSubscript(\n base: N.Expression,\n startLoc: Position,\n noCalls: boolean | undefined | null,\n state: N.ParseSubscriptState,\n ): N.Expression {\n const node = super.parseSubscript(base, startLoc, noCalls, state);\n\n if (state.optionalChainMember) {\n // https://github.com/estree/estree/blob/master/es2020.md#chainexpression\n if (\n node.type === \"OptionalMemberExpression\" ||\n node.type === \"OptionalCallExpression\"\n ) {\n // strip Optional prefix\n (node as unknown as N.CallExpression | N.MemberExpression).type =\n node.type.substring(8) as \"CallExpression\" | \"MemberExpression\";\n }\n if (state.stop) {\n const chain = this.startNodeAtNode(node);\n chain.expression = node;\n return this.finishNode(chain, \"ChainExpression\");\n }\n } else if (\n node.type === \"MemberExpression\" ||\n node.type === \"CallExpression\"\n ) {\n // @ts-expect-error not in the type definitions\n node.optional = false;\n }\n\n return node;\n }\n\n isOptionalMemberExpression(node: N.Node) {\n if (node.type === \"ChainExpression\") {\n return node.expression.type === \"MemberExpression\";\n }\n return super.isOptionalMemberExpression(node);\n }\n\n hasPropertyAsPrivateName(node: N.Node): boolean {\n if (node.type === \"ChainExpression\") {\n node = node.expression;\n }\n return super.hasPropertyAsPrivateName(node);\n }\n\n // @ts-expect-error ESTree plugin changes node types\n isObjectProperty(node: N.Node): node is N.EstreeProperty {\n return node.type === \"Property\" && node.kind === \"init\" && !node.method;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n isObjectMethod(node: N.Node): node is N.EstreeProperty {\n return (\n node.type === \"Property\" &&\n (node.method || node.kind === \"get\" || node.kind === \"set\")\n );\n }\n\n finishNodeAt(\n node: Undone,\n type: T[\"type\"],\n endLoc: Position,\n ): T {\n return toESTreeLocation(super.finishNodeAt(node, type, endLoc));\n }\n\n resetStartLocation(node: N.Node, startLoc: Position) {\n super.resetStartLocation(node, startLoc);\n toESTreeLocation(node);\n }\n\n resetEndLocation(\n node: NodeBase,\n endLoc: Position = this.state.lastTokEndLoc,\n ): void {\n super.resetEndLocation(node, endLoc);\n toESTreeLocation(node);\n }\n };\n","// The token context is used in JSX plugin to track\n// jsx tag / jsx text / normal JavaScript expression\n\nexport class TokContext {\n constructor(token: string, preserveSpace?: boolean) {\n this.token = token;\n this.preserveSpace = !!preserveSpace;\n }\n\n token: string;\n preserveSpace: boolean;\n}\n\nconst types: {\n [key: string]: TokContext;\n} = {\n brace: new TokContext(\"{\"), // normal JavaScript expression\n j_oTag: new TokContext(\"...\", true), // JSX expressions\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n types.template = new TokContext(\"`\", true);\n}\n\nexport { types };\n","import { types as tc, type TokContext } from \"./context.ts\";\n// ## Token types\n\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store the information it has about a\n// token in a way that is very cheap for the parser to look up.\n\n// All token type variables start with an underscore, to make them\n// easy to recognize.\n\n// The `beforeExpr` property is used to disambiguate between 1) binary\n// expression (<) and JSX Tag start (); 2) object literal and JSX\n// texts. It is set on the `updateContext` function in the JSX plugin.\n\n// The `startsExpr` property is used to determine whether an expression\n// may be the “argument” subexpression of a `yield` expression or\n// `yield` statement. It is set on all token types that may be at the\n// start of a subexpression.\n\n// `isLoop` marks a keyword as starting a loop, which is important\n// to know when parsing a label, in order to allow or disallow\n// continue jumps to that label.\n\nconst beforeExpr = true;\nconst startsExpr = true;\nconst isLoop = true;\nconst isAssign = true;\nconst prefix = true;\nconst postfix = true;\n\ntype TokenOptions = {\n keyword?: string;\n beforeExpr?: boolean;\n startsExpr?: boolean;\n rightAssociative?: boolean;\n isLoop?: boolean;\n isAssign?: boolean;\n prefix?: boolean;\n postfix?: boolean;\n binop?: number | null;\n};\n\n// Internally the tokenizer stores token as a number\nexport type TokenType = number;\n\n// The `ExportedTokenType` is exported via `tokTypes` and accessible\n// when `tokens: true` is enabled. Unlike internal token type, it provides\n// metadata of the tokens.\nexport class ExportedTokenType {\n label: string;\n keyword: string | undefined | null;\n beforeExpr: boolean;\n startsExpr: boolean;\n rightAssociative: boolean;\n isLoop: boolean;\n isAssign: boolean;\n prefix: boolean;\n postfix: boolean;\n binop: number | undefined | null;\n // todo(Babel 8): remove updateContext from exposed token layout\n declare updateContext:\n | ((context: Array) => void)\n | undefined\n | null;\n\n constructor(label: string, conf: TokenOptions = {}) {\n this.label = label;\n this.keyword = conf.keyword;\n this.beforeExpr = !!conf.beforeExpr;\n this.startsExpr = !!conf.startsExpr;\n this.rightAssociative = !!conf.rightAssociative;\n this.isLoop = !!conf.isLoop;\n this.isAssign = !!conf.isAssign;\n this.prefix = !!conf.prefix;\n this.postfix = !!conf.postfix;\n this.binop = conf.binop != null ? conf.binop : null;\n if (!process.env.BABEL_8_BREAKING) {\n this.updateContext = null;\n }\n }\n}\n\n// A map from keyword/keyword-like string value to the token type\nexport const keywords = new Map();\n\nfunction createKeyword(name: string, options: TokenOptions = {}): TokenType {\n options.keyword = name;\n const token = createToken(name, options);\n keywords.set(name, token);\n return token;\n}\n\nfunction createBinop(name: string, binop: number) {\n return createToken(name, { beforeExpr, binop });\n}\n\nlet tokenTypeCounter = -1;\nexport const tokenTypes: ExportedTokenType[] = [];\nconst tokenLabels: string[] = [];\nconst tokenBinops: number[] = [];\nconst tokenBeforeExprs: boolean[] = [];\nconst tokenStartsExprs: boolean[] = [];\nconst tokenPrefixes: boolean[] = [];\n\nfunction createToken(name: string, options: TokenOptions = {}): TokenType {\n ++tokenTypeCounter;\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n tokenTypes.push(new ExportedTokenType(name, options));\n\n return tokenTypeCounter;\n}\n\nfunction createKeywordLike(\n name: string,\n options: TokenOptions = {},\n): TokenType {\n ++tokenTypeCounter;\n keywords.set(name, tokenTypeCounter);\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n // In the exported token type, we set the label as \"name\" for backward compatibility with Babel 7\n tokenTypes.push(new ExportedTokenType(\"name\", options));\n\n return tokenTypeCounter;\n}\n\n// For performance the token type helpers depend on the following declarations order.\n// When adding new token types, please also check if the token helpers need update.\n\nexport type InternalTokenTypes = typeof tt;\n\nexport const tt = {\n // Punctuation token types.\n bracketL: createToken(\"[\", { beforeExpr, startsExpr }),\n bracketHashL: createToken(\"#[\", { beforeExpr, startsExpr }),\n bracketBarL: createToken(\"[|\", { beforeExpr, startsExpr }),\n bracketR: createToken(\"]\"),\n bracketBarR: createToken(\"|]\"),\n braceL: createToken(\"{\", { beforeExpr, startsExpr }),\n braceBarL: createToken(\"{|\", { beforeExpr, startsExpr }),\n braceHashL: createToken(\"#{\", { beforeExpr, startsExpr }),\n braceR: createToken(\"}\"),\n braceBarR: createToken(\"|}\"),\n parenL: createToken(\"(\", { beforeExpr, startsExpr }),\n parenR: createToken(\")\"),\n comma: createToken(\",\", { beforeExpr }),\n semi: createToken(\";\", { beforeExpr }),\n colon: createToken(\":\", { beforeExpr }),\n doubleColon: createToken(\"::\", { beforeExpr }),\n dot: createToken(\".\"),\n question: createToken(\"?\", { beforeExpr }),\n questionDot: createToken(\"?.\"),\n arrow: createToken(\"=>\", { beforeExpr }),\n template: createToken(\"template\"),\n ellipsis: createToken(\"...\", { beforeExpr }),\n backQuote: createToken(\"`\", { startsExpr }),\n dollarBraceL: createToken(\"${\", { beforeExpr, startsExpr }),\n // start: isTemplate\n templateTail: createToken(\"...`\", { startsExpr }),\n templateNonTail: createToken(\"...${\", { beforeExpr, startsExpr }),\n // end: isTemplate\n at: createToken(\"@\"),\n hash: createToken(\"#\", { startsExpr }),\n\n // Special hashbang token.\n interpreterDirective: createToken(\"#!...\"),\n\n // Operators. These carry several kinds of properties to help the\n // parser use them properly (the presence of these properties is\n // what categorizes them as operators).\n //\n // `binop`, when present, specifies that this operator is a binary\n // operator, and will refer to its precedence.\n //\n // `prefix` and `postfix` mark the operator as a prefix or postfix\n // unary operator.\n //\n // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as\n // binary operators with a very low precedence, that should result\n // in AssignmentExpression nodes.\n\n // start: isAssign\n eq: createToken(\"=\", { beforeExpr, isAssign }),\n assign: createToken(\"_=\", { beforeExpr, isAssign }),\n slashAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // These are only needed to support % and ^ as a Hack-pipe topic token.\n // When the proposal settles on a token, the others can be merged with\n // tt.assign.\n xorAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n moduloAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // end: isAssign\n\n incDec: createToken(\"++/--\", { prefix, postfix, startsExpr }),\n bang: createToken(\"!\", { beforeExpr, prefix, startsExpr }),\n tilde: createToken(\"~\", { beforeExpr, prefix, startsExpr }),\n\n // More possible topic tokens.\n // When the proposal settles on a token, at least one of these may be removed.\n doubleCaret: createToken(\"^^\", { startsExpr }),\n doubleAt: createToken(\"@@\", { startsExpr }),\n\n // start: isBinop\n pipeline: createBinop(\"|>\", 0),\n nullishCoalescing: createBinop(\"??\", 1),\n logicalOR: createBinop(\"||\", 1),\n logicalAND: createBinop(\"&&\", 2),\n bitwiseOR: createBinop(\"|\", 3),\n bitwiseXOR: createBinop(\"^\", 4),\n bitwiseAND: createBinop(\"&\", 5),\n equality: createBinop(\"==/!=/===/!==\", 6),\n lt: createBinop(\"/<=/>=\", 7),\n gt: createBinop(\"/<=/>=\", 7),\n relational: createBinop(\"/<=/>=\", 7),\n bitShift: createBinop(\"<>/>>>\", 8),\n bitShiftL: createBinop(\"<>/>>>\", 8),\n bitShiftR: createBinop(\"<>/>>>\", 8),\n plusMin: createToken(\"+/-\", { beforeExpr, binop: 9, prefix, startsExpr }),\n // startsExpr: required by v8intrinsic plugin\n modulo: createToken(\"%\", { binop: 10, startsExpr }),\n // unset `beforeExpr` as it can be `function *`\n star: createToken(\"*\", { binop: 10 }),\n slash: createBinop(\"/\", 10),\n exponent: createToken(\"**\", {\n beforeExpr,\n binop: 11,\n rightAssociative: true,\n }),\n\n // Keywords\n // Don't forget to update packages/babel-helper-validator-identifier/src/keyword.js\n // when new keywords are added\n // start: isLiteralPropertyName\n // start: isKeyword\n _in: createKeyword(\"in\", { beforeExpr, binop: 7 }),\n _instanceof: createKeyword(\"instanceof\", { beforeExpr, binop: 7 }),\n // end: isBinop\n _break: createKeyword(\"break\"),\n _case: createKeyword(\"case\", { beforeExpr }),\n _catch: createKeyword(\"catch\"),\n _continue: createKeyword(\"continue\"),\n _debugger: createKeyword(\"debugger\"),\n _default: createKeyword(\"default\", { beforeExpr }),\n _else: createKeyword(\"else\", { beforeExpr }),\n _finally: createKeyword(\"finally\"),\n _function: createKeyword(\"function\", { startsExpr }),\n _if: createKeyword(\"if\"),\n _return: createKeyword(\"return\", { beforeExpr }),\n _switch: createKeyword(\"switch\"),\n _throw: createKeyword(\"throw\", { beforeExpr, prefix, startsExpr }),\n _try: createKeyword(\"try\"),\n _var: createKeyword(\"var\"),\n _const: createKeyword(\"const\"),\n _with: createKeyword(\"with\"),\n _new: createKeyword(\"new\", { beforeExpr, startsExpr }),\n _this: createKeyword(\"this\", { startsExpr }),\n _super: createKeyword(\"super\", { startsExpr }),\n _class: createKeyword(\"class\", { startsExpr }),\n _extends: createKeyword(\"extends\", { beforeExpr }),\n _export: createKeyword(\"export\"),\n _import: createKeyword(\"import\", { startsExpr }),\n _null: createKeyword(\"null\", { startsExpr }),\n _true: createKeyword(\"true\", { startsExpr }),\n _false: createKeyword(\"false\", { startsExpr }),\n _typeof: createKeyword(\"typeof\", { beforeExpr, prefix, startsExpr }),\n _void: createKeyword(\"void\", { beforeExpr, prefix, startsExpr }),\n _delete: createKeyword(\"delete\", { beforeExpr, prefix, startsExpr }),\n // start: isLoop\n _do: createKeyword(\"do\", { isLoop, beforeExpr }),\n _for: createKeyword(\"for\", { isLoop }),\n _while: createKeyword(\"while\", { isLoop }),\n // end: isLoop\n // end: isKeyword\n\n // Primary literals\n // start: isIdentifier\n _as: createKeywordLike(\"as\", { startsExpr }),\n _assert: createKeywordLike(\"assert\", { startsExpr }),\n _async: createKeywordLike(\"async\", { startsExpr }),\n _await: createKeywordLike(\"await\", { startsExpr }),\n _defer: createKeywordLike(\"defer\", { startsExpr }),\n _from: createKeywordLike(\"from\", { startsExpr }),\n _get: createKeywordLike(\"get\", { startsExpr }),\n _let: createKeywordLike(\"let\", { startsExpr }),\n _meta: createKeywordLike(\"meta\", { startsExpr }),\n _of: createKeywordLike(\"of\", { startsExpr }),\n _sent: createKeywordLike(\"sent\", { startsExpr }),\n _set: createKeywordLike(\"set\", { startsExpr }),\n _source: createKeywordLike(\"source\", { startsExpr }),\n _static: createKeywordLike(\"static\", { startsExpr }),\n _using: createKeywordLike(\"using\", { startsExpr }),\n _yield: createKeywordLike(\"yield\", { startsExpr }),\n\n // Flow and TypeScript Keywordlike\n _asserts: createKeywordLike(\"asserts\", { startsExpr }),\n _checks: createKeywordLike(\"checks\", { startsExpr }),\n _exports: createKeywordLike(\"exports\", { startsExpr }),\n _global: createKeywordLike(\"global\", { startsExpr }),\n _implements: createKeywordLike(\"implements\", { startsExpr }),\n _intrinsic: createKeywordLike(\"intrinsic\", { startsExpr }),\n _infer: createKeywordLike(\"infer\", { startsExpr }),\n _is: createKeywordLike(\"is\", { startsExpr }),\n _mixins: createKeywordLike(\"mixins\", { startsExpr }),\n _proto: createKeywordLike(\"proto\", { startsExpr }),\n _require: createKeywordLike(\"require\", { startsExpr }),\n _satisfies: createKeywordLike(\"satisfies\", { startsExpr }),\n // start: isTSTypeOperator\n _keyof: createKeywordLike(\"keyof\", { startsExpr }),\n _readonly: createKeywordLike(\"readonly\", { startsExpr }),\n _unique: createKeywordLike(\"unique\", { startsExpr }),\n // end: isTSTypeOperator\n // start: isTSDeclarationStart\n _abstract: createKeywordLike(\"abstract\", { startsExpr }),\n _declare: createKeywordLike(\"declare\", { startsExpr }),\n _enum: createKeywordLike(\"enum\", { startsExpr }),\n _module: createKeywordLike(\"module\", { startsExpr }),\n _namespace: createKeywordLike(\"namespace\", { startsExpr }),\n // start: isFlowInterfaceOrTypeOrOpaque\n _interface: createKeywordLike(\"interface\", { startsExpr }),\n _type: createKeywordLike(\"type\", { startsExpr }),\n // end: isTSDeclarationStart\n _opaque: createKeywordLike(\"opaque\", { startsExpr }),\n // end: isFlowInterfaceOrTypeOrOpaque\n name: createToken(\"name\", { startsExpr }),\n\n // placeholder plugin\n placeholder: createToken(\"%%\", { startsExpr: true }),\n // end: isIdentifier\n\n string: createToken(\"string\", { startsExpr }),\n num: createToken(\"num\", { startsExpr }),\n bigint: createToken(\"bigint\", { startsExpr }),\n // TODO: Remove this in Babel 8\n decimal: createToken(\"decimal\", { startsExpr }),\n // end: isLiteralPropertyName\n regexp: createToken(\"regexp\", { startsExpr }),\n privateName: createToken(\"#name\", { startsExpr }),\n eof: createToken(\"eof\"),\n\n // jsx plugin\n jsxName: createToken(\"jsxName\"),\n jsxText: createToken(\"jsxText\", { beforeExpr: true }),\n jsxTagStart: createToken(\"jsxTagStart\", { startsExpr: true }),\n jsxTagEnd: createToken(\"jsxTagEnd\"),\n} as const;\n\nexport function tokenIsIdentifier(token: TokenType): boolean {\n return token >= tt._as && token <= tt.placeholder;\n}\n\nexport function tokenKeywordOrIdentifierIsKeyword(token: TokenType): boolean {\n // we can remove the token >= tt._in check when we\n // know a token is either keyword or identifier\n return token <= tt._while;\n}\n\nexport function tokenIsKeywordOrIdentifier(token: TokenType): boolean {\n return token >= tt._in && token <= tt.placeholder;\n}\n\nexport function tokenIsLiteralPropertyName(token: TokenType): boolean {\n return token >= tt._in && token <= tt.decimal;\n}\n\nexport function tokenComesBeforeExpression(token: TokenType): boolean {\n return tokenBeforeExprs[token];\n}\n\nexport function tokenCanStartExpression(token: TokenType): boolean {\n return tokenStartsExprs[token];\n}\n\nexport function tokenIsAssignment(token: TokenType): boolean {\n return token >= tt.eq && token <= tt.moduloAssign;\n}\n\nexport function tokenIsFlowInterfaceOrTypeOrOpaque(token: TokenType): boolean {\n return token >= tt._interface && token <= tt._opaque;\n}\n\nexport function tokenIsLoop(token: TokenType): boolean {\n return token >= tt._do && token <= tt._while;\n}\n\nexport function tokenIsKeyword(token: TokenType): boolean {\n return token >= tt._in && token <= tt._while;\n}\n\nexport function tokenIsOperator(token: TokenType): boolean {\n return token >= tt.pipeline && token <= tt._instanceof;\n}\n\nexport function tokenIsPostfix(token: TokenType): boolean {\n return token === tt.incDec;\n}\n\nexport function tokenIsPrefix(token: TokenType): boolean {\n return tokenPrefixes[token];\n}\n\nexport function tokenIsTSTypeOperator(token: TokenType): boolean {\n return token >= tt._keyof && token <= tt._unique;\n}\n\nexport function tokenIsTSDeclarationStart(token: TokenType): boolean {\n return token >= tt._abstract && token <= tt._type;\n}\n\nexport function tokenLabelName(token: TokenType): string {\n return tokenLabels[token];\n}\n\nexport function tokenOperatorPrecedence(token: TokenType): number {\n return tokenBinops[token];\n}\n\nexport function tokenIsBinaryOperator(token: TokenType): boolean {\n return tokenBinops[token] !== -1;\n}\n\nexport function tokenIsRightAssociative(token: TokenType): boolean {\n return token === tt.exponent;\n}\n\nexport function tokenIsTemplate(token: TokenType): boolean {\n return token >= tt.templateTail && token <= tt.templateNonTail;\n}\n\nexport function getExportedToken(token: TokenType): ExportedTokenType {\n return tokenTypes[token];\n}\n\nexport function isTokenType(obj: any): boolean {\n return typeof obj === \"number\";\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n tokenTypes[tt.braceR].updateContext = context => {\n context.pop();\n };\n\n tokenTypes[tt.braceL].updateContext =\n tokenTypes[tt.braceHashL].updateContext =\n tokenTypes[tt.dollarBraceL].updateContext =\n context => {\n context.push(tc.brace);\n };\n\n tokenTypes[tt.backQuote].updateContext = context => {\n if (context[context.length - 1] === tc.template) {\n context.pop();\n } else {\n context.push(tc.template);\n }\n };\n\n tokenTypes[tt.jsxTagStart].updateContext = context => {\n context.push(tc.j_expr, tc.j_oTag);\n };\n}\n","// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.cjs`.\n\n/* prettier-ignore */\nlet 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-\\u1c8a\\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-\\ua7cd\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7dc\\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\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\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\\u0897-\\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\\u0cf3\\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-\\u0ece\\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\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\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\\uff65\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.cjs`.\n/* prettier-ignore */\nconst 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,4,51,13,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,39,27,10,22,251,41,7,1,17,2,60,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,20,1,64,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,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,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,200,32,32,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,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,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191];\n/* prettier-ignore */\nconst 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,7,9,32,4,318,1,80,3,71,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,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,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,343,9,54,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,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,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,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (let i = 0; i < name.length; i++) {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = name.charCodeAt(i);\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n if (isFirst) {\n isFirst = false;\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n","const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n","import * as charCodes from \"charcodes\";\nimport { isIdentifierStart } from \"@babel/helper-validator-identifier\";\n\nexport {\n isIdentifierStart,\n isIdentifierChar,\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nexport const keywordRelationalOperator = /^in(stanceof)?$/;\n\n// Test whether a current state character code and next character code is @\n\nexport function isIteratorStart(\n current: number,\n next: number,\n next2: number,\n): boolean {\n return (\n current === charCodes.atSign &&\n next === charCodes.atSign &&\n isIdentifierStart(next2)\n );\n}\n\n// This is the comprehensive set of JavaScript reserved words\n// If a word is in this set, it could be a reserved word,\n// depending on sourceType/strictMode/binding info. In other words\n// if a word is not in this set, it is not a reserved word under\n// any circumstance.\nconst reservedWordLikeSet = new Set([\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n // strict\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n // strictBind\n \"eval\",\n \"arguments\",\n // reservedWorkLike\n \"enum\",\n \"await\",\n]);\n\nexport function canBeReservedWord(word: string): boolean {\n return reservedWordLikeSet.has(word);\n}\n","import { ScopeFlag, BindingFlag } from \"./scopeflags.ts\";\nimport type { Position } from \"./location.ts\";\nimport type * as N from \"../types.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport type Tokenizer from \"../tokenizer/index.ts\";\n\nexport const enum NameType {\n // var-declared names in the current lexical scope\n Var = 1 << 0,\n // lexically-declared names in the current lexical scope\n Lexical = 1 << 1,\n // lexically-declared FunctionDeclaration names in the current lexical scope\n Function = 1 << 2,\n}\n\n// Start an AST node, attaching a start offset.\nexport class Scope {\n flags: ScopeFlag = 0;\n names: Map = new Map();\n firstLexicalName = \"\";\n\n constructor(flags: ScopeFlag) {\n this.flags = flags;\n }\n}\n\n// The functions in this module keep track of declared variables in the\n// current scope in order to detect duplicate variable names.\nexport default class ScopeHandler {\n parser: Tokenizer;\n scopeStack: Array = [];\n inModule: boolean;\n undefinedExports: Map = new Map();\n\n constructor(parser: Tokenizer, inModule: boolean) {\n this.parser = parser;\n this.inModule = inModule;\n }\n\n get inTopLevel() {\n return (this.currentScope().flags & ScopeFlag.PROGRAM) > 0;\n }\n get inFunction() {\n return (this.currentVarScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get allowSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.SUPER) > 0;\n }\n get allowDirectSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.DIRECT_SUPER) > 0;\n }\n get inClass() {\n return (this.currentThisScopeFlags() & ScopeFlag.CLASS) > 0;\n }\n get inClassAndNotInNonArrowFunction() {\n const flags = this.currentThisScopeFlags();\n return (flags & ScopeFlag.CLASS) > 0 && (flags & ScopeFlag.FUNCTION) === 0;\n }\n get inStaticBlock() {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.STATIC_BLOCK) {\n return true;\n }\n if (flags & (ScopeFlag.VAR | ScopeFlag.CLASS)) {\n // function body, module body, class property initializers\n return false;\n }\n }\n }\n get inNonArrowFunction() {\n return (this.currentThisScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get treatFunctionsAsVar() {\n return this.treatFunctionsAsVarInScope(this.currentScope());\n }\n\n createScope(flags: ScopeFlag): Scope {\n return new Scope(flags);\n }\n\n enter(flags: ScopeFlag) {\n /*:: +createScope: (flags:ScopeFlag) => IScope; */\n // @ts-expect-error This method will be overwritten by subclasses\n this.scopeStack.push(this.createScope(flags));\n }\n\n exit(): ScopeFlag {\n const scope = this.scopeStack.pop();\n return scope.flags;\n }\n\n // The spec says:\n // > At the top level of a function, or script, function declarations are\n // > treated like var declarations rather than like lexical declarations.\n treatFunctionsAsVarInScope(scope: IScope): boolean {\n return !!(\n scope.flags & (ScopeFlag.FUNCTION | ScopeFlag.STATIC_BLOCK) ||\n (!this.parser.inModule && scope.flags & ScopeFlag.PROGRAM)\n );\n }\n\n declareName(name: string, bindingType: BindingFlag, loc: Position) {\n let scope = this.currentScope();\n if (\n bindingType & BindingFlag.SCOPE_LEXICAL ||\n bindingType & BindingFlag.SCOPE_FUNCTION\n ) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n\n let type = scope.names.get(name) || 0;\n\n if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n type = type | NameType.Function;\n } else {\n if (!scope.firstLexicalName) {\n scope.firstLexicalName = name;\n }\n type = type | NameType.Lexical;\n }\n\n scope.names.set(name, type);\n\n if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n this.maybeExportDefined(scope, name);\n }\n } else if (bindingType & BindingFlag.SCOPE_VAR) {\n for (let i = this.scopeStack.length - 1; i >= 0; --i) {\n scope = this.scopeStack[i];\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n scope.names.set(name, (scope.names.get(name) || 0) | NameType.Var);\n this.maybeExportDefined(scope, name);\n\n if (scope.flags & ScopeFlag.VAR) break;\n }\n }\n if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n maybeExportDefined(scope: IScope, name: string) {\n if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n checkRedeclarationInScope(\n scope: IScope,\n name: string,\n bindingType: BindingFlag,\n loc: Position,\n ) {\n if (this.isRedeclaredInScope(scope, name, bindingType)) {\n this.parser.raise(Errors.VarRedeclaration, loc, {\n identifierName: name,\n });\n }\n }\n\n isRedeclaredInScope(\n scope: IScope,\n name: string,\n bindingType: BindingFlag,\n ): boolean {\n if (!(bindingType & BindingFlag.KIND_VALUE)) return false;\n\n if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n return scope.names.has(name);\n }\n\n const type = scope.names.get(name);\n\n if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n return (\n (type & NameType.Lexical) > 0 ||\n (!this.treatFunctionsAsVarInScope(scope) && (type & NameType.Var) > 0)\n );\n }\n\n return (\n ((type & NameType.Lexical) > 0 &&\n // Annex B.3.4\n // https://tc39.es/ecma262/#sec-variablestatements-in-catch-blocks\n !(\n scope.flags & ScopeFlag.SIMPLE_CATCH &&\n scope.firstLexicalName === name\n )) ||\n (!this.treatFunctionsAsVarInScope(scope) &&\n (type & NameType.Function) > 0)\n );\n }\n\n checkLocalExport(id: N.Identifier) {\n const { name } = id;\n const topLevelScope = this.scopeStack[0];\n if (!topLevelScope.names.has(name)) {\n this.undefinedExports.set(name, id.loc.start);\n }\n }\n\n currentScope(): IScope {\n return this.scopeStack[this.scopeStack.length - 1];\n }\n\n currentVarScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.VAR) {\n return flags;\n }\n }\n }\n\n // Could be useful for `arguments`, `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\n currentThisScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (\n flags & (ScopeFlag.VAR | ScopeFlag.CLASS) &&\n !(flags & ScopeFlag.ARROW)\n ) {\n return flags;\n }\n }\n }\n}\n","import type { Position } from \"../../util/location.ts\";\nimport ScopeHandler, { NameType, Scope } from \"../../util/scope.ts\";\nimport { BindingFlag, type ScopeFlag } from \"../../util/scopeflags.ts\";\nimport type * as N from \"../../types.ts\";\n\n// Reference implementation: https://github.com/facebook/flow/blob/23aeb2a2ef6eb4241ce178fde5d8f17c5f747fb5/src/typing/env.ml#L536-L584\nclass FlowScope extends Scope {\n // declare function foo(): type;\n declareFunctions: Set = new Set();\n}\n\nexport default class FlowScopeHandler extends ScopeHandler {\n createScope(flags: ScopeFlag): FlowScope {\n return new FlowScope(flags);\n }\n\n declareName(name: string, bindingType: BindingFlag, loc: Position) {\n const scope = this.currentScope();\n if (bindingType & BindingFlag.FLAG_FLOW_DECLARE_FN) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n this.maybeExportDefined(scope, name);\n scope.declareFunctions.add(name);\n return;\n }\n\n super.declareName(name, bindingType, loc);\n }\n\n isRedeclaredInScope(\n scope: FlowScope,\n name: string,\n bindingType: BindingFlag,\n ): boolean {\n if (super.isRedeclaredInScope(scope, name, bindingType)) return true;\n\n if (\n bindingType & BindingFlag.FLAG_FLOW_DECLARE_FN &&\n !scope.declareFunctions.has(name)\n ) {\n const type = scope.names.get(name);\n return (type & NameType.Function) > 0 || (type & NameType.Lexical) > 0;\n }\n\n return false;\n }\n\n checkLocalExport(id: N.Identifier) {\n if (!this.scopeStack[0].declareFunctions.has(id.name)) {\n super.checkLocalExport(id);\n }\n }\n}\n","import type { OptionFlags, Options } from \"../options.ts\";\nimport type State from \"../tokenizer/state.ts\";\nimport type { PluginsMap } from \"./index.ts\";\nimport type ScopeHandler from \"../util/scope.ts\";\nimport type ExpressionScopeHandler from \"../util/expression-scope.ts\";\nimport type ClassScopeHandler from \"../util/class-scope.ts\";\nimport type ProductionParameterHandler from \"../util/production-parameter.ts\";\nimport type {\n ParserPluginWithOptions,\n PluginConfig,\n PluginOptions,\n} from \"../typings.ts\";\nimport type * as N from \"../types.ts\";\n\nexport default class BaseParser {\n // Properties set by constructor in index.js\n declare options: Options;\n declare optionFlags: OptionFlags;\n declare inModule: boolean;\n declare scope: ScopeHandler;\n declare classScope: ClassScopeHandler;\n declare prodParam: ProductionParameterHandler;\n declare expressionScope: ExpressionScopeHandler;\n declare plugins: PluginsMap;\n declare filename: string | undefined | null;\n declare startIndex: number;\n // Names of exports store. `default` is stored as a name for both\n // `export default foo;` and `export { foo as default };`.\n declare exportedIdentifiers: Set;\n sawUnambiguousESM: boolean = false;\n ambiguousScriptDifferentAst: boolean = false;\n\n // Initialized by Tokenizer\n declare state: State;\n // input and length are not in state as they are constant and we do\n // not want to ever copy them, which happens if state gets cloned\n declare input: string;\n declare length: number;\n // Comment store for Program.comments\n declare comments: Array;\n\n sourceToOffsetPos(sourcePos: number) {\n return sourcePos + this.startIndex;\n }\n\n offsetToSourcePos(offsetPos: number) {\n return offsetPos - this.startIndex;\n }\n\n // This method accepts either a string (plugin name) or an array pair\n // (plugin name and options object). If an options object is given,\n // then each value is non-recursively checked for identity with that\n // plugin’s actual option value.\n hasPlugin(pluginConfig: PluginConfig): boolean {\n if (typeof pluginConfig === \"string\") {\n return this.plugins.has(pluginConfig);\n } else {\n const [pluginName, pluginOptions] = pluginConfig;\n if (!this.hasPlugin(pluginName)) {\n return false;\n }\n const actualOptions = this.plugins.get(pluginName);\n for (const key of Object.keys(\n pluginOptions,\n ) as (keyof typeof pluginOptions)[]) {\n if (actualOptions?.[key] !== pluginOptions[key]) {\n return false;\n }\n }\n return true;\n }\n }\n\n getPluginOption<\n PluginName extends ParserPluginWithOptions[0],\n OptionName extends keyof PluginOptions,\n >(plugin: PluginName, name: OptionName) {\n return (this.plugins.get(plugin) as null | PluginOptions)?.[\n name\n ];\n }\n}\n","/*:: declare var invariant; */\n\nimport BaseParser from \"./base.ts\";\nimport type { Comment, Node, Identifier } from \"../types.ts\";\nimport * as charCodes from \"charcodes\";\nimport type { Undone } from \"./node.ts\";\n\n/**\n * A whitespace token containing comments\n */\nexport type CommentWhitespace = {\n /**\n * the start of the whitespace token.\n */\n start: number;\n /**\n * the end of the whitespace token.\n */\n end: number;\n /**\n * the containing comments\n */\n comments: Array;\n /**\n * the immediately preceding AST node of the whitespace token\n */\n leadingNode: Node | null;\n /**\n * the immediately following AST node of the whitespace token\n */\n trailingNode: Node | null;\n /**\n * the innermost AST node containing the whitespace with minimal size (|end - start|)\n */\n containingNode: Node | null;\n};\n\n/**\n * Merge comments with node's trailingComments or assign comments to be\n * trailingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nfunction setTrailingComments(node: Undone, comments: Array) {\n if (node.trailingComments === undefined) {\n node.trailingComments = comments;\n } else {\n node.trailingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's leadingComments or assign comments to be\n * leadingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nfunction setLeadingComments(node: Undone, comments: Array) {\n if (node.leadingComments === undefined) {\n node.leadingComments = comments;\n } else {\n node.leadingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's innerComments or assign comments to be\n * innerComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nexport function setInnerComments(\n node: Undone,\n comments?: Array,\n) {\n if (node.innerComments === undefined) {\n node.innerComments = comments;\n } else {\n node.innerComments.unshift(...comments);\n }\n}\n\n/**\n * Given node and elements array, if elements has non-null element,\n * merge comments to its trailingComments, otherwise merge comments\n * to node's innerComments\n */\nfunction adjustInnerComments(\n node: Undone,\n elements: Array,\n commentWS: CommentWhitespace,\n) {\n let lastElement = null;\n let i = elements.length;\n while (lastElement === null && i > 0) {\n lastElement = elements[--i];\n }\n if (lastElement === null || lastElement.start > commentWS.start) {\n setInnerComments(node, commentWS.comments);\n } else {\n setTrailingComments(lastElement, commentWS.comments);\n }\n}\n\nexport default class CommentsParser extends BaseParser {\n addComment(comment: Comment): void {\n if (this.filename) comment.loc.filename = this.filename;\n const { commentsLen } = this.state;\n if (this.comments.length !== commentsLen) {\n this.comments.length = commentsLen;\n }\n this.comments.push(comment);\n this.state.commentsLen++;\n }\n\n /**\n * Given a newly created AST node _n_, attach _n_ to a comment whitespace _w_ if applicable\n * {@see {@link CommentWhitespace}}\n */\n processComment(node: Node): void {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n const lastCommentWS = commentStack[i];\n\n if (lastCommentWS.start === node.end) {\n lastCommentWS.leadingNode = node;\n i--;\n }\n\n const { start: nodeStart } = node;\n // invariant: for all 0 <= j <= i, let c = commentStack[j], c must satisfy c.end < node.end\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n if (commentEnd > nodeStart) {\n // by definition of commentWhiteSpace, this implies commentWS.start > nodeStart\n // so node can be a containingNode candidate. At this time we can finalize the comment\n // whitespace, because\n // 1) its leadingNode or trailingNode, if exists, will not change\n // 2) its containingNode have been assigned and will not change because it is the\n // innermost minimal-sized AST node\n commentWS.containingNode = node;\n this.finalizeComment(commentWS);\n commentStack.splice(i, 1);\n } else {\n if (commentEnd === nodeStart) {\n commentWS.trailingNode = node;\n }\n // stop the loop when commentEnd <= nodeStart\n break;\n }\n }\n }\n\n /**\n * Assign the comments of comment whitespaces to related AST nodes.\n * Also adjust innerComments following trailing comma.\n */\n finalizeComment(commentWS: CommentWhitespace) {\n const { comments } = commentWS;\n if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) {\n if (commentWS.leadingNode !== null) {\n setTrailingComments(commentWS.leadingNode, comments);\n }\n if (commentWS.trailingNode !== null) {\n setLeadingComments(commentWS.trailingNode, comments);\n }\n } else {\n /*:: invariant(commentWS.containingNode !== null) */\n const { containingNode: node, start: commentStart } = commentWS;\n if (\n this.input.charCodeAt(this.offsetToSourcePos(commentStart) - 1) ===\n charCodes.comma\n ) {\n // If a commentWhitespace follows a comma and the containingNode allows\n // list structures with trailing comma, merge it to the trailingComment\n // of the last non-null list element\n switch (node.type) {\n case \"ObjectExpression\":\n case \"ObjectPattern\":\n case \"RecordExpression\":\n adjustInnerComments(node, node.properties, commentWS);\n break;\n case \"CallExpression\":\n case \"OptionalCallExpression\":\n adjustInnerComments(node, node.arguments, commentWS);\n break;\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"ArrowFunctionExpression\":\n case \"ObjectMethod\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n adjustInnerComments(node, node.params, commentWS);\n break;\n case \"ArrayExpression\":\n case \"ArrayPattern\":\n case \"TupleExpression\":\n adjustInnerComments(node, node.elements, commentWS);\n break;\n case \"ExportNamedDeclaration\":\n case \"ImportDeclaration\":\n adjustInnerComments(node, node.specifiers, commentWS);\n break;\n case \"TSEnumDeclaration\":\n if (!process.env.BABEL_8_BREAKING) {\n adjustInnerComments(node, node.members, commentWS);\n } else {\n setInnerComments(node, comments);\n }\n break;\n case \"TSEnumBody\":\n adjustInnerComments(node, node.members, commentWS);\n break;\n default: {\n setInnerComments(node, comments);\n }\n }\n } else {\n setInnerComments(node, comments);\n }\n }\n }\n\n /**\n * Drains remaining commentStack and applies finalizeComment\n * to each comment whitespace. Used only in parseExpression\n * where the top level AST node is _not_ Program\n * {@see {@link CommentsParser#finalizeComment}}\n */\n finalizeRemainingComments() {\n const { commentStack } = this.state;\n for (let i = commentStack.length - 1; i >= 0; i--) {\n this.finalizeComment(commentStack[i]);\n }\n this.state.commentStack = [];\n }\n\n /* eslint-disable no-irregular-whitespace */\n /**\n * Reset previous node trailing comments. Used in object / class\n * property parsing. We parse `async`, `static`, `set` and `get`\n * as an identifier but may reinterpret it into an async/static/accessor\n * method later. In this case the identifier is not part of the AST and we\n * should sync the knowledge to commentStacks\n *\n * For example, when parsing\n * ```\n * async /* 1 *​/ function f() {}\n * ```\n * the comment whitespace `/* 1 *​/` has leading node Identifier(async). When\n * we see the function token, we create a Function node and mark `/* 1 *​/` as\n * inner comments. So `/* 1 *​/` should be detached from the Identifier node.\n *\n * @param node the last finished AST node _before_ current token\n */\n /* eslint-enable no-irregular-whitespace */\n resetPreviousNodeTrailingComments(node: Node) {\n const { commentStack } = this.state;\n const { length } = commentStack;\n if (length === 0) return;\n const commentWS = commentStack[length - 1];\n if (commentWS.leadingNode === node) {\n commentWS.leadingNode = null;\n }\n }\n\n /* eslint-disable no-irregular-whitespace */\n /**\n * Reset previous node leading comments, assuming that `node` is a\n * single-token node. Used in import phase modifiers parsing. We parse\n * `module` in `import module foo from ...` as an identifier but may\n * reinterpret it into a phase modifier later. In this case the identifier is\n * not part of the AST and we should sync the knowledge to commentStacks\n *\n * For example, when parsing\n * ```\n * import /* 1 *​/ module a from \"a\";\n * ```\n * the comment whitespace `/* 1 *​/` has trailing node Identifier(module). When\n * we see that `module` is not a default import binding, we mark `/* 1 *​/` as\n * inner comments of the ImportDeclaration. So `/* 1 *​/` should be detached from\n * the Identifier node.\n *\n * @param node the last finished AST node _before_ current token\n */\n /* eslint-enable no-irregular-whitespace */\n resetPreviousIdentifierLeadingComments(node: Identifier) {\n const { commentStack } = this.state;\n const { length } = commentStack;\n if (length === 0) return;\n\n if (commentStack[length - 1].trailingNode === node) {\n commentStack[length - 1].trailingNode = null;\n } else if (length >= 2 && commentStack[length - 2].trailingNode === node) {\n commentStack[length - 2].trailingNode = null;\n }\n }\n\n /**\n * Attach a node to the comment whitespaces right before/after\n * the given range.\n *\n * This is used to properly attach comments around parenthesized\n * expressions as leading/trailing comments of the inner expression.\n */\n takeSurroundingComments(node: Node, start: number, end: number) {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n const commentStart = commentWS.start;\n\n if (commentStart === end) {\n commentWS.leadingNode = node;\n } else if (commentEnd === start) {\n commentWS.trailingNode = node;\n } else if (commentEnd < start) {\n break;\n }\n }\n }\n}\n","import * as charCodes from \"charcodes\";\n\n// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\nexport const lineBreak = /\\r\\n|[\\r\\n\\u2028\\u2029]/;\nexport const lineBreakG = new RegExp(lineBreak.source, \"g\");\n\n// https://tc39.github.io/ecma262/#sec-line-terminators\nexport function isNewLine(code: number): boolean {\n switch (code) {\n case charCodes.lineFeed:\n case charCodes.carriageReturn:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return true;\n\n default:\n return false;\n }\n}\n\nexport function hasNewLine(input: string, start: number, end: number): boolean {\n for (let i = start; i < end; i++) {\n if (isNewLine(input.charCodeAt(i))) {\n return true;\n }\n }\n return false;\n}\n\nexport const skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;\n\nexport const skipWhiteSpaceInLine =\n /(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*/g;\n\n// https://tc39.github.io/ecma262/#sec-white-space\nexport function isWhitespace(code: number): boolean {\n switch (code) {\n case 0x0009: // CHARACTER TABULATION\n case 0x000b: // LINE TABULATION\n case 0x000c: // FORM FEED\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.oghamSpaceMark:\n case 0x2000: // EN QUAD\n case 0x2001: // EM QUAD\n case 0x2002: // EN SPACE\n case 0x2003: // EM SPACE\n case 0x2004: // THREE-PER-EM SPACE\n case 0x2005: // FOUR-PER-EM SPACE\n case 0x2006: // SIX-PER-EM SPACE\n case 0x2007: // FIGURE SPACE\n case 0x2008: // PUNCTUATION SPACE\n case 0x2009: // THIN SPACE\n case 0x200a: // HAIR SPACE\n case 0x202f: // NARROW NO-BREAK SPACE\n case 0x205f: // MEDIUM MATHEMATICAL SPACE\n case 0x3000: // IDEOGRAPHIC SPACE\n case 0xfeff: // ZERO WIDTH NO-BREAK SPACE\n return true;\n\n default:\n return false;\n }\n}\n","import type { Options } from \"../options.ts\";\nimport type { CommentWhitespace } from \"../parser/comments\";\nimport { Position } from \"../util/location.ts\";\n\nimport { types as ct, type TokContext } from \"./context.ts\";\nimport { tt, type TokenType } from \"./types.ts\";\nimport type { Errors } from \"../parse-error.ts\";\nimport type { ParseError } from \"../parse-error.ts\";\n\nexport type DeferredStrictError =\n | typeof Errors.StrictNumericEscape\n | typeof Errors.StrictOctalLiteral;\n\ntype TopicContextState = {\n // When a topic binding has been currently established,\n // then this is 1. Otherwise, it is 0. This is forwards compatible\n // with a future plugin for multiple lexical topics.\n maxNumOfResolvableTopics: number;\n // When a topic binding has been currently established, and if that binding\n // has been used as a topic reference `#`, then this is 0. Otherwise, it is\n // `null`. This is forwards compatible with a future plugin for multiple\n // lexical topics.\n maxTopicIndex: null | 0;\n};\n\nexport const enum LoopLabelKind {\n Loop = 1,\n Switch = 2,\n}\n\ndeclare const bit: import(\"../../../../scripts/babel-plugin-bit-decorator/types.d.ts\").BitDecorator;\n\nexport default class State {\n @bit.storage flags: number;\n\n @bit accessor strict = false;\n\n startIndex: number;\n curLine: number;\n lineStart: number;\n\n // And, if locations are used, the {line, column} object\n // corresponding to those offsets\n startLoc: Position;\n endLoc: Position;\n\n init({\n strictMode,\n sourceType,\n startIndex,\n startLine,\n startColumn,\n }: Options): void {\n this.strict =\n strictMode === false\n ? false\n : strictMode === true\n ? true\n : sourceType === \"module\";\n\n this.startIndex = startIndex;\n this.curLine = startLine;\n this.lineStart = -startColumn;\n this.startLoc = this.endLoc = new Position(\n startLine,\n startColumn,\n startIndex,\n );\n }\n\n errors: ParseError[] = [];\n\n // Used to signify the start of a potential arrow function\n potentialArrowAt: number = -1;\n\n // Used to signify the start of an expression which looks like a\n // typed arrow function, but it isn't\n // e.g. a ? (b) : c => d\n // ^\n noArrowAt: number[] = [];\n\n // Used to signify the start of an expression whose params, if it looks like\n // an arrow function, shouldn't be converted to assignable nodes.\n // This is used to defer the validation of typed arrow functions inside\n // conditional expressions.\n // e.g. a ? (b) : c => d\n // ^\n noArrowParamsConversionAt: number[] = [];\n\n // Flags to track\n @bit accessor maybeInArrowParameters = false;\n @bit accessor inType = false;\n @bit accessor noAnonFunctionType = false;\n @bit accessor hasFlowComment = false;\n @bit accessor isAmbientContext = false;\n @bit accessor inAbstractClass = false;\n @bit accessor inDisallowConditionalTypesContext = false;\n\n // For the Hack-style pipelines plugin\n topicContext: TopicContextState = {\n maxNumOfResolvableTopics: 0,\n maxTopicIndex: null,\n };\n\n // For the F#-style pipelines plugin\n @bit accessor soloAwait = false;\n @bit accessor inFSharpPipelineDirectBody = false;\n\n // Labels in scope.\n labels: Array<{\n kind: LoopLabelKind;\n name?: string | null;\n statementStart?: number;\n }> = [];\n\n commentsLen = 0;\n // Comment attachment store\n commentStack: Array = [];\n\n // The current position of the tokenizer in the input.\n pos: number = 0;\n\n // Properties of the current token:\n // Its type\n type: TokenType = tt.eof;\n\n // For tokens that include more information than their type, the value\n value: any = null;\n\n // Its start and end offset\n start: number = 0;\n end: number = 0;\n\n // Position information for the previous token\n // this is initialized when generating the second token.\n lastTokEndLoc: Position = null;\n // this is initialized when generating the second token.\n lastTokStartLoc: Position = null;\n\n // The context stack is used to track whether the apostrophe \"`\" starts\n // or ends a string template\n context: Array = [ct.brace];\n\n // Used to track whether a JSX element is allowed to form\n @bit accessor canStartJSXElement = true;\n\n // Used to signal to callers of `readWord1` whether the word\n // contained any escape sequences. This is needed because words with\n // escape sequences must not be interpreted as keywords.\n @bit accessor containsEsc = false;\n\n // Used to track invalid escape sequences in template literals,\n // that must be reported if the template is not tagged.\n firstInvalidTemplateEscapePos: null | Position = null;\n\n @bit accessor hasTopLevelAwait = false;\n\n // This property is used to track the following errors\n // - StrictNumericEscape\n // - StrictOctalLiteral\n //\n // in a literal that occurs prior to/immediately after a \"use strict\" directive.\n\n // todo(JLHwung): set strictErrors to null and avoid recording string errors\n // after a non-directive is parsed\n strictErrors: Map = new Map();\n\n // Tokens length in token store\n tokensLength: number = 0;\n\n /**\n * When we add a new property, we must manually update the `clone` method\n * @see State#clone\n */\n\n curPosition(): Position {\n return new Position(\n this.curLine,\n this.pos - this.lineStart,\n this.pos + this.startIndex,\n );\n }\n\n clone(): State {\n const state = new State();\n state.flags = this.flags;\n state.startIndex = this.startIndex;\n state.curLine = this.curLine;\n state.lineStart = this.lineStart;\n state.startLoc = this.startLoc;\n state.endLoc = this.endLoc;\n state.errors = this.errors.slice();\n state.potentialArrowAt = this.potentialArrowAt;\n state.noArrowAt = this.noArrowAt.slice();\n state.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice();\n state.topicContext = this.topicContext;\n state.labels = this.labels.slice();\n state.commentsLen = this.commentsLen;\n state.commentStack = this.commentStack.slice();\n state.pos = this.pos;\n state.type = this.type;\n state.value = this.value;\n state.start = this.start;\n state.end = this.end;\n state.lastTokEndLoc = this.lastTokEndLoc;\n state.lastTokStartLoc = this.lastTokStartLoc;\n state.context = this.context.slice();\n state.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos;\n state.strictErrors = this.strictErrors;\n state.tokensLength = this.tokensLength;\n\n return state;\n }\n}\n\nexport type LookaheadState = {\n pos: number;\n value: any;\n type: TokenType;\n start: number;\n end: number;\n context: TokContext[];\n startLoc: Position;\n lastTokEndLoc: Position;\n curLine: number;\n lineStart: number;\n curPosition: State[\"curPosition\"];\n /* Used only in readToken_mult_modulo */\n inType: boolean;\n // These boolean properties are not initialized in createLookaheadState()\n // instead they will only be set by the tokenizer\n containsEsc?: boolean;\n};\n","// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// The following character codes are forbidden from being\n// an immediate sibling of NumericLiteralSeparator _\nconst forbiddenNumericSeparatorSiblings = {\n decBinOct: new Set([\n charCodes.dot,\n charCodes.uppercaseB,\n charCodes.uppercaseE,\n charCodes.uppercaseO,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseB,\n charCodes.lowercaseE,\n charCodes.lowercaseO,\n ]),\n hex: new Set([\n charCodes.dot,\n charCodes.uppercaseX,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseX,\n ]),\n};\n\nconst isAllowedNumericSeparatorSibling = {\n // 0 - 1\n bin: (ch: number) => ch === charCodes.digit0 || ch === charCodes.digit1,\n\n // 0 - 7\n oct: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit7,\n\n // 0 - 9\n dec: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit9,\n\n // 0 - 9, A - F, a - f,\n hex: (ch: number) =>\n (ch >= charCodes.digit0 && ch <= charCodes.digit9) ||\n (ch >= charCodes.uppercaseA && ch <= charCodes.uppercaseF) ||\n (ch >= charCodes.lowercaseA && ch <= charCodes.lowercaseF),\n};\n\nexport type StringContentsErrorHandlers = EscapedCharErrorHandlers & {\n unterminated(\n initialPos: number,\n initialLineStart: number,\n initialCurLine: number,\n ): void;\n};\n\nexport function readStringContents(\n type: \"single\" | \"double\" | \"template\",\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n errors: StringContentsErrorHandlers,\n) {\n const initialPos = pos;\n const initialLineStart = lineStart;\n const initialCurLine = curLine;\n\n let out = \"\";\n let firstInvalidLoc = null;\n let chunkStart = pos;\n const { length } = input;\n for (;;) {\n if (pos >= length) {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n out += input.slice(chunkStart, pos);\n break;\n }\n const ch = input.charCodeAt(pos);\n if (isStringEnd(type, ch, input, pos)) {\n out += input.slice(chunkStart, pos);\n break;\n }\n if (ch === charCodes.backslash) {\n out += input.slice(chunkStart, pos);\n const res = readEscapedChar(\n input,\n pos,\n lineStart,\n curLine,\n type === \"template\",\n errors,\n );\n if (res.ch === null && !firstInvalidLoc) {\n firstInvalidLoc = { pos, lineStart, curLine };\n } else {\n out += res.ch;\n }\n ({ pos, lineStart, curLine } = res);\n chunkStart = pos;\n } else if (\n ch === charCodes.lineSeparator ||\n ch === charCodes.paragraphSeparator\n ) {\n ++pos;\n ++curLine;\n lineStart = pos;\n } else if (ch === charCodes.lineFeed || ch === charCodes.carriageReturn) {\n if (type === \"template\") {\n out += input.slice(chunkStart, pos) + \"\\n\";\n ++pos;\n if (\n ch === charCodes.carriageReturn &&\n input.charCodeAt(pos) === charCodes.lineFeed\n ) {\n ++pos;\n }\n ++curLine;\n chunkStart = lineStart = pos;\n } else {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n }\n } else {\n ++pos;\n }\n }\n return process.env.BABEL_8_BREAKING\n ? { pos, str: out, firstInvalidLoc, lineStart, curLine }\n : {\n pos,\n str: out,\n firstInvalidLoc,\n lineStart,\n curLine,\n containsInvalid: !!firstInvalidLoc,\n };\n}\n\nfunction isStringEnd(\n type: \"single\" | \"double\" | \"template\",\n ch: number,\n input: string,\n pos: number,\n) {\n if (type === \"template\") {\n return (\n ch === charCodes.graveAccent ||\n (ch === charCodes.dollarSign &&\n input.charCodeAt(pos + 1) === charCodes.leftCurlyBrace)\n );\n }\n return (\n ch === (type === \"double\" ? charCodes.quotationMark : charCodes.apostrophe)\n );\n}\n\ntype EscapedCharErrorHandlers = HexCharErrorHandlers &\n CodePointErrorHandlers & {\n strictNumericEscape(pos: number, lineStart: number, curLine: number): void;\n };\n\nfunction readEscapedChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n inTemplate: boolean,\n errors: EscapedCharErrorHandlers,\n) {\n const throwOnInvalid = !inTemplate;\n pos++; // skip '\\'\n\n const res = (ch: string | null) => ({ pos, ch, lineStart, curLine });\n\n const ch = input.charCodeAt(pos++);\n switch (ch) {\n case charCodes.lowercaseN:\n return res(\"\\n\");\n case charCodes.lowercaseR:\n return res(\"\\r\");\n case charCodes.lowercaseX: {\n let code;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 2,\n false,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCharCode(code));\n }\n case charCodes.lowercaseU: {\n let code;\n ({ code, pos } = readCodePoint(\n input,\n pos,\n lineStart,\n curLine,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCodePoint(code));\n }\n case charCodes.lowercaseT:\n return res(\"\\t\");\n case charCodes.lowercaseB:\n return res(\"\\b\");\n case charCodes.lowercaseV:\n return res(\"\\u000b\");\n case charCodes.lowercaseF:\n return res(\"\\f\");\n case charCodes.carriageReturn:\n if (input.charCodeAt(pos) === charCodes.lineFeed) {\n ++pos;\n }\n // fall through\n case charCodes.lineFeed:\n lineStart = pos;\n ++curLine;\n // fall through\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return res(\"\");\n case charCodes.digit8:\n case charCodes.digit9:\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(pos - 1, lineStart, curLine);\n }\n // fall through\n default:\n if (ch >= charCodes.digit0 && ch <= charCodes.digit7) {\n const startPos = pos - 1;\n const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2));\n\n let octalStr = match[0];\n\n let octal = parseInt(octalStr, 8);\n if (octal > 255) {\n octalStr = octalStr.slice(0, -1);\n octal = parseInt(octalStr, 8);\n }\n pos += octalStr.length - 1;\n const next = input.charCodeAt(pos);\n if (\n octalStr !== \"0\" ||\n next === charCodes.digit8 ||\n next === charCodes.digit9\n ) {\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(startPos, lineStart, curLine);\n }\n }\n\n return res(String.fromCharCode(octal));\n }\n\n return res(String.fromCharCode(ch));\n }\n}\n\ntype HexCharErrorHandlers = IntErrorHandlers & {\n invalidEscapeSequence(pos: number, lineStart: number, curLine: number): void;\n};\n\n// Used to read character escape sequences ('\\x', '\\u').\nfunction readHexChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n len: number,\n forceLen: boolean,\n throwOnInvalid: boolean,\n errors: HexCharErrorHandlers,\n) {\n const initialPos = pos;\n let n;\n ({ n, pos } = readInt(\n input,\n pos,\n lineStart,\n curLine,\n 16,\n len,\n forceLen,\n false,\n errors,\n /* bailOnError */ !throwOnInvalid,\n ));\n if (n === null) {\n if (throwOnInvalid) {\n errors.invalidEscapeSequence(initialPos, lineStart, curLine);\n } else {\n pos = initialPos - 1;\n }\n }\n return { code: n, pos };\n}\n\nexport type IntErrorHandlers = {\n numericSeparatorInEscapeSequence(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n unexpectedNumericSeparator(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n // It can return \"true\" to indicate that the error was handled\n // and the int parsing should continue.\n invalidDigit(\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n ): boolean;\n};\n\nexport function readInt(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n len: number | undefined,\n forceLen: boolean,\n allowNumSeparator: boolean | \"bail\",\n errors: IntErrorHandlers,\n bailOnError: boolean,\n) {\n const start = pos;\n const forbiddenSiblings =\n radix === 16\n ? forbiddenNumericSeparatorSiblings.hex\n : forbiddenNumericSeparatorSiblings.decBinOct;\n const isAllowedSibling =\n radix === 16\n ? isAllowedNumericSeparatorSibling.hex\n : radix === 10\n ? isAllowedNumericSeparatorSibling.dec\n : radix === 8\n ? isAllowedNumericSeparatorSibling.oct\n : isAllowedNumericSeparatorSibling.bin;\n\n let invalid = false;\n let total = 0;\n\n for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {\n const code = input.charCodeAt(pos);\n let val;\n\n if (code === charCodes.underscore && allowNumSeparator !== \"bail\") {\n const prev = input.charCodeAt(pos - 1);\n const next = input.charCodeAt(pos + 1);\n\n if (!allowNumSeparator) {\n if (bailOnError) return { n: null, pos };\n errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);\n } else if (\n Number.isNaN(next) ||\n !isAllowedSibling(next) ||\n forbiddenSiblings.has(prev) ||\n forbiddenSiblings.has(next)\n ) {\n if (bailOnError) return { n: null, pos };\n errors.unexpectedNumericSeparator(pos, lineStart, curLine);\n }\n\n // Ignore this _ character\n ++pos;\n continue;\n }\n\n if (code >= charCodes.lowercaseA) {\n val = code - charCodes.lowercaseA + charCodes.lineFeed;\n } else if (code >= charCodes.uppercaseA) {\n val = code - charCodes.uppercaseA + charCodes.lineFeed;\n } else if (charCodes.isDigit(code)) {\n val = code - charCodes.digit0; // 0-9\n } else {\n val = Infinity;\n }\n if (val >= radix) {\n // If we found a digit which is too big, errors.invalidDigit can return true to avoid\n // breaking the loop (this is used for error recovery).\n if (val <= 9 && bailOnError) {\n return { n: null, pos };\n } else if (\n val <= 9 &&\n errors.invalidDigit(pos, lineStart, curLine, radix)\n ) {\n val = 0;\n } else if (forceLen) {\n val = 0;\n invalid = true;\n } else {\n break;\n }\n }\n ++pos;\n total = total * radix + val;\n }\n if (pos === start || (len != null && pos - start !== len) || invalid) {\n return { n: null, pos };\n }\n\n return { n: total, pos };\n}\n\nexport type CodePointErrorHandlers = HexCharErrorHandlers & {\n invalidCodePoint(pos: number, lineStart: number, curLine: number): void;\n};\n\nexport function readCodePoint(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n throwOnInvalid: boolean,\n errors: CodePointErrorHandlers,\n) {\n const ch = input.charCodeAt(pos);\n let code;\n\n if (ch === charCodes.leftCurlyBrace) {\n ++pos;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n input.indexOf(\"}\", pos) - pos,\n true,\n throwOnInvalid,\n errors,\n ));\n ++pos;\n if (code !== null && code > 0x10ffff) {\n if (throwOnInvalid) {\n errors.invalidCodePoint(pos, lineStart, curLine);\n } else {\n return { code: null, pos };\n }\n }\n } else {\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 4,\n false,\n throwOnInvalid,\n errors,\n ));\n }\n return { code, pos };\n}\n","/*:: declare var invariant; */\n\nimport { OptionFlags, type Options } from \"../options.ts\";\nimport {\n Position,\n SourceLocation,\n createPositionWithColumnOffset,\n} from \"../util/location.ts\";\nimport CommentsParser, { type CommentWhitespace } from \"../parser/comments.ts\";\nimport type * as N from \"../types.ts\";\nimport * as charCodes from \"charcodes\";\nimport { isIdentifierStart, isIdentifierChar } from \"../util/identifier.ts\";\nimport {\n tokenIsKeyword,\n tokenLabelName,\n tt,\n keywords as keywordTypes,\n type TokenType,\n} from \"./types.ts\";\nimport type { TokContext } from \"./context.ts\";\nimport {\n Errors,\n type ParseError,\n type ParseErrorConstructor,\n} from \"../parse-error.ts\";\nimport {\n lineBreakG,\n isNewLine,\n isWhitespace,\n skipWhiteSpace,\n skipWhiteSpaceInLine,\n} from \"../util/whitespace.ts\";\nimport State from \"./state.ts\";\nimport type { LookaheadState, DeferredStrictError } from \"./state.ts\";\nimport type { Undone } from \"../parser/node.ts\";\nimport type { Node } from \"../types.ts\";\n\nimport {\n readInt,\n readCodePoint,\n readStringContents,\n type IntErrorHandlers,\n type CodePointErrorHandlers,\n type StringContentsErrorHandlers,\n} from \"@babel/helper-string-parser\";\n\nimport type { Plugin } from \"../typings.ts\";\n\nfunction buildPosition(pos: number, lineStart: number, curLine: number) {\n return new Position(curLine, pos - lineStart, pos);\n}\n\nconst VALID_REGEX_FLAGS = new Set([\n charCodes.lowercaseG,\n charCodes.lowercaseM,\n charCodes.lowercaseS,\n charCodes.lowercaseI,\n charCodes.lowercaseY,\n charCodes.lowercaseU,\n charCodes.lowercaseD,\n charCodes.lowercaseV,\n]);\n\n// Object type used to represent tokens. Note that normally, tokens\n// simply exist as properties on the parser object. This is only\n// used for the onToken callback and the external tokenizer.\n\nexport class Token {\n constructor(state: State) {\n const startIndex = state.startIndex || 0;\n this.type = state.type;\n this.value = state.value;\n this.start = startIndex + state.start;\n this.end = startIndex + state.end;\n this.loc = new SourceLocation(state.startLoc, state.endLoc);\n }\n\n declare type: TokenType;\n declare value: any;\n declare start: number;\n declare end: number;\n declare loc: SourceLocation;\n}\n\n// ## Tokenizer\n\nexport default abstract class Tokenizer extends CommentsParser {\n isLookahead: boolean;\n\n // Token store.\n tokens: Array = [];\n\n constructor(options: Options, input: string) {\n super();\n this.state = new State();\n this.state.init(options);\n this.input = input;\n this.length = input.length;\n this.comments = [];\n this.isLookahead = false;\n }\n\n pushToken(token: Token | N.Comment) {\n // Pop out invalid tokens trapped by try-catch parsing.\n // Those parsing branches are mainly created by typescript and flow plugins.\n this.tokens.length = this.state.tokensLength;\n this.tokens.push(token);\n ++this.state.tokensLength;\n }\n\n // Move to the next token\n\n next(): void {\n this.checkKeywordEscapes();\n if (this.optionFlags & OptionFlags.Tokens) {\n this.pushToken(new Token(this.state));\n }\n\n this.state.lastTokEndLoc = this.state.endLoc;\n this.state.lastTokStartLoc = this.state.startLoc;\n this.nextToken();\n }\n\n eat(type: TokenType): boolean {\n if (this.match(type)) {\n this.next();\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Whether current token matches given type\n */\n match(type: TokenType): boolean {\n return this.state.type === type;\n }\n\n /**\n * Create a LookaheadState from current parser state\n */\n createLookaheadState(state: State): LookaheadState {\n return {\n pos: state.pos,\n value: null,\n type: state.type,\n start: state.start,\n end: state.end,\n context: [this.curContext()],\n inType: state.inType,\n startLoc: state.startLoc,\n lastTokEndLoc: state.lastTokEndLoc,\n curLine: state.curLine,\n lineStart: state.lineStart,\n curPosition: state.curPosition,\n };\n }\n\n /**\n * lookahead peeks the next token, skipping changes to token context and\n * comment stack. For performance it returns a limited LookaheadState\n * instead of full parser state.\n *\n * The { column, line } Loc info is not included in lookahead since such usage\n * is rare. Although it may return other location properties e.g. `curLine` and\n * `lineStart`, these properties are not listed in the LookaheadState interface\n * and thus the returned value is _NOT_ reliable.\n *\n * The tokenizer should make best efforts to avoid using any parser state\n * other than those defined in LookaheadState\n */\n lookahead(): LookaheadState {\n const old = this.state;\n // @ts-expect-error For performance we use a simplified tokenizer state structure\n this.state = this.createLookaheadState(old);\n\n this.isLookahead = true;\n this.nextToken();\n this.isLookahead = false;\n\n const curr = this.state;\n this.state = old;\n return curr;\n }\n\n nextTokenStart(): number {\n return this.nextTokenStartSince(this.state.pos);\n }\n\n nextTokenStartSince(pos: number): number {\n skipWhiteSpace.lastIndex = pos;\n return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos;\n }\n\n lookaheadCharCode(): number {\n return this.input.charCodeAt(this.nextTokenStart());\n }\n\n /**\n * Similar to nextToken, but it will stop at line break when it is seen before the next token\n *\n * @returns {number} position of the next token start or line break, whichever is seen first.\n * @memberof Tokenizer\n */\n nextTokenInLineStart(): number {\n return this.nextTokenInLineStartSince(this.state.pos);\n }\n\n nextTokenInLineStartSince(pos: number): number {\n skipWhiteSpaceInLine.lastIndex = pos;\n return skipWhiteSpaceInLine.test(this.input)\n ? skipWhiteSpaceInLine.lastIndex\n : pos;\n }\n\n /**\n * Similar to lookaheadCharCode, but it will return the char code of line break if it is\n * seen before the next token\n *\n * @returns {number} char code of the next token start or line break, whichever is seen first.\n * @memberof Tokenizer\n */\n lookaheadInLineCharCode(): number {\n return this.input.charCodeAt(this.nextTokenInLineStart());\n }\n\n codePointAtPos(pos: number): number {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `input` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = this.input.charCodeAt(pos);\n if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) {\n const trail = this.input.charCodeAt(pos);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n return cp;\n }\n\n // Toggle strict mode. Re-reads the next number or string to please\n // pedantic tests (`\"use strict\"; 010;` should fail).\n\n setStrict(strict: boolean): void {\n this.state.strict = strict;\n if (strict) {\n // Throw an error for any string decimal escape found before/immediately\n // after a \"use strict\" directive. Strict mode will be set at parse\n // time for any literals that occur after the next node of the strict\n // directive.\n this.state.strictErrors.forEach(([toParseError, at]) =>\n this.raise(toParseError, at),\n );\n this.state.strictErrors.clear();\n }\n }\n\n curContext(): TokContext {\n return this.state.context[this.state.context.length - 1];\n }\n\n // Read a single token, updating the parser object's token-related properties.\n nextToken(): void {\n this.skipSpace();\n this.state.start = this.state.pos;\n if (!this.isLookahead) this.state.startLoc = this.state.curPosition();\n if (this.state.pos >= this.length) {\n this.finishToken(tt.eof);\n return;\n }\n\n this.getTokenFromCode(this.codePointAtPos(this.state.pos));\n }\n\n // Skips a block comment, whose end is marked by commentEnd.\n // *-/ is used by the Flow plugin, when parsing block comments nested\n // inside Flow comments.\n skipBlockComment(commentEnd: \"*/\" | \"*-/\"): N.CommentBlock | undefined {\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n const start = this.state.pos;\n const end = this.input.indexOf(commentEnd, start + 2);\n if (end === -1) {\n // We have to call this again here because startLoc may not be set...\n // This seems to be for performance reasons:\n // https://github.com/babel/babel/commit/acf2a10899f696a8aaf34df78bf9725b5ea7f2da\n throw this.raise(Errors.UnterminatedComment, this.state.curPosition());\n }\n\n this.state.pos = end + commentEnd.length;\n lineBreakG.lastIndex = start + 2;\n while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) {\n ++this.state.curLine;\n this.state.lineStart = lineBreakG.lastIndex;\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n /*:: invariant(startLoc) */\n\n const comment: N.CommentBlock = {\n type: \"CommentBlock\",\n value: this.input.slice(start + 2, end),\n start: this.sourceToOffsetPos(start),\n end: this.sourceToOffsetPos(end + commentEnd.length),\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.optionFlags & OptionFlags.Tokens) this.pushToken(comment);\n return comment;\n }\n\n skipLineComment(startSkip: number): N.CommentLine | undefined {\n const start = this.state.pos;\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n let ch = this.input.charCodeAt((this.state.pos += startSkip));\n if (this.state.pos < this.length) {\n while (!isNewLine(ch) && ++this.state.pos < this.length) {\n ch = this.input.charCodeAt(this.state.pos);\n }\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n\n const end = this.state.pos;\n const value = this.input.slice(start + startSkip, end);\n\n const comment: N.CommentLine = {\n type: \"CommentLine\",\n value,\n start: this.sourceToOffsetPos(start),\n end: this.sourceToOffsetPos(end),\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.optionFlags & OptionFlags.Tokens) this.pushToken(comment);\n return comment;\n }\n\n // Called at the start of the parse and after every token. Skips\n // whitespace and comments, and.\n\n skipSpace(): void {\n const spaceStart = this.state.pos;\n const comments: N.Comment[] =\n this.optionFlags & OptionFlags.AttachComment ? [] : null;\n loop: while (this.state.pos < this.length) {\n const ch = this.input.charCodeAt(this.state.pos);\n switch (ch) {\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.tab:\n ++this.state.pos;\n break;\n case charCodes.carriageReturn:\n if (\n this.input.charCodeAt(this.state.pos + 1) === charCodes.lineFeed\n ) {\n ++this.state.pos;\n }\n // fall through\n case charCodes.lineFeed:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n ++this.state.pos;\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n break;\n\n case charCodes.slash:\n switch (this.input.charCodeAt(this.state.pos + 1)) {\n case charCodes.asterisk: {\n const comment = this.skipBlockComment(\"*/\");\n if (comment !== undefined) {\n this.addComment(comment);\n comments?.push(comment);\n }\n break;\n }\n\n case charCodes.slash: {\n const comment = this.skipLineComment(2);\n if (comment !== undefined) {\n this.addComment(comment);\n comments?.push(comment);\n }\n break;\n }\n\n default:\n break loop;\n }\n break;\n\n default:\n if (isWhitespace(ch)) {\n ++this.state.pos;\n } else if (\n ch === charCodes.dash &&\n !this.inModule &&\n this.optionFlags & OptionFlags.AnnexB\n ) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.dash &&\n this.input.charCodeAt(pos + 2) === charCodes.greaterThan &&\n (spaceStart === 0 || this.state.lineStart > spaceStart)\n ) {\n // A `-->` line comment\n const comment = this.skipLineComment(3);\n if (comment !== undefined) {\n this.addComment(comment);\n comments?.push(comment);\n }\n } else {\n break loop;\n }\n } else if (\n ch === charCodes.lessThan &&\n !this.inModule &&\n this.optionFlags & OptionFlags.AnnexB\n ) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.exclamationMark &&\n this.input.charCodeAt(pos + 2) === charCodes.dash &&\n this.input.charCodeAt(pos + 3) === charCodes.dash\n ) {\n // `` - ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), - // `<\/script` - StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), - // ` this.emitCodePoint(cp, consumed) - ); - } - } - get inSFCRoot() { - return this.mode === 2 && this.stack.length === 0; - } - reset() { - this.state = 1; - this.mode = 0; - this.buffer = ""; - this.sectionStart = 0; - this.index = 0; - this.baseState = 1; - this.inRCDATA = false; - this.currentSequence = void 0; - this.newlines.length = 0; - this.delimiterOpen = defaultDelimitersOpen; - this.delimiterClose = defaultDelimitersClose; - } - /** - * Generate Position object with line / column information using recorded - * newline positions. We know the index is always going to be an already - * processed index, so all the newlines up to this index should have been - * recorded. - */ - getPos(index) { - let line = 1; - let column = index + 1; - for (let i = this.newlines.length - 1; i >= 0; i--) { - const newlineIndex = this.newlines[i]; - if (index > newlineIndex) { - line = i + 2; - column = index - newlineIndex; - break; - } - } - return { - column, - line, - offset: index - }; - } - peek() { - return this.buffer.charCodeAt(this.index + 1); - } - stateText(c) { - if (c === 60) { - if (this.index > this.sectionStart) { - this.cbs.ontext(this.sectionStart, this.index); - } - this.state = 5; - this.sectionStart = this.index; - } else if (c === 38) { - this.startEntity(); - } else if (!this.inVPre && c === this.delimiterOpen[0]) { - this.state = 2; - this.delimiterIndex = 0; - this.stateInterpolationOpen(c); - } - } - stateInterpolationOpen(c) { - if (c === this.delimiterOpen[this.delimiterIndex]) { - if (this.delimiterIndex === this.delimiterOpen.length - 1) { - const start = this.index + 1 - this.delimiterOpen.length; - if (start > this.sectionStart) { - this.cbs.ontext(this.sectionStart, start); - } - this.state = 3; - this.sectionStart = start; - } else { - this.delimiterIndex++; - } - } else if (this.inRCDATA) { - this.state = 32; - this.stateInRCDATA(c); - } else { - this.state = 1; - this.stateText(c); - } - } - stateInterpolation(c) { - if (c === this.delimiterClose[0]) { - this.state = 4; - this.delimiterIndex = 0; - this.stateInterpolationClose(c); - } - } - stateInterpolationClose(c) { - if (c === this.delimiterClose[this.delimiterIndex]) { - if (this.delimiterIndex === this.delimiterClose.length - 1) { - this.cbs.oninterpolation(this.sectionStart, this.index + 1); - if (this.inRCDATA) { - this.state = 32; - } else { - this.state = 1; - } - this.sectionStart = this.index + 1; - } else { - this.delimiterIndex++; - } - } else { - this.state = 3; - this.stateInterpolation(c); - } - } - stateSpecialStartSequence(c) { - const isEnd = this.sequenceIndex === this.currentSequence.length; - const isMatch = isEnd ? ( - // If we are at the end of the sequence, make sure the tag name has ended - isEndOfTagSection(c) - ) : ( - // Otherwise, do a case-insensitive comparison - (c | 32) === this.currentSequence[this.sequenceIndex] - ); - if (!isMatch) { - this.inRCDATA = false; - } else if (!isEnd) { - this.sequenceIndex++; - return; - } - this.sequenceIndex = 0; - this.state = 6; - this.stateInTagName(c); - } - /** Look for an end tag. For and <textarea>, also decode entities. */ - stateInRCDATA(c) { - if (this.sequenceIndex === this.currentSequence.length) { - if (c === 62 || isWhitespace(c)) { - const endOfText = this.index - this.currentSequence.length; - if (this.sectionStart < endOfText) { - const actualIndex = this.index; - this.index = endOfText; - this.cbs.ontext(this.sectionStart, endOfText); - this.index = actualIndex; - } - this.sectionStart = endOfText + 2; - this.stateInClosingTagName(c); - this.inRCDATA = false; - return; - } - this.sequenceIndex = 0; - } - if ((c | 32) === this.currentSequence[this.sequenceIndex]) { - this.sequenceIndex += 1; - } else if (this.sequenceIndex === 0) { - if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { - if (c === 38) { - this.startEntity(); - } else if (!this.inVPre && c === this.delimiterOpen[0]) { - this.state = 2; - this.delimiterIndex = 0; - this.stateInterpolationOpen(c); - } - } else if (this.fastForwardTo(60)) { - this.sequenceIndex = 1; - } - } else { - this.sequenceIndex = Number(c === 60); - } - } - stateCDATASequence(c) { - if (c === Sequences.Cdata[this.sequenceIndex]) { - if (++this.sequenceIndex === Sequences.Cdata.length) { - this.state = 28; - this.currentSequence = Sequences.CdataEnd; - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - } - } else { - this.sequenceIndex = 0; - this.state = 23; - this.stateInDeclaration(c); - } - } - /** - * When we wait for one specific character, we can speed things up - * by skipping through the buffer until we find it. - * - * @returns Whether the character was found. - */ - fastForwardTo(c) { - while (++this.index < this.buffer.length) { - const cc = this.buffer.charCodeAt(this.index); - if (cc === 10) { - this.newlines.push(this.index); - } - if (cc === c) { - return true; - } - } - this.index = this.buffer.length - 1; - return false; - } - /** - * Comments and CDATA end with `-->` and `]]>`. - * - * Their common qualities are: - * - Their end sequences have a distinct character they start with. - * - That character is then repeated, so we have to check multiple repeats. - * - All characters but the start character of the sequence can be skipped. - */ - stateInCommentLike(c) { - if (c === this.currentSequence[this.sequenceIndex]) { - if (++this.sequenceIndex === this.currentSequence.length) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, this.index - 2); - } else { - this.cbs.oncomment(this.sectionStart, this.index - 2); - } - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - this.state = 1; - } - } else if (this.sequenceIndex === 0) { - if (this.fastForwardTo(this.currentSequence[0])) { - this.sequenceIndex = 1; - } - } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { - this.sequenceIndex = 0; - } - } - startSpecial(sequence, offset) { - this.enterRCDATA(sequence, offset); - this.state = 31; - } - enterRCDATA(sequence, offset) { - this.inRCDATA = true; - this.currentSequence = sequence; - this.sequenceIndex = offset; - } - stateBeforeTagName(c) { - if (c === 33) { - this.state = 22; - this.sectionStart = this.index + 1; - } else if (c === 63) { - this.state = 24; - this.sectionStart = this.index + 1; - } else if (isTagStartChar(c)) { - this.sectionStart = this.index; - if (this.mode === 0) { - this.state = 6; - } else if (this.inSFCRoot) { - this.state = 34; - } else if (!this.inXML) { - if (c === 116) { - this.state = 30; - } else { - this.state = c === 115 ? 29 : 6; - } - } else { - this.state = 6; - } - } else if (c === 47) { - this.state = 8; - } else { - this.state = 1; - this.stateText(c); - } - } - stateInTagName(c) { - if (isEndOfTagSection(c)) { - this.handleTagName(c); - } - } - stateInSFCRootTagName(c) { - if (isEndOfTagSection(c)) { - const tag = this.buffer.slice(this.sectionStart, this.index); - if (tag !== "template") { - this.enterRCDATA(toCharCodes(`</` + tag), 0); - } - this.handleTagName(c); - } - } - handleTagName(c) { - this.cbs.onopentagname(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = 11; - this.stateBeforeAttrName(c); - } - stateBeforeClosingTagName(c) { - if (isWhitespace(c)) ; else if (c === 62) { - { - this.cbs.onerr(14, this.index); - } - this.state = 1; - this.sectionStart = this.index + 1; - } else { - this.state = isTagStartChar(c) ? 9 : 27; - this.sectionStart = this.index; - } - } - stateInClosingTagName(c) { - if (c === 62 || isWhitespace(c)) { - this.cbs.onclosetag(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = 10; - this.stateAfterClosingTagName(c); - } - } - stateAfterClosingTagName(c) { - if (c === 62) { - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeAttrName(c) { - if (c === 62) { - this.cbs.onopentagend(this.index); - if (this.inRCDATA) { - this.state = 32; - } else { - this.state = 1; - } - this.sectionStart = this.index + 1; - } else if (c === 47) { - this.state = 7; - if (this.peek() !== 62) { - this.cbs.onerr(22, this.index); - } - } else if (c === 60 && this.peek() === 47) { - this.cbs.onopentagend(this.index); - this.state = 5; - this.sectionStart = this.index; - } else if (!isWhitespace(c)) { - if (c === 61) { - this.cbs.onerr( - 19, - this.index - ); - } - this.handleAttrStart(c); - } - } - handleAttrStart(c) { - if (c === 118 && this.peek() === 45) { - this.state = 13; - this.sectionStart = this.index; - } else if (c === 46 || c === 58 || c === 64 || c === 35) { - this.cbs.ondirname(this.index, this.index + 1); - this.state = 14; - this.sectionStart = this.index + 1; - } else { - this.state = 12; - this.sectionStart = this.index; - } - } - stateInSelfClosingTag(c) { - if (c === 62) { - this.cbs.onselfclosingtag(this.index); - this.state = 1; - this.sectionStart = this.index + 1; - this.inRCDATA = false; - } else if (!isWhitespace(c)) { - this.state = 11; - this.stateBeforeAttrName(c); - } - } - stateInAttrName(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.onattribname(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 34 || c === 39 || c === 60) { - this.cbs.onerr( - 17, - this.index - ); - } - } - stateInDirName(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirname(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 58) { - this.cbs.ondirname(this.sectionStart, this.index); - this.state = 14; - this.sectionStart = this.index + 1; - } else if (c === 46) { - this.cbs.ondirname(this.sectionStart, this.index); - this.state = 16; - this.sectionStart = this.index + 1; - } - } - stateInDirArg(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirarg(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 91) { - this.state = 15; - } else if (c === 46) { - this.cbs.ondirarg(this.sectionStart, this.index); - this.state = 16; - this.sectionStart = this.index + 1; - } - } - stateInDynamicDirArg(c) { - if (c === 93) { - this.state = 14; - } else if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirarg(this.sectionStart, this.index + 1); - this.handleAttrNameEnd(c); - { - this.cbs.onerr( - 27, - this.index - ); - } - } - } - stateInDirModifier(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirmodifier(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 46) { - this.cbs.ondirmodifier(this.sectionStart, this.index); - this.sectionStart = this.index + 1; - } - } - handleAttrNameEnd(c) { - this.sectionStart = this.index; - this.state = 17; - this.cbs.onattribnameend(this.index); - this.stateAfterAttrName(c); - } - stateAfterAttrName(c) { - if (c === 61) { - this.state = 18; - } else if (c === 47 || c === 62) { - this.cbs.onattribend(0, this.sectionStart); - this.sectionStart = -1; - this.state = 11; - this.stateBeforeAttrName(c); - } else if (!isWhitespace(c)) { - this.cbs.onattribend(0, this.sectionStart); - this.handleAttrStart(c); - } - } - stateBeforeAttrValue(c) { - if (c === 34) { - this.state = 19; - this.sectionStart = this.index + 1; - } else if (c === 39) { - this.state = 20; - this.sectionStart = this.index + 1; - } else if (!isWhitespace(c)) { - this.sectionStart = this.index; - this.state = 21; - this.stateInAttrValueNoQuotes(c); - } - } - handleInAttrValue(c, quote) { - if (c === quote || false) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend( - quote === 34 ? 3 : 2, - this.index + 1 - ); - this.state = 11; - } else if (c === 38) { - this.startEntity(); - } - } - stateInAttrValueDoubleQuotes(c) { - this.handleInAttrValue(c, 34); - } - stateInAttrValueSingleQuotes(c) { - this.handleInAttrValue(c, 39); - } - stateInAttrValueNoQuotes(c) { - if (isWhitespace(c) || c === 62) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend(1, this.index); - this.state = 11; - this.stateBeforeAttrName(c); - } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { - this.cbs.onerr( - 18, - this.index - ); - } else if (c === 38) { - this.startEntity(); - } - } - stateBeforeDeclaration(c) { - if (c === 91) { - this.state = 26; - this.sequenceIndex = 0; - } else { - this.state = c === 45 ? 25 : 23; - } - } - stateInDeclaration(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateInProcessingInstruction(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.cbs.onprocessinginstruction(this.sectionStart, this.index); - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeComment(c) { - if (c === 45) { - this.state = 28; - this.currentSequence = Sequences.CommentEnd; - this.sequenceIndex = 2; - this.sectionStart = this.index + 1; - } else { - this.state = 23; - } - } - stateInSpecialComment(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.cbs.oncomment(this.sectionStart, this.index); - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeSpecialS(c) { - if (c === Sequences.ScriptEnd[3]) { - this.startSpecial(Sequences.ScriptEnd, 4); - } else if (c === Sequences.StyleEnd[3]) { - this.startSpecial(Sequences.StyleEnd, 4); - } else { - this.state = 6; - this.stateInTagName(c); - } - } - stateBeforeSpecialT(c) { - if (c === Sequences.TitleEnd[3]) { - this.startSpecial(Sequences.TitleEnd, 4); - } else if (c === Sequences.TextareaEnd[3]) { - this.startSpecial(Sequences.TextareaEnd, 4); - } else { - this.state = 6; - this.stateInTagName(c); - } - } - startEntity() { - { - this.baseState = this.state; - this.state = 33; - this.entityStart = this.index; - this.entityDecoder.startEntity( - this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute - ); - } - } - stateInEntity() { - { - const length = this.entityDecoder.write(this.buffer, this.index); - if (length >= 0) { - this.state = this.baseState; - if (length === 0) { - this.index = this.entityStart; - } - } else { - this.index = this.buffer.length - 1; - } - } - } - /** - * Iterates through the buffer, calling the function corresponding to the current state. - * - * States that are more likely to be hit are higher up, as a performance improvement. - */ - parse(input) { - this.buffer = input; - while (this.index < this.buffer.length) { - const c = this.buffer.charCodeAt(this.index); - if (c === 10) { - this.newlines.push(this.index); - } - switch (this.state) { - case 1: { - this.stateText(c); - break; - } - case 2: { - this.stateInterpolationOpen(c); - break; - } - case 3: { - this.stateInterpolation(c); - break; - } - case 4: { - this.stateInterpolationClose(c); - break; - } - case 31: { - this.stateSpecialStartSequence(c); - break; - } - case 32: { - this.stateInRCDATA(c); - break; - } - case 26: { - this.stateCDATASequence(c); - break; - } - case 19: { - this.stateInAttrValueDoubleQuotes(c); - break; - } - case 12: { - this.stateInAttrName(c); - break; - } - case 13: { - this.stateInDirName(c); - break; - } - case 14: { - this.stateInDirArg(c); - break; - } - case 15: { - this.stateInDynamicDirArg(c); - break; - } - case 16: { - this.stateInDirModifier(c); - break; - } - case 28: { - this.stateInCommentLike(c); - break; - } - case 27: { - this.stateInSpecialComment(c); - break; - } - case 11: { - this.stateBeforeAttrName(c); - break; - } - case 6: { - this.stateInTagName(c); - break; - } - case 34: { - this.stateInSFCRootTagName(c); - break; - } - case 9: { - this.stateInClosingTagName(c); - break; - } - case 5: { - this.stateBeforeTagName(c); - break; - } - case 17: { - this.stateAfterAttrName(c); - break; - } - case 20: { - this.stateInAttrValueSingleQuotes(c); - break; - } - case 18: { - this.stateBeforeAttrValue(c); - break; - } - case 8: { - this.stateBeforeClosingTagName(c); - break; - } - case 10: { - this.stateAfterClosingTagName(c); - break; - } - case 29: { - this.stateBeforeSpecialS(c); - break; - } - case 30: { - this.stateBeforeSpecialT(c); - break; - } - case 21: { - this.stateInAttrValueNoQuotes(c); - break; - } - case 7: { - this.stateInSelfClosingTag(c); - break; - } - case 23: { - this.stateInDeclaration(c); - break; - } - case 22: { - this.stateBeforeDeclaration(c); - break; - } - case 25: { - this.stateBeforeComment(c); - break; - } - case 24: { - this.stateInProcessingInstruction(c); - break; - } - case 33: { - this.stateInEntity(); - break; - } - } - this.index++; - } - this.cleanup(); - this.finish(); - } - /** - * Remove data that has already been consumed from the buffer. - */ - cleanup() { - if (this.sectionStart !== this.index) { - if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { - this.cbs.ontext(this.sectionStart, this.index); - this.sectionStart = this.index; - } else if (this.state === 19 || this.state === 20 || this.state === 21) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = this.index; - } - } - } - finish() { - if (this.state === 33) { - this.entityDecoder.end(); - this.state = this.baseState; - } - this.handleTrailingData(); - this.cbs.onend(); - } - /** Handle any trailing data. */ - handleTrailingData() { - const endIndex = this.buffer.length; - if (this.sectionStart >= endIndex) { - return; - } - if (this.state === 28) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, endIndex); - } else { - this.cbs.oncomment(this.sectionStart, endIndex); - } - } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { - this.cbs.ontext(this.sectionStart, endIndex); - } - } - emitCodePoint(cp, consumed) { - { - if (this.baseState !== 1 && this.baseState !== 32) { - if (this.sectionStart < this.entityStart) { - this.cbs.onattribdata(this.sectionStart, this.entityStart); - } - this.sectionStart = this.entityStart + consumed; - this.index = this.sectionStart - 1; - this.cbs.onattribentity( - decode_js.fromCodePoint(cp), - this.entityStart, - this.sectionStart - ); - } else { - if (this.sectionStart < this.entityStart) { - this.cbs.ontext(this.sectionStart, this.entityStart); - } - this.sectionStart = this.entityStart + consumed; - this.index = this.sectionStart - 1; - this.cbs.ontextentity( - decode_js.fromCodePoint(cp), - this.entityStart, - this.sectionStart - ); - } - } - } -} - -const CompilerDeprecationTypes = { - "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", - "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", - "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", - "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", - "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", - "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", - "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", - "COMPILER_FILTERS": "COMPILER_FILTERS" -}; -const deprecationData = { - ["COMPILER_IS_ON_ELEMENT"]: { - message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC"]: { - message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_OBJECT_ORDER"]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE"]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { - message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE"]: { - message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE"]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTERS"]: { - message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } -}; -function getCompatValue(key, { compatConfig }) { - const value = compatConfig && compatConfig[key]; - if (key === "MODE") { - return value || 3; - } else { - return value; - } -} -function isCompatEnabled(key, context) { - const mode = getCompatValue("MODE", context); - const value = getCompatValue(key, context); - return mode === 3 ? value === true : value !== false; -} -function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - if (enabled) { - warnDeprecation(key, context, loc, ...args); - } - return enabled; -} -function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === "suppress-warning") { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` - Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) err.loc = loc; - context.onWarn(err); -} - -function defaultOnError(error) { - throw error; -} -function defaultOnWarn(msg) { - console.warn(`[Vue warn] ${msg.message}`); -} -function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; -} -const ErrorCodes = { - "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, - "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", - "CDATA_IN_HTML_CONTENT": 1, - "1": "CDATA_IN_HTML_CONTENT", - "DUPLICATE_ATTRIBUTE": 2, - "2": "DUPLICATE_ATTRIBUTE", - "END_TAG_WITH_ATTRIBUTES": 3, - "3": "END_TAG_WITH_ATTRIBUTES", - "END_TAG_WITH_TRAILING_SOLIDUS": 4, - "4": "END_TAG_WITH_TRAILING_SOLIDUS", - "EOF_BEFORE_TAG_NAME": 5, - "5": "EOF_BEFORE_TAG_NAME", - "EOF_IN_CDATA": 6, - "6": "EOF_IN_CDATA", - "EOF_IN_COMMENT": 7, - "7": "EOF_IN_COMMENT", - "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, - "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", - "EOF_IN_TAG": 9, - "9": "EOF_IN_TAG", - "INCORRECTLY_CLOSED_COMMENT": 10, - "10": "INCORRECTLY_CLOSED_COMMENT", - "INCORRECTLY_OPENED_COMMENT": 11, - "11": "INCORRECTLY_OPENED_COMMENT", - "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, - "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", - "MISSING_ATTRIBUTE_VALUE": 13, - "13": "MISSING_ATTRIBUTE_VALUE", - "MISSING_END_TAG_NAME": 14, - "14": "MISSING_END_TAG_NAME", - "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, - "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", - "NESTED_COMMENT": 16, - "16": "NESTED_COMMENT", - "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, - "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", - "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, - "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", - "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, - "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", - "UNEXPECTED_NULL_CHARACTER": 20, - "20": "UNEXPECTED_NULL_CHARACTER", - "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, - "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", - "UNEXPECTED_SOLIDUS_IN_TAG": 22, - "22": "UNEXPECTED_SOLIDUS_IN_TAG", - "X_INVALID_END_TAG": 23, - "23": "X_INVALID_END_TAG", - "X_MISSING_END_TAG": 24, - "24": "X_MISSING_END_TAG", - "X_MISSING_INTERPOLATION_END": 25, - "25": "X_MISSING_INTERPOLATION_END", - "X_MISSING_DIRECTIVE_NAME": 26, - "26": "X_MISSING_DIRECTIVE_NAME", - "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, - "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", - "X_V_IF_NO_EXPRESSION": 28, - "28": "X_V_IF_NO_EXPRESSION", - "X_V_IF_SAME_KEY": 29, - "29": "X_V_IF_SAME_KEY", - "X_V_ELSE_NO_ADJACENT_IF": 30, - "30": "X_V_ELSE_NO_ADJACENT_IF", - "X_V_FOR_NO_EXPRESSION": 31, - "31": "X_V_FOR_NO_EXPRESSION", - "X_V_FOR_MALFORMED_EXPRESSION": 32, - "32": "X_V_FOR_MALFORMED_EXPRESSION", - "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, - "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", - "X_V_BIND_NO_EXPRESSION": 34, - "34": "X_V_BIND_NO_EXPRESSION", - "X_V_ON_NO_EXPRESSION": 35, - "35": "X_V_ON_NO_EXPRESSION", - "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, - "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", - "X_V_SLOT_MIXED_SLOT_USAGE": 37, - "37": "X_V_SLOT_MIXED_SLOT_USAGE", - "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, - "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", - "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, - "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", - "X_V_SLOT_MISPLACED": 40, - "40": "X_V_SLOT_MISPLACED", - "X_V_MODEL_NO_EXPRESSION": 41, - "41": "X_V_MODEL_NO_EXPRESSION", - "X_V_MODEL_MALFORMED_EXPRESSION": 42, - "42": "X_V_MODEL_MALFORMED_EXPRESSION", - "X_V_MODEL_ON_SCOPE_VARIABLE": 43, - "43": "X_V_MODEL_ON_SCOPE_VARIABLE", - "X_V_MODEL_ON_PROPS": 44, - "44": "X_V_MODEL_ON_PROPS", - "X_INVALID_EXPRESSION": 45, - "45": "X_INVALID_EXPRESSION", - "X_KEEP_ALIVE_INVALID_CHILDREN": 46, - "46": "X_KEEP_ALIVE_INVALID_CHILDREN", - "X_PREFIX_ID_NOT_SUPPORTED": 47, - "47": "X_PREFIX_ID_NOT_SUPPORTED", - "X_MODULE_MODE_NOT_SUPPORTED": 48, - "48": "X_MODULE_MODE_NOT_SUPPORTED", - "X_CACHE_HANDLER_NOT_SUPPORTED": 49, - "49": "X_CACHE_HANDLER_NOT_SUPPORTED", - "X_SCOPE_ID_NOT_SUPPORTED": 50, - "50": "X_SCOPE_ID_NOT_SUPPORTED", - "X_VNODE_HOOKS": 51, - "51": "X_VNODE_HOOKS", - "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52, - "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", - "__EXTEND_POINT__": 53, - "53": "__EXTEND_POINT__" -}; -const errorMessages = { - // parse errors - [0]: "Illegal comment.", - [1]: "CDATA section is allowed only in XML context.", - [2]: "Duplicate attribute.", - [3]: "End tag cannot have attributes.", - [4]: "Illegal '/' in tags.", - [5]: "Unexpected EOF in tag.", - [6]: "Unexpected EOF in CDATA section.", - [7]: "Unexpected EOF in comment.", - [8]: "Unexpected EOF in script.", - [9]: "Unexpected EOF in tag.", - [10]: "Incorrectly closed comment.", - [11]: "Incorrectly opened comment.", - [12]: "Illegal tag name. Use '<' to print '<'.", - [13]: "Attribute value was expected.", - [14]: "End tag name was expected.", - [15]: "Whitespace was expected.", - [16]: "Unexpected '<!--' in comment.", - [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, - [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", - [19]: "Attribute name cannot start with '='.", - [21]: "'<?' is allowed only in XML context.", - [20]: `Unexpected null character.`, - [22]: "Illegal '/' in tags.", - // Vue-specific parse errors - [23]: "Invalid end tag.", - [24]: "Element is missing end tag.", - [25]: "Interpolation end sign was not found.", - [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", - [26]: "Legal directive name was expected.", - // transform errors - [28]: `v-if/v-else-if is missing expression.`, - [29]: `v-if/else branches must use unique keys.`, - [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, - [31]: `v-for is missing expression.`, - [32]: `v-for has invalid expression.`, - [33]: `<template v-for> key should be placed on the <template> tag.`, - [34]: `v-bind is missing expression.`, - [52]: `v-bind with same-name shorthand only allows static argument.`, - [35]: `v-on is missing expression.`, - [36]: `Unexpected custom directive on <slot> outlet.`, - [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, - [38]: `Duplicate slot names found. `, - [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, - [40]: `v-slot can only be used on components or <template> tags.`, - [41]: `v-model is missing expression.`, - [42]: `v-model value must be a valid JavaScript member expression.`, - [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, - [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. -Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, - [45]: `Error parsing JavaScript expression: `, - [46]: `<KeepAlive> expects exactly one child component.`, - [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, - // generic errors - [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, - [48]: `ES module mode is not supported in this build of compiler.`, - [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, - [50]: `"scopeId" option is only supported in module mode.`, - // just to fulfill types - [53]: `` -}; - -function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { - const rootExp = root.type === "Program" ? root.body[0].type === "ExpressionStatement" && root.body[0].expression : root; - estreeWalker.walk(root, { - enter(node, parent) { - parent && parentStack.push(parent); - if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) { - return this.skip(); - } - if (node.type === "Identifier") { - const isLocal = !!knownIds[node.name]; - const isRefed = isReferencedIdentifier(node, parent, parentStack); - if (includeAll || isRefed && !isLocal) { - onIdentifier(node, parent, parentStack, isRefed, isLocal); - } - } else if (node.type === "ObjectProperty" && // eslint-disable-next-line no-restricted-syntax - (parent == null ? void 0 : parent.type) === "ObjectPattern") { - node.inPattern = true; - } else if (isFunctionType(node)) { - if (node.scopeIds) { - node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); - } else { - walkFunctionParams( - node, - (id) => markScopeIdentifier(node, id, knownIds) - ); - } - } else if (node.type === "BlockStatement") { - if (node.scopeIds) { - node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); - } else { - walkBlockDeclarations( - node, - (id) => markScopeIdentifier(node, id, knownIds) - ); - } - } else if (node.type === "CatchClause" && node.param) { - for (const id of extractIdentifiers(node.param)) { - markScopeIdentifier(node, id, knownIds); - } - } else if (isForStatement(node)) { - walkForStatement( - node, - false, - (id) => markScopeIdentifier(node, id, knownIds) - ); - } - }, - leave(node, parent) { - parent && parentStack.pop(); - if (node !== rootExp && node.scopeIds) { - for (const id of node.scopeIds) { - knownIds[id]--; - if (knownIds[id] === 0) { - delete knownIds[id]; - } - } - } - } - }); -} -function isReferencedIdentifier(id, parent, parentStack) { - if (!parent) { - return true; - } - if (id.name === "arguments") { - return false; - } - if (isReferenced(id, parent)) { - return true; - } - switch (parent.type) { - case "AssignmentExpression": - case "AssignmentPattern": - return true; - case "ObjectPattern": - case "ArrayPattern": - return isInDestructureAssignment(parent, parentStack); - } - return false; -} -function isInDestructureAssignment(parent, parentStack) { - if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === "AssignmentExpression") { - return true; - } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { - break; - } - } - } - return false; -} -function isInNewExpression(parentStack) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === "NewExpression") { - return true; - } else if (p.type !== "MemberExpression") { - break; - } - } - return false; -} -function walkFunctionParams(node, onIdent) { - for (const p of node.params) { - for (const id of extractIdentifiers(p)) { - onIdent(id); - } - } -} -function walkBlockDeclarations(block, onIdent) { - for (const stmt of block.body) { - if (stmt.type === "VariableDeclaration") { - if (stmt.declare) continue; - for (const decl of stmt.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { - if (stmt.declare || !stmt.id) continue; - onIdent(stmt.id); - } else if (isForStatement(stmt)) { - walkForStatement(stmt, true, onIdent); - } - } -} -function isForStatement(stmt) { - return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement"; -} -function walkForStatement(stmt, isVar, onIdent) { - const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; - if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) { - for (const decl of variable.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } -} -function extractIdentifiers(param, nodes = []) { - switch (param.type) { - case "Identifier": - nodes.push(param); - break; - case "MemberExpression": - let object = param; - while (object.type === "MemberExpression") { - object = object.object; - } - nodes.push(object); - break; - case "ObjectPattern": - for (const prop of param.properties) { - if (prop.type === "RestElement") { - extractIdentifiers(prop.argument, nodes); - } else { - extractIdentifiers(prop.value, nodes); - } - } - break; - case "ArrayPattern": - param.elements.forEach((element) => { - if (element) extractIdentifiers(element, nodes); - }); - break; - case "RestElement": - extractIdentifiers(param.argument, nodes); - break; - case "AssignmentPattern": - extractIdentifiers(param.left, nodes); - break; - } - return nodes; -} -function markKnownIds(name, knownIds) { - if (name in knownIds) { - knownIds[name]++; - } else { - knownIds[name] = 1; - } -} -function markScopeIdentifier(node, child, knownIds) { - const { name } = child; - if (node.scopeIds && node.scopeIds.has(name)) { - return; - } - markKnownIds(name, knownIds); - (node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name); -} -const isFunctionType = (node) => { - return /Function(?:Expression|Declaration)$|Method$/.test(node.type); -}; -const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; -const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; -function isReferenced(node, parent, grandparent) { - switch (parent.type) { - // yes: PARENT[NODE] - // yes: NODE.child - // no: parent.NODE - case "MemberExpression": - case "OptionalMemberExpression": - if (parent.property === node) { - return !!parent.computed; - } - return parent.object === node; - case "JSXMemberExpression": - return parent.object === node; - // no: let NODE = init; - // yes: let id = NODE; - case "VariableDeclarator": - return parent.init === node; - // yes: () => NODE - // no: (NODE) => {} - case "ArrowFunctionExpression": - return parent.body === node; - // no: class { #NODE; } - // no: class { get #NODE() {} } - // no: class { #NODE() {} } - // no: class { fn() { return this.#NODE; } } - case "PrivateName": - return false; - // no: class { NODE() {} } - // yes: class { [NODE]() {} } - // no: class { foo(NODE) {} } - case "ClassMethod": - case "ClassPrivateMethod": - case "ObjectMethod": - if (parent.key === node) { - return !!parent.computed; - } - return false; - // yes: { [NODE]: "" } - // no: { NODE: "" } - // depends: { NODE } - // depends: { key: NODE } - case "ObjectProperty": - if (parent.key === node) { - return !!parent.computed; - } - return !grandparent; - // no: class { NODE = value; } - // yes: class { [NODE] = value; } - // yes: class { key = NODE; } - case "ClassProperty": - if (parent.key === node) { - return !!parent.computed; - } - return true; - case "ClassPrivateProperty": - return parent.key !== node; - // no: class NODE {} - // yes: class Foo extends NODE {} - case "ClassDeclaration": - case "ClassExpression": - return parent.superClass === node; - // yes: left = NODE; - // no: NODE = right; - case "AssignmentExpression": - return parent.right === node; - // no: [NODE = foo] = []; - // yes: [foo = NODE] = []; - case "AssignmentPattern": - return parent.right === node; - // no: NODE: for (;;) {} - case "LabeledStatement": - return false; - // no: try {} catch (NODE) {} - case "CatchClause": - return false; - // no: function foo(...NODE) {} - case "RestElement": - return false; - case "BreakStatement": - case "ContinueStatement": - return false; - // no: function NODE() {} - // no: function foo(NODE) {} - case "FunctionDeclaration": - case "FunctionExpression": - return false; - // no: export NODE from "foo"; - // no: export * as NODE from "foo"; - case "ExportNamespaceSpecifier": - case "ExportDefaultSpecifier": - return false; - // no: export { foo as NODE }; - // yes: export { NODE as foo }; - // no: export { NODE as foo } from "foo"; - case "ExportSpecifier": - return parent.local === node; - // no: import NODE from "foo"; - // no: import * as NODE from "foo"; - // no: import { NODE as foo } from "foo"; - // no: import { foo as NODE } from "foo"; - // no: import NODE from "bar"; - case "ImportDefaultSpecifier": - case "ImportNamespaceSpecifier": - case "ImportSpecifier": - return false; - // no: import "foo" assert { NODE: "json" } - case "ImportAttribute": - return false; - // no: <div NODE="foo" /> - case "JSXAttribute": - return false; - // no: [NODE] = []; - // no: ({ NODE }) = []; - case "ObjectPattern": - case "ArrayPattern": - return false; - // no: new.NODE - // no: NODE.target - case "MetaProperty": - return false; - // yes: type X = { someProperty: NODE } - // no: type X = { NODE: OtherType } - case "ObjectTypeProperty": - return parent.key !== node; - // yes: enum X { Foo = NODE } - // no: enum X { NODE } - case "TSEnumMember": - return parent.id !== node; - // yes: { [NODE]: value } - // no: { NODE: value } - case "TSPropertySignature": - if (parent.key === node) { - return !!parent.computed; - } - return true; - } - return true; -} -const TS_NODE_TYPES = [ - "TSAsExpression", - // foo as number - "TSTypeAssertion", - // (<number>foo) - "TSNonNullExpression", - // foo! - "TSInstantiationExpression", - // foo<string> - "TSSatisfiesExpression" - // foo satisfies T -]; -function unwrapTSNode(node) { - if (TS_NODE_TYPES.includes(node.type)) { - return unwrapTSNode(node.expression); - } else { - return node; - } -} - -const isStaticExp = (p) => p.type === 4 && p.isStatic; -function isCoreComponent(tag) { - switch (tag) { - case "Teleport": - case "teleport": - return TELEPORT; - case "Suspense": - case "suspense": - return SUSPENSE; - case "KeepAlive": - case "keep-alive": - return KEEP_ALIVE; - case "BaseTransition": - case "base-transition": - return BASE_TRANSITION; - } -} -const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; -const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); -const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; -const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; -const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; -const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; -const isMemberExpressionBrowser = (exp) => { - const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === "[") { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } else if (char === "(") { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === "`") { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } else if (char === `[`) { - currentOpenBracketCount++; - } else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === "`") { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } else if (char === `(`) { - currentOpenParensCount++; - } else if (char === `)`) { - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; - } - } - return !currentOpenBracketCount && !currentOpenParensCount; -}; -const isMemberExpressionNode = (exp, context) => { - try { - let ret = exp.ast || parser.parseExpression(getExpSource(exp), { - plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] - }); - ret = unwrapTSNode(ret); - return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined"; - } catch (e) { - return false; - } -}; -const isMemberExpression = isMemberExpressionNode; -const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; -const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); -const isFnExpressionNode = (exp, context) => { - try { - let ret = exp.ast || parser.parseExpression(getExpSource(exp), { - plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] - }); - if (ret.type === "Program") { - ret = ret.body[0]; - if (ret.type === "ExpressionStatement") { - ret = ret.expression; - } - } - ret = unwrapTSNode(ret); - return ret.type === "FunctionExpression" || ret.type === "ArrowFunctionExpression"; - } catch (e) { - return false; - } -}; -const isFnExpression = isFnExpressionNode; -function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation( - { - offset: pos.offset, - line: pos.line, - column: pos.column - }, - source, - numberOfCharacters - ); -} -function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10) { - linesCount++; - lastNewLinePos = i; - } - } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; - return pos; -} -function assert(condition, msg) { - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } -} -function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && (allowEmpty || p.exp) && (shared.isString(name) ? p.name === name : name.test(p.name))) { - return p; - } - } -} -function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - if (dynamicOnly) continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { - return p; - } - } -} -function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); -} -function hasDynamicKeyVBind(node) { - return node.props.some( - (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" - p.arg.type !== 4 || // v-bind:[_ctx.foo] - !p.arg.isStatic) - // v-bind:[foo] - ); -} -function isText$1(node) { - return node.type === 5 || node.type === 2; -} -function isVSlot(p) { - return p.type === 7 && p.name === "slot"; -} -function isTemplateNode(node) { - return node.type === 1 && node.tagType === 3; -} -function isSlotOutlet(node) { - return node.type === 1 && node.tagType === 2; -} -const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); -function getUnnormalizedProps(props, callPath = []) { - if (props && !shared.isString(props) && props.type === 14) { - const callee = props.callee; - if (!shared.isString(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps( - props.arguments[0], - callPath.concat(props) - ); - } - } - return [props, callPath]; -} -function injectProp(node, prop, context) { - let propsWithInjection; - let props = node.type === 13 ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && !shared.isString(props) && props.type === 14) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || shared.isString(props)) { - propsWithInjection = createObjectExpression([prop]); - } else if (props.type === 14) { - const first = props.arguments[0]; - if (!shared.isString(first) && first.type === 15) { - if (!hasProp(prop, first)) { - first.properties.unshift(prop); - } - } else { - if (props.callee === TO_HANDLERS) { - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } else if (props.type === 15) { - if (!hasProp(prop, props)) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } else { - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } - } - if (node.type === 13) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } else { - node.props = propsWithInjection; - } - } else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } else { - node.arguments[2] = propsWithInjection; - } - } -} -function hasProp(prop, props) { - let result = false; - if (prop.key.type === 4) { - const propKeyName = prop.key.content; - result = props.properties.some( - (p) => p.key.type === 4 && p.key.content === propKeyName - ); - } - return result; -} -function toValidAssetId(name, type) { - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); - })}`; -} -function hasScopeRef(node, ids) { - if (!node || Object.keys(ids).length === 0) { - return false; - } - switch (node.type) { - case 1: - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { - return true; - } - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 11: - if (hasScopeRef(node.source, ids)) { - return true; - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 9: - return node.branches.some((b) => hasScopeRef(b, ids)); - case 10: - if (hasScopeRef(node.condition, ids)) { - return true; - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 4: - return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; - case 8: - return node.children.some((c) => shared.isObject(c) && hasScopeRef(c, ids)); - case 5: - case 12: - return hasScopeRef(node.content, ids); - case 2: - case 3: - case 20: - return false; - default: - return false; - } -} -function getMemoedVNodeCall(node) { - if (node.type === 14 && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } else { - return node; - } -} -const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; - -const defaultParserOptions = { - parseMode: "base", - ns: 0, - delimiters: [`{{`, `}}`], - getNamespace: () => 0, - isVoidTag: shared.NO, - isPreTag: shared.NO, - isIgnoreNewlineTag: shared.NO, - isCustomElement: shared.NO, - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: true, - prefixIdentifiers: false -}; -let currentOptions = defaultParserOptions; -let currentRoot = null; -let currentInput = ""; -let currentOpenTag = null; -let currentProp = null; -let currentAttrValue = ""; -let currentAttrStartIndex = -1; -let currentAttrEndIndex = -1; -let inPre = 0; -let inVPre = false; -let currentVPreBoundary = null; -const stack = []; -const tokenizer = new Tokenizer(stack, { - onerr: emitError, - ontext(start, end) { - onText(getSlice(start, end), start, end); - }, - ontextentity(char, start, end) { - onText(char, start, end); - }, - oninterpolation(start, end) { - if (inVPre) { - return onText(getSlice(start, end), start, end); - } - let innerStart = start + tokenizer.delimiterOpen.length; - let innerEnd = end - tokenizer.delimiterClose.length; - while (isWhitespace(currentInput.charCodeAt(innerStart))) { - innerStart++; - } - while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { - innerEnd--; - } - let exp = getSlice(innerStart, innerEnd); - if (exp.includes("&")) { - { - exp = decode_js.decodeHTML(exp); - } - } - addNode({ - type: 5, - content: createExp(exp, false, getLoc(innerStart, innerEnd)), - loc: getLoc(start, end) - }); - }, - onopentagname(start, end) { - const name = getSlice(start, end); - currentOpenTag = { - type: 1, - tag: name, - ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), - tagType: 0, - // will be refined on tag close - props: [], - children: [], - loc: getLoc(start - 1, end), - codegenNode: void 0 - }; - }, - onopentagend(end) { - endOpenTag(end); - }, - onclosetag(start, end) { - const name = getSlice(start, end); - if (!currentOptions.isVoidTag(name)) { - let found = false; - for (let i = 0; i < stack.length; i++) { - const e = stack[i]; - if (e.tag.toLowerCase() === name.toLowerCase()) { - found = true; - if (i > 0) { - emitError(24, stack[0].loc.start.offset); - } - for (let j = 0; j <= i; j++) { - const el = stack.shift(); - onCloseTag(el, end, j < i); - } - break; - } - } - if (!found) { - emitError(23, backTrack(start, 60)); - } - } - }, - onselfclosingtag(end) { - const name = currentOpenTag.tag; - currentOpenTag.isSelfClosing = true; - endOpenTag(end); - if (stack[0] && stack[0].tag === name) { - onCloseTag(stack.shift(), end); - } - }, - onattribname(start, end) { - currentProp = { - type: 6, - name: getSlice(start, end), - nameLoc: getLoc(start, end), - value: void 0, - loc: getLoc(start) - }; - }, - ondirname(start, end) { - const raw = getSlice(start, end); - const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); - if (!inVPre && name === "") { - emitError(26, start); - } - if (inVPre || name === "") { - currentProp = { - type: 6, - name: raw, - nameLoc: getLoc(start, end), - value: void 0, - loc: getLoc(start) - }; - } else { - currentProp = { - type: 7, - name, - rawName: raw, - exp: void 0, - arg: void 0, - modifiers: raw === "." ? [createSimpleExpression("prop")] : [], - loc: getLoc(start) - }; - if (name === "pre") { - inVPre = tokenizer.inVPre = true; - currentVPreBoundary = currentOpenTag; - const props = currentOpenTag.props; - for (let i = 0; i < props.length; i++) { - if (props[i].type === 7) { - props[i] = dirToAttr(props[i]); - } - } - } - } - }, - ondirarg(start, end) { - if (start === end) return; - const arg = getSlice(start, end); - if (inVPre) { - currentProp.name += arg; - setLocEnd(currentProp.nameLoc, end); - } else { - const isStatic = arg[0] !== `[`; - currentProp.arg = createExp( - isStatic ? arg : arg.slice(1, -1), - isStatic, - getLoc(start, end), - isStatic ? 3 : 0 - ); - } - }, - ondirmodifier(start, end) { - const mod = getSlice(start, end); - if (inVPre) { - currentProp.name += "." + mod; - setLocEnd(currentProp.nameLoc, end); - } else if (currentProp.name === "slot") { - const arg = currentProp.arg; - if (arg) { - arg.content += "." + mod; - setLocEnd(arg.loc, end); - } - } else { - const exp = createSimpleExpression(mod, true, getLoc(start, end)); - currentProp.modifiers.push(exp); - } - }, - onattribdata(start, end) { - currentAttrValue += getSlice(start, end); - if (currentAttrStartIndex < 0) currentAttrStartIndex = start; - currentAttrEndIndex = end; - }, - onattribentity(char, start, end) { - currentAttrValue += char; - if (currentAttrStartIndex < 0) currentAttrStartIndex = start; - currentAttrEndIndex = end; - }, - onattribnameend(end) { - const start = currentProp.loc.start.offset; - const name = getSlice(start, end); - if (currentProp.type === 7) { - currentProp.rawName = name; - } - if (currentOpenTag.props.some( - (p) => (p.type === 7 ? p.rawName : p.name) === name - )) { - emitError(2, start); - } - }, - onattribend(quote, end) { - if (currentOpenTag && currentProp) { - setLocEnd(currentProp.loc, end); - if (quote !== 0) { - if (currentProp.type === 6) { - if (currentProp.name === "class") { - currentAttrValue = condense(currentAttrValue).trim(); - } - if (quote === 1 && !currentAttrValue) { - emitError(13, end); - } - currentProp.value = { - type: 2, - content: currentAttrValue, - loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) - }; - if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { - tokenizer.enterRCDATA(toCharCodes(`</template`), 0); - } - } else { - let expParseMode = 0 /* Normal */; - { - if (currentProp.name === "for") { - expParseMode = 3 /* Skip */; - } else if (currentProp.name === "slot") { - expParseMode = 1 /* Params */; - } else if (currentProp.name === "on" && currentAttrValue.includes(";")) { - expParseMode = 2 /* Statements */; - } - } - currentProp.exp = createExp( - currentAttrValue, - false, - getLoc(currentAttrStartIndex, currentAttrEndIndex), - 0, - expParseMode - ); - if (currentProp.name === "for") { - currentProp.forParseResult = parseForExpression(currentProp.exp); - } - let syncIndex = -1; - if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.findIndex( - (mod) => mod.content === "sync" - )) > -1 && checkCompatEnabled( - "COMPILER_V_BIND_SYNC", - currentOptions, - currentProp.loc, - currentProp.rawName - )) { - currentProp.name = "model"; - currentProp.modifiers.splice(syncIndex, 1); - } - } - } - if (currentProp.type !== 7 || currentProp.name !== "pre") { - currentOpenTag.props.push(currentProp); - } - } - currentAttrValue = ""; - currentAttrStartIndex = currentAttrEndIndex = -1; - }, - oncomment(start, end) { - if (currentOptions.comments) { - addNode({ - type: 3, - content: getSlice(start, end), - loc: getLoc(start - 4, end + 3) - }); - } - }, - onend() { - const end = currentInput.length; - if (tokenizer.state !== 1) { - switch (tokenizer.state) { - case 5: - case 8: - emitError(5, end); - break; - case 3: - case 4: - emitError( - 25, - tokenizer.sectionStart - ); - break; - case 28: - if (tokenizer.currentSequence === Sequences.CdataEnd) { - emitError(6, end); - } else { - emitError(7, end); - } - break; - case 6: - case 7: - case 9: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - // " - case 20: - // ' - case 21: - emitError(9, end); - break; - } - } - for (let index = 0; index < stack.length; index++) { - onCloseTag(stack[index], end - 1); - emitError(24, stack[index].loc.start.offset); - } - }, - oncdata(start, end) { - if (stack[0].ns !== 0) { - onText(getSlice(start, end), start, end); - } else { - emitError(1, start - 9); - } - }, - onprocessinginstruction(start) { - if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { - emitError( - 21, - start - 1 - ); - } - } -}); -const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; -const stripParensRE = /^\(|\)$/g; -function parseForExpression(input) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) return; - const [, LHS, RHS] = inMatch; - const createAliasExpression = (content, offset, asParam = false) => { - const start = loc.start.offset + offset; - const end = start + content.length; - return createExp( - content, - false, - getLoc(start, end), - 0, - asParam ? 1 /* Params */ : 0 /* Normal */ - ); - }; - const result = { - source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: void 0, - key: void 0, - index: void 0, - finalized: false - }; - let valueContent = LHS.trim().replace(stripParensRE, "").trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, "").trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(keyContent, keyOffset, true); - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression( - indexContent, - exp.indexOf( - indexContent, - result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length - ), - true - ); - } - } - } - if (valueContent) { - result.value = createAliasExpression(valueContent, trimmedOffset, true); - } - return result; -} -function getSlice(start, end) { - return currentInput.slice(start, end); -} -function endOpenTag(end) { - if (tokenizer.inSFCRoot) { - currentOpenTag.innerLoc = getLoc(end + 1, end + 1); - } - addNode(currentOpenTag); - const { tag, ns } = currentOpenTag; - if (ns === 0 && currentOptions.isPreTag(tag)) { - inPre++; - } - if (currentOptions.isVoidTag(tag)) { - onCloseTag(currentOpenTag, end); - } else { - stack.unshift(currentOpenTag); - if (ns === 1 || ns === 2) { - tokenizer.inXML = true; - } - } - currentOpenTag = null; -} -function onText(content, start, end) { - const parent = stack[0] || currentRoot; - const lastNode = parent.children[parent.children.length - 1]; - if (lastNode && lastNode.type === 2) { - lastNode.content += content; - setLocEnd(lastNode.loc, end); - } else { - parent.children.push({ - type: 2, - content, - loc: getLoc(start, end) - }); - } -} -function onCloseTag(el, end, isImplied = false) { - if (isImplied) { - setLocEnd(el.loc, backTrack(end, 60)); - } else { - setLocEnd(el.loc, lookAhead(end, 62) + 1); - } - if (tokenizer.inSFCRoot) { - if (el.children.length) { - el.innerLoc.end = shared.extend({}, el.children[el.children.length - 1].loc.end); - } else { - el.innerLoc.end = shared.extend({}, el.innerLoc.start); - } - el.innerLoc.source = getSlice( - el.innerLoc.start.offset, - el.innerLoc.end.offset - ); - } - const { tag, ns, children } = el; - if (!inVPre) { - if (tag === "slot") { - el.tagType = 2; - } else if (isFragmentTemplate(el)) { - el.tagType = 3; - } else if (isComponent(el)) { - el.tagType = 1; - } - } - if (!tokenizer.inRCDATA) { - el.children = condenseWhitespace(children); - } - if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { - const first = children[0]; - if (first && first.type === 2) { - first.content = first.content.replace(/^\r?\n/, ""); - } - } - if (ns === 0 && currentOptions.isPreTag(tag)) { - inPre--; - } - if (currentVPreBoundary === el) { - inVPre = tokenizer.inVPre = false; - currentVPreBoundary = null; - } - if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { - tokenizer.inXML = false; - } - { - const props = el.props; - if (isCompatEnabled( - "COMPILER_V_IF_V_FOR_PRECEDENCE", - currentOptions - )) { - let hasIf = false; - let hasFor = false; - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 7) { - if (p.name === "if") { - hasIf = true; - } else if (p.name === "for") { - hasFor = true; - } - } - if (hasIf && hasFor) { - warnDeprecation( - "COMPILER_V_IF_V_FOR_PRECEDENCE", - currentOptions, - el.loc - ); - break; - } - } - } - if (!tokenizer.inSFCRoot && isCompatEnabled( - "COMPILER_NATIVE_TEMPLATE", - currentOptions - ) && el.tag === "template" && !isFragmentTemplate(el)) { - warnDeprecation( - "COMPILER_NATIVE_TEMPLATE", - currentOptions, - el.loc - ); - const parent = stack[0] || currentRoot; - const index = parent.children.indexOf(el); - parent.children.splice(index, 1, ...el.children); - } - const inlineTemplateProp = props.find( - (p) => p.type === 6 && p.name === "inline-template" - ); - if (inlineTemplateProp && checkCompatEnabled( - "COMPILER_INLINE_TEMPLATE", - currentOptions, - inlineTemplateProp.loc - ) && el.children.length) { - inlineTemplateProp.value = { - type: 2, - content: getSlice( - el.children[0].loc.start.offset, - el.children[el.children.length - 1].loc.end.offset - ), - loc: inlineTemplateProp.loc - }; - } - } -} -function lookAhead(index, c) { - let i = index; - while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; - return i; -} -function backTrack(index, c) { - let i = index; - while (currentInput.charCodeAt(i) !== c && i >= 0) i--; - return i; -} -const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); -function isFragmentTemplate({ tag, props }) { - if (tag === "template") { - for (let i = 0; i < props.length; i++) { - if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { - return true; - } - } - } - return false; -} -function isComponent({ tag, props }) { - if (currentOptions.isCustomElement(tag)) { - return false; - } - if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { - return true; - } - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6) { - if (p.name === "is" && p.value) { - if (p.value.content.startsWith("vue:")) { - return true; - } else if (checkCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - currentOptions, - p.loc - )) { - return true; - } - } - } else if (// :is on plain element - only treat as component in compat mode - p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - currentOptions, - p.loc - )) { - return true; - } - } - return false; -} -function isUpperCase(c) { - return c > 64 && c < 91; -} -const windowsNewlineRE = /\r\n/g; -function condenseWhitespace(nodes, tag) { - const shouldCondense = currentOptions.whitespace !== "preserve"; - let removedWhitespace = false; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (node.type === 2) { - if (!inPre) { - if (isAllWhitespace(node.content)) { - const prev = nodes[i - 1] && nodes[i - 1].type; - const next = nodes[i + 1] && nodes[i + 1].type; - if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { - removedWhitespace = true; - nodes[i] = null; - } else { - node.content = " "; - } - } else if (shouldCondense) { - node.content = condense(node.content); - } - } else { - node.content = node.content.replace(windowsNewlineRE, "\n"); - } - } - } - return removedWhitespace ? nodes.filter(Boolean) : nodes; -} -function isAllWhitespace(str) { - for (let i = 0; i < str.length; i++) { - if (!isWhitespace(str.charCodeAt(i))) { - return false; - } - } - return true; -} -function hasNewlineChar(str) { - for (let i = 0; i < str.length; i++) { - const c = str.charCodeAt(i); - if (c === 10 || c === 13) { - return true; - } - } - return false; -} -function condense(str) { - let ret = ""; - let prevCharIsWhitespace = false; - for (let i = 0; i < str.length; i++) { - if (isWhitespace(str.charCodeAt(i))) { - if (!prevCharIsWhitespace) { - ret += " "; - prevCharIsWhitespace = true; - } - } else { - ret += str[i]; - prevCharIsWhitespace = false; - } - } - return ret; -} -function addNode(node) { - (stack[0] || currentRoot).children.push(node); -} -function getLoc(start, end) { - return { - start: tokenizer.getPos(start), - // @ts-expect-error allow late attachment - end: end == null ? end : tokenizer.getPos(end), - // @ts-expect-error allow late attachment - source: end == null ? end : getSlice(start, end) - }; -} -function cloneLoc(loc) { - return getLoc(loc.start.offset, loc.end.offset); -} -function setLocEnd(loc, end) { - loc.end = tokenizer.getPos(end); - loc.source = getSlice(loc.start.offset, end); -} -function dirToAttr(dir) { - const attr = { - type: 6, - name: dir.rawName, - nameLoc: getLoc( - dir.loc.start.offset, - dir.loc.start.offset + dir.rawName.length - ), - value: void 0, - loc: dir.loc - }; - if (dir.exp) { - const loc = dir.exp.loc; - if (loc.end.offset < dir.loc.end.offset) { - loc.start.offset--; - loc.start.column--; - loc.end.offset++; - loc.end.column++; - } - attr.value = { - type: 2, - content: dir.exp.content, - loc - }; - } - return attr; -} -function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { - const exp = createSimpleExpression(content, isStatic, loc, constType); - if (!isStatic && currentOptions.prefixIdentifiers && parseMode !== 3 /* Skip */ && content.trim()) { - if (isSimpleIdentifier(content)) { - exp.ast = null; - return exp; - } - try { - const plugins = currentOptions.expressionPlugins; - const options = { - plugins: plugins ? [...plugins, "typescript"] : ["typescript"] - }; - if (parseMode === 2 /* Statements */) { - exp.ast = parser.parse(` ${content} `, options).program; - } else if (parseMode === 1 /* Params */) { - exp.ast = parser.parseExpression(`(${content})=>{}`, options); - } else { - exp.ast = parser.parseExpression(`(${content})`, options); - } - } catch (e) { - exp.ast = false; - emitError(45, loc.start.offset, e.message); - } - } - return exp; -} -function emitError(code, index, message) { - currentOptions.onError( - createCompilerError(code, getLoc(index, index), void 0, message) - ); -} -function reset() { - tokenizer.reset(); - currentOpenTag = null; - currentProp = null; - currentAttrValue = ""; - currentAttrStartIndex = -1; - currentAttrEndIndex = -1; - stack.length = 0; -} -function baseParse(input, options) { - reset(); - currentInput = input; - currentOptions = shared.extend({}, defaultParserOptions); - if (options) { - let key; - for (key in options) { - if (options[key] != null) { - currentOptions[key] = options[key]; - } - } - } - { - if (currentOptions.decodeEntities) { - console.warn( - `[@vue/compiler-core] decodeEntities option is passed but will be ignored in non-browser builds.` - ); - } - } - tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; - tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; - const delimiters = options && options.delimiters; - if (delimiters) { - tokenizer.delimiterOpen = toCharCodes(delimiters[0]); - tokenizer.delimiterClose = toCharCodes(delimiters[1]); - } - const root = currentRoot = createRoot([], input); - tokenizer.parse(currentInput); - root.loc = getLoc(0, input.length); - root.children = condenseWhitespace(root.children); - currentRoot = null; - return root; -} - -function cacheStatic(root, context) { - walk( - root, - void 0, - context, - // Root node is unfortunately non-hoistable due to potential parent - // fallthrough attributes. - isSingleElementRoot(root, root.children[0]) - ); -} -function isSingleElementRoot(root, child) { - const { children } = root; - return children.length === 1 && child.type === 1 && !isSlotOutlet(child); -} -function walk(node, parent, context, doNotHoistNode = false, inFor = false) { - const { children } = node; - const toCache = []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.type === 1 && child.tagType === 0) { - const constantType = doNotHoistNode ? 0 : getConstantType(child, context); - if (constantType > 0) { - if (constantType >= 2) { - child.codegenNode.patchFlag = -1; - toCache.push(child); - continue; - } - } else { - const codegenNode = child.codegenNode; - if (codegenNode.type === 13) { - const flag = codegenNode.patchFlag; - if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } - } else if (child.type === 12) { - const constantType = doNotHoistNode ? 0 : getConstantType(child, context); - if (constantType >= 2) { - toCache.push(child); - continue; - } - } - if (child.type === 1) { - const isComponent = child.tagType === 1; - if (isComponent) { - context.scopes.vSlot++; - } - walk(child, node, context, false, inFor); - if (isComponent) { - context.scopes.vSlot--; - } - } else if (child.type === 11) { - walk(child, node, context, child.children.length === 1, true); - } else if (child.type === 9) { - for (let i2 = 0; i2 < child.branches.length; i2++) { - walk( - child.branches[i2], - node, - context, - child.branches[i2].children.length === 1, - inFor - ); - } - } - } - let cachedAsArray = false; - if (toCache.length === children.length && node.type === 1) { - if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && shared.isArray(node.codegenNode.children)) { - node.codegenNode.children = getCacheExpression( - createArrayExpression(node.codegenNode.children) - ); - cachedAsArray = true; - } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !shared.isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) { - const slot = getSlotNode(node.codegenNode, "default"); - if (slot) { - slot.returns = getCacheExpression( - createArrayExpression(slot.returns) - ); - cachedAsArray = true; - } - } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !shared.isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { - const slotName = findDir(node, "slot", true); - const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); - if (slot) { - slot.returns = getCacheExpression( - createArrayExpression(slot.returns) - ); - cachedAsArray = true; - } - } - } - if (!cachedAsArray) { - for (const child of toCache) { - child.codegenNode = context.cache(child.codegenNode); - } - } - function getCacheExpression(value) { - const exp = context.cache(value); - if (inFor && context.hmr) { - exp.needArraySpread = true; - } - return exp; - } - function getSlotNode(node2, name) { - if (node2.children && !shared.isArray(node2.children) && node2.children.type === 15) { - const slot = node2.children.properties.find( - (p) => p.key === name || p.key.content === name - ); - return slot && slot.value; - } - } - if (toCache.length && context.transformHoist) { - context.transformHoist(children, context, node); - } -} -function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1: - if (node.tagType !== 0) { - return 0; - } - const cached = constantCache.get(node); - if (cached !== void 0) { - return cached; - } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13) { - return 0; - } - if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { - return 0; - } - if (codegenNode.patchFlag === void 0) { - let returnType2 = 3; - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0) { - constantCache.set(node, 0); - return 0; - } - if (generatedPropsType < returnType2) { - returnType2 = generatedPropsType; - } - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0) { - constantCache.set(node, 0); - return 0; - } - if (childType < returnType2) { - returnType2 = childType; - } - } - if (returnType2 > 1) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && p.name === "bind" && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0) { - constantCache.set(node, 0); - return 0; - } - if (expType < returnType2) { - returnType2 = expType; - } - } - } - } - if (codegenNode.isBlock) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7) { - constantCache.set(node, 0); - return 0; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper( - getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) - ); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType2); - return returnType2; - } else { - constantCache.set(node, 0); - return 0; - } - case 2: - case 3: - return 3; - case 9: - case 11: - case 10: - return 0; - case 5: - case 12: - return getConstantType(node.content, context); - case 4: - return node.constType; - case 8: - let returnType = 3; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (shared.isString(child) || shared.isSymbol(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0) { - return 0; - } else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - case 20: - return 2; - default: - return 0; - } -} -const allowHoistedHelperSet = /* @__PURE__ */ new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS -]); -function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 && !shared.isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4) { - return getConstantType(arg, context); - } else if (arg.type === 14) { - return getConstantTypeOfHelperCall(arg, context); - } - } - return 0; -} -function getGeneratedPropsConstantType(node, context) { - let returnType = 3; - const props = getNodeProps(node); - if (props && props.type === 15) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4) { - valueType = getConstantType(value, context); - } else if (value.type === 14) { - valueType = getConstantTypeOfHelperCall(value, context); - } else { - valueType = 0; - } - if (valueType === 0) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } - } - return returnType; -} -function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13) { - return codegenNode.props; - } -} - -function createTransformContext(root, { - filename = "", - prefixIdentifiers = false, - hoistStatic = false, - hmr = false, - cacheHandlers = false, - nodeTransforms = [], - directiveTransforms = {}, - transformHoist = null, - isBuiltInComponent = shared.NOOP, - isCustomElement = shared.NOOP, - expressionPlugins = [], - scopeId = null, - slotted = true, - ssr = false, - inSSR = false, - ssrCssVars = ``, - bindingMetadata = shared.EMPTY_OBJ, - inline = false, - isTS = false, - onError = defaultOnError, - onWarn = defaultOnWarn, - compatConfig -}) { - const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); - const context = { - // options - filename, - selfName: nameMatch && shared.capitalize(shared.camelize(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - hmr, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: /* @__PURE__ */ new Map(), - components: /* @__PURE__ */ new Set(), - directives: /* @__PURE__ */ new Set(), - hoists: [], - imports: [], - cached: [], - constantCache: /* @__PURE__ */ new WeakMap(), - temps: 0, - identifiers: /* @__PURE__ */ Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - grandParent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - { - if (!context.currentNode) { - throw new Error(`Node being replaced is already removed.`); - } - if (!context.parent) { - throw new Error(`Cannot replace root node.`); - } - } - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - if (!context.parent) { - throw new Error(`Cannot remove root node.`); - } - const list = context.parent.children; - const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; - if (removalIndex < 0) { - throw new Error(`node being removed is not a child of current parent`); - } - if (!node || node === context.currentNode) { - context.currentNode = null; - context.onNodeRemoved(); - } else { - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: shared.NOOP, - addIdentifiers(exp) { - { - if (shared.isString(exp)) { - addId(exp); - } else if (exp.identifiers) { - exp.identifiers.forEach(addId); - } else if (exp.type === 4) { - addId(exp.content); - } - } - }, - removeIdentifiers(exp) { - { - if (shared.isString(exp)) { - removeId(exp); - } else if (exp.identifiers) { - exp.identifiers.forEach(removeId); - } else if (exp.type === 4) { - removeId(exp.content); - } - } - }, - hoist(exp) { - if (shared.isString(exp)) exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression( - `_hoisted_${context.hoists.length}`, - false, - exp.loc, - 2 - ); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false, inVOnce = false) { - const cacheExp = createCacheExpression( - context.cached.length, - exp, - isVNode, - inVOnce - ); - context.cached.push(cacheExp); - return cacheExp; - } - }; - { - context.filters = /* @__PURE__ */ new Set(); - } - function addId(id) { - const { identifiers } = context; - if (identifiers[id] === void 0) { - identifiers[id] = 0; - } - identifiers[id]++; - } - function removeId(id) { - context.identifiers[id]--; - } - return context; -} -function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - cacheStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; - root.transformed = true; - { - root.filters = [...context.filters]; - } -} -function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - if (isSingleElementRoot(root, child) && child.codegenNode) { - const codegenNode = child.codegenNode; - if (codegenNode.type === 13) { - convertToBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } else { - root.codegenNode = child; - } - } else if (children.length > 1) { - let patchFlag = 64; - if (children.filter((c) => c.type !== 3).length === 1) { - patchFlag |= 2048; - } - root.codegenNode = createVNodeCall( - context, - helper(FRAGMENT), - void 0, - root.children, - patchFlag, - void 0, - void 0, - true, - void 0, - false - ); - } else ; -} -function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (shared.isString(child)) continue; - context.grandParent = context.parent; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } -} -function traverseNode(node, context) { - context.currentNode = node; - const { nodeTransforms } = context; - const exitFns = []; - for (let i2 = 0; i2 < nodeTransforms.length; i2++) { - const onExit = nodeTransforms[i2](node, context); - if (onExit) { - if (shared.isArray(onExit)) { - exitFns.push(...onExit); - } else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - return; - } else { - node = context.currentNode; - } - } - switch (node.type) { - case 3: - if (!context.ssr) { - context.helper(CREATE_COMMENT); - } - break; - case 5: - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9: - for (let i2 = 0; i2 < node.branches.length; i2++) { - traverseNode(node.branches[i2], context); - } - break; - case 10: - case 11: - case 1: - case 0: - traverseChildren(node, context); - break; - } - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); - } -} -function createStructuralDirectiveTransform(name, fn) { - const matches = shared.isString(name) ? (n) => n === name : (n) => name.test(n); - return (node, context) => { - if (node.type === 1) { - const { props } = node; - if (node.tagType === 3 && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 && matches(prop.name)) { - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) exitFns.push(onExit); - } - } - return exitFns; - } - }; -} - -const PURE_ANNOTATION = `/*@__PURE__*/`; -const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; -function createCodegenContext(ast, { - mode = "function", - prefixIdentifiers = mode === "module", - sourceMap = false, - filename = `template.vue.html`, - scopeId = null, - optimizeImports = false, - runtimeGlobalName = `Vue`, - runtimeModuleName = `vue`, - ssrRuntimeModuleName = "vue/server-renderer", - ssr = false, - isTS = false, - inSSR = false -}) { - const context = { - mode, - prefixIdentifiers, - sourceMap, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: void 0, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, newlineIndex = -2 /* None */, node) { - context.code += code; - if (context.map) { - if (node) { - let name; - if (node.type === 4 && !node.isStatic) { - const content = node.content.replace(/^_ctx\./, ""); - if (content !== node.content && isSimpleIdentifier(content)) { - name = content; - } - } - addMapping(node.loc.start, name); - } - if (newlineIndex === -3 /* Unknown */) { - advancePositionWithMutation(context, code); - } else { - context.offset += code.length; - if (newlineIndex === -2 /* None */) { - context.column += code.length; - } else { - if (newlineIndex === -1 /* End */) { - newlineIndex = code.length - 1; - } - context.line++; - context.column = code.length - newlineIndex; - } - } - if (node && node.loc !== locStub) { - addMapping(node.loc.end); - } - } - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); - } - }; - function newline(n) { - context.push("\n" + ` `.repeat(n), 0 /* Start */); - } - function addMapping(loc, name = null) { - const { _names, _mappings } = context.map; - if (name !== null && !_names.has(name)) _names.add(name); - _mappings.add({ - originalLine: loc.line, - originalColumn: loc.column - 1, - // source-map column is 0 based - generatedLine: context.line, - generatedColumn: context.column - 1, - source: filename, - name - }); - } - if (sourceMap) { - context.map = new sourceMapJs.SourceMapGenerator(); - context.map.setSourceContent(filename, context.source); - context.map._sources.add(filename); - } - return context; -} -function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) options.onContextCreated(context); - const { - mode, - push, - prefixIdentifiers, - indent, - deindent, - newline, - scopeId, - ssr - } = context; - const helpers = Array.from(ast.helpers); - const hasHelpers = helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== "module"; - const genScopeId = scopeId != null && mode === "module"; - const isSetupInlined = !!options.inline; - const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; - if (mode === "module") { - genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined); - } else { - genFunctionPreamble(ast, preambleContext); - } - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; - if (options.bindingMetadata && !options.inline) { - args.push("$props", "$setup", "$data", "$options"); - } - const signature = options.isTS ? args.map((arg) => `${arg}: any`).join(",") : args.join(", "); - if (isSetupInlined) { - push(`(${signature}) => {`); - } else { - push(`function ${functionName}(${signature}) {`); - } - indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - if (hasHelpers) { - push( - `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue -`, - -1 /* End */ - ); - newline(); - } - } - if (ast.components.length) { - genAssets(ast.components, "component", context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, "directive", context); - if (ast.temps > 0) { - newline(); - } - } - if (ast.filters && ast.filters.length) { - newline(); - genAssets(ast.filters, "filter", context); - newline(); - } - if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } - } - if (ast.components.length || ast.directives.length || ast.temps) { - push(` -`, 0 /* Start */); - newline(); - } - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); - } - deindent(); - push(`}`); - return { - ast, - code: context.code, - preamble: isSetupInlined ? preambleContext.code : ``, - map: context.map ? context.map.toJSON() : void 0 - }; -} -function genFunctionPreamble(ast, context) { - const { - ssr, - prefixIdentifiers, - push, - newline, - runtimeModuleName, - runtimeGlobalName, - ssrRuntimeModuleName - } = context; - const VueBinding = ssr ? `require(${JSON.stringify(runtimeModuleName)})` : runtimeGlobalName; - const helpers = Array.from(ast.helpers); - if (helpers.length > 0) { - if (prefixIdentifiers) { - push( - `const { ${helpers.map(aliasHelper).join(", ")} } = ${VueBinding} -`, - -1 /* End */ - ); - } else { - push(`const _Vue = ${VueBinding} -`, -1 /* End */); - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); - push(`const { ${staticHelpers} } = _Vue -`, -1 /* End */); - } - } - } - if (ast.ssrHelpers && ast.ssrHelpers.length) { - push( - `const { ${ast.ssrHelpers.map(aliasHelper).join(", ")} } = require("${ssrRuntimeModuleName}") -`, - -1 /* End */ - ); - } - genHoists(ast.hoists, context); - newline(); - push(`return `); -} -function genModulePreamble(ast, context, genScopeId, inline) { - const { - push, - newline, - optimizeImports, - runtimeModuleName, - ssrRuntimeModuleName - } = context; - if (ast.helpers.size) { - const helpers = Array.from(ast.helpers); - if (optimizeImports) { - push( - `import { ${helpers.map((s) => helperNameMap[s]).join(", ")} } from ${JSON.stringify(runtimeModuleName)} -`, - -1 /* End */ - ); - push( - ` -// Binding optimization for webpack code-split -const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(", ")} -`, - -1 /* End */ - ); - } else { - push( - `import { ${helpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from ${JSON.stringify(runtimeModuleName)} -`, - -1 /* End */ - ); - } - } - if (ast.ssrHelpers && ast.ssrHelpers.length) { - push( - `import { ${ast.ssrHelpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from "${ssrRuntimeModuleName}" -`, - -1 /* End */ - ); - } - if (ast.imports.length) { - genImports(ast.imports, context); - newline(); - } - genHoists(ast.hoists, context); - newline(); - if (!inline) { - push(`export `); - } -} -function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper( - type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE - ); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - const maybeSelfReference = id.endsWith("__self"); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push( - `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` - ); - if (i < assets.length - 1) { - newline(); - } - } -} -function genHoists(hoists, context) { - if (!hoists.length) { - return; - } - context.pure = true; - const { push, newline } = context; - newline(); - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - push(`const _hoisted_${i + 1} = `); - genNode(exp, context); - newline(); - } - } - context.pure = false; -} -function genImports(importsOptions, context) { - if (!importsOptions.length) { - return; - } - importsOptions.forEach((imports) => { - context.push(`import `); - genNode(imports.exp, context); - context.push(` from '${imports.path}'`); - context.newline(); - }); -} -function isText(n) { - return shared.isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; -} -function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || nodes.some((n) => shared.isArray(n) || !isText(n)); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); -} -function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (shared.isString(node)) { - push(node, -3 /* Unknown */); - } else if (shared.isArray(node)) { - genNodeListAsArray(node, context); - } else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(","); - newline(); - } else { - comma && push(", "); - } - } - } -} -function genNode(node, context) { - if (shared.isString(node)) { - context.push(node, -3 /* Unknown */); - return; - } - if (shared.isSymbol(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1: - case 9: - case 11: - assert( - node.codegenNode != null, - `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` - ); - genNode(node.codegenNode, context); - break; - case 2: - genText(node, context); - break; - case 4: - genExpression(node, context); - break; - case 5: - genInterpolation(node, context); - break; - case 12: - genNode(node.codegenNode, context); - break; - case 8: - genCompoundExpression(node, context); - break; - case 3: - genComment(node, context); - break; - case 13: - genVNodeCall(node, context); - break; - case 14: - genCallExpression(node, context); - break; - case 15: - genObjectExpression(node, context); - break; - case 17: - genArrayExpression(node, context); - break; - case 18: - genFunctionExpression(node, context); - break; - case 19: - genConditionalExpression(node, context); - break; - case 20: - genCacheExpression(node, context); - break; - case 21: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22: - genTemplateLiteral(node, context); - break; - case 23: - genIfStatement(node, context); - break; - case 24: - genAssignmentExpression(node, context); - break; - case 25: - genSequenceExpression(node, context); - break; - case 26: - genReturnStatement(node, context); - break; - /* v8 ignore start */ - case 10: - break; - default: - { - assert(false, `unhandled codegen node type: ${node.type}`); - const exhaustiveCheck = node; - return exhaustiveCheck; - } - } -} -function genText(node, context) { - context.push(JSON.stringify(node.content), -3 /* Unknown */, node); -} -function genExpression(node, context) { - const { content, isStatic } = node; - context.push( - isStatic ? JSON.stringify(content) : content, - -3 /* Unknown */, - node - ); -} -function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); -} -function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (shared.isString(child)) { - context.push(child, -3 /* Unknown */); - } else { - genNode(child, context); - } - } -} -function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } else if (node.isStatic) { - const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); - push(text, -2 /* None */, node); - } else { - push(`[${node.content}]`, -3 /* Unknown */, node); - } -} -function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push( - `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, - -3 /* Unknown */, - node - ); -} -function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent - } = node; - let patchFlagString; - if (patchFlag) { - { - if (patchFlag < 0) { - patchFlagString = patchFlag + ` /* ${shared.PatchFlagNames[patchFlag]} */`; - } else { - const flagNames = Object.keys(shared.PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => shared.PatchFlagNames[n]).join(`, `); - patchFlagString = patchFlag + ` /* ${flagNames} */`; - } - } - } - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, -2 /* None */, node); - genNodeList( - genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), - context - ); - push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } -} -function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) break; - } - return args.slice(0, i + 1).map((arg) => arg || `null`); -} -function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = shared.isString(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, -2 /* None */, node); - genNodeList(node.arguments, context); - push(`)`); -} -function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, -2 /* None */, node); - return; - } - const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - genExpressionAsPropertyKey(key, context); - push(`: `); - genNode(value, context); - if (i < properties.length - 1) { - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); -} -function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); -} -function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - push(`_${helperNameMap[WITH_CTX]}(`); - } - push(`(`, -2 /* None */, node); - if (shared.isArray(params)) { - genNodeList(params, context); - } else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (shared.isArray(returns)) { - genNodeListAsArray(returns, context); - } else { - genNode(returns, context); - } - } else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - if (node.isNonScopedSlot) { - push(`, undefined, true`); - } - push(`)`); - } -} -function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); - context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); - context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent( - true - /* without newline */ - ); -} -function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - const { needPauseTracking, needArraySpread } = node; - if (needArraySpread) { - push(`[...(`); - } - push(`_cache[${node.index}] || (`); - if (needPauseTracking) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1`); - if (node.inVOnce) push(`, true`); - push(`),`); - newline(); - push(`(`); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (needPauseTracking) { - push(`).cacheIndex = ${node.index},`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); - } - push(`)`); - if (needArraySpread) { - push(`)]`); - } -} -function genTemplateLiteral(node, context) { - const { push, indent, deindent } = context; - push("`"); - const l = node.elements.length; - const multilines = l > 3; - for (let i = 0; i < l; i++) { - const e = node.elements[i]; - if (shared.isString(e)) { - push(e.replace(/(`|\$|\\)/g, "\\$1"), -3 /* Unknown */); - } else { - push("${"); - if (multilines) indent(); - genNode(e, context); - if (multilines) deindent(); - push("}"); - } - } - push("`"); -} -function genIfStatement(node, context) { - const { push, indent, deindent } = context; - const { test, consequent, alternate } = node; - push(`if (`); - genNode(test, context); - push(`) {`); - indent(); - genNode(consequent, context); - deindent(); - push(`}`); - if (alternate) { - push(` else `); - if (alternate.type === 23) { - genIfStatement(alternate, context); - } else { - push(`{`); - indent(); - genNode(alternate, context); - deindent(); - push(`}`); - } - } -} -function genAssignmentExpression(node, context) { - genNode(node.left, context); - context.push(` = `); - genNode(node.right, context); -} -function genSequenceExpression(node, context) { - context.push(`(`); - genNodeList(node.expressions, context); - context.push(`)`); -} -function genReturnStatement({ returns }, context) { - context.push(`return `); - if (shared.isArray(returns)) { - genNodeListAsArray(returns, context); - } else { - genNode(returns, context); - } -} - -const isLiteralWhitelisted = /* @__PURE__ */ shared.makeMap("true,false,null,this"); -const transformExpression = (node, context) => { - if (node.type === 5) { - node.content = processExpression( - node.content, - context - ); - } else if (node.type === 1) { - const memo = findDir(node, "memo"); - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - if (dir.type === 7 && dir.name !== "for") { - const exp = dir.exp; - const arg = dir.arg; - if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) - !(memo && arg && arg.type === 4 && arg.content === "key")) { - dir.exp = processExpression( - exp, - context, - // slot args must be processed as function params - dir.name === "slot" - ); - } - if (arg && arg.type === 4 && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } - } - } -}; -function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { - if (!context.prefixIdentifiers || !node.content.trim()) { - return node; - } - const { inline, bindingMetadata } = context; - const rewriteIdentifier = (raw, parent, id) => { - const type = shared.hasOwn(bindingMetadata, raw) && bindingMetadata[raw]; - if (inline) { - const isAssignmentLVal = parent && parent.type === "AssignmentExpression" && parent.left === id; - const isUpdateArg = parent && parent.type === "UpdateExpression" && parent.argument === id; - const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack); - const isNewExpression = parent && isInNewExpression(parentStack); - const wrapWithUnref = (raw2) => { - const wrapped = `${context.helperString(UNREF)}(${raw2})`; - return isNewExpression ? `(${wrapped})` : wrapped; - }; - if (isConst(type) || type === "setup-reactive-const" || localVars[raw]) { - return raw; - } else if (type === "setup-ref") { - return `${raw}.value`; - } else if (type === "setup-maybe-ref") { - return isAssignmentLVal || isUpdateArg || isDestructureAssignment ? `${raw}.value` : wrapWithUnref(raw); - } else if (type === "setup-let") { - if (isAssignmentLVal) { - const { right: rVal, operator } = parent; - const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1); - const rExpString = stringifyExpression( - processExpression( - createSimpleExpression(rExp, false), - context, - false, - false, - knownIds - ) - ); - return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore -` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`; - } else if (isUpdateArg) { - id.start = parent.start; - id.end = parent.end; - const { prefix: isPrefix, operator } = parent; - const prefix = isPrefix ? operator : ``; - const postfix = isPrefix ? `` : operator; - return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore -` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`; - } else if (isDestructureAssignment) { - return raw; - } else { - return wrapWithUnref(raw); - } - } else if (type === "props") { - return shared.genPropsAccessExp(raw); - } else if (type === "props-aliased") { - return shared.genPropsAccessExp(bindingMetadata.__propsAliases[raw]); - } - } else { - if (type && type.startsWith("setup") || type === "literal-const") { - return `$setup.${raw}`; - } else if (type === "props-aliased") { - return `$props['${bindingMetadata.__propsAliases[raw]}']`; - } else if (type) { - return `$${type}.${raw}`; - } - } - return `_ctx.${raw}`; - }; - const rawExp = node.content; - let ast = node.ast; - if (ast === false) { - return node; - } - if (ast === null || !ast && isSimpleIdentifier(rawExp)) { - const isScopeVarReference = context.identifiers[rawExp]; - const isAllowedGlobal = shared.isGloballyAllowed(rawExp); - const isLiteral = isLiteralWhitelisted(rawExp); - if (!asParams && !isScopeVarReference && !isLiteral && (!isAllowedGlobal || bindingMetadata[rawExp])) { - if (isConst(bindingMetadata[rawExp])) { - node.constType = 1; - } - node.content = rewriteIdentifier(rawExp); - } else if (!isScopeVarReference) { - if (isLiteral) { - node.constType = 3; - } else { - node.constType = 2; - } - } - return node; - } - if (!ast) { - const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`; - try { - ast = parser.parseExpression(source, { - sourceType: "module", - plugins: context.expressionPlugins - }); - } catch (e) { - context.onError( - createCompilerError( - 45, - node.loc, - void 0, - e.message - ) - ); - return node; - } - } - const ids = []; - const parentStack = []; - const knownIds = Object.create(context.identifiers); - walkIdentifiers( - ast, - (node2, parent, _, isReferenced, isLocal) => { - if (isStaticPropertyKey(node2, parent)) { - return; - } - if (node2.name.startsWith("_filter_")) { - return; - } - const needPrefix = isReferenced && canPrefix(node2); - if (needPrefix && !isLocal) { - if (isStaticProperty(parent) && parent.shorthand) { - node2.prefix = `${node2.name}: `; - } - node2.name = rewriteIdentifier(node2.name, parent, node2); - ids.push(node2); - } else { - if (!(needPrefix && isLocal) && (!parent || parent.type !== "CallExpression" && parent.type !== "NewExpression" && parent.type !== "MemberExpression")) { - node2.isConstant = true; - } - ids.push(node2); - } - }, - true, - // invoke on ALL identifiers - parentStack, - knownIds - ); - const children = []; - ids.sort((a, b) => a.start - b.start); - ids.forEach((id, i) => { - const start = id.start - 1; - const end = id.end - 1; - const last = ids[i - 1]; - const leadingText = rawExp.slice(last ? last.end - 1 : 0, start); - if (leadingText.length || id.prefix) { - children.push(leadingText + (id.prefix || ``)); - } - const source = rawExp.slice(start, end); - children.push( - createSimpleExpression( - id.name, - false, - { - start: advancePositionWithClone(node.loc.start, source, start), - end: advancePositionWithClone(node.loc.start, source, end), - source - }, - id.isConstant ? 3 : 0 - ) - ); - if (i === ids.length - 1 && end < rawExp.length) { - children.push(rawExp.slice(end)); - } - }); - let ret; - if (children.length) { - ret = createCompoundExpression(children, node.loc); - ret.ast = ast; - } else { - ret = node; - ret.constType = 3; - } - ret.identifiers = Object.keys(knownIds); - return ret; -} -function canPrefix(id) { - if (shared.isGloballyAllowed(id.name)) { - return false; - } - if (id.name === "require") { - return false; - } - return true; -} -function stringifyExpression(exp) { - if (shared.isString(exp)) { - return exp; - } else if (exp.type === 4) { - return exp.content; - } else { - return exp.children.map(stringifyExpression).join(""); - } -} -function isConst(type) { - return type === "setup-const" || type === "literal-const"; -} - -const transformIf = createStructuralDirectiveTransform( - /^(if|else|else-if)$/, - (node, dir, context) => { - return processIf(node, dir, context, (ifNode, branch, isRoot) => { - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9) { - key += sibling.branches.length; - } - } - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch( - branch, - key, - context - ); - } else { - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch( - branch, - key + ifNode.branches.length - 1, - context - ); - } - }; - }); - } -); -function processIf(node, dir, context, processCodegen) { - if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError( - createCompilerError(28, dir.loc) - ); - dir.exp = createSimpleExpression(`true`, false, loc); - } - if (context.prefixIdentifiers && dir.exp) { - dir.exp = processExpression(dir.exp, context); - } - if (dir.name === "if") { - const branch = createIfBranch(node, dir); - const ifNode = { - type: 9, - loc: cloneLoc(node.loc), - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); - } - } else { - const siblings = context.parent.children; - const comments = []; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if (sibling && sibling.type === 3) { - context.removeNode(sibling); - comments.unshift(sibling); - continue; - } - if (sibling && sibling.type === 2 && !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9) { - if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { - context.onError( - createCompilerError(30, node.loc) - ); - } - context.removeNode(); - const branch = createIfBranch(node, dir); - if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> - !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { - branch.children = [...comments, ...branch.children]; - } - { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError( - createCompilerError( - 29, - branch.userKey.loc - ) - ); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - traverseNode(branch, context); - if (onExit) onExit(); - context.currentNode = null; - } else { - context.onError( - createCompilerError(30, node.loc) - ); - } - break; - } - } -} -function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3; - return { - type: 10, - loc: node.loc, - condition: dir.name === "else" ? void 0 : dir.exp, - children: isTemplateIf && !findDir(node, "for") ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; -} -function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression( - branch.condition, - createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - '"v-if"' , - "true" - ]) - ); - } else { - return createChildrenCodegenNode(branch, keyIndex, context); - } -} -function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty( - `key`, - createSimpleExpression( - `${keyIndex}`, - false, - locStub, - 2 - ) - ); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11) { - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } else { - let patchFlag = 64; - if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { - patchFlag |= 2048; - } - return createVNodeCall( - context, - helper(FRAGMENT), - createObjectExpression([keyProperty]), - children, - patchFlag, - void 0, - void 0, - true, - false, - false, - branch.loc - ); - } - } else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - if (vnodeCall.type === 13) { - convertToBlock(vnodeCall, context); - } - injectProp(vnodeCall, keyProperty, context); - return ret; - } -} -function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; - } - if (a.type === 6) { - if (a.value.content !== b.value.content) { - return false; - } - } else { - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { - return false; - } - } - return true; -} -function getParentCondition(node) { - while (true) { - if (node.type === 19) { - if (node.alternate.type === 19) { - node = node.alternate; - } else { - return node; - } - } else if (node.type === 20) { - node = node.value; - } - } -} - -const transformBind = (dir, _node, context) => { - const { modifiers, loc } = dir; - const arg = dir.arg; - let { exp } = dir; - if (exp && exp.type === 4 && !exp.content.trim()) { - { - context.onError( - createCompilerError(34, loc) - ); - return { - props: [ - createObjectProperty(arg, createSimpleExpression("", true, loc)) - ] - }; - } - } - if (!exp) { - if (arg.type !== 4 || !arg.isStatic) { - context.onError( - createCompilerError( - 52, - arg.loc - ) - ); - return { - props: [ - createObjectProperty(arg, createSimpleExpression("", true, loc)) - ] - }; - } - transformBindShorthand(dir, context); - exp = dir.exp; - } - if (arg.type !== 4) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); - } else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; - } - if (modifiers.some((mod) => mod.content === "camel")) { - if (arg.type === 4) { - if (arg.isStatic) { - arg.content = shared.camelize(arg.content); - } else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } - } - if (!context.inSSR) { - if (modifiers.some((mod) => mod.content === "prop")) { - injectPrefix(arg, "."); - } - if (modifiers.some((mod) => mod.content === "attr")) { - injectPrefix(arg, "^"); - } - } - return { - props: [createObjectProperty(arg, exp)] - }; -}; -const transformBindShorthand = (dir, context) => { - const arg = dir.arg; - const propName = shared.camelize(arg.content); - dir.exp = createSimpleExpression(propName, false, arg.loc); - { - dir.exp = processExpression(dir.exp, context); - } -}; -const injectPrefix = (arg, prefix) => { - if (arg.type === 4) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); - } -}; - -const transformFor = createStructuralDirectiveTransform( - "for", - (node, dir, context) => { - const { helper, removeHelper } = context; - return processFor(node, dir, context, (forNode) => { - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, "memo"); - const keyProp = findProp(node, `key`, false, true); - const isDirKey = keyProp && keyProp.type === 7; - if (isDirKey && !keyProp.exp) { - transformBindShorthand(keyProp, context); - } - let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); - if (memo && keyExp && isDirKey) { - { - keyProp.exp = keyExp = processExpression( - keyExp, - context - ); - } - } - const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; - if (isTemplate) { - if (memo) { - memo.exp = processExpression( - memo.exp, - context - ); - } - if (keyProperty && keyProp.type !== 6) { - keyProperty.value = processExpression( - keyProperty.value, - context - ); - } - } - const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; - const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; - forNode.codegenNode = createVNodeCall( - context, - helper(FRAGMENT), - void 0, - renderExp, - fragmentFlag, - void 0, - void 0, - true, - !isStableFragment, - false, - node.loc - ); - return () => { - let childBlock; - const { children } = forNode; - if (isTemplate) { - node.children.some((c) => { - if (c.type === 1) { - const key = findProp(c, "key"); - if (key) { - context.onError( - createCompilerError( - 33, - key.loc - ) - ); - return true; - } - } - }); - } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; - const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; - if (slotOutlet) { - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - } else if (needFragmentWrapper) { - childBlock = createVNodeCall( - context, - helper(FRAGMENT), - keyProperty ? createObjectExpression([keyProperty]) : void 0, - node.children, - 64, - void 0, - void 0, - true, - void 0, - false - ); - } else { - childBlock = children[0].codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - removeHelper(OPEN_BLOCK); - removeHelper( - getVNodeBlockHelper(context.inSSR, childBlock.isComponent) - ); - } else { - removeHelper( - getVNodeHelper(context.inSSR, childBlock.isComponent) - ); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression( - createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ]) - ); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...keyExp ? [` && _cached.key === `, keyExp] : [], - ` && ${context.helperString( - IS_MEMO_SAME - )}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push( - loop, - createSimpleExpression(`_cache`), - createSimpleExpression(String(context.cached.length)) - ); - context.cached.push(null); - } else { - renderExp.arguments.push( - createFunctionExpression( - createForLoopParams(forNode.parseResult), - childBlock, - true - ) - ); - } - }; - }); - } -); -function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError( - createCompilerError(31, dir.loc) - ); - return; - } - const parseResult = dir.forParseResult; - if (!parseResult) { - context.onError( - createCompilerError(32, dir.loc) - ); - return; - } - finalizeForParseResult(parseResult, context); - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - scopes.vFor++; - if (context.prefixIdentifiers) { - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - } - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (context.prefixIdentifiers) { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - } - if (onExit) onExit(); - }; -} -function finalizeForParseResult(result, context) { - if (result.finalized) return; - if (context.prefixIdentifiers) { - result.source = processExpression( - result.source, - context - ); - if (result.key) { - result.key = processExpression( - result.key, - context, - true - ); - } - if (result.index) { - result.index = processExpression( - result.index, - context, - true - ); - } - if (result.value) { - result.value = processExpression( - result.value, - context, - true - ); - } - } - result.finalized = true; -} -function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); -} -function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) break; - } - return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); -} - -const defaultFallback = createSimpleExpression(`undefined`, false); -const trackSlotScopes = (node, context) => { - if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { - const vSlot = findDir(node, "slot"); - if (vSlot) { - const slotProps = vSlot.exp; - if (context.prefixIdentifiers) { - slotProps && context.addIdentifiers(slotProps); - } - context.scopes.vSlot++; - return () => { - if (context.prefixIdentifiers) { - slotProps && context.removeIdentifiers(slotProps); - } - context.scopes.vSlot--; - }; - } - } -}; -const trackVForSlotScopes = (node, context) => { - let vFor; - if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { - const result = vFor.forParseResult; - if (result) { - finalizeForParseResult(result, context); - const { value, key, index } = result; - const { addIdentifiers, removeIdentifiers } = context; - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - return () => { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - }; - } - } -}; -const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( - props, - children, - false, - true, - children.length ? children[0].loc : loc -); -function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - if (!context.ssr && context.prefixIdentifiers) { - hasDynamicSlots = hasScopeRef(node, context.identifiers); - } - const onComponentSlot = findDir(node, "slot", true); - if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push( - createObjectProperty( - arg || createSimpleExpression("default", true), - buildSlotFn(exp, void 0, children, loc) - ) - ); - } - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = /* @__PURE__ */ new Set(); - let conditionalBranchIndex = 0; - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { - if (slotElement.type !== 3) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - context.onError( - createCompilerError(37, slotDir.loc) - ); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { - arg: slotName = createSimpleExpression(`default`, true), - exp: slotProps, - loc: dirLoc - } = slotDir; - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } else { - hasDynamicSlots = true; - } - const vFor = findDir(slotElement, "for"); - const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); - let vIf; - let vElse; - if (vIf = findDir(slotElement, "if")) { - hasDynamicSlots = true; - dynamicSlots.push( - createConditionalExpression( - vIf.exp, - buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), - defaultFallback - ) - ); - } else if (vElse = findDir( - slotElement, - /^else(-if)?$/, - true - /* allowEmpty */ - )) { - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp ? createConditionalExpression( - vElse.exp, - buildDynamicSlot( - slotName, - slotFunction, - conditionalBranchIndex++ - ), - defaultFallback - ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); - } else { - context.onError( - createCompilerError(30, vElse.loc) - ); - } - } else if (vFor) { - hasDynamicSlots = true; - const parseResult = vFor.forParseResult; - if (parseResult) { - finalizeForParseResult(parseResult, context); - dynamicSlots.push( - createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression( - createForLoopParams(parseResult), - buildDynamicSlot(slotName, slotFunction), - true - ) - ]) - ); - } else { - context.onError( - createCompilerError( - 32, - vFor.loc - ) - ); - } - } else { - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError( - createCompilerError( - 38, - dirLoc - ) - ); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === "default") { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } - } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children2) => { - const fn = buildSlotFn(props, void 0, children2, loc); - if (context.compatConfig) { - fn.isNonScopedSlot = true; - } - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - slotsProperties.push(buildDefaultSlotProperty(void 0, children)); - } else if (implicitDefaultChildren.length && // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { - if (hasNamedDefaultSlot) { - context.onError( - createCompilerError( - 39, - implicitDefaultChildren[0].loc - ) - ); - } else { - slotsProperties.push( - buildDefaultSlotProperty(void 0, implicitDefaultChildren) - ); - } - } - } - const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; - let slots = createObjectExpression( - slotsProperties.concat( - createObjectProperty( - `_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression( - slotFlag + (` /* ${shared.slotFlagsText[slotFlag]} */` ), - false - ) - ) - ), - loc - ); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots - }; -} -function buildDynamicSlot(name, fn, index) { - const props = [ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) - ]; - if (index != null) { - props.push( - createObjectProperty(`key`, createSimpleExpression(String(index), true)) - ); - } - return createObjectExpression(props); -} -function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1: - if (child.tagType === 2 || hasForwardedSlots(child.children)) { - return true; - } - break; - case 9: - if (hasForwardedSlots(child.branches)) return true; - break; - case 10: - case 11: - if (hasForwardedSlots(child.children)) return true; - break; - } - } - return false; -} -function isNonWhitespaceContent(node) { - if (node.type !== 2 && node.type !== 12) - return true; - return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); -} - -const directiveImportMap = /* @__PURE__ */ new WeakMap(); -const transformElement = (node, context) => { - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { - return; - } - const { tag, props } = node; - const isComponent = node.tagType === 1; - let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; - const isDynamicComponent = shared.isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = ( - // dynamic component may resolve to plain elements - isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === "svg" || tag === "foreignObject" || tag === "math") - ); - if (props.length > 0) { - const propsBuildResult = buildProps( - node, - context, - void 0, - isComponent, - isDynamicComponent - ); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = directives && directives.length ? createArrayExpression( - directives.map((dir) => buildDirectiveArgs(dir, context)) - ) : void 0; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } - } - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - shouldUseBlock = true; - patchFlag |= 1024; - if (node.children.length > 1) { - context.onError( - createCompilerError(46, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: "" - }) - ); - } - } - const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024; - } - } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - const hasDynamicTextChild = type === 5 || type === 8; - if (hasDynamicTextChild && getConstantType(child, context) === 0) { - patchFlag |= 1; - } - if (hasDynamicTextChild || type === 2) { - vnodeChildren = child; - } else { - vnodeChildren = node.children; - } - } else { - vnodeChildren = node.children; - } - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } - node.codegenNode = createVNodeCall( - context, - vnodeTag, - vnodeProps, - vnodeChildren, - patchFlag === 0 ? void 0 : patchFlag, - vnodeDynamicProps, - vnodeDirectives, - !!shouldUseBlock, - false, - isComponent, - node.loc - ); - }; -}; -function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp( - node, - "is", - false, - true - /* allow empty */ - ); - if (isProp) { - if (isExplicitDynamic || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - )) { - let exp; - if (isProp.type === 6) { - exp = isProp.value && createSimpleExpression(isProp.value.content, true); - } else { - exp = isProp.exp; - if (!exp) { - exp = createSimpleExpression(`is`, false, isProp.arg.loc); - { - exp = isProp.exp = processExpression(exp, context); - } - } - } - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { - tag = isProp.value.content.slice(4); - } - } - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - if (!ssr) context.helper(builtIn); - return builtIn; - } - { - const fromSetup = resolveSetupReference(tag, context); - if (fromSetup) { - return fromSetup; - } - const dotIndex = tag.indexOf("."); - if (dotIndex > 0) { - const ns = resolveSetupReference(tag.slice(0, dotIndex), context); - if (ns) { - return ns + tag.slice(dotIndex); - } - } - } - if (context.selfName && shared.capitalize(shared.camelize(tag)) === context.selfName) { - context.helper(RESOLVE_COMPONENT); - context.components.add(tag + `__self`); - return toValidAssetId(tag, `component`); - } - context.helper(RESOLVE_COMPONENT); - context.components.add(tag); - return toValidAssetId(tag, `component`); -} -function resolveSetupReference(name, context) { - const bindings = context.bindingMetadata; - if (!bindings || bindings.__isScriptSetup === false) { - return; - } - const camelName = shared.camelize(name); - const PascalName = shared.capitalize(camelName); - const checkType = (type) => { - if (bindings[name] === type) { - return name; - } - if (bindings[camelName] === type) { - return camelName; - } - if (bindings[PascalName] === type) { - return PascalName; - } - }; - const fromConst = checkType("setup-const") || checkType("setup-reactive-const") || checkType("literal-const"); - if (fromConst) { - return context.inline ? ( - // in inline mode, const setup bindings (e.g. imports) can be used as-is - fromConst - ) : `$setup[${JSON.stringify(fromConst)}]`; - } - const fromMaybeRef = checkType("setup-let") || checkType("setup-ref") || checkType("setup-maybe-ref"); - if (fromMaybeRef) { - return context.inline ? ( - // setup scope bindings that may be refs need to be unrefed - `${context.helperString(UNREF)}(${fromMaybeRef})` - ) : `$setup[${JSON.stringify(fromMaybeRef)}]`; - } - const fromProps = checkType("props"); - if (fromProps) { - return `${context.helperString(UNREF)}(${context.inline ? "__props" : "$props"}[${JSON.stringify(fromProps)}])`; - } -} -function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const pushMergeArg = (arg) => { - if (properties.length) { - mergeArgs.push( - createObjectExpression(dedupeProperties(properties), elementLoc) - ); - properties = []; - } - if (arg) mergeArgs.push(arg); - }; - const pushRefVForMarker = () => { - if (context.scopes.vFor > 0) { - properties.push( - createObjectProperty( - createSimpleExpression("ref_for", true), - createSimpleExpression("true") - ) - ); - } - }; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = shared.isOn(name); - if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== "onclick" && // omit v-model handlers - name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks - !shared.isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && shared.isReservedProp(name)) { - hasVnodeHook = true; - } - if (isEventHandler && value.type === 14) { - value = value.arguments[0]; - } - if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { - return; - } - if (name === "ref") { - hasRef = true; - } else if (name === "class") { - hasClassBinding = true; - } else if (name === "style") { - hasStyleBinding = true; - } else if (name !== "key" && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - } else { - hasDynamicKeys = true; - } - }; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 6) { - const { loc, name, nameLoc, value } = prop; - let isStatic = true; - if (name === "ref") { - hasRef = true; - pushRefVForMarker(); - if (value && context.inline) { - const binding = context.bindingMetadata[value.content]; - if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") { - isStatic = false; - properties.push( - createObjectProperty( - createSimpleExpression("ref_key", true), - createSimpleExpression(value.content, true, value.loc) - ) - ); - } - } - } - if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - ))) { - continue; - } - properties.push( - createObjectProperty( - createSimpleExpression(name, true, nameLoc), - createSimpleExpression( - value ? value.content : "", - isStatic, - value ? value.loc : loc - ) - ) - ); - } else { - const { name, arg, exp, loc, modifiers } = prop; - const isVBind = name === "bind"; - const isVOn = name === "on"; - if (name === "slot") { - if (!isComponent) { - context.onError( - createCompilerError(40, loc) - ); - } - continue; - } - if (name === "once" || name === "memo") { - continue; - } - if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - ))) { - continue; - } - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked - // before children - isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") - ) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, "ref")) { - pushRefVForMarker(); - } - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (isVBind) { - pushRefVForMarker(); - pushMergeArg(); - { - { - const hasOverridableKeys = mergeArgs.some((arg2) => { - if (arg2.type === 15) { - return arg2.properties.some(({ key }) => { - if (key.type !== 4 || !key.isStatic) { - return true; - } - return key.content !== "class" && key.content !== "style" && !shared.isOn(key.content); - }); - } else { - return true; - } - }); - if (hasOverridableKeys) { - checkCompatEnabled( - "COMPILER_V_BIND_OBJECT_ORDER", - context, - loc - ); - } - } - if (isCompatEnabled( - "COMPILER_V_BIND_OBJECT_ORDER", - context - )) { - mergeArgs.unshift(exp); - continue; - } - } - mergeArgs.push(exp); - } else { - pushMergeArg({ - type: 14, - loc, - callee: context.helper(TO_HANDLERS), - arguments: isComponent ? [exp] : [exp, `true`] - }); - } - } else { - context.onError( - createCompilerError( - isVBind ? 34 : 35, - loc - ) - ); - } - continue; - } - if (isVBind && modifiers.some((mod) => mod.content === "prop")) { - patchFlag |= 32; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - const { props: props2, needRuntime } = directiveTransform(prop, node, context); - !ssr && props2.forEach(analyzePatchFlag); - if (isVOn && arg && !isStaticExp(arg)) { - pushMergeArg(createObjectExpression(props2, elementLoc)); - } else { - properties.push(...props2); - } - if (needRuntime) { - runtimeDirectives.push(prop); - if (shared.isSymbol(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } else if (!shared.isBuiltInDirective(name)) { - runtimeDirectives.push(prop); - if (hasChildren) { - shouldUseBlock = true; - } - } - } - } - let propsExpression = void 0; - if (mergeArgs.length) { - pushMergeArg(); - if (mergeArgs.length > 1) { - propsExpression = createCallExpression( - context.helper(MERGE_PROPS), - mergeArgs, - elementLoc - ); - } else { - propsExpression = mergeArgs[0]; - } - } else if (properties.length) { - propsExpression = createObjectExpression( - dedupeProperties(properties), - elementLoc - ); - } - if (hasDynamicKeys) { - patchFlag |= 16; - } else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2; - } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4; - } - if (dynamicPropNames.length) { - patchFlag |= 8; - } - if (hasHydrationEventBinding) { - patchFlag |= 32; - } - } - if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512; - } - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15: - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === "class") { - classKeyIndex = i; - } else if (key.content === "style") { - styleKeyIndex = i; - } - } else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression( - context.helper(NORMALIZE_CLASS), - [classProp.value] - ); - } - if (styleProp && // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17)) { - styleProp.value = createCallExpression( - context.helper(NORMALIZE_STYLE), - [styleProp.value] - ); - } - } else { - propsExpression = createCallExpression( - context.helper(NORMALIZE_PROPS), - [propsExpression] - ); - } - break; - case 14: - break; - default: - propsExpression = createCallExpression( - context.helper(NORMALIZE_PROPS), - [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ] - ); - break; - } - } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; -} -function dedupeProperties(properties) { - const knownProps = /* @__PURE__ */ new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - if (prop.key.type === 8 || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === "style" || name === "class" || shared.isOn(name)) { - mergeAsArray(existing, prop); - } - } else { - knownProps.set(name, prop); - deduped.push(prop); - } - } - return deduped; -} -function mergeAsArray(existing, incoming) { - if (existing.value.type === 17) { - existing.value.elements.push(incoming.value); - } else { - existing.value = createArrayExpression( - [existing.value, incoming.value], - existing.loc - ); - } -} -function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - dirArgs.push(context.helperString(runtime)); - } else { - const fromSetup = resolveSetupReference("v-" + dir.name, context); - if (fromSetup) { - dirArgs.push(fromSetup); - } else { - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } - } - const { loc } = dir; - if (dir.exp) dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); - } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push( - createObjectExpression( - dir.modifiers.map( - (modifier) => createObjectProperty(modifier, trueExpression) - ), - loc - ) - ); - } - return createArrayExpression(dirArgs, dir.loc); -} -function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) propsNamesString += ", "; - } - return propsNamesString + `]`; -} -function isComponentTag(tag) { - return tag === "component" || tag === "Component"; -} - -const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - "{}", - "undefined", - "true" - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); - node.codegenNode = createCallExpression( - context.helper(RENDER_SLOT), - slotArgs, - loc - ); - } -}; -function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = void 0; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - if (p.value) { - if (p.name === "name") { - slotName = JSON.stringify(p.value.content); - } else { - p.name = shared.camelize(p.name); - nonNameProps.push(p); - } - } - } else { - if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { - if (p.exp) { - slotName = p.exp; - } else if (p.arg && p.arg.type === 4) { - const name = shared.camelize(p.arg.content); - slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); - { - slotName = p.exp = processExpression(p.exp, context); - } - } - } else { - if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { - p.arg.content = shared.camelize(p.arg.content); - } - nonNameProps.push(p); - } - } - } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps( - node, - context, - nonNameProps, - false, - false - ); - slotProps = props; - if (directives.length) { - context.onError( - createCompilerError( - 36, - directives[0].loc - ) - ); - } - } - return { - slotName, - slotProps - }; -} - -const transformOn = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35, loc)); - } - let eventName; - if (arg.type === 4) { - if (arg.isStatic) { - let rawName = arg.content; - if (rawName.startsWith("vnode")) { - context.onError(createCompilerError(51, arg.loc)); - } - if (rawName.startsWith("vue:")) { - rawName = `vnode-${rawName.slice(4)}`; - } - const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( - // for non-element and vnode lifecycle event listeners, auto convert - // it to camelCase. See issue #2249 - shared.toHandlerKey(shared.camelize(rawName)) - ) : ( - // preserve case for plain element listeners that have uppercase - // letters, as these may be custom elements' custom events - `on:${rawName}` - ); - eventName = createSimpleExpression(eventString, true, arg.loc); - } else { - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); - } - } else { - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); - } - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = void 0; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp, context); - const isInlineStatement = !(isMemberExp || isFnExpression(exp, context)); - const hasMultipleStatements = exp.content.includes(`;`); - if (context.prefixIdentifiers) { - isInlineStatement && context.addIdentifiers(`$event`); - exp = dir.exp = processExpression( - exp, - context, - false, - hasMultipleStatements - ); - isInlineStatement && context.removeIdentifiers(`$event`); - shouldCache = context.cacheHandlers && // unnecessary to cache inside v-once - !context.inVOnce && // runtime constants don't need to be cached - // (this is analyzed by compileScript in SFC <script setup>) - !(exp.type === 4 && exp.constType > 0) && // #1541 bail if this is a member exp handler passed to a component - - // we need to use the original function to preserve arity, - // e.g. <transition> relies on checking cb.length to determine - // transition end handling. Inline function is ok since its arity - // is preserved even when cached. - !(isMemberExp && node.tagType === 1) && // bail if the function references closure variables (v-for, v-slot) - // it must be passed fresh to avoid stale values. - !hasScopeRef(exp, context.identifiers); - if (shouldCache && isMemberExp) { - if (exp.type === 4) { - exp.content = `${exp.content} && ${exp.content}(...args)`; - } else { - exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`]; - } - } - } - if (isInlineStatement || shouldCache && isMemberExp) { - exp = createCompoundExpression([ - `${isInlineStatement ? context.isTS ? `($event: any)` : `$event` : `${context.isTS ? ` -//@ts-ignore -` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty( - eventName, - exp || createSimpleExpression(`() => {}`, false, loc) - ) - ] - }; - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - ret.props[0].value = context.cache(ret.props[0].value); - } - ret.props.forEach((p) => p.key.isHandlerKey = true); - return ret; -}; - -const transformText = (node, context) => { - if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { - return () => { - const children = node.children; - let currentContainer = void 0; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText$1(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText$1(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression( - [child], - child.loc - ); - } - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } else { - currentContainer = void 0; - break; - } - } - } - } - if (!hasText || // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find( - (p) => p.type === 7 && !context.directiveTransforms[p.name] - ) && // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - !(node.tag === "template"))) { - return; - } - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText$1(child) || child.type === 8) { - const callArgs = []; - if (child.type !== 2 || child.content !== " ") { - callArgs.push(child); - } - if (!context.ssr && getConstantType(child, context) === 0) { - callArgs.push( - 1 + (` /* ${shared.PatchFlagNames[1]} */` ) - ); - } - children[i] = { - type: 12, - content: child, - loc: child.loc, - codegenNode: createCallExpression( - context.helper(CREATE_TEXT), - callArgs - ) - }; - } - } - }; - } -}; - -const seen$1 = /* @__PURE__ */ new WeakSet(); -const transformOnce = (node, context) => { - if (node.type === 1 && findDir(node, "once", true)) { - if (seen$1.has(node) || context.inVOnce || context.inSSR) { - return; - } - seen$1.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache( - cur.codegenNode, - true, - true - ); - } - }; - } -}; - -const transformModel = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError( - createCompilerError(41, dir.loc) - ); - return createTransformProps(); - } - const rawExp = exp.loc.source.trim(); - const expString = exp.type === 4 ? exp.content : rawExp; - const bindingType = context.bindingMetadata[rawExp]; - if (bindingType === "props" || bindingType === "props-aliased") { - context.onError(createCompilerError(44, exp.loc)); - return createTransformProps(); - } - const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref"); - if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) { - context.onError( - createCompilerError(42, exp.loc) - ); - return createTransformProps(); - } - if (context.prefixIdentifiers && isSimpleIdentifier(expString) && context.identifiers[expString]) { - context.onError( - createCompilerError(43, exp.loc) - ); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression("modelValue", true); - const eventName = arg ? isStaticExp(arg) ? `onUpdate:${shared.camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - if (maybeRef) { - if (bindingType === "setup-ref") { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - createSimpleExpression(rawExp, false, exp.loc), - `).value = $event)` - ]); - } else { - const altAssignment = bindingType === "setup-let" ? `${rawExp} = $event` : `null`; - assignmentExp = createCompoundExpression([ - `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`, - createSimpleExpression(rawExp, false, exp.loc), - `).value = $event : ${altAssignment})` - ]); - } - } else { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - if (context.prefixIdentifiers && !context.inVOnce && context.cacheHandlers && !hasScopeRef(exp, context.identifiers)) { - props[1].value = context.cache(props[1].value); - } - if (dir.modifiers.length && node.tagType === 1) { - const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); - const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; - props.push( - createObjectProperty( - modifiersKey, - createSimpleExpression( - `{ ${modifiers} }`, - false, - dir.loc, - 2 - ) - ) - ); - } - return createTransformProps(props); -}; -function createTransformProps(props = []) { - return { props }; -} - -const validDivisionCharRE = /[\w).+\-_$\]]/; -const transformFilter = (node, context) => { - if (!isCompatEnabled("COMPILER_FILTERS", context)) { - return; - } - if (node.type === 5) { - rewriteFilter(node.content, context); - } else if (node.type === 1) { - node.props.forEach((prop) => { - if (prop.type === 7 && prop.name !== "for" && prop.exp) { - rewriteFilter(prop.exp, context); - } - }); - } -}; -function rewriteFilter(node, context) { - if (node.type === 4) { - parseFilter(node, context); - } else { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (typeof child !== "object") continue; - if (child.type === 4) { - parseFilter(child, context); - } else if (child.type === 8) { - rewriteFilter(node, context); - } else if (child.type === 5) { - rewriteFilter(child.content, context); - } - } - } -} -function parseFilter(node, context) { - const exp = node.content; - let inSingle = false; - let inDouble = false; - let inTemplateString = false; - let inRegex = false; - let curly = 0; - let square = 0; - let paren = 0; - let lastFilterIndex = 0; - let c, prev, i, expression, filters = []; - for (i = 0; i < exp.length; i++) { - prev = c; - c = exp.charCodeAt(i); - if (inSingle) { - if (c === 39 && prev !== 92) inSingle = false; - } else if (inDouble) { - if (c === 34 && prev !== 92) inDouble = false; - } else if (inTemplateString) { - if (c === 96 && prev !== 92) inTemplateString = false; - } else if (inRegex) { - if (c === 47 && prev !== 92) inRegex = false; - } else if (c === 124 && // pipe - exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { - if (expression === void 0) { - lastFilterIndex = i + 1; - expression = exp.slice(0, i).trim(); - } else { - pushFilter(); - } - } else { - switch (c) { - case 34: - inDouble = true; - break; - // " - case 39: - inSingle = true; - break; - // ' - case 96: - inTemplateString = true; - break; - // ` - case 40: - paren++; - break; - // ( - case 41: - paren--; - break; - // ) - case 91: - square++; - break; - // [ - case 93: - square--; - break; - // ] - case 123: - curly++; - break; - // { - case 125: - curly--; - break; - } - if (c === 47) { - let j = i - 1; - let p; - for (; j >= 0; j--) { - p = exp.charAt(j); - if (p !== " ") break; - } - if (!p || !validDivisionCharRE.test(p)) { - inRegex = true; - } - } - } - } - if (expression === void 0) { - expression = exp.slice(0, i).trim(); - } else if (lastFilterIndex !== 0) { - pushFilter(); - } - function pushFilter() { - filters.push(exp.slice(lastFilterIndex, i).trim()); - lastFilterIndex = i + 1; - } - if (filters.length) { - warnDeprecation( - "COMPILER_FILTERS", - context, - node.loc - ); - for (i = 0; i < filters.length; i++) { - expression = wrapFilter(expression, filters[i], context); - } - node.content = expression; - node.ast = void 0; - } -} -function wrapFilter(exp, filter, context) { - context.helper(RESOLVE_FILTER); - const i = filter.indexOf("("); - if (i < 0) { - context.filters.add(filter); - return `${toValidAssetId(filter, "filter")}(${exp})`; - } else { - const name = filter.slice(0, i); - const args = filter.slice(i + 1); - context.filters.add(name); - return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; - } -} - -const seen = /* @__PURE__ */ new WeakSet(); -const transformMemo = (node, context) => { - if (node.type === 1) { - const dir = findDir(node, "memo"); - if (!dir || seen.has(node)) { - return; - } - seen.add(node); - return () => { - const codegenNode = node.codegenNode || context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13) { - if (node.tagType !== 1) { - convertToBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(void 0, codegenNode), - `_cache`, - String(context.cached.length) - ]); - context.cached.push(null); - } - }; - } -}; - -function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...[transformFilter] , - ...prefixIdentifiers ? [ - // order is important - trackVForSlotScopes, - transformExpression - ] : [], - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn, - bind: transformBind, - model: transformModel - } - ]; -} -function baseCompile(source, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === "module"; - const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode; - if (!prefixIdentifiers && options.cacheHandlers) { - onError(createCompilerError(49)); - } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(50)); - } - const resolvedOptions = shared.extend({}, options, { - prefixIdentifiers - }); - const ast = shared.isString(source) ? baseParse(source, resolvedOptions) : source; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers); - if (options.isTS) { - const { expressionPlugins } = options; - if (!expressionPlugins || !expressionPlugins.includes("typescript")) { - options.expressionPlugins = [...expressionPlugins || [], "typescript"]; - } - } - transform( - ast, - shared.extend({}, resolvedOptions, { - nodeTransforms: [ - ...nodeTransforms, - ...options.nodeTransforms || [] - // user transforms - ], - directiveTransforms: shared.extend( - {}, - directiveTransforms, - options.directiveTransforms || {} - // user transforms - ) - }) - ); - return generate(ast, resolvedOptions); -} - -const BindingTypes = { - "DATA": "data", - "PROPS": "props", - "PROPS_ALIASED": "props-aliased", - "SETUP_LET": "setup-let", - "SETUP_CONST": "setup-const", - "SETUP_REACTIVE_CONST": "setup-reactive-const", - "SETUP_MAYBE_REF": "setup-maybe-ref", - "SETUP_REF": "setup-ref", - "OPTIONS": "options", - "LITERAL_CONST": "literal-const" -}; - -const noopDirectiveTransform = () => ({ props: [] }); - -exports.generateCodeFrame = shared.generateCodeFrame; -exports.BASE_TRANSITION = BASE_TRANSITION; -exports.BindingTypes = BindingTypes; -exports.CAMELIZE = CAMELIZE; -exports.CAPITALIZE = CAPITALIZE; -exports.CREATE_BLOCK = CREATE_BLOCK; -exports.CREATE_COMMENT = CREATE_COMMENT; -exports.CREATE_ELEMENT_BLOCK = CREATE_ELEMENT_BLOCK; -exports.CREATE_ELEMENT_VNODE = CREATE_ELEMENT_VNODE; -exports.CREATE_SLOTS = CREATE_SLOTS; -exports.CREATE_STATIC = CREATE_STATIC; -exports.CREATE_TEXT = CREATE_TEXT; -exports.CREATE_VNODE = CREATE_VNODE; -exports.CompilerDeprecationTypes = CompilerDeprecationTypes; -exports.ConstantTypes = ConstantTypes; -exports.ElementTypes = ElementTypes; -exports.ErrorCodes = ErrorCodes; -exports.FRAGMENT = FRAGMENT; -exports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS; -exports.IS_MEMO_SAME = IS_MEMO_SAME; -exports.IS_REF = IS_REF; -exports.KEEP_ALIVE = KEEP_ALIVE; -exports.MERGE_PROPS = MERGE_PROPS; -exports.NORMALIZE_CLASS = NORMALIZE_CLASS; -exports.NORMALIZE_PROPS = NORMALIZE_PROPS; -exports.NORMALIZE_STYLE = NORMALIZE_STYLE; -exports.Namespaces = Namespaces; -exports.NodeTypes = NodeTypes; -exports.OPEN_BLOCK = OPEN_BLOCK; -exports.POP_SCOPE_ID = POP_SCOPE_ID; -exports.PUSH_SCOPE_ID = PUSH_SCOPE_ID; -exports.RENDER_LIST = RENDER_LIST; -exports.RENDER_SLOT = RENDER_SLOT; -exports.RESOLVE_COMPONENT = RESOLVE_COMPONENT; -exports.RESOLVE_DIRECTIVE = RESOLVE_DIRECTIVE; -exports.RESOLVE_DYNAMIC_COMPONENT = RESOLVE_DYNAMIC_COMPONENT; -exports.RESOLVE_FILTER = RESOLVE_FILTER; -exports.SET_BLOCK_TRACKING = SET_BLOCK_TRACKING; -exports.SUSPENSE = SUSPENSE; -exports.TELEPORT = TELEPORT; -exports.TO_DISPLAY_STRING = TO_DISPLAY_STRING; -exports.TO_HANDLERS = TO_HANDLERS; -exports.TO_HANDLER_KEY = TO_HANDLER_KEY; -exports.TS_NODE_TYPES = TS_NODE_TYPES; -exports.UNREF = UNREF; -exports.WITH_CTX = WITH_CTX; -exports.WITH_DIRECTIVES = WITH_DIRECTIVES; -exports.WITH_MEMO = WITH_MEMO; -exports.advancePositionWithClone = advancePositionWithClone; -exports.advancePositionWithMutation = advancePositionWithMutation; -exports.assert = assert; -exports.baseCompile = baseCompile; -exports.baseParse = baseParse; -exports.buildDirectiveArgs = buildDirectiveArgs; -exports.buildProps = buildProps; -exports.buildSlots = buildSlots; -exports.checkCompatEnabled = checkCompatEnabled; -exports.convertToBlock = convertToBlock; -exports.createArrayExpression = createArrayExpression; -exports.createAssignmentExpression = createAssignmentExpression; -exports.createBlockStatement = createBlockStatement; -exports.createCacheExpression = createCacheExpression; -exports.createCallExpression = createCallExpression; -exports.createCompilerError = createCompilerError; -exports.createCompoundExpression = createCompoundExpression; -exports.createConditionalExpression = createConditionalExpression; -exports.createForLoopParams = createForLoopParams; -exports.createFunctionExpression = createFunctionExpression; -exports.createIfStatement = createIfStatement; -exports.createInterpolation = createInterpolation; -exports.createObjectExpression = createObjectExpression; -exports.createObjectProperty = createObjectProperty; -exports.createReturnStatement = createReturnStatement; -exports.createRoot = createRoot; -exports.createSequenceExpression = createSequenceExpression; -exports.createSimpleExpression = createSimpleExpression; -exports.createStructuralDirectiveTransform = createStructuralDirectiveTransform; -exports.createTemplateLiteral = createTemplateLiteral; -exports.createTransformContext = createTransformContext; -exports.createVNodeCall = createVNodeCall; -exports.errorMessages = errorMessages; -exports.extractIdentifiers = extractIdentifiers; -exports.findDir = findDir; -exports.findProp = findProp; -exports.forAliasRE = forAliasRE; -exports.generate = generate; -exports.getBaseTransformPreset = getBaseTransformPreset; -exports.getConstantType = getConstantType; -exports.getMemoedVNodeCall = getMemoedVNodeCall; -exports.getVNodeBlockHelper = getVNodeBlockHelper; -exports.getVNodeHelper = getVNodeHelper; -exports.hasDynamicKeyVBind = hasDynamicKeyVBind; -exports.hasScopeRef = hasScopeRef; -exports.helperNameMap = helperNameMap; -exports.injectProp = injectProp; -exports.isCoreComponent = isCoreComponent; -exports.isFnExpression = isFnExpression; -exports.isFnExpressionBrowser = isFnExpressionBrowser; -exports.isFnExpressionNode = isFnExpressionNode; -exports.isFunctionType = isFunctionType; -exports.isInDestructureAssignment = isInDestructureAssignment; -exports.isInNewExpression = isInNewExpression; -exports.isMemberExpression = isMemberExpression; -exports.isMemberExpressionBrowser = isMemberExpressionBrowser; -exports.isMemberExpressionNode = isMemberExpressionNode; -exports.isReferencedIdentifier = isReferencedIdentifier; -exports.isSimpleIdentifier = isSimpleIdentifier; -exports.isSlotOutlet = isSlotOutlet; -exports.isStaticArgOf = isStaticArgOf; -exports.isStaticExp = isStaticExp; -exports.isStaticProperty = isStaticProperty; -exports.isStaticPropertyKey = isStaticPropertyKey; -exports.isTemplateNode = isTemplateNode; -exports.isText = isText$1; -exports.isVSlot = isVSlot; -exports.locStub = locStub; -exports.noopDirectiveTransform = noopDirectiveTransform; -exports.processExpression = processExpression; -exports.processFor = processFor; -exports.processIf = processIf; -exports.processSlotOutlet = processSlotOutlet; -exports.registerRuntimeHelpers = registerRuntimeHelpers; -exports.resolveComponentType = resolveComponentType; -exports.stringifyExpression = stringifyExpression; -exports.toValidAssetId = toValidAssetId; -exports.trackSlotScopes = trackSlotScopes; -exports.trackVForSlotScopes = trackVForSlotScopes; -exports.transform = transform; -exports.transformBind = transformBind; -exports.transformElement = transformElement; -exports.transformExpression = transformExpression; -exports.transformModel = transformModel; -exports.transformOn = transformOn; -exports.traverseNode = traverseNode; -exports.unwrapTSNode = unwrapTSNode; -exports.walkBlockDeclarations = walkBlockDeclarations; -exports.walkFunctionParams = walkFunctionParams; -exports.walkIdentifiers = walkIdentifiers; -exports.warnDeprecation = warnDeprecation; diff --git a/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js b/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js deleted file mode 100644 index 7792261..0000000 --- a/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +++ /dev/null @@ -1,6690 +0,0 @@ -/** -* @vue/compiler-core v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var shared = require('@vue/shared'); -var decode_js = require('entities/lib/decode.js'); -var parser = require('@babel/parser'); -var estreeWalker = require('estree-walker'); -var sourceMapJs = require('source-map-js'); - -const FRAGMENT = Symbol(``); -const TELEPORT = Symbol(``); -const SUSPENSE = Symbol(``); -const KEEP_ALIVE = Symbol(``); -const BASE_TRANSITION = Symbol( - `` -); -const OPEN_BLOCK = Symbol(``); -const CREATE_BLOCK = Symbol(``); -const CREATE_ELEMENT_BLOCK = Symbol( - `` -); -const CREATE_VNODE = Symbol(``); -const CREATE_ELEMENT_VNODE = Symbol( - `` -); -const CREATE_COMMENT = Symbol( - `` -); -const CREATE_TEXT = Symbol( - `` -); -const CREATE_STATIC = Symbol( - `` -); -const RESOLVE_COMPONENT = Symbol( - `` -); -const RESOLVE_DYNAMIC_COMPONENT = Symbol( - `` -); -const RESOLVE_DIRECTIVE = Symbol( - `` -); -const RESOLVE_FILTER = Symbol( - `` -); -const WITH_DIRECTIVES = Symbol( - `` -); -const RENDER_LIST = Symbol(``); -const RENDER_SLOT = Symbol(``); -const CREATE_SLOTS = Symbol(``); -const TO_DISPLAY_STRING = Symbol( - `` -); -const MERGE_PROPS = Symbol(``); -const NORMALIZE_CLASS = Symbol( - `` -); -const NORMALIZE_STYLE = Symbol( - `` -); -const NORMALIZE_PROPS = Symbol( - `` -); -const GUARD_REACTIVE_PROPS = Symbol( - `` -); -const TO_HANDLERS = Symbol(``); -const CAMELIZE = Symbol(``); -const CAPITALIZE = Symbol(``); -const TO_HANDLER_KEY = Symbol( - `` -); -const SET_BLOCK_TRACKING = Symbol( - `` -); -const PUSH_SCOPE_ID = Symbol(``); -const POP_SCOPE_ID = Symbol(``); -const WITH_CTX = Symbol(``); -const UNREF = Symbol(``); -const IS_REF = Symbol(``); -const WITH_MEMO = Symbol(``); -const IS_MEMO_SAME = Symbol(``); -const helperNameMap = { - [FRAGMENT]: `Fragment`, - [TELEPORT]: `Teleport`, - [SUSPENSE]: `Suspense`, - [KEEP_ALIVE]: `KeepAlive`, - [BASE_TRANSITION]: `BaseTransition`, - [OPEN_BLOCK]: `openBlock`, - [CREATE_BLOCK]: `createBlock`, - [CREATE_ELEMENT_BLOCK]: `createElementBlock`, - [CREATE_VNODE]: `createVNode`, - [CREATE_ELEMENT_VNODE]: `createElementVNode`, - [CREATE_COMMENT]: `createCommentVNode`, - [CREATE_TEXT]: `createTextVNode`, - [CREATE_STATIC]: `createStaticVNode`, - [RESOLVE_COMPONENT]: `resolveComponent`, - [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, - [RESOLVE_DIRECTIVE]: `resolveDirective`, - [RESOLVE_FILTER]: `resolveFilter`, - [WITH_DIRECTIVES]: `withDirectives`, - [RENDER_LIST]: `renderList`, - [RENDER_SLOT]: `renderSlot`, - [CREATE_SLOTS]: `createSlots`, - [TO_DISPLAY_STRING]: `toDisplayString`, - [MERGE_PROPS]: `mergeProps`, - [NORMALIZE_CLASS]: `normalizeClass`, - [NORMALIZE_STYLE]: `normalizeStyle`, - [NORMALIZE_PROPS]: `normalizeProps`, - [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, - [TO_HANDLERS]: `toHandlers`, - [CAMELIZE]: `camelize`, - [CAPITALIZE]: `capitalize`, - [TO_HANDLER_KEY]: `toHandlerKey`, - [SET_BLOCK_TRACKING]: `setBlockTracking`, - [PUSH_SCOPE_ID]: `pushScopeId`, - [POP_SCOPE_ID]: `popScopeId`, - [WITH_CTX]: `withCtx`, - [UNREF]: `unref`, - [IS_REF]: `isRef`, - [WITH_MEMO]: `withMemo`, - [IS_MEMO_SAME]: `isMemoSame` -}; -function registerRuntimeHelpers(helpers) { - Object.getOwnPropertySymbols(helpers).forEach((s) => { - helperNameMap[s] = helpers[s]; - }); -} - -const Namespaces = { - "HTML": 0, - "0": "HTML", - "SVG": 1, - "1": "SVG", - "MATH_ML": 2, - "2": "MATH_ML" -}; -const NodeTypes = { - "ROOT": 0, - "0": "ROOT", - "ELEMENT": 1, - "1": "ELEMENT", - "TEXT": 2, - "2": "TEXT", - "COMMENT": 3, - "3": "COMMENT", - "SIMPLE_EXPRESSION": 4, - "4": "SIMPLE_EXPRESSION", - "INTERPOLATION": 5, - "5": "INTERPOLATION", - "ATTRIBUTE": 6, - "6": "ATTRIBUTE", - "DIRECTIVE": 7, - "7": "DIRECTIVE", - "COMPOUND_EXPRESSION": 8, - "8": "COMPOUND_EXPRESSION", - "IF": 9, - "9": "IF", - "IF_BRANCH": 10, - "10": "IF_BRANCH", - "FOR": 11, - "11": "FOR", - "TEXT_CALL": 12, - "12": "TEXT_CALL", - "VNODE_CALL": 13, - "13": "VNODE_CALL", - "JS_CALL_EXPRESSION": 14, - "14": "JS_CALL_EXPRESSION", - "JS_OBJECT_EXPRESSION": 15, - "15": "JS_OBJECT_EXPRESSION", - "JS_PROPERTY": 16, - "16": "JS_PROPERTY", - "JS_ARRAY_EXPRESSION": 17, - "17": "JS_ARRAY_EXPRESSION", - "JS_FUNCTION_EXPRESSION": 18, - "18": "JS_FUNCTION_EXPRESSION", - "JS_CONDITIONAL_EXPRESSION": 19, - "19": "JS_CONDITIONAL_EXPRESSION", - "JS_CACHE_EXPRESSION": 20, - "20": "JS_CACHE_EXPRESSION", - "JS_BLOCK_STATEMENT": 21, - "21": "JS_BLOCK_STATEMENT", - "JS_TEMPLATE_LITERAL": 22, - "22": "JS_TEMPLATE_LITERAL", - "JS_IF_STATEMENT": 23, - "23": "JS_IF_STATEMENT", - "JS_ASSIGNMENT_EXPRESSION": 24, - "24": "JS_ASSIGNMENT_EXPRESSION", - "JS_SEQUENCE_EXPRESSION": 25, - "25": "JS_SEQUENCE_EXPRESSION", - "JS_RETURN_STATEMENT": 26, - "26": "JS_RETURN_STATEMENT" -}; -const ElementTypes = { - "ELEMENT": 0, - "0": "ELEMENT", - "COMPONENT": 1, - "1": "COMPONENT", - "SLOT": 2, - "2": "SLOT", - "TEMPLATE": 3, - "3": "TEMPLATE" -}; -const ConstantTypes = { - "NOT_CONSTANT": 0, - "0": "NOT_CONSTANT", - "CAN_SKIP_PATCH": 1, - "1": "CAN_SKIP_PATCH", - "CAN_CACHE": 2, - "2": "CAN_CACHE", - "CAN_STRINGIFY": 3, - "3": "CAN_STRINGIFY" -}; -const locStub = { - start: { line: 1, column: 1, offset: 0 }, - end: { line: 1, column: 1, offset: 0 }, - source: "" -}; -function createRoot(children, source = "") { - return { - type: 0, - source, - children, - helpers: /* @__PURE__ */ new Set(), - components: [], - directives: [], - hoists: [], - imports: [], - cached: [], - temps: 0, - codegenNode: void 0, - loc: locStub - }; -} -function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { - if (context) { - if (isBlock) { - context.helper(OPEN_BLOCK); - context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); - } else { - context.helper(getVNodeHelper(context.inSSR, isComponent)); - } - if (directives) { - context.helper(WITH_DIRECTIVES); - } - } - return { - type: 13, - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent, - loc - }; -} -function createArrayExpression(elements, loc = locStub) { - return { - type: 17, - loc, - elements - }; -} -function createObjectExpression(properties, loc = locStub) { - return { - type: 15, - loc, - properties - }; -} -function createObjectProperty(key, value) { - return { - type: 16, - loc: locStub, - key: shared.isString(key) ? createSimpleExpression(key, true) : key, - value - }; -} -function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { - return { - type: 4, - loc, - content, - isStatic, - constType: isStatic ? 3 : constType - }; -} -function createInterpolation(content, loc) { - return { - type: 5, - loc, - content: shared.isString(content) ? createSimpleExpression(content, false, loc) : content - }; -} -function createCompoundExpression(children, loc = locStub) { - return { - type: 8, - loc, - children - }; -} -function createCallExpression(callee, args = [], loc = locStub) { - return { - type: 14, - loc, - callee, - arguments: args - }; -} -function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { - return { - type: 18, - params, - returns, - newline, - isSlot, - loc - }; -} -function createConditionalExpression(test, consequent, alternate, newline = true) { - return { - type: 19, - test, - consequent, - alternate, - newline, - loc: locStub - }; -} -function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) { - return { - type: 20, - index, - value, - needPauseTracking, - inVOnce, - needArraySpread: false, - loc: locStub - }; -} -function createBlockStatement(body) { - return { - type: 21, - body, - loc: locStub - }; -} -function createTemplateLiteral(elements) { - return { - type: 22, - elements, - loc: locStub - }; -} -function createIfStatement(test, consequent, alternate) { - return { - type: 23, - test, - consequent, - alternate, - loc: locStub - }; -} -function createAssignmentExpression(left, right) { - return { - type: 24, - left, - right, - loc: locStub - }; -} -function createSequenceExpression(expressions) { - return { - type: 25, - expressions, - loc: locStub - }; -} -function createReturnStatement(returns) { - return { - type: 26, - returns, - loc: locStub - }; -} -function getVNodeHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; -} -function getVNodeBlockHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; -} -function convertToBlock(node, { helper, removeHelper, inSSR }) { - if (!node.isBlock) { - node.isBlock = true; - removeHelper(getVNodeHelper(inSSR, node.isComponent)); - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(inSSR, node.isComponent)); - } -} - -const defaultDelimitersOpen = new Uint8Array([123, 123]); -const defaultDelimitersClose = new Uint8Array([125, 125]); -function isTagStartChar(c) { - return c >= 97 && c <= 122 || c >= 65 && c <= 90; -} -function isWhitespace(c) { - return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; -} -function isEndOfTagSection(c) { - return c === 47 || c === 62 || isWhitespace(c); -} -function toCharCodes(str) { - const ret = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) { - ret[i] = str.charCodeAt(i); - } - return ret; -} -const Sequences = { - Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), - // CDATA[ - CdataEnd: new Uint8Array([93, 93, 62]), - // ]]> - CommentEnd: new Uint8Array([45, 45, 62]), - // `-->` - ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), - // `<\/script` - StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), - // `</style` - TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), - // `</title` - TextareaEnd: new Uint8Array([ - 60, - 47, - 116, - 101, - 120, - 116, - 97, - 114, - 101, - 97 - ]) - // `</textarea -}; -class Tokenizer { - constructor(stack, cbs) { - this.stack = stack; - this.cbs = cbs; - /** The current state the tokenizer is in. */ - this.state = 1; - /** The read buffer. */ - this.buffer = ""; - /** The beginning of the section that is currently being read. */ - this.sectionStart = 0; - /** The index within the buffer that we are currently looking at. */ - this.index = 0; - /** The start of the last entity. */ - this.entityStart = 0; - /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ - this.baseState = 1; - /** For special parsing behavior inside of script and style tags. */ - this.inRCDATA = false; - /** For disabling RCDATA tags handling */ - this.inXML = false; - /** For disabling interpolation parsing in v-pre */ - this.inVPre = false; - /** Record newline positions for fast line / column calculation */ - this.newlines = []; - this.mode = 0; - this.delimiterOpen = defaultDelimitersOpen; - this.delimiterClose = defaultDelimitersClose; - this.delimiterIndex = -1; - this.currentSequence = void 0; - this.sequenceIndex = 0; - { - this.entityDecoder = new decode_js.EntityDecoder( - decode_js.htmlDecodeTree, - (cp, consumed) => this.emitCodePoint(cp, consumed) - ); - } - } - get inSFCRoot() { - return this.mode === 2 && this.stack.length === 0; - } - reset() { - this.state = 1; - this.mode = 0; - this.buffer = ""; - this.sectionStart = 0; - this.index = 0; - this.baseState = 1; - this.inRCDATA = false; - this.currentSequence = void 0; - this.newlines.length = 0; - this.delimiterOpen = defaultDelimitersOpen; - this.delimiterClose = defaultDelimitersClose; - } - /** - * Generate Position object with line / column information using recorded - * newline positions. We know the index is always going to be an already - * processed index, so all the newlines up to this index should have been - * recorded. - */ - getPos(index) { - let line = 1; - let column = index + 1; - for (let i = this.newlines.length - 1; i >= 0; i--) { - const newlineIndex = this.newlines[i]; - if (index > newlineIndex) { - line = i + 2; - column = index - newlineIndex; - break; - } - } - return { - column, - line, - offset: index - }; - } - peek() { - return this.buffer.charCodeAt(this.index + 1); - } - stateText(c) { - if (c === 60) { - if (this.index > this.sectionStart) { - this.cbs.ontext(this.sectionStart, this.index); - } - this.state = 5; - this.sectionStart = this.index; - } else if (c === 38) { - this.startEntity(); - } else if (!this.inVPre && c === this.delimiterOpen[0]) { - this.state = 2; - this.delimiterIndex = 0; - this.stateInterpolationOpen(c); - } - } - stateInterpolationOpen(c) { - if (c === this.delimiterOpen[this.delimiterIndex]) { - if (this.delimiterIndex === this.delimiterOpen.length - 1) { - const start = this.index + 1 - this.delimiterOpen.length; - if (start > this.sectionStart) { - this.cbs.ontext(this.sectionStart, start); - } - this.state = 3; - this.sectionStart = start; - } else { - this.delimiterIndex++; - } - } else if (this.inRCDATA) { - this.state = 32; - this.stateInRCDATA(c); - } else { - this.state = 1; - this.stateText(c); - } - } - stateInterpolation(c) { - if (c === this.delimiterClose[0]) { - this.state = 4; - this.delimiterIndex = 0; - this.stateInterpolationClose(c); - } - } - stateInterpolationClose(c) { - if (c === this.delimiterClose[this.delimiterIndex]) { - if (this.delimiterIndex === this.delimiterClose.length - 1) { - this.cbs.oninterpolation(this.sectionStart, this.index + 1); - if (this.inRCDATA) { - this.state = 32; - } else { - this.state = 1; - } - this.sectionStart = this.index + 1; - } else { - this.delimiterIndex++; - } - } else { - this.state = 3; - this.stateInterpolation(c); - } - } - stateSpecialStartSequence(c) { - const isEnd = this.sequenceIndex === this.currentSequence.length; - const isMatch = isEnd ? ( - // If we are at the end of the sequence, make sure the tag name has ended - isEndOfTagSection(c) - ) : ( - // Otherwise, do a case-insensitive comparison - (c | 32) === this.currentSequence[this.sequenceIndex] - ); - if (!isMatch) { - this.inRCDATA = false; - } else if (!isEnd) { - this.sequenceIndex++; - return; - } - this.sequenceIndex = 0; - this.state = 6; - this.stateInTagName(c); - } - /** Look for an end tag. For <title> and <textarea>, also decode entities. */ - stateInRCDATA(c) { - if (this.sequenceIndex === this.currentSequence.length) { - if (c === 62 || isWhitespace(c)) { - const endOfText = this.index - this.currentSequence.length; - if (this.sectionStart < endOfText) { - const actualIndex = this.index; - this.index = endOfText; - this.cbs.ontext(this.sectionStart, endOfText); - this.index = actualIndex; - } - this.sectionStart = endOfText + 2; - this.stateInClosingTagName(c); - this.inRCDATA = false; - return; - } - this.sequenceIndex = 0; - } - if ((c | 32) === this.currentSequence[this.sequenceIndex]) { - this.sequenceIndex += 1; - } else if (this.sequenceIndex === 0) { - if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { - if (c === 38) { - this.startEntity(); - } else if (!this.inVPre && c === this.delimiterOpen[0]) { - this.state = 2; - this.delimiterIndex = 0; - this.stateInterpolationOpen(c); - } - } else if (this.fastForwardTo(60)) { - this.sequenceIndex = 1; - } - } else { - this.sequenceIndex = Number(c === 60); - } - } - stateCDATASequence(c) { - if (c === Sequences.Cdata[this.sequenceIndex]) { - if (++this.sequenceIndex === Sequences.Cdata.length) { - this.state = 28; - this.currentSequence = Sequences.CdataEnd; - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - } - } else { - this.sequenceIndex = 0; - this.state = 23; - this.stateInDeclaration(c); - } - } - /** - * When we wait for one specific character, we can speed things up - * by skipping through the buffer until we find it. - * - * @returns Whether the character was found. - */ - fastForwardTo(c) { - while (++this.index < this.buffer.length) { - const cc = this.buffer.charCodeAt(this.index); - if (cc === 10) { - this.newlines.push(this.index); - } - if (cc === c) { - return true; - } - } - this.index = this.buffer.length - 1; - return false; - } - /** - * Comments and CDATA end with `-->` and `]]>`. - * - * Their common qualities are: - * - Their end sequences have a distinct character they start with. - * - That character is then repeated, so we have to check multiple repeats. - * - All characters but the start character of the sequence can be skipped. - */ - stateInCommentLike(c) { - if (c === this.currentSequence[this.sequenceIndex]) { - if (++this.sequenceIndex === this.currentSequence.length) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, this.index - 2); - } else { - this.cbs.oncomment(this.sectionStart, this.index - 2); - } - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - this.state = 1; - } - } else if (this.sequenceIndex === 0) { - if (this.fastForwardTo(this.currentSequence[0])) { - this.sequenceIndex = 1; - } - } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { - this.sequenceIndex = 0; - } - } - startSpecial(sequence, offset) { - this.enterRCDATA(sequence, offset); - this.state = 31; - } - enterRCDATA(sequence, offset) { - this.inRCDATA = true; - this.currentSequence = sequence; - this.sequenceIndex = offset; - } - stateBeforeTagName(c) { - if (c === 33) { - this.state = 22; - this.sectionStart = this.index + 1; - } else if (c === 63) { - this.state = 24; - this.sectionStart = this.index + 1; - } else if (isTagStartChar(c)) { - this.sectionStart = this.index; - if (this.mode === 0) { - this.state = 6; - } else if (this.inSFCRoot) { - this.state = 34; - } else if (!this.inXML) { - if (c === 116) { - this.state = 30; - } else { - this.state = c === 115 ? 29 : 6; - } - } else { - this.state = 6; - } - } else if (c === 47) { - this.state = 8; - } else { - this.state = 1; - this.stateText(c); - } - } - stateInTagName(c) { - if (isEndOfTagSection(c)) { - this.handleTagName(c); - } - } - stateInSFCRootTagName(c) { - if (isEndOfTagSection(c)) { - const tag = this.buffer.slice(this.sectionStart, this.index); - if (tag !== "template") { - this.enterRCDATA(toCharCodes(`</` + tag), 0); - } - this.handleTagName(c); - } - } - handleTagName(c) { - this.cbs.onopentagname(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = 11; - this.stateBeforeAttrName(c); - } - stateBeforeClosingTagName(c) { - if (isWhitespace(c)) ; else if (c === 62) { - { - this.cbs.onerr(14, this.index); - } - this.state = 1; - this.sectionStart = this.index + 1; - } else { - this.state = isTagStartChar(c) ? 9 : 27; - this.sectionStart = this.index; - } - } - stateInClosingTagName(c) { - if (c === 62 || isWhitespace(c)) { - this.cbs.onclosetag(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = 10; - this.stateAfterClosingTagName(c); - } - } - stateAfterClosingTagName(c) { - if (c === 62) { - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeAttrName(c) { - if (c === 62) { - this.cbs.onopentagend(this.index); - if (this.inRCDATA) { - this.state = 32; - } else { - this.state = 1; - } - this.sectionStart = this.index + 1; - } else if (c === 47) { - this.state = 7; - if (this.peek() !== 62) { - this.cbs.onerr(22, this.index); - } - } else if (c === 60 && this.peek() === 47) { - this.cbs.onopentagend(this.index); - this.state = 5; - this.sectionStart = this.index; - } else if (!isWhitespace(c)) { - if (c === 61) { - this.cbs.onerr( - 19, - this.index - ); - } - this.handleAttrStart(c); - } - } - handleAttrStart(c) { - if (c === 118 && this.peek() === 45) { - this.state = 13; - this.sectionStart = this.index; - } else if (c === 46 || c === 58 || c === 64 || c === 35) { - this.cbs.ondirname(this.index, this.index + 1); - this.state = 14; - this.sectionStart = this.index + 1; - } else { - this.state = 12; - this.sectionStart = this.index; - } - } - stateInSelfClosingTag(c) { - if (c === 62) { - this.cbs.onselfclosingtag(this.index); - this.state = 1; - this.sectionStart = this.index + 1; - this.inRCDATA = false; - } else if (!isWhitespace(c)) { - this.state = 11; - this.stateBeforeAttrName(c); - } - } - stateInAttrName(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.onattribname(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 34 || c === 39 || c === 60) { - this.cbs.onerr( - 17, - this.index - ); - } - } - stateInDirName(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirname(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 58) { - this.cbs.ondirname(this.sectionStart, this.index); - this.state = 14; - this.sectionStart = this.index + 1; - } else if (c === 46) { - this.cbs.ondirname(this.sectionStart, this.index); - this.state = 16; - this.sectionStart = this.index + 1; - } - } - stateInDirArg(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirarg(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 91) { - this.state = 15; - } else if (c === 46) { - this.cbs.ondirarg(this.sectionStart, this.index); - this.state = 16; - this.sectionStart = this.index + 1; - } - } - stateInDynamicDirArg(c) { - if (c === 93) { - this.state = 14; - } else if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirarg(this.sectionStart, this.index + 1); - this.handleAttrNameEnd(c); - { - this.cbs.onerr( - 27, - this.index - ); - } - } - } - stateInDirModifier(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirmodifier(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 46) { - this.cbs.ondirmodifier(this.sectionStart, this.index); - this.sectionStart = this.index + 1; - } - } - handleAttrNameEnd(c) { - this.sectionStart = this.index; - this.state = 17; - this.cbs.onattribnameend(this.index); - this.stateAfterAttrName(c); - } - stateAfterAttrName(c) { - if (c === 61) { - this.state = 18; - } else if (c === 47 || c === 62) { - this.cbs.onattribend(0, this.sectionStart); - this.sectionStart = -1; - this.state = 11; - this.stateBeforeAttrName(c); - } else if (!isWhitespace(c)) { - this.cbs.onattribend(0, this.sectionStart); - this.handleAttrStart(c); - } - } - stateBeforeAttrValue(c) { - if (c === 34) { - this.state = 19; - this.sectionStart = this.index + 1; - } else if (c === 39) { - this.state = 20; - this.sectionStart = this.index + 1; - } else if (!isWhitespace(c)) { - this.sectionStart = this.index; - this.state = 21; - this.stateInAttrValueNoQuotes(c); - } - } - handleInAttrValue(c, quote) { - if (c === quote || false) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend( - quote === 34 ? 3 : 2, - this.index + 1 - ); - this.state = 11; - } else if (c === 38) { - this.startEntity(); - } - } - stateInAttrValueDoubleQuotes(c) { - this.handleInAttrValue(c, 34); - } - stateInAttrValueSingleQuotes(c) { - this.handleInAttrValue(c, 39); - } - stateInAttrValueNoQuotes(c) { - if (isWhitespace(c) || c === 62) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend(1, this.index); - this.state = 11; - this.stateBeforeAttrName(c); - } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { - this.cbs.onerr( - 18, - this.index - ); - } else if (c === 38) { - this.startEntity(); - } - } - stateBeforeDeclaration(c) { - if (c === 91) { - this.state = 26; - this.sequenceIndex = 0; - } else { - this.state = c === 45 ? 25 : 23; - } - } - stateInDeclaration(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateInProcessingInstruction(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.cbs.onprocessinginstruction(this.sectionStart, this.index); - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeComment(c) { - if (c === 45) { - this.state = 28; - this.currentSequence = Sequences.CommentEnd; - this.sequenceIndex = 2; - this.sectionStart = this.index + 1; - } else { - this.state = 23; - } - } - stateInSpecialComment(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.cbs.oncomment(this.sectionStart, this.index); - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeSpecialS(c) { - if (c === Sequences.ScriptEnd[3]) { - this.startSpecial(Sequences.ScriptEnd, 4); - } else if (c === Sequences.StyleEnd[3]) { - this.startSpecial(Sequences.StyleEnd, 4); - } else { - this.state = 6; - this.stateInTagName(c); - } - } - stateBeforeSpecialT(c) { - if (c === Sequences.TitleEnd[3]) { - this.startSpecial(Sequences.TitleEnd, 4); - } else if (c === Sequences.TextareaEnd[3]) { - this.startSpecial(Sequences.TextareaEnd, 4); - } else { - this.state = 6; - this.stateInTagName(c); - } - } - startEntity() { - { - this.baseState = this.state; - this.state = 33; - this.entityStart = this.index; - this.entityDecoder.startEntity( - this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute - ); - } - } - stateInEntity() { - { - const length = this.entityDecoder.write(this.buffer, this.index); - if (length >= 0) { - this.state = this.baseState; - if (length === 0) { - this.index = this.entityStart; - } - } else { - this.index = this.buffer.length - 1; - } - } - } - /** - * Iterates through the buffer, calling the function corresponding to the current state. - * - * States that are more likely to be hit are higher up, as a performance improvement. - */ - parse(input) { - this.buffer = input; - while (this.index < this.buffer.length) { - const c = this.buffer.charCodeAt(this.index); - if (c === 10) { - this.newlines.push(this.index); - } - switch (this.state) { - case 1: { - this.stateText(c); - break; - } - case 2: { - this.stateInterpolationOpen(c); - break; - } - case 3: { - this.stateInterpolation(c); - break; - } - case 4: { - this.stateInterpolationClose(c); - break; - } - case 31: { - this.stateSpecialStartSequence(c); - break; - } - case 32: { - this.stateInRCDATA(c); - break; - } - case 26: { - this.stateCDATASequence(c); - break; - } - case 19: { - this.stateInAttrValueDoubleQuotes(c); - break; - } - case 12: { - this.stateInAttrName(c); - break; - } - case 13: { - this.stateInDirName(c); - break; - } - case 14: { - this.stateInDirArg(c); - break; - } - case 15: { - this.stateInDynamicDirArg(c); - break; - } - case 16: { - this.stateInDirModifier(c); - break; - } - case 28: { - this.stateInCommentLike(c); - break; - } - case 27: { - this.stateInSpecialComment(c); - break; - } - case 11: { - this.stateBeforeAttrName(c); - break; - } - case 6: { - this.stateInTagName(c); - break; - } - case 34: { - this.stateInSFCRootTagName(c); - break; - } - case 9: { - this.stateInClosingTagName(c); - break; - } - case 5: { - this.stateBeforeTagName(c); - break; - } - case 17: { - this.stateAfterAttrName(c); - break; - } - case 20: { - this.stateInAttrValueSingleQuotes(c); - break; - } - case 18: { - this.stateBeforeAttrValue(c); - break; - } - case 8: { - this.stateBeforeClosingTagName(c); - break; - } - case 10: { - this.stateAfterClosingTagName(c); - break; - } - case 29: { - this.stateBeforeSpecialS(c); - break; - } - case 30: { - this.stateBeforeSpecialT(c); - break; - } - case 21: { - this.stateInAttrValueNoQuotes(c); - break; - } - case 7: { - this.stateInSelfClosingTag(c); - break; - } - case 23: { - this.stateInDeclaration(c); - break; - } - case 22: { - this.stateBeforeDeclaration(c); - break; - } - case 25: { - this.stateBeforeComment(c); - break; - } - case 24: { - this.stateInProcessingInstruction(c); - break; - } - case 33: { - this.stateInEntity(); - break; - } - } - this.index++; - } - this.cleanup(); - this.finish(); - } - /** - * Remove data that has already been consumed from the buffer. - */ - cleanup() { - if (this.sectionStart !== this.index) { - if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { - this.cbs.ontext(this.sectionStart, this.index); - this.sectionStart = this.index; - } else if (this.state === 19 || this.state === 20 || this.state === 21) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = this.index; - } - } - } - finish() { - if (this.state === 33) { - this.entityDecoder.end(); - this.state = this.baseState; - } - this.handleTrailingData(); - this.cbs.onend(); - } - /** Handle any trailing data. */ - handleTrailingData() { - const endIndex = this.buffer.length; - if (this.sectionStart >= endIndex) { - return; - } - if (this.state === 28) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, endIndex); - } else { - this.cbs.oncomment(this.sectionStart, endIndex); - } - } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { - this.cbs.ontext(this.sectionStart, endIndex); - } - } - emitCodePoint(cp, consumed) { - { - if (this.baseState !== 1 && this.baseState !== 32) { - if (this.sectionStart < this.entityStart) { - this.cbs.onattribdata(this.sectionStart, this.entityStart); - } - this.sectionStart = this.entityStart + consumed; - this.index = this.sectionStart - 1; - this.cbs.onattribentity( - decode_js.fromCodePoint(cp), - this.entityStart, - this.sectionStart - ); - } else { - if (this.sectionStart < this.entityStart) { - this.cbs.ontext(this.sectionStart, this.entityStart); - } - this.sectionStart = this.entityStart + consumed; - this.index = this.sectionStart - 1; - this.cbs.ontextentity( - decode_js.fromCodePoint(cp), - this.entityStart, - this.sectionStart - ); - } - } - } -} - -const CompilerDeprecationTypes = { - "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", - "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", - "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", - "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", - "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", - "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", - "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", - "COMPILER_FILTERS": "COMPILER_FILTERS" -}; -const deprecationData = { - ["COMPILER_IS_ON_ELEMENT"]: { - message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC"]: { - message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_OBJECT_ORDER"]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE"]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { - message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE"]: { - message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE"]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTERS"]: { - message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } -}; -function getCompatValue(key, { compatConfig }) { - const value = compatConfig && compatConfig[key]; - if (key === "MODE") { - return value || 3; - } else { - return value; - } -} -function isCompatEnabled(key, context) { - const mode = getCompatValue("MODE", context); - const value = getCompatValue(key, context); - return mode === 3 ? value === true : value !== false; -} -function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - return enabled; -} -function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === "suppress-warning") { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` - Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) err.loc = loc; - context.onWarn(err); -} - -function defaultOnError(error) { - throw error; -} -function defaultOnWarn(msg) { -} -function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; -} -const ErrorCodes = { - "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, - "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", - "CDATA_IN_HTML_CONTENT": 1, - "1": "CDATA_IN_HTML_CONTENT", - "DUPLICATE_ATTRIBUTE": 2, - "2": "DUPLICATE_ATTRIBUTE", - "END_TAG_WITH_ATTRIBUTES": 3, - "3": "END_TAG_WITH_ATTRIBUTES", - "END_TAG_WITH_TRAILING_SOLIDUS": 4, - "4": "END_TAG_WITH_TRAILING_SOLIDUS", - "EOF_BEFORE_TAG_NAME": 5, - "5": "EOF_BEFORE_TAG_NAME", - "EOF_IN_CDATA": 6, - "6": "EOF_IN_CDATA", - "EOF_IN_COMMENT": 7, - "7": "EOF_IN_COMMENT", - "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, - "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", - "EOF_IN_TAG": 9, - "9": "EOF_IN_TAG", - "INCORRECTLY_CLOSED_COMMENT": 10, - "10": "INCORRECTLY_CLOSED_COMMENT", - "INCORRECTLY_OPENED_COMMENT": 11, - "11": "INCORRECTLY_OPENED_COMMENT", - "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, - "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", - "MISSING_ATTRIBUTE_VALUE": 13, - "13": "MISSING_ATTRIBUTE_VALUE", - "MISSING_END_TAG_NAME": 14, - "14": "MISSING_END_TAG_NAME", - "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, - "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", - "NESTED_COMMENT": 16, - "16": "NESTED_COMMENT", - "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, - "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", - "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, - "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", - "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, - "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", - "UNEXPECTED_NULL_CHARACTER": 20, - "20": "UNEXPECTED_NULL_CHARACTER", - "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, - "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", - "UNEXPECTED_SOLIDUS_IN_TAG": 22, - "22": "UNEXPECTED_SOLIDUS_IN_TAG", - "X_INVALID_END_TAG": 23, - "23": "X_INVALID_END_TAG", - "X_MISSING_END_TAG": 24, - "24": "X_MISSING_END_TAG", - "X_MISSING_INTERPOLATION_END": 25, - "25": "X_MISSING_INTERPOLATION_END", - "X_MISSING_DIRECTIVE_NAME": 26, - "26": "X_MISSING_DIRECTIVE_NAME", - "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, - "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", - "X_V_IF_NO_EXPRESSION": 28, - "28": "X_V_IF_NO_EXPRESSION", - "X_V_IF_SAME_KEY": 29, - "29": "X_V_IF_SAME_KEY", - "X_V_ELSE_NO_ADJACENT_IF": 30, - "30": "X_V_ELSE_NO_ADJACENT_IF", - "X_V_FOR_NO_EXPRESSION": 31, - "31": "X_V_FOR_NO_EXPRESSION", - "X_V_FOR_MALFORMED_EXPRESSION": 32, - "32": "X_V_FOR_MALFORMED_EXPRESSION", - "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, - "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", - "X_V_BIND_NO_EXPRESSION": 34, - "34": "X_V_BIND_NO_EXPRESSION", - "X_V_ON_NO_EXPRESSION": 35, - "35": "X_V_ON_NO_EXPRESSION", - "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, - "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", - "X_V_SLOT_MIXED_SLOT_USAGE": 37, - "37": "X_V_SLOT_MIXED_SLOT_USAGE", - "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, - "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", - "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, - "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", - "X_V_SLOT_MISPLACED": 40, - "40": "X_V_SLOT_MISPLACED", - "X_V_MODEL_NO_EXPRESSION": 41, - "41": "X_V_MODEL_NO_EXPRESSION", - "X_V_MODEL_MALFORMED_EXPRESSION": 42, - "42": "X_V_MODEL_MALFORMED_EXPRESSION", - "X_V_MODEL_ON_SCOPE_VARIABLE": 43, - "43": "X_V_MODEL_ON_SCOPE_VARIABLE", - "X_V_MODEL_ON_PROPS": 44, - "44": "X_V_MODEL_ON_PROPS", - "X_INVALID_EXPRESSION": 45, - "45": "X_INVALID_EXPRESSION", - "X_KEEP_ALIVE_INVALID_CHILDREN": 46, - "46": "X_KEEP_ALIVE_INVALID_CHILDREN", - "X_PREFIX_ID_NOT_SUPPORTED": 47, - "47": "X_PREFIX_ID_NOT_SUPPORTED", - "X_MODULE_MODE_NOT_SUPPORTED": 48, - "48": "X_MODULE_MODE_NOT_SUPPORTED", - "X_CACHE_HANDLER_NOT_SUPPORTED": 49, - "49": "X_CACHE_HANDLER_NOT_SUPPORTED", - "X_SCOPE_ID_NOT_SUPPORTED": 50, - "50": "X_SCOPE_ID_NOT_SUPPORTED", - "X_VNODE_HOOKS": 51, - "51": "X_VNODE_HOOKS", - "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52, - "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", - "__EXTEND_POINT__": 53, - "53": "__EXTEND_POINT__" -}; -const errorMessages = { - // parse errors - [0]: "Illegal comment.", - [1]: "CDATA section is allowed only in XML context.", - [2]: "Duplicate attribute.", - [3]: "End tag cannot have attributes.", - [4]: "Illegal '/' in tags.", - [5]: "Unexpected EOF in tag.", - [6]: "Unexpected EOF in CDATA section.", - [7]: "Unexpected EOF in comment.", - [8]: "Unexpected EOF in script.", - [9]: "Unexpected EOF in tag.", - [10]: "Incorrectly closed comment.", - [11]: "Incorrectly opened comment.", - [12]: "Illegal tag name. Use '<' to print '<'.", - [13]: "Attribute value was expected.", - [14]: "End tag name was expected.", - [15]: "Whitespace was expected.", - [16]: "Unexpected '<!--' in comment.", - [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, - [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", - [19]: "Attribute name cannot start with '='.", - [21]: "'<?' is allowed only in XML context.", - [20]: `Unexpected null character.`, - [22]: "Illegal '/' in tags.", - // Vue-specific parse errors - [23]: "Invalid end tag.", - [24]: "Element is missing end tag.", - [25]: "Interpolation end sign was not found.", - [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", - [26]: "Legal directive name was expected.", - // transform errors - [28]: `v-if/v-else-if is missing expression.`, - [29]: `v-if/else branches must use unique keys.`, - [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, - [31]: `v-for is missing expression.`, - [32]: `v-for has invalid expression.`, - [33]: `<template v-for> key should be placed on the <template> tag.`, - [34]: `v-bind is missing expression.`, - [52]: `v-bind with same-name shorthand only allows static argument.`, - [35]: `v-on is missing expression.`, - [36]: `Unexpected custom directive on <slot> outlet.`, - [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, - [38]: `Duplicate slot names found. `, - [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, - [40]: `v-slot can only be used on components or <template> tags.`, - [41]: `v-model is missing expression.`, - [42]: `v-model value must be a valid JavaScript member expression.`, - [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, - [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. -Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, - [45]: `Error parsing JavaScript expression: `, - [46]: `<KeepAlive> expects exactly one child component.`, - [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, - // generic errors - [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, - [48]: `ES module mode is not supported in this build of compiler.`, - [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, - [50]: `"scopeId" option is only supported in module mode.`, - // just to fulfill types - [53]: `` -}; - -function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { - const rootExp = root.type === "Program" ? root.body[0].type === "ExpressionStatement" && root.body[0].expression : root; - estreeWalker.walk(root, { - enter(node, parent) { - parent && parentStack.push(parent); - if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) { - return this.skip(); - } - if (node.type === "Identifier") { - const isLocal = !!knownIds[node.name]; - const isRefed = isReferencedIdentifier(node, parent, parentStack); - if (includeAll || isRefed && !isLocal) { - onIdentifier(node, parent, parentStack, isRefed, isLocal); - } - } else if (node.type === "ObjectProperty" && // eslint-disable-next-line no-restricted-syntax - (parent == null ? void 0 : parent.type) === "ObjectPattern") { - node.inPattern = true; - } else if (isFunctionType(node)) { - if (node.scopeIds) { - node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); - } else { - walkFunctionParams( - node, - (id) => markScopeIdentifier(node, id, knownIds) - ); - } - } else if (node.type === "BlockStatement") { - if (node.scopeIds) { - node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); - } else { - walkBlockDeclarations( - node, - (id) => markScopeIdentifier(node, id, knownIds) - ); - } - } else if (node.type === "CatchClause" && node.param) { - for (const id of extractIdentifiers(node.param)) { - markScopeIdentifier(node, id, knownIds); - } - } else if (isForStatement(node)) { - walkForStatement( - node, - false, - (id) => markScopeIdentifier(node, id, knownIds) - ); - } - }, - leave(node, parent) { - parent && parentStack.pop(); - if (node !== rootExp && node.scopeIds) { - for (const id of node.scopeIds) { - knownIds[id]--; - if (knownIds[id] === 0) { - delete knownIds[id]; - } - } - } - } - }); -} -function isReferencedIdentifier(id, parent, parentStack) { - if (!parent) { - return true; - } - if (id.name === "arguments") { - return false; - } - if (isReferenced(id, parent)) { - return true; - } - switch (parent.type) { - case "AssignmentExpression": - case "AssignmentPattern": - return true; - case "ObjectPattern": - case "ArrayPattern": - return isInDestructureAssignment(parent, parentStack); - } - return false; -} -function isInDestructureAssignment(parent, parentStack) { - if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === "AssignmentExpression") { - return true; - } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { - break; - } - } - } - return false; -} -function isInNewExpression(parentStack) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === "NewExpression") { - return true; - } else if (p.type !== "MemberExpression") { - break; - } - } - return false; -} -function walkFunctionParams(node, onIdent) { - for (const p of node.params) { - for (const id of extractIdentifiers(p)) { - onIdent(id); - } - } -} -function walkBlockDeclarations(block, onIdent) { - for (const stmt of block.body) { - if (stmt.type === "VariableDeclaration") { - if (stmt.declare) continue; - for (const decl of stmt.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { - if (stmt.declare || !stmt.id) continue; - onIdent(stmt.id); - } else if (isForStatement(stmt)) { - walkForStatement(stmt, true, onIdent); - } - } -} -function isForStatement(stmt) { - return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement"; -} -function walkForStatement(stmt, isVar, onIdent) { - const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; - if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) { - for (const decl of variable.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } -} -function extractIdentifiers(param, nodes = []) { - switch (param.type) { - case "Identifier": - nodes.push(param); - break; - case "MemberExpression": - let object = param; - while (object.type === "MemberExpression") { - object = object.object; - } - nodes.push(object); - break; - case "ObjectPattern": - for (const prop of param.properties) { - if (prop.type === "RestElement") { - extractIdentifiers(prop.argument, nodes); - } else { - extractIdentifiers(prop.value, nodes); - } - } - break; - case "ArrayPattern": - param.elements.forEach((element) => { - if (element) extractIdentifiers(element, nodes); - }); - break; - case "RestElement": - extractIdentifiers(param.argument, nodes); - break; - case "AssignmentPattern": - extractIdentifiers(param.left, nodes); - break; - } - return nodes; -} -function markKnownIds(name, knownIds) { - if (name in knownIds) { - knownIds[name]++; - } else { - knownIds[name] = 1; - } -} -function markScopeIdentifier(node, child, knownIds) { - const { name } = child; - if (node.scopeIds && node.scopeIds.has(name)) { - return; - } - markKnownIds(name, knownIds); - (node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name); -} -const isFunctionType = (node) => { - return /Function(?:Expression|Declaration)$|Method$/.test(node.type); -}; -const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; -const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; -function isReferenced(node, parent, grandparent) { - switch (parent.type) { - // yes: PARENT[NODE] - // yes: NODE.child - // no: parent.NODE - case "MemberExpression": - case "OptionalMemberExpression": - if (parent.property === node) { - return !!parent.computed; - } - return parent.object === node; - case "JSXMemberExpression": - return parent.object === node; - // no: let NODE = init; - // yes: let id = NODE; - case "VariableDeclarator": - return parent.init === node; - // yes: () => NODE - // no: (NODE) => {} - case "ArrowFunctionExpression": - return parent.body === node; - // no: class { #NODE; } - // no: class { get #NODE() {} } - // no: class { #NODE() {} } - // no: class { fn() { return this.#NODE; } } - case "PrivateName": - return false; - // no: class { NODE() {} } - // yes: class { [NODE]() {} } - // no: class { foo(NODE) {} } - case "ClassMethod": - case "ClassPrivateMethod": - case "ObjectMethod": - if (parent.key === node) { - return !!parent.computed; - } - return false; - // yes: { [NODE]: "" } - // no: { NODE: "" } - // depends: { NODE } - // depends: { key: NODE } - case "ObjectProperty": - if (parent.key === node) { - return !!parent.computed; - } - return !grandparent; - // no: class { NODE = value; } - // yes: class { [NODE] = value; } - // yes: class { key = NODE; } - case "ClassProperty": - if (parent.key === node) { - return !!parent.computed; - } - return true; - case "ClassPrivateProperty": - return parent.key !== node; - // no: class NODE {} - // yes: class Foo extends NODE {} - case "ClassDeclaration": - case "ClassExpression": - return parent.superClass === node; - // yes: left = NODE; - // no: NODE = right; - case "AssignmentExpression": - return parent.right === node; - // no: [NODE = foo] = []; - // yes: [foo = NODE] = []; - case "AssignmentPattern": - return parent.right === node; - // no: NODE: for (;;) {} - case "LabeledStatement": - return false; - // no: try {} catch (NODE) {} - case "CatchClause": - return false; - // no: function foo(...NODE) {} - case "RestElement": - return false; - case "BreakStatement": - case "ContinueStatement": - return false; - // no: function NODE() {} - // no: function foo(NODE) {} - case "FunctionDeclaration": - case "FunctionExpression": - return false; - // no: export NODE from "foo"; - // no: export * as NODE from "foo"; - case "ExportNamespaceSpecifier": - case "ExportDefaultSpecifier": - return false; - // no: export { foo as NODE }; - // yes: export { NODE as foo }; - // no: export { NODE as foo } from "foo"; - case "ExportSpecifier": - return parent.local === node; - // no: import NODE from "foo"; - // no: import * as NODE from "foo"; - // no: import { NODE as foo } from "foo"; - // no: import { foo as NODE } from "foo"; - // no: import NODE from "bar"; - case "ImportDefaultSpecifier": - case "ImportNamespaceSpecifier": - case "ImportSpecifier": - return false; - // no: import "foo" assert { NODE: "json" } - case "ImportAttribute": - return false; - // no: <div NODE="foo" /> - case "JSXAttribute": - return false; - // no: [NODE] = []; - // no: ({ NODE }) = []; - case "ObjectPattern": - case "ArrayPattern": - return false; - // no: new.NODE - // no: NODE.target - case "MetaProperty": - return false; - // yes: type X = { someProperty: NODE } - // no: type X = { NODE: OtherType } - case "ObjectTypeProperty": - return parent.key !== node; - // yes: enum X { Foo = NODE } - // no: enum X { NODE } - case "TSEnumMember": - return parent.id !== node; - // yes: { [NODE]: value } - // no: { NODE: value } - case "TSPropertySignature": - if (parent.key === node) { - return !!parent.computed; - } - return true; - } - return true; -} -const TS_NODE_TYPES = [ - "TSAsExpression", - // foo as number - "TSTypeAssertion", - // (<number>foo) - "TSNonNullExpression", - // foo! - "TSInstantiationExpression", - // foo<string> - "TSSatisfiesExpression" - // foo satisfies T -]; -function unwrapTSNode(node) { - if (TS_NODE_TYPES.includes(node.type)) { - return unwrapTSNode(node.expression); - } else { - return node; - } -} - -const isStaticExp = (p) => p.type === 4 && p.isStatic; -function isCoreComponent(tag) { - switch (tag) { - case "Teleport": - case "teleport": - return TELEPORT; - case "Suspense": - case "suspense": - return SUSPENSE; - case "KeepAlive": - case "keep-alive": - return KEEP_ALIVE; - case "BaseTransition": - case "base-transition": - return BASE_TRANSITION; - } -} -const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; -const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); -const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; -const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; -const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; -const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; -const isMemberExpressionBrowser = (exp) => { - const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === "[") { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } else if (char === "(") { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === "`") { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } else if (char === `[`) { - currentOpenBracketCount++; - } else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === "`") { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } else if (char === `(`) { - currentOpenParensCount++; - } else if (char === `)`) { - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; - } - } - return !currentOpenBracketCount && !currentOpenParensCount; -}; -const isMemberExpressionNode = (exp, context) => { - try { - let ret = exp.ast || parser.parseExpression(getExpSource(exp), { - plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] - }); - ret = unwrapTSNode(ret); - return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined"; - } catch (e) { - return false; - } -}; -const isMemberExpression = isMemberExpressionNode; -const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; -const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); -const isFnExpressionNode = (exp, context) => { - try { - let ret = exp.ast || parser.parseExpression(getExpSource(exp), { - plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] - }); - if (ret.type === "Program") { - ret = ret.body[0]; - if (ret.type === "ExpressionStatement") { - ret = ret.expression; - } - } - ret = unwrapTSNode(ret); - return ret.type === "FunctionExpression" || ret.type === "ArrowFunctionExpression"; - } catch (e) { - return false; - } -}; -const isFnExpression = isFnExpressionNode; -function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation( - { - offset: pos.offset, - line: pos.line, - column: pos.column - }, - source, - numberOfCharacters - ); -} -function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10) { - linesCount++; - lastNewLinePos = i; - } - } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; - return pos; -} -function assert(condition, msg) { - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } -} -function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && (allowEmpty || p.exp) && (shared.isString(name) ? p.name === name : name.test(p.name))) { - return p; - } - } -} -function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - if (dynamicOnly) continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { - return p; - } - } -} -function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); -} -function hasDynamicKeyVBind(node) { - return node.props.some( - (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" - p.arg.type !== 4 || // v-bind:[_ctx.foo] - !p.arg.isStatic) - // v-bind:[foo] - ); -} -function isText$1(node) { - return node.type === 5 || node.type === 2; -} -function isVSlot(p) { - return p.type === 7 && p.name === "slot"; -} -function isTemplateNode(node) { - return node.type === 1 && node.tagType === 3; -} -function isSlotOutlet(node) { - return node.type === 1 && node.tagType === 2; -} -const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); -function getUnnormalizedProps(props, callPath = []) { - if (props && !shared.isString(props) && props.type === 14) { - const callee = props.callee; - if (!shared.isString(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps( - props.arguments[0], - callPath.concat(props) - ); - } - } - return [props, callPath]; -} -function injectProp(node, prop, context) { - let propsWithInjection; - let props = node.type === 13 ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && !shared.isString(props) && props.type === 14) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || shared.isString(props)) { - propsWithInjection = createObjectExpression([prop]); - } else if (props.type === 14) { - const first = props.arguments[0]; - if (!shared.isString(first) && first.type === 15) { - if (!hasProp(prop, first)) { - first.properties.unshift(prop); - } - } else { - if (props.callee === TO_HANDLERS) { - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } else if (props.type === 15) { - if (!hasProp(prop, props)) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } else { - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } - } - if (node.type === 13) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } else { - node.props = propsWithInjection; - } - } else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } else { - node.arguments[2] = propsWithInjection; - } - } -} -function hasProp(prop, props) { - let result = false; - if (prop.key.type === 4) { - const propKeyName = prop.key.content; - result = props.properties.some( - (p) => p.key.type === 4 && p.key.content === propKeyName - ); - } - return result; -} -function toValidAssetId(name, type) { - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); - })}`; -} -function hasScopeRef(node, ids) { - if (!node || Object.keys(ids).length === 0) { - return false; - } - switch (node.type) { - case 1: - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { - return true; - } - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 11: - if (hasScopeRef(node.source, ids)) { - return true; - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 9: - return node.branches.some((b) => hasScopeRef(b, ids)); - case 10: - if (hasScopeRef(node.condition, ids)) { - return true; - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 4: - return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; - case 8: - return node.children.some((c) => shared.isObject(c) && hasScopeRef(c, ids)); - case 5: - case 12: - return hasScopeRef(node.content, ids); - case 2: - case 3: - case 20: - return false; - default: - return false; - } -} -function getMemoedVNodeCall(node) { - if (node.type === 14 && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } else { - return node; - } -} -const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; - -const defaultParserOptions = { - parseMode: "base", - ns: 0, - delimiters: [`{{`, `}}`], - getNamespace: () => 0, - isVoidTag: shared.NO, - isPreTag: shared.NO, - isIgnoreNewlineTag: shared.NO, - isCustomElement: shared.NO, - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: false, - prefixIdentifiers: false -}; -let currentOptions = defaultParserOptions; -let currentRoot = null; -let currentInput = ""; -let currentOpenTag = null; -let currentProp = null; -let currentAttrValue = ""; -let currentAttrStartIndex = -1; -let currentAttrEndIndex = -1; -let inPre = 0; -let inVPre = false; -let currentVPreBoundary = null; -const stack = []; -const tokenizer = new Tokenizer(stack, { - onerr: emitError, - ontext(start, end) { - onText(getSlice(start, end), start, end); - }, - ontextentity(char, start, end) { - onText(char, start, end); - }, - oninterpolation(start, end) { - if (inVPre) { - return onText(getSlice(start, end), start, end); - } - let innerStart = start + tokenizer.delimiterOpen.length; - let innerEnd = end - tokenizer.delimiterClose.length; - while (isWhitespace(currentInput.charCodeAt(innerStart))) { - innerStart++; - } - while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { - innerEnd--; - } - let exp = getSlice(innerStart, innerEnd); - if (exp.includes("&")) { - { - exp = decode_js.decodeHTML(exp); - } - } - addNode({ - type: 5, - content: createExp(exp, false, getLoc(innerStart, innerEnd)), - loc: getLoc(start, end) - }); - }, - onopentagname(start, end) { - const name = getSlice(start, end); - currentOpenTag = { - type: 1, - tag: name, - ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), - tagType: 0, - // will be refined on tag close - props: [], - children: [], - loc: getLoc(start - 1, end), - codegenNode: void 0 - }; - }, - onopentagend(end) { - endOpenTag(end); - }, - onclosetag(start, end) { - const name = getSlice(start, end); - if (!currentOptions.isVoidTag(name)) { - let found = false; - for (let i = 0; i < stack.length; i++) { - const e = stack[i]; - if (e.tag.toLowerCase() === name.toLowerCase()) { - found = true; - if (i > 0) { - emitError(24, stack[0].loc.start.offset); - } - for (let j = 0; j <= i; j++) { - const el = stack.shift(); - onCloseTag(el, end, j < i); - } - break; - } - } - if (!found) { - emitError(23, backTrack(start, 60)); - } - } - }, - onselfclosingtag(end) { - const name = currentOpenTag.tag; - currentOpenTag.isSelfClosing = true; - endOpenTag(end); - if (stack[0] && stack[0].tag === name) { - onCloseTag(stack.shift(), end); - } - }, - onattribname(start, end) { - currentProp = { - type: 6, - name: getSlice(start, end), - nameLoc: getLoc(start, end), - value: void 0, - loc: getLoc(start) - }; - }, - ondirname(start, end) { - const raw = getSlice(start, end); - const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); - if (!inVPre && name === "") { - emitError(26, start); - } - if (inVPre || name === "") { - currentProp = { - type: 6, - name: raw, - nameLoc: getLoc(start, end), - value: void 0, - loc: getLoc(start) - }; - } else { - currentProp = { - type: 7, - name, - rawName: raw, - exp: void 0, - arg: void 0, - modifiers: raw === "." ? [createSimpleExpression("prop")] : [], - loc: getLoc(start) - }; - if (name === "pre") { - inVPre = tokenizer.inVPre = true; - currentVPreBoundary = currentOpenTag; - const props = currentOpenTag.props; - for (let i = 0; i < props.length; i++) { - if (props[i].type === 7) { - props[i] = dirToAttr(props[i]); - } - } - } - } - }, - ondirarg(start, end) { - if (start === end) return; - const arg = getSlice(start, end); - if (inVPre) { - currentProp.name += arg; - setLocEnd(currentProp.nameLoc, end); - } else { - const isStatic = arg[0] !== `[`; - currentProp.arg = createExp( - isStatic ? arg : arg.slice(1, -1), - isStatic, - getLoc(start, end), - isStatic ? 3 : 0 - ); - } - }, - ondirmodifier(start, end) { - const mod = getSlice(start, end); - if (inVPre) { - currentProp.name += "." + mod; - setLocEnd(currentProp.nameLoc, end); - } else if (currentProp.name === "slot") { - const arg = currentProp.arg; - if (arg) { - arg.content += "." + mod; - setLocEnd(arg.loc, end); - } - } else { - const exp = createSimpleExpression(mod, true, getLoc(start, end)); - currentProp.modifiers.push(exp); - } - }, - onattribdata(start, end) { - currentAttrValue += getSlice(start, end); - if (currentAttrStartIndex < 0) currentAttrStartIndex = start; - currentAttrEndIndex = end; - }, - onattribentity(char, start, end) { - currentAttrValue += char; - if (currentAttrStartIndex < 0) currentAttrStartIndex = start; - currentAttrEndIndex = end; - }, - onattribnameend(end) { - const start = currentProp.loc.start.offset; - const name = getSlice(start, end); - if (currentProp.type === 7) { - currentProp.rawName = name; - } - if (currentOpenTag.props.some( - (p) => (p.type === 7 ? p.rawName : p.name) === name - )) { - emitError(2, start); - } - }, - onattribend(quote, end) { - if (currentOpenTag && currentProp) { - setLocEnd(currentProp.loc, end); - if (quote !== 0) { - if (currentProp.type === 6) { - if (currentProp.name === "class") { - currentAttrValue = condense(currentAttrValue).trim(); - } - if (quote === 1 && !currentAttrValue) { - emitError(13, end); - } - currentProp.value = { - type: 2, - content: currentAttrValue, - loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) - }; - if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { - tokenizer.enterRCDATA(toCharCodes(`</template`), 0); - } - } else { - let expParseMode = 0 /* Normal */; - { - if (currentProp.name === "for") { - expParseMode = 3 /* Skip */; - } else if (currentProp.name === "slot") { - expParseMode = 1 /* Params */; - } else if (currentProp.name === "on" && currentAttrValue.includes(";")) { - expParseMode = 2 /* Statements */; - } - } - currentProp.exp = createExp( - currentAttrValue, - false, - getLoc(currentAttrStartIndex, currentAttrEndIndex), - 0, - expParseMode - ); - if (currentProp.name === "for") { - currentProp.forParseResult = parseForExpression(currentProp.exp); - } - let syncIndex = -1; - if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.findIndex( - (mod) => mod.content === "sync" - )) > -1 && checkCompatEnabled( - "COMPILER_V_BIND_SYNC", - currentOptions, - currentProp.loc, - currentProp.rawName - )) { - currentProp.name = "model"; - currentProp.modifiers.splice(syncIndex, 1); - } - } - } - if (currentProp.type !== 7 || currentProp.name !== "pre") { - currentOpenTag.props.push(currentProp); - } - } - currentAttrValue = ""; - currentAttrStartIndex = currentAttrEndIndex = -1; - }, - oncomment(start, end) { - if (currentOptions.comments) { - addNode({ - type: 3, - content: getSlice(start, end), - loc: getLoc(start - 4, end + 3) - }); - } - }, - onend() { - const end = currentInput.length; - if (tokenizer.state !== 1) { - switch (tokenizer.state) { - case 5: - case 8: - emitError(5, end); - break; - case 3: - case 4: - emitError( - 25, - tokenizer.sectionStart - ); - break; - case 28: - if (tokenizer.currentSequence === Sequences.CdataEnd) { - emitError(6, end); - } else { - emitError(7, end); - } - break; - case 6: - case 7: - case 9: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - // " - case 20: - // ' - case 21: - emitError(9, end); - break; - } - } - for (let index = 0; index < stack.length; index++) { - onCloseTag(stack[index], end - 1); - emitError(24, stack[index].loc.start.offset); - } - }, - oncdata(start, end) { - if (stack[0].ns !== 0) { - onText(getSlice(start, end), start, end); - } else { - emitError(1, start - 9); - } - }, - onprocessinginstruction(start) { - if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { - emitError( - 21, - start - 1 - ); - } - } -}); -const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; -const stripParensRE = /^\(|\)$/g; -function parseForExpression(input) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) return; - const [, LHS, RHS] = inMatch; - const createAliasExpression = (content, offset, asParam = false) => { - const start = loc.start.offset + offset; - const end = start + content.length; - return createExp( - content, - false, - getLoc(start, end), - 0, - asParam ? 1 /* Params */ : 0 /* Normal */ - ); - }; - const result = { - source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: void 0, - key: void 0, - index: void 0, - finalized: false - }; - let valueContent = LHS.trim().replace(stripParensRE, "").trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, "").trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(keyContent, keyOffset, true); - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression( - indexContent, - exp.indexOf( - indexContent, - result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length - ), - true - ); - } - } - } - if (valueContent) { - result.value = createAliasExpression(valueContent, trimmedOffset, true); - } - return result; -} -function getSlice(start, end) { - return currentInput.slice(start, end); -} -function endOpenTag(end) { - if (tokenizer.inSFCRoot) { - currentOpenTag.innerLoc = getLoc(end + 1, end + 1); - } - addNode(currentOpenTag); - const { tag, ns } = currentOpenTag; - if (ns === 0 && currentOptions.isPreTag(tag)) { - inPre++; - } - if (currentOptions.isVoidTag(tag)) { - onCloseTag(currentOpenTag, end); - } else { - stack.unshift(currentOpenTag); - if (ns === 1 || ns === 2) { - tokenizer.inXML = true; - } - } - currentOpenTag = null; -} -function onText(content, start, end) { - const parent = stack[0] || currentRoot; - const lastNode = parent.children[parent.children.length - 1]; - if (lastNode && lastNode.type === 2) { - lastNode.content += content; - setLocEnd(lastNode.loc, end); - } else { - parent.children.push({ - type: 2, - content, - loc: getLoc(start, end) - }); - } -} -function onCloseTag(el, end, isImplied = false) { - if (isImplied) { - setLocEnd(el.loc, backTrack(end, 60)); - } else { - setLocEnd(el.loc, lookAhead(end, 62) + 1); - } - if (tokenizer.inSFCRoot) { - if (el.children.length) { - el.innerLoc.end = shared.extend({}, el.children[el.children.length - 1].loc.end); - } else { - el.innerLoc.end = shared.extend({}, el.innerLoc.start); - } - el.innerLoc.source = getSlice( - el.innerLoc.start.offset, - el.innerLoc.end.offset - ); - } - const { tag, ns, children } = el; - if (!inVPre) { - if (tag === "slot") { - el.tagType = 2; - } else if (isFragmentTemplate(el)) { - el.tagType = 3; - } else if (isComponent(el)) { - el.tagType = 1; - } - } - if (!tokenizer.inRCDATA) { - el.children = condenseWhitespace(children); - } - if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { - const first = children[0]; - if (first && first.type === 2) { - first.content = first.content.replace(/^\r?\n/, ""); - } - } - if (ns === 0 && currentOptions.isPreTag(tag)) { - inPre--; - } - if (currentVPreBoundary === el) { - inVPre = tokenizer.inVPre = false; - currentVPreBoundary = null; - } - if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { - tokenizer.inXML = false; - } - { - const props = el.props; - if (!tokenizer.inSFCRoot && isCompatEnabled( - "COMPILER_NATIVE_TEMPLATE", - currentOptions - ) && el.tag === "template" && !isFragmentTemplate(el)) { - const parent = stack[0] || currentRoot; - const index = parent.children.indexOf(el); - parent.children.splice(index, 1, ...el.children); - } - const inlineTemplateProp = props.find( - (p) => p.type === 6 && p.name === "inline-template" - ); - if (inlineTemplateProp && checkCompatEnabled( - "COMPILER_INLINE_TEMPLATE", - currentOptions, - inlineTemplateProp.loc - ) && el.children.length) { - inlineTemplateProp.value = { - type: 2, - content: getSlice( - el.children[0].loc.start.offset, - el.children[el.children.length - 1].loc.end.offset - ), - loc: inlineTemplateProp.loc - }; - } - } -} -function lookAhead(index, c) { - let i = index; - while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; - return i; -} -function backTrack(index, c) { - let i = index; - while (currentInput.charCodeAt(i) !== c && i >= 0) i--; - return i; -} -const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); -function isFragmentTemplate({ tag, props }) { - if (tag === "template") { - for (let i = 0; i < props.length; i++) { - if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { - return true; - } - } - } - return false; -} -function isComponent({ tag, props }) { - if (currentOptions.isCustomElement(tag)) { - return false; - } - if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { - return true; - } - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6) { - if (p.name === "is" && p.value) { - if (p.value.content.startsWith("vue:")) { - return true; - } else if (checkCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - currentOptions, - p.loc - )) { - return true; - } - } - } else if (// :is on plain element - only treat as component in compat mode - p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - currentOptions, - p.loc - )) { - return true; - } - } - return false; -} -function isUpperCase(c) { - return c > 64 && c < 91; -} -const windowsNewlineRE = /\r\n/g; -function condenseWhitespace(nodes, tag) { - const shouldCondense = currentOptions.whitespace !== "preserve"; - let removedWhitespace = false; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (node.type === 2) { - if (!inPre) { - if (isAllWhitespace(node.content)) { - const prev = nodes[i - 1] && nodes[i - 1].type; - const next = nodes[i + 1] && nodes[i + 1].type; - if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { - removedWhitespace = true; - nodes[i] = null; - } else { - node.content = " "; - } - } else if (shouldCondense) { - node.content = condense(node.content); - } - } else { - node.content = node.content.replace(windowsNewlineRE, "\n"); - } - } - } - return removedWhitespace ? nodes.filter(Boolean) : nodes; -} -function isAllWhitespace(str) { - for (let i = 0; i < str.length; i++) { - if (!isWhitespace(str.charCodeAt(i))) { - return false; - } - } - return true; -} -function hasNewlineChar(str) { - for (let i = 0; i < str.length; i++) { - const c = str.charCodeAt(i); - if (c === 10 || c === 13) { - return true; - } - } - return false; -} -function condense(str) { - let ret = ""; - let prevCharIsWhitespace = false; - for (let i = 0; i < str.length; i++) { - if (isWhitespace(str.charCodeAt(i))) { - if (!prevCharIsWhitespace) { - ret += " "; - prevCharIsWhitespace = true; - } - } else { - ret += str[i]; - prevCharIsWhitespace = false; - } - } - return ret; -} -function addNode(node) { - (stack[0] || currentRoot).children.push(node); -} -function getLoc(start, end) { - return { - start: tokenizer.getPos(start), - // @ts-expect-error allow late attachment - end: end == null ? end : tokenizer.getPos(end), - // @ts-expect-error allow late attachment - source: end == null ? end : getSlice(start, end) - }; -} -function cloneLoc(loc) { - return getLoc(loc.start.offset, loc.end.offset); -} -function setLocEnd(loc, end) { - loc.end = tokenizer.getPos(end); - loc.source = getSlice(loc.start.offset, end); -} -function dirToAttr(dir) { - const attr = { - type: 6, - name: dir.rawName, - nameLoc: getLoc( - dir.loc.start.offset, - dir.loc.start.offset + dir.rawName.length - ), - value: void 0, - loc: dir.loc - }; - if (dir.exp) { - const loc = dir.exp.loc; - if (loc.end.offset < dir.loc.end.offset) { - loc.start.offset--; - loc.start.column--; - loc.end.offset++; - loc.end.column++; - } - attr.value = { - type: 2, - content: dir.exp.content, - loc - }; - } - return attr; -} -function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { - const exp = createSimpleExpression(content, isStatic, loc, constType); - if (!isStatic && currentOptions.prefixIdentifiers && parseMode !== 3 /* Skip */ && content.trim()) { - if (isSimpleIdentifier(content)) { - exp.ast = null; - return exp; - } - try { - const plugins = currentOptions.expressionPlugins; - const options = { - plugins: plugins ? [...plugins, "typescript"] : ["typescript"] - }; - if (parseMode === 2 /* Statements */) { - exp.ast = parser.parse(` ${content} `, options).program; - } else if (parseMode === 1 /* Params */) { - exp.ast = parser.parseExpression(`(${content})=>{}`, options); - } else { - exp.ast = parser.parseExpression(`(${content})`, options); - } - } catch (e) { - exp.ast = false; - emitError(45, loc.start.offset, e.message); - } - } - return exp; -} -function emitError(code, index, message) { - currentOptions.onError( - createCompilerError(code, getLoc(index, index), void 0, message) - ); -} -function reset() { - tokenizer.reset(); - currentOpenTag = null; - currentProp = null; - currentAttrValue = ""; - currentAttrStartIndex = -1; - currentAttrEndIndex = -1; - stack.length = 0; -} -function baseParse(input, options) { - reset(); - currentInput = input; - currentOptions = shared.extend({}, defaultParserOptions); - if (options) { - let key; - for (key in options) { - if (options[key] != null) { - currentOptions[key] = options[key]; - } - } - } - tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; - tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; - const delimiters = options && options.delimiters; - if (delimiters) { - tokenizer.delimiterOpen = toCharCodes(delimiters[0]); - tokenizer.delimiterClose = toCharCodes(delimiters[1]); - } - const root = currentRoot = createRoot([], input); - tokenizer.parse(currentInput); - root.loc = getLoc(0, input.length); - root.children = condenseWhitespace(root.children); - currentRoot = null; - return root; -} - -function cacheStatic(root, context) { - walk( - root, - void 0, - context, - // Root node is unfortunately non-hoistable due to potential parent - // fallthrough attributes. - isSingleElementRoot(root, root.children[0]) - ); -} -function isSingleElementRoot(root, child) { - const { children } = root; - return children.length === 1 && child.type === 1 && !isSlotOutlet(child); -} -function walk(node, parent, context, doNotHoistNode = false, inFor = false) { - const { children } = node; - const toCache = []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.type === 1 && child.tagType === 0) { - const constantType = doNotHoistNode ? 0 : getConstantType(child, context); - if (constantType > 0) { - if (constantType >= 2) { - child.codegenNode.patchFlag = -1; - toCache.push(child); - continue; - } - } else { - const codegenNode = child.codegenNode; - if (codegenNode.type === 13) { - const flag = codegenNode.patchFlag; - if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } - } else if (child.type === 12) { - const constantType = doNotHoistNode ? 0 : getConstantType(child, context); - if (constantType >= 2) { - toCache.push(child); - continue; - } - } - if (child.type === 1) { - const isComponent = child.tagType === 1; - if (isComponent) { - context.scopes.vSlot++; - } - walk(child, node, context, false, inFor); - if (isComponent) { - context.scopes.vSlot--; - } - } else if (child.type === 11) { - walk(child, node, context, child.children.length === 1, true); - } else if (child.type === 9) { - for (let i2 = 0; i2 < child.branches.length; i2++) { - walk( - child.branches[i2], - node, - context, - child.branches[i2].children.length === 1, - inFor - ); - } - } - } - let cachedAsArray = false; - if (toCache.length === children.length && node.type === 1) { - if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && shared.isArray(node.codegenNode.children)) { - node.codegenNode.children = getCacheExpression( - createArrayExpression(node.codegenNode.children) - ); - cachedAsArray = true; - } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !shared.isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) { - const slot = getSlotNode(node.codegenNode, "default"); - if (slot) { - slot.returns = getCacheExpression( - createArrayExpression(slot.returns) - ); - cachedAsArray = true; - } - } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !shared.isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { - const slotName = findDir(node, "slot", true); - const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); - if (slot) { - slot.returns = getCacheExpression( - createArrayExpression(slot.returns) - ); - cachedAsArray = true; - } - } - } - if (!cachedAsArray) { - for (const child of toCache) { - child.codegenNode = context.cache(child.codegenNode); - } - } - function getCacheExpression(value) { - const exp = context.cache(value); - if (inFor && context.hmr) { - exp.needArraySpread = true; - } - return exp; - } - function getSlotNode(node2, name) { - if (node2.children && !shared.isArray(node2.children) && node2.children.type === 15) { - const slot = node2.children.properties.find( - (p) => p.key === name || p.key.content === name - ); - return slot && slot.value; - } - } - if (toCache.length && context.transformHoist) { - context.transformHoist(children, context, node); - } -} -function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1: - if (node.tagType !== 0) { - return 0; - } - const cached = constantCache.get(node); - if (cached !== void 0) { - return cached; - } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13) { - return 0; - } - if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { - return 0; - } - if (codegenNode.patchFlag === void 0) { - let returnType2 = 3; - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0) { - constantCache.set(node, 0); - return 0; - } - if (generatedPropsType < returnType2) { - returnType2 = generatedPropsType; - } - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0) { - constantCache.set(node, 0); - return 0; - } - if (childType < returnType2) { - returnType2 = childType; - } - } - if (returnType2 > 1) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && p.name === "bind" && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0) { - constantCache.set(node, 0); - return 0; - } - if (expType < returnType2) { - returnType2 = expType; - } - } - } - } - if (codegenNode.isBlock) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7) { - constantCache.set(node, 0); - return 0; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper( - getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) - ); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType2); - return returnType2; - } else { - constantCache.set(node, 0); - return 0; - } - case 2: - case 3: - return 3; - case 9: - case 11: - case 10: - return 0; - case 5: - case 12: - return getConstantType(node.content, context); - case 4: - return node.constType; - case 8: - let returnType = 3; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (shared.isString(child) || shared.isSymbol(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0) { - return 0; - } else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - case 20: - return 2; - default: - return 0; - } -} -const allowHoistedHelperSet = /* @__PURE__ */ new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS -]); -function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 && !shared.isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4) { - return getConstantType(arg, context); - } else if (arg.type === 14) { - return getConstantTypeOfHelperCall(arg, context); - } - } - return 0; -} -function getGeneratedPropsConstantType(node, context) { - let returnType = 3; - const props = getNodeProps(node); - if (props && props.type === 15) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4) { - valueType = getConstantType(value, context); - } else if (value.type === 14) { - valueType = getConstantTypeOfHelperCall(value, context); - } else { - valueType = 0; - } - if (valueType === 0) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } - } - return returnType; -} -function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13) { - return codegenNode.props; - } -} - -function createTransformContext(root, { - filename = "", - prefixIdentifiers = false, - hoistStatic = false, - hmr = false, - cacheHandlers = false, - nodeTransforms = [], - directiveTransforms = {}, - transformHoist = null, - isBuiltInComponent = shared.NOOP, - isCustomElement = shared.NOOP, - expressionPlugins = [], - scopeId = null, - slotted = true, - ssr = false, - inSSR = false, - ssrCssVars = ``, - bindingMetadata = shared.EMPTY_OBJ, - inline = false, - isTS = false, - onError = defaultOnError, - onWarn = defaultOnWarn, - compatConfig -}) { - const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); - const context = { - // options - filename, - selfName: nameMatch && shared.capitalize(shared.camelize(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - hmr, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: /* @__PURE__ */ new Map(), - components: /* @__PURE__ */ new Set(), - directives: /* @__PURE__ */ new Set(), - hoists: [], - imports: [], - cached: [], - constantCache: /* @__PURE__ */ new WeakMap(), - temps: 0, - identifiers: /* @__PURE__ */ Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - grandParent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - const list = context.parent.children; - const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; - if (!node || node === context.currentNode) { - context.currentNode = null; - context.onNodeRemoved(); - } else { - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: shared.NOOP, - addIdentifiers(exp) { - { - if (shared.isString(exp)) { - addId(exp); - } else if (exp.identifiers) { - exp.identifiers.forEach(addId); - } else if (exp.type === 4) { - addId(exp.content); - } - } - }, - removeIdentifiers(exp) { - { - if (shared.isString(exp)) { - removeId(exp); - } else if (exp.identifiers) { - exp.identifiers.forEach(removeId); - } else if (exp.type === 4) { - removeId(exp.content); - } - } - }, - hoist(exp) { - if (shared.isString(exp)) exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression( - `_hoisted_${context.hoists.length}`, - false, - exp.loc, - 2 - ); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false, inVOnce = false) { - const cacheExp = createCacheExpression( - context.cached.length, - exp, - isVNode, - inVOnce - ); - context.cached.push(cacheExp); - return cacheExp; - } - }; - { - context.filters = /* @__PURE__ */ new Set(); - } - function addId(id) { - const { identifiers } = context; - if (identifiers[id] === void 0) { - identifiers[id] = 0; - } - identifiers[id]++; - } - function removeId(id) { - context.identifiers[id]--; - } - return context; -} -function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - cacheStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; - root.transformed = true; - { - root.filters = [...context.filters]; - } -} -function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - if (isSingleElementRoot(root, child) && child.codegenNode) { - const codegenNode = child.codegenNode; - if (codegenNode.type === 13) { - convertToBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } else { - root.codegenNode = child; - } - } else if (children.length > 1) { - let patchFlag = 64; - root.codegenNode = createVNodeCall( - context, - helper(FRAGMENT), - void 0, - root.children, - patchFlag, - void 0, - void 0, - true, - void 0, - false - ); - } else ; -} -function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (shared.isString(child)) continue; - context.grandParent = context.parent; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } -} -function traverseNode(node, context) { - context.currentNode = node; - const { nodeTransforms } = context; - const exitFns = []; - for (let i2 = 0; i2 < nodeTransforms.length; i2++) { - const onExit = nodeTransforms[i2](node, context); - if (onExit) { - if (shared.isArray(onExit)) { - exitFns.push(...onExit); - } else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - return; - } else { - node = context.currentNode; - } - } - switch (node.type) { - case 3: - if (!context.ssr) { - context.helper(CREATE_COMMENT); - } - break; - case 5: - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9: - for (let i2 = 0; i2 < node.branches.length; i2++) { - traverseNode(node.branches[i2], context); - } - break; - case 10: - case 11: - case 1: - case 0: - traverseChildren(node, context); - break; - } - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); - } -} -function createStructuralDirectiveTransform(name, fn) { - const matches = shared.isString(name) ? (n) => n === name : (n) => name.test(n); - return (node, context) => { - if (node.type === 1) { - const { props } = node; - if (node.tagType === 3 && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 && matches(prop.name)) { - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) exitFns.push(onExit); - } - } - return exitFns; - } - }; -} - -const PURE_ANNOTATION = `/*@__PURE__*/`; -const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; -function createCodegenContext(ast, { - mode = "function", - prefixIdentifiers = mode === "module", - sourceMap = false, - filename = `template.vue.html`, - scopeId = null, - optimizeImports = false, - runtimeGlobalName = `Vue`, - runtimeModuleName = `vue`, - ssrRuntimeModuleName = "vue/server-renderer", - ssr = false, - isTS = false, - inSSR = false -}) { - const context = { - mode, - prefixIdentifiers, - sourceMap, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: void 0, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, newlineIndex = -2 /* None */, node) { - context.code += code; - if (context.map) { - if (node) { - let name; - if (node.type === 4 && !node.isStatic) { - const content = node.content.replace(/^_ctx\./, ""); - if (content !== node.content && isSimpleIdentifier(content)) { - name = content; - } - } - addMapping(node.loc.start, name); - } - if (newlineIndex === -3 /* Unknown */) { - advancePositionWithMutation(context, code); - } else { - context.offset += code.length; - if (newlineIndex === -2 /* None */) { - context.column += code.length; - } else { - if (newlineIndex === -1 /* End */) { - newlineIndex = code.length - 1; - } - context.line++; - context.column = code.length - newlineIndex; - } - } - if (node && node.loc !== locStub) { - addMapping(node.loc.end); - } - } - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); - } - }; - function newline(n) { - context.push("\n" + ` `.repeat(n), 0 /* Start */); - } - function addMapping(loc, name = null) { - const { _names, _mappings } = context.map; - if (name !== null && !_names.has(name)) _names.add(name); - _mappings.add({ - originalLine: loc.line, - originalColumn: loc.column - 1, - // source-map column is 0 based - generatedLine: context.line, - generatedColumn: context.column - 1, - source: filename, - name - }); - } - if (sourceMap) { - context.map = new sourceMapJs.SourceMapGenerator(); - context.map.setSourceContent(filename, context.source); - context.map._sources.add(filename); - } - return context; -} -function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) options.onContextCreated(context); - const { - mode, - push, - prefixIdentifiers, - indent, - deindent, - newline, - scopeId, - ssr - } = context; - const helpers = Array.from(ast.helpers); - const hasHelpers = helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== "module"; - const genScopeId = scopeId != null && mode === "module"; - const isSetupInlined = !!options.inline; - const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; - if (mode === "module") { - genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined); - } else { - genFunctionPreamble(ast, preambleContext); - } - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; - if (options.bindingMetadata && !options.inline) { - args.push("$props", "$setup", "$data", "$options"); - } - const signature = options.isTS ? args.map((arg) => `${arg}: any`).join(",") : args.join(", "); - if (isSetupInlined) { - push(`(${signature}) => {`); - } else { - push(`function ${functionName}(${signature}) {`); - } - indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - if (hasHelpers) { - push( - `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue -`, - -1 /* End */ - ); - newline(); - } - } - if (ast.components.length) { - genAssets(ast.components, "component", context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, "directive", context); - if (ast.temps > 0) { - newline(); - } - } - if (ast.filters && ast.filters.length) { - newline(); - genAssets(ast.filters, "filter", context); - newline(); - } - if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } - } - if (ast.components.length || ast.directives.length || ast.temps) { - push(` -`, 0 /* Start */); - newline(); - } - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); - } - deindent(); - push(`}`); - return { - ast, - code: context.code, - preamble: isSetupInlined ? preambleContext.code : ``, - map: context.map ? context.map.toJSON() : void 0 - }; -} -function genFunctionPreamble(ast, context) { - const { - ssr, - prefixIdentifiers, - push, - newline, - runtimeModuleName, - runtimeGlobalName, - ssrRuntimeModuleName - } = context; - const VueBinding = ssr ? `require(${JSON.stringify(runtimeModuleName)})` : runtimeGlobalName; - const helpers = Array.from(ast.helpers); - if (helpers.length > 0) { - if (prefixIdentifiers) { - push( - `const { ${helpers.map(aliasHelper).join(", ")} } = ${VueBinding} -`, - -1 /* End */ - ); - } else { - push(`const _Vue = ${VueBinding} -`, -1 /* End */); - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); - push(`const { ${staticHelpers} } = _Vue -`, -1 /* End */); - } - } - } - if (ast.ssrHelpers && ast.ssrHelpers.length) { - push( - `const { ${ast.ssrHelpers.map(aliasHelper).join(", ")} } = require("${ssrRuntimeModuleName}") -`, - -1 /* End */ - ); - } - genHoists(ast.hoists, context); - newline(); - push(`return `); -} -function genModulePreamble(ast, context, genScopeId, inline) { - const { - push, - newline, - optimizeImports, - runtimeModuleName, - ssrRuntimeModuleName - } = context; - if (ast.helpers.size) { - const helpers = Array.from(ast.helpers); - if (optimizeImports) { - push( - `import { ${helpers.map((s) => helperNameMap[s]).join(", ")} } from ${JSON.stringify(runtimeModuleName)} -`, - -1 /* End */ - ); - push( - ` -// Binding optimization for webpack code-split -const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(", ")} -`, - -1 /* End */ - ); - } else { - push( - `import { ${helpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from ${JSON.stringify(runtimeModuleName)} -`, - -1 /* End */ - ); - } - } - if (ast.ssrHelpers && ast.ssrHelpers.length) { - push( - `import { ${ast.ssrHelpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from "${ssrRuntimeModuleName}" -`, - -1 /* End */ - ); - } - if (ast.imports.length) { - genImports(ast.imports, context); - newline(); - } - genHoists(ast.hoists, context); - newline(); - if (!inline) { - push(`export `); - } -} -function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper( - type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE - ); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - const maybeSelfReference = id.endsWith("__self"); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push( - `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` - ); - if (i < assets.length - 1) { - newline(); - } - } -} -function genHoists(hoists, context) { - if (!hoists.length) { - return; - } - context.pure = true; - const { push, newline } = context; - newline(); - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - push(`const _hoisted_${i + 1} = `); - genNode(exp, context); - newline(); - } - } - context.pure = false; -} -function genImports(importsOptions, context) { - if (!importsOptions.length) { - return; - } - importsOptions.forEach((imports) => { - context.push(`import `); - genNode(imports.exp, context); - context.push(` from '${imports.path}'`); - context.newline(); - }); -} -function isText(n) { - return shared.isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; -} -function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || nodes.some((n) => shared.isArray(n) || !isText(n)); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); -} -function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (shared.isString(node)) { - push(node, -3 /* Unknown */); - } else if (shared.isArray(node)) { - genNodeListAsArray(node, context); - } else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(","); - newline(); - } else { - comma && push(", "); - } - } - } -} -function genNode(node, context) { - if (shared.isString(node)) { - context.push(node, -3 /* Unknown */); - return; - } - if (shared.isSymbol(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1: - case 9: - case 11: - genNode(node.codegenNode, context); - break; - case 2: - genText(node, context); - break; - case 4: - genExpression(node, context); - break; - case 5: - genInterpolation(node, context); - break; - case 12: - genNode(node.codegenNode, context); - break; - case 8: - genCompoundExpression(node, context); - break; - case 3: - genComment(node, context); - break; - case 13: - genVNodeCall(node, context); - break; - case 14: - genCallExpression(node, context); - break; - case 15: - genObjectExpression(node, context); - break; - case 17: - genArrayExpression(node, context); - break; - case 18: - genFunctionExpression(node, context); - break; - case 19: - genConditionalExpression(node, context); - break; - case 20: - genCacheExpression(node, context); - break; - case 21: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22: - genTemplateLiteral(node, context); - break; - case 23: - genIfStatement(node, context); - break; - case 24: - genAssignmentExpression(node, context); - break; - case 25: - genSequenceExpression(node, context); - break; - case 26: - genReturnStatement(node, context); - break; - } -} -function genText(node, context) { - context.push(JSON.stringify(node.content), -3 /* Unknown */, node); -} -function genExpression(node, context) { - const { content, isStatic } = node; - context.push( - isStatic ? JSON.stringify(content) : content, - -3 /* Unknown */, - node - ); -} -function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); -} -function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (shared.isString(child)) { - context.push(child, -3 /* Unknown */); - } else { - genNode(child, context); - } - } -} -function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } else if (node.isStatic) { - const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); - push(text, -2 /* None */, node); - } else { - push(`[${node.content}]`, -3 /* Unknown */, node); - } -} -function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push( - `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, - -3 /* Unknown */, - node - ); -} -function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent - } = node; - let patchFlagString; - if (patchFlag) { - { - patchFlagString = String(patchFlag); - } - } - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, -2 /* None */, node); - genNodeList( - genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), - context - ); - push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } -} -function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) break; - } - return args.slice(0, i + 1).map((arg) => arg || `null`); -} -function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = shared.isString(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, -2 /* None */, node); - genNodeList(node.arguments, context); - push(`)`); -} -function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, -2 /* None */, node); - return; - } - const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - genExpressionAsPropertyKey(key, context); - push(`: `); - genNode(value, context); - if (i < properties.length - 1) { - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); -} -function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); -} -function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - push(`_${helperNameMap[WITH_CTX]}(`); - } - push(`(`, -2 /* None */, node); - if (shared.isArray(params)) { - genNodeList(params, context); - } else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (shared.isArray(returns)) { - genNodeListAsArray(returns, context); - } else { - genNode(returns, context); - } - } else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - if (node.isNonScopedSlot) { - push(`, undefined, true`); - } - push(`)`); - } -} -function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); - context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); - context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent( - true - /* without newline */ - ); -} -function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - const { needPauseTracking, needArraySpread } = node; - if (needArraySpread) { - push(`[...(`); - } - push(`_cache[${node.index}] || (`); - if (needPauseTracking) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1`); - if (node.inVOnce) push(`, true`); - push(`),`); - newline(); - push(`(`); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (needPauseTracking) { - push(`).cacheIndex = ${node.index},`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); - } - push(`)`); - if (needArraySpread) { - push(`)]`); - } -} -function genTemplateLiteral(node, context) { - const { push, indent, deindent } = context; - push("`"); - const l = node.elements.length; - const multilines = l > 3; - for (let i = 0; i < l; i++) { - const e = node.elements[i]; - if (shared.isString(e)) { - push(e.replace(/(`|\$|\\)/g, "\\$1"), -3 /* Unknown */); - } else { - push("${"); - if (multilines) indent(); - genNode(e, context); - if (multilines) deindent(); - push("}"); - } - } - push("`"); -} -function genIfStatement(node, context) { - const { push, indent, deindent } = context; - const { test, consequent, alternate } = node; - push(`if (`); - genNode(test, context); - push(`) {`); - indent(); - genNode(consequent, context); - deindent(); - push(`}`); - if (alternate) { - push(` else `); - if (alternate.type === 23) { - genIfStatement(alternate, context); - } else { - push(`{`); - indent(); - genNode(alternate, context); - deindent(); - push(`}`); - } - } -} -function genAssignmentExpression(node, context) { - genNode(node.left, context); - context.push(` = `); - genNode(node.right, context); -} -function genSequenceExpression(node, context) { - context.push(`(`); - genNodeList(node.expressions, context); - context.push(`)`); -} -function genReturnStatement({ returns }, context) { - context.push(`return `); - if (shared.isArray(returns)) { - genNodeListAsArray(returns, context); - } else { - genNode(returns, context); - } -} - -const isLiteralWhitelisted = /* @__PURE__ */ shared.makeMap("true,false,null,this"); -const transformExpression = (node, context) => { - if (node.type === 5) { - node.content = processExpression( - node.content, - context - ); - } else if (node.type === 1) { - const memo = findDir(node, "memo"); - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - if (dir.type === 7 && dir.name !== "for") { - const exp = dir.exp; - const arg = dir.arg; - if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) - !(memo && arg && arg.type === 4 && arg.content === "key")) { - dir.exp = processExpression( - exp, - context, - // slot args must be processed as function params - dir.name === "slot" - ); - } - if (arg && arg.type === 4 && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } - } - } -}; -function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { - if (!context.prefixIdentifiers || !node.content.trim()) { - return node; - } - const { inline, bindingMetadata } = context; - const rewriteIdentifier = (raw, parent, id) => { - const type = shared.hasOwn(bindingMetadata, raw) && bindingMetadata[raw]; - if (inline) { - const isAssignmentLVal = parent && parent.type === "AssignmentExpression" && parent.left === id; - const isUpdateArg = parent && parent.type === "UpdateExpression" && parent.argument === id; - const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack); - const isNewExpression = parent && isInNewExpression(parentStack); - const wrapWithUnref = (raw2) => { - const wrapped = `${context.helperString(UNREF)}(${raw2})`; - return isNewExpression ? `(${wrapped})` : wrapped; - }; - if (isConst(type) || type === "setup-reactive-const" || localVars[raw]) { - return raw; - } else if (type === "setup-ref") { - return `${raw}.value`; - } else if (type === "setup-maybe-ref") { - return isAssignmentLVal || isUpdateArg || isDestructureAssignment ? `${raw}.value` : wrapWithUnref(raw); - } else if (type === "setup-let") { - if (isAssignmentLVal) { - const { right: rVal, operator } = parent; - const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1); - const rExpString = stringifyExpression( - processExpression( - createSimpleExpression(rExp, false), - context, - false, - false, - knownIds - ) - ); - return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore -` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`; - } else if (isUpdateArg) { - id.start = parent.start; - id.end = parent.end; - const { prefix: isPrefix, operator } = parent; - const prefix = isPrefix ? operator : ``; - const postfix = isPrefix ? `` : operator; - return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore -` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`; - } else if (isDestructureAssignment) { - return raw; - } else { - return wrapWithUnref(raw); - } - } else if (type === "props") { - return shared.genPropsAccessExp(raw); - } else if (type === "props-aliased") { - return shared.genPropsAccessExp(bindingMetadata.__propsAliases[raw]); - } - } else { - if (type && type.startsWith("setup") || type === "literal-const") { - return `$setup.${raw}`; - } else if (type === "props-aliased") { - return `$props['${bindingMetadata.__propsAliases[raw]}']`; - } else if (type) { - return `$${type}.${raw}`; - } - } - return `_ctx.${raw}`; - }; - const rawExp = node.content; - let ast = node.ast; - if (ast === false) { - return node; - } - if (ast === null || !ast && isSimpleIdentifier(rawExp)) { - const isScopeVarReference = context.identifiers[rawExp]; - const isAllowedGlobal = shared.isGloballyAllowed(rawExp); - const isLiteral = isLiteralWhitelisted(rawExp); - if (!asParams && !isScopeVarReference && !isLiteral && (!isAllowedGlobal || bindingMetadata[rawExp])) { - if (isConst(bindingMetadata[rawExp])) { - node.constType = 1; - } - node.content = rewriteIdentifier(rawExp); - } else if (!isScopeVarReference) { - if (isLiteral) { - node.constType = 3; - } else { - node.constType = 2; - } - } - return node; - } - if (!ast) { - const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`; - try { - ast = parser.parseExpression(source, { - sourceType: "module", - plugins: context.expressionPlugins - }); - } catch (e) { - context.onError( - createCompilerError( - 45, - node.loc, - void 0, - e.message - ) - ); - return node; - } - } - const ids = []; - const parentStack = []; - const knownIds = Object.create(context.identifiers); - walkIdentifiers( - ast, - (node2, parent, _, isReferenced, isLocal) => { - if (isStaticPropertyKey(node2, parent)) { - return; - } - if (node2.name.startsWith("_filter_")) { - return; - } - const needPrefix = isReferenced && canPrefix(node2); - if (needPrefix && !isLocal) { - if (isStaticProperty(parent) && parent.shorthand) { - node2.prefix = `${node2.name}: `; - } - node2.name = rewriteIdentifier(node2.name, parent, node2); - ids.push(node2); - } else { - if (!(needPrefix && isLocal) && (!parent || parent.type !== "CallExpression" && parent.type !== "NewExpression" && parent.type !== "MemberExpression")) { - node2.isConstant = true; - } - ids.push(node2); - } - }, - true, - // invoke on ALL identifiers - parentStack, - knownIds - ); - const children = []; - ids.sort((a, b) => a.start - b.start); - ids.forEach((id, i) => { - const start = id.start - 1; - const end = id.end - 1; - const last = ids[i - 1]; - const leadingText = rawExp.slice(last ? last.end - 1 : 0, start); - if (leadingText.length || id.prefix) { - children.push(leadingText + (id.prefix || ``)); - } - const source = rawExp.slice(start, end); - children.push( - createSimpleExpression( - id.name, - false, - { - start: advancePositionWithClone(node.loc.start, source, start), - end: advancePositionWithClone(node.loc.start, source, end), - source - }, - id.isConstant ? 3 : 0 - ) - ); - if (i === ids.length - 1 && end < rawExp.length) { - children.push(rawExp.slice(end)); - } - }); - let ret; - if (children.length) { - ret = createCompoundExpression(children, node.loc); - ret.ast = ast; - } else { - ret = node; - ret.constType = 3; - } - ret.identifiers = Object.keys(knownIds); - return ret; -} -function canPrefix(id) { - if (shared.isGloballyAllowed(id.name)) { - return false; - } - if (id.name === "require") { - return false; - } - return true; -} -function stringifyExpression(exp) { - if (shared.isString(exp)) { - return exp; - } else if (exp.type === 4) { - return exp.content; - } else { - return exp.children.map(stringifyExpression).join(""); - } -} -function isConst(type) { - return type === "setup-const" || type === "literal-const"; -} - -const transformIf = createStructuralDirectiveTransform( - /^(if|else|else-if)$/, - (node, dir, context) => { - return processIf(node, dir, context, (ifNode, branch, isRoot) => { - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9) { - key += sibling.branches.length; - } - } - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch( - branch, - key, - context - ); - } else { - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch( - branch, - key + ifNode.branches.length - 1, - context - ); - } - }; - }); - } -); -function processIf(node, dir, context, processCodegen) { - if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError( - createCompilerError(28, dir.loc) - ); - dir.exp = createSimpleExpression(`true`, false, loc); - } - if (context.prefixIdentifiers && dir.exp) { - dir.exp = processExpression(dir.exp, context); - } - if (dir.name === "if") { - const branch = createIfBranch(node, dir); - const ifNode = { - type: 9, - loc: cloneLoc(node.loc), - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); - } - } else { - const siblings = context.parent.children; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if (sibling && sibling.type === 3) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 2 && !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9) { - if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { - context.onError( - createCompilerError(30, node.loc) - ); - } - context.removeNode(); - const branch = createIfBranch(node, dir); - { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError( - createCompilerError( - 29, - branch.userKey.loc - ) - ); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - traverseNode(branch, context); - if (onExit) onExit(); - context.currentNode = null; - } else { - context.onError( - createCompilerError(30, node.loc) - ); - } - break; - } - } -} -function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3; - return { - type: 10, - loc: node.loc, - condition: dir.name === "else" ? void 0 : dir.exp, - children: isTemplateIf && !findDir(node, "for") ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; -} -function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression( - branch.condition, - createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - '""', - "true" - ]) - ); - } else { - return createChildrenCodegenNode(branch, keyIndex, context); - } -} -function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty( - `key`, - createSimpleExpression( - `${keyIndex}`, - false, - locStub, - 2 - ) - ); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11) { - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } else { - let patchFlag = 64; - return createVNodeCall( - context, - helper(FRAGMENT), - createObjectExpression([keyProperty]), - children, - patchFlag, - void 0, - void 0, - true, - false, - false, - branch.loc - ); - } - } else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - if (vnodeCall.type === 13) { - convertToBlock(vnodeCall, context); - } - injectProp(vnodeCall, keyProperty, context); - return ret; - } -} -function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; - } - if (a.type === 6) { - if (a.value.content !== b.value.content) { - return false; - } - } else { - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { - return false; - } - } - return true; -} -function getParentCondition(node) { - while (true) { - if (node.type === 19) { - if (node.alternate.type === 19) { - node = node.alternate; - } else { - return node; - } - } else if (node.type === 20) { - node = node.value; - } - } -} - -const transformBind = (dir, _node, context) => { - const { modifiers, loc } = dir; - const arg = dir.arg; - let { exp } = dir; - if (exp && exp.type === 4 && !exp.content.trim()) { - { - context.onError( - createCompilerError(34, loc) - ); - return { - props: [ - createObjectProperty(arg, createSimpleExpression("", true, loc)) - ] - }; - } - } - if (!exp) { - if (arg.type !== 4 || !arg.isStatic) { - context.onError( - createCompilerError( - 52, - arg.loc - ) - ); - return { - props: [ - createObjectProperty(arg, createSimpleExpression("", true, loc)) - ] - }; - } - transformBindShorthand(dir, context); - exp = dir.exp; - } - if (arg.type !== 4) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); - } else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; - } - if (modifiers.some((mod) => mod.content === "camel")) { - if (arg.type === 4) { - if (arg.isStatic) { - arg.content = shared.camelize(arg.content); - } else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } - } - if (!context.inSSR) { - if (modifiers.some((mod) => mod.content === "prop")) { - injectPrefix(arg, "."); - } - if (modifiers.some((mod) => mod.content === "attr")) { - injectPrefix(arg, "^"); - } - } - return { - props: [createObjectProperty(arg, exp)] - }; -}; -const transformBindShorthand = (dir, context) => { - const arg = dir.arg; - const propName = shared.camelize(arg.content); - dir.exp = createSimpleExpression(propName, false, arg.loc); - { - dir.exp = processExpression(dir.exp, context); - } -}; -const injectPrefix = (arg, prefix) => { - if (arg.type === 4) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); - } -}; - -const transformFor = createStructuralDirectiveTransform( - "for", - (node, dir, context) => { - const { helper, removeHelper } = context; - return processFor(node, dir, context, (forNode) => { - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, "memo"); - const keyProp = findProp(node, `key`, false, true); - const isDirKey = keyProp && keyProp.type === 7; - if (isDirKey && !keyProp.exp) { - transformBindShorthand(keyProp, context); - } - let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); - if (memo && keyExp && isDirKey) { - { - keyProp.exp = keyExp = processExpression( - keyExp, - context - ); - } - } - const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; - if (isTemplate) { - if (memo) { - memo.exp = processExpression( - memo.exp, - context - ); - } - if (keyProperty && keyProp.type !== 6) { - keyProperty.value = processExpression( - keyProperty.value, - context - ); - } - } - const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; - const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; - forNode.codegenNode = createVNodeCall( - context, - helper(FRAGMENT), - void 0, - renderExp, - fragmentFlag, - void 0, - void 0, - true, - !isStableFragment, - false, - node.loc - ); - return () => { - let childBlock; - const { children } = forNode; - if (isTemplate) { - node.children.some((c) => { - if (c.type === 1) { - const key = findProp(c, "key"); - if (key) { - context.onError( - createCompilerError( - 33, - key.loc - ) - ); - return true; - } - } - }); - } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; - const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; - if (slotOutlet) { - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - } else if (needFragmentWrapper) { - childBlock = createVNodeCall( - context, - helper(FRAGMENT), - keyProperty ? createObjectExpression([keyProperty]) : void 0, - node.children, - 64, - void 0, - void 0, - true, - void 0, - false - ); - } else { - childBlock = children[0].codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - removeHelper(OPEN_BLOCK); - removeHelper( - getVNodeBlockHelper(context.inSSR, childBlock.isComponent) - ); - } else { - removeHelper( - getVNodeHelper(context.inSSR, childBlock.isComponent) - ); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression( - createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ]) - ); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...keyExp ? [` && _cached.key === `, keyExp] : [], - ` && ${context.helperString( - IS_MEMO_SAME - )}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push( - loop, - createSimpleExpression(`_cache`), - createSimpleExpression(String(context.cached.length)) - ); - context.cached.push(null); - } else { - renderExp.arguments.push( - createFunctionExpression( - createForLoopParams(forNode.parseResult), - childBlock, - true - ) - ); - } - }; - }); - } -); -function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError( - createCompilerError(31, dir.loc) - ); - return; - } - const parseResult = dir.forParseResult; - if (!parseResult) { - context.onError( - createCompilerError(32, dir.loc) - ); - return; - } - finalizeForParseResult(parseResult, context); - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - scopes.vFor++; - if (context.prefixIdentifiers) { - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - } - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (context.prefixIdentifiers) { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - } - if (onExit) onExit(); - }; -} -function finalizeForParseResult(result, context) { - if (result.finalized) return; - if (context.prefixIdentifiers) { - result.source = processExpression( - result.source, - context - ); - if (result.key) { - result.key = processExpression( - result.key, - context, - true - ); - } - if (result.index) { - result.index = processExpression( - result.index, - context, - true - ); - } - if (result.value) { - result.value = processExpression( - result.value, - context, - true - ); - } - } - result.finalized = true; -} -function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); -} -function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) break; - } - return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); -} - -const defaultFallback = createSimpleExpression(`undefined`, false); -const trackSlotScopes = (node, context) => { - if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { - const vSlot = findDir(node, "slot"); - if (vSlot) { - const slotProps = vSlot.exp; - if (context.prefixIdentifiers) { - slotProps && context.addIdentifiers(slotProps); - } - context.scopes.vSlot++; - return () => { - if (context.prefixIdentifiers) { - slotProps && context.removeIdentifiers(slotProps); - } - context.scopes.vSlot--; - }; - } - } -}; -const trackVForSlotScopes = (node, context) => { - let vFor; - if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { - const result = vFor.forParseResult; - if (result) { - finalizeForParseResult(result, context); - const { value, key, index } = result; - const { addIdentifiers, removeIdentifiers } = context; - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - return () => { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - }; - } - } -}; -const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( - props, - children, - false, - true, - children.length ? children[0].loc : loc -); -function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - if (!context.ssr && context.prefixIdentifiers) { - hasDynamicSlots = hasScopeRef(node, context.identifiers); - } - const onComponentSlot = findDir(node, "slot", true); - if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push( - createObjectProperty( - arg || createSimpleExpression("default", true), - buildSlotFn(exp, void 0, children, loc) - ) - ); - } - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = /* @__PURE__ */ new Set(); - let conditionalBranchIndex = 0; - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { - if (slotElement.type !== 3) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - context.onError( - createCompilerError(37, slotDir.loc) - ); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { - arg: slotName = createSimpleExpression(`default`, true), - exp: slotProps, - loc: dirLoc - } = slotDir; - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } else { - hasDynamicSlots = true; - } - const vFor = findDir(slotElement, "for"); - const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); - let vIf; - let vElse; - if (vIf = findDir(slotElement, "if")) { - hasDynamicSlots = true; - dynamicSlots.push( - createConditionalExpression( - vIf.exp, - buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), - defaultFallback - ) - ); - } else if (vElse = findDir( - slotElement, - /^else(-if)?$/, - true - /* allowEmpty */ - )) { - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp ? createConditionalExpression( - vElse.exp, - buildDynamicSlot( - slotName, - slotFunction, - conditionalBranchIndex++ - ), - defaultFallback - ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); - } else { - context.onError( - createCompilerError(30, vElse.loc) - ); - } - } else if (vFor) { - hasDynamicSlots = true; - const parseResult = vFor.forParseResult; - if (parseResult) { - finalizeForParseResult(parseResult, context); - dynamicSlots.push( - createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression( - createForLoopParams(parseResult), - buildDynamicSlot(slotName, slotFunction), - true - ) - ]) - ); - } else { - context.onError( - createCompilerError( - 32, - vFor.loc - ) - ); - } - } else { - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError( - createCompilerError( - 38, - dirLoc - ) - ); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === "default") { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } - } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children2) => { - const fn = buildSlotFn(props, void 0, children2, loc); - if (context.compatConfig) { - fn.isNonScopedSlot = true; - } - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - slotsProperties.push(buildDefaultSlotProperty(void 0, children)); - } else if (implicitDefaultChildren.length && // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { - if (hasNamedDefaultSlot) { - context.onError( - createCompilerError( - 39, - implicitDefaultChildren[0].loc - ) - ); - } else { - slotsProperties.push( - buildDefaultSlotProperty(void 0, implicitDefaultChildren) - ); - } - } - } - const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; - let slots = createObjectExpression( - slotsProperties.concat( - createObjectProperty( - `_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression( - slotFlag + (``), - false - ) - ) - ), - loc - ); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots - }; -} -function buildDynamicSlot(name, fn, index) { - const props = [ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) - ]; - if (index != null) { - props.push( - createObjectProperty(`key`, createSimpleExpression(String(index), true)) - ); - } - return createObjectExpression(props); -} -function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1: - if (child.tagType === 2 || hasForwardedSlots(child.children)) { - return true; - } - break; - case 9: - if (hasForwardedSlots(child.branches)) return true; - break; - case 10: - case 11: - if (hasForwardedSlots(child.children)) return true; - break; - } - } - return false; -} -function isNonWhitespaceContent(node) { - if (node.type !== 2 && node.type !== 12) - return true; - return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); -} - -const directiveImportMap = /* @__PURE__ */ new WeakMap(); -const transformElement = (node, context) => { - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { - return; - } - const { tag, props } = node; - const isComponent = node.tagType === 1; - let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; - const isDynamicComponent = shared.isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = ( - // dynamic component may resolve to plain elements - isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === "svg" || tag === "foreignObject" || tag === "math") - ); - if (props.length > 0) { - const propsBuildResult = buildProps( - node, - context, - void 0, - isComponent, - isDynamicComponent - ); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = directives && directives.length ? createArrayExpression( - directives.map((dir) => buildDirectiveArgs(dir, context)) - ) : void 0; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } - } - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - shouldUseBlock = true; - patchFlag |= 1024; - } - const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024; - } - } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - const hasDynamicTextChild = type === 5 || type === 8; - if (hasDynamicTextChild && getConstantType(child, context) === 0) { - patchFlag |= 1; - } - if (hasDynamicTextChild || type === 2) { - vnodeChildren = child; - } else { - vnodeChildren = node.children; - } - } else { - vnodeChildren = node.children; - } - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } - node.codegenNode = createVNodeCall( - context, - vnodeTag, - vnodeProps, - vnodeChildren, - patchFlag === 0 ? void 0 : patchFlag, - vnodeDynamicProps, - vnodeDirectives, - !!shouldUseBlock, - false, - isComponent, - node.loc - ); - }; -}; -function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp( - node, - "is", - false, - true - /* allow empty */ - ); - if (isProp) { - if (isExplicitDynamic || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - )) { - let exp; - if (isProp.type === 6) { - exp = isProp.value && createSimpleExpression(isProp.value.content, true); - } else { - exp = isProp.exp; - if (!exp) { - exp = createSimpleExpression(`is`, false, isProp.arg.loc); - { - exp = isProp.exp = processExpression(exp, context); - } - } - } - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { - tag = isProp.value.content.slice(4); - } - } - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - if (!ssr) context.helper(builtIn); - return builtIn; - } - { - const fromSetup = resolveSetupReference(tag, context); - if (fromSetup) { - return fromSetup; - } - const dotIndex = tag.indexOf("."); - if (dotIndex > 0) { - const ns = resolveSetupReference(tag.slice(0, dotIndex), context); - if (ns) { - return ns + tag.slice(dotIndex); - } - } - } - if (context.selfName && shared.capitalize(shared.camelize(tag)) === context.selfName) { - context.helper(RESOLVE_COMPONENT); - context.components.add(tag + `__self`); - return toValidAssetId(tag, `component`); - } - context.helper(RESOLVE_COMPONENT); - context.components.add(tag); - return toValidAssetId(tag, `component`); -} -function resolveSetupReference(name, context) { - const bindings = context.bindingMetadata; - if (!bindings || bindings.__isScriptSetup === false) { - return; - } - const camelName = shared.camelize(name); - const PascalName = shared.capitalize(camelName); - const checkType = (type) => { - if (bindings[name] === type) { - return name; - } - if (bindings[camelName] === type) { - return camelName; - } - if (bindings[PascalName] === type) { - return PascalName; - } - }; - const fromConst = checkType("setup-const") || checkType("setup-reactive-const") || checkType("literal-const"); - if (fromConst) { - return context.inline ? ( - // in inline mode, const setup bindings (e.g. imports) can be used as-is - fromConst - ) : `$setup[${JSON.stringify(fromConst)}]`; - } - const fromMaybeRef = checkType("setup-let") || checkType("setup-ref") || checkType("setup-maybe-ref"); - if (fromMaybeRef) { - return context.inline ? ( - // setup scope bindings that may be refs need to be unrefed - `${context.helperString(UNREF)}(${fromMaybeRef})` - ) : `$setup[${JSON.stringify(fromMaybeRef)}]`; - } - const fromProps = checkType("props"); - if (fromProps) { - return `${context.helperString(UNREF)}(${context.inline ? "__props" : "$props"}[${JSON.stringify(fromProps)}])`; - } -} -function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const pushMergeArg = (arg) => { - if (properties.length) { - mergeArgs.push( - createObjectExpression(dedupeProperties(properties), elementLoc) - ); - properties = []; - } - if (arg) mergeArgs.push(arg); - }; - const pushRefVForMarker = () => { - if (context.scopes.vFor > 0) { - properties.push( - createObjectProperty( - createSimpleExpression("ref_for", true), - createSimpleExpression("true") - ) - ); - } - }; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = shared.isOn(name); - if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== "onclick" && // omit v-model handlers - name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks - !shared.isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && shared.isReservedProp(name)) { - hasVnodeHook = true; - } - if (isEventHandler && value.type === 14) { - value = value.arguments[0]; - } - if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { - return; - } - if (name === "ref") { - hasRef = true; - } else if (name === "class") { - hasClassBinding = true; - } else if (name === "style") { - hasStyleBinding = true; - } else if (name !== "key" && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - } else { - hasDynamicKeys = true; - } - }; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 6) { - const { loc, name, nameLoc, value } = prop; - let isStatic = true; - if (name === "ref") { - hasRef = true; - pushRefVForMarker(); - if (value && context.inline) { - const binding = context.bindingMetadata[value.content]; - if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") { - isStatic = false; - properties.push( - createObjectProperty( - createSimpleExpression("ref_key", true), - createSimpleExpression(value.content, true, value.loc) - ) - ); - } - } - } - if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - ))) { - continue; - } - properties.push( - createObjectProperty( - createSimpleExpression(name, true, nameLoc), - createSimpleExpression( - value ? value.content : "", - isStatic, - value ? value.loc : loc - ) - ) - ); - } else { - const { name, arg, exp, loc, modifiers } = prop; - const isVBind = name === "bind"; - const isVOn = name === "on"; - if (name === "slot") { - if (!isComponent) { - context.onError( - createCompilerError(40, loc) - ); - } - continue; - } - if (name === "once" || name === "memo") { - continue; - } - if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - ))) { - continue; - } - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked - // before children - isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") - ) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, "ref")) { - pushRefVForMarker(); - } - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (isVBind) { - pushRefVForMarker(); - pushMergeArg(); - { - if (isCompatEnabled( - "COMPILER_V_BIND_OBJECT_ORDER", - context - )) { - mergeArgs.unshift(exp); - continue; - } - } - mergeArgs.push(exp); - } else { - pushMergeArg({ - type: 14, - loc, - callee: context.helper(TO_HANDLERS), - arguments: isComponent ? [exp] : [exp, `true`] - }); - } - } else { - context.onError( - createCompilerError( - isVBind ? 34 : 35, - loc - ) - ); - } - continue; - } - if (isVBind && modifiers.some((mod) => mod.content === "prop")) { - patchFlag |= 32; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - const { props: props2, needRuntime } = directiveTransform(prop, node, context); - !ssr && props2.forEach(analyzePatchFlag); - if (isVOn && arg && !isStaticExp(arg)) { - pushMergeArg(createObjectExpression(props2, elementLoc)); - } else { - properties.push(...props2); - } - if (needRuntime) { - runtimeDirectives.push(prop); - if (shared.isSymbol(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } else if (!shared.isBuiltInDirective(name)) { - runtimeDirectives.push(prop); - if (hasChildren) { - shouldUseBlock = true; - } - } - } - } - let propsExpression = void 0; - if (mergeArgs.length) { - pushMergeArg(); - if (mergeArgs.length > 1) { - propsExpression = createCallExpression( - context.helper(MERGE_PROPS), - mergeArgs, - elementLoc - ); - } else { - propsExpression = mergeArgs[0]; - } - } else if (properties.length) { - propsExpression = createObjectExpression( - dedupeProperties(properties), - elementLoc - ); - } - if (hasDynamicKeys) { - patchFlag |= 16; - } else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2; - } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4; - } - if (dynamicPropNames.length) { - patchFlag |= 8; - } - if (hasHydrationEventBinding) { - patchFlag |= 32; - } - } - if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512; - } - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15: - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === "class") { - classKeyIndex = i; - } else if (key.content === "style") { - styleKeyIndex = i; - } - } else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression( - context.helper(NORMALIZE_CLASS), - [classProp.value] - ); - } - if (styleProp && // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17)) { - styleProp.value = createCallExpression( - context.helper(NORMALIZE_STYLE), - [styleProp.value] - ); - } - } else { - propsExpression = createCallExpression( - context.helper(NORMALIZE_PROPS), - [propsExpression] - ); - } - break; - case 14: - break; - default: - propsExpression = createCallExpression( - context.helper(NORMALIZE_PROPS), - [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ] - ); - break; - } - } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; -} -function dedupeProperties(properties) { - const knownProps = /* @__PURE__ */ new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - if (prop.key.type === 8 || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === "style" || name === "class" || shared.isOn(name)) { - mergeAsArray(existing, prop); - } - } else { - knownProps.set(name, prop); - deduped.push(prop); - } - } - return deduped; -} -function mergeAsArray(existing, incoming) { - if (existing.value.type === 17) { - existing.value.elements.push(incoming.value); - } else { - existing.value = createArrayExpression( - [existing.value, incoming.value], - existing.loc - ); - } -} -function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - dirArgs.push(context.helperString(runtime)); - } else { - const fromSetup = resolveSetupReference("v-" + dir.name, context); - if (fromSetup) { - dirArgs.push(fromSetup); - } else { - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } - } - const { loc } = dir; - if (dir.exp) dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); - } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push( - createObjectExpression( - dir.modifiers.map( - (modifier) => createObjectProperty(modifier, trueExpression) - ), - loc - ) - ); - } - return createArrayExpression(dirArgs, dir.loc); -} -function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) propsNamesString += ", "; - } - return propsNamesString + `]`; -} -function isComponentTag(tag) { - return tag === "component" || tag === "Component"; -} - -const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - "{}", - "undefined", - "true" - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); - node.codegenNode = createCallExpression( - context.helper(RENDER_SLOT), - slotArgs, - loc - ); - } -}; -function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = void 0; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - if (p.value) { - if (p.name === "name") { - slotName = JSON.stringify(p.value.content); - } else { - p.name = shared.camelize(p.name); - nonNameProps.push(p); - } - } - } else { - if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { - if (p.exp) { - slotName = p.exp; - } else if (p.arg && p.arg.type === 4) { - const name = shared.camelize(p.arg.content); - slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); - { - slotName = p.exp = processExpression(p.exp, context); - } - } - } else { - if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { - p.arg.content = shared.camelize(p.arg.content); - } - nonNameProps.push(p); - } - } - } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps( - node, - context, - nonNameProps, - false, - false - ); - slotProps = props; - if (directives.length) { - context.onError( - createCompilerError( - 36, - directives[0].loc - ) - ); - } - } - return { - slotName, - slotProps - }; -} - -const transformOn = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35, loc)); - } - let eventName; - if (arg.type === 4) { - if (arg.isStatic) { - let rawName = arg.content; - if (rawName.startsWith("vue:")) { - rawName = `vnode-${rawName.slice(4)}`; - } - const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( - // for non-element and vnode lifecycle event listeners, auto convert - // it to camelCase. See issue #2249 - shared.toHandlerKey(shared.camelize(rawName)) - ) : ( - // preserve case for plain element listeners that have uppercase - // letters, as these may be custom elements' custom events - `on:${rawName}` - ); - eventName = createSimpleExpression(eventString, true, arg.loc); - } else { - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); - } - } else { - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); - } - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = void 0; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp, context); - const isInlineStatement = !(isMemberExp || isFnExpression(exp, context)); - const hasMultipleStatements = exp.content.includes(`;`); - if (context.prefixIdentifiers) { - isInlineStatement && context.addIdentifiers(`$event`); - exp = dir.exp = processExpression( - exp, - context, - false, - hasMultipleStatements - ); - isInlineStatement && context.removeIdentifiers(`$event`); - shouldCache = context.cacheHandlers && // unnecessary to cache inside v-once - !context.inVOnce && // runtime constants don't need to be cached - // (this is analyzed by compileScript in SFC <script setup>) - !(exp.type === 4 && exp.constType > 0) && // #1541 bail if this is a member exp handler passed to a component - - // we need to use the original function to preserve arity, - // e.g. <transition> relies on checking cb.length to determine - // transition end handling. Inline function is ok since its arity - // is preserved even when cached. - !(isMemberExp && node.tagType === 1) && // bail if the function references closure variables (v-for, v-slot) - // it must be passed fresh to avoid stale values. - !hasScopeRef(exp, context.identifiers); - if (shouldCache && isMemberExp) { - if (exp.type === 4) { - exp.content = `${exp.content} && ${exp.content}(...args)`; - } else { - exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`]; - } - } - } - if (isInlineStatement || shouldCache && isMemberExp) { - exp = createCompoundExpression([ - `${isInlineStatement ? context.isTS ? `($event: any)` : `$event` : `${context.isTS ? ` -//@ts-ignore -` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty( - eventName, - exp || createSimpleExpression(`() => {}`, false, loc) - ) - ] - }; - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - ret.props[0].value = context.cache(ret.props[0].value); - } - ret.props.forEach((p) => p.key.isHandlerKey = true); - return ret; -}; - -const transformText = (node, context) => { - if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { - return () => { - const children = node.children; - let currentContainer = void 0; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText$1(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText$1(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression( - [child], - child.loc - ); - } - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } else { - currentContainer = void 0; - break; - } - } - } - } - if (!hasText || // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find( - (p) => p.type === 7 && !context.directiveTransforms[p.name] - ) && // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - !(node.tag === "template"))) { - return; - } - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText$1(child) || child.type === 8) { - const callArgs = []; - if (child.type !== 2 || child.content !== " ") { - callArgs.push(child); - } - if (!context.ssr && getConstantType(child, context) === 0) { - callArgs.push( - 1 + (``) - ); - } - children[i] = { - type: 12, - content: child, - loc: child.loc, - codegenNode: createCallExpression( - context.helper(CREATE_TEXT), - callArgs - ) - }; - } - } - }; - } -}; - -const seen$1 = /* @__PURE__ */ new WeakSet(); -const transformOnce = (node, context) => { - if (node.type === 1 && findDir(node, "once", true)) { - if (seen$1.has(node) || context.inVOnce || context.inSSR) { - return; - } - seen$1.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache( - cur.codegenNode, - true, - true - ); - } - }; - } -}; - -const transformModel = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError( - createCompilerError(41, dir.loc) - ); - return createTransformProps(); - } - const rawExp = exp.loc.source.trim(); - const expString = exp.type === 4 ? exp.content : rawExp; - const bindingType = context.bindingMetadata[rawExp]; - if (bindingType === "props" || bindingType === "props-aliased") { - context.onError(createCompilerError(44, exp.loc)); - return createTransformProps(); - } - const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref"); - if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) { - context.onError( - createCompilerError(42, exp.loc) - ); - return createTransformProps(); - } - if (context.prefixIdentifiers && isSimpleIdentifier(expString) && context.identifiers[expString]) { - context.onError( - createCompilerError(43, exp.loc) - ); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression("modelValue", true); - const eventName = arg ? isStaticExp(arg) ? `onUpdate:${shared.camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - if (maybeRef) { - if (bindingType === "setup-ref") { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - createSimpleExpression(rawExp, false, exp.loc), - `).value = $event)` - ]); - } else { - const altAssignment = bindingType === "setup-let" ? `${rawExp} = $event` : `null`; - assignmentExp = createCompoundExpression([ - `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`, - createSimpleExpression(rawExp, false, exp.loc), - `).value = $event : ${altAssignment})` - ]); - } - } else { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - if (context.prefixIdentifiers && !context.inVOnce && context.cacheHandlers && !hasScopeRef(exp, context.identifiers)) { - props[1].value = context.cache(props[1].value); - } - if (dir.modifiers.length && node.tagType === 1) { - const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); - const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; - props.push( - createObjectProperty( - modifiersKey, - createSimpleExpression( - `{ ${modifiers} }`, - false, - dir.loc, - 2 - ) - ) - ); - } - return createTransformProps(props); -}; -function createTransformProps(props = []) { - return { props }; -} - -const validDivisionCharRE = /[\w).+\-_$\]]/; -const transformFilter = (node, context) => { - if (!isCompatEnabled("COMPILER_FILTERS", context)) { - return; - } - if (node.type === 5) { - rewriteFilter(node.content, context); - } else if (node.type === 1) { - node.props.forEach((prop) => { - if (prop.type === 7 && prop.name !== "for" && prop.exp) { - rewriteFilter(prop.exp, context); - } - }); - } -}; -function rewriteFilter(node, context) { - if (node.type === 4) { - parseFilter(node, context); - } else { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (typeof child !== "object") continue; - if (child.type === 4) { - parseFilter(child, context); - } else if (child.type === 8) { - rewriteFilter(node, context); - } else if (child.type === 5) { - rewriteFilter(child.content, context); - } - } - } -} -function parseFilter(node, context) { - const exp = node.content; - let inSingle = false; - let inDouble = false; - let inTemplateString = false; - let inRegex = false; - let curly = 0; - let square = 0; - let paren = 0; - let lastFilterIndex = 0; - let c, prev, i, expression, filters = []; - for (i = 0; i < exp.length; i++) { - prev = c; - c = exp.charCodeAt(i); - if (inSingle) { - if (c === 39 && prev !== 92) inSingle = false; - } else if (inDouble) { - if (c === 34 && prev !== 92) inDouble = false; - } else if (inTemplateString) { - if (c === 96 && prev !== 92) inTemplateString = false; - } else if (inRegex) { - if (c === 47 && prev !== 92) inRegex = false; - } else if (c === 124 && // pipe - exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { - if (expression === void 0) { - lastFilterIndex = i + 1; - expression = exp.slice(0, i).trim(); - } else { - pushFilter(); - } - } else { - switch (c) { - case 34: - inDouble = true; - break; - // " - case 39: - inSingle = true; - break; - // ' - case 96: - inTemplateString = true; - break; - // ` - case 40: - paren++; - break; - // ( - case 41: - paren--; - break; - // ) - case 91: - square++; - break; - // [ - case 93: - square--; - break; - // ] - case 123: - curly++; - break; - // { - case 125: - curly--; - break; - } - if (c === 47) { - let j = i - 1; - let p; - for (; j >= 0; j--) { - p = exp.charAt(j); - if (p !== " ") break; - } - if (!p || !validDivisionCharRE.test(p)) { - inRegex = true; - } - } - } - } - if (expression === void 0) { - expression = exp.slice(0, i).trim(); - } else if (lastFilterIndex !== 0) { - pushFilter(); - } - function pushFilter() { - filters.push(exp.slice(lastFilterIndex, i).trim()); - lastFilterIndex = i + 1; - } - if (filters.length) { - for (i = 0; i < filters.length; i++) { - expression = wrapFilter(expression, filters[i], context); - } - node.content = expression; - node.ast = void 0; - } -} -function wrapFilter(exp, filter, context) { - context.helper(RESOLVE_FILTER); - const i = filter.indexOf("("); - if (i < 0) { - context.filters.add(filter); - return `${toValidAssetId(filter, "filter")}(${exp})`; - } else { - const name = filter.slice(0, i); - const args = filter.slice(i + 1); - context.filters.add(name); - return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; - } -} - -const seen = /* @__PURE__ */ new WeakSet(); -const transformMemo = (node, context) => { - if (node.type === 1) { - const dir = findDir(node, "memo"); - if (!dir || seen.has(node)) { - return; - } - seen.add(node); - return () => { - const codegenNode = node.codegenNode || context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13) { - if (node.tagType !== 1) { - convertToBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(void 0, codegenNode), - `_cache`, - String(context.cached.length) - ]); - context.cached.push(null); - } - }; - } -}; - -function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...[transformFilter] , - ...prefixIdentifiers ? [ - // order is important - trackVForSlotScopes, - transformExpression - ] : [], - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn, - bind: transformBind, - model: transformModel - } - ]; -} -function baseCompile(source, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === "module"; - const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode; - if (!prefixIdentifiers && options.cacheHandlers) { - onError(createCompilerError(49)); - } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(50)); - } - const resolvedOptions = shared.extend({}, options, { - prefixIdentifiers - }); - const ast = shared.isString(source) ? baseParse(source, resolvedOptions) : source; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers); - if (options.isTS) { - const { expressionPlugins } = options; - if (!expressionPlugins || !expressionPlugins.includes("typescript")) { - options.expressionPlugins = [...expressionPlugins || [], "typescript"]; - } - } - transform( - ast, - shared.extend({}, resolvedOptions, { - nodeTransforms: [ - ...nodeTransforms, - ...options.nodeTransforms || [] - // user transforms - ], - directiveTransforms: shared.extend( - {}, - directiveTransforms, - options.directiveTransforms || {} - // user transforms - ) - }) - ); - return generate(ast, resolvedOptions); -} - -const BindingTypes = { - "DATA": "data", - "PROPS": "props", - "PROPS_ALIASED": "props-aliased", - "SETUP_LET": "setup-let", - "SETUP_CONST": "setup-const", - "SETUP_REACTIVE_CONST": "setup-reactive-const", - "SETUP_MAYBE_REF": "setup-maybe-ref", - "SETUP_REF": "setup-ref", - "OPTIONS": "options", - "LITERAL_CONST": "literal-const" -}; - -const noopDirectiveTransform = () => ({ props: [] }); - -exports.generateCodeFrame = shared.generateCodeFrame; -exports.BASE_TRANSITION = BASE_TRANSITION; -exports.BindingTypes = BindingTypes; -exports.CAMELIZE = CAMELIZE; -exports.CAPITALIZE = CAPITALIZE; -exports.CREATE_BLOCK = CREATE_BLOCK; -exports.CREATE_COMMENT = CREATE_COMMENT; -exports.CREATE_ELEMENT_BLOCK = CREATE_ELEMENT_BLOCK; -exports.CREATE_ELEMENT_VNODE = CREATE_ELEMENT_VNODE; -exports.CREATE_SLOTS = CREATE_SLOTS; -exports.CREATE_STATIC = CREATE_STATIC; -exports.CREATE_TEXT = CREATE_TEXT; -exports.CREATE_VNODE = CREATE_VNODE; -exports.CompilerDeprecationTypes = CompilerDeprecationTypes; -exports.ConstantTypes = ConstantTypes; -exports.ElementTypes = ElementTypes; -exports.ErrorCodes = ErrorCodes; -exports.FRAGMENT = FRAGMENT; -exports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS; -exports.IS_MEMO_SAME = IS_MEMO_SAME; -exports.IS_REF = IS_REF; -exports.KEEP_ALIVE = KEEP_ALIVE; -exports.MERGE_PROPS = MERGE_PROPS; -exports.NORMALIZE_CLASS = NORMALIZE_CLASS; -exports.NORMALIZE_PROPS = NORMALIZE_PROPS; -exports.NORMALIZE_STYLE = NORMALIZE_STYLE; -exports.Namespaces = Namespaces; -exports.NodeTypes = NodeTypes; -exports.OPEN_BLOCK = OPEN_BLOCK; -exports.POP_SCOPE_ID = POP_SCOPE_ID; -exports.PUSH_SCOPE_ID = PUSH_SCOPE_ID; -exports.RENDER_LIST = RENDER_LIST; -exports.RENDER_SLOT = RENDER_SLOT; -exports.RESOLVE_COMPONENT = RESOLVE_COMPONENT; -exports.RESOLVE_DIRECTIVE = RESOLVE_DIRECTIVE; -exports.RESOLVE_DYNAMIC_COMPONENT = RESOLVE_DYNAMIC_COMPONENT; -exports.RESOLVE_FILTER = RESOLVE_FILTER; -exports.SET_BLOCK_TRACKING = SET_BLOCK_TRACKING; -exports.SUSPENSE = SUSPENSE; -exports.TELEPORT = TELEPORT; -exports.TO_DISPLAY_STRING = TO_DISPLAY_STRING; -exports.TO_HANDLERS = TO_HANDLERS; -exports.TO_HANDLER_KEY = TO_HANDLER_KEY; -exports.TS_NODE_TYPES = TS_NODE_TYPES; -exports.UNREF = UNREF; -exports.WITH_CTX = WITH_CTX; -exports.WITH_DIRECTIVES = WITH_DIRECTIVES; -exports.WITH_MEMO = WITH_MEMO; -exports.advancePositionWithClone = advancePositionWithClone; -exports.advancePositionWithMutation = advancePositionWithMutation; -exports.assert = assert; -exports.baseCompile = baseCompile; -exports.baseParse = baseParse; -exports.buildDirectiveArgs = buildDirectiveArgs; -exports.buildProps = buildProps; -exports.buildSlots = buildSlots; -exports.checkCompatEnabled = checkCompatEnabled; -exports.convertToBlock = convertToBlock; -exports.createArrayExpression = createArrayExpression; -exports.createAssignmentExpression = createAssignmentExpression; -exports.createBlockStatement = createBlockStatement; -exports.createCacheExpression = createCacheExpression; -exports.createCallExpression = createCallExpression; -exports.createCompilerError = createCompilerError; -exports.createCompoundExpression = createCompoundExpression; -exports.createConditionalExpression = createConditionalExpression; -exports.createForLoopParams = createForLoopParams; -exports.createFunctionExpression = createFunctionExpression; -exports.createIfStatement = createIfStatement; -exports.createInterpolation = createInterpolation; -exports.createObjectExpression = createObjectExpression; -exports.createObjectProperty = createObjectProperty; -exports.createReturnStatement = createReturnStatement; -exports.createRoot = createRoot; -exports.createSequenceExpression = createSequenceExpression; -exports.createSimpleExpression = createSimpleExpression; -exports.createStructuralDirectiveTransform = createStructuralDirectiveTransform; -exports.createTemplateLiteral = createTemplateLiteral; -exports.createTransformContext = createTransformContext; -exports.createVNodeCall = createVNodeCall; -exports.errorMessages = errorMessages; -exports.extractIdentifiers = extractIdentifiers; -exports.findDir = findDir; -exports.findProp = findProp; -exports.forAliasRE = forAliasRE; -exports.generate = generate; -exports.getBaseTransformPreset = getBaseTransformPreset; -exports.getConstantType = getConstantType; -exports.getMemoedVNodeCall = getMemoedVNodeCall; -exports.getVNodeBlockHelper = getVNodeBlockHelper; -exports.getVNodeHelper = getVNodeHelper; -exports.hasDynamicKeyVBind = hasDynamicKeyVBind; -exports.hasScopeRef = hasScopeRef; -exports.helperNameMap = helperNameMap; -exports.injectProp = injectProp; -exports.isCoreComponent = isCoreComponent; -exports.isFnExpression = isFnExpression; -exports.isFnExpressionBrowser = isFnExpressionBrowser; -exports.isFnExpressionNode = isFnExpressionNode; -exports.isFunctionType = isFunctionType; -exports.isInDestructureAssignment = isInDestructureAssignment; -exports.isInNewExpression = isInNewExpression; -exports.isMemberExpression = isMemberExpression; -exports.isMemberExpressionBrowser = isMemberExpressionBrowser; -exports.isMemberExpressionNode = isMemberExpressionNode; -exports.isReferencedIdentifier = isReferencedIdentifier; -exports.isSimpleIdentifier = isSimpleIdentifier; -exports.isSlotOutlet = isSlotOutlet; -exports.isStaticArgOf = isStaticArgOf; -exports.isStaticExp = isStaticExp; -exports.isStaticProperty = isStaticProperty; -exports.isStaticPropertyKey = isStaticPropertyKey; -exports.isTemplateNode = isTemplateNode; -exports.isText = isText$1; -exports.isVSlot = isVSlot; -exports.locStub = locStub; -exports.noopDirectiveTransform = noopDirectiveTransform; -exports.processExpression = processExpression; -exports.processFor = processFor; -exports.processIf = processIf; -exports.processSlotOutlet = processSlotOutlet; -exports.registerRuntimeHelpers = registerRuntimeHelpers; -exports.resolveComponentType = resolveComponentType; -exports.stringifyExpression = stringifyExpression; -exports.toValidAssetId = toValidAssetId; -exports.trackSlotScopes = trackSlotScopes; -exports.trackVForSlotScopes = trackVForSlotScopes; -exports.transform = transform; -exports.transformBind = transformBind; -exports.transformElement = transformElement; -exports.transformExpression = transformExpression; -exports.transformModel = transformModel; -exports.transformOn = transformOn; -exports.traverseNode = traverseNode; -exports.unwrapTSNode = unwrapTSNode; -exports.walkBlockDeclarations = walkBlockDeclarations; -exports.walkFunctionParams = walkFunctionParams; -exports.walkIdentifiers = walkIdentifiers; -exports.warnDeprecation = warnDeprecation; diff --git a/node_modules/@vue/compiler-core/dist/compiler-core.d.ts b/node_modules/@vue/compiler-core/dist/compiler-core.d.ts deleted file mode 100644 index 9795cad..0000000 --- a/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +++ /dev/null @@ -1,1091 +0,0 @@ -import { PatchFlags } from '@vue/shared'; -export { generateCodeFrame } from '@vue/shared'; -import { Node as Node$1, Identifier, Function, BlockStatement as BlockStatement$1, Program, ObjectProperty } from '@babel/types'; -import { ParserPlugin } from '@babel/parser'; - -export declare const FRAGMENT: unique symbol; -export declare const TELEPORT: unique symbol; -export declare const SUSPENSE: unique symbol; -export declare const KEEP_ALIVE: unique symbol; -export declare const BASE_TRANSITION: unique symbol; -export declare const OPEN_BLOCK: unique symbol; -export declare const CREATE_BLOCK: unique symbol; -export declare const CREATE_ELEMENT_BLOCK: unique symbol; -export declare const CREATE_VNODE: unique symbol; -export declare const CREATE_ELEMENT_VNODE: unique symbol; -export declare const CREATE_COMMENT: unique symbol; -export declare const CREATE_TEXT: unique symbol; -export declare const CREATE_STATIC: unique symbol; -export declare const RESOLVE_COMPONENT: unique symbol; -export declare const RESOLVE_DYNAMIC_COMPONENT: unique symbol; -export declare const RESOLVE_DIRECTIVE: unique symbol; -export declare const RESOLVE_FILTER: unique symbol; -export declare const WITH_DIRECTIVES: unique symbol; -export declare const RENDER_LIST: unique symbol; -export declare const RENDER_SLOT: unique symbol; -export declare const CREATE_SLOTS: unique symbol; -export declare const TO_DISPLAY_STRING: unique symbol; -export declare const MERGE_PROPS: unique symbol; -export declare const NORMALIZE_CLASS: unique symbol; -export declare const NORMALIZE_STYLE: unique symbol; -export declare const NORMALIZE_PROPS: unique symbol; -export declare const GUARD_REACTIVE_PROPS: unique symbol; -export declare const TO_HANDLERS: unique symbol; -export declare const CAMELIZE: unique symbol; -export declare const CAPITALIZE: unique symbol; -export declare const TO_HANDLER_KEY: unique symbol; -export declare const SET_BLOCK_TRACKING: unique symbol; -/** - * @deprecated no longer needed in 3.5+ because we no longer hoist element nodes - * but kept for backwards compat - */ -export declare const PUSH_SCOPE_ID: unique symbol; -/** - * @deprecated kept for backwards compat - */ -export declare const POP_SCOPE_ID: unique symbol; -export declare const WITH_CTX: unique symbol; -export declare const UNREF: unique symbol; -export declare const IS_REF: unique symbol; -export declare const WITH_MEMO: unique symbol; -export declare const IS_MEMO_SAME: unique symbol; -export declare const helperNameMap: Record<symbol, string>; -export declare function registerRuntimeHelpers(helpers: Record<symbol, string>): void; - -type OptionalOptions = 'decodeEntities' | 'whitespace' | 'isNativeTag' | 'isBuiltInComponent' | 'expressionPlugins' | keyof CompilerCompatOptions; -type MergedParserOptions = Omit<Required<ParserOptions>, OptionalOptions> & Pick<ParserOptions, OptionalOptions>; -export declare function baseParse(input: string, options?: ParserOptions): RootNode; - -type CompilerCompatConfig = Partial<Record<CompilerDeprecationTypes, boolean | 'suppress-warning'>> & { - MODE?: 2 | 3; -}; -interface CompilerCompatOptions { - compatConfig?: CompilerCompatConfig; -} -export declare enum CompilerDeprecationTypes { - COMPILER_IS_ON_ELEMENT = "COMPILER_IS_ON_ELEMENT", - COMPILER_V_BIND_SYNC = "COMPILER_V_BIND_SYNC", - COMPILER_V_BIND_OBJECT_ORDER = "COMPILER_V_BIND_OBJECT_ORDER", - COMPILER_V_ON_NATIVE = "COMPILER_V_ON_NATIVE", - COMPILER_V_IF_V_FOR_PRECEDENCE = "COMPILER_V_IF_V_FOR_PRECEDENCE", - COMPILER_NATIVE_TEMPLATE = "COMPILER_NATIVE_TEMPLATE", - COMPILER_INLINE_TEMPLATE = "COMPILER_INLINE_TEMPLATE", - COMPILER_FILTERS = "COMPILER_FILTERS" -} -export declare function checkCompatEnabled(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): boolean; -export declare function warnDeprecation(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): void; - -export type NodeTransform = (node: RootNode | TemplateChildNode, context: TransformContext) => void | (() => void) | (() => void)[]; -export type DirectiveTransform = (dir: DirectiveNode, node: ElementNode, context: TransformContext, augmentor?: (ret: DirectiveTransformResult) => DirectiveTransformResult) => DirectiveTransformResult; -interface DirectiveTransformResult { - props: Property[]; - needRuntime?: boolean | symbol; - ssrTagParts?: TemplateLiteral['elements']; -} -export type StructuralDirectiveTransform = (node: ElementNode, dir: DirectiveNode, context: TransformContext) => void | (() => void); -interface ImportItem { - exp: string | ExpressionNode; - path: string; -} -export interface TransformContext extends Required<Omit<TransformOptions, keyof CompilerCompatOptions>>, CompilerCompatOptions { - selfName: string | null; - root: RootNode; - helpers: Map<symbol, number>; - components: Set<string>; - directives: Set<string>; - hoists: (JSChildNode | null)[]; - imports: ImportItem[]; - temps: number; - cached: (CacheExpression | null)[]; - identifiers: { - [name: string]: number | undefined; - }; - scopes: { - vFor: number; - vSlot: number; - vPre: number; - vOnce: number; - }; - parent: ParentNode | null; - grandParent: ParentNode | null; - childIndex: number; - currentNode: RootNode | TemplateChildNode | null; - inVOnce: boolean; - helper<T extends symbol>(name: T): T; - removeHelper<T extends symbol>(name: T): void; - helperString(name: symbol): string; - replaceNode(node: TemplateChildNode): void; - removeNode(node?: TemplateChildNode): void; - onNodeRemoved(): void; - addIdentifiers(exp: ExpressionNode | string): void; - removeIdentifiers(exp: ExpressionNode | string): void; - hoist(exp: string | JSChildNode | ArrayExpression): SimpleExpressionNode; - cache(exp: JSChildNode, isVNode?: boolean, inVOnce?: boolean): CacheExpression; - constantCache: WeakMap<TemplateChildNode, ConstantTypes>; - filters?: Set<string>; -} -export declare function createTransformContext(root: RootNode, { filename, prefixIdentifiers, hoistStatic, hmr, cacheHandlers, nodeTransforms, directiveTransforms, transformHoist, isBuiltInComponent, isCustomElement, expressionPlugins, scopeId, slotted, ssr, inSSR, ssrCssVars, bindingMetadata, inline, isTS, onError, onWarn, compatConfig, }: TransformOptions): TransformContext; -export declare function transform(root: RootNode, options: TransformOptions): void; -export declare function traverseNode(node: RootNode | TemplateChildNode, context: TransformContext): void; -export declare function createStructuralDirectiveTransform(name: string | RegExp, fn: StructuralDirectiveTransform): NodeTransform; - -export declare const transformElement: NodeTransform; -export declare function resolveComponentType(node: ComponentNode, context: TransformContext, ssr?: boolean): string | symbol | CallExpression; -export type PropsExpression = ObjectExpression | CallExpression | ExpressionNode; -export declare function buildProps(node: ElementNode, context: TransformContext, props: ElementNode['props'] | undefined, isComponent: boolean, isDynamicComponent: boolean, ssr?: boolean): { - props: PropsExpression | undefined; - directives: DirectiveNode[]; - patchFlag: number; - dynamicPropNames: string[]; - shouldUseBlock: boolean; -}; -export declare function buildDirectiveArgs(dir: DirectiveNode, context: TransformContext): ArrayExpression; - -export type Namespace = number; -export declare enum Namespaces { - HTML = 0, - SVG = 1, - MATH_ML = 2 -} -export declare enum NodeTypes { - ROOT = 0, - ELEMENT = 1, - TEXT = 2, - COMMENT = 3, - SIMPLE_EXPRESSION = 4, - INTERPOLATION = 5, - ATTRIBUTE = 6, - DIRECTIVE = 7, - COMPOUND_EXPRESSION = 8, - IF = 9, - IF_BRANCH = 10, - FOR = 11, - TEXT_CALL = 12, - VNODE_CALL = 13, - JS_CALL_EXPRESSION = 14, - JS_OBJECT_EXPRESSION = 15, - JS_PROPERTY = 16, - JS_ARRAY_EXPRESSION = 17, - JS_FUNCTION_EXPRESSION = 18, - JS_CONDITIONAL_EXPRESSION = 19, - JS_CACHE_EXPRESSION = 20, - JS_BLOCK_STATEMENT = 21, - JS_TEMPLATE_LITERAL = 22, - JS_IF_STATEMENT = 23, - JS_ASSIGNMENT_EXPRESSION = 24, - JS_SEQUENCE_EXPRESSION = 25, - JS_RETURN_STATEMENT = 26 -} -export declare enum ElementTypes { - ELEMENT = 0, - COMPONENT = 1, - SLOT = 2, - TEMPLATE = 3 -} -export interface Node { - type: NodeTypes; - loc: SourceLocation; -} -export interface SourceLocation { - start: Position; - end: Position; - source: string; -} -export interface Position { - offset: number; - line: number; - column: number; -} -export type ParentNode = RootNode | ElementNode | IfBranchNode | ForNode; -export type ExpressionNode = SimpleExpressionNode | CompoundExpressionNode; -export type TemplateChildNode = ElementNode | InterpolationNode | CompoundExpressionNode | TextNode | CommentNode | IfNode | IfBranchNode | ForNode | TextCallNode; -export interface RootNode extends Node { - type: NodeTypes.ROOT; - source: string; - children: TemplateChildNode[]; - helpers: Set<symbol>; - components: string[]; - directives: string[]; - hoists: (JSChildNode | null)[]; - imports: ImportItem[]; - cached: (CacheExpression | null)[]; - temps: number; - ssrHelpers?: symbol[]; - codegenNode?: TemplateChildNode | JSChildNode | BlockStatement; - transformed?: boolean; - filters?: string[]; -} -export type ElementNode = PlainElementNode | ComponentNode | SlotOutletNode | TemplateNode; -export interface BaseElementNode extends Node { - type: NodeTypes.ELEMENT; - ns: Namespace; - tag: string; - tagType: ElementTypes; - props: Array<AttributeNode | DirectiveNode>; - children: TemplateChildNode[]; - isSelfClosing?: boolean; - innerLoc?: SourceLocation; -} -export interface PlainElementNode extends BaseElementNode { - tagType: ElementTypes.ELEMENT; - codegenNode: VNodeCall | SimpleExpressionNode | CacheExpression | MemoExpression | undefined; - ssrCodegenNode?: TemplateLiteral; -} -export interface ComponentNode extends BaseElementNode { - tagType: ElementTypes.COMPONENT; - codegenNode: VNodeCall | CacheExpression | MemoExpression | undefined; - ssrCodegenNode?: CallExpression; -} -export interface SlotOutletNode extends BaseElementNode { - tagType: ElementTypes.SLOT; - codegenNode: RenderSlotCall | CacheExpression | undefined; - ssrCodegenNode?: CallExpression; -} -export interface TemplateNode extends BaseElementNode { - tagType: ElementTypes.TEMPLATE; - codegenNode: undefined; -} -export interface TextNode extends Node { - type: NodeTypes.TEXT; - content: string; -} -export interface CommentNode extends Node { - type: NodeTypes.COMMENT; - content: string; -} -export interface AttributeNode extends Node { - type: NodeTypes.ATTRIBUTE; - name: string; - nameLoc: SourceLocation; - value: TextNode | undefined; -} -export interface DirectiveNode extends Node { - type: NodeTypes.DIRECTIVE; - /** - * the normalized name without prefix or shorthands, e.g. "bind", "on" - */ - name: string; - /** - * the raw attribute name, preserving shorthand, and including arg & modifiers - * this is only used during parse. - */ - rawName?: string; - exp: ExpressionNode | undefined; - arg: ExpressionNode | undefined; - modifiers: SimpleExpressionNode[]; - /** - * optional property to cache the expression parse result for v-for - */ - forParseResult?: ForParseResult; -} -/** - * Static types have several levels. - * Higher levels implies lower levels. e.g. a node that can be stringified - * can always be hoisted and skipped for patch. - */ -export declare enum ConstantTypes { - NOT_CONSTANT = 0, - CAN_SKIP_PATCH = 1, - CAN_CACHE = 2, - CAN_STRINGIFY = 3 -} -export interface SimpleExpressionNode extends Node { - type: NodeTypes.SIMPLE_EXPRESSION; - content: string; - isStatic: boolean; - constType: ConstantTypes; - /** - * - `null` means the expression is a simple identifier that doesn't need - * parsing - * - `false` means there was a parsing error - */ - ast?: Node$1 | null | false; - /** - * Indicates this is an identifier for a hoist vnode call and points to the - * hoisted node. - */ - hoisted?: JSChildNode; - /** - * an expression parsed as the params of a function will track - * the identifiers declared inside the function body. - */ - identifiers?: string[]; - isHandlerKey?: boolean; -} -export interface InterpolationNode extends Node { - type: NodeTypes.INTERPOLATION; - content: ExpressionNode; -} -export interface CompoundExpressionNode extends Node { - type: NodeTypes.COMPOUND_EXPRESSION; - /** - * - `null` means the expression is a simple identifier that doesn't need - * parsing - * - `false` means there was a parsing error - */ - ast?: Node$1 | null | false; - children: (SimpleExpressionNode | CompoundExpressionNode | InterpolationNode | TextNode | string | symbol)[]; - /** - * an expression parsed as the params of a function will track - * the identifiers declared inside the function body. - */ - identifiers?: string[]; - isHandlerKey?: boolean; -} -export interface IfNode extends Node { - type: NodeTypes.IF; - branches: IfBranchNode[]; - codegenNode?: IfConditionalExpression | CacheExpression; -} -export interface IfBranchNode extends Node { - type: NodeTypes.IF_BRANCH; - condition: ExpressionNode | undefined; - children: TemplateChildNode[]; - userKey?: AttributeNode | DirectiveNode; - isTemplateIf?: boolean; -} -export interface ForNode extends Node { - type: NodeTypes.FOR; - source: ExpressionNode; - valueAlias: ExpressionNode | undefined; - keyAlias: ExpressionNode | undefined; - objectIndexAlias: ExpressionNode | undefined; - parseResult: ForParseResult; - children: TemplateChildNode[]; - codegenNode?: ForCodegenNode; -} -export interface ForParseResult { - source: ExpressionNode; - value: ExpressionNode | undefined; - key: ExpressionNode | undefined; - index: ExpressionNode | undefined; - finalized: boolean; -} -export interface TextCallNode extends Node { - type: NodeTypes.TEXT_CALL; - content: TextNode | InterpolationNode | CompoundExpressionNode; - codegenNode: CallExpression | SimpleExpressionNode; -} -export type TemplateTextChildNode = TextNode | InterpolationNode | CompoundExpressionNode; -export interface VNodeCall extends Node { - type: NodeTypes.VNODE_CALL; - tag: string | symbol | CallExpression; - props: PropsExpression | undefined; - children: TemplateChildNode[] | TemplateTextChildNode | SlotsExpression | ForRenderListExpression | SimpleExpressionNode | CacheExpression | undefined; - patchFlag: PatchFlags | undefined; - dynamicProps: string | SimpleExpressionNode | undefined; - directives: DirectiveArguments | undefined; - isBlock: boolean; - disableTracking: boolean; - isComponent: boolean; -} -export type JSChildNode = VNodeCall | CallExpression | ObjectExpression | ArrayExpression | ExpressionNode | FunctionExpression | ConditionalExpression | CacheExpression | AssignmentExpression | SequenceExpression; -export interface CallExpression extends Node { - type: NodeTypes.JS_CALL_EXPRESSION; - callee: string | symbol; - arguments: (string | symbol | JSChildNode | SSRCodegenNode | TemplateChildNode | TemplateChildNode[])[]; -} -export interface ObjectExpression extends Node { - type: NodeTypes.JS_OBJECT_EXPRESSION; - properties: Array<Property>; -} -export interface Property extends Node { - type: NodeTypes.JS_PROPERTY; - key: ExpressionNode; - value: JSChildNode; -} -export interface ArrayExpression extends Node { - type: NodeTypes.JS_ARRAY_EXPRESSION; - elements: Array<string | Node>; -} -export interface FunctionExpression extends Node { - type: NodeTypes.JS_FUNCTION_EXPRESSION; - params: ExpressionNode | string | (ExpressionNode | string)[] | undefined; - returns?: TemplateChildNode | TemplateChildNode[] | JSChildNode; - body?: BlockStatement | IfStatement; - newline: boolean; - /** - * This flag is for codegen to determine whether it needs to generate the - * withScopeId() wrapper - */ - isSlot: boolean; - /** - * __COMPAT__ only, indicates a slot function that should be excluded from - * the legacy $scopedSlots instance property. - */ - isNonScopedSlot?: boolean; -} -export interface ConditionalExpression extends Node { - type: NodeTypes.JS_CONDITIONAL_EXPRESSION; - test: JSChildNode; - consequent: JSChildNode; - alternate: JSChildNode; - newline: boolean; -} -export interface CacheExpression extends Node { - type: NodeTypes.JS_CACHE_EXPRESSION; - index: number; - value: JSChildNode; - needPauseTracking: boolean; - inVOnce: boolean; - needArraySpread: boolean; -} -export interface MemoExpression extends CallExpression { - callee: typeof WITH_MEMO; - arguments: [ExpressionNode, MemoFactory, string, string]; -} -interface MemoFactory extends FunctionExpression { - returns: BlockCodegenNode; -} -export type SSRCodegenNode = BlockStatement | TemplateLiteral | IfStatement | AssignmentExpression | ReturnStatement | SequenceExpression; -export interface BlockStatement extends Node { - type: NodeTypes.JS_BLOCK_STATEMENT; - body: (JSChildNode | IfStatement)[]; -} -export interface TemplateLiteral extends Node { - type: NodeTypes.JS_TEMPLATE_LITERAL; - elements: (string | JSChildNode)[]; -} -export interface IfStatement extends Node { - type: NodeTypes.JS_IF_STATEMENT; - test: ExpressionNode; - consequent: BlockStatement; - alternate: IfStatement | BlockStatement | ReturnStatement | undefined; -} -export interface AssignmentExpression extends Node { - type: NodeTypes.JS_ASSIGNMENT_EXPRESSION; - left: SimpleExpressionNode; - right: JSChildNode; -} -export interface SequenceExpression extends Node { - type: NodeTypes.JS_SEQUENCE_EXPRESSION; - expressions: JSChildNode[]; -} -export interface ReturnStatement extends Node { - type: NodeTypes.JS_RETURN_STATEMENT; - returns: TemplateChildNode | TemplateChildNode[] | JSChildNode; -} -export interface DirectiveArguments extends ArrayExpression { - elements: DirectiveArgumentNode[]; -} -export interface DirectiveArgumentNode extends ArrayExpression { - elements: [string] | [string, ExpressionNode] | [string, ExpressionNode, ExpressionNode] | [string, ExpressionNode, ExpressionNode, ObjectExpression]; -} -export interface RenderSlotCall extends CallExpression { - callee: typeof RENDER_SLOT; - arguments: [string, string | ExpressionNode] | [string, string | ExpressionNode, PropsExpression] | [ - string, - string | ExpressionNode, - PropsExpression | '{}', - TemplateChildNode[] - ]; -} -export type SlotsExpression = SlotsObjectExpression | DynamicSlotsExpression; -export interface SlotsObjectExpression extends ObjectExpression { - properties: SlotsObjectProperty[]; -} -export interface SlotsObjectProperty extends Property { - value: SlotFunctionExpression; -} -export interface SlotFunctionExpression extends FunctionExpression { - returns: TemplateChildNode[] | CacheExpression; -} -export interface DynamicSlotsExpression extends CallExpression { - callee: typeof CREATE_SLOTS; - arguments: [SlotsObjectExpression, DynamicSlotEntries]; -} -export interface DynamicSlotEntries extends ArrayExpression { - elements: (ConditionalDynamicSlotNode | ListDynamicSlotNode)[]; -} -export interface ConditionalDynamicSlotNode extends ConditionalExpression { - consequent: DynamicSlotNode; - alternate: DynamicSlotNode | SimpleExpressionNode; -} -export interface ListDynamicSlotNode extends CallExpression { - callee: typeof RENDER_LIST; - arguments: [ExpressionNode, ListDynamicSlotIterator]; -} -export interface ListDynamicSlotIterator extends FunctionExpression { - returns: DynamicSlotNode; -} -export interface DynamicSlotNode extends ObjectExpression { - properties: [Property, DynamicSlotFnProperty]; -} -export interface DynamicSlotFnProperty extends Property { - value: SlotFunctionExpression; -} -export type BlockCodegenNode = VNodeCall | RenderSlotCall; -export interface IfConditionalExpression extends ConditionalExpression { - consequent: BlockCodegenNode | MemoExpression; - alternate: BlockCodegenNode | IfConditionalExpression | MemoExpression; -} -export interface ForCodegenNode extends VNodeCall { - isBlock: true; - tag: typeof FRAGMENT; - props: undefined; - children: ForRenderListExpression; - patchFlag: PatchFlags; - disableTracking: boolean; -} -export interface ForRenderListExpression extends CallExpression { - callee: typeof RENDER_LIST; - arguments: [ExpressionNode, ForIteratorExpression]; -} -export interface ForIteratorExpression extends FunctionExpression { - returns?: BlockCodegenNode; -} -export declare const locStub: SourceLocation; -export declare function createRoot(children: TemplateChildNode[], source?: string): RootNode; -export declare function createVNodeCall(context: TransformContext | null, tag: VNodeCall['tag'], props?: VNodeCall['props'], children?: VNodeCall['children'], patchFlag?: VNodeCall['patchFlag'], dynamicProps?: VNodeCall['dynamicProps'], directives?: VNodeCall['directives'], isBlock?: VNodeCall['isBlock'], disableTracking?: VNodeCall['disableTracking'], isComponent?: VNodeCall['isComponent'], loc?: SourceLocation): VNodeCall; -export declare function createArrayExpression(elements: ArrayExpression['elements'], loc?: SourceLocation): ArrayExpression; -export declare function createObjectExpression(properties: ObjectExpression['properties'], loc?: SourceLocation): ObjectExpression; -export declare function createObjectProperty(key: Property['key'] | string, value: Property['value']): Property; -export declare function createSimpleExpression(content: SimpleExpressionNode['content'], isStatic?: SimpleExpressionNode['isStatic'], loc?: SourceLocation, constType?: ConstantTypes): SimpleExpressionNode; -export declare function createInterpolation(content: InterpolationNode['content'] | string, loc: SourceLocation): InterpolationNode; -export declare function createCompoundExpression(children: CompoundExpressionNode['children'], loc?: SourceLocation): CompoundExpressionNode; -type InferCodegenNodeType<T> = T extends typeof RENDER_SLOT ? RenderSlotCall : CallExpression; -export declare function createCallExpression<T extends CallExpression['callee']>(callee: T, args?: CallExpression['arguments'], loc?: SourceLocation): InferCodegenNodeType<T>; -export declare function createFunctionExpression(params: FunctionExpression['params'], returns?: FunctionExpression['returns'], newline?: boolean, isSlot?: boolean, loc?: SourceLocation): FunctionExpression; -export declare function createConditionalExpression(test: ConditionalExpression['test'], consequent: ConditionalExpression['consequent'], alternate: ConditionalExpression['alternate'], newline?: boolean): ConditionalExpression; -export declare function createCacheExpression(index: number, value: JSChildNode, needPauseTracking?: boolean, inVOnce?: boolean): CacheExpression; -export declare function createBlockStatement(body: BlockStatement['body']): BlockStatement; -export declare function createTemplateLiteral(elements: TemplateLiteral['elements']): TemplateLiteral; -export declare function createIfStatement(test: IfStatement['test'], consequent: IfStatement['consequent'], alternate?: IfStatement['alternate']): IfStatement; -export declare function createAssignmentExpression(left: AssignmentExpression['left'], right: AssignmentExpression['right']): AssignmentExpression; -export declare function createSequenceExpression(expressions: SequenceExpression['expressions']): SequenceExpression; -export declare function createReturnStatement(returns: ReturnStatement['returns']): ReturnStatement; -export declare function getVNodeHelper(ssr: boolean, isComponent: boolean): typeof CREATE_VNODE | typeof CREATE_ELEMENT_VNODE; -export declare function getVNodeBlockHelper(ssr: boolean, isComponent: boolean): typeof CREATE_BLOCK | typeof CREATE_ELEMENT_BLOCK; -export declare function convertToBlock(node: VNodeCall, { helper, removeHelper, inSSR }: TransformContext): void; - -export interface CompilerError extends SyntaxError { - code: number | string; - loc?: SourceLocation; -} -export interface CoreCompilerError extends CompilerError { - code: ErrorCodes; -} -type InferCompilerError<T> = T extends ErrorCodes ? CoreCompilerError : CompilerError; -export declare function createCompilerError<T extends number>(code: T, loc?: SourceLocation, messages?: { - [code: number]: string; -}, additionalMessage?: string): InferCompilerError<T>; -export declare enum ErrorCodes { - ABRUPT_CLOSING_OF_EMPTY_COMMENT = 0, - CDATA_IN_HTML_CONTENT = 1, - DUPLICATE_ATTRIBUTE = 2, - END_TAG_WITH_ATTRIBUTES = 3, - END_TAG_WITH_TRAILING_SOLIDUS = 4, - EOF_BEFORE_TAG_NAME = 5, - EOF_IN_CDATA = 6, - EOF_IN_COMMENT = 7, - EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT = 8, - EOF_IN_TAG = 9, - INCORRECTLY_CLOSED_COMMENT = 10, - INCORRECTLY_OPENED_COMMENT = 11, - INVALID_FIRST_CHARACTER_OF_TAG_NAME = 12, - MISSING_ATTRIBUTE_VALUE = 13, - MISSING_END_TAG_NAME = 14, - MISSING_WHITESPACE_BETWEEN_ATTRIBUTES = 15, - NESTED_COMMENT = 16, - UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME = 17, - UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE = 18, - UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME = 19, - UNEXPECTED_NULL_CHARACTER = 20, - UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME = 21, - UNEXPECTED_SOLIDUS_IN_TAG = 22, - X_INVALID_END_TAG = 23, - X_MISSING_END_TAG = 24, - X_MISSING_INTERPOLATION_END = 25, - X_MISSING_DIRECTIVE_NAME = 26, - X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END = 27, - X_V_IF_NO_EXPRESSION = 28, - X_V_IF_SAME_KEY = 29, - X_V_ELSE_NO_ADJACENT_IF = 30, - X_V_FOR_NO_EXPRESSION = 31, - X_V_FOR_MALFORMED_EXPRESSION = 32, - X_V_FOR_TEMPLATE_KEY_PLACEMENT = 33, - X_V_BIND_NO_EXPRESSION = 34, - X_V_ON_NO_EXPRESSION = 35, - X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET = 36, - X_V_SLOT_MIXED_SLOT_USAGE = 37, - X_V_SLOT_DUPLICATE_SLOT_NAMES = 38, - X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN = 39, - X_V_SLOT_MISPLACED = 40, - X_V_MODEL_NO_EXPRESSION = 41, - X_V_MODEL_MALFORMED_EXPRESSION = 42, - X_V_MODEL_ON_SCOPE_VARIABLE = 43, - X_V_MODEL_ON_PROPS = 44, - X_INVALID_EXPRESSION = 45, - X_KEEP_ALIVE_INVALID_CHILDREN = 46, - X_PREFIX_ID_NOT_SUPPORTED = 47, - X_MODULE_MODE_NOT_SUPPORTED = 48, - X_CACHE_HANDLER_NOT_SUPPORTED = 49, - X_SCOPE_ID_NOT_SUPPORTED = 50, - X_VNODE_HOOKS = 51, - X_V_BIND_INVALID_SAME_NAME_ARGUMENT = 52, - __EXTEND_POINT__ = 53 -} -export declare const errorMessages: Record<ErrorCodes, string>; - -interface ErrorHandlingOptions { - onWarn?: (warning: CompilerError) => void; - onError?: (error: CompilerError) => void; -} -export interface ParserOptions extends ErrorHandlingOptions, CompilerCompatOptions { - /** - * Base mode is platform agnostic and only parses HTML-like template syntax, - * treating all tags the same way. Specific tag parsing behavior can be - * configured by higher-level compilers. - * - * HTML mode adds additional logic for handling special parsing behavior in - * `<script>`, `<style>`,`<title>` and `<textarea>`. - * The logic is handled inside compiler-core for efficiency. - * - * SFC mode treats content of all root-level tags except `<template>` as plain - * text. - */ - parseMode?: 'base' | 'html' | 'sfc'; - /** - * Specify the root namespace to use when parsing a template. - * Defaults to `Namespaces.HTML` (0). - */ - ns?: Namespaces; - /** - * e.g. platform native elements, e.g. `<div>` for browsers - */ - isNativeTag?: (tag: string) => boolean; - /** - * e.g. native elements that can self-close, e.g. `<img>`, `<br>`, `<hr>` - */ - isVoidTag?: (tag: string) => boolean; - /** - * e.g. elements that should preserve whitespace inside, e.g. `<pre>` - */ - isPreTag?: (tag: string) => boolean; - /** - * Elements that should ignore the first newline token per parinsg spec - * e.g. `<textarea>` and `<pre>` - */ - isIgnoreNewlineTag?: (tag: string) => boolean; - /** - * Platform-specific built-in components e.g. `<Transition>` - */ - isBuiltInComponent?: (tag: string) => symbol | void; - /** - * Separate option for end users to extend the native elements list - */ - isCustomElement?: (tag: string) => boolean | void; - /** - * Get tag namespace - */ - getNamespace?: (tag: string, parent: ElementNode | undefined, rootNamespace: Namespace) => Namespace; - /** - * @default ['{{', '}}'] - */ - delimiters?: [string, string]; - /** - * Whitespace handling strategy - * @default 'condense' - */ - whitespace?: 'preserve' | 'condense'; - /** - * Only used for DOM compilers that runs in the browser. - * In non-browser builds, this option is ignored. - */ - decodeEntities?: (rawText: string, asAttr: boolean) => string; - /** - * Whether to keep comments in the templates AST. - * This defaults to `true` in development and `false` in production builds. - */ - comments?: boolean; - /** - * Parse JavaScript expressions with Babel. - * @default false - */ - prefixIdentifiers?: boolean; - /** - * A list of parser plugins to enable for `@babel/parser`, which is used to - * parse expressions in bindings and interpolations. - * https://babeljs.io/docs/en/next/babel-parser#plugins - */ - expressionPlugins?: ParserPlugin[]; -} -export type HoistTransform = (children: TemplateChildNode[], context: TransformContext, parent: ParentNode) => void; -export declare enum BindingTypes { - /** - * returned from data() - */ - DATA = "data", - /** - * declared as a prop - */ - PROPS = "props", - /** - * a local alias of a `<script setup>` destructured prop. - * the original is stored in __propsAliases of the bindingMetadata object. - */ - PROPS_ALIASED = "props-aliased", - /** - * a let binding (may or may not be a ref) - */ - SETUP_LET = "setup-let", - /** - * a const binding that can never be a ref. - * these bindings don't need `unref()` calls when processed in inlined - * template expressions. - */ - SETUP_CONST = "setup-const", - /** - * a const binding that does not need `unref()`, but may be mutated. - */ - SETUP_REACTIVE_CONST = "setup-reactive-const", - /** - * a const binding that may be a ref. - */ - SETUP_MAYBE_REF = "setup-maybe-ref", - /** - * bindings that are guaranteed to be refs - */ - SETUP_REF = "setup-ref", - /** - * declared by other options, e.g. computed, inject - */ - OPTIONS = "options", - /** - * a literal constant, e.g. 'foo', 1, true - */ - LITERAL_CONST = "literal-const" -} -export type BindingMetadata = { - [key: string]: BindingTypes | undefined; -} & { - __isScriptSetup?: boolean; - __propsAliases?: Record<string, string>; -}; -interface SharedTransformCodegenOptions { - /** - * Transform expressions like {{ foo }} to `_ctx.foo`. - * If this option is false, the generated code will be wrapped in a - * `with (this) { ... }` block. - * - This is force-enabled in module mode, since modules are by default strict - * and cannot use `with` - * @default mode === 'module' - */ - prefixIdentifiers?: boolean; - /** - * Control whether generate SSR-optimized render functions instead. - * The resulting function must be attached to the component via the - * `ssrRender` option instead of `render`. - * - * When compiler generates code for SSR's fallback branch, we need to set it to false: - * - context.ssr = false - * - * see `subTransform` in `ssrTransformComponent.ts` - */ - ssr?: boolean; - /** - * Indicates whether the compiler generates code for SSR, - * it is always true when generating code for SSR, - * regardless of whether we are generating code for SSR's fallback branch, - * this means that when the compiler generates code for SSR's fallback branch: - * - context.ssr = false - * - context.inSSR = true - */ - inSSR?: boolean; - /** - * Optional binding metadata analyzed from script - used to optimize - * binding access when `prefixIdentifiers` is enabled. - */ - bindingMetadata?: BindingMetadata; - /** - * Compile the function for inlining inside setup(). - * This allows the function to directly access setup() local bindings. - */ - inline?: boolean; - /** - * Indicates that transforms and codegen should try to output valid TS code - */ - isTS?: boolean; - /** - * Filename for source map generation. - * Also used for self-recursive reference in templates - * @default 'template.vue.html' - */ - filename?: string; -} -export interface TransformOptions extends SharedTransformCodegenOptions, ErrorHandlingOptions, CompilerCompatOptions { - /** - * An array of node transforms to be applied to every AST node. - */ - nodeTransforms?: NodeTransform[]; - /** - * An object of { name: transform } to be applied to every directive attribute - * node found on element nodes. - */ - directiveTransforms?: Record<string, DirectiveTransform | undefined>; - /** - * An optional hook to transform a node being hoisted. - * used by compiler-dom to turn hoisted nodes into stringified HTML vnodes. - * @default null - */ - transformHoist?: HoistTransform | null; - /** - * If the pairing runtime provides additional built-in elements, use this to - * mark them as built-in so the compiler will generate component vnodes - * for them. - */ - isBuiltInComponent?: (tag: string) => symbol | void; - /** - * Used by some transforms that expects only native elements - */ - isCustomElement?: (tag: string) => boolean | void; - /** - * Transform expressions like {{ foo }} to `_ctx.foo`. - * If this option is false, the generated code will be wrapped in a - * `with (this) { ... }` block. - * - This is force-enabled in module mode, since modules are by default strict - * and cannot use `with` - * @default mode === 'module' - */ - prefixIdentifiers?: boolean; - /** - * Cache static VNodes and props objects to `_hoisted_x` constants - * @default false - */ - hoistStatic?: boolean; - /** - * Cache v-on handlers to avoid creating new inline functions on each render, - * also avoids the need for dynamically patching the handlers by wrapping it. - * e.g `@click="foo"` by default is compiled to `{ onClick: foo }`. With this - * option it's compiled to: - * ```js - * { onClick: _cache[0] || (_cache[0] = e => _ctx.foo(e)) } - * ``` - * - Requires "prefixIdentifiers" to be enabled because it relies on scope - * analysis to determine if a handler is safe to cache. - * @default false - */ - cacheHandlers?: boolean; - /** - * A list of parser plugins to enable for `@babel/parser`, which is used to - * parse expressions in bindings and interpolations. - * https://babeljs.io/docs/en/next/babel-parser#plugins - */ - expressionPlugins?: ParserPlugin[]; - /** - * SFC scoped styles ID - */ - scopeId?: string | null; - /** - * Indicates this SFC template has used :slotted in its styles - * Defaults to `true` for backwards compatibility - SFC tooling should set it - * to `false` if no `:slotted` usage is detected in `<style>` - */ - slotted?: boolean; - /** - * SFC `<style vars>` injection string - * Should already be an object expression, e.g. `{ 'xxxx-color': color }` - * needed to render inline CSS variables on component root - */ - ssrCssVars?: string; - /** - * Whether to compile the template assuming it needs to handle HMR. - * Some edge cases may need to generate different code for HMR to work - * correctly, e.g. #6938, #7138 - */ - hmr?: boolean; -} -export interface CodegenOptions extends SharedTransformCodegenOptions { - /** - * - `module` mode will generate ES module import statements for helpers - * and export the render function as the default export. - * - `function` mode will generate a single `const { helpers... } = Vue` - * statement and return the render function. It expects `Vue` to be globally - * available (or passed by wrapping the code with an IIFE). It is meant to be - * used with `new Function(code)()` to generate a render function at runtime. - * @default 'function' - */ - mode?: 'module' | 'function'; - /** - * Generate source map? - * @default false - */ - sourceMap?: boolean; - /** - * SFC scoped styles ID - */ - scopeId?: string | null; - /** - * Option to optimize helper import bindings via variable assignment - * (only used for webpack code-split) - * @default false - */ - optimizeImports?: boolean; - /** - * Customize where to import runtime helpers from. - * @default 'vue' - */ - runtimeModuleName?: string; - /** - * Customize where to import ssr runtime helpers from/** - * @default 'vue/server-renderer' - */ - ssrRuntimeModuleName?: string; - /** - * Customize the global variable name of `Vue` to get helpers from - * in function mode - * @default 'Vue' - */ - runtimeGlobalName?: string; -} -export type CompilerOptions = ParserOptions & TransformOptions & CodegenOptions; - -/** - * The `SourceMapGenerator` type from `source-map-js` is a bit incomplete as it - * misses `toJSON()`. We also need to add types for internal properties which we - * need to access for better performance. - * - * Since TS 5.3, dts generation starts to strangely include broken triple slash - * references for source-map-js, so we are inlining all source map related types - * here to to workaround that. - */ -export interface CodegenSourceMapGenerator { - setSourceContent(sourceFile: string, sourceContent: string): void; - toJSON(): RawSourceMap; - _sources: Set<string>; - _names: Set<string>; - _mappings: { - add(mapping: MappingItem): void; - }; -} -export interface RawSourceMap { - file?: string; - sourceRoot?: string; - version: string; - sources: string[]; - names: string[]; - sourcesContent?: string[]; - mappings: string; -} -interface MappingItem { - source: string; - generatedLine: number; - generatedColumn: number; - originalLine: number; - originalColumn: number; - name: string | null; -} -type CodegenNode = TemplateChildNode | JSChildNode | SSRCodegenNode; -export interface CodegenResult { - code: string; - preamble: string; - ast: RootNode; - map?: RawSourceMap; -} -export interface CodegenContext extends Omit<Required<CodegenOptions>, 'bindingMetadata' | 'inline'> { - source: string; - code: string; - line: number; - column: number; - offset: number; - indentLevel: number; - pure: boolean; - map?: CodegenSourceMapGenerator; - helper(key: symbol): string; - push(code: string, newlineIndex?: number, node?: CodegenNode): void; - indent(): void; - deindent(withoutNewLine?: boolean): void; - newline(): void; -} -export declare function generate(ast: RootNode, options?: CodegenOptions & { - onContextCreated?: (context: CodegenContext) => void; -}): CodegenResult; - -export type TransformPreset = [ - NodeTransform[], - Record<string, DirectiveTransform> -]; -export declare function getBaseTransformPreset(prefixIdentifiers?: boolean): TransformPreset; -export declare function baseCompile(source: string | RootNode, options?: CompilerOptions): CodegenResult; - -export declare const isStaticExp: (p: JSChildNode) => p is SimpleExpressionNode; -export declare function isCoreComponent(tag: string): symbol | void; -export declare const isSimpleIdentifier: (name: string) => boolean; -/** - * Simple lexer to check if an expression is a member expression. This is - * lax and only checks validity at the root level (i.e. does not validate exps - * inside square brackets), but it's ok since these are only used on template - * expressions and false positives are invalid expressions in the first place. - */ -export declare const isMemberExpressionBrowser: (exp: ExpressionNode) => boolean; -export declare const isMemberExpressionNode: (exp: ExpressionNode, context: TransformContext) => boolean; -export declare const isMemberExpression: (exp: ExpressionNode, context: TransformContext) => boolean; -export declare const isFnExpressionBrowser: (exp: ExpressionNode) => boolean; -export declare const isFnExpressionNode: (exp: ExpressionNode, context: TransformContext) => boolean; -export declare const isFnExpression: (exp: ExpressionNode, context: TransformContext) => boolean; -export declare function advancePositionWithClone(pos: Position, source: string, numberOfCharacters?: number): Position; -export declare function advancePositionWithMutation(pos: Position, source: string, numberOfCharacters?: number): Position; -export declare function assert(condition: boolean, msg?: string): void; -export declare function findDir(node: ElementNode, name: string | RegExp, allowEmpty?: boolean): DirectiveNode | undefined; -export declare function findProp(node: ElementNode, name: string, dynamicOnly?: boolean, allowEmpty?: boolean): ElementNode['props'][0] | undefined; -export declare function isStaticArgOf(arg: DirectiveNode['arg'], name: string): boolean; -export declare function hasDynamicKeyVBind(node: ElementNode): boolean; -export declare function isText(node: TemplateChildNode): node is TextNode | InterpolationNode; -export declare function isVSlot(p: ElementNode['props'][0]): p is DirectiveNode; -export declare function isTemplateNode(node: RootNode | TemplateChildNode): node is TemplateNode; -export declare function isSlotOutlet(node: RootNode | TemplateChildNode): node is SlotOutletNode; -export declare function injectProp(node: VNodeCall | RenderSlotCall, prop: Property, context: TransformContext): void; -export declare function toValidAssetId(name: string, type: 'component' | 'directive' | 'filter'): string; -export declare function hasScopeRef(node: TemplateChildNode | IfBranchNode | ExpressionNode | CacheExpression | undefined, ids: TransformContext['identifiers']): boolean; -export declare function getMemoedVNodeCall(node: BlockCodegenNode | MemoExpression): VNodeCall | RenderSlotCall; -export declare const forAliasRE: RegExp; - -/** - * Return value indicates whether the AST walked can be a constant - */ -export declare function walkIdentifiers(root: Node$1, onIdentifier: (node: Identifier, parent: Node$1 | null, parentStack: Node$1[], isReference: boolean, isLocal: boolean) => void, includeAll?: boolean, parentStack?: Node$1[], knownIds?: Record<string, number>): void; -export declare function isReferencedIdentifier(id: Identifier, parent: Node$1 | null, parentStack: Node$1[]): boolean; -export declare function isInDestructureAssignment(parent: Node$1, parentStack: Node$1[]): boolean; -export declare function isInNewExpression(parentStack: Node$1[]): boolean; -export declare function walkFunctionParams(node: Function, onIdent: (id: Identifier) => void): void; -export declare function walkBlockDeclarations(block: BlockStatement$1 | Program, onIdent: (node: Identifier) => void): void; -export declare function extractIdentifiers(param: Node$1, nodes?: Identifier[]): Identifier[]; -export declare const isFunctionType: (node: Node$1) => node is Function; -export declare const isStaticProperty: (node: Node$1) => node is ObjectProperty; -export declare const isStaticPropertyKey: (node: Node$1, parent: Node$1) => boolean; -export declare const TS_NODE_TYPES: string[]; -export declare function unwrapTSNode(node: Node$1): Node$1; - -export declare const transformModel: DirectiveTransform; - -export declare const transformOn: DirectiveTransform; - -export declare const transformBind: DirectiveTransform; - -export declare const noopDirectiveTransform: DirectiveTransform; - -export declare function processIf(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (node: IfNode, branch: IfBranchNode, isRoot: boolean) => (() => void) | undefined): (() => void) | undefined; - -export declare function processFor(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (forNode: ForNode) => (() => void) | undefined): (() => void) | undefined; -export declare function createForLoopParams({ value, key, index }: ForParseResult, memoArgs?: ExpressionNode[]): ExpressionNode[]; - -export declare const transformExpression: NodeTransform; -export declare function processExpression(node: SimpleExpressionNode, context: TransformContext, asParams?: boolean, asRawStatements?: boolean, localVars?: Record<string, number>): ExpressionNode; -export declare function stringifyExpression(exp: ExpressionNode | string): string; - -export declare const trackSlotScopes: NodeTransform; -export declare const trackVForSlotScopes: NodeTransform; -export type SlotFnBuilder = (slotProps: ExpressionNode | undefined, vFor: DirectiveNode | undefined, slotChildren: TemplateChildNode[], loc: SourceLocation) => FunctionExpression; -export declare function buildSlots(node: ElementNode, context: TransformContext, buildSlotFn?: SlotFnBuilder): { - slots: SlotsExpression; - hasDynamicSlots: boolean; -}; - -interface SlotOutletProcessResult { - slotName: string | ExpressionNode; - slotProps: PropsExpression | undefined; -} -export declare function processSlotOutlet(node: SlotOutletNode, context: TransformContext): SlotOutletProcessResult; - -export declare function getConstantType(node: TemplateChildNode | SimpleExpressionNode | CacheExpression, context: TransformContext): ConstantTypes; - diff --git a/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js b/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js deleted file mode 100644 index 8da200e..0000000 --- a/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js +++ /dev/null @@ -1,5790 +0,0 @@ -/** -* @vue/compiler-core v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -import { isString, NOOP, isObject, NO, extend, isSymbol, isArray, capitalize, camelize, EMPTY_OBJ, PatchFlagNames, slotFlagsText, isOn, isBuiltInDirective, isReservedProp, toHandlerKey } from '@vue/shared'; -export { generateCodeFrame } from '@vue/shared'; - -const FRAGMENT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Fragment` : ``); -const TELEPORT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Teleport` : ``); -const SUSPENSE = Symbol(!!(process.env.NODE_ENV !== "production") ? `Suspense` : ``); -const KEEP_ALIVE = Symbol(!!(process.env.NODE_ENV !== "production") ? `KeepAlive` : ``); -const BASE_TRANSITION = Symbol( - !!(process.env.NODE_ENV !== "production") ? `BaseTransition` : `` -); -const OPEN_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `openBlock` : ``); -const CREATE_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `createBlock` : ``); -const CREATE_ELEMENT_BLOCK = Symbol( - !!(process.env.NODE_ENV !== "production") ? `createElementBlock` : `` -); -const CREATE_VNODE = Symbol(!!(process.env.NODE_ENV !== "production") ? `createVNode` : ``); -const CREATE_ELEMENT_VNODE = Symbol( - !!(process.env.NODE_ENV !== "production") ? `createElementVNode` : `` -); -const CREATE_COMMENT = Symbol( - !!(process.env.NODE_ENV !== "production") ? `createCommentVNode` : `` -); -const CREATE_TEXT = Symbol( - !!(process.env.NODE_ENV !== "production") ? `createTextVNode` : `` -); -const CREATE_STATIC = Symbol( - !!(process.env.NODE_ENV !== "production") ? `createStaticVNode` : `` -); -const RESOLVE_COMPONENT = Symbol( - !!(process.env.NODE_ENV !== "production") ? `resolveComponent` : `` -); -const RESOLVE_DYNAMIC_COMPONENT = Symbol( - !!(process.env.NODE_ENV !== "production") ? `resolveDynamicComponent` : `` -); -const RESOLVE_DIRECTIVE = Symbol( - !!(process.env.NODE_ENV !== "production") ? `resolveDirective` : `` -); -const RESOLVE_FILTER = Symbol( - !!(process.env.NODE_ENV !== "production") ? `resolveFilter` : `` -); -const WITH_DIRECTIVES = Symbol( - !!(process.env.NODE_ENV !== "production") ? `withDirectives` : `` -); -const RENDER_LIST = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderList` : ``); -const RENDER_SLOT = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderSlot` : ``); -const CREATE_SLOTS = Symbol(!!(process.env.NODE_ENV !== "production") ? `createSlots` : ``); -const TO_DISPLAY_STRING = Symbol( - !!(process.env.NODE_ENV !== "production") ? `toDisplayString` : `` -); -const MERGE_PROPS = Symbol(!!(process.env.NODE_ENV !== "production") ? `mergeProps` : ``); -const NORMALIZE_CLASS = Symbol( - !!(process.env.NODE_ENV !== "production") ? `normalizeClass` : `` -); -const NORMALIZE_STYLE = Symbol( - !!(process.env.NODE_ENV !== "production") ? `normalizeStyle` : `` -); -const NORMALIZE_PROPS = Symbol( - !!(process.env.NODE_ENV !== "production") ? `normalizeProps` : `` -); -const GUARD_REACTIVE_PROPS = Symbol( - !!(process.env.NODE_ENV !== "production") ? `guardReactiveProps` : `` -); -const TO_HANDLERS = Symbol(!!(process.env.NODE_ENV !== "production") ? `toHandlers` : ``); -const CAMELIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `camelize` : ``); -const CAPITALIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `capitalize` : ``); -const TO_HANDLER_KEY = Symbol( - !!(process.env.NODE_ENV !== "production") ? `toHandlerKey` : `` -); -const SET_BLOCK_TRACKING = Symbol( - !!(process.env.NODE_ENV !== "production") ? `setBlockTracking` : `` -); -const PUSH_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `pushScopeId` : ``); -const POP_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `popScopeId` : ``); -const WITH_CTX = Symbol(!!(process.env.NODE_ENV !== "production") ? `withCtx` : ``); -const UNREF = Symbol(!!(process.env.NODE_ENV !== "production") ? `unref` : ``); -const IS_REF = Symbol(!!(process.env.NODE_ENV !== "production") ? `isRef` : ``); -const WITH_MEMO = Symbol(!!(process.env.NODE_ENV !== "production") ? `withMemo` : ``); -const IS_MEMO_SAME = Symbol(!!(process.env.NODE_ENV !== "production") ? `isMemoSame` : ``); -const helperNameMap = { - [FRAGMENT]: `Fragment`, - [TELEPORT]: `Teleport`, - [SUSPENSE]: `Suspense`, - [KEEP_ALIVE]: `KeepAlive`, - [BASE_TRANSITION]: `BaseTransition`, - [OPEN_BLOCK]: `openBlock`, - [CREATE_BLOCK]: `createBlock`, - [CREATE_ELEMENT_BLOCK]: `createElementBlock`, - [CREATE_VNODE]: `createVNode`, - [CREATE_ELEMENT_VNODE]: `createElementVNode`, - [CREATE_COMMENT]: `createCommentVNode`, - [CREATE_TEXT]: `createTextVNode`, - [CREATE_STATIC]: `createStaticVNode`, - [RESOLVE_COMPONENT]: `resolveComponent`, - [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, - [RESOLVE_DIRECTIVE]: `resolveDirective`, - [RESOLVE_FILTER]: `resolveFilter`, - [WITH_DIRECTIVES]: `withDirectives`, - [RENDER_LIST]: `renderList`, - [RENDER_SLOT]: `renderSlot`, - [CREATE_SLOTS]: `createSlots`, - [TO_DISPLAY_STRING]: `toDisplayString`, - [MERGE_PROPS]: `mergeProps`, - [NORMALIZE_CLASS]: `normalizeClass`, - [NORMALIZE_STYLE]: `normalizeStyle`, - [NORMALIZE_PROPS]: `normalizeProps`, - [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, - [TO_HANDLERS]: `toHandlers`, - [CAMELIZE]: `camelize`, - [CAPITALIZE]: `capitalize`, - [TO_HANDLER_KEY]: `toHandlerKey`, - [SET_BLOCK_TRACKING]: `setBlockTracking`, - [PUSH_SCOPE_ID]: `pushScopeId`, - [POP_SCOPE_ID]: `popScopeId`, - [WITH_CTX]: `withCtx`, - [UNREF]: `unref`, - [IS_REF]: `isRef`, - [WITH_MEMO]: `withMemo`, - [IS_MEMO_SAME]: `isMemoSame` -}; -function registerRuntimeHelpers(helpers) { - Object.getOwnPropertySymbols(helpers).forEach((s) => { - helperNameMap[s] = helpers[s]; - }); -} - -const Namespaces = { - "HTML": 0, - "0": "HTML", - "SVG": 1, - "1": "SVG", - "MATH_ML": 2, - "2": "MATH_ML" -}; -const NodeTypes = { - "ROOT": 0, - "0": "ROOT", - "ELEMENT": 1, - "1": "ELEMENT", - "TEXT": 2, - "2": "TEXT", - "COMMENT": 3, - "3": "COMMENT", - "SIMPLE_EXPRESSION": 4, - "4": "SIMPLE_EXPRESSION", - "INTERPOLATION": 5, - "5": "INTERPOLATION", - "ATTRIBUTE": 6, - "6": "ATTRIBUTE", - "DIRECTIVE": 7, - "7": "DIRECTIVE", - "COMPOUND_EXPRESSION": 8, - "8": "COMPOUND_EXPRESSION", - "IF": 9, - "9": "IF", - "IF_BRANCH": 10, - "10": "IF_BRANCH", - "FOR": 11, - "11": "FOR", - "TEXT_CALL": 12, - "12": "TEXT_CALL", - "VNODE_CALL": 13, - "13": "VNODE_CALL", - "JS_CALL_EXPRESSION": 14, - "14": "JS_CALL_EXPRESSION", - "JS_OBJECT_EXPRESSION": 15, - "15": "JS_OBJECT_EXPRESSION", - "JS_PROPERTY": 16, - "16": "JS_PROPERTY", - "JS_ARRAY_EXPRESSION": 17, - "17": "JS_ARRAY_EXPRESSION", - "JS_FUNCTION_EXPRESSION": 18, - "18": "JS_FUNCTION_EXPRESSION", - "JS_CONDITIONAL_EXPRESSION": 19, - "19": "JS_CONDITIONAL_EXPRESSION", - "JS_CACHE_EXPRESSION": 20, - "20": "JS_CACHE_EXPRESSION", - "JS_BLOCK_STATEMENT": 21, - "21": "JS_BLOCK_STATEMENT", - "JS_TEMPLATE_LITERAL": 22, - "22": "JS_TEMPLATE_LITERAL", - "JS_IF_STATEMENT": 23, - "23": "JS_IF_STATEMENT", - "JS_ASSIGNMENT_EXPRESSION": 24, - "24": "JS_ASSIGNMENT_EXPRESSION", - "JS_SEQUENCE_EXPRESSION": 25, - "25": "JS_SEQUENCE_EXPRESSION", - "JS_RETURN_STATEMENT": 26, - "26": "JS_RETURN_STATEMENT" -}; -const ElementTypes = { - "ELEMENT": 0, - "0": "ELEMENT", - "COMPONENT": 1, - "1": "COMPONENT", - "SLOT": 2, - "2": "SLOT", - "TEMPLATE": 3, - "3": "TEMPLATE" -}; -const ConstantTypes = { - "NOT_CONSTANT": 0, - "0": "NOT_CONSTANT", - "CAN_SKIP_PATCH": 1, - "1": "CAN_SKIP_PATCH", - "CAN_CACHE": 2, - "2": "CAN_CACHE", - "CAN_STRINGIFY": 3, - "3": "CAN_STRINGIFY" -}; -const locStub = { - start: { line: 1, column: 1, offset: 0 }, - end: { line: 1, column: 1, offset: 0 }, - source: "" -}; -function createRoot(children, source = "") { - return { - type: 0, - source, - children, - helpers: /* @__PURE__ */ new Set(), - components: [], - directives: [], - hoists: [], - imports: [], - cached: [], - temps: 0, - codegenNode: void 0, - loc: locStub - }; -} -function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { - if (context) { - if (isBlock) { - context.helper(OPEN_BLOCK); - context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); - } else { - context.helper(getVNodeHelper(context.inSSR, isComponent)); - } - if (directives) { - context.helper(WITH_DIRECTIVES); - } - } - return { - type: 13, - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent, - loc - }; -} -function createArrayExpression(elements, loc = locStub) { - return { - type: 17, - loc, - elements - }; -} -function createObjectExpression(properties, loc = locStub) { - return { - type: 15, - loc, - properties - }; -} -function createObjectProperty(key, value) { - return { - type: 16, - loc: locStub, - key: isString(key) ? createSimpleExpression(key, true) : key, - value - }; -} -function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { - return { - type: 4, - loc, - content, - isStatic, - constType: isStatic ? 3 : constType - }; -} -function createInterpolation(content, loc) { - return { - type: 5, - loc, - content: isString(content) ? createSimpleExpression(content, false, loc) : content - }; -} -function createCompoundExpression(children, loc = locStub) { - return { - type: 8, - loc, - children - }; -} -function createCallExpression(callee, args = [], loc = locStub) { - return { - type: 14, - loc, - callee, - arguments: args - }; -} -function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { - return { - type: 18, - params, - returns, - newline, - isSlot, - loc - }; -} -function createConditionalExpression(test, consequent, alternate, newline = true) { - return { - type: 19, - test, - consequent, - alternate, - newline, - loc: locStub - }; -} -function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) { - return { - type: 20, - index, - value, - needPauseTracking, - inVOnce, - needArraySpread: false, - loc: locStub - }; -} -function createBlockStatement(body) { - return { - type: 21, - body, - loc: locStub - }; -} -function createTemplateLiteral(elements) { - return { - type: 22, - elements, - loc: locStub - }; -} -function createIfStatement(test, consequent, alternate) { - return { - type: 23, - test, - consequent, - alternate, - loc: locStub - }; -} -function createAssignmentExpression(left, right) { - return { - type: 24, - left, - right, - loc: locStub - }; -} -function createSequenceExpression(expressions) { - return { - type: 25, - expressions, - loc: locStub - }; -} -function createReturnStatement(returns) { - return { - type: 26, - returns, - loc: locStub - }; -} -function getVNodeHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; -} -function getVNodeBlockHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; -} -function convertToBlock(node, { helper, removeHelper, inSSR }) { - if (!node.isBlock) { - node.isBlock = true; - removeHelper(getVNodeHelper(inSSR, node.isComponent)); - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(inSSR, node.isComponent)); - } -} - -const defaultDelimitersOpen = new Uint8Array([123, 123]); -const defaultDelimitersClose = new Uint8Array([125, 125]); -function isTagStartChar(c) { - return c >= 97 && c <= 122 || c >= 65 && c <= 90; -} -function isWhitespace(c) { - return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; -} -function isEndOfTagSection(c) { - return c === 47 || c === 62 || isWhitespace(c); -} -function toCharCodes(str) { - const ret = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) { - ret[i] = str.charCodeAt(i); - } - return ret; -} -const Sequences = { - Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), - // CDATA[ - CdataEnd: new Uint8Array([93, 93, 62]), - // ]]> - CommentEnd: new Uint8Array([45, 45, 62]), - // `-->` - ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), - // `<\/script` - StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), - // `</style` - TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), - // `</title` - TextareaEnd: new Uint8Array([ - 60, - 47, - 116, - 101, - 120, - 116, - 97, - 114, - 101, - 97 - ]) - // `</textarea -}; -class Tokenizer { - constructor(stack, cbs) { - this.stack = stack; - this.cbs = cbs; - /** The current state the tokenizer is in. */ - this.state = 1; - /** The read buffer. */ - this.buffer = ""; - /** The beginning of the section that is currently being read. */ - this.sectionStart = 0; - /** The index within the buffer that we are currently looking at. */ - this.index = 0; - /** The start of the last entity. */ - this.entityStart = 0; - /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ - this.baseState = 1; - /** For special parsing behavior inside of script and style tags. */ - this.inRCDATA = false; - /** For disabling RCDATA tags handling */ - this.inXML = false; - /** For disabling interpolation parsing in v-pre */ - this.inVPre = false; - /** Record newline positions for fast line / column calculation */ - this.newlines = []; - this.mode = 0; - this.delimiterOpen = defaultDelimitersOpen; - this.delimiterClose = defaultDelimitersClose; - this.delimiterIndex = -1; - this.currentSequence = void 0; - this.sequenceIndex = 0; - } - get inSFCRoot() { - return this.mode === 2 && this.stack.length === 0; - } - reset() { - this.state = 1; - this.mode = 0; - this.buffer = ""; - this.sectionStart = 0; - this.index = 0; - this.baseState = 1; - this.inRCDATA = false; - this.currentSequence = void 0; - this.newlines.length = 0; - this.delimiterOpen = defaultDelimitersOpen; - this.delimiterClose = defaultDelimitersClose; - } - /** - * Generate Position object with line / column information using recorded - * newline positions. We know the index is always going to be an already - * processed index, so all the newlines up to this index should have been - * recorded. - */ - getPos(index) { - let line = 1; - let column = index + 1; - for (let i = this.newlines.length - 1; i >= 0; i--) { - const newlineIndex = this.newlines[i]; - if (index > newlineIndex) { - line = i + 2; - column = index - newlineIndex; - break; - } - } - return { - column, - line, - offset: index - }; - } - peek() { - return this.buffer.charCodeAt(this.index + 1); - } - stateText(c) { - if (c === 60) { - if (this.index > this.sectionStart) { - this.cbs.ontext(this.sectionStart, this.index); - } - this.state = 5; - this.sectionStart = this.index; - } else if (!this.inVPre && c === this.delimiterOpen[0]) { - this.state = 2; - this.delimiterIndex = 0; - this.stateInterpolationOpen(c); - } - } - stateInterpolationOpen(c) { - if (c === this.delimiterOpen[this.delimiterIndex]) { - if (this.delimiterIndex === this.delimiterOpen.length - 1) { - const start = this.index + 1 - this.delimiterOpen.length; - if (start > this.sectionStart) { - this.cbs.ontext(this.sectionStart, start); - } - this.state = 3; - this.sectionStart = start; - } else { - this.delimiterIndex++; - } - } else if (this.inRCDATA) { - this.state = 32; - this.stateInRCDATA(c); - } else { - this.state = 1; - this.stateText(c); - } - } - stateInterpolation(c) { - if (c === this.delimiterClose[0]) { - this.state = 4; - this.delimiterIndex = 0; - this.stateInterpolationClose(c); - } - } - stateInterpolationClose(c) { - if (c === this.delimiterClose[this.delimiterIndex]) { - if (this.delimiterIndex === this.delimiterClose.length - 1) { - this.cbs.oninterpolation(this.sectionStart, this.index + 1); - if (this.inRCDATA) { - this.state = 32; - } else { - this.state = 1; - } - this.sectionStart = this.index + 1; - } else { - this.delimiterIndex++; - } - } else { - this.state = 3; - this.stateInterpolation(c); - } - } - stateSpecialStartSequence(c) { - const isEnd = this.sequenceIndex === this.currentSequence.length; - const isMatch = isEnd ? ( - // If we are at the end of the sequence, make sure the tag name has ended - isEndOfTagSection(c) - ) : ( - // Otherwise, do a case-insensitive comparison - (c | 32) === this.currentSequence[this.sequenceIndex] - ); - if (!isMatch) { - this.inRCDATA = false; - } else if (!isEnd) { - this.sequenceIndex++; - return; - } - this.sequenceIndex = 0; - this.state = 6; - this.stateInTagName(c); - } - /** Look for an end tag. For <title> and <textarea>, also decode entities. */ - stateInRCDATA(c) { - if (this.sequenceIndex === this.currentSequence.length) { - if (c === 62 || isWhitespace(c)) { - const endOfText = this.index - this.currentSequence.length; - if (this.sectionStart < endOfText) { - const actualIndex = this.index; - this.index = endOfText; - this.cbs.ontext(this.sectionStart, endOfText); - this.index = actualIndex; - } - this.sectionStart = endOfText + 2; - this.stateInClosingTagName(c); - this.inRCDATA = false; - return; - } - this.sequenceIndex = 0; - } - if ((c | 32) === this.currentSequence[this.sequenceIndex]) { - this.sequenceIndex += 1; - } else if (this.sequenceIndex === 0) { - if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { - if (!this.inVPre && c === this.delimiterOpen[0]) { - this.state = 2; - this.delimiterIndex = 0; - this.stateInterpolationOpen(c); - } - } else if (this.fastForwardTo(60)) { - this.sequenceIndex = 1; - } - } else { - this.sequenceIndex = Number(c === 60); - } - } - stateCDATASequence(c) { - if (c === Sequences.Cdata[this.sequenceIndex]) { - if (++this.sequenceIndex === Sequences.Cdata.length) { - this.state = 28; - this.currentSequence = Sequences.CdataEnd; - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - } - } else { - this.sequenceIndex = 0; - this.state = 23; - this.stateInDeclaration(c); - } - } - /** - * When we wait for one specific character, we can speed things up - * by skipping through the buffer until we find it. - * - * @returns Whether the character was found. - */ - fastForwardTo(c) { - while (++this.index < this.buffer.length) { - const cc = this.buffer.charCodeAt(this.index); - if (cc === 10) { - this.newlines.push(this.index); - } - if (cc === c) { - return true; - } - } - this.index = this.buffer.length - 1; - return false; - } - /** - * Comments and CDATA end with `-->` and `]]>`. - * - * Their common qualities are: - * - Their end sequences have a distinct character they start with. - * - That character is then repeated, so we have to check multiple repeats. - * - All characters but the start character of the sequence can be skipped. - */ - stateInCommentLike(c) { - if (c === this.currentSequence[this.sequenceIndex]) { - if (++this.sequenceIndex === this.currentSequence.length) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, this.index - 2); - } else { - this.cbs.oncomment(this.sectionStart, this.index - 2); - } - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - this.state = 1; - } - } else if (this.sequenceIndex === 0) { - if (this.fastForwardTo(this.currentSequence[0])) { - this.sequenceIndex = 1; - } - } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { - this.sequenceIndex = 0; - } - } - startSpecial(sequence, offset) { - this.enterRCDATA(sequence, offset); - this.state = 31; - } - enterRCDATA(sequence, offset) { - this.inRCDATA = true; - this.currentSequence = sequence; - this.sequenceIndex = offset; - } - stateBeforeTagName(c) { - if (c === 33) { - this.state = 22; - this.sectionStart = this.index + 1; - } else if (c === 63) { - this.state = 24; - this.sectionStart = this.index + 1; - } else if (isTagStartChar(c)) { - this.sectionStart = this.index; - if (this.mode === 0) { - this.state = 6; - } else if (this.inSFCRoot) { - this.state = 34; - } else if (!this.inXML) { - if (c === 116) { - this.state = 30; - } else { - this.state = c === 115 ? 29 : 6; - } - } else { - this.state = 6; - } - } else if (c === 47) { - this.state = 8; - } else { - this.state = 1; - this.stateText(c); - } - } - stateInTagName(c) { - if (isEndOfTagSection(c)) { - this.handleTagName(c); - } - } - stateInSFCRootTagName(c) { - if (isEndOfTagSection(c)) { - const tag = this.buffer.slice(this.sectionStart, this.index); - if (tag !== "template") { - this.enterRCDATA(toCharCodes(`</` + tag), 0); - } - this.handleTagName(c); - } - } - handleTagName(c) { - this.cbs.onopentagname(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = 11; - this.stateBeforeAttrName(c); - } - stateBeforeClosingTagName(c) { - if (isWhitespace(c)) ; else if (c === 62) { - if (!!(process.env.NODE_ENV !== "production") || false) { - this.cbs.onerr(14, this.index); - } - this.state = 1; - this.sectionStart = this.index + 1; - } else { - this.state = isTagStartChar(c) ? 9 : 27; - this.sectionStart = this.index; - } - } - stateInClosingTagName(c) { - if (c === 62 || isWhitespace(c)) { - this.cbs.onclosetag(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = 10; - this.stateAfterClosingTagName(c); - } - } - stateAfterClosingTagName(c) { - if (c === 62) { - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeAttrName(c) { - if (c === 62) { - this.cbs.onopentagend(this.index); - if (this.inRCDATA) { - this.state = 32; - } else { - this.state = 1; - } - this.sectionStart = this.index + 1; - } else if (c === 47) { - this.state = 7; - if ((!!(process.env.NODE_ENV !== "production") || false) && this.peek() !== 62) { - this.cbs.onerr(22, this.index); - } - } else if (c === 60 && this.peek() === 47) { - this.cbs.onopentagend(this.index); - this.state = 5; - this.sectionStart = this.index; - } else if (!isWhitespace(c)) { - if ((!!(process.env.NODE_ENV !== "production") || false) && c === 61) { - this.cbs.onerr( - 19, - this.index - ); - } - this.handleAttrStart(c); - } - } - handleAttrStart(c) { - if (c === 118 && this.peek() === 45) { - this.state = 13; - this.sectionStart = this.index; - } else if (c === 46 || c === 58 || c === 64 || c === 35) { - this.cbs.ondirname(this.index, this.index + 1); - this.state = 14; - this.sectionStart = this.index + 1; - } else { - this.state = 12; - this.sectionStart = this.index; - } - } - stateInSelfClosingTag(c) { - if (c === 62) { - this.cbs.onselfclosingtag(this.index); - this.state = 1; - this.sectionStart = this.index + 1; - this.inRCDATA = false; - } else if (!isWhitespace(c)) { - this.state = 11; - this.stateBeforeAttrName(c); - } - } - stateInAttrName(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.onattribname(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if ((!!(process.env.NODE_ENV !== "production") || false) && (c === 34 || c === 39 || c === 60)) { - this.cbs.onerr( - 17, - this.index - ); - } - } - stateInDirName(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirname(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 58) { - this.cbs.ondirname(this.sectionStart, this.index); - this.state = 14; - this.sectionStart = this.index + 1; - } else if (c === 46) { - this.cbs.ondirname(this.sectionStart, this.index); - this.state = 16; - this.sectionStart = this.index + 1; - } - } - stateInDirArg(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirarg(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 91) { - this.state = 15; - } else if (c === 46) { - this.cbs.ondirarg(this.sectionStart, this.index); - this.state = 16; - this.sectionStart = this.index + 1; - } - } - stateInDynamicDirArg(c) { - if (c === 93) { - this.state = 14; - } else if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirarg(this.sectionStart, this.index + 1); - this.handleAttrNameEnd(c); - if (!!(process.env.NODE_ENV !== "production") || false) { - this.cbs.onerr( - 27, - this.index - ); - } - } - } - stateInDirModifier(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirmodifier(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 46) { - this.cbs.ondirmodifier(this.sectionStart, this.index); - this.sectionStart = this.index + 1; - } - } - handleAttrNameEnd(c) { - this.sectionStart = this.index; - this.state = 17; - this.cbs.onattribnameend(this.index); - this.stateAfterAttrName(c); - } - stateAfterAttrName(c) { - if (c === 61) { - this.state = 18; - } else if (c === 47 || c === 62) { - this.cbs.onattribend(0, this.sectionStart); - this.sectionStart = -1; - this.state = 11; - this.stateBeforeAttrName(c); - } else if (!isWhitespace(c)) { - this.cbs.onattribend(0, this.sectionStart); - this.handleAttrStart(c); - } - } - stateBeforeAttrValue(c) { - if (c === 34) { - this.state = 19; - this.sectionStart = this.index + 1; - } else if (c === 39) { - this.state = 20; - this.sectionStart = this.index + 1; - } else if (!isWhitespace(c)) { - this.sectionStart = this.index; - this.state = 21; - this.stateInAttrValueNoQuotes(c); - } - } - handleInAttrValue(c, quote) { - if (c === quote || this.fastForwardTo(quote)) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend( - quote === 34 ? 3 : 2, - this.index + 1 - ); - this.state = 11; - } - } - stateInAttrValueDoubleQuotes(c) { - this.handleInAttrValue(c, 34); - } - stateInAttrValueSingleQuotes(c) { - this.handleInAttrValue(c, 39); - } - stateInAttrValueNoQuotes(c) { - if (isWhitespace(c) || c === 62) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend(1, this.index); - this.state = 11; - this.stateBeforeAttrName(c); - } else if ((!!(process.env.NODE_ENV !== "production") || false) && c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { - this.cbs.onerr( - 18, - this.index - ); - } else ; - } - stateBeforeDeclaration(c) { - if (c === 91) { - this.state = 26; - this.sequenceIndex = 0; - } else { - this.state = c === 45 ? 25 : 23; - } - } - stateInDeclaration(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateInProcessingInstruction(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.cbs.onprocessinginstruction(this.sectionStart, this.index); - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeComment(c) { - if (c === 45) { - this.state = 28; - this.currentSequence = Sequences.CommentEnd; - this.sequenceIndex = 2; - this.sectionStart = this.index + 1; - } else { - this.state = 23; - } - } - stateInSpecialComment(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.cbs.oncomment(this.sectionStart, this.index); - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeSpecialS(c) { - if (c === Sequences.ScriptEnd[3]) { - this.startSpecial(Sequences.ScriptEnd, 4); - } else if (c === Sequences.StyleEnd[3]) { - this.startSpecial(Sequences.StyleEnd, 4); - } else { - this.state = 6; - this.stateInTagName(c); - } - } - stateBeforeSpecialT(c) { - if (c === Sequences.TitleEnd[3]) { - this.startSpecial(Sequences.TitleEnd, 4); - } else if (c === Sequences.TextareaEnd[3]) { - this.startSpecial(Sequences.TextareaEnd, 4); - } else { - this.state = 6; - this.stateInTagName(c); - } - } - startEntity() { - } - stateInEntity() { - } - /** - * Iterates through the buffer, calling the function corresponding to the current state. - * - * States that are more likely to be hit are higher up, as a performance improvement. - */ - parse(input) { - this.buffer = input; - while (this.index < this.buffer.length) { - const c = this.buffer.charCodeAt(this.index); - if (c === 10) { - this.newlines.push(this.index); - } - switch (this.state) { - case 1: { - this.stateText(c); - break; - } - case 2: { - this.stateInterpolationOpen(c); - break; - } - case 3: { - this.stateInterpolation(c); - break; - } - case 4: { - this.stateInterpolationClose(c); - break; - } - case 31: { - this.stateSpecialStartSequence(c); - break; - } - case 32: { - this.stateInRCDATA(c); - break; - } - case 26: { - this.stateCDATASequence(c); - break; - } - case 19: { - this.stateInAttrValueDoubleQuotes(c); - break; - } - case 12: { - this.stateInAttrName(c); - break; - } - case 13: { - this.stateInDirName(c); - break; - } - case 14: { - this.stateInDirArg(c); - break; - } - case 15: { - this.stateInDynamicDirArg(c); - break; - } - case 16: { - this.stateInDirModifier(c); - break; - } - case 28: { - this.stateInCommentLike(c); - break; - } - case 27: { - this.stateInSpecialComment(c); - break; - } - case 11: { - this.stateBeforeAttrName(c); - break; - } - case 6: { - this.stateInTagName(c); - break; - } - case 34: { - this.stateInSFCRootTagName(c); - break; - } - case 9: { - this.stateInClosingTagName(c); - break; - } - case 5: { - this.stateBeforeTagName(c); - break; - } - case 17: { - this.stateAfterAttrName(c); - break; - } - case 20: { - this.stateInAttrValueSingleQuotes(c); - break; - } - case 18: { - this.stateBeforeAttrValue(c); - break; - } - case 8: { - this.stateBeforeClosingTagName(c); - break; - } - case 10: { - this.stateAfterClosingTagName(c); - break; - } - case 29: { - this.stateBeforeSpecialS(c); - break; - } - case 30: { - this.stateBeforeSpecialT(c); - break; - } - case 21: { - this.stateInAttrValueNoQuotes(c); - break; - } - case 7: { - this.stateInSelfClosingTag(c); - break; - } - case 23: { - this.stateInDeclaration(c); - break; - } - case 22: { - this.stateBeforeDeclaration(c); - break; - } - case 25: { - this.stateBeforeComment(c); - break; - } - case 24: { - this.stateInProcessingInstruction(c); - break; - } - case 33: { - this.stateInEntity(); - break; - } - } - this.index++; - } - this.cleanup(); - this.finish(); - } - /** - * Remove data that has already been consumed from the buffer. - */ - cleanup() { - if (this.sectionStart !== this.index) { - if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { - this.cbs.ontext(this.sectionStart, this.index); - this.sectionStart = this.index; - } else if (this.state === 19 || this.state === 20 || this.state === 21) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = this.index; - } - } - } - finish() { - this.handleTrailingData(); - this.cbs.onend(); - } - /** Handle any trailing data. */ - handleTrailingData() { - const endIndex = this.buffer.length; - if (this.sectionStart >= endIndex) { - return; - } - if (this.state === 28) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, endIndex); - } else { - this.cbs.oncomment(this.sectionStart, endIndex); - } - } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { - this.cbs.ontext(this.sectionStart, endIndex); - } - } - emitCodePoint(cp, consumed) { - } -} - -const CompilerDeprecationTypes = { - "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", - "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", - "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", - "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", - "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", - "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", - "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", - "COMPILER_FILTERS": "COMPILER_FILTERS" -}; -const deprecationData = { - ["COMPILER_IS_ON_ELEMENT"]: { - message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC"]: { - message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_OBJECT_ORDER"]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE"]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { - message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE"]: { - message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE"]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTERS"]: { - message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } -}; -function getCompatValue(key, { compatConfig }) { - const value = compatConfig && compatConfig[key]; - if (key === "MODE") { - return value || 3; - } else { - return value; - } -} -function isCompatEnabled(key, context) { - const mode = getCompatValue("MODE", context); - const value = getCompatValue(key, context); - return mode === 3 ? value === true : value !== false; -} -function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - if (!!(process.env.NODE_ENV !== "production") && enabled) { - warnDeprecation(key, context, loc, ...args); - } - return enabled; -} -function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === "suppress-warning") { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` - Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) err.loc = loc; - context.onWarn(err); -} - -function defaultOnError(error) { - throw error; -} -function defaultOnWarn(msg) { - !!(process.env.NODE_ENV !== "production") && console.warn(`[Vue warn] ${msg.message}`); -} -function createCompilerError(code, loc, messages, additionalMessage) { - const msg = !!(process.env.NODE_ENV !== "production") || false ? (messages || errorMessages)[code] + (additionalMessage || ``) : `https://vuejs.org/error-reference/#compiler-${code}`; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; -} -const ErrorCodes = { - "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, - "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", - "CDATA_IN_HTML_CONTENT": 1, - "1": "CDATA_IN_HTML_CONTENT", - "DUPLICATE_ATTRIBUTE": 2, - "2": "DUPLICATE_ATTRIBUTE", - "END_TAG_WITH_ATTRIBUTES": 3, - "3": "END_TAG_WITH_ATTRIBUTES", - "END_TAG_WITH_TRAILING_SOLIDUS": 4, - "4": "END_TAG_WITH_TRAILING_SOLIDUS", - "EOF_BEFORE_TAG_NAME": 5, - "5": "EOF_BEFORE_TAG_NAME", - "EOF_IN_CDATA": 6, - "6": "EOF_IN_CDATA", - "EOF_IN_COMMENT": 7, - "7": "EOF_IN_COMMENT", - "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, - "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", - "EOF_IN_TAG": 9, - "9": "EOF_IN_TAG", - "INCORRECTLY_CLOSED_COMMENT": 10, - "10": "INCORRECTLY_CLOSED_COMMENT", - "INCORRECTLY_OPENED_COMMENT": 11, - "11": "INCORRECTLY_OPENED_COMMENT", - "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, - "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", - "MISSING_ATTRIBUTE_VALUE": 13, - "13": "MISSING_ATTRIBUTE_VALUE", - "MISSING_END_TAG_NAME": 14, - "14": "MISSING_END_TAG_NAME", - "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, - "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", - "NESTED_COMMENT": 16, - "16": "NESTED_COMMENT", - "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, - "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", - "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, - "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", - "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, - "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", - "UNEXPECTED_NULL_CHARACTER": 20, - "20": "UNEXPECTED_NULL_CHARACTER", - "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, - "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", - "UNEXPECTED_SOLIDUS_IN_TAG": 22, - "22": "UNEXPECTED_SOLIDUS_IN_TAG", - "X_INVALID_END_TAG": 23, - "23": "X_INVALID_END_TAG", - "X_MISSING_END_TAG": 24, - "24": "X_MISSING_END_TAG", - "X_MISSING_INTERPOLATION_END": 25, - "25": "X_MISSING_INTERPOLATION_END", - "X_MISSING_DIRECTIVE_NAME": 26, - "26": "X_MISSING_DIRECTIVE_NAME", - "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, - "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", - "X_V_IF_NO_EXPRESSION": 28, - "28": "X_V_IF_NO_EXPRESSION", - "X_V_IF_SAME_KEY": 29, - "29": "X_V_IF_SAME_KEY", - "X_V_ELSE_NO_ADJACENT_IF": 30, - "30": "X_V_ELSE_NO_ADJACENT_IF", - "X_V_FOR_NO_EXPRESSION": 31, - "31": "X_V_FOR_NO_EXPRESSION", - "X_V_FOR_MALFORMED_EXPRESSION": 32, - "32": "X_V_FOR_MALFORMED_EXPRESSION", - "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, - "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", - "X_V_BIND_NO_EXPRESSION": 34, - "34": "X_V_BIND_NO_EXPRESSION", - "X_V_ON_NO_EXPRESSION": 35, - "35": "X_V_ON_NO_EXPRESSION", - "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, - "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", - "X_V_SLOT_MIXED_SLOT_USAGE": 37, - "37": "X_V_SLOT_MIXED_SLOT_USAGE", - "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, - "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", - "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, - "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", - "X_V_SLOT_MISPLACED": 40, - "40": "X_V_SLOT_MISPLACED", - "X_V_MODEL_NO_EXPRESSION": 41, - "41": "X_V_MODEL_NO_EXPRESSION", - "X_V_MODEL_MALFORMED_EXPRESSION": 42, - "42": "X_V_MODEL_MALFORMED_EXPRESSION", - "X_V_MODEL_ON_SCOPE_VARIABLE": 43, - "43": "X_V_MODEL_ON_SCOPE_VARIABLE", - "X_V_MODEL_ON_PROPS": 44, - "44": "X_V_MODEL_ON_PROPS", - "X_INVALID_EXPRESSION": 45, - "45": "X_INVALID_EXPRESSION", - "X_KEEP_ALIVE_INVALID_CHILDREN": 46, - "46": "X_KEEP_ALIVE_INVALID_CHILDREN", - "X_PREFIX_ID_NOT_SUPPORTED": 47, - "47": "X_PREFIX_ID_NOT_SUPPORTED", - "X_MODULE_MODE_NOT_SUPPORTED": 48, - "48": "X_MODULE_MODE_NOT_SUPPORTED", - "X_CACHE_HANDLER_NOT_SUPPORTED": 49, - "49": "X_CACHE_HANDLER_NOT_SUPPORTED", - "X_SCOPE_ID_NOT_SUPPORTED": 50, - "50": "X_SCOPE_ID_NOT_SUPPORTED", - "X_VNODE_HOOKS": 51, - "51": "X_VNODE_HOOKS", - "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52, - "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", - "__EXTEND_POINT__": 53, - "53": "__EXTEND_POINT__" -}; -const errorMessages = { - // parse errors - [0]: "Illegal comment.", - [1]: "CDATA section is allowed only in XML context.", - [2]: "Duplicate attribute.", - [3]: "End tag cannot have attributes.", - [4]: "Illegal '/' in tags.", - [5]: "Unexpected EOF in tag.", - [6]: "Unexpected EOF in CDATA section.", - [7]: "Unexpected EOF in comment.", - [8]: "Unexpected EOF in script.", - [9]: "Unexpected EOF in tag.", - [10]: "Incorrectly closed comment.", - [11]: "Incorrectly opened comment.", - [12]: "Illegal tag name. Use '<' to print '<'.", - [13]: "Attribute value was expected.", - [14]: "End tag name was expected.", - [15]: "Whitespace was expected.", - [16]: "Unexpected '<!--' in comment.", - [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, - [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", - [19]: "Attribute name cannot start with '='.", - [21]: "'<?' is allowed only in XML context.", - [20]: `Unexpected null character.`, - [22]: "Illegal '/' in tags.", - // Vue-specific parse errors - [23]: "Invalid end tag.", - [24]: "Element is missing end tag.", - [25]: "Interpolation end sign was not found.", - [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", - [26]: "Legal directive name was expected.", - // transform errors - [28]: `v-if/v-else-if is missing expression.`, - [29]: `v-if/else branches must use unique keys.`, - [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, - [31]: `v-for is missing expression.`, - [32]: `v-for has invalid expression.`, - [33]: `<template v-for> key should be placed on the <template> tag.`, - [34]: `v-bind is missing expression.`, - [52]: `v-bind with same-name shorthand only allows static argument.`, - [35]: `v-on is missing expression.`, - [36]: `Unexpected custom directive on <slot> outlet.`, - [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, - [38]: `Duplicate slot names found. `, - [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, - [40]: `v-slot can only be used on components or <template> tags.`, - [41]: `v-model is missing expression.`, - [42]: `v-model value must be a valid JavaScript member expression.`, - [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, - [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. -Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, - [45]: `Error parsing JavaScript expression: `, - [46]: `<KeepAlive> expects exactly one child component.`, - [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, - // generic errors - [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, - [48]: `ES module mode is not supported in this build of compiler.`, - [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, - [50]: `"scopeId" option is only supported in module mode.`, - // just to fulfill types - [53]: `` -}; - -function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { - { - return; - } -} -function isReferencedIdentifier(id, parent, parentStack) { - { - return false; - } -} -function isInDestructureAssignment(parent, parentStack) { - if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === "AssignmentExpression") { - return true; - } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { - break; - } - } - } - return false; -} -function isInNewExpression(parentStack) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === "NewExpression") { - return true; - } else if (p.type !== "MemberExpression") { - break; - } - } - return false; -} -function walkFunctionParams(node, onIdent) { - for (const p of node.params) { - for (const id of extractIdentifiers(p)) { - onIdent(id); - } - } -} -function walkBlockDeclarations(block, onIdent) { - for (const stmt of block.body) { - if (stmt.type === "VariableDeclaration") { - if (stmt.declare) continue; - for (const decl of stmt.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { - if (stmt.declare || !stmt.id) continue; - onIdent(stmt.id); - } else if (isForStatement(stmt)) { - walkForStatement(stmt, true, onIdent); - } - } -} -function isForStatement(stmt) { - return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement"; -} -function walkForStatement(stmt, isVar, onIdent) { - const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; - if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) { - for (const decl of variable.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } -} -function extractIdentifiers(param, nodes = []) { - switch (param.type) { - case "Identifier": - nodes.push(param); - break; - case "MemberExpression": - let object = param; - while (object.type === "MemberExpression") { - object = object.object; - } - nodes.push(object); - break; - case "ObjectPattern": - for (const prop of param.properties) { - if (prop.type === "RestElement") { - extractIdentifiers(prop.argument, nodes); - } else { - extractIdentifiers(prop.value, nodes); - } - } - break; - case "ArrayPattern": - param.elements.forEach((element) => { - if (element) extractIdentifiers(element, nodes); - }); - break; - case "RestElement": - extractIdentifiers(param.argument, nodes); - break; - case "AssignmentPattern": - extractIdentifiers(param.left, nodes); - break; - } - return nodes; -} -const isFunctionType = (node) => { - return /Function(?:Expression|Declaration)$|Method$/.test(node.type); -}; -const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; -const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; -const TS_NODE_TYPES = [ - "TSAsExpression", - // foo as number - "TSTypeAssertion", - // (<number>foo) - "TSNonNullExpression", - // foo! - "TSInstantiationExpression", - // foo<string> - "TSSatisfiesExpression" - // foo satisfies T -]; -function unwrapTSNode(node) { - if (TS_NODE_TYPES.includes(node.type)) { - return unwrapTSNode(node.expression); - } else { - return node; - } -} - -const isStaticExp = (p) => p.type === 4 && p.isStatic; -function isCoreComponent(tag) { - switch (tag) { - case "Teleport": - case "teleport": - return TELEPORT; - case "Suspense": - case "suspense": - return SUSPENSE; - case "KeepAlive": - case "keep-alive": - return KEEP_ALIVE; - case "BaseTransition": - case "base-transition": - return BASE_TRANSITION; - } -} -const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; -const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); -const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; -const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; -const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; -const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; -const isMemberExpressionBrowser = (exp) => { - const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === "[") { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } else if (char === "(") { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === "`") { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } else if (char === `[`) { - currentOpenBracketCount++; - } else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === "`") { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } else if (char === `(`) { - currentOpenParensCount++; - } else if (char === `)`) { - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; - } - } - return !currentOpenBracketCount && !currentOpenParensCount; -}; -const isMemberExpressionNode = NOOP ; -const isMemberExpression = isMemberExpressionBrowser ; -const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; -const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); -const isFnExpressionNode = NOOP ; -const isFnExpression = isFnExpressionBrowser ; -function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation( - { - offset: pos.offset, - line: pos.line, - column: pos.column - }, - source, - numberOfCharacters - ); -} -function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10) { - linesCount++; - lastNewLinePos = i; - } - } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; - return pos; -} -function assert(condition, msg) { - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } -} -function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { - return p; - } - } -} -function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - if (dynamicOnly) continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { - return p; - } - } -} -function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); -} -function hasDynamicKeyVBind(node) { - return node.props.some( - (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" - p.arg.type !== 4 || // v-bind:[_ctx.foo] - !p.arg.isStatic) - // v-bind:[foo] - ); -} -function isText$1(node) { - return node.type === 5 || node.type === 2; -} -function isVSlot(p) { - return p.type === 7 && p.name === "slot"; -} -function isTemplateNode(node) { - return node.type === 1 && node.tagType === 3; -} -function isSlotOutlet(node) { - return node.type === 1 && node.tagType === 2; -} -const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); -function getUnnormalizedProps(props, callPath = []) { - if (props && !isString(props) && props.type === 14) { - const callee = props.callee; - if (!isString(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps( - props.arguments[0], - callPath.concat(props) - ); - } - } - return [props, callPath]; -} -function injectProp(node, prop, context) { - let propsWithInjection; - let props = node.type === 13 ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && !isString(props) && props.type === 14) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || isString(props)) { - propsWithInjection = createObjectExpression([prop]); - } else if (props.type === 14) { - const first = props.arguments[0]; - if (!isString(first) && first.type === 15) { - if (!hasProp(prop, first)) { - first.properties.unshift(prop); - } - } else { - if (props.callee === TO_HANDLERS) { - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } else if (props.type === 15) { - if (!hasProp(prop, props)) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } else { - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } - } - if (node.type === 13) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } else { - node.props = propsWithInjection; - } - } else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } else { - node.arguments[2] = propsWithInjection; - } - } -} -function hasProp(prop, props) { - let result = false; - if (prop.key.type === 4) { - const propKeyName = prop.key.content; - result = props.properties.some( - (p) => p.key.type === 4 && p.key.content === propKeyName - ); - } - return result; -} -function toValidAssetId(name, type) { - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); - })}`; -} -function hasScopeRef(node, ids) { - if (!node || Object.keys(ids).length === 0) { - return false; - } - switch (node.type) { - case 1: - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { - return true; - } - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 11: - if (hasScopeRef(node.source, ids)) { - return true; - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 9: - return node.branches.some((b) => hasScopeRef(b, ids)); - case 10: - if (hasScopeRef(node.condition, ids)) { - return true; - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 4: - return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; - case 8: - return node.children.some((c) => isObject(c) && hasScopeRef(c, ids)); - case 5: - case 12: - return hasScopeRef(node.content, ids); - case 2: - case 3: - case 20: - return false; - default: - if (!!(process.env.NODE_ENV !== "production")) ; - return false; - } -} -function getMemoedVNodeCall(node) { - if (node.type === 14 && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } else { - return node; - } -} -const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; - -const defaultParserOptions = { - parseMode: "base", - ns: 0, - delimiters: [`{{`, `}}`], - getNamespace: () => 0, - isVoidTag: NO, - isPreTag: NO, - isIgnoreNewlineTag: NO, - isCustomElement: NO, - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: !!(process.env.NODE_ENV !== "production"), - prefixIdentifiers: false -}; -let currentOptions = defaultParserOptions; -let currentRoot = null; -let currentInput = ""; -let currentOpenTag = null; -let currentProp = null; -let currentAttrValue = ""; -let currentAttrStartIndex = -1; -let currentAttrEndIndex = -1; -let inPre = 0; -let inVPre = false; -let currentVPreBoundary = null; -const stack = []; -const tokenizer = new Tokenizer(stack, { - onerr: emitError, - ontext(start, end) { - onText(getSlice(start, end), start, end); - }, - ontextentity(char, start, end) { - onText(char, start, end); - }, - oninterpolation(start, end) { - if (inVPre) { - return onText(getSlice(start, end), start, end); - } - let innerStart = start + tokenizer.delimiterOpen.length; - let innerEnd = end - tokenizer.delimiterClose.length; - while (isWhitespace(currentInput.charCodeAt(innerStart))) { - innerStart++; - } - while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { - innerEnd--; - } - let exp = getSlice(innerStart, innerEnd); - if (exp.includes("&")) { - { - exp = currentOptions.decodeEntities(exp, false); - } - } - addNode({ - type: 5, - content: createExp(exp, false, getLoc(innerStart, innerEnd)), - loc: getLoc(start, end) - }); - }, - onopentagname(start, end) { - const name = getSlice(start, end); - currentOpenTag = { - type: 1, - tag: name, - ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), - tagType: 0, - // will be refined on tag close - props: [], - children: [], - loc: getLoc(start - 1, end), - codegenNode: void 0 - }; - }, - onopentagend(end) { - endOpenTag(end); - }, - onclosetag(start, end) { - const name = getSlice(start, end); - if (!currentOptions.isVoidTag(name)) { - let found = false; - for (let i = 0; i < stack.length; i++) { - const e = stack[i]; - if (e.tag.toLowerCase() === name.toLowerCase()) { - found = true; - if (i > 0) { - emitError(24, stack[0].loc.start.offset); - } - for (let j = 0; j <= i; j++) { - const el = stack.shift(); - onCloseTag(el, end, j < i); - } - break; - } - } - if (!found) { - emitError(23, backTrack(start, 60)); - } - } - }, - onselfclosingtag(end) { - const name = currentOpenTag.tag; - currentOpenTag.isSelfClosing = true; - endOpenTag(end); - if (stack[0] && stack[0].tag === name) { - onCloseTag(stack.shift(), end); - } - }, - onattribname(start, end) { - currentProp = { - type: 6, - name: getSlice(start, end), - nameLoc: getLoc(start, end), - value: void 0, - loc: getLoc(start) - }; - }, - ondirname(start, end) { - const raw = getSlice(start, end); - const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); - if (!inVPre && name === "") { - emitError(26, start); - } - if (inVPre || name === "") { - currentProp = { - type: 6, - name: raw, - nameLoc: getLoc(start, end), - value: void 0, - loc: getLoc(start) - }; - } else { - currentProp = { - type: 7, - name, - rawName: raw, - exp: void 0, - arg: void 0, - modifiers: raw === "." ? [createSimpleExpression("prop")] : [], - loc: getLoc(start) - }; - if (name === "pre") { - inVPre = tokenizer.inVPre = true; - currentVPreBoundary = currentOpenTag; - const props = currentOpenTag.props; - for (let i = 0; i < props.length; i++) { - if (props[i].type === 7) { - props[i] = dirToAttr(props[i]); - } - } - } - } - }, - ondirarg(start, end) { - if (start === end) return; - const arg = getSlice(start, end); - if (inVPre) { - currentProp.name += arg; - setLocEnd(currentProp.nameLoc, end); - } else { - const isStatic = arg[0] !== `[`; - currentProp.arg = createExp( - isStatic ? arg : arg.slice(1, -1), - isStatic, - getLoc(start, end), - isStatic ? 3 : 0 - ); - } - }, - ondirmodifier(start, end) { - const mod = getSlice(start, end); - if (inVPre) { - currentProp.name += "." + mod; - setLocEnd(currentProp.nameLoc, end); - } else if (currentProp.name === "slot") { - const arg = currentProp.arg; - if (arg) { - arg.content += "." + mod; - setLocEnd(arg.loc, end); - } - } else { - const exp = createSimpleExpression(mod, true, getLoc(start, end)); - currentProp.modifiers.push(exp); - } - }, - onattribdata(start, end) { - currentAttrValue += getSlice(start, end); - if (currentAttrStartIndex < 0) currentAttrStartIndex = start; - currentAttrEndIndex = end; - }, - onattribentity(char, start, end) { - currentAttrValue += char; - if (currentAttrStartIndex < 0) currentAttrStartIndex = start; - currentAttrEndIndex = end; - }, - onattribnameend(end) { - const start = currentProp.loc.start.offset; - const name = getSlice(start, end); - if (currentProp.type === 7) { - currentProp.rawName = name; - } - if (currentOpenTag.props.some( - (p) => (p.type === 7 ? p.rawName : p.name) === name - )) { - emitError(2, start); - } - }, - onattribend(quote, end) { - if (currentOpenTag && currentProp) { - setLocEnd(currentProp.loc, end); - if (quote !== 0) { - if (currentAttrValue.includes("&")) { - currentAttrValue = currentOptions.decodeEntities( - currentAttrValue, - true - ); - } - if (currentProp.type === 6) { - if (currentProp.name === "class") { - currentAttrValue = condense(currentAttrValue).trim(); - } - if (quote === 1 && !currentAttrValue) { - emitError(13, end); - } - currentProp.value = { - type: 2, - content: currentAttrValue, - loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) - }; - if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { - tokenizer.enterRCDATA(toCharCodes(`</template`), 0); - } - } else { - let expParseMode = 0 /* Normal */; - currentProp.exp = createExp( - currentAttrValue, - false, - getLoc(currentAttrStartIndex, currentAttrEndIndex), - 0, - expParseMode - ); - if (currentProp.name === "for") { - currentProp.forParseResult = parseForExpression(currentProp.exp); - } - let syncIndex = -1; - if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.findIndex( - (mod) => mod.content === "sync" - )) > -1 && checkCompatEnabled( - "COMPILER_V_BIND_SYNC", - currentOptions, - currentProp.loc, - currentProp.rawName - )) { - currentProp.name = "model"; - currentProp.modifiers.splice(syncIndex, 1); - } - } - } - if (currentProp.type !== 7 || currentProp.name !== "pre") { - currentOpenTag.props.push(currentProp); - } - } - currentAttrValue = ""; - currentAttrStartIndex = currentAttrEndIndex = -1; - }, - oncomment(start, end) { - if (currentOptions.comments) { - addNode({ - type: 3, - content: getSlice(start, end), - loc: getLoc(start - 4, end + 3) - }); - } - }, - onend() { - const end = currentInput.length; - if ((!!(process.env.NODE_ENV !== "production") || false) && tokenizer.state !== 1) { - switch (tokenizer.state) { - case 5: - case 8: - emitError(5, end); - break; - case 3: - case 4: - emitError( - 25, - tokenizer.sectionStart - ); - break; - case 28: - if (tokenizer.currentSequence === Sequences.CdataEnd) { - emitError(6, end); - } else { - emitError(7, end); - } - break; - case 6: - case 7: - case 9: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - // " - case 20: - // ' - case 21: - emitError(9, end); - break; - } - } - for (let index = 0; index < stack.length; index++) { - onCloseTag(stack[index], end - 1); - emitError(24, stack[index].loc.start.offset); - } - }, - oncdata(start, end) { - if (stack[0].ns !== 0) { - onText(getSlice(start, end), start, end); - } else { - emitError(1, start - 9); - } - }, - onprocessinginstruction(start) { - if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { - emitError( - 21, - start - 1 - ); - } - } -}); -const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; -const stripParensRE = /^\(|\)$/g; -function parseForExpression(input) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) return; - const [, LHS, RHS] = inMatch; - const createAliasExpression = (content, offset, asParam = false) => { - const start = loc.start.offset + offset; - const end = start + content.length; - return createExp( - content, - false, - getLoc(start, end), - 0, - asParam ? 1 /* Params */ : 0 /* Normal */ - ); - }; - const result = { - source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: void 0, - key: void 0, - index: void 0, - finalized: false - }; - let valueContent = LHS.trim().replace(stripParensRE, "").trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, "").trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(keyContent, keyOffset, true); - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression( - indexContent, - exp.indexOf( - indexContent, - result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length - ), - true - ); - } - } - } - if (valueContent) { - result.value = createAliasExpression(valueContent, trimmedOffset, true); - } - return result; -} -function getSlice(start, end) { - return currentInput.slice(start, end); -} -function endOpenTag(end) { - if (tokenizer.inSFCRoot) { - currentOpenTag.innerLoc = getLoc(end + 1, end + 1); - } - addNode(currentOpenTag); - const { tag, ns } = currentOpenTag; - if (ns === 0 && currentOptions.isPreTag(tag)) { - inPre++; - } - if (currentOptions.isVoidTag(tag)) { - onCloseTag(currentOpenTag, end); - } else { - stack.unshift(currentOpenTag); - if (ns === 1 || ns === 2) { - tokenizer.inXML = true; - } - } - currentOpenTag = null; -} -function onText(content, start, end) { - { - const tag = stack[0] && stack[0].tag; - if (tag !== "script" && tag !== "style" && content.includes("&")) { - content = currentOptions.decodeEntities(content, false); - } - } - const parent = stack[0] || currentRoot; - const lastNode = parent.children[parent.children.length - 1]; - if (lastNode && lastNode.type === 2) { - lastNode.content += content; - setLocEnd(lastNode.loc, end); - } else { - parent.children.push({ - type: 2, - content, - loc: getLoc(start, end) - }); - } -} -function onCloseTag(el, end, isImplied = false) { - if (isImplied) { - setLocEnd(el.loc, backTrack(end, 60)); - } else { - setLocEnd(el.loc, lookAhead(end, 62) + 1); - } - if (tokenizer.inSFCRoot) { - if (el.children.length) { - el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); - } else { - el.innerLoc.end = extend({}, el.innerLoc.start); - } - el.innerLoc.source = getSlice( - el.innerLoc.start.offset, - el.innerLoc.end.offset - ); - } - const { tag, ns, children } = el; - if (!inVPre) { - if (tag === "slot") { - el.tagType = 2; - } else if (isFragmentTemplate(el)) { - el.tagType = 3; - } else if (isComponent(el)) { - el.tagType = 1; - } - } - if (!tokenizer.inRCDATA) { - el.children = condenseWhitespace(children); - } - if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { - const first = children[0]; - if (first && first.type === 2) { - first.content = first.content.replace(/^\r?\n/, ""); - } - } - if (ns === 0 && currentOptions.isPreTag(tag)) { - inPre--; - } - if (currentVPreBoundary === el) { - inVPre = tokenizer.inVPre = false; - currentVPreBoundary = null; - } - if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { - tokenizer.inXML = false; - } - { - const props = el.props; - if (!!(process.env.NODE_ENV !== "production") && isCompatEnabled( - "COMPILER_V_IF_V_FOR_PRECEDENCE", - currentOptions - )) { - let hasIf = false; - let hasFor = false; - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 7) { - if (p.name === "if") { - hasIf = true; - } else if (p.name === "for") { - hasFor = true; - } - } - if (hasIf && hasFor) { - warnDeprecation( - "COMPILER_V_IF_V_FOR_PRECEDENCE", - currentOptions, - el.loc - ); - break; - } - } - } - if (!tokenizer.inSFCRoot && isCompatEnabled( - "COMPILER_NATIVE_TEMPLATE", - currentOptions - ) && el.tag === "template" && !isFragmentTemplate(el)) { - !!(process.env.NODE_ENV !== "production") && warnDeprecation( - "COMPILER_NATIVE_TEMPLATE", - currentOptions, - el.loc - ); - const parent = stack[0] || currentRoot; - const index = parent.children.indexOf(el); - parent.children.splice(index, 1, ...el.children); - } - const inlineTemplateProp = props.find( - (p) => p.type === 6 && p.name === "inline-template" - ); - if (inlineTemplateProp && checkCompatEnabled( - "COMPILER_INLINE_TEMPLATE", - currentOptions, - inlineTemplateProp.loc - ) && el.children.length) { - inlineTemplateProp.value = { - type: 2, - content: getSlice( - el.children[0].loc.start.offset, - el.children[el.children.length - 1].loc.end.offset - ), - loc: inlineTemplateProp.loc - }; - } - } -} -function lookAhead(index, c) { - let i = index; - while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; - return i; -} -function backTrack(index, c) { - let i = index; - while (currentInput.charCodeAt(i) !== c && i >= 0) i--; - return i; -} -const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); -function isFragmentTemplate({ tag, props }) { - if (tag === "template") { - for (let i = 0; i < props.length; i++) { - if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { - return true; - } - } - } - return false; -} -function isComponent({ tag, props }) { - if (currentOptions.isCustomElement(tag)) { - return false; - } - if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { - return true; - } - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6) { - if (p.name === "is" && p.value) { - if (p.value.content.startsWith("vue:")) { - return true; - } else if (checkCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - currentOptions, - p.loc - )) { - return true; - } - } - } else if (// :is on plain element - only treat as component in compat mode - p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - currentOptions, - p.loc - )) { - return true; - } - } - return false; -} -function isUpperCase(c) { - return c > 64 && c < 91; -} -const windowsNewlineRE = /\r\n/g; -function condenseWhitespace(nodes, tag) { - const shouldCondense = currentOptions.whitespace !== "preserve"; - let removedWhitespace = false; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (node.type === 2) { - if (!inPre) { - if (isAllWhitespace(node.content)) { - const prev = nodes[i - 1] && nodes[i - 1].type; - const next = nodes[i + 1] && nodes[i + 1].type; - if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { - removedWhitespace = true; - nodes[i] = null; - } else { - node.content = " "; - } - } else if (shouldCondense) { - node.content = condense(node.content); - } - } else { - node.content = node.content.replace(windowsNewlineRE, "\n"); - } - } - } - return removedWhitespace ? nodes.filter(Boolean) : nodes; -} -function isAllWhitespace(str) { - for (let i = 0; i < str.length; i++) { - if (!isWhitespace(str.charCodeAt(i))) { - return false; - } - } - return true; -} -function hasNewlineChar(str) { - for (let i = 0; i < str.length; i++) { - const c = str.charCodeAt(i); - if (c === 10 || c === 13) { - return true; - } - } - return false; -} -function condense(str) { - let ret = ""; - let prevCharIsWhitespace = false; - for (let i = 0; i < str.length; i++) { - if (isWhitespace(str.charCodeAt(i))) { - if (!prevCharIsWhitespace) { - ret += " "; - prevCharIsWhitespace = true; - } - } else { - ret += str[i]; - prevCharIsWhitespace = false; - } - } - return ret; -} -function addNode(node) { - (stack[0] || currentRoot).children.push(node); -} -function getLoc(start, end) { - return { - start: tokenizer.getPos(start), - // @ts-expect-error allow late attachment - end: end == null ? end : tokenizer.getPos(end), - // @ts-expect-error allow late attachment - source: end == null ? end : getSlice(start, end) - }; -} -function cloneLoc(loc) { - return getLoc(loc.start.offset, loc.end.offset); -} -function setLocEnd(loc, end) { - loc.end = tokenizer.getPos(end); - loc.source = getSlice(loc.start.offset, end); -} -function dirToAttr(dir) { - const attr = { - type: 6, - name: dir.rawName, - nameLoc: getLoc( - dir.loc.start.offset, - dir.loc.start.offset + dir.rawName.length - ), - value: void 0, - loc: dir.loc - }; - if (dir.exp) { - const loc = dir.exp.loc; - if (loc.end.offset < dir.loc.end.offset) { - loc.start.offset--; - loc.start.column--; - loc.end.offset++; - loc.end.column++; - } - attr.value = { - type: 2, - content: dir.exp.content, - loc - }; - } - return attr; -} -function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { - const exp = createSimpleExpression(content, isStatic, loc, constType); - return exp; -} -function emitError(code, index, message) { - currentOptions.onError( - createCompilerError(code, getLoc(index, index), void 0, message) - ); -} -function reset() { - tokenizer.reset(); - currentOpenTag = null; - currentProp = null; - currentAttrValue = ""; - currentAttrStartIndex = -1; - currentAttrEndIndex = -1; - stack.length = 0; -} -function baseParse(input, options) { - reset(); - currentInput = input; - currentOptions = extend({}, defaultParserOptions); - if (options) { - let key; - for (key in options) { - if (options[key] != null) { - currentOptions[key] = options[key]; - } - } - } - if (!!(process.env.NODE_ENV !== "production")) { - if (!currentOptions.decodeEntities) { - throw new Error( - `[@vue/compiler-core] decodeEntities option is required in browser builds.` - ); - } - } - tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; - tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; - const delimiters = options && options.delimiters; - if (delimiters) { - tokenizer.delimiterOpen = toCharCodes(delimiters[0]); - tokenizer.delimiterClose = toCharCodes(delimiters[1]); - } - const root = currentRoot = createRoot([], input); - tokenizer.parse(currentInput); - root.loc = getLoc(0, input.length); - root.children = condenseWhitespace(root.children); - currentRoot = null; - return root; -} - -function cacheStatic(root, context) { - walk( - root, - void 0, - context, - // Root node is unfortunately non-hoistable due to potential parent - // fallthrough attributes. - isSingleElementRoot(root, root.children[0]) - ); -} -function isSingleElementRoot(root, child) { - const { children } = root; - return children.length === 1 && child.type === 1 && !isSlotOutlet(child); -} -function walk(node, parent, context, doNotHoistNode = false, inFor = false) { - const { children } = node; - const toCache = []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.type === 1 && child.tagType === 0) { - const constantType = doNotHoistNode ? 0 : getConstantType(child, context); - if (constantType > 0) { - if (constantType >= 2) { - child.codegenNode.patchFlag = -1; - toCache.push(child); - continue; - } - } else { - const codegenNode = child.codegenNode; - if (codegenNode.type === 13) { - const flag = codegenNode.patchFlag; - if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } - } else if (child.type === 12) { - const constantType = doNotHoistNode ? 0 : getConstantType(child, context); - if (constantType >= 2) { - toCache.push(child); - continue; - } - } - if (child.type === 1) { - const isComponent = child.tagType === 1; - if (isComponent) { - context.scopes.vSlot++; - } - walk(child, node, context, false, inFor); - if (isComponent) { - context.scopes.vSlot--; - } - } else if (child.type === 11) { - walk(child, node, context, child.children.length === 1, true); - } else if (child.type === 9) { - for (let i2 = 0; i2 < child.branches.length; i2++) { - walk( - child.branches[i2], - node, - context, - child.branches[i2].children.length === 1, - inFor - ); - } - } - } - let cachedAsArray = false; - if (toCache.length === children.length && node.type === 1) { - if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { - node.codegenNode.children = getCacheExpression( - createArrayExpression(node.codegenNode.children) - ); - cachedAsArray = true; - } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) { - const slot = getSlotNode(node.codegenNode, "default"); - if (slot) { - slot.returns = getCacheExpression( - createArrayExpression(slot.returns) - ); - cachedAsArray = true; - } - } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { - const slotName = findDir(node, "slot", true); - const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); - if (slot) { - slot.returns = getCacheExpression( - createArrayExpression(slot.returns) - ); - cachedAsArray = true; - } - } - } - if (!cachedAsArray) { - for (const child of toCache) { - child.codegenNode = context.cache(child.codegenNode); - } - } - function getCacheExpression(value) { - const exp = context.cache(value); - if (inFor && context.hmr) { - exp.needArraySpread = true; - } - return exp; - } - function getSlotNode(node2, name) { - if (node2.children && !isArray(node2.children) && node2.children.type === 15) { - const slot = node2.children.properties.find( - (p) => p.key === name || p.key.content === name - ); - return slot && slot.value; - } - } - if (toCache.length && context.transformHoist) { - context.transformHoist(children, context, node); - } -} -function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1: - if (node.tagType !== 0) { - return 0; - } - const cached = constantCache.get(node); - if (cached !== void 0) { - return cached; - } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13) { - return 0; - } - if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { - return 0; - } - if (codegenNode.patchFlag === void 0) { - let returnType2 = 3; - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0) { - constantCache.set(node, 0); - return 0; - } - if (generatedPropsType < returnType2) { - returnType2 = generatedPropsType; - } - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0) { - constantCache.set(node, 0); - return 0; - } - if (childType < returnType2) { - returnType2 = childType; - } - } - if (returnType2 > 1) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && p.name === "bind" && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0) { - constantCache.set(node, 0); - return 0; - } - if (expType < returnType2) { - returnType2 = expType; - } - } - } - } - if (codegenNode.isBlock) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7) { - constantCache.set(node, 0); - return 0; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper( - getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) - ); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType2); - return returnType2; - } else { - constantCache.set(node, 0); - return 0; - } - case 2: - case 3: - return 3; - case 9: - case 11: - case 10: - return 0; - case 5: - case 12: - return getConstantType(node.content, context); - case 4: - return node.constType; - case 8: - let returnType = 3; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child) || isSymbol(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0) { - return 0; - } else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - case 20: - return 2; - default: - if (!!(process.env.NODE_ENV !== "production")) ; - return 0; - } -} -const allowHoistedHelperSet = /* @__PURE__ */ new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS -]); -function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4) { - return getConstantType(arg, context); - } else if (arg.type === 14) { - return getConstantTypeOfHelperCall(arg, context); - } - } - return 0; -} -function getGeneratedPropsConstantType(node, context) { - let returnType = 3; - const props = getNodeProps(node); - if (props && props.type === 15) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4) { - valueType = getConstantType(value, context); - } else if (value.type === 14) { - valueType = getConstantTypeOfHelperCall(value, context); - } else { - valueType = 0; - } - if (valueType === 0) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } - } - return returnType; -} -function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13) { - return codegenNode.props; - } -} - -function createTransformContext(root, { - filename = "", - prefixIdentifiers = false, - hoistStatic = false, - hmr = false, - cacheHandlers = false, - nodeTransforms = [], - directiveTransforms = {}, - transformHoist = null, - isBuiltInComponent = NOOP, - isCustomElement = NOOP, - expressionPlugins = [], - scopeId = null, - slotted = true, - ssr = false, - inSSR = false, - ssrCssVars = ``, - bindingMetadata = EMPTY_OBJ, - inline = false, - isTS = false, - onError = defaultOnError, - onWarn = defaultOnWarn, - compatConfig -}) { - const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); - const context = { - // options - filename, - selfName: nameMatch && capitalize(camelize(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - hmr, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: /* @__PURE__ */ new Map(), - components: /* @__PURE__ */ new Set(), - directives: /* @__PURE__ */ new Set(), - hoists: [], - imports: [], - cached: [], - constantCache: /* @__PURE__ */ new WeakMap(), - temps: 0, - identifiers: /* @__PURE__ */ Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - grandParent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - if (!!(process.env.NODE_ENV !== "production")) { - if (!context.currentNode) { - throw new Error(`Node being replaced is already removed.`); - } - if (!context.parent) { - throw new Error(`Cannot replace root node.`); - } - } - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - if (!!(process.env.NODE_ENV !== "production") && !context.parent) { - throw new Error(`Cannot remove root node.`); - } - const list = context.parent.children; - const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; - if (!!(process.env.NODE_ENV !== "production") && removalIndex < 0) { - throw new Error(`node being removed is not a child of current parent`); - } - if (!node || node === context.currentNode) { - context.currentNode = null; - context.onNodeRemoved(); - } else { - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: NOOP, - addIdentifiers(exp) { - }, - removeIdentifiers(exp) { - }, - hoist(exp) { - if (isString(exp)) exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression( - `_hoisted_${context.hoists.length}`, - false, - exp.loc, - 2 - ); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false, inVOnce = false) { - const cacheExp = createCacheExpression( - context.cached.length, - exp, - isVNode, - inVOnce - ); - context.cached.push(cacheExp); - return cacheExp; - } - }; - { - context.filters = /* @__PURE__ */ new Set(); - } - return context; -} -function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - cacheStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; - root.transformed = true; - { - root.filters = [...context.filters]; - } -} -function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - if (isSingleElementRoot(root, child) && child.codegenNode) { - const codegenNode = child.codegenNode; - if (codegenNode.type === 13) { - convertToBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } else { - root.codegenNode = child; - } - } else if (children.length > 1) { - let patchFlag = 64; - if (!!(process.env.NODE_ENV !== "production") && children.filter((c) => c.type !== 3).length === 1) { - patchFlag |= 2048; - } - root.codegenNode = createVNodeCall( - context, - helper(FRAGMENT), - void 0, - root.children, - patchFlag, - void 0, - void 0, - true, - void 0, - false - ); - } else ; -} -function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (isString(child)) continue; - context.grandParent = context.parent; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } -} -function traverseNode(node, context) { - context.currentNode = node; - const { nodeTransforms } = context; - const exitFns = []; - for (let i2 = 0; i2 < nodeTransforms.length; i2++) { - const onExit = nodeTransforms[i2](node, context); - if (onExit) { - if (isArray(onExit)) { - exitFns.push(...onExit); - } else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - return; - } else { - node = context.currentNode; - } - } - switch (node.type) { - case 3: - if (!context.ssr) { - context.helper(CREATE_COMMENT); - } - break; - case 5: - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9: - for (let i2 = 0; i2 < node.branches.length; i2++) { - traverseNode(node.branches[i2], context); - } - break; - case 10: - case 11: - case 1: - case 0: - traverseChildren(node, context); - break; - } - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); - } -} -function createStructuralDirectiveTransform(name, fn) { - const matches = isString(name) ? (n) => n === name : (n) => name.test(n); - return (node, context) => { - if (node.type === 1) { - const { props } = node; - if (node.tagType === 3 && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 && matches(prop.name)) { - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) exitFns.push(onExit); - } - } - return exitFns; - } - }; -} - -const PURE_ANNOTATION = `/*@__PURE__*/`; -const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; -function createCodegenContext(ast, { - mode = "function", - prefixIdentifiers = mode === "module", - sourceMap = false, - filename = `template.vue.html`, - scopeId = null, - optimizeImports = false, - runtimeGlobalName = `Vue`, - runtimeModuleName = `vue`, - ssrRuntimeModuleName = "vue/server-renderer", - ssr = false, - isTS = false, - inSSR = false -}) { - const context = { - mode, - prefixIdentifiers, - sourceMap, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: void 0, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, newlineIndex = -2 /* None */, node) { - context.code += code; - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); - } - }; - function newline(n) { - context.push("\n" + ` `.repeat(n), 0 /* Start */); - } - return context; -} -function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) options.onContextCreated(context); - const { - mode, - push, - prefixIdentifiers, - indent, - deindent, - newline, - scopeId, - ssr - } = context; - const helpers = Array.from(ast.helpers); - const hasHelpers = helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== "module"; - const preambleContext = context; - { - genFunctionPreamble(ast, preambleContext); - } - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; - const signature = args.join(", "); - { - push(`function ${functionName}(${signature}) {`); - } - indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - if (hasHelpers) { - push( - `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue -`, - -1 /* End */ - ); - newline(); - } - } - if (ast.components.length) { - genAssets(ast.components, "component", context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, "directive", context); - if (ast.temps > 0) { - newline(); - } - } - if (ast.filters && ast.filters.length) { - newline(); - genAssets(ast.filters, "filter", context); - newline(); - } - if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } - } - if (ast.components.length || ast.directives.length || ast.temps) { - push(` -`, 0 /* Start */); - newline(); - } - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); - } - deindent(); - push(`}`); - return { - ast, - code: context.code, - preamble: ``, - map: context.map ? context.map.toJSON() : void 0 - }; -} -function genFunctionPreamble(ast, context) { - const { - ssr, - prefixIdentifiers, - push, - newline, - runtimeModuleName, - runtimeGlobalName, - ssrRuntimeModuleName - } = context; - const VueBinding = runtimeGlobalName; - const helpers = Array.from(ast.helpers); - if (helpers.length > 0) { - { - push(`const _Vue = ${VueBinding} -`, -1 /* End */); - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); - push(`const { ${staticHelpers} } = _Vue -`, -1 /* End */); - } - } - } - genHoists(ast.hoists, context); - newline(); - push(`return `); -} -function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper( - type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE - ); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - const maybeSelfReference = id.endsWith("__self"); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push( - `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` - ); - if (i < assets.length - 1) { - newline(); - } - } -} -function genHoists(hoists, context) { - if (!hoists.length) { - return; - } - context.pure = true; - const { push, newline } = context; - newline(); - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - push(`const _hoisted_${i + 1} = `); - genNode(exp, context); - newline(); - } - } - context.pure = false; -} -function isText(n) { - return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; -} -function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || !!(process.env.NODE_ENV !== "production") && nodes.some((n) => isArray(n) || !isText(n)); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); -} -function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (isString(node)) { - push(node, -3 /* Unknown */); - } else if (isArray(node)) { - genNodeListAsArray(node, context); - } else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(","); - newline(); - } else { - comma && push(", "); - } - } - } -} -function genNode(node, context) { - if (isString(node)) { - context.push(node, -3 /* Unknown */); - return; - } - if (isSymbol(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1: - case 9: - case 11: - !!(process.env.NODE_ENV !== "production") && assert( - node.codegenNode != null, - `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` - ); - genNode(node.codegenNode, context); - break; - case 2: - genText(node, context); - break; - case 4: - genExpression(node, context); - break; - case 5: - genInterpolation(node, context); - break; - case 12: - genNode(node.codegenNode, context); - break; - case 8: - genCompoundExpression(node, context); - break; - case 3: - genComment(node, context); - break; - case 13: - genVNodeCall(node, context); - break; - case 14: - genCallExpression(node, context); - break; - case 15: - genObjectExpression(node, context); - break; - case 17: - genArrayExpression(node, context); - break; - case 18: - genFunctionExpression(node, context); - break; - case 19: - genConditionalExpression(node, context); - break; - case 20: - genCacheExpression(node, context); - break; - case 21: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22: - break; - case 23: - break; - case 24: - break; - case 25: - break; - case 26: - break; - /* v8 ignore start */ - case 10: - break; - default: - if (!!(process.env.NODE_ENV !== "production")) { - assert(false, `unhandled codegen node type: ${node.type}`); - const exhaustiveCheck = node; - return exhaustiveCheck; - } - } -} -function genText(node, context) { - context.push(JSON.stringify(node.content), -3 /* Unknown */, node); -} -function genExpression(node, context) { - const { content, isStatic } = node; - context.push( - isStatic ? JSON.stringify(content) : content, - -3 /* Unknown */, - node - ); -} -function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); -} -function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child)) { - context.push(child, -3 /* Unknown */); - } else { - genNode(child, context); - } - } -} -function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } else if (node.isStatic) { - const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); - push(text, -2 /* None */, node); - } else { - push(`[${node.content}]`, -3 /* Unknown */, node); - } -} -function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push( - `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, - -3 /* Unknown */, - node - ); -} -function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent - } = node; - let patchFlagString; - if (patchFlag) { - if (!!(process.env.NODE_ENV !== "production")) { - if (patchFlag < 0) { - patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; - } else { - const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); - patchFlagString = patchFlag + ` /* ${flagNames} */`; - } - } else { - patchFlagString = String(patchFlag); - } - } - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, -2 /* None */, node); - genNodeList( - genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), - context - ); - push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } -} -function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) break; - } - return args.slice(0, i + 1).map((arg) => arg || `null`); -} -function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = isString(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, -2 /* None */, node); - genNodeList(node.arguments, context); - push(`)`); -} -function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, -2 /* None */, node); - return; - } - const multilines = properties.length > 1 || !!(process.env.NODE_ENV !== "production") && properties.some((p) => p.value.type !== 4); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - genExpressionAsPropertyKey(key, context); - push(`: `); - genNode(value, context); - if (i < properties.length - 1) { - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); -} -function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); -} -function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - push(`_${helperNameMap[WITH_CTX]}(`); - } - push(`(`, -2 /* None */, node); - if (isArray(params)) { - genNodeList(params, context); - } else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (isArray(returns)) { - genNodeListAsArray(returns, context); - } else { - genNode(returns, context); - } - } else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - if (node.isNonScopedSlot) { - push(`, undefined, true`); - } - push(`)`); - } -} -function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); - context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); - context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent( - true - /* without newline */ - ); -} -function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - const { needPauseTracking, needArraySpread } = node; - if (needArraySpread) { - push(`[...(`); - } - push(`_cache[${node.index}] || (`); - if (needPauseTracking) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1`); - if (node.inVOnce) push(`, true`); - push(`),`); - newline(); - push(`(`); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (needPauseTracking) { - push(`).cacheIndex = ${node.index},`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); - } - push(`)`); - if (needArraySpread) { - push(`)]`); - } -} - -const prohibitedKeywordRE = new RegExp( - "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" -); -const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; -function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) { - const exp = node.content; - if (!exp.trim()) { - return; - } - try { - new Function( - asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` - ); - } catch (e) { - let message = e.message; - const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE); - if (keywordMatch) { - message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; - } - context.onError( - createCompilerError( - 45, - node.loc, - void 0, - message - ) - ); - } -} - -const transformExpression = (node, context) => { - if (node.type === 5) { - node.content = processExpression( - node.content, - context - ); - } else if (node.type === 1) { - const memo = findDir(node, "memo"); - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - if (dir.type === 7 && dir.name !== "for") { - const exp = dir.exp; - const arg = dir.arg; - if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) - !(memo && arg && arg.type === 4 && arg.content === "key")) { - dir.exp = processExpression( - exp, - context, - // slot args must be processed as function params - dir.name === "slot" - ); - } - if (arg && arg.type === 4 && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } - } - } -}; -function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { - { - if (!!(process.env.NODE_ENV !== "production")) { - validateBrowserExpression(node, context, asParams, asRawStatements); - } - return node; - } -} -function stringifyExpression(exp) { - if (isString(exp)) { - return exp; - } else if (exp.type === 4) { - return exp.content; - } else { - return exp.children.map(stringifyExpression).join(""); - } -} - -const transformIf = createStructuralDirectiveTransform( - /^(if|else|else-if)$/, - (node, dir, context) => { - return processIf(node, dir, context, (ifNode, branch, isRoot) => { - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9) { - key += sibling.branches.length; - } - } - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch( - branch, - key, - context - ); - } else { - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch( - branch, - key + ifNode.branches.length - 1, - context - ); - } - }; - }); - } -); -function processIf(node, dir, context, processCodegen) { - if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError( - createCompilerError(28, dir.loc) - ); - dir.exp = createSimpleExpression(`true`, false, loc); - } - if (!!(process.env.NODE_ENV !== "production") && true && dir.exp) { - validateBrowserExpression(dir.exp, context); - } - if (dir.name === "if") { - const branch = createIfBranch(node, dir); - const ifNode = { - type: 9, - loc: cloneLoc(node.loc), - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); - } - } else { - const siblings = context.parent.children; - const comments = []; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if (sibling && sibling.type === 3) { - context.removeNode(sibling); - !!(process.env.NODE_ENV !== "production") && comments.unshift(sibling); - continue; - } - if (sibling && sibling.type === 2 && !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9) { - if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { - context.onError( - createCompilerError(30, node.loc) - ); - } - context.removeNode(); - const branch = createIfBranch(node, dir); - if (!!(process.env.NODE_ENV !== "production") && comments.length && // #3619 ignore comments if the v-if is direct child of <transition> - !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { - branch.children = [...comments, ...branch.children]; - } - if (!!(process.env.NODE_ENV !== "production") || false) { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError( - createCompilerError( - 29, - branch.userKey.loc - ) - ); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - traverseNode(branch, context); - if (onExit) onExit(); - context.currentNode = null; - } else { - context.onError( - createCompilerError(30, node.loc) - ); - } - break; - } - } -} -function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3; - return { - type: 10, - loc: node.loc, - condition: dir.name === "else" ? void 0 : dir.exp, - children: isTemplateIf && !findDir(node, "for") ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; -} -function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression( - branch.condition, - createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - !!(process.env.NODE_ENV !== "production") ? '"v-if"' : '""', - "true" - ]) - ); - } else { - return createChildrenCodegenNode(branch, keyIndex, context); - } -} -function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty( - `key`, - createSimpleExpression( - `${keyIndex}`, - false, - locStub, - 2 - ) - ); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11) { - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } else { - let patchFlag = 64; - if (!!(process.env.NODE_ENV !== "production") && !branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { - patchFlag |= 2048; - } - return createVNodeCall( - context, - helper(FRAGMENT), - createObjectExpression([keyProperty]), - children, - patchFlag, - void 0, - void 0, - true, - false, - false, - branch.loc - ); - } - } else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - if (vnodeCall.type === 13) { - convertToBlock(vnodeCall, context); - } - injectProp(vnodeCall, keyProperty, context); - return ret; - } -} -function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; - } - if (a.type === 6) { - if (a.value.content !== b.value.content) { - return false; - } - } else { - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { - return false; - } - } - return true; -} -function getParentCondition(node) { - while (true) { - if (node.type === 19) { - if (node.alternate.type === 19) { - node = node.alternate; - } else { - return node; - } - } else if (node.type === 20) { - node = node.value; - } - } -} - -const transformBind = (dir, _node, context) => { - const { modifiers, loc } = dir; - const arg = dir.arg; - let { exp } = dir; - if (exp && exp.type === 4 && !exp.content.trim()) { - { - exp = void 0; - } - } - if (!exp) { - if (arg.type !== 4 || !arg.isStatic) { - context.onError( - createCompilerError( - 52, - arg.loc - ) - ); - return { - props: [ - createObjectProperty(arg, createSimpleExpression("", true, loc)) - ] - }; - } - transformBindShorthand(dir); - exp = dir.exp; - } - if (arg.type !== 4) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); - } else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; - } - if (modifiers.some((mod) => mod.content === "camel")) { - if (arg.type === 4) { - if (arg.isStatic) { - arg.content = camelize(arg.content); - } else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } - } - if (!context.inSSR) { - if (modifiers.some((mod) => mod.content === "prop")) { - injectPrefix(arg, "."); - } - if (modifiers.some((mod) => mod.content === "attr")) { - injectPrefix(arg, "^"); - } - } - return { - props: [createObjectProperty(arg, exp)] - }; -}; -const transformBindShorthand = (dir, context) => { - const arg = dir.arg; - const propName = camelize(arg.content); - dir.exp = createSimpleExpression(propName, false, arg.loc); -}; -const injectPrefix = (arg, prefix) => { - if (arg.type === 4) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); - } -}; - -const transformFor = createStructuralDirectiveTransform( - "for", - (node, dir, context) => { - const { helper, removeHelper } = context; - return processFor(node, dir, context, (forNode) => { - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, "memo"); - const keyProp = findProp(node, `key`, false, true); - const isDirKey = keyProp && keyProp.type === 7; - if (isDirKey && !keyProp.exp) { - transformBindShorthand(keyProp); - } - let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); - const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; - const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; - const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; - forNode.codegenNode = createVNodeCall( - context, - helper(FRAGMENT), - void 0, - renderExp, - fragmentFlag, - void 0, - void 0, - true, - !isStableFragment, - false, - node.loc - ); - return () => { - let childBlock; - const { children } = forNode; - if ((!!(process.env.NODE_ENV !== "production") || false) && isTemplate) { - node.children.some((c) => { - if (c.type === 1) { - const key = findProp(c, "key"); - if (key) { - context.onError( - createCompilerError( - 33, - key.loc - ) - ); - return true; - } - } - }); - } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; - const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; - if (slotOutlet) { - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - } else if (needFragmentWrapper) { - childBlock = createVNodeCall( - context, - helper(FRAGMENT), - keyProperty ? createObjectExpression([keyProperty]) : void 0, - node.children, - 64, - void 0, - void 0, - true, - void 0, - false - ); - } else { - childBlock = children[0].codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - removeHelper(OPEN_BLOCK); - removeHelper( - getVNodeBlockHelper(context.inSSR, childBlock.isComponent) - ); - } else { - removeHelper( - getVNodeHelper(context.inSSR, childBlock.isComponent) - ); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression( - createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ]) - ); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...keyExp ? [` && _cached.key === `, keyExp] : [], - ` && ${context.helperString( - IS_MEMO_SAME - )}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push( - loop, - createSimpleExpression(`_cache`), - createSimpleExpression(String(context.cached.length)) - ); - context.cached.push(null); - } else { - renderExp.arguments.push( - createFunctionExpression( - createForLoopParams(forNode.parseResult), - childBlock, - true - ) - ); - } - }; - }); - } -); -function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError( - createCompilerError(31, dir.loc) - ); - return; - } - const parseResult = dir.forParseResult; - if (!parseResult) { - context.onError( - createCompilerError(32, dir.loc) - ); - return; - } - finalizeForParseResult(parseResult, context); - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - scopes.vFor++; - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (onExit) onExit(); - }; -} -function finalizeForParseResult(result, context) { - if (result.finalized) return; - if (!!(process.env.NODE_ENV !== "production") && true) { - validateBrowserExpression(result.source, context); - if (result.key) { - validateBrowserExpression( - result.key, - context, - true - ); - } - if (result.index) { - validateBrowserExpression( - result.index, - context, - true - ); - } - if (result.value) { - validateBrowserExpression( - result.value, - context, - true - ); - } - } - result.finalized = true; -} -function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); -} -function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) break; - } - return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); -} - -const defaultFallback = createSimpleExpression(`undefined`, false); -const trackSlotScopes = (node, context) => { - if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { - const vSlot = findDir(node, "slot"); - if (vSlot) { - vSlot.exp; - context.scopes.vSlot++; - return () => { - context.scopes.vSlot--; - }; - } - } -}; -const trackVForSlotScopes = (node, context) => { - let vFor; - if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { - const result = vFor.forParseResult; - if (result) { - finalizeForParseResult(result, context); - const { value, key, index } = result; - const { addIdentifiers, removeIdentifiers } = context; - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - return () => { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - }; - } - } -}; -const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( - props, - children, - false, - true, - children.length ? children[0].loc : loc -); -function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - const onComponentSlot = findDir(node, "slot", true); - if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push( - createObjectProperty( - arg || createSimpleExpression("default", true), - buildSlotFn(exp, void 0, children, loc) - ) - ); - } - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = /* @__PURE__ */ new Set(); - let conditionalBranchIndex = 0; - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { - if (slotElement.type !== 3) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - context.onError( - createCompilerError(37, slotDir.loc) - ); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { - arg: slotName = createSimpleExpression(`default`, true), - exp: slotProps, - loc: dirLoc - } = slotDir; - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } else { - hasDynamicSlots = true; - } - const vFor = findDir(slotElement, "for"); - const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); - let vIf; - let vElse; - if (vIf = findDir(slotElement, "if")) { - hasDynamicSlots = true; - dynamicSlots.push( - createConditionalExpression( - vIf.exp, - buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), - defaultFallback - ) - ); - } else if (vElse = findDir( - slotElement, - /^else(-if)?$/, - true - /* allowEmpty */ - )) { - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp ? createConditionalExpression( - vElse.exp, - buildDynamicSlot( - slotName, - slotFunction, - conditionalBranchIndex++ - ), - defaultFallback - ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); - } else { - context.onError( - createCompilerError(30, vElse.loc) - ); - } - } else if (vFor) { - hasDynamicSlots = true; - const parseResult = vFor.forParseResult; - if (parseResult) { - finalizeForParseResult(parseResult, context); - dynamicSlots.push( - createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression( - createForLoopParams(parseResult), - buildDynamicSlot(slotName, slotFunction), - true - ) - ]) - ); - } else { - context.onError( - createCompilerError( - 32, - vFor.loc - ) - ); - } - } else { - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError( - createCompilerError( - 38, - dirLoc - ) - ); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === "default") { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } - } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children2) => { - const fn = buildSlotFn(props, void 0, children2, loc); - if (context.compatConfig) { - fn.isNonScopedSlot = true; - } - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - slotsProperties.push(buildDefaultSlotProperty(void 0, children)); - } else if (implicitDefaultChildren.length && // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { - if (hasNamedDefaultSlot) { - context.onError( - createCompilerError( - 39, - implicitDefaultChildren[0].loc - ) - ); - } else { - slotsProperties.push( - buildDefaultSlotProperty(void 0, implicitDefaultChildren) - ); - } - } - } - const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; - let slots = createObjectExpression( - slotsProperties.concat( - createObjectProperty( - `_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression( - slotFlag + (!!(process.env.NODE_ENV !== "production") ? ` /* ${slotFlagsText[slotFlag]} */` : ``), - false - ) - ) - ), - loc - ); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots - }; -} -function buildDynamicSlot(name, fn, index) { - const props = [ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) - ]; - if (index != null) { - props.push( - createObjectProperty(`key`, createSimpleExpression(String(index), true)) - ); - } - return createObjectExpression(props); -} -function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1: - if (child.tagType === 2 || hasForwardedSlots(child.children)) { - return true; - } - break; - case 9: - if (hasForwardedSlots(child.branches)) return true; - break; - case 10: - case 11: - if (hasForwardedSlots(child.children)) return true; - break; - } - } - return false; -} -function isNonWhitespaceContent(node) { - if (node.type !== 2 && node.type !== 12) - return true; - return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); -} - -const directiveImportMap = /* @__PURE__ */ new WeakMap(); -const transformElement = (node, context) => { - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { - return; - } - const { tag, props } = node; - const isComponent = node.tagType === 1; - let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; - const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = ( - // dynamic component may resolve to plain elements - isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === "svg" || tag === "foreignObject" || tag === "math") - ); - if (props.length > 0) { - const propsBuildResult = buildProps( - node, - context, - void 0, - isComponent, - isDynamicComponent - ); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = directives && directives.length ? createArrayExpression( - directives.map((dir) => buildDirectiveArgs(dir, context)) - ) : void 0; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } - } - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - shouldUseBlock = true; - patchFlag |= 1024; - if (!!(process.env.NODE_ENV !== "production") && node.children.length > 1) { - context.onError( - createCompilerError(46, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: "" - }) - ); - } - } - const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024; - } - } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - const hasDynamicTextChild = type === 5 || type === 8; - if (hasDynamicTextChild && getConstantType(child, context) === 0) { - patchFlag |= 1; - } - if (hasDynamicTextChild || type === 2) { - vnodeChildren = child; - } else { - vnodeChildren = node.children; - } - } else { - vnodeChildren = node.children; - } - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } - node.codegenNode = createVNodeCall( - context, - vnodeTag, - vnodeProps, - vnodeChildren, - patchFlag === 0 ? void 0 : patchFlag, - vnodeDynamicProps, - vnodeDirectives, - !!shouldUseBlock, - false, - isComponent, - node.loc - ); - }; -}; -function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp( - node, - "is", - false, - true - /* allow empty */ - ); - if (isProp) { - if (isExplicitDynamic || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - )) { - let exp; - if (isProp.type === 6) { - exp = isProp.value && createSimpleExpression(isProp.value.content, true); - } else { - exp = isProp.exp; - if (!exp) { - exp = createSimpleExpression(`is`, false, isProp.arg.loc); - } - } - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { - tag = isProp.value.content.slice(4); - } - } - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - if (!ssr) context.helper(builtIn); - return builtIn; - } - context.helper(RESOLVE_COMPONENT); - context.components.add(tag); - return toValidAssetId(tag, `component`); -} -function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const pushMergeArg = (arg) => { - if (properties.length) { - mergeArgs.push( - createObjectExpression(dedupeProperties(properties), elementLoc) - ); - properties = []; - } - if (arg) mergeArgs.push(arg); - }; - const pushRefVForMarker = () => { - if (context.scopes.vFor > 0) { - properties.push( - createObjectProperty( - createSimpleExpression("ref_for", true), - createSimpleExpression("true") - ) - ); - } - }; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = isOn(name); - if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== "onclick" && // omit v-model handlers - name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks - !isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && isReservedProp(name)) { - hasVnodeHook = true; - } - if (isEventHandler && value.type === 14) { - value = value.arguments[0]; - } - if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { - return; - } - if (name === "ref") { - hasRef = true; - } else if (name === "class") { - hasClassBinding = true; - } else if (name === "style") { - hasStyleBinding = true; - } else if (name !== "key" && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - } else { - hasDynamicKeys = true; - } - }; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 6) { - const { loc, name, nameLoc, value } = prop; - let isStatic = true; - if (name === "ref") { - hasRef = true; - pushRefVForMarker(); - } - if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - ))) { - continue; - } - properties.push( - createObjectProperty( - createSimpleExpression(name, true, nameLoc), - createSimpleExpression( - value ? value.content : "", - isStatic, - value ? value.loc : loc - ) - ) - ); - } else { - const { name, arg, exp, loc, modifiers } = prop; - const isVBind = name === "bind"; - const isVOn = name === "on"; - if (name === "slot") { - if (!isComponent) { - context.onError( - createCompilerError(40, loc) - ); - } - continue; - } - if (name === "once" || name === "memo") { - continue; - } - if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - ))) { - continue; - } - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked - // before children - isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") - ) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, "ref")) { - pushRefVForMarker(); - } - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (isVBind) { - pushRefVForMarker(); - pushMergeArg(); - { - if (!!(process.env.NODE_ENV !== "production")) { - const hasOverridableKeys = mergeArgs.some((arg2) => { - if (arg2.type === 15) { - return arg2.properties.some(({ key }) => { - if (key.type !== 4 || !key.isStatic) { - return true; - } - return key.content !== "class" && key.content !== "style" && !isOn(key.content); - }); - } else { - return true; - } - }); - if (hasOverridableKeys) { - checkCompatEnabled( - "COMPILER_V_BIND_OBJECT_ORDER", - context, - loc - ); - } - } - if (isCompatEnabled( - "COMPILER_V_BIND_OBJECT_ORDER", - context - )) { - mergeArgs.unshift(exp); - continue; - } - } - mergeArgs.push(exp); - } else { - pushMergeArg({ - type: 14, - loc, - callee: context.helper(TO_HANDLERS), - arguments: isComponent ? [exp] : [exp, `true`] - }); - } - } else { - context.onError( - createCompilerError( - isVBind ? 34 : 35, - loc - ) - ); - } - continue; - } - if (isVBind && modifiers.some((mod) => mod.content === "prop")) { - patchFlag |= 32; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - const { props: props2, needRuntime } = directiveTransform(prop, node, context); - !ssr && props2.forEach(analyzePatchFlag); - if (isVOn && arg && !isStaticExp(arg)) { - pushMergeArg(createObjectExpression(props2, elementLoc)); - } else { - properties.push(...props2); - } - if (needRuntime) { - runtimeDirectives.push(prop); - if (isSymbol(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } else if (!isBuiltInDirective(name)) { - runtimeDirectives.push(prop); - if (hasChildren) { - shouldUseBlock = true; - } - } - } - } - let propsExpression = void 0; - if (mergeArgs.length) { - pushMergeArg(); - if (mergeArgs.length > 1) { - propsExpression = createCallExpression( - context.helper(MERGE_PROPS), - mergeArgs, - elementLoc - ); - } else { - propsExpression = mergeArgs[0]; - } - } else if (properties.length) { - propsExpression = createObjectExpression( - dedupeProperties(properties), - elementLoc - ); - } - if (hasDynamicKeys) { - patchFlag |= 16; - } else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2; - } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4; - } - if (dynamicPropNames.length) { - patchFlag |= 8; - } - if (hasHydrationEventBinding) { - patchFlag |= 32; - } - } - if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512; - } - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15: - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === "class") { - classKeyIndex = i; - } else if (key.content === "style") { - styleKeyIndex = i; - } - } else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression( - context.helper(NORMALIZE_CLASS), - [classProp.value] - ); - } - if (styleProp && // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17)) { - styleProp.value = createCallExpression( - context.helper(NORMALIZE_STYLE), - [styleProp.value] - ); - } - } else { - propsExpression = createCallExpression( - context.helper(NORMALIZE_PROPS), - [propsExpression] - ); - } - break; - case 14: - break; - default: - propsExpression = createCallExpression( - context.helper(NORMALIZE_PROPS), - [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ] - ); - break; - } - } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; -} -function dedupeProperties(properties) { - const knownProps = /* @__PURE__ */ new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - if (prop.key.type === 8 || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === "style" || name === "class" || isOn(name)) { - mergeAsArray(existing, prop); - } - } else { - knownProps.set(name, prop); - deduped.push(prop); - } - } - return deduped; -} -function mergeAsArray(existing, incoming) { - if (existing.value.type === 17) { - existing.value.elements.push(incoming.value); - } else { - existing.value = createArrayExpression( - [existing.value, incoming.value], - existing.loc - ); - } -} -function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - dirArgs.push(context.helperString(runtime)); - } else { - { - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } - } - const { loc } = dir; - if (dir.exp) dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); - } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push( - createObjectExpression( - dir.modifiers.map( - (modifier) => createObjectProperty(modifier, trueExpression) - ), - loc - ) - ); - } - return createArrayExpression(dirArgs, dir.loc); -} -function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) propsNamesString += ", "; - } - return propsNamesString + `]`; -} -function isComponentTag(tag) { - return tag === "component" || tag === "Component"; -} - -const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - "{}", - "undefined", - "true" - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); - node.codegenNode = createCallExpression( - context.helper(RENDER_SLOT), - slotArgs, - loc - ); - } -}; -function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = void 0; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - if (p.value) { - if (p.name === "name") { - slotName = JSON.stringify(p.value.content); - } else { - p.name = camelize(p.name); - nonNameProps.push(p); - } - } - } else { - if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { - if (p.exp) { - slotName = p.exp; - } else if (p.arg && p.arg.type === 4) { - const name = camelize(p.arg.content); - slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); - } - } else { - if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { - p.arg.content = camelize(p.arg.content); - } - nonNameProps.push(p); - } - } - } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps( - node, - context, - nonNameProps, - false, - false - ); - slotProps = props; - if (directives.length) { - context.onError( - createCompilerError( - 36, - directives[0].loc - ) - ); - } - } - return { - slotName, - slotProps - }; -} - -const transformOn = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35, loc)); - } - let eventName; - if (arg.type === 4) { - if (arg.isStatic) { - let rawName = arg.content; - if (!!(process.env.NODE_ENV !== "production") && rawName.startsWith("vnode")) { - context.onError(createCompilerError(51, arg.loc)); - } - if (rawName.startsWith("vue:")) { - rawName = `vnode-${rawName.slice(4)}`; - } - const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( - // for non-element and vnode lifecycle event listeners, auto convert - // it to camelCase. See issue #2249 - toHandlerKey(camelize(rawName)) - ) : ( - // preserve case for plain element listeners that have uppercase - // letters, as these may be custom elements' custom events - `on:${rawName}` - ); - eventName = createSimpleExpression(eventString, true, arg.loc); - } else { - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); - } - } else { - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); - } - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = void 0; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp); - const isInlineStatement = !(isMemberExp || isFnExpression(exp)); - const hasMultipleStatements = exp.content.includes(`;`); - if (!!(process.env.NODE_ENV !== "production") && true) { - validateBrowserExpression( - exp, - context, - false, - hasMultipleStatements - ); - } - if (isInlineStatement || shouldCache && isMemberExp) { - exp = createCompoundExpression([ - `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty( - eventName, - exp || createSimpleExpression(`() => {}`, false, loc) - ) - ] - }; - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - ret.props[0].value = context.cache(ret.props[0].value); - } - ret.props.forEach((p) => p.key.isHandlerKey = true); - return ret; -}; - -const transformText = (node, context) => { - if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { - return () => { - const children = node.children; - let currentContainer = void 0; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText$1(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText$1(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression( - [child], - child.loc - ); - } - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } else { - currentContainer = void 0; - break; - } - } - } - } - if (!hasText || // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find( - (p) => p.type === 7 && !context.directiveTransforms[p.name] - ) && // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - !(node.tag === "template"))) { - return; - } - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText$1(child) || child.type === 8) { - const callArgs = []; - if (child.type !== 2 || child.content !== " ") { - callArgs.push(child); - } - if (!context.ssr && getConstantType(child, context) === 0) { - callArgs.push( - 1 + (!!(process.env.NODE_ENV !== "production") ? ` /* ${PatchFlagNames[1]} */` : ``) - ); - } - children[i] = { - type: 12, - content: child, - loc: child.loc, - codegenNode: createCallExpression( - context.helper(CREATE_TEXT), - callArgs - ) - }; - } - } - }; - } -}; - -const seen$1 = /* @__PURE__ */ new WeakSet(); -const transformOnce = (node, context) => { - if (node.type === 1 && findDir(node, "once", true)) { - if (seen$1.has(node) || context.inVOnce || context.inSSR) { - return; - } - seen$1.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache( - cur.codegenNode, - true, - true - ); - } - }; - } -}; - -const transformModel = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError( - createCompilerError(41, dir.loc) - ); - return createTransformProps(); - } - const rawExp = exp.loc.source.trim(); - const expString = exp.type === 4 ? exp.content : rawExp; - const bindingType = context.bindingMetadata[rawExp]; - if (bindingType === "props" || bindingType === "props-aliased") { - context.onError(createCompilerError(44, exp.loc)); - return createTransformProps(); - } - const maybeRef = false; - if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) { - context.onError( - createCompilerError(42, exp.loc) - ); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression("modelValue", true); - const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - if (dir.modifiers.length && node.tagType === 1) { - const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); - const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; - props.push( - createObjectProperty( - modifiersKey, - createSimpleExpression( - `{ ${modifiers} }`, - false, - dir.loc, - 2 - ) - ) - ); - } - return createTransformProps(props); -}; -function createTransformProps(props = []) { - return { props }; -} - -const validDivisionCharRE = /[\w).+\-_$\]]/; -const transformFilter = (node, context) => { - if (!isCompatEnabled("COMPILER_FILTERS", context)) { - return; - } - if (node.type === 5) { - rewriteFilter(node.content, context); - } else if (node.type === 1) { - node.props.forEach((prop) => { - if (prop.type === 7 && prop.name !== "for" && prop.exp) { - rewriteFilter(prop.exp, context); - } - }); - } -}; -function rewriteFilter(node, context) { - if (node.type === 4) { - parseFilter(node, context); - } else { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (typeof child !== "object") continue; - if (child.type === 4) { - parseFilter(child, context); - } else if (child.type === 8) { - rewriteFilter(node, context); - } else if (child.type === 5) { - rewriteFilter(child.content, context); - } - } - } -} -function parseFilter(node, context) { - const exp = node.content; - let inSingle = false; - let inDouble = false; - let inTemplateString = false; - let inRegex = false; - let curly = 0; - let square = 0; - let paren = 0; - let lastFilterIndex = 0; - let c, prev, i, expression, filters = []; - for (i = 0; i < exp.length; i++) { - prev = c; - c = exp.charCodeAt(i); - if (inSingle) { - if (c === 39 && prev !== 92) inSingle = false; - } else if (inDouble) { - if (c === 34 && prev !== 92) inDouble = false; - } else if (inTemplateString) { - if (c === 96 && prev !== 92) inTemplateString = false; - } else if (inRegex) { - if (c === 47 && prev !== 92) inRegex = false; - } else if (c === 124 && // pipe - exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { - if (expression === void 0) { - lastFilterIndex = i + 1; - expression = exp.slice(0, i).trim(); - } else { - pushFilter(); - } - } else { - switch (c) { - case 34: - inDouble = true; - break; - // " - case 39: - inSingle = true; - break; - // ' - case 96: - inTemplateString = true; - break; - // ` - case 40: - paren++; - break; - // ( - case 41: - paren--; - break; - // ) - case 91: - square++; - break; - // [ - case 93: - square--; - break; - // ] - case 123: - curly++; - break; - // { - case 125: - curly--; - break; - } - if (c === 47) { - let j = i - 1; - let p; - for (; j >= 0; j--) { - p = exp.charAt(j); - if (p !== " ") break; - } - if (!p || !validDivisionCharRE.test(p)) { - inRegex = true; - } - } - } - } - if (expression === void 0) { - expression = exp.slice(0, i).trim(); - } else if (lastFilterIndex !== 0) { - pushFilter(); - } - function pushFilter() { - filters.push(exp.slice(lastFilterIndex, i).trim()); - lastFilterIndex = i + 1; - } - if (filters.length) { - !!(process.env.NODE_ENV !== "production") && warnDeprecation( - "COMPILER_FILTERS", - context, - node.loc - ); - for (i = 0; i < filters.length; i++) { - expression = wrapFilter(expression, filters[i], context); - } - node.content = expression; - node.ast = void 0; - } -} -function wrapFilter(exp, filter, context) { - context.helper(RESOLVE_FILTER); - const i = filter.indexOf("("); - if (i < 0) { - context.filters.add(filter); - return `${toValidAssetId(filter, "filter")}(${exp})`; - } else { - const name = filter.slice(0, i); - const args = filter.slice(i + 1); - context.filters.add(name); - return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; - } -} - -const seen = /* @__PURE__ */ new WeakSet(); -const transformMemo = (node, context) => { - if (node.type === 1) { - const dir = findDir(node, "memo"); - if (!dir || seen.has(node)) { - return; - } - seen.add(node); - return () => { - const codegenNode = node.codegenNode || context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13) { - if (node.tagType !== 1) { - convertToBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(void 0, codegenNode), - `_cache`, - String(context.cached.length) - ]); - context.cached.push(null); - } - }; - } -}; - -function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...[transformFilter] , - ...!!(process.env.NODE_ENV !== "production") ? [transformExpression] : [], - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn, - bind: transformBind, - model: transformModel - } - ]; -} -function baseCompile(source, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === "module"; - { - if (options.prefixIdentifiers === true) { - onError(createCompilerError(47)); - } else if (isModuleMode) { - onError(createCompilerError(48)); - } - } - const prefixIdentifiers = false; - if (options.cacheHandlers) { - onError(createCompilerError(49)); - } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(50)); - } - const resolvedOptions = extend({}, options, { - prefixIdentifiers - }); - const ast = isString(source) ? baseParse(source, resolvedOptions) : source; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); - transform( - ast, - extend({}, resolvedOptions, { - nodeTransforms: [ - ...nodeTransforms, - ...options.nodeTransforms || [] - // user transforms - ], - directiveTransforms: extend( - {}, - directiveTransforms, - options.directiveTransforms || {} - // user transforms - ) - }) - ); - return generate(ast, resolvedOptions); -} - -const BindingTypes = { - "DATA": "data", - "PROPS": "props", - "PROPS_ALIASED": "props-aliased", - "SETUP_LET": "setup-let", - "SETUP_CONST": "setup-const", - "SETUP_REACTIVE_CONST": "setup-reactive-const", - "SETUP_MAYBE_REF": "setup-maybe-ref", - "SETUP_REF": "setup-ref", - "OPTIONS": "options", - "LITERAL_CONST": "literal-const" -}; - -const noopDirectiveTransform = () => ({ props: [] }); - -export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, Namespaces, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TS_NODE_TYPES, UNREF, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, errorMessages, extractIdentifiers, findDir, findProp, forAliasRE, generate, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isCoreComponent, isFnExpression, isFnExpressionBrowser, isFnExpressionNode, isFunctionType, isInDestructureAssignment, isInNewExpression, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText$1 as isText, isVSlot, locStub, noopDirectiveTransform, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, traverseNode, unwrapTSNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation }; diff --git a/node_modules/@vue/compiler-core/index.js b/node_modules/@vue/compiler-core/index.js deleted file mode 100644 index d3fc54f..0000000 --- a/node_modules/@vue/compiler-core/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/compiler-core.cjs.prod.js') -} else { - module.exports = require('./dist/compiler-core.cjs.js') -} diff --git a/node_modules/@vue/compiler-core/package.json b/node_modules/@vue/compiler-core/package.json deleted file mode 100644 index fb27b07..0000000 --- a/node_modules/@vue/compiler-core/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@vue/compiler-core", - "version": "3.5.13", - "description": "@vue/compiler-core", - "main": "index.js", - "module": "dist/compiler-core.esm-bundler.js", - "types": "dist/compiler-core.d.ts", - "files": [ - "index.js", - "dist" - ], - "exports": { - ".": { - "types": "./dist/compiler-core.d.ts", - "node": { - "production": "./dist/compiler-core.cjs.prod.js", - "development": "./dist/compiler-core.cjs.js", - "default": "./index.js" - }, - "module": "./dist/compiler-core.esm-bundler.js", - "import": "./dist/compiler-core.esm-bundler.js", - "require": "./index.js" - }, - "./*": "./*" - }, - "buildOptions": { - "name": "VueCompilerCore", - "compat": true, - "formats": [ - "esm-bundler", - "cjs" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/vuejs/core.git", - "directory": "packages/compiler-core" - }, - "keywords": [ - "vue" - ], - "author": "Evan You", - "license": "MIT", - "bugs": { - "url": "https://github.com/vuejs/core/issues" - }, - "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme", - "dependencies": { - "@babel/parser": "^7.25.3", - "entities": "^4.5.0", - "estree-walker": "^2.0.2", - "source-map-js": "^1.2.0", - "@vue/shared": "3.5.13" - }, - "devDependencies": { - "@babel/types": "^7.25.2" - } -} \ No newline at end of file diff --git a/node_modules/@vue/compiler-dom/LICENSE b/node_modules/@vue/compiler-dom/LICENSE deleted file mode 100644 index 15f1f7e..0000000 --- a/node_modules/@vue/compiler-dom/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018-present, Yuxi (Evan) You - -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/node_modules/@vue/compiler-dom/README.md b/node_modules/@vue/compiler-dom/README.md deleted file mode 100644 index 57748e6..0000000 --- a/node_modules/@vue/compiler-dom/README.md +++ /dev/null @@ -1 +0,0 @@ -# @vue/compiler-dom diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js deleted file mode 100644 index dc802dd..0000000 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js +++ /dev/null @@ -1,928 +0,0 @@ -/** -* @vue/compiler-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var compilerCore = require('@vue/compiler-core'); -var shared = require('@vue/shared'); - -const V_MODEL_RADIO = Symbol(`vModelRadio` ); -const V_MODEL_CHECKBOX = Symbol( - `vModelCheckbox` -); -const V_MODEL_TEXT = Symbol(`vModelText` ); -const V_MODEL_SELECT = Symbol( - `vModelSelect` -); -const V_MODEL_DYNAMIC = Symbol( - `vModelDynamic` -); -const V_ON_WITH_MODIFIERS = Symbol( - `vOnModifiersGuard` -); -const V_ON_WITH_KEYS = Symbol( - `vOnKeysGuard` -); -const V_SHOW = Symbol(`vShow` ); -const TRANSITION = Symbol(`Transition` ); -const TRANSITION_GROUP = Symbol( - `TransitionGroup` -); -compilerCore.registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` -}); - -const parserOptions = { - parseMode: "html", - isVoidTag: shared.isVoidTag, - isNativeTag: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag) || shared.isMathMLTag(tag), - isPreTag: (tag) => tag === "pre", - isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", - decodeEntities: void 0, - isBuiltInComponent: (tag) => { - if (tag === "Transition" || tag === "transition") { - return TRANSITION; - } else if (tag === "TransitionGroup" || tag === "transition-group") { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent, rootNamespace) { - let ns = parent ? parent.ns : rootNamespace; - if (parent && ns === 2) { - if (parent.tag === "annotation-xml") { - if (tag === "svg") { - return 1; - } - if (parent.props.some( - (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") - )) { - ns = 0; - } - } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { - ns = 0; - } - } else if (parent && ns === 1) { - if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { - ns = 0; - } - } - if (ns === 0) { - if (tag === "svg") { - return 1; - } - if (tag === "math") { - return 2; - } - } - return ns; - } -}; - -const transformStyle = (node) => { - if (node.type === 1) { - node.props.forEach((p, i) => { - if (p.type === 6 && p.name === "style" && p.value) { - node.props[i] = { - type: 7, - name: `bind`, - arg: compilerCore.createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } -}; -const parseInlineCSS = (cssText, loc) => { - const normalized = shared.parseStringStyle(cssText); - return compilerCore.createSimpleExpression( - JSON.stringify(normalized), - false, - loc, - 3 - ); -}; - -function createDOMCompilerError(code, loc) { - return compilerCore.createCompilerError( - code, - loc, - DOMErrorMessages - ); -} -const DOMErrorCodes = { - "X_V_HTML_NO_EXPRESSION": 53, - "53": "X_V_HTML_NO_EXPRESSION", - "X_V_HTML_WITH_CHILDREN": 54, - "54": "X_V_HTML_WITH_CHILDREN", - "X_V_TEXT_NO_EXPRESSION": 55, - "55": "X_V_TEXT_NO_EXPRESSION", - "X_V_TEXT_WITH_CHILDREN": 56, - "56": "X_V_TEXT_WITH_CHILDREN", - "X_V_MODEL_ON_INVALID_ELEMENT": 57, - "57": "X_V_MODEL_ON_INVALID_ELEMENT", - "X_V_MODEL_ARG_ON_ELEMENT": 58, - "58": "X_V_MODEL_ARG_ON_ELEMENT", - "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, - "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", - "X_V_MODEL_UNNECESSARY_VALUE": 60, - "60": "X_V_MODEL_UNNECESSARY_VALUE", - "X_V_SHOW_NO_EXPRESSION": 61, - "61": "X_V_SHOW_NO_EXPRESSION", - "X_TRANSITION_INVALID_CHILDREN": 62, - "62": "X_TRANSITION_INVALID_CHILDREN", - "X_IGNORED_SIDE_EFFECT_TAG": 63, - "63": "X_IGNORED_SIDE_EFFECT_TAG", - "__EXTEND_POINT__": 64, - "64": "__EXTEND_POINT__" -}; -const DOMErrorMessages = { - [53]: `v-html is missing expression.`, - [54]: `v-html will override element children.`, - [55]: `v-text is missing expression.`, - [56]: `v-text will override element children.`, - [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [58]: `v-model argument is not supported on plain elements.`, - [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [61]: `v-show is missing expression.`, - [62]: `<Transition> expects exactly one child element or component.`, - [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` -}; - -const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(53, loc) - ); - } - if (node.children.length) { - context.onError( - createDOMCompilerError(54, loc) - ); - node.children.length = 0; - } - return { - props: [ - compilerCore.createObjectProperty( - compilerCore.createSimpleExpression(`innerHTML`, true, loc), - exp || compilerCore.createSimpleExpression("", true) - ) - ] - }; -}; - -const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(55, loc) - ); - } - if (node.children.length) { - context.onError( - createDOMCompilerError(56, loc) - ); - node.children.length = 0; - } - return { - props: [ - compilerCore.createObjectProperty( - compilerCore.createSimpleExpression(`textContent`, true), - exp ? compilerCore.getConstantType(exp, context) > 0 ? exp : compilerCore.createCallExpression( - context.helperString(compilerCore.TO_DISPLAY_STRING), - [exp], - loc - ) : compilerCore.createSimpleExpression("", true) - ) - ] - }; -}; - -const transformModel = (dir, node, context) => { - const baseResult = compilerCore.transformModel(dir, node, context); - if (!baseResult.props.length || node.tagType === 1) { - return baseResult; - } - if (dir.arg) { - context.onError( - createDOMCompilerError( - 58, - dir.arg.loc - ) - ); - } - function checkDuplicatedValue() { - const value = compilerCore.findDir(node, "bind"); - if (value && compilerCore.isStaticArgOf(value.arg, "value")) { - context.onError( - createDOMCompilerError( - 60, - value.loc - ) - ); - } - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === "input" || isCustomElement) { - const type = compilerCore.findProp(node, `type`); - if (type) { - if (type.type === 7) { - directiveToUse = V_MODEL_DYNAMIC; - } else if (type.value) { - switch (type.value.content) { - case "radio": - directiveToUse = V_MODEL_RADIO; - break; - case "checkbox": - directiveToUse = V_MODEL_CHECKBOX; - break; - case "file": - isInvalidType = true; - context.onError( - createDOMCompilerError( - 59, - dir.loc - ) - ); - break; - default: - checkDuplicatedValue(); - break; - } - } - } else if (compilerCore.hasDynamicKeyVBind(node)) { - directiveToUse = V_MODEL_DYNAMIC; - } else { - checkDuplicatedValue(); - } - } else if (tag === "select") { - directiveToUse = V_MODEL_SELECT; - } else { - checkDuplicatedValue(); - } - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } else { - context.onError( - createDOMCompilerError( - 57, - dir.loc - ) - ); - } - baseResult.props = baseResult.props.filter( - (p) => !(p.key.type === 4 && p.key.content === "modelValue") - ); - return baseResult; -}; - -const isEventOptionModifier = /* @__PURE__ */ shared.makeMap(`passive,once,capture`); -const isNonKeyModifier = /* @__PURE__ */ shared.makeMap( - // event propagation management - `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` -); -const maybeKeyModifier = /* @__PURE__ */ shared.makeMap("left,right"); -const isKeyboardEvent = /* @__PURE__ */ shared.makeMap(`onkeyup,onkeydown,onkeypress`); -const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i].content; - if (modifier === "native" && compilerCore.checkCompatEnabled( - "COMPILER_V_ON_NATIVE", - context, - loc - )) { - eventOptionModifiers.push(modifier); - } else if (isEventOptionModifier(modifier)) { - eventOptionModifiers.push(modifier); - } else { - if (maybeKeyModifier(modifier)) { - if (compilerCore.isStaticExp(key)) { - if (isKeyboardEvent(key.content.toLowerCase())) { - keyModifiers.push(modifier); - } else { - nonKeyModifiers.push(modifier); - } - } else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } else { - keyModifiers.push(modifier); - } - } - } - } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; -}; -const transformClick = (key, event) => { - const isStaticClick = compilerCore.isStaticExp(key) && key.content.toLowerCase() === "onclick"; - return isStaticClick ? compilerCore.createSimpleExpression(event, true) : key.type !== 4 ? compilerCore.createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) : key; -}; -const transformOn = (dir, node, context) => { - return compilerCore.transformOn(dir, node, context, (baseResult) => { - const { modifiers } = dir; - if (!modifiers.length) return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - if (nonKeyModifiers.includes("right")) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes("middle")) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard - (!compilerCore.isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { - handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(shared.capitalize).join(""); - key = compilerCore.isStaticExp(key) ? compilerCore.createSimpleExpression(`${key.content}${modifierPostfix}`, true) : compilerCore.createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [compilerCore.createObjectProperty(key, handlerExp)] - }; - }); -}; - -const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(61, loc) - ); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; -}; - -const transformTransition = (node, context) => { - if (node.type === 1 && node.tagType === 1) { - const component = context.isBuiltInComponent(node.tag); - if (component === TRANSITION) { - return () => { - if (!node.children.length) { - return; - } - if (hasMultipleChildren(node)) { - context.onError( - createDOMCompilerError( - 62, - { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: "" - } - ) - ); - } - const child = node.children[0]; - if (child.type === 1) { - for (const p of child.props) { - if (p.type === 7 && p.name === "show") { - node.props.push({ - type: 6, - name: "persisted", - nameLoc: node.loc, - value: void 0, - loc: node.loc - }); - } - } - } - }; - } - } -}; -function hasMultipleChildren(node) { - const children = node.children = node.children.filter( - (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) - ); - const child = children[0]; - return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); -} - -const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g; -const stringifyStatic = (children, context, parent) => { - if (context.scopes.vSlot > 0) { - return; - } - const isParentCached = parent.type === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !shared.isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 20; - let nc = 0; - let ec = 0; - const currentChunk = []; - const stringifyCurrentChunk = (currentIndex) => { - if (nc >= 20 || ec >= 5) { - const staticCall = compilerCore.createCallExpression(context.helper(compilerCore.CREATE_STATIC), [ - JSON.stringify( - currentChunk.map((node) => stringifyNode(node, context)).join("") - ).replace(expReplaceRE, `" + $1 + "`), - // the 2nd argument indicates the number of DOM nodes this static vnode - // will insert / hydrate - String(currentChunk.length) - ]); - const deleteCount = currentChunk.length - 1; - if (isParentCached) { - children.splice( - currentIndex - currentChunk.length, - currentChunk.length, - // @ts-expect-error - staticCall - ); - } else { - currentChunk[0].codegenNode.value = staticCall; - if (currentChunk.length > 1) { - children.splice(currentIndex - currentChunk.length + 1, deleteCount); - const cacheIndex = context.cached.indexOf( - currentChunk[currentChunk.length - 1].codegenNode - ); - if (cacheIndex > -1) { - for (let i2 = cacheIndex; i2 < context.cached.length; i2++) { - const c = context.cached[i2]; - if (c) c.index -= deleteCount; - } - context.cached.splice(cacheIndex - deleteCount + 1, deleteCount); - } - } - } - return deleteCount; - } - return 0; - }; - let i = 0; - for (; i < children.length; i++) { - const child = children[i]; - const isCached = isParentCached || getCachedNode(child); - if (isCached) { - const result = analyzeNode(child); - if (result) { - nc += result[0]; - ec += result[1]; - currentChunk.push(child); - continue; - } - } - i -= stringifyCurrentChunk(i); - nc = 0; - ec = 0; - currentChunk.length = 0; - } - stringifyCurrentChunk(i); -}; -const getCachedNode = (node) => { - if ((node.type === 1 && node.tagType === 0 || node.type === 12) && node.codegenNode && node.codegenNode.type === 20) { - return node.codegenNode; - } -}; -const dataAriaRE = /^(data|aria)-/; -const isStringifiableAttr = (name, ns) => { - return (ns === 0 ? shared.isKnownHtmlAttr(name) : ns === 1 ? shared.isKnownSvgAttr(name) : ns === 2 ? shared.isKnownMathMLAttr(name) : false) || dataAriaRE.test(name); -}; -const isNonStringifiable = /* @__PURE__ */ shared.makeMap( - `caption,thead,tr,th,tbody,td,tfoot,colgroup,col` -); -function analyzeNode(node) { - if (node.type === 1 && isNonStringifiable(node.tag)) { - return false; - } - if (node.type === 12) { - return [1, 0]; - } - let nc = 1; - let ec = node.props.length > 0 ? 1 : 0; - let bailed = false; - const bail = () => { - bailed = true; - return false; - }; - function walk(node2) { - const isOptionTag = node2.tag === "option" && node2.ns === 0; - for (let i = 0; i < node2.props.length; i++) { - const p = node2.props[i]; - if (p.type === 6 && !isStringifiableAttr(p.name, node2.ns)) { - return bail(); - } - if (p.type === 7 && p.name === "bind") { - if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node2.ns))) { - return bail(); - } - if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) { - return bail(); - } - if (isOptionTag && compilerCore.isStaticArgOf(p.arg, "value") && p.exp && !p.exp.isStatic) { - return bail(); - } - } - } - for (let i = 0; i < node2.children.length; i++) { - nc++; - const child = node2.children[i]; - if (child.type === 1) { - if (child.props.length > 0) { - ec++; - } - walk(child); - if (bailed) { - return false; - } - } - } - return true; - } - return walk(node) ? [nc, ec] : false; -} -function stringifyNode(node, context) { - if (shared.isString(node)) { - return node; - } - if (shared.isSymbol(node)) { - return ``; - } - switch (node.type) { - case 1: - return stringifyElement(node, context); - case 2: - return shared.escapeHtml(node.content); - case 3: - return `<!--${shared.escapeHtml(node.content)}-->`; - case 5: - return shared.escapeHtml(shared.toDisplayString(evaluateConstant(node.content))); - case 8: - return shared.escapeHtml(evaluateConstant(node)); - case 12: - return stringifyNode(node.content, context); - default: - return ""; - } -} -function stringifyElement(node, context) { - let res = `<${node.tag}`; - let innerHTML = ""; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - res += ` ${p.name}`; - if (p.value) { - res += `="${shared.escapeHtml(p.value.content)}"`; - } - } else if (p.type === 7) { - if (p.name === "bind") { - const exp = p.exp; - if (exp.content[0] === "_") { - res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`; - continue; - } - if (shared.isBooleanAttr(p.arg.content) && exp.content === "false") { - continue; - } - let evaluated = evaluateConstant(exp); - if (evaluated != null) { - const arg = p.arg && p.arg.content; - if (arg === "class") { - evaluated = shared.normalizeClass(evaluated); - } else if (arg === "style") { - evaluated = shared.stringifyStyle(shared.normalizeStyle(evaluated)); - } - res += ` ${p.arg.content}="${shared.escapeHtml( - evaluated - )}"`; - } - } else if (p.name === "html") { - innerHTML = evaluateConstant(p.exp); - } else if (p.name === "text") { - innerHTML = shared.escapeHtml( - shared.toDisplayString(evaluateConstant(p.exp)) - ); - } - } - } - if (context.scopeId) { - res += ` ${context.scopeId}`; - } - res += `>`; - if (innerHTML) { - res += innerHTML; - } else { - for (let i = 0; i < node.children.length; i++) { - res += stringifyNode(node.children[i], context); - } - } - if (!shared.isVoidTag(node.tag)) { - res += `</${node.tag}>`; - } - return res; -} -function evaluateConstant(exp) { - if (exp.type === 4) { - return new Function(`return (${exp.content})`)(); - } else { - let res = ``; - exp.children.forEach((c) => { - if (shared.isString(c) || shared.isSymbol(c)) { - return; - } - if (c.type === 2) { - res += c.content; - } else if (c.type === 5) { - res += shared.toDisplayString(evaluateConstant(c.content)); - } else { - res += evaluateConstant(c); - } - }); - return res; - } -} - -const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { - context.onError( - createDOMCompilerError( - 63, - node.loc - ) - ); - context.removeNode(); - } -}; - -function isValidHTMLNesting(parent, child) { - if (parent in onlyValidChildren) { - return onlyValidChildren[parent].has(child); - } - if (child in onlyValidParents) { - return onlyValidParents[child].has(parent); - } - if (parent in knownInvalidChildren) { - if (knownInvalidChildren[parent].has(child)) return false; - } - if (child in knownInvalidParents) { - if (knownInvalidParents[child].has(parent)) return false; - } - return true; -} -const headings = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]); -const emptySet = /* @__PURE__ */ new Set([]); -const onlyValidChildren = { - head: /* @__PURE__ */ new Set([ - "base", - "basefront", - "bgsound", - "link", - "meta", - "title", - "noscript", - "noframes", - "style", - "script", - "template" - ]), - optgroup: /* @__PURE__ */ new Set(["option"]), - select: /* @__PURE__ */ new Set(["optgroup", "option", "hr"]), - // table - table: /* @__PURE__ */ new Set(["caption", "colgroup", "tbody", "tfoot", "thead"]), - tr: /* @__PURE__ */ new Set(["td", "th"]), - colgroup: /* @__PURE__ */ new Set(["col"]), - tbody: /* @__PURE__ */ new Set(["tr"]), - thead: /* @__PURE__ */ new Set(["tr"]), - tfoot: /* @__PURE__ */ new Set(["tr"]), - // these elements can not have any children elements - script: emptySet, - iframe: emptySet, - option: emptySet, - textarea: emptySet, - style: emptySet, - title: emptySet -}; -const onlyValidParents = { - // sections - html: emptySet, - body: /* @__PURE__ */ new Set(["html"]), - head: /* @__PURE__ */ new Set(["html"]), - // table - td: /* @__PURE__ */ new Set(["tr"]), - colgroup: /* @__PURE__ */ new Set(["table"]), - caption: /* @__PURE__ */ new Set(["table"]), - tbody: /* @__PURE__ */ new Set(["table"]), - tfoot: /* @__PURE__ */ new Set(["table"]), - col: /* @__PURE__ */ new Set(["colgroup"]), - th: /* @__PURE__ */ new Set(["tr"]), - thead: /* @__PURE__ */ new Set(["table"]), - tr: /* @__PURE__ */ new Set(["tbody", "thead", "tfoot"]), - // data list - dd: /* @__PURE__ */ new Set(["dl", "div"]), - dt: /* @__PURE__ */ new Set(["dl", "div"]), - // other - figcaption: /* @__PURE__ */ new Set(["figure"]), - // li: new Set(["ul", "ol"]), - summary: /* @__PURE__ */ new Set(["details"]), - area: /* @__PURE__ */ new Set(["map"]) -}; -const knownInvalidChildren = { - p: /* @__PURE__ */ new Set([ - "address", - "article", - "aside", - "blockquote", - "center", - "details", - "dialog", - "dir", - "div", - "dl", - "fieldset", - "figure", - "footer", - "form", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "header", - "hgroup", - "hr", - "li", - "main", - "nav", - "menu", - "ol", - "p", - "pre", - "section", - "table", - "ul" - ]), - svg: /* @__PURE__ */ new Set([ - "b", - "blockquote", - "br", - "code", - "dd", - "div", - "dl", - "dt", - "em", - "embed", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "hr", - "i", - "img", - "li", - "menu", - "meta", - "ol", - "p", - "pre", - "ruby", - "s", - "small", - "span", - "strong", - "sub", - "sup", - "table", - "u", - "ul", - "var" - ]) -}; -const knownInvalidParents = { - a: /* @__PURE__ */ new Set(["a"]), - button: /* @__PURE__ */ new Set(["button"]), - dd: /* @__PURE__ */ new Set(["dd", "dt"]), - dt: /* @__PURE__ */ new Set(["dd", "dt"]), - form: /* @__PURE__ */ new Set(["form"]), - li: /* @__PURE__ */ new Set(["li"]), - h1: headings, - h2: headings, - h3: headings, - h4: headings, - h5: headings, - h6: headings -}; - -const validateHtmlNesting = (node, context) => { - if (node.type === 1 && node.tagType === 0 && context.parent && context.parent.type === 1 && context.parent.tagType === 0 && !isValidHTMLNesting(context.parent.tag, node.tag)) { - const error = new SyntaxError( - `<${node.tag}> cannot be child of <${context.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.` - ); - error.loc = node.loc; - context.onWarn(error); - } -}; - -const DOMNodeTransforms = [ - transformStyle, - ...[transformTransition, validateHtmlNesting] -]; -const DOMDirectiveTransforms = { - cloak: compilerCore.noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel, - // override compiler-core - on: transformOn, - // override compiler-core - show: transformShow -}; -function compile(src, options = {}) { - return compilerCore.baseCompile( - src, - shared.extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...options.nodeTransforms || [] - ], - directiveTransforms: shared.extend( - {}, - DOMDirectiveTransforms, - options.directiveTransforms || {} - ), - transformHoist: stringifyStatic - }) - ); -} -function parse(template, options = {}) { - return compilerCore.baseParse(template, shared.extend({}, parserOptions, options)); -} - -exports.DOMDirectiveTransforms = DOMDirectiveTransforms; -exports.DOMErrorCodes = DOMErrorCodes; -exports.DOMErrorMessages = DOMErrorMessages; -exports.DOMNodeTransforms = DOMNodeTransforms; -exports.TRANSITION = TRANSITION; -exports.TRANSITION_GROUP = TRANSITION_GROUP; -exports.V_MODEL_CHECKBOX = V_MODEL_CHECKBOX; -exports.V_MODEL_DYNAMIC = V_MODEL_DYNAMIC; -exports.V_MODEL_RADIO = V_MODEL_RADIO; -exports.V_MODEL_SELECT = V_MODEL_SELECT; -exports.V_MODEL_TEXT = V_MODEL_TEXT; -exports.V_ON_WITH_KEYS = V_ON_WITH_KEYS; -exports.V_ON_WITH_MODIFIERS = V_ON_WITH_MODIFIERS; -exports.V_SHOW = V_SHOW; -exports.compile = compile; -exports.createDOMCompilerError = createDOMCompilerError; -exports.parse = parse; -exports.parserOptions = parserOptions; -exports.transformStyle = transformStyle; -Object.keys(compilerCore).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = compilerCore[k]; -}); diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js deleted file mode 100644 index 94b29b7..0000000 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +++ /dev/null @@ -1,686 +0,0 @@ -/** -* @vue/compiler-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var compilerCore = require('@vue/compiler-core'); -var shared = require('@vue/shared'); - -const V_MODEL_RADIO = Symbol(``); -const V_MODEL_CHECKBOX = Symbol( - `` -); -const V_MODEL_TEXT = Symbol(``); -const V_MODEL_SELECT = Symbol( - `` -); -const V_MODEL_DYNAMIC = Symbol( - `` -); -const V_ON_WITH_MODIFIERS = Symbol( - `` -); -const V_ON_WITH_KEYS = Symbol( - `` -); -const V_SHOW = Symbol(``); -const TRANSITION = Symbol(``); -const TRANSITION_GROUP = Symbol( - `` -); -compilerCore.registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` -}); - -const parserOptions = { - parseMode: "html", - isVoidTag: shared.isVoidTag, - isNativeTag: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag) || shared.isMathMLTag(tag), - isPreTag: (tag) => tag === "pre", - isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", - decodeEntities: void 0, - isBuiltInComponent: (tag) => { - if (tag === "Transition" || tag === "transition") { - return TRANSITION; - } else if (tag === "TransitionGroup" || tag === "transition-group") { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent, rootNamespace) { - let ns = parent ? parent.ns : rootNamespace; - if (parent && ns === 2) { - if (parent.tag === "annotation-xml") { - if (tag === "svg") { - return 1; - } - if (parent.props.some( - (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") - )) { - ns = 0; - } - } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { - ns = 0; - } - } else if (parent && ns === 1) { - if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { - ns = 0; - } - } - if (ns === 0) { - if (tag === "svg") { - return 1; - } - if (tag === "math") { - return 2; - } - } - return ns; - } -}; - -const transformStyle = (node) => { - if (node.type === 1) { - node.props.forEach((p, i) => { - if (p.type === 6 && p.name === "style" && p.value) { - node.props[i] = { - type: 7, - name: `bind`, - arg: compilerCore.createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } -}; -const parseInlineCSS = (cssText, loc) => { - const normalized = shared.parseStringStyle(cssText); - return compilerCore.createSimpleExpression( - JSON.stringify(normalized), - false, - loc, - 3 - ); -}; - -function createDOMCompilerError(code, loc) { - return compilerCore.createCompilerError( - code, - loc, - DOMErrorMessages - ); -} -const DOMErrorCodes = { - "X_V_HTML_NO_EXPRESSION": 53, - "53": "X_V_HTML_NO_EXPRESSION", - "X_V_HTML_WITH_CHILDREN": 54, - "54": "X_V_HTML_WITH_CHILDREN", - "X_V_TEXT_NO_EXPRESSION": 55, - "55": "X_V_TEXT_NO_EXPRESSION", - "X_V_TEXT_WITH_CHILDREN": 56, - "56": "X_V_TEXT_WITH_CHILDREN", - "X_V_MODEL_ON_INVALID_ELEMENT": 57, - "57": "X_V_MODEL_ON_INVALID_ELEMENT", - "X_V_MODEL_ARG_ON_ELEMENT": 58, - "58": "X_V_MODEL_ARG_ON_ELEMENT", - "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, - "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", - "X_V_MODEL_UNNECESSARY_VALUE": 60, - "60": "X_V_MODEL_UNNECESSARY_VALUE", - "X_V_SHOW_NO_EXPRESSION": 61, - "61": "X_V_SHOW_NO_EXPRESSION", - "X_TRANSITION_INVALID_CHILDREN": 62, - "62": "X_TRANSITION_INVALID_CHILDREN", - "X_IGNORED_SIDE_EFFECT_TAG": 63, - "63": "X_IGNORED_SIDE_EFFECT_TAG", - "__EXTEND_POINT__": 64, - "64": "__EXTEND_POINT__" -}; -const DOMErrorMessages = { - [53]: `v-html is missing expression.`, - [54]: `v-html will override element children.`, - [55]: `v-text is missing expression.`, - [56]: `v-text will override element children.`, - [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [58]: `v-model argument is not supported on plain elements.`, - [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [61]: `v-show is missing expression.`, - [62]: `<Transition> expects exactly one child element or component.`, - [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` -}; - -const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(53, loc) - ); - } - if (node.children.length) { - context.onError( - createDOMCompilerError(54, loc) - ); - node.children.length = 0; - } - return { - props: [ - compilerCore.createObjectProperty( - compilerCore.createSimpleExpression(`innerHTML`, true, loc), - exp || compilerCore.createSimpleExpression("", true) - ) - ] - }; -}; - -const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(55, loc) - ); - } - if (node.children.length) { - context.onError( - createDOMCompilerError(56, loc) - ); - node.children.length = 0; - } - return { - props: [ - compilerCore.createObjectProperty( - compilerCore.createSimpleExpression(`textContent`, true), - exp ? compilerCore.getConstantType(exp, context) > 0 ? exp : compilerCore.createCallExpression( - context.helperString(compilerCore.TO_DISPLAY_STRING), - [exp], - loc - ) : compilerCore.createSimpleExpression("", true) - ) - ] - }; -}; - -const transformModel = (dir, node, context) => { - const baseResult = compilerCore.transformModel(dir, node, context); - if (!baseResult.props.length || node.tagType === 1) { - return baseResult; - } - if (dir.arg) { - context.onError( - createDOMCompilerError( - 58, - dir.arg.loc - ) - ); - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === "input" || isCustomElement) { - const type = compilerCore.findProp(node, `type`); - if (type) { - if (type.type === 7) { - directiveToUse = V_MODEL_DYNAMIC; - } else if (type.value) { - switch (type.value.content) { - case "radio": - directiveToUse = V_MODEL_RADIO; - break; - case "checkbox": - directiveToUse = V_MODEL_CHECKBOX; - break; - case "file": - isInvalidType = true; - context.onError( - createDOMCompilerError( - 59, - dir.loc - ) - ); - break; - } - } - } else if (compilerCore.hasDynamicKeyVBind(node)) { - directiveToUse = V_MODEL_DYNAMIC; - } else ; - } else if (tag === "select") { - directiveToUse = V_MODEL_SELECT; - } else ; - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } else { - context.onError( - createDOMCompilerError( - 57, - dir.loc - ) - ); - } - baseResult.props = baseResult.props.filter( - (p) => !(p.key.type === 4 && p.key.content === "modelValue") - ); - return baseResult; -}; - -const isEventOptionModifier = /* @__PURE__ */ shared.makeMap(`passive,once,capture`); -const isNonKeyModifier = /* @__PURE__ */ shared.makeMap( - // event propagation management - `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` -); -const maybeKeyModifier = /* @__PURE__ */ shared.makeMap("left,right"); -const isKeyboardEvent = /* @__PURE__ */ shared.makeMap(`onkeyup,onkeydown,onkeypress`); -const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i].content; - if (modifier === "native" && compilerCore.checkCompatEnabled( - "COMPILER_V_ON_NATIVE", - context, - loc - )) { - eventOptionModifiers.push(modifier); - } else if (isEventOptionModifier(modifier)) { - eventOptionModifiers.push(modifier); - } else { - if (maybeKeyModifier(modifier)) { - if (compilerCore.isStaticExp(key)) { - if (isKeyboardEvent(key.content.toLowerCase())) { - keyModifiers.push(modifier); - } else { - nonKeyModifiers.push(modifier); - } - } else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } else { - keyModifiers.push(modifier); - } - } - } - } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; -}; -const transformClick = (key, event) => { - const isStaticClick = compilerCore.isStaticExp(key) && key.content.toLowerCase() === "onclick"; - return isStaticClick ? compilerCore.createSimpleExpression(event, true) : key.type !== 4 ? compilerCore.createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) : key; -}; -const transformOn = (dir, node, context) => { - return compilerCore.transformOn(dir, node, context, (baseResult) => { - const { modifiers } = dir; - if (!modifiers.length) return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - if (nonKeyModifiers.includes("right")) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes("middle")) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard - (!compilerCore.isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { - handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(shared.capitalize).join(""); - key = compilerCore.isStaticExp(key) ? compilerCore.createSimpleExpression(`${key.content}${modifierPostfix}`, true) : compilerCore.createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [compilerCore.createObjectProperty(key, handlerExp)] - }; - }); -}; - -const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(61, loc) - ); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; -}; - -const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g; -const stringifyStatic = (children, context, parent) => { - if (context.scopes.vSlot > 0) { - return; - } - const isParentCached = parent.type === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !shared.isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 20; - let nc = 0; - let ec = 0; - const currentChunk = []; - const stringifyCurrentChunk = (currentIndex) => { - if (nc >= 20 || ec >= 5) { - const staticCall = compilerCore.createCallExpression(context.helper(compilerCore.CREATE_STATIC), [ - JSON.stringify( - currentChunk.map((node) => stringifyNode(node, context)).join("") - ).replace(expReplaceRE, `" + $1 + "`), - // the 2nd argument indicates the number of DOM nodes this static vnode - // will insert / hydrate - String(currentChunk.length) - ]); - const deleteCount = currentChunk.length - 1; - if (isParentCached) { - children.splice( - currentIndex - currentChunk.length, - currentChunk.length, - // @ts-expect-error - staticCall - ); - } else { - currentChunk[0].codegenNode.value = staticCall; - if (currentChunk.length > 1) { - children.splice(currentIndex - currentChunk.length + 1, deleteCount); - const cacheIndex = context.cached.indexOf( - currentChunk[currentChunk.length - 1].codegenNode - ); - if (cacheIndex > -1) { - for (let i2 = cacheIndex; i2 < context.cached.length; i2++) { - const c = context.cached[i2]; - if (c) c.index -= deleteCount; - } - context.cached.splice(cacheIndex - deleteCount + 1, deleteCount); - } - } - } - return deleteCount; - } - return 0; - }; - let i = 0; - for (; i < children.length; i++) { - const child = children[i]; - const isCached = isParentCached || getCachedNode(child); - if (isCached) { - const result = analyzeNode(child); - if (result) { - nc += result[0]; - ec += result[1]; - currentChunk.push(child); - continue; - } - } - i -= stringifyCurrentChunk(i); - nc = 0; - ec = 0; - currentChunk.length = 0; - } - stringifyCurrentChunk(i); -}; -const getCachedNode = (node) => { - if ((node.type === 1 && node.tagType === 0 || node.type === 12) && node.codegenNode && node.codegenNode.type === 20) { - return node.codegenNode; - } -}; -const dataAriaRE = /^(data|aria)-/; -const isStringifiableAttr = (name, ns) => { - return (ns === 0 ? shared.isKnownHtmlAttr(name) : ns === 1 ? shared.isKnownSvgAttr(name) : ns === 2 ? shared.isKnownMathMLAttr(name) : false) || dataAriaRE.test(name); -}; -const isNonStringifiable = /* @__PURE__ */ shared.makeMap( - `caption,thead,tr,th,tbody,td,tfoot,colgroup,col` -); -function analyzeNode(node) { - if (node.type === 1 && isNonStringifiable(node.tag)) { - return false; - } - if (node.type === 12) { - return [1, 0]; - } - let nc = 1; - let ec = node.props.length > 0 ? 1 : 0; - let bailed = false; - const bail = () => { - bailed = true; - return false; - }; - function walk(node2) { - const isOptionTag = node2.tag === "option" && node2.ns === 0; - for (let i = 0; i < node2.props.length; i++) { - const p = node2.props[i]; - if (p.type === 6 && !isStringifiableAttr(p.name, node2.ns)) { - return bail(); - } - if (p.type === 7 && p.name === "bind") { - if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node2.ns))) { - return bail(); - } - if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) { - return bail(); - } - if (isOptionTag && compilerCore.isStaticArgOf(p.arg, "value") && p.exp && !p.exp.isStatic) { - return bail(); - } - } - } - for (let i = 0; i < node2.children.length; i++) { - nc++; - const child = node2.children[i]; - if (child.type === 1) { - if (child.props.length > 0) { - ec++; - } - walk(child); - if (bailed) { - return false; - } - } - } - return true; - } - return walk(node) ? [nc, ec] : false; -} -function stringifyNode(node, context) { - if (shared.isString(node)) { - return node; - } - if (shared.isSymbol(node)) { - return ``; - } - switch (node.type) { - case 1: - return stringifyElement(node, context); - case 2: - return shared.escapeHtml(node.content); - case 3: - return `<!--${shared.escapeHtml(node.content)}-->`; - case 5: - return shared.escapeHtml(shared.toDisplayString(evaluateConstant(node.content))); - case 8: - return shared.escapeHtml(evaluateConstant(node)); - case 12: - return stringifyNode(node.content, context); - default: - return ""; - } -} -function stringifyElement(node, context) { - let res = `<${node.tag}`; - let innerHTML = ""; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - res += ` ${p.name}`; - if (p.value) { - res += `="${shared.escapeHtml(p.value.content)}"`; - } - } else if (p.type === 7) { - if (p.name === "bind") { - const exp = p.exp; - if (exp.content[0] === "_") { - res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`; - continue; - } - if (shared.isBooleanAttr(p.arg.content) && exp.content === "false") { - continue; - } - let evaluated = evaluateConstant(exp); - if (evaluated != null) { - const arg = p.arg && p.arg.content; - if (arg === "class") { - evaluated = shared.normalizeClass(evaluated); - } else if (arg === "style") { - evaluated = shared.stringifyStyle(shared.normalizeStyle(evaluated)); - } - res += ` ${p.arg.content}="${shared.escapeHtml( - evaluated - )}"`; - } - } else if (p.name === "html") { - innerHTML = evaluateConstant(p.exp); - } else if (p.name === "text") { - innerHTML = shared.escapeHtml( - shared.toDisplayString(evaluateConstant(p.exp)) - ); - } - } - } - if (context.scopeId) { - res += ` ${context.scopeId}`; - } - res += `>`; - if (innerHTML) { - res += innerHTML; - } else { - for (let i = 0; i < node.children.length; i++) { - res += stringifyNode(node.children[i], context); - } - } - if (!shared.isVoidTag(node.tag)) { - res += `</${node.tag}>`; - } - return res; -} -function evaluateConstant(exp) { - if (exp.type === 4) { - return new Function(`return (${exp.content})`)(); - } else { - let res = ``; - exp.children.forEach((c) => { - if (shared.isString(c) || shared.isSymbol(c)) { - return; - } - if (c.type === 2) { - res += c.content; - } else if (c.type === 5) { - res += shared.toDisplayString(evaluateConstant(c.content)); - } else { - res += evaluateConstant(c); - } - }); - return res; - } -} - -const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { - context.removeNode(); - } -}; - -const DOMNodeTransforms = [ - transformStyle, - ...[] -]; -const DOMDirectiveTransforms = { - cloak: compilerCore.noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel, - // override compiler-core - on: transformOn, - // override compiler-core - show: transformShow -}; -function compile(src, options = {}) { - return compilerCore.baseCompile( - src, - shared.extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...options.nodeTransforms || [] - ], - directiveTransforms: shared.extend( - {}, - DOMDirectiveTransforms, - options.directiveTransforms || {} - ), - transformHoist: stringifyStatic - }) - ); -} -function parse(template, options = {}) { - return compilerCore.baseParse(template, shared.extend({}, parserOptions, options)); -} - -exports.DOMDirectiveTransforms = DOMDirectiveTransforms; -exports.DOMErrorCodes = DOMErrorCodes; -exports.DOMErrorMessages = DOMErrorMessages; -exports.DOMNodeTransforms = DOMNodeTransforms; -exports.TRANSITION = TRANSITION; -exports.TRANSITION_GROUP = TRANSITION_GROUP; -exports.V_MODEL_CHECKBOX = V_MODEL_CHECKBOX; -exports.V_MODEL_DYNAMIC = V_MODEL_DYNAMIC; -exports.V_MODEL_RADIO = V_MODEL_RADIO; -exports.V_MODEL_SELECT = V_MODEL_SELECT; -exports.V_MODEL_TEXT = V_MODEL_TEXT; -exports.V_ON_WITH_KEYS = V_ON_WITH_KEYS; -exports.V_ON_WITH_MODIFIERS = V_ON_WITH_MODIFIERS; -exports.V_SHOW = V_SHOW; -exports.compile = compile; -exports.createDOMCompilerError = createDOMCompilerError; -exports.parse = parse; -exports.parserOptions = parserOptions; -exports.transformStyle = transformStyle; -Object.keys(compilerCore).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = compilerCore[k]; -}); diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts b/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts deleted file mode 100644 index b631ed8..0000000 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { ParserOptions, NodeTransform, SourceLocation, CompilerError, DirectiveTransform, RootNode, CompilerOptions, CodegenResult } from '@vue/compiler-core'; -export * from '@vue/compiler-core'; - -export declare const parserOptions: ParserOptions; - -export declare const V_MODEL_RADIO: unique symbol; -export declare const V_MODEL_CHECKBOX: unique symbol; -export declare const V_MODEL_TEXT: unique symbol; -export declare const V_MODEL_SELECT: unique symbol; -export declare const V_MODEL_DYNAMIC: unique symbol; -export declare const V_ON_WITH_MODIFIERS: unique symbol; -export declare const V_ON_WITH_KEYS: unique symbol; -export declare const V_SHOW: unique symbol; -export declare const TRANSITION: unique symbol; -export declare const TRANSITION_GROUP: unique symbol; - -export declare const transformStyle: NodeTransform; - -interface DOMCompilerError extends CompilerError { - code: DOMErrorCodes; -} -export declare function createDOMCompilerError(code: DOMErrorCodes, loc?: SourceLocation): DOMCompilerError; -export declare enum DOMErrorCodes { - X_V_HTML_NO_EXPRESSION = 53, - X_V_HTML_WITH_CHILDREN = 54, - X_V_TEXT_NO_EXPRESSION = 55, - X_V_TEXT_WITH_CHILDREN = 56, - X_V_MODEL_ON_INVALID_ELEMENT = 57, - X_V_MODEL_ARG_ON_ELEMENT = 58, - X_V_MODEL_ON_FILE_INPUT_ELEMENT = 59, - X_V_MODEL_UNNECESSARY_VALUE = 60, - X_V_SHOW_NO_EXPRESSION = 61, - X_TRANSITION_INVALID_CHILDREN = 62, - X_IGNORED_SIDE_EFFECT_TAG = 63, - __EXTEND_POINT__ = 64 -} -export declare const DOMErrorMessages: { - [code: number]: string; -}; - -export declare const DOMNodeTransforms: NodeTransform[]; -export declare const DOMDirectiveTransforms: Record<string, DirectiveTransform>; -export declare function compile(src: string | RootNode, options?: CompilerOptions): CodegenResult; -export declare function parse(template: string, options?: ParserOptions): RootNode; - diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js deleted file mode 100644 index bd01668..0000000 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +++ /dev/null @@ -1,6597 +0,0 @@ -/** -* @vue/compiler-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function makeMap(str) { - const map = /* @__PURE__ */ Object.create(null); - for (const key of str.split(",")) map[key] = 1; - return (val) => val in map; -} - -const EMPTY_OBJ = Object.freeze({}) ; -const NOOP = () => { -}; -const NO = () => false; -const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter -(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); -const extend = Object.assign; -const isArray = Array.isArray; -const isString = (val) => typeof val === "string"; -const isSymbol = (val) => typeof val === "symbol"; -const isObject = (val) => val !== null && typeof val === "object"; -const isReservedProp = /* @__PURE__ */ makeMap( - // the leading comma is intentional so empty string "" is also included - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" -); -const isBuiltInDirective = /* @__PURE__ */ makeMap( - "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" -); -const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -const camelizeRE = /-(\w)/g; -const camelize = cacheStringFunction( - (str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); - } -); -const capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); -}); -const toHandlerKey = cacheStringFunction( - (str) => { - const s = str ? `on${capitalize(str)}` : ``; - return s; - } -); - -const PatchFlagNames = { - [1]: `TEXT`, - [2]: `CLASS`, - [4]: `STYLE`, - [8]: `PROPS`, - [16]: `FULL_PROPS`, - [32]: `NEED_HYDRATION`, - [64]: `STABLE_FRAGMENT`, - [128]: `KEYED_FRAGMENT`, - [256]: `UNKEYED_FRAGMENT`, - [512]: `NEED_PATCH`, - [1024]: `DYNAMIC_SLOTS`, - [2048]: `DEV_ROOT_FRAGMENT`, - [-1]: `HOISTED`, - [-2]: `BAIL` -}; - -const slotFlagsText = { - [1]: "STABLE", - [2]: "DYNAMIC", - [3]: "FORWARDED" -}; - -const range = 2; -function generateCodeFrame(source, start = 0, end = source.length) { - start = Math.max(0, Math.min(start, source.length)); - end = Math.max(0, Math.min(end, source.length)); - if (start > end) return ""; - let lines = source.split(/(\r?\n)/); - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) continue; - const line = j + 1; - res.push( - `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` - ); - const lineLength = lines[j].length; - const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; - if (j === i) { - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max( - 1, - end > count ? lineLength - pad : end - start - ); - res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); - } else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + "^".repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; - } - } - return res.join("\n"); -} - -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:([^]+)/; -const styleCommentRE = /\/\*[^]*?\*\//g; -function parseStringStyle(cssText) { - const ret = {}; - cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} - -const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; -const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; -const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; -const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; -const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); -const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); -const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); -const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); - -const FRAGMENT = Symbol(`Fragment` ); -const TELEPORT = Symbol(`Teleport` ); -const SUSPENSE = Symbol(`Suspense` ); -const KEEP_ALIVE = Symbol(`KeepAlive` ); -const BASE_TRANSITION = Symbol( - `BaseTransition` -); -const OPEN_BLOCK = Symbol(`openBlock` ); -const CREATE_BLOCK = Symbol(`createBlock` ); -const CREATE_ELEMENT_BLOCK = Symbol( - `createElementBlock` -); -const CREATE_VNODE = Symbol(`createVNode` ); -const CREATE_ELEMENT_VNODE = Symbol( - `createElementVNode` -); -const CREATE_COMMENT = Symbol( - `createCommentVNode` -); -const CREATE_TEXT = Symbol( - `createTextVNode` -); -const CREATE_STATIC = Symbol( - `createStaticVNode` -); -const RESOLVE_COMPONENT = Symbol( - `resolveComponent` -); -const RESOLVE_DYNAMIC_COMPONENT = Symbol( - `resolveDynamicComponent` -); -const RESOLVE_DIRECTIVE = Symbol( - `resolveDirective` -); -const RESOLVE_FILTER = Symbol( - `resolveFilter` -); -const WITH_DIRECTIVES = Symbol( - `withDirectives` -); -const RENDER_LIST = Symbol(`renderList` ); -const RENDER_SLOT = Symbol(`renderSlot` ); -const CREATE_SLOTS = Symbol(`createSlots` ); -const TO_DISPLAY_STRING = Symbol( - `toDisplayString` -); -const MERGE_PROPS = Symbol(`mergeProps` ); -const NORMALIZE_CLASS = Symbol( - `normalizeClass` -); -const NORMALIZE_STYLE = Symbol( - `normalizeStyle` -); -const NORMALIZE_PROPS = Symbol( - `normalizeProps` -); -const GUARD_REACTIVE_PROPS = Symbol( - `guardReactiveProps` -); -const TO_HANDLERS = Symbol(`toHandlers` ); -const CAMELIZE = Symbol(`camelize` ); -const CAPITALIZE = Symbol(`capitalize` ); -const TO_HANDLER_KEY = Symbol( - `toHandlerKey` -); -const SET_BLOCK_TRACKING = Symbol( - `setBlockTracking` -); -const PUSH_SCOPE_ID = Symbol(`pushScopeId` ); -const POP_SCOPE_ID = Symbol(`popScopeId` ); -const WITH_CTX = Symbol(`withCtx` ); -const UNREF = Symbol(`unref` ); -const IS_REF = Symbol(`isRef` ); -const WITH_MEMO = Symbol(`withMemo` ); -const IS_MEMO_SAME = Symbol(`isMemoSame` ); -const helperNameMap = { - [FRAGMENT]: `Fragment`, - [TELEPORT]: `Teleport`, - [SUSPENSE]: `Suspense`, - [KEEP_ALIVE]: `KeepAlive`, - [BASE_TRANSITION]: `BaseTransition`, - [OPEN_BLOCK]: `openBlock`, - [CREATE_BLOCK]: `createBlock`, - [CREATE_ELEMENT_BLOCK]: `createElementBlock`, - [CREATE_VNODE]: `createVNode`, - [CREATE_ELEMENT_VNODE]: `createElementVNode`, - [CREATE_COMMENT]: `createCommentVNode`, - [CREATE_TEXT]: `createTextVNode`, - [CREATE_STATIC]: `createStaticVNode`, - [RESOLVE_COMPONENT]: `resolveComponent`, - [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, - [RESOLVE_DIRECTIVE]: `resolveDirective`, - [RESOLVE_FILTER]: `resolveFilter`, - [WITH_DIRECTIVES]: `withDirectives`, - [RENDER_LIST]: `renderList`, - [RENDER_SLOT]: `renderSlot`, - [CREATE_SLOTS]: `createSlots`, - [TO_DISPLAY_STRING]: `toDisplayString`, - [MERGE_PROPS]: `mergeProps`, - [NORMALIZE_CLASS]: `normalizeClass`, - [NORMALIZE_STYLE]: `normalizeStyle`, - [NORMALIZE_PROPS]: `normalizeProps`, - [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, - [TO_HANDLERS]: `toHandlers`, - [CAMELIZE]: `camelize`, - [CAPITALIZE]: `capitalize`, - [TO_HANDLER_KEY]: `toHandlerKey`, - [SET_BLOCK_TRACKING]: `setBlockTracking`, - [PUSH_SCOPE_ID]: `pushScopeId`, - [POP_SCOPE_ID]: `popScopeId`, - [WITH_CTX]: `withCtx`, - [UNREF]: `unref`, - [IS_REF]: `isRef`, - [WITH_MEMO]: `withMemo`, - [IS_MEMO_SAME]: `isMemoSame` -}; -function registerRuntimeHelpers(helpers) { - Object.getOwnPropertySymbols(helpers).forEach((s) => { - helperNameMap[s] = helpers[s]; - }); -} - -const Namespaces = { - "HTML": 0, - "0": "HTML", - "SVG": 1, - "1": "SVG", - "MATH_ML": 2, - "2": "MATH_ML" -}; -const NodeTypes = { - "ROOT": 0, - "0": "ROOT", - "ELEMENT": 1, - "1": "ELEMENT", - "TEXT": 2, - "2": "TEXT", - "COMMENT": 3, - "3": "COMMENT", - "SIMPLE_EXPRESSION": 4, - "4": "SIMPLE_EXPRESSION", - "INTERPOLATION": 5, - "5": "INTERPOLATION", - "ATTRIBUTE": 6, - "6": "ATTRIBUTE", - "DIRECTIVE": 7, - "7": "DIRECTIVE", - "COMPOUND_EXPRESSION": 8, - "8": "COMPOUND_EXPRESSION", - "IF": 9, - "9": "IF", - "IF_BRANCH": 10, - "10": "IF_BRANCH", - "FOR": 11, - "11": "FOR", - "TEXT_CALL": 12, - "12": "TEXT_CALL", - "VNODE_CALL": 13, - "13": "VNODE_CALL", - "JS_CALL_EXPRESSION": 14, - "14": "JS_CALL_EXPRESSION", - "JS_OBJECT_EXPRESSION": 15, - "15": "JS_OBJECT_EXPRESSION", - "JS_PROPERTY": 16, - "16": "JS_PROPERTY", - "JS_ARRAY_EXPRESSION": 17, - "17": "JS_ARRAY_EXPRESSION", - "JS_FUNCTION_EXPRESSION": 18, - "18": "JS_FUNCTION_EXPRESSION", - "JS_CONDITIONAL_EXPRESSION": 19, - "19": "JS_CONDITIONAL_EXPRESSION", - "JS_CACHE_EXPRESSION": 20, - "20": "JS_CACHE_EXPRESSION", - "JS_BLOCK_STATEMENT": 21, - "21": "JS_BLOCK_STATEMENT", - "JS_TEMPLATE_LITERAL": 22, - "22": "JS_TEMPLATE_LITERAL", - "JS_IF_STATEMENT": 23, - "23": "JS_IF_STATEMENT", - "JS_ASSIGNMENT_EXPRESSION": 24, - "24": "JS_ASSIGNMENT_EXPRESSION", - "JS_SEQUENCE_EXPRESSION": 25, - "25": "JS_SEQUENCE_EXPRESSION", - "JS_RETURN_STATEMENT": 26, - "26": "JS_RETURN_STATEMENT" -}; -const ElementTypes = { - "ELEMENT": 0, - "0": "ELEMENT", - "COMPONENT": 1, - "1": "COMPONENT", - "SLOT": 2, - "2": "SLOT", - "TEMPLATE": 3, - "3": "TEMPLATE" -}; -const ConstantTypes = { - "NOT_CONSTANT": 0, - "0": "NOT_CONSTANT", - "CAN_SKIP_PATCH": 1, - "1": "CAN_SKIP_PATCH", - "CAN_CACHE": 2, - "2": "CAN_CACHE", - "CAN_STRINGIFY": 3, - "3": "CAN_STRINGIFY" -}; -const locStub = { - start: { line: 1, column: 1, offset: 0 }, - end: { line: 1, column: 1, offset: 0 }, - source: "" -}; -function createRoot(children, source = "") { - return { - type: 0, - source, - children, - helpers: /* @__PURE__ */ new Set(), - components: [], - directives: [], - hoists: [], - imports: [], - cached: [], - temps: 0, - codegenNode: void 0, - loc: locStub - }; -} -function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { - if (context) { - if (isBlock) { - context.helper(OPEN_BLOCK); - context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); - } else { - context.helper(getVNodeHelper(context.inSSR, isComponent)); - } - if (directives) { - context.helper(WITH_DIRECTIVES); - } - } - return { - type: 13, - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent, - loc - }; -} -function createArrayExpression(elements, loc = locStub) { - return { - type: 17, - loc, - elements - }; -} -function createObjectExpression(properties, loc = locStub) { - return { - type: 15, - loc, - properties - }; -} -function createObjectProperty(key, value) { - return { - type: 16, - loc: locStub, - key: isString(key) ? createSimpleExpression(key, true) : key, - value - }; -} -function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { - return { - type: 4, - loc, - content, - isStatic, - constType: isStatic ? 3 : constType - }; -} -function createInterpolation(content, loc) { - return { - type: 5, - loc, - content: isString(content) ? createSimpleExpression(content, false, loc) : content - }; -} -function createCompoundExpression(children, loc = locStub) { - return { - type: 8, - loc, - children - }; -} -function createCallExpression(callee, args = [], loc = locStub) { - return { - type: 14, - loc, - callee, - arguments: args - }; -} -function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { - return { - type: 18, - params, - returns, - newline, - isSlot, - loc - }; -} -function createConditionalExpression(test, consequent, alternate, newline = true) { - return { - type: 19, - test, - consequent, - alternate, - newline, - loc: locStub - }; -} -function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) { - return { - type: 20, - index, - value, - needPauseTracking, - inVOnce, - needArraySpread: false, - loc: locStub - }; -} -function createBlockStatement(body) { - return { - type: 21, - body, - loc: locStub - }; -} -function createTemplateLiteral(elements) { - return { - type: 22, - elements, - loc: locStub - }; -} -function createIfStatement(test, consequent, alternate) { - return { - type: 23, - test, - consequent, - alternate, - loc: locStub - }; -} -function createAssignmentExpression(left, right) { - return { - type: 24, - left, - right, - loc: locStub - }; -} -function createSequenceExpression(expressions) { - return { - type: 25, - expressions, - loc: locStub - }; -} -function createReturnStatement(returns) { - return { - type: 26, - returns, - loc: locStub - }; -} -function getVNodeHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; -} -function getVNodeBlockHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; -} -function convertToBlock(node, { helper, removeHelper, inSSR }) { - if (!node.isBlock) { - node.isBlock = true; - removeHelper(getVNodeHelper(inSSR, node.isComponent)); - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(inSSR, node.isComponent)); - } -} - -const defaultDelimitersOpen = new Uint8Array([123, 123]); -const defaultDelimitersClose = new Uint8Array([125, 125]); -function isTagStartChar(c) { - return c >= 97 && c <= 122 || c >= 65 && c <= 90; -} -function isWhitespace(c) { - return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; -} -function isEndOfTagSection(c) { - return c === 47 || c === 62 || isWhitespace(c); -} -function toCharCodes(str) { - const ret = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) { - ret[i] = str.charCodeAt(i); - } - return ret; -} -const Sequences = { - Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), - // CDATA[ - CdataEnd: new Uint8Array([93, 93, 62]), - // ]]> - CommentEnd: new Uint8Array([45, 45, 62]), - // `-->` - ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), - // `<\/script` - StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), - // `</style` - TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), - // `</title` - TextareaEnd: new Uint8Array([ - 60, - 47, - 116, - 101, - 120, - 116, - 97, - 114, - 101, - 97 - ]) - // `</textarea -}; -class Tokenizer { - constructor(stack, cbs) { - this.stack = stack; - this.cbs = cbs; - /** The current state the tokenizer is in. */ - this.state = 1; - /** The read buffer. */ - this.buffer = ""; - /** The beginning of the section that is currently being read. */ - this.sectionStart = 0; - /** The index within the buffer that we are currently looking at. */ - this.index = 0; - /** The start of the last entity. */ - this.entityStart = 0; - /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ - this.baseState = 1; - /** For special parsing behavior inside of script and style tags. */ - this.inRCDATA = false; - /** For disabling RCDATA tags handling */ - this.inXML = false; - /** For disabling interpolation parsing in v-pre */ - this.inVPre = false; - /** Record newline positions for fast line / column calculation */ - this.newlines = []; - this.mode = 0; - this.delimiterOpen = defaultDelimitersOpen; - this.delimiterClose = defaultDelimitersClose; - this.delimiterIndex = -1; - this.currentSequence = void 0; - this.sequenceIndex = 0; - } - get inSFCRoot() { - return this.mode === 2 && this.stack.length === 0; - } - reset() { - this.state = 1; - this.mode = 0; - this.buffer = ""; - this.sectionStart = 0; - this.index = 0; - this.baseState = 1; - this.inRCDATA = false; - this.currentSequence = void 0; - this.newlines.length = 0; - this.delimiterOpen = defaultDelimitersOpen; - this.delimiterClose = defaultDelimitersClose; - } - /** - * Generate Position object with line / column information using recorded - * newline positions. We know the index is always going to be an already - * processed index, so all the newlines up to this index should have been - * recorded. - */ - getPos(index) { - let line = 1; - let column = index + 1; - for (let i = this.newlines.length - 1; i >= 0; i--) { - const newlineIndex = this.newlines[i]; - if (index > newlineIndex) { - line = i + 2; - column = index - newlineIndex; - break; - } - } - return { - column, - line, - offset: index - }; - } - peek() { - return this.buffer.charCodeAt(this.index + 1); - } - stateText(c) { - if (c === 60) { - if (this.index > this.sectionStart) { - this.cbs.ontext(this.sectionStart, this.index); - } - this.state = 5; - this.sectionStart = this.index; - } else if (!this.inVPre && c === this.delimiterOpen[0]) { - this.state = 2; - this.delimiterIndex = 0; - this.stateInterpolationOpen(c); - } - } - stateInterpolationOpen(c) { - if (c === this.delimiterOpen[this.delimiterIndex]) { - if (this.delimiterIndex === this.delimiterOpen.length - 1) { - const start = this.index + 1 - this.delimiterOpen.length; - if (start > this.sectionStart) { - this.cbs.ontext(this.sectionStart, start); - } - this.state = 3; - this.sectionStart = start; - } else { - this.delimiterIndex++; - } - } else if (this.inRCDATA) { - this.state = 32; - this.stateInRCDATA(c); - } else { - this.state = 1; - this.stateText(c); - } - } - stateInterpolation(c) { - if (c === this.delimiterClose[0]) { - this.state = 4; - this.delimiterIndex = 0; - this.stateInterpolationClose(c); - } - } - stateInterpolationClose(c) { - if (c === this.delimiterClose[this.delimiterIndex]) { - if (this.delimiterIndex === this.delimiterClose.length - 1) { - this.cbs.oninterpolation(this.sectionStart, this.index + 1); - if (this.inRCDATA) { - this.state = 32; - } else { - this.state = 1; - } - this.sectionStart = this.index + 1; - } else { - this.delimiterIndex++; - } - } else { - this.state = 3; - this.stateInterpolation(c); - } - } - stateSpecialStartSequence(c) { - const isEnd = this.sequenceIndex === this.currentSequence.length; - const isMatch = isEnd ? ( - // If we are at the end of the sequence, make sure the tag name has ended - isEndOfTagSection(c) - ) : ( - // Otherwise, do a case-insensitive comparison - (c | 32) === this.currentSequence[this.sequenceIndex] - ); - if (!isMatch) { - this.inRCDATA = false; - } else if (!isEnd) { - this.sequenceIndex++; - return; - } - this.sequenceIndex = 0; - this.state = 6; - this.stateInTagName(c); - } - /** Look for an end tag. For <title> and <textarea>, also decode entities. */ - stateInRCDATA(c) { - if (this.sequenceIndex === this.currentSequence.length) { - if (c === 62 || isWhitespace(c)) { - const endOfText = this.index - this.currentSequence.length; - if (this.sectionStart < endOfText) { - const actualIndex = this.index; - this.index = endOfText; - this.cbs.ontext(this.sectionStart, endOfText); - this.index = actualIndex; - } - this.sectionStart = endOfText + 2; - this.stateInClosingTagName(c); - this.inRCDATA = false; - return; - } - this.sequenceIndex = 0; - } - if ((c | 32) === this.currentSequence[this.sequenceIndex]) { - this.sequenceIndex += 1; - } else if (this.sequenceIndex === 0) { - if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { - if (!this.inVPre && c === this.delimiterOpen[0]) { - this.state = 2; - this.delimiterIndex = 0; - this.stateInterpolationOpen(c); - } - } else if (this.fastForwardTo(60)) { - this.sequenceIndex = 1; - } - } else { - this.sequenceIndex = Number(c === 60); - } - } - stateCDATASequence(c) { - if (c === Sequences.Cdata[this.sequenceIndex]) { - if (++this.sequenceIndex === Sequences.Cdata.length) { - this.state = 28; - this.currentSequence = Sequences.CdataEnd; - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - } - } else { - this.sequenceIndex = 0; - this.state = 23; - this.stateInDeclaration(c); - } - } - /** - * When we wait for one specific character, we can speed things up - * by skipping through the buffer until we find it. - * - * @returns Whether the character was found. - */ - fastForwardTo(c) { - while (++this.index < this.buffer.length) { - const cc = this.buffer.charCodeAt(this.index); - if (cc === 10) { - this.newlines.push(this.index); - } - if (cc === c) { - return true; - } - } - this.index = this.buffer.length - 1; - return false; - } - /** - * Comments and CDATA end with `-->` and `]]>`. - * - * Their common qualities are: - * - Their end sequences have a distinct character they start with. - * - That character is then repeated, so we have to check multiple repeats. - * - All characters but the start character of the sequence can be skipped. - */ - stateInCommentLike(c) { - if (c === this.currentSequence[this.sequenceIndex]) { - if (++this.sequenceIndex === this.currentSequence.length) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, this.index - 2); - } else { - this.cbs.oncomment(this.sectionStart, this.index - 2); - } - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - this.state = 1; - } - } else if (this.sequenceIndex === 0) { - if (this.fastForwardTo(this.currentSequence[0])) { - this.sequenceIndex = 1; - } - } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { - this.sequenceIndex = 0; - } - } - startSpecial(sequence, offset) { - this.enterRCDATA(sequence, offset); - this.state = 31; - } - enterRCDATA(sequence, offset) { - this.inRCDATA = true; - this.currentSequence = sequence; - this.sequenceIndex = offset; - } - stateBeforeTagName(c) { - if (c === 33) { - this.state = 22; - this.sectionStart = this.index + 1; - } else if (c === 63) { - this.state = 24; - this.sectionStart = this.index + 1; - } else if (isTagStartChar(c)) { - this.sectionStart = this.index; - if (this.mode === 0) { - this.state = 6; - } else if (this.inSFCRoot) { - this.state = 34; - } else if (!this.inXML) { - if (c === 116) { - this.state = 30; - } else { - this.state = c === 115 ? 29 : 6; - } - } else { - this.state = 6; - } - } else if (c === 47) { - this.state = 8; - } else { - this.state = 1; - this.stateText(c); - } - } - stateInTagName(c) { - if (isEndOfTagSection(c)) { - this.handleTagName(c); - } - } - stateInSFCRootTagName(c) { - if (isEndOfTagSection(c)) { - const tag = this.buffer.slice(this.sectionStart, this.index); - if (tag !== "template") { - this.enterRCDATA(toCharCodes(`</` + tag), 0); - } - this.handleTagName(c); - } - } - handleTagName(c) { - this.cbs.onopentagname(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = 11; - this.stateBeforeAttrName(c); - } - stateBeforeClosingTagName(c) { - if (isWhitespace(c)) ; else if (c === 62) { - { - this.cbs.onerr(14, this.index); - } - this.state = 1; - this.sectionStart = this.index + 1; - } else { - this.state = isTagStartChar(c) ? 9 : 27; - this.sectionStart = this.index; - } - } - stateInClosingTagName(c) { - if (c === 62 || isWhitespace(c)) { - this.cbs.onclosetag(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = 10; - this.stateAfterClosingTagName(c); - } - } - stateAfterClosingTagName(c) { - if (c === 62) { - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeAttrName(c) { - if (c === 62) { - this.cbs.onopentagend(this.index); - if (this.inRCDATA) { - this.state = 32; - } else { - this.state = 1; - } - this.sectionStart = this.index + 1; - } else if (c === 47) { - this.state = 7; - if (this.peek() !== 62) { - this.cbs.onerr(22, this.index); - } - } else if (c === 60 && this.peek() === 47) { - this.cbs.onopentagend(this.index); - this.state = 5; - this.sectionStart = this.index; - } else if (!isWhitespace(c)) { - if (c === 61) { - this.cbs.onerr( - 19, - this.index - ); - } - this.handleAttrStart(c); - } - } - handleAttrStart(c) { - if (c === 118 && this.peek() === 45) { - this.state = 13; - this.sectionStart = this.index; - } else if (c === 46 || c === 58 || c === 64 || c === 35) { - this.cbs.ondirname(this.index, this.index + 1); - this.state = 14; - this.sectionStart = this.index + 1; - } else { - this.state = 12; - this.sectionStart = this.index; - } - } - stateInSelfClosingTag(c) { - if (c === 62) { - this.cbs.onselfclosingtag(this.index); - this.state = 1; - this.sectionStart = this.index + 1; - this.inRCDATA = false; - } else if (!isWhitespace(c)) { - this.state = 11; - this.stateBeforeAttrName(c); - } - } - stateInAttrName(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.onattribname(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 34 || c === 39 || c === 60) { - this.cbs.onerr( - 17, - this.index - ); - } - } - stateInDirName(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirname(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 58) { - this.cbs.ondirname(this.sectionStart, this.index); - this.state = 14; - this.sectionStart = this.index + 1; - } else if (c === 46) { - this.cbs.ondirname(this.sectionStart, this.index); - this.state = 16; - this.sectionStart = this.index + 1; - } - } - stateInDirArg(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirarg(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 91) { - this.state = 15; - } else if (c === 46) { - this.cbs.ondirarg(this.sectionStart, this.index); - this.state = 16; - this.sectionStart = this.index + 1; - } - } - stateInDynamicDirArg(c) { - if (c === 93) { - this.state = 14; - } else if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirarg(this.sectionStart, this.index + 1); - this.handleAttrNameEnd(c); - { - this.cbs.onerr( - 27, - this.index - ); - } - } - } - stateInDirModifier(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirmodifier(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 46) { - this.cbs.ondirmodifier(this.sectionStart, this.index); - this.sectionStart = this.index + 1; - } - } - handleAttrNameEnd(c) { - this.sectionStart = this.index; - this.state = 17; - this.cbs.onattribnameend(this.index); - this.stateAfterAttrName(c); - } - stateAfterAttrName(c) { - if (c === 61) { - this.state = 18; - } else if (c === 47 || c === 62) { - this.cbs.onattribend(0, this.sectionStart); - this.sectionStart = -1; - this.state = 11; - this.stateBeforeAttrName(c); - } else if (!isWhitespace(c)) { - this.cbs.onattribend(0, this.sectionStart); - this.handleAttrStart(c); - } - } - stateBeforeAttrValue(c) { - if (c === 34) { - this.state = 19; - this.sectionStart = this.index + 1; - } else if (c === 39) { - this.state = 20; - this.sectionStart = this.index + 1; - } else if (!isWhitespace(c)) { - this.sectionStart = this.index; - this.state = 21; - this.stateInAttrValueNoQuotes(c); - } - } - handleInAttrValue(c, quote) { - if (c === quote || this.fastForwardTo(quote)) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend( - quote === 34 ? 3 : 2, - this.index + 1 - ); - this.state = 11; - } - } - stateInAttrValueDoubleQuotes(c) { - this.handleInAttrValue(c, 34); - } - stateInAttrValueSingleQuotes(c) { - this.handleInAttrValue(c, 39); - } - stateInAttrValueNoQuotes(c) { - if (isWhitespace(c) || c === 62) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend(1, this.index); - this.state = 11; - this.stateBeforeAttrName(c); - } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { - this.cbs.onerr( - 18, - this.index - ); - } else ; - } - stateBeforeDeclaration(c) { - if (c === 91) { - this.state = 26; - this.sequenceIndex = 0; - } else { - this.state = c === 45 ? 25 : 23; - } - } - stateInDeclaration(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateInProcessingInstruction(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.cbs.onprocessinginstruction(this.sectionStart, this.index); - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeComment(c) { - if (c === 45) { - this.state = 28; - this.currentSequence = Sequences.CommentEnd; - this.sequenceIndex = 2; - this.sectionStart = this.index + 1; - } else { - this.state = 23; - } - } - stateInSpecialComment(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.cbs.oncomment(this.sectionStart, this.index); - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeSpecialS(c) { - if (c === Sequences.ScriptEnd[3]) { - this.startSpecial(Sequences.ScriptEnd, 4); - } else if (c === Sequences.StyleEnd[3]) { - this.startSpecial(Sequences.StyleEnd, 4); - } else { - this.state = 6; - this.stateInTagName(c); - } - } - stateBeforeSpecialT(c) { - if (c === Sequences.TitleEnd[3]) { - this.startSpecial(Sequences.TitleEnd, 4); - } else if (c === Sequences.TextareaEnd[3]) { - this.startSpecial(Sequences.TextareaEnd, 4); - } else { - this.state = 6; - this.stateInTagName(c); - } - } - startEntity() { - } - stateInEntity() { - } - /** - * Iterates through the buffer, calling the function corresponding to the current state. - * - * States that are more likely to be hit are higher up, as a performance improvement. - */ - parse(input) { - this.buffer = input; - while (this.index < this.buffer.length) { - const c = this.buffer.charCodeAt(this.index); - if (c === 10) { - this.newlines.push(this.index); - } - switch (this.state) { - case 1: { - this.stateText(c); - break; - } - case 2: { - this.stateInterpolationOpen(c); - break; - } - case 3: { - this.stateInterpolation(c); - break; - } - case 4: { - this.stateInterpolationClose(c); - break; - } - case 31: { - this.stateSpecialStartSequence(c); - break; - } - case 32: { - this.stateInRCDATA(c); - break; - } - case 26: { - this.stateCDATASequence(c); - break; - } - case 19: { - this.stateInAttrValueDoubleQuotes(c); - break; - } - case 12: { - this.stateInAttrName(c); - break; - } - case 13: { - this.stateInDirName(c); - break; - } - case 14: { - this.stateInDirArg(c); - break; - } - case 15: { - this.stateInDynamicDirArg(c); - break; - } - case 16: { - this.stateInDirModifier(c); - break; - } - case 28: { - this.stateInCommentLike(c); - break; - } - case 27: { - this.stateInSpecialComment(c); - break; - } - case 11: { - this.stateBeforeAttrName(c); - break; - } - case 6: { - this.stateInTagName(c); - break; - } - case 34: { - this.stateInSFCRootTagName(c); - break; - } - case 9: { - this.stateInClosingTagName(c); - break; - } - case 5: { - this.stateBeforeTagName(c); - break; - } - case 17: { - this.stateAfterAttrName(c); - break; - } - case 20: { - this.stateInAttrValueSingleQuotes(c); - break; - } - case 18: { - this.stateBeforeAttrValue(c); - break; - } - case 8: { - this.stateBeforeClosingTagName(c); - break; - } - case 10: { - this.stateAfterClosingTagName(c); - break; - } - case 29: { - this.stateBeforeSpecialS(c); - break; - } - case 30: { - this.stateBeforeSpecialT(c); - break; - } - case 21: { - this.stateInAttrValueNoQuotes(c); - break; - } - case 7: { - this.stateInSelfClosingTag(c); - break; - } - case 23: { - this.stateInDeclaration(c); - break; - } - case 22: { - this.stateBeforeDeclaration(c); - break; - } - case 25: { - this.stateBeforeComment(c); - break; - } - case 24: { - this.stateInProcessingInstruction(c); - break; - } - case 33: { - this.stateInEntity(); - break; - } - } - this.index++; - } - this.cleanup(); - this.finish(); - } - /** - * Remove data that has already been consumed from the buffer. - */ - cleanup() { - if (this.sectionStart !== this.index) { - if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { - this.cbs.ontext(this.sectionStart, this.index); - this.sectionStart = this.index; - } else if (this.state === 19 || this.state === 20 || this.state === 21) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = this.index; - } - } - } - finish() { - this.handleTrailingData(); - this.cbs.onend(); - } - /** Handle any trailing data. */ - handleTrailingData() { - const endIndex = this.buffer.length; - if (this.sectionStart >= endIndex) { - return; - } - if (this.state === 28) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, endIndex); - } else { - this.cbs.oncomment(this.sectionStart, endIndex); - } - } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { - this.cbs.ontext(this.sectionStart, endIndex); - } - } - emitCodePoint(cp, consumed) { - } -} - -const CompilerDeprecationTypes = { - "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", - "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", - "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", - "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", - "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", - "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", - "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", - "COMPILER_FILTERS": "COMPILER_FILTERS" -}; -const deprecationData = { - ["COMPILER_IS_ON_ELEMENT"]: { - message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC"]: { - message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_OBJECT_ORDER"]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE"]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { - message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE"]: { - message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE"]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTERS"]: { - message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } -}; -function getCompatValue(key, { compatConfig }) { - const value = compatConfig && compatConfig[key]; - if (key === "MODE") { - return value || 3; - } else { - return value; - } -} -function isCompatEnabled(key, context) { - const mode = getCompatValue("MODE", context); - const value = getCompatValue(key, context); - return mode === 3 ? value === true : value !== false; -} -function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - if (enabled) { - warnDeprecation(key, context, loc, ...args); - } - return enabled; -} -function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === "suppress-warning") { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` - Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) err.loc = loc; - context.onWarn(err); -} - -function defaultOnError(error) { - throw error; -} -function defaultOnWarn(msg) { - console.warn(`[Vue warn] ${msg.message}`); -} -function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; -} -const ErrorCodes = { - "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, - "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", - "CDATA_IN_HTML_CONTENT": 1, - "1": "CDATA_IN_HTML_CONTENT", - "DUPLICATE_ATTRIBUTE": 2, - "2": "DUPLICATE_ATTRIBUTE", - "END_TAG_WITH_ATTRIBUTES": 3, - "3": "END_TAG_WITH_ATTRIBUTES", - "END_TAG_WITH_TRAILING_SOLIDUS": 4, - "4": "END_TAG_WITH_TRAILING_SOLIDUS", - "EOF_BEFORE_TAG_NAME": 5, - "5": "EOF_BEFORE_TAG_NAME", - "EOF_IN_CDATA": 6, - "6": "EOF_IN_CDATA", - "EOF_IN_COMMENT": 7, - "7": "EOF_IN_COMMENT", - "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, - "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", - "EOF_IN_TAG": 9, - "9": "EOF_IN_TAG", - "INCORRECTLY_CLOSED_COMMENT": 10, - "10": "INCORRECTLY_CLOSED_COMMENT", - "INCORRECTLY_OPENED_COMMENT": 11, - "11": "INCORRECTLY_OPENED_COMMENT", - "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, - "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", - "MISSING_ATTRIBUTE_VALUE": 13, - "13": "MISSING_ATTRIBUTE_VALUE", - "MISSING_END_TAG_NAME": 14, - "14": "MISSING_END_TAG_NAME", - "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, - "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", - "NESTED_COMMENT": 16, - "16": "NESTED_COMMENT", - "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, - "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", - "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, - "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", - "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, - "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", - "UNEXPECTED_NULL_CHARACTER": 20, - "20": "UNEXPECTED_NULL_CHARACTER", - "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, - "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", - "UNEXPECTED_SOLIDUS_IN_TAG": 22, - "22": "UNEXPECTED_SOLIDUS_IN_TAG", - "X_INVALID_END_TAG": 23, - "23": "X_INVALID_END_TAG", - "X_MISSING_END_TAG": 24, - "24": "X_MISSING_END_TAG", - "X_MISSING_INTERPOLATION_END": 25, - "25": "X_MISSING_INTERPOLATION_END", - "X_MISSING_DIRECTIVE_NAME": 26, - "26": "X_MISSING_DIRECTIVE_NAME", - "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, - "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", - "X_V_IF_NO_EXPRESSION": 28, - "28": "X_V_IF_NO_EXPRESSION", - "X_V_IF_SAME_KEY": 29, - "29": "X_V_IF_SAME_KEY", - "X_V_ELSE_NO_ADJACENT_IF": 30, - "30": "X_V_ELSE_NO_ADJACENT_IF", - "X_V_FOR_NO_EXPRESSION": 31, - "31": "X_V_FOR_NO_EXPRESSION", - "X_V_FOR_MALFORMED_EXPRESSION": 32, - "32": "X_V_FOR_MALFORMED_EXPRESSION", - "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, - "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", - "X_V_BIND_NO_EXPRESSION": 34, - "34": "X_V_BIND_NO_EXPRESSION", - "X_V_ON_NO_EXPRESSION": 35, - "35": "X_V_ON_NO_EXPRESSION", - "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, - "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", - "X_V_SLOT_MIXED_SLOT_USAGE": 37, - "37": "X_V_SLOT_MIXED_SLOT_USAGE", - "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, - "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", - "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, - "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", - "X_V_SLOT_MISPLACED": 40, - "40": "X_V_SLOT_MISPLACED", - "X_V_MODEL_NO_EXPRESSION": 41, - "41": "X_V_MODEL_NO_EXPRESSION", - "X_V_MODEL_MALFORMED_EXPRESSION": 42, - "42": "X_V_MODEL_MALFORMED_EXPRESSION", - "X_V_MODEL_ON_SCOPE_VARIABLE": 43, - "43": "X_V_MODEL_ON_SCOPE_VARIABLE", - "X_V_MODEL_ON_PROPS": 44, - "44": "X_V_MODEL_ON_PROPS", - "X_INVALID_EXPRESSION": 45, - "45": "X_INVALID_EXPRESSION", - "X_KEEP_ALIVE_INVALID_CHILDREN": 46, - "46": "X_KEEP_ALIVE_INVALID_CHILDREN", - "X_PREFIX_ID_NOT_SUPPORTED": 47, - "47": "X_PREFIX_ID_NOT_SUPPORTED", - "X_MODULE_MODE_NOT_SUPPORTED": 48, - "48": "X_MODULE_MODE_NOT_SUPPORTED", - "X_CACHE_HANDLER_NOT_SUPPORTED": 49, - "49": "X_CACHE_HANDLER_NOT_SUPPORTED", - "X_SCOPE_ID_NOT_SUPPORTED": 50, - "50": "X_SCOPE_ID_NOT_SUPPORTED", - "X_VNODE_HOOKS": 51, - "51": "X_VNODE_HOOKS", - "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52, - "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", - "__EXTEND_POINT__": 53, - "53": "__EXTEND_POINT__" -}; -const errorMessages = { - // parse errors - [0]: "Illegal comment.", - [1]: "CDATA section is allowed only in XML context.", - [2]: "Duplicate attribute.", - [3]: "End tag cannot have attributes.", - [4]: "Illegal '/' in tags.", - [5]: "Unexpected EOF in tag.", - [6]: "Unexpected EOF in CDATA section.", - [7]: "Unexpected EOF in comment.", - [8]: "Unexpected EOF in script.", - [9]: "Unexpected EOF in tag.", - [10]: "Incorrectly closed comment.", - [11]: "Incorrectly opened comment.", - [12]: "Illegal tag name. Use '<' to print '<'.", - [13]: "Attribute value was expected.", - [14]: "End tag name was expected.", - [15]: "Whitespace was expected.", - [16]: "Unexpected '<!--' in comment.", - [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, - [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", - [19]: "Attribute name cannot start with '='.", - [21]: "'<?' is allowed only in XML context.", - [20]: `Unexpected null character.`, - [22]: "Illegal '/' in tags.", - // Vue-specific parse errors - [23]: "Invalid end tag.", - [24]: "Element is missing end tag.", - [25]: "Interpolation end sign was not found.", - [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", - [26]: "Legal directive name was expected.", - // transform errors - [28]: `v-if/v-else-if is missing expression.`, - [29]: `v-if/else branches must use unique keys.`, - [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, - [31]: `v-for is missing expression.`, - [32]: `v-for has invalid expression.`, - [33]: `<template v-for> key should be placed on the <template> tag.`, - [34]: `v-bind is missing expression.`, - [52]: `v-bind with same-name shorthand only allows static argument.`, - [35]: `v-on is missing expression.`, - [36]: `Unexpected custom directive on <slot> outlet.`, - [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, - [38]: `Duplicate slot names found. `, - [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, - [40]: `v-slot can only be used on components or <template> tags.`, - [41]: `v-model is missing expression.`, - [42]: `v-model value must be a valid JavaScript member expression.`, - [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, - [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. -Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, - [45]: `Error parsing JavaScript expression: `, - [46]: `<KeepAlive> expects exactly one child component.`, - [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, - // generic errors - [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, - [48]: `ES module mode is not supported in this build of compiler.`, - [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, - [50]: `"scopeId" option is only supported in module mode.`, - // just to fulfill types - [53]: `` -}; - -function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { - { - return; - } -} -function isReferencedIdentifier(id, parent, parentStack) { - { - return false; - } -} -function isInDestructureAssignment(parent, parentStack) { - if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === "AssignmentExpression") { - return true; - } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { - break; - } - } - } - return false; -} -function isInNewExpression(parentStack) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === "NewExpression") { - return true; - } else if (p.type !== "MemberExpression") { - break; - } - } - return false; -} -function walkFunctionParams(node, onIdent) { - for (const p of node.params) { - for (const id of extractIdentifiers(p)) { - onIdent(id); - } - } -} -function walkBlockDeclarations(block, onIdent) { - for (const stmt of block.body) { - if (stmt.type === "VariableDeclaration") { - if (stmt.declare) continue; - for (const decl of stmt.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { - if (stmt.declare || !stmt.id) continue; - onIdent(stmt.id); - } else if (isForStatement(stmt)) { - walkForStatement(stmt, true, onIdent); - } - } -} -function isForStatement(stmt) { - return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement"; -} -function walkForStatement(stmt, isVar, onIdent) { - const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; - if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) { - for (const decl of variable.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } -} -function extractIdentifiers(param, nodes = []) { - switch (param.type) { - case "Identifier": - nodes.push(param); - break; - case "MemberExpression": - let object = param; - while (object.type === "MemberExpression") { - object = object.object; - } - nodes.push(object); - break; - case "ObjectPattern": - for (const prop of param.properties) { - if (prop.type === "RestElement") { - extractIdentifiers(prop.argument, nodes); - } else { - extractIdentifiers(prop.value, nodes); - } - } - break; - case "ArrayPattern": - param.elements.forEach((element) => { - if (element) extractIdentifiers(element, nodes); - }); - break; - case "RestElement": - extractIdentifiers(param.argument, nodes); - break; - case "AssignmentPattern": - extractIdentifiers(param.left, nodes); - break; - } - return nodes; -} -const isFunctionType = (node) => { - return /Function(?:Expression|Declaration)$|Method$/.test(node.type); -}; -const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; -const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; -const TS_NODE_TYPES = [ - "TSAsExpression", - // foo as number - "TSTypeAssertion", - // (<number>foo) - "TSNonNullExpression", - // foo! - "TSInstantiationExpression", - // foo<string> - "TSSatisfiesExpression" - // foo satisfies T -]; -function unwrapTSNode(node) { - if (TS_NODE_TYPES.includes(node.type)) { - return unwrapTSNode(node.expression); - } else { - return node; - } -} - -const isStaticExp = (p) => p.type === 4 && p.isStatic; -function isCoreComponent(tag) { - switch (tag) { - case "Teleport": - case "teleport": - return TELEPORT; - case "Suspense": - case "suspense": - return SUSPENSE; - case "KeepAlive": - case "keep-alive": - return KEEP_ALIVE; - case "BaseTransition": - case "base-transition": - return BASE_TRANSITION; - } -} -const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; -const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); -const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; -const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; -const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; -const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; -const isMemberExpressionBrowser = (exp) => { - const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === "[") { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } else if (char === "(") { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === "`") { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } else if (char === `[`) { - currentOpenBracketCount++; - } else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === "`") { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } else if (char === `(`) { - currentOpenParensCount++; - } else if (char === `)`) { - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; - } - } - return !currentOpenBracketCount && !currentOpenParensCount; -}; -const isMemberExpressionNode = NOOP ; -const isMemberExpression = isMemberExpressionBrowser ; -const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; -const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); -const isFnExpressionNode = NOOP ; -const isFnExpression = isFnExpressionBrowser ; -function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation( - { - offset: pos.offset, - line: pos.line, - column: pos.column - }, - source, - numberOfCharacters - ); -} -function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10) { - linesCount++; - lastNewLinePos = i; - } - } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; - return pos; -} -function assert(condition, msg) { - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } -} -function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { - return p; - } - } -} -function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - if (dynamicOnly) continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { - return p; - } - } -} -function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); -} -function hasDynamicKeyVBind(node) { - return node.props.some( - (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" - p.arg.type !== 4 || // v-bind:[_ctx.foo] - !p.arg.isStatic) - // v-bind:[foo] - ); -} -function isText$1(node) { - return node.type === 5 || node.type === 2; -} -function isVSlot(p) { - return p.type === 7 && p.name === "slot"; -} -function isTemplateNode(node) { - return node.type === 1 && node.tagType === 3; -} -function isSlotOutlet(node) { - return node.type === 1 && node.tagType === 2; -} -const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); -function getUnnormalizedProps(props, callPath = []) { - if (props && !isString(props) && props.type === 14) { - const callee = props.callee; - if (!isString(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps( - props.arguments[0], - callPath.concat(props) - ); - } - } - return [props, callPath]; -} -function injectProp(node, prop, context) { - let propsWithInjection; - let props = node.type === 13 ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && !isString(props) && props.type === 14) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || isString(props)) { - propsWithInjection = createObjectExpression([prop]); - } else if (props.type === 14) { - const first = props.arguments[0]; - if (!isString(first) && first.type === 15) { - if (!hasProp(prop, first)) { - first.properties.unshift(prop); - } - } else { - if (props.callee === TO_HANDLERS) { - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } else if (props.type === 15) { - if (!hasProp(prop, props)) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } else { - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } - } - if (node.type === 13) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } else { - node.props = propsWithInjection; - } - } else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } else { - node.arguments[2] = propsWithInjection; - } - } -} -function hasProp(prop, props) { - let result = false; - if (prop.key.type === 4) { - const propKeyName = prop.key.content; - result = props.properties.some( - (p) => p.key.type === 4 && p.key.content === propKeyName - ); - } - return result; -} -function toValidAssetId(name, type) { - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); - })}`; -} -function hasScopeRef(node, ids) { - if (!node || Object.keys(ids).length === 0) { - return false; - } - switch (node.type) { - case 1: - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { - return true; - } - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 11: - if (hasScopeRef(node.source, ids)) { - return true; - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 9: - return node.branches.some((b) => hasScopeRef(b, ids)); - case 10: - if (hasScopeRef(node.condition, ids)) { - return true; - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 4: - return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; - case 8: - return node.children.some((c) => isObject(c) && hasScopeRef(c, ids)); - case 5: - case 12: - return hasScopeRef(node.content, ids); - case 2: - case 3: - case 20: - return false; - default: - return false; - } -} -function getMemoedVNodeCall(node) { - if (node.type === 14 && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } else { - return node; - } -} -const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; - -const defaultParserOptions = { - parseMode: "base", - ns: 0, - delimiters: [`{{`, `}}`], - getNamespace: () => 0, - isVoidTag: NO, - isPreTag: NO, - isIgnoreNewlineTag: NO, - isCustomElement: NO, - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: true, - prefixIdentifiers: false -}; -let currentOptions = defaultParserOptions; -let currentRoot = null; -let currentInput = ""; -let currentOpenTag = null; -let currentProp = null; -let currentAttrValue = ""; -let currentAttrStartIndex = -1; -let currentAttrEndIndex = -1; -let inPre = 0; -let inVPre = false; -let currentVPreBoundary = null; -const stack = []; -const tokenizer = new Tokenizer(stack, { - onerr: emitError, - ontext(start, end) { - onText(getSlice(start, end), start, end); - }, - ontextentity(char, start, end) { - onText(char, start, end); - }, - oninterpolation(start, end) { - if (inVPre) { - return onText(getSlice(start, end), start, end); - } - let innerStart = start + tokenizer.delimiterOpen.length; - let innerEnd = end - tokenizer.delimiterClose.length; - while (isWhitespace(currentInput.charCodeAt(innerStart))) { - innerStart++; - } - while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { - innerEnd--; - } - let exp = getSlice(innerStart, innerEnd); - if (exp.includes("&")) { - { - exp = currentOptions.decodeEntities(exp, false); - } - } - addNode({ - type: 5, - content: createExp(exp, false, getLoc(innerStart, innerEnd)), - loc: getLoc(start, end) - }); - }, - onopentagname(start, end) { - const name = getSlice(start, end); - currentOpenTag = { - type: 1, - tag: name, - ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), - tagType: 0, - // will be refined on tag close - props: [], - children: [], - loc: getLoc(start - 1, end), - codegenNode: void 0 - }; - }, - onopentagend(end) { - endOpenTag(end); - }, - onclosetag(start, end) { - const name = getSlice(start, end); - if (!currentOptions.isVoidTag(name)) { - let found = false; - for (let i = 0; i < stack.length; i++) { - const e = stack[i]; - if (e.tag.toLowerCase() === name.toLowerCase()) { - found = true; - if (i > 0) { - emitError(24, stack[0].loc.start.offset); - } - for (let j = 0; j <= i; j++) { - const el = stack.shift(); - onCloseTag(el, end, j < i); - } - break; - } - } - if (!found) { - emitError(23, backTrack(start, 60)); - } - } - }, - onselfclosingtag(end) { - const name = currentOpenTag.tag; - currentOpenTag.isSelfClosing = true; - endOpenTag(end); - if (stack[0] && stack[0].tag === name) { - onCloseTag(stack.shift(), end); - } - }, - onattribname(start, end) { - currentProp = { - type: 6, - name: getSlice(start, end), - nameLoc: getLoc(start, end), - value: void 0, - loc: getLoc(start) - }; - }, - ondirname(start, end) { - const raw = getSlice(start, end); - const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); - if (!inVPre && name === "") { - emitError(26, start); - } - if (inVPre || name === "") { - currentProp = { - type: 6, - name: raw, - nameLoc: getLoc(start, end), - value: void 0, - loc: getLoc(start) - }; - } else { - currentProp = { - type: 7, - name, - rawName: raw, - exp: void 0, - arg: void 0, - modifiers: raw === "." ? [createSimpleExpression("prop")] : [], - loc: getLoc(start) - }; - if (name === "pre") { - inVPre = tokenizer.inVPre = true; - currentVPreBoundary = currentOpenTag; - const props = currentOpenTag.props; - for (let i = 0; i < props.length; i++) { - if (props[i].type === 7) { - props[i] = dirToAttr(props[i]); - } - } - } - } - }, - ondirarg(start, end) { - if (start === end) return; - const arg = getSlice(start, end); - if (inVPre) { - currentProp.name += arg; - setLocEnd(currentProp.nameLoc, end); - } else { - const isStatic = arg[0] !== `[`; - currentProp.arg = createExp( - isStatic ? arg : arg.slice(1, -1), - isStatic, - getLoc(start, end), - isStatic ? 3 : 0 - ); - } - }, - ondirmodifier(start, end) { - const mod = getSlice(start, end); - if (inVPre) { - currentProp.name += "." + mod; - setLocEnd(currentProp.nameLoc, end); - } else if (currentProp.name === "slot") { - const arg = currentProp.arg; - if (arg) { - arg.content += "." + mod; - setLocEnd(arg.loc, end); - } - } else { - const exp = createSimpleExpression(mod, true, getLoc(start, end)); - currentProp.modifiers.push(exp); - } - }, - onattribdata(start, end) { - currentAttrValue += getSlice(start, end); - if (currentAttrStartIndex < 0) currentAttrStartIndex = start; - currentAttrEndIndex = end; - }, - onattribentity(char, start, end) { - currentAttrValue += char; - if (currentAttrStartIndex < 0) currentAttrStartIndex = start; - currentAttrEndIndex = end; - }, - onattribnameend(end) { - const start = currentProp.loc.start.offset; - const name = getSlice(start, end); - if (currentProp.type === 7) { - currentProp.rawName = name; - } - if (currentOpenTag.props.some( - (p) => (p.type === 7 ? p.rawName : p.name) === name - )) { - emitError(2, start); - } - }, - onattribend(quote, end) { - if (currentOpenTag && currentProp) { - setLocEnd(currentProp.loc, end); - if (quote !== 0) { - if (currentAttrValue.includes("&")) { - currentAttrValue = currentOptions.decodeEntities( - currentAttrValue, - true - ); - } - if (currentProp.type === 6) { - if (currentProp.name === "class") { - currentAttrValue = condense(currentAttrValue).trim(); - } - if (quote === 1 && !currentAttrValue) { - emitError(13, end); - } - currentProp.value = { - type: 2, - content: currentAttrValue, - loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) - }; - if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { - tokenizer.enterRCDATA(toCharCodes(`</template`), 0); - } - } else { - let expParseMode = 0 /* Normal */; - currentProp.exp = createExp( - currentAttrValue, - false, - getLoc(currentAttrStartIndex, currentAttrEndIndex), - 0, - expParseMode - ); - if (currentProp.name === "for") { - currentProp.forParseResult = parseForExpression(currentProp.exp); - } - let syncIndex = -1; - if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.findIndex( - (mod) => mod.content === "sync" - )) > -1 && checkCompatEnabled( - "COMPILER_V_BIND_SYNC", - currentOptions, - currentProp.loc, - currentProp.rawName - )) { - currentProp.name = "model"; - currentProp.modifiers.splice(syncIndex, 1); - } - } - } - if (currentProp.type !== 7 || currentProp.name !== "pre") { - currentOpenTag.props.push(currentProp); - } - } - currentAttrValue = ""; - currentAttrStartIndex = currentAttrEndIndex = -1; - }, - oncomment(start, end) { - if (currentOptions.comments) { - addNode({ - type: 3, - content: getSlice(start, end), - loc: getLoc(start - 4, end + 3) - }); - } - }, - onend() { - const end = currentInput.length; - if (tokenizer.state !== 1) { - switch (tokenizer.state) { - case 5: - case 8: - emitError(5, end); - break; - case 3: - case 4: - emitError( - 25, - tokenizer.sectionStart - ); - break; - case 28: - if (tokenizer.currentSequence === Sequences.CdataEnd) { - emitError(6, end); - } else { - emitError(7, end); - } - break; - case 6: - case 7: - case 9: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - // " - case 20: - // ' - case 21: - emitError(9, end); - break; - } - } - for (let index = 0; index < stack.length; index++) { - onCloseTag(stack[index], end - 1); - emitError(24, stack[index].loc.start.offset); - } - }, - oncdata(start, end) { - if (stack[0].ns !== 0) { - onText(getSlice(start, end), start, end); - } else { - emitError(1, start - 9); - } - }, - onprocessinginstruction(start) { - if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { - emitError( - 21, - start - 1 - ); - } - } -}); -const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; -const stripParensRE = /^\(|\)$/g; -function parseForExpression(input) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) return; - const [, LHS, RHS] = inMatch; - const createAliasExpression = (content, offset, asParam = false) => { - const start = loc.start.offset + offset; - const end = start + content.length; - return createExp( - content, - false, - getLoc(start, end), - 0, - asParam ? 1 /* Params */ : 0 /* Normal */ - ); - }; - const result = { - source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: void 0, - key: void 0, - index: void 0, - finalized: false - }; - let valueContent = LHS.trim().replace(stripParensRE, "").trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, "").trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(keyContent, keyOffset, true); - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression( - indexContent, - exp.indexOf( - indexContent, - result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length - ), - true - ); - } - } - } - if (valueContent) { - result.value = createAliasExpression(valueContent, trimmedOffset, true); - } - return result; -} -function getSlice(start, end) { - return currentInput.slice(start, end); -} -function endOpenTag(end) { - if (tokenizer.inSFCRoot) { - currentOpenTag.innerLoc = getLoc(end + 1, end + 1); - } - addNode(currentOpenTag); - const { tag, ns } = currentOpenTag; - if (ns === 0 && currentOptions.isPreTag(tag)) { - inPre++; - } - if (currentOptions.isVoidTag(tag)) { - onCloseTag(currentOpenTag, end); - } else { - stack.unshift(currentOpenTag); - if (ns === 1 || ns === 2) { - tokenizer.inXML = true; - } - } - currentOpenTag = null; -} -function onText(content, start, end) { - { - const tag = stack[0] && stack[0].tag; - if (tag !== "script" && tag !== "style" && content.includes("&")) { - content = currentOptions.decodeEntities(content, false); - } - } - const parent = stack[0] || currentRoot; - const lastNode = parent.children[parent.children.length - 1]; - if (lastNode && lastNode.type === 2) { - lastNode.content += content; - setLocEnd(lastNode.loc, end); - } else { - parent.children.push({ - type: 2, - content, - loc: getLoc(start, end) - }); - } -} -function onCloseTag(el, end, isImplied = false) { - if (isImplied) { - setLocEnd(el.loc, backTrack(end, 60)); - } else { - setLocEnd(el.loc, lookAhead(end, 62) + 1); - } - if (tokenizer.inSFCRoot) { - if (el.children.length) { - el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); - } else { - el.innerLoc.end = extend({}, el.innerLoc.start); - } - el.innerLoc.source = getSlice( - el.innerLoc.start.offset, - el.innerLoc.end.offset - ); - } - const { tag, ns, children } = el; - if (!inVPre) { - if (tag === "slot") { - el.tagType = 2; - } else if (isFragmentTemplate(el)) { - el.tagType = 3; - } else if (isComponent(el)) { - el.tagType = 1; - } - } - if (!tokenizer.inRCDATA) { - el.children = condenseWhitespace(children); - } - if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { - const first = children[0]; - if (first && first.type === 2) { - first.content = first.content.replace(/^\r?\n/, ""); - } - } - if (ns === 0 && currentOptions.isPreTag(tag)) { - inPre--; - } - if (currentVPreBoundary === el) { - inVPre = tokenizer.inVPre = false; - currentVPreBoundary = null; - } - if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { - tokenizer.inXML = false; - } - { - const props = el.props; - if (isCompatEnabled( - "COMPILER_V_IF_V_FOR_PRECEDENCE", - currentOptions - )) { - let hasIf = false; - let hasFor = false; - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 7) { - if (p.name === "if") { - hasIf = true; - } else if (p.name === "for") { - hasFor = true; - } - } - if (hasIf && hasFor) { - warnDeprecation( - "COMPILER_V_IF_V_FOR_PRECEDENCE", - currentOptions, - el.loc - ); - break; - } - } - } - if (!tokenizer.inSFCRoot && isCompatEnabled( - "COMPILER_NATIVE_TEMPLATE", - currentOptions - ) && el.tag === "template" && !isFragmentTemplate(el)) { - warnDeprecation( - "COMPILER_NATIVE_TEMPLATE", - currentOptions, - el.loc - ); - const parent = stack[0] || currentRoot; - const index = parent.children.indexOf(el); - parent.children.splice(index, 1, ...el.children); - } - const inlineTemplateProp = props.find( - (p) => p.type === 6 && p.name === "inline-template" - ); - if (inlineTemplateProp && checkCompatEnabled( - "COMPILER_INLINE_TEMPLATE", - currentOptions, - inlineTemplateProp.loc - ) && el.children.length) { - inlineTemplateProp.value = { - type: 2, - content: getSlice( - el.children[0].loc.start.offset, - el.children[el.children.length - 1].loc.end.offset - ), - loc: inlineTemplateProp.loc - }; - } - } -} -function lookAhead(index, c) { - let i = index; - while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; - return i; -} -function backTrack(index, c) { - let i = index; - while (currentInput.charCodeAt(i) !== c && i >= 0) i--; - return i; -} -const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); -function isFragmentTemplate({ tag, props }) { - if (tag === "template") { - for (let i = 0; i < props.length; i++) { - if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { - return true; - } - } - } - return false; -} -function isComponent({ tag, props }) { - if (currentOptions.isCustomElement(tag)) { - return false; - } - if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { - return true; - } - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6) { - if (p.name === "is" && p.value) { - if (p.value.content.startsWith("vue:")) { - return true; - } else if (checkCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - currentOptions, - p.loc - )) { - return true; - } - } - } else if (// :is on plain element - only treat as component in compat mode - p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - currentOptions, - p.loc - )) { - return true; - } - } - return false; -} -function isUpperCase(c) { - return c > 64 && c < 91; -} -const windowsNewlineRE = /\r\n/g; -function condenseWhitespace(nodes, tag) { - const shouldCondense = currentOptions.whitespace !== "preserve"; - let removedWhitespace = false; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (node.type === 2) { - if (!inPre) { - if (isAllWhitespace(node.content)) { - const prev = nodes[i - 1] && nodes[i - 1].type; - const next = nodes[i + 1] && nodes[i + 1].type; - if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { - removedWhitespace = true; - nodes[i] = null; - } else { - node.content = " "; - } - } else if (shouldCondense) { - node.content = condense(node.content); - } - } else { - node.content = node.content.replace(windowsNewlineRE, "\n"); - } - } - } - return removedWhitespace ? nodes.filter(Boolean) : nodes; -} -function isAllWhitespace(str) { - for (let i = 0; i < str.length; i++) { - if (!isWhitespace(str.charCodeAt(i))) { - return false; - } - } - return true; -} -function hasNewlineChar(str) { - for (let i = 0; i < str.length; i++) { - const c = str.charCodeAt(i); - if (c === 10 || c === 13) { - return true; - } - } - return false; -} -function condense(str) { - let ret = ""; - let prevCharIsWhitespace = false; - for (let i = 0; i < str.length; i++) { - if (isWhitespace(str.charCodeAt(i))) { - if (!prevCharIsWhitespace) { - ret += " "; - prevCharIsWhitespace = true; - } - } else { - ret += str[i]; - prevCharIsWhitespace = false; - } - } - return ret; -} -function addNode(node) { - (stack[0] || currentRoot).children.push(node); -} -function getLoc(start, end) { - return { - start: tokenizer.getPos(start), - // @ts-expect-error allow late attachment - end: end == null ? end : tokenizer.getPos(end), - // @ts-expect-error allow late attachment - source: end == null ? end : getSlice(start, end) - }; -} -function cloneLoc(loc) { - return getLoc(loc.start.offset, loc.end.offset); -} -function setLocEnd(loc, end) { - loc.end = tokenizer.getPos(end); - loc.source = getSlice(loc.start.offset, end); -} -function dirToAttr(dir) { - const attr = { - type: 6, - name: dir.rawName, - nameLoc: getLoc( - dir.loc.start.offset, - dir.loc.start.offset + dir.rawName.length - ), - value: void 0, - loc: dir.loc - }; - if (dir.exp) { - const loc = dir.exp.loc; - if (loc.end.offset < dir.loc.end.offset) { - loc.start.offset--; - loc.start.column--; - loc.end.offset++; - loc.end.column++; - } - attr.value = { - type: 2, - content: dir.exp.content, - loc - }; - } - return attr; -} -function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { - const exp = createSimpleExpression(content, isStatic, loc, constType); - return exp; -} -function emitError(code, index, message) { - currentOptions.onError( - createCompilerError(code, getLoc(index, index), void 0, message) - ); -} -function reset() { - tokenizer.reset(); - currentOpenTag = null; - currentProp = null; - currentAttrValue = ""; - currentAttrStartIndex = -1; - currentAttrEndIndex = -1; - stack.length = 0; -} -function baseParse(input, options) { - reset(); - currentInput = input; - currentOptions = extend({}, defaultParserOptions); - if (options) { - let key; - for (key in options) { - if (options[key] != null) { - currentOptions[key] = options[key]; - } - } - } - { - if (!currentOptions.decodeEntities) { - throw new Error( - `[@vue/compiler-core] decodeEntities option is required in browser builds.` - ); - } - } - tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; - tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; - const delimiters = options && options.delimiters; - if (delimiters) { - tokenizer.delimiterOpen = toCharCodes(delimiters[0]); - tokenizer.delimiterClose = toCharCodes(delimiters[1]); - } - const root = currentRoot = createRoot([], input); - tokenizer.parse(currentInput); - root.loc = getLoc(0, input.length); - root.children = condenseWhitespace(root.children); - currentRoot = null; - return root; -} - -function cacheStatic(root, context) { - walk( - root, - void 0, - context, - // Root node is unfortunately non-hoistable due to potential parent - // fallthrough attributes. - isSingleElementRoot(root, root.children[0]) - ); -} -function isSingleElementRoot(root, child) { - const { children } = root; - return children.length === 1 && child.type === 1 && !isSlotOutlet(child); -} -function walk(node, parent, context, doNotHoistNode = false, inFor = false) { - const { children } = node; - const toCache = []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.type === 1 && child.tagType === 0) { - const constantType = doNotHoistNode ? 0 : getConstantType(child, context); - if (constantType > 0) { - if (constantType >= 2) { - child.codegenNode.patchFlag = -1; - toCache.push(child); - continue; - } - } else { - const codegenNode = child.codegenNode; - if (codegenNode.type === 13) { - const flag = codegenNode.patchFlag; - if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } - } else if (child.type === 12) { - const constantType = doNotHoistNode ? 0 : getConstantType(child, context); - if (constantType >= 2) { - toCache.push(child); - continue; - } - } - if (child.type === 1) { - const isComponent = child.tagType === 1; - if (isComponent) { - context.scopes.vSlot++; - } - walk(child, node, context, false, inFor); - if (isComponent) { - context.scopes.vSlot--; - } - } else if (child.type === 11) { - walk(child, node, context, child.children.length === 1, true); - } else if (child.type === 9) { - for (let i2 = 0; i2 < child.branches.length; i2++) { - walk( - child.branches[i2], - node, - context, - child.branches[i2].children.length === 1, - inFor - ); - } - } - } - let cachedAsArray = false; - if (toCache.length === children.length && node.type === 1) { - if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { - node.codegenNode.children = getCacheExpression( - createArrayExpression(node.codegenNode.children) - ); - cachedAsArray = true; - } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) { - const slot = getSlotNode(node.codegenNode, "default"); - if (slot) { - slot.returns = getCacheExpression( - createArrayExpression(slot.returns) - ); - cachedAsArray = true; - } - } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { - const slotName = findDir(node, "slot", true); - const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); - if (slot) { - slot.returns = getCacheExpression( - createArrayExpression(slot.returns) - ); - cachedAsArray = true; - } - } - } - if (!cachedAsArray) { - for (const child of toCache) { - child.codegenNode = context.cache(child.codegenNode); - } - } - function getCacheExpression(value) { - const exp = context.cache(value); - if (inFor && context.hmr) { - exp.needArraySpread = true; - } - return exp; - } - function getSlotNode(node2, name) { - if (node2.children && !isArray(node2.children) && node2.children.type === 15) { - const slot = node2.children.properties.find( - (p) => p.key === name || p.key.content === name - ); - return slot && slot.value; - } - } - if (toCache.length && context.transformHoist) { - context.transformHoist(children, context, node); - } -} -function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1: - if (node.tagType !== 0) { - return 0; - } - const cached = constantCache.get(node); - if (cached !== void 0) { - return cached; - } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13) { - return 0; - } - if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { - return 0; - } - if (codegenNode.patchFlag === void 0) { - let returnType2 = 3; - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0) { - constantCache.set(node, 0); - return 0; - } - if (generatedPropsType < returnType2) { - returnType2 = generatedPropsType; - } - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0) { - constantCache.set(node, 0); - return 0; - } - if (childType < returnType2) { - returnType2 = childType; - } - } - if (returnType2 > 1) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && p.name === "bind" && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0) { - constantCache.set(node, 0); - return 0; - } - if (expType < returnType2) { - returnType2 = expType; - } - } - } - } - if (codegenNode.isBlock) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7) { - constantCache.set(node, 0); - return 0; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper( - getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) - ); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType2); - return returnType2; - } else { - constantCache.set(node, 0); - return 0; - } - case 2: - case 3: - return 3; - case 9: - case 11: - case 10: - return 0; - case 5: - case 12: - return getConstantType(node.content, context); - case 4: - return node.constType; - case 8: - let returnType = 3; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child) || isSymbol(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0) { - return 0; - } else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - case 20: - return 2; - default: - return 0; - } -} -const allowHoistedHelperSet = /* @__PURE__ */ new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS -]); -function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4) { - return getConstantType(arg, context); - } else if (arg.type === 14) { - return getConstantTypeOfHelperCall(arg, context); - } - } - return 0; -} -function getGeneratedPropsConstantType(node, context) { - let returnType = 3; - const props = getNodeProps(node); - if (props && props.type === 15) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4) { - valueType = getConstantType(value, context); - } else if (value.type === 14) { - valueType = getConstantTypeOfHelperCall(value, context); - } else { - valueType = 0; - } - if (valueType === 0) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } - } - return returnType; -} -function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13) { - return codegenNode.props; - } -} - -function createTransformContext(root, { - filename = "", - prefixIdentifiers = false, - hoistStatic = false, - hmr = false, - cacheHandlers = false, - nodeTransforms = [], - directiveTransforms = {}, - transformHoist = null, - isBuiltInComponent = NOOP, - isCustomElement = NOOP, - expressionPlugins = [], - scopeId = null, - slotted = true, - ssr = false, - inSSR = false, - ssrCssVars = ``, - bindingMetadata = EMPTY_OBJ, - inline = false, - isTS = false, - onError = defaultOnError, - onWarn = defaultOnWarn, - compatConfig -}) { - const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); - const context = { - // options - filename, - selfName: nameMatch && capitalize(camelize(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - hmr, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: /* @__PURE__ */ new Map(), - components: /* @__PURE__ */ new Set(), - directives: /* @__PURE__ */ new Set(), - hoists: [], - imports: [], - cached: [], - constantCache: /* @__PURE__ */ new WeakMap(), - temps: 0, - identifiers: /* @__PURE__ */ Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - grandParent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - { - if (!context.currentNode) { - throw new Error(`Node being replaced is already removed.`); - } - if (!context.parent) { - throw new Error(`Cannot replace root node.`); - } - } - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - if (!context.parent) { - throw new Error(`Cannot remove root node.`); - } - const list = context.parent.children; - const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; - if (removalIndex < 0) { - throw new Error(`node being removed is not a child of current parent`); - } - if (!node || node === context.currentNode) { - context.currentNode = null; - context.onNodeRemoved(); - } else { - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: NOOP, - addIdentifiers(exp) { - }, - removeIdentifiers(exp) { - }, - hoist(exp) { - if (isString(exp)) exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression( - `_hoisted_${context.hoists.length}`, - false, - exp.loc, - 2 - ); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false, inVOnce = false) { - const cacheExp = createCacheExpression( - context.cached.length, - exp, - isVNode, - inVOnce - ); - context.cached.push(cacheExp); - return cacheExp; - } - }; - { - context.filters = /* @__PURE__ */ new Set(); - } - return context; -} -function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - cacheStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; - root.transformed = true; - { - root.filters = [...context.filters]; - } -} -function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - if (isSingleElementRoot(root, child) && child.codegenNode) { - const codegenNode = child.codegenNode; - if (codegenNode.type === 13) { - convertToBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } else { - root.codegenNode = child; - } - } else if (children.length > 1) { - let patchFlag = 64; - if (children.filter((c) => c.type !== 3).length === 1) { - patchFlag |= 2048; - } - root.codegenNode = createVNodeCall( - context, - helper(FRAGMENT), - void 0, - root.children, - patchFlag, - void 0, - void 0, - true, - void 0, - false - ); - } else ; -} -function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (isString(child)) continue; - context.grandParent = context.parent; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } -} -function traverseNode(node, context) { - context.currentNode = node; - const { nodeTransforms } = context; - const exitFns = []; - for (let i2 = 0; i2 < nodeTransforms.length; i2++) { - const onExit = nodeTransforms[i2](node, context); - if (onExit) { - if (isArray(onExit)) { - exitFns.push(...onExit); - } else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - return; - } else { - node = context.currentNode; - } - } - switch (node.type) { - case 3: - if (!context.ssr) { - context.helper(CREATE_COMMENT); - } - break; - case 5: - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9: - for (let i2 = 0; i2 < node.branches.length; i2++) { - traverseNode(node.branches[i2], context); - } - break; - case 10: - case 11: - case 1: - case 0: - traverseChildren(node, context); - break; - } - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); - } -} -function createStructuralDirectiveTransform(name, fn) { - const matches = isString(name) ? (n) => n === name : (n) => name.test(n); - return (node, context) => { - if (node.type === 1) { - const { props } = node; - if (node.tagType === 3 && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 && matches(prop.name)) { - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) exitFns.push(onExit); - } - } - return exitFns; - } - }; -} - -const PURE_ANNOTATION = `/*@__PURE__*/`; -const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; -function createCodegenContext(ast, { - mode = "function", - prefixIdentifiers = mode === "module", - sourceMap = false, - filename = `template.vue.html`, - scopeId = null, - optimizeImports = false, - runtimeGlobalName = `Vue`, - runtimeModuleName = `vue`, - ssrRuntimeModuleName = "vue/server-renderer", - ssr = false, - isTS = false, - inSSR = false -}) { - const context = { - mode, - prefixIdentifiers, - sourceMap, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: void 0, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, newlineIndex = -2 /* None */, node) { - context.code += code; - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); - } - }; - function newline(n) { - context.push("\n" + ` `.repeat(n), 0 /* Start */); - } - return context; -} -function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) options.onContextCreated(context); - const { - mode, - push, - prefixIdentifiers, - indent, - deindent, - newline, - scopeId, - ssr - } = context; - const helpers = Array.from(ast.helpers); - const hasHelpers = helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== "module"; - const preambleContext = context; - { - genFunctionPreamble(ast, preambleContext); - } - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; - const signature = args.join(", "); - { - push(`function ${functionName}(${signature}) {`); - } - indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - if (hasHelpers) { - push( - `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue -`, - -1 /* End */ - ); - newline(); - } - } - if (ast.components.length) { - genAssets(ast.components, "component", context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, "directive", context); - if (ast.temps > 0) { - newline(); - } - } - if (ast.filters && ast.filters.length) { - newline(); - genAssets(ast.filters, "filter", context); - newline(); - } - if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } - } - if (ast.components.length || ast.directives.length || ast.temps) { - push(` -`, 0 /* Start */); - newline(); - } - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); - } - deindent(); - push(`}`); - return { - ast, - code: context.code, - preamble: ``, - map: context.map ? context.map.toJSON() : void 0 - }; -} -function genFunctionPreamble(ast, context) { - const { - ssr, - prefixIdentifiers, - push, - newline, - runtimeModuleName, - runtimeGlobalName, - ssrRuntimeModuleName - } = context; - const VueBinding = runtimeGlobalName; - const helpers = Array.from(ast.helpers); - if (helpers.length > 0) { - { - push(`const _Vue = ${VueBinding} -`, -1 /* End */); - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); - push(`const { ${staticHelpers} } = _Vue -`, -1 /* End */); - } - } - } - genHoists(ast.hoists, context); - newline(); - push(`return `); -} -function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper( - type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE - ); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - const maybeSelfReference = id.endsWith("__self"); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push( - `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` - ); - if (i < assets.length - 1) { - newline(); - } - } -} -function genHoists(hoists, context) { - if (!hoists.length) { - return; - } - context.pure = true; - const { push, newline } = context; - newline(); - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - push(`const _hoisted_${i + 1} = `); - genNode(exp, context); - newline(); - } - } - context.pure = false; -} -function isText(n) { - return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; -} -function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n)); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); -} -function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (isString(node)) { - push(node, -3 /* Unknown */); - } else if (isArray(node)) { - genNodeListAsArray(node, context); - } else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(","); - newline(); - } else { - comma && push(", "); - } - } - } -} -function genNode(node, context) { - if (isString(node)) { - context.push(node, -3 /* Unknown */); - return; - } - if (isSymbol(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1: - case 9: - case 11: - assert( - node.codegenNode != null, - `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` - ); - genNode(node.codegenNode, context); - break; - case 2: - genText(node, context); - break; - case 4: - genExpression(node, context); - break; - case 5: - genInterpolation(node, context); - break; - case 12: - genNode(node.codegenNode, context); - break; - case 8: - genCompoundExpression(node, context); - break; - case 3: - genComment(node, context); - break; - case 13: - genVNodeCall(node, context); - break; - case 14: - genCallExpression(node, context); - break; - case 15: - genObjectExpression(node, context); - break; - case 17: - genArrayExpression(node, context); - break; - case 18: - genFunctionExpression(node, context); - break; - case 19: - genConditionalExpression(node, context); - break; - case 20: - genCacheExpression(node, context); - break; - case 21: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22: - break; - case 23: - break; - case 24: - break; - case 25: - break; - case 26: - break; - /* v8 ignore start */ - case 10: - break; - default: - { - assert(false, `unhandled codegen node type: ${node.type}`); - const exhaustiveCheck = node; - return exhaustiveCheck; - } - } -} -function genText(node, context) { - context.push(JSON.stringify(node.content), -3 /* Unknown */, node); -} -function genExpression(node, context) { - const { content, isStatic } = node; - context.push( - isStatic ? JSON.stringify(content) : content, - -3 /* Unknown */, - node - ); -} -function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); -} -function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child)) { - context.push(child, -3 /* Unknown */); - } else { - genNode(child, context); - } - } -} -function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } else if (node.isStatic) { - const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); - push(text, -2 /* None */, node); - } else { - push(`[${node.content}]`, -3 /* Unknown */, node); - } -} -function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push( - `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, - -3 /* Unknown */, - node - ); -} -function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent - } = node; - let patchFlagString; - if (patchFlag) { - { - if (patchFlag < 0) { - patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; - } else { - const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); - patchFlagString = patchFlag + ` /* ${flagNames} */`; - } - } - } - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, -2 /* None */, node); - genNodeList( - genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), - context - ); - push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } -} -function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) break; - } - return args.slice(0, i + 1).map((arg) => arg || `null`); -} -function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = isString(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, -2 /* None */, node); - genNodeList(node.arguments, context); - push(`)`); -} -function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, -2 /* None */, node); - return; - } - const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - genExpressionAsPropertyKey(key, context); - push(`: `); - genNode(value, context); - if (i < properties.length - 1) { - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); -} -function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); -} -function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - push(`_${helperNameMap[WITH_CTX]}(`); - } - push(`(`, -2 /* None */, node); - if (isArray(params)) { - genNodeList(params, context); - } else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (isArray(returns)) { - genNodeListAsArray(returns, context); - } else { - genNode(returns, context); - } - } else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - if (node.isNonScopedSlot) { - push(`, undefined, true`); - } - push(`)`); - } -} -function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); - context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); - context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent( - true - /* without newline */ - ); -} -function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - const { needPauseTracking, needArraySpread } = node; - if (needArraySpread) { - push(`[...(`); - } - push(`_cache[${node.index}] || (`); - if (needPauseTracking) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1`); - if (node.inVOnce) push(`, true`); - push(`),`); - newline(); - push(`(`); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (needPauseTracking) { - push(`).cacheIndex = ${node.index},`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); - } - push(`)`); - if (needArraySpread) { - push(`)]`); - } -} - -const prohibitedKeywordRE = new RegExp( - "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" -); -const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; -function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) { - const exp = node.content; - if (!exp.trim()) { - return; - } - try { - new Function( - asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` - ); - } catch (e) { - let message = e.message; - const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE); - if (keywordMatch) { - message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; - } - context.onError( - createCompilerError( - 45, - node.loc, - void 0, - message - ) - ); - } -} - -const transformExpression = (node, context) => { - if (node.type === 5) { - node.content = processExpression( - node.content, - context - ); - } else if (node.type === 1) { - const memo = findDir(node, "memo"); - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - if (dir.type === 7 && dir.name !== "for") { - const exp = dir.exp; - const arg = dir.arg; - if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) - !(memo && arg && arg.type === 4 && arg.content === "key")) { - dir.exp = processExpression( - exp, - context, - // slot args must be processed as function params - dir.name === "slot" - ); - } - if (arg && arg.type === 4 && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } - } - } -}; -function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { - { - { - validateBrowserExpression(node, context, asParams, asRawStatements); - } - return node; - } -} -function stringifyExpression(exp) { - if (isString(exp)) { - return exp; - } else if (exp.type === 4) { - return exp.content; - } else { - return exp.children.map(stringifyExpression).join(""); - } -} - -const transformIf = createStructuralDirectiveTransform( - /^(if|else|else-if)$/, - (node, dir, context) => { - return processIf(node, dir, context, (ifNode, branch, isRoot) => { - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9) { - key += sibling.branches.length; - } - } - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch( - branch, - key, - context - ); - } else { - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch( - branch, - key + ifNode.branches.length - 1, - context - ); - } - }; - }); - } -); -function processIf(node, dir, context, processCodegen) { - if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError( - createCompilerError(28, dir.loc) - ); - dir.exp = createSimpleExpression(`true`, false, loc); - } - if (dir.exp) { - validateBrowserExpression(dir.exp, context); - } - if (dir.name === "if") { - const branch = createIfBranch(node, dir); - const ifNode = { - type: 9, - loc: cloneLoc(node.loc), - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); - } - } else { - const siblings = context.parent.children; - const comments = []; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if (sibling && sibling.type === 3) { - context.removeNode(sibling); - comments.unshift(sibling); - continue; - } - if (sibling && sibling.type === 2 && !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9) { - if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { - context.onError( - createCompilerError(30, node.loc) - ); - } - context.removeNode(); - const branch = createIfBranch(node, dir); - if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> - !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { - branch.children = [...comments, ...branch.children]; - } - { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError( - createCompilerError( - 29, - branch.userKey.loc - ) - ); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - traverseNode(branch, context); - if (onExit) onExit(); - context.currentNode = null; - } else { - context.onError( - createCompilerError(30, node.loc) - ); - } - break; - } - } -} -function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3; - return { - type: 10, - loc: node.loc, - condition: dir.name === "else" ? void 0 : dir.exp, - children: isTemplateIf && !findDir(node, "for") ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; -} -function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression( - branch.condition, - createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - '"v-if"' , - "true" - ]) - ); - } else { - return createChildrenCodegenNode(branch, keyIndex, context); - } -} -function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty( - `key`, - createSimpleExpression( - `${keyIndex}`, - false, - locStub, - 2 - ) - ); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11) { - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } else { - let patchFlag = 64; - if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { - patchFlag |= 2048; - } - return createVNodeCall( - context, - helper(FRAGMENT), - createObjectExpression([keyProperty]), - children, - patchFlag, - void 0, - void 0, - true, - false, - false, - branch.loc - ); - } - } else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - if (vnodeCall.type === 13) { - convertToBlock(vnodeCall, context); - } - injectProp(vnodeCall, keyProperty, context); - return ret; - } -} -function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; - } - if (a.type === 6) { - if (a.value.content !== b.value.content) { - return false; - } - } else { - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { - return false; - } - } - return true; -} -function getParentCondition(node) { - while (true) { - if (node.type === 19) { - if (node.alternate.type === 19) { - node = node.alternate; - } else { - return node; - } - } else if (node.type === 20) { - node = node.value; - } - } -} - -const transformBind = (dir, _node, context) => { - const { modifiers, loc } = dir; - const arg = dir.arg; - let { exp } = dir; - if (exp && exp.type === 4 && !exp.content.trim()) { - { - exp = void 0; - } - } - if (!exp) { - if (arg.type !== 4 || !arg.isStatic) { - context.onError( - createCompilerError( - 52, - arg.loc - ) - ); - return { - props: [ - createObjectProperty(arg, createSimpleExpression("", true, loc)) - ] - }; - } - transformBindShorthand(dir); - exp = dir.exp; - } - if (arg.type !== 4) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); - } else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; - } - if (modifiers.some((mod) => mod.content === "camel")) { - if (arg.type === 4) { - if (arg.isStatic) { - arg.content = camelize(arg.content); - } else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } - } - if (!context.inSSR) { - if (modifiers.some((mod) => mod.content === "prop")) { - injectPrefix(arg, "."); - } - if (modifiers.some((mod) => mod.content === "attr")) { - injectPrefix(arg, "^"); - } - } - return { - props: [createObjectProperty(arg, exp)] - }; -}; -const transformBindShorthand = (dir, context) => { - const arg = dir.arg; - const propName = camelize(arg.content); - dir.exp = createSimpleExpression(propName, false, arg.loc); -}; -const injectPrefix = (arg, prefix) => { - if (arg.type === 4) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); - } -}; - -const transformFor = createStructuralDirectiveTransform( - "for", - (node, dir, context) => { - const { helper, removeHelper } = context; - return processFor(node, dir, context, (forNode) => { - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, "memo"); - const keyProp = findProp(node, `key`, false, true); - const isDirKey = keyProp && keyProp.type === 7; - if (isDirKey && !keyProp.exp) { - transformBindShorthand(keyProp); - } - let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); - const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; - const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; - const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; - forNode.codegenNode = createVNodeCall( - context, - helper(FRAGMENT), - void 0, - renderExp, - fragmentFlag, - void 0, - void 0, - true, - !isStableFragment, - false, - node.loc - ); - return () => { - let childBlock; - const { children } = forNode; - if (isTemplate) { - node.children.some((c) => { - if (c.type === 1) { - const key = findProp(c, "key"); - if (key) { - context.onError( - createCompilerError( - 33, - key.loc - ) - ); - return true; - } - } - }); - } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; - const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; - if (slotOutlet) { - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - } else if (needFragmentWrapper) { - childBlock = createVNodeCall( - context, - helper(FRAGMENT), - keyProperty ? createObjectExpression([keyProperty]) : void 0, - node.children, - 64, - void 0, - void 0, - true, - void 0, - false - ); - } else { - childBlock = children[0].codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - removeHelper(OPEN_BLOCK); - removeHelper( - getVNodeBlockHelper(context.inSSR, childBlock.isComponent) - ); - } else { - removeHelper( - getVNodeHelper(context.inSSR, childBlock.isComponent) - ); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression( - createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ]) - ); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...keyExp ? [` && _cached.key === `, keyExp] : [], - ` && ${context.helperString( - IS_MEMO_SAME - )}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push( - loop, - createSimpleExpression(`_cache`), - createSimpleExpression(String(context.cached.length)) - ); - context.cached.push(null); - } else { - renderExp.arguments.push( - createFunctionExpression( - createForLoopParams(forNode.parseResult), - childBlock, - true - ) - ); - } - }; - }); - } -); -function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError( - createCompilerError(31, dir.loc) - ); - return; - } - const parseResult = dir.forParseResult; - if (!parseResult) { - context.onError( - createCompilerError(32, dir.loc) - ); - return; - } - finalizeForParseResult(parseResult, context); - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - scopes.vFor++; - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (onExit) onExit(); - }; -} -function finalizeForParseResult(result, context) { - if (result.finalized) return; - { - validateBrowserExpression(result.source, context); - if (result.key) { - validateBrowserExpression( - result.key, - context, - true - ); - } - if (result.index) { - validateBrowserExpression( - result.index, - context, - true - ); - } - if (result.value) { - validateBrowserExpression( - result.value, - context, - true - ); - } - } - result.finalized = true; -} -function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); -} -function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) break; - } - return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); -} - -const defaultFallback = createSimpleExpression(`undefined`, false); -const trackSlotScopes = (node, context) => { - if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { - const vSlot = findDir(node, "slot"); - if (vSlot) { - vSlot.exp; - context.scopes.vSlot++; - return () => { - context.scopes.vSlot--; - }; - } - } -}; -const trackVForSlotScopes = (node, context) => { - let vFor; - if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { - const result = vFor.forParseResult; - if (result) { - finalizeForParseResult(result, context); - const { value, key, index } = result; - const { addIdentifiers, removeIdentifiers } = context; - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - return () => { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - }; - } - } -}; -const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( - props, - children, - false, - true, - children.length ? children[0].loc : loc -); -function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - const onComponentSlot = findDir(node, "slot", true); - if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push( - createObjectProperty( - arg || createSimpleExpression("default", true), - buildSlotFn(exp, void 0, children, loc) - ) - ); - } - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = /* @__PURE__ */ new Set(); - let conditionalBranchIndex = 0; - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { - if (slotElement.type !== 3) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - context.onError( - createCompilerError(37, slotDir.loc) - ); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { - arg: slotName = createSimpleExpression(`default`, true), - exp: slotProps, - loc: dirLoc - } = slotDir; - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } else { - hasDynamicSlots = true; - } - const vFor = findDir(slotElement, "for"); - const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); - let vIf; - let vElse; - if (vIf = findDir(slotElement, "if")) { - hasDynamicSlots = true; - dynamicSlots.push( - createConditionalExpression( - vIf.exp, - buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), - defaultFallback - ) - ); - } else if (vElse = findDir( - slotElement, - /^else(-if)?$/, - true - /* allowEmpty */ - )) { - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp ? createConditionalExpression( - vElse.exp, - buildDynamicSlot( - slotName, - slotFunction, - conditionalBranchIndex++ - ), - defaultFallback - ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); - } else { - context.onError( - createCompilerError(30, vElse.loc) - ); - } - } else if (vFor) { - hasDynamicSlots = true; - const parseResult = vFor.forParseResult; - if (parseResult) { - finalizeForParseResult(parseResult, context); - dynamicSlots.push( - createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression( - createForLoopParams(parseResult), - buildDynamicSlot(slotName, slotFunction), - true - ) - ]) - ); - } else { - context.onError( - createCompilerError( - 32, - vFor.loc - ) - ); - } - } else { - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError( - createCompilerError( - 38, - dirLoc - ) - ); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === "default") { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } - } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children2) => { - const fn = buildSlotFn(props, void 0, children2, loc); - if (context.compatConfig) { - fn.isNonScopedSlot = true; - } - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - slotsProperties.push(buildDefaultSlotProperty(void 0, children)); - } else if (implicitDefaultChildren.length && // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { - if (hasNamedDefaultSlot) { - context.onError( - createCompilerError( - 39, - implicitDefaultChildren[0].loc - ) - ); - } else { - slotsProperties.push( - buildDefaultSlotProperty(void 0, implicitDefaultChildren) - ); - } - } - } - const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; - let slots = createObjectExpression( - slotsProperties.concat( - createObjectProperty( - `_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression( - slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), - false - ) - ) - ), - loc - ); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots - }; -} -function buildDynamicSlot(name, fn, index) { - const props = [ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) - ]; - if (index != null) { - props.push( - createObjectProperty(`key`, createSimpleExpression(String(index), true)) - ); - } - return createObjectExpression(props); -} -function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1: - if (child.tagType === 2 || hasForwardedSlots(child.children)) { - return true; - } - break; - case 9: - if (hasForwardedSlots(child.branches)) return true; - break; - case 10: - case 11: - if (hasForwardedSlots(child.children)) return true; - break; - } - } - return false; -} -function isNonWhitespaceContent(node) { - if (node.type !== 2 && node.type !== 12) - return true; - return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); -} - -const directiveImportMap = /* @__PURE__ */ new WeakMap(); -const transformElement = (node, context) => { - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { - return; - } - const { tag, props } = node; - const isComponent = node.tagType === 1; - let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; - const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = ( - // dynamic component may resolve to plain elements - isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === "svg" || tag === "foreignObject" || tag === "math") - ); - if (props.length > 0) { - const propsBuildResult = buildProps( - node, - context, - void 0, - isComponent, - isDynamicComponent - ); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = directives && directives.length ? createArrayExpression( - directives.map((dir) => buildDirectiveArgs(dir, context)) - ) : void 0; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } - } - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - shouldUseBlock = true; - patchFlag |= 1024; - if (node.children.length > 1) { - context.onError( - createCompilerError(46, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: "" - }) - ); - } - } - const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024; - } - } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - const hasDynamicTextChild = type === 5 || type === 8; - if (hasDynamicTextChild && getConstantType(child, context) === 0) { - patchFlag |= 1; - } - if (hasDynamicTextChild || type === 2) { - vnodeChildren = child; - } else { - vnodeChildren = node.children; - } - } else { - vnodeChildren = node.children; - } - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } - node.codegenNode = createVNodeCall( - context, - vnodeTag, - vnodeProps, - vnodeChildren, - patchFlag === 0 ? void 0 : patchFlag, - vnodeDynamicProps, - vnodeDirectives, - !!shouldUseBlock, - false, - isComponent, - node.loc - ); - }; -}; -function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp( - node, - "is", - false, - true - /* allow empty */ - ); - if (isProp) { - if (isExplicitDynamic || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - )) { - let exp; - if (isProp.type === 6) { - exp = isProp.value && createSimpleExpression(isProp.value.content, true); - } else { - exp = isProp.exp; - if (!exp) { - exp = createSimpleExpression(`is`, false, isProp.arg.loc); - } - } - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { - tag = isProp.value.content.slice(4); - } - } - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - if (!ssr) context.helper(builtIn); - return builtIn; - } - context.helper(RESOLVE_COMPONENT); - context.components.add(tag); - return toValidAssetId(tag, `component`); -} -function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const pushMergeArg = (arg) => { - if (properties.length) { - mergeArgs.push( - createObjectExpression(dedupeProperties(properties), elementLoc) - ); - properties = []; - } - if (arg) mergeArgs.push(arg); - }; - const pushRefVForMarker = () => { - if (context.scopes.vFor > 0) { - properties.push( - createObjectProperty( - createSimpleExpression("ref_for", true), - createSimpleExpression("true") - ) - ); - } - }; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = isOn(name); - if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== "onclick" && // omit v-model handlers - name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks - !isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && isReservedProp(name)) { - hasVnodeHook = true; - } - if (isEventHandler && value.type === 14) { - value = value.arguments[0]; - } - if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { - return; - } - if (name === "ref") { - hasRef = true; - } else if (name === "class") { - hasClassBinding = true; - } else if (name === "style") { - hasStyleBinding = true; - } else if (name !== "key" && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - } else { - hasDynamicKeys = true; - } - }; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 6) { - const { loc, name, nameLoc, value } = prop; - let isStatic = true; - if (name === "ref") { - hasRef = true; - pushRefVForMarker(); - } - if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - ))) { - continue; - } - properties.push( - createObjectProperty( - createSimpleExpression(name, true, nameLoc), - createSimpleExpression( - value ? value.content : "", - isStatic, - value ? value.loc : loc - ) - ) - ); - } else { - const { name, arg, exp, loc, modifiers } = prop; - const isVBind = name === "bind"; - const isVOn = name === "on"; - if (name === "slot") { - if (!isComponent) { - context.onError( - createCompilerError(40, loc) - ); - } - continue; - } - if (name === "once" || name === "memo") { - continue; - } - if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - ))) { - continue; - } - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked - // before children - isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") - ) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, "ref")) { - pushRefVForMarker(); - } - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (isVBind) { - pushRefVForMarker(); - pushMergeArg(); - { - { - const hasOverridableKeys = mergeArgs.some((arg2) => { - if (arg2.type === 15) { - return arg2.properties.some(({ key }) => { - if (key.type !== 4 || !key.isStatic) { - return true; - } - return key.content !== "class" && key.content !== "style" && !isOn(key.content); - }); - } else { - return true; - } - }); - if (hasOverridableKeys) { - checkCompatEnabled( - "COMPILER_V_BIND_OBJECT_ORDER", - context, - loc - ); - } - } - if (isCompatEnabled( - "COMPILER_V_BIND_OBJECT_ORDER", - context - )) { - mergeArgs.unshift(exp); - continue; - } - } - mergeArgs.push(exp); - } else { - pushMergeArg({ - type: 14, - loc, - callee: context.helper(TO_HANDLERS), - arguments: isComponent ? [exp] : [exp, `true`] - }); - } - } else { - context.onError( - createCompilerError( - isVBind ? 34 : 35, - loc - ) - ); - } - continue; - } - if (isVBind && modifiers.some((mod) => mod.content === "prop")) { - patchFlag |= 32; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - const { props: props2, needRuntime } = directiveTransform(prop, node, context); - !ssr && props2.forEach(analyzePatchFlag); - if (isVOn && arg && !isStaticExp(arg)) { - pushMergeArg(createObjectExpression(props2, elementLoc)); - } else { - properties.push(...props2); - } - if (needRuntime) { - runtimeDirectives.push(prop); - if (isSymbol(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } else if (!isBuiltInDirective(name)) { - runtimeDirectives.push(prop); - if (hasChildren) { - shouldUseBlock = true; - } - } - } - } - let propsExpression = void 0; - if (mergeArgs.length) { - pushMergeArg(); - if (mergeArgs.length > 1) { - propsExpression = createCallExpression( - context.helper(MERGE_PROPS), - mergeArgs, - elementLoc - ); - } else { - propsExpression = mergeArgs[0]; - } - } else if (properties.length) { - propsExpression = createObjectExpression( - dedupeProperties(properties), - elementLoc - ); - } - if (hasDynamicKeys) { - patchFlag |= 16; - } else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2; - } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4; - } - if (dynamicPropNames.length) { - patchFlag |= 8; - } - if (hasHydrationEventBinding) { - patchFlag |= 32; - } - } - if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512; - } - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15: - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === "class") { - classKeyIndex = i; - } else if (key.content === "style") { - styleKeyIndex = i; - } - } else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression( - context.helper(NORMALIZE_CLASS), - [classProp.value] - ); - } - if (styleProp && // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17)) { - styleProp.value = createCallExpression( - context.helper(NORMALIZE_STYLE), - [styleProp.value] - ); - } - } else { - propsExpression = createCallExpression( - context.helper(NORMALIZE_PROPS), - [propsExpression] - ); - } - break; - case 14: - break; - default: - propsExpression = createCallExpression( - context.helper(NORMALIZE_PROPS), - [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ] - ); - break; - } - } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; -} -function dedupeProperties(properties) { - const knownProps = /* @__PURE__ */ new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - if (prop.key.type === 8 || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === "style" || name === "class" || isOn(name)) { - mergeAsArray(existing, prop); - } - } else { - knownProps.set(name, prop); - deduped.push(prop); - } - } - return deduped; -} -function mergeAsArray(existing, incoming) { - if (existing.value.type === 17) { - existing.value.elements.push(incoming.value); - } else { - existing.value = createArrayExpression( - [existing.value, incoming.value], - existing.loc - ); - } -} -function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - dirArgs.push(context.helperString(runtime)); - } else { - { - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } - } - const { loc } = dir; - if (dir.exp) dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); - } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push( - createObjectExpression( - dir.modifiers.map( - (modifier) => createObjectProperty(modifier, trueExpression) - ), - loc - ) - ); - } - return createArrayExpression(dirArgs, dir.loc); -} -function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) propsNamesString += ", "; - } - return propsNamesString + `]`; -} -function isComponentTag(tag) { - return tag === "component" || tag === "Component"; -} - -const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - "{}", - "undefined", - "true" - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); - node.codegenNode = createCallExpression( - context.helper(RENDER_SLOT), - slotArgs, - loc - ); - } -}; -function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = void 0; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - if (p.value) { - if (p.name === "name") { - slotName = JSON.stringify(p.value.content); - } else { - p.name = camelize(p.name); - nonNameProps.push(p); - } - } - } else { - if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { - if (p.exp) { - slotName = p.exp; - } else if (p.arg && p.arg.type === 4) { - const name = camelize(p.arg.content); - slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); - } - } else { - if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { - p.arg.content = camelize(p.arg.content); - } - nonNameProps.push(p); - } - } - } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps( - node, - context, - nonNameProps, - false, - false - ); - slotProps = props; - if (directives.length) { - context.onError( - createCompilerError( - 36, - directives[0].loc - ) - ); - } - } - return { - slotName, - slotProps - }; -} - -const transformOn$1 = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35, loc)); - } - let eventName; - if (arg.type === 4) { - if (arg.isStatic) { - let rawName = arg.content; - if (rawName.startsWith("vnode")) { - context.onError(createCompilerError(51, arg.loc)); - } - if (rawName.startsWith("vue:")) { - rawName = `vnode-${rawName.slice(4)}`; - } - const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( - // for non-element and vnode lifecycle event listeners, auto convert - // it to camelCase. See issue #2249 - toHandlerKey(camelize(rawName)) - ) : ( - // preserve case for plain element listeners that have uppercase - // letters, as these may be custom elements' custom events - `on:${rawName}` - ); - eventName = createSimpleExpression(eventString, true, arg.loc); - } else { - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); - } - } else { - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); - } - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = void 0; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp); - const isInlineStatement = !(isMemberExp || isFnExpression(exp)); - const hasMultipleStatements = exp.content.includes(`;`); - { - validateBrowserExpression( - exp, - context, - false, - hasMultipleStatements - ); - } - if (isInlineStatement || shouldCache && isMemberExp) { - exp = createCompoundExpression([ - `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty( - eventName, - exp || createSimpleExpression(`() => {}`, false, loc) - ) - ] - }; - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - ret.props[0].value = context.cache(ret.props[0].value); - } - ret.props.forEach((p) => p.key.isHandlerKey = true); - return ret; -}; - -const transformText = (node, context) => { - if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { - return () => { - const children = node.children; - let currentContainer = void 0; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText$1(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText$1(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression( - [child], - child.loc - ); - } - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } else { - currentContainer = void 0; - break; - } - } - } - } - if (!hasText || // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find( - (p) => p.type === 7 && !context.directiveTransforms[p.name] - ) && // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - !(node.tag === "template"))) { - return; - } - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText$1(child) || child.type === 8) { - const callArgs = []; - if (child.type !== 2 || child.content !== " ") { - callArgs.push(child); - } - if (!context.ssr && getConstantType(child, context) === 0) { - callArgs.push( - 1 + (` /* ${PatchFlagNames[1]} */` ) - ); - } - children[i] = { - type: 12, - content: child, - loc: child.loc, - codegenNode: createCallExpression( - context.helper(CREATE_TEXT), - callArgs - ) - }; - } - } - }; - } -}; - -const seen$1 = /* @__PURE__ */ new WeakSet(); -const transformOnce = (node, context) => { - if (node.type === 1 && findDir(node, "once", true)) { - if (seen$1.has(node) || context.inVOnce || context.inSSR) { - return; - } - seen$1.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache( - cur.codegenNode, - true, - true - ); - } - }; - } -}; - -const transformModel$1 = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError( - createCompilerError(41, dir.loc) - ); - return createTransformProps(); - } - const rawExp = exp.loc.source.trim(); - const expString = exp.type === 4 ? exp.content : rawExp; - const bindingType = context.bindingMetadata[rawExp]; - if (bindingType === "props" || bindingType === "props-aliased") { - context.onError(createCompilerError(44, exp.loc)); - return createTransformProps(); - } - const maybeRef = false; - if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) { - context.onError( - createCompilerError(42, exp.loc) - ); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression("modelValue", true); - const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - if (dir.modifiers.length && node.tagType === 1) { - const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); - const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; - props.push( - createObjectProperty( - modifiersKey, - createSimpleExpression( - `{ ${modifiers} }`, - false, - dir.loc, - 2 - ) - ) - ); - } - return createTransformProps(props); -}; -function createTransformProps(props = []) { - return { props }; -} - -const validDivisionCharRE = /[\w).+\-_$\]]/; -const transformFilter = (node, context) => { - if (!isCompatEnabled("COMPILER_FILTERS", context)) { - return; - } - if (node.type === 5) { - rewriteFilter(node.content, context); - } else if (node.type === 1) { - node.props.forEach((prop) => { - if (prop.type === 7 && prop.name !== "for" && prop.exp) { - rewriteFilter(prop.exp, context); - } - }); - } -}; -function rewriteFilter(node, context) { - if (node.type === 4) { - parseFilter(node, context); - } else { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (typeof child !== "object") continue; - if (child.type === 4) { - parseFilter(child, context); - } else if (child.type === 8) { - rewriteFilter(node, context); - } else if (child.type === 5) { - rewriteFilter(child.content, context); - } - } - } -} -function parseFilter(node, context) { - const exp = node.content; - let inSingle = false; - let inDouble = false; - let inTemplateString = false; - let inRegex = false; - let curly = 0; - let square = 0; - let paren = 0; - let lastFilterIndex = 0; - let c, prev, i, expression, filters = []; - for (i = 0; i < exp.length; i++) { - prev = c; - c = exp.charCodeAt(i); - if (inSingle) { - if (c === 39 && prev !== 92) inSingle = false; - } else if (inDouble) { - if (c === 34 && prev !== 92) inDouble = false; - } else if (inTemplateString) { - if (c === 96 && prev !== 92) inTemplateString = false; - } else if (inRegex) { - if (c === 47 && prev !== 92) inRegex = false; - } else if (c === 124 && // pipe - exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { - if (expression === void 0) { - lastFilterIndex = i + 1; - expression = exp.slice(0, i).trim(); - } else { - pushFilter(); - } - } else { - switch (c) { - case 34: - inDouble = true; - break; - // " - case 39: - inSingle = true; - break; - // ' - case 96: - inTemplateString = true; - break; - // ` - case 40: - paren++; - break; - // ( - case 41: - paren--; - break; - // ) - case 91: - square++; - break; - // [ - case 93: - square--; - break; - // ] - case 123: - curly++; - break; - // { - case 125: - curly--; - break; - } - if (c === 47) { - let j = i - 1; - let p; - for (; j >= 0; j--) { - p = exp.charAt(j); - if (p !== " ") break; - } - if (!p || !validDivisionCharRE.test(p)) { - inRegex = true; - } - } - } - } - if (expression === void 0) { - expression = exp.slice(0, i).trim(); - } else if (lastFilterIndex !== 0) { - pushFilter(); - } - function pushFilter() { - filters.push(exp.slice(lastFilterIndex, i).trim()); - lastFilterIndex = i + 1; - } - if (filters.length) { - warnDeprecation( - "COMPILER_FILTERS", - context, - node.loc - ); - for (i = 0; i < filters.length; i++) { - expression = wrapFilter(expression, filters[i], context); - } - node.content = expression; - node.ast = void 0; - } -} -function wrapFilter(exp, filter, context) { - context.helper(RESOLVE_FILTER); - const i = filter.indexOf("("); - if (i < 0) { - context.filters.add(filter); - return `${toValidAssetId(filter, "filter")}(${exp})`; - } else { - const name = filter.slice(0, i); - const args = filter.slice(i + 1); - context.filters.add(name); - return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; - } -} - -const seen = /* @__PURE__ */ new WeakSet(); -const transformMemo = (node, context) => { - if (node.type === 1) { - const dir = findDir(node, "memo"); - if (!dir || seen.has(node)) { - return; - } - seen.add(node); - return () => { - const codegenNode = node.codegenNode || context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13) { - if (node.tagType !== 1) { - convertToBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(void 0, codegenNode), - `_cache`, - String(context.cached.length) - ]); - context.cached.push(null); - } - }; - } -}; - -function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...[transformFilter] , - ...[transformExpression] , - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn$1, - bind: transformBind, - model: transformModel$1 - } - ]; -} -function baseCompile(source, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === "module"; - { - if (options.prefixIdentifiers === true) { - onError(createCompilerError(47)); - } else if (isModuleMode) { - onError(createCompilerError(48)); - } - } - const prefixIdentifiers = false; - if (options.cacheHandlers) { - onError(createCompilerError(49)); - } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(50)); - } - const resolvedOptions = extend({}, options, { - prefixIdentifiers - }); - const ast = isString(source) ? baseParse(source, resolvedOptions) : source; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); - transform( - ast, - extend({}, resolvedOptions, { - nodeTransforms: [ - ...nodeTransforms, - ...options.nodeTransforms || [] - // user transforms - ], - directiveTransforms: extend( - {}, - directiveTransforms, - options.directiveTransforms || {} - // user transforms - ) - }) - ); - return generate(ast, resolvedOptions); -} - -const BindingTypes = { - "DATA": "data", - "PROPS": "props", - "PROPS_ALIASED": "props-aliased", - "SETUP_LET": "setup-let", - "SETUP_CONST": "setup-const", - "SETUP_REACTIVE_CONST": "setup-reactive-const", - "SETUP_MAYBE_REF": "setup-maybe-ref", - "SETUP_REF": "setup-ref", - "OPTIONS": "options", - "LITERAL_CONST": "literal-const" -}; - -const noopDirectiveTransform = () => ({ props: [] }); - -const V_MODEL_RADIO = Symbol(`vModelRadio` ); -const V_MODEL_CHECKBOX = Symbol( - `vModelCheckbox` -); -const V_MODEL_TEXT = Symbol(`vModelText` ); -const V_MODEL_SELECT = Symbol( - `vModelSelect` -); -const V_MODEL_DYNAMIC = Symbol( - `vModelDynamic` -); -const V_ON_WITH_MODIFIERS = Symbol( - `vOnModifiersGuard` -); -const V_ON_WITH_KEYS = Symbol( - `vOnKeysGuard` -); -const V_SHOW = Symbol(`vShow` ); -const TRANSITION = Symbol(`Transition` ); -const TRANSITION_GROUP = Symbol( - `TransitionGroup` -); -registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` -}); - -let decoder; -function decodeHtmlBrowser(raw, asAttr = false) { - if (!decoder) { - decoder = document.createElement("div"); - } - if (asAttr) { - decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; - return decoder.children[0].getAttribute("foo"); - } else { - decoder.innerHTML = raw; - return decoder.textContent; - } -} - -const parserOptions = { - parseMode: "html", - isVoidTag, - isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), - isPreTag: (tag) => tag === "pre", - isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", - decodeEntities: decodeHtmlBrowser , - isBuiltInComponent: (tag) => { - if (tag === "Transition" || tag === "transition") { - return TRANSITION; - } else if (tag === "TransitionGroup" || tag === "transition-group") { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent, rootNamespace) { - let ns = parent ? parent.ns : rootNamespace; - if (parent && ns === 2) { - if (parent.tag === "annotation-xml") { - if (tag === "svg") { - return 1; - } - if (parent.props.some( - (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") - )) { - ns = 0; - } - } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { - ns = 0; - } - } else if (parent && ns === 1) { - if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { - ns = 0; - } - } - if (ns === 0) { - if (tag === "svg") { - return 1; - } - if (tag === "math") { - return 2; - } - } - return ns; - } -}; - -const transformStyle = (node) => { - if (node.type === 1) { - node.props.forEach((p, i) => { - if (p.type === 6 && p.name === "style" && p.value) { - node.props[i] = { - type: 7, - name: `bind`, - arg: createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } -}; -const parseInlineCSS = (cssText, loc) => { - const normalized = parseStringStyle(cssText); - return createSimpleExpression( - JSON.stringify(normalized), - false, - loc, - 3 - ); -}; - -function createDOMCompilerError(code, loc) { - return createCompilerError( - code, - loc, - DOMErrorMessages - ); -} -const DOMErrorCodes = { - "X_V_HTML_NO_EXPRESSION": 53, - "53": "X_V_HTML_NO_EXPRESSION", - "X_V_HTML_WITH_CHILDREN": 54, - "54": "X_V_HTML_WITH_CHILDREN", - "X_V_TEXT_NO_EXPRESSION": 55, - "55": "X_V_TEXT_NO_EXPRESSION", - "X_V_TEXT_WITH_CHILDREN": 56, - "56": "X_V_TEXT_WITH_CHILDREN", - "X_V_MODEL_ON_INVALID_ELEMENT": 57, - "57": "X_V_MODEL_ON_INVALID_ELEMENT", - "X_V_MODEL_ARG_ON_ELEMENT": 58, - "58": "X_V_MODEL_ARG_ON_ELEMENT", - "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, - "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", - "X_V_MODEL_UNNECESSARY_VALUE": 60, - "60": "X_V_MODEL_UNNECESSARY_VALUE", - "X_V_SHOW_NO_EXPRESSION": 61, - "61": "X_V_SHOW_NO_EXPRESSION", - "X_TRANSITION_INVALID_CHILDREN": 62, - "62": "X_TRANSITION_INVALID_CHILDREN", - "X_IGNORED_SIDE_EFFECT_TAG": 63, - "63": "X_IGNORED_SIDE_EFFECT_TAG", - "__EXTEND_POINT__": 64, - "64": "__EXTEND_POINT__" -}; -const DOMErrorMessages = { - [53]: `v-html is missing expression.`, - [54]: `v-html will override element children.`, - [55]: `v-text is missing expression.`, - [56]: `v-text will override element children.`, - [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [58]: `v-model argument is not supported on plain elements.`, - [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [61]: `v-show is missing expression.`, - [62]: `<Transition> expects exactly one child element or component.`, - [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` -}; - -const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(53, loc) - ); - } - if (node.children.length) { - context.onError( - createDOMCompilerError(54, loc) - ); - node.children.length = 0; - } - return { - props: [ - createObjectProperty( - createSimpleExpression(`innerHTML`, true, loc), - exp || createSimpleExpression("", true) - ) - ] - }; -}; - -const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(55, loc) - ); - } - if (node.children.length) { - context.onError( - createDOMCompilerError(56, loc) - ); - node.children.length = 0; - } - return { - props: [ - createObjectProperty( - createSimpleExpression(`textContent`, true), - exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( - context.helperString(TO_DISPLAY_STRING), - [exp], - loc - ) : createSimpleExpression("", true) - ) - ] - }; -}; - -const transformModel = (dir, node, context) => { - const baseResult = transformModel$1(dir, node, context); - if (!baseResult.props.length || node.tagType === 1) { - return baseResult; - } - if (dir.arg) { - context.onError( - createDOMCompilerError( - 58, - dir.arg.loc - ) - ); - } - function checkDuplicatedValue() { - const value = findDir(node, "bind"); - if (value && isStaticArgOf(value.arg, "value")) { - context.onError( - createDOMCompilerError( - 60, - value.loc - ) - ); - } - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === "input" || isCustomElement) { - const type = findProp(node, `type`); - if (type) { - if (type.type === 7) { - directiveToUse = V_MODEL_DYNAMIC; - } else if (type.value) { - switch (type.value.content) { - case "radio": - directiveToUse = V_MODEL_RADIO; - break; - case "checkbox": - directiveToUse = V_MODEL_CHECKBOX; - break; - case "file": - isInvalidType = true; - context.onError( - createDOMCompilerError( - 59, - dir.loc - ) - ); - break; - default: - checkDuplicatedValue(); - break; - } - } - } else if (hasDynamicKeyVBind(node)) { - directiveToUse = V_MODEL_DYNAMIC; - } else { - checkDuplicatedValue(); - } - } else if (tag === "select") { - directiveToUse = V_MODEL_SELECT; - } else { - checkDuplicatedValue(); - } - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } else { - context.onError( - createDOMCompilerError( - 57, - dir.loc - ) - ); - } - baseResult.props = baseResult.props.filter( - (p) => !(p.key.type === 4 && p.key.content === "modelValue") - ); - return baseResult; -}; - -const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); -const isNonKeyModifier = /* @__PURE__ */ makeMap( - // event propagation management - `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` -); -const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); -const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`); -const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i].content; - if (modifier === "native" && checkCompatEnabled( - "COMPILER_V_ON_NATIVE", - context, - loc - )) { - eventOptionModifiers.push(modifier); - } else if (isEventOptionModifier(modifier)) { - eventOptionModifiers.push(modifier); - } else { - if (maybeKeyModifier(modifier)) { - if (isStaticExp(key)) { - if (isKeyboardEvent(key.content.toLowerCase())) { - keyModifiers.push(modifier); - } else { - nonKeyModifiers.push(modifier); - } - } else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } else { - keyModifiers.push(modifier); - } - } - } - } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; -}; -const transformClick = (key, event) => { - const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; - return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) : key; -}; -const transformOn = (dir, node, context) => { - return transformOn$1(dir, node, context, (baseResult) => { - const { modifiers } = dir; - if (!modifiers.length) return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - if (nonKeyModifiers.includes("right")) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes("middle")) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard - (!isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); - key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [createObjectProperty(key, handlerExp)] - }; - }); -}; - -const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(61, loc) - ); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; -}; - -const transformTransition = (node, context) => { - if (node.type === 1 && node.tagType === 1) { - const component = context.isBuiltInComponent(node.tag); - if (component === TRANSITION) { - return () => { - if (!node.children.length) { - return; - } - if (hasMultipleChildren(node)) { - context.onError( - createDOMCompilerError( - 62, - { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: "" - } - ) - ); - } - const child = node.children[0]; - if (child.type === 1) { - for (const p of child.props) { - if (p.type === 7 && p.name === "show") { - node.props.push({ - type: 6, - name: "persisted", - nameLoc: node.loc, - value: void 0, - loc: node.loc - }); - } - } - } - }; - } - } -}; -function hasMultipleChildren(node) { - const children = node.children = node.children.filter( - (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) - ); - const child = children[0]; - return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); -} - -const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { - context.onError( - createDOMCompilerError( - 63, - node.loc - ) - ); - context.removeNode(); - } -}; - -function isValidHTMLNesting(parent, child) { - if (parent in onlyValidChildren) { - return onlyValidChildren[parent].has(child); - } - if (child in onlyValidParents) { - return onlyValidParents[child].has(parent); - } - if (parent in knownInvalidChildren) { - if (knownInvalidChildren[parent].has(child)) return false; - } - if (child in knownInvalidParents) { - if (knownInvalidParents[child].has(parent)) return false; - } - return true; -} -const headings = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]); -const emptySet = /* @__PURE__ */ new Set([]); -const onlyValidChildren = { - head: /* @__PURE__ */ new Set([ - "base", - "basefront", - "bgsound", - "link", - "meta", - "title", - "noscript", - "noframes", - "style", - "script", - "template" - ]), - optgroup: /* @__PURE__ */ new Set(["option"]), - select: /* @__PURE__ */ new Set(["optgroup", "option", "hr"]), - // table - table: /* @__PURE__ */ new Set(["caption", "colgroup", "tbody", "tfoot", "thead"]), - tr: /* @__PURE__ */ new Set(["td", "th"]), - colgroup: /* @__PURE__ */ new Set(["col"]), - tbody: /* @__PURE__ */ new Set(["tr"]), - thead: /* @__PURE__ */ new Set(["tr"]), - tfoot: /* @__PURE__ */ new Set(["tr"]), - // these elements can not have any children elements - script: emptySet, - iframe: emptySet, - option: emptySet, - textarea: emptySet, - style: emptySet, - title: emptySet -}; -const onlyValidParents = { - // sections - html: emptySet, - body: /* @__PURE__ */ new Set(["html"]), - head: /* @__PURE__ */ new Set(["html"]), - // table - td: /* @__PURE__ */ new Set(["tr"]), - colgroup: /* @__PURE__ */ new Set(["table"]), - caption: /* @__PURE__ */ new Set(["table"]), - tbody: /* @__PURE__ */ new Set(["table"]), - tfoot: /* @__PURE__ */ new Set(["table"]), - col: /* @__PURE__ */ new Set(["colgroup"]), - th: /* @__PURE__ */ new Set(["tr"]), - thead: /* @__PURE__ */ new Set(["table"]), - tr: /* @__PURE__ */ new Set(["tbody", "thead", "tfoot"]), - // data list - dd: /* @__PURE__ */ new Set(["dl", "div"]), - dt: /* @__PURE__ */ new Set(["dl", "div"]), - // other - figcaption: /* @__PURE__ */ new Set(["figure"]), - // li: new Set(["ul", "ol"]), - summary: /* @__PURE__ */ new Set(["details"]), - area: /* @__PURE__ */ new Set(["map"]) -}; -const knownInvalidChildren = { - p: /* @__PURE__ */ new Set([ - "address", - "article", - "aside", - "blockquote", - "center", - "details", - "dialog", - "dir", - "div", - "dl", - "fieldset", - "figure", - "footer", - "form", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "header", - "hgroup", - "hr", - "li", - "main", - "nav", - "menu", - "ol", - "p", - "pre", - "section", - "table", - "ul" - ]), - svg: /* @__PURE__ */ new Set([ - "b", - "blockquote", - "br", - "code", - "dd", - "div", - "dl", - "dt", - "em", - "embed", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "hr", - "i", - "img", - "li", - "menu", - "meta", - "ol", - "p", - "pre", - "ruby", - "s", - "small", - "span", - "strong", - "sub", - "sup", - "table", - "u", - "ul", - "var" - ]) -}; -const knownInvalidParents = { - a: /* @__PURE__ */ new Set(["a"]), - button: /* @__PURE__ */ new Set(["button"]), - dd: /* @__PURE__ */ new Set(["dd", "dt"]), - dt: /* @__PURE__ */ new Set(["dd", "dt"]), - form: /* @__PURE__ */ new Set(["form"]), - li: /* @__PURE__ */ new Set(["li"]), - h1: headings, - h2: headings, - h3: headings, - h4: headings, - h5: headings, - h6: headings -}; - -const validateHtmlNesting = (node, context) => { - if (node.type === 1 && node.tagType === 0 && context.parent && context.parent.type === 1 && context.parent.tagType === 0 && !isValidHTMLNesting(context.parent.tag, node.tag)) { - const error = new SyntaxError( - `<${node.tag}> cannot be child of <${context.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.` - ); - error.loc = node.loc; - context.onWarn(error); - } -}; - -const DOMNodeTransforms = [ - transformStyle, - ...[transformTransition, validateHtmlNesting] -]; -const DOMDirectiveTransforms = { - cloak: noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel, - // override compiler-core - on: transformOn, - // override compiler-core - show: transformShow -}; -function compile(src, options = {}) { - return baseCompile( - src, - extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...options.nodeTransforms || [] - ], - directiveTransforms: extend( - {}, - DOMDirectiveTransforms, - options.directiveTransforms || {} - ), - transformHoist: null - }) - ); -} -function parse(template, options = {}) { - return baseParse(template, extend({}, parserOptions, options)); -} - -export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, DOMDirectiveTransforms, DOMErrorCodes, DOMErrorMessages, DOMNodeTransforms, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, Namespaces, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TRANSITION, TRANSITION_GROUP, TS_NODE_TYPES, UNREF, V_MODEL_CHECKBOX, V_MODEL_DYNAMIC, V_MODEL_RADIO, V_MODEL_SELECT, V_MODEL_TEXT, V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS, V_SHOW, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, compile, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createDOMCompilerError, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, errorMessages, extractIdentifiers, findDir, findProp, forAliasRE, generate, generateCodeFrame, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isCoreComponent, isFnExpression, isFnExpressionBrowser, isFnExpressionNode, isFunctionType, isInDestructureAssignment, isInNewExpression, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText$1 as isText, isVSlot, locStub, noopDirectiveTransform, parse, parserOptions, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel$1 as transformModel, transformOn$1 as transformOn, transformStyle, traverseNode, unwrapTSNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation }; diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js deleted file mode 100644 index f473ca6..0000000 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +++ /dev/null @@ -1,11 +0,0 @@ -/** -* @vue/compiler-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let e;function t(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let n={},i=()=>{},s=()=>!1,r=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),o=Object.assign,a=Array.isArray,l=e=>"string"==typeof e,c=e=>"symbol"==typeof e,h=e=>null!==e&&"object"==typeof e,p=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),d=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),u=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},f=/-(\w)/g,E=u(e=>e.replace(f,(e,t)=>t?t.toUpperCase():"")),_=u(e=>e.charAt(0).toUpperCase()+e.slice(1)),m=u(e=>e?`on${_(e)}`:"");function S(e,t=0,n=e.length){if((t=Math.max(0,Math.min(t,e.length)))>(n=Math.max(0,Math.min(n,e.length))))return"";let i=e.split(/(\r?\n)/),s=i.filter((e,t)=>t%2==1);i=i.filter((e,t)=>t%2==0);let r=0,o=[];for(let e=0;e<i.length;e++)if((r+=i[e].length+(s[e]&&s[e].length||0))>=t){for(let a=e-2;a<=e+2||n>r;a++){if(a<0||a>=i.length)continue;let l=a+1;o.push(`${l}${" ".repeat(Math.max(3-String(l).length,0))}| ${i[a]}`);let c=i[a].length,h=s[a]&&s[a].length||0;if(a===e){let e=t-(r-(c+h)),i=Math.max(1,n>r?c-e:n-t);o.push(" | "+" ".repeat(e)+"^".repeat(i))}else if(a>e){if(n>r){let e=Math.max(Math.min(n-r,c),1);o.push(" | "+"^".repeat(e))}r+=c+h}}break}return o.join("\n")}let g=/;(?![^(]*\))/g,T=/:([^]+)/,N=/\/\*[^]*?\*\//g,I=t("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),y=t("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),O=t("annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"),A=t("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),C=Symbol(""),b=Symbol(""),R=Symbol(""),v=Symbol(""),x=Symbol(""),L=Symbol(""),M=Symbol(""),P=Symbol(""),D=Symbol(""),V=Symbol(""),k=Symbol(""),X=Symbol(""),w=Symbol(""),U=Symbol(""),F=Symbol(""),B=Symbol(""),$=Symbol(""),H=Symbol(""),G=Symbol(""),q=Symbol(""),J=Symbol(""),j=Symbol(""),W=Symbol(""),K=Symbol(""),Y=Symbol(""),Q=Symbol(""),z=Symbol(""),Z=Symbol(""),ee=Symbol(""),et=Symbol(""),en=Symbol(""),ei=Symbol(""),es=Symbol(""),er=Symbol(""),eo=Symbol(""),ea=Symbol(""),el=Symbol(""),ec=Symbol(""),eh=Symbol(""),ep={[C]:"Fragment",[b]:"Teleport",[R]:"Suspense",[v]:"KeepAlive",[x]:"BaseTransition",[L]:"openBlock",[M]:"createBlock",[P]:"createElementBlock",[D]:"createVNode",[V]:"createElementVNode",[k]:"createCommentVNode",[X]:"createTextVNode",[w]:"createStaticVNode",[U]:"resolveComponent",[F]:"resolveDynamicComponent",[B]:"resolveDirective",[$]:"resolveFilter",[H]:"withDirectives",[G]:"renderList",[q]:"renderSlot",[J]:"createSlots",[j]:"toDisplayString",[W]:"mergeProps",[K]:"normalizeClass",[Y]:"normalizeStyle",[Q]:"normalizeProps",[z]:"guardReactiveProps",[Z]:"toHandlers",[ee]:"camelize",[et]:"capitalize",[en]:"toHandlerKey",[ei]:"setBlockTracking",[es]:"pushScopeId",[er]:"popScopeId",[eo]:"withCtx",[ea]:"unref",[el]:"isRef",[ec]:"withMemo",[eh]:"isMemoSame"};function ed(e){Object.getOwnPropertySymbols(e).forEach(t=>{ep[t]=e[t]})}let eu={HTML:0,0:"HTML",SVG:1,1:"SVG",MATH_ML:2,2:"MATH_ML"},ef={ROOT:0,0:"ROOT",ELEMENT:1,1:"ELEMENT",TEXT:2,2:"TEXT",COMMENT:3,3:"COMMENT",SIMPLE_EXPRESSION:4,4:"SIMPLE_EXPRESSION",INTERPOLATION:5,5:"INTERPOLATION",ATTRIBUTE:6,6:"ATTRIBUTE",DIRECTIVE:7,7:"DIRECTIVE",COMPOUND_EXPRESSION:8,8:"COMPOUND_EXPRESSION",IF:9,9:"IF",IF_BRANCH:10,10:"IF_BRANCH",FOR:11,11:"FOR",TEXT_CALL:12,12:"TEXT_CALL",VNODE_CALL:13,13:"VNODE_CALL",JS_CALL_EXPRESSION:14,14:"JS_CALL_EXPRESSION",JS_OBJECT_EXPRESSION:15,15:"JS_OBJECT_EXPRESSION",JS_PROPERTY:16,16:"JS_PROPERTY",JS_ARRAY_EXPRESSION:17,17:"JS_ARRAY_EXPRESSION",JS_FUNCTION_EXPRESSION:18,18:"JS_FUNCTION_EXPRESSION",JS_CONDITIONAL_EXPRESSION:19,19:"JS_CONDITIONAL_EXPRESSION",JS_CACHE_EXPRESSION:20,20:"JS_CACHE_EXPRESSION",JS_BLOCK_STATEMENT:21,21:"JS_BLOCK_STATEMENT",JS_TEMPLATE_LITERAL:22,22:"JS_TEMPLATE_LITERAL",JS_IF_STATEMENT:23,23:"JS_IF_STATEMENT",JS_ASSIGNMENT_EXPRESSION:24,24:"JS_ASSIGNMENT_EXPRESSION",JS_SEQUENCE_EXPRESSION:25,25:"JS_SEQUENCE_EXPRESSION",JS_RETURN_STATEMENT:26,26:"JS_RETURN_STATEMENT"},eE={ELEMENT:0,0:"ELEMENT",COMPONENT:1,1:"COMPONENT",SLOT:2,2:"SLOT",TEMPLATE:3,3:"TEMPLATE"},e_={NOT_CONSTANT:0,0:"NOT_CONSTANT",CAN_SKIP_PATCH:1,1:"CAN_SKIP_PATCH",CAN_CACHE:2,2:"CAN_CACHE",CAN_STRINGIFY:3,3:"CAN_STRINGIFY"},em={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function eS(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:em}}function eg(e,t,n,i,s,r,o,a=!1,l=!1,c=!1,h=em){return e&&(a?(e.helper(L),e.helper(eX(e.inSSR,c))):e.helper(ek(e.inSSR,c)),o&&e.helper(H)),{type:13,tag:t,props:n,children:i,patchFlag:s,dynamicProps:r,directives:o,isBlock:a,disableTracking:l,isComponent:c,loc:h}}function eT(e,t=em){return{type:17,loc:t,elements:e}}function eN(e,t=em){return{type:15,loc:t,properties:e}}function eI(e,t){return{type:16,loc:em,key:l(e)?ey(e,!0):e,value:t}}function ey(e,t=!1,n=em,i=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:i}}function eO(e,t){return{type:5,loc:t,content:l(e)?ey(e,!1,t):e}}function eA(e,t=em){return{type:8,loc:t,children:e}}function eC(e,t=[],n=em){return{type:14,loc:n,callee:e,arguments:t}}function eb(e,t,n=!1,i=!1,s=em){return{type:18,params:e,returns:t,newline:n,isSlot:i,loc:s}}function eR(e,t,n,i=!0){return{type:19,test:e,consequent:t,alternate:n,newline:i,loc:em}}function ev(e,t,n=!1,i=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:i,needArraySpread:!1,loc:em}}function ex(e){return{type:21,body:e,loc:em}}function eL(e){return{type:22,elements:e,loc:em}}function eM(e,t,n){return{type:23,test:e,consequent:t,alternate:n,loc:em}}function eP(e,t){return{type:24,left:e,right:t,loc:em}}function eD(e){return{type:25,expressions:e,loc:em}}function eV(e){return{type:26,returns:e,loc:em}}function ek(e,t){return e||t?D:V}function eX(e,t){return e||t?M:P}function ew(e,{helper:t,removeHelper:n,inSSR:i}){e.isBlock||(e.isBlock=!0,n(ek(i,e.isComponent)),t(L),t(eX(i,e.isComponent)))}let eU=new Uint8Array([123,123]),eF=new Uint8Array([125,125]);function eB(e){return e>=97&&e<=122||e>=65&&e<=90}function e$(e){return 32===e||10===e||9===e||12===e||13===e}function eH(e){return 47===e||62===e||e$(e)}function eG(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}let eq={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])},eJ={COMPILER_IS_ON_ELEMENT:"COMPILER_IS_ON_ELEMENT",COMPILER_V_BIND_SYNC:"COMPILER_V_BIND_SYNC",COMPILER_V_BIND_OBJECT_ORDER:"COMPILER_V_BIND_OBJECT_ORDER",COMPILER_V_ON_NATIVE:"COMPILER_V_ON_NATIVE",COMPILER_V_IF_V_FOR_PRECEDENCE:"COMPILER_V_IF_V_FOR_PRECEDENCE",COMPILER_NATIVE_TEMPLATE:"COMPILER_NATIVE_TEMPLATE",COMPILER_INLINE_TEMPLATE:"COMPILER_INLINE_TEMPLATE",COMPILER_FILTERS:"COMPILER_FILTERS"},ej={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function eW(e,{compatConfig:t}){let n=t&&t[e];return"MODE"===e?n||3:n}function eK(e,t){let n=eW("MODE",t),i=eW(e,t);return 3===n?!0===i:!1!==i}function eY(e,t,n,...i){return eK(e,t)}function eQ(e,t,n,...i){if("suppress-warning"===eW(e,t))return;let{message:s,link:r}=ej[e],o=SyntaxError(`(deprecation ${e}) ${"function"==typeof s?s(...i):s}${r?` - Details: ${r}`:""}`);o.code=e,n&&(o.loc=n),t.onWarn(o)}function ez(e){throw e}function eZ(e){}function e1(e,t,n,i){let s=SyntaxError(String(`https://vuejs.org/error-reference/#compiler-${e}`));return s.code=e,s.loc=t,s}let e0={ABRUPT_CLOSING_OF_EMPTY_COMMENT:0,0:"ABRUPT_CLOSING_OF_EMPTY_COMMENT",CDATA_IN_HTML_CONTENT:1,1:"CDATA_IN_HTML_CONTENT",DUPLICATE_ATTRIBUTE:2,2:"DUPLICATE_ATTRIBUTE",END_TAG_WITH_ATTRIBUTES:3,3:"END_TAG_WITH_ATTRIBUTES",END_TAG_WITH_TRAILING_SOLIDUS:4,4:"END_TAG_WITH_TRAILING_SOLIDUS",EOF_BEFORE_TAG_NAME:5,5:"EOF_BEFORE_TAG_NAME",EOF_IN_CDATA:6,6:"EOF_IN_CDATA",EOF_IN_COMMENT:7,7:"EOF_IN_COMMENT",EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT:8,8:"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",EOF_IN_TAG:9,9:"EOF_IN_TAG",INCORRECTLY_CLOSED_COMMENT:10,10:"INCORRECTLY_CLOSED_COMMENT",INCORRECTLY_OPENED_COMMENT:11,11:"INCORRECTLY_OPENED_COMMENT",INVALID_FIRST_CHARACTER_OF_TAG_NAME:12,12:"INVALID_FIRST_CHARACTER_OF_TAG_NAME",MISSING_ATTRIBUTE_VALUE:13,13:"MISSING_ATTRIBUTE_VALUE",MISSING_END_TAG_NAME:14,14:"MISSING_END_TAG_NAME",MISSING_WHITESPACE_BETWEEN_ATTRIBUTES:15,15:"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",NESTED_COMMENT:16,16:"NESTED_COMMENT",UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME:17,17:"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE:18,18:"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME:19,19:"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",UNEXPECTED_NULL_CHARACTER:20,20:"UNEXPECTED_NULL_CHARACTER",UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME:21,21:"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",UNEXPECTED_SOLIDUS_IN_TAG:22,22:"UNEXPECTED_SOLIDUS_IN_TAG",X_INVALID_END_TAG:23,23:"X_INVALID_END_TAG",X_MISSING_END_TAG:24,24:"X_MISSING_END_TAG",X_MISSING_INTERPOLATION_END:25,25:"X_MISSING_INTERPOLATION_END",X_MISSING_DIRECTIVE_NAME:26,26:"X_MISSING_DIRECTIVE_NAME",X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END:27,27:"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",X_V_IF_NO_EXPRESSION:28,28:"X_V_IF_NO_EXPRESSION",X_V_IF_SAME_KEY:29,29:"X_V_IF_SAME_KEY",X_V_ELSE_NO_ADJACENT_IF:30,30:"X_V_ELSE_NO_ADJACENT_IF",X_V_FOR_NO_EXPRESSION:31,31:"X_V_FOR_NO_EXPRESSION",X_V_FOR_MALFORMED_EXPRESSION:32,32:"X_V_FOR_MALFORMED_EXPRESSION",X_V_FOR_TEMPLATE_KEY_PLACEMENT:33,33:"X_V_FOR_TEMPLATE_KEY_PLACEMENT",X_V_BIND_NO_EXPRESSION:34,34:"X_V_BIND_NO_EXPRESSION",X_V_ON_NO_EXPRESSION:35,35:"X_V_ON_NO_EXPRESSION",X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET:36,36:"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",X_V_SLOT_MIXED_SLOT_USAGE:37,37:"X_V_SLOT_MIXED_SLOT_USAGE",X_V_SLOT_DUPLICATE_SLOT_NAMES:38,38:"X_V_SLOT_DUPLICATE_SLOT_NAMES",X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN:39,39:"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",X_V_SLOT_MISPLACED:40,40:"X_V_SLOT_MISPLACED",X_V_MODEL_NO_EXPRESSION:41,41:"X_V_MODEL_NO_EXPRESSION",X_V_MODEL_MALFORMED_EXPRESSION:42,42:"X_V_MODEL_MALFORMED_EXPRESSION",X_V_MODEL_ON_SCOPE_VARIABLE:43,43:"X_V_MODEL_ON_SCOPE_VARIABLE",X_V_MODEL_ON_PROPS:44,44:"X_V_MODEL_ON_PROPS",X_INVALID_EXPRESSION:45,45:"X_INVALID_EXPRESSION",X_KEEP_ALIVE_INVALID_CHILDREN:46,46:"X_KEEP_ALIVE_INVALID_CHILDREN",X_PREFIX_ID_NOT_SUPPORTED:47,47:"X_PREFIX_ID_NOT_SUPPORTED",X_MODULE_MODE_NOT_SUPPORTED:48,48:"X_MODULE_MODE_NOT_SUPPORTED",X_CACHE_HANDLER_NOT_SUPPORTED:49,49:"X_CACHE_HANDLER_NOT_SUPPORTED",X_SCOPE_ID_NOT_SUPPORTED:50,50:"X_SCOPE_ID_NOT_SUPPORTED",X_VNODE_HOOKS:51,51:"X_VNODE_HOOKS",X_V_BIND_INVALID_SAME_NAME_ARGUMENT:52,52:"X_V_BIND_INVALID_SAME_NAME_ARGUMENT",__EXTEND_POINT__:53,53:"__EXTEND_POINT__"},e2={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '<!--' in comment.",17:"Attribute name cannot contain U+0022 (\"), U+0027 ('), and U+003C (<).",18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",52:"v-bind with same-name shorthand only allows static argument.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:`v-model cannot be used on a prop, because local prop bindings are not writable. -Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""};function e3(e,t,n=!1,i=[],s=Object.create(null)){}function e4(e,t,n){return!1}function e6(e,t){if(e&&("ObjectProperty"===e.type||"ArrayPattern"===e.type)){let e=t.length;for(;e--;){let n=t[e];if("AssignmentExpression"===n.type)return!0;if("ObjectProperty"!==n.type&&!n.type.endsWith("Pattern"))break}}return!1}function e5(e){let t=e.length;for(;t--;){let n=e[t];if("NewExpression"===n.type)return!0;if("MemberExpression"!==n.type)break}return!1}function e9(e,t){for(let n of e.params)for(let e of e8(n))t(e)}function e7(e,t){for(let n of e.body)if("VariableDeclaration"===n.type){if(n.declare)continue;for(let e of n.declarations)for(let n of e8(e.id))t(n)}else if("FunctionDeclaration"===n.type||"ClassDeclaration"===n.type){if(n.declare||!n.id)continue;t(n.id)}else("ForOfStatement"===n.type||"ForInStatement"===n.type||"ForStatement"===n.type)&&function(e,t,n){let i="ForStatement"===e.type?e.init:e.left;if(i&&"VariableDeclaration"===i.type&&("var"===i.kind?t:!t))for(let e of i.declarations)for(let t of e8(e.id))n(t)}(n,!0,t)}function e8(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let n=e;for(;"MemberExpression"===n.type;)n=n.object;t.push(n);break;case"ObjectPattern":for(let n of e.properties)"RestElement"===n.type?e8(n.argument,t):e8(n.value,t);break;case"ArrayPattern":e.elements.forEach(e=>{e&&e8(e,t)});break;case"RestElement":e8(e.argument,t);break;case"AssignmentPattern":e8(e.left,t)}return t}let te=e=>/Function(?:Expression|Declaration)$|Method$/.test(e.type),tt=e=>e&&("ObjectProperty"===e.type||"ObjectMethod"===e.type)&&!e.computed,tn=(e,t)=>tt(t)&&t.key===e,ti=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"];function ts(e){return ti.includes(e.type)?ts(e.expression):e}let tr=e=>4===e.type&&e.isStatic;function to(e){switch(e){case"Teleport":case"teleport":return b;case"Suspense":case"suspense":return R;case"KeepAlive":case"keep-alive":return v;case"BaseTransition":case"base-transition":return x}}let ta=/^\d|[^\$\w\xA0-\uFFFF]/,tl=e=>!ta.test(e),tc=/[A-Za-z_$\xA0-\uFFFF]/,th=/[\.\?\w$\xA0-\uFFFF]/,tp=/\s+[.[]\s*|\s*[.[]\s+/g,td=e=>4===e.type?e.content:e.loc.source,tu=e=>{let t=td(e).trim().replace(tp,e=>e.trim()),n=0,i=[],s=0,r=0,o=null;for(let e=0;e<t.length;e++){let a=t.charAt(e);switch(n){case 0:if("["===a)i.push(n),n=1,s++;else if("("===a)i.push(n),n=2,r++;else if(!(0===e?tc:th).test(a))return!1;break;case 1:"'"===a||'"'===a||"`"===a?(i.push(n),n=3,o=a):"["===a?s++:"]"!==a||--s||(n=i.pop());break;case 2:if("'"===a||'"'===a||"`"===a)i.push(n),n=3,o=a;else if("("===a)r++;else if(")"===a){if(e===t.length-1)return!1;--r||(n=i.pop())}break;case 3:a===o&&(n=i.pop(),o=null)}}return!s&&!r},tf=i,tE=tu,t_=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,tm=e=>t_.test(td(e)),tS=i,tg=tm;function tT(e,t,n=t.length){return tN({offset:e.offset,line:e.line,column:e.column},t,n)}function tN(e,t,n=t.length){let i=0,s=-1;for(let e=0;e<n;e++)10===t.charCodeAt(e)&&(i++,s=e);return e.offset+=n,e.line+=i,e.column=-1===s?e.column+n:n-s,e}function tI(e,t){if(!e)throw Error(t||"unexpected compiler condition")}function ty(e,t,n=!1){for(let i=0;i<e.props.length;i++){let s=e.props[i];if(7===s.type&&(n||s.exp)&&(l(t)?s.name===t:t.test(s.name)))return s}}function tO(e,t,n=!1,i=!1){for(let s=0;s<e.props.length;s++){let r=e.props[s];if(6===r.type){if(n)continue;if(r.name===t&&(r.value||i))return r}else if("bind"===r.name&&(r.exp||i)&&tA(r.arg,t))return r}}function tA(e,t){return!!(e&&tr(e)&&e.content===t)}function tC(e){return e.props.some(e=>7===e.type&&"bind"===e.name&&(!e.arg||4!==e.arg.type||!e.arg.isStatic))}function tb(e){return 5===e.type||2===e.type}function tR(e){return 7===e.type&&"slot"===e.name}function tv(e){return 1===e.type&&3===e.tagType}function tx(e){return 1===e.type&&2===e.tagType}let tL=new Set([Q,z]);function tM(e,t,n){let i,s;let r=13===e.type?e.props:e.arguments[2],o=[];if(r&&!l(r)&&14===r.type){let e=function e(t,n=[]){if(t&&!l(t)&&14===t.type){let i=t.callee;if(!l(i)&&tL.has(i))return e(t.arguments[0],n.concat(t))}return[t,n]}(r);r=e[0],s=(o=e[1])[o.length-1]}if(null==r||l(r))i=eN([t]);else if(14===r.type){let e=r.arguments[0];l(e)||15!==e.type?r.callee===Z?i=eC(n.helper(W),[eN([t]),r]):r.arguments.unshift(eN([t])):tP(t,e)||e.properties.unshift(t),i||(i=r)}else 15===r.type?(tP(t,r)||r.properties.unshift(t),i=r):(i=eC(n.helper(W),[eN([t]),r]),s&&s.callee===z&&(s=o[o.length-2]));13===e.type?s?s.arguments[0]=i:e.props=i:s?s.arguments[0]=i:e.arguments[2]=i}function tP(e,t){let n=!1;if(4===e.key.type){let i=e.key.content;n=t.properties.some(e=>4===e.key.type&&e.key.content===i)}return n}function tD(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>"-"===t?"_":e.charCodeAt(n).toString())}`}function tV(e,t){if(!e||0===Object.keys(t).length)return!1;switch(e.type){case 1:for(let n=0;n<e.props.length;n++){let i=e.props[n];if(7===i.type&&(tV(i.arg,t)||tV(i.exp,t)))return!0}return e.children.some(e=>tV(e,t));case 11:if(tV(e.source,t))return!0;return e.children.some(e=>tV(e,t));case 9:return e.branches.some(e=>tV(e,t));case 10:if(tV(e.condition,t))return!0;return e.children.some(e=>tV(e,t));case 4:return!e.isStatic&&tl(e.content)&&!!t[e.content];case 8:return e.children.some(e=>h(e)&&tV(e,t));case 5:case 12:return tV(e.content,t);default:return!1}}function tk(e){return 14===e.type&&e.callee===ec?e.arguments[1].returns:e}let tX=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,tw={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:s,isPreTag:s,isIgnoreNewlineTag:s,isCustomElement:s,onError:ez,onWarn:eZ,comments:!1,prefixIdentifiers:!1},tU=tw,tF=null,tB="",t$=null,tH=null,tG="",tq=-1,tJ=-1,tj=0,tW=!1,tK=null,tY=[],tQ=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=eU,this.delimiterClose=eF,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=eU,this.delimiterClose=eF}getPos(e){let t=1,n=e+1;for(let i=this.newlines.length-1;i>=0;i--){let s=this.newlines[i];if(e>s){t=i+2,n=e-s;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex]){if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++}else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(t?eH(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t){this.sequenceIndex++;return}}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||e$(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart<t){let e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}this.sectionStart=t+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence!==eq.TitleEnd&&(this.currentSequence!==eq.TextareaEnd||this.inSFCRoot)?this.fastForwardTo(60)&&(this.sequenceIndex=1):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===eq.Cdata[this.sequenceIndex]?++this.sequenceIndex===eq.Cdata.length&&(this.state=28,this.currentSequence=eq.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){let t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===eq.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){33===e?(this.state=22,this.sectionStart=this.index+1):63===e?(this.state=24,this.sectionStart=this.index+1):eB(e)?(this.sectionStart=this.index,0===this.mode?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:116===e?this.state=30:this.state=115===e?29:6):47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){eH(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(eH(e)){let t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(eG("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){e$(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=eB(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||e$(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):e$(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):e$(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||eH(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||eH(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||eH(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||eH(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||eH(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):e$(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):e$(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){e$(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(39===e||60===e||61===e||96===e)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=eq.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===eq.ScriptEnd[3]?this.startSpecial(eq.ScriptEnd,4):e===eq.StyleEnd[3]?this.startSpecial(eq.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===eq.TitleEnd[3]?this.startSpecial(eq.TitleEnd,4):e===eq.TextareaEnd[3]?this.startSpecial(eq.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){let e=this.buffer.charCodeAt(this.index);switch(10===e&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(19===this.state||20===this.state||21===this.state)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){let e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===eq.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(tY,{onerr:ns,ontext(e,t){t2(t1(e,t),e,t)},ontextentity(e,t,n){t2(e,t,n)},oninterpolation(e,t){if(tW)return t2(t1(e,t),e,t);let n=e+tQ.delimiterOpen.length,i=t-tQ.delimiterClose.length;for(;e$(tB.charCodeAt(n));)n++;for(;e$(tB.charCodeAt(i-1));)i--;let s=t1(n,i);s.includes("&")&&(s=tU.decodeEntities(s,!1)),ne({type:5,content:ni(s,!1,nt(n,i)),loc:nt(e,t)})},onopentagname(e,t){let n=t1(e,t);t$={type:1,tag:n,ns:tU.getNamespace(n,tY[0],tU.ns),tagType:0,props:[],children:[],loc:nt(e-1,t),codegenNode:void 0}},onopentagend(e){t0(e)},onclosetag(e,t){let n=t1(e,t);if(!tU.isVoidTag(n)){let i=!1;for(let e=0;e<tY.length;e++)if(tY[e].tag.toLowerCase()===n.toLowerCase()){i=!0,e>0&&tY[0].loc.start.offset;for(let n=0;n<=e;n++)t3(tY.shift(),t,n<e);break}i||t4(e,60)}},onselfclosingtag(e){let t=t$.tag;t$.isSelfClosing=!0,t0(e),tY[0]&&tY[0].tag===t&&t3(tY.shift(),e)},onattribname(e,t){tH={type:6,name:t1(e,t),nameLoc:nt(e,t),value:void 0,loc:nt(e)}},ondirname(e,t){let n=t1(e,t),i="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(tW||""===i)tH={type:6,name:n,nameLoc:nt(e,t),value:void 0,loc:nt(e)};else if(tH={type:7,name:i,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?[ey("prop")]:[],loc:nt(e)},"pre"===i){tW=tQ.inVPre=!0,tK=t$;let e=t$.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=function(e){let t={type:6,name:e.rawName,nameLoc:nt(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){let n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}(e[t]))}},ondirarg(e,t){if(e===t)return;let n=t1(e,t);if(tW)tH.name+=n,nn(tH.nameLoc,t);else{let i="["!==n[0];tH.arg=ni(i?n:n.slice(1,-1),i,nt(e,t),i?3:0)}},ondirmodifier(e,t){let n=t1(e,t);if(tW)tH.name+="."+n,nn(tH.nameLoc,t);else if("slot"===tH.name){let e=tH.arg;e&&(e.content+="."+n,nn(e.loc,t))}else{let i=ey(n,!0,nt(e,t));tH.modifiers.push(i)}},onattribdata(e,t){tG+=t1(e,t),tq<0&&(tq=e),tJ=t},onattribentity(e,t,n){tG+=e,tq<0&&(tq=t),tJ=n},onattribnameend(e){let t=t1(tH.loc.start.offset,e);7===tH.type&&(tH.rawName=t),t$.props.some(e=>(7===e.type?e.rawName:e.name)===t)},onattribend(e,t){if(t$&&tH){if(nn(tH.loc,t),0!==e){if(tG.includes("&")&&(tG=tU.decodeEntities(tG,!0)),6===tH.type)"class"===tH.name&&(tG=t8(tG).trim()),tH.value={type:2,content:tG,loc:1===e?nt(tq,tJ):nt(tq-1,tJ+1)},tQ.inSFCRoot&&"template"===t$.tag&&"lang"===tH.name&&tG&&"html"!==tG&&tQ.enterRCDATA(eG("</template"),0);else{tH.exp=ni(tG,!1,nt(tq,tJ),0,0),"for"===tH.name&&(tH.forParseResult=function(e){let t=e.loc,n=e.content,i=n.match(tX);if(!i)return;let[,s,r]=i,o=(e,n,i=!1)=>{let s=t.start.offset+n,r=s+e.length;return ni(e,!1,nt(s,r),0,i?1:0)},a={source:o(r.trim(),n.indexOf(r,s.length)),value:void 0,key:void 0,index:void 0,finalized:!1},l=s.trim().replace(tZ,"").trim(),c=s.indexOf(l),h=l.match(tz);if(h){let e;l=l.replace(tz,"").trim();let t=h[1].trim();if(t&&(e=n.indexOf(t,c+l.length),a.key=o(t,e,!0)),h[2]){let i=h[2].trim();i&&(a.index=o(i,n.indexOf(i,a.key?e+t.length:c+l.length),!0))}}return l&&(a.value=o(l,c,!0)),a}(tH.exp));let e=-1;"bind"===tH.name&&(e=tH.modifiers.findIndex(e=>"sync"===e.content))>-1&&eY("COMPILER_V_BIND_SYNC",tU,tH.loc,tH.rawName)&&(tH.name="model",tH.modifiers.splice(e,1))}}(7!==tH.type||"pre"!==tH.name)&&t$.props.push(tH)}tG="",tq=tJ=-1},oncomment(e,t){tU.comments&&ne({type:3,content:t1(e,t),loc:nt(e-4,t+3)})},onend(){let e=tB.length;for(let t=0;t<tY.length;t++)t3(tY[t],e-1),tY[t].loc.start.offset},oncdata(e,t){0!==tY[0].ns&&t2(t1(e,t),e,t)},onprocessinginstruction(e){(tY[0]?tY[0].ns:tU.ns)===0&&ns(21,e-1)}}),tz=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,tZ=/^\(|\)$/g;function t1(e,t){return tB.slice(e,t)}function t0(e){tQ.inSFCRoot&&(t$.innerLoc=nt(e+1,e+1)),ne(t$);let{tag:t,ns:n}=t$;0===n&&tU.isPreTag(t)&&tj++,tU.isVoidTag(t)?t3(t$,e):(tY.unshift(t$),(1===n||2===n)&&(tQ.inXML=!0)),t$=null}function t2(e,t,n){{let t=tY[0]&&tY[0].tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=tU.decodeEntities(e,!1))}let i=tY[0]||tF,s=i.children[i.children.length-1];s&&2===s.type?(s.content+=e,nn(s.loc,n)):i.children.push({type:2,content:e,loc:nt(t,n)})}function t3(e,t,n=!1){n?nn(e.loc,t4(t,60)):nn(e.loc,function(e,t){let n=e;for(;62!==tB.charCodeAt(n)&&n<tB.length-1;)n++;return n}(t,0)+1),tQ.inSFCRoot&&(e.children.length?e.innerLoc.end=o({},e.children[e.children.length-1].loc.end):e.innerLoc.end=o({},e.innerLoc.start),e.innerLoc.source=t1(e.innerLoc.start.offset,e.innerLoc.end.offset));let{tag:i,ns:s,children:r}=e;if(!tW&&("slot"===i?e.tagType=2:t5(e)?e.tagType=3:function({tag:e,props:t}){var n;if(tU.isCustomElement(e))return!1;if("component"===e||(n=e.charCodeAt(0))>64&&n<91||to(e)||tU.isBuiltInComponent&&tU.isBuiltInComponent(e)||tU.isNativeTag&&!tU.isNativeTag(e))return!0;for(let e=0;e<t.length;e++){let n=t[e];if(6===n.type){if("is"===n.name&&n.value&&(n.value.content.startsWith("vue:")||eY("COMPILER_IS_ON_ELEMENT",tU,n.loc)))return!0}else if("bind"===n.name&&tA(n.arg,"is")&&eY("COMPILER_IS_ON_ELEMENT",tU,n.loc))return!0}return!1}(e)&&(e.tagType=1)),tQ.inRCDATA||(e.children=t7(r)),0===s&&tU.isIgnoreNewlineTag(i)){let e=r[0];e&&2===e.type&&(e.content=e.content.replace(/^\r?\n/,""))}0===s&&tU.isPreTag(i)&&tj--,tK===e&&(tW=tQ.inVPre=!1,tK=null),tQ.inXML&&(tY[0]?tY[0].ns:tU.ns)===0&&(tQ.inXML=!1);{let t=e.props;if(!tQ.inSFCRoot&&eK("COMPILER_NATIVE_TEMPLATE",tU)&&"template"===e.tag&&!t5(e)){let t=tY[0]||tF,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}let n=t.find(e=>6===e.type&&"inline-template"===e.name);n&&eY("COMPILER_INLINE_TEMPLATE",tU,n.loc)&&e.children.length&&(n.value={type:2,content:t1(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function t4(e,t){let n=e;for(;tB.charCodeAt(n)!==t&&n>=0;)n--;return n}let t6=new Set(["if","else","else-if","for","slot"]);function t5({tag:e,props:t}){if("template"===e){for(let e=0;e<t.length;e++)if(7===t[e].type&&t6.has(t[e].name))return!0}return!1}let t9=/\r\n/g;function t7(e,t){let n="preserve"!==tU.whitespace,i=!1;for(let t=0;t<e.length;t++){let s=e[t];if(2===s.type){if(tj)s.content=s.content.replace(t9,"\n");else if(function(e){for(let t=0;t<e.length;t++)if(!e$(e.charCodeAt(t)))return!1;return!0}(s.content)){let r=e[t-1]&&e[t-1].type,o=e[t+1]&&e[t+1].type;!r||!o||n&&(3===r&&(3===o||1===o)||1===r&&(3===o||1===o&&function(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}(s.content)))?(i=!0,e[t]=null):s.content=" "}else n&&(s.content=t8(s.content))}}return i?e.filter(Boolean):e}function t8(e){let t="",n=!1;for(let i=0;i<e.length;i++)e$(e.charCodeAt(i))?n||(t+=" ",n=!0):(t+=e[i],n=!1);return t}function ne(e){(tY[0]||tF).children.push(e)}function nt(e,t){return{start:tQ.getPos(e),end:null==t?t:tQ.getPos(t),source:null==t?t:t1(e,t)}}function nn(e,t){e.end=tQ.getPos(t),e.source=t1(e.start.offset,t)}function ni(e,t=!1,n,i=0,s=0){return ey(e,t,n,i)}function ns(e,t,n){tU.onError(e1(e,nt(t,t)))}function nr(e,t){if(tQ.reset(),t$=null,tH=null,tG="",tq=-1,tJ=-1,tY.length=0,tB=e,tU=o({},tw),t){let e;for(e in t)null!=t[e]&&(tU[e]=t[e])}tQ.mode="html"===tU.parseMode?1:"sfc"===tU.parseMode?2:0,tQ.inXML=1===tU.ns||2===tU.ns;let n=t&&t.delimiters;n&&(tQ.delimiterOpen=eG(n[0]),tQ.delimiterClose=eG(n[1]));let i=tF=eS([],e);return tQ.parse(tB),i.loc=nt(0,e.length),i.children=t7(i.children),tF=null,i}function no(e,t){let{children:n}=e;return 1===n.length&&1===t.type&&!tx(t)}function na(e,t){let{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;let i=n.get(e);if(void 0!==i)return i;let s=e.codegenNode;if(13!==s.type||s.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag&&"math"!==e.tag)return 0;if(void 0!==s.patchFlag)return n.set(e,0),0;{let i=3,r=nc(e,t);if(0===r)return n.set(e,0),0;r<i&&(i=r);for(let s=0;s<e.children.length;s++){let r=na(e.children[s],t);if(0===r)return n.set(e,0),0;r<i&&(i=r)}if(i>1)for(let s=0;s<e.props.length;s++){let r=e.props[s];if(7===r.type&&"bind"===r.name&&r.exp){let s=na(r.exp,t);if(0===s)return n.set(e,0),0;s<i&&(i=s)}}if(s.isBlock){for(let t=0;t<e.props.length;t++)if(7===e.props[t].type)return n.set(e,0),0;t.removeHelper(L),t.removeHelper(eX(t.inSSR,s.isComponent)),s.isBlock=!1,t.helper(ek(t.inSSR,s.isComponent))}return n.set(e,i),i}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return na(e.content,t);case 4:return e.constType;case 8:let r=3;for(let n=0;n<e.children.length;n++){let i=e.children[n];if(l(i)||c(i))continue;let s=na(i,t);if(0===s)return 0;s<r&&(r=s)}return r;case 20:return 2}}let nl=new Set([K,Y,Q,z]);function nc(e,t){let n=3,i=nh(e);if(i&&15===i.type){let{properties:e}=i;for(let i=0;i<e.length;i++){let s;let{key:r,value:o}=e[i],a=na(r,t);if(0===a)return a;if(a<n&&(n=a),0===(s=4===o.type?na(o,t):14===o.type?function e(t,n){if(14===t.type&&!l(t.callee)&&nl.has(t.callee)){let i=t.arguments[0];if(4===i.type)return na(i,n);if(14===i.type)return e(i,n)}return 0}(o,t):0))return s;s<n&&(n=s)}}return n}function nh(e){let t=e.codegenNode;if(13===t.type)return t.props}function np(e,{filename:t="",prefixIdentifiers:s=!1,hoistStatic:r=!1,hmr:o=!1,cacheHandlers:a=!1,nodeTransforms:c=[],directiveTransforms:h={},transformHoist:p=null,isBuiltInComponent:d=i,isCustomElement:u=i,expressionPlugins:f=[],scopeId:m=null,slotted:S=!0,ssr:g=!1,inSSR:T=!1,ssrCssVars:N="",bindingMetadata:I=n,inline:y=!1,isTS:O=!1,onError:A=ez,onWarn:C=eZ,compatConfig:b}){let R=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),v={filename:t,selfName:R&&_(E(R[1])),prefixIdentifiers:s,hoistStatic:r,hmr:o,cacheHandlers:a,nodeTransforms:c,directiveTransforms:h,transformHoist:p,isBuiltInComponent:d,isCustomElement:u,expressionPlugins:f,scopeId:m,slotted:S,ssr:g,inSSR:T,ssrCssVars:N,bindingMetadata:I,inline:y,isTS:O,onError:A,onWarn:C,compatConfig:b,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){let t=v.helpers.get(e)||0;return v.helpers.set(e,t+1),e},removeHelper(e){let t=v.helpers.get(e);if(t){let n=t-1;n?v.helpers.set(e,n):v.helpers.delete(e)}},helperString:e=>`_${ep[v.helper(e)]}`,replaceNode(e){v.parent.children[v.childIndex]=v.currentNode=e},removeNode(e){let t=v.parent.children,n=e?t.indexOf(e):v.currentNode?v.childIndex:-1;e&&e!==v.currentNode?v.childIndex>n&&(v.childIndex--,v.onNodeRemoved()):(v.currentNode=null,v.onNodeRemoved()),v.parent.children.splice(n,1)},onNodeRemoved:i,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){l(e)&&(e=ey(e)),v.hoists.push(e);let t=ey(`_hoisted_${v.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1,n=!1){let i=ev(v.cached.length,e,t,n);return v.cached.push(i),i}};return v.filters=new Set,v}function nd(e,t){let n=np(e,t);nu(e,n),t.hoistStatic&&!function e(t,n,i,s=!1,r=!1){let{children:o}=t,l=[];for(let n=0;n<o.length;n++){let a=o[n];if(1===a.type&&0===a.tagType){let e=s?0:na(a,i);if(e>0){if(e>=2){a.codegenNode.patchFlag=-1,l.push(a);continue}}else{let e=a.codegenNode;if(13===e.type){let t=e.patchFlag;if((void 0===t||512===t||1===t)&&nc(a,i)>=2){let t=nh(a);t&&(e.props=i.hoist(t))}e.dynamicProps&&(e.dynamicProps=i.hoist(e.dynamicProps))}}}else if(12===a.type&&(s?0:na(a,i))>=2){l.push(a);continue}if(1===a.type){let n=1===a.tagType;n&&i.scopes.vSlot++,e(a,t,i,!1,r),n&&i.scopes.vSlot--}else if(11===a.type)e(a,t,i,1===a.children.length,!0);else if(9===a.type)for(let n=0;n<a.branches.length;n++)e(a.branches[n],t,i,1===a.branches[n].children.length,r)}let c=!1;if(l.length===o.length&&1===t.type){if(0===t.tagType&&t.codegenNode&&13===t.codegenNode.type&&a(t.codegenNode.children))t.codegenNode.children=h(eT(t.codegenNode.children)),c=!0;else if(1===t.tagType&&t.codegenNode&&13===t.codegenNode.type&&t.codegenNode.children&&!a(t.codegenNode.children)&&15===t.codegenNode.children.type){let e=p(t.codegenNode,"default");e&&(e.returns=h(eT(e.returns)),c=!0)}else if(3===t.tagType&&n&&1===n.type&&1===n.tagType&&n.codegenNode&&13===n.codegenNode.type&&n.codegenNode.children&&!a(n.codegenNode.children)&&15===n.codegenNode.children.type){let e=ty(t,"slot",!0),i=e&&e.arg&&p(n.codegenNode,e.arg);i&&(i.returns=h(eT(i.returns)),c=!0)}}if(!c)for(let e of l)e.codegenNode=i.cache(e.codegenNode);function h(e){let t=i.cache(e);return r&&i.hmr&&(t.needArraySpread=!0),t}function p(e,t){if(e.children&&!a(e.children)&&15===e.children.type){let n=e.children.properties.find(e=>e.key===t||e.key.content===t);return n&&n.value}}l.length&&i.transformHoist&&i.transformHoist(o,i,t)}(e,void 0,n,no(e,e.children[0])),t.ssr||function(e,t){let{helper:n}=t,{children:i}=e;if(1===i.length){let n=i[0];if(no(e,n)&&n.codegenNode){let i=n.codegenNode;13===i.type&&ew(i,t),e.codegenNode=i}else e.codegenNode=n}else i.length>1&&(e.codegenNode=eg(t,n(C),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function nu(e,t){t.currentNode=e;let{nodeTransforms:n}=t,i=[];for(let s=0;s<n.length;s++){let r=n[s](e,t);if(r&&(a(r)?i.push(...r):i.push(r)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(k);break;case 5:t.ssr||t.helper(j);break;case 9:for(let n=0;n<e.branches.length;n++)nu(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0,i=()=>{n--};for(;n<e.children.length;n++){let s=e.children[n];l(s)||(t.grandParent=t.parent,t.parent=e,t.childIndex=n,t.onNodeRemoved=i,nu(s,t))}}(e,t)}t.currentNode=e;let s=i.length;for(;s--;)i[s]()}function nf(e,t){let n=l(e)?t=>t===e:t=>e.test(t);return(e,i)=>{if(1===e.type){let{props:s}=e;if(3===e.tagType&&s.some(tR))return;let r=[];for(let o=0;o<s.length;o++){let a=s[o];if(7===a.type&&n(a.name)){s.splice(o,1),o--;let n=t(e,a,i);n&&r.push(n)}}return r}}}let nE="/*@__PURE__*/",n_=e=>`${ep[e]}: _${ep[e]}`;function nm(e,t={}){let n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:i=!1,filename:s="template.vue.html",scopeId:r=null,optimizeImports:o=!1,runtimeGlobalName:a="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:h=!1,isTS:p=!1,inSSR:d=!1}){let u={mode:t,prefixIdentifiers:n,sourceMap:i,filename:s,scopeId:r,optimizeImports:o,runtimeGlobalName:a,runtimeModuleName:l,ssrRuntimeModuleName:c,ssr:h,isTS:p,inSSR:d,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${ep[e]}`,push(e,t=-2,n){u.code+=e},indent(){f(++u.indentLevel)},deindent(e=!1){e?--u.indentLevel:f(--u.indentLevel)},newline(){f(u.indentLevel)}};function f(e){u.push("\n"+" ".repeat(e),0)}return u}(e,t);t.onContextCreated&&t.onContextCreated(n);let{mode:i,push:s,prefixIdentifiers:r,indent:o,deindent:a,newline:l,scopeId:c,ssr:h}=n,p=Array.from(e.helpers),d=p.length>0,u=!r&&"module"!==i;!function(e,t){let{ssr:n,prefixIdentifiers:i,push:s,newline:r,runtimeModuleName:o,runtimeGlobalName:a,ssrRuntimeModuleName:l}=t,c=Array.from(e.helpers);if(c.length>0&&(s(`const _Vue = ${a} -`,-1),e.hoists.length)){let e=[D,V,k,X,w].filter(e=>c.includes(e)).map(n_).join(", ");s(`const { ${e} } = _Vue -`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;let{push:n,newline:i}=t;i();for(let s=0;s<e.length;s++){let r=e[s];r&&(n(`const _hoisted_${s+1} = `),nN(r,t),i())}t.pure=!1})(e.hoists,t),r(),s("return ")}(e,n);let f=(h?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(s(`function ${h?"ssrRender":"render"}(${f}) {`),o(),u&&(s("with (_ctx) {"),o(),d&&(s(`const { ${p.map(n_).join(", ")} } = _Vue -`,-1),l())),e.components.length&&(nS(e.components,"component",n),(e.directives.length||e.temps>0)&&l()),e.directives.length&&(nS(e.directives,"directive",n),e.temps>0&&l()),e.filters&&e.filters.length&&(l(),nS(e.filters,"filter",n),l()),e.temps>0){s("let ");for(let t=0;t<e.temps;t++)s(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(s(` -`,0),l()),h||s("return "),e.codegenNode?nN(e.codegenNode,n):s("null"),u&&(a(),s("}")),a(),s("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function nS(e,t,{helper:n,push:i,newline:s,isTS:r}){let o=n("filter"===t?$:"component"===t?U:B);for(let n=0;n<e.length;n++){let a=e[n],l=a.endsWith("__self");l&&(a=a.slice(0,-6)),i(`const ${tD(a,t)} = ${o}(${JSON.stringify(a)}${l?", true":""})${r?"!":""}`),n<e.length-1&&s()}}function ng(e,t){let n=e.length>3;t.push("["),n&&t.indent(),nT(e,t,n),n&&t.deindent(),t.push("]")}function nT(e,t,n=!1,i=!0){let{push:s,newline:r}=t;for(let o=0;o<e.length;o++){let c=e[o];l(c)?s(c,-3):a(c)?ng(c,t):nN(c,t),o<e.length-1&&(n?(i&&s(","),r()):i&&s(", "))}}function nN(e,t){if(l(e)){t.push(e,-3);return}if(c(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:case 12:nN(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:nI(e,t);break;case 5:!function(e,t){let{push:n,helper:i,pure:s}=t;s&&n(nE),n(`${i(j)}(`),nN(e.content,t),n(")")}(e,t);break;case 8:ny(e,t);break;case 3:!function(e,t){let{push:n,helper:i,pure:s}=t;s&&n(nE),n(`${i(k)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){let n;let{push:i,helper:s,pure:r}=t,{tag:o,props:a,children:l,patchFlag:c,dynamicProps:h,directives:p,isBlock:d,disableTracking:u,isComponent:f}=e;c&&(n=String(c)),p&&i(s(H)+"("),d&&i(`(${s(L)}(${u?"true":""}), `),r&&i(nE),i(s(d?eX(t.inSSR,f):ek(t.inSSR,f))+"(",-2,e),nT(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map(e=>e||"null")}([o,a,l,n,h]),t),i(")"),d&&i(")"),p&&(i(", "),nN(p,t),i(")"))}(e,t);break;case 14:!function(e,t){let{push:n,helper:i,pure:s}=t,r=l(e.callee)?e.callee:i(e.callee);s&&n(nE),n(r+"(",-2,e),nT(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){let{push:n,indent:i,deindent:s,newline:r}=t,{properties:o}=e;if(!o.length){n("{}",-2,e);return}let a=o.length>1;n(a?"{":"{ "),a&&i();for(let e=0;e<o.length;e++){let{key:i,value:s}=o[e];!function(e,t){let{push:n}=t;8===e.type?(n("["),ny(e,t),n("]")):e.isStatic?n(tl(e.content)?e.content:JSON.stringify(e.content),-2,e):n(`[${e.content}]`,-3,e)}(i,t),n(": "),nN(s,t),e<o.length-1&&(n(","),r())}a&&s(),n(a?"}":" }")}(e,t);break;case 17:ng(e.elements,t);break;case 18:!function(e,t){let{push:n,indent:i,deindent:s}=t,{params:r,returns:o,body:l,newline:c,isSlot:h}=e;h&&n(`_${ep[eo]}(`),n("(",-2,e),a(r)?nT(r,t):r&&nN(r,t),n(") => "),(c||l)&&(n("{"),i()),o?(c&&n("return "),a(o)?ng(o,t):nN(o,t)):l&&nN(l,t),(c||l)&&(s(),n("}")),h&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){let{test:n,consequent:i,alternate:s,newline:r}=e,{push:o,indent:a,deindent:l,newline:c}=t;if(4===n.type){let e=!tl(n.content);e&&o("("),nI(n,t),e&&o(")")}else o("("),nN(n,t),o(")");r&&a(),t.indentLevel++,r||o(" "),o("? "),nN(i,t),t.indentLevel--,r&&c(),r||o(" "),o(": ");let h=19===s.type;!h&&t.indentLevel++,nN(s,t),!h&&t.indentLevel--,r&&l(!0)}(e,t);break;case 20:!function(e,t){let{push:n,helper:i,indent:s,deindent:r,newline:o}=t,{needPauseTracking:a,needArraySpread:l}=e;l&&n("[...("),n(`_cache[${e.index}] || (`),a&&(s(),n(`${i(ei)}(-1`),e.inVOnce&&n(", true"),n("),"),o(),n("(")),n(`_cache[${e.index}] = `),nN(e.value,t),a&&(n(`).cacheIndex = ${e.index},`),o(),n(`${i(ei)}(1),`),o(),n(`_cache[${e.index}]`),r()),n(")"),l&&n(")]")}(e,t);break;case 21:nT(e.body,t,!0,!1)}}function nI(e,t){let{content:n,isStatic:i}=e;t.push(i?JSON.stringify(n):n,-3,e)}function ny(e,t){for(let n=0;n<e.children.length;n++){let i=e.children[n];l(i)?t.push(i,-3):nN(i,t)}}let nO=(e,t)=>{if(5===e.type)e.content=nA(e.content,t);else if(1===e.type){let n=ty(e,"memo");for(let i=0;i<e.props.length;i++){let s=e.props[i];if(7===s.type&&"for"!==s.name){let e=s.exp,i=s.arg;!e||4!==e.type||"on"===s.name&&i||n&&i&&4===i.type&&"key"===i.content||(s.exp=nA(e,t,"slot"===s.name)),i&&4===i.type&&!i.isStatic&&(s.arg=nA(i,t))}}}};function nA(e,t,n=!1,i=!1,s=Object.create(t.identifiers)){return e}function nC(e){return l(e)?e:4===e.type?e.content:e.children.map(nC).join("")}let nb=nf(/^(if|else|else-if)$/,(e,t,n)=>nR(e,t,n,(e,t,i)=>{let s=n.parent.children,r=s.indexOf(e),o=0;for(;r-- >=0;){let e=s[r];e&&9===e.type&&(o+=e.branches.length)}return()=>{i?e.codegenNode=nx(t,o,n):function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode).alternate=nx(t,o+e.branches.length-1,n)}}));function nR(e,t,n,i){if("else"!==t.name&&(!t.exp||!t.exp.content.trim())){let i=t.exp?t.exp.loc:e.loc;n.onError(e1(28,t.loc)),t.exp=ey("true",!1,i)}if("if"===t.name){var s;let r=nv(e,t),o={type:9,loc:nt((s=e.loc).start.offset,s.end.offset),branches:[r]};if(n.replaceNode(o),i)return i(o,r,!0)}else{let s=n.parent.children,r=s.indexOf(e);for(;r-- >=-1;){let o=s[r];if(o&&3===o.type||o&&2===o.type&&!o.content.trim().length){n.removeNode(o);continue}if(o&&9===o.type){"else-if"===t.name&&void 0===o.branches[o.branches.length-1].condition&&n.onError(e1(30,e.loc)),n.removeNode();let s=nv(e,t);o.branches.push(s);let r=i&&i(o,s,!1);nu(s,n),r&&r(),n.currentNode=null}else n.onError(e1(30,e.loc));break}}}function nv(e,t){let n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!ty(e,"for")?e.children:[e],userKey:tO(e,"key"),isTemplateIf:n}}function nx(e,t,n){return e.condition?eR(e.condition,nL(e,t,n),eC(n.helper(k),['""',"true"])):nL(e,t,n)}function nL(e,t,n){let{helper:i}=n,s=eI("key",ey(`${t}`,!1,em,2)),{children:r}=e,o=r[0];if(1!==r.length||1!==o.type){if(1!==r.length||11!==o.type)return eg(n,i(C),eN([s]),r,64,void 0,void 0,!0,!1,!1,e.loc);{let e=o.codegenNode;return tM(e,s,n),e}}{let e=o.codegenNode,t=tk(e);return 13===t.type&&ew(t,n),tM(t,s,n),e}}let nM=(e,t,n)=>{let{modifiers:i,loc:s}=e,r=e.arg,{exp:o}=e;if(o&&4===o.type&&!o.content.trim()&&(o=void 0),!o){if(4!==r.type||!r.isStatic)return n.onError(e1(52,r.loc)),{props:[eI(r,ey("",!0,s))]};nP(e),o=e.exp}return 4!==r.type?(r.children.unshift("("),r.children.push(') || ""')):r.isStatic||(r.content=`${r.content} || ""`),i.some(e=>"camel"===e.content)&&(4===r.type?r.isStatic?r.content=E(r.content):r.content=`${n.helperString(ee)}(${r.content})`:(r.children.unshift(`${n.helperString(ee)}(`),r.children.push(")"))),!n.inSSR&&(i.some(e=>"prop"===e.content)&&nD(r,"."),i.some(e=>"attr"===e.content)&&nD(r,"^")),{props:[eI(r,o)]}},nP=(e,t)=>{let n=e.arg,i=E(n.content);e.exp=ey(i,!1,n.loc)},nD=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},nV=nf("for",(e,t,n)=>{let{helper:i,removeHelper:s}=n;return nk(e,t,n,t=>{let r=eC(i(G),[t.source]),o=tv(e),a=ty(e,"memo"),l=tO(e,"key",!1,!0);l&&7===l.type&&!l.exp&&nP(l);let c=l&&(6===l.type?l.value?ey(l.value.content,!0):void 0:l.exp),h=l&&c?eI("key",c):null,p=4===t.source.type&&t.source.constType>0,d=p?64:l?128:256;return t.codegenNode=eg(n,i(C),void 0,r,d,void 0,void 0,!0,!p,!1,e.loc),()=>{let l;let{children:d}=t,u=1!==d.length||1!==d[0].type,f=tx(e)?e:o&&1===e.children.length&&tx(e.children[0])?e.children[0]:null;if(f?(l=f.codegenNode,o&&h&&tM(l,h,n)):u?l=eg(n,i(C),h?eN([h]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(l=d[0].codegenNode,o&&h&&tM(l,h,n),!p!==l.isBlock&&(l.isBlock?(s(L),s(eX(n.inSSR,l.isComponent))):s(ek(n.inSSR,l.isComponent))),l.isBlock=!p,l.isBlock?(i(L),i(eX(n.inSSR,l.isComponent))):i(ek(n.inSSR,l.isComponent))),a){let e=eb(nw(t.parseResult,[ey("_cached")]));e.body=ex([eA(["const _memo = (",a.exp,")"]),eA(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(eh)}(_cached, _memo)) return _cached`]),eA(["const _item = ",l]),ey("_item.memo = _memo"),ey("return _item")]),r.arguments.push(e,ey("_cache"),ey(String(n.cached.length))),n.cached.push(null)}else r.arguments.push(eb(nw(t.parseResult),l,!0))}})});function nk(e,t,n,i){if(!t.exp){n.onError(e1(31,t.loc));return}let s=t.forParseResult;if(!s){n.onError(e1(32,t.loc));return}nX(s);let{addIdentifiers:r,removeIdentifiers:o,scopes:a}=n,{source:l,value:c,key:h,index:p}=s,d={type:11,loc:t.loc,source:l,valueAlias:c,keyAlias:h,objectIndexAlias:p,parseResult:s,children:tv(e)?e.children:[e]};n.replaceNode(d),a.vFor++;let u=i&&i(d);return()=>{a.vFor--,u&&u()}}function nX(e,t){e.finalized||(e.finalized=!0)}function nw({value:e,key:t,index:n},i=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||ey("_".repeat(t+1),!1))}([e,t,n,...i])}let nU=ey("undefined",!1),nF=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){let n=ty(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},nB=(e,t)=>{let n;if(tv(e)&&e.props.some(tR)&&(n=ty(e,"for"))){let e=n.forParseResult;if(e){nX(e);let{value:n,key:i,index:s}=e,{addIdentifiers:r,removeIdentifiers:o}=t;return n&&r(n),i&&r(i),s&&r(s),()=>{n&&o(n),i&&o(i),s&&o(s)}}}},n$=(e,t,n,i)=>eb(e,n,!1,!0,n.length?n[0].loc:i);function nH(e,t,n=n$){t.helper(eo);let{children:i,loc:s}=e,r=[],o=[],a=t.scopes.vSlot>0||t.scopes.vFor>0,l=ty(e,"slot",!0);if(l){let{arg:e,exp:t}=l;e&&!tr(e)&&(a=!0),r.push(eI(e||ey("default",!0),n(t,void 0,i,s)))}let c=!1,h=!1,p=[],d=new Set,u=0;for(let e=0;e<i.length;e++){let s,f,E,_;let m=i[e];if(!tv(m)||!(s=ty(m,"slot",!0))){3!==m.type&&p.push(m);continue}if(l){t.onError(e1(37,s.loc));break}c=!0;let{children:S,loc:g}=m,{arg:T=ey("default",!0),exp:N,loc:I}=s;tr(T)?f=T?T.content:"default":a=!0;let y=ty(m,"for"),O=n(N,y,S,g);if(E=ty(m,"if"))a=!0,o.push(eR(E.exp,nG(T,O,u++),nU));else if(_=ty(m,/^else(-if)?$/,!0)){let n,s=e;for(;s--&&3===(n=i[s]).type;);if(n&&tv(n)&&ty(n,/^(else-)?if$/)){let e=o[o.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=_.exp?eR(_.exp,nG(T,O,u++),nU):nG(T,O,u++)}else t.onError(e1(30,_.loc))}else if(y){a=!0;let e=y.forParseResult;e?(nX(e),o.push(eC(t.helper(G),[e.source,eb(nw(e),nG(T,O),!0)]))):t.onError(e1(32,y.loc))}else{if(f){if(d.has(f)){t.onError(e1(38,I));continue}d.add(f),"default"===f&&(h=!0)}r.push(eI(T,O))}}if(!l){let e=(e,i)=>{let r=n(e,void 0,i,s);return t.compatConfig&&(r.isNonScopedSlot=!0),eI("default",r)};c?p.length&&p.some(e=>(function e(t){return 2!==t.type&&12!==t.type||(2===t.type?!!t.content.trim():e(t.content))})(e))&&(h?t.onError(e1(39,p[0].loc)):r.push(e(void 0,p))):r.push(e(void 0,i))}let f=a?2:!function e(t){for(let n=0;n<t.length;n++){let i=t[n];switch(i.type){case 1:if(2===i.tagType||e(i.children))return!0;break;case 9:if(e(i.branches))return!0;break;case 10:case 11:if(e(i.children))return!0}}return!1}(e.children)?1:3,E=eN(r.concat(eI("_",ey(f+"",!1))),s);return o.length&&(E=eC(t.helper(J),[E,eT(o)])),{slots:E,hasDynamicSlots:a}}function nG(e,t,n){let i=[eI("name",e),eI("fn",t)];return null!=n&&i.push(eI("key",ey(String(n),!0))),eN(i)}let nq=new WeakMap,nJ=(e,t)=>function(){let n,i,s,r,o;if(!(1===(e=t.currentNode).type&&(0===e.tagType||1===e.tagType)))return;let{tag:a,props:l}=e,c=1===e.tagType,p=c?nj(e,t):`"${a}"`,d=h(p)&&p.callee===F,u=0,f=d||p===b||p===R||!c&&("svg"===a||"foreignObject"===a||"math"===a);if(l.length>0){let i=nW(e,t,void 0,c,d);n=i.props,u=i.patchFlag,r=i.dynamicPropNames;let s=i.directives;o=s&&s.length?eT(s.map(e=>nY(e,t))):void 0,i.shouldUseBlock&&(f=!0)}if(e.children.length>0){if(p===v&&(f=!0,u|=1024),c&&p!==b&&p!==v){let{slots:n,hasDynamicSlots:s}=nH(e,t);i=n,s&&(u|=1024)}else if(1===e.children.length&&p!==b){let n=e.children[0],s=n.type,r=5===s||8===s;r&&0===na(n,t)&&(u|=1),i=r||2===s?n:e.children}else i=e.children}r&&r.length&&(s=function(e){let t="[";for(let n=0,i=e.length;n<i;n++)t+=JSON.stringify(e[n]),n<i-1&&(t+=", ");return t+"]"}(r)),e.codegenNode=eg(t,p,n,i,0===u?void 0:u,s,o,!!f,!1,c,e.loc)};function nj(e,t,n=!1){let{tag:i}=e,s=nQ(i),r=tO(e,"is",!1,!0);if(r){if(s||eK("COMPILER_IS_ON_ELEMENT",t)){let e;if(6===r.type?e=r.value&&ey(r.value.content,!0):(e=r.exp)||(e=ey("is",!1,r.arg.loc)),e)return eC(t.helper(F),[e])}else 6===r.type&&r.value.content.startsWith("vue:")&&(i=r.value.content.slice(4))}let o=to(i)||t.isBuiltInComponent(i);return o?(n||t.helper(o),o):(t.helper(U),t.components.add(i),tD(i,"component"))}function nW(e,t,n=e.props,i,s,o=!1){let a;let{tag:l,loc:h,children:u}=e,f=[],E=[],_=[],m=u.length>0,S=!1,g=0,T=!1,N=!1,I=!1,y=!1,O=!1,A=!1,C=[],b=e=>{f.length&&(E.push(eN(nK(f),h)),f=[]),e&&E.push(e)},R=()=>{t.scopes.vFor>0&&f.push(eI(ey("ref_for",!0),ey("true")))},v=({key:e,value:n})=>{if(tr(e)){let o=e.content,a=r(o);a&&(!i||s)&&"onclick"!==o.toLowerCase()&&"onUpdate:modelValue"!==o&&!p(o)&&(y=!0),a&&p(o)&&(A=!0),a&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&na(n,t)>0||("ref"===o?T=!0:"class"===o?N=!0:"style"===o?I=!0:"key"===o||C.includes(o)||C.push(o),i&&("class"===o||"style"===o)&&!C.includes(o)&&C.push(o))}else O=!0};for(let s=0;s<n.length;s++){let r=n[s];if(6===r.type){let{loc:e,name:n,nameLoc:i,value:s}=r;if("ref"===n&&(T=!0,R()),"is"===n&&(nQ(l)||s&&s.content.startsWith("vue:")||eK("COMPILER_IS_ON_ELEMENT",t)))continue;f.push(eI(ey(n,!0,i),ey(s?s.content:"",!0,s?s.loc:e)))}else{let{name:n,arg:s,exp:a,loc:p,modifiers:u}=r,T="bind"===n,N="on"===n;if("slot"===n){i||t.onError(e1(40,p));continue}if("once"===n||"memo"===n||"is"===n||T&&tA(s,"is")&&(nQ(l)||eK("COMPILER_IS_ON_ELEMENT",t))||N&&o)continue;if((T&&tA(s,"key")||N&&m&&tA(s,"vue:before-update"))&&(S=!0),T&&tA(s,"ref")&&R(),!s&&(T||N)){if(O=!0,a){if(T){if(R(),b(),eK("COMPILER_V_BIND_OBJECT_ORDER",t)){E.unshift(a);continue}E.push(a)}else b({type:14,loc:p,callee:t.helper(Z),arguments:i?[a]:[a,"true"]})}else t.onError(e1(T?34:35,p));continue}T&&u.some(e=>"prop"===e.content)&&(g|=32);let I=t.directiveTransforms[n];if(I){let{props:n,needRuntime:i}=I(r,e,t);o||n.forEach(v),N&&s&&!tr(s)?b(eN(n,h)):f.push(...n),i&&(_.push(r),c(i)&&nq.set(r,i))}else!d(n)&&(_.push(r),m&&(S=!0))}}if(E.length?(b(),a=E.length>1?eC(t.helper(W),E,h):E[0]):f.length&&(a=eN(nK(f),h)),O?g|=16:(N&&!i&&(g|=2),I&&!i&&(g|=4),C.length&&(g|=8),y&&(g|=32)),!S&&(0===g||32===g)&&(T||A||_.length>0)&&(g|=512),!t.inSSR&&a)switch(a.type){case 15:let x=-1,L=-1,M=!1;for(let e=0;e<a.properties.length;e++){let t=a.properties[e].key;tr(t)?"class"===t.content?x=e:"style"===t.content&&(L=e):t.isHandlerKey||(M=!0)}let P=a.properties[x],D=a.properties[L];M?a=eC(t.helper(Q),[a]):(P&&!tr(P.value)&&(P.value=eC(t.helper(K),[P.value])),D&&(I||4===D.value.type&&"["===D.value.content.trim()[0]||17===D.value.type)&&(D.value=eC(t.helper(Y),[D.value])));break;case 14:break;default:a=eC(t.helper(Q),[eC(t.helper(z),[a])])}return{props:a,directives:_,patchFlag:g,dynamicPropNames:C,shouldUseBlock:S}}function nK(e){let t=new Map,n=[];for(let i=0;i<e.length;i++){let s=e[i];if(8===s.key.type||!s.key.isStatic){n.push(s);continue}let o=s.key.content,a=t.get(o);a?("style"===o||"class"===o||r(o))&&(17===a.value.type?a.value.elements.push(s.value):a.value=eT([a.value,s.value],a.loc)):(t.set(o,s),n.push(s))}return n}function nY(e,t){let n=[],i=nq.get(e);i?n.push(t.helperString(i)):(t.helper(B),t.directives.add(e.name),n.push(tD(e.name,"directive")));let{loc:s}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));let t=ey("true",!1,s);n.push(eN(e.modifiers.map(e=>eI(e,t)),s))}return eT(n,e.loc)}function nQ(e){return"component"===e||"Component"===e}let nz=(e,t)=>{if(tx(e)){let{children:n,loc:i}=e,{slotName:s,slotProps:r}=nZ(e,t),o=[t.prefixIdentifiers?"_ctx.$slots":"$slots",s,"{}","undefined","true"],a=2;r&&(o[2]=r,a=3),n.length&&(o[3]=eb([],n,!1,!1,i),a=4),t.scopeId&&!t.slotted&&(a=5),o.splice(a),e.codegenNode=eC(t.helper(q),o,i)}};function nZ(e,t){let n,i='"default"',s=[];for(let t=0;t<e.props.length;t++){let n=e.props[t];if(6===n.type)n.value&&("name"===n.name?i=JSON.stringify(n.value.content):(n.name=E(n.name),s.push(n)));else if("bind"===n.name&&tA(n.arg,"name")){if(n.exp)i=n.exp;else if(n.arg&&4===n.arg.type){let e=E(n.arg.content);i=n.exp=ey(e,!1,n.arg.loc)}}else"bind"===n.name&&n.arg&&tr(n.arg)&&(n.arg.content=E(n.arg.content)),s.push(n)}if(s.length>0){let{props:i,directives:r}=nW(e,t,s,!1,!1);n=i,r.length&&t.onError(e1(36,r[0].loc))}return{slotName:i,slotProps:n}}let n1=(e,t,n,i)=>{let s;let{loc:r,modifiers:o,arg:a}=e;if(e.exp||o.length,4===a.type){if(a.isStatic){let e=a.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),s=ey(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?m(E(e)):`on:${e}`,!0,a.loc)}else s=eA([`${n.helperString(en)}(`,a,")"])}else(s=a).children.unshift(`${n.helperString(en)}(`),s.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let c=n.cacheHandlers&&!l&&!n.inVOnce;if(l){let e=tE(l),t=!(e||tg(l)),n=l.content.includes(";");(t||c&&e)&&(l=eA([`${t?"$event":"(...args)"} => ${n?"{":"("}`,l,n?"}":")"]))}let h={props:[eI(s,l||ey("() => {}",!1,r))]};return i&&(h=i(h)),c&&(h.props[0].value=n.cache(h.props[0].value)),h.props.forEach(e=>e.key.isHandlerKey=!0),h},n0=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{let n;let i=e.children,s=!1;for(let e=0;e<i.length;e++){let t=i[e];if(tb(t)){s=!0;for(let s=e+1;s<i.length;s++){let r=i[s];if(tb(r))n||(n=i[e]=eA([t],t.loc)),n.children.push(" + ",r),i.splice(s,1),s--;else{n=void 0;break}}}}if(s&&(1!==i.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find(e=>7===e.type&&!t.directiveTransforms[e.name])||"template"===e.tag)))for(let e=0;e<i.length;e++){let n=i[e];if(tb(n)||8===n.type){let s=[];(2!==n.type||" "!==n.content)&&s.push(n),t.ssr||0!==na(n,t)||s.push("1"),i[e]={type:12,content:n,loc:n.loc,codegenNode:eC(t.helper(X),s)}}}}},n2=new WeakSet,n3=(e,t)=>{if(1===e.type&&ty(e,"once",!0)&&!n2.has(e)&&!t.inVOnce&&!t.inSSR)return n2.add(e),t.inVOnce=!0,t.helper(ei),()=>{t.inVOnce=!1;let e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0,!0))}},n4=(e,t,n)=>{let i;let{exp:s,arg:r}=e;if(!s)return n.onError(e1(41,e.loc)),n6();let o=s.loc.source.trim(),a=4===s.type?s.content:o,l=n.bindingMetadata[o];if("props"===l||"props-aliased"===l)return s.loc,n6();if(!a.trim()||!tE(s))return n.onError(e1(42,s.loc)),n6();let c=r||ey("modelValue",!0),h=r?tr(r)?`onUpdate:${E(r.content)}`:eA(['"onUpdate:" + ',r]):"onUpdate:modelValue",p=n.isTS?"($event: any)":"$event";i=eA([`${p} => ((`,s,") = $event)"]);let d=[eI(c,e.exp),eI(h,i)];if(e.modifiers.length&&1===t.tagType){let t=e.modifiers.map(e=>e.content).map(e=>(tl(e)?e:JSON.stringify(e))+": true").join(", "),n=r?tr(r)?`${r.content}Modifiers`:eA([r,' + "Modifiers"']):"modelModifiers";d.push(eI(n,ey(`{ ${t} }`,!1,e.loc,2)))}return n6(d)};function n6(e=[]){return{props:e}}let n5=/[\w).+\-_$\]]/,n9=(e,t)=>{eK("COMPILER_FILTERS",t)&&(5===e.type?n7(e.content,t):1===e.type&&e.props.forEach(e=>{7===e.type&&"for"!==e.name&&e.exp&&n7(e.exp,t)}))};function n7(e,t){if(4===e.type)n8(e,t);else for(let n=0;n<e.children.length;n++){let i=e.children[n];"object"==typeof i&&(4===i.type?n8(i,t):8===i.type?n7(e,t):5===i.type&&n7(i.content,t))}}function n8(e,t){let n=e.content,i=!1,s=!1,r=!1,o=!1,a=0,l=0,c=0,h=0,p,d,u,f,E=[];for(u=0;u<n.length;u++)if(d=p,p=n.charCodeAt(u),i)39===p&&92!==d&&(i=!1);else if(s)34===p&&92!==d&&(s=!1);else if(r)96===p&&92!==d&&(r=!1);else if(o)47===p&&92!==d&&(o=!1);else if(124!==p||124===n.charCodeAt(u+1)||124===n.charCodeAt(u-1)||a||l||c){switch(p){case 34:s=!0;break;case 39:i=!0;break;case 96:r=!0;break;case 40:c++;break;case 41:c--;break;case 91:l++;break;case 93:l--;break;case 123:a++;break;case 125:a--}if(47===p){let e,t=u-1;for(;t>=0&&" "===(e=n.charAt(t));t--);e&&n5.test(e)||(o=!0)}}else void 0===f?(h=u+1,f=n.slice(0,u).trim()):_();function _(){E.push(n.slice(h,u).trim()),h=u+1}if(void 0===f?f=n.slice(0,u).trim():0!==h&&_(),E.length){for(u=0;u<E.length;u++)f=function(e,t,n){n.helper($);let i=t.indexOf("(");if(i<0)return n.filters.add(t),`${tD(t,"filter")}(${e})`;{let s=t.slice(0,i),r=t.slice(i+1);return n.filters.add(s),`${tD(s,"filter")}(${e}${")"!==r?","+r:r}`}}(f,E[u],t);e.content=f,e.ast=void 0}}let ie=new WeakSet,it=(e,t)=>{if(1===e.type){let n=ty(e,"memo");if(!(!n||ie.has(e)))return ie.add(e),()=>{let i=e.codegenNode||t.currentNode.codegenNode;i&&13===i.type&&(1!==e.tagType&&ew(i,t),e.codegenNode=eC(t.helper(ec),[n.exp,eb(void 0,i),"_cache",String(t.cached.length)]),t.cached.push(null))}}};function ii(e){return[[n3,nb,it,nV,n9,nz,nJ,nF,n0],{on:n1,bind:nM,model:n4}]}function is(e,t={}){let n=t.onError||ez,i="module"===t.mode;!0===t.prefixIdentifiers?n(e1(47)):i&&n(e1(48)),t.cacheHandlers&&n(e1(49)),t.scopeId&&!i&&n(e1(50));let s=o({},t,{prefixIdentifiers:!1}),r=l(e)?nr(e,s):e,[a,c]=ii();return nd(r,o({},s,{nodeTransforms:[...a,...t.nodeTransforms||[]],directiveTransforms:o({},c,t.directiveTransforms||{})})),nm(r,s)}let ir={DATA:"data",PROPS:"props",PROPS_ALIASED:"props-aliased",SETUP_LET:"setup-let",SETUP_CONST:"setup-const",SETUP_REACTIVE_CONST:"setup-reactive-const",SETUP_MAYBE_REF:"setup-maybe-ref",SETUP_REF:"setup-ref",OPTIONS:"options",LITERAL_CONST:"literal-const"},io=()=>({props:[]}),ia=Symbol(""),il=Symbol(""),ic=Symbol(""),ih=Symbol(""),ip=Symbol(""),id=Symbol(""),iu=Symbol(""),iE=Symbol(""),i_=Symbol(""),im=Symbol("");ed({[ia]:"vModelRadio",[il]:"vModelCheckbox",[ic]:"vModelText",[ih]:"vModelSelect",[ip]:"vModelDynamic",[id]:"withModifiers",[iu]:"withKeys",[iE]:"vShow",[i_]:"Transition",[im]:"TransitionGroup"});let iS={parseMode:"html",isVoidTag:A,isNativeTag:e=>I(e)||y(e)||O(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(t,n=!1){return(e||(e=document.createElement("div")),n)?(e.innerHTML=`<div foo="${t.replace(/"/g,""")}">`,e.children[0].getAttribute("foo")):(e.innerHTML=t,e.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?i_:"TransitionGroup"===e||"transition-group"===e?im:void 0,getNamespace(e,t,n){let i=t?t.ns:n;if(t&&2===i){if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some(e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content))&&(i=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(i=0)}else t&&1===i&&("foreignObject"===t.tag||"desc"===t.tag||"title"===t.tag)&&(i=0);if(0===i){if("svg"===e)return 1;if("math"===e)return 2}return i}},ig=e=>{1===e.type&&e.props.forEach((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:ey("style",!0,t.loc),exp:iT(t.value.content,t.loc),modifiers:[],loc:t.loc})})},iT=(e,t)=>ey(JSON.stringify(function(e){let t={};return e.replace(N,"").split(g).forEach(e=>{if(e){let n=e.split(T);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}(e)),!1,t,3);function iN(e,t){return e1(e,t)}let iI={X_V_HTML_NO_EXPRESSION:53,53:"X_V_HTML_NO_EXPRESSION",X_V_HTML_WITH_CHILDREN:54,54:"X_V_HTML_WITH_CHILDREN",X_V_TEXT_NO_EXPRESSION:55,55:"X_V_TEXT_NO_EXPRESSION",X_V_TEXT_WITH_CHILDREN:56,56:"X_V_TEXT_WITH_CHILDREN",X_V_MODEL_ON_INVALID_ELEMENT:57,57:"X_V_MODEL_ON_INVALID_ELEMENT",X_V_MODEL_ARG_ON_ELEMENT:58,58:"X_V_MODEL_ARG_ON_ELEMENT",X_V_MODEL_ON_FILE_INPUT_ELEMENT:59,59:"X_V_MODEL_ON_FILE_INPUT_ELEMENT",X_V_MODEL_UNNECESSARY_VALUE:60,60:"X_V_MODEL_UNNECESSARY_VALUE",X_V_SHOW_NO_EXPRESSION:61,61:"X_V_SHOW_NO_EXPRESSION",X_TRANSITION_INVALID_CHILDREN:62,62:"X_TRANSITION_INVALID_CHILDREN",X_IGNORED_SIDE_EFFECT_TAG:63,63:"X_IGNORED_SIDE_EFFECT_TAG",__EXTEND_POINT__:64,64:"__EXTEND_POINT__"},iy={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},iO=t("passive,once,capture"),iA=t("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),iC=t("left,right"),ib=t("onkeyup,onkeydown,onkeypress"),iR=(e,t,n,i)=>{let s=[],r=[],o=[];for(let i=0;i<t.length;i++){let a=t[i].content;"native"===a&&eY("COMPILER_V_ON_NATIVE",n)?o.push(a):iO(a)?o.push(a):iC(a)?tr(e)?ib(e.content.toLowerCase())?s.push(a):r.push(a):(s.push(a),r.push(a)):iA(a)?r.push(a):s.push(a)}return{keyModifiers:s,nonKeyModifiers:r,eventOptionModifiers:o}},iv=(e,t)=>tr(e)&&"onclick"===e.content.toLowerCase()?ey(t,!0):4!==e.type?eA(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,ix=(e,t)=>{1===e.type&&0===e.tagType&&("script"===e.tag||"style"===e.tag)&&t.removeNode()},iL=[ig],iM={cloak:io,html:(e,t,n)=>{let{exp:i,loc:s}=e;return i||n.onError(iN(53,s)),t.children.length&&(n.onError(iN(54,s)),t.children.length=0),{props:[eI(ey("innerHTML",!0,s),i||ey("",!0))]}},text:(e,t,n)=>{let{exp:i,loc:s}=e;return i||n.onError(iN(55,s)),t.children.length&&(n.onError(iN(56,s)),t.children.length=0),{props:[eI(ey("textContent",!0),i?na(i,n)>0?i:eC(n.helperString(j),[i],s):ey("",!0))]}},model:(e,t,n)=>{let i=n4(e,t,n);if(!i.props.length||1===t.tagType)return i;e.arg&&n.onError(iN(58,e.arg.loc));let{tag:s}=t,r=n.isCustomElement(s);if("input"===s||"textarea"===s||"select"===s||r){let o=ic,a=!1;if("input"===s||r){let i=tO(t,"type");if(i){if(7===i.type)o=ip;else if(i.value)switch(i.value.content){case"radio":o=ia;break;case"checkbox":o=il;break;case"file":a=!0,n.onError(iN(59,e.loc))}}else tC(t)&&(o=ip)}else"select"===s&&(o=ih);a||(i.needRuntime=n.helper(o))}else n.onError(iN(57,e.loc));return i.props=i.props.filter(e=>!(4===e.key.type&&"modelValue"===e.key.content)),i},on:(e,t,n)=>n1(e,t,n,t=>{let{modifiers:i}=e;if(!i.length)return t;let{key:s,value:r}=t.props[0],{keyModifiers:o,nonKeyModifiers:a,eventOptionModifiers:l}=iR(s,i,n,e.loc);if(a.includes("right")&&(s=iv(s,"onContextmenu")),a.includes("middle")&&(s=iv(s,"onMouseup")),a.length&&(r=eC(n.helper(id),[r,JSON.stringify(a)])),o.length&&(!tr(s)||ib(s.content.toLowerCase()))&&(r=eC(n.helper(iu),[r,JSON.stringify(o)])),l.length){let e=l.map(_).join("");s=tr(s)?ey(`${s.content}${e}`,!0):eA(["(",s,`) + "${e}"`])}return{props:[eI(s,r)]}}),show:(e,t,n)=>{let{exp:i,loc:s}=e;return i||n.onError(iN(61,s)),{props:[],needRuntime:n.helper(iE)}}};function iP(e,t={}){return is(e,o({},iS,t,{nodeTransforms:[ix,...iL,...t.nodeTransforms||[]],directiveTransforms:o({},iM,t.directiveTransforms||{}),transformHoist:null}))}function iD(e,t={}){return nr(e,o({},iS,t))}export{x as BASE_TRANSITION,ir as BindingTypes,ee as CAMELIZE,et as CAPITALIZE,M as CREATE_BLOCK,k as CREATE_COMMENT,P as CREATE_ELEMENT_BLOCK,V as CREATE_ELEMENT_VNODE,J as CREATE_SLOTS,w as CREATE_STATIC,X as CREATE_TEXT,D as CREATE_VNODE,eJ as CompilerDeprecationTypes,e_ as ConstantTypes,iM as DOMDirectiveTransforms,iI as DOMErrorCodes,iy as DOMErrorMessages,iL as DOMNodeTransforms,eE as ElementTypes,e0 as ErrorCodes,C as FRAGMENT,z as GUARD_REACTIVE_PROPS,eh as IS_MEMO_SAME,el as IS_REF,v as KEEP_ALIVE,W as MERGE_PROPS,K as NORMALIZE_CLASS,Q as NORMALIZE_PROPS,Y as NORMALIZE_STYLE,eu as Namespaces,ef as NodeTypes,L as OPEN_BLOCK,er as POP_SCOPE_ID,es as PUSH_SCOPE_ID,G as RENDER_LIST,q as RENDER_SLOT,U as RESOLVE_COMPONENT,B as RESOLVE_DIRECTIVE,F as RESOLVE_DYNAMIC_COMPONENT,$ as RESOLVE_FILTER,ei as SET_BLOCK_TRACKING,R as SUSPENSE,b as TELEPORT,j as TO_DISPLAY_STRING,Z as TO_HANDLERS,en as TO_HANDLER_KEY,i_ as TRANSITION,im as TRANSITION_GROUP,ti as TS_NODE_TYPES,ea as UNREF,il as V_MODEL_CHECKBOX,ip as V_MODEL_DYNAMIC,ia as V_MODEL_RADIO,ih as V_MODEL_SELECT,ic as V_MODEL_TEXT,iu as V_ON_WITH_KEYS,id as V_ON_WITH_MODIFIERS,iE as V_SHOW,eo as WITH_CTX,H as WITH_DIRECTIVES,ec as WITH_MEMO,tT as advancePositionWithClone,tN as advancePositionWithMutation,tI as assert,is as baseCompile,nr as baseParse,nY as buildDirectiveArgs,nW as buildProps,nH as buildSlots,eY as checkCompatEnabled,iP as compile,ew as convertToBlock,eT as createArrayExpression,eP as createAssignmentExpression,ex as createBlockStatement,ev as createCacheExpression,eC as createCallExpression,e1 as createCompilerError,eA as createCompoundExpression,eR as createConditionalExpression,iN as createDOMCompilerError,nw as createForLoopParams,eb as createFunctionExpression,eM as createIfStatement,eO as createInterpolation,eN as createObjectExpression,eI as createObjectProperty,eV as createReturnStatement,eS as createRoot,eD as createSequenceExpression,ey as createSimpleExpression,nf as createStructuralDirectiveTransform,eL as createTemplateLiteral,np as createTransformContext,eg as createVNodeCall,e2 as errorMessages,e8 as extractIdentifiers,ty as findDir,tO as findProp,tX as forAliasRE,nm as generate,S as generateCodeFrame,ii as getBaseTransformPreset,na as getConstantType,tk as getMemoedVNodeCall,eX as getVNodeBlockHelper,ek as getVNodeHelper,tC as hasDynamicKeyVBind,tV as hasScopeRef,ep as helperNameMap,tM as injectProp,to as isCoreComponent,tg as isFnExpression,tm as isFnExpressionBrowser,tS as isFnExpressionNode,te as isFunctionType,e6 as isInDestructureAssignment,e5 as isInNewExpression,tE as isMemberExpression,tu as isMemberExpressionBrowser,tf as isMemberExpressionNode,e4 as isReferencedIdentifier,tl as isSimpleIdentifier,tx as isSlotOutlet,tA as isStaticArgOf,tr as isStaticExp,tt as isStaticProperty,tn as isStaticPropertyKey,tv as isTemplateNode,tb as isText,tR as isVSlot,em as locStub,io as noopDirectiveTransform,iD as parse,iS as parserOptions,nA as processExpression,nk as processFor,nR as processIf,nZ as processSlotOutlet,ed as registerRuntimeHelpers,nj as resolveComponentType,nC as stringifyExpression,tD as toValidAssetId,nF as trackSlotScopes,nB as trackVForSlotScopes,nd as transform,nM as transformBind,nJ as transformElement,nO as transformExpression,n4 as transformModel,n1 as transformOn,ig as transformStyle,nu as traverseNode,ts as unwrapTSNode,e7 as walkBlockDeclarations,e9 as walkFunctionParams,e3 as walkIdentifiers,eQ as warnDeprecation}; diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js deleted file mode 100644 index a6fe625..0000000 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +++ /dev/null @@ -1,687 +0,0 @@ -/** -* @vue/compiler-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -import { registerRuntimeHelpers, createSimpleExpression, createCompilerError, createObjectProperty, getConstantType, createCallExpression, TO_DISPLAY_STRING, transformModel as transformModel$1, findProp, hasDynamicKeyVBind, findDir, isStaticArgOf, transformOn as transformOn$1, isStaticExp, createCompoundExpression, checkCompatEnabled, noopDirectiveTransform, baseCompile, baseParse } from '@vue/compiler-core'; -export * from '@vue/compiler-core'; -import { isVoidTag, isHTMLTag, isSVGTag, isMathMLTag, parseStringStyle, capitalize, makeMap, extend } from '@vue/shared'; - -const V_MODEL_RADIO = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelRadio` : ``); -const V_MODEL_CHECKBOX = Symbol( - !!(process.env.NODE_ENV !== "production") ? `vModelCheckbox` : `` -); -const V_MODEL_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelText` : ``); -const V_MODEL_SELECT = Symbol( - !!(process.env.NODE_ENV !== "production") ? `vModelSelect` : `` -); -const V_MODEL_DYNAMIC = Symbol( - !!(process.env.NODE_ENV !== "production") ? `vModelDynamic` : `` -); -const V_ON_WITH_MODIFIERS = Symbol( - !!(process.env.NODE_ENV !== "production") ? `vOnModifiersGuard` : `` -); -const V_ON_WITH_KEYS = Symbol( - !!(process.env.NODE_ENV !== "production") ? `vOnKeysGuard` : `` -); -const V_SHOW = Symbol(!!(process.env.NODE_ENV !== "production") ? `vShow` : ``); -const TRANSITION = Symbol(!!(process.env.NODE_ENV !== "production") ? `Transition` : ``); -const TRANSITION_GROUP = Symbol( - !!(process.env.NODE_ENV !== "production") ? `TransitionGroup` : `` -); -registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` -}); - -let decoder; -function decodeHtmlBrowser(raw, asAttr = false) { - if (!decoder) { - decoder = document.createElement("div"); - } - if (asAttr) { - decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; - return decoder.children[0].getAttribute("foo"); - } else { - decoder.innerHTML = raw; - return decoder.textContent; - } -} - -const parserOptions = { - parseMode: "html", - isVoidTag, - isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), - isPreTag: (tag) => tag === "pre", - isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", - decodeEntities: decodeHtmlBrowser , - isBuiltInComponent: (tag) => { - if (tag === "Transition" || tag === "transition") { - return TRANSITION; - } else if (tag === "TransitionGroup" || tag === "transition-group") { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent, rootNamespace) { - let ns = parent ? parent.ns : rootNamespace; - if (parent && ns === 2) { - if (parent.tag === "annotation-xml") { - if (tag === "svg") { - return 1; - } - if (parent.props.some( - (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") - )) { - ns = 0; - } - } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { - ns = 0; - } - } else if (parent && ns === 1) { - if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { - ns = 0; - } - } - if (ns === 0) { - if (tag === "svg") { - return 1; - } - if (tag === "math") { - return 2; - } - } - return ns; - } -}; - -const transformStyle = (node) => { - if (node.type === 1) { - node.props.forEach((p, i) => { - if (p.type === 6 && p.name === "style" && p.value) { - node.props[i] = { - type: 7, - name: `bind`, - arg: createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } -}; -const parseInlineCSS = (cssText, loc) => { - const normalized = parseStringStyle(cssText); - return createSimpleExpression( - JSON.stringify(normalized), - false, - loc, - 3 - ); -}; - -function createDOMCompilerError(code, loc) { - return createCompilerError( - code, - loc, - !!(process.env.NODE_ENV !== "production") || false ? DOMErrorMessages : void 0 - ); -} -const DOMErrorCodes = { - "X_V_HTML_NO_EXPRESSION": 53, - "53": "X_V_HTML_NO_EXPRESSION", - "X_V_HTML_WITH_CHILDREN": 54, - "54": "X_V_HTML_WITH_CHILDREN", - "X_V_TEXT_NO_EXPRESSION": 55, - "55": "X_V_TEXT_NO_EXPRESSION", - "X_V_TEXT_WITH_CHILDREN": 56, - "56": "X_V_TEXT_WITH_CHILDREN", - "X_V_MODEL_ON_INVALID_ELEMENT": 57, - "57": "X_V_MODEL_ON_INVALID_ELEMENT", - "X_V_MODEL_ARG_ON_ELEMENT": 58, - "58": "X_V_MODEL_ARG_ON_ELEMENT", - "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, - "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", - "X_V_MODEL_UNNECESSARY_VALUE": 60, - "60": "X_V_MODEL_UNNECESSARY_VALUE", - "X_V_SHOW_NO_EXPRESSION": 61, - "61": "X_V_SHOW_NO_EXPRESSION", - "X_TRANSITION_INVALID_CHILDREN": 62, - "62": "X_TRANSITION_INVALID_CHILDREN", - "X_IGNORED_SIDE_EFFECT_TAG": 63, - "63": "X_IGNORED_SIDE_EFFECT_TAG", - "__EXTEND_POINT__": 64, - "64": "__EXTEND_POINT__" -}; -const DOMErrorMessages = { - [53]: `v-html is missing expression.`, - [54]: `v-html will override element children.`, - [55]: `v-text is missing expression.`, - [56]: `v-text will override element children.`, - [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [58]: `v-model argument is not supported on plain elements.`, - [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [61]: `v-show is missing expression.`, - [62]: `<Transition> expects exactly one child element or component.`, - [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` -}; - -const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(53, loc) - ); - } - if (node.children.length) { - context.onError( - createDOMCompilerError(54, loc) - ); - node.children.length = 0; - } - return { - props: [ - createObjectProperty( - createSimpleExpression(`innerHTML`, true, loc), - exp || createSimpleExpression("", true) - ) - ] - }; -}; - -const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(55, loc) - ); - } - if (node.children.length) { - context.onError( - createDOMCompilerError(56, loc) - ); - node.children.length = 0; - } - return { - props: [ - createObjectProperty( - createSimpleExpression(`textContent`, true), - exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( - context.helperString(TO_DISPLAY_STRING), - [exp], - loc - ) : createSimpleExpression("", true) - ) - ] - }; -}; - -const transformModel = (dir, node, context) => { - const baseResult = transformModel$1(dir, node, context); - if (!baseResult.props.length || node.tagType === 1) { - return baseResult; - } - if (dir.arg) { - context.onError( - createDOMCompilerError( - 58, - dir.arg.loc - ) - ); - } - function checkDuplicatedValue() { - const value = findDir(node, "bind"); - if (value && isStaticArgOf(value.arg, "value")) { - context.onError( - createDOMCompilerError( - 60, - value.loc - ) - ); - } - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === "input" || isCustomElement) { - const type = findProp(node, `type`); - if (type) { - if (type.type === 7) { - directiveToUse = V_MODEL_DYNAMIC; - } else if (type.value) { - switch (type.value.content) { - case "radio": - directiveToUse = V_MODEL_RADIO; - break; - case "checkbox": - directiveToUse = V_MODEL_CHECKBOX; - break; - case "file": - isInvalidType = true; - context.onError( - createDOMCompilerError( - 59, - dir.loc - ) - ); - break; - default: - !!(process.env.NODE_ENV !== "production") && checkDuplicatedValue(); - break; - } - } - } else if (hasDynamicKeyVBind(node)) { - directiveToUse = V_MODEL_DYNAMIC; - } else { - !!(process.env.NODE_ENV !== "production") && checkDuplicatedValue(); - } - } else if (tag === "select") { - directiveToUse = V_MODEL_SELECT; - } else { - !!(process.env.NODE_ENV !== "production") && checkDuplicatedValue(); - } - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } else { - context.onError( - createDOMCompilerError( - 57, - dir.loc - ) - ); - } - baseResult.props = baseResult.props.filter( - (p) => !(p.key.type === 4 && p.key.content === "modelValue") - ); - return baseResult; -}; - -const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); -const isNonKeyModifier = /* @__PURE__ */ makeMap( - // event propagation management - `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` -); -const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); -const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`); -const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i].content; - if (modifier === "native" && checkCompatEnabled( - "COMPILER_V_ON_NATIVE", - context, - loc - )) { - eventOptionModifiers.push(modifier); - } else if (isEventOptionModifier(modifier)) { - eventOptionModifiers.push(modifier); - } else { - if (maybeKeyModifier(modifier)) { - if (isStaticExp(key)) { - if (isKeyboardEvent(key.content.toLowerCase())) { - keyModifiers.push(modifier); - } else { - nonKeyModifiers.push(modifier); - } - } else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } else { - keyModifiers.push(modifier); - } - } - } - } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; -}; -const transformClick = (key, event) => { - const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; - return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) : key; -}; -const transformOn = (dir, node, context) => { - return transformOn$1(dir, node, context, (baseResult) => { - const { modifiers } = dir; - if (!modifiers.length) return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - if (nonKeyModifiers.includes("right")) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes("middle")) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard - (!isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); - key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [createObjectProperty(key, handlerExp)] - }; - }); -}; - -const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(61, loc) - ); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; -}; - -const transformTransition = (node, context) => { - if (node.type === 1 && node.tagType === 1) { - const component = context.isBuiltInComponent(node.tag); - if (component === TRANSITION) { - return () => { - if (!node.children.length) { - return; - } - if (hasMultipleChildren(node)) { - context.onError( - createDOMCompilerError( - 62, - { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: "" - } - ) - ); - } - const child = node.children[0]; - if (child.type === 1) { - for (const p of child.props) { - if (p.type === 7 && p.name === "show") { - node.props.push({ - type: 6, - name: "persisted", - nameLoc: node.loc, - value: void 0, - loc: node.loc - }); - } - } - } - }; - } - } -}; -function hasMultipleChildren(node) { - const children = node.children = node.children.filter( - (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) - ); - const child = children[0]; - return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); -} - -const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { - !!(process.env.NODE_ENV !== "production") && context.onError( - createDOMCompilerError( - 63, - node.loc - ) - ); - context.removeNode(); - } -}; - -function isValidHTMLNesting(parent, child) { - if (parent in onlyValidChildren) { - return onlyValidChildren[parent].has(child); - } - if (child in onlyValidParents) { - return onlyValidParents[child].has(parent); - } - if (parent in knownInvalidChildren) { - if (knownInvalidChildren[parent].has(child)) return false; - } - if (child in knownInvalidParents) { - if (knownInvalidParents[child].has(parent)) return false; - } - return true; -} -const headings = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]); -const emptySet = /* @__PURE__ */ new Set([]); -const onlyValidChildren = { - head: /* @__PURE__ */ new Set([ - "base", - "basefront", - "bgsound", - "link", - "meta", - "title", - "noscript", - "noframes", - "style", - "script", - "template" - ]), - optgroup: /* @__PURE__ */ new Set(["option"]), - select: /* @__PURE__ */ new Set(["optgroup", "option", "hr"]), - // table - table: /* @__PURE__ */ new Set(["caption", "colgroup", "tbody", "tfoot", "thead"]), - tr: /* @__PURE__ */ new Set(["td", "th"]), - colgroup: /* @__PURE__ */ new Set(["col"]), - tbody: /* @__PURE__ */ new Set(["tr"]), - thead: /* @__PURE__ */ new Set(["tr"]), - tfoot: /* @__PURE__ */ new Set(["tr"]), - // these elements can not have any children elements - script: emptySet, - iframe: emptySet, - option: emptySet, - textarea: emptySet, - style: emptySet, - title: emptySet -}; -const onlyValidParents = { - // sections - html: emptySet, - body: /* @__PURE__ */ new Set(["html"]), - head: /* @__PURE__ */ new Set(["html"]), - // table - td: /* @__PURE__ */ new Set(["tr"]), - colgroup: /* @__PURE__ */ new Set(["table"]), - caption: /* @__PURE__ */ new Set(["table"]), - tbody: /* @__PURE__ */ new Set(["table"]), - tfoot: /* @__PURE__ */ new Set(["table"]), - col: /* @__PURE__ */ new Set(["colgroup"]), - th: /* @__PURE__ */ new Set(["tr"]), - thead: /* @__PURE__ */ new Set(["table"]), - tr: /* @__PURE__ */ new Set(["tbody", "thead", "tfoot"]), - // data list - dd: /* @__PURE__ */ new Set(["dl", "div"]), - dt: /* @__PURE__ */ new Set(["dl", "div"]), - // other - figcaption: /* @__PURE__ */ new Set(["figure"]), - // li: new Set(["ul", "ol"]), - summary: /* @__PURE__ */ new Set(["details"]), - area: /* @__PURE__ */ new Set(["map"]) -}; -const knownInvalidChildren = { - p: /* @__PURE__ */ new Set([ - "address", - "article", - "aside", - "blockquote", - "center", - "details", - "dialog", - "dir", - "div", - "dl", - "fieldset", - "figure", - "footer", - "form", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "header", - "hgroup", - "hr", - "li", - "main", - "nav", - "menu", - "ol", - "p", - "pre", - "section", - "table", - "ul" - ]), - svg: /* @__PURE__ */ new Set([ - "b", - "blockquote", - "br", - "code", - "dd", - "div", - "dl", - "dt", - "em", - "embed", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "hr", - "i", - "img", - "li", - "menu", - "meta", - "ol", - "p", - "pre", - "ruby", - "s", - "small", - "span", - "strong", - "sub", - "sup", - "table", - "u", - "ul", - "var" - ]) -}; -const knownInvalidParents = { - a: /* @__PURE__ */ new Set(["a"]), - button: /* @__PURE__ */ new Set(["button"]), - dd: /* @__PURE__ */ new Set(["dd", "dt"]), - dt: /* @__PURE__ */ new Set(["dd", "dt"]), - form: /* @__PURE__ */ new Set(["form"]), - li: /* @__PURE__ */ new Set(["li"]), - h1: headings, - h2: headings, - h3: headings, - h4: headings, - h5: headings, - h6: headings -}; - -const validateHtmlNesting = (node, context) => { - if (node.type === 1 && node.tagType === 0 && context.parent && context.parent.type === 1 && context.parent.tagType === 0 && !isValidHTMLNesting(context.parent.tag, node.tag)) { - const error = new SyntaxError( - `<${node.tag}> cannot be child of <${context.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.` - ); - error.loc = node.loc; - context.onWarn(error); - } -}; - -const DOMNodeTransforms = [ - transformStyle, - ...!!(process.env.NODE_ENV !== "production") ? [transformTransition, validateHtmlNesting] : [] -]; -const DOMDirectiveTransforms = { - cloak: noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel, - // override compiler-core - on: transformOn, - // override compiler-core - show: transformShow -}; -function compile(src, options = {}) { - return baseCompile( - src, - extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...options.nodeTransforms || [] - ], - directiveTransforms: extend( - {}, - DOMDirectiveTransforms, - options.directiveTransforms || {} - ), - transformHoist: null - }) - ); -} -function parse(template, options = {}) { - return baseParse(template, extend({}, parserOptions, options)); -} - -export { DOMDirectiveTransforms, DOMErrorCodes, DOMErrorMessages, DOMNodeTransforms, TRANSITION, TRANSITION_GROUP, V_MODEL_CHECKBOX, V_MODEL_DYNAMIC, V_MODEL_RADIO, V_MODEL_SELECT, V_MODEL_TEXT, V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS, V_SHOW, compile, createDOMCompilerError, parse, parserOptions, transformStyle }; diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js deleted file mode 100644 index 8537569..0000000 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js +++ /dev/null @@ -1,6761 +0,0 @@ -/** -* @vue/compiler-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -var VueCompilerDOM = (function (exports) { - 'use strict'; - - /*! #__NO_SIDE_EFFECTS__ */ - // @__NO_SIDE_EFFECTS__ - function makeMap(str) { - const map = /* @__PURE__ */ Object.create(null); - for (const key of str.split(",")) map[key] = 1; - return (val) => val in map; - } - - const EMPTY_OBJ = Object.freeze({}) ; - const NOOP = () => { - }; - const NO = () => false; - const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter - (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); - const extend = Object.assign; - const isArray = Array.isArray; - const isString = (val) => typeof val === "string"; - const isSymbol = (val) => typeof val === "symbol"; - const isObject = (val) => val !== null && typeof val === "object"; - const isReservedProp = /* @__PURE__ */ makeMap( - // the leading comma is intentional so empty string "" is also included - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" - ); - const isBuiltInDirective = /* @__PURE__ */ makeMap( - "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" - ); - const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; - }; - const camelizeRE = /-(\w)/g; - const camelize = cacheStringFunction( - (str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); - } - ); - const capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); - }); - const toHandlerKey = cacheStringFunction( - (str) => { - const s = str ? `on${capitalize(str)}` : ``; - return s; - } - ); - - const PatchFlagNames = { - [1]: `TEXT`, - [2]: `CLASS`, - [4]: `STYLE`, - [8]: `PROPS`, - [16]: `FULL_PROPS`, - [32]: `NEED_HYDRATION`, - [64]: `STABLE_FRAGMENT`, - [128]: `KEYED_FRAGMENT`, - [256]: `UNKEYED_FRAGMENT`, - [512]: `NEED_PATCH`, - [1024]: `DYNAMIC_SLOTS`, - [2048]: `DEV_ROOT_FRAGMENT`, - [-1]: `HOISTED`, - [-2]: `BAIL` - }; - - const slotFlagsText = { - [1]: "STABLE", - [2]: "DYNAMIC", - [3]: "FORWARDED" - }; - - const range = 2; - function generateCodeFrame(source, start = 0, end = source.length) { - start = Math.max(0, Math.min(start, source.length)); - end = Math.max(0, Math.min(end, source.length)); - if (start > end) return ""; - let lines = source.split(/(\r?\n)/); - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) continue; - const line = j + 1; - res.push( - `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` - ); - const lineLength = lines[j].length; - const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; - if (j === i) { - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max( - 1, - end > count ? lineLength - pad : end - start - ); - res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); - } else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + "^".repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; - } - } - return res.join("\n"); - } - - const listDelimiterRE = /;(?![^(]*\))/g; - const propertyDelimiterRE = /:([^]+)/; - const styleCommentRE = /\/\*[^]*?\*\//g; - function parseStringStyle(cssText) { - const ret = {}; - cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; - } - - const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; - const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; - const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; - const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; - const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); - const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); - const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); - const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); - - const FRAGMENT = Symbol(`Fragment` ); - const TELEPORT = Symbol(`Teleport` ); - const SUSPENSE = Symbol(`Suspense` ); - const KEEP_ALIVE = Symbol(`KeepAlive` ); - const BASE_TRANSITION = Symbol( - `BaseTransition` - ); - const OPEN_BLOCK = Symbol(`openBlock` ); - const CREATE_BLOCK = Symbol(`createBlock` ); - const CREATE_ELEMENT_BLOCK = Symbol( - `createElementBlock` - ); - const CREATE_VNODE = Symbol(`createVNode` ); - const CREATE_ELEMENT_VNODE = Symbol( - `createElementVNode` - ); - const CREATE_COMMENT = Symbol( - `createCommentVNode` - ); - const CREATE_TEXT = Symbol( - `createTextVNode` - ); - const CREATE_STATIC = Symbol( - `createStaticVNode` - ); - const RESOLVE_COMPONENT = Symbol( - `resolveComponent` - ); - const RESOLVE_DYNAMIC_COMPONENT = Symbol( - `resolveDynamicComponent` - ); - const RESOLVE_DIRECTIVE = Symbol( - `resolveDirective` - ); - const RESOLVE_FILTER = Symbol( - `resolveFilter` - ); - const WITH_DIRECTIVES = Symbol( - `withDirectives` - ); - const RENDER_LIST = Symbol(`renderList` ); - const RENDER_SLOT = Symbol(`renderSlot` ); - const CREATE_SLOTS = Symbol(`createSlots` ); - const TO_DISPLAY_STRING = Symbol( - `toDisplayString` - ); - const MERGE_PROPS = Symbol(`mergeProps` ); - const NORMALIZE_CLASS = Symbol( - `normalizeClass` - ); - const NORMALIZE_STYLE = Symbol( - `normalizeStyle` - ); - const NORMALIZE_PROPS = Symbol( - `normalizeProps` - ); - const GUARD_REACTIVE_PROPS = Symbol( - `guardReactiveProps` - ); - const TO_HANDLERS = Symbol(`toHandlers` ); - const CAMELIZE = Symbol(`camelize` ); - const CAPITALIZE = Symbol(`capitalize` ); - const TO_HANDLER_KEY = Symbol( - `toHandlerKey` - ); - const SET_BLOCK_TRACKING = Symbol( - `setBlockTracking` - ); - const PUSH_SCOPE_ID = Symbol(`pushScopeId` ); - const POP_SCOPE_ID = Symbol(`popScopeId` ); - const WITH_CTX = Symbol(`withCtx` ); - const UNREF = Symbol(`unref` ); - const IS_REF = Symbol(`isRef` ); - const WITH_MEMO = Symbol(`withMemo` ); - const IS_MEMO_SAME = Symbol(`isMemoSame` ); - const helperNameMap = { - [FRAGMENT]: `Fragment`, - [TELEPORT]: `Teleport`, - [SUSPENSE]: `Suspense`, - [KEEP_ALIVE]: `KeepAlive`, - [BASE_TRANSITION]: `BaseTransition`, - [OPEN_BLOCK]: `openBlock`, - [CREATE_BLOCK]: `createBlock`, - [CREATE_ELEMENT_BLOCK]: `createElementBlock`, - [CREATE_VNODE]: `createVNode`, - [CREATE_ELEMENT_VNODE]: `createElementVNode`, - [CREATE_COMMENT]: `createCommentVNode`, - [CREATE_TEXT]: `createTextVNode`, - [CREATE_STATIC]: `createStaticVNode`, - [RESOLVE_COMPONENT]: `resolveComponent`, - [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, - [RESOLVE_DIRECTIVE]: `resolveDirective`, - [RESOLVE_FILTER]: `resolveFilter`, - [WITH_DIRECTIVES]: `withDirectives`, - [RENDER_LIST]: `renderList`, - [RENDER_SLOT]: `renderSlot`, - [CREATE_SLOTS]: `createSlots`, - [TO_DISPLAY_STRING]: `toDisplayString`, - [MERGE_PROPS]: `mergeProps`, - [NORMALIZE_CLASS]: `normalizeClass`, - [NORMALIZE_STYLE]: `normalizeStyle`, - [NORMALIZE_PROPS]: `normalizeProps`, - [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, - [TO_HANDLERS]: `toHandlers`, - [CAMELIZE]: `camelize`, - [CAPITALIZE]: `capitalize`, - [TO_HANDLER_KEY]: `toHandlerKey`, - [SET_BLOCK_TRACKING]: `setBlockTracking`, - [PUSH_SCOPE_ID]: `pushScopeId`, - [POP_SCOPE_ID]: `popScopeId`, - [WITH_CTX]: `withCtx`, - [UNREF]: `unref`, - [IS_REF]: `isRef`, - [WITH_MEMO]: `withMemo`, - [IS_MEMO_SAME]: `isMemoSame` - }; - function registerRuntimeHelpers(helpers) { - Object.getOwnPropertySymbols(helpers).forEach((s) => { - helperNameMap[s] = helpers[s]; - }); - } - - const Namespaces = { - "HTML": 0, - "0": "HTML", - "SVG": 1, - "1": "SVG", - "MATH_ML": 2, - "2": "MATH_ML" - }; - const NodeTypes = { - "ROOT": 0, - "0": "ROOT", - "ELEMENT": 1, - "1": "ELEMENT", - "TEXT": 2, - "2": "TEXT", - "COMMENT": 3, - "3": "COMMENT", - "SIMPLE_EXPRESSION": 4, - "4": "SIMPLE_EXPRESSION", - "INTERPOLATION": 5, - "5": "INTERPOLATION", - "ATTRIBUTE": 6, - "6": "ATTRIBUTE", - "DIRECTIVE": 7, - "7": "DIRECTIVE", - "COMPOUND_EXPRESSION": 8, - "8": "COMPOUND_EXPRESSION", - "IF": 9, - "9": "IF", - "IF_BRANCH": 10, - "10": "IF_BRANCH", - "FOR": 11, - "11": "FOR", - "TEXT_CALL": 12, - "12": "TEXT_CALL", - "VNODE_CALL": 13, - "13": "VNODE_CALL", - "JS_CALL_EXPRESSION": 14, - "14": "JS_CALL_EXPRESSION", - "JS_OBJECT_EXPRESSION": 15, - "15": "JS_OBJECT_EXPRESSION", - "JS_PROPERTY": 16, - "16": "JS_PROPERTY", - "JS_ARRAY_EXPRESSION": 17, - "17": "JS_ARRAY_EXPRESSION", - "JS_FUNCTION_EXPRESSION": 18, - "18": "JS_FUNCTION_EXPRESSION", - "JS_CONDITIONAL_EXPRESSION": 19, - "19": "JS_CONDITIONAL_EXPRESSION", - "JS_CACHE_EXPRESSION": 20, - "20": "JS_CACHE_EXPRESSION", - "JS_BLOCK_STATEMENT": 21, - "21": "JS_BLOCK_STATEMENT", - "JS_TEMPLATE_LITERAL": 22, - "22": "JS_TEMPLATE_LITERAL", - "JS_IF_STATEMENT": 23, - "23": "JS_IF_STATEMENT", - "JS_ASSIGNMENT_EXPRESSION": 24, - "24": "JS_ASSIGNMENT_EXPRESSION", - "JS_SEQUENCE_EXPRESSION": 25, - "25": "JS_SEQUENCE_EXPRESSION", - "JS_RETURN_STATEMENT": 26, - "26": "JS_RETURN_STATEMENT" - }; - const ElementTypes = { - "ELEMENT": 0, - "0": "ELEMENT", - "COMPONENT": 1, - "1": "COMPONENT", - "SLOT": 2, - "2": "SLOT", - "TEMPLATE": 3, - "3": "TEMPLATE" - }; - const ConstantTypes = { - "NOT_CONSTANT": 0, - "0": "NOT_CONSTANT", - "CAN_SKIP_PATCH": 1, - "1": "CAN_SKIP_PATCH", - "CAN_CACHE": 2, - "2": "CAN_CACHE", - "CAN_STRINGIFY": 3, - "3": "CAN_STRINGIFY" - }; - const locStub = { - start: { line: 1, column: 1, offset: 0 }, - end: { line: 1, column: 1, offset: 0 }, - source: "" - }; - function createRoot(children, source = "") { - return { - type: 0, - source, - children, - helpers: /* @__PURE__ */ new Set(), - components: [], - directives: [], - hoists: [], - imports: [], - cached: [], - temps: 0, - codegenNode: void 0, - loc: locStub - }; - } - function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { - if (context) { - if (isBlock) { - context.helper(OPEN_BLOCK); - context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); - } else { - context.helper(getVNodeHelper(context.inSSR, isComponent)); - } - if (directives) { - context.helper(WITH_DIRECTIVES); - } - } - return { - type: 13, - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent, - loc - }; - } - function createArrayExpression(elements, loc = locStub) { - return { - type: 17, - loc, - elements - }; - } - function createObjectExpression(properties, loc = locStub) { - return { - type: 15, - loc, - properties - }; - } - function createObjectProperty(key, value) { - return { - type: 16, - loc: locStub, - key: isString(key) ? createSimpleExpression(key, true) : key, - value - }; - } - function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { - return { - type: 4, - loc, - content, - isStatic, - constType: isStatic ? 3 : constType - }; - } - function createInterpolation(content, loc) { - return { - type: 5, - loc, - content: isString(content) ? createSimpleExpression(content, false, loc) : content - }; - } - function createCompoundExpression(children, loc = locStub) { - return { - type: 8, - loc, - children - }; - } - function createCallExpression(callee, args = [], loc = locStub) { - return { - type: 14, - loc, - callee, - arguments: args - }; - } - function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { - return { - type: 18, - params, - returns, - newline, - isSlot, - loc - }; - } - function createConditionalExpression(test, consequent, alternate, newline = true) { - return { - type: 19, - test, - consequent, - alternate, - newline, - loc: locStub - }; - } - function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) { - return { - type: 20, - index, - value, - needPauseTracking, - inVOnce, - needArraySpread: false, - loc: locStub - }; - } - function createBlockStatement(body) { - return { - type: 21, - body, - loc: locStub - }; - } - function createTemplateLiteral(elements) { - return { - type: 22, - elements, - loc: locStub - }; - } - function createIfStatement(test, consequent, alternate) { - return { - type: 23, - test, - consequent, - alternate, - loc: locStub - }; - } - function createAssignmentExpression(left, right) { - return { - type: 24, - left, - right, - loc: locStub - }; - } - function createSequenceExpression(expressions) { - return { - type: 25, - expressions, - loc: locStub - }; - } - function createReturnStatement(returns) { - return { - type: 26, - returns, - loc: locStub - }; - } - function getVNodeHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; - } - function getVNodeBlockHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; - } - function convertToBlock(node, { helper, removeHelper, inSSR }) { - if (!node.isBlock) { - node.isBlock = true; - removeHelper(getVNodeHelper(inSSR, node.isComponent)); - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(inSSR, node.isComponent)); - } - } - - const defaultDelimitersOpen = new Uint8Array([123, 123]); - const defaultDelimitersClose = new Uint8Array([125, 125]); - function isTagStartChar(c) { - return c >= 97 && c <= 122 || c >= 65 && c <= 90; - } - function isWhitespace(c) { - return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; - } - function isEndOfTagSection(c) { - return c === 47 || c === 62 || isWhitespace(c); - } - function toCharCodes(str) { - const ret = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) { - ret[i] = str.charCodeAt(i); - } - return ret; - } - const Sequences = { - Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), - // CDATA[ - CdataEnd: new Uint8Array([93, 93, 62]), - // ]]> - CommentEnd: new Uint8Array([45, 45, 62]), - // `-->` - ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), - // `<\/script` - StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), - // `</style` - TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), - // `</title` - TextareaEnd: new Uint8Array([ - 60, - 47, - 116, - 101, - 120, - 116, - 97, - 114, - 101, - 97 - ]) - // `</textarea - }; - class Tokenizer { - constructor(stack, cbs) { - this.stack = stack; - this.cbs = cbs; - /** The current state the tokenizer is in. */ - this.state = 1; - /** The read buffer. */ - this.buffer = ""; - /** The beginning of the section that is currently being read. */ - this.sectionStart = 0; - /** The index within the buffer that we are currently looking at. */ - this.index = 0; - /** The start of the last entity. */ - this.entityStart = 0; - /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ - this.baseState = 1; - /** For special parsing behavior inside of script and style tags. */ - this.inRCDATA = false; - /** For disabling RCDATA tags handling */ - this.inXML = false; - /** For disabling interpolation parsing in v-pre */ - this.inVPre = false; - /** Record newline positions for fast line / column calculation */ - this.newlines = []; - this.mode = 0; - this.delimiterOpen = defaultDelimitersOpen; - this.delimiterClose = defaultDelimitersClose; - this.delimiterIndex = -1; - this.currentSequence = void 0; - this.sequenceIndex = 0; - } - get inSFCRoot() { - return this.mode === 2 && this.stack.length === 0; - } - reset() { - this.state = 1; - this.mode = 0; - this.buffer = ""; - this.sectionStart = 0; - this.index = 0; - this.baseState = 1; - this.inRCDATA = false; - this.currentSequence = void 0; - this.newlines.length = 0; - this.delimiterOpen = defaultDelimitersOpen; - this.delimiterClose = defaultDelimitersClose; - } - /** - * Generate Position object with line / column information using recorded - * newline positions. We know the index is always going to be an already - * processed index, so all the newlines up to this index should have been - * recorded. - */ - getPos(index) { - let line = 1; - let column = index + 1; - for (let i = this.newlines.length - 1; i >= 0; i--) { - const newlineIndex = this.newlines[i]; - if (index > newlineIndex) { - line = i + 2; - column = index - newlineIndex; - break; - } - } - return { - column, - line, - offset: index - }; - } - peek() { - return this.buffer.charCodeAt(this.index + 1); - } - stateText(c) { - if (c === 60) { - if (this.index > this.sectionStart) { - this.cbs.ontext(this.sectionStart, this.index); - } - this.state = 5; - this.sectionStart = this.index; - } else if (!this.inVPre && c === this.delimiterOpen[0]) { - this.state = 2; - this.delimiterIndex = 0; - this.stateInterpolationOpen(c); - } - } - stateInterpolationOpen(c) { - if (c === this.delimiterOpen[this.delimiterIndex]) { - if (this.delimiterIndex === this.delimiterOpen.length - 1) { - const start = this.index + 1 - this.delimiterOpen.length; - if (start > this.sectionStart) { - this.cbs.ontext(this.sectionStart, start); - } - this.state = 3; - this.sectionStart = start; - } else { - this.delimiterIndex++; - } - } else if (this.inRCDATA) { - this.state = 32; - this.stateInRCDATA(c); - } else { - this.state = 1; - this.stateText(c); - } - } - stateInterpolation(c) { - if (c === this.delimiterClose[0]) { - this.state = 4; - this.delimiterIndex = 0; - this.stateInterpolationClose(c); - } - } - stateInterpolationClose(c) { - if (c === this.delimiterClose[this.delimiterIndex]) { - if (this.delimiterIndex === this.delimiterClose.length - 1) { - this.cbs.oninterpolation(this.sectionStart, this.index + 1); - if (this.inRCDATA) { - this.state = 32; - } else { - this.state = 1; - } - this.sectionStart = this.index + 1; - } else { - this.delimiterIndex++; - } - } else { - this.state = 3; - this.stateInterpolation(c); - } - } - stateSpecialStartSequence(c) { - const isEnd = this.sequenceIndex === this.currentSequence.length; - const isMatch = isEnd ? ( - // If we are at the end of the sequence, make sure the tag name has ended - isEndOfTagSection(c) - ) : ( - // Otherwise, do a case-insensitive comparison - (c | 32) === this.currentSequence[this.sequenceIndex] - ); - if (!isMatch) { - this.inRCDATA = false; - } else if (!isEnd) { - this.sequenceIndex++; - return; - } - this.sequenceIndex = 0; - this.state = 6; - this.stateInTagName(c); - } - /** Look for an end tag. For <title> and <textarea>, also decode entities. */ - stateInRCDATA(c) { - if (this.sequenceIndex === this.currentSequence.length) { - if (c === 62 || isWhitespace(c)) { - const endOfText = this.index - this.currentSequence.length; - if (this.sectionStart < endOfText) { - const actualIndex = this.index; - this.index = endOfText; - this.cbs.ontext(this.sectionStart, endOfText); - this.index = actualIndex; - } - this.sectionStart = endOfText + 2; - this.stateInClosingTagName(c); - this.inRCDATA = false; - return; - } - this.sequenceIndex = 0; - } - if ((c | 32) === this.currentSequence[this.sequenceIndex]) { - this.sequenceIndex += 1; - } else if (this.sequenceIndex === 0) { - if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { - if (!this.inVPre && c === this.delimiterOpen[0]) { - this.state = 2; - this.delimiterIndex = 0; - this.stateInterpolationOpen(c); - } - } else if (this.fastForwardTo(60)) { - this.sequenceIndex = 1; - } - } else { - this.sequenceIndex = Number(c === 60); - } - } - stateCDATASequence(c) { - if (c === Sequences.Cdata[this.sequenceIndex]) { - if (++this.sequenceIndex === Sequences.Cdata.length) { - this.state = 28; - this.currentSequence = Sequences.CdataEnd; - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - } - } else { - this.sequenceIndex = 0; - this.state = 23; - this.stateInDeclaration(c); - } - } - /** - * When we wait for one specific character, we can speed things up - * by skipping through the buffer until we find it. - * - * @returns Whether the character was found. - */ - fastForwardTo(c) { - while (++this.index < this.buffer.length) { - const cc = this.buffer.charCodeAt(this.index); - if (cc === 10) { - this.newlines.push(this.index); - } - if (cc === c) { - return true; - } - } - this.index = this.buffer.length - 1; - return false; - } - /** - * Comments and CDATA end with `-->` and `]]>`. - * - * Their common qualities are: - * - Their end sequences have a distinct character they start with. - * - That character is then repeated, so we have to check multiple repeats. - * - All characters but the start character of the sequence can be skipped. - */ - stateInCommentLike(c) { - if (c === this.currentSequence[this.sequenceIndex]) { - if (++this.sequenceIndex === this.currentSequence.length) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, this.index - 2); - } else { - this.cbs.oncomment(this.sectionStart, this.index - 2); - } - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - this.state = 1; - } - } else if (this.sequenceIndex === 0) { - if (this.fastForwardTo(this.currentSequence[0])) { - this.sequenceIndex = 1; - } - } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { - this.sequenceIndex = 0; - } - } - startSpecial(sequence, offset) { - this.enterRCDATA(sequence, offset); - this.state = 31; - } - enterRCDATA(sequence, offset) { - this.inRCDATA = true; - this.currentSequence = sequence; - this.sequenceIndex = offset; - } - stateBeforeTagName(c) { - if (c === 33) { - this.state = 22; - this.sectionStart = this.index + 1; - } else if (c === 63) { - this.state = 24; - this.sectionStart = this.index + 1; - } else if (isTagStartChar(c)) { - this.sectionStart = this.index; - if (this.mode === 0) { - this.state = 6; - } else if (this.inSFCRoot) { - this.state = 34; - } else if (!this.inXML) { - if (c === 116) { - this.state = 30; - } else { - this.state = c === 115 ? 29 : 6; - } - } else { - this.state = 6; - } - } else if (c === 47) { - this.state = 8; - } else { - this.state = 1; - this.stateText(c); - } - } - stateInTagName(c) { - if (isEndOfTagSection(c)) { - this.handleTagName(c); - } - } - stateInSFCRootTagName(c) { - if (isEndOfTagSection(c)) { - const tag = this.buffer.slice(this.sectionStart, this.index); - if (tag !== "template") { - this.enterRCDATA(toCharCodes(`</` + tag), 0); - } - this.handleTagName(c); - } - } - handleTagName(c) { - this.cbs.onopentagname(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = 11; - this.stateBeforeAttrName(c); - } - stateBeforeClosingTagName(c) { - if (isWhitespace(c)) ; else if (c === 62) { - { - this.cbs.onerr(14, this.index); - } - this.state = 1; - this.sectionStart = this.index + 1; - } else { - this.state = isTagStartChar(c) ? 9 : 27; - this.sectionStart = this.index; - } - } - stateInClosingTagName(c) { - if (c === 62 || isWhitespace(c)) { - this.cbs.onclosetag(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = 10; - this.stateAfterClosingTagName(c); - } - } - stateAfterClosingTagName(c) { - if (c === 62) { - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeAttrName(c) { - if (c === 62) { - this.cbs.onopentagend(this.index); - if (this.inRCDATA) { - this.state = 32; - } else { - this.state = 1; - } - this.sectionStart = this.index + 1; - } else if (c === 47) { - this.state = 7; - if (this.peek() !== 62) { - this.cbs.onerr(22, this.index); - } - } else if (c === 60 && this.peek() === 47) { - this.cbs.onopentagend(this.index); - this.state = 5; - this.sectionStart = this.index; - } else if (!isWhitespace(c)) { - if (c === 61) { - this.cbs.onerr( - 19, - this.index - ); - } - this.handleAttrStart(c); - } - } - handleAttrStart(c) { - if (c === 118 && this.peek() === 45) { - this.state = 13; - this.sectionStart = this.index; - } else if (c === 46 || c === 58 || c === 64 || c === 35) { - this.cbs.ondirname(this.index, this.index + 1); - this.state = 14; - this.sectionStart = this.index + 1; - } else { - this.state = 12; - this.sectionStart = this.index; - } - } - stateInSelfClosingTag(c) { - if (c === 62) { - this.cbs.onselfclosingtag(this.index); - this.state = 1; - this.sectionStart = this.index + 1; - this.inRCDATA = false; - } else if (!isWhitespace(c)) { - this.state = 11; - this.stateBeforeAttrName(c); - } - } - stateInAttrName(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.onattribname(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 34 || c === 39 || c === 60) { - this.cbs.onerr( - 17, - this.index - ); - } - } - stateInDirName(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirname(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 58) { - this.cbs.ondirname(this.sectionStart, this.index); - this.state = 14; - this.sectionStart = this.index + 1; - } else if (c === 46) { - this.cbs.ondirname(this.sectionStart, this.index); - this.state = 16; - this.sectionStart = this.index + 1; - } - } - stateInDirArg(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirarg(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 91) { - this.state = 15; - } else if (c === 46) { - this.cbs.ondirarg(this.sectionStart, this.index); - this.state = 16; - this.sectionStart = this.index + 1; - } - } - stateInDynamicDirArg(c) { - if (c === 93) { - this.state = 14; - } else if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirarg(this.sectionStart, this.index + 1); - this.handleAttrNameEnd(c); - { - this.cbs.onerr( - 27, - this.index - ); - } - } - } - stateInDirModifier(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirmodifier(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 46) { - this.cbs.ondirmodifier(this.sectionStart, this.index); - this.sectionStart = this.index + 1; - } - } - handleAttrNameEnd(c) { - this.sectionStart = this.index; - this.state = 17; - this.cbs.onattribnameend(this.index); - this.stateAfterAttrName(c); - } - stateAfterAttrName(c) { - if (c === 61) { - this.state = 18; - } else if (c === 47 || c === 62) { - this.cbs.onattribend(0, this.sectionStart); - this.sectionStart = -1; - this.state = 11; - this.stateBeforeAttrName(c); - } else if (!isWhitespace(c)) { - this.cbs.onattribend(0, this.sectionStart); - this.handleAttrStart(c); - } - } - stateBeforeAttrValue(c) { - if (c === 34) { - this.state = 19; - this.sectionStart = this.index + 1; - } else if (c === 39) { - this.state = 20; - this.sectionStart = this.index + 1; - } else if (!isWhitespace(c)) { - this.sectionStart = this.index; - this.state = 21; - this.stateInAttrValueNoQuotes(c); - } - } - handleInAttrValue(c, quote) { - if (c === quote || this.fastForwardTo(quote)) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend( - quote === 34 ? 3 : 2, - this.index + 1 - ); - this.state = 11; - } - } - stateInAttrValueDoubleQuotes(c) { - this.handleInAttrValue(c, 34); - } - stateInAttrValueSingleQuotes(c) { - this.handleInAttrValue(c, 39); - } - stateInAttrValueNoQuotes(c) { - if (isWhitespace(c) || c === 62) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend(1, this.index); - this.state = 11; - this.stateBeforeAttrName(c); - } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { - this.cbs.onerr( - 18, - this.index - ); - } else ; - } - stateBeforeDeclaration(c) { - if (c === 91) { - this.state = 26; - this.sequenceIndex = 0; - } else { - this.state = c === 45 ? 25 : 23; - } - } - stateInDeclaration(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateInProcessingInstruction(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.cbs.onprocessinginstruction(this.sectionStart, this.index); - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeComment(c) { - if (c === 45) { - this.state = 28; - this.currentSequence = Sequences.CommentEnd; - this.sequenceIndex = 2; - this.sectionStart = this.index + 1; - } else { - this.state = 23; - } - } - stateInSpecialComment(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.cbs.oncomment(this.sectionStart, this.index); - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeSpecialS(c) { - if (c === Sequences.ScriptEnd[3]) { - this.startSpecial(Sequences.ScriptEnd, 4); - } else if (c === Sequences.StyleEnd[3]) { - this.startSpecial(Sequences.StyleEnd, 4); - } else { - this.state = 6; - this.stateInTagName(c); - } - } - stateBeforeSpecialT(c) { - if (c === Sequences.TitleEnd[3]) { - this.startSpecial(Sequences.TitleEnd, 4); - } else if (c === Sequences.TextareaEnd[3]) { - this.startSpecial(Sequences.TextareaEnd, 4); - } else { - this.state = 6; - this.stateInTagName(c); - } - } - startEntity() { - } - stateInEntity() { - } - /** - * Iterates through the buffer, calling the function corresponding to the current state. - * - * States that are more likely to be hit are higher up, as a performance improvement. - */ - parse(input) { - this.buffer = input; - while (this.index < this.buffer.length) { - const c = this.buffer.charCodeAt(this.index); - if (c === 10) { - this.newlines.push(this.index); - } - switch (this.state) { - case 1: { - this.stateText(c); - break; - } - case 2: { - this.stateInterpolationOpen(c); - break; - } - case 3: { - this.stateInterpolation(c); - break; - } - case 4: { - this.stateInterpolationClose(c); - break; - } - case 31: { - this.stateSpecialStartSequence(c); - break; - } - case 32: { - this.stateInRCDATA(c); - break; - } - case 26: { - this.stateCDATASequence(c); - break; - } - case 19: { - this.stateInAttrValueDoubleQuotes(c); - break; - } - case 12: { - this.stateInAttrName(c); - break; - } - case 13: { - this.stateInDirName(c); - break; - } - case 14: { - this.stateInDirArg(c); - break; - } - case 15: { - this.stateInDynamicDirArg(c); - break; - } - case 16: { - this.stateInDirModifier(c); - break; - } - case 28: { - this.stateInCommentLike(c); - break; - } - case 27: { - this.stateInSpecialComment(c); - break; - } - case 11: { - this.stateBeforeAttrName(c); - break; - } - case 6: { - this.stateInTagName(c); - break; - } - case 34: { - this.stateInSFCRootTagName(c); - break; - } - case 9: { - this.stateInClosingTagName(c); - break; - } - case 5: { - this.stateBeforeTagName(c); - break; - } - case 17: { - this.stateAfterAttrName(c); - break; - } - case 20: { - this.stateInAttrValueSingleQuotes(c); - break; - } - case 18: { - this.stateBeforeAttrValue(c); - break; - } - case 8: { - this.stateBeforeClosingTagName(c); - break; - } - case 10: { - this.stateAfterClosingTagName(c); - break; - } - case 29: { - this.stateBeforeSpecialS(c); - break; - } - case 30: { - this.stateBeforeSpecialT(c); - break; - } - case 21: { - this.stateInAttrValueNoQuotes(c); - break; - } - case 7: { - this.stateInSelfClosingTag(c); - break; - } - case 23: { - this.stateInDeclaration(c); - break; - } - case 22: { - this.stateBeforeDeclaration(c); - break; - } - case 25: { - this.stateBeforeComment(c); - break; - } - case 24: { - this.stateInProcessingInstruction(c); - break; - } - case 33: { - this.stateInEntity(); - break; - } - } - this.index++; - } - this.cleanup(); - this.finish(); - } - /** - * Remove data that has already been consumed from the buffer. - */ - cleanup() { - if (this.sectionStart !== this.index) { - if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { - this.cbs.ontext(this.sectionStart, this.index); - this.sectionStart = this.index; - } else if (this.state === 19 || this.state === 20 || this.state === 21) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = this.index; - } - } - } - finish() { - this.handleTrailingData(); - this.cbs.onend(); - } - /** Handle any trailing data. */ - handleTrailingData() { - const endIndex = this.buffer.length; - if (this.sectionStart >= endIndex) { - return; - } - if (this.state === 28) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, endIndex); - } else { - this.cbs.oncomment(this.sectionStart, endIndex); - } - } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { - this.cbs.ontext(this.sectionStart, endIndex); - } - } - emitCodePoint(cp, consumed) { - } - } - - const CompilerDeprecationTypes = { - "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", - "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", - "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", - "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", - "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", - "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", - "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", - "COMPILER_FILTERS": "COMPILER_FILTERS" - }; - const deprecationData = { - ["COMPILER_IS_ON_ELEMENT"]: { - message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC"]: { - message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_OBJECT_ORDER"]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE"]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { - message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE"]: { - message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE"]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTERS"]: { - message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } - }; - function getCompatValue(key, { compatConfig }) { - const value = compatConfig && compatConfig[key]; - if (key === "MODE") { - return value || 3; - } else { - return value; - } - } - function isCompatEnabled(key, context) { - const mode = getCompatValue("MODE", context); - const value = getCompatValue(key, context); - return mode === 3 ? value === true : value !== false; - } - function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - if (enabled) { - warnDeprecation(key, context, loc, ...args); - } - return enabled; - } - function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === "suppress-warning") { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` - Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) err.loc = loc; - context.onWarn(err); - } - - function defaultOnError(error) { - throw error; - } - function defaultOnWarn(msg) { - console.warn(`[Vue warn] ${msg.message}`); - } - function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; - } - const ErrorCodes = { - "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, - "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", - "CDATA_IN_HTML_CONTENT": 1, - "1": "CDATA_IN_HTML_CONTENT", - "DUPLICATE_ATTRIBUTE": 2, - "2": "DUPLICATE_ATTRIBUTE", - "END_TAG_WITH_ATTRIBUTES": 3, - "3": "END_TAG_WITH_ATTRIBUTES", - "END_TAG_WITH_TRAILING_SOLIDUS": 4, - "4": "END_TAG_WITH_TRAILING_SOLIDUS", - "EOF_BEFORE_TAG_NAME": 5, - "5": "EOF_BEFORE_TAG_NAME", - "EOF_IN_CDATA": 6, - "6": "EOF_IN_CDATA", - "EOF_IN_COMMENT": 7, - "7": "EOF_IN_COMMENT", - "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, - "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", - "EOF_IN_TAG": 9, - "9": "EOF_IN_TAG", - "INCORRECTLY_CLOSED_COMMENT": 10, - "10": "INCORRECTLY_CLOSED_COMMENT", - "INCORRECTLY_OPENED_COMMENT": 11, - "11": "INCORRECTLY_OPENED_COMMENT", - "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, - "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", - "MISSING_ATTRIBUTE_VALUE": 13, - "13": "MISSING_ATTRIBUTE_VALUE", - "MISSING_END_TAG_NAME": 14, - "14": "MISSING_END_TAG_NAME", - "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, - "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", - "NESTED_COMMENT": 16, - "16": "NESTED_COMMENT", - "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, - "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", - "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, - "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", - "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, - "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", - "UNEXPECTED_NULL_CHARACTER": 20, - "20": "UNEXPECTED_NULL_CHARACTER", - "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, - "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", - "UNEXPECTED_SOLIDUS_IN_TAG": 22, - "22": "UNEXPECTED_SOLIDUS_IN_TAG", - "X_INVALID_END_TAG": 23, - "23": "X_INVALID_END_TAG", - "X_MISSING_END_TAG": 24, - "24": "X_MISSING_END_TAG", - "X_MISSING_INTERPOLATION_END": 25, - "25": "X_MISSING_INTERPOLATION_END", - "X_MISSING_DIRECTIVE_NAME": 26, - "26": "X_MISSING_DIRECTIVE_NAME", - "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, - "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", - "X_V_IF_NO_EXPRESSION": 28, - "28": "X_V_IF_NO_EXPRESSION", - "X_V_IF_SAME_KEY": 29, - "29": "X_V_IF_SAME_KEY", - "X_V_ELSE_NO_ADJACENT_IF": 30, - "30": "X_V_ELSE_NO_ADJACENT_IF", - "X_V_FOR_NO_EXPRESSION": 31, - "31": "X_V_FOR_NO_EXPRESSION", - "X_V_FOR_MALFORMED_EXPRESSION": 32, - "32": "X_V_FOR_MALFORMED_EXPRESSION", - "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, - "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", - "X_V_BIND_NO_EXPRESSION": 34, - "34": "X_V_BIND_NO_EXPRESSION", - "X_V_ON_NO_EXPRESSION": 35, - "35": "X_V_ON_NO_EXPRESSION", - "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, - "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", - "X_V_SLOT_MIXED_SLOT_USAGE": 37, - "37": "X_V_SLOT_MIXED_SLOT_USAGE", - "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, - "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", - "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, - "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", - "X_V_SLOT_MISPLACED": 40, - "40": "X_V_SLOT_MISPLACED", - "X_V_MODEL_NO_EXPRESSION": 41, - "41": "X_V_MODEL_NO_EXPRESSION", - "X_V_MODEL_MALFORMED_EXPRESSION": 42, - "42": "X_V_MODEL_MALFORMED_EXPRESSION", - "X_V_MODEL_ON_SCOPE_VARIABLE": 43, - "43": "X_V_MODEL_ON_SCOPE_VARIABLE", - "X_V_MODEL_ON_PROPS": 44, - "44": "X_V_MODEL_ON_PROPS", - "X_INVALID_EXPRESSION": 45, - "45": "X_INVALID_EXPRESSION", - "X_KEEP_ALIVE_INVALID_CHILDREN": 46, - "46": "X_KEEP_ALIVE_INVALID_CHILDREN", - "X_PREFIX_ID_NOT_SUPPORTED": 47, - "47": "X_PREFIX_ID_NOT_SUPPORTED", - "X_MODULE_MODE_NOT_SUPPORTED": 48, - "48": "X_MODULE_MODE_NOT_SUPPORTED", - "X_CACHE_HANDLER_NOT_SUPPORTED": 49, - "49": "X_CACHE_HANDLER_NOT_SUPPORTED", - "X_SCOPE_ID_NOT_SUPPORTED": 50, - "50": "X_SCOPE_ID_NOT_SUPPORTED", - "X_VNODE_HOOKS": 51, - "51": "X_VNODE_HOOKS", - "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52, - "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", - "__EXTEND_POINT__": 53, - "53": "__EXTEND_POINT__" - }; - const errorMessages = { - // parse errors - [0]: "Illegal comment.", - [1]: "CDATA section is allowed only in XML context.", - [2]: "Duplicate attribute.", - [3]: "End tag cannot have attributes.", - [4]: "Illegal '/' in tags.", - [5]: "Unexpected EOF in tag.", - [6]: "Unexpected EOF in CDATA section.", - [7]: "Unexpected EOF in comment.", - [8]: "Unexpected EOF in script.", - [9]: "Unexpected EOF in tag.", - [10]: "Incorrectly closed comment.", - [11]: "Incorrectly opened comment.", - [12]: "Illegal tag name. Use '<' to print '<'.", - [13]: "Attribute value was expected.", - [14]: "End tag name was expected.", - [15]: "Whitespace was expected.", - [16]: "Unexpected '<!--' in comment.", - [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, - [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", - [19]: "Attribute name cannot start with '='.", - [21]: "'<?' is allowed only in XML context.", - [20]: `Unexpected null character.`, - [22]: "Illegal '/' in tags.", - // Vue-specific parse errors - [23]: "Invalid end tag.", - [24]: "Element is missing end tag.", - [25]: "Interpolation end sign was not found.", - [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", - [26]: "Legal directive name was expected.", - // transform errors - [28]: `v-if/v-else-if is missing expression.`, - [29]: `v-if/else branches must use unique keys.`, - [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, - [31]: `v-for is missing expression.`, - [32]: `v-for has invalid expression.`, - [33]: `<template v-for> key should be placed on the <template> tag.`, - [34]: `v-bind is missing expression.`, - [52]: `v-bind with same-name shorthand only allows static argument.`, - [35]: `v-on is missing expression.`, - [36]: `Unexpected custom directive on <slot> outlet.`, - [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, - [38]: `Duplicate slot names found. `, - [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, - [40]: `v-slot can only be used on components or <template> tags.`, - [41]: `v-model is missing expression.`, - [42]: `v-model value must be a valid JavaScript member expression.`, - [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, - [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. -Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, - [45]: `Error parsing JavaScript expression: `, - [46]: `<KeepAlive> expects exactly one child component.`, - [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, - // generic errors - [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, - [48]: `ES module mode is not supported in this build of compiler.`, - [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, - [50]: `"scopeId" option is only supported in module mode.`, - // just to fulfill types - [53]: `` - }; - - function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { - { - return; - } - } - function isReferencedIdentifier(id, parent, parentStack) { - { - return false; - } - } - function isInDestructureAssignment(parent, parentStack) { - if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === "AssignmentExpression") { - return true; - } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { - break; - } - } - } - return false; - } - function isInNewExpression(parentStack) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === "NewExpression") { - return true; - } else if (p.type !== "MemberExpression") { - break; - } - } - return false; - } - function walkFunctionParams(node, onIdent) { - for (const p of node.params) { - for (const id of extractIdentifiers(p)) { - onIdent(id); - } - } - } - function walkBlockDeclarations(block, onIdent) { - for (const stmt of block.body) { - if (stmt.type === "VariableDeclaration") { - if (stmt.declare) continue; - for (const decl of stmt.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { - if (stmt.declare || !stmt.id) continue; - onIdent(stmt.id); - } else if (isForStatement(stmt)) { - walkForStatement(stmt, true, onIdent); - } - } - } - function isForStatement(stmt) { - return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement"; - } - function walkForStatement(stmt, isVar, onIdent) { - const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; - if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) { - for (const decl of variable.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } - } - function extractIdentifiers(param, nodes = []) { - switch (param.type) { - case "Identifier": - nodes.push(param); - break; - case "MemberExpression": - let object = param; - while (object.type === "MemberExpression") { - object = object.object; - } - nodes.push(object); - break; - case "ObjectPattern": - for (const prop of param.properties) { - if (prop.type === "RestElement") { - extractIdentifiers(prop.argument, nodes); - } else { - extractIdentifiers(prop.value, nodes); - } - } - break; - case "ArrayPattern": - param.elements.forEach((element) => { - if (element) extractIdentifiers(element, nodes); - }); - break; - case "RestElement": - extractIdentifiers(param.argument, nodes); - break; - case "AssignmentPattern": - extractIdentifiers(param.left, nodes); - break; - } - return nodes; - } - const isFunctionType = (node) => { - return /Function(?:Expression|Declaration)$|Method$/.test(node.type); - }; - const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; - const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; - const TS_NODE_TYPES = [ - "TSAsExpression", - // foo as number - "TSTypeAssertion", - // (<number>foo) - "TSNonNullExpression", - // foo! - "TSInstantiationExpression", - // foo<string> - "TSSatisfiesExpression" - // foo satisfies T - ]; - function unwrapTSNode(node) { - if (TS_NODE_TYPES.includes(node.type)) { - return unwrapTSNode(node.expression); - } else { - return node; - } - } - - const isStaticExp = (p) => p.type === 4 && p.isStatic; - function isCoreComponent(tag) { - switch (tag) { - case "Teleport": - case "teleport": - return TELEPORT; - case "Suspense": - case "suspense": - return SUSPENSE; - case "KeepAlive": - case "keep-alive": - return KEEP_ALIVE; - case "BaseTransition": - case "base-transition": - return BASE_TRANSITION; - } - } - const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; - const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); - const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; - const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; - const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; - const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; - const isMemberExpressionBrowser = (exp) => { - const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === "[") { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } else if (char === "(") { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === "`") { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } else if (char === `[`) { - currentOpenBracketCount++; - } else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === "`") { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } else if (char === `(`) { - currentOpenParensCount++; - } else if (char === `)`) { - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; - } - } - return !currentOpenBracketCount && !currentOpenParensCount; - }; - const isMemberExpressionNode = NOOP ; - const isMemberExpression = isMemberExpressionBrowser ; - const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; - const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); - const isFnExpressionNode = NOOP ; - const isFnExpression = isFnExpressionBrowser ; - function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation( - { - offset: pos.offset, - line: pos.line, - column: pos.column - }, - source, - numberOfCharacters - ); - } - function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10) { - linesCount++; - lastNewLinePos = i; - } - } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; - return pos; - } - function assert(condition, msg) { - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } - } - function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { - return p; - } - } - } - function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - if (dynamicOnly) continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { - return p; - } - } - } - function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); - } - function hasDynamicKeyVBind(node) { - return node.props.some( - (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" - p.arg.type !== 4 || // v-bind:[_ctx.foo] - !p.arg.isStatic) - // v-bind:[foo] - ); - } - function isText$1(node) { - return node.type === 5 || node.type === 2; - } - function isVSlot(p) { - return p.type === 7 && p.name === "slot"; - } - function isTemplateNode(node) { - return node.type === 1 && node.tagType === 3; - } - function isSlotOutlet(node) { - return node.type === 1 && node.tagType === 2; - } - const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); - function getUnnormalizedProps(props, callPath = []) { - if (props && !isString(props) && props.type === 14) { - const callee = props.callee; - if (!isString(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps( - props.arguments[0], - callPath.concat(props) - ); - } - } - return [props, callPath]; - } - function injectProp(node, prop, context) { - let propsWithInjection; - let props = node.type === 13 ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && !isString(props) && props.type === 14) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || isString(props)) { - propsWithInjection = createObjectExpression([prop]); - } else if (props.type === 14) { - const first = props.arguments[0]; - if (!isString(first) && first.type === 15) { - if (!hasProp(prop, first)) { - first.properties.unshift(prop); - } - } else { - if (props.callee === TO_HANDLERS) { - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } else if (props.type === 15) { - if (!hasProp(prop, props)) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } else { - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } - } - if (node.type === 13) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } else { - node.props = propsWithInjection; - } - } else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } else { - node.arguments[2] = propsWithInjection; - } - } - } - function hasProp(prop, props) { - let result = false; - if (prop.key.type === 4) { - const propKeyName = prop.key.content; - result = props.properties.some( - (p) => p.key.type === 4 && p.key.content === propKeyName - ); - } - return result; - } - function toValidAssetId(name, type) { - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); - })}`; - } - function hasScopeRef(node, ids) { - if (!node || Object.keys(ids).length === 0) { - return false; - } - switch (node.type) { - case 1: - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { - return true; - } - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 11: - if (hasScopeRef(node.source, ids)) { - return true; - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 9: - return node.branches.some((b) => hasScopeRef(b, ids)); - case 10: - if (hasScopeRef(node.condition, ids)) { - return true; - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 4: - return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; - case 8: - return node.children.some((c) => isObject(c) && hasScopeRef(c, ids)); - case 5: - case 12: - return hasScopeRef(node.content, ids); - case 2: - case 3: - case 20: - return false; - default: - return false; - } - } - function getMemoedVNodeCall(node) { - if (node.type === 14 && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } else { - return node; - } - } - const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; - - const defaultParserOptions = { - parseMode: "base", - ns: 0, - delimiters: [`{{`, `}}`], - getNamespace: () => 0, - isVoidTag: NO, - isPreTag: NO, - isIgnoreNewlineTag: NO, - isCustomElement: NO, - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: true, - prefixIdentifiers: false - }; - let currentOptions = defaultParserOptions; - let currentRoot = null; - let currentInput = ""; - let currentOpenTag = null; - let currentProp = null; - let currentAttrValue = ""; - let currentAttrStartIndex = -1; - let currentAttrEndIndex = -1; - let inPre = 0; - let inVPre = false; - let currentVPreBoundary = null; - const stack = []; - const tokenizer = new Tokenizer(stack, { - onerr: emitError, - ontext(start, end) { - onText(getSlice(start, end), start, end); - }, - ontextentity(char, start, end) { - onText(char, start, end); - }, - oninterpolation(start, end) { - if (inVPre) { - return onText(getSlice(start, end), start, end); - } - let innerStart = start + tokenizer.delimiterOpen.length; - let innerEnd = end - tokenizer.delimiterClose.length; - while (isWhitespace(currentInput.charCodeAt(innerStart))) { - innerStart++; - } - while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { - innerEnd--; - } - let exp = getSlice(innerStart, innerEnd); - if (exp.includes("&")) { - { - exp = currentOptions.decodeEntities(exp, false); - } - } - addNode({ - type: 5, - content: createExp(exp, false, getLoc(innerStart, innerEnd)), - loc: getLoc(start, end) - }); - }, - onopentagname(start, end) { - const name = getSlice(start, end); - currentOpenTag = { - type: 1, - tag: name, - ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), - tagType: 0, - // will be refined on tag close - props: [], - children: [], - loc: getLoc(start - 1, end), - codegenNode: void 0 - }; - }, - onopentagend(end) { - endOpenTag(end); - }, - onclosetag(start, end) { - const name = getSlice(start, end); - if (!currentOptions.isVoidTag(name)) { - let found = false; - for (let i = 0; i < stack.length; i++) { - const e = stack[i]; - if (e.tag.toLowerCase() === name.toLowerCase()) { - found = true; - if (i > 0) { - emitError(24, stack[0].loc.start.offset); - } - for (let j = 0; j <= i; j++) { - const el = stack.shift(); - onCloseTag(el, end, j < i); - } - break; - } - } - if (!found) { - emitError(23, backTrack(start, 60)); - } - } - }, - onselfclosingtag(end) { - const name = currentOpenTag.tag; - currentOpenTag.isSelfClosing = true; - endOpenTag(end); - if (stack[0] && stack[0].tag === name) { - onCloseTag(stack.shift(), end); - } - }, - onattribname(start, end) { - currentProp = { - type: 6, - name: getSlice(start, end), - nameLoc: getLoc(start, end), - value: void 0, - loc: getLoc(start) - }; - }, - ondirname(start, end) { - const raw = getSlice(start, end); - const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); - if (!inVPre && name === "") { - emitError(26, start); - } - if (inVPre || name === "") { - currentProp = { - type: 6, - name: raw, - nameLoc: getLoc(start, end), - value: void 0, - loc: getLoc(start) - }; - } else { - currentProp = { - type: 7, - name, - rawName: raw, - exp: void 0, - arg: void 0, - modifiers: raw === "." ? [createSimpleExpression("prop")] : [], - loc: getLoc(start) - }; - if (name === "pre") { - inVPre = tokenizer.inVPre = true; - currentVPreBoundary = currentOpenTag; - const props = currentOpenTag.props; - for (let i = 0; i < props.length; i++) { - if (props[i].type === 7) { - props[i] = dirToAttr(props[i]); - } - } - } - } - }, - ondirarg(start, end) { - if (start === end) return; - const arg = getSlice(start, end); - if (inVPre) { - currentProp.name += arg; - setLocEnd(currentProp.nameLoc, end); - } else { - const isStatic = arg[0] !== `[`; - currentProp.arg = createExp( - isStatic ? arg : arg.slice(1, -1), - isStatic, - getLoc(start, end), - isStatic ? 3 : 0 - ); - } - }, - ondirmodifier(start, end) { - const mod = getSlice(start, end); - if (inVPre) { - currentProp.name += "." + mod; - setLocEnd(currentProp.nameLoc, end); - } else if (currentProp.name === "slot") { - const arg = currentProp.arg; - if (arg) { - arg.content += "." + mod; - setLocEnd(arg.loc, end); - } - } else { - const exp = createSimpleExpression(mod, true, getLoc(start, end)); - currentProp.modifiers.push(exp); - } - }, - onattribdata(start, end) { - currentAttrValue += getSlice(start, end); - if (currentAttrStartIndex < 0) currentAttrStartIndex = start; - currentAttrEndIndex = end; - }, - onattribentity(char, start, end) { - currentAttrValue += char; - if (currentAttrStartIndex < 0) currentAttrStartIndex = start; - currentAttrEndIndex = end; - }, - onattribnameend(end) { - const start = currentProp.loc.start.offset; - const name = getSlice(start, end); - if (currentProp.type === 7) { - currentProp.rawName = name; - } - if (currentOpenTag.props.some( - (p) => (p.type === 7 ? p.rawName : p.name) === name - )) { - emitError(2, start); - } - }, - onattribend(quote, end) { - if (currentOpenTag && currentProp) { - setLocEnd(currentProp.loc, end); - if (quote !== 0) { - if (currentAttrValue.includes("&")) { - currentAttrValue = currentOptions.decodeEntities( - currentAttrValue, - true - ); - } - if (currentProp.type === 6) { - if (currentProp.name === "class") { - currentAttrValue = condense(currentAttrValue).trim(); - } - if (quote === 1 && !currentAttrValue) { - emitError(13, end); - } - currentProp.value = { - type: 2, - content: currentAttrValue, - loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) - }; - if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { - tokenizer.enterRCDATA(toCharCodes(`</template`), 0); - } - } else { - let expParseMode = 0 /* Normal */; - currentProp.exp = createExp( - currentAttrValue, - false, - getLoc(currentAttrStartIndex, currentAttrEndIndex), - 0, - expParseMode - ); - if (currentProp.name === "for") { - currentProp.forParseResult = parseForExpression(currentProp.exp); - } - let syncIndex = -1; - if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.findIndex( - (mod) => mod.content === "sync" - )) > -1 && checkCompatEnabled( - "COMPILER_V_BIND_SYNC", - currentOptions, - currentProp.loc, - currentProp.rawName - )) { - currentProp.name = "model"; - currentProp.modifiers.splice(syncIndex, 1); - } - } - } - if (currentProp.type !== 7 || currentProp.name !== "pre") { - currentOpenTag.props.push(currentProp); - } - } - currentAttrValue = ""; - currentAttrStartIndex = currentAttrEndIndex = -1; - }, - oncomment(start, end) { - if (currentOptions.comments) { - addNode({ - type: 3, - content: getSlice(start, end), - loc: getLoc(start - 4, end + 3) - }); - } - }, - onend() { - const end = currentInput.length; - if (tokenizer.state !== 1) { - switch (tokenizer.state) { - case 5: - case 8: - emitError(5, end); - break; - case 3: - case 4: - emitError( - 25, - tokenizer.sectionStart - ); - break; - case 28: - if (tokenizer.currentSequence === Sequences.CdataEnd) { - emitError(6, end); - } else { - emitError(7, end); - } - break; - case 6: - case 7: - case 9: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - // " - case 20: - // ' - case 21: - emitError(9, end); - break; - } - } - for (let index = 0; index < stack.length; index++) { - onCloseTag(stack[index], end - 1); - emitError(24, stack[index].loc.start.offset); - } - }, - oncdata(start, end) { - if (stack[0].ns !== 0) { - onText(getSlice(start, end), start, end); - } else { - emitError(1, start - 9); - } - }, - onprocessinginstruction(start) { - if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { - emitError( - 21, - start - 1 - ); - } - } - }); - const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; - const stripParensRE = /^\(|\)$/g; - function parseForExpression(input) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) return; - const [, LHS, RHS] = inMatch; - const createAliasExpression = (content, offset, asParam = false) => { - const start = loc.start.offset + offset; - const end = start + content.length; - return createExp( - content, - false, - getLoc(start, end), - 0, - asParam ? 1 /* Params */ : 0 /* Normal */ - ); - }; - const result = { - source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: void 0, - key: void 0, - index: void 0, - finalized: false - }; - let valueContent = LHS.trim().replace(stripParensRE, "").trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, "").trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(keyContent, keyOffset, true); - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression( - indexContent, - exp.indexOf( - indexContent, - result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length - ), - true - ); - } - } - } - if (valueContent) { - result.value = createAliasExpression(valueContent, trimmedOffset, true); - } - return result; - } - function getSlice(start, end) { - return currentInput.slice(start, end); - } - function endOpenTag(end) { - if (tokenizer.inSFCRoot) { - currentOpenTag.innerLoc = getLoc(end + 1, end + 1); - } - addNode(currentOpenTag); - const { tag, ns } = currentOpenTag; - if (ns === 0 && currentOptions.isPreTag(tag)) { - inPre++; - } - if (currentOptions.isVoidTag(tag)) { - onCloseTag(currentOpenTag, end); - } else { - stack.unshift(currentOpenTag); - if (ns === 1 || ns === 2) { - tokenizer.inXML = true; - } - } - currentOpenTag = null; - } - function onText(content, start, end) { - { - const tag = stack[0] && stack[0].tag; - if (tag !== "script" && tag !== "style" && content.includes("&")) { - content = currentOptions.decodeEntities(content, false); - } - } - const parent = stack[0] || currentRoot; - const lastNode = parent.children[parent.children.length - 1]; - if (lastNode && lastNode.type === 2) { - lastNode.content += content; - setLocEnd(lastNode.loc, end); - } else { - parent.children.push({ - type: 2, - content, - loc: getLoc(start, end) - }); - } - } - function onCloseTag(el, end, isImplied = false) { - if (isImplied) { - setLocEnd(el.loc, backTrack(end, 60)); - } else { - setLocEnd(el.loc, lookAhead(end, 62) + 1); - } - if (tokenizer.inSFCRoot) { - if (el.children.length) { - el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); - } else { - el.innerLoc.end = extend({}, el.innerLoc.start); - } - el.innerLoc.source = getSlice( - el.innerLoc.start.offset, - el.innerLoc.end.offset - ); - } - const { tag, ns, children } = el; - if (!inVPre) { - if (tag === "slot") { - el.tagType = 2; - } else if (isFragmentTemplate(el)) { - el.tagType = 3; - } else if (isComponent(el)) { - el.tagType = 1; - } - } - if (!tokenizer.inRCDATA) { - el.children = condenseWhitespace(children); - } - if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { - const first = children[0]; - if (first && first.type === 2) { - first.content = first.content.replace(/^\r?\n/, ""); - } - } - if (ns === 0 && currentOptions.isPreTag(tag)) { - inPre--; - } - if (currentVPreBoundary === el) { - inVPre = tokenizer.inVPre = false; - currentVPreBoundary = null; - } - if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { - tokenizer.inXML = false; - } - { - const props = el.props; - if (isCompatEnabled( - "COMPILER_V_IF_V_FOR_PRECEDENCE", - currentOptions - )) { - let hasIf = false; - let hasFor = false; - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 7) { - if (p.name === "if") { - hasIf = true; - } else if (p.name === "for") { - hasFor = true; - } - } - if (hasIf && hasFor) { - warnDeprecation( - "COMPILER_V_IF_V_FOR_PRECEDENCE", - currentOptions, - el.loc - ); - break; - } - } - } - if (!tokenizer.inSFCRoot && isCompatEnabled( - "COMPILER_NATIVE_TEMPLATE", - currentOptions - ) && el.tag === "template" && !isFragmentTemplate(el)) { - warnDeprecation( - "COMPILER_NATIVE_TEMPLATE", - currentOptions, - el.loc - ); - const parent = stack[0] || currentRoot; - const index = parent.children.indexOf(el); - parent.children.splice(index, 1, ...el.children); - } - const inlineTemplateProp = props.find( - (p) => p.type === 6 && p.name === "inline-template" - ); - if (inlineTemplateProp && checkCompatEnabled( - "COMPILER_INLINE_TEMPLATE", - currentOptions, - inlineTemplateProp.loc - ) && el.children.length) { - inlineTemplateProp.value = { - type: 2, - content: getSlice( - el.children[0].loc.start.offset, - el.children[el.children.length - 1].loc.end.offset - ), - loc: inlineTemplateProp.loc - }; - } - } - } - function lookAhead(index, c) { - let i = index; - while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; - return i; - } - function backTrack(index, c) { - let i = index; - while (currentInput.charCodeAt(i) !== c && i >= 0) i--; - return i; - } - const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); - function isFragmentTemplate({ tag, props }) { - if (tag === "template") { - for (let i = 0; i < props.length; i++) { - if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { - return true; - } - } - } - return false; - } - function isComponent({ tag, props }) { - if (currentOptions.isCustomElement(tag)) { - return false; - } - if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { - return true; - } - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6) { - if (p.name === "is" && p.value) { - if (p.value.content.startsWith("vue:")) { - return true; - } else if (checkCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - currentOptions, - p.loc - )) { - return true; - } - } - } else if (// :is on plain element - only treat as component in compat mode - p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - currentOptions, - p.loc - )) { - return true; - } - } - return false; - } - function isUpperCase(c) { - return c > 64 && c < 91; - } - const windowsNewlineRE = /\r\n/g; - function condenseWhitespace(nodes, tag) { - const shouldCondense = currentOptions.whitespace !== "preserve"; - let removedWhitespace = false; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (node.type === 2) { - if (!inPre) { - if (isAllWhitespace(node.content)) { - const prev = nodes[i - 1] && nodes[i - 1].type; - const next = nodes[i + 1] && nodes[i + 1].type; - if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { - removedWhitespace = true; - nodes[i] = null; - } else { - node.content = " "; - } - } else if (shouldCondense) { - node.content = condense(node.content); - } - } else { - node.content = node.content.replace(windowsNewlineRE, "\n"); - } - } - } - return removedWhitespace ? nodes.filter(Boolean) : nodes; - } - function isAllWhitespace(str) { - for (let i = 0; i < str.length; i++) { - if (!isWhitespace(str.charCodeAt(i))) { - return false; - } - } - return true; - } - function hasNewlineChar(str) { - for (let i = 0; i < str.length; i++) { - const c = str.charCodeAt(i); - if (c === 10 || c === 13) { - return true; - } - } - return false; - } - function condense(str) { - let ret = ""; - let prevCharIsWhitespace = false; - for (let i = 0; i < str.length; i++) { - if (isWhitespace(str.charCodeAt(i))) { - if (!prevCharIsWhitespace) { - ret += " "; - prevCharIsWhitespace = true; - } - } else { - ret += str[i]; - prevCharIsWhitespace = false; - } - } - return ret; - } - function addNode(node) { - (stack[0] || currentRoot).children.push(node); - } - function getLoc(start, end) { - return { - start: tokenizer.getPos(start), - // @ts-expect-error allow late attachment - end: end == null ? end : tokenizer.getPos(end), - // @ts-expect-error allow late attachment - source: end == null ? end : getSlice(start, end) - }; - } - function cloneLoc(loc) { - return getLoc(loc.start.offset, loc.end.offset); - } - function setLocEnd(loc, end) { - loc.end = tokenizer.getPos(end); - loc.source = getSlice(loc.start.offset, end); - } - function dirToAttr(dir) { - const attr = { - type: 6, - name: dir.rawName, - nameLoc: getLoc( - dir.loc.start.offset, - dir.loc.start.offset + dir.rawName.length - ), - value: void 0, - loc: dir.loc - }; - if (dir.exp) { - const loc = dir.exp.loc; - if (loc.end.offset < dir.loc.end.offset) { - loc.start.offset--; - loc.start.column--; - loc.end.offset++; - loc.end.column++; - } - attr.value = { - type: 2, - content: dir.exp.content, - loc - }; - } - return attr; - } - function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { - const exp = createSimpleExpression(content, isStatic, loc, constType); - return exp; - } - function emitError(code, index, message) { - currentOptions.onError( - createCompilerError(code, getLoc(index, index), void 0, message) - ); - } - function reset() { - tokenizer.reset(); - currentOpenTag = null; - currentProp = null; - currentAttrValue = ""; - currentAttrStartIndex = -1; - currentAttrEndIndex = -1; - stack.length = 0; - } - function baseParse(input, options) { - reset(); - currentInput = input; - currentOptions = extend({}, defaultParserOptions); - if (options) { - let key; - for (key in options) { - if (options[key] != null) { - currentOptions[key] = options[key]; - } - } - } - { - if (!currentOptions.decodeEntities) { - throw new Error( - `[@vue/compiler-core] decodeEntities option is required in browser builds.` - ); - } - } - tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; - tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; - const delimiters = options && options.delimiters; - if (delimiters) { - tokenizer.delimiterOpen = toCharCodes(delimiters[0]); - tokenizer.delimiterClose = toCharCodes(delimiters[1]); - } - const root = currentRoot = createRoot([], input); - tokenizer.parse(currentInput); - root.loc = getLoc(0, input.length); - root.children = condenseWhitespace(root.children); - currentRoot = null; - return root; - } - - function cacheStatic(root, context) { - walk( - root, - void 0, - context, - // Root node is unfortunately non-hoistable due to potential parent - // fallthrough attributes. - isSingleElementRoot(root, root.children[0]) - ); - } - function isSingleElementRoot(root, child) { - const { children } = root; - return children.length === 1 && child.type === 1 && !isSlotOutlet(child); - } - function walk(node, parent, context, doNotHoistNode = false, inFor = false) { - const { children } = node; - const toCache = []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.type === 1 && child.tagType === 0) { - const constantType = doNotHoistNode ? 0 : getConstantType(child, context); - if (constantType > 0) { - if (constantType >= 2) { - child.codegenNode.patchFlag = -1; - toCache.push(child); - continue; - } - } else { - const codegenNode = child.codegenNode; - if (codegenNode.type === 13) { - const flag = codegenNode.patchFlag; - if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } - } else if (child.type === 12) { - const constantType = doNotHoistNode ? 0 : getConstantType(child, context); - if (constantType >= 2) { - toCache.push(child); - continue; - } - } - if (child.type === 1) { - const isComponent = child.tagType === 1; - if (isComponent) { - context.scopes.vSlot++; - } - walk(child, node, context, false, inFor); - if (isComponent) { - context.scopes.vSlot--; - } - } else if (child.type === 11) { - walk(child, node, context, child.children.length === 1, true); - } else if (child.type === 9) { - for (let i2 = 0; i2 < child.branches.length; i2++) { - walk( - child.branches[i2], - node, - context, - child.branches[i2].children.length === 1, - inFor - ); - } - } - } - let cachedAsArray = false; - if (toCache.length === children.length && node.type === 1) { - if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { - node.codegenNode.children = getCacheExpression( - createArrayExpression(node.codegenNode.children) - ); - cachedAsArray = true; - } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) { - const slot = getSlotNode(node.codegenNode, "default"); - if (slot) { - slot.returns = getCacheExpression( - createArrayExpression(slot.returns) - ); - cachedAsArray = true; - } - } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { - const slotName = findDir(node, "slot", true); - const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); - if (slot) { - slot.returns = getCacheExpression( - createArrayExpression(slot.returns) - ); - cachedAsArray = true; - } - } - } - if (!cachedAsArray) { - for (const child of toCache) { - child.codegenNode = context.cache(child.codegenNode); - } - } - function getCacheExpression(value) { - const exp = context.cache(value); - if (inFor && context.hmr) { - exp.needArraySpread = true; - } - return exp; - } - function getSlotNode(node2, name) { - if (node2.children && !isArray(node2.children) && node2.children.type === 15) { - const slot = node2.children.properties.find( - (p) => p.key === name || p.key.content === name - ); - return slot && slot.value; - } - } - if (toCache.length && context.transformHoist) { - context.transformHoist(children, context, node); - } - } - function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1: - if (node.tagType !== 0) { - return 0; - } - const cached = constantCache.get(node); - if (cached !== void 0) { - return cached; - } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13) { - return 0; - } - if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { - return 0; - } - if (codegenNode.patchFlag === void 0) { - let returnType2 = 3; - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0) { - constantCache.set(node, 0); - return 0; - } - if (generatedPropsType < returnType2) { - returnType2 = generatedPropsType; - } - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0) { - constantCache.set(node, 0); - return 0; - } - if (childType < returnType2) { - returnType2 = childType; - } - } - if (returnType2 > 1) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && p.name === "bind" && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0) { - constantCache.set(node, 0); - return 0; - } - if (expType < returnType2) { - returnType2 = expType; - } - } - } - } - if (codegenNode.isBlock) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7) { - constantCache.set(node, 0); - return 0; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper( - getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) - ); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType2); - return returnType2; - } else { - constantCache.set(node, 0); - return 0; - } - case 2: - case 3: - return 3; - case 9: - case 11: - case 10: - return 0; - case 5: - case 12: - return getConstantType(node.content, context); - case 4: - return node.constType; - case 8: - let returnType = 3; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child) || isSymbol(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0) { - return 0; - } else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - case 20: - return 2; - default: - return 0; - } - } - const allowHoistedHelperSet = /* @__PURE__ */ new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS - ]); - function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4) { - return getConstantType(arg, context); - } else if (arg.type === 14) { - return getConstantTypeOfHelperCall(arg, context); - } - } - return 0; - } - function getGeneratedPropsConstantType(node, context) { - let returnType = 3; - const props = getNodeProps(node); - if (props && props.type === 15) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4) { - valueType = getConstantType(value, context); - } else if (value.type === 14) { - valueType = getConstantTypeOfHelperCall(value, context); - } else { - valueType = 0; - } - if (valueType === 0) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } - } - return returnType; - } - function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13) { - return codegenNode.props; - } - } - - function createTransformContext(root, { - filename = "", - prefixIdentifiers = false, - hoistStatic = false, - hmr = false, - cacheHandlers = false, - nodeTransforms = [], - directiveTransforms = {}, - transformHoist = null, - isBuiltInComponent = NOOP, - isCustomElement = NOOP, - expressionPlugins = [], - scopeId = null, - slotted = true, - ssr = false, - inSSR = false, - ssrCssVars = ``, - bindingMetadata = EMPTY_OBJ, - inline = false, - isTS = false, - onError = defaultOnError, - onWarn = defaultOnWarn, - compatConfig - }) { - const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); - const context = { - // options - filename, - selfName: nameMatch && capitalize(camelize(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - hmr, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: /* @__PURE__ */ new Map(), - components: /* @__PURE__ */ new Set(), - directives: /* @__PURE__ */ new Set(), - hoists: [], - imports: [], - cached: [], - constantCache: /* @__PURE__ */ new WeakMap(), - temps: 0, - identifiers: /* @__PURE__ */ Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - grandParent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - { - if (!context.currentNode) { - throw new Error(`Node being replaced is already removed.`); - } - if (!context.parent) { - throw new Error(`Cannot replace root node.`); - } - } - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - if (!context.parent) { - throw new Error(`Cannot remove root node.`); - } - const list = context.parent.children; - const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; - if (removalIndex < 0) { - throw new Error(`node being removed is not a child of current parent`); - } - if (!node || node === context.currentNode) { - context.currentNode = null; - context.onNodeRemoved(); - } else { - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: NOOP, - addIdentifiers(exp) { - }, - removeIdentifiers(exp) { - }, - hoist(exp) { - if (isString(exp)) exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression( - `_hoisted_${context.hoists.length}`, - false, - exp.loc, - 2 - ); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false, inVOnce = false) { - const cacheExp = createCacheExpression( - context.cached.length, - exp, - isVNode, - inVOnce - ); - context.cached.push(cacheExp); - return cacheExp; - } - }; - { - context.filters = /* @__PURE__ */ new Set(); - } - return context; - } - function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - cacheStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; - root.transformed = true; - { - root.filters = [...context.filters]; - } - } - function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - if (isSingleElementRoot(root, child) && child.codegenNode) { - const codegenNode = child.codegenNode; - if (codegenNode.type === 13) { - convertToBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } else { - root.codegenNode = child; - } - } else if (children.length > 1) { - let patchFlag = 64; - if (children.filter((c) => c.type !== 3).length === 1) { - patchFlag |= 2048; - } - root.codegenNode = createVNodeCall( - context, - helper(FRAGMENT), - void 0, - root.children, - patchFlag, - void 0, - void 0, - true, - void 0, - false - ); - } else ; - } - function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (isString(child)) continue; - context.grandParent = context.parent; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } - } - function traverseNode(node, context) { - context.currentNode = node; - const { nodeTransforms } = context; - const exitFns = []; - for (let i2 = 0; i2 < nodeTransforms.length; i2++) { - const onExit = nodeTransforms[i2](node, context); - if (onExit) { - if (isArray(onExit)) { - exitFns.push(...onExit); - } else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - return; - } else { - node = context.currentNode; - } - } - switch (node.type) { - case 3: - if (!context.ssr) { - context.helper(CREATE_COMMENT); - } - break; - case 5: - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9: - for (let i2 = 0; i2 < node.branches.length; i2++) { - traverseNode(node.branches[i2], context); - } - break; - case 10: - case 11: - case 1: - case 0: - traverseChildren(node, context); - break; - } - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); - } - } - function createStructuralDirectiveTransform(name, fn) { - const matches = isString(name) ? (n) => n === name : (n) => name.test(n); - return (node, context) => { - if (node.type === 1) { - const { props } = node; - if (node.tagType === 3 && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 && matches(prop.name)) { - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) exitFns.push(onExit); - } - } - return exitFns; - } - }; - } - - const PURE_ANNOTATION = `/*@__PURE__*/`; - const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; - function createCodegenContext(ast, { - mode = "function", - prefixIdentifiers = mode === "module", - sourceMap = false, - filename = `template.vue.html`, - scopeId = null, - optimizeImports = false, - runtimeGlobalName = `Vue`, - runtimeModuleName = `vue`, - ssrRuntimeModuleName = "vue/server-renderer", - ssr = false, - isTS = false, - inSSR = false - }) { - const context = { - mode, - prefixIdentifiers, - sourceMap, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: void 0, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, newlineIndex = -2 /* None */, node) { - context.code += code; - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); - } - }; - function newline(n) { - context.push("\n" + ` `.repeat(n), 0 /* Start */); - } - return context; - } - function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) options.onContextCreated(context); - const { - mode, - push, - prefixIdentifiers, - indent, - deindent, - newline, - scopeId, - ssr - } = context; - const helpers = Array.from(ast.helpers); - const hasHelpers = helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== "module"; - const preambleContext = context; - { - genFunctionPreamble(ast, preambleContext); - } - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; - const signature = args.join(", "); - { - push(`function ${functionName}(${signature}) {`); - } - indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - if (hasHelpers) { - push( - `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue -`, - -1 /* End */ - ); - newline(); - } - } - if (ast.components.length) { - genAssets(ast.components, "component", context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, "directive", context); - if (ast.temps > 0) { - newline(); - } - } - if (ast.filters && ast.filters.length) { - newline(); - genAssets(ast.filters, "filter", context); - newline(); - } - if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } - } - if (ast.components.length || ast.directives.length || ast.temps) { - push(` -`, 0 /* Start */); - newline(); - } - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); - } - deindent(); - push(`}`); - return { - ast, - code: context.code, - preamble: ``, - map: context.map ? context.map.toJSON() : void 0 - }; - } - function genFunctionPreamble(ast, context) { - const { - ssr, - prefixIdentifiers, - push, - newline, - runtimeModuleName, - runtimeGlobalName, - ssrRuntimeModuleName - } = context; - const VueBinding = runtimeGlobalName; - const helpers = Array.from(ast.helpers); - if (helpers.length > 0) { - { - push(`const _Vue = ${VueBinding} -`, -1 /* End */); - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); - push(`const { ${staticHelpers} } = _Vue -`, -1 /* End */); - } - } - } - genHoists(ast.hoists, context); - newline(); - push(`return `); - } - function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper( - type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE - ); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - const maybeSelfReference = id.endsWith("__self"); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push( - `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` - ); - if (i < assets.length - 1) { - newline(); - } - } - } - function genHoists(hoists, context) { - if (!hoists.length) { - return; - } - context.pure = true; - const { push, newline } = context; - newline(); - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - push(`const _hoisted_${i + 1} = `); - genNode(exp, context); - newline(); - } - } - context.pure = false; - } - function isText(n) { - return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; - } - function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n)); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); - } - function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (isString(node)) { - push(node, -3 /* Unknown */); - } else if (isArray(node)) { - genNodeListAsArray(node, context); - } else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(","); - newline(); - } else { - comma && push(", "); - } - } - } - } - function genNode(node, context) { - if (isString(node)) { - context.push(node, -3 /* Unknown */); - return; - } - if (isSymbol(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1: - case 9: - case 11: - assert( - node.codegenNode != null, - `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` - ); - genNode(node.codegenNode, context); - break; - case 2: - genText(node, context); - break; - case 4: - genExpression(node, context); - break; - case 5: - genInterpolation(node, context); - break; - case 12: - genNode(node.codegenNode, context); - break; - case 8: - genCompoundExpression(node, context); - break; - case 3: - genComment(node, context); - break; - case 13: - genVNodeCall(node, context); - break; - case 14: - genCallExpression(node, context); - break; - case 15: - genObjectExpression(node, context); - break; - case 17: - genArrayExpression(node, context); - break; - case 18: - genFunctionExpression(node, context); - break; - case 19: - genConditionalExpression(node, context); - break; - case 20: - genCacheExpression(node, context); - break; - case 21: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22: - break; - case 23: - break; - case 24: - break; - case 25: - break; - case 26: - break; - /* v8 ignore start */ - case 10: - break; - default: - { - assert(false, `unhandled codegen node type: ${node.type}`); - const exhaustiveCheck = node; - return exhaustiveCheck; - } - } - } - function genText(node, context) { - context.push(JSON.stringify(node.content), -3 /* Unknown */, node); - } - function genExpression(node, context) { - const { content, isStatic } = node; - context.push( - isStatic ? JSON.stringify(content) : content, - -3 /* Unknown */, - node - ); - } - function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); - } - function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child)) { - context.push(child, -3 /* Unknown */); - } else { - genNode(child, context); - } - } - } - function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } else if (node.isStatic) { - const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); - push(text, -2 /* None */, node); - } else { - push(`[${node.content}]`, -3 /* Unknown */, node); - } - } - function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push( - `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, - -3 /* Unknown */, - node - ); - } - function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent - } = node; - let patchFlagString; - if (patchFlag) { - { - if (patchFlag < 0) { - patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; - } else { - const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); - patchFlagString = patchFlag + ` /* ${flagNames} */`; - } - } - } - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, -2 /* None */, node); - genNodeList( - genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), - context - ); - push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } - } - function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) break; - } - return args.slice(0, i + 1).map((arg) => arg || `null`); - } - function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = isString(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, -2 /* None */, node); - genNodeList(node.arguments, context); - push(`)`); - } - function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, -2 /* None */, node); - return; - } - const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - genExpressionAsPropertyKey(key, context); - push(`: `); - genNode(value, context); - if (i < properties.length - 1) { - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); - } - function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); - } - function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - push(`_${helperNameMap[WITH_CTX]}(`); - } - push(`(`, -2 /* None */, node); - if (isArray(params)) { - genNodeList(params, context); - } else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (isArray(returns)) { - genNodeListAsArray(returns, context); - } else { - genNode(returns, context); - } - } else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - if (node.isNonScopedSlot) { - push(`, undefined, true`); - } - push(`)`); - } - } - function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); - context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); - context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent( - true - /* without newline */ - ); - } - function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - const { needPauseTracking, needArraySpread } = node; - if (needArraySpread) { - push(`[...(`); - } - push(`_cache[${node.index}] || (`); - if (needPauseTracking) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1`); - if (node.inVOnce) push(`, true`); - push(`),`); - newline(); - push(`(`); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (needPauseTracking) { - push(`).cacheIndex = ${node.index},`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); - } - push(`)`); - if (needArraySpread) { - push(`)]`); - } - } - - const prohibitedKeywordRE = new RegExp( - "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" - ); - const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; - function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) { - const exp = node.content; - if (!exp.trim()) { - return; - } - try { - new Function( - asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` - ); - } catch (e) { - let message = e.message; - const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE); - if (keywordMatch) { - message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; - } - context.onError( - createCompilerError( - 45, - node.loc, - void 0, - message - ) - ); - } - } - - const transformExpression = (node, context) => { - if (node.type === 5) { - node.content = processExpression( - node.content, - context - ); - } else if (node.type === 1) { - const memo = findDir(node, "memo"); - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - if (dir.type === 7 && dir.name !== "for") { - const exp = dir.exp; - const arg = dir.arg; - if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) - !(memo && arg && arg.type === 4 && arg.content === "key")) { - dir.exp = processExpression( - exp, - context, - // slot args must be processed as function params - dir.name === "slot" - ); - } - if (arg && arg.type === 4 && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } - } - } - }; - function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { - { - { - validateBrowserExpression(node, context, asParams, asRawStatements); - } - return node; - } - } - function stringifyExpression(exp) { - if (isString(exp)) { - return exp; - } else if (exp.type === 4) { - return exp.content; - } else { - return exp.children.map(stringifyExpression).join(""); - } - } - - const transformIf = createStructuralDirectiveTransform( - /^(if|else|else-if)$/, - (node, dir, context) => { - return processIf(node, dir, context, (ifNode, branch, isRoot) => { - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9) { - key += sibling.branches.length; - } - } - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch( - branch, - key, - context - ); - } else { - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch( - branch, - key + ifNode.branches.length - 1, - context - ); - } - }; - }); - } - ); - function processIf(node, dir, context, processCodegen) { - if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError( - createCompilerError(28, dir.loc) - ); - dir.exp = createSimpleExpression(`true`, false, loc); - } - if (dir.exp) { - validateBrowserExpression(dir.exp, context); - } - if (dir.name === "if") { - const branch = createIfBranch(node, dir); - const ifNode = { - type: 9, - loc: cloneLoc(node.loc), - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); - } - } else { - const siblings = context.parent.children; - const comments = []; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if (sibling && sibling.type === 3) { - context.removeNode(sibling); - comments.unshift(sibling); - continue; - } - if (sibling && sibling.type === 2 && !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9) { - if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { - context.onError( - createCompilerError(30, node.loc) - ); - } - context.removeNode(); - const branch = createIfBranch(node, dir); - if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> - !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { - branch.children = [...comments, ...branch.children]; - } - { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError( - createCompilerError( - 29, - branch.userKey.loc - ) - ); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - traverseNode(branch, context); - if (onExit) onExit(); - context.currentNode = null; - } else { - context.onError( - createCompilerError(30, node.loc) - ); - } - break; - } - } - } - function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3; - return { - type: 10, - loc: node.loc, - condition: dir.name === "else" ? void 0 : dir.exp, - children: isTemplateIf && !findDir(node, "for") ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; - } - function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression( - branch.condition, - createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - '"v-if"' , - "true" - ]) - ); - } else { - return createChildrenCodegenNode(branch, keyIndex, context); - } - } - function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty( - `key`, - createSimpleExpression( - `${keyIndex}`, - false, - locStub, - 2 - ) - ); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11) { - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } else { - let patchFlag = 64; - if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { - patchFlag |= 2048; - } - return createVNodeCall( - context, - helper(FRAGMENT), - createObjectExpression([keyProperty]), - children, - patchFlag, - void 0, - void 0, - true, - false, - false, - branch.loc - ); - } - } else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - if (vnodeCall.type === 13) { - convertToBlock(vnodeCall, context); - } - injectProp(vnodeCall, keyProperty, context); - return ret; - } - } - function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; - } - if (a.type === 6) { - if (a.value.content !== b.value.content) { - return false; - } - } else { - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { - return false; - } - } - return true; - } - function getParentCondition(node) { - while (true) { - if (node.type === 19) { - if (node.alternate.type === 19) { - node = node.alternate; - } else { - return node; - } - } else if (node.type === 20) { - node = node.value; - } - } - } - - const transformBind = (dir, _node, context) => { - const { modifiers, loc } = dir; - const arg = dir.arg; - let { exp } = dir; - if (exp && exp.type === 4 && !exp.content.trim()) { - { - exp = void 0; - } - } - if (!exp) { - if (arg.type !== 4 || !arg.isStatic) { - context.onError( - createCompilerError( - 52, - arg.loc - ) - ); - return { - props: [ - createObjectProperty(arg, createSimpleExpression("", true, loc)) - ] - }; - } - transformBindShorthand(dir); - exp = dir.exp; - } - if (arg.type !== 4) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); - } else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; - } - if (modifiers.some((mod) => mod.content === "camel")) { - if (arg.type === 4) { - if (arg.isStatic) { - arg.content = camelize(arg.content); - } else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } - } - if (!context.inSSR) { - if (modifiers.some((mod) => mod.content === "prop")) { - injectPrefix(arg, "."); - } - if (modifiers.some((mod) => mod.content === "attr")) { - injectPrefix(arg, "^"); - } - } - return { - props: [createObjectProperty(arg, exp)] - }; - }; - const transformBindShorthand = (dir, context) => { - const arg = dir.arg; - const propName = camelize(arg.content); - dir.exp = createSimpleExpression(propName, false, arg.loc); - }; - const injectPrefix = (arg, prefix) => { - if (arg.type === 4) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); - } - }; - - const transformFor = createStructuralDirectiveTransform( - "for", - (node, dir, context) => { - const { helper, removeHelper } = context; - return processFor(node, dir, context, (forNode) => { - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, "memo"); - const keyProp = findProp(node, `key`, false, true); - const isDirKey = keyProp && keyProp.type === 7; - if (isDirKey && !keyProp.exp) { - transformBindShorthand(keyProp); - } - let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); - const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; - const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; - const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; - forNode.codegenNode = createVNodeCall( - context, - helper(FRAGMENT), - void 0, - renderExp, - fragmentFlag, - void 0, - void 0, - true, - !isStableFragment, - false, - node.loc - ); - return () => { - let childBlock; - const { children } = forNode; - if (isTemplate) { - node.children.some((c) => { - if (c.type === 1) { - const key = findProp(c, "key"); - if (key) { - context.onError( - createCompilerError( - 33, - key.loc - ) - ); - return true; - } - } - }); - } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; - const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; - if (slotOutlet) { - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - } else if (needFragmentWrapper) { - childBlock = createVNodeCall( - context, - helper(FRAGMENT), - keyProperty ? createObjectExpression([keyProperty]) : void 0, - node.children, - 64, - void 0, - void 0, - true, - void 0, - false - ); - } else { - childBlock = children[0].codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - removeHelper(OPEN_BLOCK); - removeHelper( - getVNodeBlockHelper(context.inSSR, childBlock.isComponent) - ); - } else { - removeHelper( - getVNodeHelper(context.inSSR, childBlock.isComponent) - ); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression( - createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ]) - ); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...keyExp ? [` && _cached.key === `, keyExp] : [], - ` && ${context.helperString( - IS_MEMO_SAME - )}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push( - loop, - createSimpleExpression(`_cache`), - createSimpleExpression(String(context.cached.length)) - ); - context.cached.push(null); - } else { - renderExp.arguments.push( - createFunctionExpression( - createForLoopParams(forNode.parseResult), - childBlock, - true - ) - ); - } - }; - }); - } - ); - function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError( - createCompilerError(31, dir.loc) - ); - return; - } - const parseResult = dir.forParseResult; - if (!parseResult) { - context.onError( - createCompilerError(32, dir.loc) - ); - return; - } - finalizeForParseResult(parseResult, context); - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - scopes.vFor++; - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (onExit) onExit(); - }; - } - function finalizeForParseResult(result, context) { - if (result.finalized) return; - { - validateBrowserExpression(result.source, context); - if (result.key) { - validateBrowserExpression( - result.key, - context, - true - ); - } - if (result.index) { - validateBrowserExpression( - result.index, - context, - true - ); - } - if (result.value) { - validateBrowserExpression( - result.value, - context, - true - ); - } - } - result.finalized = true; - } - function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); - } - function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) break; - } - return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); - } - - const defaultFallback = createSimpleExpression(`undefined`, false); - const trackSlotScopes = (node, context) => { - if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { - const vSlot = findDir(node, "slot"); - if (vSlot) { - vSlot.exp; - context.scopes.vSlot++; - return () => { - context.scopes.vSlot--; - }; - } - } - }; - const trackVForSlotScopes = (node, context) => { - let vFor; - if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { - const result = vFor.forParseResult; - if (result) { - finalizeForParseResult(result, context); - const { value, key, index } = result; - const { addIdentifiers, removeIdentifiers } = context; - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - return () => { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - }; - } - } - }; - const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( - props, - children, - false, - true, - children.length ? children[0].loc : loc - ); - function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - const onComponentSlot = findDir(node, "slot", true); - if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push( - createObjectProperty( - arg || createSimpleExpression("default", true), - buildSlotFn(exp, void 0, children, loc) - ) - ); - } - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = /* @__PURE__ */ new Set(); - let conditionalBranchIndex = 0; - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { - if (slotElement.type !== 3) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - context.onError( - createCompilerError(37, slotDir.loc) - ); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { - arg: slotName = createSimpleExpression(`default`, true), - exp: slotProps, - loc: dirLoc - } = slotDir; - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } else { - hasDynamicSlots = true; - } - const vFor = findDir(slotElement, "for"); - const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); - let vIf; - let vElse; - if (vIf = findDir(slotElement, "if")) { - hasDynamicSlots = true; - dynamicSlots.push( - createConditionalExpression( - vIf.exp, - buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), - defaultFallback - ) - ); - } else if (vElse = findDir( - slotElement, - /^else(-if)?$/, - true - /* allowEmpty */ - )) { - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp ? createConditionalExpression( - vElse.exp, - buildDynamicSlot( - slotName, - slotFunction, - conditionalBranchIndex++ - ), - defaultFallback - ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); - } else { - context.onError( - createCompilerError(30, vElse.loc) - ); - } - } else if (vFor) { - hasDynamicSlots = true; - const parseResult = vFor.forParseResult; - if (parseResult) { - finalizeForParseResult(parseResult, context); - dynamicSlots.push( - createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression( - createForLoopParams(parseResult), - buildDynamicSlot(slotName, slotFunction), - true - ) - ]) - ); - } else { - context.onError( - createCompilerError( - 32, - vFor.loc - ) - ); - } - } else { - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError( - createCompilerError( - 38, - dirLoc - ) - ); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === "default") { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } - } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children2) => { - const fn = buildSlotFn(props, void 0, children2, loc); - if (context.compatConfig) { - fn.isNonScopedSlot = true; - } - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - slotsProperties.push(buildDefaultSlotProperty(void 0, children)); - } else if (implicitDefaultChildren.length && // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { - if (hasNamedDefaultSlot) { - context.onError( - createCompilerError( - 39, - implicitDefaultChildren[0].loc - ) - ); - } else { - slotsProperties.push( - buildDefaultSlotProperty(void 0, implicitDefaultChildren) - ); - } - } - } - const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; - let slots = createObjectExpression( - slotsProperties.concat( - createObjectProperty( - `_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression( - slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), - false - ) - ) - ), - loc - ); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots - }; - } - function buildDynamicSlot(name, fn, index) { - const props = [ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) - ]; - if (index != null) { - props.push( - createObjectProperty(`key`, createSimpleExpression(String(index), true)) - ); - } - return createObjectExpression(props); - } - function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1: - if (child.tagType === 2 || hasForwardedSlots(child.children)) { - return true; - } - break; - case 9: - if (hasForwardedSlots(child.branches)) return true; - break; - case 10: - case 11: - if (hasForwardedSlots(child.children)) return true; - break; - } - } - return false; - } - function isNonWhitespaceContent(node) { - if (node.type !== 2 && node.type !== 12) - return true; - return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); - } - - const directiveImportMap = /* @__PURE__ */ new WeakMap(); - const transformElement = (node, context) => { - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { - return; - } - const { tag, props } = node; - const isComponent = node.tagType === 1; - let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; - const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = ( - // dynamic component may resolve to plain elements - isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === "svg" || tag === "foreignObject" || tag === "math") - ); - if (props.length > 0) { - const propsBuildResult = buildProps( - node, - context, - void 0, - isComponent, - isDynamicComponent - ); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = directives && directives.length ? createArrayExpression( - directives.map((dir) => buildDirectiveArgs(dir, context)) - ) : void 0; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } - } - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - shouldUseBlock = true; - patchFlag |= 1024; - if (node.children.length > 1) { - context.onError( - createCompilerError(46, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: "" - }) - ); - } - } - const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024; - } - } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - const hasDynamicTextChild = type === 5 || type === 8; - if (hasDynamicTextChild && getConstantType(child, context) === 0) { - patchFlag |= 1; - } - if (hasDynamicTextChild || type === 2) { - vnodeChildren = child; - } else { - vnodeChildren = node.children; - } - } else { - vnodeChildren = node.children; - } - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } - node.codegenNode = createVNodeCall( - context, - vnodeTag, - vnodeProps, - vnodeChildren, - patchFlag === 0 ? void 0 : patchFlag, - vnodeDynamicProps, - vnodeDirectives, - !!shouldUseBlock, - false, - isComponent, - node.loc - ); - }; - }; - function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp( - node, - "is", - false, - true - /* allow empty */ - ); - if (isProp) { - if (isExplicitDynamic || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - )) { - let exp; - if (isProp.type === 6) { - exp = isProp.value && createSimpleExpression(isProp.value.content, true); - } else { - exp = isProp.exp; - if (!exp) { - exp = createSimpleExpression(`is`, false, isProp.arg.loc); - } - } - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { - tag = isProp.value.content.slice(4); - } - } - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - if (!ssr) context.helper(builtIn); - return builtIn; - } - context.helper(RESOLVE_COMPONENT); - context.components.add(tag); - return toValidAssetId(tag, `component`); - } - function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const pushMergeArg = (arg) => { - if (properties.length) { - mergeArgs.push( - createObjectExpression(dedupeProperties(properties), elementLoc) - ); - properties = []; - } - if (arg) mergeArgs.push(arg); - }; - const pushRefVForMarker = () => { - if (context.scopes.vFor > 0) { - properties.push( - createObjectProperty( - createSimpleExpression("ref_for", true), - createSimpleExpression("true") - ) - ); - } - }; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = isOn(name); - if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== "onclick" && // omit v-model handlers - name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks - !isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && isReservedProp(name)) { - hasVnodeHook = true; - } - if (isEventHandler && value.type === 14) { - value = value.arguments[0]; - } - if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { - return; - } - if (name === "ref") { - hasRef = true; - } else if (name === "class") { - hasClassBinding = true; - } else if (name === "style") { - hasStyleBinding = true; - } else if (name !== "key" && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - } else { - hasDynamicKeys = true; - } - }; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 6) { - const { loc, name, nameLoc, value } = prop; - let isStatic = true; - if (name === "ref") { - hasRef = true; - pushRefVForMarker(); - } - if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - ))) { - continue; - } - properties.push( - createObjectProperty( - createSimpleExpression(name, true, nameLoc), - createSimpleExpression( - value ? value.content : "", - isStatic, - value ? value.loc : loc - ) - ) - ); - } else { - const { name, arg, exp, loc, modifiers } = prop; - const isVBind = name === "bind"; - const isVOn = name === "on"; - if (name === "slot") { - if (!isComponent) { - context.onError( - createCompilerError(40, loc) - ); - } - continue; - } - if (name === "once" || name === "memo") { - continue; - } - if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( - "COMPILER_IS_ON_ELEMENT", - context - ))) { - continue; - } - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked - // before children - isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") - ) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, "ref")) { - pushRefVForMarker(); - } - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (isVBind) { - pushRefVForMarker(); - pushMergeArg(); - { - { - const hasOverridableKeys = mergeArgs.some((arg2) => { - if (arg2.type === 15) { - return arg2.properties.some(({ key }) => { - if (key.type !== 4 || !key.isStatic) { - return true; - } - return key.content !== "class" && key.content !== "style" && !isOn(key.content); - }); - } else { - return true; - } - }); - if (hasOverridableKeys) { - checkCompatEnabled( - "COMPILER_V_BIND_OBJECT_ORDER", - context, - loc - ); - } - } - if (isCompatEnabled( - "COMPILER_V_BIND_OBJECT_ORDER", - context - )) { - mergeArgs.unshift(exp); - continue; - } - } - mergeArgs.push(exp); - } else { - pushMergeArg({ - type: 14, - loc, - callee: context.helper(TO_HANDLERS), - arguments: isComponent ? [exp] : [exp, `true`] - }); - } - } else { - context.onError( - createCompilerError( - isVBind ? 34 : 35, - loc - ) - ); - } - continue; - } - if (isVBind && modifiers.some((mod) => mod.content === "prop")) { - patchFlag |= 32; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - const { props: props2, needRuntime } = directiveTransform(prop, node, context); - !ssr && props2.forEach(analyzePatchFlag); - if (isVOn && arg && !isStaticExp(arg)) { - pushMergeArg(createObjectExpression(props2, elementLoc)); - } else { - properties.push(...props2); - } - if (needRuntime) { - runtimeDirectives.push(prop); - if (isSymbol(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } else if (!isBuiltInDirective(name)) { - runtimeDirectives.push(prop); - if (hasChildren) { - shouldUseBlock = true; - } - } - } - } - let propsExpression = void 0; - if (mergeArgs.length) { - pushMergeArg(); - if (mergeArgs.length > 1) { - propsExpression = createCallExpression( - context.helper(MERGE_PROPS), - mergeArgs, - elementLoc - ); - } else { - propsExpression = mergeArgs[0]; - } - } else if (properties.length) { - propsExpression = createObjectExpression( - dedupeProperties(properties), - elementLoc - ); - } - if (hasDynamicKeys) { - patchFlag |= 16; - } else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2; - } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4; - } - if (dynamicPropNames.length) { - patchFlag |= 8; - } - if (hasHydrationEventBinding) { - patchFlag |= 32; - } - } - if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512; - } - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15: - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === "class") { - classKeyIndex = i; - } else if (key.content === "style") { - styleKeyIndex = i; - } - } else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression( - context.helper(NORMALIZE_CLASS), - [classProp.value] - ); - } - if (styleProp && // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17)) { - styleProp.value = createCallExpression( - context.helper(NORMALIZE_STYLE), - [styleProp.value] - ); - } - } else { - propsExpression = createCallExpression( - context.helper(NORMALIZE_PROPS), - [propsExpression] - ); - } - break; - case 14: - break; - default: - propsExpression = createCallExpression( - context.helper(NORMALIZE_PROPS), - [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ] - ); - break; - } - } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; - } - function dedupeProperties(properties) { - const knownProps = /* @__PURE__ */ new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - if (prop.key.type === 8 || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === "style" || name === "class" || isOn(name)) { - mergeAsArray(existing, prop); - } - } else { - knownProps.set(name, prop); - deduped.push(prop); - } - } - return deduped; - } - function mergeAsArray(existing, incoming) { - if (existing.value.type === 17) { - existing.value.elements.push(incoming.value); - } else { - existing.value = createArrayExpression( - [existing.value, incoming.value], - existing.loc - ); - } - } - function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - dirArgs.push(context.helperString(runtime)); - } else { - { - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } - } - const { loc } = dir; - if (dir.exp) dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); - } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push( - createObjectExpression( - dir.modifiers.map( - (modifier) => createObjectProperty(modifier, trueExpression) - ), - loc - ) - ); - } - return createArrayExpression(dirArgs, dir.loc); - } - function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) propsNamesString += ", "; - } - return propsNamesString + `]`; - } - function isComponentTag(tag) { - return tag === "component" || tag === "Component"; - } - - const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - "{}", - "undefined", - "true" - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); - node.codegenNode = createCallExpression( - context.helper(RENDER_SLOT), - slotArgs, - loc - ); - } - }; - function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = void 0; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - if (p.value) { - if (p.name === "name") { - slotName = JSON.stringify(p.value.content); - } else { - p.name = camelize(p.name); - nonNameProps.push(p); - } - } - } else { - if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { - if (p.exp) { - slotName = p.exp; - } else if (p.arg && p.arg.type === 4) { - const name = camelize(p.arg.content); - slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); - } - } else { - if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { - p.arg.content = camelize(p.arg.content); - } - nonNameProps.push(p); - } - } - } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps( - node, - context, - nonNameProps, - false, - false - ); - slotProps = props; - if (directives.length) { - context.onError( - createCompilerError( - 36, - directives[0].loc - ) - ); - } - } - return { - slotName, - slotProps - }; - } - - const transformOn$1 = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35, loc)); - } - let eventName; - if (arg.type === 4) { - if (arg.isStatic) { - let rawName = arg.content; - if (rawName.startsWith("vnode")) { - context.onError(createCompilerError(51, arg.loc)); - } - if (rawName.startsWith("vue:")) { - rawName = `vnode-${rawName.slice(4)}`; - } - const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( - // for non-element and vnode lifecycle event listeners, auto convert - // it to camelCase. See issue #2249 - toHandlerKey(camelize(rawName)) - ) : ( - // preserve case for plain element listeners that have uppercase - // letters, as these may be custom elements' custom events - `on:${rawName}` - ); - eventName = createSimpleExpression(eventString, true, arg.loc); - } else { - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); - } - } else { - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); - } - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = void 0; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp); - const isInlineStatement = !(isMemberExp || isFnExpression(exp)); - const hasMultipleStatements = exp.content.includes(`;`); - { - validateBrowserExpression( - exp, - context, - false, - hasMultipleStatements - ); - } - if (isInlineStatement || shouldCache && isMemberExp) { - exp = createCompoundExpression([ - `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty( - eventName, - exp || createSimpleExpression(`() => {}`, false, loc) - ) - ] - }; - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - ret.props[0].value = context.cache(ret.props[0].value); - } - ret.props.forEach((p) => p.key.isHandlerKey = true); - return ret; - }; - - const transformText = (node, context) => { - if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { - return () => { - const children = node.children; - let currentContainer = void 0; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText$1(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText$1(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression( - [child], - child.loc - ); - } - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } else { - currentContainer = void 0; - break; - } - } - } - } - if (!hasText || // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find( - (p) => p.type === 7 && !context.directiveTransforms[p.name] - ) && // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - !(node.tag === "template"))) { - return; - } - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText$1(child) || child.type === 8) { - const callArgs = []; - if (child.type !== 2 || child.content !== " ") { - callArgs.push(child); - } - if (!context.ssr && getConstantType(child, context) === 0) { - callArgs.push( - 1 + (` /* ${PatchFlagNames[1]} */` ) - ); - } - children[i] = { - type: 12, - content: child, - loc: child.loc, - codegenNode: createCallExpression( - context.helper(CREATE_TEXT), - callArgs - ) - }; - } - } - }; - } - }; - - const seen$1 = /* @__PURE__ */ new WeakSet(); - const transformOnce = (node, context) => { - if (node.type === 1 && findDir(node, "once", true)) { - if (seen$1.has(node) || context.inVOnce || context.inSSR) { - return; - } - seen$1.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache( - cur.codegenNode, - true, - true - ); - } - }; - } - }; - - const transformModel$1 = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError( - createCompilerError(41, dir.loc) - ); - return createTransformProps(); - } - const rawExp = exp.loc.source.trim(); - const expString = exp.type === 4 ? exp.content : rawExp; - const bindingType = context.bindingMetadata[rawExp]; - if (bindingType === "props" || bindingType === "props-aliased") { - context.onError(createCompilerError(44, exp.loc)); - return createTransformProps(); - } - const maybeRef = false; - if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) { - context.onError( - createCompilerError(42, exp.loc) - ); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression("modelValue", true); - const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - if (dir.modifiers.length && node.tagType === 1) { - const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); - const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; - props.push( - createObjectProperty( - modifiersKey, - createSimpleExpression( - `{ ${modifiers} }`, - false, - dir.loc, - 2 - ) - ) - ); - } - return createTransformProps(props); - }; - function createTransformProps(props = []) { - return { props }; - } - - const validDivisionCharRE = /[\w).+\-_$\]]/; - const transformFilter = (node, context) => { - if (!isCompatEnabled("COMPILER_FILTERS", context)) { - return; - } - if (node.type === 5) { - rewriteFilter(node.content, context); - } else if (node.type === 1) { - node.props.forEach((prop) => { - if (prop.type === 7 && prop.name !== "for" && prop.exp) { - rewriteFilter(prop.exp, context); - } - }); - } - }; - function rewriteFilter(node, context) { - if (node.type === 4) { - parseFilter(node, context); - } else { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (typeof child !== "object") continue; - if (child.type === 4) { - parseFilter(child, context); - } else if (child.type === 8) { - rewriteFilter(node, context); - } else if (child.type === 5) { - rewriteFilter(child.content, context); - } - } - } - } - function parseFilter(node, context) { - const exp = node.content; - let inSingle = false; - let inDouble = false; - let inTemplateString = false; - let inRegex = false; - let curly = 0; - let square = 0; - let paren = 0; - let lastFilterIndex = 0; - let c, prev, i, expression, filters = []; - for (i = 0; i < exp.length; i++) { - prev = c; - c = exp.charCodeAt(i); - if (inSingle) { - if (c === 39 && prev !== 92) inSingle = false; - } else if (inDouble) { - if (c === 34 && prev !== 92) inDouble = false; - } else if (inTemplateString) { - if (c === 96 && prev !== 92) inTemplateString = false; - } else if (inRegex) { - if (c === 47 && prev !== 92) inRegex = false; - } else if (c === 124 && // pipe - exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { - if (expression === void 0) { - lastFilterIndex = i + 1; - expression = exp.slice(0, i).trim(); - } else { - pushFilter(); - } - } else { - switch (c) { - case 34: - inDouble = true; - break; - // " - case 39: - inSingle = true; - break; - // ' - case 96: - inTemplateString = true; - break; - // ` - case 40: - paren++; - break; - // ( - case 41: - paren--; - break; - // ) - case 91: - square++; - break; - // [ - case 93: - square--; - break; - // ] - case 123: - curly++; - break; - // { - case 125: - curly--; - break; - } - if (c === 47) { - let j = i - 1; - let p; - for (; j >= 0; j--) { - p = exp.charAt(j); - if (p !== " ") break; - } - if (!p || !validDivisionCharRE.test(p)) { - inRegex = true; - } - } - } - } - if (expression === void 0) { - expression = exp.slice(0, i).trim(); - } else if (lastFilterIndex !== 0) { - pushFilter(); - } - function pushFilter() { - filters.push(exp.slice(lastFilterIndex, i).trim()); - lastFilterIndex = i + 1; - } - if (filters.length) { - warnDeprecation( - "COMPILER_FILTERS", - context, - node.loc - ); - for (i = 0; i < filters.length; i++) { - expression = wrapFilter(expression, filters[i], context); - } - node.content = expression; - node.ast = void 0; - } - } - function wrapFilter(exp, filter, context) { - context.helper(RESOLVE_FILTER); - const i = filter.indexOf("("); - if (i < 0) { - context.filters.add(filter); - return `${toValidAssetId(filter, "filter")}(${exp})`; - } else { - const name = filter.slice(0, i); - const args = filter.slice(i + 1); - context.filters.add(name); - return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; - } - } - - const seen = /* @__PURE__ */ new WeakSet(); - const transformMemo = (node, context) => { - if (node.type === 1) { - const dir = findDir(node, "memo"); - if (!dir || seen.has(node)) { - return; - } - seen.add(node); - return () => { - const codegenNode = node.codegenNode || context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13) { - if (node.tagType !== 1) { - convertToBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(void 0, codegenNode), - `_cache`, - String(context.cached.length) - ]); - context.cached.push(null); - } - }; - } - }; - - function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...[transformFilter] , - ...[transformExpression] , - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn$1, - bind: transformBind, - model: transformModel$1 - } - ]; - } - function baseCompile(source, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === "module"; - { - if (options.prefixIdentifiers === true) { - onError(createCompilerError(47)); - } else if (isModuleMode) { - onError(createCompilerError(48)); - } - } - const prefixIdentifiers = false; - if (options.cacheHandlers) { - onError(createCompilerError(49)); - } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(50)); - } - const resolvedOptions = extend({}, options, { - prefixIdentifiers - }); - const ast = isString(source) ? baseParse(source, resolvedOptions) : source; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); - transform( - ast, - extend({}, resolvedOptions, { - nodeTransforms: [ - ...nodeTransforms, - ...options.nodeTransforms || [] - // user transforms - ], - directiveTransforms: extend( - {}, - directiveTransforms, - options.directiveTransforms || {} - // user transforms - ) - }) - ); - return generate(ast, resolvedOptions); - } - - const BindingTypes = { - "DATA": "data", - "PROPS": "props", - "PROPS_ALIASED": "props-aliased", - "SETUP_LET": "setup-let", - "SETUP_CONST": "setup-const", - "SETUP_REACTIVE_CONST": "setup-reactive-const", - "SETUP_MAYBE_REF": "setup-maybe-ref", - "SETUP_REF": "setup-ref", - "OPTIONS": "options", - "LITERAL_CONST": "literal-const" - }; - - const noopDirectiveTransform = () => ({ props: [] }); - - const V_MODEL_RADIO = Symbol(`vModelRadio` ); - const V_MODEL_CHECKBOX = Symbol( - `vModelCheckbox` - ); - const V_MODEL_TEXT = Symbol(`vModelText` ); - const V_MODEL_SELECT = Symbol( - `vModelSelect` - ); - const V_MODEL_DYNAMIC = Symbol( - `vModelDynamic` - ); - const V_ON_WITH_MODIFIERS = Symbol( - `vOnModifiersGuard` - ); - const V_ON_WITH_KEYS = Symbol( - `vOnKeysGuard` - ); - const V_SHOW = Symbol(`vShow` ); - const TRANSITION = Symbol(`Transition` ); - const TRANSITION_GROUP = Symbol( - `TransitionGroup` - ); - registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` - }); - - let decoder; - function decodeHtmlBrowser(raw, asAttr = false) { - if (!decoder) { - decoder = document.createElement("div"); - } - if (asAttr) { - decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; - return decoder.children[0].getAttribute("foo"); - } else { - decoder.innerHTML = raw; - return decoder.textContent; - } - } - - const parserOptions = { - parseMode: "html", - isVoidTag, - isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), - isPreTag: (tag) => tag === "pre", - isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", - decodeEntities: decodeHtmlBrowser , - isBuiltInComponent: (tag) => { - if (tag === "Transition" || tag === "transition") { - return TRANSITION; - } else if (tag === "TransitionGroup" || tag === "transition-group") { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent, rootNamespace) { - let ns = parent ? parent.ns : rootNamespace; - if (parent && ns === 2) { - if (parent.tag === "annotation-xml") { - if (tag === "svg") { - return 1; - } - if (parent.props.some( - (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") - )) { - ns = 0; - } - } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { - ns = 0; - } - } else if (parent && ns === 1) { - if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { - ns = 0; - } - } - if (ns === 0) { - if (tag === "svg") { - return 1; - } - if (tag === "math") { - return 2; - } - } - return ns; - } - }; - - const transformStyle = (node) => { - if (node.type === 1) { - node.props.forEach((p, i) => { - if (p.type === 6 && p.name === "style" && p.value) { - node.props[i] = { - type: 7, - name: `bind`, - arg: createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } - }; - const parseInlineCSS = (cssText, loc) => { - const normalized = parseStringStyle(cssText); - return createSimpleExpression( - JSON.stringify(normalized), - false, - loc, - 3 - ); - }; - - function createDOMCompilerError(code, loc) { - return createCompilerError( - code, - loc, - DOMErrorMessages - ); - } - const DOMErrorCodes = { - "X_V_HTML_NO_EXPRESSION": 53, - "53": "X_V_HTML_NO_EXPRESSION", - "X_V_HTML_WITH_CHILDREN": 54, - "54": "X_V_HTML_WITH_CHILDREN", - "X_V_TEXT_NO_EXPRESSION": 55, - "55": "X_V_TEXT_NO_EXPRESSION", - "X_V_TEXT_WITH_CHILDREN": 56, - "56": "X_V_TEXT_WITH_CHILDREN", - "X_V_MODEL_ON_INVALID_ELEMENT": 57, - "57": "X_V_MODEL_ON_INVALID_ELEMENT", - "X_V_MODEL_ARG_ON_ELEMENT": 58, - "58": "X_V_MODEL_ARG_ON_ELEMENT", - "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, - "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", - "X_V_MODEL_UNNECESSARY_VALUE": 60, - "60": "X_V_MODEL_UNNECESSARY_VALUE", - "X_V_SHOW_NO_EXPRESSION": 61, - "61": "X_V_SHOW_NO_EXPRESSION", - "X_TRANSITION_INVALID_CHILDREN": 62, - "62": "X_TRANSITION_INVALID_CHILDREN", - "X_IGNORED_SIDE_EFFECT_TAG": 63, - "63": "X_IGNORED_SIDE_EFFECT_TAG", - "__EXTEND_POINT__": 64, - "64": "__EXTEND_POINT__" - }; - const DOMErrorMessages = { - [53]: `v-html is missing expression.`, - [54]: `v-html will override element children.`, - [55]: `v-text is missing expression.`, - [56]: `v-text will override element children.`, - [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [58]: `v-model argument is not supported on plain elements.`, - [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [61]: `v-show is missing expression.`, - [62]: `<Transition> expects exactly one child element or component.`, - [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` - }; - - const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(53, loc) - ); - } - if (node.children.length) { - context.onError( - createDOMCompilerError(54, loc) - ); - node.children.length = 0; - } - return { - props: [ - createObjectProperty( - createSimpleExpression(`innerHTML`, true, loc), - exp || createSimpleExpression("", true) - ) - ] - }; - }; - - const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(55, loc) - ); - } - if (node.children.length) { - context.onError( - createDOMCompilerError(56, loc) - ); - node.children.length = 0; - } - return { - props: [ - createObjectProperty( - createSimpleExpression(`textContent`, true), - exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( - context.helperString(TO_DISPLAY_STRING), - [exp], - loc - ) : createSimpleExpression("", true) - ) - ] - }; - }; - - const transformModel = (dir, node, context) => { - const baseResult = transformModel$1(dir, node, context); - if (!baseResult.props.length || node.tagType === 1) { - return baseResult; - } - if (dir.arg) { - context.onError( - createDOMCompilerError( - 58, - dir.arg.loc - ) - ); - } - function checkDuplicatedValue() { - const value = findDir(node, "bind"); - if (value && isStaticArgOf(value.arg, "value")) { - context.onError( - createDOMCompilerError( - 60, - value.loc - ) - ); - } - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === "input" || isCustomElement) { - const type = findProp(node, `type`); - if (type) { - if (type.type === 7) { - directiveToUse = V_MODEL_DYNAMIC; - } else if (type.value) { - switch (type.value.content) { - case "radio": - directiveToUse = V_MODEL_RADIO; - break; - case "checkbox": - directiveToUse = V_MODEL_CHECKBOX; - break; - case "file": - isInvalidType = true; - context.onError( - createDOMCompilerError( - 59, - dir.loc - ) - ); - break; - default: - checkDuplicatedValue(); - break; - } - } - } else if (hasDynamicKeyVBind(node)) { - directiveToUse = V_MODEL_DYNAMIC; - } else { - checkDuplicatedValue(); - } - } else if (tag === "select") { - directiveToUse = V_MODEL_SELECT; - } else { - checkDuplicatedValue(); - } - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } else { - context.onError( - createDOMCompilerError( - 57, - dir.loc - ) - ); - } - baseResult.props = baseResult.props.filter( - (p) => !(p.key.type === 4 && p.key.content === "modelValue") - ); - return baseResult; - }; - - const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); - const isNonKeyModifier = /* @__PURE__ */ makeMap( - // event propagation management - `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` - ); - const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); - const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`); - const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i].content; - if (modifier === "native" && checkCompatEnabled( - "COMPILER_V_ON_NATIVE", - context, - loc - )) { - eventOptionModifiers.push(modifier); - } else if (isEventOptionModifier(modifier)) { - eventOptionModifiers.push(modifier); - } else { - if (maybeKeyModifier(modifier)) { - if (isStaticExp(key)) { - if (isKeyboardEvent(key.content.toLowerCase())) { - keyModifiers.push(modifier); - } else { - nonKeyModifiers.push(modifier); - } - } else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } else { - keyModifiers.push(modifier); - } - } - } - } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; - }; - const transformClick = (key, event) => { - const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; - return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) : key; - }; - const transformOn = (dir, node, context) => { - return transformOn$1(dir, node, context, (baseResult) => { - const { modifiers } = dir; - if (!modifiers.length) return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - if (nonKeyModifiers.includes("right")) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes("middle")) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard - (!isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); - key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [createObjectProperty(key, handlerExp)] - }; - }); - }; - - const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(61, loc) - ); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; - }; - - const transformTransition = (node, context) => { - if (node.type === 1 && node.tagType === 1) { - const component = context.isBuiltInComponent(node.tag); - if (component === TRANSITION) { - return () => { - if (!node.children.length) { - return; - } - if (hasMultipleChildren(node)) { - context.onError( - createDOMCompilerError( - 62, - { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: "" - } - ) - ); - } - const child = node.children[0]; - if (child.type === 1) { - for (const p of child.props) { - if (p.type === 7 && p.name === "show") { - node.props.push({ - type: 6, - name: "persisted", - nameLoc: node.loc, - value: void 0, - loc: node.loc - }); - } - } - } - }; - } - } - }; - function hasMultipleChildren(node) { - const children = node.children = node.children.filter( - (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) - ); - const child = children[0]; - return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); - } - - const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { - context.onError( - createDOMCompilerError( - 63, - node.loc - ) - ); - context.removeNode(); - } - }; - - function isValidHTMLNesting(parent, child) { - if (parent in onlyValidChildren) { - return onlyValidChildren[parent].has(child); - } - if (child in onlyValidParents) { - return onlyValidParents[child].has(parent); - } - if (parent in knownInvalidChildren) { - if (knownInvalidChildren[parent].has(child)) return false; - } - if (child in knownInvalidParents) { - if (knownInvalidParents[child].has(parent)) return false; - } - return true; - } - const headings = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]); - const emptySet = /* @__PURE__ */ new Set([]); - const onlyValidChildren = { - head: /* @__PURE__ */ new Set([ - "base", - "basefront", - "bgsound", - "link", - "meta", - "title", - "noscript", - "noframes", - "style", - "script", - "template" - ]), - optgroup: /* @__PURE__ */ new Set(["option"]), - select: /* @__PURE__ */ new Set(["optgroup", "option", "hr"]), - // table - table: /* @__PURE__ */ new Set(["caption", "colgroup", "tbody", "tfoot", "thead"]), - tr: /* @__PURE__ */ new Set(["td", "th"]), - colgroup: /* @__PURE__ */ new Set(["col"]), - tbody: /* @__PURE__ */ new Set(["tr"]), - thead: /* @__PURE__ */ new Set(["tr"]), - tfoot: /* @__PURE__ */ new Set(["tr"]), - // these elements can not have any children elements - script: emptySet, - iframe: emptySet, - option: emptySet, - textarea: emptySet, - style: emptySet, - title: emptySet - }; - const onlyValidParents = { - // sections - html: emptySet, - body: /* @__PURE__ */ new Set(["html"]), - head: /* @__PURE__ */ new Set(["html"]), - // table - td: /* @__PURE__ */ new Set(["tr"]), - colgroup: /* @__PURE__ */ new Set(["table"]), - caption: /* @__PURE__ */ new Set(["table"]), - tbody: /* @__PURE__ */ new Set(["table"]), - tfoot: /* @__PURE__ */ new Set(["table"]), - col: /* @__PURE__ */ new Set(["colgroup"]), - th: /* @__PURE__ */ new Set(["tr"]), - thead: /* @__PURE__ */ new Set(["table"]), - tr: /* @__PURE__ */ new Set(["tbody", "thead", "tfoot"]), - // data list - dd: /* @__PURE__ */ new Set(["dl", "div"]), - dt: /* @__PURE__ */ new Set(["dl", "div"]), - // other - figcaption: /* @__PURE__ */ new Set(["figure"]), - // li: new Set(["ul", "ol"]), - summary: /* @__PURE__ */ new Set(["details"]), - area: /* @__PURE__ */ new Set(["map"]) - }; - const knownInvalidChildren = { - p: /* @__PURE__ */ new Set([ - "address", - "article", - "aside", - "blockquote", - "center", - "details", - "dialog", - "dir", - "div", - "dl", - "fieldset", - "figure", - "footer", - "form", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "header", - "hgroup", - "hr", - "li", - "main", - "nav", - "menu", - "ol", - "p", - "pre", - "section", - "table", - "ul" - ]), - svg: /* @__PURE__ */ new Set([ - "b", - "blockquote", - "br", - "code", - "dd", - "div", - "dl", - "dt", - "em", - "embed", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "hr", - "i", - "img", - "li", - "menu", - "meta", - "ol", - "p", - "pre", - "ruby", - "s", - "small", - "span", - "strong", - "sub", - "sup", - "table", - "u", - "ul", - "var" - ]) - }; - const knownInvalidParents = { - a: /* @__PURE__ */ new Set(["a"]), - button: /* @__PURE__ */ new Set(["button"]), - dd: /* @__PURE__ */ new Set(["dd", "dt"]), - dt: /* @__PURE__ */ new Set(["dd", "dt"]), - form: /* @__PURE__ */ new Set(["form"]), - li: /* @__PURE__ */ new Set(["li"]), - h1: headings, - h2: headings, - h3: headings, - h4: headings, - h5: headings, - h6: headings - }; - - const validateHtmlNesting = (node, context) => { - if (node.type === 1 && node.tagType === 0 && context.parent && context.parent.type === 1 && context.parent.tagType === 0 && !isValidHTMLNesting(context.parent.tag, node.tag)) { - const error = new SyntaxError( - `<${node.tag}> cannot be child of <${context.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.` - ); - error.loc = node.loc; - context.onWarn(error); - } - }; - - const DOMNodeTransforms = [ - transformStyle, - ...[transformTransition, validateHtmlNesting] - ]; - const DOMDirectiveTransforms = { - cloak: noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel, - // override compiler-core - on: transformOn, - // override compiler-core - show: transformShow - }; - function compile(src, options = {}) { - return baseCompile( - src, - extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...options.nodeTransforms || [] - ], - directiveTransforms: extend( - {}, - DOMDirectiveTransforms, - options.directiveTransforms || {} - ), - transformHoist: null - }) - ); - } - function parse(template, options = {}) { - return baseParse(template, extend({}, parserOptions, options)); - } - - exports.BASE_TRANSITION = BASE_TRANSITION; - exports.BindingTypes = BindingTypes; - exports.CAMELIZE = CAMELIZE; - exports.CAPITALIZE = CAPITALIZE; - exports.CREATE_BLOCK = CREATE_BLOCK; - exports.CREATE_COMMENT = CREATE_COMMENT; - exports.CREATE_ELEMENT_BLOCK = CREATE_ELEMENT_BLOCK; - exports.CREATE_ELEMENT_VNODE = CREATE_ELEMENT_VNODE; - exports.CREATE_SLOTS = CREATE_SLOTS; - exports.CREATE_STATIC = CREATE_STATIC; - exports.CREATE_TEXT = CREATE_TEXT; - exports.CREATE_VNODE = CREATE_VNODE; - exports.CompilerDeprecationTypes = CompilerDeprecationTypes; - exports.ConstantTypes = ConstantTypes; - exports.DOMDirectiveTransforms = DOMDirectiveTransforms; - exports.DOMErrorCodes = DOMErrorCodes; - exports.DOMErrorMessages = DOMErrorMessages; - exports.DOMNodeTransforms = DOMNodeTransforms; - exports.ElementTypes = ElementTypes; - exports.ErrorCodes = ErrorCodes; - exports.FRAGMENT = FRAGMENT; - exports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS; - exports.IS_MEMO_SAME = IS_MEMO_SAME; - exports.IS_REF = IS_REF; - exports.KEEP_ALIVE = KEEP_ALIVE; - exports.MERGE_PROPS = MERGE_PROPS; - exports.NORMALIZE_CLASS = NORMALIZE_CLASS; - exports.NORMALIZE_PROPS = NORMALIZE_PROPS; - exports.NORMALIZE_STYLE = NORMALIZE_STYLE; - exports.Namespaces = Namespaces; - exports.NodeTypes = NodeTypes; - exports.OPEN_BLOCK = OPEN_BLOCK; - exports.POP_SCOPE_ID = POP_SCOPE_ID; - exports.PUSH_SCOPE_ID = PUSH_SCOPE_ID; - exports.RENDER_LIST = RENDER_LIST; - exports.RENDER_SLOT = RENDER_SLOT; - exports.RESOLVE_COMPONENT = RESOLVE_COMPONENT; - exports.RESOLVE_DIRECTIVE = RESOLVE_DIRECTIVE; - exports.RESOLVE_DYNAMIC_COMPONENT = RESOLVE_DYNAMIC_COMPONENT; - exports.RESOLVE_FILTER = RESOLVE_FILTER; - exports.SET_BLOCK_TRACKING = SET_BLOCK_TRACKING; - exports.SUSPENSE = SUSPENSE; - exports.TELEPORT = TELEPORT; - exports.TO_DISPLAY_STRING = TO_DISPLAY_STRING; - exports.TO_HANDLERS = TO_HANDLERS; - exports.TO_HANDLER_KEY = TO_HANDLER_KEY; - exports.TRANSITION = TRANSITION; - exports.TRANSITION_GROUP = TRANSITION_GROUP; - exports.TS_NODE_TYPES = TS_NODE_TYPES; - exports.UNREF = UNREF; - exports.V_MODEL_CHECKBOX = V_MODEL_CHECKBOX; - exports.V_MODEL_DYNAMIC = V_MODEL_DYNAMIC; - exports.V_MODEL_RADIO = V_MODEL_RADIO; - exports.V_MODEL_SELECT = V_MODEL_SELECT; - exports.V_MODEL_TEXT = V_MODEL_TEXT; - exports.V_ON_WITH_KEYS = V_ON_WITH_KEYS; - exports.V_ON_WITH_MODIFIERS = V_ON_WITH_MODIFIERS; - exports.V_SHOW = V_SHOW; - exports.WITH_CTX = WITH_CTX; - exports.WITH_DIRECTIVES = WITH_DIRECTIVES; - exports.WITH_MEMO = WITH_MEMO; - exports.advancePositionWithClone = advancePositionWithClone; - exports.advancePositionWithMutation = advancePositionWithMutation; - exports.assert = assert; - exports.baseCompile = baseCompile; - exports.baseParse = baseParse; - exports.buildDirectiveArgs = buildDirectiveArgs; - exports.buildProps = buildProps; - exports.buildSlots = buildSlots; - exports.checkCompatEnabled = checkCompatEnabled; - exports.compile = compile; - exports.convertToBlock = convertToBlock; - exports.createArrayExpression = createArrayExpression; - exports.createAssignmentExpression = createAssignmentExpression; - exports.createBlockStatement = createBlockStatement; - exports.createCacheExpression = createCacheExpression; - exports.createCallExpression = createCallExpression; - exports.createCompilerError = createCompilerError; - exports.createCompoundExpression = createCompoundExpression; - exports.createConditionalExpression = createConditionalExpression; - exports.createDOMCompilerError = createDOMCompilerError; - exports.createForLoopParams = createForLoopParams; - exports.createFunctionExpression = createFunctionExpression; - exports.createIfStatement = createIfStatement; - exports.createInterpolation = createInterpolation; - exports.createObjectExpression = createObjectExpression; - exports.createObjectProperty = createObjectProperty; - exports.createReturnStatement = createReturnStatement; - exports.createRoot = createRoot; - exports.createSequenceExpression = createSequenceExpression; - exports.createSimpleExpression = createSimpleExpression; - exports.createStructuralDirectiveTransform = createStructuralDirectiveTransform; - exports.createTemplateLiteral = createTemplateLiteral; - exports.createTransformContext = createTransformContext; - exports.createVNodeCall = createVNodeCall; - exports.errorMessages = errorMessages; - exports.extractIdentifiers = extractIdentifiers; - exports.findDir = findDir; - exports.findProp = findProp; - exports.forAliasRE = forAliasRE; - exports.generate = generate; - exports.generateCodeFrame = generateCodeFrame; - exports.getBaseTransformPreset = getBaseTransformPreset; - exports.getConstantType = getConstantType; - exports.getMemoedVNodeCall = getMemoedVNodeCall; - exports.getVNodeBlockHelper = getVNodeBlockHelper; - exports.getVNodeHelper = getVNodeHelper; - exports.hasDynamicKeyVBind = hasDynamicKeyVBind; - exports.hasScopeRef = hasScopeRef; - exports.helperNameMap = helperNameMap; - exports.injectProp = injectProp; - exports.isCoreComponent = isCoreComponent; - exports.isFnExpression = isFnExpression; - exports.isFnExpressionBrowser = isFnExpressionBrowser; - exports.isFnExpressionNode = isFnExpressionNode; - exports.isFunctionType = isFunctionType; - exports.isInDestructureAssignment = isInDestructureAssignment; - exports.isInNewExpression = isInNewExpression; - exports.isMemberExpression = isMemberExpression; - exports.isMemberExpressionBrowser = isMemberExpressionBrowser; - exports.isMemberExpressionNode = isMemberExpressionNode; - exports.isReferencedIdentifier = isReferencedIdentifier; - exports.isSimpleIdentifier = isSimpleIdentifier; - exports.isSlotOutlet = isSlotOutlet; - exports.isStaticArgOf = isStaticArgOf; - exports.isStaticExp = isStaticExp; - exports.isStaticProperty = isStaticProperty; - exports.isStaticPropertyKey = isStaticPropertyKey; - exports.isTemplateNode = isTemplateNode; - exports.isText = isText$1; - exports.isVSlot = isVSlot; - exports.locStub = locStub; - exports.noopDirectiveTransform = noopDirectiveTransform; - exports.parse = parse; - exports.parserOptions = parserOptions; - exports.processExpression = processExpression; - exports.processFor = processFor; - exports.processIf = processIf; - exports.processSlotOutlet = processSlotOutlet; - exports.registerRuntimeHelpers = registerRuntimeHelpers; - exports.resolveComponentType = resolveComponentType; - exports.stringifyExpression = stringifyExpression; - exports.toValidAssetId = toValidAssetId; - exports.trackSlotScopes = trackSlotScopes; - exports.trackVForSlotScopes = trackVForSlotScopes; - exports.transform = transform; - exports.transformBind = transformBind; - exports.transformElement = transformElement; - exports.transformExpression = transformExpression; - exports.transformModel = transformModel$1; - exports.transformOn = transformOn$1; - exports.transformStyle = transformStyle; - exports.traverseNode = traverseNode; - exports.unwrapTSNode = unwrapTSNode; - exports.walkBlockDeclarations = walkBlockDeclarations; - exports.walkFunctionParams = walkFunctionParams; - exports.walkIdentifiers = walkIdentifiers; - exports.warnDeprecation = warnDeprecation; - - return exports; - -})({}); diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js deleted file mode 100644 index 6386167..0000000 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js +++ /dev/null @@ -1,11 +0,0 @@ -/** -* @vue/compiler-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/var VueCompilerDOM=function(e){"use strict";let t;function n(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let i={},s=()=>{},r=()=>!1,o=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),a=Object.assign,l=Array.isArray,c=e=>"string"==typeof e,h=e=>"symbol"==typeof e,p=e=>null!==e&&"object"==typeof e,d=n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),u=n("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),f=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},E=/-(\w)/g,_=f(e=>e.replace(E,(e,t)=>t?t.toUpperCase():"")),m=f(e=>e.charAt(0).toUpperCase()+e.slice(1)),S=f(e=>e?`on${m(e)}`:""),g=/;(?![^(]*\))/g,T=/:([^]+)/,N=/\/\*[^]*?\*\//g,I=n("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),y=n("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),O=n("annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"),A=n("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),C=Symbol(""),b=Symbol(""),R=Symbol(""),v=Symbol(""),x=Symbol(""),L=Symbol(""),M=Symbol(""),D=Symbol(""),P=Symbol(""),V=Symbol(""),k=Symbol(""),X=Symbol(""),w=Symbol(""),U=Symbol(""),F=Symbol(""),B=Symbol(""),$=Symbol(""),H=Symbol(""),G=Symbol(""),q=Symbol(""),J=Symbol(""),j=Symbol(""),W=Symbol(""),K=Symbol(""),Y=Symbol(""),Q=Symbol(""),z=Symbol(""),Z=Symbol(""),ee=Symbol(""),et=Symbol(""),en=Symbol(""),ei=Symbol(""),es=Symbol(""),er=Symbol(""),eo=Symbol(""),ea=Symbol(""),el=Symbol(""),ec=Symbol(""),eh=Symbol(""),ep={[C]:"Fragment",[b]:"Teleport",[R]:"Suspense",[v]:"KeepAlive",[x]:"BaseTransition",[L]:"openBlock",[M]:"createBlock",[D]:"createElementBlock",[P]:"createVNode",[V]:"createElementVNode",[k]:"createCommentVNode",[X]:"createTextVNode",[w]:"createStaticVNode",[U]:"resolveComponent",[F]:"resolveDynamicComponent",[B]:"resolveDirective",[$]:"resolveFilter",[H]:"withDirectives",[G]:"renderList",[q]:"renderSlot",[J]:"createSlots",[j]:"toDisplayString",[W]:"mergeProps",[K]:"normalizeClass",[Y]:"normalizeStyle",[Q]:"normalizeProps",[z]:"guardReactiveProps",[Z]:"toHandlers",[ee]:"camelize",[et]:"capitalize",[en]:"toHandlerKey",[ei]:"setBlockTracking",[es]:"pushScopeId",[er]:"popScopeId",[eo]:"withCtx",[ea]:"unref",[el]:"isRef",[ec]:"withMemo",[eh]:"isMemoSame"};function ed(e){Object.getOwnPropertySymbols(e).forEach(t=>{ep[t]=e[t]})}let eu={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function ef(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:eu}}function eE(e,t,n,i,s,r,o,a=!1,l=!1,c=!1,h=eu){return e&&(a?(e.helper(L),e.helper(eb(e.inSSR,c))):e.helper(eC(e.inSSR,c)),o&&e.helper(H)),{type:13,tag:t,props:n,children:i,patchFlag:s,dynamicProps:r,directives:o,isBlock:a,disableTracking:l,isComponent:c,loc:h}}function e_(e,t=eu){return{type:17,loc:t,elements:e}}function em(e,t=eu){return{type:15,loc:t,properties:e}}function eS(e,t){return{type:16,loc:eu,key:c(e)?eg(e,!0):e,value:t}}function eg(e,t=!1,n=eu,i=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:i}}function eT(e,t=eu){return{type:8,loc:t,children:e}}function eN(e,t=[],n=eu){return{type:14,loc:n,callee:e,arguments:t}}function eI(e,t,n=!1,i=!1,s=eu){return{type:18,params:e,returns:t,newline:n,isSlot:i,loc:s}}function ey(e,t,n,i=!0){return{type:19,test:e,consequent:t,alternate:n,newline:i,loc:eu}}function eO(e,t,n=!1,i=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:i,needArraySpread:!1,loc:eu}}function eA(e){return{type:21,body:e,loc:eu}}function eC(e,t){return e||t?P:V}function eb(e,t){return e||t?M:D}function eR(e,{helper:t,removeHelper:n,inSSR:i}){e.isBlock||(e.isBlock=!0,n(eC(i,e.isComponent)),t(L),t(eb(i,e.isComponent)))}let ev=new Uint8Array([123,123]),ex=new Uint8Array([125,125]);function eL(e){return e>=97&&e<=122||e>=65&&e<=90}function eM(e){return 32===e||10===e||9===e||12===e||13===e}function eD(e){return 47===e||62===e||eM(e)}function eP(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}let eV={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])},ek={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function eX(e,{compatConfig:t}){let n=t&&t[e];return"MODE"===e?n||3:n}function ew(e,t){let n=eX("MODE",t),i=eX(e,t);return 3===n?!0===i:!1!==i}function eU(e,t,n,...i){return ew(e,t)}function eF(e){throw e}function eB(e){}function e$(e,t,n,i){let s=SyntaxError(String(`https://vuejs.org/error-reference/#compiler-${e}`));return s.code=e,s.loc=t,s}let eH={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '<!--' in comment.",17:"Attribute name cannot contain U+0022 (\"), U+0027 ('), and U+003C (<).",18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",52:"v-bind with same-name shorthand only allows static argument.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:`v-model cannot be used on a prop, because local prop bindings are not writable. -Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""};function eG(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let n=e;for(;"MemberExpression"===n.type;)n=n.object;t.push(n);break;case"ObjectPattern":for(let n of e.properties)"RestElement"===n.type?eG(n.argument,t):eG(n.value,t);break;case"ArrayPattern":e.elements.forEach(e=>{e&&eG(e,t)});break;case"RestElement":eG(e.argument,t);break;case"AssignmentPattern":eG(e.left,t)}return t}let eq=e=>e&&("ObjectProperty"===e.type||"ObjectMethod"===e.type)&&!e.computed,eJ=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"],ej=e=>4===e.type&&e.isStatic;function eW(e){switch(e){case"Teleport":case"teleport":return b;case"Suspense":case"suspense":return R;case"KeepAlive":case"keep-alive":return v;case"BaseTransition":case"base-transition":return x}}let eK=/^\d|[^\$\w\xA0-\uFFFF]/,eY=e=>!eK.test(e),eQ=/[A-Za-z_$\xA0-\uFFFF]/,ez=/[\.\?\w$\xA0-\uFFFF]/,eZ=/\s+[.[]\s*|\s*[.[]\s+/g,e1=e=>4===e.type?e.content:e.loc.source,e0=e=>{let t=e1(e).trim().replace(eZ,e=>e.trim()),n=0,i=[],s=0,r=0,o=null;for(let e=0;e<t.length;e++){let a=t.charAt(e);switch(n){case 0:if("["===a)i.push(n),n=1,s++;else if("("===a)i.push(n),n=2,r++;else if(!(0===e?eQ:ez).test(a))return!1;break;case 1:"'"===a||'"'===a||"`"===a?(i.push(n),n=3,o=a):"["===a?s++:"]"!==a||--s||(n=i.pop());break;case 2:if("'"===a||'"'===a||"`"===a)i.push(n),n=3,o=a;else if("("===a)r++;else if(")"===a){if(e===t.length-1)return!1;--r||(n=i.pop())}break;case 3:a===o&&(n=i.pop(),o=null)}}return!s&&!r},e2=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,e3=e=>e2.test(e1(e));function e4(e,t,n=t.length){let i=0,s=-1;for(let e=0;e<n;e++)10===t.charCodeAt(e)&&(i++,s=e);return e.offset+=n,e.line+=i,e.column=-1===s?e.column+n:n-s,e}function e6(e,t,n=!1){for(let i=0;i<e.props.length;i++){let s=e.props[i];if(7===s.type&&(n||s.exp)&&(c(t)?s.name===t:t.test(s.name)))return s}}function e5(e,t,n=!1,i=!1){for(let s=0;s<e.props.length;s++){let r=e.props[s];if(6===r.type){if(n)continue;if(r.name===t&&(r.value||i))return r}else if("bind"===r.name&&(r.exp||i)&&e9(r.arg,t))return r}}function e9(e,t){return!!(e&&ej(e)&&e.content===t)}function e7(e){return e.props.some(e=>7===e.type&&"bind"===e.name&&(!e.arg||4!==e.arg.type||!e.arg.isStatic))}function e8(e){return 5===e.type||2===e.type}function te(e){return 7===e.type&&"slot"===e.name}function tt(e){return 1===e.type&&3===e.tagType}function tn(e){return 1===e.type&&2===e.tagType}let ti=new Set([Q,z]);function ts(e,t,n){let i,s;let r=13===e.type?e.props:e.arguments[2],o=[];if(r&&!c(r)&&14===r.type){let e=function e(t,n=[]){if(t&&!c(t)&&14===t.type){let i=t.callee;if(!c(i)&&ti.has(i))return e(t.arguments[0],n.concat(t))}return[t,n]}(r);r=e[0],s=(o=e[1])[o.length-1]}if(null==r||c(r))i=em([t]);else if(14===r.type){let e=r.arguments[0];c(e)||15!==e.type?r.callee===Z?i=eN(n.helper(W),[em([t]),r]):r.arguments.unshift(em([t])):tr(t,e)||e.properties.unshift(t),i||(i=r)}else 15===r.type?(tr(t,r)||r.properties.unshift(t),i=r):(i=eN(n.helper(W),[em([t]),r]),s&&s.callee===z&&(s=o[o.length-2]));13===e.type?s?s.arguments[0]=i:e.props=i:s?s.arguments[0]=i:e.arguments[2]=i}function tr(e,t){let n=!1;if(4===e.key.type){let i=e.key.content;n=t.properties.some(e=>4===e.key.type&&e.key.content===i)}return n}function to(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>"-"===t?"_":e.charCodeAt(n).toString())}`}function ta(e){return 14===e.type&&e.callee===ec?e.arguments[1].returns:e}let tl=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,tc={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:r,isPreTag:r,isIgnoreNewlineTag:r,isCustomElement:r,onError:eF,onWarn:eB,comments:!1,prefixIdentifiers:!1},th=tc,tp=null,td="",tu=null,tf=null,tE="",t_=-1,tm=-1,tS=0,tg=!1,tT=null,tN=[],tI=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=ev,this.delimiterClose=ex,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=ev,this.delimiterClose=ex}getPos(e){let t=1,n=e+1;for(let i=this.newlines.length-1;i>=0;i--){let s=this.newlines[i];if(e>s){t=i+2,n=e-s;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex]){if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++}else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(t?eD(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t){this.sequenceIndex++;return}}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||eM(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart<t){let e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}this.sectionStart=t+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence!==eV.TitleEnd&&(this.currentSequence!==eV.TextareaEnd||this.inSFCRoot)?this.fastForwardTo(60)&&(this.sequenceIndex=1):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===eV.Cdata[this.sequenceIndex]?++this.sequenceIndex===eV.Cdata.length&&(this.state=28,this.currentSequence=eV.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){let t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===eV.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){33===e?(this.state=22,this.sectionStart=this.index+1):63===e?(this.state=24,this.sectionStart=this.index+1):eL(e)?(this.sectionStart=this.index,0===this.mode?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:116===e?this.state=30:this.state=115===e?29:6):47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){eD(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(eD(e)){let t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(eP("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){eM(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=eL(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||eM(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):eM(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):eM(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||eD(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||eD(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||eD(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||eD(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||eD(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):eM(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):eM(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){eM(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(39===e||60===e||61===e||96===e)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=eV.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===eV.ScriptEnd[3]?this.startSpecial(eV.ScriptEnd,4):e===eV.StyleEnd[3]?this.startSpecial(eV.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===eV.TitleEnd[3]?this.startSpecial(eV.TitleEnd,4):e===eV.TextareaEnd[3]?this.startSpecial(eV.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){let e=this.buffer.charCodeAt(this.index);switch(10===e&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(19===this.state||20===this.state||21===this.state)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){let e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===eV.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(tN,{onerr:tU,ontext(e,t){tb(tA(e,t),e,t)},ontextentity(e,t,n){tb(e,t,n)},oninterpolation(e,t){if(tg)return tb(tA(e,t),e,t);let n=e+tI.delimiterOpen.length,i=t-tI.delimiterClose.length;for(;eM(td.charCodeAt(n));)n++;for(;eM(td.charCodeAt(i-1));)i--;let s=tA(n,i);s.includes("&")&&(s=th.decodeEntities(s,!1)),tV({type:5,content:tw(s,!1,tk(n,i)),loc:tk(e,t)})},onopentagname(e,t){let n=tA(e,t);tu={type:1,tag:n,ns:th.getNamespace(n,tN[0],th.ns),tagType:0,props:[],children:[],loc:tk(e-1,t),codegenNode:void 0}},onopentagend(e){tC(e)},onclosetag(e,t){let n=tA(e,t);if(!th.isVoidTag(n)){let i=!1;for(let e=0;e<tN.length;e++)if(tN[e].tag.toLowerCase()===n.toLowerCase()){i=!0,e>0&&tN[0].loc.start.offset;for(let n=0;n<=e;n++)tR(tN.shift(),t,n<e);break}i||tv(e,60)}},onselfclosingtag(e){let t=tu.tag;tu.isSelfClosing=!0,tC(e),tN[0]&&tN[0].tag===t&&tR(tN.shift(),e)},onattribname(e,t){tf={type:6,name:tA(e,t),nameLoc:tk(e,t),value:void 0,loc:tk(e)}},ondirname(e,t){let n=tA(e,t),i="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(tg||""===i)tf={type:6,name:n,nameLoc:tk(e,t),value:void 0,loc:tk(e)};else if(tf={type:7,name:i,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?[eg("prop")]:[],loc:tk(e)},"pre"===i){tg=tI.inVPre=!0,tT=tu;let e=tu.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=function(e){let t={type:6,name:e.rawName,nameLoc:tk(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){let n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}(e[t]))}},ondirarg(e,t){if(e===t)return;let n=tA(e,t);if(tg)tf.name+=n,tX(tf.nameLoc,t);else{let i="["!==n[0];tf.arg=tw(i?n:n.slice(1,-1),i,tk(e,t),i?3:0)}},ondirmodifier(e,t){let n=tA(e,t);if(tg)tf.name+="."+n,tX(tf.nameLoc,t);else if("slot"===tf.name){let e=tf.arg;e&&(e.content+="."+n,tX(e.loc,t))}else{let i=eg(n,!0,tk(e,t));tf.modifiers.push(i)}},onattribdata(e,t){tE+=tA(e,t),t_<0&&(t_=e),tm=t},onattribentity(e,t,n){tE+=e,t_<0&&(t_=t),tm=n},onattribnameend(e){let t=tA(tf.loc.start.offset,e);7===tf.type&&(tf.rawName=t),tu.props.some(e=>(7===e.type?e.rawName:e.name)===t)},onattribend(e,t){if(tu&&tf){if(tX(tf.loc,t),0!==e){if(tE.includes("&")&&(tE=th.decodeEntities(tE,!0)),6===tf.type)"class"===tf.name&&(tE=tP(tE).trim()),tf.value={type:2,content:tE,loc:1===e?tk(t_,tm):tk(t_-1,tm+1)},tI.inSFCRoot&&"template"===tu.tag&&"lang"===tf.name&&tE&&"html"!==tE&&tI.enterRCDATA(eP("</template"),0);else{tf.exp=tw(tE,!1,tk(t_,tm),0,0),"for"===tf.name&&(tf.forParseResult=function(e){let t=e.loc,n=e.content,i=n.match(tl);if(!i)return;let[,s,r]=i,o=(e,n,i=!1)=>{let s=t.start.offset+n,r=s+e.length;return tw(e,!1,tk(s,r),0,i?1:0)},a={source:o(r.trim(),n.indexOf(r,s.length)),value:void 0,key:void 0,index:void 0,finalized:!1},l=s.trim().replace(tO,"").trim(),c=s.indexOf(l),h=l.match(ty);if(h){let e;l=l.replace(ty,"").trim();let t=h[1].trim();if(t&&(e=n.indexOf(t,c+l.length),a.key=o(t,e,!0)),h[2]){let i=h[2].trim();i&&(a.index=o(i,n.indexOf(i,a.key?e+t.length:c+l.length),!0))}}return l&&(a.value=o(l,c,!0)),a}(tf.exp));let e=-1;"bind"===tf.name&&(e=tf.modifiers.findIndex(e=>"sync"===e.content))>-1&&eU("COMPILER_V_BIND_SYNC",th,tf.loc,tf.rawName)&&(tf.name="model",tf.modifiers.splice(e,1))}}(7!==tf.type||"pre"!==tf.name)&&tu.props.push(tf)}tE="",t_=tm=-1},oncomment(e,t){th.comments&&tV({type:3,content:tA(e,t),loc:tk(e-4,t+3)})},onend(){let e=td.length;for(let t=0;t<tN.length;t++)tR(tN[t],e-1),tN[t].loc.start.offset},oncdata(e,t){0!==tN[0].ns&&tb(tA(e,t),e,t)},onprocessinginstruction(e){(tN[0]?tN[0].ns:th.ns)===0&&tU(21,e-1)}}),ty=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,tO=/^\(|\)$/g;function tA(e,t){return td.slice(e,t)}function tC(e){tI.inSFCRoot&&(tu.innerLoc=tk(e+1,e+1)),tV(tu);let{tag:t,ns:n}=tu;0===n&&th.isPreTag(t)&&tS++,th.isVoidTag(t)?tR(tu,e):(tN.unshift(tu),(1===n||2===n)&&(tI.inXML=!0)),tu=null}function tb(e,t,n){{let t=tN[0]&&tN[0].tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=th.decodeEntities(e,!1))}let i=tN[0]||tp,s=i.children[i.children.length-1];s&&2===s.type?(s.content+=e,tX(s.loc,n)):i.children.push({type:2,content:e,loc:tk(t,n)})}function tR(e,t,n=!1){n?tX(e.loc,tv(t,60)):tX(e.loc,function(e,t){let n=e;for(;62!==td.charCodeAt(n)&&n<td.length-1;)n++;return n}(t,0)+1),tI.inSFCRoot&&(e.children.length?e.innerLoc.end=a({},e.children[e.children.length-1].loc.end):e.innerLoc.end=a({},e.innerLoc.start),e.innerLoc.source=tA(e.innerLoc.start.offset,e.innerLoc.end.offset));let{tag:i,ns:s,children:r}=e;if(!tg&&("slot"===i?e.tagType=2:tL(e)?e.tagType=3:function({tag:e,props:t}){var n;if(th.isCustomElement(e))return!1;if("component"===e||(n=e.charCodeAt(0))>64&&n<91||eW(e)||th.isBuiltInComponent&&th.isBuiltInComponent(e)||th.isNativeTag&&!th.isNativeTag(e))return!0;for(let e=0;e<t.length;e++){let n=t[e];if(6===n.type){if("is"===n.name&&n.value&&(n.value.content.startsWith("vue:")||eU("COMPILER_IS_ON_ELEMENT",th,n.loc)))return!0}else if("bind"===n.name&&e9(n.arg,"is")&&eU("COMPILER_IS_ON_ELEMENT",th,n.loc))return!0}return!1}(e)&&(e.tagType=1)),tI.inRCDATA||(e.children=tD(r)),0===s&&th.isIgnoreNewlineTag(i)){let e=r[0];e&&2===e.type&&(e.content=e.content.replace(/^\r?\n/,""))}0===s&&th.isPreTag(i)&&tS--,tT===e&&(tg=tI.inVPre=!1,tT=null),tI.inXML&&(tN[0]?tN[0].ns:th.ns)===0&&(tI.inXML=!1);{let t=e.props;if(!tI.inSFCRoot&&ew("COMPILER_NATIVE_TEMPLATE",th)&&"template"===e.tag&&!tL(e)){let t=tN[0]||tp,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}let n=t.find(e=>6===e.type&&"inline-template"===e.name);n&&eU("COMPILER_INLINE_TEMPLATE",th,n.loc)&&e.children.length&&(n.value={type:2,content:tA(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function tv(e,t){let n=e;for(;td.charCodeAt(n)!==t&&n>=0;)n--;return n}let tx=new Set(["if","else","else-if","for","slot"]);function tL({tag:e,props:t}){if("template"===e){for(let e=0;e<t.length;e++)if(7===t[e].type&&tx.has(t[e].name))return!0}return!1}let tM=/\r\n/g;function tD(e,t){let n="preserve"!==th.whitespace,i=!1;for(let t=0;t<e.length;t++){let s=e[t];if(2===s.type){if(tS)s.content=s.content.replace(tM,"\n");else if(function(e){for(let t=0;t<e.length;t++)if(!eM(e.charCodeAt(t)))return!1;return!0}(s.content)){let r=e[t-1]&&e[t-1].type,o=e[t+1]&&e[t+1].type;!r||!o||n&&(3===r&&(3===o||1===o)||1===r&&(3===o||1===o&&function(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}(s.content)))?(i=!0,e[t]=null):s.content=" "}else n&&(s.content=tP(s.content))}}return i?e.filter(Boolean):e}function tP(e){let t="",n=!1;for(let i=0;i<e.length;i++)eM(e.charCodeAt(i))?n||(t+=" ",n=!0):(t+=e[i],n=!1);return t}function tV(e){(tN[0]||tp).children.push(e)}function tk(e,t){return{start:tI.getPos(e),end:null==t?t:tI.getPos(t),source:null==t?t:tA(e,t)}}function tX(e,t){e.end=tI.getPos(t),e.source=tA(e.start.offset,t)}function tw(e,t=!1,n,i=0,s=0){return eg(e,t,n,i)}function tU(e,t,n){th.onError(e$(e,tk(t,t)))}function tF(e,t){if(tI.reset(),tu=null,tf=null,tE="",t_=-1,tm=-1,tN.length=0,td=e,th=a({},tc),t){let e;for(e in t)null!=t[e]&&(th[e]=t[e])}tI.mode="html"===th.parseMode?1:"sfc"===th.parseMode?2:0,tI.inXML=1===th.ns||2===th.ns;let n=t&&t.delimiters;n&&(tI.delimiterOpen=eP(n[0]),tI.delimiterClose=eP(n[1]));let i=tp=ef([],e);return tI.parse(td),i.loc=tk(0,e.length),i.children=tD(i.children),tp=null,i}function tB(e,t){let{children:n}=e;return 1===n.length&&1===t.type&&!tn(t)}function t$(e,t){let{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;let i=n.get(e);if(void 0!==i)return i;let s=e.codegenNode;if(13!==s.type||s.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag&&"math"!==e.tag)return 0;if(void 0!==s.patchFlag)return n.set(e,0),0;{let i=3,r=tG(e,t);if(0===r)return n.set(e,0),0;r<i&&(i=r);for(let s=0;s<e.children.length;s++){let r=t$(e.children[s],t);if(0===r)return n.set(e,0),0;r<i&&(i=r)}if(i>1)for(let s=0;s<e.props.length;s++){let r=e.props[s];if(7===r.type&&"bind"===r.name&&r.exp){let s=t$(r.exp,t);if(0===s)return n.set(e,0),0;s<i&&(i=s)}}if(s.isBlock){for(let t=0;t<e.props.length;t++)if(7===e.props[t].type)return n.set(e,0),0;t.removeHelper(L),t.removeHelper(eb(t.inSSR,s.isComponent)),s.isBlock=!1,t.helper(eC(t.inSSR,s.isComponent))}return n.set(e,i),i}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return t$(e.content,t);case 4:return e.constType;case 8:let r=3;for(let n=0;n<e.children.length;n++){let i=e.children[n];if(c(i)||h(i))continue;let s=t$(i,t);if(0===s)return 0;s<r&&(r=s)}return r;case 20:return 2}}let tH=new Set([K,Y,Q,z]);function tG(e,t){let n=3,i=tq(e);if(i&&15===i.type){let{properties:e}=i;for(let i=0;i<e.length;i++){let s;let{key:r,value:o}=e[i],a=t$(r,t);if(0===a)return a;if(a<n&&(n=a),0===(s=4===o.type?t$(o,t):14===o.type?function e(t,n){if(14===t.type&&!c(t.callee)&&tH.has(t.callee)){let i=t.arguments[0];if(4===i.type)return t$(i,n);if(14===i.type)return e(i,n)}return 0}(o,t):0))return s;s<n&&(n=s)}}return n}function tq(e){let t=e.codegenNode;if(13===t.type)return t.props}function tJ(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:r=!1,hmr:o=!1,cacheHandlers:a=!1,nodeTransforms:l=[],directiveTransforms:h={},transformHoist:p=null,isBuiltInComponent:d=s,isCustomElement:u=s,expressionPlugins:f=[],scopeId:E=null,slotted:S=!0,ssr:g=!1,inSSR:T=!1,ssrCssVars:N="",bindingMetadata:I=i,inline:y=!1,isTS:O=!1,onError:A=eF,onWarn:C=eB,compatConfig:b}){let R=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),v={filename:t,selfName:R&&m(_(R[1])),prefixIdentifiers:n,hoistStatic:r,hmr:o,cacheHandlers:a,nodeTransforms:l,directiveTransforms:h,transformHoist:p,isBuiltInComponent:d,isCustomElement:u,expressionPlugins:f,scopeId:E,slotted:S,ssr:g,inSSR:T,ssrCssVars:N,bindingMetadata:I,inline:y,isTS:O,onError:A,onWarn:C,compatConfig:b,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){let t=v.helpers.get(e)||0;return v.helpers.set(e,t+1),e},removeHelper(e){let t=v.helpers.get(e);if(t){let n=t-1;n?v.helpers.set(e,n):v.helpers.delete(e)}},helperString:e=>`_${ep[v.helper(e)]}`,replaceNode(e){v.parent.children[v.childIndex]=v.currentNode=e},removeNode(e){let t=v.parent.children,n=e?t.indexOf(e):v.currentNode?v.childIndex:-1;e&&e!==v.currentNode?v.childIndex>n&&(v.childIndex--,v.onNodeRemoved()):(v.currentNode=null,v.onNodeRemoved()),v.parent.children.splice(n,1)},onNodeRemoved:s,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){c(e)&&(e=eg(e)),v.hoists.push(e);let t=eg(`_hoisted_${v.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1,n=!1){let i=eO(v.cached.length,e,t,n);return v.cached.push(i),i}};return v.filters=new Set,v}function tj(e,t){let n=tJ(e,t);tW(e,n),t.hoistStatic&&!function e(t,n,i,s=!1,r=!1){let{children:o}=t,a=[];for(let n=0;n<o.length;n++){let l=o[n];if(1===l.type&&0===l.tagType){let e=s?0:t$(l,i);if(e>0){if(e>=2){l.codegenNode.patchFlag=-1,a.push(l);continue}}else{let e=l.codegenNode;if(13===e.type){let t=e.patchFlag;if((void 0===t||512===t||1===t)&&tG(l,i)>=2){let t=tq(l);t&&(e.props=i.hoist(t))}e.dynamicProps&&(e.dynamicProps=i.hoist(e.dynamicProps))}}}else if(12===l.type&&(s?0:t$(l,i))>=2){a.push(l);continue}if(1===l.type){let n=1===l.tagType;n&&i.scopes.vSlot++,e(l,t,i,!1,r),n&&i.scopes.vSlot--}else if(11===l.type)e(l,t,i,1===l.children.length,!0);else if(9===l.type)for(let n=0;n<l.branches.length;n++)e(l.branches[n],t,i,1===l.branches[n].children.length,r)}let c=!1;if(a.length===o.length&&1===t.type){if(0===t.tagType&&t.codegenNode&&13===t.codegenNode.type&&l(t.codegenNode.children))t.codegenNode.children=h(e_(t.codegenNode.children)),c=!0;else if(1===t.tagType&&t.codegenNode&&13===t.codegenNode.type&&t.codegenNode.children&&!l(t.codegenNode.children)&&15===t.codegenNode.children.type){let e=p(t.codegenNode,"default");e&&(e.returns=h(e_(e.returns)),c=!0)}else if(3===t.tagType&&n&&1===n.type&&1===n.tagType&&n.codegenNode&&13===n.codegenNode.type&&n.codegenNode.children&&!l(n.codegenNode.children)&&15===n.codegenNode.children.type){let e=e6(t,"slot",!0),i=e&&e.arg&&p(n.codegenNode,e.arg);i&&(i.returns=h(e_(i.returns)),c=!0)}}if(!c)for(let e of a)e.codegenNode=i.cache(e.codegenNode);function h(e){let t=i.cache(e);return r&&i.hmr&&(t.needArraySpread=!0),t}function p(e,t){if(e.children&&!l(e.children)&&15===e.children.type){let n=e.children.properties.find(e=>e.key===t||e.key.content===t);return n&&n.value}}a.length&&i.transformHoist&&i.transformHoist(o,i,t)}(e,void 0,n,tB(e,e.children[0])),t.ssr||function(e,t){let{helper:n}=t,{children:i}=e;if(1===i.length){let n=i[0];if(tB(e,n)&&n.codegenNode){let i=n.codegenNode;13===i.type&&eR(i,t),e.codegenNode=i}else e.codegenNode=n}else i.length>1&&(e.codegenNode=eE(t,n(C),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function tW(e,t){t.currentNode=e;let{nodeTransforms:n}=t,i=[];for(let s=0;s<n.length;s++){let r=n[s](e,t);if(r&&(l(r)?i.push(...r):i.push(r)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(k);break;case 5:t.ssr||t.helper(j);break;case 9:for(let n=0;n<e.branches.length;n++)tW(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0,i=()=>{n--};for(;n<e.children.length;n++){let s=e.children[n];c(s)||(t.grandParent=t.parent,t.parent=e,t.childIndex=n,t.onNodeRemoved=i,tW(s,t))}}(e,t)}t.currentNode=e;let s=i.length;for(;s--;)i[s]()}function tK(e,t){let n=c(e)?t=>t===e:t=>e.test(t);return(e,i)=>{if(1===e.type){let{props:s}=e;if(3===e.tagType&&s.some(te))return;let r=[];for(let o=0;o<s.length;o++){let a=s[o];if(7===a.type&&n(a.name)){s.splice(o,1),o--;let n=t(e,a,i);n&&r.push(n)}}return r}}}let tY="/*@__PURE__*/",tQ=e=>`${ep[e]}: _${ep[e]}`;function tz(e,t={}){let n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:i=!1,filename:s="template.vue.html",scopeId:r=null,optimizeImports:o=!1,runtimeGlobalName:a="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:h=!1,isTS:p=!1,inSSR:d=!1}){let u={mode:t,prefixIdentifiers:n,sourceMap:i,filename:s,scopeId:r,optimizeImports:o,runtimeGlobalName:a,runtimeModuleName:l,ssrRuntimeModuleName:c,ssr:h,isTS:p,inSSR:d,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${ep[e]}`,push(e,t=-2,n){u.code+=e},indent(){f(++u.indentLevel)},deindent(e=!1){e?--u.indentLevel:f(--u.indentLevel)},newline(){f(u.indentLevel)}};function f(e){u.push("\n"+" ".repeat(e),0)}return u}(e,t);t.onContextCreated&&t.onContextCreated(n);let{mode:i,push:s,prefixIdentifiers:r,indent:o,deindent:a,newline:l,scopeId:c,ssr:h}=n,p=Array.from(e.helpers),d=p.length>0,u=!r&&"module"!==i;!function(e,t){let{ssr:n,prefixIdentifiers:i,push:s,newline:r,runtimeModuleName:o,runtimeGlobalName:a,ssrRuntimeModuleName:l}=t,c=Array.from(e.helpers);if(c.length>0&&(s(`const _Vue = ${a} -`,-1),e.hoists.length)){let e=[P,V,k,X,w].filter(e=>c.includes(e)).map(tQ).join(", ");s(`const { ${e} } = _Vue -`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;let{push:n,newline:i}=t;i();for(let s=0;s<e.length;s++){let r=e[s];r&&(n(`const _hoisted_${s+1} = `),t2(r,t),i())}t.pure=!1})(e.hoists,t),r(),s("return ")}(e,n);let f=(h?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(s(`function ${h?"ssrRender":"render"}(${f}) {`),o(),u&&(s("with (_ctx) {"),o(),d&&(s(`const { ${p.map(tQ).join(", ")} } = _Vue -`,-1),l())),e.components.length&&(tZ(e.components,"component",n),(e.directives.length||e.temps>0)&&l()),e.directives.length&&(tZ(e.directives,"directive",n),e.temps>0&&l()),e.filters&&e.filters.length&&(l(),tZ(e.filters,"filter",n),l()),e.temps>0){s("let ");for(let t=0;t<e.temps;t++)s(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(s(` -`,0),l()),h||s("return "),e.codegenNode?t2(e.codegenNode,n):s("null"),u&&(a(),s("}")),a(),s("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function tZ(e,t,{helper:n,push:i,newline:s,isTS:r}){let o=n("filter"===t?$:"component"===t?U:B);for(let n=0;n<e.length;n++){let a=e[n],l=a.endsWith("__self");l&&(a=a.slice(0,-6)),i(`const ${to(a,t)} = ${o}(${JSON.stringify(a)}${l?", true":""})${r?"!":""}`),n<e.length-1&&s()}}function t1(e,t){let n=e.length>3;t.push("["),n&&t.indent(),t0(e,t,n),n&&t.deindent(),t.push("]")}function t0(e,t,n=!1,i=!0){let{push:s,newline:r}=t;for(let o=0;o<e.length;o++){let a=e[o];c(a)?s(a,-3):l(a)?t1(a,t):t2(a,t),o<e.length-1&&(n?(i&&s(","),r()):i&&s(", "))}}function t2(e,t){if(c(e)){t.push(e,-3);return}if(h(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:case 12:t2(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:t3(e,t);break;case 5:!function(e,t){let{push:n,helper:i,pure:s}=t;s&&n(tY),n(`${i(j)}(`),t2(e.content,t),n(")")}(e,t);break;case 8:t4(e,t);break;case 3:!function(e,t){let{push:n,helper:i,pure:s}=t;s&&n(tY),n(`${i(k)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){let n;let{push:i,helper:s,pure:r}=t,{tag:o,props:a,children:l,patchFlag:c,dynamicProps:h,directives:p,isBlock:d,disableTracking:u,isComponent:f}=e;c&&(n=String(c)),p&&i(s(H)+"("),d&&i(`(${s(L)}(${u?"true":""}), `),r&&i(tY),i(s(d?eb(t.inSSR,f):eC(t.inSSR,f))+"(",-2,e),t0(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map(e=>e||"null")}([o,a,l,n,h]),t),i(")"),d&&i(")"),p&&(i(", "),t2(p,t),i(")"))}(e,t);break;case 14:!function(e,t){let{push:n,helper:i,pure:s}=t,r=c(e.callee)?e.callee:i(e.callee);s&&n(tY),n(r+"(",-2,e),t0(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){let{push:n,indent:i,deindent:s,newline:r}=t,{properties:o}=e;if(!o.length){n("{}",-2,e);return}let a=o.length>1;n(a?"{":"{ "),a&&i();for(let e=0;e<o.length;e++){let{key:i,value:s}=o[e];!function(e,t){let{push:n}=t;8===e.type?(n("["),t4(e,t),n("]")):e.isStatic?n(eY(e.content)?e.content:JSON.stringify(e.content),-2,e):n(`[${e.content}]`,-3,e)}(i,t),n(": "),t2(s,t),e<o.length-1&&(n(","),r())}a&&s(),n(a?"}":" }")}(e,t);break;case 17:t1(e.elements,t);break;case 18:!function(e,t){let{push:n,indent:i,deindent:s}=t,{params:r,returns:o,body:a,newline:c,isSlot:h}=e;h&&n(`_${ep[eo]}(`),n("(",-2,e),l(r)?t0(r,t):r&&t2(r,t),n(") => "),(c||a)&&(n("{"),i()),o?(c&&n("return "),l(o)?t1(o,t):t2(o,t)):a&&t2(a,t),(c||a)&&(s(),n("}")),h&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){let{test:n,consequent:i,alternate:s,newline:r}=e,{push:o,indent:a,deindent:l,newline:c}=t;if(4===n.type){let e=!eY(n.content);e&&o("("),t3(n,t),e&&o(")")}else o("("),t2(n,t),o(")");r&&a(),t.indentLevel++,r||o(" "),o("? "),t2(i,t),t.indentLevel--,r&&c(),r||o(" "),o(": ");let h=19===s.type;!h&&t.indentLevel++,t2(s,t),!h&&t.indentLevel--,r&&l(!0)}(e,t);break;case 20:!function(e,t){let{push:n,helper:i,indent:s,deindent:r,newline:o}=t,{needPauseTracking:a,needArraySpread:l}=e;l&&n("[...("),n(`_cache[${e.index}] || (`),a&&(s(),n(`${i(ei)}(-1`),e.inVOnce&&n(", true"),n("),"),o(),n("(")),n(`_cache[${e.index}] = `),t2(e.value,t),a&&(n(`).cacheIndex = ${e.index},`),o(),n(`${i(ei)}(1),`),o(),n(`_cache[${e.index}]`),r()),n(")"),l&&n(")]")}(e,t);break;case 21:t0(e.body,t,!0,!1)}}function t3(e,t){let{content:n,isStatic:i}=e;t.push(i?JSON.stringify(n):n,-3,e)}function t4(e,t){for(let n=0;n<e.children.length;n++){let i=e.children[n];c(i)?t.push(i,-3):t2(i,t)}}function t6(e,t,n=!1,i=!1,s=Object.create(t.identifiers)){return e}let t5=tK(/^(if|else|else-if)$/,(e,t,n)=>t9(e,t,n,(e,t,i)=>{let s=n.parent.children,r=s.indexOf(e),o=0;for(;r-- >=0;){let e=s[r];e&&9===e.type&&(o+=e.branches.length)}return()=>{i?e.codegenNode=t8(t,o,n):function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode).alternate=t8(t,o+e.branches.length-1,n)}}));function t9(e,t,n,i){if("else"!==t.name&&(!t.exp||!t.exp.content.trim())){let i=t.exp?t.exp.loc:e.loc;n.onError(e$(28,t.loc)),t.exp=eg("true",!1,i)}if("if"===t.name){var s;let r=t7(e,t),o={type:9,loc:tk((s=e.loc).start.offset,s.end.offset),branches:[r]};if(n.replaceNode(o),i)return i(o,r,!0)}else{let s=n.parent.children,r=s.indexOf(e);for(;r-- >=-1;){let o=s[r];if(o&&3===o.type||o&&2===o.type&&!o.content.trim().length){n.removeNode(o);continue}if(o&&9===o.type){"else-if"===t.name&&void 0===o.branches[o.branches.length-1].condition&&n.onError(e$(30,e.loc)),n.removeNode();let s=t7(e,t);o.branches.push(s);let r=i&&i(o,s,!1);tW(s,n),r&&r(),n.currentNode=null}else n.onError(e$(30,e.loc));break}}}function t7(e,t){let n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!e6(e,"for")?e.children:[e],userKey:e5(e,"key"),isTemplateIf:n}}function t8(e,t,n){return e.condition?ey(e.condition,ne(e,t,n),eN(n.helper(k),['""',"true"])):ne(e,t,n)}function ne(e,t,n){let{helper:i}=n,s=eS("key",eg(`${t}`,!1,eu,2)),{children:r}=e,o=r[0];if(1!==r.length||1!==o.type){if(1!==r.length||11!==o.type)return eE(n,i(C),em([s]),r,64,void 0,void 0,!0,!1,!1,e.loc);{let e=o.codegenNode;return ts(e,s,n),e}}{let e=o.codegenNode,t=ta(e);return 13===t.type&&eR(t,n),ts(t,s,n),e}}let nt=(e,t,n)=>{let{modifiers:i,loc:s}=e,r=e.arg,{exp:o}=e;if(o&&4===o.type&&!o.content.trim()&&(o=void 0),!o){if(4!==r.type||!r.isStatic)return n.onError(e$(52,r.loc)),{props:[eS(r,eg("",!0,s))]};nn(e),o=e.exp}return 4!==r.type?(r.children.unshift("("),r.children.push(') || ""')):r.isStatic||(r.content=`${r.content} || ""`),i.some(e=>"camel"===e.content)&&(4===r.type?r.isStatic?r.content=_(r.content):r.content=`${n.helperString(ee)}(${r.content})`:(r.children.unshift(`${n.helperString(ee)}(`),r.children.push(")"))),!n.inSSR&&(i.some(e=>"prop"===e.content)&&ni(r,"."),i.some(e=>"attr"===e.content)&&ni(r,"^")),{props:[eS(r,o)]}},nn=(e,t)=>{let n=e.arg,i=_(n.content);e.exp=eg(i,!1,n.loc)},ni=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},ns=tK("for",(e,t,n)=>{let{helper:i,removeHelper:s}=n;return nr(e,t,n,t=>{let r=eN(i(G),[t.source]),o=tt(e),a=e6(e,"memo"),l=e5(e,"key",!1,!0);l&&7===l.type&&!l.exp&&nn(l);let c=l&&(6===l.type?l.value?eg(l.value.content,!0):void 0:l.exp),h=l&&c?eS("key",c):null,p=4===t.source.type&&t.source.constType>0,d=p?64:l?128:256;return t.codegenNode=eE(n,i(C),void 0,r,d,void 0,void 0,!0,!p,!1,e.loc),()=>{let l;let{children:d}=t,u=1!==d.length||1!==d[0].type,f=tn(e)?e:o&&1===e.children.length&&tn(e.children[0])?e.children[0]:null;if(f?(l=f.codegenNode,o&&h&&ts(l,h,n)):u?l=eE(n,i(C),h?em([h]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(l=d[0].codegenNode,o&&h&&ts(l,h,n),!p!==l.isBlock&&(l.isBlock?(s(L),s(eb(n.inSSR,l.isComponent))):s(eC(n.inSSR,l.isComponent))),l.isBlock=!p,l.isBlock?(i(L),i(eb(n.inSSR,l.isComponent))):i(eC(n.inSSR,l.isComponent))),a){let e=eI(na(t.parseResult,[eg("_cached")]));e.body=eA([eT(["const _memo = (",a.exp,")"]),eT(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(eh)}(_cached, _memo)) return _cached`]),eT(["const _item = ",l]),eg("_item.memo = _memo"),eg("return _item")]),r.arguments.push(e,eg("_cache"),eg(String(n.cached.length))),n.cached.push(null)}else r.arguments.push(eI(na(t.parseResult),l,!0))}})});function nr(e,t,n,i){if(!t.exp){n.onError(e$(31,t.loc));return}let s=t.forParseResult;if(!s){n.onError(e$(32,t.loc));return}no(s);let{addIdentifiers:r,removeIdentifiers:o,scopes:a}=n,{source:l,value:c,key:h,index:p}=s,d={type:11,loc:t.loc,source:l,valueAlias:c,keyAlias:h,objectIndexAlias:p,parseResult:s,children:tt(e)?e.children:[e]};n.replaceNode(d),a.vFor++;let u=i&&i(d);return()=>{a.vFor--,u&&u()}}function no(e,t){e.finalized||(e.finalized=!0)}function na({value:e,key:t,index:n},i=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||eg("_".repeat(t+1),!1))}([e,t,n,...i])}let nl=eg("undefined",!1),nc=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){let n=e6(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},nh=(e,t,n,i)=>eI(e,n,!1,!0,n.length?n[0].loc:i);function np(e,t,n=nh){t.helper(eo);let{children:i,loc:s}=e,r=[],o=[],a=t.scopes.vSlot>0||t.scopes.vFor>0,l=e6(e,"slot",!0);if(l){let{arg:e,exp:t}=l;e&&!ej(e)&&(a=!0),r.push(eS(e||eg("default",!0),n(t,void 0,i,s)))}let c=!1,h=!1,p=[],d=new Set,u=0;for(let e=0;e<i.length;e++){let s,f,E,_;let m=i[e];if(!tt(m)||!(s=e6(m,"slot",!0))){3!==m.type&&p.push(m);continue}if(l){t.onError(e$(37,s.loc));break}c=!0;let{children:S,loc:g}=m,{arg:T=eg("default",!0),exp:N,loc:I}=s;ej(T)?f=T?T.content:"default":a=!0;let y=e6(m,"for"),O=n(N,y,S,g);if(E=e6(m,"if"))a=!0,o.push(ey(E.exp,nd(T,O,u++),nl));else if(_=e6(m,/^else(-if)?$/,!0)){let n,s=e;for(;s--&&3===(n=i[s]).type;);if(n&&tt(n)&&e6(n,/^(else-)?if$/)){let e=o[o.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=_.exp?ey(_.exp,nd(T,O,u++),nl):nd(T,O,u++)}else t.onError(e$(30,_.loc))}else if(y){a=!0;let e=y.forParseResult;e?(no(e),o.push(eN(t.helper(G),[e.source,eI(na(e),nd(T,O),!0)]))):t.onError(e$(32,y.loc))}else{if(f){if(d.has(f)){t.onError(e$(38,I));continue}d.add(f),"default"===f&&(h=!0)}r.push(eS(T,O))}}if(!l){let e=(e,i)=>{let r=n(e,void 0,i,s);return t.compatConfig&&(r.isNonScopedSlot=!0),eS("default",r)};c?p.length&&p.some(e=>(function e(t){return 2!==t.type&&12!==t.type||(2===t.type?!!t.content.trim():e(t.content))})(e))&&(h?t.onError(e$(39,p[0].loc)):r.push(e(void 0,p))):r.push(e(void 0,i))}let f=a?2:!function e(t){for(let n=0;n<t.length;n++){let i=t[n];switch(i.type){case 1:if(2===i.tagType||e(i.children))return!0;break;case 9:if(e(i.branches))return!0;break;case 10:case 11:if(e(i.children))return!0}}return!1}(e.children)?1:3,E=em(r.concat(eS("_",eg(f+"",!1))),s);return o.length&&(E=eN(t.helper(J),[E,e_(o)])),{slots:E,hasDynamicSlots:a}}function nd(e,t,n){let i=[eS("name",e),eS("fn",t)];return null!=n&&i.push(eS("key",eg(String(n),!0))),em(i)}let nu=new WeakMap,nf=(e,t)=>function(){let n,i,s,r,o;if(!(1===(e=t.currentNode).type&&(0===e.tagType||1===e.tagType)))return;let{tag:a,props:l}=e,c=1===e.tagType,h=c?nE(e,t):`"${a}"`,d=p(h)&&h.callee===F,u=0,f=d||h===b||h===R||!c&&("svg"===a||"foreignObject"===a||"math"===a);if(l.length>0){let i=n_(e,t,void 0,c,d);n=i.props,u=i.patchFlag,r=i.dynamicPropNames;let s=i.directives;o=s&&s.length?e_(s.map(e=>nS(e,t))):void 0,i.shouldUseBlock&&(f=!0)}if(e.children.length>0){if(h===v&&(f=!0,u|=1024),c&&h!==b&&h!==v){let{slots:n,hasDynamicSlots:s}=np(e,t);i=n,s&&(u|=1024)}else if(1===e.children.length&&h!==b){let n=e.children[0],s=n.type,r=5===s||8===s;r&&0===t$(n,t)&&(u|=1),i=r||2===s?n:e.children}else i=e.children}r&&r.length&&(s=function(e){let t="[";for(let n=0,i=e.length;n<i;n++)t+=JSON.stringify(e[n]),n<i-1&&(t+=", ");return t+"]"}(r)),e.codegenNode=eE(t,h,n,i,0===u?void 0:u,s,o,!!f,!1,c,e.loc)};function nE(e,t,n=!1){let{tag:i}=e,s=ng(i),r=e5(e,"is",!1,!0);if(r){if(s||ew("COMPILER_IS_ON_ELEMENT",t)){let e;if(6===r.type?e=r.value&&eg(r.value.content,!0):(e=r.exp)||(e=eg("is",!1,r.arg.loc)),e)return eN(t.helper(F),[e])}else 6===r.type&&r.value.content.startsWith("vue:")&&(i=r.value.content.slice(4))}let o=eW(i)||t.isBuiltInComponent(i);return o?(n||t.helper(o),o):(t.helper(U),t.components.add(i),to(i,"component"))}function n_(e,t,n=e.props,i,s,r=!1){let a;let{tag:l,loc:c,children:p}=e,f=[],E=[],_=[],m=p.length>0,S=!1,g=0,T=!1,N=!1,I=!1,y=!1,O=!1,A=!1,C=[],b=e=>{f.length&&(E.push(em(nm(f),c)),f=[]),e&&E.push(e)},R=()=>{t.scopes.vFor>0&&f.push(eS(eg("ref_for",!0),eg("true")))},v=({key:e,value:n})=>{if(ej(e)){let r=e.content,a=o(r);a&&(!i||s)&&"onclick"!==r.toLowerCase()&&"onUpdate:modelValue"!==r&&!d(r)&&(y=!0),a&&d(r)&&(A=!0),a&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&t$(n,t)>0||("ref"===r?T=!0:"class"===r?N=!0:"style"===r?I=!0:"key"===r||C.includes(r)||C.push(r),i&&("class"===r||"style"===r)&&!C.includes(r)&&C.push(r))}else O=!0};for(let s=0;s<n.length;s++){let o=n[s];if(6===o.type){let{loc:e,name:n,nameLoc:i,value:s}=o;if("ref"===n&&(T=!0,R()),"is"===n&&(ng(l)||s&&s.content.startsWith("vue:")||ew("COMPILER_IS_ON_ELEMENT",t)))continue;f.push(eS(eg(n,!0,i),eg(s?s.content:"",!0,s?s.loc:e)))}else{let{name:n,arg:s,exp:a,loc:p,modifiers:d}=o,T="bind"===n,N="on"===n;if("slot"===n){i||t.onError(e$(40,p));continue}if("once"===n||"memo"===n||"is"===n||T&&e9(s,"is")&&(ng(l)||ew("COMPILER_IS_ON_ELEMENT",t))||N&&r)continue;if((T&&e9(s,"key")||N&&m&&e9(s,"vue:before-update"))&&(S=!0),T&&e9(s,"ref")&&R(),!s&&(T||N)){if(O=!0,a){if(T){if(R(),b(),ew("COMPILER_V_BIND_OBJECT_ORDER",t)){E.unshift(a);continue}E.push(a)}else b({type:14,loc:p,callee:t.helper(Z),arguments:i?[a]:[a,"true"]})}else t.onError(e$(T?34:35,p));continue}T&&d.some(e=>"prop"===e.content)&&(g|=32);let I=t.directiveTransforms[n];if(I){let{props:n,needRuntime:i}=I(o,e,t);r||n.forEach(v),N&&s&&!ej(s)?b(em(n,c)):f.push(...n),i&&(_.push(o),h(i)&&nu.set(o,i))}else!u(n)&&(_.push(o),m&&(S=!0))}}if(E.length?(b(),a=E.length>1?eN(t.helper(W),E,c):E[0]):f.length&&(a=em(nm(f),c)),O?g|=16:(N&&!i&&(g|=2),I&&!i&&(g|=4),C.length&&(g|=8),y&&(g|=32)),!S&&(0===g||32===g)&&(T||A||_.length>0)&&(g|=512),!t.inSSR&&a)switch(a.type){case 15:let x=-1,L=-1,M=!1;for(let e=0;e<a.properties.length;e++){let t=a.properties[e].key;ej(t)?"class"===t.content?x=e:"style"===t.content&&(L=e):t.isHandlerKey||(M=!0)}let D=a.properties[x],P=a.properties[L];M?a=eN(t.helper(Q),[a]):(D&&!ej(D.value)&&(D.value=eN(t.helper(K),[D.value])),P&&(I||4===P.value.type&&"["===P.value.content.trim()[0]||17===P.value.type)&&(P.value=eN(t.helper(Y),[P.value])));break;case 14:break;default:a=eN(t.helper(Q),[eN(t.helper(z),[a])])}return{props:a,directives:_,patchFlag:g,dynamicPropNames:C,shouldUseBlock:S}}function nm(e){let t=new Map,n=[];for(let i=0;i<e.length;i++){let s=e[i];if(8===s.key.type||!s.key.isStatic){n.push(s);continue}let r=s.key.content,a=t.get(r);a?("style"===r||"class"===r||o(r))&&(17===a.value.type?a.value.elements.push(s.value):a.value=e_([a.value,s.value],a.loc)):(t.set(r,s),n.push(s))}return n}function nS(e,t){let n=[],i=nu.get(e);i?n.push(t.helperString(i)):(t.helper(B),t.directives.add(e.name),n.push(to(e.name,"directive")));let{loc:s}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));let t=eg("true",!1,s);n.push(em(e.modifiers.map(e=>eS(e,t)),s))}return e_(n,e.loc)}function ng(e){return"component"===e||"Component"===e}let nT=(e,t)=>{if(tn(e)){let{children:n,loc:i}=e,{slotName:s,slotProps:r}=nN(e,t),o=[t.prefixIdentifiers?"_ctx.$slots":"$slots",s,"{}","undefined","true"],a=2;r&&(o[2]=r,a=3),n.length&&(o[3]=eI([],n,!1,!1,i),a=4),t.scopeId&&!t.slotted&&(a=5),o.splice(a),e.codegenNode=eN(t.helper(q),o,i)}};function nN(e,t){let n,i='"default"',s=[];for(let t=0;t<e.props.length;t++){let n=e.props[t];if(6===n.type)n.value&&("name"===n.name?i=JSON.stringify(n.value.content):(n.name=_(n.name),s.push(n)));else if("bind"===n.name&&e9(n.arg,"name")){if(n.exp)i=n.exp;else if(n.arg&&4===n.arg.type){let e=_(n.arg.content);i=n.exp=eg(e,!1,n.arg.loc)}}else"bind"===n.name&&n.arg&&ej(n.arg)&&(n.arg.content=_(n.arg.content)),s.push(n)}if(s.length>0){let{props:i,directives:r}=n_(e,t,s,!1,!1);n=i,r.length&&t.onError(e$(36,r[0].loc))}return{slotName:i,slotProps:n}}let nI=(e,t,n,i)=>{let s;let{loc:r,modifiers:o,arg:a}=e;if(e.exp||o.length,4===a.type){if(a.isStatic){let e=a.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),s=eg(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?S(_(e)):`on:${e}`,!0,a.loc)}else s=eT([`${n.helperString(en)}(`,a,")"])}else(s=a).children.unshift(`${n.helperString(en)}(`),s.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let c=n.cacheHandlers&&!l&&!n.inVOnce;if(l){let e=e0(l),t=!(e||e3(l)),n=l.content.includes(";");(t||c&&e)&&(l=eT([`${t?"$event":"(...args)"} => ${n?"{":"("}`,l,n?"}":")"]))}let h={props:[eS(s,l||eg("() => {}",!1,r))]};return i&&(h=i(h)),c&&(h.props[0].value=n.cache(h.props[0].value)),h.props.forEach(e=>e.key.isHandlerKey=!0),h},ny=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{let n;let i=e.children,s=!1;for(let e=0;e<i.length;e++){let t=i[e];if(e8(t)){s=!0;for(let s=e+1;s<i.length;s++){let r=i[s];if(e8(r))n||(n=i[e]=eT([t],t.loc)),n.children.push(" + ",r),i.splice(s,1),s--;else{n=void 0;break}}}}if(s&&(1!==i.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find(e=>7===e.type&&!t.directiveTransforms[e.name])||"template"===e.tag)))for(let e=0;e<i.length;e++){let n=i[e];if(e8(n)||8===n.type){let s=[];(2!==n.type||" "!==n.content)&&s.push(n),t.ssr||0!==t$(n,t)||s.push("1"),i[e]={type:12,content:n,loc:n.loc,codegenNode:eN(t.helper(X),s)}}}}},nO=new WeakSet,nA=(e,t)=>{if(1===e.type&&e6(e,"once",!0)&&!nO.has(e)&&!t.inVOnce&&!t.inSSR)return nO.add(e),t.inVOnce=!0,t.helper(ei),()=>{t.inVOnce=!1;let e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0,!0))}},nC=(e,t,n)=>{let i;let{exp:s,arg:r}=e;if(!s)return n.onError(e$(41,e.loc)),nb();let o=s.loc.source.trim(),a=4===s.type?s.content:o,l=n.bindingMetadata[o];if("props"===l||"props-aliased"===l)return s.loc,nb();if(!a.trim()||!e0(s))return n.onError(e$(42,s.loc)),nb();let c=r||eg("modelValue",!0),h=r?ej(r)?`onUpdate:${_(r.content)}`:eT(['"onUpdate:" + ',r]):"onUpdate:modelValue",p=n.isTS?"($event: any)":"$event";i=eT([`${p} => ((`,s,") = $event)"]);let d=[eS(c,e.exp),eS(h,i)];if(e.modifiers.length&&1===t.tagType){let t=e.modifiers.map(e=>e.content).map(e=>(eY(e)?e:JSON.stringify(e))+": true").join(", "),n=r?ej(r)?`${r.content}Modifiers`:eT([r,' + "Modifiers"']):"modelModifiers";d.push(eS(n,eg(`{ ${t} }`,!1,e.loc,2)))}return nb(d)};function nb(e=[]){return{props:e}}let nR=/[\w).+\-_$\]]/,nv=(e,t)=>{ew("COMPILER_FILTERS",t)&&(5===e.type?nx(e.content,t):1===e.type&&e.props.forEach(e=>{7===e.type&&"for"!==e.name&&e.exp&&nx(e.exp,t)}))};function nx(e,t){if(4===e.type)nL(e,t);else for(let n=0;n<e.children.length;n++){let i=e.children[n];"object"==typeof i&&(4===i.type?nL(i,t):8===i.type?nx(e,t):5===i.type&&nx(i.content,t))}}function nL(e,t){let n=e.content,i=!1,s=!1,r=!1,o=!1,a=0,l=0,c=0,h=0,p,d,u,f,E=[];for(u=0;u<n.length;u++)if(d=p,p=n.charCodeAt(u),i)39===p&&92!==d&&(i=!1);else if(s)34===p&&92!==d&&(s=!1);else if(r)96===p&&92!==d&&(r=!1);else if(o)47===p&&92!==d&&(o=!1);else if(124!==p||124===n.charCodeAt(u+1)||124===n.charCodeAt(u-1)||a||l||c){switch(p){case 34:s=!0;break;case 39:i=!0;break;case 96:r=!0;break;case 40:c++;break;case 41:c--;break;case 91:l++;break;case 93:l--;break;case 123:a++;break;case 125:a--}if(47===p){let e,t=u-1;for(;t>=0&&" "===(e=n.charAt(t));t--);e&&nR.test(e)||(o=!0)}}else void 0===f?(h=u+1,f=n.slice(0,u).trim()):_();function _(){E.push(n.slice(h,u).trim()),h=u+1}if(void 0===f?f=n.slice(0,u).trim():0!==h&&_(),E.length){for(u=0;u<E.length;u++)f=function(e,t,n){n.helper($);let i=t.indexOf("(");if(i<0)return n.filters.add(t),`${to(t,"filter")}(${e})`;{let s=t.slice(0,i),r=t.slice(i+1);return n.filters.add(s),`${to(s,"filter")}(${e}${")"!==r?","+r:r}`}}(f,E[u],t);e.content=f,e.ast=void 0}}let nM=new WeakSet,nD=(e,t)=>{if(1===e.type){let n=e6(e,"memo");if(!(!n||nM.has(e)))return nM.add(e),()=>{let i=e.codegenNode||t.currentNode.codegenNode;i&&13===i.type&&(1!==e.tagType&&eR(i,t),e.codegenNode=eN(t.helper(ec),[n.exp,eI(void 0,i),"_cache",String(t.cached.length)]),t.cached.push(null))}}};function nP(e){return[[nA,t5,nD,ns,nv,nT,nf,nc,ny],{on:nI,bind:nt,model:nC}]}function nV(e,t={}){let n=t.onError||eF,i="module"===t.mode;!0===t.prefixIdentifiers?n(e$(47)):i&&n(e$(48)),t.cacheHandlers&&n(e$(49)),t.scopeId&&!i&&n(e$(50));let s=a({},t,{prefixIdentifiers:!1}),r=c(e)?tF(e,s):e,[o,l]=nP();return tj(r,a({},s,{nodeTransforms:[...o,...t.nodeTransforms||[]],directiveTransforms:a({},l,t.directiveTransforms||{})})),tz(r,s)}let nk=()=>({props:[]}),nX=Symbol(""),nw=Symbol(""),nU=Symbol(""),nF=Symbol(""),nB=Symbol(""),n$=Symbol(""),nH=Symbol(""),nG=Symbol(""),nq=Symbol(""),nJ=Symbol("");ed({[nX]:"vModelRadio",[nw]:"vModelCheckbox",[nU]:"vModelText",[nF]:"vModelSelect",[nB]:"vModelDynamic",[n$]:"withModifiers",[nH]:"withKeys",[nG]:"vShow",[nq]:"Transition",[nJ]:"TransitionGroup"});let nj={parseMode:"html",isVoidTag:A,isNativeTag:e=>I(e)||y(e)||O(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(e,n=!1){return(t||(t=document.createElement("div")),n)?(t.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,t.children[0].getAttribute("foo")):(t.innerHTML=e,t.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?nq:"TransitionGroup"===e||"transition-group"===e?nJ:void 0,getNamespace(e,t,n){let i=t?t.ns:n;if(t&&2===i){if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some(e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content))&&(i=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(i=0)}else t&&1===i&&("foreignObject"===t.tag||"desc"===t.tag||"title"===t.tag)&&(i=0);if(0===i){if("svg"===e)return 1;if("math"===e)return 2}return i}},nW=e=>{1===e.type&&e.props.forEach((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:eg("style",!0,t.loc),exp:nK(t.value.content,t.loc),modifiers:[],loc:t.loc})})},nK=(e,t)=>eg(JSON.stringify(function(e){let t={};return e.replace(N,"").split(g).forEach(e=>{if(e){let n=e.split(T);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}(e)),!1,t,3),nY=n("passive,once,capture"),nQ=n("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),nz=n("left,right"),nZ=n("onkeyup,onkeydown,onkeypress"),n1=(e,t,n,i)=>{let s=[],r=[],o=[];for(let i=0;i<t.length;i++){let a=t[i].content;"native"===a&&eU("COMPILER_V_ON_NATIVE",n)?o.push(a):nY(a)?o.push(a):nz(a)?ej(e)?nZ(e.content.toLowerCase())?s.push(a):r.push(a):(s.push(a),r.push(a)):nQ(a)?r.push(a):s.push(a)}return{keyModifiers:s,nonKeyModifiers:r,eventOptionModifiers:o}},n0=(e,t)=>ej(e)&&"onclick"===e.content.toLowerCase()?eg(t,!0):4!==e.type?eT(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,n2=(e,t)=>{1===e.type&&0===e.tagType&&("script"===e.tag||"style"===e.tag)&&t.removeNode()},n3=[nW],n4={cloak:nk,html:(e,t,n)=>{let{exp:i,loc:s}=e;return i||n.onError(e$(53,s)),t.children.length&&(n.onError(e$(54,s)),t.children.length=0),{props:[eS(eg("innerHTML",!0,s),i||eg("",!0))]}},text:(e,t,n)=>{let{exp:i,loc:s}=e;return i||n.onError(e$(55,s)),t.children.length&&(n.onError(e$(56,s)),t.children.length=0),{props:[eS(eg("textContent",!0),i?t$(i,n)>0?i:eN(n.helperString(j),[i],s):eg("",!0))]}},model:(e,t,n)=>{let i=nC(e,t,n);if(!i.props.length||1===t.tagType)return i;e.arg&&n.onError(e$(58,e.arg.loc));let{tag:s}=t,r=n.isCustomElement(s);if("input"===s||"textarea"===s||"select"===s||r){let o=nU,a=!1;if("input"===s||r){let i=e5(t,"type");if(i){if(7===i.type)o=nB;else if(i.value)switch(i.value.content){case"radio":o=nX;break;case"checkbox":o=nw;break;case"file":a=!0,n.onError(e$(59,e.loc))}}else e7(t)&&(o=nB)}else"select"===s&&(o=nF);a||(i.needRuntime=n.helper(o))}else n.onError(e$(57,e.loc));return i.props=i.props.filter(e=>!(4===e.key.type&&"modelValue"===e.key.content)),i},on:(e,t,n)=>nI(e,t,n,t=>{let{modifiers:i}=e;if(!i.length)return t;let{key:s,value:r}=t.props[0],{keyModifiers:o,nonKeyModifiers:a,eventOptionModifiers:l}=n1(s,i,n,e.loc);if(a.includes("right")&&(s=n0(s,"onContextmenu")),a.includes("middle")&&(s=n0(s,"onMouseup")),a.length&&(r=eN(n.helper(n$),[r,JSON.stringify(a)])),o.length&&(!ej(s)||nZ(s.content.toLowerCase()))&&(r=eN(n.helper(nH),[r,JSON.stringify(o)])),l.length){let e=l.map(m).join("");s=ej(s)?eg(`${s.content}${e}`,!0):eT(["(",s,`) + "${e}"`])}return{props:[eS(s,r)]}}),show:(e,t,n)=>{let{exp:i,loc:s}=e;return!i&&n.onError(e$(61,s)),{props:[],needRuntime:n.helper(nG)}}};return e.BASE_TRANSITION=x,e.BindingTypes={DATA:"data",PROPS:"props",PROPS_ALIASED:"props-aliased",SETUP_LET:"setup-let",SETUP_CONST:"setup-const",SETUP_REACTIVE_CONST:"setup-reactive-const",SETUP_MAYBE_REF:"setup-maybe-ref",SETUP_REF:"setup-ref",OPTIONS:"options",LITERAL_CONST:"literal-const"},e.CAMELIZE=ee,e.CAPITALIZE=et,e.CREATE_BLOCK=M,e.CREATE_COMMENT=k,e.CREATE_ELEMENT_BLOCK=D,e.CREATE_ELEMENT_VNODE=V,e.CREATE_SLOTS=J,e.CREATE_STATIC=w,e.CREATE_TEXT=X,e.CREATE_VNODE=P,e.CompilerDeprecationTypes={COMPILER_IS_ON_ELEMENT:"COMPILER_IS_ON_ELEMENT",COMPILER_V_BIND_SYNC:"COMPILER_V_BIND_SYNC",COMPILER_V_BIND_OBJECT_ORDER:"COMPILER_V_BIND_OBJECT_ORDER",COMPILER_V_ON_NATIVE:"COMPILER_V_ON_NATIVE",COMPILER_V_IF_V_FOR_PRECEDENCE:"COMPILER_V_IF_V_FOR_PRECEDENCE",COMPILER_NATIVE_TEMPLATE:"COMPILER_NATIVE_TEMPLATE",COMPILER_INLINE_TEMPLATE:"COMPILER_INLINE_TEMPLATE",COMPILER_FILTERS:"COMPILER_FILTERS"},e.ConstantTypes={NOT_CONSTANT:0,0:"NOT_CONSTANT",CAN_SKIP_PATCH:1,1:"CAN_SKIP_PATCH",CAN_CACHE:2,2:"CAN_CACHE",CAN_STRINGIFY:3,3:"CAN_STRINGIFY"},e.DOMDirectiveTransforms=n4,e.DOMErrorCodes={X_V_HTML_NO_EXPRESSION:53,53:"X_V_HTML_NO_EXPRESSION",X_V_HTML_WITH_CHILDREN:54,54:"X_V_HTML_WITH_CHILDREN",X_V_TEXT_NO_EXPRESSION:55,55:"X_V_TEXT_NO_EXPRESSION",X_V_TEXT_WITH_CHILDREN:56,56:"X_V_TEXT_WITH_CHILDREN",X_V_MODEL_ON_INVALID_ELEMENT:57,57:"X_V_MODEL_ON_INVALID_ELEMENT",X_V_MODEL_ARG_ON_ELEMENT:58,58:"X_V_MODEL_ARG_ON_ELEMENT",X_V_MODEL_ON_FILE_INPUT_ELEMENT:59,59:"X_V_MODEL_ON_FILE_INPUT_ELEMENT",X_V_MODEL_UNNECESSARY_VALUE:60,60:"X_V_MODEL_UNNECESSARY_VALUE",X_V_SHOW_NO_EXPRESSION:61,61:"X_V_SHOW_NO_EXPRESSION",X_TRANSITION_INVALID_CHILDREN:62,62:"X_TRANSITION_INVALID_CHILDREN",X_IGNORED_SIDE_EFFECT_TAG:63,63:"X_IGNORED_SIDE_EFFECT_TAG",__EXTEND_POINT__:64,64:"__EXTEND_POINT__"},e.DOMErrorMessages={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},e.DOMNodeTransforms=n3,e.ElementTypes={ELEMENT:0,0:"ELEMENT",COMPONENT:1,1:"COMPONENT",SLOT:2,2:"SLOT",TEMPLATE:3,3:"TEMPLATE"},e.ErrorCodes={ABRUPT_CLOSING_OF_EMPTY_COMMENT:0,0:"ABRUPT_CLOSING_OF_EMPTY_COMMENT",CDATA_IN_HTML_CONTENT:1,1:"CDATA_IN_HTML_CONTENT",DUPLICATE_ATTRIBUTE:2,2:"DUPLICATE_ATTRIBUTE",END_TAG_WITH_ATTRIBUTES:3,3:"END_TAG_WITH_ATTRIBUTES",END_TAG_WITH_TRAILING_SOLIDUS:4,4:"END_TAG_WITH_TRAILING_SOLIDUS",EOF_BEFORE_TAG_NAME:5,5:"EOF_BEFORE_TAG_NAME",EOF_IN_CDATA:6,6:"EOF_IN_CDATA",EOF_IN_COMMENT:7,7:"EOF_IN_COMMENT",EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT:8,8:"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",EOF_IN_TAG:9,9:"EOF_IN_TAG",INCORRECTLY_CLOSED_COMMENT:10,10:"INCORRECTLY_CLOSED_COMMENT",INCORRECTLY_OPENED_COMMENT:11,11:"INCORRECTLY_OPENED_COMMENT",INVALID_FIRST_CHARACTER_OF_TAG_NAME:12,12:"INVALID_FIRST_CHARACTER_OF_TAG_NAME",MISSING_ATTRIBUTE_VALUE:13,13:"MISSING_ATTRIBUTE_VALUE",MISSING_END_TAG_NAME:14,14:"MISSING_END_TAG_NAME",MISSING_WHITESPACE_BETWEEN_ATTRIBUTES:15,15:"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",NESTED_COMMENT:16,16:"NESTED_COMMENT",UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME:17,17:"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE:18,18:"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME:19,19:"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",UNEXPECTED_NULL_CHARACTER:20,20:"UNEXPECTED_NULL_CHARACTER",UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME:21,21:"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",UNEXPECTED_SOLIDUS_IN_TAG:22,22:"UNEXPECTED_SOLIDUS_IN_TAG",X_INVALID_END_TAG:23,23:"X_INVALID_END_TAG",X_MISSING_END_TAG:24,24:"X_MISSING_END_TAG",X_MISSING_INTERPOLATION_END:25,25:"X_MISSING_INTERPOLATION_END",X_MISSING_DIRECTIVE_NAME:26,26:"X_MISSING_DIRECTIVE_NAME",X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END:27,27:"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",X_V_IF_NO_EXPRESSION:28,28:"X_V_IF_NO_EXPRESSION",X_V_IF_SAME_KEY:29,29:"X_V_IF_SAME_KEY",X_V_ELSE_NO_ADJACENT_IF:30,30:"X_V_ELSE_NO_ADJACENT_IF",X_V_FOR_NO_EXPRESSION:31,31:"X_V_FOR_NO_EXPRESSION",X_V_FOR_MALFORMED_EXPRESSION:32,32:"X_V_FOR_MALFORMED_EXPRESSION",X_V_FOR_TEMPLATE_KEY_PLACEMENT:33,33:"X_V_FOR_TEMPLATE_KEY_PLACEMENT",X_V_BIND_NO_EXPRESSION:34,34:"X_V_BIND_NO_EXPRESSION",X_V_ON_NO_EXPRESSION:35,35:"X_V_ON_NO_EXPRESSION",X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET:36,36:"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",X_V_SLOT_MIXED_SLOT_USAGE:37,37:"X_V_SLOT_MIXED_SLOT_USAGE",X_V_SLOT_DUPLICATE_SLOT_NAMES:38,38:"X_V_SLOT_DUPLICATE_SLOT_NAMES",X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN:39,39:"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",X_V_SLOT_MISPLACED:40,40:"X_V_SLOT_MISPLACED",X_V_MODEL_NO_EXPRESSION:41,41:"X_V_MODEL_NO_EXPRESSION",X_V_MODEL_MALFORMED_EXPRESSION:42,42:"X_V_MODEL_MALFORMED_EXPRESSION",X_V_MODEL_ON_SCOPE_VARIABLE:43,43:"X_V_MODEL_ON_SCOPE_VARIABLE",X_V_MODEL_ON_PROPS:44,44:"X_V_MODEL_ON_PROPS",X_INVALID_EXPRESSION:45,45:"X_INVALID_EXPRESSION",X_KEEP_ALIVE_INVALID_CHILDREN:46,46:"X_KEEP_ALIVE_INVALID_CHILDREN",X_PREFIX_ID_NOT_SUPPORTED:47,47:"X_PREFIX_ID_NOT_SUPPORTED",X_MODULE_MODE_NOT_SUPPORTED:48,48:"X_MODULE_MODE_NOT_SUPPORTED",X_CACHE_HANDLER_NOT_SUPPORTED:49,49:"X_CACHE_HANDLER_NOT_SUPPORTED",X_SCOPE_ID_NOT_SUPPORTED:50,50:"X_SCOPE_ID_NOT_SUPPORTED",X_VNODE_HOOKS:51,51:"X_VNODE_HOOKS",X_V_BIND_INVALID_SAME_NAME_ARGUMENT:52,52:"X_V_BIND_INVALID_SAME_NAME_ARGUMENT",__EXTEND_POINT__:53,53:"__EXTEND_POINT__"},e.FRAGMENT=C,e.GUARD_REACTIVE_PROPS=z,e.IS_MEMO_SAME=eh,e.IS_REF=el,e.KEEP_ALIVE=v,e.MERGE_PROPS=W,e.NORMALIZE_CLASS=K,e.NORMALIZE_PROPS=Q,e.NORMALIZE_STYLE=Y,e.Namespaces={HTML:0,0:"HTML",SVG:1,1:"SVG",MATH_ML:2,2:"MATH_ML"},e.NodeTypes={ROOT:0,0:"ROOT",ELEMENT:1,1:"ELEMENT",TEXT:2,2:"TEXT",COMMENT:3,3:"COMMENT",SIMPLE_EXPRESSION:4,4:"SIMPLE_EXPRESSION",INTERPOLATION:5,5:"INTERPOLATION",ATTRIBUTE:6,6:"ATTRIBUTE",DIRECTIVE:7,7:"DIRECTIVE",COMPOUND_EXPRESSION:8,8:"COMPOUND_EXPRESSION",IF:9,9:"IF",IF_BRANCH:10,10:"IF_BRANCH",FOR:11,11:"FOR",TEXT_CALL:12,12:"TEXT_CALL",VNODE_CALL:13,13:"VNODE_CALL",JS_CALL_EXPRESSION:14,14:"JS_CALL_EXPRESSION",JS_OBJECT_EXPRESSION:15,15:"JS_OBJECT_EXPRESSION",JS_PROPERTY:16,16:"JS_PROPERTY",JS_ARRAY_EXPRESSION:17,17:"JS_ARRAY_EXPRESSION",JS_FUNCTION_EXPRESSION:18,18:"JS_FUNCTION_EXPRESSION",JS_CONDITIONAL_EXPRESSION:19,19:"JS_CONDITIONAL_EXPRESSION",JS_CACHE_EXPRESSION:20,20:"JS_CACHE_EXPRESSION",JS_BLOCK_STATEMENT:21,21:"JS_BLOCK_STATEMENT",JS_TEMPLATE_LITERAL:22,22:"JS_TEMPLATE_LITERAL",JS_IF_STATEMENT:23,23:"JS_IF_STATEMENT",JS_ASSIGNMENT_EXPRESSION:24,24:"JS_ASSIGNMENT_EXPRESSION",JS_SEQUENCE_EXPRESSION:25,25:"JS_SEQUENCE_EXPRESSION",JS_RETURN_STATEMENT:26,26:"JS_RETURN_STATEMENT"},e.OPEN_BLOCK=L,e.POP_SCOPE_ID=er,e.PUSH_SCOPE_ID=es,e.RENDER_LIST=G,e.RENDER_SLOT=q,e.RESOLVE_COMPONENT=U,e.RESOLVE_DIRECTIVE=B,e.RESOLVE_DYNAMIC_COMPONENT=F,e.RESOLVE_FILTER=$,e.SET_BLOCK_TRACKING=ei,e.SUSPENSE=R,e.TELEPORT=b,e.TO_DISPLAY_STRING=j,e.TO_HANDLERS=Z,e.TO_HANDLER_KEY=en,e.TRANSITION=nq,e.TRANSITION_GROUP=nJ,e.TS_NODE_TYPES=eJ,e.UNREF=ea,e.V_MODEL_CHECKBOX=nw,e.V_MODEL_DYNAMIC=nB,e.V_MODEL_RADIO=nX,e.V_MODEL_SELECT=nF,e.V_MODEL_TEXT=nU,e.V_ON_WITH_KEYS=nH,e.V_ON_WITH_MODIFIERS=n$,e.V_SHOW=nG,e.WITH_CTX=eo,e.WITH_DIRECTIVES=H,e.WITH_MEMO=ec,e.advancePositionWithClone=function(e,t,n=t.length){return e4({offset:e.offset,line:e.line,column:e.column},t,n)},e.advancePositionWithMutation=e4,e.assert=function(e,t){if(!e)throw Error(t||"unexpected compiler condition")},e.baseCompile=nV,e.baseParse=tF,e.buildDirectiveArgs=nS,e.buildProps=n_,e.buildSlots=np,e.checkCompatEnabled=eU,e.compile=function(e,t={}){return nV(e,a({},nj,t,{nodeTransforms:[n2,...n3,...t.nodeTransforms||[]],directiveTransforms:a({},n4,t.directiveTransforms||{}),transformHoist:null}))},e.convertToBlock=eR,e.createArrayExpression=e_,e.createAssignmentExpression=function(e,t){return{type:24,left:e,right:t,loc:eu}},e.createBlockStatement=eA,e.createCacheExpression=eO,e.createCallExpression=eN,e.createCompilerError=e$,e.createCompoundExpression=eT,e.createConditionalExpression=ey,e.createDOMCompilerError=function(e,t){return e$(e,t)},e.createForLoopParams=na,e.createFunctionExpression=eI,e.createIfStatement=function(e,t,n){return{type:23,test:e,consequent:t,alternate:n,loc:eu}},e.createInterpolation=function(e,t){return{type:5,loc:t,content:c(e)?eg(e,!1,t):e}},e.createObjectExpression=em,e.createObjectProperty=eS,e.createReturnStatement=function(e){return{type:26,returns:e,loc:eu}},e.createRoot=ef,e.createSequenceExpression=function(e){return{type:25,expressions:e,loc:eu}},e.createSimpleExpression=eg,e.createStructuralDirectiveTransform=tK,e.createTemplateLiteral=function(e){return{type:22,elements:e,loc:eu}},e.createTransformContext=tJ,e.createVNodeCall=eE,e.errorMessages=eH,e.extractIdentifiers=eG,e.findDir=e6,e.findProp=e5,e.forAliasRE=tl,e.generate=tz,e.generateCodeFrame=function(e,t=0,n=e.length){if((t=Math.max(0,Math.min(t,e.length)))>(n=Math.max(0,Math.min(n,e.length))))return"";let i=e.split(/(\r?\n)/),s=i.filter((e,t)=>t%2==1);i=i.filter((e,t)=>t%2==0);let r=0,o=[];for(let e=0;e<i.length;e++)if((r+=i[e].length+(s[e]&&s[e].length||0))>=t){for(let a=e-2;a<=e+2||n>r;a++){if(a<0||a>=i.length)continue;let l=a+1;o.push(`${l}${" ".repeat(Math.max(3-String(l).length,0))}| ${i[a]}`);let c=i[a].length,h=s[a]&&s[a].length||0;if(a===e){let e=t-(r-(c+h)),i=Math.max(1,n>r?c-e:n-t);o.push(" | "+" ".repeat(e)+"^".repeat(i))}else if(a>e){if(n>r){let e=Math.max(Math.min(n-r,c),1);o.push(" | "+"^".repeat(e))}r+=c+h}}break}return o.join("\n")},e.getBaseTransformPreset=nP,e.getConstantType=t$,e.getMemoedVNodeCall=ta,e.getVNodeBlockHelper=eb,e.getVNodeHelper=eC,e.hasDynamicKeyVBind=e7,e.hasScopeRef=function e(t,n){if(!t||0===Object.keys(n).length)return!1;switch(t.type){case 1:for(let i=0;i<t.props.length;i++){let s=t.props[i];if(7===s.type&&(e(s.arg,n)||e(s.exp,n)))return!0}return t.children.some(t=>e(t,n));case 11:if(e(t.source,n))return!0;return t.children.some(t=>e(t,n));case 9:return t.branches.some(t=>e(t,n));case 10:if(e(t.condition,n))return!0;return t.children.some(t=>e(t,n));case 4:return!t.isStatic&&eY(t.content)&&!!n[t.content];case 8:return t.children.some(t=>p(t)&&e(t,n));case 5:case 12:return e(t.content,n);default:return!1}},e.helperNameMap=ep,e.injectProp=ts,e.isCoreComponent=eW,e.isFnExpression=e3,e.isFnExpressionBrowser=e3,e.isFnExpressionNode=s,e.isFunctionType=e=>/Function(?:Expression|Declaration)$|Method$/.test(e.type),e.isInDestructureAssignment=function(e,t){if(e&&("ObjectProperty"===e.type||"ArrayPattern"===e.type)){let e=t.length;for(;e--;){let n=t[e];if("AssignmentExpression"===n.type)return!0;if("ObjectProperty"!==n.type&&!n.type.endsWith("Pattern"))break}}return!1},e.isInNewExpression=function(e){let t=e.length;for(;t--;){let n=e[t];if("NewExpression"===n.type)return!0;if("MemberExpression"!==n.type)break}return!1},e.isMemberExpression=e0,e.isMemberExpressionBrowser=e0,e.isMemberExpressionNode=s,e.isReferencedIdentifier=function(e,t,n){return!1},e.isSimpleIdentifier=eY,e.isSlotOutlet=tn,e.isStaticArgOf=e9,e.isStaticExp=ej,e.isStaticProperty=eq,e.isStaticPropertyKey=(e,t)=>eq(t)&&t.key===e,e.isTemplateNode=tt,e.isText=e8,e.isVSlot=te,e.locStub=eu,e.noopDirectiveTransform=nk,e.parse=function(e,t={}){return tF(e,a({},nj,t))},e.parserOptions=nj,e.processExpression=t6,e.processFor=nr,e.processIf=t9,e.processSlotOutlet=nN,e.registerRuntimeHelpers=ed,e.resolveComponentType=nE,e.stringifyExpression=function e(t){return c(t)?t:4===t.type?t.content:t.children.map(e).join("")},e.toValidAssetId=to,e.trackSlotScopes=nc,e.trackVForSlotScopes=(e,t)=>{let n;if(tt(e)&&e.props.some(te)&&(n=e6(e,"for"))){let e=n.forParseResult;if(e){no(e);let{value:n,key:i,index:s}=e,{addIdentifiers:r,removeIdentifiers:o}=t;return n&&r(n),i&&r(i),s&&r(s),()=>{n&&o(n),i&&o(i),s&&o(s)}}}},e.transform=tj,e.transformBind=nt,e.transformElement=nf,e.transformExpression=(e,t)=>{if(5===e.type)e.content=t6(e.content,t);else if(1===e.type){let n=e6(e,"memo");for(let i=0;i<e.props.length;i++){let s=e.props[i];if(7===s.type&&"for"!==s.name){let e=s.exp,i=s.arg;!e||4!==e.type||"on"===s.name&&i||n&&i&&4===i.type&&"key"===i.content||(s.exp=t6(e,t,"slot"===s.name)),i&&4===i.type&&!i.isStatic&&(s.arg=t6(i,t))}}}},e.transformModel=nC,e.transformOn=nI,e.transformStyle=nW,e.traverseNode=tW,e.unwrapTSNode=function e(t){return eJ.includes(t.type)?e(t.expression):t},e.walkBlockDeclarations=function(e,t){for(let n of e.body)if("VariableDeclaration"===n.type){if(n.declare)continue;for(let e of n.declarations)for(let n of eG(e.id))t(n)}else if("FunctionDeclaration"===n.type||"ClassDeclaration"===n.type){if(n.declare||!n.id)continue;t(n.id)}else("ForOfStatement"===n.type||"ForInStatement"===n.type||"ForStatement"===n.type)&&function(e,t,n){let i="ForStatement"===e.type?e.init:e.left;if(i&&"VariableDeclaration"===i.type&&("var"===i.kind?t:!t))for(let e of i.declarations)for(let t of eG(e.id))n(t)}(n,!0,t)},e.walkFunctionParams=function(e,t){for(let n of e.params)for(let e of eG(n))t(e)},e.walkIdentifiers=function(e,t,n=!1,i=[],s=Object.create(null)){},e.warnDeprecation=function(e,t,n,...i){if("suppress-warning"===eX(e,t))return;let{message:s,link:r}=ek[e],o=SyntaxError(`(deprecation ${e}) ${"function"==typeof s?s(...i):s}${r?` - Details: ${r}`:""}`);o.code=e,n&&(o.loc=n),t.onWarn(o)},e}({}); diff --git a/node_modules/@vue/compiler-dom/index.js b/node_modules/@vue/compiler-dom/index.js deleted file mode 100644 index b5f7a05..0000000 --- a/node_modules/@vue/compiler-dom/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/compiler-dom.cjs.prod.js') -} else { - module.exports = require('./dist/compiler-dom.cjs.js') -} diff --git a/node_modules/@vue/compiler-dom/package.json b/node_modules/@vue/compiler-dom/package.json deleted file mode 100644 index f494774..0000000 --- a/node_modules/@vue/compiler-dom/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "@vue/compiler-dom", - "version": "3.5.13", - "description": "@vue/compiler-dom", - "main": "index.js", - "module": "dist/compiler-dom.esm-bundler.js", - "types": "dist/compiler-dom.d.ts", - "unpkg": "dist/compiler-dom.global.js", - "jsdelivr": "dist/compiler-dom.global.js", - "files": [ - "index.js", - "dist" - ], - "exports": { - ".": { - "types": "./dist/compiler-dom.d.ts", - "node": { - "production": "./dist/compiler-dom.cjs.prod.js", - "development": "./dist/compiler-dom.cjs.js", - "default": "./index.js" - }, - "module": "./dist/compiler-dom.esm-bundler.js", - "import": "./dist/compiler-dom.esm-bundler.js", - "require": "./index.js" - }, - "./*": "./*" - }, - "sideEffects": false, - "buildOptions": { - "name": "VueCompilerDOM", - "compat": true, - "formats": [ - "esm-bundler", - "esm-browser", - "cjs", - "global" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/vuejs/core.git", - "directory": "packages/compiler-dom" - }, - "keywords": [ - "vue" - ], - "author": "Evan You", - "license": "MIT", - "bugs": { - "url": "https://github.com/vuejs/core/issues" - }, - "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-dom#readme", - "dependencies": { - "@vue/shared": "3.5.13", - "@vue/compiler-core": "3.5.13" - } -} \ No newline at end of file diff --git a/node_modules/@vue/compiler-sfc/LICENSE b/node_modules/@vue/compiler-sfc/LICENSE deleted file mode 100644 index 15f1f7e..0000000 --- a/node_modules/@vue/compiler-sfc/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018-present, Yuxi (Evan) You - -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/node_modules/@vue/compiler-sfc/README.md b/node_modules/@vue/compiler-sfc/README.md deleted file mode 100644 index 4f8ff3a..0000000 --- a/node_modules/@vue/compiler-sfc/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# @vue/compiler-sfc - -> Lower level utilities for compiling Vue Single File Components - -**Note: as of 3.2.13+, this package is included as a dependency of the main `vue` package and can be accessed as `vue/compiler-sfc`. This means you no longer need to explicitly install this package and ensure its version match that of `vue`'s. Just use the main `vue/compiler-sfc` deep import instead.** - -This package contains lower level utilities that you can use if you are writing a plugin / transform for a bundler or module system that compiles Vue Single File Components (SFCs) into JavaScript. It is used in [vue-loader](https://github.com/vuejs/vue-loader) and [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue). - -## API - -The API is intentionally low-level due to the various considerations when integrating Vue SFCs in a build system: - -- Separate hot-module replacement (HMR) for script, template and styles - - - template updates should not reset component state - - style updates should be performed without component re-render - -- Leveraging the tool's plugin system for pre-processor handling. e.g. `<style lang="scss">` should be processed by the corresponding webpack loader. - -- In some cases, transformers of each block in an SFC do not share the same execution context. For example, when used with `thread-loader` or other parallelized configurations, the template sub-loader in `vue-loader` may not have access to the full SFC and its descriptor. - -The general idea is to generate a facade module that imports the individual blocks of the component. The trick is the module imports itself with different query strings so that the build system can handle each request as "virtual" modules: - -``` - +--------------------+ - | | - | script transform | - +----->+ | - | +--------------------+ - | -+--------------------+ | +--------------------+ -| | | | | -| facade transform +----------->+ template transform | -| | | | | -+--------------------+ | +--------------------+ - | - | +--------------------+ - +----->+ | - | style transform | - | | - +--------------------+ -``` - -Where the facade module looks like this: - -```js -// main script -import script from '/project/foo.vue?vue&type=script' -// template compiled to render function -import { render } from '/project/foo.vue?vue&type=template&id=xxxxxx' -// css -import '/project/foo.vue?vue&type=style&index=0&id=xxxxxx' - -// attach render function to script -script.render = render - -// attach additional metadata -// some of these should be dev only -script.__file = 'example.vue' -script.__scopeId = 'xxxxxx' - -// additional tooling-specific HMR handling code -// using __VUE_HMR_API__ global - -export default script -``` - -### High Level Workflow - -1. In facade transform, parse the source into descriptor with the `parse` API and generate the above facade module code based on the descriptor; - -2. In script transform, use `compileScript` to process the script. This handles features like `<script setup>` and CSS variable injection. Alternatively, this can be done directly in the facade module (with the code inlined instead of imported), but it will require rewriting `export default` to a temp variable (a `rewriteDefault` convenience API is provided for this purpose) so additional options can be attached to the exported object. - -3. In template transform, use `compileTemplate` to compile the raw template into render function code. - -4. In style transform, use `compileStyle` to compile raw CSS to handle `<style scoped>`, `<style module>` and CSS variable injection. - -Options needed for these APIs can be passed via the query string. - -For detailed API references and options, check out the source type definitions. For actual usage of these APIs, check out [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue) or [vue-loader](https://github.com/vuejs/vue-loader/tree/next). diff --git a/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js b/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js deleted file mode 100644 index dc6a170..0000000 --- a/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +++ /dev/null @@ -1,24970 +0,0 @@ -/** -* @vue/compiler-sfc v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var compilerCore = require('@vue/compiler-core'); -var CompilerDOM = require('@vue/compiler-dom'); -var sourceMapJs = require('source-map-js'); -var shared = require('@vue/shared'); -var path$1 = require('path'); -var url = require('url'); -var CompilerSSR = require('@vue/compiler-ssr'); -var require$$2 = require('util'); -var require$$0 = require('fs'); -var require$$0$1 = require('postcss'); -var estreeWalker = require('estree-walker'); -var MagicString = require('magic-string'); -var parser$2 = require('@babel/parser'); -var process$1 = require('process'); - -function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) { - for (var k in e) { - n[k] = e[k]; - } - } - n.default = e; - return Object.freeze(n); -} - -var CompilerDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(CompilerDOM); -var CompilerSSR__namespace = /*#__PURE__*/_interopNamespaceDefault(CompilerSSR); -var process__namespace = /*#__PURE__*/_interopNamespaceDefault(process$1); - -var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - -function getDefaultExportFromCjs (x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; -} - -var hashSum; -var hasRequiredHashSum; - -function requireHashSum () { - if (hasRequiredHashSum) return hashSum; - hasRequiredHashSum = 1; - - function pad (hash, len) { - while (hash.length < len) { - hash = '0' + hash; - } - return hash; - } - - function fold (hash, text) { - var i; - var chr; - var len; - if (text.length === 0) { - return hash; - } - for (i = 0, len = text.length; i < len; i++) { - chr = text.charCodeAt(i); - hash = ((hash << 5) - hash) + chr; - hash |= 0; - } - return hash < 0 ? hash * -2 : hash; - } - - function foldObject (hash, o, seen) { - return Object.keys(o).sort().reduce(foldKey, hash); - function foldKey (hash, key) { - return foldValue(hash, o[key], key, seen); - } - } - - function foldValue (input, value, key, seen) { - var hash = fold(fold(fold(input, key), toString(value)), typeof value); - if (value === null) { - return fold(hash, 'null'); - } - if (value === undefined) { - return fold(hash, 'undefined'); - } - if (typeof value === 'object' || typeof value === 'function') { - if (seen.indexOf(value) !== -1) { - return fold(hash, '[Circular]' + key); - } - seen.push(value); - - var objHash = foldObject(hash, value, seen); - - if (!('valueOf' in value) || typeof value.valueOf !== 'function') { - return objHash; - } - - try { - return fold(objHash, String(value.valueOf())) - } catch (err) { - return fold(objHash, '[valueOf exception]' + (err.stack || err.message)) - } - } - return fold(hash, value.toString()); - } - - function toString (o) { - return Object.prototype.toString.call(o); - } - - function sum (o) { - return pad(foldValue(0, o, '', []).toString(16), 8); - } - - hashSum = sum; - return hashSum; -} - -var hashSumExports = /*@__PURE__*/ requireHashSum(); -var hash = /*@__PURE__*/getDefaultExportFromCjs(hashSumExports); - -const CSS_VARS_HELPER = `useCssVars`; -function genCssVarsFromList(vars, id, isProd, isSSR = false) { - return `{ - ${vars.map( - (key) => `"${isSSR ? `--` : ``}${genVarName(id, key, isProd, isSSR)}": (${key})` - ).join(",\n ")} -}`; -} -function genVarName(id, raw, isProd, isSSR = false) { - if (isProd) { - return hash(id + raw); - } else { - return `${id}-${shared.getEscapedCssVarName(raw, isSSR)}`; - } -} -function normalizeExpression(exp) { - exp = exp.trim(); - if (exp[0] === `'` && exp[exp.length - 1] === `'` || exp[0] === `"` && exp[exp.length - 1] === `"`) { - return exp.slice(1, -1); - } - return exp; -} -const vBindRE = /v-bind\s*\(/g; -function parseCssVars(sfc) { - const vars = []; - sfc.styles.forEach((style) => { - let match; - const content = style.content.replace(/\/\*([\s\S]*?)\*\/|\/\/.*/g, ""); - while (match = vBindRE.exec(content)) { - const start = match.index + match[0].length; - const end = lexBinding(content, start); - if (end !== null) { - const variable = normalizeExpression(content.slice(start, end)); - if (!vars.includes(variable)) { - vars.push(variable); - } - } - } - }); - return vars; -} -function lexBinding(content, start) { - let state = 0 /* inParens */; - let parenDepth = 0; - for (let i = start; i < content.length; i++) { - const char = content.charAt(i); - switch (state) { - case 0 /* inParens */: - if (char === `'`) { - state = 1 /* inSingleQuoteString */; - } else if (char === `"`) { - state = 2 /* inDoubleQuoteString */; - } else if (char === `(`) { - parenDepth++; - } else if (char === `)`) { - if (parenDepth > 0) { - parenDepth--; - } else { - return i; - } - } - break; - case 1 /* inSingleQuoteString */: - if (char === `'`) { - state = 0 /* inParens */; - } - break; - case 2 /* inDoubleQuoteString */: - if (char === `"`) { - state = 0 /* inParens */; - } - break; - } - } - return null; -} -const cssVarsPlugin = (opts) => { - const { id, isProd } = opts; - return { - postcssPlugin: "vue-sfc-vars", - Declaration(decl) { - const value = decl.value; - if (vBindRE.test(value)) { - vBindRE.lastIndex = 0; - let transformed = ""; - let lastIndex = 0; - let match; - while (match = vBindRE.exec(value)) { - const start = match.index + match[0].length; - const end = lexBinding(value, start); - if (end !== null) { - const variable = normalizeExpression(value.slice(start, end)); - transformed += value.slice(lastIndex, match.index) + `var(--${genVarName(id, variable, isProd)})`; - lastIndex = end + 1; - } - } - decl.value = transformed + value.slice(lastIndex); - } - } - }; -}; -cssVarsPlugin.postcss = true; -function genCssVarsCode(vars, bindings, id, isProd) { - const varsExp = genCssVarsFromList(vars, id, isProd); - const exp = CompilerDOM.createSimpleExpression(varsExp, false); - const context = CompilerDOM.createTransformContext(CompilerDOM.createRoot([]), { - prefixIdentifiers: true, - inline: true, - bindingMetadata: bindings.__isScriptSetup === false ? void 0 : bindings - }); - const transformed = CompilerDOM.processExpression(exp, context); - const transformedString = transformed.type === 4 ? transformed.content : transformed.children.map((c) => { - return typeof c === "string" ? c : c.content; - }).join(""); - return `_${CSS_VARS_HELPER}(_ctx => (${transformedString}))`; -} -function genNormalScriptCssVarsCode(cssVars, bindings, id, isProd, defaultVar) { - return ` -import { ${CSS_VARS_HELPER} as _${CSS_VARS_HELPER} } from 'vue' -const __injectCSSVars__ = () => { -${genCssVarsCode( - cssVars, - bindings, - id, - isProd - )}} -const __setup__ = ${defaultVar}.setup -${defaultVar}.setup = __setup__ - ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) } - : __injectCSSVars__ -`; -} - -/** - * @module LRUCache - */ -const perf = typeof performance === 'object' && - performance && - typeof performance.now === 'function' - ? performance - : Date; -const warned = new Set(); -/* c8 ignore start */ -const PROCESS = (typeof process === 'object' && !!process ? process : {}); -/* c8 ignore start */ -const emitWarning = (msg, type, code, fn) => { - typeof PROCESS.emitWarning === 'function' - ? PROCESS.emitWarning(msg, type, code, fn) - : console.error(`[${code}] ${type}: ${msg}`); -}; -let AC = globalThis.AbortController; -let AS = globalThis.AbortSignal; -/* c8 ignore start */ -if (typeof AC === 'undefined') { - //@ts-ignore - AS = class AbortSignal { - onabort; - _onabort = []; - reason; - aborted = false; - addEventListener(_, fn) { - this._onabort.push(fn); - } - }; - //@ts-ignore - AC = class AbortController { - constructor() { - warnACPolyfill(); - } - signal = new AS(); - abort(reason) { - if (this.signal.aborted) - return; - //@ts-ignore - this.signal.reason = reason; - //@ts-ignore - this.signal.aborted = true; - //@ts-ignore - for (const fn of this.signal._onabort) { - fn(reason); - } - this.signal.onabort?.(reason); - } - }; - let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'; - const warnACPolyfill = () => { - if (!printACPolyfillWarning) - return; - printACPolyfillWarning = false; - emitWarning('AbortController is not defined. If using lru-cache in ' + - 'node 14, load an AbortController polyfill from the ' + - '`node-abort-controller` package. A minimal polyfill is ' + - 'provided for use by LRUCache.fetch(), but it should not be ' + - 'relied upon in other contexts (eg, passing it to other APIs that ' + - 'use AbortController/AbortSignal might have undesirable effects). ' + - 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill); - }; -} -/* c8 ignore stop */ -const shouldWarn = (code) => !warned.has(code); -const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); -/* c8 ignore start */ -// This is a little bit ridiculous, tbh. -// The maximum array length is 2^32-1 or thereabouts on most JS impls. -// And well before that point, you're caching the entire world, I mean, -// that's ~32GB of just integers for the next/prev links, plus whatever -// else to hold that many keys and values. Just filling the memory with -// zeroes at init time is brutal when you get that big. -// But why not be complete? -// Maybe in the future, these limits will have expanded. -const getUintArray = (max) => !isPosInt(max) - ? null - : max <= Math.pow(2, 8) - ? Uint8Array - : max <= Math.pow(2, 16) - ? Uint16Array - : max <= Math.pow(2, 32) - ? Uint32Array - : max <= Number.MAX_SAFE_INTEGER - ? ZeroArray - : null; -/* c8 ignore stop */ -class ZeroArray extends Array { - constructor(size) { - super(size); - this.fill(0); - } -} -class Stack { - heap; - length; - // private constructor - static #constructing = false; - static create(max) { - const HeapCls = getUintArray(max); - if (!HeapCls) - return []; - Stack.#constructing = true; - const s = new Stack(max, HeapCls); - Stack.#constructing = false; - return s; - } - constructor(max, HeapCls) { - /* c8 ignore start */ - if (!Stack.#constructing) { - throw new TypeError('instantiate Stack using Stack.create(n)'); - } - /* c8 ignore stop */ - this.heap = new HeapCls(max); - this.length = 0; - } - push(n) { - this.heap[this.length++] = n; - } - pop() { - return this.heap[--this.length]; - } -} -/** - * Default export, the thing you're using this module to get. - * - * All properties from the options object (with the exception of - * {@link OptionsBase.max} and {@link OptionsBase.maxSize}) are added as - * normal public members. (`max` and `maxBase` are read-only getters.) - * Changing any of these will alter the defaults for subsequent method calls, - * but is otherwise safe. - */ -class LRUCache { - // properties coming in from the options of these, only max and maxSize - // really *need* to be protected. The rest can be modified, as they just - // set defaults for various methods. - #max; - #maxSize; - #dispose; - #disposeAfter; - #fetchMethod; - /** - * {@link LRUCache.OptionsBase.ttl} - */ - ttl; - /** - * {@link LRUCache.OptionsBase.ttlResolution} - */ - ttlResolution; - /** - * {@link LRUCache.OptionsBase.ttlAutopurge} - */ - ttlAutopurge; - /** - * {@link LRUCache.OptionsBase.updateAgeOnGet} - */ - updateAgeOnGet; - /** - * {@link LRUCache.OptionsBase.updateAgeOnHas} - */ - updateAgeOnHas; - /** - * {@link LRUCache.OptionsBase.allowStale} - */ - allowStale; - /** - * {@link LRUCache.OptionsBase.noDisposeOnSet} - */ - noDisposeOnSet; - /** - * {@link LRUCache.OptionsBase.noUpdateTTL} - */ - noUpdateTTL; - /** - * {@link LRUCache.OptionsBase.maxEntrySize} - */ - maxEntrySize; - /** - * {@link LRUCache.OptionsBase.sizeCalculation} - */ - sizeCalculation; - /** - * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} - */ - noDeleteOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} - */ - noDeleteOnStaleGet; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} - */ - allowStaleOnFetchAbort; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} - */ - allowStaleOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.ignoreFetchAbort} - */ - ignoreFetchAbort; - // computed properties - #size; - #calculatedSize; - #keyMap; - #keyList; - #valList; - #next; - #prev; - #head; - #tail; - #free; - #disposed; - #sizes; - #starts; - #ttls; - #hasDispose; - #hasFetchMethod; - #hasDisposeAfter; - /** - * Do not call this method unless you need to inspect the - * inner workings of the cache. If anything returned by this - * object is modified in any way, strange breakage may occur. - * - * These fields are private for a reason! - * - * @internal - */ - static unsafeExposeInternals(c) { - return { - // properties - starts: c.#starts, - ttls: c.#ttls, - sizes: c.#sizes, - keyMap: c.#keyMap, - keyList: c.#keyList, - valList: c.#valList, - next: c.#next, - prev: c.#prev, - get head() { - return c.#head; - }, - get tail() { - return c.#tail; - }, - free: c.#free, - // methods - isBackgroundFetch: (p) => c.#isBackgroundFetch(p), - backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context), - moveToTail: (index) => c.#moveToTail(index), - indexes: (options) => c.#indexes(options), - rindexes: (options) => c.#rindexes(options), - isStale: (index) => c.#isStale(index), - }; - } - // Protected read-only members - /** - * {@link LRUCache.OptionsBase.max} (read-only) - */ - get max() { - return this.#max; - } - /** - * {@link LRUCache.OptionsBase.maxSize} (read-only) - */ - get maxSize() { - return this.#maxSize; - } - /** - * The total computed size of items in the cache (read-only) - */ - get calculatedSize() { - return this.#calculatedSize; - } - /** - * The number of items stored in the cache (read-only) - */ - get size() { - return this.#size; - } - /** - * {@link LRUCache.OptionsBase.fetchMethod} (read-only) - */ - get fetchMethod() { - return this.#fetchMethod; - } - /** - * {@link LRUCache.OptionsBase.dispose} (read-only) - */ - get dispose() { - return this.#dispose; - } - /** - * {@link LRUCache.OptionsBase.disposeAfter} (read-only) - */ - get disposeAfter() { - return this.#disposeAfter; - } - constructor(options) { - const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options; - if (max !== 0 && !isPosInt(max)) { - throw new TypeError('max option must be a nonnegative integer'); - } - const UintArray = max ? getUintArray(max) : Array; - if (!UintArray) { - throw new Error('invalid max value: ' + max); - } - this.#max = max; - this.#maxSize = maxSize; - this.maxEntrySize = maxEntrySize || this.#maxSize; - this.sizeCalculation = sizeCalculation; - if (this.sizeCalculation) { - if (!this.#maxSize && !this.maxEntrySize) { - throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize'); - } - if (typeof this.sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation set to non-function'); - } - } - if (fetchMethod !== undefined && - typeof fetchMethod !== 'function') { - throw new TypeError('fetchMethod must be a function if specified'); - } - this.#fetchMethod = fetchMethod; - this.#hasFetchMethod = !!fetchMethod; - this.#keyMap = new Map(); - this.#keyList = new Array(max).fill(undefined); - this.#valList = new Array(max).fill(undefined); - this.#next = new UintArray(max); - this.#prev = new UintArray(max); - this.#head = 0; - this.#tail = 0; - this.#free = Stack.create(max); - this.#size = 0; - this.#calculatedSize = 0; - if (typeof dispose === 'function') { - this.#dispose = dispose; - } - if (typeof disposeAfter === 'function') { - this.#disposeAfter = disposeAfter; - this.#disposed = []; - } - else { - this.#disposeAfter = undefined; - this.#disposed = undefined; - } - this.#hasDispose = !!this.#dispose; - this.#hasDisposeAfter = !!this.#disposeAfter; - this.noDisposeOnSet = !!noDisposeOnSet; - this.noUpdateTTL = !!noUpdateTTL; - this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; - this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; - this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; - this.ignoreFetchAbort = !!ignoreFetchAbort; - // NB: maxEntrySize is set to maxSize if it's set - if (this.maxEntrySize !== 0) { - if (this.#maxSize !== 0) { - if (!isPosInt(this.#maxSize)) { - throw new TypeError('maxSize must be a positive integer if specified'); - } - } - if (!isPosInt(this.maxEntrySize)) { - throw new TypeError('maxEntrySize must be a positive integer if specified'); - } - this.#initializeSizeTracking(); - } - this.allowStale = !!allowStale; - this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; - this.updateAgeOnGet = !!updateAgeOnGet; - this.updateAgeOnHas = !!updateAgeOnHas; - this.ttlResolution = - isPosInt(ttlResolution) || ttlResolution === 0 - ? ttlResolution - : 1; - this.ttlAutopurge = !!ttlAutopurge; - this.ttl = ttl || 0; - if (this.ttl) { - if (!isPosInt(this.ttl)) { - throw new TypeError('ttl must be a positive integer if specified'); - } - this.#initializeTTLTracking(); - } - // do not allow completely unbounded caches - if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { - throw new TypeError('At least one of max, maxSize, or ttl is required'); - } - if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { - const code = 'LRU_CACHE_UNBOUNDED'; - if (shouldWarn(code)) { - warned.add(code); - const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' + - 'result in unbounded memory consumption.'; - emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache); - } - } - } - /** - * Return the remaining TTL time for a given entry key - */ - getRemainingTTL(key) { - return this.#keyMap.has(key) ? Infinity : 0; - } - #initializeTTLTracking() { - const ttls = new ZeroArray(this.#max); - const starts = new ZeroArray(this.#max); - this.#ttls = ttls; - this.#starts = starts; - this.#setItemTTL = (index, ttl, start = perf.now()) => { - starts[index] = ttl !== 0 ? start : 0; - ttls[index] = ttl; - if (ttl !== 0 && this.ttlAutopurge) { - const t = setTimeout(() => { - if (this.#isStale(index)) { - this.delete(this.#keyList[index]); - } - }, ttl + 1); - // unref() not supported on all platforms - /* c8 ignore start */ - if (t.unref) { - t.unref(); - } - /* c8 ignore stop */ - } - }; - this.#updateItemAge = index => { - starts[index] = ttls[index] !== 0 ? perf.now() : 0; - }; - this.#statusTTL = (status, index) => { - if (ttls[index]) { - const ttl = ttls[index]; - const start = starts[index]; - /* c8 ignore next */ - if (!ttl || !start) - return; - status.ttl = ttl; - status.start = start; - status.now = cachedNow || getNow(); - const age = status.now - start; - status.remainingTTL = ttl - age; - } - }; - // debounce calls to perf.now() to 1s so we're not hitting - // that costly call repeatedly. - let cachedNow = 0; - const getNow = () => { - const n = perf.now(); - if (this.ttlResolution > 0) { - cachedNow = n; - const t = setTimeout(() => (cachedNow = 0), this.ttlResolution); - // not available on all platforms - /* c8 ignore start */ - if (t.unref) { - t.unref(); - } - /* c8 ignore stop */ - } - return n; - }; - this.getRemainingTTL = key => { - const index = this.#keyMap.get(key); - if (index === undefined) { - return 0; - } - const ttl = ttls[index]; - const start = starts[index]; - if (!ttl || !start) { - return Infinity; - } - const age = (cachedNow || getNow()) - start; - return ttl - age; - }; - this.#isStale = index => { - const s = starts[index]; - const t = ttls[index]; - return !!t && !!s && (cachedNow || getNow()) - s > t; - }; - } - // conditionally set private methods related to TTL - #updateItemAge = () => { }; - #statusTTL = () => { }; - #setItemTTL = () => { }; - /* c8 ignore stop */ - #isStale = () => false; - #initializeSizeTracking() { - const sizes = new ZeroArray(this.#max); - this.#calculatedSize = 0; - this.#sizes = sizes; - this.#removeItemSize = index => { - this.#calculatedSize -= sizes[index]; - sizes[index] = 0; - }; - this.#requireSize = (k, v, size, sizeCalculation) => { - // provisionally accept background fetches. - // actual value size will be checked when they return. - if (this.#isBackgroundFetch(v)) { - return 0; - } - if (!isPosInt(size)) { - if (sizeCalculation) { - if (typeof sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation must be a function'); - } - size = sizeCalculation(v, k); - if (!isPosInt(size)) { - throw new TypeError('sizeCalculation return invalid (expect positive integer)'); - } - } - else { - throw new TypeError('invalid size value (must be positive integer). ' + - 'When maxSize or maxEntrySize is used, sizeCalculation ' + - 'or size must be set.'); - } - } - return size; - }; - this.#addItemSize = (index, size, status) => { - sizes[index] = size; - if (this.#maxSize) { - const maxSize = this.#maxSize - sizes[index]; - while (this.#calculatedSize > maxSize) { - this.#evict(true); - } - } - this.#calculatedSize += sizes[index]; - if (status) { - status.entrySize = size; - status.totalCalculatedSize = this.#calculatedSize; - } - }; - } - #removeItemSize = _i => { }; - #addItemSize = (_i, _s, _st) => { }; - #requireSize = (_k, _v, size, sizeCalculation) => { - if (size || sizeCalculation) { - throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache'); - } - return 0; - }; - *#indexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#tail; true;) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#head) { - break; - } - else { - i = this.#prev[i]; - } - } - } - } - *#rindexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#head; true;) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#tail) { - break; - } - else { - i = this.#next[i]; - } - } - } - } - #isValidIndex(index) { - return (index !== undefined && - this.#keyMap.get(this.#keyList[index]) === index); - } - /** - * Return a generator yielding `[key, value]` pairs, - * in order from most recently used to least recently used. - */ - *entries() { - for (const i of this.#indexes()) { - if (this.#valList[i] !== undefined && - this.#keyList[i] !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } - } - } - /** - * Inverse order version of {@link LRUCache.entries} - * - * Return a generator yielding `[key, value]` pairs, - * in order from least recently used to most recently used. - */ - *rentries() { - for (const i of this.#rindexes()) { - if (this.#valList[i] !== undefined && - this.#keyList[i] !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } - } - } - /** - * Return a generator yielding the keys in the cache, - * in order from most recently used to least recently used. - */ - *keys() { - for (const i of this.#indexes()) { - const k = this.#keyList[i]; - if (k !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield k; - } - } - } - /** - * Inverse order version of {@link LRUCache.keys} - * - * Return a generator yielding the keys in the cache, - * in order from least recently used to most recently used. - */ - *rkeys() { - for (const i of this.#rindexes()) { - const k = this.#keyList[i]; - if (k !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield k; - } - } - } - /** - * Return a generator yielding the values in the cache, - * in order from most recently used to least recently used. - */ - *values() { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - if (v !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; - } - } - } - /** - * Inverse order version of {@link LRUCache.values} - * - * Return a generator yielding the values in the cache, - * in order from least recently used to most recently used. - */ - *rvalues() { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - if (v !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; - } - } - } - /** - * Iterating over the cache itself yields the same results as - * {@link LRUCache.entries} - */ - [Symbol.iterator]() { - return this.entries(); - } - /** - * Find a value for which the supplied fn method returns a truthy value, - * similar to Array.find(). fn is called as fn(value, key, cache). - */ - find(fn, getOptions = {}) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - if (fn(value, this.#keyList[i], this)) { - return this.get(this.#keyList[i], getOptions); - } - } - } - /** - * Call the supplied function on each item in the cache, in order from - * most recently used to least recently used. fn is called as - * fn(value, key, cache). Does not update age or recenty of use. - * Does not iterate over stale values. - */ - forEach(fn, thisp = this) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - fn.call(thisp, value, this.#keyList[i], this); - } - } - /** - * The same as {@link LRUCache.forEach} but items are iterated over in - * reverse order. (ie, less recently used items are iterated over first.) - */ - rforEach(fn, thisp = this) { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - fn.call(thisp, value, this.#keyList[i], this); - } - } - /** - * Delete any stale entries. Returns true if anything was removed, - * false otherwise. - */ - purgeStale() { - let deleted = false; - for (const i of this.#rindexes({ allowStale: true })) { - if (this.#isStale(i)) { - this.delete(this.#keyList[i]); - deleted = true; - } - } - return deleted; - } - /** - * Get the extended info about a given entry, to get its value, size, and - * TTL info simultaneously. Like {@link LRUCache#dump}, but just for a - * single key. Always returns stale values, if their info is found in the - * cache, so be sure to check for expired TTLs if relevant. - */ - info(key) { - const i = this.#keyMap.get(key); - if (i === undefined) - return undefined; - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - return undefined; - const entry = { value }; - if (this.#ttls && this.#starts) { - const ttl = this.#ttls[i]; - const start = this.#starts[i]; - if (ttl && start) { - const remain = ttl - (perf.now() - start); - entry.ttl = remain; - entry.start = Date.now(); - } - } - if (this.#sizes) { - entry.size = this.#sizes[i]; - } - return entry; - } - /** - * Return an array of [key, {@link LRUCache.Entry}] tuples which can be - * passed to cache.load() - */ - dump() { - const arr = []; - for (const i of this.#indexes({ allowStale: true })) { - const key = this.#keyList[i]; - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined || key === undefined) - continue; - const entry = { value }; - if (this.#ttls && this.#starts) { - entry.ttl = this.#ttls[i]; - // always dump the start relative to a portable timestamp - // it's ok for this to be a bit slow, it's a rare operation. - const age = perf.now() - this.#starts[i]; - entry.start = Math.floor(Date.now() - age); - } - if (this.#sizes) { - entry.size = this.#sizes[i]; - } - arr.unshift([key, entry]); - } - return arr; - } - /** - * Reset the cache and load in the items in entries in the order listed. - * Note that the shape of the resulting cache may be different if the - * same options are not used in both caches. - */ - load(arr) { - this.clear(); - for (const [key, entry] of arr) { - if (entry.start) { - // entry.start is a portable timestamp, but we may be using - // node's performance.now(), so calculate the offset, so that - // we get the intended remaining TTL, no matter how long it's - // been on ice. - // - // it's ok for this to be a bit slow, it's a rare operation. - const age = Date.now() - entry.start; - entry.start = perf.now() - age; - } - this.set(key, entry.value, entry); - } - } - /** - * Add a value to the cache. - * - * Note: if `undefined` is specified as a value, this is an alias for - * {@link LRUCache#delete} - */ - set(k, v, setOptions = {}) { - if (v === undefined) { - this.delete(k); - return this; - } - const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions; - let { noUpdateTTL = this.noUpdateTTL } = setOptions; - const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); - // if the item doesn't fit, don't do anything - // NB: maxEntrySize set to maxSize by default - if (this.maxEntrySize && size > this.maxEntrySize) { - if (status) { - status.set = 'miss'; - status.maxEntrySizeExceeded = true; - } - // have to delete, in case something is there already. - this.delete(k); - return this; - } - let index = this.#size === 0 ? undefined : this.#keyMap.get(k); - if (index === undefined) { - // addition - index = (this.#size === 0 - ? this.#tail - : this.#free.length !== 0 - ? this.#free.pop() - : this.#size === this.#max - ? this.#evict(false) - : this.#size); - this.#keyList[index] = k; - this.#valList[index] = v; - this.#keyMap.set(k, index); - this.#next[this.#tail] = index; - this.#prev[index] = this.#tail; - this.#tail = index; - this.#size++; - this.#addItemSize(index, size, status); - if (status) - status.set = 'add'; - noUpdateTTL = false; - } - else { - // update - this.#moveToTail(index); - const oldVal = this.#valList[index]; - if (v !== oldVal) { - if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { - oldVal.__abortController.abort(new Error('replaced')); - const { __staleWhileFetching: s } = oldVal; - if (s !== undefined && !noDisposeOnSet) { - if (this.#hasDispose) { - this.#dispose?.(s, k, 'set'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([s, k, 'set']); - } - } - } - else if (!noDisposeOnSet) { - if (this.#hasDispose) { - this.#dispose?.(oldVal, k, 'set'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([oldVal, k, 'set']); - } - } - this.#removeItemSize(index); - this.#addItemSize(index, size, status); - this.#valList[index] = v; - if (status) { - status.set = 'replace'; - const oldValue = oldVal && this.#isBackgroundFetch(oldVal) - ? oldVal.__staleWhileFetching - : oldVal; - if (oldValue !== undefined) - status.oldValue = oldValue; - } - } - else if (status) { - status.set = 'update'; - } - } - if (ttl !== 0 && !this.#ttls) { - this.#initializeTTLTracking(); - } - if (this.#ttls) { - if (!noUpdateTTL) { - this.#setItemTTL(index, ttl, start); - } - if (status) - this.#statusTTL(status, index); - } - if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - return this; - } - /** - * Evict the least recently used item, returning its value or - * `undefined` if cache is empty. - */ - pop() { - try { - while (this.#size) { - const val = this.#valList[this.#head]; - this.#evict(true); - if (this.#isBackgroundFetch(val)) { - if (val.__staleWhileFetching) { - return val.__staleWhileFetching; - } - } - else if (val !== undefined) { - return val; - } - } - } - finally { - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - } - } - #evict(free) { - const head = this.#head; - const k = this.#keyList[head]; - const v = this.#valList[head]; - if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('evicted')); - } - else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, 'evict'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'evict']); - } - } - this.#removeItemSize(head); - // if we aren't about to use the index, then null these out - if (free) { - this.#keyList[head] = undefined; - this.#valList[head] = undefined; - this.#free.push(head); - } - if (this.#size === 1) { - this.#head = this.#tail = 0; - this.#free.length = 0; - } - else { - this.#head = this.#next[head]; - } - this.#keyMap.delete(k); - this.#size--; - return head; - } - /** - * Check if a key is in the cache, without updating the recency of use. - * Will return false if the item is stale, even though it is technically - * in the cache. - * - * Will not update item age unless - * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. - */ - has(k, hasOptions = {}) { - const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; - const index = this.#keyMap.get(k); - if (index !== undefined) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v) && - v.__staleWhileFetching === undefined) { - return false; - } - if (!this.#isStale(index)) { - if (updateAgeOnHas) { - this.#updateItemAge(index); - } - if (status) { - status.has = 'hit'; - this.#statusTTL(status, index); - } - return true; - } - else if (status) { - status.has = 'stale'; - this.#statusTTL(status, index); - } - } - else if (status) { - status.has = 'miss'; - } - return false; - } - /** - * Like {@link LRUCache#get} but doesn't update recency or delete stale - * items. - * - * Returns `undefined` if the item is stale, unless - * {@link LRUCache.OptionsBase.allowStale} is set. - */ - peek(k, peekOptions = {}) { - const { allowStale = this.allowStale } = peekOptions; - const index = this.#keyMap.get(k); - if (index === undefined || - (!allowStale && this.#isStale(index))) { - return; - } - const v = this.#valList[index]; - // either stale and allowed, or forcing a refresh of non-stale value - return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; - } - #backgroundFetch(k, index, options, context) { - const v = index === undefined ? undefined : this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - return v; - } - const ac = new AC(); - const { signal } = options; - // when/if our AC signals, then stop listening to theirs. - signal?.addEventListener('abort', () => ac.abort(signal.reason), { - signal: ac.signal, - }); - const fetchOpts = { - signal: ac.signal, - options, - context, - }; - const cb = (v, updateCache = false) => { - const { aborted } = ac.signal; - const ignoreAbort = options.ignoreFetchAbort && v !== undefined; - if (options.status) { - if (aborted && !updateCache) { - options.status.fetchAborted = true; - options.status.fetchError = ac.signal.reason; - if (ignoreAbort) - options.status.fetchAbortIgnored = true; - } - else { - options.status.fetchResolved = true; - } - } - if (aborted && !ignoreAbort && !updateCache) { - return fetchFail(ac.signal.reason); - } - // either we didn't abort, and are still here, or we did, and ignored - const bf = p; - if (this.#valList[index] === p) { - if (v === undefined) { - if (bf.__staleWhileFetching) { - this.#valList[index] = bf.__staleWhileFetching; - } - else { - this.delete(k); - } - } - else { - if (options.status) - options.status.fetchUpdated = true; - this.set(k, v, fetchOpts.options); - } - } - return v; - }; - const eb = (er) => { - if (options.status) { - options.status.fetchRejected = true; - options.status.fetchError = er; - } - return fetchFail(er); - }; - const fetchFail = (er) => { - const { aborted } = ac.signal; - const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; - const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; - const noDelete = allowStale || options.noDeleteOnFetchRejection; - const bf = p; - if (this.#valList[index] === p) { - // if we allow stale on fetch rejections, then we need to ensure that - // the stale value is not removed from the cache when the fetch fails. - const del = !noDelete || bf.__staleWhileFetching === undefined; - if (del) { - this.delete(k); - } - else if (!allowStaleAborted) { - // still replace the *promise* with the stale value, - // since we are done with the promise at this point. - // leave it untouched if we're still waiting for an - // aborted background fetch that hasn't yet returned. - this.#valList[index] = bf.__staleWhileFetching; - } - } - if (allowStale) { - if (options.status && bf.__staleWhileFetching !== undefined) { - options.status.returnedStale = true; - } - return bf.__staleWhileFetching; - } - else if (bf.__returned === bf) { - throw er; - } - }; - const pcall = (res, rej) => { - const fmp = this.#fetchMethod?.(k, v, fetchOpts); - if (fmp && fmp instanceof Promise) { - fmp.then(v => res(v === undefined ? undefined : v), rej); - } - // ignored, we go until we finish, regardless. - // defer check until we are actually aborting, - // so fetchMethod can override. - ac.signal.addEventListener('abort', () => { - if (!options.ignoreFetchAbort || - options.allowStaleOnFetchAbort) { - res(undefined); - // when it eventually resolves, update the cache. - if (options.allowStaleOnFetchAbort) { - res = v => cb(v, true); - } - } - }); - }; - if (options.status) - options.status.fetchDispatched = true; - const p = new Promise(pcall).then(cb, eb); - const bf = Object.assign(p, { - __abortController: ac, - __staleWhileFetching: v, - __returned: undefined, - }); - if (index === undefined) { - // internal, don't expose status. - this.set(k, bf, { ...fetchOpts.options, status: undefined }); - index = this.#keyMap.get(k); - } - else { - this.#valList[index] = bf; - } - return bf; - } - #isBackgroundFetch(p) { - if (!this.#hasFetchMethod) - return false; - const b = p; - return (!!b && - b instanceof Promise && - b.hasOwnProperty('__staleWhileFetching') && - b.__abortController instanceof AC); - } - async fetch(k, fetchOptions = {}) { - const { - // get options - allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, - // set options - ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, - // fetch exclusive options - noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions; - if (!this.#hasFetchMethod) { - if (status) - status.fetch = 'get'; - return this.get(k, { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - status, - }); - } - const options = { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - ttl, - noDisposeOnSet, - size, - sizeCalculation, - noUpdateTTL, - noDeleteOnFetchRejection, - allowStaleOnFetchRejection, - allowStaleOnFetchAbort, - ignoreFetchAbort, - status, - signal, - }; - let index = this.#keyMap.get(k); - if (index === undefined) { - if (status) - status.fetch = 'miss'; - const p = this.#backgroundFetch(k, index, options, context); - return (p.__returned = p); - } - else { - // in cache, maybe already fetching - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - const stale = allowStale && v.__staleWhileFetching !== undefined; - if (status) { - status.fetch = 'inflight'; - if (stale) - status.returnedStale = true; - } - return stale ? v.__staleWhileFetching : (v.__returned = v); - } - // if we force a refresh, that means do NOT serve the cached value, - // unless we are already in the process of refreshing the cache. - const isStale = this.#isStale(index); - if (!forceRefresh && !isStale) { - if (status) - status.fetch = 'hit'; - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); - } - if (status) - this.#statusTTL(status, index); - return v; - } - // ok, it is stale or a forced refresh, and not already fetching. - // refresh the cache. - const p = this.#backgroundFetch(k, index, options, context); - const hasStale = p.__staleWhileFetching !== undefined; - const staleVal = hasStale && allowStale; - if (status) { - status.fetch = isStale ? 'stale' : 'refresh'; - if (staleVal && isStale) - status.returnedStale = true; - } - return staleVal ? p.__staleWhileFetching : (p.__returned = p); - } - } - /** - * Return a value from the cache. Will update the recency of the cache - * entry found. - * - * If the key is not found, get() will return `undefined`. - */ - get(k, getOptions = {}) { - const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions; - const index = this.#keyMap.get(k); - if (index !== undefined) { - const value = this.#valList[index]; - const fetching = this.#isBackgroundFetch(value); - if (status) - this.#statusTTL(status, index); - if (this.#isStale(index)) { - if (status) - status.get = 'stale'; - // delete only if not an in-flight background fetch - if (!fetching) { - if (!noDeleteOnStaleGet) { - this.delete(k); - } - if (status && allowStale) - status.returnedStale = true; - return allowStale ? value : undefined; - } - else { - if (status && - allowStale && - value.__staleWhileFetching !== undefined) { - status.returnedStale = true; - } - return allowStale ? value.__staleWhileFetching : undefined; - } - } - else { - if (status) - status.get = 'hit'; - // if we're currently fetching it, we don't actually have it yet - // it's not stale, which means this isn't a staleWhileRefetching. - // If it's not stale, and fetching, AND has a __staleWhileFetching - // value, then that means the user fetched with {forceRefresh:true}, - // so it's safe to return that value. - if (fetching) { - return value.__staleWhileFetching; - } - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); - } - return value; - } - } - else if (status) { - status.get = 'miss'; - } - } - #connect(p, n) { - this.#prev[n] = p; - this.#next[p] = n; - } - #moveToTail(index) { - // if tail already, nothing to do - // if head, move head to next[index] - // else - // move next[prev[index]] to next[index] (head has no prev) - // move prev[next[index]] to prev[index] - // prev[index] = tail - // next[tail] = index - // tail = index - if (index !== this.#tail) { - if (index === this.#head) { - this.#head = this.#next[index]; - } - else { - this.#connect(this.#prev[index], this.#next[index]); - } - this.#connect(this.#tail, index); - this.#tail = index; - } - } - /** - * Deletes a key out of the cache. - * Returns true if the key was deleted, false otherwise. - */ - delete(k) { - let deleted = false; - if (this.#size !== 0) { - const index = this.#keyMap.get(k); - if (index !== undefined) { - deleted = true; - if (this.#size === 1) { - this.clear(); - } - else { - this.#removeItemSize(index); - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } - else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, 'delete'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'delete']); - } - } - this.#keyMap.delete(k); - this.#keyList[index] = undefined; - this.#valList[index] = undefined; - if (index === this.#tail) { - this.#tail = this.#prev[index]; - } - else if (index === this.#head) { - this.#head = this.#next[index]; - } - else { - const pi = this.#prev[index]; - this.#next[pi] = this.#next[index]; - const ni = this.#next[index]; - this.#prev[ni] = this.#prev[index]; - } - this.#size--; - this.#free.push(index); - } - } - } - if (this.#hasDisposeAfter && this.#disposed?.length) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - return deleted; - } - /** - * Clear the cache entirely, throwing away all values. - */ - clear() { - for (const index of this.#rindexes({ allowStale: true })) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } - else { - const k = this.#keyList[index]; - if (this.#hasDispose) { - this.#dispose?.(v, k, 'delete'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'delete']); - } - } - } - this.#keyMap.clear(); - this.#valList.fill(undefined); - this.#keyList.fill(undefined); - if (this.#ttls && this.#starts) { - this.#ttls.fill(0); - this.#starts.fill(0); - } - if (this.#sizes) { - this.#sizes.fill(0); - } - this.#head = 0; - this.#tail = 0; - this.#free.length = 0; - this.#calculatedSize = 0; - this.#size = 0; - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - } -} - -function createCache(max = 500) { - return new LRUCache({ max }); -} - -function isImportUsed(local, sfc) { - return resolveTemplateUsedIdentifiers(sfc).has(local); -} -const templateUsageCheckCache = createCache(); -function resolveTemplateUsedIdentifiers(sfc) { - const { content, ast } = sfc.template; - const cached = templateUsageCheckCache.get(content); - if (cached) { - return cached; - } - const ids = /* @__PURE__ */ new Set(); - ast.children.forEach(walk); - function walk(node) { - var _a; - switch (node.type) { - case 1: - let tag = node.tag; - if (tag.includes(".")) tag = tag.split(".")[0].trim(); - if (!CompilerDOM.parserOptions.isNativeTag(tag) && !CompilerDOM.parserOptions.isBuiltInComponent(tag)) { - ids.add(shared.camelize(tag)); - ids.add(shared.capitalize(shared.camelize(tag))); - } - for (let i = 0; i < node.props.length; i++) { - const prop = node.props[i]; - if (prop.type === 7) { - if (!shared.isBuiltInDirective(prop.name)) { - ids.add(`v${shared.capitalize(shared.camelize(prop.name))}`); - } - if (prop.arg && !prop.arg.isStatic) { - extractIdentifiers(ids, prop.arg); - } - if (prop.name === "for") { - extractIdentifiers(ids, prop.forParseResult.source); - } else if (prop.exp) { - extractIdentifiers(ids, prop.exp); - } else if (prop.name === "bind" && !prop.exp) { - ids.add(shared.camelize(prop.arg.content)); - } - } - if (prop.type === 6 && prop.name === "ref" && ((_a = prop.value) == null ? void 0 : _a.content)) { - ids.add(prop.value.content); - } - } - node.children.forEach(walk); - break; - case 5: - extractIdentifiers(ids, node.content); - break; - } - } - templateUsageCheckCache.set(content, ids); - return ids; -} -function extractIdentifiers(ids, node) { - if (node.ast) { - CompilerDOM.walkIdentifiers(node.ast, (n) => ids.add(n.name)); - } else if (node.ast === null) { - ids.add(node.content); - } -} - -const DEFAULT_FILENAME = "anonymous.vue"; -const parseCache$1 = createCache(); -function parse$1(source, options = {}) { - var _a; - const sourceKey = shared.genCacheKey(source, { - ...options, - compiler: { parse: (_a = options.compiler) == null ? void 0 : _a.parse } - }); - const cache = parseCache$1.get(sourceKey); - if (cache) { - return cache; - } - const { - sourceMap = true, - filename = DEFAULT_FILENAME, - sourceRoot = "", - pad = false, - ignoreEmpty = true, - compiler = CompilerDOM__namespace, - templateParseOptions = {} - } = options; - const descriptor = { - filename, - source, - template: null, - script: null, - scriptSetup: null, - styles: [], - customBlocks: [], - cssVars: [], - slotted: false, - shouldForceReload: (prevImports) => hmrShouldReload(prevImports, descriptor) - }; - const errors = []; - const ast = compiler.parse(source, { - parseMode: "sfc", - prefixIdentifiers: true, - ...templateParseOptions, - onError: (e) => { - errors.push(e); - } - }); - ast.children.forEach((node) => { - if (node.type !== 1) { - return; - } - if (ignoreEmpty && node.tag !== "template" && isEmpty(node) && !hasSrc(node)) { - return; - } - switch (node.tag) { - case "template": - if (!descriptor.template) { - const templateBlock = descriptor.template = createBlock( - node, - source, - false - ); - if (!templateBlock.attrs.src) { - templateBlock.ast = compilerCore.createRoot(node.children, source); - } - if (templateBlock.attrs.functional) { - const err = new SyntaxError( - `<template functional> is no longer supported in Vue 3, since functional components no longer have significant performance difference from stateful ones. Just use a normal <template> instead.` - ); - err.loc = node.props.find( - (p) => p.type === 6 && p.name === "functional" - ).loc; - errors.push(err); - } - } else { - errors.push(createDuplicateBlockError(node)); - } - break; - case "script": - const scriptBlock = createBlock(node, source, pad); - const isSetup = !!scriptBlock.attrs.setup; - if (isSetup && !descriptor.scriptSetup) { - descriptor.scriptSetup = scriptBlock; - break; - } - if (!isSetup && !descriptor.script) { - descriptor.script = scriptBlock; - break; - } - errors.push(createDuplicateBlockError(node, isSetup)); - break; - case "style": - const styleBlock = createBlock(node, source, pad); - if (styleBlock.attrs.vars) { - errors.push( - new SyntaxError( - `<style vars> has been replaced by a new proposal: https://github.com/vuejs/rfcs/pull/231` - ) - ); - } - descriptor.styles.push(styleBlock); - break; - default: - descriptor.customBlocks.push(createBlock(node, source, pad)); - break; - } - }); - if (!descriptor.template && !descriptor.script && !descriptor.scriptSetup) { - errors.push( - new SyntaxError( - `At least one <template> or <script> is required in a single file component. ${descriptor.filename}` - ) - ); - } - if (descriptor.scriptSetup) { - if (descriptor.scriptSetup.src) { - errors.push( - new SyntaxError( - `<script setup> cannot use the "src" attribute because its syntax will be ambiguous outside of the component.` - ) - ); - descriptor.scriptSetup = null; - } - if (descriptor.script && descriptor.script.src) { - errors.push( - new SyntaxError( - `<script> cannot use the "src" attribute when <script setup> is also present because they must be processed together.` - ) - ); - descriptor.script = null; - } - } - let templateColumnOffset = 0; - if (descriptor.template && (descriptor.template.lang === "pug" || descriptor.template.lang === "jade")) { - [descriptor.template.content, templateColumnOffset] = dedent( - descriptor.template.content - ); - } - if (sourceMap) { - const genMap = (block, columnOffset = 0) => { - if (block && !block.src) { - block.map = generateSourceMap( - filename, - source, - block.content, - sourceRoot, - !pad || block.type === "template" ? block.loc.start.line - 1 : 0, - columnOffset - ); - } - }; - genMap(descriptor.template, templateColumnOffset); - genMap(descriptor.script); - descriptor.styles.forEach((s) => genMap(s)); - descriptor.customBlocks.forEach((s) => genMap(s)); - } - descriptor.cssVars = parseCssVars(descriptor); - const slottedRE = /(?:::v-|:)slotted\(/; - descriptor.slotted = descriptor.styles.some( - (s) => s.scoped && slottedRE.test(s.content) - ); - const result = { - descriptor, - errors - }; - parseCache$1.set(sourceKey, result); - return result; -} -function createDuplicateBlockError(node, isScriptSetup = false) { - const err = new SyntaxError( - `Single file component can contain only one <${node.tag}${isScriptSetup ? ` setup` : ``}> element` - ); - err.loc = node.loc; - return err; -} -function createBlock(node, source, pad) { - const type = node.tag; - const loc = node.innerLoc; - const attrs = {}; - const block = { - type, - content: source.slice(loc.start.offset, loc.end.offset), - loc, - attrs - }; - if (pad) { - block.content = padContent(source, block, pad) + block.content; - } - node.props.forEach((p) => { - if (p.type === 6) { - const name = p.name; - attrs[name] = p.value ? p.value.content || true : true; - if (name === "lang") { - block.lang = p.value && p.value.content; - } else if (name === "src") { - block.src = p.value && p.value.content; - } else if (type === "style") { - if (name === "scoped") { - block.scoped = true; - } else if (name === "module") { - block.module = attrs[name]; - } - } else if (type === "script" && name === "setup") { - block.setup = attrs.setup; - } - } - }); - return block; -} -const splitRE = /\r?\n/g; -const emptyRE = /^(?:\/\/)?\s*$/; -const replaceRE = /./g; -function generateSourceMap(filename, source, generated, sourceRoot, lineOffset, columnOffset) { - const map = new sourceMapJs.SourceMapGenerator({ - file: filename.replace(/\\/g, "/"), - sourceRoot: sourceRoot.replace(/\\/g, "/") - }); - map.setSourceContent(filename, source); - map._sources.add(filename); - generated.split(splitRE).forEach((line, index) => { - if (!emptyRE.test(line)) { - const originalLine = index + 1 + lineOffset; - const generatedLine = index + 1; - for (let i = 0; i < line.length; i++) { - if (!/\s/.test(line[i])) { - map._mappings.add({ - originalLine, - originalColumn: i + columnOffset, - generatedLine, - generatedColumn: i, - source: filename, - name: null - }); - } - } - } - }); - return map.toJSON(); -} -function padContent(content, block, pad) { - content = content.slice(0, block.loc.start.offset); - if (pad === "space") { - return content.replace(replaceRE, " "); - } else { - const offset = content.split(splitRE).length; - const padChar = block.type === "script" && !block.lang ? "//\n" : "\n"; - return Array(offset).join(padChar); - } -} -function hasSrc(node) { - return node.props.some((p) => { - if (p.type !== 6) { - return false; - } - return p.name === "src"; - }); -} -function isEmpty(node) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (child.type !== 2 || child.content.trim() !== "") { - return false; - } - } - return true; -} -function hmrShouldReload(prevImports, next) { - if (!next.scriptSetup || next.scriptSetup.lang !== "ts" && next.scriptSetup.lang !== "tsx") { - return false; - } - for (const key in prevImports) { - if (!prevImports[key].isUsedInTemplate && isImportUsed(key, next)) { - return true; - } - } - return false; -} -function dedent(s) { - const lines = s.split("\n"); - const minIndent = lines.reduce(function(minIndent2, line) { - var _a, _b; - if (line.trim() === "") { - return minIndent2; - } - const indent = ((_b = (_a = line.match(/^\s*/)) == null ? void 0 : _a[0]) == null ? void 0 : _b.length) || 0; - return Math.min(indent, minIndent2); - }, Infinity); - if (minIndent === 0) { - return [s, minIndent]; - } - return [ - lines.map(function(line) { - return line.slice(minIndent); - }).join("\n"), - minIndent - ]; -} - -function isRelativeUrl(url) { - const firstChar = url.charAt(0); - return firstChar === "." || firstChar === "~" || firstChar === "@"; -} -const externalRE = /^(https?:)?\/\//; -function isExternalUrl(url) { - return externalRE.test(url); -} -const dataUrlRE = /^\s*data:/i; -function isDataUrl(url) { - return dataUrlRE.test(url); -} -function parseUrl(url) { - const firstChar = url.charAt(0); - if (firstChar === "~") { - const secondChar = url.charAt(1); - url = url.slice(secondChar === "/" ? 2 : 1); - } - return parseUriParts(url); -} -function parseUriParts(urlString) { - return url.parse(shared.isString(urlString) ? urlString : "", false, true); -} - -const defaultAssetUrlOptions = { - base: null, - includeAbsolute: false, - tags: { - video: ["src", "poster"], - source: ["src"], - img: ["src"], - image: ["xlink:href", "href"], - use: ["xlink:href", "href"] - } -}; -const normalizeOptions = (options) => { - if (Object.keys(options).some((key) => shared.isArray(options[key]))) { - return { - ...defaultAssetUrlOptions, - tags: options - }; - } - return { - ...defaultAssetUrlOptions, - ...options - }; -}; -const createAssetUrlTransformWithOptions = (options) => { - return (node, context) => transformAssetUrl(node, context, options); -}; -const transformAssetUrl = (node, context, options = defaultAssetUrlOptions) => { - if (node.type === 1) { - if (!node.props.length) { - return; - } - const tags = options.tags || defaultAssetUrlOptions.tags; - const attrs = tags[node.tag]; - const wildCardAttrs = tags["*"]; - if (!attrs && !wildCardAttrs) { - return; - } - const assetAttrs = (attrs || []).concat(wildCardAttrs || []); - node.props.forEach((attr, index) => { - if (attr.type !== 6 || !assetAttrs.includes(attr.name) || !attr.value || isExternalUrl(attr.value.content) || isDataUrl(attr.value.content) || attr.value.content[0] === "#" || !options.includeAbsolute && !isRelativeUrl(attr.value.content)) { - return; - } - const url = parseUrl(attr.value.content); - if (options.base && attr.value.content[0] === ".") { - const base = parseUrl(options.base); - const protocol = base.protocol || ""; - const host = base.host ? protocol + "//" + base.host : ""; - const basePath = base.path || "/"; - attr.value.content = host + (path$1.posix || path$1).join(basePath, url.path + (url.hash || "")); - return; - } - const exp = getImportsExpressionExp(url.path, url.hash, attr.loc, context); - node.props[index] = { - type: 7, - name: "bind", - arg: compilerCore.createSimpleExpression(attr.name, true, attr.loc), - exp, - modifiers: [], - loc: attr.loc - }; - }); - } -}; -function getImportsExpressionExp(path2, hash, loc, context) { - if (path2) { - let name; - let exp; - const existingIndex = context.imports.findIndex((i) => i.path === path2); - if (existingIndex > -1) { - name = `_imports_${existingIndex}`; - exp = context.imports[existingIndex].exp; - } else { - name = `_imports_${context.imports.length}`; - exp = compilerCore.createSimpleExpression( - name, - false, - loc, - 3 - ); - context.imports.push({ - exp, - path: decodeURIComponent(path2) - }); - } - if (!hash) { - return exp; - } - const hashExp = `${name} + '${hash}'`; - const finalExp = compilerCore.createSimpleExpression( - hashExp, - false, - loc, - 3 - ); - if (!context.hoistStatic) { - return finalExp; - } - const existingHoistIndex = context.hoists.findIndex((h) => { - return h && h.type === 4 && !h.isStatic && h.content === hashExp; - }); - if (existingHoistIndex > -1) { - return compilerCore.createSimpleExpression( - `_hoisted_${existingHoistIndex + 1}`, - false, - loc, - 3 - ); - } - return context.hoist(finalExp); - } else { - return compilerCore.createSimpleExpression(`''`, false, loc, 3); - } -} - -const srcsetTags = ["img", "source"]; -const escapedSpaceCharacters = /( |\\t|\\n|\\f|\\r)+/g; -const createSrcsetTransformWithOptions = (options) => { - return (node, context) => transformSrcset(node, context, options); -}; -const transformSrcset = (node, context, options = defaultAssetUrlOptions) => { - if (node.type === 1) { - if (srcsetTags.includes(node.tag) && node.props.length) { - node.props.forEach((attr, index) => { - if (attr.name === "srcset" && attr.type === 6) { - if (!attr.value) return; - const value = attr.value.content; - if (!value) return; - const imageCandidates = value.split(",").map((s) => { - const [url, descriptor] = s.replace(escapedSpaceCharacters, " ").trim().split(" ", 2); - return { url, descriptor }; - }); - for (let i = 0; i < imageCandidates.length; i++) { - const { url } = imageCandidates[i]; - if (isDataUrl(url)) { - imageCandidates[i + 1].url = url + "," + imageCandidates[i + 1].url; - imageCandidates.splice(i, 1); - } - } - const shouldProcessUrl = (url) => { - return !isExternalUrl(url) && !isDataUrl(url) && (options.includeAbsolute || isRelativeUrl(url)); - }; - if (!imageCandidates.some(({ url }) => shouldProcessUrl(url))) { - return; - } - if (options.base) { - const base = options.base; - const set = []; - let needImportTransform = false; - imageCandidates.forEach((candidate) => { - let { url, descriptor } = candidate; - descriptor = descriptor ? ` ${descriptor}` : ``; - if (url[0] === ".") { - candidate.url = (path$1.posix || path$1).join(base, url); - set.push(candidate.url + descriptor); - } else if (shouldProcessUrl(url)) { - needImportTransform = true; - } else { - set.push(url + descriptor); - } - }); - if (!needImportTransform) { - attr.value.content = set.join(", "); - return; - } - } - const compoundExpression = compilerCore.createCompoundExpression([], attr.loc); - imageCandidates.forEach(({ url, descriptor }, index2) => { - if (shouldProcessUrl(url)) { - const { path: path2 } = parseUrl(url); - let exp2; - if (path2) { - const existingImportsIndex = context.imports.findIndex( - (i) => i.path === path2 - ); - if (existingImportsIndex > -1) { - exp2 = compilerCore.createSimpleExpression( - `_imports_${existingImportsIndex}`, - false, - attr.loc, - 3 - ); - } else { - exp2 = compilerCore.createSimpleExpression( - `_imports_${context.imports.length}`, - false, - attr.loc, - 3 - ); - context.imports.push({ exp: exp2, path: path2 }); - } - compoundExpression.children.push(exp2); - } - } else { - const exp2 = compilerCore.createSimpleExpression( - `"${url}"`, - false, - attr.loc, - 3 - ); - compoundExpression.children.push(exp2); - } - const isNotLast = imageCandidates.length - 1 > index2; - if (descriptor && isNotLast) { - compoundExpression.children.push(` + ' ${descriptor}, ' + `); - } else if (descriptor) { - compoundExpression.children.push(` + ' ${descriptor}'`); - } else if (isNotLast) { - compoundExpression.children.push(` + ', ' + `); - } - }); - let exp = compoundExpression; - if (context.hoistStatic) { - exp = context.hoist(compoundExpression); - exp.constType = 3; - } - node.props[index] = { - type: 7, - name: "bind", - arg: compilerCore.createSimpleExpression("srcset", true, attr.loc), - exp, - modifiers: [], - loc: attr.loc - }; - } - }); - } - } -}; - -function commonjsRequire(path) { - throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); -} - -var consolidate$2 = {exports: {}}; - -var hasRequiredConsolidate$1; - -function requireConsolidate$1 () { - if (hasRequiredConsolidate$1) return consolidate$2.exports; - hasRequiredConsolidate$1 = 1; - (function (module, exports) { - /* - * Engines which do not support caching of their file contents - * should use the `read()` function defined in consolidate.js - * On top of this, when an engine compiles to a `Function`, - * these functions should either be cached within consolidate.js - * or the engine itself via `options.cache`. This will allow - * users and frameworks to pass `options.cache = true` for - * `NODE_ENV=production`, however edit the file(s) without - * re-loading the application in development. - */ - - /** - * Module dependencies. - */ - - var fs = require$$0; - var path = path$1; - var util = require$$2; - - var join = path.join; - var resolve = path.resolve; - var extname = path.extname; - var dirname = path.dirname; - var isAbsolute = path.isAbsolute; - - var readCache = {}; - - /** - * Require cache. - */ - - var cacheStore = {}; - - /** - * Require cache. - */ - - var requires = {}; - - /** - * Clear the cache. - * - * @api public - */ - - exports.clearCache = function() { - readCache = {}; - cacheStore = {}; - }; - - /** - * Conditionally cache `compiled` template based - * on the `options` filename and `.cache` boolean. - * - * @param {Object} options - * @param {Function} compiled - * @return {Function} - * @api private - */ - - function cache(options, compiled) { - // cachable - if (compiled && options.filename && options.cache) { - delete readCache[options.filename]; - cacheStore[options.filename] = compiled; - return compiled; - } - - // check cache - if (options.filename && options.cache) { - return cacheStore[options.filename]; - } - - return compiled; - } - - /** - * Read `path` with `options` with - * callback `(err, str)`. When `options.cache` - * is true the template string will be cached. - * - * @param {String} options - * @param {Function} cb - * @api private - */ - - function read(path, options, cb) { - var str = readCache[path]; - var cached = options.cache && str && typeof str === 'string'; - - // cached (only if cached is a string and not a compiled template function) - if (cached) return cb(null, str); - - // read - fs.readFile(path, 'utf8', function(err, str) { - if (err) return cb(err); - // remove extraneous utf8 BOM marker - str = str.replace(/^\uFEFF/, ''); - if (options.cache) readCache[path] = str; - cb(null, str); - }); - } - - /** - * Read `path` with `options` with - * callback `(err, str)`. When `options.cache` - * is true the partial string will be cached. - * - * @param {String} options - * @param {Function} fn - * @api private - */ - - function readPartials(path, options, cb) { - if (!options.partials) return cb(); - var keys = Object.keys(options.partials); - var partials = {}; - - function next(index) { - if (index === keys.length) return cb(null, partials); - var key = keys[index]; - var partialPath = options.partials[key]; - - if (partialPath === undefined || partialPath === null || partialPath === false) { - return next(++index); - } - - var file; - if (isAbsolute(partialPath)) { - if (extname(partialPath) !== '') { - file = partialPath; - } else { - file = join(partialPath + extname(path)); - } - } else { - file = join(dirname(path), partialPath + extname(path)); - } - - read(file, options, function(err, str) { - if (err) return cb(err); - partials[key] = str; - next(++index); - }); - } - - next(0); - } - - /** - * promisify - */ - function promisify(cb, fn) { - return new Promise(function(resolve, reject) { - cb = cb || function(err, html) { - if (err) { - return reject(err); - } - resolve(html); - }; - fn(cb); - }); - } - - /** - * fromStringRenderer - */ - - function fromStringRenderer(name) { - return function(path, options, cb) { - options.filename = path; - - return promisify(cb, function(cb) { - readPartials(path, options, function(err, partials) { - var extend = (requires.extend || (requires.extend = require$$2._extend)); - var opts = extend({}, options); - opts.partials = partials; - if (err) return cb(err); - if (cache(opts)) { - exports[name].render('', opts, cb); - } else { - read(path, opts, function(err, str) { - if (err) return cb(err); - exports[name].render(str, opts, cb); - }); - } - }); - }); - }; - } - - /** - * velocity support. - */ - - exports.velocityjs = fromStringRenderer('velocityjs'); - - /** - * velocity string support. - */ - - exports.velocityjs.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.velocityjs || (requires.velocityjs = require('velocityjs')); - try { - options.locals = options; - cb(null, engine.render(str, options).trimLeft()); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Liquid support. - */ - - exports.liquid = fromStringRenderer('liquid'); - - /** - * Liquid string support. - */ - - /** - * Note that in order to get filters and custom tags we've had to push - * all user-defined locals down into @locals. However, just to make things - * backwards-compatible, any property of `options` that is left after - * processing and removing `locals`, `meta`, `filters`, `customTags` and - * `includeDir` will also become a local. - */ - - function _renderTinyliquid(engine, str, options, cb) { - var context = engine.newContext(); - var k; - - /** - * Note that there's a bug in the library that doesn't allow us to pass - * the locals to newContext(), hence looping through the keys: - */ - - if (options.locals) { - for (k in options.locals) { - context.setLocals(k, options.locals[k]); - } - delete options.locals; - } - - if (options.meta) { - context.setLocals('page', options.meta); - delete options.meta; - } - - /** - * Add any defined filters: - */ - - if (options.filters) { - for (k in options.filters) { - context.setFilter(k, options.filters[k]); - } - delete options.filters; - } - - /** - * Set up a callback for the include directory: - */ - - var includeDir = options.includeDir || process.cwd(); - - context.onInclude(function(name, callback) { - var extname = path.extname(name) ? '' : '.liquid'; - var filename = path.resolve(includeDir, name + extname); - - fs.readFile(filename, {encoding: 'utf8'}, function(err, data) { - if (err) return callback(err); - callback(null, engine.parse(data)); - }); - }); - delete options.includeDir; - - /** - * The custom tag functions need to have their results pushed back - * through the parser, so set up a shim before calling the provided - * callback: - */ - - var compileOptions = { - customTags: {} - }; - - if (options.customTags) { - var tagFunctions = options.customTags; - - for (k in options.customTags) { - /*Tell jshint there's no problem with having this function in the loop */ - /*jshint -W083 */ - compileOptions.customTags[k] = function(context, name, body) { - var tpl = tagFunctions[name](body.trim()); - context.astStack.push(engine.parse(tpl)); - }; - /*jshint +W083 */ - } - delete options.customTags; - } - - /** - * Now anything left in `options` becomes a local: - */ - - for (k in options) { - context.setLocals(k, options[k]); - } - - /** - * Finally, execute the template: - */ - - var tmpl = cache(context) || cache(context, engine.compile(str, compileOptions)); - tmpl(context, cb); - } - - exports.liquid.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.liquid; - var Liquid; - - try { - // set up tinyliquid engine - engine = requires.liquid = require('tinyliquid'); - - // use tinyliquid engine - _renderTinyliquid(engine, str, options, cb); - - return; - - } catch (err) { - - // set up liquid-node engine - try { - Liquid = requires.liquid = require('liquid-node'); - engine = new Liquid.Engine(); - } catch (err) { - throw err; - } - - } - - // use liquid-node engine - try { - var locals = options.locals || {}; - - if (options.meta) { - locals.pages = options.meta; - delete options.meta; - } - - /** - * Add any defined filters: - */ - - if (options.filters) { - engine.registerFilters(options.filters); - delete options.filters; - } - - /** - * Set up a callback for the include directory: - */ - - var includeDir = options.includeDir || process.cwd(); - engine.fileSystem = new Liquid.LocalFileSystem(includeDir, 'liquid'); - delete options.includeDir; - - /** - * The custom tag functions need to have their results pushed back - * through the parser, so set up a shim before calling the provided - * callback: - */ - - if (options.customTags) { - var tagFunctions = options.customTags; - - for (k in options.customTags) { - engine.registerTag(k, tagFunctions[k]); - } - delete options.customTags; - } - - /** - * Now anything left in `options` becomes a local: - */ - - for (var k in options) { - locals[k] = options[k]; - } - - /** - * Finally, execute the template: - */ - - return engine - .parseAndRender(str, locals) - .nodeify(function(err, result) { - if (err) { - throw new Error(err); - } else { - return cb(null, result); - } - }); - - } catch (err) { - cb(err); - } - }); - }; - - /** - * Jade support. - */ - - exports.jade = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.jade; - if (!engine) { - try { - engine = requires.jade = require('jade'); - } catch (err) { - try { - engine = requires.jade = require('then-jade'); - } catch (otherError) { - throw err; - } - } - } - - try { - var tmpl = cache(options) || cache(options, engine.compileFile(path, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Jade string support. - */ - - exports.jade.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.jade; - if (!engine) { - try { - engine = requires.jade = require('jade'); - } catch (err) { - try { - engine = requires.jade = require('then-jade'); - } catch (otherError) { - throw err; - } - } - } - - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Dust support. - */ - - exports.dust = fromStringRenderer('dust'); - - /** - * Dust string support. - */ - - exports.dust.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.dust; - if (!engine) { - try { - engine = requires.dust = require('dust'); - } catch (err) { - try { - engine = requires.dust = require('dustjs-helpers'); - } catch (err) { - engine = requires.dust = require('dustjs-linkedin'); - } - } - } - - var ext = 'dust'; - var views = '.'; - - if (options) { - if (options.ext) ext = options.ext; - if (options.views) views = options.views; - if (options.settings && options.settings.views) views = options.settings.views; - } - if (!options || (options && !options.cache)) engine.cache = {}; - - engine.onLoad = function(path, callback) { - if (extname(path) === '') path += '.' + ext; - if (path[0] !== '/') path = views + '/' + path; - read(path, options, callback); - }; - - try { - var templateName; - if (options.filename) { - templateName = options.filename.replace(new RegExp('^' + views + '/'), '').replace(new RegExp('\\.' + ext), ''); - } - - var tmpl = cache(options) || cache(options, engine.compileFn(str, templateName)); - tmpl(options, cb); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Swig support. - */ - - exports.swig = fromStringRenderer('swig'); - - /** - * Swig string support. - */ - - exports.swig.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.swig; - if (!engine) { - try { - engine = requires.swig = require('swig'); - } catch (err) { - try { - engine = requires.swig = require('swig-templates'); - } catch (otherError) { - throw err; - } - } - } - - try { - if (options.cache === true) options.cache = 'memory'; - engine.setDefaults({ cache: options.cache }); - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Razor support. - */ - - exports.razor = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.razor; - if (!engine) { - try { - engine = requires.razor = require('razor-tmpl'); - - } catch (err) { - - throw err; - - } - } - try { - - var tmpl = cache(options) || cache(options, (locals) => { - console.log('Rendering razor file', path); - return engine.renderFileSync(path, locals); - }); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * razor string support. - */ - - exports.razor.render = function(str, options, cb) { - return promisify(cb, function(cb) { - - try { - var engine = requires.razor = require('razor-tmpl'); - } catch (err) { - throw err; - } - - try { - var tf = engine.compile(str); - var tmpl = cache(options) || cache(options, tf); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Atpl support. - */ - - exports.atpl = fromStringRenderer('atpl'); - - /** - * Atpl string support. - */ - - exports.atpl.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.atpl || (requires.atpl = require('atpl')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Liquor support, - */ - - exports.liquor = fromStringRenderer('liquor'); - - /** - * Liquor string support. - */ - - exports.liquor.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.liquor || (requires.liquor = require('liquor')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Twig support. - */ - - exports.twig = fromStringRenderer('twig'); - - /** - * Twig string support. - */ - - exports.twig.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.twig || (requires.twig = require('twig').twig); - var templateData = { - data: str, - allowInlineIncludes: options.allowInlineIncludes, - namespaces: options.namespaces, - path: options.path - }; - try { - var tmpl = cache(templateData) || cache(templateData, engine(templateData)); - cb(null, tmpl.render(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * EJS support. - */ - - exports.ejs = fromStringRenderer('ejs'); - - /** - * EJS string support. - */ - - exports.ejs.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.ejs || (requires.ejs = require('ejs')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Eco support. - */ - - exports.eco = fromStringRenderer('eco'); - - /** - * Eco string support. - */ - - exports.eco.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.eco || (requires.eco = require('eco')); - try { - cb(null, engine.render(str, options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Jazz support. - */ - - exports.jazz = fromStringRenderer('jazz'); - - /** - * Jazz string support. - */ - - exports.jazz.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.jazz || (requires.jazz = require('jazz')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - tmpl.eval(options, function(str) { - cb(null, str); - }); - } catch (err) { - cb(err); - } - }); - }; - - /** - * JQTPL support. - */ - - exports.jqtpl = fromStringRenderer('jqtpl'); - - /** - * JQTPL string support. - */ - - exports.jqtpl.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.jqtpl || (requires.jqtpl = require('jqtpl')); - try { - engine.template(str, str); - cb(null, engine.tmpl(str, options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Haml support. - */ - - exports.haml = fromStringRenderer('haml'); - - /** - * Haml string support. - */ - - exports.haml.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.haml || (requires.haml = require('hamljs')); - try { - options.locals = options; - cb(null, engine.render(str, options).trimLeft()); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Hamlet support. - */ - - exports.hamlet = fromStringRenderer('hamlet'); - - /** - * Hamlet string support. - */ - - exports.hamlet.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.hamlet || (requires.hamlet = require('hamlet')); - try { - options.locals = options; - cb(null, engine.render(str, options).trimLeft()); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Whiskers support. - */ - - exports.whiskers = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.whiskers || (requires.whiskers = require('whiskers')); - engine.__express(path, options, cb); - }); - }; - - /** - * Whiskers string support. - */ - - exports.whiskers.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.whiskers || (requires.whiskers = require('whiskers')); - try { - cb(null, engine.render(str, options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Coffee-HAML support. - */ - - exports['haml-coffee'] = fromStringRenderer('haml-coffee'); - - /** - * Coffee-HAML string support. - */ - - exports['haml-coffee'].render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires['haml-coffee'] || (requires['haml-coffee'] = require('haml-coffee')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Hogan support. - */ - - exports.hogan = fromStringRenderer('hogan'); - - /** - * Hogan string support. - */ - - exports.hogan.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.hogan || (requires.hogan = require('hogan.js')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl.render(options, options.partials)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * templayed.js support. - */ - - exports.templayed = fromStringRenderer('templayed'); - - /** - * templayed.js string support. - */ - - exports.templayed.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.templayed || (requires.templayed = require('templayed')); - try { - var tmpl = cache(options) || cache(options, engine(str)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Handlebars support. - */ - - exports.handlebars = fromStringRenderer('handlebars'); - - /** - * Handlebars string support. - */ - - exports.handlebars.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.handlebars || (requires.handlebars = require('handlebars')); - try { - for (var partial in options.partials) { - engine.registerPartial(partial, options.partials[partial]); - } - for (var helper in options.helpers) { - engine.registerHelper(helper, options.helpers[helper]); - } - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Underscore support. - */ - - exports.underscore = fromStringRenderer('underscore'); - - /** - * Underscore string support. - */ - - exports.underscore.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.underscore || (requires.underscore = require('underscore')); - try { - const partials = {}; - for (var partial in options.partials) { - partials[partial] = engine.template(options.partials[partial]); - } - options.partials = partials; - var tmpl = cache(options) || cache(options, engine.template(str, null, options)); - cb(null, tmpl(options).replace(/\n$/, '')); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Lodash support. - */ - - exports.lodash = fromStringRenderer('lodash'); - - /** - * Lodash string support. - */ - - exports.lodash.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.lodash || (requires.lodash = require('lodash')); - try { - var tmpl = cache(options) || cache(options, engine.template(str, options)); - cb(null, tmpl(options).replace(/\n$/, '')); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Pug support. (formerly Jade) - */ - - exports.pug = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.pug; - if (!engine) { - try { - engine = requires.pug = require('pug'); - } catch (err) { - try { - engine = requires.pug = require('then-pug'); - } catch (otherError) { - throw err; - } - } - } - - try { - var tmpl = cache(options) || cache(options, engine.compileFile(path, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Pug string support. - */ - - exports.pug.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.pug; - if (!engine) { - try { - engine = requires.pug = require('pug'); - } catch (err) { - try { - engine = requires.pug = require('then-pug'); - } catch (otherError) { - throw err; - } - } - } - - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * QEJS support. - */ - - exports.qejs = fromStringRenderer('qejs'); - - /** - * QEJS string support. - */ - - exports.qejs.render = function(str, options, cb) { - return promisify(cb, function(cb) { - try { - var engine = requires.qejs || (requires.qejs = require('qejs')); - engine.render(str, options).then(function(result) { - cb(null, result); - }, function(err) { - cb(err); - }).done(); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Walrus support. - */ - - exports.walrus = fromStringRenderer('walrus'); - - /** - * Walrus string support. - */ - - exports.walrus.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.walrus || (requires.walrus = require('walrus')); - try { - var tmpl = cache(options) || cache(options, engine.parse(str)); - cb(null, tmpl.compile(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Mustache support. - */ - - exports.mustache = fromStringRenderer('mustache'); - - /** - * Mustache string support. - */ - - exports.mustache.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.mustache || (requires.mustache = require('mustache')); - try { - cb(null, engine.render(str, options, options.partials)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Just support. - */ - - exports.just = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.just; - if (!engine) { - var JUST = require('just'); - engine = requires.just = new JUST(); - } - engine.configure({ useCache: options.cache }); - engine.render(path, options, cb); - }); - }; - - /** - * Just string support. - */ - - exports.just.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var JUST = require('just'); - var engine = new JUST({ root: { page: str }}); - engine.render('page', options, cb); - }); - }; - - /** - * ECT support. - */ - - exports.ect = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.ect; - if (!engine) { - var ECT = require('ect'); - engine = requires.ect = new ECT(options); - } - engine.configure({ cache: options.cache }); - engine.render(path, options, cb); - }); - }; - - /** - * ECT string support. - */ - - exports.ect.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var ECT = require('ect'); - var engine = new ECT({ root: { page: str }}); - engine.render('page', options, cb); - }); - }; - - /** - * mote support. - */ - - exports.mote = fromStringRenderer('mote'); - - /** - * mote string support. - */ - - exports.mote.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.mote || (requires.mote = require('mote')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Toffee support. - */ - - exports.toffee = function(path, options, cb) { - return promisify(cb, function(cb) { - var toffee = requires.toffee || (requires.toffee = require('toffee')); - toffee.__consolidate_engine_render(path, options, cb); - }); - }; - - /** - * Toffee string support. - */ - - exports.toffee.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.toffee || (requires.toffee = require('toffee')); - try { - engine.str_render(str, options, cb); - } catch (err) { - cb(err); - } - }); - }; - - /** - * doT support. - */ - - exports.dot = fromStringRenderer('dot'); - - /** - * doT string support. - */ - - exports.dot.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.dot || (requires.dot = require('dot')); - var extend = (requires.extend || (requires.extend = require$$2._extend)); - try { - var settings = {}; - settings = extend(settings, engine.templateSettings); - settings = extend(settings, options ? options.dot : {}); - var tmpl = cache(options) || cache(options, engine.template(str, settings, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * bracket support. - */ - - exports.bracket = fromStringRenderer('bracket'); - - /** - * bracket string support. - */ - - exports.bracket.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.bracket || (requires.bracket = require('bracket-template')); - try { - var tmpl = cache(options) || cache(options, engine.default.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Ractive support. - */ - - exports.ractive = fromStringRenderer('ractive'); - - /** - * Ractive string support. - */ - - exports.ractive.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var Engine = requires.ractive || (requires.ractive = require('ractive')); - - var template = cache(options) || cache(options, Engine.parse(str)); - options.template = template; - - if (options.data === null || options.data === undefined) { - var extend = (requires.extend || (requires.extend = require$$2._extend)); - - // Shallow clone the options object - options.data = extend({}, options); - - // Remove consolidate-specific properties from the clone - var i; - var length; - var properties = ['template', 'filename', 'cache', 'partials']; - for (i = 0, length = properties.length; i < length; i++) { - var property = properties[i]; - delete options.data[property]; - } - } - - try { - cb(null, new Engine(options).toHTML()); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Nunjucks support. - */ - - exports.nunjucks = fromStringRenderer('nunjucks'); - - /** - * Nunjucks string support. - */ - - exports.nunjucks.render = function(str, options, cb) { - return promisify(cb, function(cb) { - - try { - - var engine = options.nunjucksEnv || requires.nunjucks || (requires.nunjucks = require('nunjucks')); - - var env = engine; - - // deprecated fallback support for express - // <https://github.com/tj/consolidate.js/pull/152> - // <https://github.com/tj/consolidate.js/pull/224> - if (options.settings && options.settings.views) { - env = engine.configure(options.settings.views); - } else if (options.nunjucks && options.nunjucks.configure) { - env = engine.configure.apply(engine, options.nunjucks.configure); - } - - // - // because `renderString` does not initiate loaders - // we must manually create a loader for it based off - // either `options.settings.views` or `options.nunjucks` or `options.nunjucks.root` - // - // <https://github.com/mozilla/nunjucks/issues/730> - // <https://github.com/crocodilejs/node-email-templates/issues/182> - // - - // so instead we simply check if we passed a custom loader - // otherwise we create a simple file based loader - if (options.loader) { - env = new engine.Environment(options.loader); - } else if (options.settings && options.settings.views) { - env = new engine.Environment( - new engine.FileSystemLoader(options.settings.views) - ); - } else if (options.nunjucks && options.nunjucks.loader) { - if (typeof options.nunjucks.loader === 'string') { - env = new engine.Environment(new engine.FileSystemLoader(options.nunjucks.loader)); - } else { - env = new engine.Environment( - new engine.FileSystemLoader( - options.nunjucks.loader[0], - options.nunjucks.loader[1] - ) - ); - } - } - - env.renderString(str, options, cb); - } catch (err) { - throw cb(err); - } - }); - }; - - /** - * HTMLing support. - */ - - exports.htmling = fromStringRenderer('htmling'); - - /** - * HTMLing string support. - */ - - exports.htmling.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.htmling || (requires.htmling = require('htmling')); - try { - var tmpl = cache(options) || cache(options, engine.string(str)); - cb(null, tmpl.render(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Rendering function - */ - function requireReact(module, filename) { - var babel = requires.babel || (requires.babel = require('babel-core')); - - var compiled = babel.transformFileSync(filename, { presets: [ 'react' ] }).code; - - return module._compile(compiled, filename); - } - - exports.requireReact = requireReact; - - /** - * Converting a string into a node module. - */ - function requireReactString(src, filename) { - var babel = requires.babel || (requires.babel = require('babel-core')); - - if (!filename) filename = ''; - var m = new module.constructor(); - filename = filename || ''; - - // Compile Using React - var compiled = babel.transform(src, { presets: [ 'react' ] }).code; - - // Compile as a module - m.paths = module.paths; - m._compile(compiled, filename); - - return m.exports; - } - - /** - * A naive helper to replace {{tags}} with options.tags content - */ - function reactBaseTmpl(data, options) { - - var exp; - var regex; - - // Iterates through the keys in file object - // and interpolate / replace {{key}} with it's value - for (var k in options) { - if (options.hasOwnProperty(k)) { - exp = '{{' + k + '}}'; - regex = new RegExp(exp, 'g'); - if (data.match(regex)) { - data = data.replace(regex, options[k]); - } - } - } - - return data; - } - - /** - * Plates Support. - */ - - exports.plates = fromStringRenderer('plates'); - - /** - * Plates string support. - */ - - exports.plates.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.plates || (requires.plates = require('plates')); - var map = options.map || undefined; - try { - var tmpl = engine.bind(str, options, map); - cb(null, tmpl); - } catch (err) { - cb(err); - } - }); - }; - - /** - * The main render parser for React bsaed templates - */ - function reactRenderer(type) { - - if (commonjsRequire.extensions) { - - // Ensure JSX is transformed on require - if (!commonjsRequire.extensions['.jsx']) { - commonjsRequire.extensions['.jsx'] = requireReact; - } - - // Supporting .react extension as well as test cases - // Using .react extension is not recommended. - if (!commonjsRequire.extensions['.react']) { - commonjsRequire.extensions['.react'] = requireReact; - } - - } - - // Return rendering fx - return function(str, options, cb) { - return promisify(cb, function(cb) { - // React Import - var ReactDOM = requires.ReactDOM || (requires.ReactDOM = require('react-dom/server')); - var react = requires.react || (requires.react = require('react')); - - // Assign HTML Base - var base = options.base; - delete options.base; - - var enableCache = options.cache; - delete options.cache; - - var isNonStatic = options.isNonStatic; - delete options.isNonStatic; - - // Start Conversion - try { - - var Code; - var Factory; - - var baseStr; - var content; - var parsed; - - if (!cache(options)) { - // Parsing - if (type === 'path') { - var path = resolve(str); - delete require.cache[path]; - Code = commonjsRequire(path); - } else { - Code = requireReactString(str); - } - Factory = cache(options, react.createFactory(Code)); - - } else { - Factory = cache(options); - } - - parsed = new Factory(options); - content = (isNonStatic) ? ReactDOM.renderToString(parsed) : ReactDOM.renderToStaticMarkup(parsed); - - if (base) { - baseStr = readCache[str] || fs.readFileSync(resolve(base), 'utf8'); - - if (enableCache) { - readCache[str] = baseStr; - } - - options.content = content; - content = reactBaseTmpl(baseStr, options); - } - - cb(null, content); - - } catch (err) { - cb(err); - } - }); - }; - } - - /** - * React JS Support - */ - exports.react = reactRenderer('path'); - - /** - * React JS string support. - */ - exports.react.render = reactRenderer('string'); - - /** - * ARC-templates support. - */ - - exports['arc-templates'] = fromStringRenderer('arc-templates'); - - /** - * ARC-templates string support. - */ - - exports['arc-templates'].render = function(str, options, cb) { - var readFileWithOptions = util.promisify(read); - var consolidateFileSystem = {}; - consolidateFileSystem.readFile = function(path) { - return readFileWithOptions(path, options); - }; - - return promisify(cb, function(cb) { - try { - var engine = requires['arc-templates']; - if (!engine) { - var Engine = require('arc-templates/dist/es5'); - engine = requires['arc-templates'] = new Engine({ filesystem: consolidateFileSystem }); - } - - var compiler = cache(options) || cache(options, engine.compileString(str, options.filename)); - compiler.then(function(func) { return func(options); }) - .then(function(result) { cb(null, result.content); }) - .catch(cb); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Vash support - */ - exports.vash = fromStringRenderer('vash'); - - /** - * Vash string support - */ - exports.vash.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.vash || (requires.vash = require('vash')); - - try { - // helper system : https://github.com/kirbysayshi/vash#helper-system - if (options.helpers) { - for (var key in options.helpers) { - if (!options.helpers.hasOwnProperty(key) || typeof options.helpers[key] !== 'function') { - continue; - } - engine.helpers[key] = options.helpers[key]; - } - } - - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - tmpl(options, function sealLayout(err, ctx) { - if (err) cb(err); - ctx.finishLayout(); - cb(null, ctx.toString().replace(/\n$/, '')); - }); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Slm support. - */ - - exports.slm = fromStringRenderer('slm'); - - /** - * Slm string support. - */ - - exports.slm.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.slm || (requires.slm = require('slm')); - - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Marko support. - */ - - exports.marko = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.marko || (requires.marko = require('marko')); - options.writeToDisk = !!options.cache; - - try { - var tmpl = cache(options) || cache(options, engine.load(path, options)); - tmpl.renderToString(options, cb); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Marko string support. - */ - - exports.marko.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.marko || (requires.marko = require('marko')); - options.writeToDisk = !!options.cache; - options.filename = options.filename || 'string.marko'; - - try { - var tmpl = cache(options) || cache(options, engine.load(options.filename, str, options)); - tmpl.renderToString(options, cb); - } catch (err) { - cb(err); - } - }); - }; - - /** - * Teacup support. - */ - exports.teacup = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.teacup || (requires.teacup = require('teacup/lib/express')); - commonjsRequire.extensions['.teacup'] = commonjsRequire.extensions['.coffee']; - if (path[0] !== '/') { - path = join(process.cwd(), path); - } - if (!options.cache) { - var callback = cb; - cb = function() { - delete require.cache[path]; - callback.apply(this, arguments); - }; - } - engine.renderFile(path, options, cb); - }); - }; - - /** - * Teacup string support. - */ - exports.teacup.render = function(str, options, cb) { - var coffee = require('coffee-script'); - var vm = require('vm'); - var sandbox = { - module: {exports: {}}, - require: commonjsRequire - }; - return promisify(cb, function(cb) { - vm.runInNewContext(coffee.compile(str), sandbox); - var tmpl = sandbox.module.exports; - cb(null, tmpl(options)); - }); - }; - - /** - * Squirrelly support. - */ - - exports.squirrelly = fromStringRenderer('squirrelly'); - - /** - * Squirrelly string support. - */ - - exports.squirrelly.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.squirrelly || (requires.squirrelly = require('squirrelly')); - try { - for (var partial in options.partials) { - engine.definePartial(partial, options.partials[partial]); - } - for (var helper in options.helpers) { - engine.defineHelper(helper, options.helpers[helper]); - } - var tmpl = cache(options) || cache(options, engine.Compile(str, options)); - cb(null, tmpl(options, engine)); - } catch (err) { - cb(err); - } - }); - }; - /** - * Twing support. - */ - - exports.twing = fromStringRenderer('twing'); - - /** - * Twing string support. - */ - - exports.twing.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.twing || (requires.twing = require('twing')); - try { - new engine.TwingEnvironment(new engine.TwingLoaderNull()).createTemplate(str).then((twingTemplate) => { - twingTemplate.render(options).then((rendTmpl) => { - var tmpl = cache(options) || cache(options, rendTmpl); - cb(null, tmpl); - }); - }); - } catch (err) { - cb(err); - } - }); - }; - /** - * expose the instance of the engine - */ - exports.requires = requires; - } (consolidate$2, consolidate$2.exports)); - return consolidate$2.exports; -} - -var consolidate$1; -var hasRequiredConsolidate; - -function requireConsolidate () { - if (hasRequiredConsolidate) return consolidate$1; - hasRequiredConsolidate = 1; - consolidate$1 = /*@__PURE__*/ requireConsolidate$1(); - return consolidate$1; -} - -var consolidateExports = /*@__PURE__*/ requireConsolidate(); -var consolidate = /*@__PURE__*/getDefaultExportFromCjs(consolidateExports); - -const hasWarned = {}; -function warnOnce(msg) { - const isNodeProd = typeof process !== "undefined" && process.env.NODE_ENV === "production"; - if (!isNodeProd && true && !hasWarned[msg]) { - hasWarned[msg] = true; - warn(msg); - } -} -function warn(msg) { - console.warn( - `\x1B[1m\x1B[33m[@vue/compiler-sfc]\x1B[0m\x1B[33m ${msg}\x1B[0m -` - ); -} - -function preprocess$1({ source, filename, preprocessOptions }, preprocessor) { - let res = ""; - let err = null; - preprocessor.render( - source, - { filename, ...preprocessOptions }, - (_err, _res) => { - if (_err) err = _err; - res = _res; - } - ); - if (err) throw err; - return res; -} -function compileTemplate(options) { - const { preprocessLang, preprocessCustomRequire } = options; - const preprocessor = preprocessLang ? preprocessCustomRequire ? preprocessCustomRequire(preprocessLang) : consolidate[preprocessLang] : false; - if (preprocessor) { - try { - return doCompileTemplate({ - ...options, - source: preprocess$1(options, preprocessor), - ast: void 0 - // invalidate AST if template goes through preprocessor - }); - } catch (e) { - return { - code: `export default function render() {}`, - source: options.source, - tips: [], - errors: [e] - }; - } - } else if (preprocessLang) { - return { - code: `export default function render() {}`, - source: options.source, - tips: [ - `Component ${options.filename} uses lang ${preprocessLang} for template. Please install the language preprocessor.` - ], - errors: [ - `Component ${options.filename} uses lang ${preprocessLang} for template, however it is not installed.` - ] - }; - } else { - return doCompileTemplate(options); - } -} -function doCompileTemplate({ - filename, - id, - scoped, - slotted, - inMap, - source, - ast: inAST, - ssr = false, - ssrCssVars, - isProd = false, - compiler, - compilerOptions = {}, - transformAssetUrls -}) { - const errors = []; - const warnings = []; - let nodeTransforms = []; - if (shared.isObject(transformAssetUrls)) { - const assetOptions = normalizeOptions(transformAssetUrls); - nodeTransforms = [ - createAssetUrlTransformWithOptions(assetOptions), - createSrcsetTransformWithOptions(assetOptions) - ]; - } else if (transformAssetUrls !== false) { - nodeTransforms = [transformAssetUrl, transformSrcset]; - } - if (ssr && !ssrCssVars) { - warnOnce( - `compileTemplate is called with \`ssr: true\` but no corresponding \`cssVars\` option.` - ); - } - if (!id) { - warnOnce(`compileTemplate now requires the \`id\` option.`); - id = ""; - } - const shortId = id.replace(/^data-v-/, ""); - const longId = `data-v-${shortId}`; - const defaultCompiler = ssr ? CompilerSSR__namespace : CompilerDOM__namespace; - compiler = compiler || defaultCompiler; - if (compiler !== defaultCompiler) { - inAST = void 0; - } - if (inAST == null ? void 0 : inAST.transformed) { - const newAST = (ssr ? CompilerDOM__namespace : compiler).parse(inAST.source, { - prefixIdentifiers: true, - ...compilerOptions, - parseMode: "sfc", - onError: (e) => errors.push(e) - }); - const template = newAST.children.find( - (node) => node.type === 1 && node.tag === "template" - ); - inAST = compilerCore.createRoot(template.children, inAST.source); - } - let { code, ast, preamble, map } = compiler.compile(inAST || source, { - mode: "module", - prefixIdentifiers: true, - hoistStatic: true, - cacheHandlers: true, - ssrCssVars: ssr && ssrCssVars && ssrCssVars.length ? genCssVarsFromList(ssrCssVars, shortId, isProd, true) : "", - scopeId: scoped ? longId : void 0, - slotted, - sourceMap: true, - ...compilerOptions, - hmr: !isProd, - nodeTransforms: nodeTransforms.concat(compilerOptions.nodeTransforms || []), - filename, - onError: (e) => errors.push(e), - onWarn: (w) => warnings.push(w) - }); - if (inMap && !inAST) { - if (map) { - map = mapLines(inMap, map); - } - if (errors.length) { - patchErrors(errors, source, inMap); - } - } - const tips = warnings.map((w) => { - let msg = w.message; - if (w.loc) { - msg += ` -${shared.generateCodeFrame( - (inAST == null ? void 0 : inAST.source) || source, - w.loc.start.offset, - w.loc.end.offset - )}`; - } - return msg; - }); - return { code, ast, preamble, source, errors, tips, map }; -} -function mapLines(oldMap, newMap) { - if (!oldMap) return newMap; - if (!newMap) return oldMap; - const oldMapConsumer = new sourceMapJs.SourceMapConsumer(oldMap); - const newMapConsumer = new sourceMapJs.SourceMapConsumer(newMap); - const mergedMapGenerator = new sourceMapJs.SourceMapGenerator(); - newMapConsumer.eachMapping((m) => { - if (m.originalLine == null) { - return; - } - const origPosInOldMap = oldMapConsumer.originalPositionFor({ - line: m.originalLine, - column: m.originalColumn - }); - if (origPosInOldMap.source == null) { - return; - } - mergedMapGenerator.addMapping({ - generated: { - line: m.generatedLine, - column: m.generatedColumn - }, - original: { - line: origPosInOldMap.line, - // map line - // use current column, since the oldMap produced by @vue/compiler-sfc - // does not - column: m.originalColumn - }, - source: origPosInOldMap.source, - name: origPosInOldMap.name - }); - }); - const generator = mergedMapGenerator; - oldMapConsumer.sources.forEach((sourceFile) => { - generator._sources.add(sourceFile); - const sourceContent = oldMapConsumer.sourceContentFor(sourceFile); - if (sourceContent != null) { - mergedMapGenerator.setSourceContent(sourceFile, sourceContent); - } - }); - generator._sourceRoot = oldMap.sourceRoot; - generator._file = oldMap.file; - return generator.toJSON(); -} -function patchErrors(errors, source, inMap) { - const originalSource = inMap.sourcesContent[0]; - const offset = originalSource.indexOf(source); - const lineOffset = originalSource.slice(0, offset).split(/\r?\n/).length - 1; - errors.forEach((err) => { - if (err.loc) { - err.loc.start.line += lineOffset; - err.loc.start.offset += offset; - if (err.loc.end !== err.loc.start) { - err.loc.end.line += lineOffset; - err.loc.end.offset += offset; - } - } - }); -} - -const trimPlugin = () => { - return { - postcssPlugin: "vue-sfc-trim", - Once(root) { - root.walk(({ type, raws }) => { - if (type === "rule" || type === "atrule") { - if (raws.before) raws.before = "\n"; - if ("after" in raws && raws.after) raws.after = "\n"; - } - }); - } - }; -}; -trimPlugin.postcss = true; - -var dist$1 = {exports: {}}; - -var processor$1 = {exports: {}}; - -var parser$1 = {exports: {}}; - -var root$1 = {exports: {}}; - -var container$1 = {exports: {}}; - -var node$2 = {exports: {}}; - -var util$2 = {}; - -var unesc$1 = {exports: {}}; - -var hasRequiredUnesc$1; - -function requireUnesc$1 () { - if (hasRequiredUnesc$1) return unesc$1.exports; - hasRequiredUnesc$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = unesc; - // Many thanks for this post which made this migration much easier. - // https://mathiasbynens.be/notes/css-escapes - - /** - * - * @param {string} str - * @returns {[string, number]|undefined} - */ - function gobbleHex(str) { - var lower = str.toLowerCase(); - var hex = ''; - var spaceTerminated = false; - for (var i = 0; i < 6 && lower[i] !== undefined; i++) { - var code = lower.charCodeAt(i); - // check to see if we are dealing with a valid hex char [a-f|0-9] - var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; - // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point - spaceTerminated = code === 32; - if (!valid) { - break; - } - hex += lower[i]; - } - if (hex.length === 0) { - return undefined; - } - var codePoint = parseInt(hex, 16); - var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; - // Add special case for - // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point" - // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point - if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) { - return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)]; - } - return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)]; - } - var CONTAINS_ESCAPE = /\\/; - function unesc(str) { - var needToProcess = CONTAINS_ESCAPE.test(str); - if (!needToProcess) { - return str; - } - var ret = ""; - for (var i = 0; i < str.length; i++) { - if (str[i] === "\\") { - var gobbled = gobbleHex(str.slice(i + 1, i + 7)); - if (gobbled !== undefined) { - ret += gobbled[0]; - i += gobbled[1]; - continue; - } - - // Retain a pair of \\ if double escaped `\\\\` - // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e - if (str[i + 1] === "\\") { - ret += "\\"; - i++; - continue; - } - - // if \\ is at the end of the string retain it - // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb - if (str.length === i + 1) { - ret += str[i]; - } - continue; - } - ret += str[i]; - } - return ret; - } - module.exports = exports.default; - } (unesc$1, unesc$1.exports)); - return unesc$1.exports; -} - -var getProp$1 = {exports: {}}; - -var hasRequiredGetProp$1; - -function requireGetProp$1 () { - if (hasRequiredGetProp$1) return getProp$1.exports; - hasRequiredGetProp$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = getProp; - function getProp(obj) { - for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - props[_key - 1] = arguments[_key]; - } - while (props.length > 0) { - var prop = props.shift(); - if (!obj[prop]) { - return undefined; - } - obj = obj[prop]; - } - return obj; - } - module.exports = exports.default; - } (getProp$1, getProp$1.exports)); - return getProp$1.exports; -} - -var ensureObject$1 = {exports: {}}; - -var hasRequiredEnsureObject$1; - -function requireEnsureObject$1 () { - if (hasRequiredEnsureObject$1) return ensureObject$1.exports; - hasRequiredEnsureObject$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = ensureObject; - function ensureObject(obj) { - for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - props[_key - 1] = arguments[_key]; - } - while (props.length > 0) { - var prop = props.shift(); - if (!obj[prop]) { - obj[prop] = {}; - } - obj = obj[prop]; - } - } - module.exports = exports.default; - } (ensureObject$1, ensureObject$1.exports)); - return ensureObject$1.exports; -} - -var stripComments$1 = {exports: {}}; - -var hasRequiredStripComments$1; - -function requireStripComments$1 () { - if (hasRequiredStripComments$1) return stripComments$1.exports; - hasRequiredStripComments$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = stripComments; - function stripComments(str) { - var s = ""; - var commentStart = str.indexOf("/*"); - var lastEnd = 0; - while (commentStart >= 0) { - s = s + str.slice(lastEnd, commentStart); - var commentEnd = str.indexOf("*/", commentStart + 2); - if (commentEnd < 0) { - return s; - } - lastEnd = commentEnd + 2; - commentStart = str.indexOf("/*", lastEnd); - } - s = s + str.slice(lastEnd); - return s; - } - module.exports = exports.default; - } (stripComments$1, stripComments$1.exports)); - return stripComments$1.exports; -} - -var hasRequiredUtil$2; - -function requireUtil$2 () { - if (hasRequiredUtil$2) return util$2; - hasRequiredUtil$2 = 1; - - util$2.__esModule = true; - util$2.unesc = util$2.stripComments = util$2.getProp = util$2.ensureObject = void 0; - var _unesc = _interopRequireDefault(/*@__PURE__*/ requireUnesc$1()); - util$2.unesc = _unesc["default"]; - var _getProp = _interopRequireDefault(/*@__PURE__*/ requireGetProp$1()); - util$2.getProp = _getProp["default"]; - var _ensureObject = _interopRequireDefault(/*@__PURE__*/ requireEnsureObject$1()); - util$2.ensureObject = _ensureObject["default"]; - var _stripComments = _interopRequireDefault(/*@__PURE__*/ requireStripComments$1()); - util$2.stripComments = _stripComments["default"]; - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - return util$2; -} - -var hasRequiredNode$2; - -function requireNode$2 () { - if (hasRequiredNode$2) return node$2.exports; - hasRequiredNode$2 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _util = /*@__PURE__*/ requireUtil$2(); - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - var cloneNode = function cloneNode(obj, parent) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - var cloned = new obj.constructor(); - for (var i in obj) { - if (!obj.hasOwnProperty(i)) { - continue; - } - var value = obj[i]; - var type = typeof value; - if (i === 'parent' && type === 'object') { - if (parent) { - cloned[i] = parent; - } - } else if (value instanceof Array) { - cloned[i] = value.map(function (j) { - return cloneNode(j, cloned); - }); - } else { - cloned[i] = cloneNode(value, cloned); - } - } - return cloned; - }; - var Node = /*#__PURE__*/function () { - function Node(opts) { - if (opts === void 0) { - opts = {}; - } - Object.assign(this, opts); - this.spaces = this.spaces || {}; - this.spaces.before = this.spaces.before || ''; - this.spaces.after = this.spaces.after || ''; - } - var _proto = Node.prototype; - _proto.remove = function remove() { - if (this.parent) { - this.parent.removeChild(this); - } - this.parent = undefined; - return this; - }; - _proto.replaceWith = function replaceWith() { - if (this.parent) { - for (var index in arguments) { - this.parent.insertBefore(this, arguments[index]); - } - this.remove(); - } - return this; - }; - _proto.next = function next() { - return this.parent.at(this.parent.index(this) + 1); - }; - _proto.prev = function prev() { - return this.parent.at(this.parent.index(this) - 1); - }; - _proto.clone = function clone(overrides) { - if (overrides === void 0) { - overrides = {}; - } - var cloned = cloneNode(this); - for (var name in overrides) { - cloned[name] = overrides[name]; - } - return cloned; - } - - /** - * Some non-standard syntax doesn't follow normal escaping rules for css. - * This allows non standard syntax to be appended to an existing property - * by specifying the escaped value. By specifying the escaped value, - * illegal characters are allowed to be directly inserted into css output. - * @param {string} name the property to set - * @param {any} value the unescaped value of the property - * @param {string} valueEscaped optional. the escaped value of the property. - */; - _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { - if (!this.raws) { - this.raws = {}; - } - var originalValue = this[name]; - var originalEscaped = this.raws[name]; - this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first. - if (originalEscaped || valueEscaped !== value) { - this.raws[name] = (originalEscaped || originalValue) + valueEscaped; - } else { - delete this.raws[name]; // delete any escaped value that was created by the setter. - } - } - - /** - * Some non-standard syntax doesn't follow normal escaping rules for css. - * This allows the escaped value to be specified directly, allowing illegal - * characters to be directly inserted into css output. - * @param {string} name the property to set - * @param {any} value the unescaped value of the property - * @param {string} valueEscaped the escaped value of the property. - */; - _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { - if (!this.raws) { - this.raws = {}; - } - this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. - this.raws[name] = valueEscaped; - } - - /** - * When you want a value to passed through to CSS directly. This method - * deletes the corresponding raw value causing the stringifier to fallback - * to the unescaped value. - * @param {string} name the property to set. - * @param {any} value The value that is both escaped and unescaped. - */; - _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { - this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. - if (this.raws) { - delete this.raws[name]; - } - } - - /** - * - * @param {number} line The number (starting with 1) - * @param {number} column The column number (starting with 1) - */; - _proto.isAtPosition = function isAtPosition(line, column) { - if (this.source && this.source.start && this.source.end) { - if (this.source.start.line > line) { - return false; - } - if (this.source.end.line < line) { - return false; - } - if (this.source.start.line === line && this.source.start.column > column) { - return false; - } - if (this.source.end.line === line && this.source.end.column < column) { - return false; - } - return true; - } - return undefined; - }; - _proto.stringifyProperty = function stringifyProperty(name) { - return this.raws && this.raws[name] || this[name]; - }; - _proto.valueToString = function valueToString() { - return String(this.stringifyProperty("value")); - }; - _proto.toString = function toString() { - return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join(''); - }; - _createClass(Node, [{ - key: "rawSpaceBefore", - get: function get() { - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; - if (rawSpace === undefined) { - rawSpace = this.spaces && this.spaces.before; - } - return rawSpace || ""; - }, - set: function set(raw) { - (0, _util.ensureObject)(this, "raws", "spaces"); - this.raws.spaces.before = raw; - } - }, { - key: "rawSpaceAfter", - get: function get() { - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; - if (rawSpace === undefined) { - rawSpace = this.spaces.after; - } - return rawSpace || ""; - }, - set: function set(raw) { - (0, _util.ensureObject)(this, "raws", "spaces"); - this.raws.spaces.after = raw; - } - }]); - return Node; - }(); - exports["default"] = Node; - module.exports = exports.default; - } (node$2, node$2.exports)); - return node$2.exports; -} - -var types$2 = {}; - -var hasRequiredTypes$1; - -function requireTypes$1 () { - if (hasRequiredTypes$1) return types$2; - hasRequiredTypes$1 = 1; - - types$2.__esModule = true; - types$2.UNIVERSAL = types$2.TAG = types$2.STRING = types$2.SELECTOR = types$2.ROOT = types$2.PSEUDO = types$2.NESTING = types$2.ID = types$2.COMMENT = types$2.COMBINATOR = types$2.CLASS = types$2.ATTRIBUTE = void 0; - var TAG = 'tag'; - types$2.TAG = TAG; - var STRING = 'string'; - types$2.STRING = STRING; - var SELECTOR = 'selector'; - types$2.SELECTOR = SELECTOR; - var ROOT = 'root'; - types$2.ROOT = ROOT; - var PSEUDO = 'pseudo'; - types$2.PSEUDO = PSEUDO; - var NESTING = 'nesting'; - types$2.NESTING = NESTING; - var ID = 'id'; - types$2.ID = ID; - var COMMENT = 'comment'; - types$2.COMMENT = COMMENT; - var COMBINATOR = 'combinator'; - types$2.COMBINATOR = COMBINATOR; - var CLASS = 'class'; - types$2.CLASS = CLASS; - var ATTRIBUTE = 'attribute'; - types$2.ATTRIBUTE = ATTRIBUTE; - var UNIVERSAL = 'universal'; - types$2.UNIVERSAL = UNIVERSAL; - return types$2; -} - -var hasRequiredContainer$1; - -function requireContainer$1 () { - if (hasRequiredContainer$1) return container$1.exports; - hasRequiredContainer$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); - var types = _interopRequireWildcard(/*@__PURE__*/ requireTypes$1()); - function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - 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(o); 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 _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Container = /*#__PURE__*/function (_Node) { - _inheritsLoose(Container, _Node); - function Container(opts) { - var _this; - _this = _Node.call(this, opts) || this; - if (!_this.nodes) { - _this.nodes = []; - } - return _this; - } - var _proto = Container.prototype; - _proto.append = function append(selector) { - selector.parent = this; - this.nodes.push(selector); - return this; - }; - _proto.prepend = function prepend(selector) { - selector.parent = this; - this.nodes.unshift(selector); - for (var id in this.indexes) { - this.indexes[id]++; - } - return this; - }; - _proto.at = function at(index) { - return this.nodes[index]; - }; - _proto.index = function index(child) { - if (typeof child === 'number') { - return child; - } - return this.nodes.indexOf(child); - }; - _proto.removeChild = function removeChild(child) { - child = this.index(child); - this.at(child).parent = undefined; - this.nodes.splice(child, 1); - var index; - for (var id in this.indexes) { - index = this.indexes[id]; - if (index >= child) { - this.indexes[id] = index - 1; - } - } - return this; - }; - _proto.removeAll = function removeAll() { - for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { - var node = _step.value; - node.parent = undefined; - } - this.nodes = []; - return this; - }; - _proto.empty = function empty() { - return this.removeAll(); - }; - _proto.insertAfter = function insertAfter(oldNode, newNode) { - newNode.parent = this; - var oldIndex = this.index(oldNode); - this.nodes.splice(oldIndex + 1, 0, newNode); - newNode.parent = this; - var index; - for (var id in this.indexes) { - index = this.indexes[id]; - if (oldIndex < index) { - this.indexes[id] = index + 1; - } - } - return this; - }; - _proto.insertBefore = function insertBefore(oldNode, newNode) { - newNode.parent = this; - var oldIndex = this.index(oldNode); - this.nodes.splice(oldIndex, 0, newNode); - newNode.parent = this; - var index; - for (var id in this.indexes) { - index = this.indexes[id]; - if (index >= oldIndex) { - this.indexes[id] = index + 1; - } - } - return this; - }; - _proto._findChildAtPosition = function _findChildAtPosition(line, col) { - var found = undefined; - this.each(function (node) { - if (node.atPosition) { - var foundChild = node.atPosition(line, col); - if (foundChild) { - found = foundChild; - return false; - } - } else if (node.isAtPosition(line, col)) { - found = node; - return false; - } - }); - return found; - } - - /** - * Return the most specific node at the line and column number given. - * The source location is based on the original parsed location, locations aren't - * updated as selector nodes are mutated. - * - * Note that this location is relative to the location of the first character - * of the selector, and not the location of the selector in the overall document - * when used in conjunction with postcss. - * - * If not found, returns undefined. - * @param {number} line The line number of the node to find. (1-based index) - * @param {number} col The column number of the node to find. (1-based index) - */; - _proto.atPosition = function atPosition(line, col) { - if (this.isAtPosition(line, col)) { - return this._findChildAtPosition(line, col) || this; - } else { - return undefined; - } - }; - _proto._inferEndPosition = function _inferEndPosition() { - if (this.last && this.last.source && this.last.source.end) { - this.source = this.source || {}; - this.source.end = this.source.end || {}; - Object.assign(this.source.end, this.last.source.end); - } - }; - _proto.each = function each(callback) { - if (!this.lastEach) { - this.lastEach = 0; - } - if (!this.indexes) { - this.indexes = {}; - } - this.lastEach++; - var id = this.lastEach; - this.indexes[id] = 0; - if (!this.length) { - return undefined; - } - var index, result; - while (this.indexes[id] < this.length) { - index = this.indexes[id]; - result = callback(this.at(index), index); - if (result === false) { - break; - } - this.indexes[id] += 1; - } - delete this.indexes[id]; - if (result === false) { - return false; - } - }; - _proto.walk = function walk(callback) { - return this.each(function (node, i) { - var result = callback(node, i); - if (result !== false && node.length) { - result = node.walk(callback); - } - if (result === false) { - return false; - } - }); - }; - _proto.walkAttributes = function walkAttributes(callback) { - var _this2 = this; - return this.walk(function (selector) { - if (selector.type === types.ATTRIBUTE) { - return callback.call(_this2, selector); - } - }); - }; - _proto.walkClasses = function walkClasses(callback) { - var _this3 = this; - return this.walk(function (selector) { - if (selector.type === types.CLASS) { - return callback.call(_this3, selector); - } - }); - }; - _proto.walkCombinators = function walkCombinators(callback) { - var _this4 = this; - return this.walk(function (selector) { - if (selector.type === types.COMBINATOR) { - return callback.call(_this4, selector); - } - }); - }; - _proto.walkComments = function walkComments(callback) { - var _this5 = this; - return this.walk(function (selector) { - if (selector.type === types.COMMENT) { - return callback.call(_this5, selector); - } - }); - }; - _proto.walkIds = function walkIds(callback) { - var _this6 = this; - return this.walk(function (selector) { - if (selector.type === types.ID) { - return callback.call(_this6, selector); - } - }); - }; - _proto.walkNesting = function walkNesting(callback) { - var _this7 = this; - return this.walk(function (selector) { - if (selector.type === types.NESTING) { - return callback.call(_this7, selector); - } - }); - }; - _proto.walkPseudos = function walkPseudos(callback) { - var _this8 = this; - return this.walk(function (selector) { - if (selector.type === types.PSEUDO) { - return callback.call(_this8, selector); - } - }); - }; - _proto.walkTags = function walkTags(callback) { - var _this9 = this; - return this.walk(function (selector) { - if (selector.type === types.TAG) { - return callback.call(_this9, selector); - } - }); - }; - _proto.walkUniversals = function walkUniversals(callback) { - var _this10 = this; - return this.walk(function (selector) { - if (selector.type === types.UNIVERSAL) { - return callback.call(_this10, selector); - } - }); - }; - _proto.split = function split(callback) { - var _this11 = this; - var current = []; - return this.reduce(function (memo, node, index) { - var split = callback.call(_this11, node); - current.push(node); - if (split) { - memo.push(current); - current = []; - } else if (index === _this11.length - 1) { - memo.push(current); - } - return memo; - }, []); - }; - _proto.map = function map(callback) { - return this.nodes.map(callback); - }; - _proto.reduce = function reduce(callback, memo) { - return this.nodes.reduce(callback, memo); - }; - _proto.every = function every(callback) { - return this.nodes.every(callback); - }; - _proto.some = function some(callback) { - return this.nodes.some(callback); - }; - _proto.filter = function filter(callback) { - return this.nodes.filter(callback); - }; - _proto.sort = function sort(callback) { - return this.nodes.sort(callback); - }; - _proto.toString = function toString() { - return this.map(String).join(''); - }; - _createClass(Container, [{ - key: "first", - get: function get() { - return this.at(0); - } - }, { - key: "last", - get: function get() { - return this.at(this.length - 1); - } - }, { - key: "length", - get: function get() { - return this.nodes.length; - } - }]); - return Container; - }(_node["default"]); - exports["default"] = Container; - module.exports = exports.default; - } (container$1, container$1.exports)); - return container$1.exports; -} - -var hasRequiredRoot$1; - -function requireRoot$1 () { - if (hasRequiredRoot$1) return root$1.exports; - hasRequiredRoot$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer$1()); - var _types = /*@__PURE__*/ requireTypes$1(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Root = /*#__PURE__*/function (_Container) { - _inheritsLoose(Root, _Container); - function Root(opts) { - var _this; - _this = _Container.call(this, opts) || this; - _this.type = _types.ROOT; - return _this; - } - var _proto = Root.prototype; - _proto.toString = function toString() { - var str = this.reduce(function (memo, selector) { - memo.push(String(selector)); - return memo; - }, []).join(','); - return this.trailingComma ? str + ',' : str; - }; - _proto.error = function error(message, options) { - if (this._error) { - return this._error(message, options); - } else { - return new Error(message); - } - }; - _createClass(Root, [{ - key: "errorGenerator", - set: function set(handler) { - this._error = handler; - } - }]); - return Root; - }(_container["default"]); - exports["default"] = Root; - module.exports = exports.default; - } (root$1, root$1.exports)); - return root$1.exports; -} - -var selector$1 = {exports: {}}; - -var hasRequiredSelector$1; - -function requireSelector$1 () { - if (hasRequiredSelector$1) return selector$1.exports; - hasRequiredSelector$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer$1()); - var _types = /*@__PURE__*/ requireTypes$1(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Selector = /*#__PURE__*/function (_Container) { - _inheritsLoose(Selector, _Container); - function Selector(opts) { - var _this; - _this = _Container.call(this, opts) || this; - _this.type = _types.SELECTOR; - return _this; - } - return Selector; - }(_container["default"]); - exports["default"] = Selector; - module.exports = exports.default; - } (selector$1, selector$1.exports)); - return selector$1.exports; -} - -var className$1 = {exports: {}}; - -/*! https://mths.be/cssesc v3.0.0 by @mathias */ - -var cssesc_1; -var hasRequiredCssesc; - -function requireCssesc () { - if (hasRequiredCssesc) return cssesc_1; - hasRequiredCssesc = 1; - - var object = {}; - var hasOwnProperty = object.hasOwnProperty; - var merge = function merge(options, defaults) { - if (!options) { - return defaults; - } - var result = {}; - for (var key in defaults) { - // `if (defaults.hasOwnProperty(key) { … }` is not needed here, since - // only recognized option names are used. - result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key]; - } - return result; - }; - - var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/; - var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/; - var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g; - - // https://mathiasbynens.be/notes/css-escapes#css - var cssesc = function cssesc(string, options) { - options = merge(options, cssesc.options); - if (options.quotes != 'single' && options.quotes != 'double') { - options.quotes = 'single'; - } - var quote = options.quotes == 'double' ? '"' : '\''; - var isIdentifier = options.isIdentifier; - - var firstChar = string.charAt(0); - var output = ''; - var counter = 0; - var length = string.length; - while (counter < length) { - var character = string.charAt(counter++); - var codePoint = character.charCodeAt(); - var value = void 0; - // If it’s not a printable ASCII character… - if (codePoint < 0x20 || codePoint > 0x7E) { - if (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) { - // It’s a high surrogate, and there is a next character. - var extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // next character is low surrogate - codePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000; - } else { - // It’s an unmatched surrogate; only append this code unit, in case - // the next code unit is the high surrogate of a surrogate pair. - counter--; - } - } - value = '\\' + codePoint.toString(16).toUpperCase() + ' '; - } else { - if (options.escapeEverything) { - if (regexAnySingleEscape.test(character)) { - value = '\\' + character; - } else { - value = '\\' + codePoint.toString(16).toUpperCase() + ' '; - } - } else if (/[\t\n\f\r\x0B]/.test(character)) { - value = '\\' + codePoint.toString(16).toUpperCase() + ' '; - } else if (character == '\\' || !isIdentifier && (character == '"' && quote == character || character == '\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) { - value = '\\' + character; - } else { - value = character; - } - } - output += value; - } - - if (isIdentifier) { - if (/^-[-\d]/.test(output)) { - output = '\\-' + output.slice(1); - } else if (/\d/.test(firstChar)) { - output = '\\3' + firstChar + ' ' + output.slice(1); - } - } - - // Remove spaces after `\HEX` escapes that are not followed by a hex digit, - // since they’re redundant. Note that this is only possible if the escape - // sequence isn’t preceded by an odd number of backslashes. - output = output.replace(regexExcessiveSpaces, function ($0, $1, $2) { - if ($1 && $1.length % 2) { - // It’s not safe to remove the space, so don’t. - return $0; - } - // Strip the space. - return ($1 || '') + $2; - }); - - if (!isIdentifier && options.wrap) { - return quote + output + quote; - } - return output; - }; - - // Expose default options (so they can be overridden globally). - cssesc.options = { - 'escapeEverything': false, - 'isIdentifier': false, - 'quotes': 'single', - 'wrap': false - }; - - cssesc.version = '3.0.0'; - - cssesc_1 = cssesc; - return cssesc_1; -} - -var hasRequiredClassName$1; - -function requireClassName$1 () { - if (hasRequiredClassName$1) return className$1.exports; - hasRequiredClassName$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); - var _util = /*@__PURE__*/ requireUtil$2(); - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); - var _types = /*@__PURE__*/ requireTypes$1(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var ClassName = /*#__PURE__*/function (_Node) { - _inheritsLoose(ClassName, _Node); - function ClassName(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.CLASS; - _this._constructed = true; - return _this; - } - var _proto = ClassName.prototype; - _proto.valueToString = function valueToString() { - return '.' + _Node.prototype.valueToString.call(this); - }; - _createClass(ClassName, [{ - key: "value", - get: function get() { - return this._value; - }, - set: function set(v) { - if (this._constructed) { - var escaped = (0, _cssesc["default"])(v, { - isIdentifier: true - }); - if (escaped !== v) { - (0, _util.ensureObject)(this, "raws"); - this.raws.value = escaped; - } else if (this.raws) { - delete this.raws.value; - } - } - this._value = v; - } - }]); - return ClassName; - }(_node["default"]); - exports["default"] = ClassName; - module.exports = exports.default; - } (className$1, className$1.exports)); - return className$1.exports; -} - -var comment$1 = {exports: {}}; - -var hasRequiredComment$1; - -function requireComment$1 () { - if (hasRequiredComment$1) return comment$1.exports; - hasRequiredComment$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); - var _types = /*@__PURE__*/ requireTypes$1(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Comment = /*#__PURE__*/function (_Node) { - _inheritsLoose(Comment, _Node); - function Comment(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.COMMENT; - return _this; - } - return Comment; - }(_node["default"]); - exports["default"] = Comment; - module.exports = exports.default; - } (comment$1, comment$1.exports)); - return comment$1.exports; -} - -var id$1 = {exports: {}}; - -var hasRequiredId$1; - -function requireId$1 () { - if (hasRequiredId$1) return id$1.exports; - hasRequiredId$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); - var _types = /*@__PURE__*/ requireTypes$1(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var ID = /*#__PURE__*/function (_Node) { - _inheritsLoose(ID, _Node); - function ID(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.ID; - return _this; - } - var _proto = ID.prototype; - _proto.valueToString = function valueToString() { - return '#' + _Node.prototype.valueToString.call(this); - }; - return ID; - }(_node["default"]); - exports["default"] = ID; - module.exports = exports.default; - } (id$1, id$1.exports)); - return id$1.exports; -} - -var tag$1 = {exports: {}}; - -var namespace$1 = {exports: {}}; - -var hasRequiredNamespace$1; - -function requireNamespace$1 () { - if (hasRequiredNamespace$1) return namespace$1.exports; - hasRequiredNamespace$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); - var _util = /*@__PURE__*/ requireUtil$2(); - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Namespace = /*#__PURE__*/function (_Node) { - _inheritsLoose(Namespace, _Node); - function Namespace() { - return _Node.apply(this, arguments) || this; - } - var _proto = Namespace.prototype; - _proto.qualifiedName = function qualifiedName(value) { - if (this.namespace) { - return this.namespaceString + "|" + value; - } else { - return value; - } - }; - _proto.valueToString = function valueToString() { - return this.qualifiedName(_Node.prototype.valueToString.call(this)); - }; - _createClass(Namespace, [{ - key: "namespace", - get: function get() { - return this._namespace; - }, - set: function set(namespace) { - if (namespace === true || namespace === "*" || namespace === "&") { - this._namespace = namespace; - if (this.raws) { - delete this.raws.namespace; - } - return; - } - var escaped = (0, _cssesc["default"])(namespace, { - isIdentifier: true - }); - this._namespace = namespace; - if (escaped !== namespace) { - (0, _util.ensureObject)(this, "raws"); - this.raws.namespace = escaped; - } else if (this.raws) { - delete this.raws.namespace; - } - } - }, { - key: "ns", - get: function get() { - return this._namespace; - }, - set: function set(namespace) { - this.namespace = namespace; - } - }, { - key: "namespaceString", - get: function get() { - if (this.namespace) { - var ns = this.stringifyProperty("namespace"); - if (ns === true) { - return ''; - } else { - return ns; - } - } else { - return ''; - } - } - }]); - return Namespace; - }(_node["default"]); - exports["default"] = Namespace; - module.exports = exports.default; - } (namespace$1, namespace$1.exports)); - return namespace$1.exports; -} - -var hasRequiredTag$1; - -function requireTag$1 () { - if (hasRequiredTag$1) return tag$1.exports; - hasRequiredTag$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace$1()); - var _types = /*@__PURE__*/ requireTypes$1(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Tag = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Tag, _Namespace); - function Tag(opts) { - var _this; - _this = _Namespace.call(this, opts) || this; - _this.type = _types.TAG; - return _this; - } - return Tag; - }(_namespace["default"]); - exports["default"] = Tag; - module.exports = exports.default; - } (tag$1, tag$1.exports)); - return tag$1.exports; -} - -var string$1 = {exports: {}}; - -var hasRequiredString$1; - -function requireString$1 () { - if (hasRequiredString$1) return string$1.exports; - hasRequiredString$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); - var _types = /*@__PURE__*/ requireTypes$1(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var String = /*#__PURE__*/function (_Node) { - _inheritsLoose(String, _Node); - function String(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.STRING; - return _this; - } - return String; - }(_node["default"]); - exports["default"] = String; - module.exports = exports.default; - } (string$1, string$1.exports)); - return string$1.exports; -} - -var pseudo$1 = {exports: {}}; - -var hasRequiredPseudo$1; - -function requirePseudo$1 () { - if (hasRequiredPseudo$1) return pseudo$1.exports; - hasRequiredPseudo$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer$1()); - var _types = /*@__PURE__*/ requireTypes$1(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Pseudo = /*#__PURE__*/function (_Container) { - _inheritsLoose(Pseudo, _Container); - function Pseudo(opts) { - var _this; - _this = _Container.call(this, opts) || this; - _this.type = _types.PSEUDO; - return _this; - } - var _proto = Pseudo.prototype; - _proto.toString = function toString() { - var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; - return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join(''); - }; - return Pseudo; - }(_container["default"]); - exports["default"] = Pseudo; - module.exports = exports.default; - } (pseudo$1, pseudo$1.exports)); - return pseudo$1.exports; -} - -var attribute$1 = {}; - -var node$1; -var hasRequiredNode$1; - -function requireNode$1 () { - if (hasRequiredNode$1) return node$1; - hasRequiredNode$1 = 1; - /** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - - node$1 = require$$2.deprecate; - return node$1; -} - -var hasRequiredAttribute$1; - -function requireAttribute$1 () { - if (hasRequiredAttribute$1) return attribute$1; - hasRequiredAttribute$1 = 1; - (function (exports) { - - exports.__esModule = true; - exports["default"] = void 0; - exports.unescapeValue = unescapeValue; - var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); - var _unesc = _interopRequireDefault(/*@__PURE__*/ requireUnesc$1()); - var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace$1()); - var _types = /*@__PURE__*/ requireTypes$1(); - var _CSSESC_QUOTE_OPTIONS; - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var deprecate = /*@__PURE__*/ requireNode$1(); - var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; - var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead."); - var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); - var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); - function unescapeValue(value) { - var deprecatedUsage = false; - var quoteMark = null; - var unescaped = value; - var m = unescaped.match(WRAPPED_IN_QUOTES); - if (m) { - quoteMark = m[1]; - unescaped = m[2]; - } - unescaped = (0, _unesc["default"])(unescaped); - if (unescaped !== value) { - deprecatedUsage = true; - } - return { - deprecatedUsage: deprecatedUsage, - unescaped: unescaped, - quoteMark: quoteMark - }; - } - function handleDeprecatedContructorOpts(opts) { - if (opts.quoteMark !== undefined) { - return opts; - } - if (opts.value === undefined) { - return opts; - } - warnOfDeprecatedConstructor(); - var _unescapeValue = unescapeValue(opts.value), - quoteMark = _unescapeValue.quoteMark, - unescaped = _unescapeValue.unescaped; - if (!opts.raws) { - opts.raws = {}; - } - if (opts.raws.value === undefined) { - opts.raws.value = opts.value; - } - opts.value = unescaped; - opts.quoteMark = quoteMark; - return opts; - } - var Attribute = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Attribute, _Namespace); - function Attribute(opts) { - var _this; - if (opts === void 0) { - opts = {}; - } - _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; - _this.type = _types.ATTRIBUTE; - _this.raws = _this.raws || {}; - Object.defineProperty(_this.raws, 'unquoted', { - get: deprecate(function () { - return _this.value; - }, "attr.raws.unquoted is deprecated. Call attr.value instead."), - set: deprecate(function () { - return _this.value; - }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.") - }); - _this._constructed = true; - return _this; - } - - /** - * Returns the Attribute's value quoted such that it would be legal to use - * in the value of a css file. The original value's quotation setting - * used for stringification is left unchanged. See `setValue(value, options)` - * if you want to control the quote settings of a new value for the attribute. - * - * You can also change the quotation used for the current value by setting quoteMark. - * - * Options: - * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this - * option is not set, the original value for quoteMark will be used. If - * indeterminate, a double quote is used. The legal values are: - * * `null` - the value will be unquoted and characters will be escaped as necessary. - * * `'` - the value will be quoted with a single quote and single quotes are escaped. - * * `"` - the value will be quoted with a double quote and double quotes are escaped. - * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark - * over the quoteMark option value. - * * smart {boolean} - if true, will select a quote mark based on the value - * and the other options specified here. See the `smartQuoteMark()` - * method. - **/ - var _proto = Attribute.prototype; - _proto.getQuotedValue = function getQuotedValue(options) { - if (options === void 0) { - options = {}; - } - var quoteMark = this._determineQuoteMark(options); - var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark]; - var escaped = (0, _cssesc["default"])(this._value, cssescopts); - return escaped; - }; - _proto._determineQuoteMark = function _determineQuoteMark(options) { - return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); - } - - /** - * Set the unescaped value with the specified quotation options. The value - * provided must not include any wrapping quote marks -- those quotes will - * be interpreted as part of the value and escaped accordingly. - */; - _proto.setValue = function setValue(value, options) { - if (options === void 0) { - options = {}; - } - this._value = value; - this._quoteMark = this._determineQuoteMark(options); - this._syncRawValue(); - } - - /** - * Intelligently select a quoteMark value based on the value's contents. If - * the value is a legal CSS ident, it will not be quoted. Otherwise a quote - * mark will be picked that minimizes the number of escapes. - * - * If there's no clear winner, the quote mark from these options is used, - * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is - * true). If the quoteMark is unspecified, a double quote is used. - * - * @param options This takes the quoteMark and preferCurrentQuoteMark options - * from the quoteValue method. - */; - _proto.smartQuoteMark = function smartQuoteMark(options) { - var v = this.value; - var numSingleQuotes = v.replace(/[^']/g, '').length; - var numDoubleQuotes = v.replace(/[^"]/g, '').length; - if (numSingleQuotes + numDoubleQuotes === 0) { - var escaped = (0, _cssesc["default"])(v, { - isIdentifier: true - }); - if (escaped === v) { - return Attribute.NO_QUOTE; - } else { - var pref = this.preferredQuoteMark(options); - if (pref === Attribute.NO_QUOTE) { - // pick a quote mark that isn't none and see if it's smaller - var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE; - var opts = CSSESC_QUOTE_OPTIONS[quote]; - var quoteValue = (0, _cssesc["default"])(v, opts); - if (quoteValue.length < escaped.length) { - return quote; - } - } - return pref; - } - } else if (numDoubleQuotes === numSingleQuotes) { - return this.preferredQuoteMark(options); - } else if (numDoubleQuotes < numSingleQuotes) { - return Attribute.DOUBLE_QUOTE; - } else { - return Attribute.SINGLE_QUOTE; - } - } - - /** - * Selects the preferred quote mark based on the options and the current quote mark value. - * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` - * instead. - */; - _proto.preferredQuoteMark = function preferredQuoteMark(options) { - var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; - if (quoteMark === undefined) { - quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; - } - if (quoteMark === undefined) { - quoteMark = Attribute.DOUBLE_QUOTE; - } - return quoteMark; - }; - _proto._syncRawValue = function _syncRawValue() { - var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); - if (rawValue === this._value) { - if (this.raws) { - delete this.raws.value; - } - } else { - this.raws.value = rawValue; - } - }; - _proto._handleEscapes = function _handleEscapes(prop, value) { - if (this._constructed) { - var escaped = (0, _cssesc["default"])(value, { - isIdentifier: true - }); - if (escaped !== value) { - this.raws[prop] = escaped; - } else { - delete this.raws[prop]; - } - } - }; - _proto._spacesFor = function _spacesFor(name) { - var attrSpaces = { - before: '', - after: '' - }; - var spaces = this.spaces[name] || {}; - var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; - return Object.assign(attrSpaces, spaces, rawSpaces); - }; - _proto._stringFor = function _stringFor(name, spaceName, concat) { - if (spaceName === void 0) { - spaceName = name; - } - if (concat === void 0) { - concat = defaultAttrConcat; - } - var attrSpaces = this._spacesFor(spaceName); - return concat(this.stringifyProperty(name), attrSpaces); - } - - /** - * returns the offset of the attribute part specified relative to the - * start of the node of the output string. - * - * * "ns" - alias for "namespace" - * * "namespace" - the namespace if it exists. - * * "attribute" - the attribute name - * * "attributeNS" - the start of the attribute or its namespace - * * "operator" - the match operator of the attribute - * * "value" - The value (string or identifier) - * * "insensitive" - the case insensitivity flag; - * @param part One of the possible values inside an attribute. - * @returns -1 if the name is invalid or the value doesn't exist in this attribute. - */; - _proto.offsetOf = function offsetOf(name) { - var count = 1; - var attributeSpaces = this._spacesFor("attribute"); - count += attributeSpaces.before.length; - if (name === "namespace" || name === "ns") { - return this.namespace ? count : -1; - } - if (name === "attributeNS") { - return count; - } - count += this.namespaceString.length; - if (this.namespace) { - count += 1; - } - if (name === "attribute") { - return count; - } - count += this.stringifyProperty("attribute").length; - count += attributeSpaces.after.length; - var operatorSpaces = this._spacesFor("operator"); - count += operatorSpaces.before.length; - var operator = this.stringifyProperty("operator"); - if (name === "operator") { - return operator ? count : -1; - } - count += operator.length; - count += operatorSpaces.after.length; - var valueSpaces = this._spacesFor("value"); - count += valueSpaces.before.length; - var value = this.stringifyProperty("value"); - if (name === "value") { - return value ? count : -1; - } - count += value.length; - count += valueSpaces.after.length; - var insensitiveSpaces = this._spacesFor("insensitive"); - count += insensitiveSpaces.before.length; - if (name === "insensitive") { - return this.insensitive ? count : -1; - } - return -1; - }; - _proto.toString = function toString() { - var _this2 = this; - var selector = [this.rawSpaceBefore, '[']; - selector.push(this._stringFor('qualifiedAttribute', 'attribute')); - if (this.operator && (this.value || this.value === '')) { - selector.push(this._stringFor('operator')); - selector.push(this._stringFor('value')); - selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) { - if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) { - attrSpaces.before = " "; - } - return defaultAttrConcat(attrValue, attrSpaces); - })); - } - selector.push(']'); - selector.push(this.rawSpaceAfter); - return selector.join(''); - }; - _createClass(Attribute, [{ - key: "quoted", - get: function get() { - var qm = this.quoteMark; - return qm === "'" || qm === '"'; - }, - set: function set(value) { - warnOfDeprecatedQuotedAssignment(); - } - - /** - * returns a single (`'`) or double (`"`) quote character if the value is quoted. - * returns `null` if the value is not quoted. - * returns `undefined` if the quotation state is unknown (this can happen when - * the attribute is constructed without specifying a quote mark.) - */ - }, { - key: "quoteMark", - get: function get() { - return this._quoteMark; - } - - /** - * Set the quote mark to be used by this attribute's value. - * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute - * value is updated accordingly. - * - * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted. - */, - set: function set(quoteMark) { - if (!this._constructed) { - this._quoteMark = quoteMark; - return; - } - if (this._quoteMark !== quoteMark) { - this._quoteMark = quoteMark; - this._syncRawValue(); - } - } - }, { - key: "qualifiedAttribute", - get: function get() { - return this.qualifiedName(this.raws.attribute || this.attribute); - } - }, { - key: "insensitiveFlag", - get: function get() { - return this.insensitive ? 'i' : ''; - } - }, { - key: "value", - get: function get() { - return this._value; - }, - set: - /** - * Before 3.0, the value had to be set to an escaped value including any wrapped - * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value - * is unescaped during parsing and any quote marks are removed. - * - * Because the ambiguity of this semantic change, if you set `attr.value = newValue`, - * a deprecation warning is raised when the new value contains any characters that would - * require escaping (including if it contains wrapped quotes). - * - * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe - * how the new value is quoted. - */ - function set(v) { - if (this._constructed) { - var _unescapeValue2 = unescapeValue(v), - deprecatedUsage = _unescapeValue2.deprecatedUsage, - unescaped = _unescapeValue2.unescaped, - quoteMark = _unescapeValue2.quoteMark; - if (deprecatedUsage) { - warnOfDeprecatedValueAssignment(); - } - if (unescaped === this._value && quoteMark === this._quoteMark) { - return; - } - this._value = unescaped; - this._quoteMark = quoteMark; - this._syncRawValue(); - } else { - this._value = v; - } - } - }, { - key: "insensitive", - get: function get() { - return this._insensitive; - } - - /** - * Set the case insensitive flag. - * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag` - * of the attribute is updated accordingly. - * - * @param {true | false} insensitive true if the attribute should match case-insensitively. - */, - set: function set(insensitive) { - if (!insensitive) { - this._insensitive = false; - - // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation. - // When setting `attr.insensitive = false` both should be erased to ensure correct serialization. - if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) { - this.raws.insensitiveFlag = undefined; - } - } - this._insensitive = insensitive; - } - }, { - key: "attribute", - get: function get() { - return this._attribute; - }, - set: function set(name) { - this._handleEscapes("attribute", name); - this._attribute = name; - } - }]); - return Attribute; - }(_namespace["default"]); - exports["default"] = Attribute; - Attribute.NO_QUOTE = null; - Attribute.SINGLE_QUOTE = "'"; - Attribute.DOUBLE_QUOTE = '"'; - var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { - "'": { - quotes: 'single', - wrap: true - }, - '"': { - quotes: 'double', - wrap: true - } - }, _CSSESC_QUOTE_OPTIONS[null] = { - isIdentifier: true - }, _CSSESC_QUOTE_OPTIONS); - function defaultAttrConcat(attrValue, attrSpaces) { - return "" + attrSpaces.before + attrValue + attrSpaces.after; - } - } (attribute$1)); - return attribute$1; -} - -var universal$1 = {exports: {}}; - -var hasRequiredUniversal$1; - -function requireUniversal$1 () { - if (hasRequiredUniversal$1) return universal$1.exports; - hasRequiredUniversal$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace$1()); - var _types = /*@__PURE__*/ requireTypes$1(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Universal = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Universal, _Namespace); - function Universal(opts) { - var _this; - _this = _Namespace.call(this, opts) || this; - _this.type = _types.UNIVERSAL; - _this.value = '*'; - return _this; - } - return Universal; - }(_namespace["default"]); - exports["default"] = Universal; - module.exports = exports.default; - } (universal$1, universal$1.exports)); - return universal$1.exports; -} - -var combinator$1 = {exports: {}}; - -var hasRequiredCombinator$1; - -function requireCombinator$1 () { - if (hasRequiredCombinator$1) return combinator$1.exports; - hasRequiredCombinator$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); - var _types = /*@__PURE__*/ requireTypes$1(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Combinator = /*#__PURE__*/function (_Node) { - _inheritsLoose(Combinator, _Node); - function Combinator(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.COMBINATOR; - return _this; - } - return Combinator; - }(_node["default"]); - exports["default"] = Combinator; - module.exports = exports.default; - } (combinator$1, combinator$1.exports)); - return combinator$1.exports; -} - -var nesting$1 = {exports: {}}; - -var hasRequiredNesting$1; - -function requireNesting$1 () { - if (hasRequiredNesting$1) return nesting$1.exports; - hasRequiredNesting$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); - var _types = /*@__PURE__*/ requireTypes$1(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Nesting = /*#__PURE__*/function (_Node) { - _inheritsLoose(Nesting, _Node); - function Nesting(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.NESTING; - _this.value = '&'; - return _this; - } - return Nesting; - }(_node["default"]); - exports["default"] = Nesting; - module.exports = exports.default; - } (nesting$1, nesting$1.exports)); - return nesting$1.exports; -} - -var sortAscending$1 = {exports: {}}; - -var hasRequiredSortAscending$1; - -function requireSortAscending$1 () { - if (hasRequiredSortAscending$1) return sortAscending$1.exports; - hasRequiredSortAscending$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = sortAscending; - function sortAscending(list) { - return list.sort(function (a, b) { - return a - b; - }); - } - module.exports = exports.default; - } (sortAscending$1, sortAscending$1.exports)); - return sortAscending$1.exports; -} - -var tokenize$1 = {}; - -var tokenTypes$1 = {}; - -var hasRequiredTokenTypes$1; - -function requireTokenTypes$1 () { - if (hasRequiredTokenTypes$1) return tokenTypes$1; - hasRequiredTokenTypes$1 = 1; - - tokenTypes$1.__esModule = true; - tokenTypes$1.word = tokenTypes$1.tilde = tokenTypes$1.tab = tokenTypes$1.str = tokenTypes$1.space = tokenTypes$1.slash = tokenTypes$1.singleQuote = tokenTypes$1.semicolon = tokenTypes$1.plus = tokenTypes$1.pipe = tokenTypes$1.openSquare = tokenTypes$1.openParenthesis = tokenTypes$1.newline = tokenTypes$1.greaterThan = tokenTypes$1.feed = tokenTypes$1.equals = tokenTypes$1.doubleQuote = tokenTypes$1.dollar = tokenTypes$1.cr = tokenTypes$1.comment = tokenTypes$1.comma = tokenTypes$1.combinator = tokenTypes$1.colon = tokenTypes$1.closeSquare = tokenTypes$1.closeParenthesis = tokenTypes$1.caret = tokenTypes$1.bang = tokenTypes$1.backslash = tokenTypes$1.at = tokenTypes$1.asterisk = tokenTypes$1.ampersand = void 0; - var ampersand = 38; // `&`.charCodeAt(0); - tokenTypes$1.ampersand = ampersand; - var asterisk = 42; // `*`.charCodeAt(0); - tokenTypes$1.asterisk = asterisk; - var at = 64; // `@`.charCodeAt(0); - tokenTypes$1.at = at; - var comma = 44; // `,`.charCodeAt(0); - tokenTypes$1.comma = comma; - var colon = 58; // `:`.charCodeAt(0); - tokenTypes$1.colon = colon; - var semicolon = 59; // `;`.charCodeAt(0); - tokenTypes$1.semicolon = semicolon; - var openParenthesis = 40; // `(`.charCodeAt(0); - tokenTypes$1.openParenthesis = openParenthesis; - var closeParenthesis = 41; // `)`.charCodeAt(0); - tokenTypes$1.closeParenthesis = closeParenthesis; - var openSquare = 91; // `[`.charCodeAt(0); - tokenTypes$1.openSquare = openSquare; - var closeSquare = 93; // `]`.charCodeAt(0); - tokenTypes$1.closeSquare = closeSquare; - var dollar = 36; // `$`.charCodeAt(0); - tokenTypes$1.dollar = dollar; - var tilde = 126; // `~`.charCodeAt(0); - tokenTypes$1.tilde = tilde; - var caret = 94; // `^`.charCodeAt(0); - tokenTypes$1.caret = caret; - var plus = 43; // `+`.charCodeAt(0); - tokenTypes$1.plus = plus; - var equals = 61; // `=`.charCodeAt(0); - tokenTypes$1.equals = equals; - var pipe = 124; // `|`.charCodeAt(0); - tokenTypes$1.pipe = pipe; - var greaterThan = 62; // `>`.charCodeAt(0); - tokenTypes$1.greaterThan = greaterThan; - var space = 32; // ` `.charCodeAt(0); - tokenTypes$1.space = space; - var singleQuote = 39; // `'`.charCodeAt(0); - tokenTypes$1.singleQuote = singleQuote; - var doubleQuote = 34; // `"`.charCodeAt(0); - tokenTypes$1.doubleQuote = doubleQuote; - var slash = 47; // `/`.charCodeAt(0); - tokenTypes$1.slash = slash; - var bang = 33; // `!`.charCodeAt(0); - tokenTypes$1.bang = bang; - var backslash = 92; // '\\'.charCodeAt(0); - tokenTypes$1.backslash = backslash; - var cr = 13; // '\r'.charCodeAt(0); - tokenTypes$1.cr = cr; - var feed = 12; // '\f'.charCodeAt(0); - tokenTypes$1.feed = feed; - var newline = 10; // '\n'.charCodeAt(0); - tokenTypes$1.newline = newline; - var tab = 9; // '\t'.charCodeAt(0); - - // Expose aliases primarily for readability. - tokenTypes$1.tab = tab; - var str = singleQuote; - - // No good single character representation! - tokenTypes$1.str = str; - var comment = -1; - tokenTypes$1.comment = comment; - var word = -2; - tokenTypes$1.word = word; - var combinator = -3; - tokenTypes$1.combinator = combinator; - return tokenTypes$1; -} - -var hasRequiredTokenize$1; - -function requireTokenize$1 () { - if (hasRequiredTokenize$1) return tokenize$1; - hasRequiredTokenize$1 = 1; - (function (exports) { - - exports.__esModule = true; - exports.FIELDS = void 0; - exports["default"] = tokenize; - var t = _interopRequireWildcard(/*@__PURE__*/ requireTokenTypes$1()); - var _unescapable, _wordDelimiters; - function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); - var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); - var hex = {}; - var hexChars = "0123456789abcdefABCDEF"; - for (var i = 0; i < hexChars.length; i++) { - hex[hexChars.charCodeAt(i)] = true; - } - - /** - * Returns the last index of the bar css word - * @param {string} css The string in which the word begins - * @param {number} start The index into the string where word's first letter occurs - */ - function consumeWord(css, start) { - var next = start; - var code; - do { - code = css.charCodeAt(next); - if (wordDelimiters[code]) { - return next - 1; - } else if (code === t.backslash) { - next = consumeEscape(css, next) + 1; - } else { - // All other characters are part of the word - next++; - } - } while (next < css.length); - return next - 1; - } - - /** - * Returns the last index of the escape sequence - * @param {string} css The string in which the sequence begins - * @param {number} start The index into the string where escape character (`\`) occurs. - */ - function consumeEscape(css, start) { - var next = start; - var code = css.charCodeAt(next + 1); - if (unescapable[code]) ; else if (hex[code]) { - var hexDigits = 0; - // consume up to 6 hex chars - do { - next++; - hexDigits++; - code = css.charCodeAt(next + 1); - } while (hex[code] && hexDigits < 6); - // if fewer than 6 hex chars, a trailing space ends the escape - if (hexDigits < 6 && code === t.space) { - next++; - } - } else { - // the next char is part of the current word - next++; - } - return next; - } - var FIELDS = { - TYPE: 0, - START_LINE: 1, - START_COL: 2, - END_LINE: 3, - END_COL: 4, - START_POS: 5, - END_POS: 6 - }; - exports.FIELDS = FIELDS; - function tokenize(input) { - var tokens = []; - var css = input.css.valueOf(); - var _css = css, - length = _css.length; - var offset = -1; - var line = 1; - var start = 0; - var end = 0; - var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; - function unclosed(what, fix) { - if (input.safe) { - // fyi: this is never set to true. - css += fix; - next = css.length - 1; - } else { - throw input.error('Unclosed ' + what, line, start - offset, start); - } - } - while (start < length) { - code = css.charCodeAt(start); - if (code === t.newline) { - offset = start; - line += 1; - } - switch (code) { - case t.space: - case t.tab: - case t.newline: - case t.cr: - case t.feed: - next = start; - do { - next += 1; - code = css.charCodeAt(next); - if (code === t.newline) { - offset = next; - line += 1; - } - } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); - tokenType = t.space; - endLine = line; - endColumn = next - offset - 1; - end = next; - break; - case t.plus: - case t.greaterThan: - case t.tilde: - case t.pipe: - next = start; - do { - next += 1; - code = css.charCodeAt(next); - } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); - tokenType = t.combinator; - endLine = line; - endColumn = start - offset; - end = next; - break; - - // Consume these characters as single tokens. - case t.asterisk: - case t.ampersand: - case t.bang: - case t.comma: - case t.equals: - case t.dollar: - case t.caret: - case t.openSquare: - case t.closeSquare: - case t.colon: - case t.semicolon: - case t.openParenthesis: - case t.closeParenthesis: - next = start; - tokenType = code; - endLine = line; - endColumn = start - offset; - end = next + 1; - break; - case t.singleQuote: - case t.doubleQuote: - quote = code === t.singleQuote ? "'" : '"'; - next = start; - do { - escaped = false; - next = css.indexOf(quote, next + 1); - if (next === -1) { - unclosed('quote', quote); - } - escapePos = next; - while (css.charCodeAt(escapePos - 1) === t.backslash) { - escapePos -= 1; - escaped = !escaped; - } - } while (escaped); - tokenType = t.str; - endLine = line; - endColumn = start - offset; - end = next + 1; - break; - default: - if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { - next = css.indexOf('*/', start + 2) + 1; - if (next === 0) { - unclosed('comment', '*/'); - } - content = css.slice(start, next + 1); - lines = content.split('\n'); - last = lines.length - 1; - if (last > 0) { - nextLine = line + last; - nextOffset = next - lines[last].length; - } else { - nextLine = line; - nextOffset = offset; - } - tokenType = t.comment; - line = nextLine; - endLine = nextLine; - endColumn = next - nextOffset; - } else if (code === t.slash) { - next = start; - tokenType = code; - endLine = line; - endColumn = start - offset; - end = next + 1; - } else { - next = consumeWord(css, start); - tokenType = t.word; - endLine = line; - endColumn = next - offset; - } - end = next + 1; - break; - } - - // Ensure that the token structure remains consistent - tokens.push([tokenType, - // [0] Token type - line, - // [1] Starting line - start - offset, - // [2] Starting column - endLine, - // [3] Ending line - endColumn, - // [4] Ending column - start, - // [5] Start position / Source index - end // [6] End position - ]); - - // Reset offset for the next token - if (nextOffset) { - offset = nextOffset; - nextOffset = null; - } - start = end; - } - return tokens; - } - } (tokenize$1)); - return tokenize$1; -} - -var hasRequiredParser$2; - -function requireParser$2 () { - if (hasRequiredParser$2) return parser$1.exports; - hasRequiredParser$2 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _root = _interopRequireDefault(/*@__PURE__*/ requireRoot$1()); - var _selector = _interopRequireDefault(/*@__PURE__*/ requireSelector$1()); - var _className = _interopRequireDefault(/*@__PURE__*/ requireClassName$1()); - var _comment = _interopRequireDefault(/*@__PURE__*/ requireComment$1()); - var _id = _interopRequireDefault(/*@__PURE__*/ requireId$1()); - var _tag = _interopRequireDefault(/*@__PURE__*/ requireTag$1()); - var _string = _interopRequireDefault(/*@__PURE__*/ requireString$1()); - var _pseudo = _interopRequireDefault(/*@__PURE__*/ requirePseudo$1()); - var _attribute = _interopRequireWildcard(/*@__PURE__*/ requireAttribute$1()); - var _universal = _interopRequireDefault(/*@__PURE__*/ requireUniversal$1()); - var _combinator = _interopRequireDefault(/*@__PURE__*/ requireCombinator$1()); - var _nesting = _interopRequireDefault(/*@__PURE__*/ requireNesting$1()); - var _sortAscending = _interopRequireDefault(/*@__PURE__*/ requireSortAscending$1()); - var _tokenize = _interopRequireWildcard(/*@__PURE__*/ requireTokenize$1()); - var tokens = _interopRequireWildcard(/*@__PURE__*/ requireTokenTypes$1()); - var types = _interopRequireWildcard(/*@__PURE__*/ requireTypes$1()); - var _util = /*@__PURE__*/ requireUtil$2(); - var _WHITESPACE_TOKENS, _Object$assign; - function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); - var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); - function tokenStart(token) { - return { - line: token[_tokenize.FIELDS.START_LINE], - column: token[_tokenize.FIELDS.START_COL] - }; - } - function tokenEnd(token) { - return { - line: token[_tokenize.FIELDS.END_LINE], - column: token[_tokenize.FIELDS.END_COL] - }; - } - function getSource(startLine, startColumn, endLine, endColumn) { - return { - start: { - line: startLine, - column: startColumn - }, - end: { - line: endLine, - column: endColumn - } - }; - } - function getTokenSource(token) { - return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); - } - function getTokenSourceSpan(startToken, endToken) { - if (!startToken) { - return undefined; - } - return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); - } - function unescapeProp(node, prop) { - var value = node[prop]; - if (typeof value !== "string") { - return; - } - if (value.indexOf("\\") !== -1) { - (0, _util.ensureObject)(node, 'raws'); - node[prop] = (0, _util.unesc)(value); - if (node.raws[prop] === undefined) { - node.raws[prop] = value; - } - } - return node; - } - function indexesOf(array, item) { - var i = -1; - var indexes = []; - while ((i = array.indexOf(item, i + 1)) !== -1) { - indexes.push(i); - } - return indexes; - } - function uniqs() { - var list = Array.prototype.concat.apply([], arguments); - return list.filter(function (item, i) { - return i === list.indexOf(item); - }); - } - var Parser = /*#__PURE__*/function () { - function Parser(rule, options) { - if (options === void 0) { - options = {}; - } - this.rule = rule; - this.options = Object.assign({ - lossy: false, - safe: false - }, options); - this.position = 0; - this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector; - this.tokens = (0, _tokenize["default"])({ - css: this.css, - error: this._errorGenerator(), - safe: this.options.safe - }); - var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]); - this.root = new _root["default"]({ - source: rootSource - }); - this.root.errorGenerator = this._errorGenerator(); - var selector = new _selector["default"]({ - source: { - start: { - line: 1, - column: 1 - } - }, - sourceIndex: 0 - }); - this.root.append(selector); - this.current = selector; - this.loop(); - } - var _proto = Parser.prototype; - _proto._errorGenerator = function _errorGenerator() { - var _this = this; - return function (message, errorOptions) { - if (typeof _this.rule === 'string') { - return new Error(message); - } - return _this.rule.error(message, errorOptions); - }; - }; - _proto.attribute = function attribute() { - var attr = []; - var startingToken = this.currToken; - this.position++; - while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { - attr.push(this.currToken); - this.position++; - } - if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { - return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]); - } - var len = attr.length; - var node = { - source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), - sourceIndex: startingToken[_tokenize.FIELDS.START_POS] - }; - if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) { - return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]); - } - var pos = 0; - var spaceBefore = ''; - var commentBefore = ''; - var lastAdded = null; - var spaceAfterMeaningfulToken = false; - while (pos < len) { - var token = attr[pos]; - var content = this.content(token); - var next = attr[pos + 1]; - switch (token[_tokenize.FIELDS.TYPE]) { - case tokens.space: - // if ( - // len === 1 || - // pos === 0 && this.content(next) === '|' - // ) { - // return this.expected('attribute', token[TOKEN.START_POS], content); - // } - spaceAfterMeaningfulToken = true; - if (this.options.lossy) { - break; - } - if (lastAdded) { - (0, _util.ensureObject)(node, 'spaces', lastAdded); - var prevContent = node.spaces[lastAdded].after || ''; - node.spaces[lastAdded].after = prevContent + content; - var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null; - if (existingComment) { - node.raws.spaces[lastAdded].after = existingComment + content; - } - } else { - spaceBefore = spaceBefore + content; - commentBefore = commentBefore + content; - } - break; - case tokens.asterisk: - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) { - if (spaceBefore) { - (0, _util.ensureObject)(node, 'spaces', 'attribute'); - node.spaces.attribute.before = spaceBefore; - spaceBefore = ''; - } - if (commentBefore) { - (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); - node.raws.spaces.attribute.before = spaceBefore; - commentBefore = ''; - } - node.namespace = (node.namespace || "") + content; - var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null; - if (rawValue) { - node.raws.namespace += content; - } - lastAdded = 'namespace'; - } - spaceAfterMeaningfulToken = false; - break; - case tokens.dollar: - if (lastAdded === "value") { - var oldRawValue = (0, _util.getProp)(node, 'raws', 'value'); - node.value += "$"; - if (oldRawValue) { - node.raws.value = oldRawValue + "$"; - } - break; - } - // Falls through - case tokens.caret: - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } - spaceAfterMeaningfulToken = false; - break; - case tokens.combinator: - if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } - if (content !== '|') { - spaceAfterMeaningfulToken = false; - break; - } - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } else if (!node.namespace && !node.attribute) { - node.namespace = true; - } - spaceAfterMeaningfulToken = false; - break; - case tokens.word: - if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && - // this look-ahead probably fails with comment nodes involved. - !node.operator && !node.namespace) { - node.namespace = content; - lastAdded = 'namespace'; - } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) { - if (spaceBefore) { - (0, _util.ensureObject)(node, 'spaces', 'attribute'); - node.spaces.attribute.before = spaceBefore; - spaceBefore = ''; - } - if (commentBefore) { - (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); - node.raws.spaces.attribute.before = commentBefore; - commentBefore = ''; - } - node.attribute = (node.attribute || "") + content; - var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null; - if (_rawValue) { - node.raws.attribute += content; - } - lastAdded = 'attribute'; - } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) { - var _unescaped = (0, _util.unesc)(content); - var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || ''; - var oldValue = node.value || ''; - node.value = oldValue + _unescaped; - node.quoteMark = null; - if (_unescaped !== content || _oldRawValue) { - (0, _util.ensureObject)(node, 'raws'); - node.raws.value = (_oldRawValue || oldValue) + content; - } - lastAdded = 'value'; - } else { - var insensitive = content === 'i' || content === "I"; - if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) { - node.insensitive = insensitive; - if (!insensitive || content === "I") { - (0, _util.ensureObject)(node, 'raws'); - node.raws.insensitiveFlag = content; - } - lastAdded = 'insensitive'; - if (spaceBefore) { - (0, _util.ensureObject)(node, 'spaces', 'insensitive'); - node.spaces.insensitive.before = spaceBefore; - spaceBefore = ''; - } - if (commentBefore) { - (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive'); - node.raws.spaces.insensitive.before = commentBefore; - commentBefore = ''; - } - } else if (node.value || node.value === '') { - lastAdded = 'value'; - node.value += content; - if (node.raws.value) { - node.raws.value += content; - } - } - } - spaceAfterMeaningfulToken = false; - break; - case tokens.str: - if (!node.attribute || !node.operator) { - return this.error("Expected an attribute followed by an operator preceding the string.", { - index: token[_tokenize.FIELDS.START_POS] - }); - } - var _unescapeValue = (0, _attribute.unescapeValue)(content), - unescaped = _unescapeValue.unescaped, - quoteMark = _unescapeValue.quoteMark; - node.value = unescaped; - node.quoteMark = quoteMark; - lastAdded = 'value'; - (0, _util.ensureObject)(node, 'raws'); - node.raws.value = content; - spaceAfterMeaningfulToken = false; - break; - case tokens.equals: - if (!node.attribute) { - return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content); - } - if (node.value) { - return this.error('Unexpected "=" found; an operator was already defined.', { - index: token[_tokenize.FIELDS.START_POS] - }); - } - node.operator = node.operator ? node.operator + content : content; - lastAdded = 'operator'; - spaceAfterMeaningfulToken = false; - break; - case tokens.comment: - if (lastAdded) { - if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') { - var lastComment = (0, _util.getProp)(node, 'spaces', lastAdded, 'after') || ''; - var rawLastComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment; - (0, _util.ensureObject)(node, 'raws', 'spaces', lastAdded); - node.raws.spaces[lastAdded].after = rawLastComment + content; - } else { - var lastValue = node[lastAdded] || ''; - var rawLastValue = (0, _util.getProp)(node, 'raws', lastAdded) || lastValue; - (0, _util.ensureObject)(node, 'raws'); - node.raws[lastAdded] = rawLastValue + content; - } - } else { - commentBefore = commentBefore + content; - } - break; - default: - return this.error("Unexpected \"" + content + "\" found.", { - index: token[_tokenize.FIELDS.START_POS] - }); - } - pos++; - } - unescapeProp(node, "attribute"); - unescapeProp(node, "namespace"); - this.newNode(new _attribute["default"](node)); - this.position++; - } - - /** - * return a node containing meaningless garbage up to (but not including) the specified token position. - * if the token position is negative, all remaining tokens are consumed. - * - * This returns an array containing a single string node if all whitespace, - * otherwise an array of comment nodes with space before and after. - * - * These tokens are not added to the current selector, the caller can add them or use them to amend - * a previous node's space metadata. - * - * In lossy mode, this returns only comments. - */; - _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { - if (stopPosition < 0) { - stopPosition = this.tokens.length; - } - var startPosition = this.position; - var nodes = []; - var space = ""; - var lastComment = undefined; - do { - if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { - if (!this.options.lossy) { - space += this.content(); - } - } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { - var spaces = {}; - if (space) { - spaces.before = space; - space = ""; - } - lastComment = new _comment["default"]({ - value: this.content(), - source: getTokenSource(this.currToken), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], - spaces: spaces - }); - nodes.push(lastComment); - } - } while (++this.position < stopPosition); - if (space) { - if (lastComment) { - lastComment.spaces.after = space; - } else if (!this.options.lossy) { - var firstToken = this.tokens[startPosition]; - var lastToken = this.tokens[this.position - 1]; - nodes.push(new _string["default"]({ - value: '', - source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]), - sourceIndex: firstToken[_tokenize.FIELDS.START_POS], - spaces: { - before: space, - after: '' - } - })); - } - } - return nodes; - } - - /** - * - * @param {*} nodes - */; - _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { - var _this2 = this; - if (requiredSpace === void 0) { - requiredSpace = false; - } - var space = ""; - var rawSpace = ""; - nodes.forEach(function (n) { - var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); - var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); - space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); - rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); - }); - if (rawSpace === space) { - rawSpace = undefined; - } - var result = { - space: space, - rawSpace: rawSpace - }; - return result; - }; - _proto.isNamedCombinator = function isNamedCombinator(position) { - if (position === void 0) { - position = this.position; - } - return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; - }; - _proto.namedCombinator = function namedCombinator() { - if (this.isNamedCombinator()) { - var nameRaw = this.content(this.tokens[this.position + 1]); - var name = (0, _util.unesc)(nameRaw).toLowerCase(); - var raws = {}; - if (name !== nameRaw) { - raws.value = "/" + nameRaw + "/"; - } - var node = new _combinator["default"]({ - value: "/" + name + "/", - source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], - raws: raws - }); - this.position = this.position + 3; - return node; - } else { - this.unexpected(); - } - }; - _proto.combinator = function combinator() { - var _this3 = this; - if (this.content() === '|') { - return this.namespace(); - } - // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. - var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); - if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); - if (nodes.length > 0) { - var last = this.current.last; - if (last) { - var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), - space = _this$convertWhitespa.space, - rawSpace = _this$convertWhitespa.rawSpace; - if (rawSpace !== undefined) { - last.rawSpaceAfter += rawSpace; - } - last.spaces.after += space; - } else { - nodes.forEach(function (n) { - return _this3.newNode(n); - }); - } - } - return; - } - var firstToken = this.currToken; - var spaceOrDescendantSelectorNodes = undefined; - if (nextSigTokenPos > this.position) { - spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); - } - var node; - if (this.isNamedCombinator()) { - node = this.namedCombinator(); - } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { - node = new _combinator["default"]({ - value: this.content(), - source: getTokenSource(this.currToken), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] - }); - this.position++; - } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) ; else if (!spaceOrDescendantSelectorNodes) { - this.unexpected(); - } - if (node) { - if (spaceOrDescendantSelectorNodes) { - var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), - _space = _this$convertWhitespa2.space, - _rawSpace = _this$convertWhitespa2.rawSpace; - node.spaces.before = _space; - node.rawSpaceBefore = _rawSpace; - } - } else { - // descendant combinator - var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), - _space2 = _this$convertWhitespa3.space, - _rawSpace2 = _this$convertWhitespa3.rawSpace; - if (!_rawSpace2) { - _rawSpace2 = _space2; - } - var spaces = {}; - var raws = { - spaces: {} - }; - if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) { - spaces.before = _space2.slice(0, _space2.length - 1); - raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); - } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) { - spaces.after = _space2.slice(1); - raws.spaces.after = _rawSpace2.slice(1); - } else { - raws.value = _rawSpace2; - } - node = new _combinator["default"]({ - value: ' ', - source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), - sourceIndex: firstToken[_tokenize.FIELDS.START_POS], - spaces: spaces, - raws: raws - }); - } - if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { - node.spaces.after = this.optionalSpace(this.content()); - this.position++; - } - return this.newNode(node); - }; - _proto.comma = function comma() { - if (this.position === this.tokens.length - 1) { - this.root.trailingComma = true; - this.position++; - return; - } - this.current._inferEndPosition(); - var selector = new _selector["default"]({ - source: { - start: tokenStart(this.tokens[this.position + 1]) - }, - sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS] - }); - this.current.parent.append(selector); - this.current = selector; - this.position++; - }; - _proto.comment = function comment() { - var current = this.currToken; - this.newNode(new _comment["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - _proto.error = function error(message, opts) { - throw this.root.error(message, opts); - }; - _proto.missingBackslash = function missingBackslash() { - return this.error('Expected a backslash preceding the semicolon.', { - index: this.currToken[_tokenize.FIELDS.START_POS] - }); - }; - _proto.missingParenthesis = function missingParenthesis() { - return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.missingSquareBracket = function missingSquareBracket() { - return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.unexpected = function unexpected() { - return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.unexpectedPipe = function unexpectedPipe() { - return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.namespace = function namespace() { - var before = this.prevToken && this.content(this.prevToken) || true; - if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) { - this.position++; - return this.word(before); - } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) { - this.position++; - return this.universal(before); - } - this.unexpectedPipe(); - }; - _proto.nesting = function nesting() { - if (this.nextToken) { - var nextContent = this.content(this.nextToken); - if (nextContent === "|") { - this.position++; - return; - } - } - var current = this.currToken; - this.newNode(new _nesting["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - _proto.parentheses = function parentheses() { - var last = this.current.last; - var unbalanced = 1; - this.position++; - if (last && last.type === types.PSEUDO) { - var selector = new _selector["default"]({ - source: { - start: tokenStart(this.tokens[this.position]) - }, - sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS] - }); - var cache = this.current; - last.append(selector); - this.current = selector; - while (this.position < this.tokens.length && unbalanced) { - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - unbalanced++; - } - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - unbalanced--; - } - if (unbalanced) { - this.parse(); - } else { - this.current.source.end = tokenEnd(this.currToken); - this.current.parent.source.end = tokenEnd(this.currToken); - this.position++; - } - } - this.current = cache; - } else { - // I think this case should be an error. It's used to implement a basic parse of media queries - // but I don't think it's a good idea. - var parenStart = this.currToken; - var parenValue = "("; - var parenEnd; - while (this.position < this.tokens.length && unbalanced) { - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - unbalanced++; - } - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - unbalanced--; - } - parenEnd = this.currToken; - parenValue += this.parseParenthesisToken(this.currToken); - this.position++; - } - if (last) { - last.appendToPropertyAndEscape("value", parenValue, parenValue); - } else { - this.newNode(new _string["default"]({ - value: parenValue, - source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]), - sourceIndex: parenStart[_tokenize.FIELDS.START_POS] - })); - } - } - if (unbalanced) { - return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); - } - }; - _proto.pseudo = function pseudo() { - var _this4 = this; - var pseudoStr = ''; - var startingToken = this.currToken; - while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { - pseudoStr += this.content(); - this.position++; - } - if (!this.currToken) { - return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1); - } - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) { - this.splitWord(false, function (first, length) { - pseudoStr += first; - _this4.newNode(new _pseudo["default"]({ - value: pseudoStr, - source: getTokenSourceSpan(startingToken, _this4.currToken), - sourceIndex: startingToken[_tokenize.FIELDS.START_POS] - })); - if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - _this4.error('Misplaced parenthesis.', { - index: _this4.nextToken[_tokenize.FIELDS.START_POS] - }); - } - }); - } else { - return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]); - } - }; - _proto.space = function space() { - var content = this.content(); - // Handle space before and after the selector - if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) { - return node.type === 'comment'; - })) { - this.spaces = this.optionalSpace(content); - this.position++; - } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - this.current.last.spaces.after = this.optionalSpace(content); - this.position++; - } else { - this.combinator(); - } - }; - _proto.string = function string() { - var current = this.currToken; - this.newNode(new _string["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - _proto.universal = function universal(namespace) { - var nextToken = this.nextToken; - if (nextToken && this.content(nextToken) === '|') { - this.position++; - return this.namespace(); - } - var current = this.currToken; - this.newNode(new _universal["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - }), namespace); - this.position++; - }; - _proto.splitWord = function splitWord(namespace, firstCallback) { - var _this5 = this; - var nextToken = this.nextToken; - var word = this.content(); - while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { - this.position++; - var current = this.content(); - word += current; - if (current.lastIndexOf('\\') === current.length - 1) { - var next = this.nextToken; - if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { - word += this.requiredSpace(this.content(next)); - this.position++; - } - } - nextToken = this.nextToken; - } - var hasClass = indexesOf(word, '.').filter(function (i) { - // Allow escaped dot within class name - var escapedDot = word[i - 1] === '\\'; - // Allow decimal numbers percent in @keyframes - var isKeyframesPercent = /^\d+\.\d+%$/.test(word); - return !escapedDot && !isKeyframesPercent; - }); - var hasId = indexesOf(word, '#').filter(function (i) { - return word[i - 1] !== '\\'; - }); - // Eliminate Sass interpolations from the list of id indexes - var interpolations = indexesOf(word, '#{'); - if (interpolations.length) { - hasId = hasId.filter(function (hashIndex) { - return !~interpolations.indexOf(hashIndex); - }); - } - var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); - indices.forEach(function (ind, i) { - var index = indices[i + 1] || word.length; - var value = word.slice(ind, index); - if (i === 0 && firstCallback) { - return firstCallback.call(_this5, value, indices.length); - } - var node; - var current = _this5.currToken; - var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i]; - var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1)); - if (~hasClass.indexOf(ind)) { - var classNameOpts = { - value: value.slice(1), - source: source, - sourceIndex: sourceIndex - }; - node = new _className["default"](unescapeProp(classNameOpts, "value")); - } else if (~hasId.indexOf(ind)) { - var idOpts = { - value: value.slice(1), - source: source, - sourceIndex: sourceIndex - }; - node = new _id["default"](unescapeProp(idOpts, "value")); - } else { - var tagOpts = { - value: value, - source: source, - sourceIndex: sourceIndex - }; - unescapeProp(tagOpts, "value"); - node = new _tag["default"](tagOpts); - } - _this5.newNode(node, namespace); - // Ensure that the namespace is used only once - namespace = null; - }); - this.position++; - }; - _proto.word = function word(namespace) { - var nextToken = this.nextToken; - if (nextToken && this.content(nextToken) === '|') { - this.position++; - return this.namespace(); - } - return this.splitWord(namespace); - }; - _proto.loop = function loop() { - while (this.position < this.tokens.length) { - this.parse(true); - } - this.current._inferEndPosition(); - return this.root; - }; - _proto.parse = function parse(throwOnParenthesis) { - switch (this.currToken[_tokenize.FIELDS.TYPE]) { - case tokens.space: - this.space(); - break; - case tokens.comment: - this.comment(); - break; - case tokens.openParenthesis: - this.parentheses(); - break; - case tokens.closeParenthesis: - if (throwOnParenthesis) { - this.missingParenthesis(); - } - break; - case tokens.openSquare: - this.attribute(); - break; - case tokens.dollar: - case tokens.caret: - case tokens.equals: - case tokens.word: - this.word(); - break; - case tokens.colon: - this.pseudo(); - break; - case tokens.comma: - this.comma(); - break; - case tokens.asterisk: - this.universal(); - break; - case tokens.ampersand: - this.nesting(); - break; - case tokens.slash: - case tokens.combinator: - this.combinator(); - break; - case tokens.str: - this.string(); - break; - // These cases throw; no break needed. - case tokens.closeSquare: - this.missingSquareBracket(); - case tokens.semicolon: - this.missingBackslash(); - default: - this.unexpected(); - } - } - - /** - * Helpers - */; - _proto.expected = function expected(description, index, found) { - if (Array.isArray(description)) { - var last = description.pop(); - description = description.join(', ') + " or " + last; - } - var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a'; - if (!found) { - return this.error("Expected " + an + " " + description + ".", { - index: index - }); - } - return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { - index: index - }); - }; - _proto.requiredSpace = function requiredSpace(space) { - return this.options.lossy ? ' ' : space; - }; - _proto.optionalSpace = function optionalSpace(space) { - return this.options.lossy ? '' : space; - }; - _proto.lossySpace = function lossySpace(space, required) { - if (this.options.lossy) { - return required ? ' ' : ''; - } else { - return space; - } - }; - _proto.parseParenthesisToken = function parseParenthesisToken(token) { - var content = this.content(token); - if (token[_tokenize.FIELDS.TYPE] === tokens.space) { - return this.requiredSpace(content); - } else { - return content; - } - }; - _proto.newNode = function newNode(node, namespace) { - if (namespace) { - if (/^ +$/.test(namespace)) { - if (!this.options.lossy) { - this.spaces = (this.spaces || '') + namespace; - } - namespace = true; - } - node.namespace = namespace; - unescapeProp(node, "namespace"); - } - if (this.spaces) { - node.spaces.before = this.spaces; - this.spaces = ''; - } - return this.current.append(node); - }; - _proto.content = function content(token) { - if (token === void 0) { - token = this.currToken; - } - return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); - }; - /** - * returns the index of the next non-whitespace, non-comment token. - * returns -1 if no meaningful token is found. - */ - _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) { - if (startPosition === void 0) { - startPosition = this.position + 1; - } - var searchPosition = startPosition; - while (searchPosition < this.tokens.length) { - if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { - searchPosition++; - continue; - } else { - return searchPosition; - } - } - return -1; - }; - _createClass(Parser, [{ - key: "currToken", - get: function get() { - return this.tokens[this.position]; - } - }, { - key: "nextToken", - get: function get() { - return this.tokens[this.position + 1]; - } - }, { - key: "prevToken", - get: function get() { - return this.tokens[this.position - 1]; - } - }]); - return Parser; - }(); - exports["default"] = Parser; - module.exports = exports.default; - } (parser$1, parser$1.exports)); - return parser$1.exports; -} - -var hasRequiredProcessor$1; - -function requireProcessor$1 () { - if (hasRequiredProcessor$1) return processor$1.exports; - hasRequiredProcessor$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _parser = _interopRequireDefault(/*@__PURE__*/ requireParser$2()); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - var Processor = /*#__PURE__*/function () { - function Processor(func, options) { - this.func = func || function noop() {}; - this.funcRes = null; - this.options = options; - } - var _proto = Processor.prototype; - _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { - if (options === void 0) { - options = {}; - } - var merged = Object.assign({}, this.options, options); - if (merged.updateSelector === false) { - return false; - } else { - return typeof rule !== "string"; - } - }; - _proto._isLossy = function _isLossy(options) { - if (options === void 0) { - options = {}; - } - var merged = Object.assign({}, this.options, options); - if (merged.lossless === false) { - return true; - } else { - return false; - } - }; - _proto._root = function _root(rule, options) { - if (options === void 0) { - options = {}; - } - var parser = new _parser["default"](rule, this._parseOptions(options)); - return parser.root; - }; - _proto._parseOptions = function _parseOptions(options) { - return { - lossy: this._isLossy(options) - }; - }; - _proto._run = function _run(rule, options) { - var _this = this; - if (options === void 0) { - options = {}; - } - return new Promise(function (resolve, reject) { - try { - var root = _this._root(rule, options); - Promise.resolve(_this.func(root)).then(function (transform) { - var string = undefined; - if (_this._shouldUpdateSelector(rule, options)) { - string = root.toString(); - rule.selector = string; - } - return { - transform: transform, - root: root, - string: string - }; - }).then(resolve, reject); - } catch (e) { - reject(e); - return; - } - }); - }; - _proto._runSync = function _runSync(rule, options) { - if (options === void 0) { - options = {}; - } - var root = this._root(rule, options); - var transform = this.func(root); - if (transform && typeof transform.then === "function") { - throw new Error("Selector processor returned a promise to a synchronous call."); - } - var string = undefined; - if (options.updateSelector && typeof rule !== "string") { - string = root.toString(); - rule.selector = string; - } - return { - transform: transform, - root: root, - string: string - }; - } - - /** - * Process rule into a selector AST. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {Promise<parser.Root>} The AST of the selector after processing it. - */; - _proto.ast = function ast(rule, options) { - return this._run(rule, options).then(function (result) { - return result.root; - }); - } - - /** - * Process rule into a selector AST synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {parser.Root} The AST of the selector after processing it. - */; - _proto.astSync = function astSync(rule, options) { - return this._runSync(rule, options).root; - } - - /** - * Process a selector into a transformed value asynchronously - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {Promise<any>} The value returned by the processor. - */; - _proto.transform = function transform(rule, options) { - return this._run(rule, options).then(function (result) { - return result.transform; - }); - } - - /** - * Process a selector into a transformed value synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {any} The value returned by the processor. - */; - _proto.transformSync = function transformSync(rule, options) { - return this._runSync(rule, options).transform; - } - - /** - * Process a selector into a new selector string asynchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {string} the selector after processing. - */; - _proto.process = function process(rule, options) { - return this._run(rule, options).then(function (result) { - return result.string || result.root.toString(); - }); - } - - /** - * Process a selector into a new selector string synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {string} the selector after processing. - */; - _proto.processSync = function processSync(rule, options) { - var result = this._runSync(rule, options); - return result.string || result.root.toString(); - }; - return Processor; - }(); - exports["default"] = Processor; - module.exports = exports.default; - } (processor$1, processor$1.exports)); - return processor$1.exports; -} - -var selectors$1 = {}; - -var constructors$1 = {}; - -var hasRequiredConstructors$1; - -function requireConstructors$1 () { - if (hasRequiredConstructors$1) return constructors$1; - hasRequiredConstructors$1 = 1; - - constructors$1.__esModule = true; - constructors$1.universal = constructors$1.tag = constructors$1.string = constructors$1.selector = constructors$1.root = constructors$1.pseudo = constructors$1.nesting = constructors$1.id = constructors$1.comment = constructors$1.combinator = constructors$1.className = constructors$1.attribute = void 0; - var _attribute = _interopRequireDefault(/*@__PURE__*/ requireAttribute$1()); - var _className = _interopRequireDefault(/*@__PURE__*/ requireClassName$1()); - var _combinator = _interopRequireDefault(/*@__PURE__*/ requireCombinator$1()); - var _comment = _interopRequireDefault(/*@__PURE__*/ requireComment$1()); - var _id = _interopRequireDefault(/*@__PURE__*/ requireId$1()); - var _nesting = _interopRequireDefault(/*@__PURE__*/ requireNesting$1()); - var _pseudo = _interopRequireDefault(/*@__PURE__*/ requirePseudo$1()); - var _root = _interopRequireDefault(/*@__PURE__*/ requireRoot$1()); - var _selector = _interopRequireDefault(/*@__PURE__*/ requireSelector$1()); - var _string = _interopRequireDefault(/*@__PURE__*/ requireString$1()); - var _tag = _interopRequireDefault(/*@__PURE__*/ requireTag$1()); - var _universal = _interopRequireDefault(/*@__PURE__*/ requireUniversal$1()); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - var attribute = function attribute(opts) { - return new _attribute["default"](opts); - }; - constructors$1.attribute = attribute; - var className = function className(opts) { - return new _className["default"](opts); - }; - constructors$1.className = className; - var combinator = function combinator(opts) { - return new _combinator["default"](opts); - }; - constructors$1.combinator = combinator; - var comment = function comment(opts) { - return new _comment["default"](opts); - }; - constructors$1.comment = comment; - var id = function id(opts) { - return new _id["default"](opts); - }; - constructors$1.id = id; - var nesting = function nesting(opts) { - return new _nesting["default"](opts); - }; - constructors$1.nesting = nesting; - var pseudo = function pseudo(opts) { - return new _pseudo["default"](opts); - }; - constructors$1.pseudo = pseudo; - var root = function root(opts) { - return new _root["default"](opts); - }; - constructors$1.root = root; - var selector = function selector(opts) { - return new _selector["default"](opts); - }; - constructors$1.selector = selector; - var string = function string(opts) { - return new _string["default"](opts); - }; - constructors$1.string = string; - var tag = function tag(opts) { - return new _tag["default"](opts); - }; - constructors$1.tag = tag; - var universal = function universal(opts) { - return new _universal["default"](opts); - }; - constructors$1.universal = universal; - return constructors$1; -} - -var guards$1 = {}; - -var hasRequiredGuards$1; - -function requireGuards$1 () { - if (hasRequiredGuards$1) return guards$1; - hasRequiredGuards$1 = 1; - - guards$1.__esModule = true; - guards$1.isComment = guards$1.isCombinator = guards$1.isClassName = guards$1.isAttribute = void 0; - guards$1.isContainer = isContainer; - guards$1.isIdentifier = void 0; - guards$1.isNamespace = isNamespace; - guards$1.isNesting = void 0; - guards$1.isNode = isNode; - guards$1.isPseudo = void 0; - guards$1.isPseudoClass = isPseudoClass; - guards$1.isPseudoElement = isPseudoElement; - guards$1.isUniversal = guards$1.isTag = guards$1.isString = guards$1.isSelector = guards$1.isRoot = void 0; - var _types = /*@__PURE__*/ requireTypes$1(); - var _IS_TYPE; - var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE); - function isNode(node) { - return typeof node === "object" && IS_TYPE[node.type]; - } - function isNodeType(type, node) { - return isNode(node) && node.type === type; - } - var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE); - guards$1.isAttribute = isAttribute; - var isClassName = isNodeType.bind(null, _types.CLASS); - guards$1.isClassName = isClassName; - var isCombinator = isNodeType.bind(null, _types.COMBINATOR); - guards$1.isCombinator = isCombinator; - var isComment = isNodeType.bind(null, _types.COMMENT); - guards$1.isComment = isComment; - var isIdentifier = isNodeType.bind(null, _types.ID); - guards$1.isIdentifier = isIdentifier; - var isNesting = isNodeType.bind(null, _types.NESTING); - guards$1.isNesting = isNesting; - var isPseudo = isNodeType.bind(null, _types.PSEUDO); - guards$1.isPseudo = isPseudo; - var isRoot = isNodeType.bind(null, _types.ROOT); - guards$1.isRoot = isRoot; - var isSelector = isNodeType.bind(null, _types.SELECTOR); - guards$1.isSelector = isSelector; - var isString = isNodeType.bind(null, _types.STRING); - guards$1.isString = isString; - var isTag = isNodeType.bind(null, _types.TAG); - guards$1.isTag = isTag; - var isUniversal = isNodeType.bind(null, _types.UNIVERSAL); - guards$1.isUniversal = isUniversal; - function isPseudoElement(node) { - return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line"); - } - function isPseudoClass(node) { - return isPseudo(node) && !isPseudoElement(node); - } - function isContainer(node) { - return !!(isNode(node) && node.walk); - } - function isNamespace(node) { - return isAttribute(node) || isTag(node); - } - return guards$1; -} - -var hasRequiredSelectors$1; - -function requireSelectors$1 () { - if (hasRequiredSelectors$1) return selectors$1; - hasRequiredSelectors$1 = 1; - (function (exports) { - - exports.__esModule = true; - var _types = /*@__PURE__*/ requireTypes$1(); - Object.keys(_types).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _types[key]) return; - exports[key] = _types[key]; - }); - var _constructors = /*@__PURE__*/ requireConstructors$1(); - Object.keys(_constructors).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _constructors[key]) return; - exports[key] = _constructors[key]; - }); - var _guards = /*@__PURE__*/ requireGuards$1(); - Object.keys(_guards).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _guards[key]) return; - exports[key] = _guards[key]; - }); - } (selectors$1)); - return selectors$1; -} - -var hasRequiredDist$1; - -function requireDist$1 () { - if (hasRequiredDist$1) return dist$1.exports; - hasRequiredDist$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _processor = _interopRequireDefault(/*@__PURE__*/ requireProcessor$1()); - var selectors = _interopRequireWildcard(/*@__PURE__*/ requireSelectors$1()); - function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - var parser = function parser(processor) { - return new _processor["default"](processor); - }; - Object.assign(parser, selectors); - delete parser.__esModule; - var _default = parser; - exports["default"] = _default; - module.exports = exports.default; - } (dist$1, dist$1.exports)); - return dist$1.exports; -} - -var distExports = /*@__PURE__*/ requireDist$1(); -var selectorParser = /*@__PURE__*/getDefaultExportFromCjs(distExports); - -const animationNameRE = /^(-\w+-)?animation-name$/; -const animationRE = /^(-\w+-)?animation$/; -const scopedPlugin = (id = "") => { - const keyframes = /* @__PURE__ */ Object.create(null); - const shortId = id.replace(/^data-v-/, ""); - return { - postcssPlugin: "vue-sfc-scoped", - Rule(rule) { - processRule(id, rule); - }, - AtRule(node) { - if (/-?keyframes$/.test(node.name) && !node.params.endsWith(`-${shortId}`)) { - keyframes[node.params] = node.params = node.params + "-" + shortId; - } - }, - OnceExit(root) { - if (Object.keys(keyframes).length) { - root.walkDecls((decl) => { - if (animationNameRE.test(decl.prop)) { - decl.value = decl.value.split(",").map((v) => keyframes[v.trim()] || v.trim()).join(","); - } - if (animationRE.test(decl.prop)) { - decl.value = decl.value.split(",").map((v) => { - const vals = v.trim().split(/\s+/); - const i = vals.findIndex((val) => keyframes[val]); - if (i !== -1) { - vals.splice(i, 1, keyframes[vals[i]]); - return vals.join(" "); - } else { - return v; - } - }).join(","); - } - }); - } - } - }; -}; -const processedRules = /* @__PURE__ */ new WeakSet(); -function processRule(id, rule) { - if (processedRules.has(rule) || rule.parent && rule.parent.type === "atrule" && /-?keyframes$/.test(rule.parent.name)) { - return; - } - processedRules.add(rule); - let deep = false; - let parent = rule.parent; - while (parent && parent.type !== "root") { - if (parent.__deep) { - deep = true; - break; - } - parent = parent.parent; - } - rule.selector = selectorParser((selectorRoot) => { - selectorRoot.each((selector) => { - rewriteSelector(id, rule, selector, selectorRoot, deep); - }); - }).processSync(rule.selector); -} -function rewriteSelector(id, rule, selector, selectorRoot, deep, slotted = false) { - let node = null; - let shouldInject = !deep; - selector.each((n) => { - if (n.type === "combinator" && (n.value === ">>>" || n.value === "/deep/")) { - n.value = " "; - n.spaces.before = n.spaces.after = ""; - warn( - `the >>> and /deep/ combinators have been deprecated. Use :deep() instead.` - ); - return false; - } - if (n.type === "pseudo") { - const { value } = n; - if (value === ":deep" || value === "::v-deep") { - rule.__deep = true; - if (n.nodes.length) { - let last = n; - n.nodes[0].each((ss) => { - selector.insertAfter(last, ss); - last = ss; - }); - const prev = selector.at(selector.index(n) - 1); - if (!prev || !isSpaceCombinator(prev)) { - selector.insertAfter( - n, - selectorParser.combinator({ - value: " " - }) - ); - } - selector.removeChild(n); - } else { - warn( - `${value} usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead of ${value} <inner-selector>.` - ); - const prev = selector.at(selector.index(n) - 1); - if (prev && isSpaceCombinator(prev)) { - selector.removeChild(prev); - } - selector.removeChild(n); - } - return false; - } - if (value === ":slotted" || value === "::v-slotted") { - rewriteSelector( - id, - rule, - n.nodes[0], - selectorRoot, - deep, - true - ); - let last = n; - n.nodes[0].each((ss) => { - selector.insertAfter(last, ss); - last = ss; - }); - selector.removeChild(n); - shouldInject = false; - return false; - } - if (value === ":global" || value === "::v-global") { - selector.replaceWith(n.nodes[0]); - return false; - } - } - if (n.type === "universal") { - const prev = selector.at(selector.index(n) - 1); - const next = selector.at(selector.index(n) + 1); - if (!prev) { - if (next) { - if (next.type === "combinator" && next.value === " ") { - selector.removeChild(next); - } - selector.removeChild(n); - return; - } else { - node = selectorParser.combinator({ - value: "" - }); - selector.insertBefore(n, node); - selector.removeChild(n); - return false; - } - } - if (node) return; - } - if (n.type !== "pseudo" && n.type !== "combinator" || n.type === "pseudo" && (n.value === ":is" || n.value === ":where") && !node) { - node = n; - } - }); - if (rule.nodes.some((node2) => node2.type === "rule")) { - const deep2 = rule.__deep; - if (!deep2) { - extractAndWrapNodes(rule); - const atruleNodes = rule.nodes.filter((node2) => node2.type === "atrule"); - for (const atnode of atruleNodes) { - extractAndWrapNodes(atnode); - } - } - shouldInject = deep2; - } - if (node) { - const { type, value } = node; - if (type === "pseudo" && (value === ":is" || value === ":where")) { - node.nodes.forEach( - (value2) => rewriteSelector(id, rule, value2, selectorRoot, deep, slotted) - ); - shouldInject = false; - } - } - if (node) { - node.spaces.after = ""; - } else { - selector.first.spaces.before = ""; - } - if (shouldInject) { - const idToAdd = slotted ? id + "-s" : id; - selector.insertAfter( - // If node is null it means we need to inject [id] at the start - // insertAfter can handle `null` here - node, - selectorParser.attribute({ - attribute: idToAdd, - value: idToAdd, - raws: {}, - quoteMark: `"` - }) - ); - } -} -function isSpaceCombinator(node) { - return node.type === "combinator" && /^\s+$/.test(node.value); -} -function extractAndWrapNodes(parentNode) { - if (!parentNode.nodes) return; - const nodes = parentNode.nodes.filter( - (node) => node.type === "decl" || node.type === "comment" - ); - if (nodes.length) { - for (const node of nodes) { - parentNode.removeChild(node); - } - const wrappedRule = new require$$0$1.Rule({ - nodes, - selector: "&" - }); - parentNode.prepend(wrappedRule); - } -} -scopedPlugin.postcss = true; - -var sourceMap = {}; - -var sourceMapGenerator = {}; - -var base64Vlq = {}; - -var base64 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredBase64; - -function requireBase64 () { - if (hasRequiredBase64) return base64; - hasRequiredBase64 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - base64.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - base64.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - return base64; -} - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredBase64Vlq; - -function requireBase64Vlq () { - if (hasRequiredBase64Vlq) return base64Vlq; - hasRequiredBase64Vlq = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = /*@__PURE__*/ requireBase64(); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - base64Vlq.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - base64Vlq.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - return base64Vlq; -} - -var util$1 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredUtil$1; - -function requireUtil$1 () { - if (hasRequiredUtil$1) return util$1; - hasRequiredUtil$1 = 1; - (function (exports) { - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port; - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '<dir>/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - /** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ - function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); - } - exports.parseSourceMapInput = parseSourceMapInput; - - /** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ - function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); - } - exports.computeSourceURL = computeSourceURL; - } (util$1)); - return util$1; -} - -var arraySet = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredArraySet; - -function requireArraySet () { - if (hasRequiredArraySet) return arraySet; - hasRequiredArraySet = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = /*@__PURE__*/ requireUtil$1(); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - arraySet.ArraySet = ArraySet; - return arraySet; -} - -var mappingList = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredMappingList; - -function requireMappingList () { - if (hasRequiredMappingList) return mappingList; - hasRequiredMappingList = 1; - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = /*@__PURE__*/ requireUtil$1(); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - mappingList.MappingList = MappingList; - return mappingList; -} - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredSourceMapGenerator; - -function requireSourceMapGenerator () { - if (hasRequiredSourceMapGenerator) return sourceMapGenerator; - hasRequiredSourceMapGenerator = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = /*@__PURE__*/ requireBase64Vlq(); - var util = /*@__PURE__*/ requireUtil$1(); - var ArraySet = /*@__PURE__*/ requireArraySet().ArraySet; - var MappingList = /*@__PURE__*/ requireMappingList().MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source); - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = ''; - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - sourceMapGenerator.SourceMapGenerator = SourceMapGenerator; - return sourceMapGenerator; -} - -var sourceMapConsumer = {}; - -var binarySearch = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredBinarySearch; - -function requireBinarySearch () { - if (hasRequiredBinarySearch) return binarySearch; - hasRequiredBinarySearch = 1; - (function (exports) { - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - } (binarySearch)); - return binarySearch; -} - -var quickSort = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredQuickSort; - -function requireQuickSort () { - if (hasRequiredQuickSort) return quickSort; - hasRequiredQuickSort = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - quickSort.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - return quickSort; -} - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredSourceMapConsumer; - -function requireSourceMapConsumer () { - if (hasRequiredSourceMapConsumer) return sourceMapConsumer; - hasRequiredSourceMapConsumer = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = /*@__PURE__*/ requireUtil$1(); - var binarySearch = /*@__PURE__*/ requireBinarySearch(); - var ArraySet = /*@__PURE__*/ requireArraySet().ArraySet; - var base64VLQ = /*@__PURE__*/ requireBase64Vlq(); - var quickSort = /*@__PURE__*/ requireQuickSort().quickSort; - - function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - sourceMapConsumer.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ - BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; - }; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - sourceMapConsumer.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - sourceMapConsumer.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - return sourceMapConsumer; -} - -var sourceNode = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredSourceNode; - -function requireSourceNode () { - if (hasRequiredSourceNode) return sourceNode; - hasRequiredSourceNode = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator().SourceMapGenerator; - var util = /*@__PURE__*/ requireUtil$1(); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - sourceNode.SourceNode = SourceNode; - return sourceNode; -} - -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredSourceMap; - -function requireSourceMap () { - if (hasRequiredSourceMap) return sourceMap; - hasRequiredSourceMap = 1; - sourceMap.SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator().SourceMapGenerator; - sourceMap.SourceMapConsumer = /*@__PURE__*/ requireSourceMapConsumer().SourceMapConsumer; - sourceMap.SourceNode = /*@__PURE__*/ requireSourceNode().SourceNode; - return sourceMap; -} - -var mergeSourceMap; -var hasRequiredMergeSourceMap; - -function requireMergeSourceMap () { - if (hasRequiredMergeSourceMap) return mergeSourceMap; - hasRequiredMergeSourceMap = 1; - var sourceMap = /*@__PURE__*/ requireSourceMap(); - var SourceMapConsumer = sourceMap.SourceMapConsumer; - var SourceMapGenerator = sourceMap.SourceMapGenerator; - - mergeSourceMap = merge; - - /** - * Merge old source map and new source map and return merged. - * If old or new source map value is falsy, return another one as it is. - * - * @param {object|string} [oldMap] old source map object - * @param {object|string} [newmap] new source map object - * @return {object|undefined} merged source map object, or undefined when both old and new source map are undefined - */ - function merge(oldMap, newMap) { - if (!oldMap) return newMap - if (!newMap) return oldMap - - var oldMapConsumer = new SourceMapConsumer(oldMap); - var newMapConsumer = new SourceMapConsumer(newMap); - var mergedMapGenerator = new SourceMapGenerator(); - - // iterate on new map and overwrite original position of new map with one of old map - newMapConsumer.eachMapping(function(m) { - // pass when `originalLine` is null. - // It occurs in case that the node does not have origin in original code. - if (m.originalLine == null) return - - var origPosInOldMap = oldMapConsumer.originalPositionFor({ - line: m.originalLine, - column: m.originalColumn - }); - - if (origPosInOldMap.source == null) return - - mergedMapGenerator.addMapping({ - original: { - line: origPosInOldMap.line, - column: origPosInOldMap.column - }, - generated: { - line: m.generatedLine, - column: m.generatedColumn - }, - source: origPosInOldMap.source, - name: origPosInOldMap.name - }); - }); - - var consumers = [oldMapConsumer, newMapConsumer]; - consumers.forEach(function(consumer) { - consumer.sources.forEach(function(sourceFile) { - mergedMapGenerator._sources.add(sourceFile); - var sourceContent = consumer.sourceContentFor(sourceFile); - if (sourceContent != null) { - mergedMapGenerator.setSourceContent(sourceFile, sourceContent); - } - }); - }); - - mergedMapGenerator._sourceRoot = oldMap.sourceRoot; - mergedMapGenerator._file = oldMap.file; - - return JSON.parse(mergedMapGenerator.toString()) - } - return mergeSourceMap; -} - -var mergeSourceMapExports = /*@__PURE__*/ requireMergeSourceMap(); -var merge = /*@__PURE__*/getDefaultExportFromCjs(mergeSourceMapExports); - -const scss = (source, map, options, load = require) => { - const nodeSass = load("sass"); - const { compileString, renderSync } = nodeSass; - const data = getSource(source, options.filename, options.additionalData); - let css; - let dependencies; - let sourceMap; - try { - if (compileString) { - const { pathToFileURL, fileURLToPath } = load("url"); - const result = compileString(data, { - ...options, - url: pathToFileURL(options.filename), - sourceMap: !!map - }); - css = result.css; - dependencies = result.loadedUrls.map((url) => fileURLToPath(url)); - sourceMap = map ? result.sourceMap : void 0; - } else { - const result = renderSync({ - ...options, - data, - file: options.filename, - outFile: options.filename, - sourceMap: !!map - }); - css = result.css.toString(); - dependencies = result.stats.includedFiles; - sourceMap = map ? JSON.parse(result.map.toString()) : void 0; - } - if (map) { - return { - code: css, - errors: [], - dependencies, - map: merge(map, sourceMap) - }; - } - return { code: css, errors: [], dependencies }; - } catch (e) { - return { code: "", errors: [e], dependencies: [] }; - } -}; -const sass = (source, map, options, load) => scss( - source, - map, - { - ...options, - indentedSyntax: true - }, - load -); -const less = (source, map, options, load = require) => { - const nodeLess = load("less"); - let result; - let error = null; - nodeLess.render( - getSource(source, options.filename, options.additionalData), - { ...options, syncImport: true }, - (err, output) => { - error = err; - result = output; - } - ); - if (error) return { code: "", errors: [error], dependencies: [] }; - const dependencies = result.imports; - if (map) { - return { - code: result.css.toString(), - map: merge(map, result.map), - errors: [], - dependencies - }; - } - return { - code: result.css.toString(), - errors: [], - dependencies - }; -}; -const styl = (source, map, options, load = require) => { - const nodeStylus = load("stylus"); - try { - const ref = nodeStylus(source, options); - if (map) ref.set("sourcemap", { inline: false, comment: false }); - const result = ref.render(); - const dependencies = ref.deps(); - if (map) { - return { - code: result, - map: merge(map, ref.sourcemap), - errors: [], - dependencies - }; - } - return { code: result, errors: [], dependencies }; - } catch (e) { - return { code: "", errors: [e], dependencies: [] }; - } -}; -function getSource(source, filename, additionalData) { - if (!additionalData) return source; - if (shared.isFunction(additionalData)) { - return additionalData(source, filename); - } - return additionalData + source; -} -const processors = { - less, - sass, - scss, - styl, - stylus: styl -}; - -var build = {exports: {}}; - -var fs = {}; - -var hasRequiredFs; - -function requireFs () { - if (hasRequiredFs) return fs; - hasRequiredFs = 1; - - Object.defineProperty(fs, "__esModule", { - value: true - }); - fs.getFileSystem = getFileSystem; - fs.setFileSystem = setFileSystem; - let fileSystem = { - readFile: () => { - throw Error("readFile not implemented"); - }, - writeFile: () => { - throw Error("writeFile not implemented"); - } - }; - - function setFileSystem(fs) { - fileSystem.readFile = fs.readFile; - fileSystem.writeFile = fs.writeFile; - } - - function getFileSystem() { - return fileSystem; - } - return fs; -} - -var pluginFactory = {}; - -var unquote = {}; - -var hasRequiredUnquote; - -function requireUnquote () { - if (hasRequiredUnquote) return unquote; - hasRequiredUnquote = 1; - - Object.defineProperty(unquote, "__esModule", { - value: true - }); - unquote.default = unquote$1; - // copied from https://github.com/lakenen/node-unquote - const reg = /['"]/; - - function unquote$1(str) { - if (!str) { - return ""; - } - - if (reg.test(str.charAt(0))) { - str = str.substr(1); - } - - if (reg.test(str.charAt(str.length - 1))) { - str = str.substr(0, str.length - 1); - } - - return str; - } - return unquote; -} - -var Parser = {}; - -var replaceValueSymbols_1; -var hasRequiredReplaceValueSymbols; - -function requireReplaceValueSymbols () { - if (hasRequiredReplaceValueSymbols) return replaceValueSymbols_1; - hasRequiredReplaceValueSymbols = 1; - const matchValueName = /[$]?[\w-]+/g; - - const replaceValueSymbols = (value, replacements) => { - let matches; - - while ((matches = matchValueName.exec(value))) { - const replacement = replacements[matches[0]]; - - if (replacement) { - value = - value.slice(0, matches.index) + - replacement + - value.slice(matchValueName.lastIndex); - - matchValueName.lastIndex -= matches[0].length - replacement.length; - } - } - - return value; - }; - - replaceValueSymbols_1 = replaceValueSymbols; - return replaceValueSymbols_1; -} - -var replaceSymbols_1; -var hasRequiredReplaceSymbols; - -function requireReplaceSymbols () { - if (hasRequiredReplaceSymbols) return replaceSymbols_1; - hasRequiredReplaceSymbols = 1; - const replaceValueSymbols = /*@__PURE__*/ requireReplaceValueSymbols(); - - const replaceSymbols = (css, replacements) => { - css.walk((node) => { - if (node.type === "decl" && node.value) { - node.value = replaceValueSymbols(node.value.toString(), replacements); - } else if (node.type === "rule" && node.selector) { - node.selector = replaceValueSymbols( - node.selector.toString(), - replacements - ); - } else if (node.type === "atrule" && node.params) { - node.params = replaceValueSymbols(node.params.toString(), replacements); - } - }); - }; - - replaceSymbols_1 = replaceSymbols; - return replaceSymbols_1; -} - -var extractICSS_1; -var hasRequiredExtractICSS; - -function requireExtractICSS () { - if (hasRequiredExtractICSS) return extractICSS_1; - hasRequiredExtractICSS = 1; - const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/; - const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/; - - const getDeclsObject = (rule) => { - const object = {}; - - rule.walkDecls((decl) => { - const before = decl.raws.before ? decl.raws.before.trim() : ""; - - object[before + decl.prop] = decl.value; - }); - - return object; - }; - /** - * - * @param {string} css - * @param {boolean} removeRules - * @param {'auto' | 'rule' | 'at-rule'} mode - */ - const extractICSS = (css, removeRules = true, mode = "auto") => { - const icssImports = {}; - const icssExports = {}; - - function addImports(node, path) { - const unquoted = path.replace(/'|"/g, ""); - icssImports[unquoted] = Object.assign( - icssImports[unquoted] || {}, - getDeclsObject(node) - ); - - if (removeRules) { - node.remove(); - } - } - - function addExports(node) { - Object.assign(icssExports, getDeclsObject(node)); - if (removeRules) { - node.remove(); - } - } - - css.each((node) => { - if (node.type === "rule" && mode !== "at-rule") { - if (node.selector.slice(0, 7) === ":import") { - const matches = importPattern.exec(node.selector); - - if (matches) { - addImports(node, matches[1]); - } - } - - if (node.selector === ":export") { - addExports(node); - } - } - - if (node.type === "atrule" && mode !== "rule") { - if (node.name === "icss-import") { - const matches = balancedQuotes.exec(node.params); - - if (matches) { - addImports(node, matches[1]); - } - } - if (node.name === "icss-export") { - addExports(node); - } - } - }); - - return { icssImports, icssExports }; - }; - - extractICSS_1 = extractICSS; - return extractICSS_1; -} - -var createICSSRules_1; -var hasRequiredCreateICSSRules; - -function requireCreateICSSRules () { - if (hasRequiredCreateICSSRules) return createICSSRules_1; - hasRequiredCreateICSSRules = 1; - const createImports = (imports, postcss, mode = "rule") => { - return Object.keys(imports).map((path) => { - const aliases = imports[path]; - const declarations = Object.keys(aliases).map((key) => - postcss.decl({ - prop: key, - value: aliases[key], - raws: { before: "\n " }, - }) - ); - - const hasDeclarations = declarations.length > 0; - - const rule = - mode === "rule" - ? postcss.rule({ - selector: `:import('${path}')`, - raws: { after: hasDeclarations ? "\n" : "" }, - }) - : postcss.atRule({ - name: "icss-import", - params: `'${path}'`, - raws: { after: hasDeclarations ? "\n" : "" }, - }); - - if (hasDeclarations) { - rule.append(declarations); - } - - return rule; - }); - }; - - const createExports = (exports, postcss, mode = "rule") => { - const declarations = Object.keys(exports).map((key) => - postcss.decl({ - prop: key, - value: exports[key], - raws: { before: "\n " }, - }) - ); - - if (declarations.length === 0) { - return []; - } - const rule = - mode === "rule" - ? postcss.rule({ - selector: `:export`, - raws: { after: "\n" }, - }) - : postcss.atRule({ - name: "icss-export", - raws: { after: "\n" }, - }); - - rule.append(declarations); - - return [rule]; - }; - - const createICSSRules = (imports, exports, postcss, mode) => [ - ...createImports(imports, postcss, mode), - ...createExports(exports, postcss, mode), - ]; - - createICSSRules_1 = createICSSRules; - return createICSSRules_1; -} - -var src$4; -var hasRequiredSrc$4; - -function requireSrc$4 () { - if (hasRequiredSrc$4) return src$4; - hasRequiredSrc$4 = 1; - const replaceValueSymbols = /*@__PURE__*/ requireReplaceValueSymbols(); - const replaceSymbols = /*@__PURE__*/ requireReplaceSymbols(); - const extractICSS = /*@__PURE__*/ requireExtractICSS(); - const createICSSRules = /*@__PURE__*/ requireCreateICSSRules(); - - src$4 = { - replaceValueSymbols, - replaceSymbols, - extractICSS, - createICSSRules, - }; - return src$4; -} - -var hasRequiredParser$1; - -function requireParser$1 () { - if (hasRequiredParser$1) return Parser; - hasRequiredParser$1 = 1; - - Object.defineProperty(Parser, "__esModule", { - value: true - }); - Parser.default = void 0; - - var _icssUtils = /*@__PURE__*/ requireSrc$4(); - - // Initially copied from https://github.com/css-modules/css-modules-loader-core - const importRegexp = /^:import\((.+)\)$/; - - let Parser$1 = class Parser { - constructor(pathFetcher, trace) { - this.pathFetcher = pathFetcher; - this.plugin = this.plugin.bind(this); - this.exportTokens = {}; - this.translations = {}; - this.trace = trace; - } - - plugin() { - const parser = this; - return { - postcssPlugin: "css-modules-parser", - - async OnceExit(css) { - await Promise.all(parser.fetchAllImports(css)); - parser.linkImportedSymbols(css); - return parser.extractExports(css); - } - - }; - } - - fetchAllImports(css) { - let imports = []; - css.each(node => { - if (node.type == "rule" && node.selector.match(importRegexp)) { - imports.push(this.fetchImport(node, css.source.input.from, imports.length)); - } - }); - return imports; - } - - linkImportedSymbols(css) { - (0, _icssUtils.replaceSymbols)(css, this.translations); - } - - extractExports(css) { - css.each(node => { - if (node.type == "rule" && node.selector == ":export") this.handleExport(node); - }); - } - - handleExport(exportNode) { - exportNode.each(decl => { - if (decl.type == "decl") { - Object.keys(this.translations).forEach(translation => { - decl.value = decl.value.replace(translation, this.translations[translation]); - }); - this.exportTokens[decl.prop] = decl.value; - } - }); - exportNode.remove(); - } - - async fetchImport(importNode, relativeTo, depNr) { - const file = importNode.selector.match(importRegexp)[1]; - const depTrace = this.trace + String.fromCharCode(depNr); - const exports = await this.pathFetcher(file, relativeTo, depTrace); - - try { - importNode.each(decl => { - if (decl.type == "decl") { - this.translations[decl.prop] = exports[decl.value]; - } - }); - importNode.remove(); - } catch (err) { - console.log(err); - } - } - - }; - - Parser.default = Parser$1; - return Parser; -} - -var saveJSON = {}; - -var hasRequiredSaveJSON; - -function requireSaveJSON () { - if (hasRequiredSaveJSON) return saveJSON; - hasRequiredSaveJSON = 1; - - Object.defineProperty(saveJSON, "__esModule", { - value: true - }); - saveJSON.default = saveJSON$1; - - var _fs = /*@__PURE__*/ requireFs(); - - function saveJSON$1(cssFile, json) { - return new Promise((resolve, reject) => { - const { - writeFile - } = (0, _fs.getFileSystem)(); - writeFile(`${cssFile}.json`, JSON.stringify(json), e => e ? reject(e) : resolve(json)); - }); - } - return saveJSON; -} - -var localsConvention = {}; - -/** - * lodash (Custom Build) <https://lodash.com/> - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors <https://jquery.org/> - * Released under MIT license <https://lodash.com/license> - * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -var lodash_camelcase; -var hasRequiredLodash_camelcase; - -function requireLodash_camelcase () { - if (hasRequiredLodash_camelcase) return lodash_camelcase; - hasRequiredLodash_camelcase = 1; - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0; - - /** `Object#toString` result references. */ - var symbolTag = '[object Symbol]'; - - /** Used to match words composed of alphanumeric characters. */ - var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; - - /** Used to match Latin Unicode letters (excluding mathematical operators). */ - var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; - - /** Used to compose unicode character classes. */ - var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', - rsComboSymbolsRange = '\\u20d0-\\u20f0', - rsDingbatRange = '\\u2700-\\u27bf', - rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', - rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', - rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsPunctuationRange = '\\u2000-\\u206f', - rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', - rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', - rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; - - /** Used to compose unicode capture groups. */ - var rsApos = "['\u2019]", - rsAstral = '[' + rsAstralRange + ']', - rsBreak = '[' + rsBreakRange + ']', - rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', - rsDigits = '\\d+', - rsDingbat = '[' + rsDingbatRange + ']', - rsLower = '[' + rsLowerRange + ']', - rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsUpper = '[' + rsUpperRange + ']', - rsZWJ = '\\u200d'; - - /** Used to compose unicode regexes. */ - var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')', - rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', - reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - - /** Used to match apostrophes. */ - var reApos = RegExp(rsApos, 'g'); - - /** - * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and - * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). - */ - var reComboMark = RegExp(rsCombo, 'g'); - - /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ - var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - - /** Used to match complex or compound words. */ - var reUnicodeWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')', - rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr, - rsUpper + '+' + rsOptUpperContr, - rsDigits, - rsEmoji - ].join('|'), 'g'); - - /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ - var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); - - /** Used to detect strings that need a more robust regexp to match words. */ - var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; - - /** Used to map Latin Unicode letters to basic Latin letters. */ - var deburredLetters = { - // Latin-1 Supplement block. - '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', - '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', - '\xc7': 'C', '\xe7': 'c', - '\xd0': 'D', '\xf0': 'd', - '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', - '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', - '\xd1': 'N', '\xf1': 'n', - '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', - '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', - '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', - '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', - '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', - '\xc6': 'Ae', '\xe6': 'ae', - '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss', - // Latin Extended-A block. - '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', - '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', - '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', - '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', - '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', - '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', - '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', - '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', - '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', - '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', - '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', - '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', - '\u0134': 'J', '\u0135': 'j', - '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', - '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', - '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', - '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', - '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', - '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', - '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', - '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', - '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', - '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', - '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', - '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', - '\u0163': 't', '\u0165': 't', '\u0167': 't', - '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', - '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', - '\u0174': 'W', '\u0175': 'w', - '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', - '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', - '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', - '\u0132': 'IJ', '\u0133': 'ij', - '\u0152': 'Oe', '\u0153': 'oe', - '\u0149': "'n", '\u017f': 'ss' - }; - - /** Detect free variable `global` from Node.js. */ - var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; - - /** Detect free variable `self`. */ - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function('return this')(); - - /** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array ? array.length : 0; - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; - } - - /** - * Converts an ASCII `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function asciiToArray(string) { - return string.split(''); - } - - /** - * Splits an ASCII `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ - function asciiWords(string) { - return string.match(reAsciiWord) || []; - } - - /** - * The base implementation of `_.propertyOf` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - */ - function basePropertyOf(object) { - return function(key) { - return object == null ? undefined : object[key]; - }; - } - - /** - * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A - * letters to basic Latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ - var deburrLetter = basePropertyOf(deburredLetters); - - /** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ - function hasUnicode(string) { - return reHasUnicode.test(string); - } - - /** - * Checks if `string` contains a word composed of Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a word is found, else `false`. - */ - function hasUnicodeWord(string) { - return reHasUnicodeWord.test(string); - } - - /** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function stringToArray(string) { - return hasUnicode(string) - ? unicodeToArray(string) - : asciiToArray(string); - } - - /** - * Converts a Unicode `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function unicodeToArray(string) { - return string.match(reUnicode) || []; - } - - /** - * Splits a Unicode `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ - function unicodeWords(string) { - return string.match(reUnicodeWord) || []; - } - - /** Used for built-in method references. */ - var objectProto = Object.prototype; - - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ - var objectToString = objectProto.toString; - - /** Built-in value references. */ - var Symbol = root.Symbol; - - /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - - /** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; - } - - /** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ - function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; - } - - /** - * Casts `array` to a slice if it's needed. - * - * @private - * @param {Array} array The array to inspect. - * @param {number} start The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the cast slice. - */ - function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return (!start && end >= length) ? array : baseSlice(array, start, end); - } - - /** - * Creates a function like `_.lowerFirst`. - * - * @private - * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new case function. - */ - function createCaseFirst(methodName) { - return function(string) { - string = toString(string); - - var strSymbols = hasUnicode(string) - ? stringToArray(string) - : undefined; - - var chr = strSymbols - ? strSymbols[0] - : string.charAt(0); - - var trailing = strSymbols - ? castSlice(strSymbols, 1).join('') - : string.slice(1); - - return chr[methodName]() + trailing; - }; - } - - /** - * Creates a function like `_.camelCase`. - * - * @private - * @param {Function} callback The function to combine each word. - * @returns {Function} Returns the new compounder function. - */ - function createCompounder(callback) { - return function(string) { - return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); - }; - } - - /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ - function isObjectLike(value) { - return !!value && typeof value == 'object'; - } - - /** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ - function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); - } - - /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ - function toString(value) { - return value == null ? '' : baseToString(value); - } - - /** - * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the camel cased string. - * @example - * - * _.camelCase('Foo Bar'); - * // => 'fooBar' - * - * _.camelCase('--foo-bar--'); - * // => 'fooBar' - * - * _.camelCase('__FOO_BAR__'); - * // => 'fooBar' - */ - var camelCase = createCompounder(function(result, word, index) { - word = word.toLowerCase(); - return result + (index ? capitalize(word) : word); - }); - - /** - * Converts the first character of `string` to upper case and the remaining - * to lower case. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to capitalize. - * @returns {string} Returns the capitalized string. - * @example - * - * _.capitalize('FRED'); - * // => 'Fred' - */ - function capitalize(string) { - return upperFirst(toString(string).toLowerCase()); - } - - /** - * Deburrs `string` by converting - * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) - * letters to basic Latin letters and removing - * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to deburr. - * @returns {string} Returns the deburred string. - * @example - * - * _.deburr('déjà vu'); - * // => 'deja vu' - */ - function deburr(string) { - string = toString(string); - return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); - } - - /** - * Converts the first character of `string` to upper case. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.upperFirst('fred'); - * // => 'Fred' - * - * _.upperFirst('FRED'); - * // => 'FRED' - */ - var upperFirst = createCaseFirst('toUpperCase'); - - /** - * Splits `string` into an array of its words. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {RegExp|string} [pattern] The pattern to match words. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the words of `string`. - * @example - * - * _.words('fred, barney, & pebbles'); - * // => ['fred', 'barney', 'pebbles'] - * - * _.words('fred, barney, & pebbles', /[^, ]+/g); - * // => ['fred', 'barney', '&', 'pebbles'] - */ - function words(string, pattern, guard) { - string = toString(string); - pattern = pattern; - - if (pattern === undefined) { - return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); - } - return string.match(pattern) || []; - } - - lodash_camelcase = camelCase; - return lodash_camelcase; -} - -var hasRequiredLocalsConvention; - -function requireLocalsConvention () { - if (hasRequiredLocalsConvention) return localsConvention; - hasRequiredLocalsConvention = 1; - - Object.defineProperty(localsConvention, "__esModule", { - value: true - }); - localsConvention.makeLocalsConventionReducer = makeLocalsConventionReducer; - - var _lodash = _interopRequireDefault(/*@__PURE__*/ requireLodash_camelcase()); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function dashesCamelCase(string) { - return string.replace(/-+(\w)/g, (_, firstLetter) => firstLetter.toUpperCase()); - } - - function makeLocalsConventionReducer(localsConvention, inputFile) { - const isFunc = typeof localsConvention === "function"; - return (tokens, [className, value]) => { - if (isFunc) { - const convention = localsConvention(className, value, inputFile); - tokens[convention] = value; - return tokens; - } - - switch (localsConvention) { - case "camelCase": - tokens[className] = value; - tokens[(0, _lodash.default)(className)] = value; - break; - - case "camelCaseOnly": - tokens[(0, _lodash.default)(className)] = value; - break; - - case "dashes": - tokens[className] = value; - tokens[dashesCamelCase(className)] = value; - break; - - case "dashesOnly": - tokens[dashesCamelCase(className)] = value; - break; - } - - return tokens; - }; - } - return localsConvention; -} - -var FileSystemLoader = {}; - -var hasRequiredFileSystemLoader; - -function requireFileSystemLoader () { - if (hasRequiredFileSystemLoader) return FileSystemLoader; - hasRequiredFileSystemLoader = 1; - - Object.defineProperty(FileSystemLoader, "__esModule", { - value: true - }); - FileSystemLoader.default = void 0; - - var _postcss = _interopRequireDefault(require$$0$1); - - var _path = _interopRequireDefault(path$1); - - var _Parser = _interopRequireDefault(/*@__PURE__*/ requireParser$1()); - - var _fs = /*@__PURE__*/ requireFs(); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - // Initially copied from https://github.com/css-modules/css-modules-loader-core - class Core { - constructor(plugins) { - this.plugins = plugins || Core.defaultPlugins; - } - - async load(sourceString, sourcePath, trace, pathFetcher) { - const parser = new _Parser.default(pathFetcher, trace); - const plugins = this.plugins.concat([parser.plugin()]); - const result = await (0, _postcss.default)(plugins).process(sourceString, { - from: sourcePath - }); - return { - injectableSource: result.css, - exportTokens: parser.exportTokens - }; - } - - } // Sorts dependencies in the following way: - // AAA comes before AA and A - // AB comes after AA and before A - // All Bs come after all As - // This ensures that the files are always returned in the following order: - // - In the order they were required, except - // - After all their dependencies - - - const traceKeySorter = (a, b) => { - if (a.length < b.length) { - return a < b.substring(0, a.length) ? -1 : 1; - } - - if (a.length > b.length) { - return a.substring(0, b.length) <= b ? -1 : 1; - } - - return a < b ? -1 : 1; - }; - - let FileSystemLoader$1 = class FileSystemLoader { - constructor(root, plugins, fileResolve) { - if (root === "/" && process.platform === "win32") { - const cwdDrive = process.cwd().slice(0, 3); - - if (!/^[A-Za-z]:\\$/.test(cwdDrive)) { - throw new Error(`Failed to obtain root from "${process.cwd()}".`); - } - - root = cwdDrive; - } - - this.root = root; - this.fileResolve = fileResolve; - this.sources = {}; - this.traces = {}; - this.importNr = 0; - this.core = new Core(plugins); - this.tokensByFile = {}; - this.fs = (0, _fs.getFileSystem)(); - } - - async fetch(_newPath, relativeTo, _trace) { - const newPath = _newPath.replace(/^["']|["']$/g, ""); - - const trace = _trace || String.fromCharCode(this.importNr++); - - const useFileResolve = typeof this.fileResolve === "function"; - const fileResolvedPath = useFileResolve ? await this.fileResolve(newPath, relativeTo) : await Promise.resolve(); - - if (fileResolvedPath && !_path.default.isAbsolute(fileResolvedPath)) { - throw new Error('The returned path from the "fileResolve" option must be absolute.'); - } - - const relativeDir = _path.default.dirname(relativeTo); - - const rootRelativePath = fileResolvedPath || _path.default.resolve(relativeDir, newPath); - - let fileRelativePath = fileResolvedPath || _path.default.resolve(_path.default.resolve(this.root, relativeDir), newPath); // if the path is not relative or absolute, try to resolve it in node_modules - - - if (!useFileResolve && newPath[0] !== "." && !_path.default.isAbsolute(newPath)) { - try { - fileRelativePath = require.resolve(newPath); - } catch (e) {// noop - } - } - - const tokens = this.tokensByFile[fileRelativePath]; - if (tokens) return tokens; - return new Promise((resolve, reject) => { - this.fs.readFile(fileRelativePath, "utf-8", async (err, source) => { - if (err) reject(err); - const { - injectableSource, - exportTokens - } = await this.core.load(source, rootRelativePath, trace, this.fetch.bind(this)); - this.sources[fileRelativePath] = injectableSource; - this.traces[trace] = fileRelativePath; - this.tokensByFile[fileRelativePath] = exportTokens; - resolve(exportTokens); - }); - }); - } - - get finalSource() { - const traces = this.traces; - const sources = this.sources; - let written = new Set(); - return Object.keys(traces).sort(traceKeySorter).map(key => { - const filename = traces[key]; - - if (written.has(filename)) { - return null; - } - - written.add(filename); - return sources[filename]; - }).join(""); - } - - }; - - FileSystemLoader.default = FileSystemLoader$1; - return FileSystemLoader; -} - -var scoping = {}; - -var src$3 = {exports: {}}; - -var topologicalSort_1; -var hasRequiredTopologicalSort; - -function requireTopologicalSort () { - if (hasRequiredTopologicalSort) return topologicalSort_1; - hasRequiredTopologicalSort = 1; - const PERMANENT_MARKER = 2; - const TEMPORARY_MARKER = 1; - - function createError(node, graph) { - const er = new Error("Nondeterministic import's order"); - - const related = graph[node]; - const relatedNode = related.find( - (relatedNode) => graph[relatedNode].indexOf(node) > -1 - ); - - er.nodes = [node, relatedNode]; - - return er; - } - - function walkGraph(node, graph, state, result, strict) { - if (state[node] === PERMANENT_MARKER) { - return; - } - - if (state[node] === TEMPORARY_MARKER) { - if (strict) { - return createError(node, graph); - } - - return; - } - - state[node] = TEMPORARY_MARKER; - - const children = graph[node]; - const length = children.length; - - for (let i = 0; i < length; ++i) { - const error = walkGraph(children[i], graph, state, result, strict); - - if (error instanceof Error) { - return error; - } - } - - state[node] = PERMANENT_MARKER; - - result.push(node); - } - - function topologicalSort(graph, strict) { - const result = []; - const state = {}; - - const nodes = Object.keys(graph); - const length = nodes.length; - - for (let i = 0; i < length; ++i) { - const er = walkGraph(nodes[i], graph, state, result, strict); - - if (er instanceof Error) { - return er; - } - } - - return result; - } - - topologicalSort_1 = topologicalSort; - return topologicalSort_1; -} - -var hasRequiredSrc$3; - -function requireSrc$3 () { - if (hasRequiredSrc$3) return src$3.exports; - hasRequiredSrc$3 = 1; - const topologicalSort = /*@__PURE__*/ requireTopologicalSort(); - - const matchImports = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/; - const icssImport = /^:import\((?:"([^"]+)"|'([^']+)')\)/; - - const VISITED_MARKER = 1; - - /** - * :import('G') {} - * - * Rule - * composes: ... from 'A' - * composes: ... from 'B' - - * Rule - * composes: ... from 'A' - * composes: ... from 'A' - * composes: ... from 'C' - * - * Results in: - * - * graph: { - * G: [], - * A: [], - * B: ['A'], - * C: ['A'], - * } - */ - function addImportToGraph(importId, parentId, graph, visited) { - const siblingsId = parentId + "_" + "siblings"; - const visitedId = parentId + "_" + importId; - - if (visited[visitedId] !== VISITED_MARKER) { - if (!Array.isArray(visited[siblingsId])) { - visited[siblingsId] = []; - } - - const siblings = visited[siblingsId]; - - if (Array.isArray(graph[importId])) { - graph[importId] = graph[importId].concat(siblings); - } else { - graph[importId] = siblings.slice(); - } - - visited[visitedId] = VISITED_MARKER; - - siblings.push(importId); - } - } - - src$3.exports = (options = {}) => { - let importIndex = 0; - const createImportedName = - typeof options.createImportedName !== "function" - ? (importName /*, path*/) => - `i__imported_${importName.replace(/\W/g, "_")}_${importIndex++}` - : options.createImportedName; - const failOnWrongOrder = options.failOnWrongOrder; - - return { - postcssPlugin: "postcss-modules-extract-imports", - prepare() { - const graph = {}; - const visited = {}; - const existingImports = {}; - const importDecls = {}; - const imports = {}; - - return { - Once(root, postcss) { - // Check the existing imports order and save refs - root.walkRules((rule) => { - const matches = icssImport.exec(rule.selector); - - if (matches) { - const [, /*match*/ doubleQuotePath, singleQuotePath] = matches; - const importPath = doubleQuotePath || singleQuotePath; - - addImportToGraph(importPath, "root", graph, visited); - - existingImports[importPath] = rule; - } - }); - - root.walkDecls(/^composes$/, (declaration) => { - const multiple = declaration.value.split(","); - const values = []; - - multiple.forEach((value) => { - const matches = value.trim().match(matchImports); - - if (!matches) { - values.push(value); - - return; - } - - let tmpSymbols; - let [ - , - /*match*/ symbols, - doubleQuotePath, - singleQuotePath, - global, - ] = matches; - - if (global) { - // Composing globals simply means changing these classes to wrap them in global(name) - tmpSymbols = symbols.split(/\s+/).map((s) => `global(${s})`); - } else { - const importPath = doubleQuotePath || singleQuotePath; - - let parent = declaration.parent; - let parentIndexes = ""; - - while (parent.type !== "root") { - parentIndexes = - parent.parent.index(parent) + "_" + parentIndexes; - parent = parent.parent; - } - - const { selector } = declaration.parent; - const parentRule = `_${parentIndexes}${selector}`; - - addImportToGraph(importPath, parentRule, graph, visited); - - importDecls[importPath] = declaration; - imports[importPath] = imports[importPath] || {}; - - tmpSymbols = symbols.split(/\s+/).map((s) => { - if (!imports[importPath][s]) { - imports[importPath][s] = createImportedName(s, importPath); - } - - return imports[importPath][s]; - }); - } - - values.push(tmpSymbols.join(" ")); - }); - - declaration.value = values.join(", "); - }); - - const importsOrder = topologicalSort(graph, failOnWrongOrder); - - if (importsOrder instanceof Error) { - const importPath = importsOrder.nodes.find((importPath) => - // eslint-disable-next-line no-prototype-builtins - importDecls.hasOwnProperty(importPath) - ); - const decl = importDecls[importPath]; - - throw decl.error( - "Failed to resolve order of composed modules " + - importsOrder.nodes - .map((importPath) => "`" + importPath + "`") - .join(", ") + - ".", - { - plugin: "postcss-modules-extract-imports", - word: "composes", - } - ); - } - - let lastImportRule; - - importsOrder.forEach((path) => { - const importedSymbols = imports[path]; - let rule = existingImports[path]; - - if (!rule && importedSymbols) { - rule = postcss.rule({ - selector: `:import("${path}")`, - raws: { after: "\n" }, - }); - - if (lastImportRule) { - root.insertAfter(lastImportRule, rule); - } else { - root.prepend(rule); - } - } - - lastImportRule = rule; - - if (!importedSymbols) { - return; - } - - Object.keys(importedSymbols).forEach((importedSymbol) => { - rule.append( - postcss.decl({ - value: importedSymbol, - prop: importedSymbols[importedSymbol], - raws: { before: "\n " }, - }) - ); - }); - }); - }, - }; - }, - }; - }; - - src$3.exports.postcss = true; - return src$3.exports; -} - -var wasmHash = {exports: {}}; - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - -var hasRequiredWasmHash; - -function requireWasmHash () { - if (hasRequiredWasmHash) return wasmHash.exports; - hasRequiredWasmHash = 1; - - // 65536 is the size of a wasm memory page - // 64 is the maximum chunk size for every possible wasm hash implementation - // 4 is the maximum number of bytes per char for string encoding (max is utf-8) - // ~3 makes sure that it's always a block of 4 chars, so avoid partially encoded bytes for base64 - const MAX_SHORT_STRING = Math.floor((65536 - 64) / 4) & ~3; - - class WasmHash { - /** - * @param {WebAssembly.Instance} instance wasm instance - * @param {WebAssembly.Instance[]} instancesPool pool of instances - * @param {number} chunkSize size of data chunks passed to wasm - * @param {number} digestSize size of digest returned by wasm - */ - constructor(instance, instancesPool, chunkSize, digestSize) { - const exports = /** @type {any} */ (instance.exports); - - exports.init(); - - this.exports = exports; - this.mem = Buffer.from(exports.memory.buffer, 0, 65536); - this.buffered = 0; - this.instancesPool = instancesPool; - this.chunkSize = chunkSize; - this.digestSize = digestSize; - } - - reset() { - this.buffered = 0; - this.exports.init(); - } - - /** - * @param {Buffer | string} data data - * @param {BufferEncoding=} encoding encoding - * @returns {this} itself - */ - update(data, encoding) { - if (typeof data === "string") { - while (data.length > MAX_SHORT_STRING) { - this._updateWithShortString(data.slice(0, MAX_SHORT_STRING), encoding); - data = data.slice(MAX_SHORT_STRING); - } - - this._updateWithShortString(data, encoding); - - return this; - } - - this._updateWithBuffer(data); - - return this; - } - - /** - * @param {string} data data - * @param {BufferEncoding=} encoding encoding - * @returns {void} - */ - _updateWithShortString(data, encoding) { - const { exports, buffered, mem, chunkSize } = this; - - let endPos; - - if (data.length < 70) { - if (!encoding || encoding === "utf-8" || encoding === "utf8") { - endPos = buffered; - for (let i = 0; i < data.length; i++) { - const cc = data.charCodeAt(i); - - if (cc < 0x80) { - mem[endPos++] = cc; - } else if (cc < 0x800) { - mem[endPos] = (cc >> 6) | 0xc0; - mem[endPos + 1] = (cc & 0x3f) | 0x80; - endPos += 2; - } else { - // bail-out for weird chars - endPos += mem.write(data.slice(i), endPos, encoding); - break; - } - } - } else if (encoding === "latin1") { - endPos = buffered; - - for (let i = 0; i < data.length; i++) { - const cc = data.charCodeAt(i); - - mem[endPos++] = cc; - } - } else { - endPos = buffered + mem.write(data, buffered, encoding); - } - } else { - endPos = buffered + mem.write(data, buffered, encoding); - } - - if (endPos < chunkSize) { - this.buffered = endPos; - } else { - const l = endPos & ~(this.chunkSize - 1); - - exports.update(l); - - const newBuffered = endPos - l; - - this.buffered = newBuffered; - - if (newBuffered > 0) { - mem.copyWithin(0, l, endPos); - } - } - } - - /** - * @param {Buffer} data data - * @returns {void} - */ - _updateWithBuffer(data) { - const { exports, buffered, mem } = this; - const length = data.length; - - if (buffered + length < this.chunkSize) { - data.copy(mem, buffered, 0, length); - - this.buffered += length; - } else { - const l = (buffered + length) & ~(this.chunkSize - 1); - - if (l > 65536) { - let i = 65536 - buffered; - - data.copy(mem, buffered, 0, i); - exports.update(65536); - - const stop = l - buffered - 65536; - - while (i < stop) { - data.copy(mem, 0, i, i + 65536); - exports.update(65536); - i += 65536; - } - - data.copy(mem, 0, i, l - buffered); - - exports.update(l - buffered - i); - } else { - data.copy(mem, buffered, 0, l - buffered); - - exports.update(l); - } - - const newBuffered = length + buffered - l; - - this.buffered = newBuffered; - - if (newBuffered > 0) { - data.copy(mem, 0, length - newBuffered, length); - } - } - } - - digest(type) { - const { exports, buffered, mem, digestSize } = this; - - exports.final(buffered); - - this.instancesPool.push(this); - - const hex = mem.toString("latin1", 0, digestSize); - - if (type === "hex") { - return hex; - } - - if (type === "binary" || !type) { - return Buffer.from(hex, "hex"); - } - - return Buffer.from(hex, "hex").toString(type); - } - } - - const create = (wasmModule, instancesPool, chunkSize, digestSize) => { - if (instancesPool.length > 0) { - const old = instancesPool.pop(); - - old.reset(); - - return old; - } else { - return new WasmHash( - new WebAssembly.Instance(wasmModule), - instancesPool, - chunkSize, - digestSize - ); - } - }; - - wasmHash.exports = create; - wasmHash.exports.MAX_SHORT_STRING = MAX_SHORT_STRING; - return wasmHash.exports; -} - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - -var xxhash64_1; -var hasRequiredXxhash64; - -function requireXxhash64 () { - if (hasRequiredXxhash64) return xxhash64_1; - hasRequiredXxhash64 = 1; - - const create = /*@__PURE__*/ requireWasmHash(); - - //#region wasm code: xxhash64 (../../../assembly/hash/xxhash64.asm.ts) --initialMemory 1 - const xxhash64 = new WebAssembly.Module( - Buffer.from( - // 1173 bytes - "AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqwYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEACfyACIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCECIAFBBGoLIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAiACQh2IhUL5893xmfaZqxZ+IgIgAkIgiIUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL", - "base64" - ) - ); - //#endregion - - xxhash64_1 = create.bind(null, xxhash64, [], 32, 16); - return xxhash64_1; -} - -var BatchedHash_1; -var hasRequiredBatchedHash; - -function requireBatchedHash () { - if (hasRequiredBatchedHash) return BatchedHash_1; - hasRequiredBatchedHash = 1; - const MAX_SHORT_STRING = /*@__PURE__*/ requireWasmHash().MAX_SHORT_STRING; - - class BatchedHash { - constructor(hash) { - this.string = undefined; - this.encoding = undefined; - this.hash = hash; - } - - /** - * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} - * @param {string|Buffer} data data - * @param {string=} inputEncoding data encoding - * @returns {this} updated hash - */ - update(data, inputEncoding) { - if (this.string !== undefined) { - if ( - typeof data === "string" && - inputEncoding === this.encoding && - this.string.length + data.length < MAX_SHORT_STRING - ) { - this.string += data; - - return this; - } - - this.hash.update(this.string, this.encoding); - this.string = undefined; - } - - if (typeof data === "string") { - if ( - data.length < MAX_SHORT_STRING && - // base64 encoding is not valid since it may contain padding chars - (!inputEncoding || !inputEncoding.startsWith("ba")) - ) { - this.string = data; - this.encoding = inputEncoding; - } else { - this.hash.update(data, inputEncoding); - } - } else { - this.hash.update(data); - } - - return this; - } - - /** - * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} - * @param {string=} encoding encoding of the return value - * @returns {string|Buffer} digest - */ - digest(encoding) { - if (this.string !== undefined) { - this.hash.update(this.string, this.encoding); - } - - return this.hash.digest(encoding); - } - } - - BatchedHash_1 = BatchedHash; - return BatchedHash_1; -} - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - -var md4_1; -var hasRequiredMd4; - -function requireMd4 () { - if (hasRequiredMd4) return md4_1; - hasRequiredMd4 = 1; - - const create = /*@__PURE__*/ requireWasmHash(); - - //#region wasm code: md4 (../../../assembly/hash/md4.asm.ts) --initialMemory 1 - const md4 = new WebAssembly.Module( - Buffer.from( - // 2150 bytes - "AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqFEAQmAEGBxpS6BiQBQYnXtv5+JAJB/rnrxXkkA0H2qMmBASQEQQAkAAvMCgEYfyMBIQojAiEGIwMhByMEIQgDQCAAIAVLBEAgBSgCCCINIAcgBiAFKAIEIgsgCCAHIAUoAgAiDCAKIAggBiAHIAhzcXNqakEDdyIDIAYgB3Nxc2pqQQd3IgEgAyAGc3FzampBC3chAiAFKAIUIg8gASACIAUoAhAiCSADIAEgBSgCDCIOIAYgAyACIAEgA3Nxc2pqQRN3IgQgASACc3FzampBA3ciAyACIARzcXNqakEHdyEBIAUoAiAiEiADIAEgBSgCHCIRIAQgAyAFKAIYIhAgAiAEIAEgAyAEc3FzampBC3ciAiABIANzcXNqakETdyIEIAEgAnNxc2pqQQN3IQMgBSgCLCIVIAQgAyAFKAIoIhQgAiAEIAUoAiQiEyABIAIgAyACIARzcXNqakEHdyIBIAMgBHNxc2pqQQt3IgIgASADc3FzampBE3chBCAPIBAgCSAVIBQgEyAFKAI4IhYgAiAEIAUoAjQiFyABIAIgBSgCMCIYIAMgASAEIAEgAnNxc2pqQQN3IgEgAiAEc3FzampBB3ciAiABIARzcXNqakELdyIDIAkgAiAMIAEgBSgCPCIJIAQgASADIAEgAnNxc2pqQRN3IgEgAiADcnEgAiADcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyaiASakGZ84nUBWpBCXciAyAPIAQgCyACIBggASADIAIgBHJxIAIgBHFyampBmfOJ1AVqQQ13IgEgAyAEcnEgAyAEcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyampBmfOJ1AVqQQl3IgMgECAEIAIgFyABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmogDWpBmfOJ1AVqQQN3IgIgASADcnEgASADcXJqakGZ84nUBWpBBXciBCABIAJycSABIAJxcmpqQZnzidQFakEJdyIDIBEgBCAOIAIgFiABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmpqQZnzidQFakEDdyICIAEgA3JxIAEgA3FyampBmfOJ1AVqQQV3IgQgASACcnEgASACcXJqakGZ84nUBWpBCXciAyAMIAIgAyAJIAEgAyACIARycSACIARxcmpqQZnzidQFakENdyIBcyAEc2pqQaHX5/YGakEDdyICIAQgASACcyADc2ogEmpBodfn9gZqQQl3IgRzIAFzampBodfn9gZqQQt3IgMgAiADIBggASADIARzIAJzampBodfn9gZqQQ93IgFzIARzaiANakGh1+f2BmpBA3ciAiAUIAQgASACcyADc2pqQaHX5/YGakEJdyIEcyABc2pqQaHX5/YGakELdyIDIAsgAiADIBYgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgIgEyAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3chAyAKIA4gAiADIBcgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgJqIQogBiAJIAEgESADIAIgFSAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3ciAyAEcyACc2pqQaHX5/YGakEPd2ohBiADIAdqIQcgBCAIaiEIIAVBQGshBQwBCwsgCiQBIAYkAiAHJAMgCCQECw0AIAAQASMAIABqJAAL/wQCA38BfiMAIABqrUIDhiEEIABByABqQUBxIgJBCGshAyAAIgFBAWohACABQYABOgAAA0AgACACSUEAIABBB3EbBEAgAEEAOgAAIABBAWohAAwBCwsDQCAAIAJJBEAgAEIANwMAIABBCGohAAwBCwsgAyAENwMAIAIQAUEAIwGtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEIIwKtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEQIwOtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEYIwStIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAAs=", - "base64" - ) - ); - //#endregion - - md4_1 = create.bind(null, md4, [], 64, 32); - return md4_1; -} - -var BulkUpdateDecorator_1; -var hasRequiredBulkUpdateDecorator; - -function requireBulkUpdateDecorator () { - if (hasRequiredBulkUpdateDecorator) return BulkUpdateDecorator_1; - hasRequiredBulkUpdateDecorator = 1; - const BULK_SIZE = 2000; - - // We are using an object instead of a Map as this will stay static during the runtime - // so access to it can be optimized by v8 - const digestCaches = {}; - - class BulkUpdateDecorator { - /** - * @param {Hash | function(): Hash} hashOrFactory function to create a hash - * @param {string=} hashKey key for caching - */ - constructor(hashOrFactory, hashKey) { - this.hashKey = hashKey; - - if (typeof hashOrFactory === "function") { - this.hashFactory = hashOrFactory; - this.hash = undefined; - } else { - this.hashFactory = undefined; - this.hash = hashOrFactory; - } - - this.buffer = ""; - } - - /** - * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} - * @param {string|Buffer} data data - * @param {string=} inputEncoding data encoding - * @returns {this} updated hash - */ - update(data, inputEncoding) { - if ( - inputEncoding !== undefined || - typeof data !== "string" || - data.length > BULK_SIZE - ) { - if (this.hash === undefined) { - this.hash = this.hashFactory(); - } - - if (this.buffer.length > 0) { - this.hash.update(this.buffer); - this.buffer = ""; - } - - this.hash.update(data, inputEncoding); - } else { - this.buffer += data; - - if (this.buffer.length > BULK_SIZE) { - if (this.hash === undefined) { - this.hash = this.hashFactory(); - } - - this.hash.update(this.buffer); - this.buffer = ""; - } - } - - return this; - } - - /** - * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} - * @param {string=} encoding encoding of the return value - * @returns {string|Buffer} digest - */ - digest(encoding) { - let digestCache; - - const buffer = this.buffer; - - if (this.hash === undefined) { - // short data for hash, we can use caching - const cacheKey = `${this.hashKey}-${encoding}`; - - digestCache = digestCaches[cacheKey]; - - if (digestCache === undefined) { - digestCache = digestCaches[cacheKey] = new Map(); - } - - const cacheEntry = digestCache.get(buffer); - - if (cacheEntry !== undefined) { - return cacheEntry; - } - - this.hash = this.hashFactory(); - } - - if (buffer.length > 0) { - this.hash.update(buffer); - } - - const digestResult = this.hash.digest(encoding); - - if (digestCache !== undefined) { - digestCache.set(buffer, digestResult); - } - - return digestResult; - } - } - - BulkUpdateDecorator_1 = BulkUpdateDecorator; - return BulkUpdateDecorator_1; -} - -var getHashDigest_1; -var hasRequiredGetHashDigest; - -function requireGetHashDigest () { - if (hasRequiredGetHashDigest) return getHashDigest_1; - hasRequiredGetHashDigest = 1; - - const baseEncodeTables = { - 26: "abcdefghijklmnopqrstuvwxyz", - 32: "123456789abcdefghjkmnpqrstuvwxyz", // no 0lio - 36: "0123456789abcdefghijklmnopqrstuvwxyz", - 49: "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ", // no lIO - 52: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", - 58: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ", // no 0lIO - 62: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", - 64: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_", - }; - - /** - * @param {Uint32Array} uint32Array Treated as a long base-0x100000000 number, little endian - * @param {number} divisor The divisor - * @return {number} Modulo (remainder) of the division - */ - function divmod32(uint32Array, divisor) { - let carry = 0; - for (let i = uint32Array.length - 1; i >= 0; i--) { - const value = carry * 0x100000000 + uint32Array[i]; - carry = value % divisor; - uint32Array[i] = Math.floor(value / divisor); - } - return carry; - } - - function encodeBufferToBase(buffer, base, length) { - const encodeTable = baseEncodeTables[base]; - - if (!encodeTable) { - throw new Error("Unknown encoding base" + base); - } - - // Input bits are only enough to generate this many characters - const limit = Math.ceil((buffer.length * 8) / Math.log2(base)); - length = Math.min(length, limit); - - // Most of the crypto digests (if not all) has length a multiple of 4 bytes. - // Fewer numbers in the array means faster math. - const uint32Array = new Uint32Array(Math.ceil(buffer.length / 4)); - - // Make sure the input buffer data is copied and is not mutated by reference. - // divmod32() would corrupt the BulkUpdateDecorator cache otherwise. - buffer.copy(Buffer.from(uint32Array.buffer)); - - let output = ""; - - for (let i = 0; i < length; i++) { - output = encodeTable[divmod32(uint32Array, base)] + output; - } - - return output; - } - - let crypto = undefined; - let createXXHash64 = undefined; - let createMd4 = undefined; - let BatchedHash = undefined; - let BulkUpdateDecorator = undefined; - - function getHashDigest(buffer, algorithm, digestType, maxLength) { - algorithm = algorithm || "xxhash64"; - maxLength = maxLength || 9999; - - let hash; - - if (algorithm === "xxhash64") { - if (createXXHash64 === undefined) { - createXXHash64 = /*@__PURE__*/ requireXxhash64(); - - if (BatchedHash === undefined) { - BatchedHash = /*@__PURE__*/ requireBatchedHash(); - } - } - - hash = new BatchedHash(createXXHash64()); - } else if (algorithm === "md4") { - if (createMd4 === undefined) { - createMd4 = /*@__PURE__*/ requireMd4(); - - if (BatchedHash === undefined) { - BatchedHash = /*@__PURE__*/ requireBatchedHash(); - } - } - - hash = new BatchedHash(createMd4()); - } else if (algorithm === "native-md4") { - if (typeof crypto === "undefined") { - crypto = require("crypto"); - - if (BulkUpdateDecorator === undefined) { - BulkUpdateDecorator = /*@__PURE__*/ requireBulkUpdateDecorator(); - } - } - - hash = new BulkUpdateDecorator(() => crypto.createHash("md4"), "md4"); - } else { - if (typeof crypto === "undefined") { - crypto = require("crypto"); - - if (BulkUpdateDecorator === undefined) { - BulkUpdateDecorator = /*@__PURE__*/ requireBulkUpdateDecorator(); - } - } - - hash = new BulkUpdateDecorator( - () => crypto.createHash(algorithm), - algorithm - ); - } - - hash.update(buffer); - - if ( - digestType === "base26" || - digestType === "base32" || - digestType === "base36" || - digestType === "base49" || - digestType === "base52" || - digestType === "base58" || - digestType === "base62" || - digestType === "base64safe" - ) { - return encodeBufferToBase( - hash.digest(), - digestType === "base64safe" ? 64 : digestType.substr(4), - maxLength - ); - } - - return hash.digest(digestType || "hex").substr(0, maxLength); - } - - getHashDigest_1 = getHashDigest; - return getHashDigest_1; -} - -var interpolateName_1; -var hasRequiredInterpolateName; - -function requireInterpolateName () { - if (hasRequiredInterpolateName) return interpolateName_1; - hasRequiredInterpolateName = 1; - - const path = path$1; - const getHashDigest = /*@__PURE__*/ requireGetHashDigest(); - - function interpolateName(loaderContext, name, options = {}) { - let filename; - - const hasQuery = - loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1; - - if (typeof name === "function") { - filename = name( - loaderContext.resourcePath, - hasQuery ? loaderContext.resourceQuery : undefined - ); - } else { - filename = name || "[hash].[ext]"; - } - - const context = options.context; - const content = options.content; - const regExp = options.regExp; - - let ext = "bin"; - let basename = "file"; - let directory = ""; - let folder = ""; - let query = ""; - - if (loaderContext.resourcePath) { - const parsed = path.parse(loaderContext.resourcePath); - let resourcePath = loaderContext.resourcePath; - - if (parsed.ext) { - ext = parsed.ext.substr(1); - } - - if (parsed.dir) { - basename = parsed.name; - resourcePath = parsed.dir + path.sep; - } - - if (typeof context !== "undefined") { - directory = path - .relative(context, resourcePath + "_") - .replace(/\\/g, "/") - .replace(/\.\.(\/)?/g, "_$1"); - directory = directory.substr(0, directory.length - 1); - } else { - directory = resourcePath.replace(/\\/g, "/").replace(/\.\.(\/)?/g, "_$1"); - } - - if (directory.length <= 1) { - directory = ""; - } else { - // directory.length > 1 - folder = path.basename(directory); - } - } - - if (loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1) { - query = loaderContext.resourceQuery; - - const hashIdx = query.indexOf("#"); - - if (hashIdx >= 0) { - query = query.substr(0, hashIdx); - } - } - - let url = filename; - - if (content) { - // Match hash template - url = url - // `hash` and `contenthash` are same in `loader-utils` context - // let's keep `hash` for backward compatibility - .replace( - /\[(?:([^[:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*(?:safe)?))?(?::(\d+))?\]/gi, - (all, hashType, digestType, maxLength) => - getHashDigest(content, hashType, digestType, parseInt(maxLength, 10)) - ); - } - - url = url - .replace(/\[ext\]/gi, () => ext) - .replace(/\[name\]/gi, () => basename) - .replace(/\[path\]/gi, () => directory) - .replace(/\[folder\]/gi, () => folder) - .replace(/\[query\]/gi, () => query); - - if (regExp && loaderContext.resourcePath) { - const match = loaderContext.resourcePath.match(new RegExp(regExp)); - - match && - match.forEach((matched, i) => { - url = url.replace(new RegExp("\\[" + i + "\\]", "ig"), matched); - }); - } - - if ( - typeof loaderContext.options === "object" && - typeof loaderContext.options.customInterpolateName === "function" - ) { - url = loaderContext.options.customInterpolateName.call( - loaderContext, - url, - name, - options - ); - } - - return url; - } - - interpolateName_1 = interpolateName; - return interpolateName_1; -} - -var genericNames; -var hasRequiredGenericNames; - -function requireGenericNames () { - if (hasRequiredGenericNames) return genericNames; - hasRequiredGenericNames = 1; - - var interpolateName = /*@__PURE__*/ requireInterpolateName(); - var path = path$1; - - /** - * @param {string} pattern - * @param {object} options - * @param {string} options.context - * @param {string} options.hashPrefix - * @return {function} - */ - genericNames = function createGenerator(pattern, options) { - options = options || {}; - var context = - options && typeof options.context === "string" - ? options.context - : process.cwd(); - var hashPrefix = - options && typeof options.hashPrefix === "string" ? options.hashPrefix : ""; - - /** - * @param {string} localName Usually a class name - * @param {string} filepath Absolute path - * @return {string} - */ - return function generate(localName, filepath) { - var name = pattern.replace(/\[local\]/gi, localName); - var loaderContext = { - resourcePath: filepath, - }; - - var loaderOptions = { - content: - hashPrefix + - path.relative(context, filepath).replace(/\\/g, "/") + - "\x00" + - localName, - context: context, - }; - - var genericName = interpolateName(loaderContext, name, loaderOptions); - return genericName - .replace(new RegExp("[^a-zA-Z0-9\\-_\u00A0-\uFFFF]", "g"), "-") - .replace(/^((-?[0-9])|--)/, "_$1"); - }; - }; - return genericNames; -} - -var src$2 = {exports: {}}; - -var dist = {exports: {}}; - -var processor = {exports: {}}; - -var parser = {exports: {}}; - -var root = {exports: {}}; - -var container = {exports: {}}; - -var node = {exports: {}}; - -var util = {}; - -var unesc = {exports: {}}; - -var hasRequiredUnesc; - -function requireUnesc () { - if (hasRequiredUnesc) return unesc.exports; - hasRequiredUnesc = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = unesc; - // Many thanks for this post which made this migration much easier. - // https://mathiasbynens.be/notes/css-escapes - - /** - * - * @param {string} str - * @returns {[string, number]|undefined} - */ - function gobbleHex(str) { - var lower = str.toLowerCase(); - var hex = ''; - var spaceTerminated = false; - for (var i = 0; i < 6 && lower[i] !== undefined; i++) { - var code = lower.charCodeAt(i); - // check to see if we are dealing with a valid hex char [a-f|0-9] - var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; - // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point - spaceTerminated = code === 32; - if (!valid) { - break; - } - hex += lower[i]; - } - if (hex.length === 0) { - return undefined; - } - var codePoint = parseInt(hex, 16); - var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; - // Add special case for - // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point" - // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point - if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) { - return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)]; - } - return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)]; - } - var CONTAINS_ESCAPE = /\\/; - function unesc(str) { - var needToProcess = CONTAINS_ESCAPE.test(str); - if (!needToProcess) { - return str; - } - var ret = ""; - for (var i = 0; i < str.length; i++) { - if (str[i] === "\\") { - var gobbled = gobbleHex(str.slice(i + 1, i + 7)); - if (gobbled !== undefined) { - ret += gobbled[0]; - i += gobbled[1]; - continue; - } - - // Retain a pair of \\ if double escaped `\\\\` - // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e - if (str[i + 1] === "\\") { - ret += "\\"; - i++; - continue; - } - - // if \\ is at the end of the string retain it - // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb - if (str.length === i + 1) { - ret += str[i]; - } - continue; - } - ret += str[i]; - } - return ret; - } - module.exports = exports.default; - } (unesc, unesc.exports)); - return unesc.exports; -} - -var getProp = {exports: {}}; - -var hasRequiredGetProp; - -function requireGetProp () { - if (hasRequiredGetProp) return getProp.exports; - hasRequiredGetProp = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = getProp; - function getProp(obj) { - for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - props[_key - 1] = arguments[_key]; - } - while (props.length > 0) { - var prop = props.shift(); - if (!obj[prop]) { - return undefined; - } - obj = obj[prop]; - } - return obj; - } - module.exports = exports.default; - } (getProp, getProp.exports)); - return getProp.exports; -} - -var ensureObject = {exports: {}}; - -var hasRequiredEnsureObject; - -function requireEnsureObject () { - if (hasRequiredEnsureObject) return ensureObject.exports; - hasRequiredEnsureObject = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = ensureObject; - function ensureObject(obj) { - for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - props[_key - 1] = arguments[_key]; - } - while (props.length > 0) { - var prop = props.shift(); - if (!obj[prop]) { - obj[prop] = {}; - } - obj = obj[prop]; - } - } - module.exports = exports.default; - } (ensureObject, ensureObject.exports)); - return ensureObject.exports; -} - -var stripComments = {exports: {}}; - -var hasRequiredStripComments; - -function requireStripComments () { - if (hasRequiredStripComments) return stripComments.exports; - hasRequiredStripComments = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = stripComments; - function stripComments(str) { - var s = ""; - var commentStart = str.indexOf("/*"); - var lastEnd = 0; - while (commentStart >= 0) { - s = s + str.slice(lastEnd, commentStart); - var commentEnd = str.indexOf("*/", commentStart + 2); - if (commentEnd < 0) { - return s; - } - lastEnd = commentEnd + 2; - commentStart = str.indexOf("/*", lastEnd); - } - s = s + str.slice(lastEnd); - return s; - } - module.exports = exports.default; - } (stripComments, stripComments.exports)); - return stripComments.exports; -} - -var hasRequiredUtil; - -function requireUtil () { - if (hasRequiredUtil) return util; - hasRequiredUtil = 1; - - util.__esModule = true; - util.unesc = util.stripComments = util.getProp = util.ensureObject = void 0; - var _unesc = _interopRequireDefault(/*@__PURE__*/ requireUnesc()); - util.unesc = _unesc["default"]; - var _getProp = _interopRequireDefault(/*@__PURE__*/ requireGetProp()); - util.getProp = _getProp["default"]; - var _ensureObject = _interopRequireDefault(/*@__PURE__*/ requireEnsureObject()); - util.ensureObject = _ensureObject["default"]; - var _stripComments = _interopRequireDefault(/*@__PURE__*/ requireStripComments()); - util.stripComments = _stripComments["default"]; - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - return util; -} - -var hasRequiredNode; - -function requireNode () { - if (hasRequiredNode) return node.exports; - hasRequiredNode = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _util = /*@__PURE__*/ requireUtil(); - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - var cloneNode = function cloneNode(obj, parent) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - var cloned = new obj.constructor(); - for (var i in obj) { - if (!obj.hasOwnProperty(i)) { - continue; - } - var value = obj[i]; - var type = typeof value; - if (i === 'parent' && type === 'object') { - if (parent) { - cloned[i] = parent; - } - } else if (value instanceof Array) { - cloned[i] = value.map(function (j) { - return cloneNode(j, cloned); - }); - } else { - cloned[i] = cloneNode(value, cloned); - } - } - return cloned; - }; - var Node = /*#__PURE__*/function () { - function Node(opts) { - if (opts === void 0) { - opts = {}; - } - Object.assign(this, opts); - this.spaces = this.spaces || {}; - this.spaces.before = this.spaces.before || ''; - this.spaces.after = this.spaces.after || ''; - } - var _proto = Node.prototype; - _proto.remove = function remove() { - if (this.parent) { - this.parent.removeChild(this); - } - this.parent = undefined; - return this; - }; - _proto.replaceWith = function replaceWith() { - if (this.parent) { - for (var index in arguments) { - this.parent.insertBefore(this, arguments[index]); - } - this.remove(); - } - return this; - }; - _proto.next = function next() { - return this.parent.at(this.parent.index(this) + 1); - }; - _proto.prev = function prev() { - return this.parent.at(this.parent.index(this) - 1); - }; - _proto.clone = function clone(overrides) { - if (overrides === void 0) { - overrides = {}; - } - var cloned = cloneNode(this); - for (var name in overrides) { - cloned[name] = overrides[name]; - } - return cloned; - } - - /** - * Some non-standard syntax doesn't follow normal escaping rules for css. - * This allows non standard syntax to be appended to an existing property - * by specifying the escaped value. By specifying the escaped value, - * illegal characters are allowed to be directly inserted into css output. - * @param {string} name the property to set - * @param {any} value the unescaped value of the property - * @param {string} valueEscaped optional. the escaped value of the property. - */; - _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { - if (!this.raws) { - this.raws = {}; - } - var originalValue = this[name]; - var originalEscaped = this.raws[name]; - this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first. - if (originalEscaped || valueEscaped !== value) { - this.raws[name] = (originalEscaped || originalValue) + valueEscaped; - } else { - delete this.raws[name]; // delete any escaped value that was created by the setter. - } - } - - /** - * Some non-standard syntax doesn't follow normal escaping rules for css. - * This allows the escaped value to be specified directly, allowing illegal - * characters to be directly inserted into css output. - * @param {string} name the property to set - * @param {any} value the unescaped value of the property - * @param {string} valueEscaped the escaped value of the property. - */; - _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { - if (!this.raws) { - this.raws = {}; - } - this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. - this.raws[name] = valueEscaped; - } - - /** - * When you want a value to passed through to CSS directly. This method - * deletes the corresponding raw value causing the stringifier to fallback - * to the unescaped value. - * @param {string} name the property to set. - * @param {any} value The value that is both escaped and unescaped. - */; - _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { - this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. - if (this.raws) { - delete this.raws[name]; - } - } - - /** - * - * @param {number} line The number (starting with 1) - * @param {number} column The column number (starting with 1) - */; - _proto.isAtPosition = function isAtPosition(line, column) { - if (this.source && this.source.start && this.source.end) { - if (this.source.start.line > line) { - return false; - } - if (this.source.end.line < line) { - return false; - } - if (this.source.start.line === line && this.source.start.column > column) { - return false; - } - if (this.source.end.line === line && this.source.end.column < column) { - return false; - } - return true; - } - return undefined; - }; - _proto.stringifyProperty = function stringifyProperty(name) { - return this.raws && this.raws[name] || this[name]; - }; - _proto.valueToString = function valueToString() { - return String(this.stringifyProperty("value")); - }; - _proto.toString = function toString() { - return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join(''); - }; - _createClass(Node, [{ - key: "rawSpaceBefore", - get: function get() { - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; - if (rawSpace === undefined) { - rawSpace = this.spaces && this.spaces.before; - } - return rawSpace || ""; - }, - set: function set(raw) { - (0, _util.ensureObject)(this, "raws", "spaces"); - this.raws.spaces.before = raw; - } - }, { - key: "rawSpaceAfter", - get: function get() { - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; - if (rawSpace === undefined) { - rawSpace = this.spaces.after; - } - return rawSpace || ""; - }, - set: function set(raw) { - (0, _util.ensureObject)(this, "raws", "spaces"); - this.raws.spaces.after = raw; - } - }]); - return Node; - }(); - exports["default"] = Node; - module.exports = exports.default; - } (node, node.exports)); - return node.exports; -} - -var types$1 = {}; - -var hasRequiredTypes; - -function requireTypes () { - if (hasRequiredTypes) return types$1; - hasRequiredTypes = 1; - - types$1.__esModule = true; - types$1.UNIVERSAL = types$1.TAG = types$1.STRING = types$1.SELECTOR = types$1.ROOT = types$1.PSEUDO = types$1.NESTING = types$1.ID = types$1.COMMENT = types$1.COMBINATOR = types$1.CLASS = types$1.ATTRIBUTE = void 0; - var TAG = 'tag'; - types$1.TAG = TAG; - var STRING = 'string'; - types$1.STRING = STRING; - var SELECTOR = 'selector'; - types$1.SELECTOR = SELECTOR; - var ROOT = 'root'; - types$1.ROOT = ROOT; - var PSEUDO = 'pseudo'; - types$1.PSEUDO = PSEUDO; - var NESTING = 'nesting'; - types$1.NESTING = NESTING; - var ID = 'id'; - types$1.ID = ID; - var COMMENT = 'comment'; - types$1.COMMENT = COMMENT; - var COMBINATOR = 'combinator'; - types$1.COMBINATOR = COMBINATOR; - var CLASS = 'class'; - types$1.CLASS = CLASS; - var ATTRIBUTE = 'attribute'; - types$1.ATTRIBUTE = ATTRIBUTE; - var UNIVERSAL = 'universal'; - types$1.UNIVERSAL = UNIVERSAL; - return types$1; -} - -var hasRequiredContainer; - -function requireContainer () { - if (hasRequiredContainer) return container.exports; - hasRequiredContainer = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); - var types = _interopRequireWildcard(/*@__PURE__*/ requireTypes()); - function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - 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(o); 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 _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Container = /*#__PURE__*/function (_Node) { - _inheritsLoose(Container, _Node); - function Container(opts) { - var _this; - _this = _Node.call(this, opts) || this; - if (!_this.nodes) { - _this.nodes = []; - } - return _this; - } - var _proto = Container.prototype; - _proto.append = function append(selector) { - selector.parent = this; - this.nodes.push(selector); - return this; - }; - _proto.prepend = function prepend(selector) { - selector.parent = this; - this.nodes.unshift(selector); - return this; - }; - _proto.at = function at(index) { - return this.nodes[index]; - }; - _proto.index = function index(child) { - if (typeof child === 'number') { - return child; - } - return this.nodes.indexOf(child); - }; - _proto.removeChild = function removeChild(child) { - child = this.index(child); - this.at(child).parent = undefined; - this.nodes.splice(child, 1); - var index; - for (var id in this.indexes) { - index = this.indexes[id]; - if (index >= child) { - this.indexes[id] = index - 1; - } - } - return this; - }; - _proto.removeAll = function removeAll() { - for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { - var node = _step.value; - node.parent = undefined; - } - this.nodes = []; - return this; - }; - _proto.empty = function empty() { - return this.removeAll(); - }; - _proto.insertAfter = function insertAfter(oldNode, newNode) { - newNode.parent = this; - var oldIndex = this.index(oldNode); - this.nodes.splice(oldIndex + 1, 0, newNode); - newNode.parent = this; - var index; - for (var id in this.indexes) { - index = this.indexes[id]; - if (oldIndex <= index) { - this.indexes[id] = index + 1; - } - } - return this; - }; - _proto.insertBefore = function insertBefore(oldNode, newNode) { - newNode.parent = this; - var oldIndex = this.index(oldNode); - this.nodes.splice(oldIndex, 0, newNode); - newNode.parent = this; - var index; - for (var id in this.indexes) { - index = this.indexes[id]; - if (index <= oldIndex) { - this.indexes[id] = index + 1; - } - } - return this; - }; - _proto._findChildAtPosition = function _findChildAtPosition(line, col) { - var found = undefined; - this.each(function (node) { - if (node.atPosition) { - var foundChild = node.atPosition(line, col); - if (foundChild) { - found = foundChild; - return false; - } - } else if (node.isAtPosition(line, col)) { - found = node; - return false; - } - }); - return found; - } - - /** - * Return the most specific node at the line and column number given. - * The source location is based on the original parsed location, locations aren't - * updated as selector nodes are mutated. - * - * Note that this location is relative to the location of the first character - * of the selector, and not the location of the selector in the overall document - * when used in conjunction with postcss. - * - * If not found, returns undefined. - * @param {number} line The line number of the node to find. (1-based index) - * @param {number} col The column number of the node to find. (1-based index) - */; - _proto.atPosition = function atPosition(line, col) { - if (this.isAtPosition(line, col)) { - return this._findChildAtPosition(line, col) || this; - } else { - return undefined; - } - }; - _proto._inferEndPosition = function _inferEndPosition() { - if (this.last && this.last.source && this.last.source.end) { - this.source = this.source || {}; - this.source.end = this.source.end || {}; - Object.assign(this.source.end, this.last.source.end); - } - }; - _proto.each = function each(callback) { - if (!this.lastEach) { - this.lastEach = 0; - } - if (!this.indexes) { - this.indexes = {}; - } - this.lastEach++; - var id = this.lastEach; - this.indexes[id] = 0; - if (!this.length) { - return undefined; - } - var index, result; - while (this.indexes[id] < this.length) { - index = this.indexes[id]; - result = callback(this.at(index), index); - if (result === false) { - break; - } - this.indexes[id] += 1; - } - delete this.indexes[id]; - if (result === false) { - return false; - } - }; - _proto.walk = function walk(callback) { - return this.each(function (node, i) { - var result = callback(node, i); - if (result !== false && node.length) { - result = node.walk(callback); - } - if (result === false) { - return false; - } - }); - }; - _proto.walkAttributes = function walkAttributes(callback) { - var _this2 = this; - return this.walk(function (selector) { - if (selector.type === types.ATTRIBUTE) { - return callback.call(_this2, selector); - } - }); - }; - _proto.walkClasses = function walkClasses(callback) { - var _this3 = this; - return this.walk(function (selector) { - if (selector.type === types.CLASS) { - return callback.call(_this3, selector); - } - }); - }; - _proto.walkCombinators = function walkCombinators(callback) { - var _this4 = this; - return this.walk(function (selector) { - if (selector.type === types.COMBINATOR) { - return callback.call(_this4, selector); - } - }); - }; - _proto.walkComments = function walkComments(callback) { - var _this5 = this; - return this.walk(function (selector) { - if (selector.type === types.COMMENT) { - return callback.call(_this5, selector); - } - }); - }; - _proto.walkIds = function walkIds(callback) { - var _this6 = this; - return this.walk(function (selector) { - if (selector.type === types.ID) { - return callback.call(_this6, selector); - } - }); - }; - _proto.walkNesting = function walkNesting(callback) { - var _this7 = this; - return this.walk(function (selector) { - if (selector.type === types.NESTING) { - return callback.call(_this7, selector); - } - }); - }; - _proto.walkPseudos = function walkPseudos(callback) { - var _this8 = this; - return this.walk(function (selector) { - if (selector.type === types.PSEUDO) { - return callback.call(_this8, selector); - } - }); - }; - _proto.walkTags = function walkTags(callback) { - var _this9 = this; - return this.walk(function (selector) { - if (selector.type === types.TAG) { - return callback.call(_this9, selector); - } - }); - }; - _proto.walkUniversals = function walkUniversals(callback) { - var _this10 = this; - return this.walk(function (selector) { - if (selector.type === types.UNIVERSAL) { - return callback.call(_this10, selector); - } - }); - }; - _proto.split = function split(callback) { - var _this11 = this; - var current = []; - return this.reduce(function (memo, node, index) { - var split = callback.call(_this11, node); - current.push(node); - if (split) { - memo.push(current); - current = []; - } else if (index === _this11.length - 1) { - memo.push(current); - } - return memo; - }, []); - }; - _proto.map = function map(callback) { - return this.nodes.map(callback); - }; - _proto.reduce = function reduce(callback, memo) { - return this.nodes.reduce(callback, memo); - }; - _proto.every = function every(callback) { - return this.nodes.every(callback); - }; - _proto.some = function some(callback) { - return this.nodes.some(callback); - }; - _proto.filter = function filter(callback) { - return this.nodes.filter(callback); - }; - _proto.sort = function sort(callback) { - return this.nodes.sort(callback); - }; - _proto.toString = function toString() { - return this.map(String).join(''); - }; - _createClass(Container, [{ - key: "first", - get: function get() { - return this.at(0); - } - }, { - key: "last", - get: function get() { - return this.at(this.length - 1); - } - }, { - key: "length", - get: function get() { - return this.nodes.length; - } - }]); - return Container; - }(_node["default"]); - exports["default"] = Container; - module.exports = exports.default; - } (container, container.exports)); - return container.exports; -} - -var hasRequiredRoot; - -function requireRoot () { - if (hasRequiredRoot) return root.exports; - hasRequiredRoot = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Root = /*#__PURE__*/function (_Container) { - _inheritsLoose(Root, _Container); - function Root(opts) { - var _this; - _this = _Container.call(this, opts) || this; - _this.type = _types.ROOT; - return _this; - } - var _proto = Root.prototype; - _proto.toString = function toString() { - var str = this.reduce(function (memo, selector) { - memo.push(String(selector)); - return memo; - }, []).join(','); - return this.trailingComma ? str + ',' : str; - }; - _proto.error = function error(message, options) { - if (this._error) { - return this._error(message, options); - } else { - return new Error(message); - } - }; - _createClass(Root, [{ - key: "errorGenerator", - set: function set(handler) { - this._error = handler; - } - }]); - return Root; - }(_container["default"]); - exports["default"] = Root; - module.exports = exports.default; - } (root, root.exports)); - return root.exports; -} - -var selector = {exports: {}}; - -var hasRequiredSelector; - -function requireSelector () { - if (hasRequiredSelector) return selector.exports; - hasRequiredSelector = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Selector = /*#__PURE__*/function (_Container) { - _inheritsLoose(Selector, _Container); - function Selector(opts) { - var _this; - _this = _Container.call(this, opts) || this; - _this.type = _types.SELECTOR; - return _this; - } - return Selector; - }(_container["default"]); - exports["default"] = Selector; - module.exports = exports.default; - } (selector, selector.exports)); - return selector.exports; -} - -var className = {exports: {}}; - -var hasRequiredClassName; - -function requireClassName () { - if (hasRequiredClassName) return className.exports; - hasRequiredClassName = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); - var _util = /*@__PURE__*/ requireUtil(); - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var ClassName = /*#__PURE__*/function (_Node) { - _inheritsLoose(ClassName, _Node); - function ClassName(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.CLASS; - _this._constructed = true; - return _this; - } - var _proto = ClassName.prototype; - _proto.valueToString = function valueToString() { - return '.' + _Node.prototype.valueToString.call(this); - }; - _createClass(ClassName, [{ - key: "value", - get: function get() { - return this._value; - }, - set: function set(v) { - if (this._constructed) { - var escaped = (0, _cssesc["default"])(v, { - isIdentifier: true - }); - if (escaped !== v) { - (0, _util.ensureObject)(this, "raws"); - this.raws.value = escaped; - } else if (this.raws) { - delete this.raws.value; - } - } - this._value = v; - } - }]); - return ClassName; - }(_node["default"]); - exports["default"] = ClassName; - module.exports = exports.default; - } (className, className.exports)); - return className.exports; -} - -var comment = {exports: {}}; - -var hasRequiredComment; - -function requireComment () { - if (hasRequiredComment) return comment.exports; - hasRequiredComment = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Comment = /*#__PURE__*/function (_Node) { - _inheritsLoose(Comment, _Node); - function Comment(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.COMMENT; - return _this; - } - return Comment; - }(_node["default"]); - exports["default"] = Comment; - module.exports = exports.default; - } (comment, comment.exports)); - return comment.exports; -} - -var id = {exports: {}}; - -var hasRequiredId; - -function requireId () { - if (hasRequiredId) return id.exports; - hasRequiredId = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var ID = /*#__PURE__*/function (_Node) { - _inheritsLoose(ID, _Node); - function ID(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.ID; - return _this; - } - var _proto = ID.prototype; - _proto.valueToString = function valueToString() { - return '#' + _Node.prototype.valueToString.call(this); - }; - return ID; - }(_node["default"]); - exports["default"] = ID; - module.exports = exports.default; - } (id, id.exports)); - return id.exports; -} - -var tag = {exports: {}}; - -var namespace = {exports: {}}; - -var hasRequiredNamespace; - -function requireNamespace () { - if (hasRequiredNamespace) return namespace.exports; - hasRequiredNamespace = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); - var _util = /*@__PURE__*/ requireUtil(); - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Namespace = /*#__PURE__*/function (_Node) { - _inheritsLoose(Namespace, _Node); - function Namespace() { - return _Node.apply(this, arguments) || this; - } - var _proto = Namespace.prototype; - _proto.qualifiedName = function qualifiedName(value) { - if (this.namespace) { - return this.namespaceString + "|" + value; - } else { - return value; - } - }; - _proto.valueToString = function valueToString() { - return this.qualifiedName(_Node.prototype.valueToString.call(this)); - }; - _createClass(Namespace, [{ - key: "namespace", - get: function get() { - return this._namespace; - }, - set: function set(namespace) { - if (namespace === true || namespace === "*" || namespace === "&") { - this._namespace = namespace; - if (this.raws) { - delete this.raws.namespace; - } - return; - } - var escaped = (0, _cssesc["default"])(namespace, { - isIdentifier: true - }); - this._namespace = namespace; - if (escaped !== namespace) { - (0, _util.ensureObject)(this, "raws"); - this.raws.namespace = escaped; - } else if (this.raws) { - delete this.raws.namespace; - } - } - }, { - key: "ns", - get: function get() { - return this._namespace; - }, - set: function set(namespace) { - this.namespace = namespace; - } - }, { - key: "namespaceString", - get: function get() { - if (this.namespace) { - var ns = this.stringifyProperty("namespace"); - if (ns === true) { - return ''; - } else { - return ns; - } - } else { - return ''; - } - } - }]); - return Namespace; - }(_node["default"]); - exports["default"] = Namespace; - module.exports = exports.default; - } (namespace, namespace.exports)); - return namespace.exports; -} - -var hasRequiredTag; - -function requireTag () { - if (hasRequiredTag) return tag.exports; - hasRequiredTag = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Tag = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Tag, _Namespace); - function Tag(opts) { - var _this; - _this = _Namespace.call(this, opts) || this; - _this.type = _types.TAG; - return _this; - } - return Tag; - }(_namespace["default"]); - exports["default"] = Tag; - module.exports = exports.default; - } (tag, tag.exports)); - return tag.exports; -} - -var string = {exports: {}}; - -var hasRequiredString; - -function requireString () { - if (hasRequiredString) return string.exports; - hasRequiredString = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var String = /*#__PURE__*/function (_Node) { - _inheritsLoose(String, _Node); - function String(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.STRING; - return _this; - } - return String; - }(_node["default"]); - exports["default"] = String; - module.exports = exports.default; - } (string, string.exports)); - return string.exports; -} - -var pseudo = {exports: {}}; - -var hasRequiredPseudo; - -function requirePseudo () { - if (hasRequiredPseudo) return pseudo.exports; - hasRequiredPseudo = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Pseudo = /*#__PURE__*/function (_Container) { - _inheritsLoose(Pseudo, _Container); - function Pseudo(opts) { - var _this; - _this = _Container.call(this, opts) || this; - _this.type = _types.PSEUDO; - return _this; - } - var _proto = Pseudo.prototype; - _proto.toString = function toString() { - var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; - return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join(''); - }; - return Pseudo; - }(_container["default"]); - exports["default"] = Pseudo; - module.exports = exports.default; - } (pseudo, pseudo.exports)); - return pseudo.exports; -} - -var attribute = {}; - -var hasRequiredAttribute; - -function requireAttribute () { - if (hasRequiredAttribute) return attribute; - hasRequiredAttribute = 1; - (function (exports) { - - exports.__esModule = true; - exports["default"] = void 0; - exports.unescapeValue = unescapeValue; - var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); - var _unesc = _interopRequireDefault(/*@__PURE__*/ requireUnesc()); - var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace()); - var _types = /*@__PURE__*/ requireTypes(); - var _CSSESC_QUOTE_OPTIONS; - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var deprecate = /*@__PURE__*/ requireNode$1(); - var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; - var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead."); - var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); - var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); - function unescapeValue(value) { - var deprecatedUsage = false; - var quoteMark = null; - var unescaped = value; - var m = unescaped.match(WRAPPED_IN_QUOTES); - if (m) { - quoteMark = m[1]; - unescaped = m[2]; - } - unescaped = (0, _unesc["default"])(unescaped); - if (unescaped !== value) { - deprecatedUsage = true; - } - return { - deprecatedUsage: deprecatedUsage, - unescaped: unescaped, - quoteMark: quoteMark - }; - } - function handleDeprecatedContructorOpts(opts) { - if (opts.quoteMark !== undefined) { - return opts; - } - if (opts.value === undefined) { - return opts; - } - warnOfDeprecatedConstructor(); - var _unescapeValue = unescapeValue(opts.value), - quoteMark = _unescapeValue.quoteMark, - unescaped = _unescapeValue.unescaped; - if (!opts.raws) { - opts.raws = {}; - } - if (opts.raws.value === undefined) { - opts.raws.value = opts.value; - } - opts.value = unescaped; - opts.quoteMark = quoteMark; - return opts; - } - var Attribute = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Attribute, _Namespace); - function Attribute(opts) { - var _this; - if (opts === void 0) { - opts = {}; - } - _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; - _this.type = _types.ATTRIBUTE; - _this.raws = _this.raws || {}; - Object.defineProperty(_this.raws, 'unquoted', { - get: deprecate(function () { - return _this.value; - }, "attr.raws.unquoted is deprecated. Call attr.value instead."), - set: deprecate(function () { - return _this.value; - }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.") - }); - _this._constructed = true; - return _this; - } - - /** - * Returns the Attribute's value quoted such that it would be legal to use - * in the value of a css file. The original value's quotation setting - * used for stringification is left unchanged. See `setValue(value, options)` - * if you want to control the quote settings of a new value for the attribute. - * - * You can also change the quotation used for the current value by setting quoteMark. - * - * Options: - * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this - * option is not set, the original value for quoteMark will be used. If - * indeterminate, a double quote is used. The legal values are: - * * `null` - the value will be unquoted and characters will be escaped as necessary. - * * `'` - the value will be quoted with a single quote and single quotes are escaped. - * * `"` - the value will be quoted with a double quote and double quotes are escaped. - * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark - * over the quoteMark option value. - * * smart {boolean} - if true, will select a quote mark based on the value - * and the other options specified here. See the `smartQuoteMark()` - * method. - **/ - var _proto = Attribute.prototype; - _proto.getQuotedValue = function getQuotedValue(options) { - if (options === void 0) { - options = {}; - } - var quoteMark = this._determineQuoteMark(options); - var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark]; - var escaped = (0, _cssesc["default"])(this._value, cssescopts); - return escaped; - }; - _proto._determineQuoteMark = function _determineQuoteMark(options) { - return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); - } - - /** - * Set the unescaped value with the specified quotation options. The value - * provided must not include any wrapping quote marks -- those quotes will - * be interpreted as part of the value and escaped accordingly. - */; - _proto.setValue = function setValue(value, options) { - if (options === void 0) { - options = {}; - } - this._value = value; - this._quoteMark = this._determineQuoteMark(options); - this._syncRawValue(); - } - - /** - * Intelligently select a quoteMark value based on the value's contents. If - * the value is a legal CSS ident, it will not be quoted. Otherwise a quote - * mark will be picked that minimizes the number of escapes. - * - * If there's no clear winner, the quote mark from these options is used, - * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is - * true). If the quoteMark is unspecified, a double quote is used. - * - * @param options This takes the quoteMark and preferCurrentQuoteMark options - * from the quoteValue method. - */; - _proto.smartQuoteMark = function smartQuoteMark(options) { - var v = this.value; - var numSingleQuotes = v.replace(/[^']/g, '').length; - var numDoubleQuotes = v.replace(/[^"]/g, '').length; - if (numSingleQuotes + numDoubleQuotes === 0) { - var escaped = (0, _cssesc["default"])(v, { - isIdentifier: true - }); - if (escaped === v) { - return Attribute.NO_QUOTE; - } else { - var pref = this.preferredQuoteMark(options); - if (pref === Attribute.NO_QUOTE) { - // pick a quote mark that isn't none and see if it's smaller - var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE; - var opts = CSSESC_QUOTE_OPTIONS[quote]; - var quoteValue = (0, _cssesc["default"])(v, opts); - if (quoteValue.length < escaped.length) { - return quote; - } - } - return pref; - } - } else if (numDoubleQuotes === numSingleQuotes) { - return this.preferredQuoteMark(options); - } else if (numDoubleQuotes < numSingleQuotes) { - return Attribute.DOUBLE_QUOTE; - } else { - return Attribute.SINGLE_QUOTE; - } - } - - /** - * Selects the preferred quote mark based on the options and the current quote mark value. - * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` - * instead. - */; - _proto.preferredQuoteMark = function preferredQuoteMark(options) { - var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; - if (quoteMark === undefined) { - quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; - } - if (quoteMark === undefined) { - quoteMark = Attribute.DOUBLE_QUOTE; - } - return quoteMark; - }; - _proto._syncRawValue = function _syncRawValue() { - var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); - if (rawValue === this._value) { - if (this.raws) { - delete this.raws.value; - } - } else { - this.raws.value = rawValue; - } - }; - _proto._handleEscapes = function _handleEscapes(prop, value) { - if (this._constructed) { - var escaped = (0, _cssesc["default"])(value, { - isIdentifier: true - }); - if (escaped !== value) { - this.raws[prop] = escaped; - } else { - delete this.raws[prop]; - } - } - }; - _proto._spacesFor = function _spacesFor(name) { - var attrSpaces = { - before: '', - after: '' - }; - var spaces = this.spaces[name] || {}; - var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; - return Object.assign(attrSpaces, spaces, rawSpaces); - }; - _proto._stringFor = function _stringFor(name, spaceName, concat) { - if (spaceName === void 0) { - spaceName = name; - } - if (concat === void 0) { - concat = defaultAttrConcat; - } - var attrSpaces = this._spacesFor(spaceName); - return concat(this.stringifyProperty(name), attrSpaces); - } - - /** - * returns the offset of the attribute part specified relative to the - * start of the node of the output string. - * - * * "ns" - alias for "namespace" - * * "namespace" - the namespace if it exists. - * * "attribute" - the attribute name - * * "attributeNS" - the start of the attribute or its namespace - * * "operator" - the match operator of the attribute - * * "value" - The value (string or identifier) - * * "insensitive" - the case insensitivity flag; - * @param part One of the possible values inside an attribute. - * @returns -1 if the name is invalid or the value doesn't exist in this attribute. - */; - _proto.offsetOf = function offsetOf(name) { - var count = 1; - var attributeSpaces = this._spacesFor("attribute"); - count += attributeSpaces.before.length; - if (name === "namespace" || name === "ns") { - return this.namespace ? count : -1; - } - if (name === "attributeNS") { - return count; - } - count += this.namespaceString.length; - if (this.namespace) { - count += 1; - } - if (name === "attribute") { - return count; - } - count += this.stringifyProperty("attribute").length; - count += attributeSpaces.after.length; - var operatorSpaces = this._spacesFor("operator"); - count += operatorSpaces.before.length; - var operator = this.stringifyProperty("operator"); - if (name === "operator") { - return operator ? count : -1; - } - count += operator.length; - count += operatorSpaces.after.length; - var valueSpaces = this._spacesFor("value"); - count += valueSpaces.before.length; - var value = this.stringifyProperty("value"); - if (name === "value") { - return value ? count : -1; - } - count += value.length; - count += valueSpaces.after.length; - var insensitiveSpaces = this._spacesFor("insensitive"); - count += insensitiveSpaces.before.length; - if (name === "insensitive") { - return this.insensitive ? count : -1; - } - return -1; - }; - _proto.toString = function toString() { - var _this2 = this; - var selector = [this.rawSpaceBefore, '[']; - selector.push(this._stringFor('qualifiedAttribute', 'attribute')); - if (this.operator && (this.value || this.value === '')) { - selector.push(this._stringFor('operator')); - selector.push(this._stringFor('value')); - selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) { - if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) { - attrSpaces.before = " "; - } - return defaultAttrConcat(attrValue, attrSpaces); - })); - } - selector.push(']'); - selector.push(this.rawSpaceAfter); - return selector.join(''); - }; - _createClass(Attribute, [{ - key: "quoted", - get: function get() { - var qm = this.quoteMark; - return qm === "'" || qm === '"'; - }, - set: function set(value) { - warnOfDeprecatedQuotedAssignment(); - } - - /** - * returns a single (`'`) or double (`"`) quote character if the value is quoted. - * returns `null` if the value is not quoted. - * returns `undefined` if the quotation state is unknown (this can happen when - * the attribute is constructed without specifying a quote mark.) - */ - }, { - key: "quoteMark", - get: function get() { - return this._quoteMark; - } - - /** - * Set the quote mark to be used by this attribute's value. - * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute - * value is updated accordingly. - * - * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted. - */, - set: function set(quoteMark) { - if (!this._constructed) { - this._quoteMark = quoteMark; - return; - } - if (this._quoteMark !== quoteMark) { - this._quoteMark = quoteMark; - this._syncRawValue(); - } - } - }, { - key: "qualifiedAttribute", - get: function get() { - return this.qualifiedName(this.raws.attribute || this.attribute); - } - }, { - key: "insensitiveFlag", - get: function get() { - return this.insensitive ? 'i' : ''; - } - }, { - key: "value", - get: function get() { - return this._value; - }, - set: - /** - * Before 3.0, the value had to be set to an escaped value including any wrapped - * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value - * is unescaped during parsing and any quote marks are removed. - * - * Because the ambiguity of this semantic change, if you set `attr.value = newValue`, - * a deprecation warning is raised when the new value contains any characters that would - * require escaping (including if it contains wrapped quotes). - * - * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe - * how the new value is quoted. - */ - function set(v) { - if (this._constructed) { - var _unescapeValue2 = unescapeValue(v), - deprecatedUsage = _unescapeValue2.deprecatedUsage, - unescaped = _unescapeValue2.unescaped, - quoteMark = _unescapeValue2.quoteMark; - if (deprecatedUsage) { - warnOfDeprecatedValueAssignment(); - } - if (unescaped === this._value && quoteMark === this._quoteMark) { - return; - } - this._value = unescaped; - this._quoteMark = quoteMark; - this._syncRawValue(); - } else { - this._value = v; - } - } - }, { - key: "insensitive", - get: function get() { - return this._insensitive; - } - - /** - * Set the case insensitive flag. - * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag` - * of the attribute is updated accordingly. - * - * @param {true | false} insensitive true if the attribute should match case-insensitively. - */, - set: function set(insensitive) { - if (!insensitive) { - this._insensitive = false; - - // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation. - // When setting `attr.insensitive = false` both should be erased to ensure correct serialization. - if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) { - this.raws.insensitiveFlag = undefined; - } - } - this._insensitive = insensitive; - } - }, { - key: "attribute", - get: function get() { - return this._attribute; - }, - set: function set(name) { - this._handleEscapes("attribute", name); - this._attribute = name; - } - }]); - return Attribute; - }(_namespace["default"]); - exports["default"] = Attribute; - Attribute.NO_QUOTE = null; - Attribute.SINGLE_QUOTE = "'"; - Attribute.DOUBLE_QUOTE = '"'; - var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { - "'": { - quotes: 'single', - wrap: true - }, - '"': { - quotes: 'double', - wrap: true - } - }, _CSSESC_QUOTE_OPTIONS[null] = { - isIdentifier: true - }, _CSSESC_QUOTE_OPTIONS); - function defaultAttrConcat(attrValue, attrSpaces) { - return "" + attrSpaces.before + attrValue + attrSpaces.after; - } - } (attribute)); - return attribute; -} - -var universal = {exports: {}}; - -var hasRequiredUniversal; - -function requireUniversal () { - if (hasRequiredUniversal) return universal.exports; - hasRequiredUniversal = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Universal = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Universal, _Namespace); - function Universal(opts) { - var _this; - _this = _Namespace.call(this, opts) || this; - _this.type = _types.UNIVERSAL; - _this.value = '*'; - return _this; - } - return Universal; - }(_namespace["default"]); - exports["default"] = Universal; - module.exports = exports.default; - } (universal, universal.exports)); - return universal.exports; -} - -var combinator = {exports: {}}; - -var hasRequiredCombinator; - -function requireCombinator () { - if (hasRequiredCombinator) return combinator.exports; - hasRequiredCombinator = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Combinator = /*#__PURE__*/function (_Node) { - _inheritsLoose(Combinator, _Node); - function Combinator(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.COMBINATOR; - return _this; - } - return Combinator; - }(_node["default"]); - exports["default"] = Combinator; - module.exports = exports.default; - } (combinator, combinator.exports)); - return combinator.exports; -} - -var nesting = {exports: {}}; - -var hasRequiredNesting; - -function requireNesting () { - if (hasRequiredNesting) return nesting.exports; - hasRequiredNesting = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Nesting = /*#__PURE__*/function (_Node) { - _inheritsLoose(Nesting, _Node); - function Nesting(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.NESTING; - _this.value = '&'; - return _this; - } - return Nesting; - }(_node["default"]); - exports["default"] = Nesting; - module.exports = exports.default; - } (nesting, nesting.exports)); - return nesting.exports; -} - -var sortAscending = {exports: {}}; - -var hasRequiredSortAscending; - -function requireSortAscending () { - if (hasRequiredSortAscending) return sortAscending.exports; - hasRequiredSortAscending = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = sortAscending; - function sortAscending(list) { - return list.sort(function (a, b) { - return a - b; - }); - } - module.exports = exports.default; - } (sortAscending, sortAscending.exports)); - return sortAscending.exports; -} - -var tokenize = {}; - -var tokenTypes = {}; - -var hasRequiredTokenTypes; - -function requireTokenTypes () { - if (hasRequiredTokenTypes) return tokenTypes; - hasRequiredTokenTypes = 1; - - tokenTypes.__esModule = true; - tokenTypes.word = tokenTypes.tilde = tokenTypes.tab = tokenTypes.str = tokenTypes.space = tokenTypes.slash = tokenTypes.singleQuote = tokenTypes.semicolon = tokenTypes.plus = tokenTypes.pipe = tokenTypes.openSquare = tokenTypes.openParenthesis = tokenTypes.newline = tokenTypes.greaterThan = tokenTypes.feed = tokenTypes.equals = tokenTypes.doubleQuote = tokenTypes.dollar = tokenTypes.cr = tokenTypes.comment = tokenTypes.comma = tokenTypes.combinator = tokenTypes.colon = tokenTypes.closeSquare = tokenTypes.closeParenthesis = tokenTypes.caret = tokenTypes.bang = tokenTypes.backslash = tokenTypes.at = tokenTypes.asterisk = tokenTypes.ampersand = void 0; - var ampersand = 38; // `&`.charCodeAt(0); - tokenTypes.ampersand = ampersand; - var asterisk = 42; // `*`.charCodeAt(0); - tokenTypes.asterisk = asterisk; - var at = 64; // `@`.charCodeAt(0); - tokenTypes.at = at; - var comma = 44; // `,`.charCodeAt(0); - tokenTypes.comma = comma; - var colon = 58; // `:`.charCodeAt(0); - tokenTypes.colon = colon; - var semicolon = 59; // `;`.charCodeAt(0); - tokenTypes.semicolon = semicolon; - var openParenthesis = 40; // `(`.charCodeAt(0); - tokenTypes.openParenthesis = openParenthesis; - var closeParenthesis = 41; // `)`.charCodeAt(0); - tokenTypes.closeParenthesis = closeParenthesis; - var openSquare = 91; // `[`.charCodeAt(0); - tokenTypes.openSquare = openSquare; - var closeSquare = 93; // `]`.charCodeAt(0); - tokenTypes.closeSquare = closeSquare; - var dollar = 36; // `$`.charCodeAt(0); - tokenTypes.dollar = dollar; - var tilde = 126; // `~`.charCodeAt(0); - tokenTypes.tilde = tilde; - var caret = 94; // `^`.charCodeAt(0); - tokenTypes.caret = caret; - var plus = 43; // `+`.charCodeAt(0); - tokenTypes.plus = plus; - var equals = 61; // `=`.charCodeAt(0); - tokenTypes.equals = equals; - var pipe = 124; // `|`.charCodeAt(0); - tokenTypes.pipe = pipe; - var greaterThan = 62; // `>`.charCodeAt(0); - tokenTypes.greaterThan = greaterThan; - var space = 32; // ` `.charCodeAt(0); - tokenTypes.space = space; - var singleQuote = 39; // `'`.charCodeAt(0); - tokenTypes.singleQuote = singleQuote; - var doubleQuote = 34; // `"`.charCodeAt(0); - tokenTypes.doubleQuote = doubleQuote; - var slash = 47; // `/`.charCodeAt(0); - tokenTypes.slash = slash; - var bang = 33; // `!`.charCodeAt(0); - tokenTypes.bang = bang; - var backslash = 92; // '\\'.charCodeAt(0); - tokenTypes.backslash = backslash; - var cr = 13; // '\r'.charCodeAt(0); - tokenTypes.cr = cr; - var feed = 12; // '\f'.charCodeAt(0); - tokenTypes.feed = feed; - var newline = 10; // '\n'.charCodeAt(0); - tokenTypes.newline = newline; - var tab = 9; // '\t'.charCodeAt(0); - - // Expose aliases primarily for readability. - tokenTypes.tab = tab; - var str = singleQuote; - - // No good single character representation! - tokenTypes.str = str; - var comment = -1; - tokenTypes.comment = comment; - var word = -2; - tokenTypes.word = word; - var combinator = -3; - tokenTypes.combinator = combinator; - return tokenTypes; -} - -var hasRequiredTokenize; - -function requireTokenize () { - if (hasRequiredTokenize) return tokenize; - hasRequiredTokenize = 1; - (function (exports) { - - exports.__esModule = true; - exports.FIELDS = void 0; - exports["default"] = tokenize; - var t = _interopRequireWildcard(/*@__PURE__*/ requireTokenTypes()); - var _unescapable, _wordDelimiters; - function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); - var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); - var hex = {}; - var hexChars = "0123456789abcdefABCDEF"; - for (var i = 0; i < hexChars.length; i++) { - hex[hexChars.charCodeAt(i)] = true; - } - - /** - * Returns the last index of the bar css word - * @param {string} css The string in which the word begins - * @param {number} start The index into the string where word's first letter occurs - */ - function consumeWord(css, start) { - var next = start; - var code; - do { - code = css.charCodeAt(next); - if (wordDelimiters[code]) { - return next - 1; - } else if (code === t.backslash) { - next = consumeEscape(css, next) + 1; - } else { - // All other characters are part of the word - next++; - } - } while (next < css.length); - return next - 1; - } - - /** - * Returns the last index of the escape sequence - * @param {string} css The string in which the sequence begins - * @param {number} start The index into the string where escape character (`\`) occurs. - */ - function consumeEscape(css, start) { - var next = start; - var code = css.charCodeAt(next + 1); - if (unescapable[code]) ; else if (hex[code]) { - var hexDigits = 0; - // consume up to 6 hex chars - do { - next++; - hexDigits++; - code = css.charCodeAt(next + 1); - } while (hex[code] && hexDigits < 6); - // if fewer than 6 hex chars, a trailing space ends the escape - if (hexDigits < 6 && code === t.space) { - next++; - } - } else { - // the next char is part of the current word - next++; - } - return next; - } - var FIELDS = { - TYPE: 0, - START_LINE: 1, - START_COL: 2, - END_LINE: 3, - END_COL: 4, - START_POS: 5, - END_POS: 6 - }; - exports.FIELDS = FIELDS; - function tokenize(input) { - var tokens = []; - var css = input.css.valueOf(); - var _css = css, - length = _css.length; - var offset = -1; - var line = 1; - var start = 0; - var end = 0; - var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; - function unclosed(what, fix) { - if (input.safe) { - // fyi: this is never set to true. - css += fix; - next = css.length - 1; - } else { - throw input.error('Unclosed ' + what, line, start - offset, start); - } - } - while (start < length) { - code = css.charCodeAt(start); - if (code === t.newline) { - offset = start; - line += 1; - } - switch (code) { - case t.space: - case t.tab: - case t.newline: - case t.cr: - case t.feed: - next = start; - do { - next += 1; - code = css.charCodeAt(next); - if (code === t.newline) { - offset = next; - line += 1; - } - } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); - tokenType = t.space; - endLine = line; - endColumn = next - offset - 1; - end = next; - break; - case t.plus: - case t.greaterThan: - case t.tilde: - case t.pipe: - next = start; - do { - next += 1; - code = css.charCodeAt(next); - } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); - tokenType = t.combinator; - endLine = line; - endColumn = start - offset; - end = next; - break; - - // Consume these characters as single tokens. - case t.asterisk: - case t.ampersand: - case t.bang: - case t.comma: - case t.equals: - case t.dollar: - case t.caret: - case t.openSquare: - case t.closeSquare: - case t.colon: - case t.semicolon: - case t.openParenthesis: - case t.closeParenthesis: - next = start; - tokenType = code; - endLine = line; - endColumn = start - offset; - end = next + 1; - break; - case t.singleQuote: - case t.doubleQuote: - quote = code === t.singleQuote ? "'" : '"'; - next = start; - do { - escaped = false; - next = css.indexOf(quote, next + 1); - if (next === -1) { - unclosed('quote', quote); - } - escapePos = next; - while (css.charCodeAt(escapePos - 1) === t.backslash) { - escapePos -= 1; - escaped = !escaped; - } - } while (escaped); - tokenType = t.str; - endLine = line; - endColumn = start - offset; - end = next + 1; - break; - default: - if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { - next = css.indexOf('*/', start + 2) + 1; - if (next === 0) { - unclosed('comment', '*/'); - } - content = css.slice(start, next + 1); - lines = content.split('\n'); - last = lines.length - 1; - if (last > 0) { - nextLine = line + last; - nextOffset = next - lines[last].length; - } else { - nextLine = line; - nextOffset = offset; - } - tokenType = t.comment; - line = nextLine; - endLine = nextLine; - endColumn = next - nextOffset; - } else if (code === t.slash) { - next = start; - tokenType = code; - endLine = line; - endColumn = start - offset; - end = next + 1; - } else { - next = consumeWord(css, start); - tokenType = t.word; - endLine = line; - endColumn = next - offset; - } - end = next + 1; - break; - } - - // Ensure that the token structure remains consistent - tokens.push([tokenType, - // [0] Token type - line, - // [1] Starting line - start - offset, - // [2] Starting column - endLine, - // [3] Ending line - endColumn, - // [4] Ending column - start, - // [5] Start position / Source index - end // [6] End position - ]); - - // Reset offset for the next token - if (nextOffset) { - offset = nextOffset; - nextOffset = null; - } - start = end; - } - return tokens; - } - } (tokenize)); - return tokenize; -} - -var hasRequiredParser; - -function requireParser () { - if (hasRequiredParser) return parser.exports; - hasRequiredParser = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _root = _interopRequireDefault(/*@__PURE__*/ requireRoot()); - var _selector = _interopRequireDefault(/*@__PURE__*/ requireSelector()); - var _className = _interopRequireDefault(/*@__PURE__*/ requireClassName()); - var _comment = _interopRequireDefault(/*@__PURE__*/ requireComment()); - var _id = _interopRequireDefault(/*@__PURE__*/ requireId()); - var _tag = _interopRequireDefault(/*@__PURE__*/ requireTag()); - var _string = _interopRequireDefault(/*@__PURE__*/ requireString()); - var _pseudo = _interopRequireDefault(/*@__PURE__*/ requirePseudo()); - var _attribute = _interopRequireWildcard(/*@__PURE__*/ requireAttribute()); - var _universal = _interopRequireDefault(/*@__PURE__*/ requireUniversal()); - var _combinator = _interopRequireDefault(/*@__PURE__*/ requireCombinator()); - var _nesting = _interopRequireDefault(/*@__PURE__*/ requireNesting()); - var _sortAscending = _interopRequireDefault(/*@__PURE__*/ requireSortAscending()); - var _tokenize = _interopRequireWildcard(/*@__PURE__*/ requireTokenize()); - var tokens = _interopRequireWildcard(/*@__PURE__*/ requireTokenTypes()); - var types = _interopRequireWildcard(/*@__PURE__*/ requireTypes()); - var _util = /*@__PURE__*/ requireUtil(); - var _WHITESPACE_TOKENS, _Object$assign; - function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); - var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); - function tokenStart(token) { - return { - line: token[_tokenize.FIELDS.START_LINE], - column: token[_tokenize.FIELDS.START_COL] - }; - } - function tokenEnd(token) { - return { - line: token[_tokenize.FIELDS.END_LINE], - column: token[_tokenize.FIELDS.END_COL] - }; - } - function getSource(startLine, startColumn, endLine, endColumn) { - return { - start: { - line: startLine, - column: startColumn - }, - end: { - line: endLine, - column: endColumn - } - }; - } - function getTokenSource(token) { - return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); - } - function getTokenSourceSpan(startToken, endToken) { - if (!startToken) { - return undefined; - } - return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); - } - function unescapeProp(node, prop) { - var value = node[prop]; - if (typeof value !== "string") { - return; - } - if (value.indexOf("\\") !== -1) { - (0, _util.ensureObject)(node, 'raws'); - node[prop] = (0, _util.unesc)(value); - if (node.raws[prop] === undefined) { - node.raws[prop] = value; - } - } - return node; - } - function indexesOf(array, item) { - var i = -1; - var indexes = []; - while ((i = array.indexOf(item, i + 1)) !== -1) { - indexes.push(i); - } - return indexes; - } - function uniqs() { - var list = Array.prototype.concat.apply([], arguments); - return list.filter(function (item, i) { - return i === list.indexOf(item); - }); - } - var Parser = /*#__PURE__*/function () { - function Parser(rule, options) { - if (options === void 0) { - options = {}; - } - this.rule = rule; - this.options = Object.assign({ - lossy: false, - safe: false - }, options); - this.position = 0; - this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector; - this.tokens = (0, _tokenize["default"])({ - css: this.css, - error: this._errorGenerator(), - safe: this.options.safe - }); - var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]); - this.root = new _root["default"]({ - source: rootSource - }); - this.root.errorGenerator = this._errorGenerator(); - var selector = new _selector["default"]({ - source: { - start: { - line: 1, - column: 1 - } - }, - sourceIndex: 0 - }); - this.root.append(selector); - this.current = selector; - this.loop(); - } - var _proto = Parser.prototype; - _proto._errorGenerator = function _errorGenerator() { - var _this = this; - return function (message, errorOptions) { - if (typeof _this.rule === 'string') { - return new Error(message); - } - return _this.rule.error(message, errorOptions); - }; - }; - _proto.attribute = function attribute() { - var attr = []; - var startingToken = this.currToken; - this.position++; - while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { - attr.push(this.currToken); - this.position++; - } - if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { - return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]); - } - var len = attr.length; - var node = { - source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), - sourceIndex: startingToken[_tokenize.FIELDS.START_POS] - }; - if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) { - return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]); - } - var pos = 0; - var spaceBefore = ''; - var commentBefore = ''; - var lastAdded = null; - var spaceAfterMeaningfulToken = false; - while (pos < len) { - var token = attr[pos]; - var content = this.content(token); - var next = attr[pos + 1]; - switch (token[_tokenize.FIELDS.TYPE]) { - case tokens.space: - // if ( - // len === 1 || - // pos === 0 && this.content(next) === '|' - // ) { - // return this.expected('attribute', token[TOKEN.START_POS], content); - // } - spaceAfterMeaningfulToken = true; - if (this.options.lossy) { - break; - } - if (lastAdded) { - (0, _util.ensureObject)(node, 'spaces', lastAdded); - var prevContent = node.spaces[lastAdded].after || ''; - node.spaces[lastAdded].after = prevContent + content; - var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null; - if (existingComment) { - node.raws.spaces[lastAdded].after = existingComment + content; - } - } else { - spaceBefore = spaceBefore + content; - commentBefore = commentBefore + content; - } - break; - case tokens.asterisk: - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) { - if (spaceBefore) { - (0, _util.ensureObject)(node, 'spaces', 'attribute'); - node.spaces.attribute.before = spaceBefore; - spaceBefore = ''; - } - if (commentBefore) { - (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); - node.raws.spaces.attribute.before = spaceBefore; - commentBefore = ''; - } - node.namespace = (node.namespace || "") + content; - var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null; - if (rawValue) { - node.raws.namespace += content; - } - lastAdded = 'namespace'; - } - spaceAfterMeaningfulToken = false; - break; - case tokens.dollar: - if (lastAdded === "value") { - var oldRawValue = (0, _util.getProp)(node, 'raws', 'value'); - node.value += "$"; - if (oldRawValue) { - node.raws.value = oldRawValue + "$"; - } - break; - } - // Falls through - case tokens.caret: - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } - spaceAfterMeaningfulToken = false; - break; - case tokens.combinator: - if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } - if (content !== '|') { - spaceAfterMeaningfulToken = false; - break; - } - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } else if (!node.namespace && !node.attribute) { - node.namespace = true; - } - spaceAfterMeaningfulToken = false; - break; - case tokens.word: - if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && - // this look-ahead probably fails with comment nodes involved. - !node.operator && !node.namespace) { - node.namespace = content; - lastAdded = 'namespace'; - } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) { - if (spaceBefore) { - (0, _util.ensureObject)(node, 'spaces', 'attribute'); - node.spaces.attribute.before = spaceBefore; - spaceBefore = ''; - } - if (commentBefore) { - (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); - node.raws.spaces.attribute.before = commentBefore; - commentBefore = ''; - } - node.attribute = (node.attribute || "") + content; - var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null; - if (_rawValue) { - node.raws.attribute += content; - } - lastAdded = 'attribute'; - } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) { - var _unescaped = (0, _util.unesc)(content); - var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || ''; - var oldValue = node.value || ''; - node.value = oldValue + _unescaped; - node.quoteMark = null; - if (_unescaped !== content || _oldRawValue) { - (0, _util.ensureObject)(node, 'raws'); - node.raws.value = (_oldRawValue || oldValue) + content; - } - lastAdded = 'value'; - } else { - var insensitive = content === 'i' || content === "I"; - if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) { - node.insensitive = insensitive; - if (!insensitive || content === "I") { - (0, _util.ensureObject)(node, 'raws'); - node.raws.insensitiveFlag = content; - } - lastAdded = 'insensitive'; - if (spaceBefore) { - (0, _util.ensureObject)(node, 'spaces', 'insensitive'); - node.spaces.insensitive.before = spaceBefore; - spaceBefore = ''; - } - if (commentBefore) { - (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive'); - node.raws.spaces.insensitive.before = commentBefore; - commentBefore = ''; - } - } else if (node.value || node.value === '') { - lastAdded = 'value'; - node.value += content; - if (node.raws.value) { - node.raws.value += content; - } - } - } - spaceAfterMeaningfulToken = false; - break; - case tokens.str: - if (!node.attribute || !node.operator) { - return this.error("Expected an attribute followed by an operator preceding the string.", { - index: token[_tokenize.FIELDS.START_POS] - }); - } - var _unescapeValue = (0, _attribute.unescapeValue)(content), - unescaped = _unescapeValue.unescaped, - quoteMark = _unescapeValue.quoteMark; - node.value = unescaped; - node.quoteMark = quoteMark; - lastAdded = 'value'; - (0, _util.ensureObject)(node, 'raws'); - node.raws.value = content; - spaceAfterMeaningfulToken = false; - break; - case tokens.equals: - if (!node.attribute) { - return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content); - } - if (node.value) { - return this.error('Unexpected "=" found; an operator was already defined.', { - index: token[_tokenize.FIELDS.START_POS] - }); - } - node.operator = node.operator ? node.operator + content : content; - lastAdded = 'operator'; - spaceAfterMeaningfulToken = false; - break; - case tokens.comment: - if (lastAdded) { - if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') { - var lastComment = (0, _util.getProp)(node, 'spaces', lastAdded, 'after') || ''; - var rawLastComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment; - (0, _util.ensureObject)(node, 'raws', 'spaces', lastAdded); - node.raws.spaces[lastAdded].after = rawLastComment + content; - } else { - var lastValue = node[lastAdded] || ''; - var rawLastValue = (0, _util.getProp)(node, 'raws', lastAdded) || lastValue; - (0, _util.ensureObject)(node, 'raws'); - node.raws[lastAdded] = rawLastValue + content; - } - } else { - commentBefore = commentBefore + content; - } - break; - default: - return this.error("Unexpected \"" + content + "\" found.", { - index: token[_tokenize.FIELDS.START_POS] - }); - } - pos++; - } - unescapeProp(node, "attribute"); - unescapeProp(node, "namespace"); - this.newNode(new _attribute["default"](node)); - this.position++; - } - - /** - * return a node containing meaningless garbage up to (but not including) the specified token position. - * if the token position is negative, all remaining tokens are consumed. - * - * This returns an array containing a single string node if all whitespace, - * otherwise an array of comment nodes with space before and after. - * - * These tokens are not added to the current selector, the caller can add them or use them to amend - * a previous node's space metadata. - * - * In lossy mode, this returns only comments. - */; - _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { - if (stopPosition < 0) { - stopPosition = this.tokens.length; - } - var startPosition = this.position; - var nodes = []; - var space = ""; - var lastComment = undefined; - do { - if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { - if (!this.options.lossy) { - space += this.content(); - } - } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { - var spaces = {}; - if (space) { - spaces.before = space; - space = ""; - } - lastComment = new _comment["default"]({ - value: this.content(), - source: getTokenSource(this.currToken), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], - spaces: spaces - }); - nodes.push(lastComment); - } - } while (++this.position < stopPosition); - if (space) { - if (lastComment) { - lastComment.spaces.after = space; - } else if (!this.options.lossy) { - var firstToken = this.tokens[startPosition]; - var lastToken = this.tokens[this.position - 1]; - nodes.push(new _string["default"]({ - value: '', - source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]), - sourceIndex: firstToken[_tokenize.FIELDS.START_POS], - spaces: { - before: space, - after: '' - } - })); - } - } - return nodes; - } - - /** - * - * @param {*} nodes - */; - _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { - var _this2 = this; - if (requiredSpace === void 0) { - requiredSpace = false; - } - var space = ""; - var rawSpace = ""; - nodes.forEach(function (n) { - var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); - var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); - space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); - rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); - }); - if (rawSpace === space) { - rawSpace = undefined; - } - var result = { - space: space, - rawSpace: rawSpace - }; - return result; - }; - _proto.isNamedCombinator = function isNamedCombinator(position) { - if (position === void 0) { - position = this.position; - } - return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; - }; - _proto.namedCombinator = function namedCombinator() { - if (this.isNamedCombinator()) { - var nameRaw = this.content(this.tokens[this.position + 1]); - var name = (0, _util.unesc)(nameRaw).toLowerCase(); - var raws = {}; - if (name !== nameRaw) { - raws.value = "/" + nameRaw + "/"; - } - var node = new _combinator["default"]({ - value: "/" + name + "/", - source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], - raws: raws - }); - this.position = this.position + 3; - return node; - } else { - this.unexpected(); - } - }; - _proto.combinator = function combinator() { - var _this3 = this; - if (this.content() === '|') { - return this.namespace(); - } - // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. - var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); - if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); - if (nodes.length > 0) { - var last = this.current.last; - if (last) { - var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), - space = _this$convertWhitespa.space, - rawSpace = _this$convertWhitespa.rawSpace; - if (rawSpace !== undefined) { - last.rawSpaceAfter += rawSpace; - } - last.spaces.after += space; - } else { - nodes.forEach(function (n) { - return _this3.newNode(n); - }); - } - } - return; - } - var firstToken = this.currToken; - var spaceOrDescendantSelectorNodes = undefined; - if (nextSigTokenPos > this.position) { - spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); - } - var node; - if (this.isNamedCombinator()) { - node = this.namedCombinator(); - } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { - node = new _combinator["default"]({ - value: this.content(), - source: getTokenSource(this.currToken), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] - }); - this.position++; - } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) ; else if (!spaceOrDescendantSelectorNodes) { - this.unexpected(); - } - if (node) { - if (spaceOrDescendantSelectorNodes) { - var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), - _space = _this$convertWhitespa2.space, - _rawSpace = _this$convertWhitespa2.rawSpace; - node.spaces.before = _space; - node.rawSpaceBefore = _rawSpace; - } - } else { - // descendant combinator - var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), - _space2 = _this$convertWhitespa3.space, - _rawSpace2 = _this$convertWhitespa3.rawSpace; - if (!_rawSpace2) { - _rawSpace2 = _space2; - } - var spaces = {}; - var raws = { - spaces: {} - }; - if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) { - spaces.before = _space2.slice(0, _space2.length - 1); - raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); - } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) { - spaces.after = _space2.slice(1); - raws.spaces.after = _rawSpace2.slice(1); - } else { - raws.value = _rawSpace2; - } - node = new _combinator["default"]({ - value: ' ', - source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), - sourceIndex: firstToken[_tokenize.FIELDS.START_POS], - spaces: spaces, - raws: raws - }); - } - if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { - node.spaces.after = this.optionalSpace(this.content()); - this.position++; - } - return this.newNode(node); - }; - _proto.comma = function comma() { - if (this.position === this.tokens.length - 1) { - this.root.trailingComma = true; - this.position++; - return; - } - this.current._inferEndPosition(); - var selector = new _selector["default"]({ - source: { - start: tokenStart(this.tokens[this.position + 1]) - }, - sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS] - }); - this.current.parent.append(selector); - this.current = selector; - this.position++; - }; - _proto.comment = function comment() { - var current = this.currToken; - this.newNode(new _comment["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - _proto.error = function error(message, opts) { - throw this.root.error(message, opts); - }; - _proto.missingBackslash = function missingBackslash() { - return this.error('Expected a backslash preceding the semicolon.', { - index: this.currToken[_tokenize.FIELDS.START_POS] - }); - }; - _proto.missingParenthesis = function missingParenthesis() { - return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.missingSquareBracket = function missingSquareBracket() { - return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.unexpected = function unexpected() { - return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.unexpectedPipe = function unexpectedPipe() { - return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.namespace = function namespace() { - var before = this.prevToken && this.content(this.prevToken) || true; - if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) { - this.position++; - return this.word(before); - } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) { - this.position++; - return this.universal(before); - } - this.unexpectedPipe(); - }; - _proto.nesting = function nesting() { - if (this.nextToken) { - var nextContent = this.content(this.nextToken); - if (nextContent === "|") { - this.position++; - return; - } - } - var current = this.currToken; - this.newNode(new _nesting["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - _proto.parentheses = function parentheses() { - var last = this.current.last; - var unbalanced = 1; - this.position++; - if (last && last.type === types.PSEUDO) { - var selector = new _selector["default"]({ - source: { - start: tokenStart(this.tokens[this.position]) - }, - sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS] - }); - var cache = this.current; - last.append(selector); - this.current = selector; - while (this.position < this.tokens.length && unbalanced) { - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - unbalanced++; - } - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - unbalanced--; - } - if (unbalanced) { - this.parse(); - } else { - this.current.source.end = tokenEnd(this.currToken); - this.current.parent.source.end = tokenEnd(this.currToken); - this.position++; - } - } - this.current = cache; - } else { - // I think this case should be an error. It's used to implement a basic parse of media queries - // but I don't think it's a good idea. - var parenStart = this.currToken; - var parenValue = "("; - var parenEnd; - while (this.position < this.tokens.length && unbalanced) { - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - unbalanced++; - } - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - unbalanced--; - } - parenEnd = this.currToken; - parenValue += this.parseParenthesisToken(this.currToken); - this.position++; - } - if (last) { - last.appendToPropertyAndEscape("value", parenValue, parenValue); - } else { - this.newNode(new _string["default"]({ - value: parenValue, - source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]), - sourceIndex: parenStart[_tokenize.FIELDS.START_POS] - })); - } - } - if (unbalanced) { - return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); - } - }; - _proto.pseudo = function pseudo() { - var _this4 = this; - var pseudoStr = ''; - var startingToken = this.currToken; - while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { - pseudoStr += this.content(); - this.position++; - } - if (!this.currToken) { - return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1); - } - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) { - this.splitWord(false, function (first, length) { - pseudoStr += first; - _this4.newNode(new _pseudo["default"]({ - value: pseudoStr, - source: getTokenSourceSpan(startingToken, _this4.currToken), - sourceIndex: startingToken[_tokenize.FIELDS.START_POS] - })); - if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - _this4.error('Misplaced parenthesis.', { - index: _this4.nextToken[_tokenize.FIELDS.START_POS] - }); - } - }); - } else { - return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]); - } - }; - _proto.space = function space() { - var content = this.content(); - // Handle space before and after the selector - if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) { - return node.type === 'comment'; - })) { - this.spaces = this.optionalSpace(content); - this.position++; - } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - this.current.last.spaces.after = this.optionalSpace(content); - this.position++; - } else { - this.combinator(); - } - }; - _proto.string = function string() { - var current = this.currToken; - this.newNode(new _string["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - _proto.universal = function universal(namespace) { - var nextToken = this.nextToken; - if (nextToken && this.content(nextToken) === '|') { - this.position++; - return this.namespace(); - } - var current = this.currToken; - this.newNode(new _universal["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - }), namespace); - this.position++; - }; - _proto.splitWord = function splitWord(namespace, firstCallback) { - var _this5 = this; - var nextToken = this.nextToken; - var word = this.content(); - while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { - this.position++; - var current = this.content(); - word += current; - if (current.lastIndexOf('\\') === current.length - 1) { - var next = this.nextToken; - if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { - word += this.requiredSpace(this.content(next)); - this.position++; - } - } - nextToken = this.nextToken; - } - var hasClass = indexesOf(word, '.').filter(function (i) { - // Allow escaped dot within class name - var escapedDot = word[i - 1] === '\\'; - // Allow decimal numbers percent in @keyframes - var isKeyframesPercent = /^\d+\.\d+%$/.test(word); - return !escapedDot && !isKeyframesPercent; - }); - var hasId = indexesOf(word, '#').filter(function (i) { - return word[i - 1] !== '\\'; - }); - // Eliminate Sass interpolations from the list of id indexes - var interpolations = indexesOf(word, '#{'); - if (interpolations.length) { - hasId = hasId.filter(function (hashIndex) { - return !~interpolations.indexOf(hashIndex); - }); - } - var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); - indices.forEach(function (ind, i) { - var index = indices[i + 1] || word.length; - var value = word.slice(ind, index); - if (i === 0 && firstCallback) { - return firstCallback.call(_this5, value, indices.length); - } - var node; - var current = _this5.currToken; - var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i]; - var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1)); - if (~hasClass.indexOf(ind)) { - var classNameOpts = { - value: value.slice(1), - source: source, - sourceIndex: sourceIndex - }; - node = new _className["default"](unescapeProp(classNameOpts, "value")); - } else if (~hasId.indexOf(ind)) { - var idOpts = { - value: value.slice(1), - source: source, - sourceIndex: sourceIndex - }; - node = new _id["default"](unescapeProp(idOpts, "value")); - } else { - var tagOpts = { - value: value, - source: source, - sourceIndex: sourceIndex - }; - unescapeProp(tagOpts, "value"); - node = new _tag["default"](tagOpts); - } - _this5.newNode(node, namespace); - // Ensure that the namespace is used only once - namespace = null; - }); - this.position++; - }; - _proto.word = function word(namespace) { - var nextToken = this.nextToken; - if (nextToken && this.content(nextToken) === '|') { - this.position++; - return this.namespace(); - } - return this.splitWord(namespace); - }; - _proto.loop = function loop() { - while (this.position < this.tokens.length) { - this.parse(true); - } - this.current._inferEndPosition(); - return this.root; - }; - _proto.parse = function parse(throwOnParenthesis) { - switch (this.currToken[_tokenize.FIELDS.TYPE]) { - case tokens.space: - this.space(); - break; - case tokens.comment: - this.comment(); - break; - case tokens.openParenthesis: - this.parentheses(); - break; - case tokens.closeParenthesis: - if (throwOnParenthesis) { - this.missingParenthesis(); - } - break; - case tokens.openSquare: - this.attribute(); - break; - case tokens.dollar: - case tokens.caret: - case tokens.equals: - case tokens.word: - this.word(); - break; - case tokens.colon: - this.pseudo(); - break; - case tokens.comma: - this.comma(); - break; - case tokens.asterisk: - this.universal(); - break; - case tokens.ampersand: - this.nesting(); - break; - case tokens.slash: - case tokens.combinator: - this.combinator(); - break; - case tokens.str: - this.string(); - break; - // These cases throw; no break needed. - case tokens.closeSquare: - this.missingSquareBracket(); - case tokens.semicolon: - this.missingBackslash(); - default: - this.unexpected(); - } - } - - /** - * Helpers - */; - _proto.expected = function expected(description, index, found) { - if (Array.isArray(description)) { - var last = description.pop(); - description = description.join(', ') + " or " + last; - } - var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a'; - if (!found) { - return this.error("Expected " + an + " " + description + ".", { - index: index - }); - } - return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { - index: index - }); - }; - _proto.requiredSpace = function requiredSpace(space) { - return this.options.lossy ? ' ' : space; - }; - _proto.optionalSpace = function optionalSpace(space) { - return this.options.lossy ? '' : space; - }; - _proto.lossySpace = function lossySpace(space, required) { - if (this.options.lossy) { - return required ? ' ' : ''; - } else { - return space; - } - }; - _proto.parseParenthesisToken = function parseParenthesisToken(token) { - var content = this.content(token); - if (token[_tokenize.FIELDS.TYPE] === tokens.space) { - return this.requiredSpace(content); - } else { - return content; - } - }; - _proto.newNode = function newNode(node, namespace) { - if (namespace) { - if (/^ +$/.test(namespace)) { - if (!this.options.lossy) { - this.spaces = (this.spaces || '') + namespace; - } - namespace = true; - } - node.namespace = namespace; - unescapeProp(node, "namespace"); - } - if (this.spaces) { - node.spaces.before = this.spaces; - this.spaces = ''; - } - return this.current.append(node); - }; - _proto.content = function content(token) { - if (token === void 0) { - token = this.currToken; - } - return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); - }; - /** - * returns the index of the next non-whitespace, non-comment token. - * returns -1 if no meaningful token is found. - */ - _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) { - if (startPosition === void 0) { - startPosition = this.position + 1; - } - var searchPosition = startPosition; - while (searchPosition < this.tokens.length) { - if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { - searchPosition++; - continue; - } else { - return searchPosition; - } - } - return -1; - }; - _createClass(Parser, [{ - key: "currToken", - get: function get() { - return this.tokens[this.position]; - } - }, { - key: "nextToken", - get: function get() { - return this.tokens[this.position + 1]; - } - }, { - key: "prevToken", - get: function get() { - return this.tokens[this.position - 1]; - } - }]); - return Parser; - }(); - exports["default"] = Parser; - module.exports = exports.default; - } (parser, parser.exports)); - return parser.exports; -} - -var hasRequiredProcessor; - -function requireProcessor () { - if (hasRequiredProcessor) return processor.exports; - hasRequiredProcessor = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _parser = _interopRequireDefault(/*@__PURE__*/ requireParser()); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - var Processor = /*#__PURE__*/function () { - function Processor(func, options) { - this.func = func || function noop() {}; - this.funcRes = null; - this.options = options; - } - var _proto = Processor.prototype; - _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { - if (options === void 0) { - options = {}; - } - var merged = Object.assign({}, this.options, options); - if (merged.updateSelector === false) { - return false; - } else { - return typeof rule !== "string"; - } - }; - _proto._isLossy = function _isLossy(options) { - if (options === void 0) { - options = {}; - } - var merged = Object.assign({}, this.options, options); - if (merged.lossless === false) { - return true; - } else { - return false; - } - }; - _proto._root = function _root(rule, options) { - if (options === void 0) { - options = {}; - } - var parser = new _parser["default"](rule, this._parseOptions(options)); - return parser.root; - }; - _proto._parseOptions = function _parseOptions(options) { - return { - lossy: this._isLossy(options) - }; - }; - _proto._run = function _run(rule, options) { - var _this = this; - if (options === void 0) { - options = {}; - } - return new Promise(function (resolve, reject) { - try { - var root = _this._root(rule, options); - Promise.resolve(_this.func(root)).then(function (transform) { - var string = undefined; - if (_this._shouldUpdateSelector(rule, options)) { - string = root.toString(); - rule.selector = string; - } - return { - transform: transform, - root: root, - string: string - }; - }).then(resolve, reject); - } catch (e) { - reject(e); - return; - } - }); - }; - _proto._runSync = function _runSync(rule, options) { - if (options === void 0) { - options = {}; - } - var root = this._root(rule, options); - var transform = this.func(root); - if (transform && typeof transform.then === "function") { - throw new Error("Selector processor returned a promise to a synchronous call."); - } - var string = undefined; - if (options.updateSelector && typeof rule !== "string") { - string = root.toString(); - rule.selector = string; - } - return { - transform: transform, - root: root, - string: string - }; - } - - /** - * Process rule into a selector AST. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {Promise<parser.Root>} The AST of the selector after processing it. - */; - _proto.ast = function ast(rule, options) { - return this._run(rule, options).then(function (result) { - return result.root; - }); - } - - /** - * Process rule into a selector AST synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {parser.Root} The AST of the selector after processing it. - */; - _proto.astSync = function astSync(rule, options) { - return this._runSync(rule, options).root; - } - - /** - * Process a selector into a transformed value asynchronously - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {Promise<any>} The value returned by the processor. - */; - _proto.transform = function transform(rule, options) { - return this._run(rule, options).then(function (result) { - return result.transform; - }); - } - - /** - * Process a selector into a transformed value synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {any} The value returned by the processor. - */; - _proto.transformSync = function transformSync(rule, options) { - return this._runSync(rule, options).transform; - } - - /** - * Process a selector into a new selector string asynchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {string} the selector after processing. - */; - _proto.process = function process(rule, options) { - return this._run(rule, options).then(function (result) { - return result.string || result.root.toString(); - }); - } - - /** - * Process a selector into a new selector string synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {string} the selector after processing. - */; - _proto.processSync = function processSync(rule, options) { - var result = this._runSync(rule, options); - return result.string || result.root.toString(); - }; - return Processor; - }(); - exports["default"] = Processor; - module.exports = exports.default; - } (processor, processor.exports)); - return processor.exports; -} - -var selectors = {}; - -var constructors = {}; - -var hasRequiredConstructors; - -function requireConstructors () { - if (hasRequiredConstructors) return constructors; - hasRequiredConstructors = 1; - - constructors.__esModule = true; - constructors.universal = constructors.tag = constructors.string = constructors.selector = constructors.root = constructors.pseudo = constructors.nesting = constructors.id = constructors.comment = constructors.combinator = constructors.className = constructors.attribute = void 0; - var _attribute = _interopRequireDefault(/*@__PURE__*/ requireAttribute()); - var _className = _interopRequireDefault(/*@__PURE__*/ requireClassName()); - var _combinator = _interopRequireDefault(/*@__PURE__*/ requireCombinator()); - var _comment = _interopRequireDefault(/*@__PURE__*/ requireComment()); - var _id = _interopRequireDefault(/*@__PURE__*/ requireId()); - var _nesting = _interopRequireDefault(/*@__PURE__*/ requireNesting()); - var _pseudo = _interopRequireDefault(/*@__PURE__*/ requirePseudo()); - var _root = _interopRequireDefault(/*@__PURE__*/ requireRoot()); - var _selector = _interopRequireDefault(/*@__PURE__*/ requireSelector()); - var _string = _interopRequireDefault(/*@__PURE__*/ requireString()); - var _tag = _interopRequireDefault(/*@__PURE__*/ requireTag()); - var _universal = _interopRequireDefault(/*@__PURE__*/ requireUniversal()); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - var attribute = function attribute(opts) { - return new _attribute["default"](opts); - }; - constructors.attribute = attribute; - var className = function className(opts) { - return new _className["default"](opts); - }; - constructors.className = className; - var combinator = function combinator(opts) { - return new _combinator["default"](opts); - }; - constructors.combinator = combinator; - var comment = function comment(opts) { - return new _comment["default"](opts); - }; - constructors.comment = comment; - var id = function id(opts) { - return new _id["default"](opts); - }; - constructors.id = id; - var nesting = function nesting(opts) { - return new _nesting["default"](opts); - }; - constructors.nesting = nesting; - var pseudo = function pseudo(opts) { - return new _pseudo["default"](opts); - }; - constructors.pseudo = pseudo; - var root = function root(opts) { - return new _root["default"](opts); - }; - constructors.root = root; - var selector = function selector(opts) { - return new _selector["default"](opts); - }; - constructors.selector = selector; - var string = function string(opts) { - return new _string["default"](opts); - }; - constructors.string = string; - var tag = function tag(opts) { - return new _tag["default"](opts); - }; - constructors.tag = tag; - var universal = function universal(opts) { - return new _universal["default"](opts); - }; - constructors.universal = universal; - return constructors; -} - -var guards = {}; - -var hasRequiredGuards; - -function requireGuards () { - if (hasRequiredGuards) return guards; - hasRequiredGuards = 1; - - guards.__esModule = true; - guards.isComment = guards.isCombinator = guards.isClassName = guards.isAttribute = void 0; - guards.isContainer = isContainer; - guards.isIdentifier = void 0; - guards.isNamespace = isNamespace; - guards.isNesting = void 0; - guards.isNode = isNode; - guards.isPseudo = void 0; - guards.isPseudoClass = isPseudoClass; - guards.isPseudoElement = isPseudoElement; - guards.isUniversal = guards.isTag = guards.isString = guards.isSelector = guards.isRoot = void 0; - var _types = /*@__PURE__*/ requireTypes(); - var _IS_TYPE; - var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE); - function isNode(node) { - return typeof node === "object" && IS_TYPE[node.type]; - } - function isNodeType(type, node) { - return isNode(node) && node.type === type; - } - var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE); - guards.isAttribute = isAttribute; - var isClassName = isNodeType.bind(null, _types.CLASS); - guards.isClassName = isClassName; - var isCombinator = isNodeType.bind(null, _types.COMBINATOR); - guards.isCombinator = isCombinator; - var isComment = isNodeType.bind(null, _types.COMMENT); - guards.isComment = isComment; - var isIdentifier = isNodeType.bind(null, _types.ID); - guards.isIdentifier = isIdentifier; - var isNesting = isNodeType.bind(null, _types.NESTING); - guards.isNesting = isNesting; - var isPseudo = isNodeType.bind(null, _types.PSEUDO); - guards.isPseudo = isPseudo; - var isRoot = isNodeType.bind(null, _types.ROOT); - guards.isRoot = isRoot; - var isSelector = isNodeType.bind(null, _types.SELECTOR); - guards.isSelector = isSelector; - var isString = isNodeType.bind(null, _types.STRING); - guards.isString = isString; - var isTag = isNodeType.bind(null, _types.TAG); - guards.isTag = isTag; - var isUniversal = isNodeType.bind(null, _types.UNIVERSAL); - guards.isUniversal = isUniversal; - function isPseudoElement(node) { - return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line"); - } - function isPseudoClass(node) { - return isPseudo(node) && !isPseudoElement(node); - } - function isContainer(node) { - return !!(isNode(node) && node.walk); - } - function isNamespace(node) { - return isAttribute(node) || isTag(node); - } - return guards; -} - -var hasRequiredSelectors; - -function requireSelectors () { - if (hasRequiredSelectors) return selectors; - hasRequiredSelectors = 1; - (function (exports) { - - exports.__esModule = true; - var _types = /*@__PURE__*/ requireTypes(); - Object.keys(_types).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _types[key]) return; - exports[key] = _types[key]; - }); - var _constructors = /*@__PURE__*/ requireConstructors(); - Object.keys(_constructors).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _constructors[key]) return; - exports[key] = _constructors[key]; - }); - var _guards = /*@__PURE__*/ requireGuards(); - Object.keys(_guards).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _guards[key]) return; - exports[key] = _guards[key]; - }); - } (selectors)); - return selectors; -} - -var hasRequiredDist; - -function requireDist () { - if (hasRequiredDist) return dist.exports; - hasRequiredDist = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _processor = _interopRequireDefault(/*@__PURE__*/ requireProcessor()); - var selectors = _interopRequireWildcard(/*@__PURE__*/ requireSelectors()); - function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - var parser = function parser(processor) { - return new _processor["default"](processor); - }; - Object.assign(parser, selectors); - delete parser.__esModule; - var _default = parser; - exports["default"] = _default; - module.exports = exports.default; - } (dist, dist.exports)); - return dist.exports; -} - -var parse; -var hasRequiredParse; - -function requireParse () { - if (hasRequiredParse) return parse; - hasRequiredParse = 1; - var openParentheses = "(".charCodeAt(0); - var closeParentheses = ")".charCodeAt(0); - var singleQuote = "'".charCodeAt(0); - var doubleQuote = '"'.charCodeAt(0); - var backslash = "\\".charCodeAt(0); - var slash = "/".charCodeAt(0); - var comma = ",".charCodeAt(0); - var colon = ":".charCodeAt(0); - var star = "*".charCodeAt(0); - var uLower = "u".charCodeAt(0); - var uUpper = "U".charCodeAt(0); - var plus = "+".charCodeAt(0); - var isUnicodeRange = /^[a-f0-9?-]+$/i; - - parse = function(input) { - var tokens = []; - var value = input; - - var next, - quote, - prev, - token, - escape, - escapePos, - whitespacePos, - parenthesesOpenPos; - var pos = 0; - var code = value.charCodeAt(pos); - var max = value.length; - var stack = [{ nodes: tokens }]; - var balanced = 0; - var parent; - - var name = ""; - var before = ""; - var after = ""; - - while (pos < max) { - // Whitespaces - if (code <= 32) { - next = pos; - do { - next += 1; - code = value.charCodeAt(next); - } while (code <= 32); - token = value.slice(pos, next); - - prev = tokens[tokens.length - 1]; - if (code === closeParentheses && balanced) { - after = token; - } else if (prev && prev.type === "div") { - prev.after = token; - prev.sourceEndIndex += token.length; - } else if ( - code === comma || - code === colon || - (code === slash && - value.charCodeAt(next + 1) !== star && - (!parent || - (parent && parent.type === "function" && parent.value !== "calc"))) - ) { - before = token; - } else { - tokens.push({ - type: "space", - sourceIndex: pos, - sourceEndIndex: next, - value: token - }); - } - - pos = next; - - // Quotes - } else if (code === singleQuote || code === doubleQuote) { - next = pos; - quote = code === singleQuote ? "'" : '"'; - token = { - type: "string", - sourceIndex: pos, - quote: quote - }; - do { - escape = false; - next = value.indexOf(quote, next + 1); - if (~next) { - escapePos = next; - while (value.charCodeAt(escapePos - 1) === backslash) { - escapePos -= 1; - escape = !escape; - } - } else { - value += quote; - next = value.length - 1; - token.unclosed = true; - } - } while (escape); - token.value = value.slice(pos + 1, next); - token.sourceEndIndex = token.unclosed ? next : next + 1; - tokens.push(token); - pos = next + 1; - code = value.charCodeAt(pos); - - // Comments - } else if (code === slash && value.charCodeAt(pos + 1) === star) { - next = value.indexOf("*/", pos); - - token = { - type: "comment", - sourceIndex: pos, - sourceEndIndex: next + 2 - }; - - if (next === -1) { - token.unclosed = true; - next = value.length; - token.sourceEndIndex = next; - } - - token.value = value.slice(pos + 2, next); - tokens.push(token); - - pos = next + 2; - code = value.charCodeAt(pos); - - // Operation within calc - } else if ( - (code === slash || code === star) && - parent && - parent.type === "function" && - parent.value === "calc" - ) { - token = value[pos]; - tokens.push({ - type: "word", - sourceIndex: pos - before.length, - sourceEndIndex: pos + token.length, - value: token - }); - pos += 1; - code = value.charCodeAt(pos); - - // Dividers - } else if (code === slash || code === comma || code === colon) { - token = value[pos]; - - tokens.push({ - type: "div", - sourceIndex: pos - before.length, - sourceEndIndex: pos + token.length, - value: token, - before: before, - after: "" - }); - before = ""; - - pos += 1; - code = value.charCodeAt(pos); - - // Open parentheses - } else if (openParentheses === code) { - // Whitespaces after open parentheses - next = pos; - do { - next += 1; - code = value.charCodeAt(next); - } while (code <= 32); - parenthesesOpenPos = pos; - token = { - type: "function", - sourceIndex: pos - name.length, - value: name, - before: value.slice(parenthesesOpenPos + 1, next) - }; - pos = next; - - if (name === "url" && code !== singleQuote && code !== doubleQuote) { - next -= 1; - do { - escape = false; - next = value.indexOf(")", next + 1); - if (~next) { - escapePos = next; - while (value.charCodeAt(escapePos - 1) === backslash) { - escapePos -= 1; - escape = !escape; - } - } else { - value += ")"; - next = value.length - 1; - token.unclosed = true; - } - } while (escape); - // Whitespaces before closed - whitespacePos = next; - do { - whitespacePos -= 1; - code = value.charCodeAt(whitespacePos); - } while (code <= 32); - if (parenthesesOpenPos < whitespacePos) { - if (pos !== whitespacePos + 1) { - token.nodes = [ - { - type: "word", - sourceIndex: pos, - sourceEndIndex: whitespacePos + 1, - value: value.slice(pos, whitespacePos + 1) - } - ]; - } else { - token.nodes = []; - } - if (token.unclosed && whitespacePos + 1 !== next) { - token.after = ""; - token.nodes.push({ - type: "space", - sourceIndex: whitespacePos + 1, - sourceEndIndex: next, - value: value.slice(whitespacePos + 1, next) - }); - } else { - token.after = value.slice(whitespacePos + 1, next); - token.sourceEndIndex = next; - } - } else { - token.after = ""; - token.nodes = []; - } - pos = next + 1; - token.sourceEndIndex = token.unclosed ? next : pos; - code = value.charCodeAt(pos); - tokens.push(token); - } else { - balanced += 1; - token.after = ""; - token.sourceEndIndex = pos + 1; - tokens.push(token); - stack.push(token); - tokens = token.nodes = []; - parent = token; - } - name = ""; - - // Close parentheses - } else if (closeParentheses === code && balanced) { - pos += 1; - code = value.charCodeAt(pos); - - parent.after = after; - parent.sourceEndIndex += after.length; - after = ""; - balanced -= 1; - stack[stack.length - 1].sourceEndIndex = pos; - stack.pop(); - parent = stack[balanced]; - tokens = parent.nodes; - - // Words - } else { - next = pos; - do { - if (code === backslash) { - next += 1; - } - next += 1; - code = value.charCodeAt(next); - } while ( - next < max && - !( - code <= 32 || - code === singleQuote || - code === doubleQuote || - code === comma || - code === colon || - code === slash || - code === openParentheses || - (code === star && - parent && - parent.type === "function" && - parent.value === "calc") || - (code === slash && - parent.type === "function" && - parent.value === "calc") || - (code === closeParentheses && balanced) - ) - ); - token = value.slice(pos, next); - - if (openParentheses === code) { - name = token; - } else if ( - (uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) && - plus === token.charCodeAt(1) && - isUnicodeRange.test(token.slice(2)) - ) { - tokens.push({ - type: "unicode-range", - sourceIndex: pos, - sourceEndIndex: next, - value: token - }); - } else { - tokens.push({ - type: "word", - sourceIndex: pos, - sourceEndIndex: next, - value: token - }); - } - - pos = next; - } - } - - for (pos = stack.length - 1; pos; pos -= 1) { - stack[pos].unclosed = true; - stack[pos].sourceEndIndex = value.length; - } - - return stack[0].nodes; - }; - return parse; -} - -var walk$1; -var hasRequiredWalk; - -function requireWalk () { - if (hasRequiredWalk) return walk$1; - hasRequiredWalk = 1; - walk$1 = function walk(nodes, cb, bubble) { - var i, max, node, result; - - for (i = 0, max = nodes.length; i < max; i += 1) { - node = nodes[i]; - if (!bubble) { - result = cb(node, i, nodes); - } - - if ( - result !== false && - node.type === "function" && - Array.isArray(node.nodes) - ) { - walk(node.nodes, cb, bubble); - } - - if (bubble) { - cb(node, i, nodes); - } - } - }; - return walk$1; -} - -var stringify_1; -var hasRequiredStringify; - -function requireStringify () { - if (hasRequiredStringify) return stringify_1; - hasRequiredStringify = 1; - function stringifyNode(node, custom) { - var type = node.type; - var value = node.value; - var buf; - var customResult; - - if (custom && (customResult = custom(node)) !== undefined) { - return customResult; - } else if (type === "word" || type === "space") { - return value; - } else if (type === "string") { - buf = node.quote || ""; - return buf + value + (node.unclosed ? "" : buf); - } else if (type === "comment") { - return "/*" + value + (node.unclosed ? "" : "*/"); - } else if (type === "div") { - return (node.before || "") + value + (node.after || ""); - } else if (Array.isArray(node.nodes)) { - buf = stringify(node.nodes, custom); - if (type !== "function") { - return buf; - } - return ( - value + - "(" + - (node.before || "") + - buf + - (node.after || "") + - (node.unclosed ? "" : ")") - ); - } - return value; - } - - function stringify(nodes, custom) { - var result, i; - - if (Array.isArray(nodes)) { - result = ""; - for (i = nodes.length - 1; ~i; i -= 1) { - result = stringifyNode(nodes[i], custom) + result; - } - return result; - } - return stringifyNode(nodes, custom); - } - - stringify_1 = stringify; - return stringify_1; -} - -var unit; -var hasRequiredUnit; - -function requireUnit () { - if (hasRequiredUnit) return unit; - hasRequiredUnit = 1; - var minus = "-".charCodeAt(0); - var plus = "+".charCodeAt(0); - var dot = ".".charCodeAt(0); - var exp = "e".charCodeAt(0); - var EXP = "E".charCodeAt(0); - - // Check if three code points would start a number - // https://www.w3.org/TR/css-syntax-3/#starts-with-a-number - function likeNumber(value) { - var code = value.charCodeAt(0); - var nextCode; - - if (code === plus || code === minus) { - nextCode = value.charCodeAt(1); - - if (nextCode >= 48 && nextCode <= 57) { - return true; - } - - var nextNextCode = value.charCodeAt(2); - - if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) { - return true; - } - - return false; - } - - if (code === dot) { - nextCode = value.charCodeAt(1); - - if (nextCode >= 48 && nextCode <= 57) { - return true; - } - - return false; - } - - if (code >= 48 && code <= 57) { - return true; - } - - return false; - } - - // Consume a number - // https://www.w3.org/TR/css-syntax-3/#consume-number - unit = function(value) { - var pos = 0; - var length = value.length; - var code; - var nextCode; - var nextNextCode; - - if (length === 0 || !likeNumber(value)) { - return false; - } - - code = value.charCodeAt(pos); - - if (code === plus || code === minus) { - pos++; - } - - while (pos < length) { - code = value.charCodeAt(pos); - - if (code < 48 || code > 57) { - break; - } - - pos += 1; - } - - code = value.charCodeAt(pos); - nextCode = value.charCodeAt(pos + 1); - - if (code === dot && nextCode >= 48 && nextCode <= 57) { - pos += 2; - - while (pos < length) { - code = value.charCodeAt(pos); - - if (code < 48 || code > 57) { - break; - } - - pos += 1; - } - } - - code = value.charCodeAt(pos); - nextCode = value.charCodeAt(pos + 1); - nextNextCode = value.charCodeAt(pos + 2); - - if ( - (code === exp || code === EXP) && - ((nextCode >= 48 && nextCode <= 57) || - ((nextCode === plus || nextCode === minus) && - nextNextCode >= 48 && - nextNextCode <= 57)) - ) { - pos += nextCode === plus || nextCode === minus ? 3 : 2; - - while (pos < length) { - code = value.charCodeAt(pos); - - if (code < 48 || code > 57) { - break; - } - - pos += 1; - } - } - - return { - number: value.slice(0, pos), - unit: value.slice(pos) - }; - }; - return unit; -} - -var lib; -var hasRequiredLib; - -function requireLib () { - if (hasRequiredLib) return lib; - hasRequiredLib = 1; - var parse = /*@__PURE__*/ requireParse(); - var walk = /*@__PURE__*/ requireWalk(); - var stringify = /*@__PURE__*/ requireStringify(); - - function ValueParser(value) { - if (this instanceof ValueParser) { - this.nodes = parse(value); - return this; - } - return new ValueParser(value); - } - - ValueParser.prototype.toString = function() { - return Array.isArray(this.nodes) ? stringify(this.nodes) : ""; - }; - - ValueParser.prototype.walk = function(cb, bubble) { - walk(this.nodes, cb, bubble); - return this; - }; - - ValueParser.unit = /*@__PURE__*/ requireUnit(); - - ValueParser.walk = walk; - - ValueParser.stringify = stringify; - - lib = ValueParser; - return lib; -} - -var hasRequiredSrc$2; - -function requireSrc$2 () { - if (hasRequiredSrc$2) return src$2.exports; - hasRequiredSrc$2 = 1; - - const selectorParser = /*@__PURE__*/ requireDist(); - const valueParser = /*@__PURE__*/ requireLib(); - const { extractICSS } = /*@__PURE__*/ requireSrc$4(); - - const isSpacing = (node) => node.type === "combinator" && node.value === " "; - - function normalizeNodeArray(nodes) { - const array = []; - - nodes.forEach((x) => { - if (Array.isArray(x)) { - normalizeNodeArray(x).forEach((item) => { - array.push(item); - }); - } else if (x) { - array.push(x); - } - }); - - if (array.length > 0 && isSpacing(array[array.length - 1])) { - array.pop(); - } - return array; - } - - function localizeNode(rule, mode, localAliasMap) { - const transform = (node, context) => { - if (context.ignoreNextSpacing && !isSpacing(node)) { - throw new Error("Missing whitespace after " + context.ignoreNextSpacing); - } - - if (context.enforceNoSpacing && isSpacing(node)) { - throw new Error("Missing whitespace before " + context.enforceNoSpacing); - } - - let newNodes; - - switch (node.type) { - case "root": { - let resultingGlobal; - - context.hasPureGlobals = false; - - newNodes = node.nodes.map((n) => { - const nContext = { - global: context.global, - lastWasSpacing: true, - hasLocals: false, - explicit: false, - }; - - n = transform(n, nContext); - - if (typeof resultingGlobal === "undefined") { - resultingGlobal = nContext.global; - } else if (resultingGlobal !== nContext.global) { - throw new Error( - 'Inconsistent rule global/local result in rule "' + - node + - '" (multiple selectors must result in the same mode for the rule)' - ); - } - - if (!nContext.hasLocals) { - context.hasPureGlobals = true; - } - - return n; - }); - - context.global = resultingGlobal; - - node.nodes = normalizeNodeArray(newNodes); - break; - } - case "selector": { - newNodes = node.map((childNode) => transform(childNode, context)); - - node = node.clone(); - node.nodes = normalizeNodeArray(newNodes); - break; - } - case "combinator": { - if (isSpacing(node)) { - if (context.ignoreNextSpacing) { - context.ignoreNextSpacing = false; - context.lastWasSpacing = false; - context.enforceNoSpacing = false; - return null; - } - context.lastWasSpacing = true; - return node; - } - break; - } - case "pseudo": { - let childContext; - const isNested = !!node.length; - const isScoped = node.value === ":local" || node.value === ":global"; - const isImportExport = - node.value === ":import" || node.value === ":export"; - - if (isImportExport) { - context.hasLocals = true; - // :local(.foo) - } else if (isNested) { - if (isScoped) { - if (node.nodes.length === 0) { - throw new Error(`${node.value}() can't be empty`); - } - - if (context.inside) { - throw new Error( - `A ${node.value} is not allowed inside of a ${context.inside}(...)` - ); - } - - childContext = { - global: node.value === ":global", - inside: node.value, - hasLocals: false, - explicit: true, - }; - - newNodes = node - .map((childNode) => transform(childNode, childContext)) - .reduce((acc, next) => acc.concat(next.nodes), []); - - if (newNodes.length) { - const { before, after } = node.spaces; - - const first = newNodes[0]; - const last = newNodes[newNodes.length - 1]; - - first.spaces = { before, after: first.spaces.after }; - last.spaces = { before: last.spaces.before, after }; - } - - node = newNodes; - - break; - } else { - childContext = { - global: context.global, - inside: context.inside, - lastWasSpacing: true, - hasLocals: false, - explicit: context.explicit, - }; - newNodes = node.map((childNode) => { - const newContext = { - ...childContext, - enforceNoSpacing: false, - }; - - const result = transform(childNode, newContext); - - childContext.global = newContext.global; - childContext.hasLocals = newContext.hasLocals; - - return result; - }); - - node = node.clone(); - node.nodes = normalizeNodeArray(newNodes); - - if (childContext.hasLocals) { - context.hasLocals = true; - } - } - break; - - //:local .foo .bar - } else if (isScoped) { - if (context.inside) { - throw new Error( - `A ${node.value} is not allowed inside of a ${context.inside}(...)` - ); - } - - const addBackSpacing = !!node.spaces.before; - - context.ignoreNextSpacing = context.lastWasSpacing - ? node.value - : false; - - context.enforceNoSpacing = context.lastWasSpacing - ? false - : node.value; - - context.global = node.value === ":global"; - context.explicit = true; - - // because this node has spacing that is lost when we remove it - // we make up for it by adding an extra combinator in since adding - // spacing on the parent selector doesn't work - return addBackSpacing - ? selectorParser.combinator({ value: " " }) - : null; - } - break; - } - case "id": - case "class": { - if (!node.value) { - throw new Error("Invalid class or id selector syntax"); - } - - if (context.global) { - break; - } - - const isImportedValue = localAliasMap.has(node.value); - const isImportedWithExplicitScope = isImportedValue && context.explicit; - - if (!isImportedValue || isImportedWithExplicitScope) { - const innerNode = node.clone(); - innerNode.spaces = { before: "", after: "" }; - - node = selectorParser.pseudo({ - value: ":local", - nodes: [innerNode], - spaces: node.spaces, - }); - - context.hasLocals = true; - } - - break; - } - case "nesting": { - if (node.value === "&") { - context.hasLocals = true; - } - } - } - - context.lastWasSpacing = false; - context.ignoreNextSpacing = false; - context.enforceNoSpacing = false; - - return node; - }; - - const rootContext = { - global: mode === "global", - hasPureGlobals: false, - }; - - rootContext.selector = selectorParser((root) => { - transform(root, rootContext); - }).processSync(rule, { updateSelector: false, lossless: true }); - - return rootContext; - } - - function localizeDeclNode(node, context) { - switch (node.type) { - case "word": - if (context.localizeNextItem) { - if (!context.localAliasMap.has(node.value)) { - node.value = ":local(" + node.value + ")"; - context.localizeNextItem = false; - } - } - break; - - case "function": - if ( - context.options && - context.options.rewriteUrl && - node.value.toLowerCase() === "url" - ) { - node.nodes.map((nestedNode) => { - if (nestedNode.type !== "string" && nestedNode.type !== "word") { - return; - } - - let newUrl = context.options.rewriteUrl( - context.global, - nestedNode.value - ); - - switch (nestedNode.type) { - case "string": - if (nestedNode.quote === "'") { - newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/'/g, "\\'"); - } - - if (nestedNode.quote === '"') { - newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/"/g, '\\"'); - } - - break; - case "word": - newUrl = newUrl.replace(/("|'|\)|\\)/g, "\\$1"); - break; - } - - nestedNode.value = newUrl; - }); - } - break; - } - return node; - } - - // `none` is special value, other is global values - const specialKeywords = [ - "none", - "inherit", - "initial", - "revert", - "revert-layer", - "unset", - ]; - - function localizeDeclarationValues(localize, declaration, context) { - const valueNodes = valueParser(declaration.value); - - valueNodes.walk((node, index, nodes) => { - if ( - node.type === "function" && - (node.value.toLowerCase() === "var" || node.value.toLowerCase() === "env") - ) { - return false; - } - - if ( - node.type === "word" && - specialKeywords.includes(node.value.toLowerCase()) - ) { - return; - } - - const subContext = { - options: context.options, - global: context.global, - localizeNextItem: localize && !context.global, - localAliasMap: context.localAliasMap, - }; - nodes[index] = localizeDeclNode(node, subContext); - }); - - declaration.value = valueNodes.toString(); - } - - function localizeDeclaration(declaration, context) { - const isAnimation = /animation$/i.test(declaration.prop); - - if (isAnimation) { - // letter - // An uppercase letter or a lowercase letter. - // - // ident-start code point - // A letter, a non-ASCII code point, or U+005F LOW LINE (_). - // - // ident code point - // An ident-start code point, a digit, or U+002D HYPHEN-MINUS (-). - - // We don't validate `hex digits`, because we don't need it, it is work of linters. - const validIdent = - /^-?([a-z\u0080-\uFFFF_]|(\\[^\r\n\f])|-(?![0-9]))((\\[^\r\n\f])|[a-z\u0080-\uFFFF_0-9-])*$/i; - - /* - The spec defines some keywords that you can use to describe properties such as the timing - function. These are still valid animation names, so as long as there is a property that accepts - a keyword, it is given priority. Only when all the properties that can take a keyword are - exhausted can the animation name be set to the keyword. I.e. - - animation: infinite infinite; - - The animation will repeat an infinite number of times from the first argument, and will have an - animation name of infinite from the second. - */ - const animationKeywords = { - // animation-direction - $normal: 1, - $reverse: 1, - $alternate: 1, - "$alternate-reverse": 1, - // animation-fill-mode - $forwards: 1, - $backwards: 1, - $both: 1, - // animation-iteration-count - $infinite: 1, - // animation-play-state - $paused: 1, - $running: 1, - // animation-timing-function - $ease: 1, - "$ease-in": 1, - "$ease-out": 1, - "$ease-in-out": 1, - $linear: 1, - "$step-end": 1, - "$step-start": 1, - // Special - $none: Infinity, // No matter how many times you write none, it will never be an animation name - // Global values - $initial: Infinity, - $inherit: Infinity, - $unset: Infinity, - $revert: Infinity, - "$revert-layer": Infinity, - }; - let parsedAnimationKeywords = {}; - const valueNodes = valueParser(declaration.value).walk((node) => { - // If div-token appeared (represents as comma ','), a possibility of an animation-keywords should be reflesh. - if (node.type === "div") { - parsedAnimationKeywords = {}; - - return; - } - // Do not handle nested functions - else if (node.type === "function") { - return false; - } - // Ignore all except word - else if (node.type !== "word") { - return; - } - - const value = node.type === "word" ? node.value.toLowerCase() : null; - - let shouldParseAnimationName = false; - - if (value && validIdent.test(value)) { - if ("$" + value in animationKeywords) { - parsedAnimationKeywords["$" + value] = - "$" + value in parsedAnimationKeywords - ? parsedAnimationKeywords["$" + value] + 1 - : 0; - - shouldParseAnimationName = - parsedAnimationKeywords["$" + value] >= - animationKeywords["$" + value]; - } else { - shouldParseAnimationName = true; - } - } - - const subContext = { - options: context.options, - global: context.global, - localizeNextItem: shouldParseAnimationName && !context.global, - localAliasMap: context.localAliasMap, - }; - - return localizeDeclNode(node, subContext); - }); - - declaration.value = valueNodes.toString(); - - return; - } - - const isAnimationName = /animation(-name)?$/i.test(declaration.prop); - - if (isAnimationName) { - return localizeDeclarationValues(true, declaration, context); - } - - const hasUrl = /url\(/i.test(declaration.value); - - if (hasUrl) { - return localizeDeclarationValues(false, declaration, context); - } - } - - src$2.exports = (options = {}) => { - if ( - options && - options.mode && - options.mode !== "global" && - options.mode !== "local" && - options.mode !== "pure" - ) { - throw new Error( - 'options.mode must be either "global", "local" or "pure" (default "local")' - ); - } - - const pureMode = options && options.mode === "pure"; - const globalMode = options && options.mode === "global"; - - return { - postcssPlugin: "postcss-modules-local-by-default", - prepare() { - const localAliasMap = new Map(); - - return { - Once(root) { - const { icssImports } = extractICSS(root, false); - - Object.keys(icssImports).forEach((key) => { - Object.keys(icssImports[key]).forEach((prop) => { - localAliasMap.set(prop, icssImports[key][prop]); - }); - }); - - root.walkAtRules((atRule) => { - if (/keyframes$/i.test(atRule.name)) { - const globalMatch = /^\s*:global\s*\((.+)\)\s*$/.exec( - atRule.params - ); - const localMatch = /^\s*:local\s*\((.+)\)\s*$/.exec( - atRule.params - ); - - let globalKeyframes = globalMode; - - if (globalMatch) { - if (pureMode) { - throw atRule.error( - "@keyframes :global(...) is not allowed in pure mode" - ); - } - atRule.params = globalMatch[1]; - globalKeyframes = true; - } else if (localMatch) { - atRule.params = localMatch[0]; - globalKeyframes = false; - } else if ( - atRule.params && - !globalMode && - !localAliasMap.has(atRule.params) - ) { - atRule.params = ":local(" + atRule.params + ")"; - } - - atRule.walkDecls((declaration) => { - localizeDeclaration(declaration, { - localAliasMap, - options: options, - global: globalKeyframes, - }); - }); - } else if (/scope$/i.test(atRule.name)) { - if (atRule.params) { - atRule.params = atRule.params - .split("to") - .map((item) => { - const selector = item.trim().slice(1, -1).trim(); - const context = localizeNode( - selector, - options.mode, - localAliasMap - ); - - context.options = options; - context.localAliasMap = localAliasMap; - - if (pureMode && context.hasPureGlobals) { - throw atRule.error( - 'Selector in at-rule"' + - selector + - '" is not pure ' + - "(pure selectors must contain at least one local class or id)" - ); - } - - return `(${context.selector})`; - }) - .join(" to "); - } - - atRule.nodes.forEach((declaration) => { - if (declaration.type === "decl") { - localizeDeclaration(declaration, { - localAliasMap, - options: options, - global: globalMode, - }); - } - }); - } else if (atRule.nodes) { - atRule.nodes.forEach((declaration) => { - if (declaration.type === "decl") { - localizeDeclaration(declaration, { - localAliasMap, - options: options, - global: globalMode, - }); - } - }); - } - }); - - root.walkRules((rule) => { - if ( - rule.parent && - rule.parent.type === "atrule" && - /keyframes$/i.test(rule.parent.name) - ) { - // ignore keyframe rules - return; - } - - const context = localizeNode(rule, options.mode, localAliasMap); - - context.options = options; - context.localAliasMap = localAliasMap; - - if (pureMode && context.hasPureGlobals) { - throw rule.error( - 'Selector "' + - rule.selector + - '" is not pure ' + - "(pure selectors must contain at least one local class or id)" - ); - } - - rule.selector = context.selector; - - // Less-syntax mixins parse as rules with no nodes - if (rule.nodes) { - rule.nodes.forEach((declaration) => - localizeDeclaration(declaration, context) - ); - } - }); - }, - }; - }, - }; - }; - src$2.exports.postcss = true; - return src$2.exports; -} - -var src$1; -var hasRequiredSrc$1; - -function requireSrc$1 () { - if (hasRequiredSrc$1) return src$1; - hasRequiredSrc$1 = 1; - - const selectorParser = /*@__PURE__*/ requireDist(); - - const hasOwnProperty = Object.prototype.hasOwnProperty; - - function isNestedRule(rule) { - if (!rule.parent || rule.parent.type === "root") { - return false; - } - - if (rule.parent.type === "rule") { - return true; - } - - return isNestedRule(rule.parent); - } - - function getSingleLocalNamesForComposes(root, rule) { - if (isNestedRule(rule)) { - throw new Error(`composition is not allowed in nested rule \n\n${rule}`); - } - - return root.nodes.map((node) => { - if (node.type !== "selector" || node.nodes.length !== 1) { - throw new Error( - `composition is only allowed when selector is single :local class name not in "${root}"` - ); - } - - node = node.nodes[0]; - - if ( - node.type !== "pseudo" || - node.value !== ":local" || - node.nodes.length !== 1 - ) { - throw new Error( - 'composition is only allowed when selector is single :local class name not in "' + - root + - '", "' + - node + - '" is weird' - ); - } - - node = node.first; - - if (node.type !== "selector" || node.length !== 1) { - throw new Error( - 'composition is only allowed when selector is single :local class name not in "' + - root + - '", "' + - node + - '" is weird' - ); - } - - node = node.first; - - if (node.type !== "class") { - // 'id' is not possible, because you can't compose ids - throw new Error( - 'composition is only allowed when selector is single :local class name not in "' + - root + - '", "' + - node + - '" is weird' - ); - } - - return node.value; - }); - } - - const whitespace = "[\\x20\\t\\r\\n\\f]"; - const unescapeRegExp = new RegExp( - "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", - "ig" - ); - - function unescape(str) { - return str.replace(unescapeRegExp, (_, escaped, escapedWhitespace) => { - const high = "0x" + escaped - 0x10000; - - // NaN means non-codepoint - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace - ? escaped - : high < 0 - ? // BMP codepoint - String.fromCharCode(high + 0x10000) - : // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00); - }); - } - - const plugin = (options = {}) => { - const generateScopedName = - (options && options.generateScopedName) || plugin.generateScopedName; - const generateExportEntry = - (options && options.generateExportEntry) || plugin.generateExportEntry; - const exportGlobals = options && options.exportGlobals; - - return { - postcssPlugin: "postcss-modules-scope", - Once(root, { rule }) { - const exports = Object.create(null); - - function exportScopedName(name, rawName, node) { - const scopedName = generateScopedName( - rawName ? rawName : name, - root.source.input.from, - root.source.input.css, - node - ); - const exportEntry = generateExportEntry( - rawName ? rawName : name, - scopedName, - root.source.input.from, - root.source.input.css, - node - ); - const { key, value } = exportEntry; - - exports[key] = exports[key] || []; - - if (exports[key].indexOf(value) < 0) { - exports[key].push(value); - } - - return scopedName; - } - - function localizeNode(node) { - switch (node.type) { - case "selector": - node.nodes = node.map((item) => localizeNode(item)); - return node; - case "class": - return selectorParser.className({ - value: exportScopedName( - node.value, - node.raws && node.raws.value ? node.raws.value : null, - node - ), - }); - case "id": { - return selectorParser.id({ - value: exportScopedName( - node.value, - node.raws && node.raws.value ? node.raws.value : null, - node - ), - }); - } - case "attribute": { - if (node.attribute === "class" && node.operator === "=") { - return selectorParser.attribute({ - attribute: node.attribute, - operator: node.operator, - quoteMark: "'", - value: exportScopedName(node.value, null, null), - }); - } - } - } - - throw new Error( - `${node.type} ("${node}") is not allowed in a :local block` - ); - } - - function traverseNode(node) { - switch (node.type) { - case "pseudo": - if (node.value === ":local") { - if (node.nodes.length !== 1) { - throw new Error('Unexpected comma (",") in :local block'); - } - - const selector = localizeNode(node.first); - // move the spaces that were around the pseudo selector to the first - // non-container node - selector.first.spaces = node.spaces; - - const nextNode = node.next(); - - if ( - nextNode && - nextNode.type === "combinator" && - nextNode.value === " " && - /\\[A-F0-9]{1,6}$/.test(selector.last.value) - ) { - selector.last.spaces.after = " "; - } - - node.replaceWith(selector); - - return; - } - /* falls through */ - case "root": - case "selector": { - node.each((item) => traverseNode(item)); - break; - } - case "id": - case "class": - if (exportGlobals) { - exports[node.value] = [node.value]; - } - break; - } - return node; - } - - // Find any :import and remember imported names - const importedNames = {}; - - root.walkRules(/^:import\(.+\)$/, (rule) => { - rule.walkDecls((decl) => { - importedNames[decl.prop] = true; - }); - }); - - // Find any :local selectors - root.walkRules((rule) => { - let parsedSelector = selectorParser().astSync(rule); - - rule.selector = traverseNode(parsedSelector.clone()).toString(); - - rule.walkDecls(/^(composes|compose-with)$/i, (decl) => { - const localNames = getSingleLocalNamesForComposes( - parsedSelector, - decl.parent - ); - const multiple = decl.value.split(","); - - multiple.forEach((value) => { - const classes = value.trim().split(/\s+/); - - classes.forEach((className) => { - const global = /^global\(([^)]+)\)$/.exec(className); - - if (global) { - localNames.forEach((exportedName) => { - exports[exportedName].push(global[1]); - }); - } else if (hasOwnProperty.call(importedNames, className)) { - localNames.forEach((exportedName) => { - exports[exportedName].push(className); - }); - } else if (hasOwnProperty.call(exports, className)) { - localNames.forEach((exportedName) => { - exports[className].forEach((item) => { - exports[exportedName].push(item); - }); - }); - } else { - throw decl.error( - `referenced class name "${className}" in ${decl.prop} not found` - ); - } - }); - }); - - decl.remove(); - }); - - // Find any :local values - rule.walkDecls((decl) => { - if (!/:local\s*\((.+?)\)/.test(decl.value)) { - return; - } - - let tokens = decl.value.split(/(,|'[^']*'|"[^"]*")/); - - tokens = tokens.map((token, idx) => { - if (idx === 0 || tokens[idx - 1] === ",") { - let result = token; - - const localMatch = /:local\s*\((.+?)\)/.exec(token); - - if (localMatch) { - const input = localMatch.input; - const matchPattern = localMatch[0]; - const matchVal = localMatch[1]; - const newVal = exportScopedName(matchVal); - - result = input.replace(matchPattern, newVal); - } else { - return token; - } - - return result; - } else { - return token; - } - }); - - decl.value = tokens.join(""); - }); - }); - - // Find any :local keyframes - root.walkAtRules(/keyframes$/i, (atRule) => { - const localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(atRule.params); - - if (!localMatch) { - return; - } - - atRule.params = exportScopedName(localMatch[1]); - }); - - root.walkAtRules(/scope$/i, (atRule) => { - if (atRule.params) { - atRule.params = atRule.params - .split("to") - .map((item) => { - const selector = item.trim().slice(1, -1).trim(); - - const localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(selector); - - if (!localMatch) { - return `(${selector})`; - } - - let parsedSelector = selectorParser().astSync(selector); - - return `(${traverseNode(parsedSelector).toString()})`; - }) - .join(" to "); - } - }); - - // If we found any :locals, insert an :export rule - const exportedNames = Object.keys(exports); - - if (exportedNames.length > 0) { - const exportRule = rule({ selector: ":export" }); - - exportedNames.forEach((exportedName) => - exportRule.append({ - prop: exportedName, - value: exports[exportedName].join(" "), - raws: { before: "\n " }, - }) - ); - - root.append(exportRule); - } - }, - }; - }; - - plugin.postcss = true; - - plugin.generateScopedName = function (name, path) { - const sanitisedPath = path - .replace(/\.[^./\\]+$/, "") - .replace(/[\W_]+/g, "_") - .replace(/^_|_$/g, ""); - - return `_${sanitisedPath}__${name}`.trim(); - }; - - plugin.generateExportEntry = function (name, scopedName) { - return { - key: unescape(name), - value: unescape(scopedName), - }; - }; - - src$1 = plugin; - return src$1; -} - -var stringHash; -var hasRequiredStringHash; - -function requireStringHash () { - if (hasRequiredStringHash) return stringHash; - hasRequiredStringHash = 1; - - function hash(str) { - var hash = 5381, - i = str.length; - - while(i) { - hash = (hash * 33) ^ str.charCodeAt(--i); - } - - /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed - * integers. Since we want the results to be always positive, convert the - * signed int to an unsigned by doing an unsigned bitshift. */ - return hash >>> 0; - } - - stringHash = hash; - return stringHash; -} - -var src = {exports: {}}; - -var hasRequiredSrc; - -function requireSrc () { - if (hasRequiredSrc) return src.exports; - hasRequiredSrc = 1; - - const ICSSUtils = /*@__PURE__*/ requireSrc$4(); - - const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; - const matchValueDefinition = /(?:\s+|^)([\w-]+):?(.*?)$/; - const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/; - - src.exports = (options) => { - let importIndex = 0; - const createImportedName = - (options && options.createImportedName) || - ((importName /*, path*/) => - `i__const_${importName.replace(/\W/g, "_")}_${importIndex++}`); - - return { - postcssPlugin: "postcss-modules-values", - prepare(result) { - const importAliases = []; - const definitions = {}; - - return { - Once(root, postcss) { - root.walkAtRules(/value/i, (atRule) => { - const matches = atRule.params.match(matchImports); - - if (matches) { - let [, /*match*/ aliases, path] = matches; - - // We can use constants for path names - if (definitions[path]) { - path = definitions[path]; - } - - const imports = aliases - .replace(/^\(\s*([\s\S]+)\s*\)$/, "$1") - .split(/\s*,\s*/) - .map((alias) => { - const tokens = matchImport.exec(alias); - - if (tokens) { - const [, /*match*/ theirName, myName = theirName] = tokens; - const importedName = createImportedName(myName); - definitions[myName] = importedName; - return { theirName, importedName }; - } else { - throw new Error(`@import statement "${alias}" is invalid!`); - } - }); - - importAliases.push({ path, imports }); - - atRule.remove(); - - return; - } - - if (atRule.params.indexOf("@value") !== -1) { - result.warn("Invalid value definition: " + atRule.params); - } - - let [, key, value] = `${atRule.params}${atRule.raws.between}`.match( - matchValueDefinition - ); - - const normalizedValue = value.replace(/\/\*((?!\*\/).*?)\*\//g, ""); - - if (normalizedValue.length === 0) { - result.warn("Invalid value definition: " + atRule.params); - atRule.remove(); - - return; - } - - let isOnlySpace = /^\s+$/.test(normalizedValue); - - if (!isOnlySpace) { - value = value.trim(); - } - - // Add to the definitions, knowing that values can refer to each other - definitions[key] = ICSSUtils.replaceValueSymbols( - value, - definitions - ); - - atRule.remove(); - }); - - /* If we have no definitions, don't continue */ - if (!Object.keys(definitions).length) { - return; - } - - /* Perform replacements */ - ICSSUtils.replaceSymbols(root, definitions); - - /* We want to export anything defined by now, but don't add it to the CSS yet or it well get picked up by the replacement stuff */ - const exportDeclarations = Object.keys(definitions).map((key) => - postcss.decl({ - value: definitions[key], - prop: key, - raws: { before: "\n " }, - }) - ); - - /* Add export rules if any */ - if (exportDeclarations.length > 0) { - const exportRule = postcss.rule({ - selector: ":export", - raws: { after: "\n" }, - }); - - exportRule.append(exportDeclarations); - - root.prepend(exportRule); - } - - /* Add import rules */ - importAliases.reverse().forEach(({ path, imports }) => { - const importRule = postcss.rule({ - selector: `:import(${path})`, - raws: { after: "\n" }, - }); - - imports.forEach(({ theirName, importedName }) => { - importRule.append({ - value: theirName, - prop: importedName, - raws: { before: "\n " }, - }); - }); - - root.prepend(importRule); - }); - }, - }; - }, - }; - }; - - src.exports.postcss = true; - return src.exports; -} - -var hasRequiredScoping; - -function requireScoping () { - if (hasRequiredScoping) return scoping; - hasRequiredScoping = 1; - - Object.defineProperty(scoping, "__esModule", { - value: true - }); - scoping.behaviours = void 0; - scoping.getDefaultPlugins = getDefaultPlugins; - scoping.getDefaultScopeBehaviour = getDefaultScopeBehaviour; - scoping.getScopedNameGenerator = getScopedNameGenerator; - - var _postcssModulesExtractImports = _interopRequireDefault(/*@__PURE__*/ requireSrc$3()); - - var _genericNames = _interopRequireDefault(/*@__PURE__*/ requireGenericNames()); - - var _postcssModulesLocalByDefault = _interopRequireDefault(/*@__PURE__*/ requireSrc$2()); - - var _postcssModulesScope = _interopRequireDefault(/*@__PURE__*/ requireSrc$1()); - - var _stringHash = _interopRequireDefault(/*@__PURE__*/ requireStringHash()); - - var _postcssModulesValues = _interopRequireDefault(/*@__PURE__*/ requireSrc()); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - const behaviours = { - LOCAL: "local", - GLOBAL: "global" - }; - scoping.behaviours = behaviours; - - function getDefaultPlugins({ - behaviour, - generateScopedName, - exportGlobals - }) { - const scope = (0, _postcssModulesScope.default)({ - generateScopedName, - exportGlobals - }); - const plugins = { - [behaviours.LOCAL]: [_postcssModulesValues.default, (0, _postcssModulesLocalByDefault.default)({ - mode: "local" - }), _postcssModulesExtractImports.default, scope], - [behaviours.GLOBAL]: [_postcssModulesValues.default, (0, _postcssModulesLocalByDefault.default)({ - mode: "global" - }), _postcssModulesExtractImports.default, scope] - }; - return plugins[behaviour]; - } - - function isValidBehaviour(behaviour) { - return Object.keys(behaviours).map(key => behaviours[key]).indexOf(behaviour) > -1; - } - - function getDefaultScopeBehaviour(scopeBehaviour) { - return scopeBehaviour && isValidBehaviour(scopeBehaviour) ? scopeBehaviour : behaviours.LOCAL; - } - - function generateScopedNameDefault(name, filename, css) { - const i = css.indexOf(`.${name}`); - const lineNumber = css.substr(0, i).split(/[\r\n]/).length; - const hash = (0, _stringHash.default)(css).toString(36).substr(0, 5); - return `_${name}_${hash}_${lineNumber}`; - } - - function getScopedNameGenerator(generateScopedName, hashPrefix) { - const scopedNameGenerator = generateScopedName || generateScopedNameDefault; - - if (typeof scopedNameGenerator === "function") { - return scopedNameGenerator; - } - - return (0, _genericNames.default)(scopedNameGenerator, { - context: process.cwd(), - hashPrefix: hashPrefix - }); - } - return scoping; -} - -var hasRequiredPluginFactory; - -function requirePluginFactory () { - if (hasRequiredPluginFactory) return pluginFactory; - hasRequiredPluginFactory = 1; - - Object.defineProperty(pluginFactory, "__esModule", { - value: true - }); - pluginFactory.makePlugin = makePlugin; - - var _postcss = _interopRequireDefault(require$$0$1); - - var _unquote = _interopRequireDefault(/*@__PURE__*/ requireUnquote()); - - var _Parser = _interopRequireDefault(/*@__PURE__*/ requireParser$1()); - - var _saveJSON = _interopRequireDefault(/*@__PURE__*/ requireSaveJSON()); - - var _localsConvention = /*@__PURE__*/ requireLocalsConvention(); - - var _FileSystemLoader = _interopRequireDefault(/*@__PURE__*/ requireFileSystemLoader()); - - var _scoping = /*@__PURE__*/ requireScoping(); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - const PLUGIN_NAME = "postcss-modules"; - - function isGlobalModule(globalModules, inputFile) { - return globalModules.some(regex => inputFile.match(regex)); - } - - function getDefaultPluginsList(opts, inputFile) { - const globalModulesList = opts.globalModulePaths || null; - const exportGlobals = opts.exportGlobals || false; - const defaultBehaviour = (0, _scoping.getDefaultScopeBehaviour)(opts.scopeBehaviour); - const generateScopedName = (0, _scoping.getScopedNameGenerator)(opts.generateScopedName, opts.hashPrefix); - - if (globalModulesList && isGlobalModule(globalModulesList, inputFile)) { - return (0, _scoping.getDefaultPlugins)({ - behaviour: _scoping.behaviours.GLOBAL, - generateScopedName, - exportGlobals - }); - } - - return (0, _scoping.getDefaultPlugins)({ - behaviour: defaultBehaviour, - generateScopedName, - exportGlobals - }); - } - - function getLoader(opts, plugins) { - const root = typeof opts.root === "undefined" ? "/" : opts.root; - return typeof opts.Loader === "function" ? new opts.Loader(root, plugins, opts.resolve) : new _FileSystemLoader.default(root, plugins, opts.resolve); - } - - function isOurPlugin(plugin) { - return plugin.postcssPlugin === PLUGIN_NAME; - } - - function makePlugin(opts) { - return { - postcssPlugin: PLUGIN_NAME, - - async OnceExit(css, { - result - }) { - const getJSON = opts.getJSON || _saveJSON.default; - const inputFile = css.source.input.file; - const pluginList = getDefaultPluginsList(opts, inputFile); - const resultPluginIndex = result.processor.plugins.findIndex(plugin => isOurPlugin(plugin)); - - if (resultPluginIndex === -1) { - throw new Error("Plugin missing from options."); - } - - const earlierPlugins = result.processor.plugins.slice(0, resultPluginIndex); - const loaderPlugins = [...earlierPlugins, ...pluginList]; - const loader = getLoader(opts, loaderPlugins); - - const fetcher = async (file, relativeTo, depTrace) => { - const unquoteFile = (0, _unquote.default)(file); - return loader.fetch.call(loader, unquoteFile, relativeTo, depTrace); - }; - - const parser = new _Parser.default(fetcher); - await (0, _postcss.default)([...pluginList, parser.plugin()]).process(css, { - from: inputFile - }); - const out = loader.finalSource; - if (out) css.prepend(out); - - if (opts.localsConvention) { - const reducer = (0, _localsConvention.makeLocalsConventionReducer)(opts.localsConvention, inputFile); - parser.exportTokens = Object.entries(parser.exportTokens).reduce(reducer, {}); - } - - result.messages.push({ - type: "export", - plugin: "postcss-modules", - exportTokens: parser.exportTokens - }); // getJSON may return a promise - - return getJSON(css.source.input.file, parser.exportTokens, result.opts.to); - } - - }; - } - return pluginFactory; -} - -var hasRequiredBuild; - -function requireBuild () { - if (hasRequiredBuild) return build.exports; - hasRequiredBuild = 1; - - var _fs = require$$0; - - var _fs2 = /*@__PURE__*/ requireFs(); - - var _pluginFactory = /*@__PURE__*/ requirePluginFactory(); - - (0, _fs2.setFileSystem)({ - readFile: _fs.readFile, - writeFile: _fs.writeFile - }); - - build.exports = (opts = {}) => (0, _pluginFactory.makePlugin)(opts); - - build.exports.postcss = true; - return build.exports; -} - -var buildExports = /*@__PURE__*/ requireBuild(); -var postcssModules = /*@__PURE__*/getDefaultExportFromCjs(buildExports); - -function compileStyle(options) { - return doCompileStyle({ - ...options, - isAsync: false - }); -} -function compileStyleAsync(options) { - return doCompileStyle({ - ...options, - isAsync: true - }); -} -function doCompileStyle(options) { - const { - filename, - id, - scoped = false, - trim = true, - isProd = false, - modules = false, - modulesOptions = {}, - preprocessLang, - postcssOptions, - postcssPlugins - } = options; - const preprocessor = preprocessLang && processors[preprocessLang]; - const preProcessedSource = preprocessor && preprocess(options, preprocessor); - const map = preProcessedSource ? preProcessedSource.map : options.inMap || options.map; - const source = preProcessedSource ? preProcessedSource.code : options.source; - const shortId = id.replace(/^data-v-/, ""); - const longId = `data-v-${shortId}`; - const plugins = (postcssPlugins || []).slice(); - plugins.unshift(cssVarsPlugin({ id: shortId, isProd })); - if (trim) { - plugins.push(trimPlugin()); - } - if (scoped) { - plugins.push(scopedPlugin(longId)); - } - let cssModules; - if (modules) { - if (!options.isAsync) { - throw new Error( - "[@vue/compiler-sfc] `modules` option can only be used with compileStyleAsync()." - ); - } - plugins.push( - postcssModules({ - ...modulesOptions, - getJSON: (_cssFileName, json) => { - cssModules = json; - } - }) - ); - } - const postCSSOptions = { - ...postcssOptions, - to: filename, - from: filename - }; - if (map) { - postCSSOptions.map = { - inline: false, - annotation: false, - prev: map - }; - } - let result; - let code; - let outMap; - const dependencies = new Set( - preProcessedSource ? preProcessedSource.dependencies : [] - ); - dependencies.delete(filename); - const errors = []; - if (preProcessedSource && preProcessedSource.errors.length) { - errors.push(...preProcessedSource.errors); - } - const recordPlainCssDependencies = (messages) => { - messages.forEach((msg) => { - if (msg.type === "dependency") { - dependencies.add(msg.file); - } - }); - return dependencies; - }; - try { - result = require$$0$1(plugins).process(source, postCSSOptions); - if (options.isAsync) { - return result.then((result2) => ({ - code: result2.css || "", - map: result2.map && result2.map.toJSON(), - errors, - modules: cssModules, - rawResult: result2, - dependencies: recordPlainCssDependencies(result2.messages) - })).catch((error) => ({ - code: "", - map: void 0, - errors: [...errors, error], - rawResult: void 0, - dependencies - })); - } - recordPlainCssDependencies(result.messages); - code = result.css; - outMap = result.map; - } catch (e) { - errors.push(e); - } - return { - code: code || ``, - map: outMap && outMap.toJSON(), - errors, - rawResult: result, - dependencies - }; -} -function preprocess(options, preprocessor) { - return preprocessor( - options.source, - options.inMap || options.map, - { - filename: options.filename, - ...options.preprocessOptions - }, - options.preprocessCustomRequire - ); -} - -const UNKNOWN_TYPE = "Unknown"; -function resolveObjectKey(node, computed) { - switch (node.type) { - case "StringLiteral": - case "NumericLiteral": - return String(node.value); - case "Identifier": - if (!computed) return node.name; - } - return void 0; -} -function concatStrings(strs) { - return strs.filter((s) => !!s).join(", "); -} -function isLiteralNode(node) { - return node.type.endsWith("Literal"); -} -function isCallOf(node, test) { - return !!(node && test && node.type === "CallExpression" && node.callee.type === "Identifier" && (typeof test === "string" ? node.callee.name === test : test(node.callee.name))); -} -function toRuntimeTypeString(types) { - return types.length > 1 ? `[${types.join(", ")}]` : types[0]; -} -function getImportedName(specifier) { - if (specifier.type === "ImportSpecifier") - return specifier.imported.type === "Identifier" ? specifier.imported.name : specifier.imported.value; - else if (specifier.type === "ImportNamespaceSpecifier") return "*"; - return "default"; -} -function getId(node) { - return node.type === "Identifier" ? node.name : node.type === "StringLiteral" ? node.value : null; -} -const identity = (str) => str; -const fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; -const toLowerCase = (str) => str.toLowerCase(); -function toFileNameLowerCase(x) { - return fileNameLowerCaseRegExp.test(x) ? x.replace(fileNameLowerCaseRegExp, toLowerCase) : x; -} -function createGetCanonicalFileName(useCaseSensitiveFileNames) { - return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; -} -const normalize = (path$1.posix || path$1).normalize; -const windowsSlashRE = /\\/g; -function normalizePath(p) { - return normalize(p.replace(windowsSlashRE, "/")); -} -const joinPaths = (path$1.posix || path$1).join; -const propNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~\-]/; -function getEscapedPropName(key) { - return propNameEscapeSymbolsRE.test(key) ? JSON.stringify(key) : key; -} - -function analyzeScriptBindings(ast) { - for (const node of ast) { - if (node.type === "ExportDefaultDeclaration" && node.declaration.type === "ObjectExpression") { - return analyzeBindingsFromOptions(node.declaration); - } - } - return {}; -} -function analyzeBindingsFromOptions(node) { - const bindings = {}; - Object.defineProperty(bindings, "__isScriptSetup", { - enumerable: false, - value: false - }); - for (const property of node.properties) { - if (property.type === "ObjectProperty" && !property.computed && property.key.type === "Identifier") { - if (property.key.name === "props") { - for (const key of getObjectOrArrayExpressionKeys(property.value)) { - bindings[key] = "props"; - } - } else if (property.key.name === "inject") { - for (const key of getObjectOrArrayExpressionKeys(property.value)) { - bindings[key] = "options"; - } - } else if (property.value.type === "ObjectExpression" && (property.key.name === "computed" || property.key.name === "methods")) { - for (const key of getObjectExpressionKeys(property.value)) { - bindings[key] = "options"; - } - } - } else if (property.type === "ObjectMethod" && property.key.type === "Identifier" && (property.key.name === "setup" || property.key.name === "data")) { - for (const bodyItem of property.body.body) { - if (bodyItem.type === "ReturnStatement" && bodyItem.argument && bodyItem.argument.type === "ObjectExpression") { - for (const key of getObjectExpressionKeys(bodyItem.argument)) { - bindings[key] = property.key.name === "setup" ? "setup-maybe-ref" : "data"; - } - } - } - } - } - return bindings; -} -function getObjectExpressionKeys(node) { - const keys = []; - for (const prop of node.properties) { - if (prop.type === "SpreadElement") continue; - const key = resolveObjectKey(prop.key, prop.computed); - if (key) keys.push(String(key)); - } - return keys; -} -function getArrayExpressionKeys(node) { - const keys = []; - for (const element of node.elements) { - if (element && element.type === "StringLiteral") { - keys.push(element.value); - } - } - return keys; -} -function getObjectOrArrayExpressionKeys(value) { - if (value.type === "ArrayExpression") { - return getArrayExpressionKeys(value); - } - if (value.type === "ObjectExpression") { - return getObjectExpressionKeys(value); - } - return []; -} - -var _a, _b; -class ScriptCompileContext { - constructor(descriptor, options) { - this.descriptor = descriptor; - this.options = options; - this.isCE = false; - this.source = this.descriptor.source; - this.filename = this.descriptor.filename; - this.s = new MagicString(this.source); - this.startOffset = (_a = this.descriptor.scriptSetup) == null ? void 0 : _a.loc.start.offset; - this.endOffset = (_b = this.descriptor.scriptSetup) == null ? void 0 : _b.loc.end.offset; - this.userImports = /* @__PURE__ */ Object.create(null); - // macros presence check - this.hasDefinePropsCall = false; - this.hasDefineEmitCall = false; - this.hasDefineExposeCall = false; - this.hasDefaultExportName = false; - this.hasDefaultExportRender = false; - this.hasDefineOptionsCall = false; - this.hasDefineSlotsCall = false; - this.hasDefineModelCall = false; - this.propsDestructuredBindings = /* @__PURE__ */ Object.create(null); - // defineModel - this.modelDecls = /* @__PURE__ */ Object.create(null); - // codegen - this.bindingMetadata = {}; - this.helperImports = /* @__PURE__ */ new Set(); - const { script, scriptSetup } = descriptor; - const scriptLang = script && script.lang; - const scriptSetupLang = scriptSetup && scriptSetup.lang; - this.isJS = scriptLang === "js" || scriptLang === "jsx" || scriptSetupLang === "js" || scriptSetupLang === "jsx"; - this.isTS = scriptLang === "ts" || scriptLang === "tsx" || scriptSetupLang === "ts" || scriptSetupLang === "tsx"; - const customElement = options.customElement; - const filename = this.descriptor.filename; - if (customElement) { - this.isCE = typeof customElement === "boolean" ? customElement : customElement(filename); - } - const plugins = resolveParserPlugins( - scriptLang || scriptSetupLang, - options.babelParserPlugins - ); - function parse(input, offset) { - try { - return parser$2.parse(input, { - plugins, - sourceType: "module" - }).program; - } catch (e) { - e.message = `[vue/compiler-sfc] ${e.message} - -${descriptor.filename} -${shared.generateCodeFrame( - descriptor.source, - e.pos + offset, - e.pos + offset + 1 - )}`; - throw e; - } - } - this.scriptAst = descriptor.script && parse(descriptor.script.content, descriptor.script.loc.start.offset); - this.scriptSetupAst = descriptor.scriptSetup && parse(descriptor.scriptSetup.content, this.startOffset); - } - helper(key) { - this.helperImports.add(key); - return `_${key}`; - } - getString(node, scriptSetup = true) { - const block = scriptSetup ? this.descriptor.scriptSetup : this.descriptor.script; - return block.content.slice(node.start, node.end); - } - warn(msg, node, scope) { - warn(generateError(msg, node, this, scope)); - } - error(msg, node, scope) { - throw new Error( - `[@vue/compiler-sfc] ${generateError(msg, node, this, scope)}` - ); - } -} -function generateError(msg, node, ctx, scope) { - const offset = scope ? scope.offset : ctx.startOffset; - return `${msg} - -${(scope || ctx.descriptor).filename} -${shared.generateCodeFrame( - (scope || ctx.descriptor).source, - node.start + offset, - node.end + offset - )}`; -} -function resolveParserPlugins(lang, userPlugins, dts = false) { - const plugins = []; - if (!userPlugins || !userPlugins.some( - (p) => p === "importAssertions" || p === "importAttributes" || shared.isArray(p) && p[0] === "importAttributes" - )) { - plugins.push("importAttributes"); - } - if (lang === "jsx" || lang === "tsx" || lang === "mtsx") { - plugins.push("jsx"); - } else if (userPlugins) { - userPlugins = userPlugins.filter((p) => p !== "jsx"); - } - if (lang === "ts" || lang === "mts" || lang === "tsx" || lang === "mtsx") { - plugins.push(["typescript", { dts }], "explicitResourceManagement"); - if (!userPlugins || !userPlugins.includes("decorators")) { - plugins.push("decorators-legacy"); - } - } - if (userPlugins) { - plugins.push(...userPlugins); - } - return plugins; -} - -function rewriteDefault(input, as, parserPlugins) { - const ast = parser$2.parse(input, { - sourceType: "module", - plugins: resolveParserPlugins("js", parserPlugins) - }).program.body; - const s = new MagicString(input); - rewriteDefaultAST(ast, s, as); - return s.toString(); -} -function rewriteDefaultAST(ast, s, as) { - if (!hasDefaultExport(ast)) { - s.append(` -const ${as} = {}`); - return; - } - ast.forEach((node) => { - if (node.type === "ExportDefaultDeclaration") { - if (node.declaration.type === "ClassDeclaration" && node.declaration.id) { - let start = node.declaration.decorators && node.declaration.decorators.length > 0 ? node.declaration.decorators[node.declaration.decorators.length - 1].end : node.start; - s.overwrite(start, node.declaration.id.start, ` class `); - s.append(` -const ${as} = ${node.declaration.id.name}`); - } else { - s.overwrite(node.start, node.declaration.start, `const ${as} = `); - } - } else if (node.type === "ExportNamedDeclaration") { - for (const specifier of node.specifiers) { - if (specifier.type === "ExportSpecifier" && specifier.exported.type === "Identifier" && specifier.exported.name === "default") { - if (node.source) { - if (specifier.local.name === "default") { - s.prepend( - `import { default as __VUE_DEFAULT__ } from '${node.source.value}' -` - ); - const end2 = specifierEnd(s, specifier.local.end, node.end); - s.remove(specifier.start, end2); - s.append(` -const ${as} = __VUE_DEFAULT__`); - continue; - } else { - s.prepend( - `import { ${s.slice( - specifier.local.start, - specifier.local.end - )} as __VUE_DEFAULT__ } from '${node.source.value}' -` - ); - const end2 = specifierEnd(s, specifier.exported.end, node.end); - s.remove(specifier.start, end2); - s.append(` -const ${as} = __VUE_DEFAULT__`); - continue; - } - } - const end = specifierEnd(s, specifier.end, node.end); - s.remove(specifier.start, end); - s.append(` -const ${as} = ${specifier.local.name}`); - } - } - } - }); -} -function hasDefaultExport(ast) { - for (const stmt of ast) { - if (stmt.type === "ExportDefaultDeclaration") { - return true; - } else if (stmt.type === "ExportNamedDeclaration" && stmt.specifiers.some( - (spec) => spec.exported.name === "default" - )) { - return true; - } - } - return false; -} -function specifierEnd(s, end, nodeEnd) { - let hasCommas = false; - let oldEnd = end; - while (end < nodeEnd) { - if (/\s/.test(s.slice(end, end + 1))) { - end++; - } else if (s.slice(end, end + 1) === ",") { - end++; - hasCommas = true; - break; - } else if (s.slice(end, end + 1) === "}") { - break; - } - } - return hasCommas ? end : oldEnd; -} - -const normalScriptDefaultVar = `__default__`; -function processNormalScript(ctx, scopeId) { - var _a; - const script = ctx.descriptor.script; - if (script.lang && !ctx.isJS && !ctx.isTS) { - return script; - } - try { - let content = script.content; - let map = script.map; - const scriptAst = ctx.scriptAst; - const bindings = analyzeScriptBindings(scriptAst.body); - const { cssVars } = ctx.descriptor; - const { genDefaultAs, isProd } = ctx.options; - if (cssVars.length || genDefaultAs) { - const defaultVar = genDefaultAs || normalScriptDefaultVar; - const s = new MagicString(content); - rewriteDefaultAST(scriptAst.body, s, defaultVar); - content = s.toString(); - if (cssVars.length && !((_a = ctx.options.templateOptions) == null ? void 0 : _a.ssr)) { - content += genNormalScriptCssVarsCode( - cssVars, - bindings, - scopeId, - !!isProd, - defaultVar - ); - } - if (!genDefaultAs) { - content += ` -export default ${defaultVar}`; - } - } - return { - ...script, - content, - map, - bindings, - scriptAst: scriptAst.body - }; - } catch (e) { - return script; - } -} - -var balancedMatch; -var hasRequiredBalancedMatch; - -function requireBalancedMatch () { - if (hasRequiredBalancedMatch) return balancedMatch; - hasRequiredBalancedMatch = 1; - balancedMatch = 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; - } - return balancedMatch; -} - -var braceExpansion; -var hasRequiredBraceExpansion; - -function requireBraceExpansion () { - if (hasRequiredBraceExpansion) return braceExpansion; - hasRequiredBraceExpansion = 1; - var balanced = /*@__PURE__*/ requireBalancedMatch(); - - braceExpansion = 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 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) return [str]; - - // 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) - : ['']; - - if (/\$$/.test(m.pre)) { - for (var k = 0; k < post.length; k++) { - var expansion = pre+ '{' + m.body + '}' + post[k]; - expansions.push(expansion); - } - } else { - 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) { - 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. - 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 = []; - - for (var j = 0; j < n.length; j++) { - N.push.apply(N, expand(n[j], 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; - } - return braceExpansion; -} - -var braceExpansionExports = /*@__PURE__*/ requireBraceExpansion(); -var expand = /*@__PURE__*/getDefaultExportFromCjs(braceExpansionExports); - -const MAX_PATTERN_LENGTH = 1024 * 64; -const assertValidPattern = (pattern) => { - if (typeof pattern !== 'string') { - throw new TypeError('invalid pattern'); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError('pattern is too long'); - } -}; - -// translate the various posix character classes into unicode properties -// this works across all unicode locales -// { <posix class>: [<translation>, /u flag required, negated] -const posixClasses = { - '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true], - '[:alpha:]': ['\\p{L}\\p{Nl}', true], - '[:ascii:]': ['\\x' + '00-\\x' + '7f', false], - '[:blank:]': ['\\p{Zs}\\t', true], - '[:cntrl:]': ['\\p{Cc}', true], - '[:digit:]': ['\\p{Nd}', true], - '[:graph:]': ['\\p{Z}\\p{C}', true, true], - '[:lower:]': ['\\p{Ll}', true], - '[:print:]': ['\\p{C}', true], - '[:punct:]': ['\\p{P}', true], - '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true], - '[:upper:]': ['\\p{Lu}', true], - '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true], - '[:xdigit:]': ['A-Fa-f0-9', false], -}; -// only need to escape a few things inside of brace expressions -// escapes: [ \ ] - -const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&'); -// escape all regexp magic characters -const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); -// everything has already been escaped, we just have to join -const rangesToString = (ranges) => ranges.join(''); -// takes a glob string at a posix brace expression, and returns -// an equivalent regular expression source, and boolean indicating -// whether the /u flag needs to be applied, and the number of chars -// consumed to parse the character class. -// This also removes out of order ranges, and returns ($.) if the -// entire class just no good. -const parseClass = (glob, position) => { - const pos = position; - /* c8 ignore start */ - if (glob.charAt(pos) !== '[') { - throw new Error('not in a brace expression'); - } - /* c8 ignore stop */ - const ranges = []; - const negs = []; - let i = pos + 1; - let sawStart = false; - let uflag = false; - let escaping = false; - let negate = false; - let endPos = pos; - let rangeStart = ''; - WHILE: while (i < glob.length) { - const c = glob.charAt(i); - if ((c === '!' || c === '^') && i === pos + 1) { - negate = true; - i++; - continue; - } - if (c === ']' && sawStart && !escaping) { - endPos = i + 1; - break; - } - sawStart = true; - if (c === '\\') { - if (!escaping) { - escaping = true; - i++; - continue; - } - // escaped \ char, fall through and treat like normal char - } - if (c === '[' && !escaping) { - // either a posix class, a collation equivalent, or just a [ - for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { - if (glob.startsWith(cls, i)) { - // invalid, [a-[] is fine, but not [a-[:alpha]] - if (rangeStart) { - return ['$.', false, glob.length - pos, true]; - } - i += cls.length; - if (neg) - negs.push(unip); - else - ranges.push(unip); - uflag = uflag || u; - continue WHILE; - } - } - } - // now it's just a normal character, effectively - escaping = false; - if (rangeStart) { - // throw this range away if it's not valid, but others - // can still match. - if (c > rangeStart) { - ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c)); - } - else if (c === rangeStart) { - ranges.push(braceEscape(c)); - } - rangeStart = ''; - i++; - continue; - } - // now might be the start of a range. - // can be either c-d or c-] or c<more...>] or c] at this point - if (glob.startsWith('-]', i + 1)) { - ranges.push(braceEscape(c + '-')); - i += 2; - continue; - } - if (glob.startsWith('-', i + 1)) { - rangeStart = c; - i += 2; - continue; - } - // not the start of a range, just a single character - ranges.push(braceEscape(c)); - i++; - } - if (endPos < i) { - // didn't see the end of the class, not a valid class, - // but might still be valid as a literal match. - return ['', false, 0, false]; - } - // if we got no ranges and no negates, then we have a range that - // cannot possibly match anything, and that poisons the whole glob - if (!ranges.length && !negs.length) { - return ['$.', false, glob.length - pos, true]; - } - // if we got one positive range, and it's a single character, then that's - // not actually a magic pattern, it's just that one literal character. - // we should not treat that as "magic", we should just return the literal - // character. [_] is a perfectly valid way to escape glob magic chars. - if (negs.length === 0 && - ranges.length === 1 && - /^\\?.$/.test(ranges[0]) && - !negate) { - const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; - return [regexpEscape(r), false, endPos - pos, false]; - } - const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; - const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; - const comb = ranges.length && negs.length - ? '(' + sranges + '|' + snegs + ')' - : ranges.length - ? sranges - : snegs; - return [comb, uflag, endPos - pos, true]; -}; - -/** - * Un-escape a string that has been escaped with {@link escape}. - * - * If the {@link windowsPathsNoEscape} option is used, then square-brace - * escapes are removed, but not backslash escapes. For example, it will turn - * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`, - * becuase `\` is a path separator in `windowsPathsNoEscape` mode. - * - * When `windowsPathsNoEscape` is not set, then both brace escapes and - * backslash escapes are removed. - * - * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped - * or unescaped. - */ -const unescape = (s, { windowsPathsNoEscape = false, } = {}) => { - return windowsPathsNoEscape - ? s.replace(/\[([^\/\\])\]/g, '$1') - : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1'); -}; - -// parse a single path portion -const types = new Set(['!', '?', '+', '*', '@']); -const isExtglobType = (c) => types.has(c); -// Patterns that get prepended to bind to the start of either the -// entire string, or just a single path portion, to prevent dots -// and/or traversal patterns, when needed. -// Exts don't need the ^ or / bit, because the root binds that already. -const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))'; -const startNoDot = '(?!\\.)'; -// characters that indicate a start of pattern needs the "no dots" bit, -// because a dot *might* be matched. ( is not in the list, because in -// the case of a child extglob, it will handle the prevention itself. -const addPatternStart = new Set(['[', '.']); -// cases where traversal is A-OK, no dot prevention needed -const justDots = new Set(['..', '.']); -const reSpecials = new Set('().*{}+?[]^$\\!'); -const regExpEscape$1 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); -// any single thing other than / -const qmark$1 = '[^/]'; -// * => any number of characters -const star$1 = qmark$1 + '*?'; -// use + when we need to ensure that *something* matches, because the * is -// the only thing in the path portion. -const starNoEmpty = qmark$1 + '+?'; -// remove the \ chars that we added if we end up doing a nonmagic compare -// const deslash = (s: string) => s.replace(/\\(.)/g, '$1') -class AST { - type; - #root; - #hasMagic; - #uflag = false; - #parts = []; - #parent; - #parentIndex; - #negs; - #filledNegs = false; - #options; - #toString; - // set to true if it's an extglob with no children - // (which really means one child of '') - #emptyExt = false; - constructor(type, parent, options = {}) { - this.type = type; - // extglobs are inherently magical - if (type) - this.#hasMagic = true; - this.#parent = parent; - this.#root = this.#parent ? this.#parent.#root : this; - this.#options = this.#root === this ? options : this.#root.#options; - this.#negs = this.#root === this ? [] : this.#root.#negs; - if (type === '!' && !this.#root.#filledNegs) - this.#negs.push(this); - this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; - } - get hasMagic() { - /* c8 ignore start */ - if (this.#hasMagic !== undefined) - return this.#hasMagic; - /* c8 ignore stop */ - for (const p of this.#parts) { - if (typeof p === 'string') - continue; - if (p.type || p.hasMagic) - return (this.#hasMagic = true); - } - // note: will be undefined until we generate the regexp src and find out - return this.#hasMagic; - } - // reconstructs the pattern - toString() { - if (this.#toString !== undefined) - return this.#toString; - if (!this.type) { - return (this.#toString = this.#parts.map(p => String(p)).join('')); - } - else { - return (this.#toString = - this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')'); - } - } - #fillNegs() { - /* c8 ignore start */ - if (this !== this.#root) - throw new Error('should only call on root'); - if (this.#filledNegs) - return this; - /* c8 ignore stop */ - // call toString() once to fill this out - this.toString(); - this.#filledNegs = true; - let n; - while ((n = this.#negs.pop())) { - if (n.type !== '!') - continue; - // walk up the tree, appending everthing that comes AFTER parentIndex - let p = n; - let pp = p.#parent; - while (pp) { - for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { - for (const part of n.#parts) { - /* c8 ignore start */ - if (typeof part === 'string') { - throw new Error('string part in extglob AST??'); - } - /* c8 ignore stop */ - part.copyIn(pp.#parts[i]); - } - } - p = pp; - pp = p.#parent; - } - } - return this; - } - push(...parts) { - for (const p of parts) { - if (p === '') - continue; - /* c8 ignore start */ - if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { - throw new Error('invalid part: ' + p); - } - /* c8 ignore stop */ - this.#parts.push(p); - } - } - toJSON() { - const ret = this.type === null - ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) - : [this.type, ...this.#parts.map(p => p.toJSON())]; - if (this.isStart() && !this.type) - ret.unshift([]); - if (this.isEnd() && - (this === this.#root || - (this.#root.#filledNegs && this.#parent?.type === '!'))) { - ret.push({}); - } - return ret; - } - isStart() { - if (this.#root === this) - return true; - // if (this.type) return !!this.#parent?.isStart() - if (!this.#parent?.isStart()) - return false; - if (this.#parentIndex === 0) - return true; - // if everything AHEAD of this is a negation, then it's still the "start" - const p = this.#parent; - for (let i = 0; i < this.#parentIndex; i++) { - const pp = p.#parts[i]; - if (!(pp instanceof AST && pp.type === '!')) { - return false; - } - } - return true; - } - isEnd() { - if (this.#root === this) - return true; - if (this.#parent?.type === '!') - return true; - if (!this.#parent?.isEnd()) - return false; - if (!this.type) - return this.#parent?.isEnd(); - // if not root, it'll always have a parent - /* c8 ignore start */ - const pl = this.#parent ? this.#parent.#parts.length : 0; - /* c8 ignore stop */ - return this.#parentIndex === pl - 1; - } - copyIn(part) { - if (typeof part === 'string') - this.push(part); - else - this.push(part.clone(this)); - } - clone(parent) { - const c = new AST(this.type, parent); - for (const p of this.#parts) { - c.copyIn(p); - } - return c; - } - static #parseAST(str, ast, pos, opt) { - let escaping = false; - let inBrace = false; - let braceStart = -1; - let braceNeg = false; - if (ast.type === null) { - // outside of a extglob, append until we find a start - let i = pos; - let acc = ''; - while (i < str.length) { - const c = str.charAt(i++); - // still accumulate escapes at this point, but we do ignore - // starts that are escaped - if (escaping || c === '\\') { - escaping = !escaping; - acc += c; - continue; - } - if (inBrace) { - if (i === braceStart + 1) { - if (c === '^' || c === '!') { - braceNeg = true; - } - } - else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { - inBrace = false; - } - acc += c; - continue; - } - else if (c === '[') { - inBrace = true; - braceStart = i; - braceNeg = false; - acc += c; - continue; - } - if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { - ast.push(acc); - acc = ''; - const ext = new AST(c, ast); - i = AST.#parseAST(str, ext, i, opt); - ast.push(ext); - continue; - } - acc += c; - } - ast.push(acc); - return i; - } - // some kind of extglob, pos is at the ( - // find the next | or ) - let i = pos + 1; - let part = new AST(null, ast); - const parts = []; - let acc = ''; - while (i < str.length) { - const c = str.charAt(i++); - // still accumulate escapes at this point, but we do ignore - // starts that are escaped - if (escaping || c === '\\') { - escaping = !escaping; - acc += c; - continue; - } - if (inBrace) { - if (i === braceStart + 1) { - if (c === '^' || c === '!') { - braceNeg = true; - } - } - else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { - inBrace = false; - } - acc += c; - continue; - } - else if (c === '[') { - inBrace = true; - braceStart = i; - braceNeg = false; - acc += c; - continue; - } - if (isExtglobType(c) && str.charAt(i) === '(') { - part.push(acc); - acc = ''; - const ext = new AST(c, part); - part.push(ext); - i = AST.#parseAST(str, ext, i, opt); - continue; - } - if (c === '|') { - part.push(acc); - acc = ''; - parts.push(part); - part = new AST(null, ast); - continue; - } - if (c === ')') { - if (acc === '' && ast.#parts.length === 0) { - ast.#emptyExt = true; - } - part.push(acc); - acc = ''; - ast.push(...parts, part); - return i; - } - acc += c; - } - // unfinished extglob - // if we got here, it was a malformed extglob! not an extglob, but - // maybe something else in there. - ast.type = null; - ast.#hasMagic = undefined; - ast.#parts = [str.substring(pos - 1)]; - return i; - } - static fromGlob(pattern, options = {}) { - const ast = new AST(null, undefined, options); - AST.#parseAST(pattern, ast, 0, options); - return ast; - } - // returns the regular expression if there's magic, or the unescaped - // string if not. - toMMPattern() { - // should only be called on root - /* c8 ignore start */ - if (this !== this.#root) - return this.#root.toMMPattern(); - /* c8 ignore stop */ - const glob = this.toString(); - const [re, body, hasMagic, uflag] = this.toRegExpSource(); - // if we're in nocase mode, and not nocaseMagicOnly, then we do - // still need a regular expression if we have to case-insensitively - // match capital/lowercase characters. - const anyMagic = hasMagic || - this.#hasMagic || - (this.#options.nocase && - !this.#options.nocaseMagicOnly && - glob.toUpperCase() !== glob.toLowerCase()); - if (!anyMagic) { - return body; - } - const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : ''); - return Object.assign(new RegExp(`^${re}$`, flags), { - _src: re, - _glob: glob, - }); - } - get options() { - return this.#options; - } - // returns the string match, the regexp source, whether there's magic - // in the regexp (so a regular expression is required) and whether or - // not the uflag is needed for the regular expression (for posix classes) - // TODO: instead of injecting the start/end at this point, just return - // the BODY of the regexp, along with the start/end portions suitable - // for binding the start/end in either a joined full-path makeRe context - // (where we bind to (^|/), or a standalone matchPart context (where - // we bind to ^, and not /). Otherwise slashes get duped! - // - // In part-matching mode, the start is: - // - if not isStart: nothing - // - if traversal possible, but not allowed: ^(?!\.\.?$) - // - if dots allowed or not possible: ^ - // - if dots possible and not allowed: ^(?!\.) - // end is: - // - if not isEnd(): nothing - // - else: $ - // - // In full-path matching mode, we put the slash at the START of the - // pattern, so start is: - // - if first pattern: same as part-matching mode - // - if not isStart(): nothing - // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) - // - if dots allowed or not possible: / - // - if dots possible and not allowed: /(?!\.) - // end is: - // - if last pattern, same as part-matching mode - // - else nothing - // - // Always put the (?:$|/) on negated tails, though, because that has to be - // there to bind the end of the negated pattern portion, and it's easier to - // just stick it in now rather than try to inject it later in the middle of - // the pattern. - // - // We can just always return the same end, and leave it up to the caller - // to know whether it's going to be used joined or in parts. - // And, if the start is adjusted slightly, can do the same there: - // - if not isStart: nothing - // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) - // - if dots allowed or not possible: (?:/|^) - // - if dots possible and not allowed: (?:/|^)(?!\.) - // - // But it's better to have a simpler binding without a conditional, for - // performance, so probably better to return both start options. - // - // Then the caller just ignores the end if it's not the first pattern, - // and the start always gets applied. - // - // But that's always going to be $ if it's the ending pattern, or nothing, - // so the caller can just attach $ at the end of the pattern when building. - // - // So the todo is: - // - better detect what kind of start is needed - // - return both flavors of starting pattern - // - attach $ at the end of the pattern when creating the actual RegExp - // - // Ah, but wait, no, that all only applies to the root when the first pattern - // is not an extglob. If the first pattern IS an extglob, then we need all - // that dot prevention biz to live in the extglob portions, because eg - // +(*|.x*) can match .xy but not .yx. - // - // So, return the two flavors if it's #root and the first child is not an - // AST, otherwise leave it to the child AST to handle it, and there, - // use the (?:^|/) style of start binding. - // - // Even simplified further: - // - Since the start for a join is eg /(?!\.) and the start for a part - // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root - // or start or whatever) and prepend ^ or / at the Regexp construction. - toRegExpSource(allowDot) { - const dot = allowDot ?? !!this.#options.dot; - if (this.#root === this) - this.#fillNegs(); - if (!this.type) { - const noEmpty = this.isStart() && this.isEnd(); - const src = this.#parts - .map(p => { - const [re, _, hasMagic, uflag] = typeof p === 'string' - ? AST.#parseGlob(p, this.#hasMagic, noEmpty) - : p.toRegExpSource(allowDot); - this.#hasMagic = this.#hasMagic || hasMagic; - this.#uflag = this.#uflag || uflag; - return re; - }) - .join(''); - let start = ''; - if (this.isStart()) { - if (typeof this.#parts[0] === 'string') { - // this is the string that will match the start of the pattern, - // so we need to protect against dots and such. - // '.' and '..' cannot match unless the pattern is that exactly, - // even if it starts with . or dot:true is set. - const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); - if (!dotTravAllowed) { - const aps = addPatternStart; - // check if we have a possibility of matching . or .., - // and prevent that. - const needNoTrav = - // dots are allowed, and the pattern starts with [ or . - (dot && aps.has(src.charAt(0))) || - // the pattern starts with \., and then [ or . - (src.startsWith('\\.') && aps.has(src.charAt(2))) || - // the pattern starts with \.\., and then [ or . - (src.startsWith('\\.\\.') && aps.has(src.charAt(4))); - // no need to prevent dots if it can't match a dot, or if a - // sub-pattern will be preventing it anyway. - const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); - start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; - } - } - } - // append the "end of path portion" pattern to negation tails - let end = ''; - if (this.isEnd() && - this.#root.#filledNegs && - this.#parent?.type === '!') { - end = '(?:$|\\/)'; - } - const final = start + src + end; - return [ - final, - unescape(src), - (this.#hasMagic = !!this.#hasMagic), - this.#uflag, - ]; - } - // We need to calculate the body *twice* if it's a repeat pattern - // at the start, once in nodot mode, then again in dot mode, so a - // pattern like *(?) can match 'x.y' - const repeated = this.type === '*' || this.type === '+'; - // some kind of extglob - const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; - let body = this.#partsToRegExp(dot); - if (this.isStart() && this.isEnd() && !body && this.type !== '!') { - // invalid extglob, has to at least be *something* present, if it's - // the entire path portion. - const s = this.toString(); - this.#parts = [s]; - this.type = null; - this.#hasMagic = undefined; - return [s, unescape(this.toString()), false, false]; - } - // XXX abstract out this map method - let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot - ? '' - : this.#partsToRegExp(true); - if (bodyDotAllowed === body) { - bodyDotAllowed = ''; - } - if (bodyDotAllowed) { - body = `(?:${body})(?:${bodyDotAllowed})*?`; - } - // an empty !() is exactly equivalent to a starNoEmpty - let final = ''; - if (this.type === '!' && this.#emptyExt) { - final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; - } - else { - const close = this.type === '!' - ? // !() must match something,but !(x) can match '' - '))' + - (this.isStart() && !dot && !allowDot ? startNoDot : '') + - star$1 + - ')' - : this.type === '@' - ? ')' - : this.type === '?' - ? ')?' - : this.type === '+' && bodyDotAllowed - ? ')' - : this.type === '*' && bodyDotAllowed - ? `)?` - : `)${this.type}`; - final = start + body + close; - } - return [ - final, - unescape(body), - (this.#hasMagic = !!this.#hasMagic), - this.#uflag, - ]; - } - #partsToRegExp(dot) { - return this.#parts - .map(p => { - // extglob ASTs should only contain parent ASTs - /* c8 ignore start */ - if (typeof p === 'string') { - throw new Error('string type in extglob ast??'); - } - /* c8 ignore stop */ - // can ignore hasMagic, because extglobs are already always magic - const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot); - this.#uflag = this.#uflag || uflag; - return re; - }) - .filter(p => !(this.isStart() && this.isEnd()) || !!p) - .join('|'); - } - static #parseGlob(glob, hasMagic, noEmpty = false) { - let escaping = false; - let re = ''; - let uflag = false; - for (let i = 0; i < glob.length; i++) { - const c = glob.charAt(i); - if (escaping) { - escaping = false; - re += (reSpecials.has(c) ? '\\' : '') + c; - continue; - } - if (c === '\\') { - if (i === glob.length - 1) { - re += '\\\\'; - } - else { - escaping = true; - } - continue; - } - if (c === '[') { - const [src, needUflag, consumed, magic] = parseClass(glob, i); - if (consumed) { - re += src; - uflag = uflag || needUflag; - i += consumed - 1; - hasMagic = hasMagic || magic; - continue; - } - } - if (c === '*') { - if (noEmpty && glob === '*') - re += starNoEmpty; - else - re += star$1; - hasMagic = true; - continue; - } - if (c === '?') { - re += qmark$1; - hasMagic = true; - continue; - } - re += regExpEscape$1(c); - } - return [re, unescape(glob), !!hasMagic, uflag]; - } -} - -/** - * Escape all magic characters in a glob pattern. - * - * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} - * option is used, then characters are escaped by wrapping in `[]`, because - * a magic character wrapped in a character class can only be satisfied by - * that exact character. In this mode, `\` is _not_ escaped, because it is - * not interpreted as a magic character, but instead as a path separator. - */ -const escape = (s, { windowsPathsNoEscape = false, } = {}) => { - // don't need to escape +@! because we escape the parens - // that make those magic, and escaping ! as [!] isn't valid, - // because [!]] is a valid glob class meaning not ']'. - return windowsPathsNoEscape - ? s.replace(/[?*()[\]]/g, '[$&]') - : s.replace(/[?*()[\]\\]/g, '\\$&'); -}; - -const minimatch = (p, pattern, options = {}) => { - assertValidPattern(pattern); - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false; - } - return new Minimatch(pattern, options).match(p); -}; -// Optimized checking for the most common glob patterns. -const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; -const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); -const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); -const starDotExtTestNocase = (ext) => { - ext = ext.toLowerCase(); - return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext); -}; -const starDotExtTestNocaseDot = (ext) => { - ext = ext.toLowerCase(); - return (f) => f.toLowerCase().endsWith(ext); -}; -const starDotStarRE = /^\*+\.\*+$/; -const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.'); -const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.'); -const dotStarRE = /^\.\*+$/; -const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); -const starRE = /^\*+$/; -const starTest = (f) => f.length !== 0 && !f.startsWith('.'); -const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; -const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; -const qmarksTestNocase = ([$0, ext = '']) => { - const noext = qmarksTestNoExt([$0]); - if (!ext) - return noext; - ext = ext.toLowerCase(); - return (f) => noext(f) && f.toLowerCase().endsWith(ext); -}; -const qmarksTestNocaseDot = ([$0, ext = '']) => { - const noext = qmarksTestNoExtDot([$0]); - if (!ext) - return noext; - ext = ext.toLowerCase(); - return (f) => noext(f) && f.toLowerCase().endsWith(ext); -}; -const qmarksTestDot = ([$0, ext = '']) => { - const noext = qmarksTestNoExtDot([$0]); - return !ext ? noext : (f) => noext(f) && f.endsWith(ext); -}; -const qmarksTest = ([$0, ext = '']) => { - const noext = qmarksTestNoExt([$0]); - return !ext ? noext : (f) => noext(f) && f.endsWith(ext); -}; -const qmarksTestNoExt = ([$0]) => { - const len = $0.length; - return (f) => f.length === len && !f.startsWith('.'); -}; -const qmarksTestNoExtDot = ([$0]) => { - const len = $0.length; - return (f) => f.length === len && f !== '.' && f !== '..'; -}; -/* c8 ignore start */ -const defaultPlatform = (typeof process === 'object' && process - ? (typeof process.env === 'object' && - process.env && - process.env.__MINIMATCH_TESTING_PLATFORM__) || - process.platform - : 'posix'); -const path = { - win32: { sep: '\\' }, - posix: { sep: '/' }, -}; -/* c8 ignore stop */ -const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep; -minimatch.sep = sep; -const GLOBSTAR = Symbol('globstar **'); -minimatch.GLOBSTAR = GLOBSTAR; -// any single thing other than / -// don't need to escape / when using new RegExp() -const qmark = '[^/]'; -// * => any number of characters -const star = qmark + '*?'; -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; -const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options); -minimatch.filter = filter; -const ext = (a, b = {}) => Object.assign({}, a, b); -const defaults = (def) => { - if (!def || typeof def !== 'object' || !Object.keys(def).length) { - return minimatch; - } - const orig = minimatch; - const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); - return Object.assign(m, { - Minimatch: class Minimatch extends orig.Minimatch { - constructor(pattern, options = {}) { - super(pattern, ext(def, options)); - } - static defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - } - }, - AST: class AST extends orig.AST { - /* c8 ignore start */ - constructor(type, parent, options = {}) { - super(type, parent, ext(def, options)); - } - /* c8 ignore stop */ - static fromGlob(pattern, options = {}) { - return orig.AST.fromGlob(pattern, ext(def, options)); - } - }, - unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), - escape: (s, options = {}) => orig.escape(s, ext(def, options)), - filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), - defaults: (options) => orig.defaults(ext(def, options)), - makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), - braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), - match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), - sep: orig.sep, - GLOBSTAR: GLOBSTAR, - }); -}; -minimatch.defaults = defaults; -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -const braceExpand = (pattern, options = {}) => { - assertValidPattern(pattern); - // Thanks to Yeting Li <https://github.com/yetingli> for - // improving this regexp to avoid a ReDOS vulnerability. - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - // shortcut. no need to expand. - return [pattern]; - } - return expand(pattern); -}; -minimatch.braceExpand = braceExpand; -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); -minimatch.makeRe = makeRe; -const match = (list, pattern, options = {}) => { - const mm = new Minimatch(pattern, options); - list = list.filter(f => mm.match(f)); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; -}; -minimatch.match = match; -// replace stuff like \* with * -const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; -const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); -class Minimatch { - options; - set; - pattern; - windowsPathsNoEscape; - nonegate; - negate; - comment; - empty; - preserveMultipleSlashes; - partial; - globSet; - globParts; - nocase; - isWindows; - platform; - windowsNoMagicRoot; - regexp; - constructor(pattern, options = {}) { - assertValidPattern(pattern); - options = options || {}; - this.options = options; - this.pattern = pattern; - this.platform = options.platform || defaultPlatform; - this.isWindows = this.platform === 'win32'; - this.windowsPathsNoEscape = - !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; - if (this.windowsPathsNoEscape) { - this.pattern = this.pattern.replace(/\\/g, '/'); - } - this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; - this.regexp = null; - this.negate = false; - this.nonegate = !!options.nonegate; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.nocase = !!this.options.nocase; - this.windowsNoMagicRoot = - options.windowsNoMagicRoot !== undefined - ? options.windowsNoMagicRoot - : !!(this.isWindows && this.nocase); - this.globSet = []; - this.globParts = []; - this.set = []; - // make the set of regexps etc. - this.make(); - } - hasMagic() { - if (this.options.magicalBraces && this.set.length > 1) { - return true; - } - for (const pattern of this.set) { - for (const part of pattern) { - if (typeof part !== 'string') - return true; - } - } - return false; - } - debug(..._) { } - make() { - const pattern = this.pattern; - const options = this.options; - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - // step 1: figure out negation, etc. - this.parseNegate(); - // step 2: expand braces - this.globSet = [...new Set(this.braceExpand())]; - if (options.debug) { - this.debug = (...args) => console.error(...args); - } - this.debug(this.pattern, this.globSet); - // step 3: now we have a set, so turn each one into a series of - // path-portion matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - // - // First, we preprocess to make the glob pattern sets a bit simpler - // and deduped. There are some perf-killing patterns that can cause - // problems with a glob walk, but we can simplify them down a bit. - const rawGlobParts = this.globSet.map(s => this.slashSplit(s)); - this.globParts = this.preprocess(rawGlobParts); - this.debug(this.pattern, this.globParts); - // glob --> regexps - let set = this.globParts.map((s, _, __) => { - if (this.isWindows && this.windowsNoMagicRoot) { - // check if it's a drive or unc path. - const isUNC = s[0] === '' && - s[1] === '' && - (s[2] === '?' || !globMagic.test(s[2])) && - !globMagic.test(s[3]); - const isDrive = /^[a-z]:/i.test(s[0]); - if (isUNC) { - return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; - } - else if (isDrive) { - return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; - } - } - return s.map(ss => this.parse(ss)); - }); - this.debug(this.pattern, set); - // filter out everything that didn't compile properly. - this.set = set.filter(s => s.indexOf(false) === -1); - // do not treat the ? in UNC paths as magic - if (this.isWindows) { - for (let i = 0; i < this.set.length; i++) { - const p = this.set[i]; - if (p[0] === '' && - p[1] === '' && - this.globParts[i][2] === '?' && - typeof p[3] === 'string' && - /^[a-z]:$/i.test(p[3])) { - p[2] = '?'; - } - } - } - this.debug(this.pattern, this.set); - } - // various transforms to equivalent pattern sets that are - // faster to process in a filesystem walk. The goal is to - // eliminate what we can, and push all ** patterns as far - // to the right as possible, even if it increases the number - // of patterns that we have to process. - preprocess(globParts) { - // if we're not in globstar mode, then turn all ** into * - if (this.options.noglobstar) { - for (let i = 0; i < globParts.length; i++) { - for (let j = 0; j < globParts[i].length; j++) { - if (globParts[i][j] === '**') { - globParts[i][j] = '*'; - } - } - } - } - const { optimizationLevel = 1 } = this.options; - if (optimizationLevel >= 2) { - // aggressive optimization for the purpose of fs walking - globParts = this.firstPhasePreProcess(globParts); - globParts = this.secondPhasePreProcess(globParts); - } - else if (optimizationLevel >= 1) { - // just basic optimizations to remove some .. parts - globParts = this.levelOneOptimize(globParts); - } - else { - // just collapse multiple ** portions into one - globParts = this.adjascentGlobstarOptimize(globParts); - } - return globParts; - } - // just get rid of adjascent ** portions - adjascentGlobstarOptimize(globParts) { - return globParts.map(parts => { - let gs = -1; - while (-1 !== (gs = parts.indexOf('**', gs + 1))) { - let i = gs; - while (parts[i + 1] === '**') { - i++; - } - if (i !== gs) { - parts.splice(gs, i - gs); - } - } - return parts; - }); - } - // get rid of adjascent ** and resolve .. portions - levelOneOptimize(globParts) { - return globParts.map(parts => { - parts = parts.reduce((set, part) => { - const prev = set[set.length - 1]; - if (part === '**' && prev === '**') { - return set; - } - if (part === '..') { - if (prev && prev !== '..' && prev !== '.' && prev !== '**') { - set.pop(); - return set; - } - } - set.push(part); - return set; - }, []); - return parts.length === 0 ? [''] : parts; - }); - } - levelTwoFileOptimize(parts) { - if (!Array.isArray(parts)) { - parts = this.slashSplit(parts); - } - let didSomething = false; - do { - didSomething = false; - // <pre>/<e>/<rest> -> <pre>/<rest> - if (!this.preserveMultipleSlashes) { - for (let i = 1; i < parts.length - 1; i++) { - const p = parts[i]; - // don't squeeze out UNC patterns - if (i === 1 && p === '' && parts[0] === '') - continue; - if (p === '.' || p === '') { - didSomething = true; - parts.splice(i, 1); - i--; - } - } - if (parts[0] === '.' && - parts.length === 2 && - (parts[1] === '.' || parts[1] === '')) { - didSomething = true; - parts.pop(); - } - } - // <pre>/<p>/../<rest> -> <pre>/<rest> - let dd = 0; - while (-1 !== (dd = parts.indexOf('..', dd + 1))) { - const p = parts[dd - 1]; - if (p && p !== '.' && p !== '..' && p !== '**') { - didSomething = true; - parts.splice(dd - 1, 2); - dd -= 2; - } - } - } while (didSomething); - return parts.length === 0 ? [''] : parts; - } - // First phase: single-pattern processing - // <pre> is 1 or more portions - // <rest> is 1 or more portions - // <p> is any portion other than ., .., '', or ** - // <e> is . or '' - // - // **/.. is *brutal* for filesystem walking performance, because - // it effectively resets the recursive walk each time it occurs, - // and ** cannot be reduced out by a .. pattern part like a regexp - // or most strings (other than .., ., and '') can be. - // - // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>} - // <pre>/<e>/<rest> -> <pre>/<rest> - // <pre>/<p>/../<rest> -> <pre>/<rest> - // **/**/<rest> -> **/<rest> - // - // **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow - // this WOULD be allowed if ** did follow symlinks, or * didn't - firstPhasePreProcess(globParts) { - let didSomething = false; - do { - didSomething = false; - // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>} - for (let parts of globParts) { - let gs = -1; - while (-1 !== (gs = parts.indexOf('**', gs + 1))) { - let gss = gs; - while (parts[gss + 1] === '**') { - // <pre>/**/**/<rest> -> <pre>/**/<rest> - gss++; - } - // eg, if gs is 2 and gss is 4, that means we have 3 ** - // parts, and can remove 2 of them. - if (gss > gs) { - parts.splice(gs + 1, gss - gs); - } - let next = parts[gs + 1]; - const p = parts[gs + 2]; - const p2 = parts[gs + 3]; - if (next !== '..') - continue; - if (!p || - p === '.' || - p === '..' || - !p2 || - p2 === '.' || - p2 === '..') { - continue; - } - didSomething = true; - // edit parts in place, and push the new one - parts.splice(gs, 1); - const other = parts.slice(0); - other[gs] = '**'; - globParts.push(other); - gs--; - } - // <pre>/<e>/<rest> -> <pre>/<rest> - if (!this.preserveMultipleSlashes) { - for (let i = 1; i < parts.length - 1; i++) { - const p = parts[i]; - // don't squeeze out UNC patterns - if (i === 1 && p === '' && parts[0] === '') - continue; - if (p === '.' || p === '') { - didSomething = true; - parts.splice(i, 1); - i--; - } - } - if (parts[0] === '.' && - parts.length === 2 && - (parts[1] === '.' || parts[1] === '')) { - didSomething = true; - parts.pop(); - } - } - // <pre>/<p>/../<rest> -> <pre>/<rest> - let dd = 0; - while (-1 !== (dd = parts.indexOf('..', dd + 1))) { - const p = parts[dd - 1]; - if (p && p !== '.' && p !== '..' && p !== '**') { - didSomething = true; - const needDot = dd === 1 && parts[dd + 1] === '**'; - const splin = needDot ? ['.'] : []; - parts.splice(dd - 1, 2, ...splin); - if (parts.length === 0) - parts.push(''); - dd -= 2; - } - } - } - } while (didSomething); - return globParts; - } - // second phase: multi-pattern dedupes - // {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest> - // {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest> - // {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest> - // - // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest> - // ^-- not valid because ** doens't follow symlinks - secondPhasePreProcess(globParts) { - for (let i = 0; i < globParts.length - 1; i++) { - for (let j = i + 1; j < globParts.length; j++) { - const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes); - if (matched) { - globParts[i] = []; - globParts[j] = matched; - break; - } - } - } - return globParts.filter(gs => gs.length); - } - partsMatch(a, b, emptyGSMatch = false) { - let ai = 0; - let bi = 0; - let result = []; - let which = ''; - while (ai < a.length && bi < b.length) { - if (a[ai] === b[bi]) { - result.push(which === 'b' ? b[bi] : a[ai]); - ai++; - bi++; - } - else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) { - result.push(a[ai]); - ai++; - } - else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) { - result.push(b[bi]); - bi++; - } - else if (a[ai] === '*' && - b[bi] && - (this.options.dot || !b[bi].startsWith('.')) && - b[bi] !== '**') { - if (which === 'b') - return false; - which = 'a'; - result.push(a[ai]); - ai++; - bi++; - } - else if (b[bi] === '*' && - a[ai] && - (this.options.dot || !a[ai].startsWith('.')) && - a[ai] !== '**') { - if (which === 'a') - return false; - which = 'b'; - result.push(b[bi]); - ai++; - bi++; - } - else { - return false; - } - } - // if we fall out of the loop, it means they two are identical - // as long as their lengths match - return a.length === b.length && result; - } - parseNegate() { - if (this.nonegate) - return; - const pattern = this.pattern; - let negate = false; - let negateOffset = 0; - for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) { - negate = !negate; - negateOffset++; - } - if (negateOffset) - this.pattern = pattern.slice(negateOffset); - this.negate = negate; - } - // set partial to true to test if, for example, - // "/a/b" matches the start of "/*/b/*/d" - // Partial means, if you run out of file before you run - // out of pattern, then that's fine, as long as all - // the parts match. - matchOne(file, pattern, partial = false) { - const options = this.options; - // UNC paths like //?/X:/... can match X:/... and vice versa - // Drive letters in absolute drive or unc paths are always compared - // case-insensitively. - if (this.isWindows) { - const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]); - const fileUNC = !fileDrive && - file[0] === '' && - file[1] === '' && - file[2] === '?' && - /^[a-z]:$/i.test(file[3]); - const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]); - const patternUNC = !patternDrive && - pattern[0] === '' && - pattern[1] === '' && - pattern[2] === '?' && - typeof pattern[3] === 'string' && - /^[a-z]:$/i.test(pattern[3]); - const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined; - const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined; - if (typeof fdi === 'number' && typeof pdi === 'number') { - const [fd, pd] = [file[fdi], pattern[pdi]]; - if (fd.toLowerCase() === pd.toLowerCase()) { - pattern[pdi] = fd; - if (pdi > fdi) { - pattern = pattern.slice(pdi); - } - else if (fdi > pdi) { - file = file.slice(fdi); - } - } - } - } - // resolve and reduce . and .. portions in the file as well. - // dont' need to do the second phase, because it's only one string[] - const { optimizationLevel = 1 } = this.options; - if (optimizationLevel >= 2) { - file = this.levelTwoFileOptimize(file); - } - this.debug('matchOne', this, { file, pattern }); - this.debug('matchOne', file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug('matchOne loop'); - var p = pattern[pi]; - var f = file[fi]; - this.debug(pattern, p, f); - // should be impossible. - // some invalid regexp stuff in the set. - /* c8 ignore start */ - if (p === false) { - return false; - } - /* c8 ignore stop */ - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]); - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug('** at the end'); - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || - file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) - return false; - } - return true; - } - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr]; - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee); - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee); - // found a match. - return true; - } - else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || - swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr); - break; - } - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue'); - fr++; - } - } - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - /* c8 ignore start */ - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr); - if (fr === fl) { - return true; - } - } - /* c8 ignore stop */ - return false; - } - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - let hit; - if (typeof p === 'string') { - hit = f === p; - this.debug('string match', p, f, hit); - } - else { - hit = p.test(f); - this.debug('pattern match', p, f, hit); - } - if (!hit) - return false; - } - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true; - } - else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial; - } - else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - return fi === fl - 1 && file[fi] === ''; - /* c8 ignore start */ - } - else { - // should be unreachable. - throw new Error('wtf?'); - } - /* c8 ignore stop */ - } - braceExpand() { - return braceExpand(this.pattern, this.options); - } - parse(pattern) { - assertValidPattern(pattern); - const options = this.options; - // shortcuts - if (pattern === '**') - return GLOBSTAR; - if (pattern === '') - return ''; - // far and away, the most common glob pattern parts are - // *, *.*, and *.<ext> Add a fast check method for those. - let m; - let fastTest = null; - if ((m = pattern.match(starRE))) { - fastTest = options.dot ? starTestDot : starTest; - } - else if ((m = pattern.match(starDotExtRE))) { - fastTest = (options.nocase - ? options.dot - ? starDotExtTestNocaseDot - : starDotExtTestNocase - : options.dot - ? starDotExtTestDot - : starDotExtTest)(m[1]); - } - else if ((m = pattern.match(qmarksRE))) { - fastTest = (options.nocase - ? options.dot - ? qmarksTestNocaseDot - : qmarksTestNocase - : options.dot - ? qmarksTestDot - : qmarksTest)(m); - } - else if ((m = pattern.match(starDotStarRE))) { - fastTest = options.dot ? starDotStarTestDot : starDotStarTest; - } - else if ((m = pattern.match(dotStarRE))) { - fastTest = dotStarTest; - } - const re = AST.fromGlob(pattern, this.options).toMMPattern(); - if (fastTest && typeof re === 'object') { - // Avoids overriding in frozen environments - Reflect.defineProperty(re, 'test', { value: fastTest }); - } - return re; - } - makeRe() { - if (this.regexp || this.regexp === false) - return this.regexp; - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - const set = this.set; - if (!set.length) { - this.regexp = false; - return this.regexp; - } - const options = this.options; - const twoStar = options.noglobstar - ? star - : options.dot - ? twoStarDot - : twoStarNoDot; - const flags = new Set(options.nocase ? ['i'] : []); - // regexpify non-globstar patterns - // if ** is only item, then we just do one twoStar - // if ** is first, and there are more, prepend (\/|twoStar\/)? to next - // if ** is last, append (\/twoStar|) to previous - // if ** is in the middle, append (\/|\/twoStar\/) to previous - // then filter out GLOBSTAR symbols - let re = set - .map(pattern => { - const pp = pattern.map(p => { - if (p instanceof RegExp) { - for (const f of p.flags.split('')) - flags.add(f); - } - return typeof p === 'string' - ? regExpEscape(p) - : p === GLOBSTAR - ? GLOBSTAR - : p._src; - }); - pp.forEach((p, i) => { - const next = pp[i + 1]; - const prev = pp[i - 1]; - if (p !== GLOBSTAR || prev === GLOBSTAR) { - return; - } - if (prev === undefined) { - if (next !== undefined && next !== GLOBSTAR) { - pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next; - } - else { - pp[i] = twoStar; - } - } - else if (next === undefined) { - pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?'; - } - else if (next !== GLOBSTAR) { - pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next; - pp[i + 1] = GLOBSTAR; - } - }); - return pp.filter(p => p !== GLOBSTAR).join('/'); - }) - .join('|'); - // need to wrap in parens if we had more than one thing with |, - // otherwise only the first will be anchored to ^ and the last to $ - const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']; - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^' + open + re + close + '$'; - // can match anything, as long as it's not this. - if (this.negate) - re = '^(?!' + re + ').+$'; - try { - this.regexp = new RegExp(re, [...flags].join('')); - /* c8 ignore start */ - } - catch (ex) { - // should be impossible - this.regexp = false; - } - /* c8 ignore stop */ - return this.regexp; - } - slashSplit(p) { - // if p starts with // on windows, we preserve that - // so that UNC paths aren't broken. Otherwise, any number of - // / characters are coalesced into one, unless - // preserveMultipleSlashes is set to true. - if (this.preserveMultipleSlashes) { - return p.split('/'); - } - else if (this.isWindows && /^\/\/[^\/]+/.test(p)) { - // add an extra '' for the one we lose - return ['', ...p.split(/\/+/)]; - } - else { - return p.split(/\/+/); - } - } - match(f, partial = this.partial) { - this.debug('match', f, this.pattern); - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) { - return false; - } - if (this.empty) { - return f === ''; - } - if (f === '/' && partial) { - return true; - } - const options = this.options; - // windows: need to use /, not \ - if (this.isWindows) { - f = f.split('\\').join('/'); - } - // treat the test path as a set of pathparts. - const ff = this.slashSplit(f); - this.debug(this.pattern, 'split', ff); - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - const set = this.set; - this.debug(this.pattern, 'set', set); - // Find the basename of the path by looking for the last non-empty segment - let filename = ff[ff.length - 1]; - if (!filename) { - for (let i = ff.length - 2; !filename && i >= 0; i--) { - filename = ff[i]; - } - } - for (let i = 0; i < set.length; i++) { - const pattern = set[i]; - let file = ff; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - const hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) { - return true; - } - return !this.negate; - } - } - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) { - return false; - } - return this.negate; - } - static defaults(def) { - return minimatch.defaults(def).Minimatch; - } -} -/* c8 ignore stop */ -minimatch.AST = AST; -minimatch.Minimatch = Minimatch; -minimatch.escape = escape; -minimatch.unescape = unescape; - -class TypeScope { - constructor(filename, source, offset = 0, imports = /* @__PURE__ */ Object.create(null), types = /* @__PURE__ */ Object.create(null), declares = /* @__PURE__ */ Object.create(null)) { - this.filename = filename; - this.source = source; - this.offset = offset; - this.imports = imports; - this.types = types; - this.declares = declares; - this.isGenericScope = false; - this.resolvedImportSources = /* @__PURE__ */ Object.create(null); - this.exportedTypes = /* @__PURE__ */ Object.create(null); - this.exportedDeclares = /* @__PURE__ */ Object.create(null); - } -} -function resolveTypeElements(ctx, node, scope, typeParameters) { - const canCache = !typeParameters; - if (canCache && node._resolvedElements) { - return node._resolvedElements; - } - const resolved = innerResolveTypeElements( - ctx, - node, - node._ownerScope || scope || ctxToScope(ctx), - typeParameters - ); - return canCache ? node._resolvedElements = resolved : resolved; -} -function innerResolveTypeElements(ctx, node, scope, typeParameters) { - var _a, _b; - if (node.leadingComments && node.leadingComments.some((c) => c.value.includes("@vue-ignore"))) { - return { props: {} }; - } - switch (node.type) { - case "TSTypeLiteral": - return typeElementsToMap(ctx, node.members, scope, typeParameters); - case "TSInterfaceDeclaration": - return resolveInterfaceMembers(ctx, node, scope, typeParameters); - case "TSTypeAliasDeclaration": - case "TSTypeAnnotation": - case "TSParenthesizedType": - return resolveTypeElements( - ctx, - node.typeAnnotation, - scope, - typeParameters - ); - case "TSFunctionType": { - return { props: {}, calls: [node] }; - } - case "TSUnionType": - case "TSIntersectionType": - return mergeElements( - node.types.map((t) => resolveTypeElements(ctx, t, scope, typeParameters)), - node.type - ); - case "TSMappedType": - return resolveMappedType(ctx, node, scope, typeParameters); - case "TSIndexedAccessType": { - const types = resolveIndexType(ctx, node, scope); - return mergeElements( - types.map((t) => resolveTypeElements(ctx, t, t._ownerScope)), - "TSUnionType" - ); - } - case "TSExpressionWithTypeArguments": - // referenced by interface extends - case "TSTypeReference": { - const typeName = getReferenceName(node); - if ((typeName === "ExtractPropTypes" || typeName === "ExtractPublicPropTypes") && node.typeParameters && ((_a = scope.imports[typeName]) == null ? void 0 : _a.source) === "vue") { - return resolveExtractPropTypes( - resolveTypeElements( - ctx, - node.typeParameters.params[0], - scope, - typeParameters - ), - scope - ); - } - const resolved = resolveTypeReference(ctx, node, scope); - if (resolved) { - let typeParams; - if ((resolved.type === "TSTypeAliasDeclaration" || resolved.type === "TSInterfaceDeclaration") && resolved.typeParameters && node.typeParameters) { - typeParams = /* @__PURE__ */ Object.create(null); - resolved.typeParameters.params.forEach((p, i) => { - let param = typeParameters && typeParameters[p.name]; - if (!param) param = node.typeParameters.params[i]; - typeParams[p.name] = param; - }); - } - return resolveTypeElements( - ctx, - resolved, - resolved._ownerScope, - typeParams - ); - } else { - if (typeof typeName === "string") { - if (typeParameters && typeParameters[typeName]) { - return resolveTypeElements( - ctx, - typeParameters[typeName], - scope, - typeParameters - ); - } - if ( - // @ts-expect-error - SupportedBuiltinsSet.has(typeName) - ) { - return resolveBuiltin( - ctx, - node, - typeName, - scope, - typeParameters - ); - } else if (typeName === "ReturnType" && node.typeParameters) { - const ret = resolveReturnType( - ctx, - node.typeParameters.params[0], - scope - ); - if (ret) { - return resolveTypeElements(ctx, ret, scope); - } - } - } - return ctx.error( - `Unresolvable type reference or unsupported built-in utility type`, - node, - scope - ); - } - } - case "TSImportType": { - if (getId(node.argument) === "vue" && ((_b = node.qualifier) == null ? void 0 : _b.type) === "Identifier" && node.qualifier.name === "ExtractPropTypes" && node.typeParameters) { - return resolveExtractPropTypes( - resolveTypeElements(ctx, node.typeParameters.params[0], scope), - scope - ); - } - const sourceScope = importSourceToScope( - ctx, - node.argument, - scope, - node.argument.value - ); - const resolved = resolveTypeReference(ctx, node, sourceScope); - if (resolved) { - return resolveTypeElements(ctx, resolved, resolved._ownerScope); - } - break; - } - case "TSTypeQuery": - { - const resolved = resolveTypeReference(ctx, node, scope); - if (resolved) { - return resolveTypeElements(ctx, resolved, resolved._ownerScope); - } - } - break; - } - return ctx.error(`Unresolvable type: ${node.type}`, node, scope); -} -function typeElementsToMap(ctx, elements, scope = ctxToScope(ctx), typeParameters) { - const res = { props: {} }; - for (const e of elements) { - if (e.type === "TSPropertySignature" || e.type === "TSMethodSignature") { - if (typeParameters) { - scope = createChildScope(scope); - scope.isGenericScope = true; - Object.assign(scope.types, typeParameters); - } - e._ownerScope = scope; - const name = getId(e.key); - if (name && !e.computed) { - res.props[name] = e; - } else if (e.key.type === "TemplateLiteral") { - for (const key of resolveTemplateKeys(ctx, e.key, scope)) { - res.props[key] = e; - } - } else { - ctx.error( - `Unsupported computed key in type referenced by a macro`, - e.key, - scope - ); - } - } else if (e.type === "TSCallSignatureDeclaration") { - (res.calls || (res.calls = [])).push(e); - } - } - return res; -} -function mergeElements(maps, type) { - if (maps.length === 1) return maps[0]; - const res = { props: {} }; - const { props: baseProps } = res; - for (const { props, calls } of maps) { - for (const key in props) { - if (!shared.hasOwn(baseProps, key)) { - baseProps[key] = props[key]; - } else { - baseProps[key] = createProperty( - baseProps[key].key, - { - type, - // @ts-expect-error - types: [baseProps[key], props[key]] - }, - baseProps[key]._ownerScope, - baseProps[key].optional || props[key].optional - ); - } - } - if (calls) { - (res.calls || (res.calls = [])).push(...calls); - } - } - return res; -} -function createProperty(key, typeAnnotation, scope, optional) { - return { - type: "TSPropertySignature", - key, - kind: "get", - optional, - typeAnnotation: { - type: "TSTypeAnnotation", - typeAnnotation - }, - _ownerScope: scope - }; -} -function resolveInterfaceMembers(ctx, node, scope, typeParameters) { - const base = typeElementsToMap( - ctx, - node.body.body, - node._ownerScope, - typeParameters - ); - if (node.extends) { - for (const ext of node.extends) { - try { - const { props, calls } = resolveTypeElements(ctx, ext, scope); - for (const key in props) { - if (!shared.hasOwn(base.props, key)) { - base.props[key] = props[key]; - } - } - if (calls) { - ; - (base.calls || (base.calls = [])).push(...calls); - } - } catch (e) { - ctx.error( - `Failed to resolve extends base type. -If this previously worked in 3.2, you can instruct the compiler to ignore this extend by adding /* @vue-ignore */ before it, for example: - -interface Props extends /* @vue-ignore */ Base {} - -Note: both in 3.2 or with the ignore, the properties in the base type are treated as fallthrough attrs at runtime.`, - ext, - scope - ); - } - } - } - return base; -} -function resolveMappedType(ctx, node, scope, typeParameters) { - const res = { props: {} }; - let keys; - if (node.nameType) { - const { name, constraint } = node.typeParameter; - scope = createChildScope(scope); - Object.assign(scope.types, { ...typeParameters, [name]: constraint }); - keys = resolveStringType(ctx, node.nameType, scope); - } else { - keys = resolveStringType(ctx, node.typeParameter.constraint, scope); - } - for (const key of keys) { - res.props[key] = createProperty( - { - type: "Identifier", - name: key - }, - node.typeAnnotation, - scope, - !!node.optional - ); - } - return res; -} -function resolveIndexType(ctx, node, scope) { - var _a, _b; - if (node.indexType.type === "TSNumberKeyword") { - return resolveArrayElementType(ctx, node.objectType, scope); - } - const { indexType, objectType } = node; - const types = []; - let keys; - let resolved; - if (indexType.type === "TSStringKeyword") { - resolved = resolveTypeElements(ctx, objectType, scope); - keys = Object.keys(resolved.props); - } else { - keys = resolveStringType(ctx, indexType, scope); - resolved = resolveTypeElements(ctx, objectType, scope); - } - for (const key of keys) { - const targetType = (_b = (_a = resolved.props[key]) == null ? void 0 : _a.typeAnnotation) == null ? void 0 : _b.typeAnnotation; - if (targetType) { - targetType._ownerScope = resolved.props[key]._ownerScope; - types.push(targetType); - } - } - return types; -} -function resolveArrayElementType(ctx, node, scope) { - if (node.type === "TSArrayType") { - return [node.elementType]; - } - if (node.type === "TSTupleType") { - return node.elementTypes.map( - (t) => t.type === "TSNamedTupleMember" ? t.elementType : t - ); - } - if (node.type === "TSTypeReference") { - if (getReferenceName(node) === "Array" && node.typeParameters) { - return node.typeParameters.params; - } else { - const resolved = resolveTypeReference(ctx, node, scope); - if (resolved) { - return resolveArrayElementType(ctx, resolved, scope); - } - } - } - return ctx.error( - "Failed to resolve element type from target type", - node, - scope - ); -} -function resolveStringType(ctx, node, scope) { - switch (node.type) { - case "StringLiteral": - return [node.value]; - case "TSLiteralType": - return resolveStringType(ctx, node.literal, scope); - case "TSUnionType": - return node.types.map((t) => resolveStringType(ctx, t, scope)).flat(); - case "TemplateLiteral": { - return resolveTemplateKeys(ctx, node, scope); - } - case "TSTypeReference": { - const resolved = resolveTypeReference(ctx, node, scope); - if (resolved) { - return resolveStringType(ctx, resolved, scope); - } - if (node.typeName.type === "Identifier") { - const getParam = (index = 0) => resolveStringType(ctx, node.typeParameters.params[index], scope); - switch (node.typeName.name) { - case "Extract": - return getParam(1); - case "Exclude": { - const excluded = getParam(1); - return getParam().filter((s) => !excluded.includes(s)); - } - case "Uppercase": - return getParam().map((s) => s.toUpperCase()); - case "Lowercase": - return getParam().map((s) => s.toLowerCase()); - case "Capitalize": - return getParam().map(shared.capitalize); - case "Uncapitalize": - return getParam().map((s) => s[0].toLowerCase() + s.slice(1)); - default: - ctx.error( - "Unsupported type when resolving index type", - node.typeName, - scope - ); - } - } - } - } - return ctx.error("Failed to resolve index type into finite keys", node, scope); -} -function resolveTemplateKeys(ctx, node, scope) { - if (!node.expressions.length) { - return [node.quasis[0].value.raw]; - } - const res = []; - const e = node.expressions[0]; - const q = node.quasis[0]; - const leading = q ? q.value.raw : ``; - const resolved = resolveStringType(ctx, e, scope); - const restResolved = resolveTemplateKeys( - ctx, - { - ...node, - expressions: node.expressions.slice(1), - quasis: q ? node.quasis.slice(1) : node.quasis - }, - scope - ); - for (const r of resolved) { - for (const rr of restResolved) { - res.push(leading + r + rr); - } - } - return res; -} -const SupportedBuiltinsSet = /* @__PURE__ */ new Set([ - "Partial", - "Required", - "Readonly", - "Pick", - "Omit" -]); -function resolveBuiltin(ctx, node, name, scope, typeParameters) { - const t = resolveTypeElements( - ctx, - node.typeParameters.params[0], - scope, - typeParameters - ); - switch (name) { - case "Partial": { - const res2 = { props: {}, calls: t.calls }; - Object.keys(t.props).forEach((key) => { - res2.props[key] = { ...t.props[key], optional: true }; - }); - return res2; - } - case "Required": { - const res2 = { props: {}, calls: t.calls }; - Object.keys(t.props).forEach((key) => { - res2.props[key] = { ...t.props[key], optional: false }; - }); - return res2; - } - case "Readonly": - return t; - case "Pick": { - const picked = resolveStringType( - ctx, - node.typeParameters.params[1], - scope - ); - const res2 = { props: {}, calls: t.calls }; - for (const key of picked) { - res2.props[key] = t.props[key]; - } - return res2; - } - case "Omit": - const omitted = resolveStringType( - ctx, - node.typeParameters.params[1], - scope - ); - const res = { props: {}, calls: t.calls }; - for (const key in t.props) { - if (!omitted.includes(key)) { - res.props[key] = t.props[key]; - } - } - return res; - } -} -function resolveTypeReference(ctx, node, scope, name, onlyExported = false) { - const canCache = !(scope == null ? void 0 : scope.isGenericScope); - if (canCache && node._resolvedReference) { - return node._resolvedReference; - } - const resolved = innerResolveTypeReference( - ctx, - scope || ctxToScope(ctx), - name || getReferenceName(node), - node, - onlyExported - ); - return canCache ? node._resolvedReference = resolved : resolved; -} -function innerResolveTypeReference(ctx, scope, name, node, onlyExported) { - if (typeof name === "string") { - if (scope.imports[name]) { - return resolveTypeFromImport(ctx, node, name, scope); - } else { - const lookupSource = node.type === "TSTypeQuery" ? onlyExported ? scope.exportedDeclares : scope.declares : onlyExported ? scope.exportedTypes : scope.types; - if (lookupSource[name]) { - return lookupSource[name]; - } else { - const globalScopes = resolveGlobalScope(ctx); - if (globalScopes) { - for (const s of globalScopes) { - const src = node.type === "TSTypeQuery" ? s.declares : s.types; - if (src[name]) { - (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(s.filename); - return src[name]; - } - } - } - } - } - } else { - let ns = innerResolveTypeReference(ctx, scope, name[0], node, onlyExported); - if (ns) { - if (ns.type !== "TSModuleDeclaration") { - ns = ns._ns; - } - if (ns) { - const childScope = moduleDeclToScope(ctx, ns, ns._ownerScope || scope); - return innerResolveTypeReference( - ctx, - childScope, - name.length > 2 ? name.slice(1) : name[name.length - 1], - node, - !ns.declare - ); - } - } - } -} -function getReferenceName(node) { - const ref = node.type === "TSTypeReference" ? node.typeName : node.type === "TSExpressionWithTypeArguments" ? node.expression : node.type === "TSImportType" ? node.qualifier : node.exprName; - if ((ref == null ? void 0 : ref.type) === "Identifier") { - return ref.name; - } else if ((ref == null ? void 0 : ref.type) === "TSQualifiedName") { - return qualifiedNameToPath(ref); - } else { - return "default"; - } -} -function qualifiedNameToPath(node) { - if (node.type === "Identifier") { - return [node.name]; - } else { - return [...qualifiedNameToPath(node.left), node.right.name]; - } -} -function resolveGlobalScope(ctx) { - if (ctx.options.globalTypeFiles) { - const fs = resolveFS(ctx); - if (!fs) { - throw new Error("[vue/compiler-sfc] globalTypeFiles requires fs access."); - } - return ctx.options.globalTypeFiles.map( - (file) => fileToScope(ctx, normalizePath(file), true) - ); - } -} -let ts; -let loadTS; -function registerTS(_loadTS) { - loadTS = () => { - try { - return _loadTS(); - } catch (err) { - if (typeof err.message === "string" && err.message.includes("Cannot find module")) { - throw new Error( - 'Failed to load TypeScript, which is required for resolving imported types. Please make sure "typescript" is installed as a project dependency.' - ); - } else { - throw new Error( - "Failed to load TypeScript for resolving imported types." - ); - } - } - }; -} -function resolveFS(ctx) { - if (ctx.fs) { - return ctx.fs; - } - if (!ts && loadTS) { - ts = loadTS(); - } - const fs = ctx.options.fs || (ts == null ? void 0 : ts.sys); - if (!fs) { - return; - } - return ctx.fs = { - fileExists(file) { - if (file.endsWith(".vue.ts")) { - file = file.replace(/\.ts$/, ""); - } - return fs.fileExists(file); - }, - readFile(file) { - if (file.endsWith(".vue.ts")) { - file = file.replace(/\.ts$/, ""); - } - return fs.readFile(file); - }, - realpath: fs.realpath - }; -} -function resolveTypeFromImport(ctx, node, name, scope) { - const { source, imported } = scope.imports[name]; - const sourceScope = importSourceToScope(ctx, node, scope, source); - return resolveTypeReference(ctx, node, sourceScope, imported, true); -} -function importSourceToScope(ctx, node, scope, source) { - let fs; - try { - fs = resolveFS(ctx); - } catch (err) { - return ctx.error(err.message, node, scope); - } - if (!fs) { - return ctx.error( - `No fs option provided to \`compileScript\` in non-Node environment. File system access is required for resolving imported types.`, - node, - scope - ); - } - let resolved = scope.resolvedImportSources[source]; - if (!resolved) { - if (source.startsWith("..")) { - const osSpecificJoinFn = process__namespace.platform === "win32" ? path$1.join : joinPaths; - const filename = osSpecificJoinFn(path$1.dirname(scope.filename), source); - resolved = resolveExt(filename, fs); - } else if (source[0] === ".") { - const filename = joinPaths(path$1.dirname(scope.filename), source); - resolved = resolveExt(filename, fs); - } else { - if (!ts) { - if (loadTS) ts = loadTS(); - if (!ts) { - return ctx.error( - `Failed to resolve import source ${JSON.stringify(source)}. typescript is required as a peer dep for vue in order to support resolving types from module imports.`, - node, - scope - ); - } - } - resolved = resolveWithTS(scope.filename, source, ts, fs); - } - if (resolved) { - resolved = scope.resolvedImportSources[source] = normalizePath(resolved); - } - } - if (resolved) { - (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(resolved); - return fileToScope(ctx, resolved); - } else { - return ctx.error( - `Failed to resolve import source ${JSON.stringify(source)}.`, - node, - scope - ); - } -} -function resolveExt(filename, fs) { - filename = filename.replace(/\.js$/, ""); - const tryResolve = (filename2) => { - if (fs.fileExists(filename2)) return filename2; - }; - return tryResolve(filename) || tryResolve(filename + `.ts`) || tryResolve(filename + `.tsx`) || tryResolve(filename + `.d.ts`) || tryResolve(joinPaths(filename, `index.ts`)) || tryResolve(joinPaths(filename, `index.tsx`)) || tryResolve(joinPaths(filename, `index.d.ts`)); -} -const tsConfigCache = createCache(); -const tsConfigRefMap = /* @__PURE__ */ new Map(); -function resolveWithTS(containingFile, source, ts2, fs) { - var _a, _b; - const configPath = ts2.findConfigFile(containingFile, fs.fileExists); - let tsCompilerOptions; - let tsResolveCache; - if (configPath) { - let configs; - const normalizedConfigPath = normalizePath(configPath); - const cached = tsConfigCache.get(normalizedConfigPath); - if (!cached) { - configs = loadTSConfig(configPath, ts2, fs).map((config) => ({ config })); - tsConfigCache.set(normalizedConfigPath, configs); - } else { - configs = cached; - } - let matchedConfig; - if (configs.length === 1) { - matchedConfig = configs[0]; - } else { - for (const c of configs) { - const base = normalizePath( - c.config.options.pathsBasePath || path$1.dirname(c.config.options.configFilePath) - ); - const included = (_a = c.config.raw) == null ? void 0 : _a.include; - const excluded = (_b = c.config.raw) == null ? void 0 : _b.exclude; - if (!included && (!base || containingFile.startsWith(base)) || (included == null ? void 0 : included.some((p) => minimatch(containingFile, joinPaths(base, p))))) { - if (excluded && excluded.some((p) => minimatch(containingFile, joinPaths(base, p)))) { - continue; - } - matchedConfig = c; - break; - } - } - if (!matchedConfig) { - matchedConfig = configs[configs.length - 1]; - } - } - tsCompilerOptions = matchedConfig.config.options; - tsResolveCache = matchedConfig.cache || (matchedConfig.cache = ts2.createModuleResolutionCache( - process__namespace.cwd(), - createGetCanonicalFileName(ts2.sys.useCaseSensitiveFileNames), - tsCompilerOptions - )); - } else { - tsCompilerOptions = {}; - } - const res = ts2.resolveModuleName( - source, - containingFile, - tsCompilerOptions, - fs, - tsResolveCache - ); - if (res.resolvedModule) { - let filename = res.resolvedModule.resolvedFileName; - if (filename.endsWith(".vue.ts")) { - filename = filename.replace(/\.ts$/, ""); - } - return fs.realpath ? fs.realpath(filename) : filename; - } -} -function loadTSConfig(configPath, ts2, fs, visited = /* @__PURE__ */ new Set()) { - const parseConfigHost = ts2.sys; - const config = ts2.parseJsonConfigFileContent( - ts2.readConfigFile(configPath, fs.readFile).config, - parseConfigHost, - path$1.dirname(configPath), - void 0, - configPath - ); - const res = [config]; - visited.add(configPath); - if (config.projectReferences) { - for (const ref of config.projectReferences) { - const refPath = ts2.resolveProjectReferencePath(ref); - if (visited.has(refPath) || !fs.fileExists(refPath)) { - continue; - } - tsConfigRefMap.set(refPath, configPath); - res.unshift(...loadTSConfig(refPath, ts2, fs, visited)); - } - } - return res; -} -const fileToScopeCache = createCache(); -function invalidateTypeCache(filename) { - filename = normalizePath(filename); - fileToScopeCache.delete(filename); - tsConfigCache.delete(filename); - const affectedConfig = tsConfigRefMap.get(filename); - if (affectedConfig) tsConfigCache.delete(affectedConfig); -} -function fileToScope(ctx, filename, asGlobal = false) { - const cached = fileToScopeCache.get(filename); - if (cached) { - return cached; - } - const fs = resolveFS(ctx); - const source = fs.readFile(filename) || ""; - const body = parseFile(filename, source, ctx.options.babelParserPlugins); - const scope = new TypeScope(filename, source, 0, recordImports(body)); - recordTypes(ctx, body, scope, asGlobal); - fileToScopeCache.set(filename, scope); - return scope; -} -function parseFile(filename, content, parserPlugins) { - const ext = path$1.extname(filename); - if (ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".mtsx") { - return parser$2.parse(content, { - plugins: resolveParserPlugins( - ext.slice(1), - parserPlugins, - /\.d\.m?ts$/.test(filename) - ), - sourceType: "module" - }).program.body; - } else if (ext === ".vue") { - const { - descriptor: { script, scriptSetup } - } = parse$1(content); - if (!script && !scriptSetup) { - return []; - } - const scriptOffset = script ? script.loc.start.offset : Infinity; - const scriptSetupOffset = scriptSetup ? scriptSetup.loc.start.offset : Infinity; - const firstBlock = scriptOffset < scriptSetupOffset ? script : scriptSetup; - const secondBlock = scriptOffset < scriptSetupOffset ? scriptSetup : script; - let scriptContent = " ".repeat(Math.min(scriptOffset, scriptSetupOffset)) + firstBlock.content; - if (secondBlock) { - scriptContent += " ".repeat(secondBlock.loc.start.offset - script.loc.end.offset) + secondBlock.content; - } - const lang = (script == null ? void 0 : script.lang) || (scriptSetup == null ? void 0 : scriptSetup.lang); - return parser$2.parse(scriptContent, { - plugins: resolveParserPlugins(lang, parserPlugins), - sourceType: "module" - }).program.body; - } - return []; -} -function ctxToScope(ctx) { - if (ctx.scope) { - return ctx.scope; - } - const body = "ast" in ctx ? ctx.ast : ctx.scriptAst ? [...ctx.scriptAst.body, ...ctx.scriptSetupAst.body] : ctx.scriptSetupAst.body; - const scope = new TypeScope( - ctx.filename, - ctx.source, - "startOffset" in ctx ? ctx.startOffset : 0, - "userImports" in ctx ? Object.create(ctx.userImports) : recordImports(body) - ); - recordTypes(ctx, body, scope); - return ctx.scope = scope; -} -function moduleDeclToScope(ctx, node, parentScope) { - if (node._resolvedChildScope) { - return node._resolvedChildScope; - } - const scope = createChildScope(parentScope); - if (node.body.type === "TSModuleDeclaration") { - const decl = node.body; - decl._ownerScope = scope; - const id = getId(decl.id); - scope.types[id] = scope.exportedTypes[id] = decl; - } else { - recordTypes(ctx, node.body.body, scope); - } - return node._resolvedChildScope = scope; -} -function createChildScope(parentScope) { - return new TypeScope( - parentScope.filename, - parentScope.source, - parentScope.offset, - Object.create(parentScope.imports), - Object.create(parentScope.types), - Object.create(parentScope.declares) - ); -} -const importExportRE = /^Import|^Export/; -function recordTypes(ctx, body, scope, asGlobal = false) { - const { types, declares, exportedTypes, exportedDeclares, imports } = scope; - const isAmbient = asGlobal ? !body.some((s) => importExportRE.test(s.type)) : false; - for (const stmt of body) { - if (asGlobal) { - if (isAmbient) { - if (stmt.declare) { - recordType(stmt, types, declares); - } - } else if (stmt.type === "TSModuleDeclaration" && stmt.global) { - for (const s of stmt.body.body) { - recordType(s, types, declares); - } - } - } else { - recordType(stmt, types, declares); - } - } - if (!asGlobal) { - for (const stmt of body) { - if (stmt.type === "ExportNamedDeclaration") { - if (stmt.declaration) { - recordType(stmt.declaration, types, declares); - recordType(stmt.declaration, exportedTypes, exportedDeclares); - } else { - for (const spec of stmt.specifiers) { - if (spec.type === "ExportSpecifier") { - const local = spec.local.name; - const exported = getId(spec.exported); - if (stmt.source) { - imports[exported] = { - source: stmt.source.value, - imported: local - }; - exportedTypes[exported] = { - type: "TSTypeReference", - typeName: { - type: "Identifier", - name: local - }, - _ownerScope: scope - }; - } else if (types[local]) { - exportedTypes[exported] = types[local]; - } - } - } - } - } else if (stmt.type === "ExportAllDeclaration") { - const sourceScope = importSourceToScope( - ctx, - stmt.source, - scope, - stmt.source.value - ); - Object.assign(scope.exportedTypes, sourceScope.exportedTypes); - } else if (stmt.type === "ExportDefaultDeclaration" && stmt.declaration) { - if (stmt.declaration.type !== "Identifier") { - recordType(stmt.declaration, types, declares, "default"); - recordType( - stmt.declaration, - exportedTypes, - exportedDeclares, - "default" - ); - } else if (types[stmt.declaration.name]) { - exportedTypes["default"] = types[stmt.declaration.name]; - } - } - } - } - for (const key of Object.keys(types)) { - const node = types[key]; - node._ownerScope = scope; - if (node._ns) node._ns._ownerScope = scope; - } - for (const key of Object.keys(declares)) { - declares[key]._ownerScope = scope; - } -} -function recordType(node, types, declares, overwriteId) { - switch (node.type) { - case "TSInterfaceDeclaration": - case "TSEnumDeclaration": - case "TSModuleDeclaration": { - const id = overwriteId || getId(node.id); - let existing = types[id]; - if (existing) { - if (node.type === "TSModuleDeclaration") { - if (existing.type === "TSModuleDeclaration") { - mergeNamespaces(existing, node); - } else { - attachNamespace(existing, node); - } - break; - } - if (existing.type === "TSModuleDeclaration") { - types[id] = node; - attachNamespace(node, existing); - break; - } - if (existing.type !== node.type) { - break; - } - if (node.type === "TSInterfaceDeclaration") { - existing.body.body.push(...node.body.body); - } else { - existing.members.push(...node.members); - } - } else { - types[id] = node; - } - break; - } - case "ClassDeclaration": - if (overwriteId || node.id) types[overwriteId || getId(node.id)] = node; - break; - case "TSTypeAliasDeclaration": - types[node.id.name] = node.typeParameters ? node : node.typeAnnotation; - break; - case "TSDeclareFunction": - if (node.id) declares[node.id.name] = node; - break; - case "VariableDeclaration": { - if (node.declare) { - for (const decl of node.declarations) { - if (decl.id.type === "Identifier" && decl.id.typeAnnotation) { - declares[decl.id.name] = decl.id.typeAnnotation.typeAnnotation; - } - } - } - break; - } - } -} -function mergeNamespaces(to, from) { - const toBody = to.body; - const fromBody = from.body; - if (toBody.type === "TSModuleDeclaration") { - if (fromBody.type === "TSModuleDeclaration") { - mergeNamespaces(toBody, fromBody); - } else { - fromBody.body.push({ - type: "ExportNamedDeclaration", - declaration: toBody, - exportKind: "type", - specifiers: [] - }); - } - } else if (fromBody.type === "TSModuleDeclaration") { - toBody.body.push({ - type: "ExportNamedDeclaration", - declaration: fromBody, - exportKind: "type", - specifiers: [] - }); - } else { - toBody.body.push(...fromBody.body); - } -} -function attachNamespace(to, ns) { - if (!to._ns) { - to._ns = ns; - } else { - mergeNamespaces(to._ns, ns); - } -} -function recordImports(body) { - const imports = /* @__PURE__ */ Object.create(null); - for (const s of body) { - recordImport(s, imports); - } - return imports; -} -function recordImport(node, imports) { - if (node.type !== "ImportDeclaration") { - return; - } - for (const s of node.specifiers) { - imports[s.local.name] = { - imported: getImportedName(s), - source: node.source.value - }; - } -} -function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx), isKeyOf = false) { - try { - switch (node.type) { - case "TSStringKeyword": - return ["String"]; - case "TSNumberKeyword": - return ["Number"]; - case "TSBooleanKeyword": - return ["Boolean"]; - case "TSObjectKeyword": - return ["Object"]; - case "TSNullKeyword": - return ["null"]; - case "TSTypeLiteral": - case "TSInterfaceDeclaration": { - const types = /* @__PURE__ */ new Set(); - const members = node.type === "TSTypeLiteral" ? node.members : node.body.body; - for (const m of members) { - if (isKeyOf) { - if (m.type === "TSPropertySignature" && m.key.type === "NumericLiteral") { - types.add("Number"); - } else if (m.type === "TSIndexSignature") { - const annotation = m.parameters[0].typeAnnotation; - if (annotation && annotation.type !== "Noop") { - const type = inferRuntimeType( - ctx, - annotation.typeAnnotation, - scope - )[0]; - if (type === UNKNOWN_TYPE) return [UNKNOWN_TYPE]; - types.add(type); - } - } else { - types.add("String"); - } - } else if (m.type === "TSCallSignatureDeclaration" || m.type === "TSConstructSignatureDeclaration") { - types.add("Function"); - } else { - types.add("Object"); - } - } - return types.size ? Array.from(types) : [isKeyOf ? UNKNOWN_TYPE : "Object"]; - } - case "TSPropertySignature": - if (node.typeAnnotation) { - return inferRuntimeType( - ctx, - node.typeAnnotation.typeAnnotation, - scope - ); - } - break; - case "TSMethodSignature": - case "TSFunctionType": - return ["Function"]; - case "TSArrayType": - case "TSTupleType": - return ["Array"]; - case "TSLiteralType": - switch (node.literal.type) { - case "StringLiteral": - return ["String"]; - case "BooleanLiteral": - return ["Boolean"]; - case "NumericLiteral": - case "BigIntLiteral": - return ["Number"]; - default: - return [UNKNOWN_TYPE]; - } - case "TSTypeReference": { - const resolved = resolveTypeReference(ctx, node, scope); - if (resolved) { - return inferRuntimeType(ctx, resolved, resolved._ownerScope, isKeyOf); - } - if (node.typeName.type === "Identifier") { - if (isKeyOf) { - switch (node.typeName.name) { - case "String": - case "Array": - case "ArrayLike": - case "Parameters": - case "ConstructorParameters": - case "ReadonlyArray": - return ["String", "Number"]; - // TS built-in utility types - case "Record": - case "Partial": - case "Required": - case "Readonly": - if (node.typeParameters && node.typeParameters.params[0]) { - return inferRuntimeType( - ctx, - node.typeParameters.params[0], - scope, - true - ); - } - break; - case "Pick": - case "Extract": - if (node.typeParameters && node.typeParameters.params[1]) { - return inferRuntimeType( - ctx, - node.typeParameters.params[1], - scope - ); - } - break; - case "Function": - case "Object": - case "Set": - case "Map": - case "WeakSet": - case "WeakMap": - case "Date": - case "Promise": - case "Error": - case "Uppercase": - case "Lowercase": - case "Capitalize": - case "Uncapitalize": - case "ReadonlyMap": - case "ReadonlySet": - return ["String"]; - } - } else { - switch (node.typeName.name) { - case "Array": - case "Function": - case "Object": - case "Set": - case "Map": - case "WeakSet": - case "WeakMap": - case "Date": - case "Promise": - case "Error": - return [node.typeName.name]; - // TS built-in utility types - // https://www.typescriptlang.org/docs/handbook/utility-types.html - case "Partial": - case "Required": - case "Readonly": - case "Record": - case "Pick": - case "Omit": - case "InstanceType": - return ["Object"]; - case "Uppercase": - case "Lowercase": - case "Capitalize": - case "Uncapitalize": - return ["String"]; - case "Parameters": - case "ConstructorParameters": - case "ReadonlyArray": - return ["Array"]; - case "ReadonlyMap": - return ["Map"]; - case "ReadonlySet": - return ["Set"]; - case "NonNullable": - if (node.typeParameters && node.typeParameters.params[0]) { - return inferRuntimeType( - ctx, - node.typeParameters.params[0], - scope - ).filter((t) => t !== "null"); - } - break; - case "Extract": - if (node.typeParameters && node.typeParameters.params[1]) { - return inferRuntimeType( - ctx, - node.typeParameters.params[1], - scope - ); - } - break; - case "Exclude": - case "OmitThisParameter": - if (node.typeParameters && node.typeParameters.params[0]) { - return inferRuntimeType( - ctx, - node.typeParameters.params[0], - scope - ); - } - break; - } - } - } - break; - } - case "TSParenthesizedType": - return inferRuntimeType(ctx, node.typeAnnotation, scope); - case "TSUnionType": - return flattenTypes(ctx, node.types, scope, isKeyOf); - case "TSIntersectionType": { - return flattenTypes(ctx, node.types, scope, isKeyOf).filter( - (t) => t !== UNKNOWN_TYPE - ); - } - case "TSEnumDeclaration": - return inferEnumType(node); - case "TSSymbolKeyword": - return ["Symbol"]; - case "TSIndexedAccessType": { - const types = resolveIndexType(ctx, node, scope); - return flattenTypes(ctx, types, scope, isKeyOf); - } - case "ClassDeclaration": - return ["Object"]; - case "TSImportType": { - const sourceScope = importSourceToScope( - ctx, - node.argument, - scope, - node.argument.value - ); - const resolved = resolveTypeReference(ctx, node, sourceScope); - if (resolved) { - return inferRuntimeType(ctx, resolved, resolved._ownerScope); - } - break; - } - case "TSTypeQuery": { - const id = node.exprName; - if (id.type === "Identifier") { - const matched = scope.declares[id.name]; - if (matched) { - return inferRuntimeType(ctx, matched, matched._ownerScope, isKeyOf); - } - } - break; - } - // e.g. readonly - case "TSTypeOperator": { - return inferRuntimeType( - ctx, - node.typeAnnotation, - scope, - node.operator === "keyof" - ); - } - case "TSAnyKeyword": { - if (isKeyOf) { - return ["String", "Number", "Symbol"]; - } - break; - } - } - } catch (e) { - } - return [UNKNOWN_TYPE]; -} -function flattenTypes(ctx, types, scope, isKeyOf = false) { - if (types.length === 1) { - return inferRuntimeType(ctx, types[0], scope, isKeyOf); - } - return [ - ...new Set( - [].concat( - ...types.map((t) => inferRuntimeType(ctx, t, scope, isKeyOf)) - ) - ) - ]; -} -function inferEnumType(node) { - const types = /* @__PURE__ */ new Set(); - for (const m of node.members) { - if (m.initializer) { - switch (m.initializer.type) { - case "StringLiteral": - types.add("String"); - break; - case "NumericLiteral": - types.add("Number"); - break; - } - } - } - return types.size ? [...types] : ["Number"]; -} -function resolveExtractPropTypes({ props }, scope) { - const res = { props: {} }; - for (const key in props) { - const raw = props[key]; - res.props[key] = reverseInferType( - raw.key, - raw.typeAnnotation.typeAnnotation, - scope - ); - } - return res; -} -function reverseInferType(key, node, scope, optional = true, checkObjectSyntax = true) { - if (checkObjectSyntax && node.type === "TSTypeLiteral") { - const typeType = findStaticPropertyType(node, "type"); - if (typeType) { - const requiredType = findStaticPropertyType(node, "required"); - const optional2 = requiredType && requiredType.type === "TSLiteralType" && requiredType.literal.type === "BooleanLiteral" ? !requiredType.literal.value : true; - return reverseInferType(key, typeType, scope, optional2, false); - } - } else if (node.type === "TSTypeReference" && node.typeName.type === "Identifier") { - if (node.typeName.name.endsWith("Constructor")) { - return createProperty( - key, - ctorToType(node.typeName.name), - scope, - optional - ); - } else if (node.typeName.name === "PropType" && node.typeParameters) { - return createProperty(key, node.typeParameters.params[0], scope, optional); - } - } - if ((node.type === "TSTypeReference" || node.type === "TSImportType") && node.typeParameters) { - for (const t of node.typeParameters.params) { - const inferred = reverseInferType(key, t, scope, optional); - if (inferred) return inferred; - } - } - return createProperty(key, { type: `TSNullKeyword` }, scope, optional); -} -function ctorToType(ctorType) { - const ctor = ctorType.slice(0, -11); - switch (ctor) { - case "String": - case "Number": - case "Boolean": - return { type: `TS${ctor}Keyword` }; - case "Array": - case "Function": - case "Object": - case "Set": - case "Map": - case "WeakSet": - case "WeakMap": - case "Date": - case "Promise": - return { - type: "TSTypeReference", - typeName: { type: "Identifier", name: ctor } - }; - } - return { type: `TSNullKeyword` }; -} -function findStaticPropertyType(node, key) { - const prop = node.members.find( - (m) => m.type === "TSPropertySignature" && !m.computed && getId(m.key) === key && m.typeAnnotation - ); - return prop && prop.typeAnnotation.typeAnnotation; -} -function resolveReturnType(ctx, arg, scope) { - var _a; - let resolved = arg; - if (arg.type === "TSTypeReference" || arg.type === "TSTypeQuery" || arg.type === "TSImportType") { - resolved = resolveTypeReference(ctx, arg, scope); - } - if (!resolved) return; - if (resolved.type === "TSFunctionType") { - return (_a = resolved.typeAnnotation) == null ? void 0 : _a.typeAnnotation; - } - if (resolved.type === "TSDeclareFunction") { - return resolved.returnType; - } -} -function resolveUnionType(ctx, node, scope) { - if (node.type === "TSTypeReference") { - const resolved = resolveTypeReference(ctx, node, scope); - if (resolved) node = resolved; - } - let types; - if (node.type === "TSUnionType") { - types = node.types.flatMap((node2) => resolveUnionType(ctx, node2, scope)); - } else { - types = [node]; - } - return types; -} - -const DEFINE_MODEL = "defineModel"; -function processDefineModel(ctx, node, declId) { - if (!isCallOf(node, DEFINE_MODEL)) { - return false; - } - ctx.hasDefineModelCall = true; - const type = node.typeParameters && node.typeParameters.params[0] || void 0; - let modelName; - let options; - const arg0 = node.arguments[0] && CompilerDOM.unwrapTSNode(node.arguments[0]); - const hasName = arg0 && arg0.type === "StringLiteral"; - if (hasName) { - modelName = arg0.value; - options = node.arguments[1]; - } else { - modelName = "modelValue"; - options = arg0; - } - if (ctx.modelDecls[modelName]) { - ctx.error(`duplicate model name ${JSON.stringify(modelName)}`, node); - } - let optionsString = options && ctx.getString(options); - let optionsRemoved = !options; - const runtimeOptionNodes = []; - if (options && options.type === "ObjectExpression" && !options.properties.some((p) => p.type === "SpreadElement" || p.computed)) { - let removed = 0; - for (let i = options.properties.length - 1; i >= 0; i--) { - const p = options.properties[i]; - const next = options.properties[i + 1]; - const start = p.start; - const end = next ? next.start : options.end - 1; - if ((p.type === "ObjectProperty" || p.type === "ObjectMethod") && (p.key.type === "Identifier" && (p.key.name === "get" || p.key.name === "set") || p.key.type === "StringLiteral" && (p.key.value === "get" || p.key.value === "set"))) { - optionsString = optionsString.slice(0, start - options.start) + optionsString.slice(end - options.start); - } else { - removed++; - ctx.s.remove(ctx.startOffset + start, ctx.startOffset + end); - runtimeOptionNodes.push(p); - } - } - if (removed === options.properties.length) { - optionsRemoved = true; - ctx.s.remove( - ctx.startOffset + (hasName ? arg0.end : options.start), - ctx.startOffset + options.end - ); - } - } - ctx.modelDecls[modelName] = { - type, - options: optionsString, - runtimeOptionNodes, - identifier: declId && declId.type === "Identifier" ? declId.name : void 0 - }; - ctx.bindingMetadata[modelName] = "props"; - ctx.s.overwrite( - ctx.startOffset + node.callee.start, - ctx.startOffset + node.callee.end, - ctx.helper("useModel") - ); - ctx.s.appendLeft( - ctx.startOffset + (node.arguments.length ? node.arguments[0].start : node.end - 1), - `__props, ` + (hasName ? `` : `${JSON.stringify(modelName)}${optionsRemoved ? `` : `, `}`) - ); - return true; -} -function genModelProps(ctx) { - if (!ctx.hasDefineModelCall) return; - const isProd = !!ctx.options.isProd; - let modelPropsDecl = ""; - for (const [name, { type, options: runtimeOptions }] of Object.entries( - ctx.modelDecls - )) { - let skipCheck = false; - let codegenOptions = ``; - let runtimeTypes = type && inferRuntimeType(ctx, type); - if (runtimeTypes) { - const hasBoolean = runtimeTypes.includes("Boolean"); - const hasFunction = runtimeTypes.includes("Function"); - const hasUnknownType = runtimeTypes.includes(UNKNOWN_TYPE); - if (hasUnknownType) { - if (hasBoolean || hasFunction) { - runtimeTypes = runtimeTypes.filter((t) => t !== UNKNOWN_TYPE); - skipCheck = true; - } else { - runtimeTypes = ["null"]; - } - } - if (!isProd) { - codegenOptions = `type: ${toRuntimeTypeString(runtimeTypes)}` + (skipCheck ? ", skipCheck: true" : ""); - } else if (hasBoolean || runtimeOptions && hasFunction) { - codegenOptions = `type: ${toRuntimeTypeString(runtimeTypes)}`; - } else ; - } - let decl; - if (codegenOptions && runtimeOptions) { - decl = ctx.isTS ? `{ ${codegenOptions}, ...${runtimeOptions} }` : `Object.assign({ ${codegenOptions} }, ${runtimeOptions})`; - } else if (codegenOptions) { - decl = `{ ${codegenOptions} }`; - } else if (runtimeOptions) { - decl = runtimeOptions; - } else { - decl = `{}`; - } - modelPropsDecl += ` - ${JSON.stringify(name)}: ${decl},`; - const modifierPropName = JSON.stringify( - name === "modelValue" ? `modelModifiers` : `${name}Modifiers` - ); - modelPropsDecl += ` - ${modifierPropName}: {},`; - } - return `{${modelPropsDecl} - }`; -} - -const DEFINE_PROPS = "defineProps"; -const WITH_DEFAULTS = "withDefaults"; -function processDefineProps(ctx, node, declId, isWithDefaults = false) { - if (!isCallOf(node, DEFINE_PROPS)) { - return processWithDefaults(ctx, node, declId); - } - if (ctx.hasDefinePropsCall) { - ctx.error(`duplicate ${DEFINE_PROPS}() call`, node); - } - ctx.hasDefinePropsCall = true; - ctx.propsRuntimeDecl = node.arguments[0]; - if (ctx.propsRuntimeDecl) { - for (const key of getObjectOrArrayExpressionKeys(ctx.propsRuntimeDecl)) { - if (!(key in ctx.bindingMetadata)) { - ctx.bindingMetadata[key] = "props"; - } - } - } - if (node.typeParameters) { - if (ctx.propsRuntimeDecl) { - ctx.error( - `${DEFINE_PROPS}() cannot accept both type and non-type arguments at the same time. Use one or the other.`, - node - ); - } - ctx.propsTypeDecl = node.typeParameters.params[0]; - } - if (!isWithDefaults && declId && declId.type === "ObjectPattern") { - processPropsDestructure(ctx, declId); - } - ctx.propsCall = node; - ctx.propsDecl = declId; - return true; -} -function processWithDefaults(ctx, node, declId) { - if (!isCallOf(node, WITH_DEFAULTS)) { - return false; - } - if (!processDefineProps( - ctx, - node.arguments[0], - declId, - true - )) { - ctx.error( - `${WITH_DEFAULTS}' first argument must be a ${DEFINE_PROPS} call.`, - node.arguments[0] || node - ); - } - if (ctx.propsRuntimeDecl) { - ctx.error( - `${WITH_DEFAULTS} can only be used with type-based ${DEFINE_PROPS} declaration.`, - node - ); - } - if (declId && declId.type === "ObjectPattern") { - ctx.warn( - `${WITH_DEFAULTS}() is unnecessary when using destructure with ${DEFINE_PROPS}(). -Reactive destructure will be disabled when using withDefaults(). -Prefer using destructure default values, e.g. const { foo = 1 } = defineProps(...). `, - node.callee - ); - } - ctx.propsRuntimeDefaults = node.arguments[1]; - if (!ctx.propsRuntimeDefaults) { - ctx.error(`The 2nd argument of ${WITH_DEFAULTS} is required.`, node); - } - ctx.propsCall = node; - return true; -} -function genRuntimeProps(ctx) { - let propsDecls; - if (ctx.propsRuntimeDecl) { - propsDecls = ctx.getString(ctx.propsRuntimeDecl).trim(); - if (ctx.propsDestructureDecl) { - const defaults = []; - for (const key in ctx.propsDestructuredBindings) { - const d = genDestructuredDefaultValue(ctx, key); - const finalKey = getEscapedPropName(key); - if (d) - defaults.push( - `${finalKey}: ${d.valueString}${d.needSkipFactory ? `, __skip_${finalKey}: true` : ``}` - ); - } - if (defaults.length) { - propsDecls = `/*@__PURE__*/${ctx.helper( - `mergeDefaults` - )}(${propsDecls}, { - ${defaults.join(",\n ")} -})`; - } - } - } else if (ctx.propsTypeDecl) { - propsDecls = extractRuntimeProps(ctx); - } - const modelsDecls = genModelProps(ctx); - if (propsDecls && modelsDecls) { - return `/*@__PURE__*/${ctx.helper( - "mergeModels" - )}(${propsDecls}, ${modelsDecls})`; - } else { - return modelsDecls || propsDecls; - } -} -function extractRuntimeProps(ctx) { - const props = resolveRuntimePropsFromType(ctx, ctx.propsTypeDecl); - if (!props.length) { - return; - } - const propStrings = []; - const hasStaticDefaults = hasStaticWithDefaults(ctx); - for (const prop of props) { - propStrings.push(genRuntimePropFromType(ctx, prop, hasStaticDefaults)); - if ("bindingMetadata" in ctx && !(prop.key in ctx.bindingMetadata)) { - ctx.bindingMetadata[prop.key] = "props"; - } - } - let propsDecls = `{ - ${propStrings.join(",\n ")} - }`; - if (ctx.propsRuntimeDefaults && !hasStaticDefaults) { - propsDecls = `/*@__PURE__*/${ctx.helper( - "mergeDefaults" - )}(${propsDecls}, ${ctx.getString(ctx.propsRuntimeDefaults)})`; - } - return propsDecls; -} -function resolveRuntimePropsFromType(ctx, node) { - const props = []; - const elements = resolveTypeElements(ctx, node); - for (const key in elements.props) { - const e = elements.props[key]; - let type = inferRuntimeType(ctx, e); - let skipCheck = false; - if (type.includes(UNKNOWN_TYPE)) { - if (type.includes("Boolean") || type.includes("Function")) { - type = type.filter((t) => t !== UNKNOWN_TYPE); - skipCheck = true; - } else { - type = ["null"]; - } - } - props.push({ - key, - required: !e.optional, - type: type || [`null`], - skipCheck - }); - } - return props; -} -function genRuntimePropFromType(ctx, { key, required, type, skipCheck }, hasStaticDefaults) { - let defaultString; - const destructured = genDestructuredDefaultValue(ctx, key, type); - if (destructured) { - defaultString = `default: ${destructured.valueString}${destructured.needSkipFactory ? `, skipFactory: true` : ``}`; - } else if (hasStaticDefaults) { - const prop = ctx.propsRuntimeDefaults.properties.find( - (node) => { - if (node.type === "SpreadElement") return false; - return resolveObjectKey(node.key, node.computed) === key; - } - ); - if (prop) { - if (prop.type === "ObjectProperty") { - defaultString = `default: ${ctx.getString(prop.value)}`; - } else { - defaultString = `${prop.async ? "async " : ""}${prop.kind !== "method" ? `${prop.kind} ` : ""}default() ${ctx.getString(prop.body)}`; - } - } - } - const finalKey = getEscapedPropName(key); - if (!ctx.options.isProd) { - return `${finalKey}: { ${concatStrings([ - `type: ${toRuntimeTypeString(type)}`, - `required: ${required}`, - skipCheck && "skipCheck: true", - defaultString - ])} }`; - } else if (type.some( - (el) => el === "Boolean" || (!hasStaticDefaults || defaultString) && el === "Function" - )) { - return `${finalKey}: { ${concatStrings([ - `type: ${toRuntimeTypeString(type)}`, - defaultString - ])} }`; - } else { - if (ctx.isCE) { - if (defaultString) { - return `${finalKey}: ${`{ ${defaultString}, type: ${toRuntimeTypeString( - type - )} }`}`; - } else { - return `${finalKey}: {type: ${toRuntimeTypeString(type)}}`; - } - } - return `${finalKey}: ${defaultString ? `{ ${defaultString} }` : `{}`}`; - } -} -function hasStaticWithDefaults(ctx) { - return !!(ctx.propsRuntimeDefaults && ctx.propsRuntimeDefaults.type === "ObjectExpression" && ctx.propsRuntimeDefaults.properties.every( - (node) => node.type !== "SpreadElement" && (!node.computed || node.key.type.endsWith("Literal")) - )); -} -function genDestructuredDefaultValue(ctx, key, inferredType) { - const destructured = ctx.propsDestructuredBindings[key]; - const defaultVal = destructured && destructured.default; - if (defaultVal) { - const value = ctx.getString(defaultVal); - const unwrapped = CompilerDOM.unwrapTSNode(defaultVal); - if (inferredType && inferredType.length && !inferredType.includes("null")) { - const valueType = inferValueType(unwrapped); - if (valueType && !inferredType.includes(valueType)) { - ctx.error( - `Default value of prop "${key}" does not match declared type.`, - unwrapped - ); - } - } - const needSkipFactory = !inferredType && (CompilerDOM.isFunctionType(unwrapped) || unwrapped.type === "Identifier"); - const needFactoryWrap = !needSkipFactory && !isLiteralNode(unwrapped) && !(inferredType == null ? void 0 : inferredType.includes("Function")); - return { - valueString: needFactoryWrap ? `() => (${value})` : value, - needSkipFactory - }; - } -} -function inferValueType(node) { - switch (node.type) { - case "StringLiteral": - return "String"; - case "NumericLiteral": - return "Number"; - case "BooleanLiteral": - return "Boolean"; - case "ObjectExpression": - return "Object"; - case "ArrayExpression": - return "Array"; - case "FunctionExpression": - case "ArrowFunctionExpression": - return "Function"; - } -} - -function processPropsDestructure(ctx, declId) { - if (ctx.options.propsDestructure === "error") { - ctx.error(`Props destructure is explicitly prohibited via config.`, declId); - } else if (ctx.options.propsDestructure === false) { - return; - } - ctx.propsDestructureDecl = declId; - const registerBinding = (key, local, defaultValue) => { - ctx.propsDestructuredBindings[key] = { local, default: defaultValue }; - if (local !== key) { - ctx.bindingMetadata[local] = "props-aliased"; - (ctx.bindingMetadata.__propsAliases || (ctx.bindingMetadata.__propsAliases = {}))[local] = key; - } - }; - for (const prop of declId.properties) { - if (prop.type === "ObjectProperty") { - const propKey = resolveObjectKey(prop.key, prop.computed); - if (!propKey) { - ctx.error( - `${DEFINE_PROPS}() destructure cannot use computed key.`, - prop.key - ); - } - if (prop.value.type === "AssignmentPattern") { - const { left, right } = prop.value; - if (left.type !== "Identifier") { - ctx.error( - `${DEFINE_PROPS}() destructure does not support nested patterns.`, - left - ); - } - registerBinding(propKey, left.name, right); - } else if (prop.value.type === "Identifier") { - registerBinding(propKey, prop.value.name); - } else { - ctx.error( - `${DEFINE_PROPS}() destructure does not support nested patterns.`, - prop.value - ); - } - } else { - ctx.propsDestructureRestId = prop.argument.name; - ctx.bindingMetadata[ctx.propsDestructureRestId] = "setup-reactive-const"; - } - } -} -function transformDestructuredProps(ctx, vueImportAliases) { - if (ctx.options.propsDestructure === false) { - return; - } - const rootScope = /* @__PURE__ */ Object.create(null); - const scopeStack = [rootScope]; - let currentScope = rootScope; - const excludedIds = /* @__PURE__ */ new WeakSet(); - const parentStack = []; - const propsLocalToPublicMap = /* @__PURE__ */ Object.create(null); - for (const key in ctx.propsDestructuredBindings) { - const { local } = ctx.propsDestructuredBindings[key]; - rootScope[local] = true; - propsLocalToPublicMap[local] = key; - } - function pushScope() { - scopeStack.push(currentScope = Object.create(currentScope)); - } - function popScope() { - scopeStack.pop(); - currentScope = scopeStack[scopeStack.length - 1] || null; - } - function registerLocalBinding(id) { - excludedIds.add(id); - if (currentScope) { - currentScope[id.name] = false; - } else { - ctx.error( - "registerBinding called without active scope, something is wrong.", - id - ); - } - } - function walkScope(node, isRoot = false) { - for (const stmt of node.body) { - if (stmt.type === "VariableDeclaration") { - walkVariableDeclaration(stmt, isRoot); - } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { - if (stmt.declare || !stmt.id) continue; - registerLocalBinding(stmt.id); - } else if ((stmt.type === "ForOfStatement" || stmt.type === "ForInStatement") && stmt.left.type === "VariableDeclaration") { - walkVariableDeclaration(stmt.left); - } else if (stmt.type === "ExportNamedDeclaration" && stmt.declaration && stmt.declaration.type === "VariableDeclaration") { - walkVariableDeclaration(stmt.declaration, isRoot); - } else if (stmt.type === "LabeledStatement" && stmt.body.type === "VariableDeclaration") { - walkVariableDeclaration(stmt.body, isRoot); - } - } - } - function walkVariableDeclaration(stmt, isRoot = false) { - if (stmt.declare) { - return; - } - for (const decl of stmt.declarations) { - const isDefineProps = isRoot && decl.init && isCallOf(CompilerDOM.unwrapTSNode(decl.init), "defineProps"); - for (const id of CompilerDOM.extractIdentifiers(decl.id)) { - if (isDefineProps) { - excludedIds.add(id); - } else { - registerLocalBinding(id); - } - } - } - } - function rewriteId(id, parent, parentStack2) { - if (parent.type === "AssignmentExpression" && id === parent.left || parent.type === "UpdateExpression") { - ctx.error(`Cannot assign to destructured props as they are readonly.`, id); - } - if (CompilerDOM.isStaticProperty(parent) && parent.shorthand) { - if (!parent.inPattern || CompilerDOM.isInDestructureAssignment(parent, parentStack2)) { - ctx.s.appendLeft( - id.end + ctx.startOffset, - `: ${shared.genPropsAccessExp(propsLocalToPublicMap[id.name])}` - ); - } - } else { - ctx.s.overwrite( - id.start + ctx.startOffset, - id.end + ctx.startOffset, - shared.genPropsAccessExp(propsLocalToPublicMap[id.name]) - ); - } - } - function checkUsage(node, method, alias = method) { - if (isCallOf(node, alias)) { - const arg = CompilerDOM.unwrapTSNode(node.arguments[0]); - if (arg.type === "Identifier" && currentScope[arg.name]) { - ctx.error( - `"${arg.name}" is a destructured prop and should not be passed directly to ${method}(). Pass a getter () => ${arg.name} instead.`, - arg - ); - } - } - } - const ast = ctx.scriptSetupAst; - walkScope(ast, true); - estreeWalker.walk(ast, { - enter(node, parent) { - parent && parentStack.push(parent); - if (parent && parent.type.startsWith("TS") && !CompilerDOM.TS_NODE_TYPES.includes(parent.type)) { - return this.skip(); - } - checkUsage(node, "watch", vueImportAliases.watch); - checkUsage(node, "toRef", vueImportAliases.toRef); - if (CompilerDOM.isFunctionType(node)) { - pushScope(); - CompilerDOM.walkFunctionParams(node, registerLocalBinding); - if (node.body.type === "BlockStatement") { - walkScope(node.body); - } - return; - } - if (node.type === "CatchClause") { - pushScope(); - if (node.param && node.param.type === "Identifier") { - registerLocalBinding(node.param); - } - walkScope(node.body); - return; - } - if (node.type === "BlockStatement" && !CompilerDOM.isFunctionType(parent)) { - pushScope(); - walkScope(node); - return; - } - if (node.type === "Identifier") { - if (CompilerDOM.isReferencedIdentifier(node, parent, parentStack) && !excludedIds.has(node)) { - if (currentScope[node.name]) { - rewriteId(node, parent, parentStack); - } - } - } - }, - leave(node, parent) { - parent && parentStack.pop(); - if (node.type === "BlockStatement" && !CompilerDOM.isFunctionType(parent) || CompilerDOM.isFunctionType(node)) { - popScope(); - } - } - }); -} - -const DEFINE_EMITS = "defineEmits"; -function processDefineEmits(ctx, node, declId) { - if (!isCallOf(node, DEFINE_EMITS)) { - return false; - } - if (ctx.hasDefineEmitCall) { - ctx.error(`duplicate ${DEFINE_EMITS}() call`, node); - } - ctx.hasDefineEmitCall = true; - ctx.emitsRuntimeDecl = node.arguments[0]; - if (node.typeParameters) { - if (ctx.emitsRuntimeDecl) { - ctx.error( - `${DEFINE_EMITS}() cannot accept both type and non-type arguments at the same time. Use one or the other.`, - node - ); - } - ctx.emitsTypeDecl = node.typeParameters.params[0]; - } - ctx.emitDecl = declId; - return true; -} -function genRuntimeEmits(ctx) { - let emitsDecl = ""; - if (ctx.emitsRuntimeDecl) { - emitsDecl = ctx.getString(ctx.emitsRuntimeDecl).trim(); - } else if (ctx.emitsTypeDecl) { - const typeDeclaredEmits = extractRuntimeEmits(ctx); - emitsDecl = typeDeclaredEmits.size ? `[${Array.from(typeDeclaredEmits).map((k) => JSON.stringify(k)).join(", ")}]` : ``; - } - if (ctx.hasDefineModelCall) { - let modelEmitsDecl = `[${Object.keys(ctx.modelDecls).map((n) => JSON.stringify(`update:${n}`)).join(", ")}]`; - emitsDecl = emitsDecl ? `/*@__PURE__*/${ctx.helper( - "mergeModels" - )}(${emitsDecl}, ${modelEmitsDecl})` : modelEmitsDecl; - } - return emitsDecl; -} -function extractRuntimeEmits(ctx) { - const emits = /* @__PURE__ */ new Set(); - const node = ctx.emitsTypeDecl; - if (node.type === "TSFunctionType") { - extractEventNames(ctx, node.parameters[0], emits); - return emits; - } - const { props, calls } = resolveTypeElements(ctx, node); - let hasProperty = false; - for (const key in props) { - emits.add(key); - hasProperty = true; - } - if (calls) { - if (hasProperty) { - ctx.error( - `defineEmits() type cannot mixed call signature and property syntax.`, - node - ); - } - for (const call of calls) { - extractEventNames(ctx, call.parameters[0], emits); - } - } - return emits; -} -function extractEventNames(ctx, eventName, emits) { - if (eventName.type === "Identifier" && eventName.typeAnnotation && eventName.typeAnnotation.type === "TSTypeAnnotation") { - const types = resolveUnionType(ctx, eventName.typeAnnotation.typeAnnotation); - for (const type of types) { - if (type.type === "TSLiteralType") { - if (type.literal.type !== "UnaryExpression" && type.literal.type !== "TemplateLiteral") { - emits.add(String(type.literal.value)); - } - } - } - } -} - -const DEFINE_EXPOSE = "defineExpose"; -function processDefineExpose(ctx, node) { - if (isCallOf(node, DEFINE_EXPOSE)) { - if (ctx.hasDefineExposeCall) { - ctx.error(`duplicate ${DEFINE_EXPOSE}() call`, node); - } - ctx.hasDefineExposeCall = true; - return true; - } - return false; -} - -const DEFINE_SLOTS = "defineSlots"; -function processDefineSlots(ctx, node, declId) { - if (!isCallOf(node, DEFINE_SLOTS)) { - return false; - } - if (ctx.hasDefineSlotsCall) { - ctx.error(`duplicate ${DEFINE_SLOTS}() call`, node); - } - ctx.hasDefineSlotsCall = true; - if (node.arguments.length > 0) { - ctx.error(`${DEFINE_SLOTS}() cannot accept arguments`, node); - } - if (declId) { - ctx.s.overwrite( - ctx.startOffset + node.start, - ctx.startOffset + node.end, - `${ctx.helper("useSlots")}()` - ); - } - return true; -} - -const DEFINE_OPTIONS = "defineOptions"; -function processDefineOptions(ctx, node) { - if (!isCallOf(node, DEFINE_OPTIONS)) { - return false; - } - if (ctx.hasDefineOptionsCall) { - ctx.error(`duplicate ${DEFINE_OPTIONS}() call`, node); - } - if (node.typeParameters) { - ctx.error(`${DEFINE_OPTIONS}() cannot accept type arguments`, node); - } - if (!node.arguments[0]) return true; - ctx.hasDefineOptionsCall = true; - ctx.optionsRuntimeDecl = CompilerDOM.unwrapTSNode(node.arguments[0]); - let propsOption = void 0; - let emitsOption = void 0; - let exposeOption = void 0; - let slotsOption = void 0; - if (ctx.optionsRuntimeDecl.type === "ObjectExpression") { - for (const prop of ctx.optionsRuntimeDecl.properties) { - if ((prop.type === "ObjectProperty" || prop.type === "ObjectMethod") && prop.key.type === "Identifier") { - switch (prop.key.name) { - case "props": - propsOption = prop; - break; - case "emits": - emitsOption = prop; - break; - case "expose": - exposeOption = prop; - break; - case "slots": - slotsOption = prop; - break; - } - } - } - } - if (propsOption) { - ctx.error( - `${DEFINE_OPTIONS}() cannot be used to declare props. Use ${DEFINE_PROPS}() instead.`, - propsOption - ); - } - if (emitsOption) { - ctx.error( - `${DEFINE_OPTIONS}() cannot be used to declare emits. Use ${DEFINE_EMITS}() instead.`, - emitsOption - ); - } - if (exposeOption) { - ctx.error( - `${DEFINE_OPTIONS}() cannot be used to declare expose. Use ${DEFINE_EXPOSE}() instead.`, - exposeOption - ); - } - if (slotsOption) { - ctx.error( - `${DEFINE_OPTIONS}() cannot be used to declare slots. Use ${DEFINE_SLOTS}() instead.`, - slotsOption - ); - } - return true; -} - -function processAwait(ctx, node, needSemi, isStatement) { - const argumentStart = node.argument.extra && node.argument.extra.parenthesized ? node.argument.extra.parenStart : node.argument.start; - const startOffset = ctx.startOffset; - const argumentStr = ctx.descriptor.source.slice( - argumentStart + startOffset, - node.argument.end + startOffset - ); - const containsNestedAwait = /\bawait\b/.test(argumentStr); - ctx.s.overwrite( - node.start + startOffset, - argumentStart + startOffset, - `${needSemi ? `;` : ``}( - ([__temp,__restore] = ${ctx.helper( - `withAsyncContext` - )}(${containsNestedAwait ? `async ` : ``}() => ` - ); - ctx.s.appendLeft( - node.end + startOffset, - `)), - ${isStatement ? `` : `__temp = `}await __temp, - __restore()${isStatement ? `` : `, - __temp`} -)` - ); -} - -const MACROS = [ - DEFINE_PROPS, - DEFINE_EMITS, - DEFINE_EXPOSE, - DEFINE_OPTIONS, - DEFINE_SLOTS, - DEFINE_MODEL, - WITH_DEFAULTS -]; -function compileScript(sfc, options) { - var _a, _b, _c; - if (!options.id) { - warnOnce( - `compileScript now requires passing the \`id\` option. -Upgrade your vite or vue-loader version for compatibility with the latest experimental proposals.` - ); - } - const ctx = new ScriptCompileContext(sfc, options); - const { script, scriptSetup, source, filename } = sfc; - const hoistStatic = options.hoistStatic !== false && !script; - const scopeId = options.id ? options.id.replace(/^data-v-/, "") : ""; - const scriptLang = script && script.lang; - const scriptSetupLang = scriptSetup && scriptSetup.lang; - if (!scriptSetup) { - if (!script) { - throw new Error(`[@vue/compiler-sfc] SFC contains no <script> tags.`); - } - return processNormalScript(ctx, scopeId); - } - if (script && scriptLang !== scriptSetupLang) { - throw new Error( - `[@vue/compiler-sfc] <script> and <script setup> must have the same language type.` - ); - } - if (scriptSetupLang && !ctx.isJS && !ctx.isTS) { - return scriptSetup; - } - const scriptBindings = /* @__PURE__ */ Object.create(null); - const setupBindings = /* @__PURE__ */ Object.create(null); - let defaultExport; - let hasAwait = false; - let hasInlinedSsrRenderFn = false; - const startOffset = ctx.startOffset; - const endOffset = ctx.endOffset; - const scriptStartOffset = script && script.loc.start.offset; - const scriptEndOffset = script && script.loc.end.offset; - function hoistNode(node) { - const start = node.start + startOffset; - let end = node.end + startOffset; - if (node.trailingComments && node.trailingComments.length > 0) { - const lastCommentNode = node.trailingComments[node.trailingComments.length - 1]; - end = lastCommentNode.end + startOffset; - } - while (end <= source.length) { - if (!/\s/.test(source.charAt(end))) { - break; - } - end++; - } - ctx.s.move(start, end, 0); - } - function registerUserImport(source2, local, imported, isType, isFromSetup, needTemplateUsageCheck) { - let isUsedInTemplate = needTemplateUsageCheck; - if (needTemplateUsageCheck && ctx.isTS && sfc.template && !sfc.template.src && !sfc.template.lang) { - isUsedInTemplate = isImportUsed(local, sfc); - } - ctx.userImports[local] = { - isType, - imported, - local, - source: source2, - isFromSetup, - isUsedInTemplate - }; - } - function checkInvalidScopeReference(node, method) { - if (!node) return; - CompilerDOM.walkIdentifiers(node, (id) => { - const binding = setupBindings[id.name]; - if (binding && binding !== "literal-const") { - ctx.error( - `\`${method}()\` in <script setup> cannot reference locally declared variables because it will be hoisted outside of the setup() function. If your component options require initialization in the module scope, use a separate normal <script> to export the options instead.`, - id - ); - } - }); - } - const scriptAst = ctx.scriptAst; - const scriptSetupAst = ctx.scriptSetupAst; - if (scriptAst) { - for (const node of scriptAst.body) { - if (node.type === "ImportDeclaration") { - for (const specifier of node.specifiers) { - const imported = getImportedName(specifier); - registerUserImport( - node.source.value, - specifier.local.name, - imported, - node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type", - false, - !options.inlineTemplate - ); - } - } - } - } - for (const node of scriptSetupAst.body) { - if (node.type === "ImportDeclaration") { - hoistNode(node); - let removed = 0; - const removeSpecifier = (i) => { - const removeLeft = i > removed; - removed++; - const current = node.specifiers[i]; - const next = node.specifiers[i + 1]; - ctx.s.remove( - removeLeft ? node.specifiers[i - 1].end + startOffset : current.start + startOffset, - next && !removeLeft ? next.start + startOffset : current.end + startOffset - ); - }; - for (let i = 0; i < node.specifiers.length; i++) { - const specifier = node.specifiers[i]; - const local = specifier.local.name; - const imported = getImportedName(specifier); - const source2 = node.source.value; - const existing = ctx.userImports[local]; - if (source2 === "vue" && MACROS.includes(imported)) { - if (local === imported) { - warnOnce( - `\`${imported}\` is a compiler macro and no longer needs to be imported.` - ); - } else { - ctx.error( - `\`${imported}\` is a compiler macro and cannot be aliased to a different name.`, - specifier - ); - } - removeSpecifier(i); - } else if (existing) { - if (existing.source === source2 && existing.imported === imported) { - removeSpecifier(i); - } else { - ctx.error( - `different imports aliased to same local name.`, - specifier - ); - } - } else { - registerUserImport( - source2, - local, - imported, - node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type", - true, - !options.inlineTemplate - ); - } - } - if (node.specifiers.length && removed === node.specifiers.length) { - ctx.s.remove(node.start + startOffset, node.end + startOffset); - } - } - } - const vueImportAliases = {}; - for (const key in ctx.userImports) { - const { source: source2, imported, local } = ctx.userImports[key]; - if (source2 === "vue") vueImportAliases[imported] = local; - } - if (script && scriptAst) { - for (const node of scriptAst.body) { - if (node.type === "ExportDefaultDeclaration") { - defaultExport = node; - let optionProperties; - if (defaultExport.declaration.type === "ObjectExpression") { - optionProperties = defaultExport.declaration.properties; - } else if (defaultExport.declaration.type === "CallExpression" && defaultExport.declaration.arguments[0] && defaultExport.declaration.arguments[0].type === "ObjectExpression") { - optionProperties = defaultExport.declaration.arguments[0].properties; - } - if (optionProperties) { - for (const p of optionProperties) { - if (p.type === "ObjectProperty" && p.key.type === "Identifier" && p.key.name === "name") { - ctx.hasDefaultExportName = true; - } - if ((p.type === "ObjectMethod" || p.type === "ObjectProperty") && p.key.type === "Identifier" && p.key.name === "render") { - ctx.hasDefaultExportRender = true; - } - } - } - const start = node.start + scriptStartOffset; - const end = node.declaration.start + scriptStartOffset; - ctx.s.overwrite(start, end, `const ${normalScriptDefaultVar} = `); - } else if (node.type === "ExportNamedDeclaration") { - const defaultSpecifier = node.specifiers.find( - (s) => s.exported.type === "Identifier" && s.exported.name === "default" - ); - if (defaultSpecifier) { - defaultExport = node; - if (node.specifiers.length > 1) { - ctx.s.remove( - defaultSpecifier.start + scriptStartOffset, - defaultSpecifier.end + scriptStartOffset - ); - } else { - ctx.s.remove( - node.start + scriptStartOffset, - node.end + scriptStartOffset - ); - } - if (node.source) { - ctx.s.prepend( - `import { ${defaultSpecifier.local.name} as ${normalScriptDefaultVar} } from '${node.source.value}' -` - ); - } else { - ctx.s.appendLeft( - scriptEndOffset, - ` -const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name} -` - ); - } - } - if (node.declaration) { - walkDeclaration( - "script", - node.declaration, - scriptBindings, - vueImportAliases, - hoistStatic - ); - } - } else if ((node.type === "VariableDeclaration" || node.type === "FunctionDeclaration" || node.type === "ClassDeclaration" || node.type === "TSEnumDeclaration") && !node.declare) { - walkDeclaration( - "script", - node, - scriptBindings, - vueImportAliases, - hoistStatic - ); - } - } - if (scriptStartOffset > startOffset) { - if (!/\n$/.test(script.content.trim())) { - ctx.s.appendLeft(scriptEndOffset, ` -`); - } - ctx.s.move(scriptStartOffset, scriptEndOffset, 0); - } - } - for (const node of scriptSetupAst.body) { - if (node.type === "ExpressionStatement") { - const expr = CompilerDOM.unwrapTSNode(node.expression); - if (processDefineProps(ctx, expr) || processDefineEmits(ctx, expr) || processDefineOptions(ctx, expr) || processDefineSlots(ctx, expr)) { - ctx.s.remove(node.start + startOffset, node.end + startOffset); - } else if (processDefineExpose(ctx, expr)) { - const callee = expr.callee; - ctx.s.overwrite( - callee.start + startOffset, - callee.end + startOffset, - "__expose" - ); - } else { - processDefineModel(ctx, expr); - } - } - if (node.type === "VariableDeclaration" && !node.declare) { - const total = node.declarations.length; - let left = total; - let lastNonRemoved; - for (let i = 0; i < total; i++) { - const decl = node.declarations[i]; - const init = decl.init && CompilerDOM.unwrapTSNode(decl.init); - if (init) { - if (processDefineOptions(ctx, init)) { - ctx.error( - `${DEFINE_OPTIONS}() has no returning value, it cannot be assigned.`, - node - ); - } - const isDefineProps = processDefineProps(ctx, init, decl.id); - if (ctx.propsDestructureRestId) { - setupBindings[ctx.propsDestructureRestId] = "setup-reactive-const"; - } - const isDefineEmits = !isDefineProps && processDefineEmits(ctx, init, decl.id); - !isDefineEmits && (processDefineSlots(ctx, init, decl.id) || processDefineModel(ctx, init, decl.id)); - if (isDefineProps && !ctx.propsDestructureRestId && ctx.propsDestructureDecl) { - if (left === 1) { - ctx.s.remove(node.start + startOffset, node.end + startOffset); - } else { - let start = decl.start + startOffset; - let end = decl.end + startOffset; - if (i === total - 1) { - start = node.declarations[lastNonRemoved].end + startOffset; - } else { - end = node.declarations[i + 1].start + startOffset; - } - ctx.s.remove(start, end); - left--; - } - } else if (isDefineEmits) { - ctx.s.overwrite( - startOffset + init.start, - startOffset + init.end, - "__emit" - ); - } else { - lastNonRemoved = i; - } - } - } - } - let isAllLiteral = false; - if ((node.type === "VariableDeclaration" || node.type === "FunctionDeclaration" || node.type === "ClassDeclaration" || node.type === "TSEnumDeclaration") && !node.declare) { - isAllLiteral = walkDeclaration( - "scriptSetup", - node, - setupBindings, - vueImportAliases, - hoistStatic, - !!ctx.propsDestructureDecl - ); - } - if (hoistStatic && isAllLiteral) { - hoistNode(node); - } - if (node.type === "VariableDeclaration" && !node.declare || node.type.endsWith("Statement")) { - const scope = [scriptSetupAst.body]; - estreeWalker.walk(node, { - enter(child, parent) { - if (CompilerDOM.isFunctionType(child)) { - this.skip(); - } - if (child.type === "BlockStatement") { - scope.push(child.body); - } - if (child.type === "AwaitExpression") { - hasAwait = true; - const currentScope = scope[scope.length - 1]; - const needsSemi = currentScope.some((n, i) => { - return (scope.length === 1 || i > 0) && n.type === "ExpressionStatement" && n.start === child.start; - }); - processAwait( - ctx, - child, - needsSemi, - parent.type === "ExpressionStatement" - ); - } - }, - exit(node2) { - if (node2.type === "BlockStatement") scope.pop(); - } - }); - } - if (node.type === "ExportNamedDeclaration" && node.exportKind !== "type" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration") { - ctx.error( - `<script setup> cannot contain ES module exports. If you are using a previous version of <script setup>, please consult the updated RFC at https://github.com/vuejs/rfcs/pull/227.`, - node - ); - } - if (ctx.isTS) { - if (node.type.startsWith("TS") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "VariableDeclaration" && node.declare) { - if (node.type !== "TSEnumDeclaration") { - hoistNode(node); - } - } - } - } - if (ctx.propsDestructureDecl) { - transformDestructuredProps(ctx, vueImportAliases); - } - checkInvalidScopeReference(ctx.propsRuntimeDecl, DEFINE_PROPS); - checkInvalidScopeReference(ctx.propsRuntimeDefaults, DEFINE_PROPS); - checkInvalidScopeReference(ctx.propsDestructureDecl, DEFINE_PROPS); - checkInvalidScopeReference(ctx.emitsRuntimeDecl, DEFINE_EMITS); - checkInvalidScopeReference(ctx.optionsRuntimeDecl, DEFINE_OPTIONS); - for (const { runtimeOptionNodes } of Object.values(ctx.modelDecls)) { - for (const node of runtimeOptionNodes) { - checkInvalidScopeReference(node, DEFINE_MODEL); - } - } - if (script) { - if (startOffset < scriptStartOffset) { - ctx.s.remove(0, startOffset); - ctx.s.remove(endOffset, scriptStartOffset); - ctx.s.remove(scriptEndOffset, source.length); - } else { - ctx.s.remove(0, scriptStartOffset); - ctx.s.remove(scriptEndOffset, startOffset); - ctx.s.remove(endOffset, source.length); - } - } else { - ctx.s.remove(0, startOffset); - ctx.s.remove(endOffset, source.length); - } - if (scriptAst) { - Object.assign(ctx.bindingMetadata, analyzeScriptBindings(scriptAst.body)); - } - for (const [key, { isType, imported, source: source2 }] of Object.entries( - ctx.userImports - )) { - if (isType) continue; - ctx.bindingMetadata[key] = imported === "*" || imported === "default" && source2.endsWith(".vue") || source2 === "vue" ? "setup-const" : "setup-maybe-ref"; - } - for (const key in scriptBindings) { - ctx.bindingMetadata[key] = scriptBindings[key]; - } - for (const key in setupBindings) { - ctx.bindingMetadata[key] = setupBindings[key]; - } - if (sfc.cssVars.length && // no need to do this when targeting SSR - !((_a = options.templateOptions) == null ? void 0 : _a.ssr)) { - ctx.helperImports.add(CSS_VARS_HELPER); - ctx.helperImports.add("unref"); - ctx.s.prependLeft( - startOffset, - ` -${genCssVarsCode( - sfc.cssVars, - ctx.bindingMetadata, - scopeId, - !!options.isProd - )} -` - ); - } - let args = `__props`; - if (ctx.propsTypeDecl) { - args += `: any`; - } - if (ctx.propsDecl) { - if (ctx.propsDestructureRestId) { - ctx.s.overwrite( - startOffset + ctx.propsCall.start, - startOffset + ctx.propsCall.end, - `${ctx.helper(`createPropsRestProxy`)}(__props, ${JSON.stringify( - Object.keys(ctx.propsDestructuredBindings) - )})` - ); - ctx.s.overwrite( - startOffset + ctx.propsDestructureDecl.start, - startOffset + ctx.propsDestructureDecl.end, - ctx.propsDestructureRestId - ); - } else if (!ctx.propsDestructureDecl) { - ctx.s.overwrite( - startOffset + ctx.propsCall.start, - startOffset + ctx.propsCall.end, - "__props" - ); - } - } - if (hasAwait) { - const any = ctx.isTS ? `: any` : ``; - ctx.s.prependLeft(startOffset, ` -let __temp${any}, __restore${any} -`); - } - const destructureElements = ctx.hasDefineExposeCall || !options.inlineTemplate ? [`expose: __expose`] : []; - if (ctx.emitDecl) { - destructureElements.push(`emit: __emit`); - } - if (destructureElements.length) { - args += `, { ${destructureElements.join(", ")} }`; - } - let returned; - if (!options.inlineTemplate || !sfc.template && ctx.hasDefaultExportRender) { - const allBindings = { - ...scriptBindings, - ...setupBindings - }; - for (const key in ctx.userImports) { - if (!ctx.userImports[key].isType && ctx.userImports[key].isUsedInTemplate) { - allBindings[key] = true; - } - } - returned = `{ `; - for (const key in allBindings) { - if (allBindings[key] === true && ctx.userImports[key].source !== "vue" && !ctx.userImports[key].source.endsWith(".vue")) { - returned += `get ${key}() { return ${key} }, `; - } else if (ctx.bindingMetadata[key] === "setup-let") { - const setArg = key === "v" ? `_v` : `v`; - returned += `get ${key}() { return ${key} }, set ${key}(${setArg}) { ${key} = ${setArg} }, `; - } else { - returned += `${key}, `; - } - } - returned = returned.replace(/, $/, "") + ` }`; - } else { - if (sfc.template && !sfc.template.src) { - if (options.templateOptions && options.templateOptions.ssr) { - hasInlinedSsrRenderFn = true; - } - const { code, ast, preamble, tips, errors } = compileTemplate({ - filename, - ast: sfc.template.ast, - source: sfc.template.content, - inMap: sfc.template.map, - ...options.templateOptions, - id: scopeId, - scoped: sfc.styles.some((s) => s.scoped), - isProd: options.isProd, - ssrCssVars: sfc.cssVars, - compilerOptions: { - ...options.templateOptions && options.templateOptions.compilerOptions, - inline: true, - isTS: ctx.isTS, - bindingMetadata: ctx.bindingMetadata - } - }); - if (tips.length) { - tips.forEach(warnOnce); - } - const err = errors[0]; - if (typeof err === "string") { - throw new Error(err); - } else if (err) { - if (err.loc) { - err.message += ` - -` + sfc.filename + "\n" + shared.generateCodeFrame( - source, - err.loc.start.offset, - err.loc.end.offset - ) + ` -`; - } - throw err; - } - if (preamble) { - ctx.s.prepend(preamble); - } - if (ast && ast.helpers.has(CompilerDOM.UNREF)) { - ctx.helperImports.delete("unref"); - } - returned = code; - } else { - returned = `() => {}`; - } - } - if (!options.inlineTemplate && true) { - ctx.s.appendRight( - endOffset, - ` -const __returned__ = ${returned} -Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true }) -return __returned__ -} - -` - ); - } else { - ctx.s.appendRight(endOffset, ` -return ${returned} -} - -`); - } - const genDefaultAs = options.genDefaultAs ? `const ${options.genDefaultAs} =` : `export default`; - let runtimeOptions = ``; - if (!ctx.hasDefaultExportName && filename && filename !== DEFAULT_FILENAME) { - const match = filename.match(/([^/\\]+)\.\w+$/); - if (match) { - runtimeOptions += ` - __name: '${match[1]}',`; - } - } - if (hasInlinedSsrRenderFn) { - runtimeOptions += ` - __ssrInlineRender: true,`; - } - const propsDecl = genRuntimeProps(ctx); - if (propsDecl) runtimeOptions += ` - props: ${propsDecl},`; - const emitsDecl = genRuntimeEmits(ctx); - if (emitsDecl) runtimeOptions += ` - emits: ${emitsDecl},`; - let definedOptions = ""; - if (ctx.optionsRuntimeDecl) { - definedOptions = scriptSetup.content.slice(ctx.optionsRuntimeDecl.start, ctx.optionsRuntimeDecl.end).trim(); - } - const exposeCall = ctx.hasDefineExposeCall || options.inlineTemplate ? `` : ` __expose(); -`; - if (ctx.isTS) { - const def = (defaultExport ? ` - ...${normalScriptDefaultVar},` : ``) + (definedOptions ? ` - ...${definedOptions},` : ""); - ctx.s.prependLeft( - startOffset, - ` -${genDefaultAs} /*@__PURE__*/${ctx.helper( - `defineComponent` - )}({${def}${runtimeOptions} - ${hasAwait ? `async ` : ``}setup(${args}) { -${exposeCall}` - ); - ctx.s.appendRight(endOffset, `})`); - } else { - if (defaultExport || definedOptions) { - ctx.s.prependLeft( - startOffset, - ` -${genDefaultAs} /*@__PURE__*/Object.assign(${defaultExport ? `${normalScriptDefaultVar}, ` : ""}${definedOptions ? `${definedOptions}, ` : ""}{${runtimeOptions} - ${hasAwait ? `async ` : ``}setup(${args}) { -${exposeCall}` - ); - ctx.s.appendRight(endOffset, `})`); - } else { - ctx.s.prependLeft( - startOffset, - ` -${genDefaultAs} {${runtimeOptions} - ${hasAwait ? `async ` : ``}setup(${args}) { -${exposeCall}` - ); - ctx.s.appendRight(endOffset, `}`); - } - } - if (ctx.helperImports.size > 0) { - const runtimeModuleName = (_c = (_b = options.templateOptions) == null ? void 0 : _b.compilerOptions) == null ? void 0 : _c.runtimeModuleName; - const importSrc = runtimeModuleName ? JSON.stringify(runtimeModuleName) : `'vue'`; - ctx.s.prepend( - `import { ${[...ctx.helperImports].map((h) => `${h} as _${h}`).join(", ")} } from ${importSrc} -` - ); - } - return { - ...scriptSetup, - bindings: ctx.bindingMetadata, - imports: ctx.userImports, - content: ctx.s.toString(), - map: options.sourceMap !== false ? ctx.s.generateMap({ - source: filename, - hires: true, - includeContent: true - }) : void 0, - scriptAst: scriptAst == null ? void 0 : scriptAst.body, - scriptSetupAst: scriptSetupAst == null ? void 0 : scriptSetupAst.body, - deps: ctx.deps ? [...ctx.deps] : void 0 - }; -} -function registerBinding(bindings, node, type) { - bindings[node.name] = type; -} -function walkDeclaration(from, node, bindings, userImportAliases, hoistStatic, isPropsDestructureEnabled = false) { - let isAllLiteral = false; - if (node.type === "VariableDeclaration") { - const isConst = node.kind === "const"; - isAllLiteral = isConst && node.declarations.every( - (decl) => decl.id.type === "Identifier" && isStaticNode(decl.init) - ); - for (const { id, init: _init } of node.declarations) { - const init = _init && CompilerDOM.unwrapTSNode(_init); - const isConstMacroCall = isConst && isCallOf( - init, - (c) => c === DEFINE_PROPS || c === DEFINE_EMITS || c === WITH_DEFAULTS || c === DEFINE_SLOTS - ); - if (id.type === "Identifier") { - let bindingType; - const userReactiveBinding = userImportAliases["reactive"]; - if ((hoistStatic || from === "script") && (isAllLiteral || isConst && isStaticNode(init))) { - bindingType = "literal-const"; - } else if (isCallOf(init, userReactiveBinding)) { - bindingType = isConst ? "setup-reactive-const" : "setup-let"; - } else if ( - // if a declaration is a const literal, we can mark it so that - // the generated render fn code doesn't need to unref() it - isConstMacroCall || isConst && canNeverBeRef(init, userReactiveBinding) - ) { - bindingType = isCallOf(init, DEFINE_PROPS) ? "setup-reactive-const" : "setup-const"; - } else if (isConst) { - if (isCallOf( - init, - (m) => m === userImportAliases["ref"] || m === userImportAliases["computed"] || m === userImportAliases["shallowRef"] || m === userImportAliases["customRef"] || m === userImportAliases["toRef"] || m === DEFINE_MODEL - )) { - bindingType = "setup-ref"; - } else { - bindingType = "setup-maybe-ref"; - } - } else { - bindingType = "setup-let"; - } - registerBinding(bindings, id, bindingType); - } else { - if (isCallOf(init, DEFINE_PROPS) && isPropsDestructureEnabled) { - continue; - } - if (id.type === "ObjectPattern") { - walkObjectPattern(id, bindings, isConst, isConstMacroCall); - } else if (id.type === "ArrayPattern") { - walkArrayPattern(id, bindings, isConst, isConstMacroCall); - } - } - } - } else if (node.type === "TSEnumDeclaration") { - isAllLiteral = node.members.every( - (member) => !member.initializer || isStaticNode(member.initializer) - ); - bindings[node.id.name] = isAllLiteral ? "literal-const" : "setup-const"; - } else if (node.type === "FunctionDeclaration" || node.type === "ClassDeclaration") { - bindings[node.id.name] = "setup-const"; - } - return isAllLiteral; -} -function walkObjectPattern(node, bindings, isConst, isDefineCall = false) { - for (const p of node.properties) { - if (p.type === "ObjectProperty") { - if (p.key.type === "Identifier" && p.key === p.value) { - const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; - registerBinding(bindings, p.key, type); - } else { - walkPattern(p.value, bindings, isConst, isDefineCall); - } - } else { - const type = isConst ? "setup-const" : "setup-let"; - registerBinding(bindings, p.argument, type); - } - } -} -function walkArrayPattern(node, bindings, isConst, isDefineCall = false) { - for (const e of node.elements) { - e && walkPattern(e, bindings, isConst, isDefineCall); - } -} -function walkPattern(node, bindings, isConst, isDefineCall = false) { - if (node.type === "Identifier") { - const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; - registerBinding(bindings, node, type); - } else if (node.type === "RestElement") { - const type = isConst ? "setup-const" : "setup-let"; - registerBinding(bindings, node.argument, type); - } else if (node.type === "ObjectPattern") { - walkObjectPattern(node, bindings, isConst); - } else if (node.type === "ArrayPattern") { - walkArrayPattern(node, bindings, isConst); - } else if (node.type === "AssignmentPattern") { - if (node.left.type === "Identifier") { - const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; - registerBinding(bindings, node.left, type); - } else { - walkPattern(node.left, bindings, isConst); - } - } -} -function canNeverBeRef(node, userReactiveImport) { - if (isCallOf(node, userReactiveImport)) { - return true; - } - switch (node.type) { - case "UnaryExpression": - case "BinaryExpression": - case "ArrayExpression": - case "ObjectExpression": - case "FunctionExpression": - case "ArrowFunctionExpression": - case "UpdateExpression": - case "ClassExpression": - case "TaggedTemplateExpression": - return true; - case "SequenceExpression": - return canNeverBeRef( - node.expressions[node.expressions.length - 1], - userReactiveImport - ); - default: - if (isLiteralNode(node)) { - return true; - } - return false; - } -} -function isStaticNode(node) { - node = CompilerDOM.unwrapTSNode(node); - switch (node.type) { - case "UnaryExpression": - return isStaticNode(node.argument); - case "LogicalExpression": - // 1 > 2 - case "BinaryExpression": - return isStaticNode(node.left) && isStaticNode(node.right); - case "ConditionalExpression": { - return isStaticNode(node.test) && isStaticNode(node.consequent) && isStaticNode(node.alternate); - } - case "SequenceExpression": - // (1, 2) - case "TemplateLiteral": - return node.expressions.every((expr) => isStaticNode(expr)); - case "ParenthesizedExpression": - return isStaticNode(node.expression); - case "StringLiteral": - case "NumericLiteral": - case "BooleanLiteral": - case "NullLiteral": - case "BigIntLiteral": - return true; - } - return false; -} - -const version = "3.5.13"; -const parseCache = parseCache$1; -const errorMessages = { - ...CompilerDOM.errorMessages, - ...CompilerDOM.DOMErrorMessages -}; -const walk = estreeWalker.walk; -const shouldTransformRef = () => false; - -exports.extractIdentifiers = compilerCore.extractIdentifiers; -exports.generateCodeFrame = compilerCore.generateCodeFrame; -exports.isInDestructureAssignment = compilerCore.isInDestructureAssignment; -exports.isStaticProperty = compilerCore.isStaticProperty; -exports.walkIdentifiers = compilerCore.walkIdentifiers; -exports.MagicString = MagicString; -exports.babelParse = parser$2.parse; -exports.compileScript = compileScript; -exports.compileStyle = compileStyle; -exports.compileStyleAsync = compileStyleAsync; -exports.compileTemplate = compileTemplate; -exports.errorMessages = errorMessages; -exports.extractRuntimeEmits = extractRuntimeEmits; -exports.extractRuntimeProps = extractRuntimeProps; -exports.inferRuntimeType = inferRuntimeType; -exports.invalidateTypeCache = invalidateTypeCache; -exports.parse = parse$1; -exports.parseCache = parseCache; -exports.registerTS = registerTS; -exports.resolveTypeElements = resolveTypeElements; -exports.rewriteDefault = rewriteDefault; -exports.rewriteDefaultAST = rewriteDefaultAST; -exports.shouldTransformRef = shouldTransformRef; -exports.version = version; -exports.walk = walk; diff --git a/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts b/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts deleted file mode 100644 index 3b9d50c..0000000 --- a/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +++ /dev/null @@ -1,484 +0,0 @@ -import * as _babel_types from '@babel/types'; -import { Statement, Expression, TSType, Node, Program, CallExpression, ObjectPattern, TSModuleDeclaration, TSPropertySignature, TSMethodSignature, TSCallSignatureDeclaration, TSFunctionType } from '@babel/types'; -import { RootNode, CompilerOptions, CodegenResult, ParserOptions, CompilerError, RawSourceMap, SourceLocation, BindingMetadata as BindingMetadata$1 } from '@vue/compiler-core'; -export { BindingMetadata, CompilerError, CompilerOptions, extractIdentifiers, generateCodeFrame, isInDestructureAssignment, isStaticProperty, walkIdentifiers } from '@vue/compiler-core'; -import { ParserPlugin } from '@babel/parser'; -export { parse as babelParse } from '@babel/parser'; -import { Result, LazyResult } from 'postcss'; -import MagicString from 'magic-string'; -export { default as MagicString } from 'magic-string'; -import TS from 'typescript'; - -export interface AssetURLTagConfig { - [name: string]: string[]; -} -export interface AssetURLOptions { - /** - * If base is provided, instead of transforming relative asset urls into - * imports, they will be directly rewritten to absolute urls. - */ - base?: string | null; - /** - * If true, also processes absolute urls. - */ - includeAbsolute?: boolean; - tags?: AssetURLTagConfig; -} - -export interface TemplateCompiler { - compile(source: string | RootNode, options: CompilerOptions): CodegenResult; - parse(template: string, options: ParserOptions): RootNode; -} -export interface SFCTemplateCompileResults { - code: string; - ast?: RootNode; - preamble?: string; - source: string; - tips: string[]; - errors: (string | CompilerError)[]; - map?: RawSourceMap; -} -export interface SFCTemplateCompileOptions { - source: string; - ast?: RootNode; - filename: string; - id: string; - scoped?: boolean; - slotted?: boolean; - isProd?: boolean; - ssr?: boolean; - ssrCssVars?: string[]; - inMap?: RawSourceMap; - compiler?: TemplateCompiler; - compilerOptions?: CompilerOptions; - preprocessLang?: string; - preprocessOptions?: any; - /** - * In some cases, compiler-sfc may not be inside the project root (e.g. when - * linked or globally installed). In such cases a custom `require` can be - * passed to correctly resolve the preprocessors. - */ - preprocessCustomRequire?: (id: string) => any; - /** - * Configure what tags/attributes to transform into asset url imports, - * or disable the transform altogether with `false`. - */ - transformAssetUrls?: AssetURLOptions | AssetURLTagConfig | boolean; -} -export declare function compileTemplate(options: SFCTemplateCompileOptions): SFCTemplateCompileResults; - -export interface SFCScriptCompileOptions { - /** - * Scope ID for prefixing injected CSS variables. - * This must be consistent with the `id` passed to `compileStyle`. - */ - id: string; - /** - * Production mode. Used to determine whether to generate hashed CSS variables - */ - isProd?: boolean; - /** - * Enable/disable source map. Defaults to true. - */ - sourceMap?: boolean; - /** - * https://babeljs.io/docs/en/babel-parser#plugins - */ - babelParserPlugins?: ParserPlugin[]; - /** - * A list of files to parse for global types to be made available for type - * resolving in SFC macros. The list must be fully resolved file system paths. - */ - globalTypeFiles?: string[]; - /** - * Compile the template and inline the resulting render function - * directly inside setup(). - * - Only affects `<script setup>` - * - This should only be used in production because it prevents the template - * from being hot-reloaded separately from component state. - */ - inlineTemplate?: boolean; - /** - * Generate the final component as a variable instead of default export. - * This is useful in e.g. @vitejs/plugin-vue where the script needs to be - * placed inside the main module. - */ - genDefaultAs?: string; - /** - * Options for template compilation when inlining. Note these are options that - * would normally be passed to `compiler-sfc`'s own `compileTemplate()`, not - * options passed to `compiler-dom`. - */ - templateOptions?: Partial<SFCTemplateCompileOptions>; - /** - * Hoist <script setup> static constants. - * - Only enables when one `<script setup>` exists. - * @default true - */ - hoistStatic?: boolean; - /** - * Set to `false` to disable reactive destructure for `defineProps` (pre-3.5 - * behavior), or set to `'error'` to throw hard error on props destructures. - * @default true - */ - propsDestructure?: boolean | 'error'; - /** - * File system access methods to be used when resolving types - * imported in SFC macros. Defaults to ts.sys in Node.js, can be overwritten - * to use a virtual file system for use in browsers (e.g. in REPLs) - */ - fs?: { - fileExists(file: string): boolean; - readFile(file: string): string | undefined; - realpath?(file: string): string; - }; - /** - * Transform Vue SFCs into custom elements. - */ - customElement?: boolean | ((filename: string) => boolean); -} -interface ImportBinding { - isType: boolean; - imported: string; - local: string; - source: string; - isFromSetup: boolean; - isUsedInTemplate: boolean; -} -/** - * Compile `<script setup>` - * It requires the whole SFC descriptor because we need to handle and merge - * normal `<script>` + `<script setup>` if both are present. - */ -export declare function compileScript(sfc: SFCDescriptor, options: SFCScriptCompileOptions): SFCScriptBlock; - -export interface SFCParseOptions { - filename?: string; - sourceMap?: boolean; - sourceRoot?: string; - pad?: boolean | 'line' | 'space'; - ignoreEmpty?: boolean; - compiler?: TemplateCompiler; - templateParseOptions?: ParserOptions; -} -export interface SFCBlock { - type: string; - content: string; - attrs: Record<string, string | true>; - loc: SourceLocation; - map?: RawSourceMap; - lang?: string; - src?: string; -} -export interface SFCTemplateBlock extends SFCBlock { - type: 'template'; - ast?: RootNode; -} -export interface SFCScriptBlock extends SFCBlock { - type: 'script'; - setup?: string | boolean; - bindings?: BindingMetadata$1; - imports?: Record<string, ImportBinding>; - scriptAst?: _babel_types.Statement[]; - scriptSetupAst?: _babel_types.Statement[]; - warnings?: string[]; - /** - * Fully resolved dependency file paths (unix slashes) with imported types - * used in macros, used for HMR cache busting in @vitejs/plugin-vue and - * vue-loader. - */ - deps?: string[]; -} -export interface SFCStyleBlock extends SFCBlock { - type: 'style'; - scoped?: boolean; - module?: string | boolean; -} -export interface SFCDescriptor { - filename: string; - source: string; - template: SFCTemplateBlock | null; - script: SFCScriptBlock | null; - scriptSetup: SFCScriptBlock | null; - styles: SFCStyleBlock[]; - customBlocks: SFCBlock[]; - cssVars: string[]; - /** - * whether the SFC uses :slotted() modifier. - * this is used as a compiler optimization hint. - */ - slotted: boolean; - /** - * compare with an existing descriptor to determine whether HMR should perform - * a reload vs. re-render. - * - * Note: this comparison assumes the prev/next script are already identical, - * and only checks the special case where <script setup lang="ts"> unused import - * pruning result changes due to template changes. - */ - shouldForceReload: (prevImports: Record<string, ImportBinding>) => boolean; -} -export interface SFCParseResult { - descriptor: SFCDescriptor; - errors: (CompilerError | SyntaxError)[]; -} -export declare function parse(source: string, options?: SFCParseOptions): SFCParseResult; - -type PreprocessLang = 'less' | 'sass' | 'scss' | 'styl' | 'stylus'; - -export interface SFCStyleCompileOptions { - source: string; - filename: string; - id: string; - scoped?: boolean; - trim?: boolean; - isProd?: boolean; - inMap?: RawSourceMap; - preprocessLang?: PreprocessLang; - preprocessOptions?: any; - preprocessCustomRequire?: (id: string) => any; - postcssOptions?: any; - postcssPlugins?: any[]; - /** - * @deprecated use `inMap` instead. - */ - map?: RawSourceMap; -} -/** - * Aligns with postcss-modules - * https://github.com/css-modules/postcss-modules - */ -interface CSSModulesOptions { - scopeBehaviour?: 'global' | 'local'; - generateScopedName?: string | ((name: string, filename: string, css: string) => string); - hashPrefix?: string; - localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly'; - exportGlobals?: boolean; - globalModulePaths?: RegExp[]; -} -export interface SFCAsyncStyleCompileOptions extends SFCStyleCompileOptions { - isAsync?: boolean; - modules?: boolean; - modulesOptions?: CSSModulesOptions; -} -export interface SFCStyleCompileResults { - code: string; - map: RawSourceMap | undefined; - rawResult: Result | LazyResult | undefined; - errors: Error[]; - modules?: Record<string, string>; - dependencies: Set<string>; -} -export declare function compileStyle(options: SFCStyleCompileOptions): SFCStyleCompileResults; -export declare function compileStyleAsync(options: SFCAsyncStyleCompileOptions): Promise<SFCStyleCompileResults>; - -export declare function rewriteDefault(input: string, as: string, parserPlugins?: ParserPlugin[]): string; -/** - * Utility for rewriting `export default` in a script block into a variable - * declaration so that we can inject things into it - */ -export declare function rewriteDefaultAST(ast: Statement[], s: MagicString, as: string): void; - -type PropsDestructureBindings = Record<string, // public prop key -{ - local: string; - default?: Expression; -}>; -export declare function extractRuntimeProps(ctx: TypeResolveContext): string | undefined; - -interface ModelDecl { - type: TSType | undefined; - options: string | undefined; - identifier: string | undefined; - runtimeOptionNodes: Node[]; -} - -declare enum BindingTypes { - /** - * returned from data() - */ - DATA = "data", - /** - * declared as a prop - */ - PROPS = "props", - /** - * a local alias of a `<script setup>` destructured prop. - * the original is stored in __propsAliases of the bindingMetadata object. - */ - PROPS_ALIASED = "props-aliased", - /** - * a let binding (may or may not be a ref) - */ - SETUP_LET = "setup-let", - /** - * a const binding that can never be a ref. - * these bindings don't need `unref()` calls when processed in inlined - * template expressions. - */ - SETUP_CONST = "setup-const", - /** - * a const binding that does not need `unref()`, but may be mutated. - */ - SETUP_REACTIVE_CONST = "setup-reactive-const", - /** - * a const binding that may be a ref. - */ - SETUP_MAYBE_REF = "setup-maybe-ref", - /** - * bindings that are guaranteed to be refs - */ - SETUP_REF = "setup-ref", - /** - * declared by other options, e.g. computed, inject - */ - OPTIONS = "options", - /** - * a literal constant, e.g. 'foo', 1, true - */ - LITERAL_CONST = "literal-const" -} -type BindingMetadata = { - [key: string]: BindingTypes | undefined; -} & { - __isScriptSetup?: boolean; - __propsAliases?: Record<string, string>; -}; - -export declare class ScriptCompileContext { - descriptor: SFCDescriptor; - options: Partial<SFCScriptCompileOptions>; - isJS: boolean; - isTS: boolean; - isCE: boolean; - scriptAst: Program | null; - scriptSetupAst: Program | null; - source: string; - filename: string; - s: MagicString; - startOffset: number | undefined; - endOffset: number | undefined; - scope?: TypeScope; - globalScopes?: TypeScope[]; - userImports: Record<string, ImportBinding>; - hasDefinePropsCall: boolean; - hasDefineEmitCall: boolean; - hasDefineExposeCall: boolean; - hasDefaultExportName: boolean; - hasDefaultExportRender: boolean; - hasDefineOptionsCall: boolean; - hasDefineSlotsCall: boolean; - hasDefineModelCall: boolean; - propsCall: CallExpression | undefined; - propsDecl: Node | undefined; - propsRuntimeDecl: Node | undefined; - propsTypeDecl: Node | undefined; - propsDestructureDecl: ObjectPattern | undefined; - propsDestructuredBindings: PropsDestructureBindings; - propsDestructureRestId: string | undefined; - propsRuntimeDefaults: Node | undefined; - emitsRuntimeDecl: Node | undefined; - emitsTypeDecl: Node | undefined; - emitDecl: Node | undefined; - modelDecls: Record<string, ModelDecl>; - optionsRuntimeDecl: Node | undefined; - bindingMetadata: BindingMetadata; - helperImports: Set<string>; - helper(key: string): string; - /** - * to be exposed on compiled script block for HMR cache busting - */ - deps?: Set<string>; - /** - * cache for resolved fs - */ - fs?: NonNullable<SFCScriptCompileOptions['fs']>; - constructor(descriptor: SFCDescriptor, options: Partial<SFCScriptCompileOptions>); - getString(node: Node, scriptSetup?: boolean): string; - warn(msg: string, node: Node, scope?: TypeScope): void; - error(msg: string, node: Node, scope?: TypeScope): never; -} - -export type SimpleTypeResolveOptions = Partial<Pick<SFCScriptCompileOptions, 'globalTypeFiles' | 'fs' | 'babelParserPlugins' | 'isProd'>>; -/** - * TypeResolveContext is compatible with ScriptCompileContext - * but also allows a simpler version of it with minimal required properties - * when resolveType needs to be used in a non-SFC context, e.g. in a babel - * plugin. The simplest context can be just: - * ```ts - * const ctx: SimpleTypeResolveContext = { - * filename: '...', - * source: '...', - * options: {}, - * error() {}, - * ast: [] - * } - * ``` - */ -export type SimpleTypeResolveContext = Pick<ScriptCompileContext, 'source' | 'filename' | 'error' | 'helper' | 'getString' | 'propsTypeDecl' | 'propsRuntimeDefaults' | 'propsDestructuredBindings' | 'emitsTypeDecl' | 'isCE'> & Partial<Pick<ScriptCompileContext, 'scope' | 'globalScopes' | 'deps' | 'fs'>> & { - ast: Statement[]; - options: SimpleTypeResolveOptions; -}; -export type TypeResolveContext = ScriptCompileContext | SimpleTypeResolveContext; -type Import = Pick<ImportBinding, 'source' | 'imported'>; -interface WithScope { - _ownerScope: TypeScope; -} -type ScopeTypeNode = Node & WithScope & { - _ns?: TSModuleDeclaration & WithScope; -}; -declare class TypeScope { - filename: string; - source: string; - offset: number; - imports: Record<string, Import>; - types: Record<string, ScopeTypeNode>; - declares: Record<string, ScopeTypeNode>; - constructor(filename: string, source: string, offset?: number, imports?: Record<string, Import>, types?: Record<string, ScopeTypeNode>, declares?: Record<string, ScopeTypeNode>); - isGenericScope: boolean; - resolvedImportSources: Record<string, string>; - exportedTypes: Record<string, ScopeTypeNode>; - exportedDeclares: Record<string, ScopeTypeNode>; -} -interface MaybeWithScope { - _ownerScope?: TypeScope; -} -interface ResolvedElements { - props: Record<string, (TSPropertySignature | TSMethodSignature) & { - _ownerScope: TypeScope; - }>; - calls?: (TSCallSignatureDeclaration | TSFunctionType)[]; -} -/** - * Resolve arbitrary type node to a list of type elements that can be then - * mapped to runtime props or emits. - */ -export declare function resolveTypeElements(ctx: TypeResolveContext, node: Node & MaybeWithScope & { - _resolvedElements?: ResolvedElements; -}, scope?: TypeScope, typeParameters?: Record<string, Node>): ResolvedElements; -/** - * @private - */ -export declare function registerTS(_loadTS: () => typeof TS): void; -/** - * @private - */ -export declare function invalidateTypeCache(filename: string): void; -export declare function inferRuntimeType(ctx: TypeResolveContext, node: Node & MaybeWithScope, scope?: TypeScope, isKeyOf?: boolean): string[]; - -export declare function extractRuntimeEmits(ctx: TypeResolveContext): Set<string>; - -export declare const version: string; - -export declare const parseCache: Map<string, SFCParseResult>; -export declare const errorMessages: Record<number, string>; - -export declare const walk: any; - -/** - * @deprecated this is preserved to avoid breaking vite-plugin-vue < 5.0 - * with reactivityTransform: true. The desired behavior should be silently - * ignoring the option instead of breaking. - */ -export declare const shouldTransformRef: () => boolean; - diff --git a/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js b/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js deleted file mode 100644 index a7cf8b0..0000000 --- a/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +++ /dev/null @@ -1,53043 +0,0 @@ -/** -* @vue/compiler-sfc v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function makeMap(str) { - const map = /* @__PURE__ */ Object.create(null); - for (const key of str.split(",")) map[key] = 1; - return (val) => val in map; -} - -const EMPTY_OBJ = Object.freeze({}) ; -const NOOP = () => { -}; -const NO = () => false; -const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter -(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); -const extend = Object.assign; -const hasOwnProperty$3 = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty$3.call(val, key); -const isArray$3 = Array.isArray; -const isMap = (val) => toTypeString(val) === "[object Map]"; -const isSet = (val) => toTypeString(val) === "[object Set]"; -const isFunction$1 = (val) => typeof val === "function"; -const isString$1 = (val) => typeof val === "string"; -const isSymbol$1 = (val) => typeof val === "symbol"; -const isObject$2 = (val) => val !== null && typeof val === "object"; -const objectToString$1 = Object.prototype.toString; -const toTypeString = (value) => objectToString$1.call(value); -const isPlainObject = (val) => toTypeString(val) === "[object Object]"; -const isReservedProp = /* @__PURE__ */ makeMap( - // the leading comma is intentional so empty string "" is also included - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" -); -const isBuiltInDirective = /* @__PURE__ */ makeMap( - "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" -); -const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -const camelizeRE = /-(\w)/g; -const camelize = cacheStringFunction( - (str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); - } -); -const hyphenateRE = /\B([A-Z])/g; -const hyphenate = cacheStringFunction( - (str) => str.replace(hyphenateRE, "-$1").toLowerCase() -); -const capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); -}); -const toHandlerKey = cacheStringFunction( - (str) => { - const s = str ? `on${capitalize(str)}` : ``; - return s; - } -); -const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; -function genPropsAccessExp(name) { - return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`; -} -function genCacheKey(source, options) { - return source + JSON.stringify( - options, - (_, val) => typeof val === "function" ? val.toString() : val - ); -} - -const PatchFlagNames = { - [1]: `TEXT`, - [2]: `CLASS`, - [4]: `STYLE`, - [8]: `PROPS`, - [16]: `FULL_PROPS`, - [32]: `NEED_HYDRATION`, - [64]: `STABLE_FRAGMENT`, - [128]: `KEYED_FRAGMENT`, - [256]: `UNKEYED_FRAGMENT`, - [512]: `NEED_PATCH`, - [1024]: `DYNAMIC_SLOTS`, - [2048]: `DEV_ROOT_FRAGMENT`, - [-1]: `HOISTED`, - [-2]: `BAIL` -}; - -const slotFlagsText = { - [1]: "STABLE", - [2]: "DYNAMIC", - [3]: "FORWARDED" -}; - -const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; -const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); - -const range = 2; -function generateCodeFrame(source, start = 0, end = source.length) { - start = Math.max(0, Math.min(start, source.length)); - end = Math.max(0, Math.min(end, source.length)); - if (start > end) return ""; - let lines = source.split(/(\r?\n)/); - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) continue; - const line = j + 1; - res.push( - `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` - ); - const lineLength = lines[j].length; - const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; - if (j === i) { - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max( - 1, - end > count ? lineLength - pad : end - start - ); - res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); - } else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + "^".repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; - } - } - return res.join("\n"); -} - -function normalizeStyle(value) { - if (isArray$3(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString$1(item) ? parseStringStyle(item) : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } else if (isString$1(value) || isObject$2(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:([^]+)/; -const styleCommentRE = /\/\*[^]*?\*\//g; -function parseStringStyle(cssText) { - const ret = {}; - cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function stringifyStyle(styles) { - if (!styles) return ""; - if (isString$1(styles)) return styles; - let ret = ""; - for (const key in styles) { - const value = styles[key]; - if (isString$1(value) || typeof value === "number") { - const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); - ret += `${normalizedKey}:${value};`; - } - } - return ret; -} -function normalizeClass(value) { - let res = ""; - if (isString$1(value)) { - res = value; - } else if (isArray$3(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + " "; - } - } - } else if (isObject$2(value)) { - for (const name in value) { - if (value[name]) { - res += name + " "; - } - } - } - return res.trim(); -} - -const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; -const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; -const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; -const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; -const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); -const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); -const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); -const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); - -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isBooleanAttr = /* @__PURE__ */ makeMap( - specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` -); -const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; -const attrValidationCache = {}; -function isSSRSafeAttrName(name) { - if (attrValidationCache.hasOwnProperty(name)) { - return attrValidationCache[name]; - } - const isUnsafe = unsafeAttrCharRE.test(name); - if (isUnsafe) { - console.error(`unsafe attribute name: ${name}`); - } - return attrValidationCache[name] = !isUnsafe; -} -const propsToAttrMap = { - acceptCharset: "accept-charset", - className: "class", - htmlFor: "for", - httpEquiv: "http-equiv" -}; -const isKnownHtmlAttr = /* @__PURE__ */ makeMap( - `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` -); -const isKnownSvgAttr = /* @__PURE__ */ makeMap( - `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` -); -const isKnownMathMLAttr = /* @__PURE__ */ makeMap( - `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns` -); - -const escapeRE = /["'&<>]/; -function escapeHtml(string) { - const str = "" + string; - const match = escapeRE.exec(str); - if (!match) { - return str; - } - let html = ""; - let escaped; - let index; - let lastIndex = 0; - for (index = match.index; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: - escaped = """; - break; - case 38: - escaped = "&"; - break; - case 39: - escaped = "'"; - break; - case 60: - escaped = "<"; - break; - case 62: - escaped = ">"; - break; - default: - continue; - } - if (lastIndex !== index) { - html += str.slice(lastIndex, index); - } - lastIndex = index + 1; - html += escaped; - } - return lastIndex !== index ? html + str.slice(lastIndex, index) : html; -} -const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; -function getEscapedCssVarName(key, doubleEscape) { - return key.replace( - cssVarNameEscapeSymbolsRE, - (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}` - ); -} - -const isRef = (val) => { - return !!(val && val["__v_isRef"] === true); -}; -const toDisplayString = (val) => { - return isString$1(val) ? val : val == null ? "" : isArray$3(val) || isObject$2(val) && (val.toString === objectToString$1 || !isFunction$1(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); -}; -const replacer = (_key, val) => { - if (isRef(val)) { - return replacer(_key, val.value); - } else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce( - (entries, [key, val2], i) => { - entries[stringifySymbol(key, i) + " =>"] = val2; - return entries; - }, - {} - ) - }; - } else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) - }; - } else if (isSymbol$1(val)) { - return stringifySymbol(val); - } else if (isObject$2(val) && !isArray$3(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; -const stringifySymbol = (v, i = "") => { - var _a; - return ( - // Symbol.description in es2019+ so we need to cast here to pass - // the lib: es2016 check - isSymbol$1(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v - ); -}; - -const FRAGMENT = Symbol(`Fragment` ); -const TELEPORT = Symbol(`Teleport` ); -const SUSPENSE = Symbol(`Suspense` ); -const KEEP_ALIVE = Symbol(`KeepAlive` ); -const BASE_TRANSITION = Symbol( - `BaseTransition` -); -const OPEN_BLOCK = Symbol(`openBlock` ); -const CREATE_BLOCK = Symbol(`createBlock` ); -const CREATE_ELEMENT_BLOCK = Symbol( - `createElementBlock` -); -const CREATE_VNODE = Symbol(`createVNode` ); -const CREATE_ELEMENT_VNODE = Symbol( - `createElementVNode` -); -const CREATE_COMMENT = Symbol( - `createCommentVNode` -); -const CREATE_TEXT = Symbol( - `createTextVNode` -); -const CREATE_STATIC = Symbol( - `createStaticVNode` -); -const RESOLVE_COMPONENT = Symbol( - `resolveComponent` -); -const RESOLVE_DYNAMIC_COMPONENT = Symbol( - `resolveDynamicComponent` -); -const RESOLVE_DIRECTIVE = Symbol( - `resolveDirective` -); -const RESOLVE_FILTER = Symbol( - `resolveFilter` -); -const WITH_DIRECTIVES = Symbol( - `withDirectives` -); -const RENDER_LIST = Symbol(`renderList` ); -const RENDER_SLOT = Symbol(`renderSlot` ); -const CREATE_SLOTS = Symbol(`createSlots` ); -const TO_DISPLAY_STRING = Symbol( - `toDisplayString` -); -const MERGE_PROPS = Symbol(`mergeProps` ); -const NORMALIZE_CLASS = Symbol( - `normalizeClass` -); -const NORMALIZE_STYLE = Symbol( - `normalizeStyle` -); -const NORMALIZE_PROPS = Symbol( - `normalizeProps` -); -const GUARD_REACTIVE_PROPS = Symbol( - `guardReactiveProps` -); -const TO_HANDLERS = Symbol(`toHandlers` ); -const CAMELIZE = Symbol(`camelize` ); -const CAPITALIZE = Symbol(`capitalize` ); -const TO_HANDLER_KEY = Symbol( - `toHandlerKey` -); -const SET_BLOCK_TRACKING = Symbol( - `setBlockTracking` -); -const PUSH_SCOPE_ID = Symbol(`pushScopeId` ); -const POP_SCOPE_ID = Symbol(`popScopeId` ); -const WITH_CTX = Symbol(`withCtx` ); -const UNREF = Symbol(`unref` ); -const IS_REF = Symbol(`isRef` ); -const WITH_MEMO = Symbol(`withMemo` ); -const IS_MEMO_SAME = Symbol(`isMemoSame` ); -const helperNameMap = { - [FRAGMENT]: `Fragment`, - [TELEPORT]: `Teleport`, - [SUSPENSE]: `Suspense`, - [KEEP_ALIVE]: `KeepAlive`, - [BASE_TRANSITION]: `BaseTransition`, - [OPEN_BLOCK]: `openBlock`, - [CREATE_BLOCK]: `createBlock`, - [CREATE_ELEMENT_BLOCK]: `createElementBlock`, - [CREATE_VNODE]: `createVNode`, - [CREATE_ELEMENT_VNODE]: `createElementVNode`, - [CREATE_COMMENT]: `createCommentVNode`, - [CREATE_TEXT]: `createTextVNode`, - [CREATE_STATIC]: `createStaticVNode`, - [RESOLVE_COMPONENT]: `resolveComponent`, - [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, - [RESOLVE_DIRECTIVE]: `resolveDirective`, - [RESOLVE_FILTER]: `resolveFilter`, - [WITH_DIRECTIVES]: `withDirectives`, - [RENDER_LIST]: `renderList`, - [RENDER_SLOT]: `renderSlot`, - [CREATE_SLOTS]: `createSlots`, - [TO_DISPLAY_STRING]: `toDisplayString`, - [MERGE_PROPS]: `mergeProps`, - [NORMALIZE_CLASS]: `normalizeClass`, - [NORMALIZE_STYLE]: `normalizeStyle`, - [NORMALIZE_PROPS]: `normalizeProps`, - [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, - [TO_HANDLERS]: `toHandlers`, - [CAMELIZE]: `camelize`, - [CAPITALIZE]: `capitalize`, - [TO_HANDLER_KEY]: `toHandlerKey`, - [SET_BLOCK_TRACKING]: `setBlockTracking`, - [PUSH_SCOPE_ID]: `pushScopeId`, - [POP_SCOPE_ID]: `popScopeId`, - [WITH_CTX]: `withCtx`, - [UNREF]: `unref`, - [IS_REF]: `isRef`, - [WITH_MEMO]: `withMemo`, - [IS_MEMO_SAME]: `isMemoSame` -}; -function registerRuntimeHelpers(helpers) { - Object.getOwnPropertySymbols(helpers).forEach((s) => { - helperNameMap[s] = helpers[s]; - }); -} - -const Namespaces = { - "HTML": 0, - "0": "HTML", - "SVG": 1, - "1": "SVG", - "MATH_ML": 2, - "2": "MATH_ML" -}; -const NodeTypes = { - "ROOT": 0, - "0": "ROOT", - "ELEMENT": 1, - "1": "ELEMENT", - "TEXT": 2, - "2": "TEXT", - "COMMENT": 3, - "3": "COMMENT", - "SIMPLE_EXPRESSION": 4, - "4": "SIMPLE_EXPRESSION", - "INTERPOLATION": 5, - "5": "INTERPOLATION", - "ATTRIBUTE": 6, - "6": "ATTRIBUTE", - "DIRECTIVE": 7, - "7": "DIRECTIVE", - "COMPOUND_EXPRESSION": 8, - "8": "COMPOUND_EXPRESSION", - "IF": 9, - "9": "IF", - "IF_BRANCH": 10, - "10": "IF_BRANCH", - "FOR": 11, - "11": "FOR", - "TEXT_CALL": 12, - "12": "TEXT_CALL", - "VNODE_CALL": 13, - "13": "VNODE_CALL", - "JS_CALL_EXPRESSION": 14, - "14": "JS_CALL_EXPRESSION", - "JS_OBJECT_EXPRESSION": 15, - "15": "JS_OBJECT_EXPRESSION", - "JS_PROPERTY": 16, - "16": "JS_PROPERTY", - "JS_ARRAY_EXPRESSION": 17, - "17": "JS_ARRAY_EXPRESSION", - "JS_FUNCTION_EXPRESSION": 18, - "18": "JS_FUNCTION_EXPRESSION", - "JS_CONDITIONAL_EXPRESSION": 19, - "19": "JS_CONDITIONAL_EXPRESSION", - "JS_CACHE_EXPRESSION": 20, - "20": "JS_CACHE_EXPRESSION", - "JS_BLOCK_STATEMENT": 21, - "21": "JS_BLOCK_STATEMENT", - "JS_TEMPLATE_LITERAL": 22, - "22": "JS_TEMPLATE_LITERAL", - "JS_IF_STATEMENT": 23, - "23": "JS_IF_STATEMENT", - "JS_ASSIGNMENT_EXPRESSION": 24, - "24": "JS_ASSIGNMENT_EXPRESSION", - "JS_SEQUENCE_EXPRESSION": 25, - "25": "JS_SEQUENCE_EXPRESSION", - "JS_RETURN_STATEMENT": 26, - "26": "JS_RETURN_STATEMENT" -}; -const ElementTypes = { - "ELEMENT": 0, - "0": "ELEMENT", - "COMPONENT": 1, - "1": "COMPONENT", - "SLOT": 2, - "2": "SLOT", - "TEMPLATE": 3, - "3": "TEMPLATE" -}; -const ConstantTypes = { - "NOT_CONSTANT": 0, - "0": "NOT_CONSTANT", - "CAN_SKIP_PATCH": 1, - "1": "CAN_SKIP_PATCH", - "CAN_CACHE": 2, - "2": "CAN_CACHE", - "CAN_STRINGIFY": 3, - "3": "CAN_STRINGIFY" -}; -const locStub = { - start: { line: 1, column: 1, offset: 0 }, - end: { line: 1, column: 1, offset: 0 }, - source: "" -}; -function createRoot(children, source = "") { - return { - type: 0, - source, - children, - helpers: /* @__PURE__ */ new Set(), - components: [], - directives: [], - hoists: [], - imports: [], - cached: [], - temps: 0, - codegenNode: void 0, - loc: locStub - }; -} -function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { - if (context) { - if (isBlock) { - context.helper(OPEN_BLOCK); - context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); - } else { - context.helper(getVNodeHelper(context.inSSR, isComponent)); - } - if (directives) { - context.helper(WITH_DIRECTIVES); - } - } - return { - type: 13, - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent, - loc - }; -} -function createArrayExpression(elements, loc = locStub) { - return { - type: 17, - loc, - elements - }; -} -function createObjectExpression(properties, loc = locStub) { - return { - type: 15, - loc, - properties - }; -} -function createObjectProperty(key, value) { - return { - type: 16, - loc: locStub, - key: isString$1(key) ? createSimpleExpression(key, true) : key, - value - }; -} -function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { - return { - type: 4, - loc, - content, - isStatic, - constType: isStatic ? 3 : constType - }; -} -function createInterpolation(content, loc) { - return { - type: 5, - loc, - content: isString$1(content) ? createSimpleExpression(content, false, loc) : content - }; -} -function createCompoundExpression(children, loc = locStub) { - return { - type: 8, - loc, - children - }; -} -function createCallExpression(callee, args = [], loc = locStub) { - return { - type: 14, - loc, - callee, - arguments: args - }; -} -function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { - return { - type: 18, - params, - returns, - newline, - isSlot, - loc - }; -} -function createConditionalExpression(test, consequent, alternate, newline = true) { - return { - type: 19, - test, - consequent, - alternate, - newline, - loc: locStub - }; -} -function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) { - return { - type: 20, - index, - value, - needPauseTracking, - inVOnce, - needArraySpread: false, - loc: locStub - }; -} -function createBlockStatement(body) { - return { - type: 21, - body, - loc: locStub - }; -} -function createTemplateLiteral(elements) { - return { - type: 22, - elements, - loc: locStub - }; -} -function createIfStatement(test, consequent, alternate) { - return { - type: 23, - test, - consequent, - alternate, - loc: locStub - }; -} -function createAssignmentExpression(left, right) { - return { - type: 24, - left, - right, - loc: locStub - }; -} -function createSequenceExpression(expressions) { - return { - type: 25, - expressions, - loc: locStub - }; -} -function createReturnStatement(returns) { - return { - type: 26, - returns, - loc: locStub - }; -} -function getVNodeHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; -} -function getVNodeBlockHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; -} -function convertToBlock(node, { helper, removeHelper, inSSR }) { - if (!node.isBlock) { - node.isBlock = true; - removeHelper(getVNodeHelper(inSSR, node.isComponent)); - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(inSSR, node.isComponent)); - } -} - -// Generated using scripts/write-decode-map.ts -var htmlDecodeTree = new Uint16Array( -// prettier-ignore -"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c" - .split("") - .map((c) => c.charCodeAt(0))); - -// Generated using scripts/write-decode-map.ts -var xmlDecodeTree = new Uint16Array( -// prettier-ignore -"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022" - .split("") - .map((c) => c.charCodeAt(0))); - -// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134 -var _a$1; -const decodeMap = new Map([ - [0, 65533], - // C1 Unicode control character reference replacements - [128, 8364], - [130, 8218], - [131, 402], - [132, 8222], - [133, 8230], - [134, 8224], - [135, 8225], - [136, 710], - [137, 8240], - [138, 352], - [139, 8249], - [140, 338], - [142, 381], - [145, 8216], - [146, 8217], - [147, 8220], - [148, 8221], - [149, 8226], - [150, 8211], - [151, 8212], - [152, 732], - [153, 8482], - [154, 353], - [155, 8250], - [156, 339], - [158, 382], - [159, 376], -]); -/** - * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. - */ -const fromCodePoint = -// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins -(_a$1 = String.fromCodePoint) !== null && _a$1 !== void 0 ? _a$1 : function (codePoint) { - let output = ""; - if (codePoint > 0xffff) { - codePoint -= 0x10000; - output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); - codePoint = 0xdc00 | (codePoint & 0x3ff); - } - output += String.fromCharCode(codePoint); - return output; -}; -/** - * Replace the given code point with a replacement character if it is a - * surrogate or is outside the valid range. Otherwise return the code - * point unchanged. - */ -function replaceCodePoint(codePoint) { - var _a; - if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { - return 0xfffd; - } - return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; -} - -var CharCodes; -(function (CharCodes) { - CharCodes[CharCodes["NUM"] = 35] = "NUM"; - CharCodes[CharCodes["SEMI"] = 59] = "SEMI"; - CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS"; - CharCodes[CharCodes["ZERO"] = 48] = "ZERO"; - CharCodes[CharCodes["NINE"] = 57] = "NINE"; - CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A"; - CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F"; - CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X"; - CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z"; - CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A"; - CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F"; - CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z"; -})(CharCodes || (CharCodes = {})); -/** Bit that needs to be set to convert an upper case ASCII character to lower case */ -const TO_LOWER_BIT = 0b100000; -var BinTrieFlags; -(function (BinTrieFlags) { - BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; - BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; - BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE"; -})(BinTrieFlags || (BinTrieFlags = {})); -function isNumber$1(code) { - return code >= CharCodes.ZERO && code <= CharCodes.NINE; -} -function isHexadecimalCharacter(code) { - return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) || - (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F)); -} -function isAsciiAlphaNumeric(code) { - return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) || - (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) || - isNumber$1(code)); -} -/** - * Checks if the given character is a valid end character for an entity in an attribute. - * - * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error. - * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state - */ -function isEntityInAttributeInvalidEnd(code) { - return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); -} -var EntityDecoderState; -(function (EntityDecoderState) { - EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart"; - EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart"; - EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal"; - EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex"; - EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity"; -})(EntityDecoderState || (EntityDecoderState = {})); -var DecodingMode; -(function (DecodingMode) { - /** Entities in text nodes that can end with any character. */ - DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy"; - /** Only allow entities terminated with a semicolon. */ - DecodingMode[DecodingMode["Strict"] = 1] = "Strict"; - /** Entities in attributes have limitations on ending characters. */ - DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute"; -})(DecodingMode || (DecodingMode = {})); -/** - * Token decoder with support of writing partial entities. - */ -class EntityDecoder { - constructor( - /** The tree used to decode entities. */ - decodeTree, - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - emitCodePoint, - /** An object that is used to produce errors. */ - errors) { - this.decodeTree = decodeTree; - this.emitCodePoint = emitCodePoint; - this.errors = errors; - /** The current state of the decoder. */ - this.state = EntityDecoderState.EntityStart; - /** Characters that were consumed while parsing an entity. */ - this.consumed = 1; - /** - * The result of the entity. - * - * Either the result index of a numeric entity, or the codepoint of a - * numeric entity. - */ - this.result = 0; - /** The current index in the decode tree. */ - this.treeIndex = 0; - /** The number of characters that were consumed in excess. */ - this.excess = 1; - /** The mode in which the decoder is operating. */ - this.decodeMode = DecodingMode.Strict; - } - /** Resets the instance to make it reusable. */ - startEntity(decodeMode) { - this.decodeMode = decodeMode; - this.state = EntityDecoderState.EntityStart; - this.result = 0; - this.treeIndex = 0; - this.excess = 1; - this.consumed = 1; - } - /** - * Write an entity to the decoder. This can be called multiple times with partial entities. - * If the entity is incomplete, the decoder will return -1. - * - * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the - * entity is incomplete, and resume when the next string is written. - * - * @param string The string containing the entity (or a continuation of the entity). - * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - write(str, offset) { - switch (this.state) { - case EntityDecoderState.EntityStart: { - if (str.charCodeAt(offset) === CharCodes.NUM) { - this.state = EntityDecoderState.NumericStart; - this.consumed += 1; - return this.stateNumericStart(str, offset + 1); - } - this.state = EntityDecoderState.NamedEntity; - return this.stateNamedEntity(str, offset); - } - case EntityDecoderState.NumericStart: { - return this.stateNumericStart(str, offset); - } - case EntityDecoderState.NumericDecimal: { - return this.stateNumericDecimal(str, offset); - } - case EntityDecoderState.NumericHex: { - return this.stateNumericHex(str, offset); - } - case EntityDecoderState.NamedEntity: { - return this.stateNamedEntity(str, offset); - } - } - } - /** - * Switches between the numeric decimal and hexadecimal states. - * - * Equivalent to the `Numeric character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - stateNumericStart(str, offset) { - if (offset >= str.length) { - return -1; - } - if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { - this.state = EntityDecoderState.NumericHex; - this.consumed += 1; - return this.stateNumericHex(str, offset + 1); - } - this.state = EntityDecoderState.NumericDecimal; - return this.stateNumericDecimal(str, offset); - } - addToNumericResult(str, start, end, base) { - if (start !== end) { - const digitCount = end - start; - this.result = - this.result * Math.pow(base, digitCount) + - parseInt(str.substr(start, digitCount), base); - this.consumed += digitCount; - } - } - /** - * Parses a hexadecimal numeric entity. - * - * Equivalent to the `Hexademical character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - stateNumericHex(str, offset) { - const startIdx = offset; - while (offset < str.length) { - const char = str.charCodeAt(offset); - if (isNumber$1(char) || isHexadecimalCharacter(char)) { - offset += 1; - } - else { - this.addToNumericResult(str, startIdx, offset, 16); - return this.emitNumericEntity(char, 3); - } - } - this.addToNumericResult(str, startIdx, offset, 16); - return -1; - } - /** - * Parses a decimal numeric entity. - * - * Equivalent to the `Decimal character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - stateNumericDecimal(str, offset) { - const startIdx = offset; - while (offset < str.length) { - const char = str.charCodeAt(offset); - if (isNumber$1(char)) { - offset += 1; - } - else { - this.addToNumericResult(str, startIdx, offset, 10); - return this.emitNumericEntity(char, 2); - } - } - this.addToNumericResult(str, startIdx, offset, 10); - return -1; - } - /** - * Validate and emit a numeric entity. - * - * Implements the logic from the `Hexademical character reference start - * state` and `Numeric character reference end state` in the HTML spec. - * - * @param lastCp The last code point of the entity. Used to see if the - * entity was terminated with a semicolon. - * @param expectedLength The minimum number of characters that should be - * consumed. Used to validate that at least one digit - * was consumed. - * @returns The number of characters that were consumed. - */ - emitNumericEntity(lastCp, expectedLength) { - var _a; - // Ensure we consumed at least one digit. - if (this.consumed <= expectedLength) { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - // Figure out if this is a legit end of the entity - if (lastCp === CharCodes.SEMI) { - this.consumed += 1; - } - else if (this.decodeMode === DecodingMode.Strict) { - return 0; - } - this.emitCodePoint(replaceCodePoint(this.result), this.consumed); - if (this.errors) { - if (lastCp !== CharCodes.SEMI) { - this.errors.missingSemicolonAfterCharacterReference(); - } - this.errors.validateNumericCharacterReference(this.result); - } - return this.consumed; - } - /** - * Parses a named entity. - * - * Equivalent to the `Named character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - stateNamedEntity(str, offset) { - const { decodeTree } = this; - let current = decodeTree[this.treeIndex]; - // The mask is the number of bytes of the value, including the current byte. - let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - for (; offset < str.length; offset++, this.excess++) { - const char = str.charCodeAt(offset); - this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); - if (this.treeIndex < 0) { - return this.result === 0 || - // If we are parsing an attribute - (this.decodeMode === DecodingMode.Attribute && - // We shouldn't have consumed any characters after the entity, - (valueLength === 0 || - // And there should be no invalid characters. - isEntityInAttributeInvalidEnd(char))) - ? 0 - : this.emitNotTerminatedNamedEntity(); - } - current = decodeTree[this.treeIndex]; - valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - // If the branch is a value, store it and continue - if (valueLength !== 0) { - // If the entity is terminated by a semicolon, we are done. - if (char === CharCodes.SEMI) { - return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); - } - // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it. - if (this.decodeMode !== DecodingMode.Strict) { - this.result = this.treeIndex; - this.consumed += this.excess; - this.excess = 0; - } - } - } - return -1; - } - /** - * Emit a named entity that was not terminated with a semicolon. - * - * @returns The number of characters consumed. - */ - emitNotTerminatedNamedEntity() { - var _a; - const { result, decodeTree } = this; - const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; - this.emitNamedEntityData(result, valueLength, this.consumed); - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); - return this.consumed; - } - /** - * Emit a named entity. - * - * @param result The index of the entity in the decode tree. - * @param valueLength The number of bytes in the entity. - * @param consumed The number of characters consumed. - * - * @returns The number of characters consumed. - */ - emitNamedEntityData(result, valueLength, consumed) { - const { decodeTree } = this; - this.emitCodePoint(valueLength === 1 - ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH - : decodeTree[result + 1], consumed); - if (valueLength === 3) { - // For multi-byte values, we need to emit the second byte. - this.emitCodePoint(decodeTree[result + 2], consumed); - } - return consumed; - } - /** - * Signal to the parser that the end of the input was reached. - * - * Remaining data will be emitted and relevant errors will be produced. - * - * @returns The number of characters consumed. - */ - end() { - var _a; - switch (this.state) { - case EntityDecoderState.NamedEntity: { - // Emit a named entity if we have one. - return this.result !== 0 && - (this.decodeMode !== DecodingMode.Attribute || - this.result === this.treeIndex) - ? this.emitNotTerminatedNamedEntity() - : 0; - } - // Otherwise, emit a numeric entity if we have one. - case EntityDecoderState.NumericDecimal: { - return this.emitNumericEntity(0, 2); - } - case EntityDecoderState.NumericHex: { - return this.emitNumericEntity(0, 3); - } - case EntityDecoderState.NumericStart: { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - case EntityDecoderState.EntityStart: { - // Return 0 if we have no entity. - return 0; - } - } - } -} -/** - * Creates a function that decodes entities in a string. - * - * @param decodeTree The decode tree. - * @returns A function that decodes entities in a string. - */ -function getDecoder(decodeTree) { - let ret = ""; - const decoder = new EntityDecoder(decodeTree, (str) => (ret += fromCodePoint(str))); - return function decodeWithTrie(str, decodeMode) { - let lastIndex = 0; - let offset = 0; - while ((offset = str.indexOf("&", offset)) >= 0) { - ret += str.slice(lastIndex, offset); - decoder.startEntity(decodeMode); - const len = decoder.write(str, - // Skip the "&" - offset + 1); - if (len < 0) { - lastIndex = offset + decoder.end(); - break; - } - lastIndex = offset + len; - // If `len` is 0, skip the current `&` and continue. - offset = len === 0 ? lastIndex + 1 : lastIndex; - } - const result = ret + str.slice(lastIndex); - // Make sure we don't keep a reference to the final string. - ret = ""; - return result; - }; -} -/** - * Determines the branch of the current node that is taken given the current - * character. This function is used to traverse the trie. - * - * @param decodeTree The trie. - * @param current The current node. - * @param nodeIdx The index right after the current node and its value. - * @param char The current character. - * @returns The index of the next node, or -1 if no branch is taken. - */ -function determineBranch(decodeTree, current, nodeIdx, char) { - const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; - const jumpOffset = current & BinTrieFlags.JUMP_TABLE; - // Case 1: Single branch encoded in jump offset - if (branchCount === 0) { - return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; - } - // Case 2: Multiple branches encoded in jump table - if (jumpOffset) { - const value = char - jumpOffset; - return value < 0 || value >= branchCount - ? -1 - : decodeTree[nodeIdx + value] - 1; - } - // Case 3: Multiple branches encoded in dictionary - // Binary search for the character. - let lo = nodeIdx; - let hi = lo + branchCount - 1; - while (lo <= hi) { - const mid = (lo + hi) >>> 1; - const midVal = decodeTree[mid]; - if (midVal < char) { - lo = mid + 1; - } - else if (midVal > char) { - hi = mid - 1; - } - else { - return decodeTree[mid + branchCount]; - } - } - return -1; -} -const htmlDecoder = getDecoder(htmlDecodeTree); -getDecoder(xmlDecodeTree); -/** - * Decodes an HTML string. - * - * @param str The string to decode. - * @param mode The decoding mode. - * @returns The decoded string. - */ -function decodeHTML(str, mode = DecodingMode.Legacy) { - return htmlDecoder(str, mode); -} - -const defaultDelimitersOpen = new Uint8Array([123, 123]); -const defaultDelimitersClose = new Uint8Array([125, 125]); -function isTagStartChar(c) { - return c >= 97 && c <= 122 || c >= 65 && c <= 90; -} -function isWhitespace(c) { - return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; -} -function isEndOfTagSection(c) { - return c === 47 || c === 62 || isWhitespace(c); -} -function toCharCodes(str) { - const ret = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) { - ret[i] = str.charCodeAt(i); - } - return ret; -} -const Sequences = { - Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), - // CDATA[ - CdataEnd: new Uint8Array([93, 93, 62]), - // ]]> - CommentEnd: new Uint8Array([45, 45, 62]), - // `-->` - ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), - // `<\/script` - StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), - // `</style` - TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), - // `</title` - TextareaEnd: new Uint8Array([ - 60, - 47, - 116, - 101, - 120, - 116, - 97, - 114, - 101, - 97 - ]) - // `</textarea -}; -class Tokenizer { - constructor(stack, cbs) { - this.stack = stack; - this.cbs = cbs; - /** The current state the tokenizer is in. */ - this.state = 1; - /** The read buffer. */ - this.buffer = ""; - /** The beginning of the section that is currently being read. */ - this.sectionStart = 0; - /** The index within the buffer that we are currently looking at. */ - this.index = 0; - /** The start of the last entity. */ - this.entityStart = 0; - /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ - this.baseState = 1; - /** For special parsing behavior inside of script and style tags. */ - this.inRCDATA = false; - /** For disabling RCDATA tags handling */ - this.inXML = false; - /** For disabling interpolation parsing in v-pre */ - this.inVPre = false; - /** Record newline positions for fast line / column calculation */ - this.newlines = []; - this.mode = 0; - this.delimiterOpen = defaultDelimitersOpen; - this.delimiterClose = defaultDelimitersClose; - this.delimiterIndex = -1; - this.currentSequence = void 0; - this.sequenceIndex = 0; - { - this.entityDecoder = new EntityDecoder( - htmlDecodeTree, - (cp, consumed) => this.emitCodePoint(cp, consumed) - ); - } - } - get inSFCRoot() { - return this.mode === 2 && this.stack.length === 0; - } - reset() { - this.state = 1; - this.mode = 0; - this.buffer = ""; - this.sectionStart = 0; - this.index = 0; - this.baseState = 1; - this.inRCDATA = false; - this.currentSequence = void 0; - this.newlines.length = 0; - this.delimiterOpen = defaultDelimitersOpen; - this.delimiterClose = defaultDelimitersClose; - } - /** - * Generate Position object with line / column information using recorded - * newline positions. We know the index is always going to be an already - * processed index, so all the newlines up to this index should have been - * recorded. - */ - getPos(index) { - let line = 1; - let column = index + 1; - for (let i = this.newlines.length - 1; i >= 0; i--) { - const newlineIndex = this.newlines[i]; - if (index > newlineIndex) { - line = i + 2; - column = index - newlineIndex; - break; - } - } - return { - column, - line, - offset: index - }; - } - peek() { - return this.buffer.charCodeAt(this.index + 1); - } - stateText(c) { - if (c === 60) { - if (this.index > this.sectionStart) { - this.cbs.ontext(this.sectionStart, this.index); - } - this.state = 5; - this.sectionStart = this.index; - } else if (c === 38) { - this.startEntity(); - } else if (!this.inVPre && c === this.delimiterOpen[0]) { - this.state = 2; - this.delimiterIndex = 0; - this.stateInterpolationOpen(c); - } - } - stateInterpolationOpen(c) { - if (c === this.delimiterOpen[this.delimiterIndex]) { - if (this.delimiterIndex === this.delimiterOpen.length - 1) { - const start = this.index + 1 - this.delimiterOpen.length; - if (start > this.sectionStart) { - this.cbs.ontext(this.sectionStart, start); - } - this.state = 3; - this.sectionStart = start; - } else { - this.delimiterIndex++; - } - } else if (this.inRCDATA) { - this.state = 32; - this.stateInRCDATA(c); - } else { - this.state = 1; - this.stateText(c); - } - } - stateInterpolation(c) { - if (c === this.delimiterClose[0]) { - this.state = 4; - this.delimiterIndex = 0; - this.stateInterpolationClose(c); - } - } - stateInterpolationClose(c) { - if (c === this.delimiterClose[this.delimiterIndex]) { - if (this.delimiterIndex === this.delimiterClose.length - 1) { - this.cbs.oninterpolation(this.sectionStart, this.index + 1); - if (this.inRCDATA) { - this.state = 32; - } else { - this.state = 1; - } - this.sectionStart = this.index + 1; - } else { - this.delimiterIndex++; - } - } else { - this.state = 3; - this.stateInterpolation(c); - } - } - stateSpecialStartSequence(c) { - const isEnd = this.sequenceIndex === this.currentSequence.length; - const isMatch = isEnd ? ( - // If we are at the end of the sequence, make sure the tag name has ended - isEndOfTagSection(c) - ) : ( - // Otherwise, do a case-insensitive comparison - (c | 32) === this.currentSequence[this.sequenceIndex] - ); - if (!isMatch) { - this.inRCDATA = false; - } else if (!isEnd) { - this.sequenceIndex++; - return; - } - this.sequenceIndex = 0; - this.state = 6; - this.stateInTagName(c); - } - /** Look for an end tag. For <title> and <textarea>, also decode entities. */ - stateInRCDATA(c) { - if (this.sequenceIndex === this.currentSequence.length) { - if (c === 62 || isWhitespace(c)) { - const endOfText = this.index - this.currentSequence.length; - if (this.sectionStart < endOfText) { - const actualIndex = this.index; - this.index = endOfText; - this.cbs.ontext(this.sectionStart, endOfText); - this.index = actualIndex; - } - this.sectionStart = endOfText + 2; - this.stateInClosingTagName(c); - this.inRCDATA = false; - return; - } - this.sequenceIndex = 0; - } - if ((c | 32) === this.currentSequence[this.sequenceIndex]) { - this.sequenceIndex += 1; - } else if (this.sequenceIndex === 0) { - if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { - if (c === 38) { - this.startEntity(); - } else if (!this.inVPre && c === this.delimiterOpen[0]) { - this.state = 2; - this.delimiterIndex = 0; - this.stateInterpolationOpen(c); - } - } else if (this.fastForwardTo(60)) { - this.sequenceIndex = 1; - } - } else { - this.sequenceIndex = Number(c === 60); - } - } - stateCDATASequence(c) { - if (c === Sequences.Cdata[this.sequenceIndex]) { - if (++this.sequenceIndex === Sequences.Cdata.length) { - this.state = 28; - this.currentSequence = Sequences.CdataEnd; - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - } - } else { - this.sequenceIndex = 0; - this.state = 23; - this.stateInDeclaration(c); - } - } - /** - * When we wait for one specific character, we can speed things up - * by skipping through the buffer until we find it. - * - * @returns Whether the character was found. - */ - fastForwardTo(c) { - while (++this.index < this.buffer.length) { - const cc = this.buffer.charCodeAt(this.index); - if (cc === 10) { - this.newlines.push(this.index); - } - if (cc === c) { - return true; - } - } - this.index = this.buffer.length - 1; - return false; - } - /** - * Comments and CDATA end with `-->` and `]]>`. - * - * Their common qualities are: - * - Their end sequences have a distinct character they start with. - * - That character is then repeated, so we have to check multiple repeats. - * - All characters but the start character of the sequence can be skipped. - */ - stateInCommentLike(c) { - if (c === this.currentSequence[this.sequenceIndex]) { - if (++this.sequenceIndex === this.currentSequence.length) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, this.index - 2); - } else { - this.cbs.oncomment(this.sectionStart, this.index - 2); - } - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - this.state = 1; - } - } else if (this.sequenceIndex === 0) { - if (this.fastForwardTo(this.currentSequence[0])) { - this.sequenceIndex = 1; - } - } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { - this.sequenceIndex = 0; - } - } - startSpecial(sequence, offset) { - this.enterRCDATA(sequence, offset); - this.state = 31; - } - enterRCDATA(sequence, offset) { - this.inRCDATA = true; - this.currentSequence = sequence; - this.sequenceIndex = offset; - } - stateBeforeTagName(c) { - if (c === 33) { - this.state = 22; - this.sectionStart = this.index + 1; - } else if (c === 63) { - this.state = 24; - this.sectionStart = this.index + 1; - } else if (isTagStartChar(c)) { - this.sectionStart = this.index; - if (this.mode === 0) { - this.state = 6; - } else if (this.inSFCRoot) { - this.state = 34; - } else if (!this.inXML) { - if (c === 116) { - this.state = 30; - } else { - this.state = c === 115 ? 29 : 6; - } - } else { - this.state = 6; - } - } else if (c === 47) { - this.state = 8; - } else { - this.state = 1; - this.stateText(c); - } - } - stateInTagName(c) { - if (isEndOfTagSection(c)) { - this.handleTagName(c); - } - } - stateInSFCRootTagName(c) { - if (isEndOfTagSection(c)) { - const tag = this.buffer.slice(this.sectionStart, this.index); - if (tag !== "template") { - this.enterRCDATA(toCharCodes(`</` + tag), 0); - } - this.handleTagName(c); - } - } - handleTagName(c) { - this.cbs.onopentagname(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = 11; - this.stateBeforeAttrName(c); - } - stateBeforeClosingTagName(c) { - if (isWhitespace(c)) ; else if (c === 62) { - { - this.cbs.onerr(14, this.index); - } - this.state = 1; - this.sectionStart = this.index + 1; - } else { - this.state = isTagStartChar(c) ? 9 : 27; - this.sectionStart = this.index; - } - } - stateInClosingTagName(c) { - if (c === 62 || isWhitespace(c)) { - this.cbs.onclosetag(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = 10; - this.stateAfterClosingTagName(c); - } - } - stateAfterClosingTagName(c) { - if (c === 62) { - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeAttrName(c) { - if (c === 62) { - this.cbs.onopentagend(this.index); - if (this.inRCDATA) { - this.state = 32; - } else { - this.state = 1; - } - this.sectionStart = this.index + 1; - } else if (c === 47) { - this.state = 7; - if (this.peek() !== 62) { - this.cbs.onerr(22, this.index); - } - } else if (c === 60 && this.peek() === 47) { - this.cbs.onopentagend(this.index); - this.state = 5; - this.sectionStart = this.index; - } else if (!isWhitespace(c)) { - if (c === 61) { - this.cbs.onerr( - 19, - this.index - ); - } - this.handleAttrStart(c); - } - } - handleAttrStart(c) { - if (c === 118 && this.peek() === 45) { - this.state = 13; - this.sectionStart = this.index; - } else if (c === 46 || c === 58 || c === 64 || c === 35) { - this.cbs.ondirname(this.index, this.index + 1); - this.state = 14; - this.sectionStart = this.index + 1; - } else { - this.state = 12; - this.sectionStart = this.index; - } - } - stateInSelfClosingTag(c) { - if (c === 62) { - this.cbs.onselfclosingtag(this.index); - this.state = 1; - this.sectionStart = this.index + 1; - this.inRCDATA = false; - } else if (!isWhitespace(c)) { - this.state = 11; - this.stateBeforeAttrName(c); - } - } - stateInAttrName(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.onattribname(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 34 || c === 39 || c === 60) { - this.cbs.onerr( - 17, - this.index - ); - } - } - stateInDirName(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirname(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 58) { - this.cbs.ondirname(this.sectionStart, this.index); - this.state = 14; - this.sectionStart = this.index + 1; - } else if (c === 46) { - this.cbs.ondirname(this.sectionStart, this.index); - this.state = 16; - this.sectionStart = this.index + 1; - } - } - stateInDirArg(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirarg(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 91) { - this.state = 15; - } else if (c === 46) { - this.cbs.ondirarg(this.sectionStart, this.index); - this.state = 16; - this.sectionStart = this.index + 1; - } - } - stateInDynamicDirArg(c) { - if (c === 93) { - this.state = 14; - } else if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirarg(this.sectionStart, this.index + 1); - this.handleAttrNameEnd(c); - { - this.cbs.onerr( - 27, - this.index - ); - } - } - } - stateInDirModifier(c) { - if (c === 61 || isEndOfTagSection(c)) { - this.cbs.ondirmodifier(this.sectionStart, this.index); - this.handleAttrNameEnd(c); - } else if (c === 46) { - this.cbs.ondirmodifier(this.sectionStart, this.index); - this.sectionStart = this.index + 1; - } - } - handleAttrNameEnd(c) { - this.sectionStart = this.index; - this.state = 17; - this.cbs.onattribnameend(this.index); - this.stateAfterAttrName(c); - } - stateAfterAttrName(c) { - if (c === 61) { - this.state = 18; - } else if (c === 47 || c === 62) { - this.cbs.onattribend(0, this.sectionStart); - this.sectionStart = -1; - this.state = 11; - this.stateBeforeAttrName(c); - } else if (!isWhitespace(c)) { - this.cbs.onattribend(0, this.sectionStart); - this.handleAttrStart(c); - } - } - stateBeforeAttrValue(c) { - if (c === 34) { - this.state = 19; - this.sectionStart = this.index + 1; - } else if (c === 39) { - this.state = 20; - this.sectionStart = this.index + 1; - } else if (!isWhitespace(c)) { - this.sectionStart = this.index; - this.state = 21; - this.stateInAttrValueNoQuotes(c); - } - } - handleInAttrValue(c, quote) { - if (c === quote || false) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend( - quote === 34 ? 3 : 2, - this.index + 1 - ); - this.state = 11; - } else if (c === 38) { - this.startEntity(); - } - } - stateInAttrValueDoubleQuotes(c) { - this.handleInAttrValue(c, 34); - } - stateInAttrValueSingleQuotes(c) { - this.handleInAttrValue(c, 39); - } - stateInAttrValueNoQuotes(c) { - if (isWhitespace(c) || c === 62) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend(1, this.index); - this.state = 11; - this.stateBeforeAttrName(c); - } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { - this.cbs.onerr( - 18, - this.index - ); - } else if (c === 38) { - this.startEntity(); - } - } - stateBeforeDeclaration(c) { - if (c === 91) { - this.state = 26; - this.sequenceIndex = 0; - } else { - this.state = c === 45 ? 25 : 23; - } - } - stateInDeclaration(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateInProcessingInstruction(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.cbs.onprocessinginstruction(this.sectionStart, this.index); - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeComment(c) { - if (c === 45) { - this.state = 28; - this.currentSequence = Sequences.CommentEnd; - this.sequenceIndex = 2; - this.sectionStart = this.index + 1; - } else { - this.state = 23; - } - } - stateInSpecialComment(c) { - if (c === 62 || this.fastForwardTo(62)) { - this.cbs.oncomment(this.sectionStart, this.index); - this.state = 1; - this.sectionStart = this.index + 1; - } - } - stateBeforeSpecialS(c) { - if (c === Sequences.ScriptEnd[3]) { - this.startSpecial(Sequences.ScriptEnd, 4); - } else if (c === Sequences.StyleEnd[3]) { - this.startSpecial(Sequences.StyleEnd, 4); - } else { - this.state = 6; - this.stateInTagName(c); - } - } - stateBeforeSpecialT(c) { - if (c === Sequences.TitleEnd[3]) { - this.startSpecial(Sequences.TitleEnd, 4); - } else if (c === Sequences.TextareaEnd[3]) { - this.startSpecial(Sequences.TextareaEnd, 4); - } else { - this.state = 6; - this.stateInTagName(c); - } - } - startEntity() { - { - this.baseState = this.state; - this.state = 33; - this.entityStart = this.index; - this.entityDecoder.startEntity( - this.baseState === 1 || this.baseState === 32 ? DecodingMode.Legacy : DecodingMode.Attribute - ); - } - } - stateInEntity() { - { - const length = this.entityDecoder.write(this.buffer, this.index); - if (length >= 0) { - this.state = this.baseState; - if (length === 0) { - this.index = this.entityStart; - } - } else { - this.index = this.buffer.length - 1; - } - } - } - /** - * Iterates through the buffer, calling the function corresponding to the current state. - * - * States that are more likely to be hit are higher up, as a performance improvement. - */ - parse(input) { - this.buffer = input; - while (this.index < this.buffer.length) { - const c = this.buffer.charCodeAt(this.index); - if (c === 10) { - this.newlines.push(this.index); - } - switch (this.state) { - case 1: { - this.stateText(c); - break; - } - case 2: { - this.stateInterpolationOpen(c); - break; - } - case 3: { - this.stateInterpolation(c); - break; - } - case 4: { - this.stateInterpolationClose(c); - break; - } - case 31: { - this.stateSpecialStartSequence(c); - break; - } - case 32: { - this.stateInRCDATA(c); - break; - } - case 26: { - this.stateCDATASequence(c); - break; - } - case 19: { - this.stateInAttrValueDoubleQuotes(c); - break; - } - case 12: { - this.stateInAttrName(c); - break; - } - case 13: { - this.stateInDirName(c); - break; - } - case 14: { - this.stateInDirArg(c); - break; - } - case 15: { - this.stateInDynamicDirArg(c); - break; - } - case 16: { - this.stateInDirModifier(c); - break; - } - case 28: { - this.stateInCommentLike(c); - break; - } - case 27: { - this.stateInSpecialComment(c); - break; - } - case 11: { - this.stateBeforeAttrName(c); - break; - } - case 6: { - this.stateInTagName(c); - break; - } - case 34: { - this.stateInSFCRootTagName(c); - break; - } - case 9: { - this.stateInClosingTagName(c); - break; - } - case 5: { - this.stateBeforeTagName(c); - break; - } - case 17: { - this.stateAfterAttrName(c); - break; - } - case 20: { - this.stateInAttrValueSingleQuotes(c); - break; - } - case 18: { - this.stateBeforeAttrValue(c); - break; - } - case 8: { - this.stateBeforeClosingTagName(c); - break; - } - case 10: { - this.stateAfterClosingTagName(c); - break; - } - case 29: { - this.stateBeforeSpecialS(c); - break; - } - case 30: { - this.stateBeforeSpecialT(c); - break; - } - case 21: { - this.stateInAttrValueNoQuotes(c); - break; - } - case 7: { - this.stateInSelfClosingTag(c); - break; - } - case 23: { - this.stateInDeclaration(c); - break; - } - case 22: { - this.stateBeforeDeclaration(c); - break; - } - case 25: { - this.stateBeforeComment(c); - break; - } - case 24: { - this.stateInProcessingInstruction(c); - break; - } - case 33: { - this.stateInEntity(); - break; - } - } - this.index++; - } - this.cleanup(); - this.finish(); - } - /** - * Remove data that has already been consumed from the buffer. - */ - cleanup() { - if (this.sectionStart !== this.index) { - if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { - this.cbs.ontext(this.sectionStart, this.index); - this.sectionStart = this.index; - } else if (this.state === 19 || this.state === 20 || this.state === 21) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = this.index; - } - } - } - finish() { - if (this.state === 33) { - this.entityDecoder.end(); - this.state = this.baseState; - } - this.handleTrailingData(); - this.cbs.onend(); - } - /** Handle any trailing data. */ - handleTrailingData() { - const endIndex = this.buffer.length; - if (this.sectionStart >= endIndex) { - return; - } - if (this.state === 28) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, endIndex); - } else { - this.cbs.oncomment(this.sectionStart, endIndex); - } - } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { - this.cbs.ontext(this.sectionStart, endIndex); - } - } - emitCodePoint(cp, consumed) { - { - if (this.baseState !== 1 && this.baseState !== 32) { - if (this.sectionStart < this.entityStart) { - this.cbs.onattribdata(this.sectionStart, this.entityStart); - } - this.sectionStart = this.entityStart + consumed; - this.index = this.sectionStart - 1; - this.cbs.onattribentity( - fromCodePoint(cp), - this.entityStart, - this.sectionStart - ); - } else { - if (this.sectionStart < this.entityStart) { - this.cbs.ontext(this.sectionStart, this.entityStart); - } - this.sectionStart = this.entityStart + consumed; - this.index = this.sectionStart - 1; - this.cbs.ontextentity( - fromCodePoint(cp), - this.entityStart, - this.sectionStart - ); - } - } - } -} - -const CompilerDeprecationTypes = { - "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", - "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", - "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", - "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", - "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", - "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", - "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", - "COMPILER_FILTERS": "COMPILER_FILTERS" -}; -const deprecationData = { - ["COMPILER_IS_ON_ELEMENT"]: { - message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC"]: { - message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_OBJECT_ORDER"]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE"]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { - message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE"]: { - message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE"]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTERS"]: { - message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } -}; -function getCompatValue(key, { compatConfig }) { - const value = compatConfig && compatConfig[key]; - if (key === "MODE") { - return value || 3; - } else { - return value; - } -} -function isCompatEnabled(key, context) { - const mode = getCompatValue("MODE", context); - const value = getCompatValue(key, context); - return mode === 3 ? value === true : value !== false; -} -function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - if (enabled) { - warnDeprecation(key, context, loc, ...args); - } - return enabled; -} -function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === "suppress-warning") { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` - Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) err.loc = loc; - context.onWarn(err); -} - -function defaultOnError(error) { - throw error; -} -function defaultOnWarn(msg) { - console.warn(`[Vue warn] ${msg.message}`); -} -function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (messages || errorMessages$1)[code] + (additionalMessage || ``) ; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; -} -const ErrorCodes = { - "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, - "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", - "CDATA_IN_HTML_CONTENT": 1, - "1": "CDATA_IN_HTML_CONTENT", - "DUPLICATE_ATTRIBUTE": 2, - "2": "DUPLICATE_ATTRIBUTE", - "END_TAG_WITH_ATTRIBUTES": 3, - "3": "END_TAG_WITH_ATTRIBUTES", - "END_TAG_WITH_TRAILING_SOLIDUS": 4, - "4": "END_TAG_WITH_TRAILING_SOLIDUS", - "EOF_BEFORE_TAG_NAME": 5, - "5": "EOF_BEFORE_TAG_NAME", - "EOF_IN_CDATA": 6, - "6": "EOF_IN_CDATA", - "EOF_IN_COMMENT": 7, - "7": "EOF_IN_COMMENT", - "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, - "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", - "EOF_IN_TAG": 9, - "9": "EOF_IN_TAG", - "INCORRECTLY_CLOSED_COMMENT": 10, - "10": "INCORRECTLY_CLOSED_COMMENT", - "INCORRECTLY_OPENED_COMMENT": 11, - "11": "INCORRECTLY_OPENED_COMMENT", - "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, - "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", - "MISSING_ATTRIBUTE_VALUE": 13, - "13": "MISSING_ATTRIBUTE_VALUE", - "MISSING_END_TAG_NAME": 14, - "14": "MISSING_END_TAG_NAME", - "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, - "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", - "NESTED_COMMENT": 16, - "16": "NESTED_COMMENT", - "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, - "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", - "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, - "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", - "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, - "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", - "UNEXPECTED_NULL_CHARACTER": 20, - "20": "UNEXPECTED_NULL_CHARACTER", - "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, - "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", - "UNEXPECTED_SOLIDUS_IN_TAG": 22, - "22": "UNEXPECTED_SOLIDUS_IN_TAG", - "X_INVALID_END_TAG": 23, - "23": "X_INVALID_END_TAG", - "X_MISSING_END_TAG": 24, - "24": "X_MISSING_END_TAG", - "X_MISSING_INTERPOLATION_END": 25, - "25": "X_MISSING_INTERPOLATION_END", - "X_MISSING_DIRECTIVE_NAME": 26, - "26": "X_MISSING_DIRECTIVE_NAME", - "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, - "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", - "X_V_IF_NO_EXPRESSION": 28, - "28": "X_V_IF_NO_EXPRESSION", - "X_V_IF_SAME_KEY": 29, - "29": "X_V_IF_SAME_KEY", - "X_V_ELSE_NO_ADJACENT_IF": 30, - "30": "X_V_ELSE_NO_ADJACENT_IF", - "X_V_FOR_NO_EXPRESSION": 31, - "31": "X_V_FOR_NO_EXPRESSION", - "X_V_FOR_MALFORMED_EXPRESSION": 32, - "32": "X_V_FOR_MALFORMED_EXPRESSION", - "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, - "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", - "X_V_BIND_NO_EXPRESSION": 34, - "34": "X_V_BIND_NO_EXPRESSION", - "X_V_ON_NO_EXPRESSION": 35, - "35": "X_V_ON_NO_EXPRESSION", - "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, - "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", - "X_V_SLOT_MIXED_SLOT_USAGE": 37, - "37": "X_V_SLOT_MIXED_SLOT_USAGE", - "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, - "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", - "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, - "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", - "X_V_SLOT_MISPLACED": 40, - "40": "X_V_SLOT_MISPLACED", - "X_V_MODEL_NO_EXPRESSION": 41, - "41": "X_V_MODEL_NO_EXPRESSION", - "X_V_MODEL_MALFORMED_EXPRESSION": 42, - "42": "X_V_MODEL_MALFORMED_EXPRESSION", - "X_V_MODEL_ON_SCOPE_VARIABLE": 43, - "43": "X_V_MODEL_ON_SCOPE_VARIABLE", - "X_V_MODEL_ON_PROPS": 44, - "44": "X_V_MODEL_ON_PROPS", - "X_INVALID_EXPRESSION": 45, - "45": "X_INVALID_EXPRESSION", - "X_KEEP_ALIVE_INVALID_CHILDREN": 46, - "46": "X_KEEP_ALIVE_INVALID_CHILDREN", - "X_PREFIX_ID_NOT_SUPPORTED": 47, - "47": "X_PREFIX_ID_NOT_SUPPORTED", - "X_MODULE_MODE_NOT_SUPPORTED": 48, - "48": "X_MODULE_MODE_NOT_SUPPORTED", - "X_CACHE_HANDLER_NOT_SUPPORTED": 49, - "49": "X_CACHE_HANDLER_NOT_SUPPORTED", - "X_SCOPE_ID_NOT_SUPPORTED": 50, - "50": "X_SCOPE_ID_NOT_SUPPORTED", - "X_VNODE_HOOKS": 51, - "51": "X_VNODE_HOOKS", - "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52, - "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", - "__EXTEND_POINT__": 53, - "53": "__EXTEND_POINT__" -}; -const errorMessages$1 = { - // parse errors - [0]: "Illegal comment.", - [1]: "CDATA section is allowed only in XML context.", - [2]: "Duplicate attribute.", - [3]: "End tag cannot have attributes.", - [4]: "Illegal '/' in tags.", - [5]: "Unexpected EOF in tag.", - [6]: "Unexpected EOF in CDATA section.", - [7]: "Unexpected EOF in comment.", - [8]: "Unexpected EOF in script.", - [9]: "Unexpected EOF in tag.", - [10]: "Incorrectly closed comment.", - [11]: "Incorrectly opened comment.", - [12]: "Illegal tag name. Use '<' to print '<'.", - [13]: "Attribute value was expected.", - [14]: "End tag name was expected.", - [15]: "Whitespace was expected.", - [16]: "Unexpected '<!--' in comment.", - [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, - [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", - [19]: "Attribute name cannot start with '='.", - [21]: "'<?' is allowed only in XML context.", - [20]: `Unexpected null character.`, - [22]: "Illegal '/' in tags.", - // Vue-specific parse errors - [23]: "Invalid end tag.", - [24]: "Element is missing end tag.", - [25]: "Interpolation end sign was not found.", - [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", - [26]: "Legal directive name was expected.", - // transform errors - [28]: `v-if/v-else-if is missing expression.`, - [29]: `v-if/else branches must use unique keys.`, - [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, - [31]: `v-for is missing expression.`, - [32]: `v-for has invalid expression.`, - [33]: `<template v-for> key should be placed on the <template> tag.`, - [34]: `v-bind is missing expression.`, - [52]: `v-bind with same-name shorthand only allows static argument.`, - [35]: `v-on is missing expression.`, - [36]: `Unexpected custom directive on <slot> outlet.`, - [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, - [38]: `Duplicate slot names found. `, - [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, - [40]: `v-slot can only be used on components or <template> tags.`, - [41]: `v-model is missing expression.`, - [42]: `v-model value must be a valid JavaScript member expression.`, - [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, - [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. -Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, - [45]: `Error parsing JavaScript expression: `, - [46]: `<KeepAlive> expects exactly one child component.`, - [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, - // generic errors - [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, - [48]: `ES module mode is not supported in this build of compiler.`, - [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, - [50]: `"scopeId" option is only supported in module mode.`, - // just to fulfill types - [53]: `` -}; - -function getDefaultExportFromCjs (x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; -} - -function getAugmentedNamespace(n) { - if (n.__esModule) return n; - var f = n.default; - if (typeof f == "function") { - var a = function a () { - if (this instanceof a) { - return Reflect.construct(f, arguments, this.constructor); - } - return f.apply(this, arguments); - }; - a.prototype = f.prototype; - } else a = {}; - Object.defineProperty(a, '__esModule', {value: true}); - Object.keys(n).forEach(function (k) { - var d = Object.getOwnPropertyDescriptor(n, k); - Object.defineProperty(a, k, d.get ? d : { - enumerable: true, - get: function () { - return n[k]; - } - }); - }); - return a; -} - -var lib = {}; - -var hasRequiredLib; - -function requireLib () { - if (hasRequiredLib) return lib; - hasRequiredLib = 1; - - Object.defineProperty(lib, '__esModule', { - value: true - }); - function _objectWithoutPropertiesLoose(r, e) { - if (null == r) return {}; - var t = {}; - for (var n in r) if ({}.hasOwnProperty.call(r, n)) { - if (e.includes(n)) continue; - t[n] = r[n]; - } - return t; - } - class Position { - constructor(line, col, index) { - this.line = void 0; - this.column = void 0; - this.index = void 0; - this.line = line; - this.column = col; - this.index = index; - } - } - class SourceLocation { - constructor(start, end) { - this.start = void 0; - this.end = void 0; - this.filename = void 0; - this.identifierName = void 0; - this.start = start; - this.end = end; - } - } - function createPositionWithColumnOffset(position, columnOffset) { - const { - line, - column, - index - } = position; - return new Position(line, column + columnOffset, index + columnOffset); - } - const code = "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"; - var ModuleErrors = { - ImportMetaOutsideModule: { - message: `import.meta may appear only with 'sourceType: "module"'`, - code - }, - ImportOutsideModule: { - message: `'import' and 'export' may appear only with 'sourceType: "module"'`, - code - } - }; - const NodeDescriptions = { - ArrayPattern: "array destructuring pattern", - AssignmentExpression: "assignment expression", - AssignmentPattern: "assignment expression", - ArrowFunctionExpression: "arrow function expression", - ConditionalExpression: "conditional expression", - CatchClause: "catch clause", - ForOfStatement: "for-of statement", - ForInStatement: "for-in statement", - ForStatement: "for-loop", - FormalParameters: "function parameter list", - Identifier: "identifier", - ImportSpecifier: "import specifier", - ImportDefaultSpecifier: "import default specifier", - ImportNamespaceSpecifier: "import namespace specifier", - ObjectPattern: "object destructuring pattern", - ParenthesizedExpression: "parenthesized expression", - RestElement: "rest element", - UpdateExpression: { - true: "prefix operation", - false: "postfix operation" - }, - VariableDeclarator: "variable declaration", - YieldExpression: "yield expression" - }; - const toNodeDescription = node => node.type === "UpdateExpression" ? NodeDescriptions.UpdateExpression[`${node.prefix}`] : NodeDescriptions[node.type]; - var StandardErrors = { - AccessorIsGenerator: ({ - kind - }) => `A ${kind}ter cannot be a generator.`, - ArgumentsInClass: "'arguments' is only allowed in functions and class methods.", - AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.", - AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.", - AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.", - AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.", - AwaitUsingNotInAsyncContext: "'await using' is only allowed within async functions and at the top levels of modules.", - AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.", - AwaitNotInAsyncFunction: "'await' is only allowed within async functions.", - BadGetterArity: "A 'get' accessor must not have any formal parameters.", - BadSetterArity: "A 'set' accessor must have exactly one formal parameter.", - BadSetterRestParameter: "A 'set' accessor function argument must not be a rest parameter.", - ConstructorClassField: "Classes may not have a field named 'constructor'.", - ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.", - ConstructorIsAccessor: "Class constructor may not be an accessor.", - ConstructorIsAsync: "Constructor can't be an async function.", - ConstructorIsGenerator: "Constructor can't be a generator.", - DeclarationMissingInitializer: ({ - kind - }) => `Missing initializer in ${kind} declaration.`, - DecoratorArgumentsOutsideParentheses: "Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.", - DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.", - DecoratorsBeforeAfterExport: "Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.", - DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?", - DecoratorExportClass: "Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.", - DecoratorSemicolon: "Decorators must not be followed by a semicolon.", - DecoratorStaticBlock: "Decorators can't be used with a static block.", - DeferImportRequiresNamespace: 'Only `import defer * as x from "./module"` is valid.', - DeletePrivateField: "Deleting a private field is not allowed.", - DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.", - DuplicateConstructor: "Duplicate constructor in the same class.", - DuplicateDefaultExport: "Only one default export allowed per module.", - DuplicateExport: ({ - exportName - }) => `\`${exportName}\` has already been exported. Exported identifiers must be unique.`, - DuplicateProto: "Redefinition of __proto__ property.", - DuplicateRegExpFlags: "Duplicate regular expression flag.", - DynamicImportPhaseRequiresImportExpressions: ({ - phase - }) => `'import.${phase}(...)' can only be parsed when using the 'createImportExpressions' option.`, - ElementAfterRest: "Rest element must be last element.", - EscapedCharNotAnIdentifier: "Invalid Unicode escape.", - ExportBindingIsString: ({ - localName, - exportName - }) => `A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${localName}' as '${exportName}' } from 'some-module'\`?`, - ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.", - ForInOfLoopInitializer: ({ - type - }) => `'${type === "ForInStatement" ? "for-in" : "for-of"}' loop variable declaration may not have an initializer.`, - ForInUsing: "For-in loop may not start with 'using' declaration.", - ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.", - ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.", - GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.", - IllegalBreakContinue: ({ - type - }) => `Unsyntactic ${type === "BreakStatement" ? "break" : "continue"}.`, - IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.", - IllegalReturn: "'return' outside of function.", - ImportAttributesUseAssert: "The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.", - ImportBindingIsString: ({ - importName - }) => `A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${importName}" as foo }\`?`, - ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.", - ImportCallArity: ({ - maxArgumentCount - }) => `\`import()\` requires exactly ${maxArgumentCount === 1 ? "one argument" : "one or two arguments"}.`, - ImportCallNotNewExpression: "Cannot use new with import(...).", - ImportCallSpreadArgument: "`...` is not allowed in `import()`.", - ImportJSONBindingNotDefault: "A JSON module can only be imported with `default`.", - ImportReflectionHasAssertion: "`import module x` cannot have assertions.", - ImportReflectionNotBinding: 'Only `import module x from "./module"` is valid.', - IncompatibleRegExpUVFlags: "The 'u' and 'v' regular expression flags cannot be enabled at the same time.", - InvalidBigIntLiteral: "Invalid BigIntLiteral.", - InvalidCodePoint: "Code point out of bounds.", - InvalidCoverInitializedName: "Invalid shorthand property initializer.", - InvalidDecimal: "Invalid decimal.", - InvalidDigit: ({ - radix - }) => `Expected number in radix ${radix}.`, - InvalidEscapeSequence: "Bad character escape sequence.", - InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.", - InvalidEscapedReservedWord: ({ - reservedWord - }) => `Escape sequence in keyword ${reservedWord}.`, - InvalidIdentifier: ({ - identifierName - }) => `Invalid identifier ${identifierName}.`, - InvalidLhs: ({ - ancestor - }) => `Invalid left-hand side in ${toNodeDescription(ancestor)}.`, - InvalidLhsBinding: ({ - ancestor - }) => `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`, - InvalidLhsOptionalChaining: ({ - ancestor - }) => `Invalid optional chaining in the left-hand side of ${toNodeDescription(ancestor)}.`, - InvalidNumber: "Invalid number.", - InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.", - InvalidOrUnexpectedToken: ({ - unexpected - }) => `Unexpected character '${unexpected}'.`, - InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.", - InvalidPrivateFieldResolution: ({ - identifierName - }) => `Private name #${identifierName} is not defined.`, - InvalidPropertyBindingPattern: "Binding member expression.", - InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.", - InvalidRestAssignmentPattern: "Invalid rest operator's argument.", - LabelRedeclaration: ({ - labelName - }) => `Label '${labelName}' is already declared.`, - LetInLexicalBinding: "'let' is disallowed as a lexically bound name.", - LineTerminatorBeforeArrow: "No line break is allowed before '=>'.", - MalformedRegExpFlags: "Invalid regular expression flag.", - MissingClassName: "A class name is required.", - MissingEqInAssignment: "Only '=' operator can be used for specifying default value.", - MissingSemicolon: "Missing semicolon.", - MissingPlugin: ({ - missingPlugin - }) => `This experimental syntax requires enabling the parser plugin: ${missingPlugin.map(name => JSON.stringify(name)).join(", ")}.`, - MissingOneOfPlugins: ({ - missingPlugin - }) => `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin.map(name => JSON.stringify(name)).join(", ")}.`, - MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.", - MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.", - ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.", - ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.", - ModuleAttributesWithDuplicateKeys: ({ - key - }) => `Duplicate key "${key}" is not allowed in module attributes.`, - ModuleExportNameHasLoneSurrogate: ({ - surrogateCharCode - }) => `An export name cannot include a lone surrogate, found '\\u${surrogateCharCode.toString(16)}'.`, - ModuleExportUndefined: ({ - localName - }) => `Export '${localName}' is not defined.`, - MultipleDefaultsInSwitch: "Multiple default clauses.", - NewlineAfterThrow: "Illegal newline after throw.", - NoCatchOrFinally: "Missing catch or finally clause.", - NumberIdentifier: "Identifier directly after number.", - NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.", - ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.", - OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.", - OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.", - OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.", - ParamDupe: "Argument name clash.", - PatternHasAccessor: "Object pattern can't contain getter or setter.", - PatternHasMethod: "Object pattern can't contain methods.", - PrivateInExpectedIn: ({ - identifierName - }) => `Private names are only allowed in property accesses (\`obj.#${identifierName}\`) or in \`in\` expressions (\`#${identifierName} in obj\`).`, - PrivateNameRedeclaration: ({ - identifierName - }) => `Duplicate private name #${identifierName}.`, - RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", - RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", - RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", - RecordNoProto: "'__proto__' is not allowed in Record expressions.", - RestTrailingComma: "Unexpected trailing comma after rest element.", - SloppyFunction: "In non-strict mode code, functions can only be declared at top level or inside a block.", - SloppyFunctionAnnexB: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.", - SourcePhaseImportRequiresDefault: 'Only `import source x from "./module"` is valid.', - StaticPrototype: "Classes may not have static property named prototype.", - SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?", - SuperPrivateField: "Private fields can't be accessed on super.", - TrailingDecorator: "Decorators must be attached to a class element.", - TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", - TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", - TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", - UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.", - UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.', - UnexpectedDigitAfterHash: "Unexpected digit after hash token.", - UnexpectedImportExport: "'import' and 'export' may only appear at the top level.", - UnexpectedKeyword: ({ - keyword - }) => `Unexpected keyword '${keyword}'.`, - UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.", - UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.", - UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.", - UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.", - UnexpectedPrivateField: "Unexpected private name.", - UnexpectedReservedWord: ({ - reservedWord - }) => `Unexpected reserved word '${reservedWord}'.`, - UnexpectedSuper: "'super' is only allowed in object methods and classes.", - UnexpectedToken: ({ - expected, - unexpected - }) => `Unexpected token${unexpected ? ` '${unexpected}'.` : ""}${expected ? `, expected "${expected}"` : ""}`, - UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.", - UnexpectedUsingDeclaration: "Using declaration cannot appear in the top level when source type is `script`.", - UnsupportedBind: "Binding should be performed on object property.", - UnsupportedDecoratorExport: "A decorated export must export a class declaration.", - UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.", - UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.", - UnsupportedMetaProperty: ({ - target, - onlyValidPropertyName - }) => `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`, - UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.", - UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.", - UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).", - UnterminatedComment: "Unterminated comment.", - UnterminatedRegExp: "Unterminated regular expression.", - UnterminatedString: "Unterminated string constant.", - UnterminatedTemplate: "Unterminated template.", - UsingDeclarationExport: "Using declaration cannot be exported.", - UsingDeclarationHasBindingPattern: "Using declaration cannot have destructuring patterns.", - VarRedeclaration: ({ - identifierName - }) => `Identifier '${identifierName}' has already been declared.`, - YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.", - YieldInParameter: "Yield expression is not allowed in formal parameters.", - ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0." - }; - var StrictModeErrors = { - StrictDelete: "Deleting local variable in strict mode.", - StrictEvalArguments: ({ - referenceName - }) => `Assigning to '${referenceName}' in strict mode.`, - StrictEvalArgumentsBinding: ({ - bindingName - }) => `Binding '${bindingName}' in strict mode.`, - StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.", - StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.", - StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.", - StrictWith: "'with' in strict mode." - }; - const UnparenthesizedPipeBodyDescriptions = new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]); - var PipelineOperatorErrors = { - PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.", - PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.', - PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.", - PipeTopicUnconfiguredToken: ({ - token - }) => `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${token}" }.`, - PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.", - PipeUnparenthesizedBody: ({ - type - }) => `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({ - type - })}; please wrap it in parentheses.`, - PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.', - PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.", - PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.", - PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.", - PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.", - PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.' - }; - const _excluded = ["message"]; - function defineHidden(obj, key, value) { - Object.defineProperty(obj, key, { - enumerable: false, - configurable: true, - value - }); - } - function toParseErrorConstructor({ - toMessage, - code, - reasonCode, - syntaxPlugin - }) { - const hasMissingPlugin = reasonCode === "MissingPlugin" || reasonCode === "MissingOneOfPlugins"; - return function constructor(loc, details) { - const error = new SyntaxError(); - error.code = code; - error.reasonCode = reasonCode; - error.loc = loc; - error.pos = loc.index; - error.syntaxPlugin = syntaxPlugin; - if (hasMissingPlugin) { - error.missingPlugin = details.missingPlugin; - } - defineHidden(error, "clone", function clone(overrides = {}) { - var _overrides$loc; - const { - line, - column, - index - } = (_overrides$loc = overrides.loc) != null ? _overrides$loc : loc; - return constructor(new Position(line, column, index), Object.assign({}, details, overrides.details)); - }); - defineHidden(error, "details", details); - Object.defineProperty(error, "message", { - configurable: true, - get() { - const message = `${toMessage(details)} (${loc.line}:${loc.column})`; - this.message = message; - return message; - }, - set(value) { - Object.defineProperty(this, "message", { - value, - writable: true - }); - } - }); - return error; - }; - } - function ParseErrorEnum(argument, syntaxPlugin) { - if (Array.isArray(argument)) { - return parseErrorTemplates => ParseErrorEnum(parseErrorTemplates, argument[0]); - } - const ParseErrorConstructors = {}; - for (const reasonCode of Object.keys(argument)) { - const template = argument[reasonCode]; - const _ref = typeof template === "string" ? { - message: () => template - } : typeof template === "function" ? { - message: template - } : template, - { - message - } = _ref, - rest = _objectWithoutPropertiesLoose(_ref, _excluded); - const toMessage = typeof message === "string" ? () => message : message; - ParseErrorConstructors[reasonCode] = toParseErrorConstructor(Object.assign({ - code: "BABEL_PARSER_SYNTAX_ERROR", - reasonCode, - toMessage - }, syntaxPlugin ? { - syntaxPlugin - } : {}, rest)); - } - return ParseErrorConstructors; - } - const Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors)); - const { - defineProperty - } = Object; - const toUnenumerable = (object, key) => { - if (object) { - defineProperty(object, key, { - enumerable: false, - value: object[key] - }); - } - }; - function toESTreeLocation(node) { - toUnenumerable(node.loc.start, "index"); - toUnenumerable(node.loc.end, "index"); - return node; - } - var estree = superClass => class ESTreeParserMixin extends superClass { - parse() { - const file = toESTreeLocation(super.parse()); - if (this.options.tokens) { - file.tokens = file.tokens.map(toESTreeLocation); - } - return file; - } - parseRegExpLiteral({ - pattern, - flags - }) { - let regex = null; - try { - regex = new RegExp(pattern, flags); - } catch (_) {} - const node = this.estreeParseLiteral(regex); - node.regex = { - pattern, - flags - }; - return node; - } - parseBigIntLiteral(value) { - let bigInt; - try { - bigInt = BigInt(value); - } catch (_unused) { - bigInt = null; - } - const node = this.estreeParseLiteral(bigInt); - node.bigint = String(node.value || value); - return node; - } - parseDecimalLiteral(value) { - const decimal = null; - const node = this.estreeParseLiteral(decimal); - node.decimal = String(node.value || value); - return node; - } - estreeParseLiteral(value) { - return this.parseLiteral(value, "Literal"); - } - parseStringLiteral(value) { - return this.estreeParseLiteral(value); - } - parseNumericLiteral(value) { - return this.estreeParseLiteral(value); - } - parseNullLiteral() { - return this.estreeParseLiteral(null); - } - parseBooleanLiteral(value) { - return this.estreeParseLiteral(value); - } - directiveToStmt(directive) { - const expression = directive.value; - delete directive.value; - expression.type = "Literal"; - expression.raw = expression.extra.raw; - expression.value = expression.extra.expressionValue; - const stmt = directive; - stmt.type = "ExpressionStatement"; - stmt.expression = expression; - stmt.directive = expression.extra.rawValue; - delete expression.extra; - return stmt; - } - initFunction(node, isAsync) { - super.initFunction(node, isAsync); - node.expression = false; - } - checkDeclaration(node) { - if (node != null && this.isObjectProperty(node)) { - this.checkDeclaration(node.value); - } else { - super.checkDeclaration(node); - } - } - getObjectOrClassMethodParams(method) { - return method.value.params; - } - isValidDirective(stmt) { - var _stmt$expression$extr; - return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized); - } - parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) { - super.parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse); - const directiveStatements = node.directives.map(d => this.directiveToStmt(d)); - node.body = directiveStatements.concat(node.body); - delete node.directives; - } - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true); - if (method.typeParameters) { - method.value.typeParameters = method.typeParameters; - delete method.typeParameters; - } - classBody.body.push(method); - } - parsePrivateName() { - const node = super.parsePrivateName(); - { - if (!this.getPluginOption("estree", "classFeatures")) { - return node; - } - } - return this.convertPrivateNameToPrivateIdentifier(node); - } - convertPrivateNameToPrivateIdentifier(node) { - const name = super.getPrivateNameSV(node); - node = node; - delete node.id; - node.name = name; - node.type = "PrivateIdentifier"; - return node; - } - isPrivateName(node) { - { - if (!this.getPluginOption("estree", "classFeatures")) { - return super.isPrivateName(node); - } - } - return node.type === "PrivateIdentifier"; - } - getPrivateNameSV(node) { - { - if (!this.getPluginOption("estree", "classFeatures")) { - return super.getPrivateNameSV(node); - } - } - return node.name; - } - parseLiteral(value, type) { - const node = super.parseLiteral(value, type); - node.raw = node.extra.raw; - delete node.extra; - return node; - } - parseFunctionBody(node, allowExpression, isMethod = false) { - super.parseFunctionBody(node, allowExpression, isMethod); - node.expression = node.body.type !== "BlockStatement"; - } - parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { - let funcNode = this.startNode(); - funcNode.kind = node.kind; - funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); - funcNode.type = "FunctionExpression"; - delete funcNode.kind; - node.value = funcNode; - if (type === "ClassPrivateMethod") { - node.computed = false; - } - return this.finishNode(node, "MethodDefinition"); - } - nameIsConstructor(key) { - if (key.type === "Literal") return key.value === "constructor"; - return super.nameIsConstructor(key); - } - parseClassProperty(...args) { - const propertyNode = super.parseClassProperty(...args); - { - if (!this.getPluginOption("estree", "classFeatures")) { - return propertyNode; - } - } - propertyNode.type = "PropertyDefinition"; - return propertyNode; - } - parseClassPrivateProperty(...args) { - const propertyNode = super.parseClassPrivateProperty(...args); - { - if (!this.getPluginOption("estree", "classFeatures")) { - return propertyNode; - } - } - propertyNode.type = "PropertyDefinition"; - propertyNode.computed = false; - return propertyNode; - } - parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { - const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor); - if (node) { - node.type = "Property"; - if (node.kind === "method") { - node.kind = "init"; - } - node.shorthand = false; - } - return node; - } - parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) { - const node = super.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors); - if (node) { - node.kind = "init"; - node.type = "Property"; - } - return node; - } - isValidLVal(type, isUnparenthesizedInAssign, binding) { - return type === "Property" ? "value" : super.isValidLVal(type, isUnparenthesizedInAssign, binding); - } - isAssignable(node, isBinding) { - if (node != null && this.isObjectProperty(node)) { - return this.isAssignable(node.value, isBinding); - } - return super.isAssignable(node, isBinding); - } - toAssignable(node, isLHS = false) { - if (node != null && this.isObjectProperty(node)) { - const { - key, - value - } = node; - if (this.isPrivateName(key)) { - this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); - } - this.toAssignable(value, isLHS); - } else { - super.toAssignable(node, isLHS); - } - } - toAssignableObjectExpressionProp(prop, isLast, isLHS) { - if (prop.type === "Property" && (prop.kind === "get" || prop.kind === "set")) { - this.raise(Errors.PatternHasAccessor, prop.key); - } else if (prop.type === "Property" && prop.method) { - this.raise(Errors.PatternHasMethod, prop.key); - } else { - super.toAssignableObjectExpressionProp(prop, isLast, isLHS); - } - } - finishCallExpression(unfinished, optional) { - const node = super.finishCallExpression(unfinished, optional); - if (node.callee.type === "Import") { - node.type = "ImportExpression"; - node.source = node.arguments[0]; - if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { - var _ref, _ref2; - node.options = (_ref = node.arguments[1]) != null ? _ref : null; - node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null; - } - delete node.arguments; - delete node.callee; - } - return node; - } - toReferencedArguments(node) { - if (node.type === "ImportExpression") { - return; - } - super.toReferencedArguments(node); - } - parseExport(unfinished, decorators) { - const exportStartLoc = this.state.lastTokStartLoc; - const node = super.parseExport(unfinished, decorators); - switch (node.type) { - case "ExportAllDeclaration": - node.exported = null; - break; - case "ExportNamedDeclaration": - if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") { - node.type = "ExportAllDeclaration"; - node.exported = node.specifiers[0].exported; - delete node.specifiers; - } - case "ExportDefaultDeclaration": - { - var _declaration$decorato; - const { - declaration - } = node; - if ((declaration == null ? void 0 : declaration.type) === "ClassDeclaration" && ((_declaration$decorato = declaration.decorators) == null ? void 0 : _declaration$decorato.length) > 0 && declaration.start === node.start) { - this.resetStartLocation(node, exportStartLoc); - } - } - break; - } - return node; - } - parseSubscript(base, startLoc, noCalls, state) { - const node = super.parseSubscript(base, startLoc, noCalls, state); - if (state.optionalChainMember) { - if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") { - node.type = node.type.substring(8); - } - if (state.stop) { - const chain = this.startNodeAtNode(node); - chain.expression = node; - return this.finishNode(chain, "ChainExpression"); - } - } else if (node.type === "MemberExpression" || node.type === "CallExpression") { - node.optional = false; - } - return node; - } - isOptionalMemberExpression(node) { - if (node.type === "ChainExpression") { - return node.expression.type === "MemberExpression"; - } - return super.isOptionalMemberExpression(node); - } - hasPropertyAsPrivateName(node) { - if (node.type === "ChainExpression") { - node = node.expression; - } - return super.hasPropertyAsPrivateName(node); - } - isObjectProperty(node) { - return node.type === "Property" && node.kind === "init" && !node.method; - } - isObjectMethod(node) { - return node.type === "Property" && (node.method || node.kind === "get" || node.kind === "set"); - } - finishNodeAt(node, type, endLoc) { - return toESTreeLocation(super.finishNodeAt(node, type, endLoc)); - } - resetStartLocation(node, startLoc) { - super.resetStartLocation(node, startLoc); - toESTreeLocation(node); - } - resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { - super.resetEndLocation(node, endLoc); - toESTreeLocation(node); - } - }; - class TokContext { - constructor(token, preserveSpace) { - this.token = void 0; - this.preserveSpace = void 0; - this.token = token; - this.preserveSpace = !!preserveSpace; - } - } - const types = { - brace: new TokContext("{"), - j_oTag: new TokContext("<tag"), - j_cTag: new TokContext("</tag"), - j_expr: new TokContext("<tag>...</tag>", true) - }; - { - types.template = new TokContext("`", true); - } - const beforeExpr = true; - const startsExpr = true; - const isLoop = true; - const isAssign = true; - const prefix = true; - const postfix = true; - class ExportedTokenType { - constructor(label, conf = {}) { - this.label = void 0; - this.keyword = void 0; - this.beforeExpr = void 0; - this.startsExpr = void 0; - this.rightAssociative = void 0; - this.isLoop = void 0; - this.isAssign = void 0; - this.prefix = void 0; - this.postfix = void 0; - this.binop = void 0; - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.rightAssociative = !!conf.rightAssociative; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop != null ? conf.binop : null; - { - this.updateContext = null; - } - } - } - const keywords$1 = new Map(); - function createKeyword(name, options = {}) { - options.keyword = name; - const token = createToken(name, options); - keywords$1.set(name, token); - return token; - } - function createBinop(name, binop) { - return createToken(name, { - beforeExpr, - binop - }); - } - let tokenTypeCounter = -1; - const tokenTypes = []; - const tokenLabels = []; - const tokenBinops = []; - const tokenBeforeExprs = []; - const tokenStartsExprs = []; - const tokenPrefixes = []; - function createToken(name, options = {}) { - var _options$binop, _options$beforeExpr, _options$startsExpr, _options$prefix; - ++tokenTypeCounter; - tokenLabels.push(name); - tokenBinops.push((_options$binop = options.binop) != null ? _options$binop : -1); - tokenBeforeExprs.push((_options$beforeExpr = options.beforeExpr) != null ? _options$beforeExpr : false); - tokenStartsExprs.push((_options$startsExpr = options.startsExpr) != null ? _options$startsExpr : false); - tokenPrefixes.push((_options$prefix = options.prefix) != null ? _options$prefix : false); - tokenTypes.push(new ExportedTokenType(name, options)); - return tokenTypeCounter; - } - function createKeywordLike(name, options = {}) { - var _options$binop2, _options$beforeExpr2, _options$startsExpr2, _options$prefix2; - ++tokenTypeCounter; - keywords$1.set(name, tokenTypeCounter); - tokenLabels.push(name); - tokenBinops.push((_options$binop2 = options.binop) != null ? _options$binop2 : -1); - tokenBeforeExprs.push((_options$beforeExpr2 = options.beforeExpr) != null ? _options$beforeExpr2 : false); - tokenStartsExprs.push((_options$startsExpr2 = options.startsExpr) != null ? _options$startsExpr2 : false); - tokenPrefixes.push((_options$prefix2 = options.prefix) != null ? _options$prefix2 : false); - tokenTypes.push(new ExportedTokenType("name", options)); - return tokenTypeCounter; - } - const tt = { - bracketL: createToken("[", { - beforeExpr, - startsExpr - }), - bracketHashL: createToken("#[", { - beforeExpr, - startsExpr - }), - bracketBarL: createToken("[|", { - beforeExpr, - startsExpr - }), - bracketR: createToken("]"), - bracketBarR: createToken("|]"), - braceL: createToken("{", { - beforeExpr, - startsExpr - }), - braceBarL: createToken("{|", { - beforeExpr, - startsExpr - }), - braceHashL: createToken("#{", { - beforeExpr, - startsExpr - }), - braceR: createToken("}"), - braceBarR: createToken("|}"), - parenL: createToken("(", { - beforeExpr, - startsExpr - }), - parenR: createToken(")"), - comma: createToken(",", { - beforeExpr - }), - semi: createToken(";", { - beforeExpr - }), - colon: createToken(":", { - beforeExpr - }), - doubleColon: createToken("::", { - beforeExpr - }), - dot: createToken("."), - question: createToken("?", { - beforeExpr - }), - questionDot: createToken("?."), - arrow: createToken("=>", { - beforeExpr - }), - template: createToken("template"), - ellipsis: createToken("...", { - beforeExpr - }), - backQuote: createToken("`", { - startsExpr - }), - dollarBraceL: createToken("${", { - beforeExpr, - startsExpr - }), - templateTail: createToken("...`", { - startsExpr - }), - templateNonTail: createToken("...${", { - beforeExpr, - startsExpr - }), - at: createToken("@"), - hash: createToken("#", { - startsExpr - }), - interpreterDirective: createToken("#!..."), - eq: createToken("=", { - beforeExpr, - isAssign - }), - assign: createToken("_=", { - beforeExpr, - isAssign - }), - slashAssign: createToken("_=", { - beforeExpr, - isAssign - }), - xorAssign: createToken("_=", { - beforeExpr, - isAssign - }), - moduloAssign: createToken("_=", { - beforeExpr, - isAssign - }), - incDec: createToken("++/--", { - prefix, - postfix, - startsExpr - }), - bang: createToken("!", { - beforeExpr, - prefix, - startsExpr - }), - tilde: createToken("~", { - beforeExpr, - prefix, - startsExpr - }), - doubleCaret: createToken("^^", { - startsExpr - }), - doubleAt: createToken("@@", { - startsExpr - }), - pipeline: createBinop("|>", 0), - nullishCoalescing: createBinop("??", 1), - logicalOR: createBinop("||", 1), - logicalAND: createBinop("&&", 2), - bitwiseOR: createBinop("|", 3), - bitwiseXOR: createBinop("^", 4), - bitwiseAND: createBinop("&", 5), - equality: createBinop("==/!=/===/!==", 6), - lt: createBinop("</>/<=/>=", 7), - gt: createBinop("</>/<=/>=", 7), - relational: createBinop("</>/<=/>=", 7), - bitShift: createBinop("<</>>/>>>", 8), - bitShiftL: createBinop("<</>>/>>>", 8), - bitShiftR: createBinop("<</>>/>>>", 8), - plusMin: createToken("+/-", { - beforeExpr, - binop: 9, - prefix, - startsExpr - }), - modulo: createToken("%", { - binop: 10, - startsExpr - }), - star: createToken("*", { - binop: 10 - }), - slash: createBinop("/", 10), - exponent: createToken("**", { - beforeExpr, - binop: 11, - rightAssociative: true - }), - _in: createKeyword("in", { - beforeExpr, - binop: 7 - }), - _instanceof: createKeyword("instanceof", { - beforeExpr, - binop: 7 - }), - _break: createKeyword("break"), - _case: createKeyword("case", { - beforeExpr - }), - _catch: createKeyword("catch"), - _continue: createKeyword("continue"), - _debugger: createKeyword("debugger"), - _default: createKeyword("default", { - beforeExpr - }), - _else: createKeyword("else", { - beforeExpr - }), - _finally: createKeyword("finally"), - _function: createKeyword("function", { - startsExpr - }), - _if: createKeyword("if"), - _return: createKeyword("return", { - beforeExpr - }), - _switch: createKeyword("switch"), - _throw: createKeyword("throw", { - beforeExpr, - prefix, - startsExpr - }), - _try: createKeyword("try"), - _var: createKeyword("var"), - _const: createKeyword("const"), - _with: createKeyword("with"), - _new: createKeyword("new", { - beforeExpr, - startsExpr - }), - _this: createKeyword("this", { - startsExpr - }), - _super: createKeyword("super", { - startsExpr - }), - _class: createKeyword("class", { - startsExpr - }), - _extends: createKeyword("extends", { - beforeExpr - }), - _export: createKeyword("export"), - _import: createKeyword("import", { - startsExpr - }), - _null: createKeyword("null", { - startsExpr - }), - _true: createKeyword("true", { - startsExpr - }), - _false: createKeyword("false", { - startsExpr - }), - _typeof: createKeyword("typeof", { - beforeExpr, - prefix, - startsExpr - }), - _void: createKeyword("void", { - beforeExpr, - prefix, - startsExpr - }), - _delete: createKeyword("delete", { - beforeExpr, - prefix, - startsExpr - }), - _do: createKeyword("do", { - isLoop, - beforeExpr - }), - _for: createKeyword("for", { - isLoop - }), - _while: createKeyword("while", { - isLoop - }), - _as: createKeywordLike("as", { - startsExpr - }), - _assert: createKeywordLike("assert", { - startsExpr - }), - _async: createKeywordLike("async", { - startsExpr - }), - _await: createKeywordLike("await", { - startsExpr - }), - _defer: createKeywordLike("defer", { - startsExpr - }), - _from: createKeywordLike("from", { - startsExpr - }), - _get: createKeywordLike("get", { - startsExpr - }), - _let: createKeywordLike("let", { - startsExpr - }), - _meta: createKeywordLike("meta", { - startsExpr - }), - _of: createKeywordLike("of", { - startsExpr - }), - _sent: createKeywordLike("sent", { - startsExpr - }), - _set: createKeywordLike("set", { - startsExpr - }), - _source: createKeywordLike("source", { - startsExpr - }), - _static: createKeywordLike("static", { - startsExpr - }), - _using: createKeywordLike("using", { - startsExpr - }), - _yield: createKeywordLike("yield", { - startsExpr - }), - _asserts: createKeywordLike("asserts", { - startsExpr - }), - _checks: createKeywordLike("checks", { - startsExpr - }), - _exports: createKeywordLike("exports", { - startsExpr - }), - _global: createKeywordLike("global", { - startsExpr - }), - _implements: createKeywordLike("implements", { - startsExpr - }), - _intrinsic: createKeywordLike("intrinsic", { - startsExpr - }), - _infer: createKeywordLike("infer", { - startsExpr - }), - _is: createKeywordLike("is", { - startsExpr - }), - _mixins: createKeywordLike("mixins", { - startsExpr - }), - _proto: createKeywordLike("proto", { - startsExpr - }), - _require: createKeywordLike("require", { - startsExpr - }), - _satisfies: createKeywordLike("satisfies", { - startsExpr - }), - _keyof: createKeywordLike("keyof", { - startsExpr - }), - _readonly: createKeywordLike("readonly", { - startsExpr - }), - _unique: createKeywordLike("unique", { - startsExpr - }), - _abstract: createKeywordLike("abstract", { - startsExpr - }), - _declare: createKeywordLike("declare", { - startsExpr - }), - _enum: createKeywordLike("enum", { - startsExpr - }), - _module: createKeywordLike("module", { - startsExpr - }), - _namespace: createKeywordLike("namespace", { - startsExpr - }), - _interface: createKeywordLike("interface", { - startsExpr - }), - _type: createKeywordLike("type", { - startsExpr - }), - _opaque: createKeywordLike("opaque", { - startsExpr - }), - name: createToken("name", { - startsExpr - }), - string: createToken("string", { - startsExpr - }), - num: createToken("num", { - startsExpr - }), - bigint: createToken("bigint", { - startsExpr - }), - decimal: createToken("decimal", { - startsExpr - }), - regexp: createToken("regexp", { - startsExpr - }), - privateName: createToken("#name", { - startsExpr - }), - eof: createToken("eof"), - jsxName: createToken("jsxName"), - jsxText: createToken("jsxText", { - beforeExpr: true - }), - jsxTagStart: createToken("jsxTagStart", { - startsExpr: true - }), - jsxTagEnd: createToken("jsxTagEnd"), - placeholder: createToken("%%", { - startsExpr: true - }) - }; - function tokenIsIdentifier(token) { - return token >= 93 && token <= 132; - } - function tokenKeywordOrIdentifierIsKeyword(token) { - return token <= 92; - } - function tokenIsKeywordOrIdentifier(token) { - return token >= 58 && token <= 132; - } - function tokenIsLiteralPropertyName(token) { - return token >= 58 && token <= 136; - } - function tokenComesBeforeExpression(token) { - return tokenBeforeExprs[token]; - } - function tokenCanStartExpression(token) { - return tokenStartsExprs[token]; - } - function tokenIsAssignment(token) { - return token >= 29 && token <= 33; - } - function tokenIsFlowInterfaceOrTypeOrOpaque(token) { - return token >= 129 && token <= 131; - } - function tokenIsLoop(token) { - return token >= 90 && token <= 92; - } - function tokenIsKeyword(token) { - return token >= 58 && token <= 92; - } - function tokenIsOperator(token) { - return token >= 39 && token <= 59; - } - function tokenIsPostfix(token) { - return token === 34; - } - function tokenIsPrefix(token) { - return tokenPrefixes[token]; - } - function tokenIsTSTypeOperator(token) { - return token >= 121 && token <= 123; - } - function tokenIsTSDeclarationStart(token) { - return token >= 124 && token <= 130; - } - function tokenLabelName(token) { - return tokenLabels[token]; - } - function tokenOperatorPrecedence(token) { - return tokenBinops[token]; - } - function tokenIsRightAssociative(token) { - return token === 57; - } - function tokenIsTemplate(token) { - return token >= 24 && token <= 25; - } - function getExportedToken(token) { - return tokenTypes[token]; - } - { - tokenTypes[8].updateContext = context => { - context.pop(); - }; - tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = context => { - context.push(types.brace); - }; - tokenTypes[22].updateContext = context => { - if (context[context.length - 1] === types.template) { - context.pop(); - } else { - context.push(types.template); - } - }; - tokenTypes[142].updateContext = context => { - context.push(types.j_expr, types.j_oTag); - }; - } - 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\u0cf3\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-\u0ece\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\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\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\uff65"; - 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, 20, 1, 64, 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, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 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, 16, 0, 30, 2, 3, 0, 15, 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, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 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, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; - 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, 81, 2, 71, 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, 3, 0, 158, 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, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 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, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 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); - } - 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); - } - function isIteratorStart(current, next, next2) { - return current === 64 && next === 64 && isIdentifierStart(next2); - } - const reservedWordLikeSet = new Set(["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", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]); - function canBeReservedWord(word) { - return reservedWordLikeSet.has(word); - } - class Scope { - constructor(flags) { - this.flags = 0; - this.names = new Map(); - this.firstLexicalName = ""; - this.flags = flags; - } - } - class ScopeHandler { - constructor(parser, inModule) { - this.parser = void 0; - this.scopeStack = []; - this.inModule = void 0; - this.undefinedExports = new Map(); - this.parser = parser; - this.inModule = inModule; - } - get inTopLevel() { - return (this.currentScope().flags & 1) > 0; - } - get inFunction() { - return (this.currentVarScopeFlags() & 2) > 0; - } - get allowSuper() { - return (this.currentThisScopeFlags() & 16) > 0; - } - get allowDirectSuper() { - return (this.currentThisScopeFlags() & 32) > 0; - } - get inClass() { - return (this.currentThisScopeFlags() & 64) > 0; - } - get inClassAndNotInNonArrowFunction() { - const flags = this.currentThisScopeFlags(); - return (flags & 64) > 0 && (flags & 2) === 0; - } - get inStaticBlock() { - for (let i = this.scopeStack.length - 1;; i--) { - const { - flags - } = this.scopeStack[i]; - if (flags & 128) { - return true; - } - if (flags & (387 | 64)) { - return false; - } - } - } - get inNonArrowFunction() { - return (this.currentThisScopeFlags() & 2) > 0; - } - get treatFunctionsAsVar() { - return this.treatFunctionsAsVarInScope(this.currentScope()); - } - createScope(flags) { - return new Scope(flags); - } - enter(flags) { - this.scopeStack.push(this.createScope(flags)); - } - exit() { - const scope = this.scopeStack.pop(); - return scope.flags; - } - treatFunctionsAsVarInScope(scope) { - return !!(scope.flags & (2 | 128) || !this.parser.inModule && scope.flags & 1); - } - declareName(name, bindingType, loc) { - let scope = this.currentScope(); - if (bindingType & 8 || bindingType & 16) { - this.checkRedeclarationInScope(scope, name, bindingType, loc); - let type = scope.names.get(name) || 0; - if (bindingType & 16) { - type = type | 4; - } else { - if (!scope.firstLexicalName) { - scope.firstLexicalName = name; - } - type = type | 2; - } - scope.names.set(name, type); - if (bindingType & 8) { - this.maybeExportDefined(scope, name); - } - } else if (bindingType & 4) { - for (let i = this.scopeStack.length - 1; i >= 0; --i) { - scope = this.scopeStack[i]; - this.checkRedeclarationInScope(scope, name, bindingType, loc); - scope.names.set(name, (scope.names.get(name) || 0) | 1); - this.maybeExportDefined(scope, name); - if (scope.flags & 387) break; - } - } - if (this.parser.inModule && scope.flags & 1) { - this.undefinedExports.delete(name); - } - } - maybeExportDefined(scope, name) { - if (this.parser.inModule && scope.flags & 1) { - this.undefinedExports.delete(name); - } - } - checkRedeclarationInScope(scope, name, bindingType, loc) { - if (this.isRedeclaredInScope(scope, name, bindingType)) { - this.parser.raise(Errors.VarRedeclaration, loc, { - identifierName: name - }); - } - } - isRedeclaredInScope(scope, name, bindingType) { - if (!(bindingType & 1)) return false; - if (bindingType & 8) { - return scope.names.has(name); - } - const type = scope.names.get(name); - if (bindingType & 16) { - return (type & 2) > 0 || !this.treatFunctionsAsVarInScope(scope) && (type & 1) > 0; - } - return (type & 2) > 0 && !(scope.flags & 8 && scope.firstLexicalName === name) || !this.treatFunctionsAsVarInScope(scope) && (type & 4) > 0; - } - checkLocalExport(id) { - const { - name - } = id; - const topLevelScope = this.scopeStack[0]; - if (!topLevelScope.names.has(name)) { - this.undefinedExports.set(name, id.loc.start); - } - } - currentScope() { - return this.scopeStack[this.scopeStack.length - 1]; - } - currentVarScopeFlags() { - for (let i = this.scopeStack.length - 1;; i--) { - const { - flags - } = this.scopeStack[i]; - if (flags & 387) { - return flags; - } - } - } - currentThisScopeFlags() { - for (let i = this.scopeStack.length - 1;; i--) { - const { - flags - } = this.scopeStack[i]; - if (flags & (387 | 64) && !(flags & 4)) { - return flags; - } - } - } - } - class FlowScope extends Scope { - constructor(...args) { - super(...args); - this.declareFunctions = new Set(); - } - } - class FlowScopeHandler extends ScopeHandler { - createScope(flags) { - return new FlowScope(flags); - } - declareName(name, bindingType, loc) { - const scope = this.currentScope(); - if (bindingType & 2048) { - this.checkRedeclarationInScope(scope, name, bindingType, loc); - this.maybeExportDefined(scope, name); - scope.declareFunctions.add(name); - return; - } - super.declareName(name, bindingType, loc); - } - isRedeclaredInScope(scope, name, bindingType) { - if (super.isRedeclaredInScope(scope, name, bindingType)) return true; - if (bindingType & 2048 && !scope.declareFunctions.has(name)) { - const type = scope.names.get(name); - return (type & 4) > 0 || (type & 2) > 0; - } - return false; - } - checkLocalExport(id) { - if (!this.scopeStack[0].declareFunctions.has(id.name)) { - super.checkLocalExport(id); - } - } - } - class BaseParser { - constructor() { - this.sawUnambiguousESM = false; - this.ambiguousScriptDifferentAst = false; - } - hasPlugin(pluginConfig) { - if (typeof pluginConfig === "string") { - return this.plugins.has(pluginConfig); - } else { - const [pluginName, pluginOptions] = pluginConfig; - if (!this.hasPlugin(pluginName)) { - return false; - } - const actualOptions = this.plugins.get(pluginName); - for (const key of Object.keys(pluginOptions)) { - if ((actualOptions == null ? void 0 : actualOptions[key]) !== pluginOptions[key]) { - return false; - } - } - return true; - } - } - getPluginOption(plugin, name) { - var _this$plugins$get; - return (_this$plugins$get = this.plugins.get(plugin)) == null ? void 0 : _this$plugins$get[name]; - } - } - function setTrailingComments(node, comments) { - if (node.trailingComments === undefined) { - node.trailingComments = comments; - } else { - node.trailingComments.unshift(...comments); - } - } - function setLeadingComments(node, comments) { - if (node.leadingComments === undefined) { - node.leadingComments = comments; - } else { - node.leadingComments.unshift(...comments); - } - } - function setInnerComments(node, comments) { - if (node.innerComments === undefined) { - node.innerComments = comments; - } else { - node.innerComments.unshift(...comments); - } - } - function adjustInnerComments(node, elements, commentWS) { - let lastElement = null; - let i = elements.length; - while (lastElement === null && i > 0) { - lastElement = elements[--i]; - } - if (lastElement === null || lastElement.start > commentWS.start) { - setInnerComments(node, commentWS.comments); - } else { - setTrailingComments(lastElement, commentWS.comments); - } - } - class CommentsParser extends BaseParser { - addComment(comment) { - if (this.filename) comment.loc.filename = this.filename; - const { - commentsLen - } = this.state; - if (this.comments.length !== commentsLen) { - this.comments.length = commentsLen; - } - this.comments.push(comment); - this.state.commentsLen++; - } - processComment(node) { - const { - commentStack - } = this.state; - const commentStackLength = commentStack.length; - if (commentStackLength === 0) return; - let i = commentStackLength - 1; - const lastCommentWS = commentStack[i]; - if (lastCommentWS.start === node.end) { - lastCommentWS.leadingNode = node; - i--; - } - const { - start: nodeStart - } = node; - for (; i >= 0; i--) { - const commentWS = commentStack[i]; - const commentEnd = commentWS.end; - if (commentEnd > nodeStart) { - commentWS.containingNode = node; - this.finalizeComment(commentWS); - commentStack.splice(i, 1); - } else { - if (commentEnd === nodeStart) { - commentWS.trailingNode = node; - } - break; - } - } - } - finalizeComment(commentWS) { - const { - comments - } = commentWS; - if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) { - if (commentWS.leadingNode !== null) { - setTrailingComments(commentWS.leadingNode, comments); - } - if (commentWS.trailingNode !== null) { - setLeadingComments(commentWS.trailingNode, comments); - } - } else { - const { - containingNode: node, - start: commentStart - } = commentWS; - if (this.input.charCodeAt(commentStart - 1) === 44) { - switch (node.type) { - case "ObjectExpression": - case "ObjectPattern": - case "RecordExpression": - adjustInnerComments(node, node.properties, commentWS); - break; - case "CallExpression": - case "OptionalCallExpression": - adjustInnerComments(node, node.arguments, commentWS); - break; - case "FunctionDeclaration": - case "FunctionExpression": - case "ArrowFunctionExpression": - case "ObjectMethod": - case "ClassMethod": - case "ClassPrivateMethod": - adjustInnerComments(node, node.params, commentWS); - break; - case "ArrayExpression": - case "ArrayPattern": - case "TupleExpression": - adjustInnerComments(node, node.elements, commentWS); - break; - case "ExportNamedDeclaration": - case "ImportDeclaration": - adjustInnerComments(node, node.specifiers, commentWS); - break; - default: - { - setInnerComments(node, comments); - } - } - } else { - setInnerComments(node, comments); - } - } - } - finalizeRemainingComments() { - const { - commentStack - } = this.state; - for (let i = commentStack.length - 1; i >= 0; i--) { - this.finalizeComment(commentStack[i]); - } - this.state.commentStack = []; - } - resetPreviousNodeTrailingComments(node) { - const { - commentStack - } = this.state; - const { - length - } = commentStack; - if (length === 0) return; - const commentWS = commentStack[length - 1]; - if (commentWS.leadingNode === node) { - commentWS.leadingNode = null; - } - } - resetPreviousIdentifierLeadingComments(node) { - const { - commentStack - } = this.state; - const { - length - } = commentStack; - if (length === 0) return; - if (commentStack[length - 1].trailingNode === node) { - commentStack[length - 1].trailingNode = null; - } else if (length >= 2 && commentStack[length - 2].trailingNode === node) { - commentStack[length - 2].trailingNode = null; - } - } - takeSurroundingComments(node, start, end) { - const { - commentStack - } = this.state; - const commentStackLength = commentStack.length; - if (commentStackLength === 0) return; - let i = commentStackLength - 1; - for (; i >= 0; i--) { - const commentWS = commentStack[i]; - const commentEnd = commentWS.end; - const commentStart = commentWS.start; - if (commentStart === end) { - commentWS.leadingNode = node; - } else if (commentEnd === start) { - commentWS.trailingNode = node; - } else if (commentEnd < start) { - break; - } - } - } - } - const lineBreak = /\r\n|[\r\n\u2028\u2029]/; - const lineBreakG = new RegExp(lineBreak.source, "g"); - function isNewLine(code) { - switch (code) { - case 10: - case 13: - case 8232: - case 8233: - return true; - default: - return false; - } - } - function hasNewLine(input, start, end) { - for (let i = start; i < end; i++) { - if (isNewLine(input.charCodeAt(i))) { - return true; - } - } - return false; - } - const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; - const skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g; - function isWhitespace(code) { - switch (code) { - case 0x0009: - case 0x000b: - case 0x000c: - case 32: - case 160: - case 5760: - case 0x2000: - case 0x2001: - case 0x2002: - case 0x2003: - case 0x2004: - case 0x2005: - case 0x2006: - case 0x2007: - case 0x2008: - case 0x2009: - case 0x200a: - case 0x202f: - case 0x205f: - case 0x3000: - case 0xfeff: - return true; - default: - return false; - } - } - class State { - constructor() { - this.flags = 1024; - this.curLine = void 0; - this.lineStart = void 0; - this.startLoc = void 0; - this.endLoc = void 0; - this.errors = []; - this.potentialArrowAt = -1; - this.noArrowAt = []; - this.noArrowParamsConversionAt = []; - this.topicContext = { - maxNumOfResolvableTopics: 0, - maxTopicIndex: null - }; - this.labels = []; - this.commentsLen = 0; - this.commentStack = []; - this.pos = 0; - this.type = 139; - this.value = null; - this.start = 0; - this.end = 0; - this.lastTokEndLoc = null; - this.lastTokStartLoc = null; - this.context = [types.brace]; - this.firstInvalidTemplateEscapePos = null; - this.strictErrors = new Map(); - this.tokensLength = 0; - } - get strict() { - return (this.flags & 1) > 0; - } - set strict(v) { - if (v) this.flags |= 1;else this.flags &= -2; - } - init({ - strictMode, - sourceType, - startLine, - startColumn - }) { - this.strict = strictMode === false ? false : strictMode === true ? true : sourceType === "module"; - this.curLine = startLine; - this.lineStart = -startColumn; - this.startLoc = this.endLoc = new Position(startLine, startColumn, 0); - } - get maybeInArrowParameters() { - return (this.flags & 2) > 0; - } - set maybeInArrowParameters(v) { - if (v) this.flags |= 2;else this.flags &= -3; - } - get inType() { - return (this.flags & 4) > 0; - } - set inType(v) { - if (v) this.flags |= 4;else this.flags &= -5; - } - get noAnonFunctionType() { - return (this.flags & 8) > 0; - } - set noAnonFunctionType(v) { - if (v) this.flags |= 8;else this.flags &= -9; - } - get hasFlowComment() { - return (this.flags & 16) > 0; - } - set hasFlowComment(v) { - if (v) this.flags |= 16;else this.flags &= -17; - } - get isAmbientContext() { - return (this.flags & 32) > 0; - } - set isAmbientContext(v) { - if (v) this.flags |= 32;else this.flags &= -33; - } - get inAbstractClass() { - return (this.flags & 64) > 0; - } - set inAbstractClass(v) { - if (v) this.flags |= 64;else this.flags &= -65; - } - get inDisallowConditionalTypesContext() { - return (this.flags & 128) > 0; - } - set inDisallowConditionalTypesContext(v) { - if (v) this.flags |= 128;else this.flags &= -129; - } - get soloAwait() { - return (this.flags & 256) > 0; - } - set soloAwait(v) { - if (v) this.flags |= 256;else this.flags &= -257; - } - get inFSharpPipelineDirectBody() { - return (this.flags & 512) > 0; - } - set inFSharpPipelineDirectBody(v) { - if (v) this.flags |= 512;else this.flags &= -513; - } - get canStartJSXElement() { - return (this.flags & 1024) > 0; - } - set canStartJSXElement(v) { - if (v) this.flags |= 1024;else this.flags &= -1025; - } - get containsEsc() { - return (this.flags & 2048) > 0; - } - set containsEsc(v) { - if (v) this.flags |= 2048;else this.flags &= -2049; - } - get hasTopLevelAwait() { - return (this.flags & 4096) > 0; - } - set hasTopLevelAwait(v) { - if (v) this.flags |= 4096;else this.flags &= -4097; - } - curPosition() { - return new Position(this.curLine, this.pos - this.lineStart, this.pos); - } - clone() { - const state = new State(); - state.flags = this.flags; - state.curLine = this.curLine; - state.lineStart = this.lineStart; - state.startLoc = this.startLoc; - state.endLoc = this.endLoc; - state.errors = this.errors.slice(); - state.potentialArrowAt = this.potentialArrowAt; - state.noArrowAt = this.noArrowAt.slice(); - state.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice(); - state.topicContext = this.topicContext; - state.labels = this.labels.slice(); - state.commentsLen = this.commentsLen; - state.commentStack = this.commentStack.slice(); - state.pos = this.pos; - state.type = this.type; - state.value = this.value; - state.start = this.start; - state.end = this.end; - state.lastTokEndLoc = this.lastTokEndLoc; - state.lastTokStartLoc = this.lastTokStartLoc; - state.context = this.context.slice(); - state.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos; - state.strictErrors = this.strictErrors; - state.tokensLength = this.tokensLength; - return state; - } - } - var _isDigit = function isDigit(code) { - return code >= 48 && code <= 57; - }; - const forbiddenNumericSeparatorSiblings = { - decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]), - hex: new Set([46, 88, 95, 120]) - }; - const isAllowedNumericSeparatorSibling = { - bin: ch => ch === 48 || ch === 49, - oct: ch => ch >= 48 && ch <= 55, - dec: ch => ch >= 48 && ch <= 57, - hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102 - }; - function readStringContents(type, input, pos, lineStart, curLine, errors) { - const initialPos = pos; - const initialLineStart = lineStart; - const initialCurLine = curLine; - let out = ""; - let firstInvalidLoc = null; - let chunkStart = pos; - const { - length - } = input; - for (;;) { - if (pos >= length) { - errors.unterminated(initialPos, initialLineStart, initialCurLine); - out += input.slice(chunkStart, pos); - break; - } - const ch = input.charCodeAt(pos); - if (isStringEnd(type, ch, input, pos)) { - out += input.slice(chunkStart, pos); - break; - } - if (ch === 92) { - out += input.slice(chunkStart, pos); - const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors); - if (res.ch === null && !firstInvalidLoc) { - firstInvalidLoc = { - pos, - lineStart, - curLine - }; - } else { - out += res.ch; - } - ({ - pos, - lineStart, - curLine - } = res); - chunkStart = pos; - } else if (ch === 8232 || ch === 8233) { - ++pos; - ++curLine; - lineStart = pos; - } else if (ch === 10 || ch === 13) { - if (type === "template") { - out += input.slice(chunkStart, pos) + "\n"; - ++pos; - if (ch === 13 && input.charCodeAt(pos) === 10) { - ++pos; - } - ++curLine; - chunkStart = lineStart = pos; - } else { - errors.unterminated(initialPos, initialLineStart, initialCurLine); - } - } else { - ++pos; - } - } - return { - pos, - str: out, - firstInvalidLoc, - lineStart, - curLine, - containsInvalid: !!firstInvalidLoc - }; - } - function isStringEnd(type, ch, input, pos) { - if (type === "template") { - return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123; - } - return ch === (type === "double" ? 34 : 39); - } - function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) { - const throwOnInvalid = !inTemplate; - pos++; - const res = ch => ({ - pos, - ch, - lineStart, - curLine - }); - const ch = input.charCodeAt(pos++); - switch (ch) { - case 110: - return res("\n"); - case 114: - return res("\r"); - case 120: - { - let code; - ({ - code, - pos - } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors)); - return res(code === null ? null : String.fromCharCode(code)); - } - case 117: - { - let code; - ({ - code, - pos - } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors)); - return res(code === null ? null : String.fromCodePoint(code)); - } - case 116: - return res("\t"); - case 98: - return res("\b"); - case 118: - return res("\u000b"); - case 102: - return res("\f"); - case 13: - if (input.charCodeAt(pos) === 10) { - ++pos; - } - case 10: - lineStart = pos; - ++curLine; - case 8232: - case 8233: - return res(""); - case 56: - case 57: - if (inTemplate) { - return res(null); - } else { - errors.strictNumericEscape(pos - 1, lineStart, curLine); - } - default: - if (ch >= 48 && ch <= 55) { - const startPos = pos - 1; - const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2)); - let octalStr = match[0]; - let octal = parseInt(octalStr, 8); - if (octal > 255) { - octalStr = octalStr.slice(0, -1); - octal = parseInt(octalStr, 8); - } - pos += octalStr.length - 1; - const next = input.charCodeAt(pos); - if (octalStr !== "0" || next === 56 || next === 57) { - if (inTemplate) { - return res(null); - } else { - errors.strictNumericEscape(startPos, lineStart, curLine); - } - } - return res(String.fromCharCode(octal)); - } - return res(String.fromCharCode(ch)); - } - } - function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) { - const initialPos = pos; - let n; - ({ - n, - pos - } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid)); - if (n === null) { - if (throwOnInvalid) { - errors.invalidEscapeSequence(initialPos, lineStart, curLine); - } else { - pos = initialPos - 1; - } - } - return { - code: n, - pos - }; - } - function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) { - const start = pos; - const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; - const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin; - let invalid = false; - let total = 0; - for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) { - const code = input.charCodeAt(pos); - let val; - if (code === 95 && allowNumSeparator !== "bail") { - const prev = input.charCodeAt(pos - 1); - const next = input.charCodeAt(pos + 1); - if (!allowNumSeparator) { - if (bailOnError) return { - n: null, - pos - }; - errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine); - } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) { - if (bailOnError) return { - n: null, - pos - }; - errors.unexpectedNumericSeparator(pos, lineStart, curLine); - } - ++pos; - continue; - } - if (code >= 97) { - val = code - 97 + 10; - } else if (code >= 65) { - val = code - 65 + 10; - } else if (_isDigit(code)) { - val = code - 48; - } else { - val = Infinity; - } - if (val >= radix) { - if (val <= 9 && bailOnError) { - return { - n: null, - pos - }; - } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) { - val = 0; - } else if (forceLen) { - val = 0; - invalid = true; - } else { - break; - } - } - ++pos; - total = total * radix + val; - } - if (pos === start || len != null && pos - start !== len || invalid) { - return { - n: null, - pos - }; - } - return { - n: total, - pos - }; - } - function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) { - const ch = input.charCodeAt(pos); - let code; - if (ch === 123) { - ++pos; - ({ - code, - pos - } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors)); - ++pos; - if (code !== null && code > 0x10ffff) { - if (throwOnInvalid) { - errors.invalidCodePoint(pos, lineStart, curLine); - } else { - return { - code: null, - pos - }; - } - } - } else { - ({ - code, - pos - } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors)); - } - return { - code, - pos - }; - } - function buildPosition(pos, lineStart, curLine) { - return new Position(curLine, pos - lineStart, pos); - } - const VALID_REGEX_FLAGS = new Set([103, 109, 115, 105, 121, 117, 100, 118]); - class Token { - constructor(state) { - this.type = state.type; - this.value = state.value; - this.start = state.start; - this.end = state.end; - this.loc = new SourceLocation(state.startLoc, state.endLoc); - } - } - class Tokenizer extends CommentsParser { - constructor(options, input) { - super(); - this.isLookahead = void 0; - this.tokens = []; - this.errorHandlers_readInt = { - invalidDigit: (pos, lineStart, curLine, radix) => { - if (!this.options.errorRecovery) return false; - this.raise(Errors.InvalidDigit, buildPosition(pos, lineStart, curLine), { - radix - }); - return true; - }, - numericSeparatorInEscapeSequence: this.errorBuilder(Errors.NumericSeparatorInEscapeSequence), - unexpectedNumericSeparator: this.errorBuilder(Errors.UnexpectedNumericSeparator) - }; - this.errorHandlers_readCodePoint = Object.assign({}, this.errorHandlers_readInt, { - invalidEscapeSequence: this.errorBuilder(Errors.InvalidEscapeSequence), - invalidCodePoint: this.errorBuilder(Errors.InvalidCodePoint) - }); - this.errorHandlers_readStringContents_string = Object.assign({}, this.errorHandlers_readCodePoint, { - strictNumericEscape: (pos, lineStart, curLine) => { - this.recordStrictModeErrors(Errors.StrictNumericEscape, buildPosition(pos, lineStart, curLine)); - }, - unterminated: (pos, lineStart, curLine) => { - throw this.raise(Errors.UnterminatedString, buildPosition(pos - 1, lineStart, curLine)); - } - }); - this.errorHandlers_readStringContents_template = Object.assign({}, this.errorHandlers_readCodePoint, { - strictNumericEscape: this.errorBuilder(Errors.StrictNumericEscape), - unterminated: (pos, lineStart, curLine) => { - throw this.raise(Errors.UnterminatedTemplate, buildPosition(pos, lineStart, curLine)); - } - }); - this.state = new State(); - this.state.init(options); - this.input = input; - this.length = input.length; - this.comments = []; - this.isLookahead = false; - } - pushToken(token) { - this.tokens.length = this.state.tokensLength; - this.tokens.push(token); - ++this.state.tokensLength; - } - next() { - this.checkKeywordEscapes(); - if (this.options.tokens) { - this.pushToken(new Token(this.state)); - } - this.state.lastTokEndLoc = this.state.endLoc; - this.state.lastTokStartLoc = this.state.startLoc; - this.nextToken(); - } - eat(type) { - if (this.match(type)) { - this.next(); - return true; - } else { - return false; - } - } - match(type) { - return this.state.type === type; - } - createLookaheadState(state) { - return { - pos: state.pos, - value: null, - type: state.type, - start: state.start, - end: state.end, - context: [this.curContext()], - inType: state.inType, - startLoc: state.startLoc, - lastTokEndLoc: state.lastTokEndLoc, - curLine: state.curLine, - lineStart: state.lineStart, - curPosition: state.curPosition - }; - } - lookahead() { - const old = this.state; - this.state = this.createLookaheadState(old); - this.isLookahead = true; - this.nextToken(); - this.isLookahead = false; - const curr = this.state; - this.state = old; - return curr; - } - nextTokenStart() { - return this.nextTokenStartSince(this.state.pos); - } - nextTokenStartSince(pos) { - skipWhiteSpace.lastIndex = pos; - return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos; - } - lookaheadCharCode() { - return this.input.charCodeAt(this.nextTokenStart()); - } - nextTokenInLineStart() { - return this.nextTokenInLineStartSince(this.state.pos); - } - nextTokenInLineStartSince(pos) { - skipWhiteSpaceInLine.lastIndex = pos; - return skipWhiteSpaceInLine.test(this.input) ? skipWhiteSpaceInLine.lastIndex : pos; - } - lookaheadInLineCharCode() { - return this.input.charCodeAt(this.nextTokenInLineStart()); - } - codePointAtPos(pos) { - let cp = this.input.charCodeAt(pos); - if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) { - const trail = this.input.charCodeAt(pos); - if ((trail & 0xfc00) === 0xdc00) { - cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff); - } - } - return cp; - } - setStrict(strict) { - this.state.strict = strict; - if (strict) { - this.state.strictErrors.forEach(([toParseError, at]) => this.raise(toParseError, at)); - this.state.strictErrors.clear(); - } - } - curContext() { - return this.state.context[this.state.context.length - 1]; - } - nextToken() { - this.skipSpace(); - this.state.start = this.state.pos; - if (!this.isLookahead) this.state.startLoc = this.state.curPosition(); - if (this.state.pos >= this.length) { - this.finishToken(139); - return; - } - this.getTokenFromCode(this.codePointAtPos(this.state.pos)); - } - skipBlockComment(commentEnd) { - let startLoc; - if (!this.isLookahead) startLoc = this.state.curPosition(); - const start = this.state.pos; - const end = this.input.indexOf(commentEnd, start + 2); - if (end === -1) { - throw this.raise(Errors.UnterminatedComment, this.state.curPosition()); - } - this.state.pos = end + commentEnd.length; - lineBreakG.lastIndex = start + 2; - while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) { - ++this.state.curLine; - this.state.lineStart = lineBreakG.lastIndex; - } - if (this.isLookahead) return; - const comment = { - type: "CommentBlock", - value: this.input.slice(start + 2, end), - start, - end: end + commentEnd.length, - loc: new SourceLocation(startLoc, this.state.curPosition()) - }; - if (this.options.tokens) this.pushToken(comment); - return comment; - } - skipLineComment(startSkip) { - const start = this.state.pos; - let startLoc; - if (!this.isLookahead) startLoc = this.state.curPosition(); - let ch = this.input.charCodeAt(this.state.pos += startSkip); - if (this.state.pos < this.length) { - while (!isNewLine(ch) && ++this.state.pos < this.length) { - ch = this.input.charCodeAt(this.state.pos); - } - } - if (this.isLookahead) return; - const end = this.state.pos; - const value = this.input.slice(start + startSkip, end); - const comment = { - type: "CommentLine", - value, - start, - end, - loc: new SourceLocation(startLoc, this.state.curPosition()) - }; - if (this.options.tokens) this.pushToken(comment); - return comment; - } - skipSpace() { - const spaceStart = this.state.pos; - const comments = []; - loop: while (this.state.pos < this.length) { - const ch = this.input.charCodeAt(this.state.pos); - switch (ch) { - case 32: - case 160: - case 9: - ++this.state.pos; - break; - case 13: - if (this.input.charCodeAt(this.state.pos + 1) === 10) { - ++this.state.pos; - } - case 10: - case 8232: - case 8233: - ++this.state.pos; - ++this.state.curLine; - this.state.lineStart = this.state.pos; - break; - case 47: - switch (this.input.charCodeAt(this.state.pos + 1)) { - case 42: - { - const comment = this.skipBlockComment("*/"); - if (comment !== undefined) { - this.addComment(comment); - if (this.options.attachComment) comments.push(comment); - } - break; - } - case 47: - { - const comment = this.skipLineComment(2); - if (comment !== undefined) { - this.addComment(comment); - if (this.options.attachComment) comments.push(comment); - } - break; - } - default: - break loop; - } - break; - default: - if (isWhitespace(ch)) { - ++this.state.pos; - } else if (ch === 45 && !this.inModule && this.options.annexB) { - const pos = this.state.pos; - if (this.input.charCodeAt(pos + 1) === 45 && this.input.charCodeAt(pos + 2) === 62 && (spaceStart === 0 || this.state.lineStart > spaceStart)) { - const comment = this.skipLineComment(3); - if (comment !== undefined) { - this.addComment(comment); - if (this.options.attachComment) comments.push(comment); - } - } else { - break loop; - } - } else if (ch === 60 && !this.inModule && this.options.annexB) { - const pos = this.state.pos; - if (this.input.charCodeAt(pos + 1) === 33 && this.input.charCodeAt(pos + 2) === 45 && this.input.charCodeAt(pos + 3) === 45) { - const comment = this.skipLineComment(4); - if (comment !== undefined) { - this.addComment(comment); - if (this.options.attachComment) comments.push(comment); - } - } else { - break loop; - } - } else { - break loop; - } - } - } - if (comments.length > 0) { - const end = this.state.pos; - const commentWhitespace = { - start: spaceStart, - end, - comments, - leadingNode: null, - trailingNode: null, - containingNode: null - }; - this.state.commentStack.push(commentWhitespace); - } - } - finishToken(type, val) { - this.state.end = this.state.pos; - this.state.endLoc = this.state.curPosition(); - const prevType = this.state.type; - this.state.type = type; - this.state.value = val; - if (!this.isLookahead) { - this.updateContext(prevType); - } - } - replaceToken(type) { - this.state.type = type; - this.updateContext(); - } - readToken_numberSign() { - if (this.state.pos === 0 && this.readToken_interpreter()) { - return; - } - const nextPos = this.state.pos + 1; - const next = this.codePointAtPos(nextPos); - if (next >= 48 && next <= 57) { - throw this.raise(Errors.UnexpectedDigitAfterHash, this.state.curPosition()); - } - if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) { - this.expectPlugin("recordAndTuple"); - if (this.getPluginOption("recordAndTuple", "syntaxType") === "bar") { - throw this.raise(next === 123 ? Errors.RecordExpressionHashIncorrectStartSyntaxType : Errors.TupleExpressionHashIncorrectStartSyntaxType, this.state.curPosition()); - } - this.state.pos += 2; - if (next === 123) { - this.finishToken(7); - } else { - this.finishToken(1); - } - } else if (isIdentifierStart(next)) { - ++this.state.pos; - this.finishToken(138, this.readWord1(next)); - } else if (next === 92) { - ++this.state.pos; - this.finishToken(138, this.readWord1()); - } else { - this.finishOp(27, 1); - } - } - readToken_dot() { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next >= 48 && next <= 57) { - this.readNumber(true); - return; - } - if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) { - this.state.pos += 3; - this.finishToken(21); - } else { - ++this.state.pos; - this.finishToken(16); - } - } - readToken_slash() { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 61) { - this.finishOp(31, 2); - } else { - this.finishOp(56, 1); - } - } - readToken_interpreter() { - if (this.state.pos !== 0 || this.length < 2) return false; - let ch = this.input.charCodeAt(this.state.pos + 1); - if (ch !== 33) return false; - const start = this.state.pos; - this.state.pos += 1; - while (!isNewLine(ch) && ++this.state.pos < this.length) { - ch = this.input.charCodeAt(this.state.pos); - } - const value = this.input.slice(start + 2, this.state.pos); - this.finishToken(28, value); - return true; - } - readToken_mult_modulo(code) { - let type = code === 42 ? 55 : 54; - let width = 1; - let next = this.input.charCodeAt(this.state.pos + 1); - if (code === 42 && next === 42) { - width++; - next = this.input.charCodeAt(this.state.pos + 2); - type = 57; - } - if (next === 61 && !this.state.inType) { - width++; - type = code === 37 ? 33 : 30; - } - this.finishOp(type, width); - } - readToken_pipe_amp(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === code) { - if (this.input.charCodeAt(this.state.pos + 2) === 61) { - this.finishOp(30, 3); - } else { - this.finishOp(code === 124 ? 41 : 42, 2); - } - return; - } - if (code === 124) { - if (next === 62) { - this.finishOp(39, 2); - return; - } - if (this.hasPlugin("recordAndTuple") && next === 125) { - if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { - throw this.raise(Errors.RecordExpressionBarIncorrectEndSyntaxType, this.state.curPosition()); - } - this.state.pos += 2; - this.finishToken(9); - return; - } - if (this.hasPlugin("recordAndTuple") && next === 93) { - if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { - throw this.raise(Errors.TupleExpressionBarIncorrectEndSyntaxType, this.state.curPosition()); - } - this.state.pos += 2; - this.finishToken(4); - return; - } - } - if (next === 61) { - this.finishOp(30, 2); - return; - } - this.finishOp(code === 124 ? 43 : 45, 1); - } - readToken_caret() { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 61 && !this.state.inType) { - this.finishOp(32, 2); - } else if (next === 94 && this.hasPlugin(["pipelineOperator", { - proposal: "hack", - topicToken: "^^" - }])) { - this.finishOp(37, 2); - const lookaheadCh = this.input.codePointAt(this.state.pos); - if (lookaheadCh === 94) { - this.unexpected(); - } - } else { - this.finishOp(44, 1); - } - } - readToken_atSign() { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 64 && this.hasPlugin(["pipelineOperator", { - proposal: "hack", - topicToken: "@@" - }])) { - this.finishOp(38, 2); - } else { - this.finishOp(26, 1); - } - } - readToken_plus_min(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === code) { - this.finishOp(34, 2); - return; - } - if (next === 61) { - this.finishOp(30, 2); - } else { - this.finishOp(53, 1); - } - } - readToken_lt() { - const { - pos - } = this.state; - const next = this.input.charCodeAt(pos + 1); - if (next === 60) { - if (this.input.charCodeAt(pos + 2) === 61) { - this.finishOp(30, 3); - return; - } - this.finishOp(51, 2); - return; - } - if (next === 61) { - this.finishOp(49, 2); - return; - } - this.finishOp(47, 1); - } - readToken_gt() { - const { - pos - } = this.state; - const next = this.input.charCodeAt(pos + 1); - if (next === 62) { - const size = this.input.charCodeAt(pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(pos + size) === 61) { - this.finishOp(30, size + 1); - return; - } - this.finishOp(52, size); - return; - } - if (next === 61) { - this.finishOp(49, 2); - return; - } - this.finishOp(48, 1); - } - readToken_eq_excl(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 61) { - this.finishOp(46, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); - return; - } - if (code === 61 && next === 62) { - this.state.pos += 2; - this.finishToken(19); - return; - } - this.finishOp(code === 61 ? 29 : 35, 1); - } - readToken_question() { - const next = this.input.charCodeAt(this.state.pos + 1); - const next2 = this.input.charCodeAt(this.state.pos + 2); - if (next === 63) { - if (next2 === 61) { - this.finishOp(30, 3); - } else { - this.finishOp(40, 2); - } - } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { - this.state.pos += 2; - this.finishToken(18); - } else { - ++this.state.pos; - this.finishToken(17); - } - } - getTokenFromCode(code) { - switch (code) { - case 46: - this.readToken_dot(); - return; - case 40: - ++this.state.pos; - this.finishToken(10); - return; - case 41: - ++this.state.pos; - this.finishToken(11); - return; - case 59: - ++this.state.pos; - this.finishToken(13); - return; - case 44: - ++this.state.pos; - this.finishToken(12); - return; - case 91: - if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) { - if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { - throw this.raise(Errors.TupleExpressionBarIncorrectStartSyntaxType, this.state.curPosition()); - } - this.state.pos += 2; - this.finishToken(2); - } else { - ++this.state.pos; - this.finishToken(0); - } - return; - case 93: - ++this.state.pos; - this.finishToken(3); - return; - case 123: - if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) { - if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { - throw this.raise(Errors.RecordExpressionBarIncorrectStartSyntaxType, this.state.curPosition()); - } - this.state.pos += 2; - this.finishToken(6); - } else { - ++this.state.pos; - this.finishToken(5); - } - return; - case 125: - ++this.state.pos; - this.finishToken(8); - return; - case 58: - if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { - this.finishOp(15, 2); - } else { - ++this.state.pos; - this.finishToken(14); - } - return; - case 63: - this.readToken_question(); - return; - case 96: - this.readTemplateToken(); - return; - case 48: - { - const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 120 || next === 88) { - this.readRadixNumber(16); - return; - } - if (next === 111 || next === 79) { - this.readRadixNumber(8); - return; - } - if (next === 98 || next === 66) { - this.readRadixNumber(2); - return; - } - } - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - this.readNumber(false); - return; - case 34: - case 39: - this.readString(code); - return; - case 47: - this.readToken_slash(); - return; - case 37: - case 42: - this.readToken_mult_modulo(code); - return; - case 124: - case 38: - this.readToken_pipe_amp(code); - return; - case 94: - this.readToken_caret(); - return; - case 43: - case 45: - this.readToken_plus_min(code); - return; - case 60: - this.readToken_lt(); - return; - case 62: - this.readToken_gt(); - return; - case 61: - case 33: - this.readToken_eq_excl(code); - return; - case 126: - this.finishOp(36, 1); - return; - case 64: - this.readToken_atSign(); - return; - case 35: - this.readToken_numberSign(); - return; - case 92: - this.readWord(); - return; - default: - if (isIdentifierStart(code)) { - this.readWord(code); - return; - } - } - throw this.raise(Errors.InvalidOrUnexpectedToken, this.state.curPosition(), { - unexpected: String.fromCodePoint(code) - }); - } - finishOp(type, size) { - const str = this.input.slice(this.state.pos, this.state.pos + size); - this.state.pos += size; - this.finishToken(type, str); - } - readRegexp() { - const startLoc = this.state.startLoc; - const start = this.state.start + 1; - let escaped, inClass; - let { - pos - } = this.state; - for (;; ++pos) { - if (pos >= this.length) { - throw this.raise(Errors.UnterminatedRegExp, createPositionWithColumnOffset(startLoc, 1)); - } - const ch = this.input.charCodeAt(pos); - if (isNewLine(ch)) { - throw this.raise(Errors.UnterminatedRegExp, createPositionWithColumnOffset(startLoc, 1)); - } - if (escaped) { - escaped = false; - } else { - if (ch === 91) { - inClass = true; - } else if (ch === 93 && inClass) { - inClass = false; - } else if (ch === 47 && !inClass) { - break; - } - escaped = ch === 92; - } - } - const content = this.input.slice(start, pos); - ++pos; - let mods = ""; - const nextPos = () => createPositionWithColumnOffset(startLoc, pos + 2 - start); - while (pos < this.length) { - const cp = this.codePointAtPos(pos); - const char = String.fromCharCode(cp); - if (VALID_REGEX_FLAGS.has(cp)) { - if (cp === 118) { - if (mods.includes("u")) { - this.raise(Errors.IncompatibleRegExpUVFlags, nextPos()); - } - } else if (cp === 117) { - if (mods.includes("v")) { - this.raise(Errors.IncompatibleRegExpUVFlags, nextPos()); - } - } - if (mods.includes(char)) { - this.raise(Errors.DuplicateRegExpFlags, nextPos()); - } - } else if (isIdentifierChar(cp) || cp === 92) { - this.raise(Errors.MalformedRegExpFlags, nextPos()); - } else { - break; - } - ++pos; - mods += char; - } - this.state.pos = pos; - this.finishToken(137, { - pattern: content, - flags: mods - }); - } - readInt(radix, len, forceLen = false, allowNumSeparator = true) { - const { - n, - pos - } = readInt(this.input, this.state.pos, this.state.lineStart, this.state.curLine, radix, len, forceLen, allowNumSeparator, this.errorHandlers_readInt, false); - this.state.pos = pos; - return n; - } - readRadixNumber(radix) { - const startLoc = this.state.curPosition(); - let isBigInt = false; - this.state.pos += 2; - const val = this.readInt(radix); - if (val == null) { - this.raise(Errors.InvalidDigit, createPositionWithColumnOffset(startLoc, 2), { - radix - }); - } - const next = this.input.charCodeAt(this.state.pos); - if (next === 110) { - ++this.state.pos; - isBigInt = true; - } else if (next === 109) { - throw this.raise(Errors.InvalidDecimal, startLoc); - } - if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { - throw this.raise(Errors.NumberIdentifier, this.state.curPosition()); - } - if (isBigInt) { - const str = this.input.slice(startLoc.index, this.state.pos).replace(/[_n]/g, ""); - this.finishToken(135, str); - return; - } - this.finishToken(134, val); - } - readNumber(startsWithDot) { - const start = this.state.pos; - const startLoc = this.state.curPosition(); - let isFloat = false; - let isBigInt = false; - let isDecimal = false; - let hasExponent = false; - let isOctal = false; - if (!startsWithDot && this.readInt(10) === null) { - this.raise(Errors.InvalidNumber, this.state.curPosition()); - } - const hasLeadingZero = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48; - if (hasLeadingZero) { - const integer = this.input.slice(start, this.state.pos); - this.recordStrictModeErrors(Errors.StrictOctalLiteral, startLoc); - if (!this.state.strict) { - const underscorePos = integer.indexOf("_"); - if (underscorePos > 0) { - this.raise(Errors.ZeroDigitNumericSeparator, createPositionWithColumnOffset(startLoc, underscorePos)); - } - } - isOctal = hasLeadingZero && !/[89]/.test(integer); - } - let next = this.input.charCodeAt(this.state.pos); - if (next === 46 && !isOctal) { - ++this.state.pos; - this.readInt(10); - isFloat = true; - next = this.input.charCodeAt(this.state.pos); - } - if ((next === 69 || next === 101) && !isOctal) { - next = this.input.charCodeAt(++this.state.pos); - if (next === 43 || next === 45) { - ++this.state.pos; - } - if (this.readInt(10) === null) { - this.raise(Errors.InvalidOrMissingExponent, startLoc); - } - isFloat = true; - hasExponent = true; - next = this.input.charCodeAt(this.state.pos); - } - if (next === 110) { - if (isFloat || hasLeadingZero) { - this.raise(Errors.InvalidBigIntLiteral, startLoc); - } - ++this.state.pos; - isBigInt = true; - } - if (next === 109) { - this.expectPlugin("decimal", this.state.curPosition()); - if (hasExponent || hasLeadingZero) { - this.raise(Errors.InvalidDecimal, startLoc); - } - ++this.state.pos; - isDecimal = true; - } - if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { - throw this.raise(Errors.NumberIdentifier, this.state.curPosition()); - } - const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, ""); - if (isBigInt) { - this.finishToken(135, str); - return; - } - if (isDecimal) { - this.finishToken(136, str); - return; - } - const val = isOctal ? parseInt(str, 8) : parseFloat(str); - this.finishToken(134, val); - } - readCodePoint(throwOnInvalid) { - const { - code, - pos - } = readCodePoint(this.input, this.state.pos, this.state.lineStart, this.state.curLine, throwOnInvalid, this.errorHandlers_readCodePoint); - this.state.pos = pos; - return code; - } - readString(quote) { - const { - str, - pos, - curLine, - lineStart - } = readStringContents(quote === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string); - this.state.pos = pos + 1; - this.state.lineStart = lineStart; - this.state.curLine = curLine; - this.finishToken(133, str); - } - readTemplateContinuation() { - if (!this.match(8)) { - this.unexpected(null, 8); - } - this.state.pos--; - this.readTemplateToken(); - } - readTemplateToken() { - const opening = this.input[this.state.pos]; - const { - str, - firstInvalidLoc, - pos, - curLine, - lineStart - } = readStringContents("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template); - this.state.pos = pos + 1; - this.state.lineStart = lineStart; - this.state.curLine = curLine; - if (firstInvalidLoc) { - this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, firstInvalidLoc.pos); - } - if (this.input.codePointAt(pos) === 96) { - this.finishToken(24, firstInvalidLoc ? null : opening + str + "`"); - } else { - this.state.pos++; - this.finishToken(25, firstInvalidLoc ? null : opening + str + "${"); - } - } - recordStrictModeErrors(toParseError, at) { - const index = at.index; - if (this.state.strict && !this.state.strictErrors.has(index)) { - this.raise(toParseError, at); - } else { - this.state.strictErrors.set(index, [toParseError, at]); - } - } - readWord1(firstCode) { - this.state.containsEsc = false; - let word = ""; - const start = this.state.pos; - let chunkStart = this.state.pos; - if (firstCode !== undefined) { - this.state.pos += firstCode <= 0xffff ? 1 : 2; - } - while (this.state.pos < this.length) { - const ch = this.codePointAtPos(this.state.pos); - if (isIdentifierChar(ch)) { - this.state.pos += ch <= 0xffff ? 1 : 2; - } else if (ch === 92) { - this.state.containsEsc = true; - word += this.input.slice(chunkStart, this.state.pos); - const escStart = this.state.curPosition(); - const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar; - if (this.input.charCodeAt(++this.state.pos) !== 117) { - this.raise(Errors.MissingUnicodeEscape, this.state.curPosition()); - chunkStart = this.state.pos - 1; - continue; - } - ++this.state.pos; - const esc = this.readCodePoint(true); - if (esc !== null) { - if (!identifierCheck(esc)) { - this.raise(Errors.EscapedCharNotAnIdentifier, escStart); - } - word += String.fromCodePoint(esc); - } - chunkStart = this.state.pos; - } else { - break; - } - } - return word + this.input.slice(chunkStart, this.state.pos); - } - readWord(firstCode) { - const word = this.readWord1(firstCode); - const type = keywords$1.get(word); - if (type !== undefined) { - this.finishToken(type, tokenLabelName(type)); - } else { - this.finishToken(132, word); - } - } - checkKeywordEscapes() { - const { - type - } = this.state; - if (tokenIsKeyword(type) && this.state.containsEsc) { - this.raise(Errors.InvalidEscapedReservedWord, this.state.startLoc, { - reservedWord: tokenLabelName(type) - }); - } - } - raise(toParseError, at, details = {}) { - const loc = at instanceof Position ? at : at.loc.start; - const error = toParseError(loc, details); - if (!this.options.errorRecovery) throw error; - if (!this.isLookahead) this.state.errors.push(error); - return error; - } - raiseOverwrite(toParseError, at, details = {}) { - const loc = at instanceof Position ? at : at.loc.start; - const pos = loc.index; - const errors = this.state.errors; - for (let i = errors.length - 1; i >= 0; i--) { - const error = errors[i]; - if (error.loc.index === pos) { - return errors[i] = toParseError(loc, details); - } - if (error.loc.index < pos) break; - } - return this.raise(toParseError, at, details); - } - updateContext(prevType) {} - unexpected(loc, type) { - throw this.raise(Errors.UnexpectedToken, loc != null ? loc : this.state.startLoc, { - expected: type ? tokenLabelName(type) : null - }); - } - expectPlugin(pluginName, loc) { - if (this.hasPlugin(pluginName)) { - return true; - } - throw this.raise(Errors.MissingPlugin, loc != null ? loc : this.state.startLoc, { - missingPlugin: [pluginName] - }); - } - expectOnePlugin(pluginNames) { - if (!pluginNames.some(name => this.hasPlugin(name))) { - throw this.raise(Errors.MissingOneOfPlugins, this.state.startLoc, { - missingPlugin: pluginNames - }); - } - } - errorBuilder(error) { - return (pos, lineStart, curLine) => { - this.raise(error, buildPosition(pos, lineStart, curLine)); - }; - } - } - class ClassScope { - constructor() { - this.privateNames = new Set(); - this.loneAccessors = new Map(); - this.undefinedPrivateNames = new Map(); - } - } - class ClassScopeHandler { - constructor(parser) { - this.parser = void 0; - this.stack = []; - this.undefinedPrivateNames = new Map(); - this.parser = parser; - } - current() { - return this.stack[this.stack.length - 1]; - } - enter() { - this.stack.push(new ClassScope()); - } - exit() { - const oldClassScope = this.stack.pop(); - const current = this.current(); - for (const [name, loc] of Array.from(oldClassScope.undefinedPrivateNames)) { - if (current) { - if (!current.undefinedPrivateNames.has(name)) { - current.undefinedPrivateNames.set(name, loc); - } - } else { - this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, { - identifierName: name - }); - } - } - } - declarePrivateName(name, elementType, loc) { - const { - privateNames, - loneAccessors, - undefinedPrivateNames - } = this.current(); - let redefined = privateNames.has(name); - if (elementType & 3) { - const accessor = redefined && loneAccessors.get(name); - if (accessor) { - const oldStatic = accessor & 4; - const newStatic = elementType & 4; - const oldKind = accessor & 3; - const newKind = elementType & 3; - redefined = oldKind === newKind || oldStatic !== newStatic; - if (!redefined) loneAccessors.delete(name); - } else if (!redefined) { - loneAccessors.set(name, elementType); - } - } - if (redefined) { - this.parser.raise(Errors.PrivateNameRedeclaration, loc, { - identifierName: name - }); - } - privateNames.add(name); - undefinedPrivateNames.delete(name); - } - usePrivateName(name, loc) { - let classScope; - for (classScope of this.stack) { - if (classScope.privateNames.has(name)) return; - } - if (classScope) { - classScope.undefinedPrivateNames.set(name, loc); - } else { - this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, { - identifierName: name - }); - } - } - } - class ExpressionScope { - constructor(type = 0) { - this.type = type; - } - canBeArrowParameterDeclaration() { - return this.type === 2 || this.type === 1; - } - isCertainlyParameterDeclaration() { - return this.type === 3; - } - } - class ArrowHeadParsingScope extends ExpressionScope { - constructor(type) { - super(type); - this.declarationErrors = new Map(); - } - recordDeclarationError(ParsingErrorClass, at) { - const index = at.index; - this.declarationErrors.set(index, [ParsingErrorClass, at]); - } - clearDeclarationError(index) { - this.declarationErrors.delete(index); - } - iterateErrors(iterator) { - this.declarationErrors.forEach(iterator); - } - } - class ExpressionScopeHandler { - constructor(parser) { - this.parser = void 0; - this.stack = [new ExpressionScope()]; - this.parser = parser; - } - enter(scope) { - this.stack.push(scope); - } - exit() { - this.stack.pop(); - } - recordParameterInitializerError(toParseError, node) { - const origin = node.loc.start; - const { - stack - } = this; - let i = stack.length - 1; - let scope = stack[i]; - while (!scope.isCertainlyParameterDeclaration()) { - if (scope.canBeArrowParameterDeclaration()) { - scope.recordDeclarationError(toParseError, origin); - } else { - return; - } - scope = stack[--i]; - } - this.parser.raise(toParseError, origin); - } - recordArrowParameterBindingError(error, node) { - const { - stack - } = this; - const scope = stack[stack.length - 1]; - const origin = node.loc.start; - if (scope.isCertainlyParameterDeclaration()) { - this.parser.raise(error, origin); - } else if (scope.canBeArrowParameterDeclaration()) { - scope.recordDeclarationError(error, origin); - } else { - return; - } - } - recordAsyncArrowParametersError(at) { - const { - stack - } = this; - let i = stack.length - 1; - let scope = stack[i]; - while (scope.canBeArrowParameterDeclaration()) { - if (scope.type === 2) { - scope.recordDeclarationError(Errors.AwaitBindingIdentifier, at); - } - scope = stack[--i]; - } - } - validateAsPattern() { - const { - stack - } = this; - const currentScope = stack[stack.length - 1]; - if (!currentScope.canBeArrowParameterDeclaration()) return; - currentScope.iterateErrors(([toParseError, loc]) => { - this.parser.raise(toParseError, loc); - let i = stack.length - 2; - let scope = stack[i]; - while (scope.canBeArrowParameterDeclaration()) { - scope.clearDeclarationError(loc.index); - scope = stack[--i]; - } - }); - } - } - function newParameterDeclarationScope() { - return new ExpressionScope(3); - } - function newArrowHeadScope() { - return new ArrowHeadParsingScope(1); - } - function newAsyncArrowScope() { - return new ArrowHeadParsingScope(2); - } - function newExpressionScope() { - return new ExpressionScope(); - } - class ProductionParameterHandler { - constructor() { - this.stacks = []; - } - enter(flags) { - this.stacks.push(flags); - } - exit() { - this.stacks.pop(); - } - currentFlags() { - return this.stacks[this.stacks.length - 1]; - } - get hasAwait() { - return (this.currentFlags() & 2) > 0; - } - get hasYield() { - return (this.currentFlags() & 1) > 0; - } - get hasReturn() { - return (this.currentFlags() & 4) > 0; - } - get hasIn() { - return (this.currentFlags() & 8) > 0; - } - } - function functionFlags(isAsync, isGenerator) { - return (isAsync ? 2 : 0) | (isGenerator ? 1 : 0); - } - class UtilParser extends Tokenizer { - addExtra(node, key, value, enumerable = true) { - if (!node) return; - let { - extra - } = node; - if (extra == null) { - extra = {}; - node.extra = extra; - } - if (enumerable) { - extra[key] = value; - } else { - Object.defineProperty(extra, key, { - enumerable, - value - }); - } - } - isContextual(token) { - return this.state.type === token && !this.state.containsEsc; - } - isUnparsedContextual(nameStart, name) { - const nameEnd = nameStart + name.length; - if (this.input.slice(nameStart, nameEnd) === name) { - const nextCh = this.input.charCodeAt(nameEnd); - return !(isIdentifierChar(nextCh) || (nextCh & 0xfc00) === 0xd800); - } - return false; - } - isLookaheadContextual(name) { - const next = this.nextTokenStart(); - return this.isUnparsedContextual(next, name); - } - eatContextual(token) { - if (this.isContextual(token)) { - this.next(); - return true; - } - return false; - } - expectContextual(token, toParseError) { - if (!this.eatContextual(token)) { - if (toParseError != null) { - throw this.raise(toParseError, this.state.startLoc); - } - this.unexpected(null, token); - } - } - canInsertSemicolon() { - return this.match(139) || this.match(8) || this.hasPrecedingLineBreak(); - } - hasPrecedingLineBreak() { - return hasNewLine(this.input, this.state.lastTokEndLoc.index, this.state.start); - } - hasFollowingLineBreak() { - return hasNewLine(this.input, this.state.end, this.nextTokenStart()); - } - isLineTerminator() { - return this.eat(13) || this.canInsertSemicolon(); - } - semicolon(allowAsi = true) { - if (allowAsi ? this.isLineTerminator() : this.eat(13)) return; - this.raise(Errors.MissingSemicolon, this.state.lastTokEndLoc); - } - expect(type, loc) { - if (!this.eat(type)) { - this.unexpected(loc, type); - } - } - tryParse(fn, oldState = this.state.clone()) { - const abortSignal = { - node: null - }; - try { - const node = fn((node = null) => { - abortSignal.node = node; - throw abortSignal; - }); - if (this.state.errors.length > oldState.errors.length) { - const failState = this.state; - this.state = oldState; - this.state.tokensLength = failState.tokensLength; - return { - node, - error: failState.errors[oldState.errors.length], - thrown: false, - aborted: false, - failState - }; - } - return { - node, - error: null, - thrown: false, - aborted: false, - failState: null - }; - } catch (error) { - const failState = this.state; - this.state = oldState; - if (error instanceof SyntaxError) { - return { - node: null, - error, - thrown: true, - aborted: false, - failState - }; - } - if (error === abortSignal) { - return { - node: abortSignal.node, - error: null, - thrown: false, - aborted: true, - failState - }; - } - throw error; - } - } - checkExpressionErrors(refExpressionErrors, andThrow) { - if (!refExpressionErrors) return false; - const { - shorthandAssignLoc, - doubleProtoLoc, - privateKeyLoc, - optionalParametersLoc - } = refExpressionErrors; - const hasErrors = !!shorthandAssignLoc || !!doubleProtoLoc || !!optionalParametersLoc || !!privateKeyLoc; - if (!andThrow) { - return hasErrors; - } - if (shorthandAssignLoc != null) { - this.raise(Errors.InvalidCoverInitializedName, shorthandAssignLoc); - } - if (doubleProtoLoc != null) { - this.raise(Errors.DuplicateProto, doubleProtoLoc); - } - if (privateKeyLoc != null) { - this.raise(Errors.UnexpectedPrivateField, privateKeyLoc); - } - if (optionalParametersLoc != null) { - this.unexpected(optionalParametersLoc); - } - } - isLiteralPropertyName() { - return tokenIsLiteralPropertyName(this.state.type); - } - isPrivateName(node) { - return node.type === "PrivateName"; - } - getPrivateNameSV(node) { - return node.id.name; - } - hasPropertyAsPrivateName(node) { - return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property); - } - isObjectProperty(node) { - return node.type === "ObjectProperty"; - } - isObjectMethod(node) { - return node.type === "ObjectMethod"; - } - initializeScopes(inModule = this.options.sourceType === "module") { - const oldLabels = this.state.labels; - this.state.labels = []; - const oldExportedIdentifiers = this.exportedIdentifiers; - this.exportedIdentifiers = new Set(); - const oldInModule = this.inModule; - this.inModule = inModule; - const oldScope = this.scope; - const ScopeHandler = this.getScopeHandler(); - this.scope = new ScopeHandler(this, inModule); - const oldProdParam = this.prodParam; - this.prodParam = new ProductionParameterHandler(); - const oldClassScope = this.classScope; - this.classScope = new ClassScopeHandler(this); - const oldExpressionScope = this.expressionScope; - this.expressionScope = new ExpressionScopeHandler(this); - return () => { - this.state.labels = oldLabels; - this.exportedIdentifiers = oldExportedIdentifiers; - this.inModule = oldInModule; - this.scope = oldScope; - this.prodParam = oldProdParam; - this.classScope = oldClassScope; - this.expressionScope = oldExpressionScope; - }; - } - enterInitialScopes() { - let paramFlags = 0; - if (this.inModule) { - paramFlags |= 2; - } - this.scope.enter(1); - this.prodParam.enter(paramFlags); - } - checkDestructuringPrivate(refExpressionErrors) { - const { - privateKeyLoc - } = refExpressionErrors; - if (privateKeyLoc !== null) { - this.expectPlugin("destructuringPrivate", privateKeyLoc); - } - } - } - class ExpressionErrors { - constructor() { - this.shorthandAssignLoc = null; - this.doubleProtoLoc = null; - this.privateKeyLoc = null; - this.optionalParametersLoc = null; - } - } - class Node { - constructor(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - this.loc = new SourceLocation(loc); - if (parser != null && parser.options.ranges) this.range = [pos, 0]; - if (parser != null && parser.filename) this.loc.filename = parser.filename; - } - } - const NodePrototype = Node.prototype; - { - NodePrototype.__clone = function () { - const newNode = new Node(undefined, this.start, this.loc.start); - const keys = Object.keys(this); - for (let i = 0, length = keys.length; i < length; i++) { - const key = keys[i]; - if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") { - newNode[key] = this[key]; - } - } - return newNode; - }; - } - function clonePlaceholder(node) { - return cloneIdentifier(node); - } - function cloneIdentifier(node) { - const { - type, - start, - end, - loc, - range, - extra, - name - } = node; - const cloned = Object.create(NodePrototype); - cloned.type = type; - cloned.start = start; - cloned.end = end; - cloned.loc = loc; - cloned.range = range; - cloned.extra = extra; - cloned.name = name; - if (type === "Placeholder") { - cloned.expectedNode = node.expectedNode; - } - return cloned; - } - function cloneStringLiteral(node) { - const { - type, - start, - end, - loc, - range, - extra - } = node; - if (type === "Placeholder") { - return clonePlaceholder(node); - } - const cloned = Object.create(NodePrototype); - cloned.type = type; - cloned.start = start; - cloned.end = end; - cloned.loc = loc; - cloned.range = range; - if (node.raw !== undefined) { - cloned.raw = node.raw; - } else { - cloned.extra = extra; - } - cloned.value = node.value; - return cloned; - } - class NodeUtils extends UtilParser { - startNode() { - const loc = this.state.startLoc; - return new Node(this, loc.index, loc); - } - startNodeAt(loc) { - return new Node(this, loc.index, loc); - } - startNodeAtNode(type) { - return this.startNodeAt(type.loc.start); - } - finishNode(node, type) { - return this.finishNodeAt(node, type, this.state.lastTokEndLoc); - } - finishNodeAt(node, type, endLoc) { - node.type = type; - node.end = endLoc.index; - node.loc.end = endLoc; - if (this.options.ranges) node.range[1] = endLoc.index; - if (this.options.attachComment) this.processComment(node); - return node; - } - resetStartLocation(node, startLoc) { - node.start = startLoc.index; - node.loc.start = startLoc; - if (this.options.ranges) node.range[0] = startLoc.index; - } - resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { - node.end = endLoc.index; - node.loc.end = endLoc; - if (this.options.ranges) node.range[1] = endLoc.index; - } - resetStartLocationFromNode(node, locationNode) { - this.resetStartLocation(node, locationNode.loc.start); - } - } - const reservedTypes = new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]); - const FlowErrors = ParseErrorEnum`flow`({ - AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.", - AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.", - AssignReservedType: ({ - reservedType - }) => `Cannot overwrite reserved type ${reservedType}.`, - DeclareClassElement: "The `declare` modifier can only appear on class fields.", - DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.", - DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.", - EnumBooleanMemberNotInitialized: ({ - memberName, - enumName - }) => `Boolean enum members need to be initialized. Use either \`${memberName} = true,\` or \`${memberName} = false,\` in enum \`${enumName}\`.`, - EnumDuplicateMemberName: ({ - memberName, - enumName - }) => `Enum member names need to be unique, but the name \`${memberName}\` has already been used before in enum \`${enumName}\`.`, - EnumInconsistentMemberValues: ({ - enumName - }) => `Enum \`${enumName}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`, - EnumInvalidExplicitType: ({ - invalidEnumType, - enumName - }) => `Enum type \`${invalidEnumType}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`, - EnumInvalidExplicitTypeUnknownSupplied: ({ - enumName - }) => `Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`, - EnumInvalidMemberInitializerPrimaryType: ({ - enumName, - memberName, - explicitType - }) => `Enum \`${enumName}\` has type \`${explicitType}\`, so the initializer of \`${memberName}\` needs to be a ${explicitType} literal.`, - EnumInvalidMemberInitializerSymbolType: ({ - enumName, - memberName - }) => `Symbol enum members cannot be initialized. Use \`${memberName},\` in enum \`${enumName}\`.`, - EnumInvalidMemberInitializerUnknownType: ({ - enumName, - memberName - }) => `The enum member initializer for \`${memberName}\` needs to be a literal (either a boolean, number, or string) in enum \`${enumName}\`.`, - EnumInvalidMemberName: ({ - enumName, - memberName, - suggestion - }) => `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${memberName}\`, consider using \`${suggestion}\`, in enum \`${enumName}\`.`, - EnumNumberMemberNotInitialized: ({ - enumName, - memberName - }) => `Number enum members need to be initialized, e.g. \`${memberName} = 1\` in enum \`${enumName}\`.`, - EnumStringMemberInconsistentlyInitialized: ({ - enumName - }) => `String enum members need to consistently either all use initializers, or use no initializers, in enum \`${enumName}\`.`, - GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.", - ImportReflectionHasImportType: "An `import module` declaration can not use `type` or `typeof` keyword.", - ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.", - InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.", - InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.", - InexactVariance: "Explicit inexact syntax cannot have variance.", - InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.", - MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.", - NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.", - NestedFlowComment: "Cannot have a flow comment inside another flow comment.", - PatternIsOptional: Object.assign({ - message: "A binding pattern parameter cannot be optional in an implementation signature." - }, { - reasonCode: "OptionalBindingPattern" - }), - SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.", - SpreadVariance: "Spread properties cannot have variance.", - ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.", - ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.", - ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.", - ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.", - ThisParamNoDefault: "The `this` parameter may not have a default value.", - TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", - TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.", - UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.", - UnexpectedReservedType: ({ - reservedType - }) => `Unexpected reserved type ${reservedType}.`, - UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.", - UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.", - UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.", - UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".', - UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.", - UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.", - UnsupportedDeclareExportKind: ({ - unsupportedExportKind, - suggestion - }) => `\`declare export ${unsupportedExportKind}\` is not supported. Use \`${suggestion}\` instead.`, - UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.", - UnterminatedFlowComment: "Unterminated flow-comment." - }); - function isEsModuleType(bodyElement) { - return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); - } - function hasTypeImportKind(node) { - return node.importKind === "type" || node.importKind === "typeof"; - } - const exportSuggestions = { - const: "declare export var", - let: "declare export var", - type: "export type", - interface: "export interface" - }; - function partition(list, test) { - const list1 = []; - const list2 = []; - for (let i = 0; i < list.length; i++) { - (test(list[i], i, list) ? list1 : list2).push(list[i]); - } - return [list1, list2]; - } - const FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/; - var flow = superClass => class FlowParserMixin extends superClass { - constructor(...args) { - super(...args); - this.flowPragma = undefined; - } - getScopeHandler() { - return FlowScopeHandler; - } - shouldParseTypes() { - return this.getPluginOption("flow", "all") || this.flowPragma === "flow"; - } - shouldParseEnums() { - return !!this.getPluginOption("flow", "enums"); - } - finishToken(type, val) { - if (type !== 133 && type !== 13 && type !== 28) { - if (this.flowPragma === undefined) { - this.flowPragma = null; - } - } - super.finishToken(type, val); - } - addComment(comment) { - if (this.flowPragma === undefined) { - const matches = FLOW_PRAGMA_REGEX.exec(comment.value); - if (!matches) ;else if (matches[1] === "flow") { - this.flowPragma = "flow"; - } else if (matches[1] === "noflow") { - this.flowPragma = "noflow"; - } else { - throw new Error("Unexpected flow pragma"); - } - } - super.addComment(comment); - } - flowParseTypeInitialiser(tok) { - const oldInType = this.state.inType; - this.state.inType = true; - this.expect(tok || 14); - const type = this.flowParseType(); - this.state.inType = oldInType; - return type; - } - flowParsePredicate() { - const node = this.startNode(); - const moduloLoc = this.state.startLoc; - this.next(); - this.expectContextual(110); - if (this.state.lastTokStartLoc.index > moduloLoc.index + 1) { - this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks, moduloLoc); - } - if (this.eat(10)) { - node.value = super.parseExpression(); - this.expect(11); - return this.finishNode(node, "DeclaredPredicate"); - } else { - return this.finishNode(node, "InferredPredicate"); - } - } - flowParseTypeAndPredicateInitialiser() { - const oldInType = this.state.inType; - this.state.inType = true; - this.expect(14); - let type = null; - let predicate = null; - if (this.match(54)) { - this.state.inType = oldInType; - predicate = this.flowParsePredicate(); - } else { - type = this.flowParseType(); - this.state.inType = oldInType; - if (this.match(54)) { - predicate = this.flowParsePredicate(); - } - } - return [type, predicate]; - } - flowParseDeclareClass(node) { - this.next(); - this.flowParseInterfaceish(node, true); - return this.finishNode(node, "DeclareClass"); - } - flowParseDeclareFunction(node) { - this.next(); - const id = node.id = this.parseIdentifier(); - const typeNode = this.startNode(); - const typeContainer = this.startNode(); - if (this.match(47)) { - typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - typeNode.typeParameters = null; - } - this.expect(10); - const tmp = this.flowParseFunctionTypeParams(); - typeNode.params = tmp.params; - typeNode.rest = tmp.rest; - typeNode.this = tmp._this; - this.expect(11); - [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); - typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); - id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); - this.resetEndLocation(id); - this.semicolon(); - this.scope.declareName(node.id.name, 2048, node.id.loc.start); - return this.finishNode(node, "DeclareFunction"); - } - flowParseDeclare(node, insideModule) { - if (this.match(80)) { - return this.flowParseDeclareClass(node); - } else if (this.match(68)) { - return this.flowParseDeclareFunction(node); - } else if (this.match(74)) { - return this.flowParseDeclareVariable(node); - } else if (this.eatContextual(127)) { - if (this.match(16)) { - return this.flowParseDeclareModuleExports(node); - } else { - if (insideModule) { - this.raise(FlowErrors.NestedDeclareModule, this.state.lastTokStartLoc); - } - return this.flowParseDeclareModule(node); - } - } else if (this.isContextual(130)) { - return this.flowParseDeclareTypeAlias(node); - } else if (this.isContextual(131)) { - return this.flowParseDeclareOpaqueType(node); - } else if (this.isContextual(129)) { - return this.flowParseDeclareInterface(node); - } else if (this.match(82)) { - return this.flowParseDeclareExportDeclaration(node, insideModule); - } else { - this.unexpected(); - } - } - flowParseDeclareVariable(node) { - this.next(); - node.id = this.flowParseTypeAnnotatableIdentifier(true); - this.scope.declareName(node.id.name, 5, node.id.loc.start); - this.semicolon(); - return this.finishNode(node, "DeclareVariable"); - } - flowParseDeclareModule(node) { - this.scope.enter(0); - if (this.match(133)) { - node.id = super.parseExprAtom(); - } else { - node.id = this.parseIdentifier(); - } - const bodyNode = node.body = this.startNode(); - const body = bodyNode.body = []; - this.expect(5); - while (!this.match(8)) { - let bodyNode = this.startNode(); - if (this.match(83)) { - this.next(); - if (!this.isContextual(130) && !this.match(87)) { - this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc); - } - super.parseImport(bodyNode); - } else { - this.expectContextual(125, FlowErrors.UnsupportedStatementInDeclareModule); - bodyNode = this.flowParseDeclare(bodyNode, true); - } - body.push(bodyNode); - } - this.scope.exit(); - this.expect(8); - this.finishNode(bodyNode, "BlockStatement"); - let kind = null; - let hasModuleExport = false; - body.forEach(bodyElement => { - if (isEsModuleType(bodyElement)) { - if (kind === "CommonJS") { - this.raise(FlowErrors.AmbiguousDeclareModuleKind, bodyElement); - } - kind = "ES"; - } else if (bodyElement.type === "DeclareModuleExports") { - if (hasModuleExport) { - this.raise(FlowErrors.DuplicateDeclareModuleExports, bodyElement); - } - if (kind === "ES") { - this.raise(FlowErrors.AmbiguousDeclareModuleKind, bodyElement); - } - kind = "CommonJS"; - hasModuleExport = true; - } - }); - node.kind = kind || "CommonJS"; - return this.finishNode(node, "DeclareModule"); - } - flowParseDeclareExportDeclaration(node, insideModule) { - this.expect(82); - if (this.eat(65)) { - if (this.match(68) || this.match(80)) { - node.declaration = this.flowParseDeclare(this.startNode()); - } else { - node.declaration = this.flowParseType(); - this.semicolon(); - } - node.default = true; - return this.finishNode(node, "DeclareExportDeclaration"); - } else { - if (this.match(75) || this.isLet() || (this.isContextual(130) || this.isContextual(129)) && !insideModule) { - const label = this.state.value; - throw this.raise(FlowErrors.UnsupportedDeclareExportKind, this.state.startLoc, { - unsupportedExportKind: label, - suggestion: exportSuggestions[label] - }); - } - if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(131)) { - node.declaration = this.flowParseDeclare(this.startNode()); - node.default = false; - return this.finishNode(node, "DeclareExportDeclaration"); - } else if (this.match(55) || this.match(5) || this.isContextual(129) || this.isContextual(130) || this.isContextual(131)) { - node = this.parseExport(node, null); - if (node.type === "ExportNamedDeclaration") { - node.type = "ExportDeclaration"; - node.default = false; - delete node.exportKind; - } - node.type = "Declare" + node.type; - return node; - } - } - this.unexpected(); - } - flowParseDeclareModuleExports(node) { - this.next(); - this.expectContextual(111); - node.typeAnnotation = this.flowParseTypeAnnotation(); - this.semicolon(); - return this.finishNode(node, "DeclareModuleExports"); - } - flowParseDeclareTypeAlias(node) { - this.next(); - const finished = this.flowParseTypeAlias(node); - finished.type = "DeclareTypeAlias"; - return finished; - } - flowParseDeclareOpaqueType(node) { - this.next(); - const finished = this.flowParseOpaqueType(node, true); - finished.type = "DeclareOpaqueType"; - return finished; - } - flowParseDeclareInterface(node) { - this.next(); - this.flowParseInterfaceish(node, false); - return this.finishNode(node, "DeclareInterface"); - } - flowParseInterfaceish(node, isClass) { - node.id = this.flowParseRestrictedIdentifier(!isClass, true); - this.scope.declareName(node.id.name, isClass ? 17 : 8201, node.id.loc.start); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - node.extends = []; - if (this.eat(81)) { - do { - node.extends.push(this.flowParseInterfaceExtends()); - } while (!isClass && this.eat(12)); - } - if (isClass) { - node.implements = []; - node.mixins = []; - if (this.eatContextual(117)) { - do { - node.mixins.push(this.flowParseInterfaceExtends()); - } while (this.eat(12)); - } - if (this.eatContextual(113)) { - do { - node.implements.push(this.flowParseInterfaceExtends()); - } while (this.eat(12)); - } - } - node.body = this.flowParseObjectType({ - allowStatic: isClass, - allowExact: false, - allowSpread: false, - allowProto: isClass, - allowInexact: false - }); - } - flowParseInterfaceExtends() { - const node = this.startNode(); - node.id = this.flowParseQualifiedTypeIdentifier(); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - return this.finishNode(node, "InterfaceExtends"); - } - flowParseInterface(node) { - this.flowParseInterfaceish(node, false); - return this.finishNode(node, "InterfaceDeclaration"); - } - checkNotUnderscore(word) { - if (word === "_") { - this.raise(FlowErrors.UnexpectedReservedUnderscore, this.state.startLoc); - } - } - checkReservedType(word, startLoc, declaration) { - if (!reservedTypes.has(word)) return; - this.raise(declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, startLoc, { - reservedType: word - }); - } - flowParseRestrictedIdentifier(liberal, declaration) { - this.checkReservedType(this.state.value, this.state.startLoc, declaration); - return this.parseIdentifier(liberal); - } - flowParseTypeAlias(node) { - node.id = this.flowParseRestrictedIdentifier(false, true); - this.scope.declareName(node.id.name, 8201, node.id.loc.start); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - node.right = this.flowParseTypeInitialiser(29); - this.semicolon(); - return this.finishNode(node, "TypeAlias"); - } - flowParseOpaqueType(node, declare) { - this.expectContextual(130); - node.id = this.flowParseRestrictedIdentifier(true, true); - this.scope.declareName(node.id.name, 8201, node.id.loc.start); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - node.supertype = null; - if (this.match(14)) { - node.supertype = this.flowParseTypeInitialiser(14); - } - node.impltype = null; - if (!declare) { - node.impltype = this.flowParseTypeInitialiser(29); - } - this.semicolon(); - return this.finishNode(node, "OpaqueType"); - } - flowParseTypeParameter(requireDefault = false) { - const nodeStartLoc = this.state.startLoc; - const node = this.startNode(); - const variance = this.flowParseVariance(); - const ident = this.flowParseTypeAnnotatableIdentifier(); - node.name = ident.name; - node.variance = variance; - node.bound = ident.typeAnnotation; - if (this.match(29)) { - this.eat(29); - node.default = this.flowParseType(); - } else { - if (requireDefault) { - this.raise(FlowErrors.MissingTypeParamDefault, nodeStartLoc); - } - } - return this.finishNode(node, "TypeParameter"); - } - flowParseTypeParameterDeclaration() { - const oldInType = this.state.inType; - const node = this.startNode(); - node.params = []; - this.state.inType = true; - if (this.match(47) || this.match(142)) { - this.next(); - } else { - this.unexpected(); - } - let defaultRequired = false; - do { - const typeParameter = this.flowParseTypeParameter(defaultRequired); - node.params.push(typeParameter); - if (typeParameter.default) { - defaultRequired = true; - } - if (!this.match(48)) { - this.expect(12); - } - } while (!this.match(48)); - this.expect(48); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterDeclaration"); - } - flowParseTypeParameterInstantiation() { - const node = this.startNode(); - const oldInType = this.state.inType; - node.params = []; - this.state.inType = true; - this.expect(47); - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = false; - while (!this.match(48)) { - node.params.push(this.flowParseType()); - if (!this.match(48)) { - this.expect(12); - } - } - this.state.noAnonFunctionType = oldNoAnonFunctionType; - this.expect(48); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterInstantiation"); - } - flowParseTypeParameterInstantiationCallOrNew() { - const node = this.startNode(); - const oldInType = this.state.inType; - node.params = []; - this.state.inType = true; - this.expect(47); - while (!this.match(48)) { - node.params.push(this.flowParseTypeOrImplicitInstantiation()); - if (!this.match(48)) { - this.expect(12); - } - } - this.expect(48); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterInstantiation"); - } - flowParseInterfaceType() { - const node = this.startNode(); - this.expectContextual(129); - node.extends = []; - if (this.eat(81)) { - do { - node.extends.push(this.flowParseInterfaceExtends()); - } while (this.eat(12)); - } - node.body = this.flowParseObjectType({ - allowStatic: false, - allowExact: false, - allowSpread: false, - allowProto: false, - allowInexact: false - }); - return this.finishNode(node, "InterfaceTypeAnnotation"); - } - flowParseObjectPropertyKey() { - return this.match(134) || this.match(133) ? super.parseExprAtom() : this.parseIdentifier(true); - } - flowParseObjectTypeIndexer(node, isStatic, variance) { - node.static = isStatic; - if (this.lookahead().type === 14) { - node.id = this.flowParseObjectPropertyKey(); - node.key = this.flowParseTypeInitialiser(); - } else { - node.id = null; - node.key = this.flowParseType(); - } - this.expect(3); - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - return this.finishNode(node, "ObjectTypeIndexer"); - } - flowParseObjectTypeInternalSlot(node, isStatic) { - node.static = isStatic; - node.id = this.flowParseObjectPropertyKey(); - this.expect(3); - this.expect(3); - if (this.match(47) || this.match(10)) { - node.method = true; - node.optional = false; - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start)); - } else { - node.method = false; - if (this.eat(17)) { - node.optional = true; - } - node.value = this.flowParseTypeInitialiser(); - } - return this.finishNode(node, "ObjectTypeInternalSlot"); - } - flowParseObjectTypeMethodish(node) { - node.params = []; - node.rest = null; - node.typeParameters = null; - node.this = null; - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - this.expect(10); - if (this.match(78)) { - node.this = this.flowParseFunctionTypeParam(true); - node.this.name = null; - if (!this.match(11)) { - this.expect(12); - } - } - while (!this.match(11) && !this.match(21)) { - node.params.push(this.flowParseFunctionTypeParam(false)); - if (!this.match(11)) { - this.expect(12); - } - } - if (this.eat(21)) { - node.rest = this.flowParseFunctionTypeParam(false); - } - this.expect(11); - node.returnType = this.flowParseTypeInitialiser(); - return this.finishNode(node, "FunctionTypeAnnotation"); - } - flowParseObjectTypeCallProperty(node, isStatic) { - const valueNode = this.startNode(); - node.static = isStatic; - node.value = this.flowParseObjectTypeMethodish(valueNode); - return this.finishNode(node, "ObjectTypeCallProperty"); - } - flowParseObjectType({ - allowStatic, - allowExact, - allowSpread, - allowProto, - allowInexact - }) { - const oldInType = this.state.inType; - this.state.inType = true; - const nodeStart = this.startNode(); - nodeStart.callProperties = []; - nodeStart.properties = []; - nodeStart.indexers = []; - nodeStart.internalSlots = []; - let endDelim; - let exact; - let inexact = false; - if (allowExact && this.match(6)) { - this.expect(6); - endDelim = 9; - exact = true; - } else { - this.expect(5); - endDelim = 8; - exact = false; - } - nodeStart.exact = exact; - while (!this.match(endDelim)) { - let isStatic = false; - let protoStartLoc = null; - let inexactStartLoc = null; - const node = this.startNode(); - if (allowProto && this.isContextual(118)) { - const lookahead = this.lookahead(); - if (lookahead.type !== 14 && lookahead.type !== 17) { - this.next(); - protoStartLoc = this.state.startLoc; - allowStatic = false; - } - } - if (allowStatic && this.isContextual(106)) { - const lookahead = this.lookahead(); - if (lookahead.type !== 14 && lookahead.type !== 17) { - this.next(); - isStatic = true; - } - } - const variance = this.flowParseVariance(); - if (this.eat(0)) { - if (protoStartLoc != null) { - this.unexpected(protoStartLoc); - } - if (this.eat(0)) { - if (variance) { - this.unexpected(variance.loc.start); - } - nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic)); - } else { - nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); - } - } else if (this.match(10) || this.match(47)) { - if (protoStartLoc != null) { - this.unexpected(protoStartLoc); - } - if (variance) { - this.unexpected(variance.loc.start); - } - nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); - } else { - let kind = "init"; - if (this.isContextual(99) || this.isContextual(104)) { - const lookahead = this.lookahead(); - if (tokenIsLiteralPropertyName(lookahead.type)) { - kind = this.state.value; - this.next(); - } - } - const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact); - if (propOrInexact === null) { - inexact = true; - inexactStartLoc = this.state.lastTokStartLoc; - } else { - nodeStart.properties.push(propOrInexact); - } - } - this.flowObjectTypeSemicolon(); - if (inexactStartLoc && !this.match(8) && !this.match(9)) { - this.raise(FlowErrors.UnexpectedExplicitInexactInObject, inexactStartLoc); - } - } - this.expect(endDelim); - if (allowSpread) { - nodeStart.inexact = inexact; - } - const out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); - this.state.inType = oldInType; - return out; - } - flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact) { - if (this.eat(21)) { - const isInexactToken = this.match(12) || this.match(13) || this.match(8) || this.match(9); - if (isInexactToken) { - if (!allowSpread) { - this.raise(FlowErrors.InexactInsideNonObject, this.state.lastTokStartLoc); - } else if (!allowInexact) { - this.raise(FlowErrors.InexactInsideExact, this.state.lastTokStartLoc); - } - if (variance) { - this.raise(FlowErrors.InexactVariance, variance); - } - return null; - } - if (!allowSpread) { - this.raise(FlowErrors.UnexpectedSpreadType, this.state.lastTokStartLoc); - } - if (protoStartLoc != null) { - this.unexpected(protoStartLoc); - } - if (variance) { - this.raise(FlowErrors.SpreadVariance, variance); - } - node.argument = this.flowParseType(); - return this.finishNode(node, "ObjectTypeSpreadProperty"); - } else { - node.key = this.flowParseObjectPropertyKey(); - node.static = isStatic; - node.proto = protoStartLoc != null; - node.kind = kind; - let optional = false; - if (this.match(47) || this.match(10)) { - node.method = true; - if (protoStartLoc != null) { - this.unexpected(protoStartLoc); - } - if (variance) { - this.unexpected(variance.loc.start); - } - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start)); - if (kind === "get" || kind === "set") { - this.flowCheckGetterSetterParams(node); - } - if (!allowSpread && node.key.name === "constructor" && node.value.this) { - this.raise(FlowErrors.ThisParamBannedInConstructor, node.value.this); - } - } else { - if (kind !== "init") this.unexpected(); - node.method = false; - if (this.eat(17)) { - optional = true; - } - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - } - node.optional = optional; - return this.finishNode(node, "ObjectTypeProperty"); - } - } - flowCheckGetterSetterParams(property) { - const paramCount = property.kind === "get" ? 0 : 1; - const length = property.value.params.length + (property.value.rest ? 1 : 0); - if (property.value.this) { - this.raise(property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam, property.value.this); - } - if (length !== paramCount) { - this.raise(property.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, property); - } - if (property.kind === "set" && property.value.rest) { - this.raise(Errors.BadSetterRestParameter, property); - } - } - flowObjectTypeSemicolon() { - if (!this.eat(13) && !this.eat(12) && !this.match(8) && !this.match(9)) { - this.unexpected(); - } - } - flowParseQualifiedTypeIdentifier(startLoc, id) { - var _startLoc; - (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc; - let node = id || this.flowParseRestrictedIdentifier(true); - while (this.eat(16)) { - const node2 = this.startNodeAt(startLoc); - node2.qualification = node; - node2.id = this.flowParseRestrictedIdentifier(true); - node = this.finishNode(node2, "QualifiedTypeIdentifier"); - } - return node; - } - flowParseGenericType(startLoc, id) { - const node = this.startNodeAt(startLoc); - node.typeParameters = null; - node.id = this.flowParseQualifiedTypeIdentifier(startLoc, id); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } - return this.finishNode(node, "GenericTypeAnnotation"); - } - flowParseTypeofType() { - const node = this.startNode(); - this.expect(87); - node.argument = this.flowParsePrimaryType(); - return this.finishNode(node, "TypeofTypeAnnotation"); - } - flowParseTupleType() { - const node = this.startNode(); - node.types = []; - this.expect(0); - while (this.state.pos < this.length && !this.match(3)) { - node.types.push(this.flowParseType()); - if (this.match(3)) break; - this.expect(12); - } - this.expect(3); - return this.finishNode(node, "TupleTypeAnnotation"); - } - flowParseFunctionTypeParam(first) { - let name = null; - let optional = false; - let typeAnnotation = null; - const node = this.startNode(); - const lh = this.lookahead(); - const isThis = this.state.type === 78; - if (lh.type === 14 || lh.type === 17) { - if (isThis && !first) { - this.raise(FlowErrors.ThisParamMustBeFirst, node); - } - name = this.parseIdentifier(isThis); - if (this.eat(17)) { - optional = true; - if (isThis) { - this.raise(FlowErrors.ThisParamMayNotBeOptional, node); - } - } - typeAnnotation = this.flowParseTypeInitialiser(); - } else { - typeAnnotation = this.flowParseType(); - } - node.name = name; - node.optional = optional; - node.typeAnnotation = typeAnnotation; - return this.finishNode(node, "FunctionTypeParam"); - } - reinterpretTypeAsFunctionTypeParam(type) { - const node = this.startNodeAt(type.loc.start); - node.name = null; - node.optional = false; - node.typeAnnotation = type; - return this.finishNode(node, "FunctionTypeParam"); - } - flowParseFunctionTypeParams(params = []) { - let rest = null; - let _this = null; - if (this.match(78)) { - _this = this.flowParseFunctionTypeParam(true); - _this.name = null; - if (!this.match(11)) { - this.expect(12); - } - } - while (!this.match(11) && !this.match(21)) { - params.push(this.flowParseFunctionTypeParam(false)); - if (!this.match(11)) { - this.expect(12); - } - } - if (this.eat(21)) { - rest = this.flowParseFunctionTypeParam(false); - } - return { - params, - rest, - _this - }; - } - flowIdentToTypeAnnotation(startLoc, node, id) { - switch (id.name) { - case "any": - return this.finishNode(node, "AnyTypeAnnotation"); - case "bool": - case "boolean": - return this.finishNode(node, "BooleanTypeAnnotation"); - case "mixed": - return this.finishNode(node, "MixedTypeAnnotation"); - case "empty": - return this.finishNode(node, "EmptyTypeAnnotation"); - case "number": - return this.finishNode(node, "NumberTypeAnnotation"); - case "string": - return this.finishNode(node, "StringTypeAnnotation"); - case "symbol": - return this.finishNode(node, "SymbolTypeAnnotation"); - default: - this.checkNotUnderscore(id.name); - return this.flowParseGenericType(startLoc, id); - } - } - flowParsePrimaryType() { - const startLoc = this.state.startLoc; - const node = this.startNode(); - let tmp; - let type; - let isGroupedType = false; - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - switch (this.state.type) { - case 5: - return this.flowParseObjectType({ - allowStatic: false, - allowExact: false, - allowSpread: true, - allowProto: false, - allowInexact: true - }); - case 6: - return this.flowParseObjectType({ - allowStatic: false, - allowExact: true, - allowSpread: true, - allowProto: false, - allowInexact: false - }); - case 0: - this.state.noAnonFunctionType = false; - type = this.flowParseTupleType(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - return type; - case 47: - { - const node = this.startNode(); - node.typeParameters = this.flowParseTypeParameterDeclaration(); - this.expect(10); - tmp = this.flowParseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; - node.this = tmp._this; - this.expect(11); - this.expect(19); - node.returnType = this.flowParseType(); - return this.finishNode(node, "FunctionTypeAnnotation"); - } - case 10: - { - const node = this.startNode(); - this.next(); - if (!this.match(11) && !this.match(21)) { - if (tokenIsIdentifier(this.state.type) || this.match(78)) { - const token = this.lookahead().type; - isGroupedType = token !== 17 && token !== 14; - } else { - isGroupedType = true; - } - } - if (isGroupedType) { - this.state.noAnonFunctionType = false; - type = this.flowParseType(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - if (this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) { - this.expect(11); - return type; - } else { - this.eat(12); - } - } - if (type) { - tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); - } else { - tmp = this.flowParseFunctionTypeParams(); - } - node.params = tmp.params; - node.rest = tmp.rest; - node.this = tmp._this; - this.expect(11); - this.expect(19); - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - } - case 133: - return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); - case 85: - case 86: - node.value = this.match(85); - this.next(); - return this.finishNode(node, "BooleanLiteralTypeAnnotation"); - case 53: - if (this.state.value === "-") { - this.next(); - if (this.match(134)) { - return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node); - } - if (this.match(135)) { - return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node); - } - throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc); - } - this.unexpected(); - return; - case 134: - return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); - case 135: - return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation"); - case 88: - this.next(); - return this.finishNode(node, "VoidTypeAnnotation"); - case 84: - this.next(); - return this.finishNode(node, "NullLiteralTypeAnnotation"); - case 78: - this.next(); - return this.finishNode(node, "ThisTypeAnnotation"); - case 55: - this.next(); - return this.finishNode(node, "ExistsTypeAnnotation"); - case 87: - return this.flowParseTypeofType(); - default: - if (tokenIsKeyword(this.state.type)) { - const label = tokenLabelName(this.state.type); - this.next(); - return super.createIdentifier(node, label); - } else if (tokenIsIdentifier(this.state.type)) { - if (this.isContextual(129)) { - return this.flowParseInterfaceType(); - } - return this.flowIdentToTypeAnnotation(startLoc, node, this.parseIdentifier()); - } - } - this.unexpected(); - } - flowParsePostfixType() { - const startLoc = this.state.startLoc; - let type = this.flowParsePrimaryType(); - let seenOptionalIndexedAccess = false; - while ((this.match(0) || this.match(18)) && !this.canInsertSemicolon()) { - const node = this.startNodeAt(startLoc); - const optional = this.eat(18); - seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional; - this.expect(0); - if (!optional && this.match(3)) { - node.elementType = type; - this.next(); - type = this.finishNode(node, "ArrayTypeAnnotation"); - } else { - node.objectType = type; - node.indexType = this.flowParseType(); - this.expect(3); - if (seenOptionalIndexedAccess) { - node.optional = optional; - type = this.finishNode(node, "OptionalIndexedAccessType"); - } else { - type = this.finishNode(node, "IndexedAccessType"); - } - } - } - return type; - } - flowParsePrefixType() { - const node = this.startNode(); - if (this.eat(17)) { - node.typeAnnotation = this.flowParsePrefixType(); - return this.finishNode(node, "NullableTypeAnnotation"); - } else { - return this.flowParsePostfixType(); - } - } - flowParseAnonFunctionWithoutParens() { - const param = this.flowParsePrefixType(); - if (!this.state.noAnonFunctionType && this.eat(19)) { - const node = this.startNodeAt(param.loc.start); - node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; - node.rest = null; - node.this = null; - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - } - return param; - } - flowParseIntersectionType() { - const node = this.startNode(); - this.eat(45); - const type = this.flowParseAnonFunctionWithoutParens(); - node.types = [type]; - while (this.eat(45)) { - node.types.push(this.flowParseAnonFunctionWithoutParens()); - } - return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); - } - flowParseUnionType() { - const node = this.startNode(); - this.eat(43); - const type = this.flowParseIntersectionType(); - node.types = [type]; - while (this.eat(43)) { - node.types.push(this.flowParseIntersectionType()); - } - return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); - } - flowParseType() { - const oldInType = this.state.inType; - this.state.inType = true; - const type = this.flowParseUnionType(); - this.state.inType = oldInType; - return type; - } - flowParseTypeOrImplicitInstantiation() { - if (this.state.type === 132 && this.state.value === "_") { - const startLoc = this.state.startLoc; - const node = this.parseIdentifier(); - return this.flowParseGenericType(startLoc, node); - } else { - return this.flowParseType(); - } - } - flowParseTypeAnnotation() { - const node = this.startNode(); - node.typeAnnotation = this.flowParseTypeInitialiser(); - return this.finishNode(node, "TypeAnnotation"); - } - flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { - const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); - if (this.match(14)) { - ident.typeAnnotation = this.flowParseTypeAnnotation(); - this.resetEndLocation(ident); - } - return ident; - } - typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); - return node.expression; - } - flowParseVariance() { - let variance = null; - if (this.match(53)) { - variance = this.startNode(); - if (this.state.value === "+") { - variance.kind = "plus"; - } else { - variance.kind = "minus"; - } - this.next(); - return this.finishNode(variance, "Variance"); - } - return variance; - } - parseFunctionBody(node, allowExpressionBody, isMethod = false) { - if (allowExpressionBody) { - this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod)); - return; - } - super.parseFunctionBody(node, false, isMethod); - } - parseFunctionBodyAndFinish(node, type, isMethod = false) { - if (this.match(14)) { - const typeNode = this.startNode(); - [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); - node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; - } - return super.parseFunctionBodyAndFinish(node, type, isMethod); - } - parseStatementLike(flags) { - if (this.state.strict && this.isContextual(129)) { - const lookahead = this.lookahead(); - if (tokenIsKeywordOrIdentifier(lookahead.type)) { - const node = this.startNode(); - this.next(); - return this.flowParseInterface(node); - } - } else if (this.shouldParseEnums() && this.isContextual(126)) { - const node = this.startNode(); - this.next(); - return this.flowParseEnumDeclaration(node); - } - const stmt = super.parseStatementLike(flags); - if (this.flowPragma === undefined && !this.isValidDirective(stmt)) { - this.flowPragma = null; - } - return stmt; - } - parseExpressionStatement(node, expr, decorators) { - if (expr.type === "Identifier") { - if (expr.name === "declare") { - if (this.match(80) || tokenIsIdentifier(this.state.type) || this.match(68) || this.match(74) || this.match(82)) { - return this.flowParseDeclare(node); - } - } else if (tokenIsIdentifier(this.state.type)) { - if (expr.name === "interface") { - return this.flowParseInterface(node); - } else if (expr.name === "type") { - return this.flowParseTypeAlias(node); - } else if (expr.name === "opaque") { - return this.flowParseOpaqueType(node, false); - } - } - } - return super.parseExpressionStatement(node, expr, decorators); - } - shouldParseExportDeclaration() { - const { - type - } = this.state; - if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 126) { - return !this.state.containsEsc; - } - return super.shouldParseExportDeclaration(); - } - isExportDefaultSpecifier() { - const { - type - } = this.state; - if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 126) { - return this.state.containsEsc; - } - return super.isExportDefaultSpecifier(); - } - parseExportDefaultExpression() { - if (this.shouldParseEnums() && this.isContextual(126)) { - const node = this.startNode(); - this.next(); - return this.flowParseEnumDeclaration(node); - } - return super.parseExportDefaultExpression(); - } - parseConditional(expr, startLoc, refExpressionErrors) { - if (!this.match(17)) return expr; - if (this.state.maybeInArrowParameters) { - const nextCh = this.lookaheadCharCode(); - if (nextCh === 44 || nextCh === 61 || nextCh === 58 || nextCh === 41) { - this.setOptionalParametersError(refExpressionErrors); - return expr; - } - } - this.expect(17); - const state = this.state.clone(); - const originalNoArrowAt = this.state.noArrowAt; - const node = this.startNodeAt(startLoc); - let { - consequent, - failed - } = this.tryParseConditionalConsequent(); - let [valid, invalid] = this.getArrowLikeExpressions(consequent); - if (failed || invalid.length > 0) { - const noArrowAt = [...originalNoArrowAt]; - if (invalid.length > 0) { - this.state = state; - this.state.noArrowAt = noArrowAt; - for (let i = 0; i < invalid.length; i++) { - noArrowAt.push(invalid[i].start); - } - ({ - consequent, - failed - } = this.tryParseConditionalConsequent()); - [valid, invalid] = this.getArrowLikeExpressions(consequent); - } - if (failed && valid.length > 1) { - this.raise(FlowErrors.AmbiguousConditionalArrow, state.startLoc); - } - if (failed && valid.length === 1) { - this.state = state; - noArrowAt.push(valid[0].start); - this.state.noArrowAt = noArrowAt; - ({ - consequent, - failed - } = this.tryParseConditionalConsequent()); - } - } - this.getArrowLikeExpressions(consequent, true); - this.state.noArrowAt = originalNoArrowAt; - this.expect(14); - node.test = expr; - node.consequent = consequent; - node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(undefined, undefined)); - return this.finishNode(node, "ConditionalExpression"); - } - tryParseConditionalConsequent() { - this.state.noArrowParamsConversionAt.push(this.state.start); - const consequent = this.parseMaybeAssignAllowIn(); - const failed = !this.match(14); - this.state.noArrowParamsConversionAt.pop(); - return { - consequent, - failed - }; - } - getArrowLikeExpressions(node, disallowInvalid) { - const stack = [node]; - const arrows = []; - while (stack.length !== 0) { - const node = stack.pop(); - if (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") { - if (node.typeParameters || !node.returnType) { - this.finishArrowValidation(node); - } else { - arrows.push(node); - } - stack.push(node.body); - } else if (node.type === "ConditionalExpression") { - stack.push(node.consequent); - stack.push(node.alternate); - } - } - if (disallowInvalid) { - arrows.forEach(node => this.finishArrowValidation(node)); - return [arrows, []]; - } - return partition(arrows, node => node.params.every(param => this.isAssignable(param, true))); - } - finishArrowValidation(node) { - var _node$extra; - this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingCommaLoc, false); - this.scope.enter(2 | 4); - super.checkParams(node, false, true); - this.scope.exit(); - } - forwardNoArrowParamsConversionAt(node, parse) { - let result; - if (this.state.noArrowParamsConversionAt.includes(node.start)) { - this.state.noArrowParamsConversionAt.push(this.state.start); - result = parse(); - this.state.noArrowParamsConversionAt.pop(); - } else { - result = parse(); - } - return result; - } - parseParenItem(node, startLoc) { - const newNode = super.parseParenItem(node, startLoc); - if (this.eat(17)) { - newNode.optional = true; - this.resetEndLocation(node); - } - if (this.match(14)) { - const typeCastNode = this.startNodeAt(startLoc); - typeCastNode.expression = newNode; - typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TypeCastExpression"); - } - return newNode; - } - assertModuleNodeAllowed(node) { - if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { - return; - } - super.assertModuleNodeAllowed(node); - } - parseExportDeclaration(node) { - if (this.isContextual(130)) { - node.exportKind = "type"; - const declarationNode = this.startNode(); - this.next(); - if (this.match(5)) { - node.specifiers = this.parseExportSpecifiers(true); - super.parseExportFrom(node); - return null; - } else { - return this.flowParseTypeAlias(declarationNode); - } - } else if (this.isContextual(131)) { - node.exportKind = "type"; - const declarationNode = this.startNode(); - this.next(); - return this.flowParseOpaqueType(declarationNode, false); - } else if (this.isContextual(129)) { - node.exportKind = "type"; - const declarationNode = this.startNode(); - this.next(); - return this.flowParseInterface(declarationNode); - } else if (this.shouldParseEnums() && this.isContextual(126)) { - node.exportKind = "value"; - const declarationNode = this.startNode(); - this.next(); - return this.flowParseEnumDeclaration(declarationNode); - } else { - return super.parseExportDeclaration(node); - } - } - eatExportStar(node) { - if (super.eatExportStar(node)) return true; - if (this.isContextual(130) && this.lookahead().type === 55) { - node.exportKind = "type"; - this.next(); - this.next(); - return true; - } - return false; - } - maybeParseExportNamespaceSpecifier(node) { - const { - startLoc - } = this.state; - const hasNamespace = super.maybeParseExportNamespaceSpecifier(node); - if (hasNamespace && node.exportKind === "type") { - this.unexpected(startLoc); - } - return hasNamespace; - } - parseClassId(node, isStatement, optionalId) { - super.parseClassId(node, isStatement, optionalId); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - } - parseClassMember(classBody, member, state) { - const { - startLoc - } = this.state; - if (this.isContextual(125)) { - if (super.parseClassMemberFromModifier(classBody, member)) { - return; - } - member.declare = true; - } - super.parseClassMember(classBody, member, state); - if (member.declare) { - if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") { - this.raise(FlowErrors.DeclareClassElement, startLoc); - } else if (member.value) { - this.raise(FlowErrors.DeclareClassFieldInitializer, member.value); - } - } - } - isIterator(word) { - return word === "iterator" || word === "asyncIterator"; - } - readIterator() { - const word = super.readWord1(); - const fullWord = "@@" + word; - if (!this.isIterator(word) || !this.state.inType) { - this.raise(Errors.InvalidIdentifier, this.state.curPosition(), { - identifierName: fullWord - }); - } - this.finishToken(132, fullWord); - } - getTokenFromCode(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - if (code === 123 && next === 124) { - this.finishOp(6, 2); - } else if (this.state.inType && (code === 62 || code === 60)) { - this.finishOp(code === 62 ? 48 : 47, 1); - } else if (this.state.inType && code === 63) { - if (next === 46) { - this.finishOp(18, 2); - } else { - this.finishOp(17, 1); - } - } else if (isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))) { - this.state.pos += 2; - this.readIterator(); - } else { - super.getTokenFromCode(code); - } - } - isAssignable(node, isBinding) { - if (node.type === "TypeCastExpression") { - return this.isAssignable(node.expression, isBinding); - } else { - return super.isAssignable(node, isBinding); - } - } - toAssignable(node, isLHS = false) { - if (!isLHS && node.type === "AssignmentExpression" && node.left.type === "TypeCastExpression") { - node.left = this.typeCastToParameter(node.left); - } - super.toAssignable(node, isLHS); - } - toAssignableList(exprList, trailingCommaLoc, isLHS) { - for (let i = 0; i < exprList.length; i++) { - const expr = exprList[i]; - if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") { - exprList[i] = this.typeCastToParameter(expr); - } - } - super.toAssignableList(exprList, trailingCommaLoc, isLHS); - } - toReferencedList(exprList, isParenthesizedExpr) { - for (let i = 0; i < exprList.length; i++) { - var _expr$extra; - const expr = exprList[i]; - if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) { - this.raise(FlowErrors.TypeCastInPattern, expr.typeAnnotation); - } - } - return exprList; - } - parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { - const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors); - if (canBePattern && !this.state.maybeInArrowParameters) { - this.toReferencedList(node.elements); - } - return node; - } - isValidLVal(type, isParenthesized, binding) { - return type === "TypeCastExpression" || super.isValidLVal(type, isParenthesized, binding); - } - parseClassProperty(node) { - if (this.match(14)) { - node.typeAnnotation = this.flowParseTypeAnnotation(); - } - return super.parseClassProperty(node); - } - parseClassPrivateProperty(node) { - if (this.match(14)) { - node.typeAnnotation = this.flowParseTypeAnnotation(); - } - return super.parseClassPrivateProperty(node); - } - isClassMethod() { - return this.match(47) || super.isClassMethod(); - } - isClassProperty() { - return this.match(14) || super.isClassProperty(); - } - isNonstaticConstructor(method) { - return !this.match(14) && super.isNonstaticConstructor(method); - } - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - if (method.variance) { - this.unexpected(method.variance.loc.start); - } - delete method.variance; - if (this.match(47)) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); - if (method.params && isConstructor) { - const params = method.params; - if (params.length > 0 && this.isThisParam(params[0])) { - this.raise(FlowErrors.ThisParamBannedInConstructor, method); - } - } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) { - const params = method.value.params; - if (params.length > 0 && this.isThisParam(params[0])) { - this.raise(FlowErrors.ThisParamBannedInConstructor, method); - } - } - } - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - if (method.variance) { - this.unexpected(method.variance.loc.start); - } - delete method.variance; - if (this.match(47)) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); - } - parseClassSuper(node) { - super.parseClassSuper(node); - if (node.superClass && this.match(47)) { - node.superTypeParameters = this.flowParseTypeParameterInstantiation(); - } - if (this.isContextual(113)) { - this.next(); - const implemented = node.implements = []; - do { - const node = this.startNode(); - node.id = this.flowParseRestrictedIdentifier(true); - if (this.match(47)) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - implemented.push(this.finishNode(node, "ClassImplements")); - } while (this.eat(12)); - } - } - checkGetterSetterParams(method) { - super.checkGetterSetterParams(method); - const params = this.getObjectOrClassMethodParams(method); - if (params.length > 0) { - const param = params[0]; - if (this.isThisParam(param) && method.kind === "get") { - this.raise(FlowErrors.GetterMayNotHaveThisParam, param); - } else if (this.isThisParam(param)) { - this.raise(FlowErrors.SetterMayNotHaveThisParam, param); - } - } - } - parsePropertyNamePrefixOperator(node) { - node.variance = this.flowParseVariance(); - } - parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { - if (prop.variance) { - this.unexpected(prop.variance.loc.start); - } - delete prop.variance; - let typeParameters; - if (this.match(47) && !isAccessor) { - typeParameters = this.flowParseTypeParameterDeclaration(); - if (!this.match(10)) this.unexpected(); - } - const result = super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); - if (typeParameters) { - (result.value || result).typeParameters = typeParameters; - } - return result; - } - parseAssignableListItemTypes(param) { - if (this.eat(17)) { - if (param.type !== "Identifier") { - this.raise(FlowErrors.PatternIsOptional, param); - } - if (this.isThisParam(param)) { - this.raise(FlowErrors.ThisParamMayNotBeOptional, param); - } - param.optional = true; - } - if (this.match(14)) { - param.typeAnnotation = this.flowParseTypeAnnotation(); - } else if (this.isThisParam(param)) { - this.raise(FlowErrors.ThisParamAnnotationRequired, param); - } - if (this.match(29) && this.isThisParam(param)) { - this.raise(FlowErrors.ThisParamNoDefault, param); - } - this.resetEndLocation(param); - return param; - } - parseMaybeDefault(startLoc, left) { - const node = super.parseMaybeDefault(startLoc, left); - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(FlowErrors.TypeBeforeInitializer, node.typeAnnotation); - } - return node; - } - checkImportReflection(node) { - super.checkImportReflection(node); - if (node.module && node.importKind !== "value") { - this.raise(FlowErrors.ImportReflectionHasImportType, node.specifiers[0].loc.start); - } - } - parseImportSpecifierLocal(node, specifier, type) { - specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier(); - node.specifiers.push(this.finishImportSpecifier(specifier, type)); - } - isPotentialImportPhase(isExport) { - if (super.isPotentialImportPhase(isExport)) return true; - if (this.isContextual(130)) { - if (!isExport) return true; - const ch = this.lookaheadCharCode(); - return ch === 123 || ch === 42; - } - return !isExport && this.isContextual(87); - } - applyImportPhase(node, isExport, phase, loc) { - super.applyImportPhase(node, isExport, phase, loc); - if (isExport) { - if (!phase && this.match(65)) { - return; - } - node.exportKind = phase === "type" ? phase : "value"; - } else { - if (phase === "type" && this.match(55)) this.unexpected(); - node.importKind = phase === "type" || phase === "typeof" ? phase : "value"; - } - } - parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { - const firstIdent = specifier.imported; - let specifierTypeKind = null; - if (firstIdent.type === "Identifier") { - if (firstIdent.name === "type") { - specifierTypeKind = "type"; - } else if (firstIdent.name === "typeof") { - specifierTypeKind = "typeof"; - } - } - let isBinding = false; - if (this.isContextual(93) && !this.isLookaheadContextual("as")) { - const as_ident = this.parseIdentifier(true); - if (specifierTypeKind !== null && !tokenIsKeywordOrIdentifier(this.state.type)) { - specifier.imported = as_ident; - specifier.importKind = specifierTypeKind; - specifier.local = cloneIdentifier(as_ident); - } else { - specifier.imported = firstIdent; - specifier.importKind = null; - specifier.local = this.parseIdentifier(); - } - } else { - if (specifierTypeKind !== null && tokenIsKeywordOrIdentifier(this.state.type)) { - specifier.imported = this.parseIdentifier(true); - specifier.importKind = specifierTypeKind; - } else { - if (importedIsString) { - throw this.raise(Errors.ImportBindingIsString, specifier, { - importName: firstIdent.value - }); - } - specifier.imported = firstIdent; - specifier.importKind = null; - } - if (this.eatContextual(93)) { - specifier.local = this.parseIdentifier(); - } else { - isBinding = true; - specifier.local = cloneIdentifier(specifier.imported); - } - } - const specifierIsTypeImport = hasTypeImportKind(specifier); - if (isInTypeOnlyImport && specifierIsTypeImport) { - this.raise(FlowErrors.ImportTypeShorthandOnlyInPureImport, specifier); - } - if (isInTypeOnlyImport || specifierIsTypeImport) { - this.checkReservedType(specifier.local.name, specifier.local.loc.start, true); - } - if (isBinding && !isInTypeOnlyImport && !specifierIsTypeImport) { - this.checkReservedWord(specifier.local.name, specifier.loc.start, true, true); - } - return this.finishImportSpecifier(specifier, "ImportSpecifier"); - } - parseBindingAtom() { - switch (this.state.type) { - case 78: - return this.parseIdentifier(true); - default: - return super.parseBindingAtom(); - } - } - parseFunctionParams(node, isConstructor) { - const kind = node.kind; - if (kind !== "get" && kind !== "set" && this.match(47)) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - super.parseFunctionParams(node, isConstructor); - } - parseVarId(decl, kind) { - super.parseVarId(decl, kind); - if (this.match(14)) { - decl.id.typeAnnotation = this.flowParseTypeAnnotation(); - this.resetEndLocation(decl.id); - } - } - parseAsyncArrowFromCallExpression(node, call) { - if (this.match(14)) { - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - node.returnType = this.flowParseTypeAnnotation(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - } - return super.parseAsyncArrowFromCallExpression(node, call); - } - shouldParseAsyncArrow() { - return this.match(14) || super.shouldParseAsyncArrow(); - } - parseMaybeAssign(refExpressionErrors, afterLeftParse) { - var _jsx; - let state = null; - let jsx; - if (this.hasPlugin("jsx") && (this.match(142) || this.match(47))) { - state = this.state.clone(); - jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); - if (!jsx.error) return jsx.node; - const { - context - } = this.state; - const currentContext = context[context.length - 1]; - if (currentContext === types.j_oTag || currentContext === types.j_expr) { - context.pop(); - } - } - if ((_jsx = jsx) != null && _jsx.error || this.match(47)) { - var _jsx2, _jsx3; - state = state || this.state.clone(); - let typeParameters; - const arrow = this.tryParse(abort => { - var _arrowExpression$extr; - typeParameters = this.flowParseTypeParameterDeclaration(); - const arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, () => { - const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse); - this.resetStartLocationFromNode(result, typeParameters); - return result; - }); - if ((_arrowExpression$extr = arrowExpression.extra) != null && _arrowExpression$extr.parenthesized) abort(); - const expr = this.maybeUnwrapTypeCastExpression(arrowExpression); - if (expr.type !== "ArrowFunctionExpression") abort(); - expr.typeParameters = typeParameters; - this.resetStartLocationFromNode(expr, typeParameters); - return arrowExpression; - }, state); - let arrowExpression = null; - if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") { - if (!arrow.error && !arrow.aborted) { - if (arrow.node.async) { - this.raise(FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction, typeParameters); - } - return arrow.node; - } - arrowExpression = arrow.node; - } - if ((_jsx2 = jsx) != null && _jsx2.node) { - this.state = jsx.failState; - return jsx.node; - } - if (arrowExpression) { - this.state = arrow.failState; - return arrowExpression; - } - if ((_jsx3 = jsx) != null && _jsx3.thrown) throw jsx.error; - if (arrow.thrown) throw arrow.error; - throw this.raise(FlowErrors.UnexpectedTokenAfterTypeParameter, typeParameters); - } - return super.parseMaybeAssign(refExpressionErrors, afterLeftParse); - } - parseArrow(node) { - if (this.match(14)) { - const result = this.tryParse(() => { - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - const typeNode = this.startNode(); - [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - if (this.canInsertSemicolon()) this.unexpected(); - if (!this.match(19)) this.unexpected(); - return typeNode; - }); - if (result.thrown) return null; - if (result.error) this.state = result.failState; - node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null; - } - return super.parseArrow(node); - } - shouldParseArrow(params) { - return this.match(14) || super.shouldParseArrow(params); - } - setArrowFunctionParameters(node, params) { - if (this.state.noArrowParamsConversionAt.includes(node.start)) { - node.params = params; - } else { - super.setArrowFunctionParameters(node, params); - } - } - checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { - if (isArrowFunction && this.state.noArrowParamsConversionAt.includes(node.start)) { - return; - } - for (let i = 0; i < node.params.length; i++) { - if (this.isThisParam(node.params[i]) && i > 0) { - this.raise(FlowErrors.ThisParamMustBeFirst, node.params[i]); - } - } - super.checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged); - } - parseParenAndDistinguishExpression(canBeArrow) { - return super.parseParenAndDistinguishExpression(canBeArrow && !this.state.noArrowAt.includes(this.state.start)); - } - parseSubscripts(base, startLoc, noCalls) { - if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.includes(startLoc.index)) { - this.next(); - const node = this.startNodeAt(startLoc); - node.callee = base; - node.arguments = super.parseCallExpressionArguments(11, false); - base = this.finishNode(node, "CallExpression"); - } else if (base.type === "Identifier" && base.name === "async" && this.match(47)) { - const state = this.state.clone(); - const arrow = this.tryParse(abort => this.parseAsyncArrowWithTypeParameters(startLoc) || abort(), state); - if (!arrow.error && !arrow.aborted) return arrow.node; - const result = this.tryParse(() => super.parseSubscripts(base, startLoc, noCalls), state); - if (result.node && !result.error) return result.node; - if (arrow.node) { - this.state = arrow.failState; - return arrow.node; - } - if (result.node) { - this.state = result.failState; - return result.node; - } - throw arrow.error || result.error; - } - return super.parseSubscripts(base, startLoc, noCalls); - } - parseSubscript(base, startLoc, noCalls, subscriptState) { - if (this.match(18) && this.isLookaheadToken_lt()) { - subscriptState.optionalChainMember = true; - if (noCalls) { - subscriptState.stop = true; - return base; - } - this.next(); - const node = this.startNodeAt(startLoc); - node.callee = base; - node.typeArguments = this.flowParseTypeParameterInstantiation(); - this.expect(10); - node.arguments = this.parseCallExpressionArguments(11, false); - node.optional = true; - return this.finishCallExpression(node, true); - } else if (!noCalls && this.shouldParseTypes() && this.match(47)) { - const node = this.startNodeAt(startLoc); - node.callee = base; - const result = this.tryParse(() => { - node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(); - this.expect(10); - node.arguments = super.parseCallExpressionArguments(11, false); - if (subscriptState.optionalChainMember) { - node.optional = false; - } - return this.finishCallExpression(node, subscriptState.optionalChainMember); - }); - if (result.node) { - if (result.error) this.state = result.failState; - return result.node; - } - } - return super.parseSubscript(base, startLoc, noCalls, subscriptState); - } - parseNewCallee(node) { - super.parseNewCallee(node); - let targs = null; - if (this.shouldParseTypes() && this.match(47)) { - targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node; - } - node.typeArguments = targs; - } - parseAsyncArrowWithTypeParameters(startLoc) { - const node = this.startNodeAt(startLoc); - this.parseFunctionParams(node, false); - if (!this.parseArrow(node)) return; - return super.parseArrowExpression(node, undefined, true); - } - readToken_mult_modulo(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - if (code === 42 && next === 47 && this.state.hasFlowComment) { - this.state.hasFlowComment = false; - this.state.pos += 2; - this.nextToken(); - return; - } - super.readToken_mult_modulo(code); - } - readToken_pipe_amp(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - if (code === 124 && next === 125) { - this.finishOp(9, 2); - return; - } - super.readToken_pipe_amp(code); - } - parseTopLevel(file, program) { - const fileNode = super.parseTopLevel(file, program); - if (this.state.hasFlowComment) { - this.raise(FlowErrors.UnterminatedFlowComment, this.state.curPosition()); - } - return fileNode; - } - skipBlockComment() { - if (this.hasPlugin("flowComments") && this.skipFlowComment()) { - if (this.state.hasFlowComment) { - throw this.raise(FlowErrors.NestedFlowComment, this.state.startLoc); - } - this.hasFlowCommentCompletion(); - const commentSkip = this.skipFlowComment(); - if (commentSkip) { - this.state.pos += commentSkip; - this.state.hasFlowComment = true; - } - return; - } - return super.skipBlockComment(this.state.hasFlowComment ? "*-/" : "*/"); - } - skipFlowComment() { - const { - pos - } = this.state; - let shiftToFirstNonWhiteSpace = 2; - while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) { - shiftToFirstNonWhiteSpace++; - } - const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); - const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1); - if (ch2 === 58 && ch3 === 58) { - return shiftToFirstNonWhiteSpace + 2; - } - if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") { - return shiftToFirstNonWhiteSpace + 12; - } - if (ch2 === 58 && ch3 !== 58) { - return shiftToFirstNonWhiteSpace; - } - return false; - } - hasFlowCommentCompletion() { - const end = this.input.indexOf("*/", this.state.pos); - if (end === -1) { - throw this.raise(Errors.UnterminatedComment, this.state.curPosition()); - } - } - flowEnumErrorBooleanMemberNotInitialized(loc, { - enumName, - memberName - }) { - this.raise(FlowErrors.EnumBooleanMemberNotInitialized, loc, { - memberName, - enumName - }); - } - flowEnumErrorInvalidMemberInitializer(loc, enumContext) { - return this.raise(!enumContext.explicitType ? FlowErrors.EnumInvalidMemberInitializerUnknownType : enumContext.explicitType === "symbol" ? FlowErrors.EnumInvalidMemberInitializerSymbolType : FlowErrors.EnumInvalidMemberInitializerPrimaryType, loc, enumContext); - } - flowEnumErrorNumberMemberNotInitialized(loc, details) { - this.raise(FlowErrors.EnumNumberMemberNotInitialized, loc, details); - } - flowEnumErrorStringMemberInconsistentlyInitialized(node, details) { - this.raise(FlowErrors.EnumStringMemberInconsistentlyInitialized, node, details); - } - flowEnumMemberInit() { - const startLoc = this.state.startLoc; - const endOfInit = () => this.match(12) || this.match(8); - switch (this.state.type) { - case 134: - { - const literal = this.parseNumericLiteral(this.state.value); - if (endOfInit()) { - return { - type: "number", - loc: literal.loc.start, - value: literal - }; - } - return { - type: "invalid", - loc: startLoc - }; - } - case 133: - { - const literal = this.parseStringLiteral(this.state.value); - if (endOfInit()) { - return { - type: "string", - loc: literal.loc.start, - value: literal - }; - } - return { - type: "invalid", - loc: startLoc - }; - } - case 85: - case 86: - { - const literal = this.parseBooleanLiteral(this.match(85)); - if (endOfInit()) { - return { - type: "boolean", - loc: literal.loc.start, - value: literal - }; - } - return { - type: "invalid", - loc: startLoc - }; - } - default: - return { - type: "invalid", - loc: startLoc - }; - } - } - flowEnumMemberRaw() { - const loc = this.state.startLoc; - const id = this.parseIdentifier(true); - const init = this.eat(29) ? this.flowEnumMemberInit() : { - type: "none", - loc - }; - return { - id, - init - }; - } - flowEnumCheckExplicitTypeMismatch(loc, context, expectedType) { - const { - explicitType - } = context; - if (explicitType === null) { - return; - } - if (explicitType !== expectedType) { - this.flowEnumErrorInvalidMemberInitializer(loc, context); - } - } - flowEnumMembers({ - enumName, - explicitType - }) { - const seenNames = new Set(); - const members = { - booleanMembers: [], - numberMembers: [], - stringMembers: [], - defaultedMembers: [] - }; - let hasUnknownMembers = false; - while (!this.match(8)) { - if (this.eat(21)) { - hasUnknownMembers = true; - break; - } - const memberNode = this.startNode(); - const { - id, - init - } = this.flowEnumMemberRaw(); - const memberName = id.name; - if (memberName === "") { - continue; - } - if (/^[a-z]/.test(memberName)) { - this.raise(FlowErrors.EnumInvalidMemberName, id, { - memberName, - suggestion: memberName[0].toUpperCase() + memberName.slice(1), - enumName - }); - } - if (seenNames.has(memberName)) { - this.raise(FlowErrors.EnumDuplicateMemberName, id, { - memberName, - enumName - }); - } - seenNames.add(memberName); - const context = { - enumName, - explicitType, - memberName - }; - memberNode.id = id; - switch (init.type) { - case "boolean": - { - this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "boolean"); - memberNode.init = init.value; - members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember")); - break; - } - case "number": - { - this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "number"); - memberNode.init = init.value; - members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember")); - break; - } - case "string": - { - this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "string"); - memberNode.init = init.value; - members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember")); - break; - } - case "invalid": - { - throw this.flowEnumErrorInvalidMemberInitializer(init.loc, context); - } - case "none": - { - switch (explicitType) { - case "boolean": - this.flowEnumErrorBooleanMemberNotInitialized(init.loc, context); - break; - case "number": - this.flowEnumErrorNumberMemberNotInitialized(init.loc, context); - break; - default: - members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember")); - } - } - } - if (!this.match(8)) { - this.expect(12); - } - } - return { - members, - hasUnknownMembers - }; - } - flowEnumStringMembers(initializedMembers, defaultedMembers, { - enumName - }) { - if (initializedMembers.length === 0) { - return defaultedMembers; - } else if (defaultedMembers.length === 0) { - return initializedMembers; - } else if (defaultedMembers.length > initializedMembers.length) { - for (const member of initializedMembers) { - this.flowEnumErrorStringMemberInconsistentlyInitialized(member, { - enumName - }); - } - return defaultedMembers; - } else { - for (const member of defaultedMembers) { - this.flowEnumErrorStringMemberInconsistentlyInitialized(member, { - enumName - }); - } - return initializedMembers; - } - } - flowEnumParseExplicitType({ - enumName - }) { - if (!this.eatContextual(102)) return null; - if (!tokenIsIdentifier(this.state.type)) { - throw this.raise(FlowErrors.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, { - enumName - }); - } - const { - value - } = this.state; - this.next(); - if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") { - this.raise(FlowErrors.EnumInvalidExplicitType, this.state.startLoc, { - enumName, - invalidEnumType: value - }); - } - return value; - } - flowEnumBody(node, id) { - const enumName = id.name; - const nameLoc = id.loc.start; - const explicitType = this.flowEnumParseExplicitType({ - enumName - }); - this.expect(5); - const { - members, - hasUnknownMembers - } = this.flowEnumMembers({ - enumName, - explicitType - }); - node.hasUnknownMembers = hasUnknownMembers; - switch (explicitType) { - case "boolean": - node.explicitType = true; - node.members = members.booleanMembers; - this.expect(8); - return this.finishNode(node, "EnumBooleanBody"); - case "number": - node.explicitType = true; - node.members = members.numberMembers; - this.expect(8); - return this.finishNode(node, "EnumNumberBody"); - case "string": - node.explicitType = true; - node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, { - enumName - }); - this.expect(8); - return this.finishNode(node, "EnumStringBody"); - case "symbol": - node.members = members.defaultedMembers; - this.expect(8); - return this.finishNode(node, "EnumSymbolBody"); - default: - { - const empty = () => { - node.members = []; - this.expect(8); - return this.finishNode(node, "EnumStringBody"); - }; - node.explicitType = false; - const boolsLen = members.booleanMembers.length; - const numsLen = members.numberMembers.length; - const strsLen = members.stringMembers.length; - const defaultedLen = members.defaultedMembers.length; - if (!boolsLen && !numsLen && !strsLen && !defaultedLen) { - return empty(); - } else if (!boolsLen && !numsLen) { - node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, { - enumName - }); - this.expect(8); - return this.finishNode(node, "EnumStringBody"); - } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) { - for (const member of members.defaultedMembers) { - this.flowEnumErrorBooleanMemberNotInitialized(member.loc.start, { - enumName, - memberName: member.id.name - }); - } - node.members = members.booleanMembers; - this.expect(8); - return this.finishNode(node, "EnumBooleanBody"); - } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) { - for (const member of members.defaultedMembers) { - this.flowEnumErrorNumberMemberNotInitialized(member.loc.start, { - enumName, - memberName: member.id.name - }); - } - node.members = members.numberMembers; - this.expect(8); - return this.finishNode(node, "EnumNumberBody"); - } else { - this.raise(FlowErrors.EnumInconsistentMemberValues, nameLoc, { - enumName - }); - return empty(); - } - } - } - } - flowParseEnumDeclaration(node) { - const id = this.parseIdentifier(); - node.id = id; - node.body = this.flowEnumBody(this.startNode(), id); - return this.finishNode(node, "EnumDeclaration"); - } - isLookaheadToken_lt() { - const next = this.nextTokenStart(); - if (this.input.charCodeAt(next) === 60) { - const afterNext = this.input.charCodeAt(next + 1); - return afterNext !== 60 && afterNext !== 61; - } - return false; - } - maybeUnwrapTypeCastExpression(node) { - return node.type === "TypeCastExpression" ? node.expression : node; - } - }; - const entities = { - __proto__: null, - quot: "\u0022", - amp: "&", - apos: "\u0027", - lt: "<", - gt: ">", - nbsp: "\u00A0", - iexcl: "\u00A1", - cent: "\u00A2", - pound: "\u00A3", - curren: "\u00A4", - yen: "\u00A5", - brvbar: "\u00A6", - sect: "\u00A7", - uml: "\u00A8", - copy: "\u00A9", - ordf: "\u00AA", - laquo: "\u00AB", - not: "\u00AC", - shy: "\u00AD", - reg: "\u00AE", - macr: "\u00AF", - deg: "\u00B0", - plusmn: "\u00B1", - sup2: "\u00B2", - sup3: "\u00B3", - acute: "\u00B4", - micro: "\u00B5", - para: "\u00B6", - middot: "\u00B7", - cedil: "\u00B8", - sup1: "\u00B9", - ordm: "\u00BA", - raquo: "\u00BB", - frac14: "\u00BC", - frac12: "\u00BD", - frac34: "\u00BE", - iquest: "\u00BF", - Agrave: "\u00C0", - Aacute: "\u00C1", - Acirc: "\u00C2", - Atilde: "\u00C3", - Auml: "\u00C4", - Aring: "\u00C5", - AElig: "\u00C6", - Ccedil: "\u00C7", - Egrave: "\u00C8", - Eacute: "\u00C9", - Ecirc: "\u00CA", - Euml: "\u00CB", - Igrave: "\u00CC", - Iacute: "\u00CD", - Icirc: "\u00CE", - Iuml: "\u00CF", - ETH: "\u00D0", - Ntilde: "\u00D1", - Ograve: "\u00D2", - Oacute: "\u00D3", - Ocirc: "\u00D4", - Otilde: "\u00D5", - Ouml: "\u00D6", - times: "\u00D7", - Oslash: "\u00D8", - Ugrave: "\u00D9", - Uacute: "\u00DA", - Ucirc: "\u00DB", - Uuml: "\u00DC", - Yacute: "\u00DD", - THORN: "\u00DE", - szlig: "\u00DF", - agrave: "\u00E0", - aacute: "\u00E1", - acirc: "\u00E2", - atilde: "\u00E3", - auml: "\u00E4", - aring: "\u00E5", - aelig: "\u00E6", - ccedil: "\u00E7", - egrave: "\u00E8", - eacute: "\u00E9", - ecirc: "\u00EA", - euml: "\u00EB", - igrave: "\u00EC", - iacute: "\u00ED", - icirc: "\u00EE", - iuml: "\u00EF", - eth: "\u00F0", - ntilde: "\u00F1", - ograve: "\u00F2", - oacute: "\u00F3", - ocirc: "\u00F4", - otilde: "\u00F5", - ouml: "\u00F6", - divide: "\u00F7", - oslash: "\u00F8", - ugrave: "\u00F9", - uacute: "\u00FA", - ucirc: "\u00FB", - uuml: "\u00FC", - yacute: "\u00FD", - thorn: "\u00FE", - yuml: "\u00FF", - OElig: "\u0152", - oelig: "\u0153", - Scaron: "\u0160", - scaron: "\u0161", - Yuml: "\u0178", - fnof: "\u0192", - circ: "\u02C6", - tilde: "\u02DC", - Alpha: "\u0391", - Beta: "\u0392", - Gamma: "\u0393", - Delta: "\u0394", - Epsilon: "\u0395", - Zeta: "\u0396", - Eta: "\u0397", - Theta: "\u0398", - Iota: "\u0399", - Kappa: "\u039A", - Lambda: "\u039B", - Mu: "\u039C", - Nu: "\u039D", - Xi: "\u039E", - Omicron: "\u039F", - Pi: "\u03A0", - Rho: "\u03A1", - Sigma: "\u03A3", - Tau: "\u03A4", - Upsilon: "\u03A5", - Phi: "\u03A6", - Chi: "\u03A7", - Psi: "\u03A8", - Omega: "\u03A9", - alpha: "\u03B1", - beta: "\u03B2", - gamma: "\u03B3", - delta: "\u03B4", - epsilon: "\u03B5", - zeta: "\u03B6", - eta: "\u03B7", - theta: "\u03B8", - iota: "\u03B9", - kappa: "\u03BA", - lambda: "\u03BB", - mu: "\u03BC", - nu: "\u03BD", - xi: "\u03BE", - omicron: "\u03BF", - pi: "\u03C0", - rho: "\u03C1", - sigmaf: "\u03C2", - sigma: "\u03C3", - tau: "\u03C4", - upsilon: "\u03C5", - phi: "\u03C6", - chi: "\u03C7", - psi: "\u03C8", - omega: "\u03C9", - thetasym: "\u03D1", - upsih: "\u03D2", - piv: "\u03D6", - ensp: "\u2002", - emsp: "\u2003", - thinsp: "\u2009", - zwnj: "\u200C", - zwj: "\u200D", - lrm: "\u200E", - rlm: "\u200F", - ndash: "\u2013", - mdash: "\u2014", - lsquo: "\u2018", - rsquo: "\u2019", - sbquo: "\u201A", - ldquo: "\u201C", - rdquo: "\u201D", - bdquo: "\u201E", - dagger: "\u2020", - Dagger: "\u2021", - bull: "\u2022", - hellip: "\u2026", - permil: "\u2030", - prime: "\u2032", - Prime: "\u2033", - lsaquo: "\u2039", - rsaquo: "\u203A", - oline: "\u203E", - frasl: "\u2044", - euro: "\u20AC", - image: "\u2111", - weierp: "\u2118", - real: "\u211C", - trade: "\u2122", - alefsym: "\u2135", - larr: "\u2190", - uarr: "\u2191", - rarr: "\u2192", - darr: "\u2193", - harr: "\u2194", - crarr: "\u21B5", - lArr: "\u21D0", - uArr: "\u21D1", - rArr: "\u21D2", - dArr: "\u21D3", - hArr: "\u21D4", - forall: "\u2200", - part: "\u2202", - exist: "\u2203", - empty: "\u2205", - nabla: "\u2207", - isin: "\u2208", - notin: "\u2209", - ni: "\u220B", - prod: "\u220F", - sum: "\u2211", - minus: "\u2212", - lowast: "\u2217", - radic: "\u221A", - prop: "\u221D", - infin: "\u221E", - ang: "\u2220", - and: "\u2227", - or: "\u2228", - cap: "\u2229", - cup: "\u222A", - int: "\u222B", - there4: "\u2234", - sim: "\u223C", - cong: "\u2245", - asymp: "\u2248", - ne: "\u2260", - equiv: "\u2261", - le: "\u2264", - ge: "\u2265", - sub: "\u2282", - sup: "\u2283", - nsub: "\u2284", - sube: "\u2286", - supe: "\u2287", - oplus: "\u2295", - otimes: "\u2297", - perp: "\u22A5", - sdot: "\u22C5", - lceil: "\u2308", - rceil: "\u2309", - lfloor: "\u230A", - rfloor: "\u230B", - lang: "\u2329", - rang: "\u232A", - loz: "\u25CA", - spades: "\u2660", - clubs: "\u2663", - hearts: "\u2665", - diams: "\u2666" - }; - const JsxErrors = ParseErrorEnum`jsx`({ - AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.", - MissingClosingTagElement: ({ - openingTagName - }) => `Expected corresponding JSX closing tag for <${openingTagName}>.`, - MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.", - UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?", - UnexpectedToken: ({ - unexpected, - HTMLEntity - }) => `Unexpected token \`${unexpected}\`. Did you mean \`${HTMLEntity}\` or \`{'${unexpected}'}\`?`, - UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.", - UnterminatedJsxContent: "Unterminated JSX contents.", - UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?" - }); - function isFragment(object) { - return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; - } - function getQualifiedJSXName(object) { - if (object.type === "JSXIdentifier") { - return object.name; - } - if (object.type === "JSXNamespacedName") { - return object.namespace.name + ":" + object.name.name; - } - if (object.type === "JSXMemberExpression") { - return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); - } - throw new Error("Node had unexpected type: " + object.type); - } - var jsx = superClass => class JSXParserMixin extends superClass { - jsxReadToken() { - let out = ""; - let chunkStart = this.state.pos; - for (;;) { - if (this.state.pos >= this.length) { - throw this.raise(JsxErrors.UnterminatedJsxContent, this.state.startLoc); - } - const ch = this.input.charCodeAt(this.state.pos); - switch (ch) { - case 60: - case 123: - if (this.state.pos === this.state.start) { - if (ch === 60 && this.state.canStartJSXElement) { - ++this.state.pos; - this.finishToken(142); - } else { - super.getTokenFromCode(ch); - } - return; - } - out += this.input.slice(chunkStart, this.state.pos); - this.finishToken(141, out); - return; - case 38: - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - break; - case 62: - case 125: - default: - if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(true); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - } - } - jsxReadNewLine(normalizeCRLF) { - const ch = this.input.charCodeAt(this.state.pos); - let out; - ++this.state.pos; - if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - out = normalizeCRLF ? "\n" : "\r\n"; - } else { - out = String.fromCharCode(ch); - } - ++this.state.curLine; - this.state.lineStart = this.state.pos; - return out; - } - jsxReadString(quote) { - let out = ""; - let chunkStart = ++this.state.pos; - for (;;) { - if (this.state.pos >= this.length) { - throw this.raise(Errors.UnterminatedString, this.state.startLoc); - } - const ch = this.input.charCodeAt(this.state.pos); - if (ch === quote) break; - if (ch === 38) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(false); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - out += this.input.slice(chunkStart, this.state.pos++); - this.finishToken(133, out); - } - jsxReadEntity() { - const startPos = ++this.state.pos; - if (this.codePointAtPos(this.state.pos) === 35) { - ++this.state.pos; - let radix = 10; - if (this.codePointAtPos(this.state.pos) === 120) { - radix = 16; - ++this.state.pos; - } - const codePoint = this.readInt(radix, undefined, false, "bail"); - if (codePoint !== null && this.codePointAtPos(this.state.pos) === 59) { - ++this.state.pos; - return String.fromCodePoint(codePoint); - } - } else { - let count = 0; - let semi = false; - while (count++ < 10 && this.state.pos < this.length && !(semi = this.codePointAtPos(this.state.pos) === 59)) { - ++this.state.pos; - } - if (semi) { - const desc = this.input.slice(startPos, this.state.pos); - const entity = entities[desc]; - ++this.state.pos; - if (entity) { - return entity; - } - } - } - this.state.pos = startPos; - return "&"; - } - jsxReadWord() { - let ch; - const start = this.state.pos; - do { - ch = this.input.charCodeAt(++this.state.pos); - } while (isIdentifierChar(ch) || ch === 45); - this.finishToken(140, this.input.slice(start, this.state.pos)); - } - jsxParseIdentifier() { - const node = this.startNode(); - if (this.match(140)) { - node.name = this.state.value; - } else if (tokenIsKeyword(this.state.type)) { - node.name = tokenLabelName(this.state.type); - } else { - this.unexpected(); - } - this.next(); - return this.finishNode(node, "JSXIdentifier"); - } - jsxParseNamespacedName() { - const startLoc = this.state.startLoc; - const name = this.jsxParseIdentifier(); - if (!this.eat(14)) return name; - const node = this.startNodeAt(startLoc); - node.namespace = name; - node.name = this.jsxParseIdentifier(); - return this.finishNode(node, "JSXNamespacedName"); - } - jsxParseElementName() { - const startLoc = this.state.startLoc; - let node = this.jsxParseNamespacedName(); - if (node.type === "JSXNamespacedName") { - return node; - } - while (this.eat(16)) { - const newNode = this.startNodeAt(startLoc); - newNode.object = node; - newNode.property = this.jsxParseIdentifier(); - node = this.finishNode(newNode, "JSXMemberExpression"); - } - return node; - } - jsxParseAttributeValue() { - let node; - switch (this.state.type) { - case 5: - node = this.startNode(); - this.setContext(types.brace); - this.next(); - node = this.jsxParseExpressionContainer(node, types.j_oTag); - if (node.expression.type === "JSXEmptyExpression") { - this.raise(JsxErrors.AttributeIsEmpty, node); - } - return node; - case 142: - case 133: - return this.parseExprAtom(); - default: - throw this.raise(JsxErrors.UnsupportedJsxValue, this.state.startLoc); - } - } - jsxParseEmptyExpression() { - const node = this.startNodeAt(this.state.lastTokEndLoc); - return this.finishNodeAt(node, "JSXEmptyExpression", this.state.startLoc); - } - jsxParseSpreadChild(node) { - this.next(); - node.expression = this.parseExpression(); - this.setContext(types.j_expr); - this.state.canStartJSXElement = true; - this.expect(8); - return this.finishNode(node, "JSXSpreadChild"); - } - jsxParseExpressionContainer(node, previousContext) { - if (this.match(8)) { - node.expression = this.jsxParseEmptyExpression(); - } else { - const expression = this.parseExpression(); - node.expression = expression; - } - this.setContext(previousContext); - this.state.canStartJSXElement = true; - this.expect(8); - return this.finishNode(node, "JSXExpressionContainer"); - } - jsxParseAttribute() { - const node = this.startNode(); - if (this.match(5)) { - this.setContext(types.brace); - this.next(); - this.expect(21); - node.argument = this.parseMaybeAssignAllowIn(); - this.setContext(types.j_oTag); - this.state.canStartJSXElement = true; - this.expect(8); - return this.finishNode(node, "JSXSpreadAttribute"); - } - node.name = this.jsxParseNamespacedName(); - node.value = this.eat(29) ? this.jsxParseAttributeValue() : null; - return this.finishNode(node, "JSXAttribute"); - } - jsxParseOpeningElementAt(startLoc) { - const node = this.startNodeAt(startLoc); - if (this.eat(143)) { - return this.finishNode(node, "JSXOpeningFragment"); - } - node.name = this.jsxParseElementName(); - return this.jsxParseOpeningElementAfterName(node); - } - jsxParseOpeningElementAfterName(node) { - const attributes = []; - while (!this.match(56) && !this.match(143)) { - attributes.push(this.jsxParseAttribute()); - } - node.attributes = attributes; - node.selfClosing = this.eat(56); - this.expect(143); - return this.finishNode(node, "JSXOpeningElement"); - } - jsxParseClosingElementAt(startLoc) { - const node = this.startNodeAt(startLoc); - if (this.eat(143)) { - return this.finishNode(node, "JSXClosingFragment"); - } - node.name = this.jsxParseElementName(); - this.expect(143); - return this.finishNode(node, "JSXClosingElement"); - } - jsxParseElementAt(startLoc) { - const node = this.startNodeAt(startLoc); - const children = []; - const openingElement = this.jsxParseOpeningElementAt(startLoc); - let closingElement = null; - if (!openingElement.selfClosing) { - contents: for (;;) { - switch (this.state.type) { - case 142: - startLoc = this.state.startLoc; - this.next(); - if (this.eat(56)) { - closingElement = this.jsxParseClosingElementAt(startLoc); - break contents; - } - children.push(this.jsxParseElementAt(startLoc)); - break; - case 141: - children.push(this.parseLiteral(this.state.value, "JSXText")); - break; - case 5: - { - const node = this.startNode(); - this.setContext(types.brace); - this.next(); - if (this.match(21)) { - children.push(this.jsxParseSpreadChild(node)); - } else { - children.push(this.jsxParseExpressionContainer(node, types.j_expr)); - } - break; - } - default: - this.unexpected(); - } - } - if (isFragment(openingElement) && !isFragment(closingElement) && closingElement !== null) { - this.raise(JsxErrors.MissingClosingTagFragment, closingElement); - } else if (!isFragment(openingElement) && isFragment(closingElement)) { - this.raise(JsxErrors.MissingClosingTagElement, closingElement, { - openingTagName: getQualifiedJSXName(openingElement.name) - }); - } else if (!isFragment(openingElement) && !isFragment(closingElement)) { - if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { - this.raise(JsxErrors.MissingClosingTagElement, closingElement, { - openingTagName: getQualifiedJSXName(openingElement.name) - }); - } - } - } - if (isFragment(openingElement)) { - node.openingFragment = openingElement; - node.closingFragment = closingElement; - } else { - node.openingElement = openingElement; - node.closingElement = closingElement; - } - node.children = children; - if (this.match(47)) { - throw this.raise(JsxErrors.UnwrappedAdjacentJSXElements, this.state.startLoc); - } - return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); - } - jsxParseElement() { - const startLoc = this.state.startLoc; - this.next(); - return this.jsxParseElementAt(startLoc); - } - setContext(newContext) { - const { - context - } = this.state; - context[context.length - 1] = newContext; - } - parseExprAtom(refExpressionErrors) { - if (this.match(142)) { - return this.jsxParseElement(); - } else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) { - this.replaceToken(142); - return this.jsxParseElement(); - } else { - return super.parseExprAtom(refExpressionErrors); - } - } - skipSpace() { - const curContext = this.curContext(); - if (!curContext.preserveSpace) super.skipSpace(); - } - getTokenFromCode(code) { - const context = this.curContext(); - if (context === types.j_expr) { - this.jsxReadToken(); - return; - } - if (context === types.j_oTag || context === types.j_cTag) { - if (isIdentifierStart(code)) { - this.jsxReadWord(); - return; - } - if (code === 62) { - ++this.state.pos; - this.finishToken(143); - return; - } - if ((code === 34 || code === 39) && context === types.j_oTag) { - this.jsxReadString(code); - return; - } - } - if (code === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) { - ++this.state.pos; - this.finishToken(142); - return; - } - super.getTokenFromCode(code); - } - updateContext(prevType) { - const { - context, - type - } = this.state; - if (type === 56 && prevType === 142) { - context.splice(-2, 2, types.j_cTag); - this.state.canStartJSXElement = false; - } else if (type === 142) { - context.push(types.j_oTag); - } else if (type === 143) { - const out = context[context.length - 1]; - if (out === types.j_oTag && prevType === 56 || out === types.j_cTag) { - context.pop(); - this.state.canStartJSXElement = context[context.length - 1] === types.j_expr; - } else { - this.setContext(types.j_expr); - this.state.canStartJSXElement = true; - } - } else { - this.state.canStartJSXElement = tokenComesBeforeExpression(type); - } - } - }; - class TypeScriptScope extends Scope { - constructor(...args) { - super(...args); - this.tsNames = new Map(); - } - } - class TypeScriptScopeHandler extends ScopeHandler { - constructor(...args) { - super(...args); - this.importsStack = []; - } - createScope(flags) { - this.importsStack.push(new Set()); - return new TypeScriptScope(flags); - } - enter(flags) { - if (flags === 256) { - this.importsStack.push(new Set()); - } - super.enter(flags); - } - exit() { - const flags = super.exit(); - if (flags === 256) { - this.importsStack.pop(); - } - return flags; - } - hasImport(name, allowShadow) { - const len = this.importsStack.length; - if (this.importsStack[len - 1].has(name)) { - return true; - } - if (!allowShadow && len > 1) { - for (let i = 0; i < len - 1; i++) { - if (this.importsStack[i].has(name)) return true; - } - } - return false; - } - declareName(name, bindingType, loc) { - if (bindingType & 4096) { - if (this.hasImport(name, true)) { - this.parser.raise(Errors.VarRedeclaration, loc, { - identifierName: name - }); - } - this.importsStack[this.importsStack.length - 1].add(name); - return; - } - const scope = this.currentScope(); - let type = scope.tsNames.get(name) || 0; - if (bindingType & 1024) { - this.maybeExportDefined(scope, name); - scope.tsNames.set(name, type | 16); - return; - } - super.declareName(name, bindingType, loc); - if (bindingType & 2) { - if (!(bindingType & 1)) { - this.checkRedeclarationInScope(scope, name, bindingType, loc); - this.maybeExportDefined(scope, name); - } - type = type | 1; - } - if (bindingType & 256) { - type = type | 2; - } - if (bindingType & 512) { - type = type | 4; - } - if (bindingType & 128) { - type = type | 8; - } - if (type) scope.tsNames.set(name, type); - } - isRedeclaredInScope(scope, name, bindingType) { - const type = scope.tsNames.get(name); - if ((type & 2) > 0) { - if (bindingType & 256) { - const isConst = !!(bindingType & 512); - const wasConst = (type & 4) > 0; - return isConst !== wasConst; - } - return true; - } - if (bindingType & 128 && (type & 8) > 0) { - if (scope.names.get(name) & 2) { - return !!(bindingType & 1); - } else { - return false; - } - } - if (bindingType & 2 && (type & 1) > 0) { - return true; - } - return super.isRedeclaredInScope(scope, name, bindingType); - } - checkLocalExport(id) { - const { - name - } = id; - if (this.hasImport(name)) return; - const len = this.scopeStack.length; - for (let i = len - 1; i >= 0; i--) { - const scope = this.scopeStack[i]; - const type = scope.tsNames.get(name); - if ((type & 1) > 0 || (type & 16) > 0) { - return; - } - } - super.checkLocalExport(id); - } - } - const unwrapParenthesizedExpression = node => { - return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node; - }; - class LValParser extends NodeUtils { - toAssignable(node, isLHS = false) { - var _node$extra, _node$extra3; - let parenthesized = undefined; - if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) { - parenthesized = unwrapParenthesizedExpression(node); - if (isLHS) { - if (parenthesized.type === "Identifier") { - this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, node); - } else if (parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized)) { - this.raise(Errors.InvalidParenthesizedAssignment, node); - } - } else { - this.raise(Errors.InvalidParenthesizedAssignment, node); - } - } - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - case "RestElement": - break; - case "ObjectExpression": - node.type = "ObjectPattern"; - for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) { - var _node$extra2; - const prop = node.properties[i]; - const isLast = i === last; - this.toAssignableObjectExpressionProp(prop, isLast, isLHS); - if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingCommaLoc) { - this.raise(Errors.RestTrailingComma, node.extra.trailingCommaLoc); - } - } - break; - case "ObjectProperty": - { - const { - key, - value - } = node; - if (this.isPrivateName(key)) { - this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); - } - this.toAssignable(value, isLHS); - break; - } - case "SpreadElement": - { - throw new Error("Internal @babel/parser error (this is a bug, please report it)." + " SpreadElement should be converted by .toAssignable's caller."); - } - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingCommaLoc, isLHS); - break; - case "AssignmentExpression": - if (node.operator !== "=") { - this.raise(Errors.MissingEqInAssignment, node.left.loc.end); - } - node.type = "AssignmentPattern"; - delete node.operator; - this.toAssignable(node.left, isLHS); - break; - case "ParenthesizedExpression": - this.toAssignable(parenthesized, isLHS); - break; - } - } - toAssignableObjectExpressionProp(prop, isLast, isLHS) { - if (prop.type === "ObjectMethod") { - this.raise(prop.kind === "get" || prop.kind === "set" ? Errors.PatternHasAccessor : Errors.PatternHasMethod, prop.key); - } else if (prop.type === "SpreadElement") { - prop.type = "RestElement"; - const arg = prop.argument; - this.checkToRestConversion(arg, false); - this.toAssignable(arg, isLHS); - if (!isLast) { - this.raise(Errors.RestTrailingComma, prop); - } - } else { - this.toAssignable(prop, isLHS); - } - } - toAssignableList(exprList, trailingCommaLoc, isLHS) { - const end = exprList.length - 1; - for (let i = 0; i <= end; i++) { - const elt = exprList[i]; - if (!elt) continue; - if (elt.type === "SpreadElement") { - elt.type = "RestElement"; - const arg = elt.argument; - this.checkToRestConversion(arg, true); - this.toAssignable(arg, isLHS); - } else { - this.toAssignable(elt, isLHS); - } - if (elt.type === "RestElement") { - if (i < end) { - this.raise(Errors.RestTrailingComma, elt); - } else if (trailingCommaLoc) { - this.raise(Errors.RestTrailingComma, trailingCommaLoc); - } - } - } - } - isAssignable(node, isBinding) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - case "RestElement": - return true; - case "ObjectExpression": - { - const last = node.properties.length - 1; - return node.properties.every((prop, i) => { - return prop.type !== "ObjectMethod" && (i === last || prop.type !== "SpreadElement") && this.isAssignable(prop); - }); - } - case "ObjectProperty": - return this.isAssignable(node.value); - case "SpreadElement": - return this.isAssignable(node.argument); - case "ArrayExpression": - return node.elements.every(element => element === null || this.isAssignable(element)); - case "AssignmentExpression": - return node.operator === "="; - case "ParenthesizedExpression": - return this.isAssignable(node.expression); - case "MemberExpression": - case "OptionalMemberExpression": - return !isBinding; - default: - return false; - } - } - toReferencedList(exprList, isParenthesizedExpr) { - return exprList; - } - toReferencedListDeep(exprList, isParenthesizedExpr) { - this.toReferencedList(exprList, isParenthesizedExpr); - for (const expr of exprList) { - if ((expr == null ? void 0 : expr.type) === "ArrayExpression") { - this.toReferencedListDeep(expr.elements); - } - } - } - parseSpread(refExpressionErrors) { - const node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, undefined); - return this.finishNode(node, "SpreadElement"); - } - parseRestBinding() { - const node = this.startNode(); - this.next(); - node.argument = this.parseBindingAtom(); - return this.finishNode(node, "RestElement"); - } - parseBindingAtom() { - switch (this.state.type) { - case 0: - { - const node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(3, 93, 1); - return this.finishNode(node, "ArrayPattern"); - } - case 5: - return this.parseObjectLike(8, true); - } - return this.parseIdentifier(); - } - parseBindingList(close, closeCharCode, flags) { - const allowEmpty = flags & 1; - const elts = []; - let first = true; - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(12); - } - if (allowEmpty && this.match(12)) { - elts.push(null); - } else if (this.eat(close)) { - break; - } else if (this.match(21)) { - elts.push(this.parseAssignableListItemTypes(this.parseRestBinding(), flags)); - if (!this.checkCommaAfterRest(closeCharCode)) { - this.expect(close); - break; - } - } else { - const decorators = []; - if (this.match(26) && this.hasPlugin("decorators")) { - this.raise(Errors.UnsupportedParameterDecorator, this.state.startLoc); - } - while (this.match(26)) { - decorators.push(this.parseDecorator()); - } - elts.push(this.parseAssignableListItem(flags, decorators)); - } - } - return elts; - } - parseBindingRestProperty(prop) { - this.next(); - prop.argument = this.parseIdentifier(); - this.checkCommaAfterRest(125); - return this.finishNode(prop, "RestElement"); - } - parseBindingProperty() { - const { - type, - startLoc - } = this.state; - if (type === 21) { - return this.parseBindingRestProperty(this.startNode()); - } - const prop = this.startNode(); - if (type === 138) { - this.expectPlugin("destructuringPrivate", startLoc); - this.classScope.usePrivateName(this.state.value, startLoc); - prop.key = this.parsePrivateName(); - } else { - this.parsePropertyName(prop); - } - prop.method = false; - return this.parseObjPropValue(prop, startLoc, false, false, true, false); - } - parseAssignableListItem(flags, decorators) { - const left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left, flags); - const elt = this.parseMaybeDefault(left.loc.start, left); - if (decorators.length) { - left.decorators = decorators; - } - return elt; - } - parseAssignableListItemTypes(param, flags) { - return param; - } - parseMaybeDefault(startLoc, left) { - var _startLoc, _left; - (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc; - left = (_left = left) != null ? _left : this.parseBindingAtom(); - if (!this.eat(29)) return left; - const node = this.startNodeAt(startLoc); - node.left = left; - node.right = this.parseMaybeAssignAllowIn(); - return this.finishNode(node, "AssignmentPattern"); - } - isValidLVal(type, isUnparenthesizedInAssign, binding) { - switch (type) { - case "AssignmentPattern": - return "left"; - case "RestElement": - return "argument"; - case "ObjectProperty": - return "value"; - case "ParenthesizedExpression": - return "expression"; - case "ArrayPattern": - return "elements"; - case "ObjectPattern": - return "properties"; - } - return false; - } - isOptionalMemberExpression(expression) { - return expression.type === "OptionalMemberExpression"; - } - checkLVal(expression, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false) { - var _expression$extra; - const type = expression.type; - if (this.isObjectMethod(expression)) return; - const isOptionalMemberExpression = this.isOptionalMemberExpression(expression); - if (isOptionalMemberExpression || type === "MemberExpression") { - if (isOptionalMemberExpression) { - this.expectPlugin("optionalChainingAssign", expression.loc.start); - if (ancestor.type !== "AssignmentExpression") { - this.raise(Errors.InvalidLhsOptionalChaining, expression, { - ancestor - }); - } - } - if (binding !== 64) { - this.raise(Errors.InvalidPropertyBindingPattern, expression); - } - return; - } - if (type === "Identifier") { - this.checkIdentifier(expression, binding, strictModeChanged); - const { - name - } = expression; - if (checkClashes) { - if (checkClashes.has(name)) { - this.raise(Errors.ParamDupe, expression); - } else { - checkClashes.add(name); - } - } - return; - } - const validity = this.isValidLVal(type, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding); - if (validity === true) return; - if (validity === false) { - const ParseErrorClass = binding === 64 ? Errors.InvalidLhs : Errors.InvalidLhsBinding; - this.raise(ParseErrorClass, expression, { - ancestor - }); - return; - } - let key, isParenthesizedExpression; - if (typeof validity === "string") { - key = validity; - isParenthesizedExpression = type === "ParenthesizedExpression"; - } else { - [key, isParenthesizedExpression] = validity; - } - const nextAncestor = type === "ArrayPattern" || type === "ObjectPattern" ? { - type - } : ancestor; - const val = expression[key]; - if (Array.isArray(val)) { - for (const child of val) { - if (child) { - this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression); - } - } - } else if (val) { - this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression); - } - } - checkIdentifier(at, bindingType, strictModeChanged = false) { - if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name))) { - if (bindingType === 64) { - this.raise(Errors.StrictEvalArguments, at, { - referenceName: at.name - }); - } else { - this.raise(Errors.StrictEvalArgumentsBinding, at, { - bindingName: at.name - }); - } - } - if (bindingType & 8192 && at.name === "let") { - this.raise(Errors.LetInLexicalBinding, at); - } - if (!(bindingType & 64)) { - this.declareNameFromIdentifier(at, bindingType); - } - } - declareNameFromIdentifier(identifier, binding) { - this.scope.declareName(identifier.name, binding, identifier.loc.start); - } - checkToRestConversion(node, allowPattern) { - switch (node.type) { - case "ParenthesizedExpression": - this.checkToRestConversion(node.expression, allowPattern); - break; - case "Identifier": - case "MemberExpression": - break; - case "ArrayExpression": - case "ObjectExpression": - if (allowPattern) break; - default: - this.raise(Errors.InvalidRestAssignmentPattern, node); - } - } - checkCommaAfterRest(close) { - if (!this.match(12)) { - return false; - } - this.raise(this.lookaheadCharCode() === close ? Errors.RestTrailingComma : Errors.ElementAfterRest, this.state.startLoc); - return true; - } - } - function nonNull(x) { - if (x == null) { - throw new Error(`Unexpected ${x} value.`); - } - return x; - } - function assert(x) { - if (!x) { - throw new Error("Assert fail"); - } - } - const TSErrors = ParseErrorEnum`typescript`({ - AbstractMethodHasImplementation: ({ - methodName - }) => `Method '${methodName}' cannot have an implementation because it is marked abstract.`, - AbstractPropertyHasInitializer: ({ - propertyName - }) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`, - AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", - AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.", - AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.", - ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", - ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", - ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", - ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.", - DeclareAccessor: ({ - kind - }) => `'declare' is not allowed in ${kind}ters.`, - DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.", - DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.", - DuplicateAccessibilityModifier: ({ - modifier - }) => `Accessibility modifier already seen.`, - DuplicateModifier: ({ - modifier - }) => `Duplicate modifier: '${modifier}'.`, - EmptyHeritageClauseType: ({ - token - }) => `'${token}' list cannot be empty.`, - EmptyTypeArguments: "Type argument list cannot be empty.", - EmptyTypeParameters: "Type parameter list cannot be empty.", - ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.", - ImportAliasHasImportType: "An import alias can not use 'import type'.", - ImportReflectionHasImportType: "An `import module` declaration can not use `type` modifier", - IncompatibleModifiers: ({ - modifiers - }) => `'${modifiers[0]}' modifier cannot be used with '${modifiers[1]}' modifier.`, - IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.", - IndexSignatureHasAccessibility: ({ - modifier - }) => `Index signatures cannot have an accessibility modifier ('${modifier}').`, - IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.", - IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.", - IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.", - InitializerNotAllowedInAmbientContext: "Initializers are not allowed in ambient contexts.", - InvalidModifierOnTypeMember: ({ - modifier - }) => `'${modifier}' modifier cannot appear on a type member.`, - InvalidModifierOnTypeParameter: ({ - modifier - }) => `'${modifier}' modifier cannot appear on a type parameter.`, - InvalidModifierOnTypeParameterPositions: ({ - modifier - }) => `'${modifier}' modifier can only appear on a type parameter of a class, interface or type alias.`, - InvalidModifiersOrder: ({ - orderedModifiers - }) => `'${orderedModifiers[0]}' modifier must precede '${orderedModifiers[1]}' modifier.`, - InvalidPropertyAccessAfterInstantiationExpression: "Invalid property access after an instantiation expression. " + "You can either wrap the instantiation expression in parentheses, or delete the type arguments.", - InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.", - MissingInterfaceName: "'interface' declarations must be followed by an identifier.", - NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.", - NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.", - OptionalTypeBeforeRequired: "A required element cannot follow an optional element.", - OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.", - PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.", - PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.", - PrivateElementHasAccessibility: ({ - modifier - }) => `Private elements cannot have an accessibility modifier ('${modifier}').`, - ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.", - ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.", - ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.", - SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", - SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", - SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", - SingleTypeParameterWithoutTrailingComma: ({ - typeParameterName - }) => `Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`, - StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", - TupleOptionalAfterType: "A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).", - TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", - TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", - TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", - TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", - UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", - UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", - UnexpectedTypeAnnotation: "Did not expect a type annotation here.", - UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", - UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", - UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", - UnsupportedSignatureParameterKind: ({ - type - }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.` - }); - function keywordTypeFromName(value) { - switch (value) { - case "any": - return "TSAnyKeyword"; - case "boolean": - return "TSBooleanKeyword"; - case "bigint": - return "TSBigIntKeyword"; - case "never": - return "TSNeverKeyword"; - case "number": - return "TSNumberKeyword"; - case "object": - return "TSObjectKeyword"; - case "string": - return "TSStringKeyword"; - case "symbol": - return "TSSymbolKeyword"; - case "undefined": - return "TSUndefinedKeyword"; - case "unknown": - return "TSUnknownKeyword"; - default: - return undefined; - } - } - function tsIsAccessModifier(modifier) { - return modifier === "private" || modifier === "public" || modifier === "protected"; - } - function tsIsVarianceAnnotations(modifier) { - return modifier === "in" || modifier === "out"; - } - var typescript = superClass => class TypeScriptParserMixin extends superClass { - constructor(...args) { - super(...args); - this.tsParseInOutModifiers = this.tsParseModifiers.bind(this, { - allowedModifiers: ["in", "out"], - disallowedModifiers: ["const", "public", "private", "protected", "readonly", "declare", "abstract", "override"], - errorTemplate: TSErrors.InvalidModifierOnTypeParameter - }); - this.tsParseConstModifier = this.tsParseModifiers.bind(this, { - allowedModifiers: ["const"], - disallowedModifiers: ["in", "out"], - errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions - }); - this.tsParseInOutConstModifiers = this.tsParseModifiers.bind(this, { - allowedModifiers: ["in", "out", "const"], - disallowedModifiers: ["public", "private", "protected", "readonly", "declare", "abstract", "override"], - errorTemplate: TSErrors.InvalidModifierOnTypeParameter - }); - } - getScopeHandler() { - return TypeScriptScopeHandler; - } - tsIsIdentifier() { - return tokenIsIdentifier(this.state.type); - } - tsTokenCanFollowModifier() { - return (this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(138) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak(); - } - tsNextTokenCanFollowModifier() { - this.next(); - return this.tsTokenCanFollowModifier(); - } - tsParseModifier(allowedModifiers, stopOnStartOfClassStaticBlock) { - if (!tokenIsIdentifier(this.state.type) && this.state.type !== 58 && this.state.type !== 75) { - return undefined; - } - const modifier = this.state.value; - if (allowedModifiers.includes(modifier)) { - if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) { - return undefined; - } - if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { - return modifier; - } - } - return undefined; - } - tsParseModifiers({ - allowedModifiers, - disallowedModifiers, - stopOnStartOfClassStaticBlock, - errorTemplate = TSErrors.InvalidModifierOnTypeMember - }, modified) { - const enforceOrder = (loc, modifier, before, after) => { - if (modifier === before && modified[after]) { - this.raise(TSErrors.InvalidModifiersOrder, loc, { - orderedModifiers: [before, after] - }); - } - }; - const incompatible = (loc, modifier, mod1, mod2) => { - if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) { - this.raise(TSErrors.IncompatibleModifiers, loc, { - modifiers: [mod1, mod2] - }); - } - }; - for (;;) { - const { - startLoc - } = this.state; - const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []), stopOnStartOfClassStaticBlock); - if (!modifier) break; - if (tsIsAccessModifier(modifier)) { - if (modified.accessibility) { - this.raise(TSErrors.DuplicateAccessibilityModifier, startLoc, { - modifier - }); - } else { - enforceOrder(startLoc, modifier, modifier, "override"); - enforceOrder(startLoc, modifier, modifier, "static"); - enforceOrder(startLoc, modifier, modifier, "readonly"); - modified.accessibility = modifier; - } - } else if (tsIsVarianceAnnotations(modifier)) { - if (modified[modifier]) { - this.raise(TSErrors.DuplicateModifier, startLoc, { - modifier - }); - } - modified[modifier] = true; - enforceOrder(startLoc, modifier, "in", "out"); - } else { - if (hasOwnProperty.call(modified, modifier)) { - this.raise(TSErrors.DuplicateModifier, startLoc, { - modifier - }); - } else { - enforceOrder(startLoc, modifier, "static", "readonly"); - enforceOrder(startLoc, modifier, "static", "override"); - enforceOrder(startLoc, modifier, "override", "readonly"); - enforceOrder(startLoc, modifier, "abstract", "override"); - incompatible(startLoc, modifier, "declare", "override"); - incompatible(startLoc, modifier, "static", "abstract"); - } - modified[modifier] = true; - } - if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) { - this.raise(errorTemplate, startLoc, { - modifier - }); - } - } - } - tsIsListTerminator(kind) { - switch (kind) { - case "EnumMembers": - case "TypeMembers": - return this.match(8); - case "HeritageClauseElement": - return this.match(5); - case "TupleElementTypes": - return this.match(3); - case "TypeParametersOrArguments": - return this.match(48); - } - } - tsParseList(kind, parseElement) { - const result = []; - while (!this.tsIsListTerminator(kind)) { - result.push(parseElement()); - } - return result; - } - tsParseDelimitedList(kind, parseElement, refTrailingCommaPos) { - return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true, refTrailingCommaPos)); - } - tsParseDelimitedListWorker(kind, parseElement, expectSuccess, refTrailingCommaPos) { - const result = []; - let trailingCommaPos = -1; - for (;;) { - if (this.tsIsListTerminator(kind)) { - break; - } - trailingCommaPos = -1; - const element = parseElement(); - if (element == null) { - return undefined; - } - result.push(element); - if (this.eat(12)) { - trailingCommaPos = this.state.lastTokStartLoc.index; - continue; - } - if (this.tsIsListTerminator(kind)) { - break; - } - if (expectSuccess) { - this.expect(12); - } - return undefined; - } - if (refTrailingCommaPos) { - refTrailingCommaPos.value = trailingCommaPos; - } - return result; - } - tsParseBracketedList(kind, parseElement, bracket, skipFirstToken, refTrailingCommaPos) { - if (!skipFirstToken) { - if (bracket) { - this.expect(0); - } else { - this.expect(47); - } - } - const result = this.tsParseDelimitedList(kind, parseElement, refTrailingCommaPos); - if (bracket) { - this.expect(3); - } else { - this.expect(48); - } - return result; - } - tsParseImportType() { - const node = this.startNode(); - this.expect(83); - this.expect(10); - if (!this.match(133)) { - this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc); - } - node.argument = super.parseExprAtom(); - if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { - node.options = null; - } - if (this.eat(12)) { - this.expectImportAttributesPlugin(); - if (!this.match(11)) { - node.options = super.parseMaybeAssignAllowIn(); - this.eat(12); - } - } - this.expect(11); - if (this.eat(16)) { - node.qualifier = this.tsParseEntityName(); - } - if (this.match(47)) { - node.typeParameters = this.tsParseTypeArguments(); - } - return this.finishNode(node, "TSImportType"); - } - tsParseEntityName(allowReservedWords = true) { - let entity = this.parseIdentifier(allowReservedWords); - while (this.eat(16)) { - const node = this.startNodeAtNode(entity); - node.left = entity; - node.right = this.parseIdentifier(allowReservedWords); - entity = this.finishNode(node, "TSQualifiedName"); - } - return entity; - } - tsParseTypeReference() { - const node = this.startNode(); - node.typeName = this.tsParseEntityName(); - if (!this.hasPrecedingLineBreak() && this.match(47)) { - node.typeParameters = this.tsParseTypeArguments(); - } - return this.finishNode(node, "TSTypeReference"); - } - tsParseThisTypePredicate(lhs) { - this.next(); - const node = this.startNodeAtNode(lhs); - node.parameterName = lhs; - node.typeAnnotation = this.tsParseTypeAnnotation(false); - node.asserts = false; - return this.finishNode(node, "TSTypePredicate"); - } - tsParseThisTypeNode() { - const node = this.startNode(); - this.next(); - return this.finishNode(node, "TSThisType"); - } - tsParseTypeQuery() { - const node = this.startNode(); - this.expect(87); - if (this.match(83)) { - node.exprName = this.tsParseImportType(); - } else { - node.exprName = this.tsParseEntityName(); - } - if (!this.hasPrecedingLineBreak() && this.match(47)) { - node.typeParameters = this.tsParseTypeArguments(); - } - return this.finishNode(node, "TSTypeQuery"); - } - tsParseTypeParameter(parseModifiers) { - const node = this.startNode(); - parseModifiers(node); - node.name = this.tsParseTypeParameterName(); - node.constraint = this.tsEatThenParseType(81); - node.default = this.tsEatThenParseType(29); - return this.finishNode(node, "TSTypeParameter"); - } - tsTryParseTypeParameters(parseModifiers) { - if (this.match(47)) { - return this.tsParseTypeParameters(parseModifiers); - } - } - tsParseTypeParameters(parseModifiers) { - const node = this.startNode(); - if (this.match(47) || this.match(142)) { - this.next(); - } else { - this.unexpected(); - } - const refTrailingCommaPos = { - value: -1 - }; - node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, parseModifiers), false, true, refTrailingCommaPos); - if (node.params.length === 0) { - this.raise(TSErrors.EmptyTypeParameters, node); - } - if (refTrailingCommaPos.value !== -1) { - this.addExtra(node, "trailingComma", refTrailingCommaPos.value); - } - return this.finishNode(node, "TSTypeParameterDeclaration"); - } - tsFillSignature(returnToken, signature) { - const returnTokenRequired = returnToken === 19; - const paramsKey = "parameters"; - const returnTypeKey = "typeAnnotation"; - signature.typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); - this.expect(10); - signature[paramsKey] = this.tsParseBindingListForSignature(); - if (returnTokenRequired) { - signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } else if (this.match(returnToken)) { - signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } - } - tsParseBindingListForSignature() { - const list = super.parseBindingList(11, 41, 2); - for (const pattern of list) { - const { - type - } = pattern; - if (type === "AssignmentPattern" || type === "TSParameterProperty") { - this.raise(TSErrors.UnsupportedSignatureParameterKind, pattern, { - type - }); - } - } - return list; - } - tsParseTypeMemberSemicolon() { - if (!this.eat(12) && !this.isLineTerminator()) { - this.expect(13); - } - } - tsParseSignatureMember(kind, node) { - this.tsFillSignature(14, node); - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, kind); - } - tsIsUnambiguouslyIndexSignature() { - this.next(); - if (tokenIsIdentifier(this.state.type)) { - this.next(); - return this.match(14); - } - return false; - } - tsTryParseIndexSignature(node) { - if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { - return; - } - this.expect(0); - const id = this.parseIdentifier(); - id.typeAnnotation = this.tsParseTypeAnnotation(); - this.resetEndLocation(id); - this.expect(3); - node.parameters = [id]; - const type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, "TSIndexSignature"); - } - tsParsePropertyOrMethodSignature(node, readonly) { - if (this.eat(17)) node.optional = true; - const nodeAny = node; - if (this.match(10) || this.match(47)) { - if (readonly) { - this.raise(TSErrors.ReadonlyForMethodSignature, node); - } - const method = nodeAny; - if (method.kind && this.match(47)) { - this.raise(TSErrors.AccesorCannotHaveTypeParameters, this.state.curPosition()); - } - this.tsFillSignature(14, method); - this.tsParseTypeMemberSemicolon(); - const paramsKey = "parameters"; - const returnTypeKey = "typeAnnotation"; - if (method.kind === "get") { - if (method[paramsKey].length > 0) { - this.raise(Errors.BadGetterArity, this.state.curPosition()); - if (this.isThisParam(method[paramsKey][0])) { - this.raise(TSErrors.AccesorCannotDeclareThisParameter, this.state.curPosition()); - } - } - } else if (method.kind === "set") { - if (method[paramsKey].length !== 1) { - this.raise(Errors.BadSetterArity, this.state.curPosition()); - } else { - const firstParameter = method[paramsKey][0]; - if (this.isThisParam(firstParameter)) { - this.raise(TSErrors.AccesorCannotDeclareThisParameter, this.state.curPosition()); - } - if (firstParameter.type === "Identifier" && firstParameter.optional) { - this.raise(TSErrors.SetAccesorCannotHaveOptionalParameter, this.state.curPosition()); - } - if (firstParameter.type === "RestElement") { - this.raise(TSErrors.SetAccesorCannotHaveRestParameter, this.state.curPosition()); - } - } - if (method[returnTypeKey]) { - this.raise(TSErrors.SetAccesorCannotHaveReturnType, method[returnTypeKey]); - } - } else { - method.kind = "method"; - } - return this.finishNode(method, "TSMethodSignature"); - } else { - const property = nodeAny; - if (readonly) property.readonly = true; - const type = this.tsTryParseTypeAnnotation(); - if (type) property.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(property, "TSPropertySignature"); - } - } - tsParseTypeMember() { - const node = this.startNode(); - if (this.match(10) || this.match(47)) { - return this.tsParseSignatureMember("TSCallSignatureDeclaration", node); - } - if (this.match(77)) { - const id = this.startNode(); - this.next(); - if (this.match(10) || this.match(47)) { - return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node); - } else { - node.key = this.createIdentifier(id, "new"); - return this.tsParsePropertyOrMethodSignature(node, false); - } - } - this.tsParseModifiers({ - allowedModifiers: ["readonly"], - disallowedModifiers: ["declare", "abstract", "private", "protected", "public", "static", "override"] - }, node); - const idx = this.tsTryParseIndexSignature(node); - if (idx) { - return idx; - } - super.parsePropertyName(node); - if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) { - node.kind = node.key.name; - super.parsePropertyName(node); - } - return this.tsParsePropertyOrMethodSignature(node, !!node.readonly); - } - tsParseTypeLiteral() { - const node = this.startNode(); - node.members = this.tsParseObjectTypeMembers(); - return this.finishNode(node, "TSTypeLiteral"); - } - tsParseObjectTypeMembers() { - this.expect(5); - const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); - this.expect(8); - return members; - } - tsIsStartOfMappedType() { - this.next(); - if (this.eat(53)) { - return this.isContextual(122); - } - if (this.isContextual(122)) { - this.next(); - } - if (!this.match(0)) { - return false; - } - this.next(); - if (!this.tsIsIdentifier()) { - return false; - } - this.next(); - return this.match(58); - } - tsParseMappedTypeParameter() { - const node = this.startNode(); - node.name = this.tsParseTypeParameterName(); - node.constraint = this.tsExpectThenParseType(58); - return this.finishNode(node, "TSTypeParameter"); - } - tsParseMappedType() { - const node = this.startNode(); - this.expect(5); - if (this.match(53)) { - node.readonly = this.state.value; - this.next(); - this.expectContextual(122); - } else if (this.eatContextual(122)) { - node.readonly = true; - } - this.expect(0); - node.typeParameter = this.tsParseMappedTypeParameter(); - node.nameType = this.eatContextual(93) ? this.tsParseType() : null; - this.expect(3); - if (this.match(53)) { - node.optional = this.state.value; - this.next(); - this.expect(17); - } else if (this.eat(17)) { - node.optional = true; - } - node.typeAnnotation = this.tsTryParseType(); - this.semicolon(); - this.expect(8); - return this.finishNode(node, "TSMappedType"); - } - tsParseTupleType() { - const node = this.startNode(); - node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false); - let seenOptionalElement = false; - node.elementTypes.forEach(elementNode => { - const { - type - } = elementNode; - if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) { - this.raise(TSErrors.OptionalTypeBeforeRequired, elementNode); - } - seenOptionalElement || (seenOptionalElement = type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType"); - }); - return this.finishNode(node, "TSTupleType"); - } - tsParseTupleElementType() { - const { - startLoc - } = this.state; - const rest = this.eat(21); - let labeled; - let label; - let optional; - let type; - const isWord = tokenIsKeywordOrIdentifier(this.state.type); - const chAfterWord = isWord ? this.lookaheadCharCode() : null; - if (chAfterWord === 58) { - labeled = true; - optional = false; - label = this.parseIdentifier(true); - this.expect(14); - type = this.tsParseType(); - } else if (chAfterWord === 63) { - optional = true; - const startLoc = this.state.startLoc; - const wordName = this.state.value; - const typeOrLabel = this.tsParseNonArrayType(); - if (this.lookaheadCharCode() === 58) { - labeled = true; - label = this.createIdentifier(this.startNodeAt(startLoc), wordName); - this.expect(17); - this.expect(14); - type = this.tsParseType(); - } else { - labeled = false; - type = typeOrLabel; - this.expect(17); - } - } else { - type = this.tsParseType(); - optional = this.eat(17); - labeled = this.eat(14); - } - if (labeled) { - let labeledNode; - if (label) { - labeledNode = this.startNodeAtNode(label); - labeledNode.optional = optional; - labeledNode.label = label; - labeledNode.elementType = type; - if (this.eat(17)) { - labeledNode.optional = true; - this.raise(TSErrors.TupleOptionalAfterType, this.state.lastTokStartLoc); - } - } else { - labeledNode = this.startNodeAtNode(type); - labeledNode.optional = optional; - this.raise(TSErrors.InvalidTupleMemberLabel, type); - labeledNode.label = type; - labeledNode.elementType = this.tsParseType(); - } - type = this.finishNode(labeledNode, "TSNamedTupleMember"); - } else if (optional) { - const optionalTypeNode = this.startNodeAtNode(type); - optionalTypeNode.typeAnnotation = type; - type = this.finishNode(optionalTypeNode, "TSOptionalType"); - } - if (rest) { - const restNode = this.startNodeAt(startLoc); - restNode.typeAnnotation = type; - type = this.finishNode(restNode, "TSRestType"); - } - return type; - } - tsParseParenthesizedType() { - const node = this.startNode(); - this.expect(10); - node.typeAnnotation = this.tsParseType(); - this.expect(11); - return this.finishNode(node, "TSParenthesizedType"); - } - tsParseFunctionOrConstructorType(type, abstract) { - const node = this.startNode(); - if (type === "TSConstructorType") { - node.abstract = !!abstract; - if (abstract) this.next(); - this.next(); - } - this.tsInAllowConditionalTypesContext(() => this.tsFillSignature(19, node)); - return this.finishNode(node, type); - } - tsParseLiteralTypeNode() { - const node = this.startNode(); - switch (this.state.type) { - case 134: - case 135: - case 133: - case 85: - case 86: - node.literal = super.parseExprAtom(); - break; - default: - this.unexpected(); - } - return this.finishNode(node, "TSLiteralType"); - } - tsParseTemplateLiteralType() { - const node = this.startNode(); - node.literal = super.parseTemplate(false); - return this.finishNode(node, "TSLiteralType"); - } - parseTemplateSubstitution() { - if (this.state.inType) return this.tsParseType(); - return super.parseTemplateSubstitution(); - } - tsParseThisTypeOrThisTypePredicate() { - const thisKeyword = this.tsParseThisTypeNode(); - if (this.isContextual(116) && !this.hasPrecedingLineBreak()) { - return this.tsParseThisTypePredicate(thisKeyword); - } else { - return thisKeyword; - } - } - tsParseNonArrayType() { - switch (this.state.type) { - case 133: - case 134: - case 135: - case 85: - case 86: - return this.tsParseLiteralTypeNode(); - case 53: - if (this.state.value === "-") { - const node = this.startNode(); - const nextToken = this.lookahead(); - if (nextToken.type !== 134 && nextToken.type !== 135) { - this.unexpected(); - } - node.literal = this.parseMaybeUnary(); - return this.finishNode(node, "TSLiteralType"); - } - break; - case 78: - return this.tsParseThisTypeOrThisTypePredicate(); - case 87: - return this.tsParseTypeQuery(); - case 83: - return this.tsParseImportType(); - case 5: - return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); - case 0: - return this.tsParseTupleType(); - case 10: - return this.tsParseParenthesizedType(); - case 25: - case 24: - return this.tsParseTemplateLiteralType(); - default: - { - const { - type - } = this.state; - if (tokenIsIdentifier(type) || type === 88 || type === 84) { - const nodeType = type === 88 ? "TSVoidKeyword" : type === 84 ? "TSNullKeyword" : keywordTypeFromName(this.state.value); - if (nodeType !== undefined && this.lookaheadCharCode() !== 46) { - const node = this.startNode(); - this.next(); - return this.finishNode(node, nodeType); - } - return this.tsParseTypeReference(); - } - } - } - this.unexpected(); - } - tsParseArrayTypeOrHigher() { - let type = this.tsParseNonArrayType(); - while (!this.hasPrecedingLineBreak() && this.eat(0)) { - if (this.match(3)) { - const node = this.startNodeAtNode(type); - node.elementType = type; - this.expect(3); - type = this.finishNode(node, "TSArrayType"); - } else { - const node = this.startNodeAtNode(type); - node.objectType = type; - node.indexType = this.tsParseType(); - this.expect(3); - type = this.finishNode(node, "TSIndexedAccessType"); - } - } - return type; - } - tsParseTypeOperator() { - const node = this.startNode(); - const operator = this.state.value; - this.next(); - node.operator = operator; - node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); - if (operator === "readonly") { - this.tsCheckTypeAnnotationForReadOnly(node); - } - return this.finishNode(node, "TSTypeOperator"); - } - tsCheckTypeAnnotationForReadOnly(node) { - switch (node.typeAnnotation.type) { - case "TSTupleType": - case "TSArrayType": - return; - default: - this.raise(TSErrors.UnexpectedReadonly, node); - } - } - tsParseInferType() { - const node = this.startNode(); - this.expectContextual(115); - const typeParameter = this.startNode(); - typeParameter.name = this.tsParseTypeParameterName(); - typeParameter.constraint = this.tsTryParse(() => this.tsParseConstraintForInferType()); - node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); - return this.finishNode(node, "TSInferType"); - } - tsParseConstraintForInferType() { - if (this.eat(81)) { - const constraint = this.tsInDisallowConditionalTypesContext(() => this.tsParseType()); - if (this.state.inDisallowConditionalTypesContext || !this.match(17)) { - return constraint; - } - } - } - tsParseTypeOperatorOrHigher() { - const isTypeOperator = tokenIsTSTypeOperator(this.state.type) && !this.state.containsEsc; - return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual(115) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher()); - } - tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { - const node = this.startNode(); - const hasLeadingOperator = this.eat(operator); - const types = []; - do { - types.push(parseConstituentType()); - } while (this.eat(operator)); - if (types.length === 1 && !hasLeadingOperator) { - return types[0]; - } - node.types = types; - return this.finishNode(node, kind); - } - tsParseIntersectionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), 45); - } - tsParseUnionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 43); - } - tsIsStartOfFunctionType() { - if (this.match(47)) { - return true; - } - return this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); - } - tsSkipParameterStart() { - if (tokenIsIdentifier(this.state.type) || this.match(78)) { - this.next(); - return true; - } - if (this.match(5)) { - const { - errors - } = this.state; - const previousErrorCount = errors.length; - try { - this.parseObjectLike(8, true); - return errors.length === previousErrorCount; - } catch (_unused) { - return false; - } - } - if (this.match(0)) { - this.next(); - const { - errors - } = this.state; - const previousErrorCount = errors.length; - try { - super.parseBindingList(3, 93, 1); - return errors.length === previousErrorCount; - } catch (_unused2) { - return false; - } - } - return false; - } - tsIsUnambiguouslyStartOfFunctionType() { - this.next(); - if (this.match(11) || this.match(21)) { - return true; - } - if (this.tsSkipParameterStart()) { - if (this.match(14) || this.match(12) || this.match(17) || this.match(29)) { - return true; - } - if (this.match(11)) { - this.next(); - if (this.match(19)) { - return true; - } - } - } - return false; - } - tsParseTypeOrTypePredicateAnnotation(returnToken) { - return this.tsInType(() => { - const t = this.startNode(); - this.expect(returnToken); - const node = this.startNode(); - const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this)); - if (asserts && this.match(78)) { - let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate(); - if (thisTypePredicate.type === "TSThisType") { - node.parameterName = thisTypePredicate; - node.asserts = true; - node.typeAnnotation = null; - thisTypePredicate = this.finishNode(node, "TSTypePredicate"); - } else { - this.resetStartLocationFromNode(thisTypePredicate, node); - thisTypePredicate.asserts = true; - } - t.typeAnnotation = thisTypePredicate; - return this.finishNode(t, "TSTypeAnnotation"); - } - const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); - if (!typePredicateVariable) { - if (!asserts) { - return this.tsParseTypeAnnotation(false, t); - } - node.parameterName = this.parseIdentifier(); - node.asserts = asserts; - node.typeAnnotation = null; - t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); - return this.finishNode(t, "TSTypeAnnotation"); - } - const type = this.tsParseTypeAnnotation(false); - node.parameterName = typePredicateVariable; - node.typeAnnotation = type; - node.asserts = asserts; - t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); - return this.finishNode(t, "TSTypeAnnotation"); - }); - } - tsTryParseTypeOrTypePredicateAnnotation() { - if (this.match(14)) { - return this.tsParseTypeOrTypePredicateAnnotation(14); - } - } - tsTryParseTypeAnnotation() { - if (this.match(14)) { - return this.tsParseTypeAnnotation(); - } - } - tsTryParseType() { - return this.tsEatThenParseType(14); - } - tsParseTypePredicatePrefix() { - const id = this.parseIdentifier(); - if (this.isContextual(116) && !this.hasPrecedingLineBreak()) { - this.next(); - return id; - } - } - tsParseTypePredicateAsserts() { - if (this.state.type !== 109) { - return false; - } - const containsEsc = this.state.containsEsc; - this.next(); - if (!tokenIsIdentifier(this.state.type) && !this.match(78)) { - return false; - } - if (containsEsc) { - this.raise(Errors.InvalidEscapedReservedWord, this.state.lastTokStartLoc, { - reservedWord: "asserts" - }); - } - return true; - } - tsParseTypeAnnotation(eatColon = true, t = this.startNode()) { - this.tsInType(() => { - if (eatColon) this.expect(14); - t.typeAnnotation = this.tsParseType(); - }); - return this.finishNode(t, "TSTypeAnnotation"); - } - tsParseType() { - assert(this.state.inType); - const type = this.tsParseNonConditionalType(); - if (this.state.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(81)) { - return type; - } - const node = this.startNodeAtNode(type); - node.checkType = type; - node.extendsType = this.tsInDisallowConditionalTypesContext(() => this.tsParseNonConditionalType()); - this.expect(17); - node.trueType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); - this.expect(14); - node.falseType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); - return this.finishNode(node, "TSConditionalType"); - } - isAbstractConstructorSignature() { - return this.isContextual(124) && this.lookahead().type === 77; - } - tsParseNonConditionalType() { - if (this.tsIsStartOfFunctionType()) { - return this.tsParseFunctionOrConstructorType("TSFunctionType"); - } - if (this.match(77)) { - return this.tsParseFunctionOrConstructorType("TSConstructorType"); - } else if (this.isAbstractConstructorSignature()) { - return this.tsParseFunctionOrConstructorType("TSConstructorType", true); - } - return this.tsParseUnionTypeOrHigher(); - } - tsParseTypeAssertion() { - if (this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { - this.raise(TSErrors.ReservedTypeAssertion, this.state.startLoc); - } - const node = this.startNode(); - node.typeAnnotation = this.tsInType(() => { - this.next(); - return this.match(75) ? this.tsParseTypeReference() : this.tsParseType(); - }); - this.expect(48); - node.expression = this.parseMaybeUnary(); - return this.finishNode(node, "TSTypeAssertion"); - } - tsParseHeritageClause(token) { - const originalStartLoc = this.state.startLoc; - const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => { - const node = this.startNode(); - node.expression = this.tsParseEntityName(); - if (this.match(47)) { - node.typeParameters = this.tsParseTypeArguments(); - } - return this.finishNode(node, "TSExpressionWithTypeArguments"); - }); - if (!delimitedList.length) { - this.raise(TSErrors.EmptyHeritageClauseType, originalStartLoc, { - token - }); - } - return delimitedList; - } - tsParseInterfaceDeclaration(node, properties = {}) { - if (this.hasFollowingLineBreak()) return null; - this.expectContextual(129); - if (properties.declare) node.declare = true; - if (tokenIsIdentifier(this.state.type)) { - node.id = this.parseIdentifier(); - this.checkIdentifier(node.id, 130); - } else { - node.id = null; - this.raise(TSErrors.MissingInterfaceName, this.state.startLoc); - } - node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers); - if (this.eat(81)) { - node.extends = this.tsParseHeritageClause("extends"); - } - const body = this.startNode(); - body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); - node.body = this.finishNode(body, "TSInterfaceBody"); - return this.finishNode(node, "TSInterfaceDeclaration"); - } - tsParseTypeAliasDeclaration(node) { - node.id = this.parseIdentifier(); - this.checkIdentifier(node.id, 2); - node.typeAnnotation = this.tsInType(() => { - node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers); - this.expect(29); - if (this.isContextual(114) && this.lookahead().type !== 16) { - const node = this.startNode(); - this.next(); - return this.finishNode(node, "TSIntrinsicKeyword"); - } - return this.tsParseType(); - }); - this.semicolon(); - return this.finishNode(node, "TSTypeAliasDeclaration"); - } - tsInNoContext(cb) { - const oldContext = this.state.context; - this.state.context = [oldContext[0]]; - try { - return cb(); - } finally { - this.state.context = oldContext; - } - } - tsInType(cb) { - const oldInType = this.state.inType; - this.state.inType = true; - try { - return cb(); - } finally { - this.state.inType = oldInType; - } - } - tsInDisallowConditionalTypesContext(cb) { - const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext; - this.state.inDisallowConditionalTypesContext = true; - try { - return cb(); - } finally { - this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; - } - } - tsInAllowConditionalTypesContext(cb) { - const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext; - this.state.inDisallowConditionalTypesContext = false; - try { - return cb(); - } finally { - this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; - } - } - tsEatThenParseType(token) { - if (this.match(token)) { - return this.tsNextThenParseType(); - } - } - tsExpectThenParseType(token) { - return this.tsInType(() => { - this.expect(token); - return this.tsParseType(); - }); - } - tsNextThenParseType() { - return this.tsInType(() => { - this.next(); - return this.tsParseType(); - }); - } - tsParseEnumMember() { - const node = this.startNode(); - node.id = this.match(133) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(true); - if (this.eat(29)) { - node.initializer = super.parseMaybeAssignAllowIn(); - } - return this.finishNode(node, "TSEnumMember"); - } - tsParseEnumDeclaration(node, properties = {}) { - if (properties.const) node.const = true; - if (properties.declare) node.declare = true; - this.expectContextual(126); - node.id = this.parseIdentifier(); - this.checkIdentifier(node.id, node.const ? 8971 : 8459); - this.expect(5); - node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); - this.expect(8); - return this.finishNode(node, "TSEnumDeclaration"); - } - tsParseModuleBlock() { - const node = this.startNode(); - this.scope.enter(0); - this.expect(5); - super.parseBlockOrModuleBlockBody(node.body = [], undefined, true, 8); - this.scope.exit(); - return this.finishNode(node, "TSModuleBlock"); - } - tsParseModuleOrNamespaceDeclaration(node, nested = false) { - node.id = this.parseIdentifier(); - if (!nested) { - this.checkIdentifier(node.id, 1024); - } - if (this.eat(16)) { - const inner = this.startNode(); - this.tsParseModuleOrNamespaceDeclaration(inner, true); - node.body = inner; - } else { - this.scope.enter(256); - this.prodParam.enter(0); - node.body = this.tsParseModuleBlock(); - this.prodParam.exit(); - this.scope.exit(); - } - return this.finishNode(node, "TSModuleDeclaration"); - } - tsParseAmbientExternalModuleDeclaration(node) { - if (this.isContextual(112)) { - node.global = true; - node.id = this.parseIdentifier(); - } else if (this.match(133)) { - node.id = super.parseStringLiteral(this.state.value); - } else { - this.unexpected(); - } - if (this.match(5)) { - this.scope.enter(256); - this.prodParam.enter(0); - node.body = this.tsParseModuleBlock(); - this.prodParam.exit(); - this.scope.exit(); - } else { - this.semicolon(); - } - return this.finishNode(node, "TSModuleDeclaration"); - } - tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, isExport) { - node.isExport = isExport || false; - node.id = maybeDefaultIdentifier || this.parseIdentifier(); - this.checkIdentifier(node.id, 4096); - this.expect(29); - const moduleReference = this.tsParseModuleReference(); - if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") { - this.raise(TSErrors.ImportAliasHasImportType, moduleReference); - } - node.moduleReference = moduleReference; - this.semicolon(); - return this.finishNode(node, "TSImportEqualsDeclaration"); - } - tsIsExternalModuleReference() { - return this.isContextual(119) && this.lookaheadCharCode() === 40; - } - tsParseModuleReference() { - return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false); - } - tsParseExternalModuleReference() { - const node = this.startNode(); - this.expectContextual(119); - this.expect(10); - if (!this.match(133)) { - this.unexpected(); - } - node.expression = super.parseExprAtom(); - this.expect(11); - this.sawUnambiguousESM = true; - return this.finishNode(node, "TSExternalModuleReference"); - } - tsLookAhead(f) { - const state = this.state.clone(); - const res = f(); - this.state = state; - return res; - } - tsTryParseAndCatch(f) { - const result = this.tryParse(abort => f() || abort()); - if (result.aborted || !result.node) return; - if (result.error) this.state = result.failState; - return result.node; - } - tsTryParse(f) { - const state = this.state.clone(); - const result = f(); - if (result !== undefined && result !== false) { - return result; - } - this.state = state; - } - tsTryParseDeclare(nany) { - if (this.isLineTerminator()) { - return; - } - let startType = this.state.type; - let kind; - if (this.isContextual(100)) { - startType = 74; - kind = "let"; - } - return this.tsInAmbientContext(() => { - switch (startType) { - case 68: - nany.declare = true; - return super.parseFunctionStatement(nany, false, false); - case 80: - nany.declare = true; - return this.parseClass(nany, true, false); - case 126: - return this.tsParseEnumDeclaration(nany, { - declare: true - }); - case 112: - return this.tsParseAmbientExternalModuleDeclaration(nany); - case 75: - case 74: - if (!this.match(75) || !this.isLookaheadContextual("enum")) { - nany.declare = true; - return this.parseVarStatement(nany, kind || this.state.value, true); - } - this.expect(75); - return this.tsParseEnumDeclaration(nany, { - const: true, - declare: true - }); - case 129: - { - const result = this.tsParseInterfaceDeclaration(nany, { - declare: true - }); - if (result) return result; - } - default: - if (tokenIsIdentifier(startType)) { - return this.tsParseDeclaration(nany, this.state.value, true, null); - } - } - }); - } - tsTryParseExportDeclaration() { - return this.tsParseDeclaration(this.startNode(), this.state.value, true, null); - } - tsParseExpressionStatement(node, expr, decorators) { - switch (expr.name) { - case "declare": - { - const declaration = this.tsTryParseDeclare(node); - if (declaration) { - declaration.declare = true; - } - return declaration; - } - case "global": - if (this.match(5)) { - this.scope.enter(256); - this.prodParam.enter(0); - const mod = node; - mod.global = true; - mod.id = expr; - mod.body = this.tsParseModuleBlock(); - this.scope.exit(); - this.prodParam.exit(); - return this.finishNode(mod, "TSModuleDeclaration"); - } - break; - default: - return this.tsParseDeclaration(node, expr.name, false, decorators); - } - } - tsParseDeclaration(node, value, next, decorators) { - switch (value) { - case "abstract": - if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) { - return this.tsParseAbstractDeclaration(node, decorators); - } - break; - case "module": - if (this.tsCheckLineTerminator(next)) { - if (this.match(133)) { - return this.tsParseAmbientExternalModuleDeclaration(node); - } else if (tokenIsIdentifier(this.state.type)) { - return this.tsParseModuleOrNamespaceDeclaration(node); - } - } - break; - case "namespace": - if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { - return this.tsParseModuleOrNamespaceDeclaration(node); - } - break; - case "type": - if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { - return this.tsParseTypeAliasDeclaration(node); - } - break; - } - } - tsCheckLineTerminator(next) { - if (next) { - if (this.hasFollowingLineBreak()) return false; - this.next(); - return true; - } - return !this.isLineTerminator(); - } - tsTryParseGenericAsyncArrowFunction(startLoc) { - if (!this.match(47)) return; - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - this.state.maybeInArrowParameters = true; - const res = this.tsTryParseAndCatch(() => { - const node = this.startNodeAt(startLoc); - node.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); - super.parseFunctionParams(node); - node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(); - this.expect(19); - return node; - }); - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - if (!res) return; - return super.parseArrowExpression(res, null, true); - } - tsParseTypeArgumentsInExpression() { - if (this.reScan_lt() !== 47) return; - return this.tsParseTypeArguments(); - } - tsParseTypeArguments() { - const node = this.startNode(); - node.params = this.tsInType(() => this.tsInNoContext(() => { - this.expect(47); - return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this)); - })); - if (node.params.length === 0) { - this.raise(TSErrors.EmptyTypeArguments, node); - } else if (!this.state.inType && this.curContext() === types.brace) { - this.reScan_lt_gt(); - } - this.expect(48); - return this.finishNode(node, "TSTypeParameterInstantiation"); - } - tsIsDeclarationStart() { - return tokenIsTSDeclarationStart(this.state.type); - } - isExportDefaultSpecifier() { - if (this.tsIsDeclarationStart()) return false; - return super.isExportDefaultSpecifier(); - } - parseAssignableListItem(flags, decorators) { - const startLoc = this.state.startLoc; - const modified = {}; - this.tsParseModifiers({ - allowedModifiers: ["public", "private", "protected", "override", "readonly"] - }, modified); - const accessibility = modified.accessibility; - const override = modified.override; - const readonly = modified.readonly; - if (!(flags & 4) && (accessibility || readonly || override)) { - this.raise(TSErrors.UnexpectedParameterModifier, startLoc); - } - const left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left, flags); - const elt = this.parseMaybeDefault(left.loc.start, left); - if (accessibility || readonly || override) { - const pp = this.startNodeAt(startLoc); - if (decorators.length) { - pp.decorators = decorators; - } - if (accessibility) pp.accessibility = accessibility; - if (readonly) pp.readonly = readonly; - if (override) pp.override = override; - if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { - this.raise(TSErrors.UnsupportedParameterPropertyKind, pp); - } - pp.parameter = elt; - return this.finishNode(pp, "TSParameterProperty"); - } - if (decorators.length) { - left.decorators = decorators; - } - return elt; - } - isSimpleParameter(node) { - return node.type === "TSParameterProperty" && super.isSimpleParameter(node.parameter) || super.isSimpleParameter(node); - } - tsDisallowOptionalPattern(node) { - for (const param of node.params) { - if (param.type !== "Identifier" && param.optional && !this.state.isAmbientContext) { - this.raise(TSErrors.PatternIsOptional, param); - } - } - } - setArrowFunctionParameters(node, params, trailingCommaLoc) { - super.setArrowFunctionParameters(node, params, trailingCommaLoc); - this.tsDisallowOptionalPattern(node); - } - parseFunctionBodyAndFinish(node, type, isMethod = false) { - if (this.match(14)) { - node.returnType = this.tsParseTypeOrTypePredicateAnnotation(14); - } - const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" || type === "ClassPrivateMethod" ? "TSDeclareMethod" : undefined; - if (bodilessType && !this.match(5) && this.isLineTerminator()) { - return this.finishNode(node, bodilessType); - } - if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) { - this.raise(TSErrors.DeclareFunctionHasImplementation, node); - if (node.declare) { - return super.parseFunctionBodyAndFinish(node, bodilessType, isMethod); - } - } - this.tsDisallowOptionalPattern(node); - return super.parseFunctionBodyAndFinish(node, type, isMethod); - } - registerFunctionStatementId(node) { - if (!node.body && node.id) { - this.checkIdentifier(node.id, 1024); - } else { - super.registerFunctionStatementId(node); - } - } - tsCheckForInvalidTypeCasts(items) { - items.forEach(node => { - if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") { - this.raise(TSErrors.UnexpectedTypeAnnotation, node.typeAnnotation); - } - }); - } - toReferencedList(exprList, isInParens) { - this.tsCheckForInvalidTypeCasts(exprList); - return exprList; - } - parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { - const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors); - if (node.type === "ArrayExpression") { - this.tsCheckForInvalidTypeCasts(node.elements); - } - return node; - } - parseSubscript(base, startLoc, noCalls, state) { - if (!this.hasPrecedingLineBreak() && this.match(35)) { - this.state.canStartJSXElement = false; - this.next(); - const nonNullExpression = this.startNodeAt(startLoc); - nonNullExpression.expression = base; - return this.finishNode(nonNullExpression, "TSNonNullExpression"); - } - let isOptionalCall = false; - if (this.match(18) && this.lookaheadCharCode() === 60) { - if (noCalls) { - state.stop = true; - return base; - } - state.optionalChainMember = isOptionalCall = true; - this.next(); - } - if (this.match(47) || this.match(51)) { - let missingParenErrorLoc; - const result = this.tsTryParseAndCatch(() => { - if (!noCalls && this.atPossibleAsyncArrow(base)) { - const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startLoc); - if (asyncArrowFn) { - return asyncArrowFn; - } - } - const typeArguments = this.tsParseTypeArgumentsInExpression(); - if (!typeArguments) return; - if (isOptionalCall && !this.match(10)) { - missingParenErrorLoc = this.state.curPosition(); - return; - } - if (tokenIsTemplate(this.state.type)) { - const result = super.parseTaggedTemplateExpression(base, startLoc, state); - result.typeParameters = typeArguments; - return result; - } - if (!noCalls && this.eat(10)) { - const node = this.startNodeAt(startLoc); - node.callee = base; - node.arguments = this.parseCallExpressionArguments(11, false); - this.tsCheckForInvalidTypeCasts(node.arguments); - node.typeParameters = typeArguments; - if (state.optionalChainMember) { - node.optional = isOptionalCall; - } - return this.finishCallExpression(node, state.optionalChainMember); - } - const tokenType = this.state.type; - if (tokenType === 48 || tokenType === 52 || tokenType !== 10 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) { - return; - } - const node = this.startNodeAt(startLoc); - node.expression = base; - node.typeParameters = typeArguments; - return this.finishNode(node, "TSInstantiationExpression"); - }); - if (missingParenErrorLoc) { - this.unexpected(missingParenErrorLoc, 10); - } - if (result) { - if (result.type === "TSInstantiationExpression" && (this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40)) { - this.raise(TSErrors.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc); - } - return result; - } - } - return super.parseSubscript(base, startLoc, noCalls, state); - } - parseNewCallee(node) { - var _callee$extra; - super.parseNewCallee(node); - const { - callee - } = node; - if (callee.type === "TSInstantiationExpression" && !((_callee$extra = callee.extra) != null && _callee$extra.parenthesized)) { - node.typeParameters = callee.typeParameters; - node.callee = callee.expression; - } - } - parseExprOp(left, leftStartLoc, minPrec) { - let isSatisfies; - if (tokenOperatorPrecedence(58) > minPrec && !this.hasPrecedingLineBreak() && (this.isContextual(93) || (isSatisfies = this.isContextual(120)))) { - const node = this.startNodeAt(leftStartLoc); - node.expression = left; - node.typeAnnotation = this.tsInType(() => { - this.next(); - if (this.match(75)) { - if (isSatisfies) { - this.raise(Errors.UnexpectedKeyword, this.state.startLoc, { - keyword: "const" - }); - } - return this.tsParseTypeReference(); - } - return this.tsParseType(); - }); - this.finishNode(node, isSatisfies ? "TSSatisfiesExpression" : "TSAsExpression"); - this.reScan_lt_gt(); - return this.parseExprOp(node, leftStartLoc, minPrec); - } - return super.parseExprOp(left, leftStartLoc, minPrec); - } - checkReservedWord(word, startLoc, checkKeywords, isBinding) { - if (!this.state.isAmbientContext) { - super.checkReservedWord(word, startLoc, checkKeywords, isBinding); - } - } - checkImportReflection(node) { - super.checkImportReflection(node); - if (node.module && node.importKind !== "value") { - this.raise(TSErrors.ImportReflectionHasImportType, node.specifiers[0].loc.start); - } - } - checkDuplicateExports() {} - isPotentialImportPhase(isExport) { - if (super.isPotentialImportPhase(isExport)) return true; - if (this.isContextual(130)) { - const ch = this.lookaheadCharCode(); - return isExport ? ch === 123 || ch === 42 : ch !== 61; - } - return !isExport && this.isContextual(87); - } - applyImportPhase(node, isExport, phase, loc) { - super.applyImportPhase(node, isExport, phase, loc); - if (isExport) { - node.exportKind = phase === "type" ? "type" : "value"; - } else { - node.importKind = phase === "type" || phase === "typeof" ? phase : "value"; - } - } - parseImport(node) { - if (this.match(133)) { - node.importKind = "value"; - return super.parseImport(node); - } - let importNode; - if (tokenIsIdentifier(this.state.type) && this.lookaheadCharCode() === 61) { - node.importKind = "value"; - return this.tsParseImportEqualsDeclaration(node); - } else if (this.isContextual(130)) { - const maybeDefaultIdentifier = this.parseMaybeImportPhase(node, false); - if (this.lookaheadCharCode() === 61) { - return this.tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier); - } else { - importNode = super.parseImportSpecifiersAndAfter(node, maybeDefaultIdentifier); - } - } else { - importNode = super.parseImport(node); - } - if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") { - this.raise(TSErrors.TypeImportCannotSpecifyDefaultAndNamed, importNode); - } - return importNode; - } - parseExport(node, decorators) { - if (this.match(83)) { - this.next(); - const nodeImportEquals = node; - let maybeDefaultIdentifier = null; - if (this.isContextual(130) && this.isPotentialImportPhase(false)) { - maybeDefaultIdentifier = this.parseMaybeImportPhase(nodeImportEquals, false); - } else { - nodeImportEquals.importKind = "value"; - } - return this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, true); - } else if (this.eat(29)) { - const assign = node; - assign.expression = super.parseExpression(); - this.semicolon(); - this.sawUnambiguousESM = true; - return this.finishNode(assign, "TSExportAssignment"); - } else if (this.eatContextual(93)) { - const decl = node; - this.expectContextual(128); - decl.id = this.parseIdentifier(); - this.semicolon(); - return this.finishNode(decl, "TSNamespaceExportDeclaration"); - } else { - return super.parseExport(node, decorators); - } - } - isAbstractClass() { - return this.isContextual(124) && this.lookahead().type === 80; - } - parseExportDefaultExpression() { - if (this.isAbstractClass()) { - const cls = this.startNode(); - this.next(); - cls.abstract = true; - return this.parseClass(cls, true, true); - } - if (this.match(129)) { - const result = this.tsParseInterfaceDeclaration(this.startNode()); - if (result) return result; - } - return super.parseExportDefaultExpression(); - } - parseVarStatement(node, kind, allowMissingInitializer = false) { - const { - isAmbientContext - } = this.state; - const declaration = super.parseVarStatement(node, kind, allowMissingInitializer || isAmbientContext); - if (!isAmbientContext) return declaration; - for (const { - id, - init - } of declaration.declarations) { - if (!init) continue; - if (kind !== "const" || !!id.typeAnnotation) { - this.raise(TSErrors.InitializerNotAllowedInAmbientContext, init); - } else if (!isValidAmbientConstInitializer(init, this.hasPlugin("estree"))) { - this.raise(TSErrors.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference, init); - } - } - return declaration; - } - parseStatementContent(flags, decorators) { - if (this.match(75) && this.isLookaheadContextual("enum")) { - const node = this.startNode(); - this.expect(75); - return this.tsParseEnumDeclaration(node, { - const: true - }); - } - if (this.isContextual(126)) { - return this.tsParseEnumDeclaration(this.startNode()); - } - if (this.isContextual(129)) { - const result = this.tsParseInterfaceDeclaration(this.startNode()); - if (result) return result; - } - return super.parseStatementContent(flags, decorators); - } - parseAccessModifier() { - return this.tsParseModifier(["public", "protected", "private"]); - } - tsHasSomeModifiers(member, modifiers) { - return modifiers.some(modifier => { - if (tsIsAccessModifier(modifier)) { - return member.accessibility === modifier; - } - return !!member[modifier]; - }); - } - tsIsStartOfStaticBlocks() { - return this.isContextual(106) && this.lookaheadCharCode() === 123; - } - parseClassMember(classBody, member, state) { - const modifiers = ["declare", "private", "public", "protected", "override", "abstract", "readonly", "static"]; - this.tsParseModifiers({ - allowedModifiers: modifiers, - disallowedModifiers: ["in", "out"], - stopOnStartOfClassStaticBlock: true, - errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions - }, member); - const callParseClassMemberWithIsStatic = () => { - if (this.tsIsStartOfStaticBlocks()) { - this.next(); - this.next(); - if (this.tsHasSomeModifiers(member, modifiers)) { - this.raise(TSErrors.StaticBlockCannotHaveModifier, this.state.curPosition()); - } - super.parseClassStaticBlock(classBody, member); - } else { - this.parseClassMemberWithIsStatic(classBody, member, state, !!member.static); - } - }; - if (member.declare) { - this.tsInAmbientContext(callParseClassMemberWithIsStatic); - } else { - callParseClassMemberWithIsStatic(); - } - } - parseClassMemberWithIsStatic(classBody, member, state, isStatic) { - const idx = this.tsTryParseIndexSignature(member); - if (idx) { - classBody.body.push(idx); - if (member.abstract) { - this.raise(TSErrors.IndexSignatureHasAbstract, member); - } - if (member.accessibility) { - this.raise(TSErrors.IndexSignatureHasAccessibility, member, { - modifier: member.accessibility - }); - } - if (member.declare) { - this.raise(TSErrors.IndexSignatureHasDeclare, member); - } - if (member.override) { - this.raise(TSErrors.IndexSignatureHasOverride, member); - } - return; - } - if (!this.state.inAbstractClass && member.abstract) { - this.raise(TSErrors.NonAbstractClassHasAbstractMethod, member); - } - if (member.override) { - if (!state.hadSuperClass) { - this.raise(TSErrors.OverrideNotInSubClass, member); - } - } - super.parseClassMemberWithIsStatic(classBody, member, state, isStatic); - } - parsePostMemberNameModifiers(methodOrProp) { - const optional = this.eat(17); - if (optional) methodOrProp.optional = true; - if (methodOrProp.readonly && this.match(10)) { - this.raise(TSErrors.ClassMethodHasReadonly, methodOrProp); - } - if (methodOrProp.declare && this.match(10)) { - this.raise(TSErrors.ClassMethodHasDeclare, methodOrProp); - } - } - parseExpressionStatement(node, expr, decorators) { - const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr, decorators) : undefined; - return decl || super.parseExpressionStatement(node, expr, decorators); - } - shouldParseExportDeclaration() { - if (this.tsIsDeclarationStart()) return true; - return super.shouldParseExportDeclaration(); - } - parseConditional(expr, startLoc, refExpressionErrors) { - if (!this.state.maybeInArrowParameters || !this.match(17)) { - return super.parseConditional(expr, startLoc, refExpressionErrors); - } - const result = this.tryParse(() => super.parseConditional(expr, startLoc)); - if (!result.node) { - if (result.error) { - super.setOptionalParametersError(refExpressionErrors, result.error); - } - return expr; - } - if (result.error) this.state = result.failState; - return result.node; - } - parseParenItem(node, startLoc) { - const newNode = super.parseParenItem(node, startLoc); - if (this.eat(17)) { - newNode.optional = true; - this.resetEndLocation(node); - } - if (this.match(14)) { - const typeCastNode = this.startNodeAt(startLoc); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TSTypeCastExpression"); - } - return node; - } - parseExportDeclaration(node) { - if (!this.state.isAmbientContext && this.isContextual(125)) { - return this.tsInAmbientContext(() => this.parseExportDeclaration(node)); - } - const startLoc = this.state.startLoc; - const isDeclare = this.eatContextual(125); - if (isDeclare && (this.isContextual(125) || !this.shouldParseExportDeclaration())) { - throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare, this.state.startLoc); - } - const isIdentifier = tokenIsIdentifier(this.state.type); - const declaration = isIdentifier && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(node); - if (!declaration) return null; - if (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare) { - node.exportKind = "type"; - } - if (isDeclare) { - this.resetStartLocation(declaration, startLoc); - declaration.declare = true; - } - return declaration; - } - parseClassId(node, isStatement, optionalId, bindingType) { - if ((!isStatement || optionalId) && this.isContextual(113)) { - return; - } - super.parseClassId(node, isStatement, optionalId, node.declare ? 1024 : 8331); - const typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers); - if (typeParameters) node.typeParameters = typeParameters; - } - parseClassPropertyAnnotation(node) { - if (!node.optional) { - if (this.eat(35)) { - node.definite = true; - } else if (this.eat(17)) { - node.optional = true; - } - } - const type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - } - parseClassProperty(node) { - this.parseClassPropertyAnnotation(node); - if (this.state.isAmbientContext && !(node.readonly && !node.typeAnnotation) && this.match(29)) { - this.raise(TSErrors.DeclareClassFieldHasInitializer, this.state.startLoc); - } - if (node.abstract && this.match(29)) { - const { - key - } = node; - this.raise(TSErrors.AbstractPropertyHasInitializer, this.state.startLoc, { - propertyName: key.type === "Identifier" && !node.computed ? key.name : `[${this.input.slice(key.start, key.end)}]` - }); - } - return super.parseClassProperty(node); - } - parseClassPrivateProperty(node) { - if (node.abstract) { - this.raise(TSErrors.PrivateElementHasAbstract, node); - } - if (node.accessibility) { - this.raise(TSErrors.PrivateElementHasAccessibility, node, { - modifier: node.accessibility - }); - } - this.parseClassPropertyAnnotation(node); - return super.parseClassPrivateProperty(node); - } - parseClassAccessorProperty(node) { - this.parseClassPropertyAnnotation(node); - if (node.optional) { - this.raise(TSErrors.AccessorCannotBeOptional, node); - } - return super.parseClassAccessorProperty(node); - } - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); - if (typeParameters && isConstructor) { - this.raise(TSErrors.ConstructorHasTypeParameters, typeParameters); - } - const { - declare = false, - kind - } = method; - if (declare && (kind === "get" || kind === "set")) { - this.raise(TSErrors.DeclareAccessor, method, { - kind - }); - } - if (typeParameters) method.typeParameters = typeParameters; - super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); - } - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); - if (typeParameters) method.typeParameters = typeParameters; - super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); - } - declareClassPrivateMethodInScope(node, kind) { - if (node.type === "TSDeclareMethod") return; - if (node.type === "MethodDefinition" && !hasOwnProperty.call(node.value, "body")) { - return; - } - super.declareClassPrivateMethodInScope(node, kind); - } - parseClassSuper(node) { - super.parseClassSuper(node); - if (node.superClass && (this.match(47) || this.match(51))) { - node.superTypeParameters = this.tsParseTypeArgumentsInExpression(); - } - if (this.eatContextual(113)) { - node.implements = this.tsParseHeritageClause("implements"); - } - } - parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { - const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); - if (typeParameters) prop.typeParameters = typeParameters; - return super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); - } - parseFunctionParams(node, isConstructor) { - const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); - if (typeParameters) node.typeParameters = typeParameters; - super.parseFunctionParams(node, isConstructor); - } - parseVarId(decl, kind) { - super.parseVarId(decl, kind); - if (decl.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.eat(35)) { - decl.definite = true; - } - const type = this.tsTryParseTypeAnnotation(); - if (type) { - decl.id.typeAnnotation = type; - this.resetEndLocation(decl.id); - } - } - parseAsyncArrowFromCallExpression(node, call) { - if (this.match(14)) { - node.returnType = this.tsParseTypeAnnotation(); - } - return super.parseAsyncArrowFromCallExpression(node, call); - } - parseMaybeAssign(refExpressionErrors, afterLeftParse) { - var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2; - let state; - let jsx; - let typeCast; - if (this.hasPlugin("jsx") && (this.match(142) || this.match(47))) { - state = this.state.clone(); - jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); - if (!jsx.error) return jsx.node; - const { - context - } = this.state; - const currentContext = context[context.length - 1]; - if (currentContext === types.j_oTag || currentContext === types.j_expr) { - context.pop(); - } - } - if (!((_jsx = jsx) != null && _jsx.error) && !this.match(47)) { - return super.parseMaybeAssign(refExpressionErrors, afterLeftParse); - } - if (!state || state === this.state) state = this.state.clone(); - let typeParameters; - const arrow = this.tryParse(abort => { - var _expr$extra, _typeParameters; - typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); - const expr = super.parseMaybeAssign(refExpressionErrors, afterLeftParse); - if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) { - abort(); - } - if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) { - this.resetStartLocationFromNode(expr, typeParameters); - } - expr.typeParameters = typeParameters; - return expr; - }, state); - if (!arrow.error && !arrow.aborted) { - if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); - return arrow.node; - } - if (!jsx) { - assert(!this.hasPlugin("jsx")); - typeCast = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); - if (!typeCast.error) return typeCast.node; - } - if ((_jsx2 = jsx) != null && _jsx2.node) { - this.state = jsx.failState; - return jsx.node; - } - if (arrow.node) { - this.state = arrow.failState; - if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); - return arrow.node; - } - if ((_typeCast = typeCast) != null && _typeCast.node) { - this.state = typeCast.failState; - return typeCast.node; - } - throw ((_jsx3 = jsx) == null ? void 0 : _jsx3.error) || arrow.error || ((_typeCast2 = typeCast) == null ? void 0 : _typeCast2.error); - } - reportReservedArrowTypeParam(node) { - var _node$extra; - if (node.params.length === 1 && !node.params[0].constraint && !((_node$extra = node.extra) != null && _node$extra.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { - this.raise(TSErrors.ReservedArrowTypeParam, node); - } - } - parseMaybeUnary(refExpressionErrors, sawUnary) { - if (!this.hasPlugin("jsx") && this.match(47)) { - return this.tsParseTypeAssertion(); - } - return super.parseMaybeUnary(refExpressionErrors, sawUnary); - } - parseArrow(node) { - if (this.match(14)) { - const result = this.tryParse(abort => { - const returnType = this.tsParseTypeOrTypePredicateAnnotation(14); - if (this.canInsertSemicolon() || !this.match(19)) abort(); - return returnType; - }); - if (result.aborted) return; - if (!result.thrown) { - if (result.error) this.state = result.failState; - node.returnType = result.node; - } - } - return super.parseArrow(node); - } - parseAssignableListItemTypes(param, flags) { - if (!(flags & 2)) return param; - if (this.eat(17)) { - param.optional = true; - } - const type = this.tsTryParseTypeAnnotation(); - if (type) param.typeAnnotation = type; - this.resetEndLocation(param); - return param; - } - isAssignable(node, isBinding) { - switch (node.type) { - case "TSTypeCastExpression": - return this.isAssignable(node.expression, isBinding); - case "TSParameterProperty": - return true; - default: - return super.isAssignable(node, isBinding); - } - } - toAssignable(node, isLHS = false) { - switch (node.type) { - case "ParenthesizedExpression": - this.toAssignableParenthesizedExpression(node, isLHS); - break; - case "TSAsExpression": - case "TSSatisfiesExpression": - case "TSNonNullExpression": - case "TSTypeAssertion": - if (isLHS) { - this.expressionScope.recordArrowParameterBindingError(TSErrors.UnexpectedTypeCastInParameter, node); - } else { - this.raise(TSErrors.UnexpectedTypeCastInParameter, node); - } - this.toAssignable(node.expression, isLHS); - break; - case "AssignmentExpression": - if (!isLHS && node.left.type === "TSTypeCastExpression") { - node.left = this.typeCastToParameter(node.left); - } - default: - super.toAssignable(node, isLHS); - } - } - toAssignableParenthesizedExpression(node, isLHS) { - switch (node.expression.type) { - case "TSAsExpression": - case "TSSatisfiesExpression": - case "TSNonNullExpression": - case "TSTypeAssertion": - case "ParenthesizedExpression": - this.toAssignable(node.expression, isLHS); - break; - default: - super.toAssignable(node, isLHS); - } - } - checkToRestConversion(node, allowPattern) { - switch (node.type) { - case "TSAsExpression": - case "TSSatisfiesExpression": - case "TSTypeAssertion": - case "TSNonNullExpression": - this.checkToRestConversion(node.expression, false); - break; - default: - super.checkToRestConversion(node, allowPattern); - } - } - isValidLVal(type, isUnparenthesizedInAssign, binding) { - switch (type) { - case "TSTypeCastExpression": - return true; - case "TSParameterProperty": - return "parameter"; - case "TSNonNullExpression": - case "TSInstantiationExpression": - return "expression"; - case "TSAsExpression": - case "TSSatisfiesExpression": - case "TSTypeAssertion": - return (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true]; - default: - return super.isValidLVal(type, isUnparenthesizedInAssign, binding); - } - } - parseBindingAtom() { - if (this.state.type === 78) { - return this.parseIdentifier(true); - } - return super.parseBindingAtom(); - } - parseMaybeDecoratorArguments(expr) { - if (this.match(47) || this.match(51)) { - const typeArguments = this.tsParseTypeArgumentsInExpression(); - if (this.match(10)) { - const call = super.parseMaybeDecoratorArguments(expr); - call.typeParameters = typeArguments; - return call; - } - this.unexpected(null, 10); - } - return super.parseMaybeDecoratorArguments(expr); - } - checkCommaAfterRest(close) { - if (this.state.isAmbientContext && this.match(12) && this.lookaheadCharCode() === close) { - this.next(); - return false; - } - return super.checkCommaAfterRest(close); - } - isClassMethod() { - return this.match(47) || super.isClassMethod(); - } - isClassProperty() { - return this.match(35) || this.match(14) || super.isClassProperty(); - } - parseMaybeDefault(startLoc, left) { - const node = super.parseMaybeDefault(startLoc, left); - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(TSErrors.TypeAnnotationAfterAssign, node.typeAnnotation); - } - return node; - } - getTokenFromCode(code) { - if (this.state.inType) { - if (code === 62) { - this.finishOp(48, 1); - return; - } - if (code === 60) { - this.finishOp(47, 1); - return; - } - } - super.getTokenFromCode(code); - } - reScan_lt_gt() { - const { - type - } = this.state; - if (type === 47) { - this.state.pos -= 1; - this.readToken_lt(); - } else if (type === 48) { - this.state.pos -= 1; - this.readToken_gt(); - } - } - reScan_lt() { - const { - type - } = this.state; - if (type === 51) { - this.state.pos -= 2; - this.finishOp(47, 1); - return 47; - } - return type; - } - toAssignableList(exprList, trailingCommaLoc, isLHS) { - for (let i = 0; i < exprList.length; i++) { - const expr = exprList[i]; - if ((expr == null ? void 0 : expr.type) === "TSTypeCastExpression") { - exprList[i] = this.typeCastToParameter(expr); - } - } - super.toAssignableList(exprList, trailingCommaLoc, isLHS); - } - typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); - return node.expression; - } - shouldParseArrow(params) { - if (this.match(14)) { - return params.every(expr => this.isAssignable(expr, true)); - } - return super.shouldParseArrow(params); - } - shouldParseAsyncArrow() { - return this.match(14) || super.shouldParseAsyncArrow(); - } - canHaveLeadingDecorator() { - return super.canHaveLeadingDecorator() || this.isAbstractClass(); - } - jsxParseOpeningElementAfterName(node) { - if (this.match(47) || this.match(51)) { - const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression()); - if (typeArguments) node.typeParameters = typeArguments; - } - return super.jsxParseOpeningElementAfterName(node); - } - getGetterSetterExpectedParamCount(method) { - const baseCount = super.getGetterSetterExpectedParamCount(method); - const params = this.getObjectOrClassMethodParams(method); - const firstParam = params[0]; - const hasContextParam = firstParam && this.isThisParam(firstParam); - return hasContextParam ? baseCount + 1 : baseCount; - } - parseCatchClauseParam() { - const param = super.parseCatchClauseParam(); - const type = this.tsTryParseTypeAnnotation(); - if (type) { - param.typeAnnotation = type; - this.resetEndLocation(param); - } - return param; - } - tsInAmbientContext(cb) { - const { - isAmbientContext: oldIsAmbientContext, - strict: oldStrict - } = this.state; - this.state.isAmbientContext = true; - this.state.strict = false; - try { - return cb(); - } finally { - this.state.isAmbientContext = oldIsAmbientContext; - this.state.strict = oldStrict; - } - } - parseClass(node, isStatement, optionalId) { - const oldInAbstractClass = this.state.inAbstractClass; - this.state.inAbstractClass = !!node.abstract; - try { - return super.parseClass(node, isStatement, optionalId); - } finally { - this.state.inAbstractClass = oldInAbstractClass; - } - } - tsParseAbstractDeclaration(node, decorators) { - if (this.match(80)) { - node.abstract = true; - return this.maybeTakeDecorators(decorators, this.parseClass(node, true, false)); - } else if (this.isContextual(129)) { - if (!this.hasFollowingLineBreak()) { - node.abstract = true; - this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifer, node); - return this.tsParseInterfaceDeclaration(node); - } - } else { - this.unexpected(null, 80); - } - } - parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) { - const method = super.parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); - if (method.abstract) { - const hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body; - if (hasBody) { - const { - key - } = method; - this.raise(TSErrors.AbstractMethodHasImplementation, method, { - methodName: key.type === "Identifier" && !method.computed ? key.name : `[${this.input.slice(key.start, key.end)}]` - }); - } - } - return method; - } - tsParseTypeParameterName() { - const typeName = this.parseIdentifier(); - return typeName.name; - } - shouldParseAsAmbientContext() { - return !!this.getPluginOption("typescript", "dts"); - } - parse() { - if (this.shouldParseAsAmbientContext()) { - this.state.isAmbientContext = true; - } - return super.parse(); - } - getExpression() { - if (this.shouldParseAsAmbientContext()) { - this.state.isAmbientContext = true; - } - return super.getExpression(); - } - parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { - if (!isString && isMaybeTypeOnly) { - this.parseTypeOnlyImportExportSpecifier(node, false, isInTypeExport); - return this.finishNode(node, "ExportSpecifier"); - } - node.exportKind = "value"; - return super.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly); - } - parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { - if (!importedIsString && isMaybeTypeOnly) { - this.parseTypeOnlyImportExportSpecifier(specifier, true, isInTypeOnlyImport); - return this.finishNode(specifier, "ImportSpecifier"); - } - specifier.importKind = "value"; - return super.parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, isInTypeOnlyImport ? 4098 : 4096); - } - parseTypeOnlyImportExportSpecifier(node, isImport, isInTypeOnlyImportExport) { - const leftOfAsKey = isImport ? "imported" : "local"; - const rightOfAsKey = isImport ? "local" : "exported"; - let leftOfAs = node[leftOfAsKey]; - let rightOfAs; - let hasTypeSpecifier = false; - let canParseAsKeyword = true; - const loc = leftOfAs.loc.start; - if (this.isContextual(93)) { - const firstAs = this.parseIdentifier(); - if (this.isContextual(93)) { - const secondAs = this.parseIdentifier(); - if (tokenIsKeywordOrIdentifier(this.state.type)) { - hasTypeSpecifier = true; - leftOfAs = firstAs; - rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName(); - canParseAsKeyword = false; - } else { - rightOfAs = secondAs; - canParseAsKeyword = false; - } - } else if (tokenIsKeywordOrIdentifier(this.state.type)) { - canParseAsKeyword = false; - rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName(); - } else { - hasTypeSpecifier = true; - leftOfAs = firstAs; - } - } else if (tokenIsKeywordOrIdentifier(this.state.type)) { - hasTypeSpecifier = true; - if (isImport) { - leftOfAs = this.parseIdentifier(true); - if (!this.isContextual(93)) { - this.checkReservedWord(leftOfAs.name, leftOfAs.loc.start, true, true); - } - } else { - leftOfAs = this.parseModuleExportName(); - } - } - if (hasTypeSpecifier && isInTypeOnlyImportExport) { - this.raise(isImport ? TSErrors.TypeModifierIsUsedInTypeImports : TSErrors.TypeModifierIsUsedInTypeExports, loc); - } - node[leftOfAsKey] = leftOfAs; - node[rightOfAsKey] = rightOfAs; - const kindKey = isImport ? "importKind" : "exportKind"; - node[kindKey] = hasTypeSpecifier ? "type" : "value"; - if (canParseAsKeyword && this.eatContextual(93)) { - node[rightOfAsKey] = isImport ? this.parseIdentifier() : this.parseModuleExportName(); - } - if (!node[rightOfAsKey]) { - node[rightOfAsKey] = cloneIdentifier(node[leftOfAsKey]); - } - if (isImport) { - this.checkIdentifier(node[rightOfAsKey], hasTypeSpecifier ? 4098 : 4096); - } - } - }; - function isPossiblyLiteralEnum(expression) { - if (expression.type !== "MemberExpression") return false; - const { - computed, - property - } = expression; - if (computed && property.type !== "StringLiteral" && (property.type !== "TemplateLiteral" || property.expressions.length > 0)) { - return false; - } - return isUncomputedMemberExpressionChain(expression.object); - } - function isValidAmbientConstInitializer(expression, estree) { - var _expression$extra; - const { - type - } = expression; - if ((_expression$extra = expression.extra) != null && _expression$extra.parenthesized) { - return false; - } - if (estree) { - if (type === "Literal") { - const { - value - } = expression; - if (typeof value === "string" || typeof value === "boolean") { - return true; - } - } - } else { - if (type === "StringLiteral" || type === "BooleanLiteral") { - return true; - } - } - if (isNumber(expression, estree) || isNegativeNumber(expression, estree)) { - return true; - } - if (type === "TemplateLiteral" && expression.expressions.length === 0) { - return true; - } - if (isPossiblyLiteralEnum(expression)) { - return true; - } - return false; - } - function isNumber(expression, estree) { - if (estree) { - return expression.type === "Literal" && (typeof expression.value === "number" || "bigint" in expression); - } - return expression.type === "NumericLiteral" || expression.type === "BigIntLiteral"; - } - function isNegativeNumber(expression, estree) { - if (expression.type === "UnaryExpression") { - const { - operator, - argument - } = expression; - if (operator === "-" && isNumber(argument, estree)) { - return true; - } - } - return false; - } - function isUncomputedMemberExpressionChain(expression) { - if (expression.type === "Identifier") return true; - if (expression.type !== "MemberExpression" || expression.computed) { - return false; - } - return isUncomputedMemberExpressionChain(expression.object); - } - const PlaceholderErrors = ParseErrorEnum`placeholders`({ - ClassNameIsRequired: "A class name is required.", - UnexpectedSpace: "Unexpected space in placeholder." - }); - var placeholders = superClass => class PlaceholdersParserMixin extends superClass { - parsePlaceholder(expectedNode) { - if (this.match(144)) { - const node = this.startNode(); - this.next(); - this.assertNoSpace(); - node.name = super.parseIdentifier(true); - this.assertNoSpace(); - this.expect(144); - return this.finishPlaceholder(node, expectedNode); - } - } - finishPlaceholder(node, expectedNode) { - let placeholder = node; - if (!placeholder.expectedNode || !placeholder.type) { - placeholder = this.finishNode(placeholder, "Placeholder"); - } - placeholder.expectedNode = expectedNode; - return placeholder; - } - getTokenFromCode(code) { - if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) { - this.finishOp(144, 2); - } else { - super.getTokenFromCode(code); - } - } - parseExprAtom(refExpressionErrors) { - return this.parsePlaceholder("Expression") || super.parseExprAtom(refExpressionErrors); - } - parseIdentifier(liberal) { - return this.parsePlaceholder("Identifier") || super.parseIdentifier(liberal); - } - checkReservedWord(word, startLoc, checkKeywords, isBinding) { - if (word !== undefined) { - super.checkReservedWord(word, startLoc, checkKeywords, isBinding); - } - } - parseBindingAtom() { - return this.parsePlaceholder("Pattern") || super.parseBindingAtom(); - } - isValidLVal(type, isParenthesized, binding) { - return type === "Placeholder" || super.isValidLVal(type, isParenthesized, binding); - } - toAssignable(node, isLHS) { - if (node && node.type === "Placeholder" && node.expectedNode === "Expression") { - node.expectedNode = "Pattern"; - } else { - super.toAssignable(node, isLHS); - } - } - chStartsBindingIdentifier(ch, pos) { - if (super.chStartsBindingIdentifier(ch, pos)) { - return true; - } - const nextToken = this.lookahead(); - if (nextToken.type === 144) { - return true; - } - return false; - } - verifyBreakContinue(node, isBreak) { - if (node.label && node.label.type === "Placeholder") return; - super.verifyBreakContinue(node, isBreak); - } - parseExpressionStatement(node, expr) { - var _expr$extra; - if (expr.type !== "Placeholder" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) { - return super.parseExpressionStatement(node, expr); - } - if (this.match(14)) { - const stmt = node; - stmt.label = this.finishPlaceholder(expr, "Identifier"); - this.next(); - stmt.body = super.parseStatementOrSloppyAnnexBFunctionDeclaration(); - return this.finishNode(stmt, "LabeledStatement"); - } - this.semicolon(); - const stmtPlaceholder = node; - stmtPlaceholder.name = expr.name; - return this.finishPlaceholder(stmtPlaceholder, "Statement"); - } - parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse) { - return this.parsePlaceholder("BlockStatement") || super.parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse); - } - parseFunctionId(requireId) { - return this.parsePlaceholder("Identifier") || super.parseFunctionId(requireId); - } - parseClass(node, isStatement, optionalId) { - const type = isStatement ? "ClassDeclaration" : "ClassExpression"; - this.next(); - const oldStrict = this.state.strict; - const placeholder = this.parsePlaceholder("Identifier"); - if (placeholder) { - if (this.match(81) || this.match(144) || this.match(5)) { - node.id = placeholder; - } else if (optionalId || !isStatement) { - node.id = null; - node.body = this.finishPlaceholder(placeholder, "ClassBody"); - return this.finishNode(node, type); - } else { - throw this.raise(PlaceholderErrors.ClassNameIsRequired, this.state.startLoc); - } - } else { - this.parseClassId(node, isStatement, optionalId); - } - super.parseClassSuper(node); - node.body = this.parsePlaceholder("ClassBody") || super.parseClassBody(!!node.superClass, oldStrict); - return this.finishNode(node, type); - } - parseExport(node, decorators) { - const placeholder = this.parsePlaceholder("Identifier"); - if (!placeholder) return super.parseExport(node, decorators); - const node2 = node; - if (!this.isContextual(98) && !this.match(12)) { - node2.specifiers = []; - node2.source = null; - node2.declaration = this.finishPlaceholder(placeholder, "Declaration"); - return this.finishNode(node2, "ExportNamedDeclaration"); - } - this.expectPlugin("exportDefaultFrom"); - const specifier = this.startNode(); - specifier.exported = placeholder; - node2.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - return super.parseExport(node2, decorators); - } - isExportDefaultSpecifier() { - if (this.match(65)) { - const next = this.nextTokenStart(); - if (this.isUnparsedContextual(next, "from")) { - if (this.input.startsWith(tokenLabelName(144), this.nextTokenStartSince(next + 4))) { - return true; - } - } - } - return super.isExportDefaultSpecifier(); - } - maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier) { - var _specifiers; - if ((_specifiers = node.specifiers) != null && _specifiers.length) { - return true; - } - return super.maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier); - } - checkExport(node) { - const { - specifiers - } = node; - if (specifiers != null && specifiers.length) { - node.specifiers = specifiers.filter(node => node.exported.type === "Placeholder"); - } - super.checkExport(node); - node.specifiers = specifiers; - } - parseImport(node) { - const placeholder = this.parsePlaceholder("Identifier"); - if (!placeholder) return super.parseImport(node); - node.specifiers = []; - if (!this.isContextual(98) && !this.match(12)) { - node.source = this.finishPlaceholder(placeholder, "StringLiteral"); - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - } - const specifier = this.startNodeAtNode(placeholder); - specifier.local = placeholder; - node.specifiers.push(this.finishNode(specifier, "ImportDefaultSpecifier")); - if (this.eat(12)) { - const hasStarImport = this.maybeParseStarImportSpecifier(node); - if (!hasStarImport) this.parseNamedImportSpecifiers(node); - } - this.expectContextual(98); - node.source = this.parseImportSource(); - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - } - parseImportSource() { - return this.parsePlaceholder("StringLiteral") || super.parseImportSource(); - } - assertNoSpace() { - if (this.state.start > this.state.lastTokEndLoc.index) { - this.raise(PlaceholderErrors.UnexpectedSpace, this.state.lastTokEndLoc); - } - } - }; - var v8intrinsic = superClass => class V8IntrinsicMixin extends superClass { - parseV8Intrinsic() { - if (this.match(54)) { - const v8IntrinsicStartLoc = this.state.startLoc; - const node = this.startNode(); - this.next(); - if (tokenIsIdentifier(this.state.type)) { - const name = this.parseIdentifierName(); - const identifier = this.createIdentifier(node, name); - identifier.type = "V8IntrinsicIdentifier"; - if (this.match(10)) { - return identifier; - } - } - this.unexpected(v8IntrinsicStartLoc); - } - } - parseExprAtom(refExpressionErrors) { - return this.parseV8Intrinsic() || super.parseExprAtom(refExpressionErrors); - } - }; - const PIPELINE_PROPOSALS = ["minimal", "fsharp", "hack", "smart"]; - const TOPIC_TOKENS = ["^^", "@@", "^", "%", "#"]; - function validatePlugins(pluginsMap) { - if (pluginsMap.has("decorators")) { - if (pluginsMap.has("decorators-legacy")) { - throw new Error("Cannot use the decorators and decorators-legacy plugin together"); - } - const decoratorsBeforeExport = pluginsMap.get("decorators").decoratorsBeforeExport; - if (decoratorsBeforeExport != null && typeof decoratorsBeforeExport !== "boolean") { - throw new Error("'decoratorsBeforeExport' must be a boolean, if specified."); - } - const allowCallParenthesized = pluginsMap.get("decorators").allowCallParenthesized; - if (allowCallParenthesized != null && typeof allowCallParenthesized !== "boolean") { - throw new Error("'allowCallParenthesized' must be a boolean."); - } - } - if (pluginsMap.has("flow") && pluginsMap.has("typescript")) { - throw new Error("Cannot combine flow and typescript plugins."); - } - if (pluginsMap.has("placeholders") && pluginsMap.has("v8intrinsic")) { - throw new Error("Cannot combine placeholders and v8intrinsic plugins."); - } - if (pluginsMap.has("pipelineOperator")) { - var _pluginsMap$get; - const proposal = pluginsMap.get("pipelineOperator").proposal; - if (!PIPELINE_PROPOSALS.includes(proposal)) { - const proposalList = PIPELINE_PROPOSALS.map(p => `"${p}"`).join(", "); - throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`); - } - const tupleSyntaxIsHash = ((_pluginsMap$get = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get.syntaxType) === "hash"; - if (proposal === "hack") { - if (pluginsMap.has("placeholders")) { - throw new Error("Cannot combine placeholders plugin and Hack-style pipes."); - } - if (pluginsMap.has("v8intrinsic")) { - throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes."); - } - const topicToken = pluginsMap.get("pipelineOperator").topicToken; - if (!TOPIC_TOKENS.includes(topicToken)) { - const tokenList = TOPIC_TOKENS.map(t => `"${t}"`).join(", "); - throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`); - } - if (topicToken === "#" && tupleSyntaxIsHash) { - throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`); - } - } else if (proposal === "smart" && tupleSyntaxIsHash) { - throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`); - } - } - if (pluginsMap.has("moduleAttributes")) { - { - if (pluginsMap.has("importAttributes") || pluginsMap.has("importAssertions")) { - throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins."); - } - const moduleAttributesVersionPluginOption = pluginsMap.get("moduleAttributes").version; - if (moduleAttributesVersionPluginOption !== "may-2020") { - throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'."); - } - } - } - if (pluginsMap.has("importAttributes") && pluginsMap.has("importAssertions")) { - throw new Error("Cannot combine importAssertions and importAttributes plugins."); - } - if (pluginsMap.has("recordAndTuple")) { - const syntaxType = pluginsMap.get("recordAndTuple").syntaxType; - if (syntaxType != null) { - { - const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"]; - if (!RECORD_AND_TUPLE_SYNTAX_TYPES.includes(syntaxType)) { - throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(", ")); - } - } - } - } - if (pluginsMap.has("asyncDoExpressions") && !pluginsMap.has("doExpressions")) { - const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins."); - error.missingPlugins = "doExpressions"; - throw error; - } - if (pluginsMap.has("optionalChainingAssign") && pluginsMap.get("optionalChainingAssign").version !== "2023-07") { - throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is '2023-07'."); - } - } - const mixinPlugins = { - estree, - jsx, - flow, - typescript, - v8intrinsic, - placeholders - }; - const mixinPluginNames = Object.keys(mixinPlugins); - const defaultOptions = { - sourceType: "script", - sourceFilename: undefined, - startColumn: 0, - startLine: 1, - allowAwaitOutsideFunction: false, - allowReturnOutsideFunction: false, - allowNewTargetOutsideFunction: false, - allowImportExportEverywhere: false, - allowSuperOutsideMethod: false, - allowUndeclaredExports: false, - plugins: [], - strictMode: null, - ranges: false, - tokens: false, - createImportExpressions: false, - createParenthesizedExpressions: false, - errorRecovery: false, - attachComment: true, - annexB: true - }; - function getOptions(opts) { - if (opts == null) { - return Object.assign({}, defaultOptions); - } - if (opts.annexB != null && opts.annexB !== false) { - throw new Error("The `annexB` option can only be set to `false`."); - } - const options = {}; - for (const key of Object.keys(defaultOptions)) { - var _opts$key; - options[key] = (_opts$key = opts[key]) != null ? _opts$key : defaultOptions[key]; - } - return options; - } - class ExpressionParser extends LValParser { - checkProto(prop, isRecord, protoRef, refExpressionErrors) { - if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) { - return; - } - const key = prop.key; - const name = key.type === "Identifier" ? key.name : key.value; - if (name === "__proto__") { - if (isRecord) { - this.raise(Errors.RecordNoProto, key); - return; - } - if (protoRef.used) { - if (refExpressionErrors) { - if (refExpressionErrors.doubleProtoLoc === null) { - refExpressionErrors.doubleProtoLoc = key.loc.start; - } - } else { - this.raise(Errors.DuplicateProto, key); - } - } - protoRef.used = true; - } - } - shouldExitDescending(expr, potentialArrowAt) { - return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt; - } - getExpression() { - this.enterInitialScopes(); - this.nextToken(); - const expr = this.parseExpression(); - if (!this.match(139)) { - this.unexpected(); - } - this.finalizeRemainingComments(); - expr.comments = this.comments; - expr.errors = this.state.errors; - if (this.options.tokens) { - expr.tokens = this.tokens; - } - return expr; - } - parseExpression(disallowIn, refExpressionErrors) { - if (disallowIn) { - return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors)); - } - return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors)); - } - parseExpressionBase(refExpressionErrors) { - const startLoc = this.state.startLoc; - const expr = this.parseMaybeAssign(refExpressionErrors); - if (this.match(12)) { - const node = this.startNodeAt(startLoc); - node.expressions = [expr]; - while (this.eat(12)) { - node.expressions.push(this.parseMaybeAssign(refExpressionErrors)); - } - this.toReferencedList(node.expressions); - return this.finishNode(node, "SequenceExpression"); - } - return expr; - } - parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse) { - return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); - } - parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse) { - return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); - } - setOptionalParametersError(refExpressionErrors, resultError) { - var _resultError$loc; - refExpressionErrors.optionalParametersLoc = (_resultError$loc = resultError == null ? void 0 : resultError.loc) != null ? _resultError$loc : this.state.startLoc; - } - parseMaybeAssign(refExpressionErrors, afterLeftParse) { - const startLoc = this.state.startLoc; - if (this.isContextual(108)) { - if (this.prodParam.hasYield) { - let left = this.parseYield(); - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startLoc); - } - return left; - } - } - let ownExpressionErrors; - if (refExpressionErrors) { - ownExpressionErrors = false; - } else { - refExpressionErrors = new ExpressionErrors(); - ownExpressionErrors = true; - } - const { - type - } = this.state; - if (type === 10 || tokenIsIdentifier(type)) { - this.state.potentialArrowAt = this.state.start; - } - let left = this.parseMaybeConditional(refExpressionErrors); - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startLoc); - } - if (tokenIsAssignment(this.state.type)) { - const node = this.startNodeAt(startLoc); - const operator = this.state.value; - node.operator = operator; - if (this.match(29)) { - this.toAssignable(left, true); - node.left = left; - const startIndex = startLoc.index; - if (refExpressionErrors.doubleProtoLoc != null && refExpressionErrors.doubleProtoLoc.index >= startIndex) { - refExpressionErrors.doubleProtoLoc = null; - } - if (refExpressionErrors.shorthandAssignLoc != null && refExpressionErrors.shorthandAssignLoc.index >= startIndex) { - refExpressionErrors.shorthandAssignLoc = null; - } - if (refExpressionErrors.privateKeyLoc != null && refExpressionErrors.privateKeyLoc.index >= startIndex) { - this.checkDestructuringPrivate(refExpressionErrors); - refExpressionErrors.privateKeyLoc = null; - } - } else { - node.left = left; - } - this.next(); - node.right = this.parseMaybeAssign(); - this.checkLVal(left, this.finishNode(node, "AssignmentExpression")); - return node; - } else if (ownExpressionErrors) { - this.checkExpressionErrors(refExpressionErrors, true); - } - return left; - } - parseMaybeConditional(refExpressionErrors) { - const startLoc = this.state.startLoc; - const potentialArrowAt = this.state.potentialArrowAt; - const expr = this.parseExprOps(refExpressionErrors); - if (this.shouldExitDescending(expr, potentialArrowAt)) { - return expr; - } - return this.parseConditional(expr, startLoc, refExpressionErrors); - } - parseConditional(expr, startLoc, refExpressionErrors) { - if (this.eat(17)) { - const node = this.startNodeAt(startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssignAllowIn(); - this.expect(14); - node.alternate = this.parseMaybeAssign(); - return this.finishNode(node, "ConditionalExpression"); - } - return expr; - } - parseMaybeUnaryOrPrivate(refExpressionErrors) { - return this.match(138) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors); - } - parseExprOps(refExpressionErrors) { - const startLoc = this.state.startLoc; - const potentialArrowAt = this.state.potentialArrowAt; - const expr = this.parseMaybeUnaryOrPrivate(refExpressionErrors); - if (this.shouldExitDescending(expr, potentialArrowAt)) { - return expr; - } - return this.parseExprOp(expr, startLoc, -1); - } - parseExprOp(left, leftStartLoc, minPrec) { - if (this.isPrivateName(left)) { - const value = this.getPrivateNameSV(left); - if (minPrec >= tokenOperatorPrecedence(58) || !this.prodParam.hasIn || !this.match(58)) { - this.raise(Errors.PrivateInExpectedIn, left, { - identifierName: value - }); - } - this.classScope.usePrivateName(value, left.loc.start); - } - const op = this.state.type; - if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(58))) { - let prec = tokenOperatorPrecedence(op); - if (prec > minPrec) { - if (op === 39) { - this.expectPlugin("pipelineOperator"); - if (this.state.inFSharpPipelineDirectBody) { - return left; - } - this.checkPipelineAtInfixOperator(left, leftStartLoc); - } - const node = this.startNodeAt(leftStartLoc); - node.left = left; - node.operator = this.state.value; - const logical = op === 41 || op === 42; - const coalesce = op === 40; - if (coalesce) { - prec = tokenOperatorPrecedence(42); - } - this.next(); - if (op === 39 && this.hasPlugin(["pipelineOperator", { - proposal: "minimal" - }])) { - if (this.state.type === 96 && this.prodParam.hasAwait) { - throw this.raise(Errors.UnexpectedAwaitAfterPipelineBody, this.state.startLoc); - } - } - node.right = this.parseExprOpRightExpr(op, prec); - const finishedNode = this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression"); - const nextOp = this.state.type; - if (coalesce && (nextOp === 41 || nextOp === 42) || logical && nextOp === 40) { - throw this.raise(Errors.MixingCoalesceWithLogical, this.state.startLoc); - } - return this.parseExprOp(finishedNode, leftStartLoc, minPrec); - } - } - return left; - } - parseExprOpRightExpr(op, prec) { - const startLoc = this.state.startLoc; - switch (op) { - case 39: - switch (this.getPluginOption("pipelineOperator", "proposal")) { - case "hack": - return this.withTopicBindingContext(() => { - return this.parseHackPipeBody(); - }); - case "smart": - return this.withTopicBindingContext(() => { - if (this.prodParam.hasYield && this.isContextual(108)) { - throw this.raise(Errors.PipeBodyIsTighter, this.state.startLoc); - } - return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startLoc); - }); - case "fsharp": - return this.withSoloAwaitPermittingContext(() => { - return this.parseFSharpPipelineBody(prec); - }); - } - default: - return this.parseExprOpBaseRightExpr(op, prec); - } - } - parseExprOpBaseRightExpr(op, prec) { - const startLoc = this.state.startLoc; - return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, tokenIsRightAssociative(op) ? prec - 1 : prec); - } - parseHackPipeBody() { - var _body$extra; - const { - startLoc - } = this.state; - const body = this.parseMaybeAssign(); - const requiredParentheses = UnparenthesizedPipeBodyDescriptions.has(body.type); - if (requiredParentheses && !((_body$extra = body.extra) != null && _body$extra.parenthesized)) { - this.raise(Errors.PipeUnparenthesizedBody, startLoc, { - type: body.type - }); - } - if (!this.topicReferenceWasUsedInCurrentContext()) { - this.raise(Errors.PipeTopicUnused, startLoc); - } - return body; - } - checkExponentialAfterUnary(node) { - if (this.match(57)) { - this.raise(Errors.UnexpectedTokenUnaryExponentiation, node.argument); - } - } - parseMaybeUnary(refExpressionErrors, sawUnary) { - const startLoc = this.state.startLoc; - const isAwait = this.isContextual(96); - if (isAwait && this.recordAwaitIfAllowed()) { - this.next(); - const expr = this.parseAwait(startLoc); - if (!sawUnary) this.checkExponentialAfterUnary(expr); - return expr; - } - const update = this.match(34); - const node = this.startNode(); - if (tokenIsPrefix(this.state.type)) { - node.operator = this.state.value; - node.prefix = true; - if (this.match(72)) { - this.expectPlugin("throwExpressions"); - } - const isDelete = this.match(89); - this.next(); - node.argument = this.parseMaybeUnary(null, true); - this.checkExpressionErrors(refExpressionErrors, true); - if (this.state.strict && isDelete) { - const arg = node.argument; - if (arg.type === "Identifier") { - this.raise(Errors.StrictDelete, node); - } else if (this.hasPropertyAsPrivateName(arg)) { - this.raise(Errors.DeletePrivateField, node); - } - } - if (!update) { - if (!sawUnary) { - this.checkExponentialAfterUnary(node); - } - return this.finishNode(node, "UnaryExpression"); - } - } - const expr = this.parseUpdate(node, update, refExpressionErrors); - if (isAwait) { - const { - type - } = this.state; - const startsExpr = this.hasPlugin("v8intrinsic") ? tokenCanStartExpression(type) : tokenCanStartExpression(type) && !this.match(54); - if (startsExpr && !this.isAmbiguousAwait()) { - this.raiseOverwrite(Errors.AwaitNotInAsyncContext, startLoc); - return this.parseAwait(startLoc); - } - } - return expr; - } - parseUpdate(node, update, refExpressionErrors) { - if (update) { - const updateExpressionNode = node; - this.checkLVal(updateExpressionNode.argument, this.finishNode(updateExpressionNode, "UpdateExpression")); - return node; - } - const startLoc = this.state.startLoc; - let expr = this.parseExprSubscripts(refExpressionErrors); - if (this.checkExpressionErrors(refExpressionErrors, false)) return expr; - while (tokenIsPostfix(this.state.type) && !this.canInsertSemicolon()) { - const node = this.startNodeAt(startLoc); - node.operator = this.state.value; - node.prefix = false; - node.argument = expr; - this.next(); - this.checkLVal(expr, expr = this.finishNode(node, "UpdateExpression")); - } - return expr; - } - parseExprSubscripts(refExpressionErrors) { - const startLoc = this.state.startLoc; - const potentialArrowAt = this.state.potentialArrowAt; - const expr = this.parseExprAtom(refExpressionErrors); - if (this.shouldExitDescending(expr, potentialArrowAt)) { - return expr; - } - return this.parseSubscripts(expr, startLoc); - } - parseSubscripts(base, startLoc, noCalls) { - const state = { - optionalChainMember: false, - maybeAsyncArrow: this.atPossibleAsyncArrow(base), - stop: false - }; - do { - base = this.parseSubscript(base, startLoc, noCalls, state); - state.maybeAsyncArrow = false; - } while (!state.stop); - return base; - } - parseSubscript(base, startLoc, noCalls, state) { - const { - type - } = this.state; - if (!noCalls && type === 15) { - return this.parseBind(base, startLoc, noCalls, state); - } else if (tokenIsTemplate(type)) { - return this.parseTaggedTemplateExpression(base, startLoc, state); - } - let optional = false; - if (type === 18) { - if (noCalls) { - this.raise(Errors.OptionalChainingNoNew, this.state.startLoc); - if (this.lookaheadCharCode() === 40) { - state.stop = true; - return base; - } - } - state.optionalChainMember = optional = true; - this.next(); - } - if (!noCalls && this.match(10)) { - return this.parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional); - } else { - const computed = this.eat(0); - if (computed || optional || this.eat(16)) { - return this.parseMember(base, startLoc, state, computed, optional); - } else { - state.stop = true; - return base; - } - } - } - parseMember(base, startLoc, state, computed, optional) { - const node = this.startNodeAt(startLoc); - node.object = base; - node.computed = computed; - if (computed) { - node.property = this.parseExpression(); - this.expect(3); - } else if (this.match(138)) { - if (base.type === "Super") { - this.raise(Errors.SuperPrivateField, startLoc); - } - this.classScope.usePrivateName(this.state.value, this.state.startLoc); - node.property = this.parsePrivateName(); - } else { - node.property = this.parseIdentifier(true); - } - if (state.optionalChainMember) { - node.optional = optional; - return this.finishNode(node, "OptionalMemberExpression"); - } else { - return this.finishNode(node, "MemberExpression"); - } - } - parseBind(base, startLoc, noCalls, state) { - const node = this.startNodeAt(startLoc); - node.object = base; - this.next(); - node.callee = this.parseNoCallExpr(); - state.stop = true; - return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc, noCalls); - } - parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional) { - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - let refExpressionErrors = null; - this.state.maybeInArrowParameters = true; - this.next(); - const node = this.startNodeAt(startLoc); - node.callee = base; - const { - maybeAsyncArrow, - optionalChainMember - } = state; - if (maybeAsyncArrow) { - this.expressionScope.enter(newAsyncArrowScope()); - refExpressionErrors = new ExpressionErrors(); - } - if (optionalChainMember) { - node.optional = optional; - } - if (optional) { - node.arguments = this.parseCallExpressionArguments(11); - } else { - node.arguments = this.parseCallExpressionArguments(11, base.type === "Import", base.type !== "Super", node, refExpressionErrors); - } - let finishedNode = this.finishCallExpression(node, optionalChainMember); - if (maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) { - state.stop = true; - this.checkDestructuringPrivate(refExpressionErrors); - this.expressionScope.validateAsPattern(); - this.expressionScope.exit(); - finishedNode = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startLoc), finishedNode); - } else { - if (maybeAsyncArrow) { - this.checkExpressionErrors(refExpressionErrors, true); - this.expressionScope.exit(); - } - this.toReferencedArguments(finishedNode); - } - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - return finishedNode; - } - toReferencedArguments(node, isParenthesizedExpr) { - this.toReferencedListDeep(node.arguments, isParenthesizedExpr); - } - parseTaggedTemplateExpression(base, startLoc, state) { - const node = this.startNodeAt(startLoc); - node.tag = base; - node.quasi = this.parseTemplate(true); - if (state.optionalChainMember) { - this.raise(Errors.OptionalChainingNoTemplate, startLoc); - } - return this.finishNode(node, "TaggedTemplateExpression"); - } - atPossibleAsyncArrow(base) { - return base.type === "Identifier" && base.name === "async" && this.state.lastTokEndLoc.index === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && base.start === this.state.potentialArrowAt; - } - expectImportAttributesPlugin() { - if (!this.hasPlugin("importAssertions")) { - this.expectPlugin("importAttributes"); - } - } - finishCallExpression(node, optional) { - if (node.callee.type === "Import") { - if (node.arguments.length === 2) { - { - if (!this.hasPlugin("moduleAttributes")) { - this.expectImportAttributesPlugin(); - } - } - } - if (node.arguments.length === 0 || node.arguments.length > 2) { - this.raise(Errors.ImportCallArity, node, { - maxArgumentCount: this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? 2 : 1 - }); - } else { - for (const arg of node.arguments) { - if (arg.type === "SpreadElement") { - this.raise(Errors.ImportCallSpreadArgument, arg); - } - } - } - } - return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression"); - } - parseCallExpressionArguments(close, dynamicImport, allowPlaceholder, nodeForExtra, refExpressionErrors) { - const elts = []; - let first = true; - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = false; - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(12); - if (this.match(close)) { - if (dynamicImport && !this.hasPlugin("importAttributes") && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) { - this.raise(Errors.ImportCallArgumentTrailingComma, this.state.lastTokStartLoc); - } - if (nodeForExtra) { - this.addTrailingCommaExtraToNode(nodeForExtra); - } - this.next(); - break; - } - } - elts.push(this.parseExprListItem(false, refExpressionErrors, allowPlaceholder)); - } - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return elts; - } - shouldParseAsyncArrow() { - return this.match(19) && !this.canInsertSemicolon(); - } - parseAsyncArrowFromCallExpression(node, call) { - var _call$extra; - this.resetPreviousNodeTrailingComments(call); - this.expect(19); - this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingCommaLoc); - if (call.innerComments) { - setInnerComments(node, call.innerComments); - } - if (call.callee.trailingComments) { - setInnerComments(node, call.callee.trailingComments); - } - return node; - } - parseNoCallExpr() { - const startLoc = this.state.startLoc; - return this.parseSubscripts(this.parseExprAtom(), startLoc, true); - } - parseExprAtom(refExpressionErrors) { - let node; - let decorators = null; - const { - type - } = this.state; - switch (type) { - case 79: - return this.parseSuper(); - case 83: - node = this.startNode(); - this.next(); - if (this.match(16)) { - return this.parseImportMetaProperty(node); - } - if (this.match(10)) { - if (this.options.createImportExpressions) { - return this.parseImportCall(node); - } else { - return this.finishNode(node, "Import"); - } - } else { - this.raise(Errors.UnsupportedImport, this.state.lastTokStartLoc); - return this.finishNode(node, "Import"); - } - case 78: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression"); - case 90: - { - return this.parseDo(this.startNode(), false); - } - case 56: - case 31: - { - this.readRegexp(); - return this.parseRegExpLiteral(this.state.value); - } - case 134: - return this.parseNumericLiteral(this.state.value); - case 135: - return this.parseBigIntLiteral(this.state.value); - case 136: - return this.parseDecimalLiteral(this.state.value); - case 133: - return this.parseStringLiteral(this.state.value); - case 84: - return this.parseNullLiteral(); - case 85: - return this.parseBooleanLiteral(true); - case 86: - return this.parseBooleanLiteral(false); - case 10: - { - const canBeArrow = this.state.potentialArrowAt === this.state.start; - return this.parseParenAndDistinguishExpression(canBeArrow); - } - case 2: - case 1: - { - return this.parseArrayLike(this.state.type === 2 ? 4 : 3, false, true); - } - case 0: - { - return this.parseArrayLike(3, true, false, refExpressionErrors); - } - case 6: - case 7: - { - return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true); - } - case 5: - { - return this.parseObjectLike(8, false, false, refExpressionErrors); - } - case 68: - return this.parseFunctionOrFunctionSent(); - case 26: - decorators = this.parseDecorators(); - case 80: - return this.parseClass(this.maybeTakeDecorators(decorators, this.startNode()), false); - case 77: - return this.parseNewOrNewTarget(); - case 25: - case 24: - return this.parseTemplate(false); - case 15: - { - node = this.startNode(); - this.next(); - node.object = null; - const callee = node.callee = this.parseNoCallExpr(); - if (callee.type === "MemberExpression") { - return this.finishNode(node, "BindExpression"); - } else { - throw this.raise(Errors.UnsupportedBind, callee); - } - } - case 138: - { - this.raise(Errors.PrivateInExpectedIn, this.state.startLoc, { - identifierName: this.state.value - }); - return this.parsePrivateName(); - } - case 33: - { - return this.parseTopicReferenceThenEqualsSign(54, "%"); - } - case 32: - { - return this.parseTopicReferenceThenEqualsSign(44, "^"); - } - case 37: - case 38: - { - return this.parseTopicReference("hack"); - } - case 44: - case 54: - case 27: - { - const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); - if (pipeProposal) { - return this.parseTopicReference(pipeProposal); - } - this.unexpected(); - break; - } - case 47: - { - const lookaheadCh = this.input.codePointAt(this.nextTokenStart()); - if (isIdentifierStart(lookaheadCh) || lookaheadCh === 62) { - this.expectOnePlugin(["jsx", "flow", "typescript"]); - } else { - this.unexpected(); - } - break; - } - default: - if (tokenIsIdentifier(type)) { - if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123) { - return this.parseModuleExpression(); - } - const canBeArrow = this.state.potentialArrowAt === this.state.start; - const containsEsc = this.state.containsEsc; - const id = this.parseIdentifier(); - if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) { - const { - type - } = this.state; - if (type === 68) { - this.resetPreviousNodeTrailingComments(id); - this.next(); - return this.parseAsyncFunctionExpression(this.startNodeAtNode(id)); - } else if (tokenIsIdentifier(type)) { - if (this.lookaheadCharCode() === 61) { - return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id)); - } else { - return id; - } - } else if (type === 90) { - this.resetPreviousNodeTrailingComments(id); - return this.parseDo(this.startNodeAtNode(id), true); - } - } - if (canBeArrow && this.match(19) && !this.canInsertSemicolon()) { - this.next(); - return this.parseArrowExpression(this.startNodeAtNode(id), [id], false); - } - return id; - } else { - this.unexpected(); - } - } - } - parseTopicReferenceThenEqualsSign(topicTokenType, topicTokenValue) { - const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); - if (pipeProposal) { - this.state.type = topicTokenType; - this.state.value = topicTokenValue; - this.state.pos--; - this.state.end--; - this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1); - return this.parseTopicReference(pipeProposal); - } else { - this.unexpected(); - } - } - parseTopicReference(pipeProposal) { - const node = this.startNode(); - const startLoc = this.state.startLoc; - const tokenType = this.state.type; - this.next(); - return this.finishTopicReference(node, startLoc, pipeProposal, tokenType); - } - finishTopicReference(node, startLoc, pipeProposal, tokenType) { - if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) { - const nodeType = pipeProposal === "smart" ? "PipelinePrimaryTopicReference" : "TopicReference"; - if (!this.topicReferenceIsAllowedInCurrentContext()) { - this.raise(pipeProposal === "smart" ? Errors.PrimaryTopicNotAllowed : Errors.PipeTopicUnbound, startLoc); - } - this.registerTopicReference(); - return this.finishNode(node, nodeType); - } else { - throw this.raise(Errors.PipeTopicUnconfiguredToken, startLoc, { - token: tokenLabelName(tokenType) - }); - } - } - testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType) { - switch (pipeProposal) { - case "hack": - { - return this.hasPlugin(["pipelineOperator", { - topicToken: tokenLabelName(tokenType) - }]); - } - case "smart": - return tokenType === 27; - default: - throw this.raise(Errors.PipeTopicRequiresHackPipes, startLoc); - } - } - parseAsyncArrowUnaryFunction(node) { - this.prodParam.enter(functionFlags(true, this.prodParam.hasYield)); - const params = [this.parseIdentifier()]; - this.prodParam.exit(); - if (this.hasPrecedingLineBreak()) { - this.raise(Errors.LineTerminatorBeforeArrow, this.state.curPosition()); - } - this.expect(19); - return this.parseArrowExpression(node, params, true); - } - parseDo(node, isAsync) { - this.expectPlugin("doExpressions"); - if (isAsync) { - this.expectPlugin("asyncDoExpressions"); - } - node.async = isAsync; - this.next(); - const oldLabels = this.state.labels; - this.state.labels = []; - if (isAsync) { - this.prodParam.enter(2); - node.body = this.parseBlock(); - this.prodParam.exit(); - } else { - node.body = this.parseBlock(); - } - this.state.labels = oldLabels; - return this.finishNode(node, "DoExpression"); - } - parseSuper() { - const node = this.startNode(); - this.next(); - if (this.match(10) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) { - this.raise(Errors.SuperNotAllowed, node); - } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) { - this.raise(Errors.UnexpectedSuper, node); - } - if (!this.match(10) && !this.match(0) && !this.match(16)) { - this.raise(Errors.UnsupportedSuper, node); - } - return this.finishNode(node, "Super"); - } - parsePrivateName() { - const node = this.startNode(); - const id = this.startNodeAt(createPositionWithColumnOffset(this.state.startLoc, 1)); - const name = this.state.value; - this.next(); - node.id = this.createIdentifier(id, name); - return this.finishNode(node, "PrivateName"); - } - parseFunctionOrFunctionSent() { - const node = this.startNode(); - this.next(); - if (this.prodParam.hasYield && this.match(16)) { - const meta = this.createIdentifier(this.startNodeAtNode(node), "function"); - this.next(); - if (this.match(103)) { - this.expectPlugin("functionSent"); - } else if (!this.hasPlugin("functionSent")) { - this.unexpected(); - } - return this.parseMetaProperty(node, meta, "sent"); - } - return this.parseFunction(node); - } - parseMetaProperty(node, meta, propertyName) { - node.meta = meta; - const containsEsc = this.state.containsEsc; - node.property = this.parseIdentifier(true); - if (node.property.name !== propertyName || containsEsc) { - this.raise(Errors.UnsupportedMetaProperty, node.property, { - target: meta.name, - onlyValidPropertyName: propertyName - }); - } - return this.finishNode(node, "MetaProperty"); - } - parseImportMetaProperty(node) { - const id = this.createIdentifier(this.startNodeAtNode(node), "import"); - this.next(); - if (this.isContextual(101)) { - if (!this.inModule) { - this.raise(Errors.ImportMetaOutsideModule, id); - } - this.sawUnambiguousESM = true; - } else if (this.isContextual(105) || this.isContextual(97)) { - const isSource = this.isContextual(105); - if (!isSource) this.unexpected(); - this.expectPlugin(isSource ? "sourcePhaseImports" : "deferredImportEvaluation"); - if (!this.options.createImportExpressions) { - throw this.raise(Errors.DynamicImportPhaseRequiresImportExpressions, this.state.startLoc, { - phase: this.state.value - }); - } - this.next(); - node.phase = isSource ? "source" : "defer"; - return this.parseImportCall(node); - } - return this.parseMetaProperty(node, id, "meta"); - } - parseLiteralAtNode(value, type, node) { - this.addExtra(node, "rawValue", value); - this.addExtra(node, "raw", this.input.slice(node.start, this.state.end)); - node.value = value; - this.next(); - return this.finishNode(node, type); - } - parseLiteral(value, type) { - const node = this.startNode(); - return this.parseLiteralAtNode(value, type, node); - } - parseStringLiteral(value) { - return this.parseLiteral(value, "StringLiteral"); - } - parseNumericLiteral(value) { - return this.parseLiteral(value, "NumericLiteral"); - } - parseBigIntLiteral(value) { - return this.parseLiteral(value, "BigIntLiteral"); - } - parseDecimalLiteral(value) { - return this.parseLiteral(value, "DecimalLiteral"); - } - parseRegExpLiteral(value) { - const node = this.startNode(); - this.addExtra(node, "raw", this.input.slice(node.start, this.state.end)); - node.pattern = value.pattern; - node.flags = value.flags; - this.next(); - return this.finishNode(node, "RegExpLiteral"); - } - parseBooleanLiteral(value) { - const node = this.startNode(); - node.value = value; - this.next(); - return this.finishNode(node, "BooleanLiteral"); - } - parseNullLiteral() { - const node = this.startNode(); - this.next(); - return this.finishNode(node, "NullLiteral"); - } - parseParenAndDistinguishExpression(canBeArrow) { - const startLoc = this.state.startLoc; - let val; - this.next(); - this.expressionScope.enter(newArrowHeadScope()); - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.maybeInArrowParameters = true; - this.state.inFSharpPipelineDirectBody = false; - const innerStartLoc = this.state.startLoc; - const exprList = []; - const refExpressionErrors = new ExpressionErrors(); - let first = true; - let spreadStartLoc; - let optionalCommaStartLoc; - while (!this.match(11)) { - if (first) { - first = false; - } else { - this.expect(12, refExpressionErrors.optionalParametersLoc === null ? null : refExpressionErrors.optionalParametersLoc); - if (this.match(11)) { - optionalCommaStartLoc = this.state.startLoc; - break; - } - } - if (this.match(21)) { - const spreadNodeStartLoc = this.state.startLoc; - spreadStartLoc = this.state.startLoc; - exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartLoc)); - if (!this.checkCommaAfterRest(41)) { - break; - } - } else { - exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem)); - } - } - const innerEndLoc = this.state.lastTokEndLoc; - this.expect(11); - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - let arrowNode = this.startNodeAt(startLoc); - if (canBeArrow && this.shouldParseArrow(exprList) && (arrowNode = this.parseArrow(arrowNode))) { - this.checkDestructuringPrivate(refExpressionErrors); - this.expressionScope.validateAsPattern(); - this.expressionScope.exit(); - this.parseArrowExpression(arrowNode, exprList, false); - return arrowNode; - } - this.expressionScope.exit(); - if (!exprList.length) { - this.unexpected(this.state.lastTokStartLoc); - } - if (optionalCommaStartLoc) this.unexpected(optionalCommaStartLoc); - if (spreadStartLoc) this.unexpected(spreadStartLoc); - this.checkExpressionErrors(refExpressionErrors, true); - this.toReferencedListDeep(exprList, true); - if (exprList.length > 1) { - val = this.startNodeAt(innerStartLoc); - val.expressions = exprList; - this.finishNode(val, "SequenceExpression"); - this.resetEndLocation(val, innerEndLoc); - } else { - val = exprList[0]; - } - return this.wrapParenthesis(startLoc, val); - } - wrapParenthesis(startLoc, expression) { - if (!this.options.createParenthesizedExpressions) { - this.addExtra(expression, "parenthesized", true); - this.addExtra(expression, "parenStart", startLoc.index); - this.takeSurroundingComments(expression, startLoc.index, this.state.lastTokEndLoc.index); - return expression; - } - const parenExpression = this.startNodeAt(startLoc); - parenExpression.expression = expression; - return this.finishNode(parenExpression, "ParenthesizedExpression"); - } - shouldParseArrow(params) { - return !this.canInsertSemicolon(); - } - parseArrow(node) { - if (this.eat(19)) { - return node; - } - } - parseParenItem(node, startLoc) { - return node; - } - parseNewOrNewTarget() { - const node = this.startNode(); - this.next(); - if (this.match(16)) { - const meta = this.createIdentifier(this.startNodeAtNode(node), "new"); - this.next(); - const metaProp = this.parseMetaProperty(node, meta, "target"); - if (!this.scope.inNonArrowFunction && !this.scope.inClass && !this.options.allowNewTargetOutsideFunction) { - this.raise(Errors.UnexpectedNewTarget, metaProp); - } - return metaProp; - } - return this.parseNew(node); - } - parseNew(node) { - this.parseNewCallee(node); - if (this.eat(10)) { - const args = this.parseExprList(11); - this.toReferencedList(args); - node.arguments = args; - } else { - node.arguments = []; - } - return this.finishNode(node, "NewExpression"); - } - parseNewCallee(node) { - const isImport = this.match(83); - const callee = this.parseNoCallExpr(); - node.callee = callee; - if (isImport && (callee.type === "Import" || callee.type === "ImportExpression")) { - this.raise(Errors.ImportCallNotNewExpression, callee); - } - } - parseTemplateElement(isTagged) { - const { - start, - startLoc, - end, - value - } = this.state; - const elemStart = start + 1; - const elem = this.startNodeAt(createPositionWithColumnOffset(startLoc, 1)); - if (value === null) { - if (!isTagged) { - this.raise(Errors.InvalidEscapeSequenceTemplate, createPositionWithColumnOffset(this.state.firstInvalidTemplateEscapePos, 1)); - } - } - const isTail = this.match(24); - const endOffset = isTail ? -1 : -2; - const elemEnd = end + endOffset; - elem.value = { - raw: this.input.slice(elemStart, elemEnd).replace(/\r\n?/g, "\n"), - cooked: value === null ? null : value.slice(1, endOffset) - }; - elem.tail = isTail; - this.next(); - const finishedNode = this.finishNode(elem, "TemplateElement"); - this.resetEndLocation(finishedNode, createPositionWithColumnOffset(this.state.lastTokEndLoc, endOffset)); - return finishedNode; - } - parseTemplate(isTagged) { - const node = this.startNode(); - let curElt = this.parseTemplateElement(isTagged); - const quasis = [curElt]; - const substitutions = []; - while (!curElt.tail) { - substitutions.push(this.parseTemplateSubstitution()); - this.readTemplateContinuation(); - quasis.push(curElt = this.parseTemplateElement(isTagged)); - } - node.expressions = substitutions; - node.quasis = quasis; - return this.finishNode(node, "TemplateLiteral"); - } - parseTemplateSubstitution() { - return this.parseExpression(); - } - parseObjectLike(close, isPattern, isRecord, refExpressionErrors) { - if (isRecord) { - this.expectPlugin("recordAndTuple"); - } - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = false; - const propHash = Object.create(null); - let first = true; - const node = this.startNode(); - node.properties = []; - this.next(); - while (!this.match(close)) { - if (first) { - first = false; - } else { - this.expect(12); - if (this.match(close)) { - this.addTrailingCommaExtraToNode(node); - break; - } - } - let prop; - if (isPattern) { - prop = this.parseBindingProperty(); - } else { - prop = this.parsePropertyDefinition(refExpressionErrors); - this.checkProto(prop, isRecord, propHash, refExpressionErrors); - } - if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") { - this.raise(Errors.InvalidRecordProperty, prop); - } - { - if (prop.shorthand) { - this.addExtra(prop, "shorthand", true); - } - } - node.properties.push(prop); - } - this.next(); - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - let type = "ObjectExpression"; - if (isPattern) { - type = "ObjectPattern"; - } else if (isRecord) { - type = "RecordExpression"; - } - return this.finishNode(node, type); - } - addTrailingCommaExtraToNode(node) { - this.addExtra(node, "trailingComma", this.state.lastTokStartLoc.index); - this.addExtra(node, "trailingCommaLoc", this.state.lastTokStartLoc, false); - } - maybeAsyncOrAccessorProp(prop) { - return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(55)); - } - parsePropertyDefinition(refExpressionErrors) { - let decorators = []; - if (this.match(26)) { - if (this.hasPlugin("decorators")) { - this.raise(Errors.UnsupportedPropertyDecorator, this.state.startLoc); - } - while (this.match(26)) { - decorators.push(this.parseDecorator()); - } - } - const prop = this.startNode(); - let isAsync = false; - let isAccessor = false; - let startLoc; - if (this.match(21)) { - if (decorators.length) this.unexpected(); - return this.parseSpread(); - } - if (decorators.length) { - prop.decorators = decorators; - decorators = []; - } - prop.method = false; - if (refExpressionErrors) { - startLoc = this.state.startLoc; - } - let isGenerator = this.eat(55); - this.parsePropertyNamePrefixOperator(prop); - const containsEsc = this.state.containsEsc; - this.parsePropertyName(prop, refExpressionErrors); - if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) { - const { - key - } = prop; - const keyName = key.name; - if (keyName === "async" && !this.hasPrecedingLineBreak()) { - isAsync = true; - this.resetPreviousNodeTrailingComments(key); - isGenerator = this.eat(55); - this.parsePropertyName(prop); - } - if (keyName === "get" || keyName === "set") { - isAccessor = true; - this.resetPreviousNodeTrailingComments(key); - prop.kind = keyName; - if (this.match(55)) { - isGenerator = true; - this.raise(Errors.AccessorIsGenerator, this.state.curPosition(), { - kind: keyName - }); - this.next(); - } - this.parsePropertyName(prop); - } - } - return this.parseObjPropValue(prop, startLoc, isGenerator, isAsync, false, isAccessor, refExpressionErrors); - } - getGetterSetterExpectedParamCount(method) { - return method.kind === "get" ? 0 : 1; - } - getObjectOrClassMethodParams(method) { - return method.params; - } - checkGetterSetterParams(method) { - var _params; - const paramCount = this.getGetterSetterExpectedParamCount(method); - const params = this.getObjectOrClassMethodParams(method); - if (params.length !== paramCount) { - this.raise(method.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, method); - } - if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") { - this.raise(Errors.BadSetterRestParameter, method); - } - } - parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { - if (isAccessor) { - const finishedProp = this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod"); - this.checkGetterSetterParams(finishedProp); - return finishedProp; - } - if (isAsync || isGenerator || this.match(10)) { - if (isPattern) this.unexpected(); - prop.kind = "method"; - prop.method = true; - return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod"); - } - } - parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) { - prop.shorthand = false; - if (this.eat(14)) { - prop.value = isPattern ? this.parseMaybeDefault(this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors); - return this.finishNode(prop, "ObjectProperty"); - } - if (!prop.computed && prop.key.type === "Identifier") { - this.checkReservedWord(prop.key.name, prop.key.loc.start, true, false); - if (isPattern) { - prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key)); - } else if (this.match(29)) { - const shorthandAssignLoc = this.state.startLoc; - if (refExpressionErrors != null) { - if (refExpressionErrors.shorthandAssignLoc === null) { - refExpressionErrors.shorthandAssignLoc = shorthandAssignLoc; - } - } else { - this.raise(Errors.InvalidCoverInitializedName, shorthandAssignLoc); - } - prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key)); - } else { - prop.value = cloneIdentifier(prop.key); - } - prop.shorthand = true; - return this.finishNode(prop, "ObjectProperty"); - } - } - parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { - const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors); - if (!node) this.unexpected(); - return node; - } - parsePropertyName(prop, refExpressionErrors) { - if (this.eat(0)) { - prop.computed = true; - prop.key = this.parseMaybeAssignAllowIn(); - this.expect(3); - } else { - const { - type, - value - } = this.state; - let key; - if (tokenIsKeywordOrIdentifier(type)) { - key = this.parseIdentifier(true); - } else { - switch (type) { - case 134: - key = this.parseNumericLiteral(value); - break; - case 133: - key = this.parseStringLiteral(value); - break; - case 135: - key = this.parseBigIntLiteral(value); - break; - case 136: - key = this.parseDecimalLiteral(value); - break; - case 138: - { - const privateKeyLoc = this.state.startLoc; - if (refExpressionErrors != null) { - if (refExpressionErrors.privateKeyLoc === null) { - refExpressionErrors.privateKeyLoc = privateKeyLoc; - } - } else { - this.raise(Errors.UnexpectedPrivateField, privateKeyLoc); - } - key = this.parsePrivateName(); - break; - } - default: - this.unexpected(); - } - } - prop.key = key; - if (type !== 138) { - prop.computed = false; - } - } - } - initFunction(node, isAsync) { - node.id = null; - node.generator = false; - node.async = isAsync; - } - parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { - this.initFunction(node, isAsync); - node.generator = isGenerator; - this.scope.enter(2 | 16 | (inClassScope ? 64 : 0) | (allowDirectSuper ? 32 : 0)); - this.prodParam.enter(functionFlags(isAsync, node.generator)); - this.parseFunctionParams(node, isConstructor); - const finishedNode = this.parseFunctionBodyAndFinish(node, type, true); - this.prodParam.exit(); - this.scope.exit(); - return finishedNode; - } - parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { - if (isTuple) { - this.expectPlugin("recordAndTuple"); - } - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = false; - const node = this.startNode(); - this.next(); - node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node); - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression"); - } - parseArrowExpression(node, params, isAsync, trailingCommaLoc) { - this.scope.enter(2 | 4); - let flags = functionFlags(isAsync, false); - if (!this.match(5) && this.prodParam.hasIn) { - flags |= 8; - } - this.prodParam.enter(flags); - this.initFunction(node, isAsync); - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - if (params) { - this.state.maybeInArrowParameters = true; - this.setArrowFunctionParameters(node, params, trailingCommaLoc); - } - this.state.maybeInArrowParameters = false; - this.parseFunctionBody(node, true); - this.prodParam.exit(); - this.scope.exit(); - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - return this.finishNode(node, "ArrowFunctionExpression"); - } - setArrowFunctionParameters(node, params, trailingCommaLoc) { - this.toAssignableList(params, trailingCommaLoc, false); - node.params = params; - } - parseFunctionBodyAndFinish(node, type, isMethod = false) { - this.parseFunctionBody(node, false, isMethod); - return this.finishNode(node, type); - } - parseFunctionBody(node, allowExpression, isMethod = false) { - const isExpression = allowExpression && !this.match(5); - this.expressionScope.enter(newExpressionScope()); - if (isExpression) { - node.body = this.parseMaybeAssign(); - this.checkParams(node, false, allowExpression, false); - } else { - const oldStrict = this.state.strict; - const oldLabels = this.state.labels; - this.state.labels = []; - this.prodParam.enter(this.prodParam.currentFlags() | 4); - node.body = this.parseBlock(true, false, hasStrictModeDirective => { - const nonSimple = !this.isSimpleParamList(node.params); - if (hasStrictModeDirective && nonSimple) { - this.raise(Errors.IllegalLanguageModeDirective, (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.loc.end : node); - } - const strictModeChanged = !oldStrict && this.state.strict; - this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged); - if (this.state.strict && node.id) { - this.checkIdentifier(node.id, 65, strictModeChanged); - } - }); - this.prodParam.exit(); - this.state.labels = oldLabels; - } - this.expressionScope.exit(); - } - isSimpleParameter(node) { - return node.type === "Identifier"; - } - isSimpleParamList(params) { - for (let i = 0, len = params.length; i < len; i++) { - if (!this.isSimpleParameter(params[i])) return false; - } - return true; - } - checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { - const checkClashes = !allowDuplicates && new Set(); - const formalParameters = { - type: "FormalParameters" - }; - for (const param of node.params) { - this.checkLVal(param, formalParameters, 5, checkClashes, strictModeChanged); - } - } - parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) { - const elts = []; - let first = true; - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(12); - if (this.match(close)) { - if (nodeForExtra) { - this.addTrailingCommaExtraToNode(nodeForExtra); - } - this.next(); - break; - } - } - elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors)); - } - return elts; - } - parseExprListItem(allowEmpty, refExpressionErrors, allowPlaceholder) { - let elt; - if (this.match(12)) { - if (!allowEmpty) { - this.raise(Errors.UnexpectedToken, this.state.curPosition(), { - unexpected: "," - }); - } - elt = null; - } else if (this.match(21)) { - const spreadNodeStartLoc = this.state.startLoc; - elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartLoc); - } else if (this.match(17)) { - this.expectPlugin("partialApplication"); - if (!allowPlaceholder) { - this.raise(Errors.UnexpectedArgumentPlaceholder, this.state.startLoc); - } - const node = this.startNode(); - this.next(); - elt = this.finishNode(node, "ArgumentPlaceholder"); - } else { - elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem); - } - return elt; - } - parseIdentifier(liberal) { - const node = this.startNode(); - const name = this.parseIdentifierName(liberal); - return this.createIdentifier(node, name); - } - createIdentifier(node, name) { - node.name = name; - node.loc.identifierName = name; - return this.finishNode(node, "Identifier"); - } - parseIdentifierName(liberal) { - let name; - const { - startLoc, - type - } = this.state; - if (tokenIsKeywordOrIdentifier(type)) { - name = this.state.value; - } else { - this.unexpected(); - } - const tokenIsKeyword = tokenKeywordOrIdentifierIsKeyword(type); - if (liberal) { - if (tokenIsKeyword) { - this.replaceToken(132); - } - } else { - this.checkReservedWord(name, startLoc, tokenIsKeyword, false); - } - this.next(); - return name; - } - checkReservedWord(word, startLoc, checkKeywords, isBinding) { - if (word.length > 10) { - return; - } - if (!canBeReservedWord(word)) { - return; - } - if (checkKeywords && isKeyword(word)) { - this.raise(Errors.UnexpectedKeyword, startLoc, { - keyword: word - }); - return; - } - const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord; - if (reservedTest(word, this.inModule)) { - this.raise(Errors.UnexpectedReservedWord, startLoc, { - reservedWord: word - }); - return; - } else if (word === "yield") { - if (this.prodParam.hasYield) { - this.raise(Errors.YieldBindingIdentifier, startLoc); - return; - } - } else if (word === "await") { - if (this.prodParam.hasAwait) { - this.raise(Errors.AwaitBindingIdentifier, startLoc); - return; - } - if (this.scope.inStaticBlock) { - this.raise(Errors.AwaitBindingIdentifierInStaticBlock, startLoc); - return; - } - this.expressionScope.recordAsyncArrowParametersError(startLoc); - } else if (word === "arguments") { - if (this.scope.inClassAndNotInNonArrowFunction) { - this.raise(Errors.ArgumentsInClass, startLoc); - return; - } - } - } - recordAwaitIfAllowed() { - const isAwaitAllowed = this.prodParam.hasAwait || this.options.allowAwaitOutsideFunction && !this.scope.inFunction; - if (isAwaitAllowed && !this.scope.inFunction) { - this.state.hasTopLevelAwait = true; - } - return isAwaitAllowed; - } - parseAwait(startLoc) { - const node = this.startNodeAt(startLoc); - this.expressionScope.recordParameterInitializerError(Errors.AwaitExpressionFormalParameter, node); - if (this.eat(55)) { - this.raise(Errors.ObsoleteAwaitStar, node); - } - if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) { - if (this.isAmbiguousAwait()) { - this.ambiguousScriptDifferentAst = true; - } else { - this.sawUnambiguousESM = true; - } - } - if (!this.state.soloAwait) { - node.argument = this.parseMaybeUnary(null, true); - } - return this.finishNode(node, "AwaitExpression"); - } - isAmbiguousAwait() { - if (this.hasPrecedingLineBreak()) return true; - const { - type - } = this.state; - return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type === 137 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54; - } - parseYield() { - const node = this.startNode(); - this.expressionScope.recordParameterInitializerError(Errors.YieldInParameter, node); - this.next(); - let delegating = false; - let argument = null; - if (!this.hasPrecedingLineBreak()) { - delegating = this.eat(55); - switch (this.state.type) { - case 13: - case 139: - case 8: - case 11: - case 3: - case 9: - case 14: - case 12: - if (!delegating) break; - default: - argument = this.parseMaybeAssign(); - } - } - node.delegate = delegating; - node.argument = argument; - return this.finishNode(node, "YieldExpression"); - } - parseImportCall(node) { - this.next(); - node.source = this.parseMaybeAssignAllowIn(); - if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { - node.options = null; - } - if (this.eat(12)) { - this.expectImportAttributesPlugin(); - if (!this.match(11)) { - node.options = this.parseMaybeAssignAllowIn(); - this.eat(12); - } - } - this.expect(11); - return this.finishNode(node, "ImportExpression"); - } - checkPipelineAtInfixOperator(left, leftStartLoc) { - if (this.hasPlugin(["pipelineOperator", { - proposal: "smart" - }])) { - if (left.type === "SequenceExpression") { - this.raise(Errors.PipelineHeadSequenceExpression, leftStartLoc); - } - } - } - parseSmartPipelineBodyInStyle(childExpr, startLoc) { - if (this.isSimpleReference(childExpr)) { - const bodyNode = this.startNodeAt(startLoc); - bodyNode.callee = childExpr; - return this.finishNode(bodyNode, "PipelineBareFunction"); - } else { - const bodyNode = this.startNodeAt(startLoc); - this.checkSmartPipeTopicBodyEarlyErrors(startLoc); - bodyNode.expression = childExpr; - return this.finishNode(bodyNode, "PipelineTopicExpression"); - } - } - isSimpleReference(expression) { - switch (expression.type) { - case "MemberExpression": - return !expression.computed && this.isSimpleReference(expression.object); - case "Identifier": - return true; - default: - return false; - } - } - checkSmartPipeTopicBodyEarlyErrors(startLoc) { - if (this.match(19)) { - throw this.raise(Errors.PipelineBodyNoArrow, this.state.startLoc); - } - if (!this.topicReferenceWasUsedInCurrentContext()) { - this.raise(Errors.PipelineTopicUnused, startLoc); - } - } - withTopicBindingContext(callback) { - const outerContextTopicState = this.state.topicContext; - this.state.topicContext = { - maxNumOfResolvableTopics: 1, - maxTopicIndex: null - }; - try { - return callback(); - } finally { - this.state.topicContext = outerContextTopicState; - } - } - withSmartMixTopicForbiddingContext(callback) { - if (this.hasPlugin(["pipelineOperator", { - proposal: "smart" - }])) { - const outerContextTopicState = this.state.topicContext; - this.state.topicContext = { - maxNumOfResolvableTopics: 0, - maxTopicIndex: null - }; - try { - return callback(); - } finally { - this.state.topicContext = outerContextTopicState; - } - } else { - return callback(); - } - } - withSoloAwaitPermittingContext(callback) { - const outerContextSoloAwaitState = this.state.soloAwait; - this.state.soloAwait = true; - try { - return callback(); - } finally { - this.state.soloAwait = outerContextSoloAwaitState; - } - } - allowInAnd(callback) { - const flags = this.prodParam.currentFlags(); - const prodParamToSet = 8 & ~flags; - if (prodParamToSet) { - this.prodParam.enter(flags | 8); - try { - return callback(); - } finally { - this.prodParam.exit(); - } - } - return callback(); - } - disallowInAnd(callback) { - const flags = this.prodParam.currentFlags(); - const prodParamToClear = 8 & flags; - if (prodParamToClear) { - this.prodParam.enter(flags & ~8); - try { - return callback(); - } finally { - this.prodParam.exit(); - } - } - return callback(); - } - registerTopicReference() { - this.state.topicContext.maxTopicIndex = 0; - } - topicReferenceIsAllowedInCurrentContext() { - return this.state.topicContext.maxNumOfResolvableTopics >= 1; - } - topicReferenceWasUsedInCurrentContext() { - return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0; - } - parseFSharpPipelineBody(prec) { - const startLoc = this.state.startLoc; - this.state.potentialArrowAt = this.state.start; - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = true; - const ret = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, prec); - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return ret; - } - parseModuleExpression() { - this.expectPlugin("moduleBlocks"); - const node = this.startNode(); - this.next(); - if (!this.match(5)) { - this.unexpected(null, 5); - } - const program = this.startNodeAt(this.state.endLoc); - this.next(); - const revertScopes = this.initializeScopes(true); - this.enterInitialScopes(); - try { - node.body = this.parseProgram(program, 8, "module"); - } finally { - revertScopes(); - } - return this.finishNode(node, "ModuleExpression"); - } - parsePropertyNamePrefixOperator(prop) {} - } - const loopLabel = { - kind: 1 - }, - switchLabel = { - kind: 2 - }; - const loneSurrogate = /[\uD800-\uDFFF]/u; - const keywordRelationalOperator = /in(?:stanceof)?/y; - function babel7CompatTokens(tokens, input) { - for (let i = 0; i < tokens.length; i++) { - const token = tokens[i]; - const { - type - } = token; - if (typeof type === "number") { - { - if (type === 138) { - const { - loc, - start, - value, - end - } = token; - const hashEndPos = start + 1; - const hashEndLoc = createPositionWithColumnOffset(loc.start, 1); - tokens.splice(i, 1, new Token({ - type: getExportedToken(27), - value: "#", - start: start, - end: hashEndPos, - startLoc: loc.start, - endLoc: hashEndLoc - }), new Token({ - type: getExportedToken(132), - value: value, - start: hashEndPos, - end: end, - startLoc: hashEndLoc, - endLoc: loc.end - })); - i++; - continue; - } - if (tokenIsTemplate(type)) { - const { - loc, - start, - value, - end - } = token; - const backquoteEnd = start + 1; - const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1); - let startToken; - if (input.charCodeAt(start) === 96) { - startToken = new Token({ - type: getExportedToken(22), - value: "`", - start: start, - end: backquoteEnd, - startLoc: loc.start, - endLoc: backquoteEndLoc - }); - } else { - startToken = new Token({ - type: getExportedToken(8), - value: "}", - start: start, - end: backquoteEnd, - startLoc: loc.start, - endLoc: backquoteEndLoc - }); - } - let templateValue, templateElementEnd, templateElementEndLoc, endToken; - if (type === 24) { - templateElementEnd = end - 1; - templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1); - templateValue = value === null ? null : value.slice(1, -1); - endToken = new Token({ - type: getExportedToken(22), - value: "`", - start: templateElementEnd, - end: end, - startLoc: templateElementEndLoc, - endLoc: loc.end - }); - } else { - templateElementEnd = end - 2; - templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2); - templateValue = value === null ? null : value.slice(1, -2); - endToken = new Token({ - type: getExportedToken(23), - value: "${", - start: templateElementEnd, - end: end, - startLoc: templateElementEndLoc, - endLoc: loc.end - }); - } - tokens.splice(i, 1, startToken, new Token({ - type: getExportedToken(20), - value: templateValue, - start: backquoteEnd, - end: templateElementEnd, - startLoc: backquoteEndLoc, - endLoc: templateElementEndLoc - }), endToken); - i += 2; - continue; - } - } - token.type = getExportedToken(type); - } - } - return tokens; - } - class StatementParser extends ExpressionParser { - parseTopLevel(file, program) { - file.program = this.parseProgram(program); - file.comments = this.comments; - if (this.options.tokens) { - file.tokens = babel7CompatTokens(this.tokens, this.input); - } - return this.finishNode(file, "File"); - } - parseProgram(program, end = 139, sourceType = this.options.sourceType) { - program.sourceType = sourceType; - program.interpreter = this.parseInterpreterDirective(); - this.parseBlockBody(program, true, true, end); - if (this.inModule) { - if (!this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) { - for (const [localName, at] of Array.from(this.scope.undefinedExports)) { - this.raise(Errors.ModuleExportUndefined, at, { - localName - }); - } - } - this.addExtra(program, "topLevelAwait", this.state.hasTopLevelAwait); - } - let finishedProgram; - if (end === 139) { - finishedProgram = this.finishNode(program, "Program"); - } else { - finishedProgram = this.finishNodeAt(program, "Program", createPositionWithColumnOffset(this.state.startLoc, -1)); - } - return finishedProgram; - } - stmtToDirective(stmt) { - const directive = stmt; - directive.type = "Directive"; - directive.value = directive.expression; - delete directive.expression; - const directiveLiteral = directive.value; - const expressionValue = directiveLiteral.value; - const raw = this.input.slice(directiveLiteral.start, directiveLiteral.end); - const val = directiveLiteral.value = raw.slice(1, -1); - this.addExtra(directiveLiteral, "raw", raw); - this.addExtra(directiveLiteral, "rawValue", val); - this.addExtra(directiveLiteral, "expressionValue", expressionValue); - directiveLiteral.type = "DirectiveLiteral"; - return directive; - } - parseInterpreterDirective() { - if (!this.match(28)) { - return null; - } - const node = this.startNode(); - node.value = this.state.value; - this.next(); - return this.finishNode(node, "InterpreterDirective"); - } - isLet() { - if (!this.isContextual(100)) { - return false; - } - return this.hasFollowingBindingAtom(); - } - chStartsBindingIdentifier(ch, pos) { - if (isIdentifierStart(ch)) { - keywordRelationalOperator.lastIndex = pos; - if (keywordRelationalOperator.test(this.input)) { - const endCh = this.codePointAtPos(keywordRelationalOperator.lastIndex); - if (!isIdentifierChar(endCh) && endCh !== 92) { - return false; - } - } - return true; - } else if (ch === 92) { - return true; - } else { - return false; - } - } - chStartsBindingPattern(ch) { - return ch === 91 || ch === 123; - } - hasFollowingBindingAtom() { - const next = this.nextTokenStart(); - const nextCh = this.codePointAtPos(next); - return this.chStartsBindingPattern(nextCh) || this.chStartsBindingIdentifier(nextCh, next); - } - hasInLineFollowingBindingIdentifierOrBrace() { - const next = this.nextTokenInLineStart(); - const nextCh = this.codePointAtPos(next); - return nextCh === 123 || this.chStartsBindingIdentifier(nextCh, next); - } - startsUsingForOf() { - const { - type, - containsEsc - } = this.lookahead(); - if (type === 102 && !containsEsc) { - return false; - } else if (tokenIsIdentifier(type) && !this.hasFollowingLineBreak()) { - this.expectPlugin("explicitResourceManagement"); - return true; - } - } - startsAwaitUsing() { - let next = this.nextTokenInLineStart(); - if (this.isUnparsedContextual(next, "using")) { - next = this.nextTokenInLineStartSince(next + 5); - const nextCh = this.codePointAtPos(next); - if (this.chStartsBindingIdentifier(nextCh, next)) { - this.expectPlugin("explicitResourceManagement"); - return true; - } - } - return false; - } - parseModuleItem() { - return this.parseStatementLike(1 | 2 | 4 | 8); - } - parseStatementListItem() { - return this.parseStatementLike(2 | 4 | (!this.options.annexB || this.state.strict ? 0 : 8)); - } - parseStatementOrSloppyAnnexBFunctionDeclaration(allowLabeledFunction = false) { - let flags = 0; - if (this.options.annexB && !this.state.strict) { - flags |= 4; - if (allowLabeledFunction) { - flags |= 8; - } - } - return this.parseStatementLike(flags); - } - parseStatement() { - return this.parseStatementLike(0); - } - parseStatementLike(flags) { - let decorators = null; - if (this.match(26)) { - decorators = this.parseDecorators(true); - } - return this.parseStatementContent(flags, decorators); - } - parseStatementContent(flags, decorators) { - const startType = this.state.type; - const node = this.startNode(); - const allowDeclaration = !!(flags & 2); - const allowFunctionDeclaration = !!(flags & 4); - const topLevel = flags & 1; - switch (startType) { - case 60: - return this.parseBreakContinueStatement(node, true); - case 63: - return this.parseBreakContinueStatement(node, false); - case 64: - return this.parseDebuggerStatement(node); - case 90: - return this.parseDoWhileStatement(node); - case 91: - return this.parseForStatement(node); - case 68: - if (this.lookaheadCharCode() === 46) break; - if (!allowFunctionDeclaration) { - this.raise(this.state.strict ? Errors.StrictFunction : this.options.annexB ? Errors.SloppyFunctionAnnexB : Errors.SloppyFunction, this.state.startLoc); - } - return this.parseFunctionStatement(node, false, !allowDeclaration && allowFunctionDeclaration); - case 80: - if (!allowDeclaration) this.unexpected(); - return this.parseClass(this.maybeTakeDecorators(decorators, node), true); - case 69: - return this.parseIfStatement(node); - case 70: - return this.parseReturnStatement(node); - case 71: - return this.parseSwitchStatement(node); - case 72: - return this.parseThrowStatement(node); - case 73: - return this.parseTryStatement(node); - case 96: - if (!this.state.containsEsc && this.startsAwaitUsing()) { - if (!this.recordAwaitIfAllowed()) { - this.raise(Errors.AwaitUsingNotInAsyncContext, node); - } else if (!allowDeclaration) { - this.raise(Errors.UnexpectedLexicalDeclaration, node); - } - this.next(); - return this.parseVarStatement(node, "await using"); - } - break; - case 107: - if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifierOrBrace()) { - break; - } - this.expectPlugin("explicitResourceManagement"); - if (!this.scope.inModule && this.scope.inTopLevel) { - this.raise(Errors.UnexpectedUsingDeclaration, this.state.startLoc); - } else if (!allowDeclaration) { - this.raise(Errors.UnexpectedLexicalDeclaration, this.state.startLoc); - } - return this.parseVarStatement(node, "using"); - case 100: - { - if (this.state.containsEsc) { - break; - } - const next = this.nextTokenStart(); - const nextCh = this.codePointAtPos(next); - if (nextCh !== 91) { - if (!allowDeclaration && this.hasFollowingLineBreak()) break; - if (!this.chStartsBindingIdentifier(nextCh, next) && nextCh !== 123) { - break; - } - } - } - case 75: - { - if (!allowDeclaration) { - this.raise(Errors.UnexpectedLexicalDeclaration, this.state.startLoc); - } - } - case 74: - { - const kind = this.state.value; - return this.parseVarStatement(node, kind); - } - case 92: - return this.parseWhileStatement(node); - case 76: - return this.parseWithStatement(node); - case 5: - return this.parseBlock(); - case 13: - return this.parseEmptyStatement(node); - case 83: - { - const nextTokenCharCode = this.lookaheadCharCode(); - if (nextTokenCharCode === 40 || nextTokenCharCode === 46) { - break; - } - } - case 82: - { - if (!this.options.allowImportExportEverywhere && !topLevel) { - this.raise(Errors.UnexpectedImportExport, this.state.startLoc); - } - this.next(); - let result; - if (startType === 83) { - result = this.parseImport(node); - if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { - this.sawUnambiguousESM = true; - } - } else { - result = this.parseExport(node, decorators); - if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { - this.sawUnambiguousESM = true; - } - } - this.assertModuleNodeAllowed(result); - return result; - } - default: - { - if (this.isAsyncFunction()) { - if (!allowDeclaration) { - this.raise(Errors.AsyncFunctionInSingleStatementContext, this.state.startLoc); - } - this.next(); - return this.parseFunctionStatement(node, true, !allowDeclaration && allowFunctionDeclaration); - } - } - } - const maybeName = this.state.value; - const expr = this.parseExpression(); - if (tokenIsIdentifier(startType) && expr.type === "Identifier" && this.eat(14)) { - return this.parseLabeledStatement(node, maybeName, expr, flags); - } else { - return this.parseExpressionStatement(node, expr, decorators); - } - } - assertModuleNodeAllowed(node) { - if (!this.options.allowImportExportEverywhere && !this.inModule) { - this.raise(Errors.ImportOutsideModule, node); - } - } - decoratorsEnabledBeforeExport() { - if (this.hasPlugin("decorators-legacy")) return true; - return this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") !== false; - } - maybeTakeDecorators(maybeDecorators, classNode, exportNode) { - if (maybeDecorators) { - if (classNode.decorators && classNode.decorators.length > 0) { - if (typeof this.getPluginOption("decorators", "decoratorsBeforeExport") !== "boolean") { - this.raise(Errors.DecoratorsBeforeAfterExport, classNode.decorators[0]); - } - classNode.decorators.unshift(...maybeDecorators); - } else { - classNode.decorators = maybeDecorators; - } - this.resetStartLocationFromNode(classNode, maybeDecorators[0]); - if (exportNode) this.resetStartLocationFromNode(exportNode, classNode); - } - return classNode; - } - canHaveLeadingDecorator() { - return this.match(80); - } - parseDecorators(allowExport) { - const decorators = []; - do { - decorators.push(this.parseDecorator()); - } while (this.match(26)); - if (this.match(82)) { - if (!allowExport) { - this.unexpected(); - } - if (!this.decoratorsEnabledBeforeExport()) { - this.raise(Errors.DecoratorExportClass, this.state.startLoc); - } - } else if (!this.canHaveLeadingDecorator()) { - throw this.raise(Errors.UnexpectedLeadingDecorator, this.state.startLoc); - } - return decorators; - } - parseDecorator() { - this.expectOnePlugin(["decorators", "decorators-legacy"]); - const node = this.startNode(); - this.next(); - if (this.hasPlugin("decorators")) { - const startLoc = this.state.startLoc; - let expr; - if (this.match(10)) { - const startLoc = this.state.startLoc; - this.next(); - expr = this.parseExpression(); - this.expect(11); - expr = this.wrapParenthesis(startLoc, expr); - const paramsStartLoc = this.state.startLoc; - node.expression = this.parseMaybeDecoratorArguments(expr); - if (this.getPluginOption("decorators", "allowCallParenthesized") === false && node.expression !== expr) { - this.raise(Errors.DecoratorArgumentsOutsideParentheses, paramsStartLoc); - } - } else { - expr = this.parseIdentifier(false); - while (this.eat(16)) { - const node = this.startNodeAt(startLoc); - node.object = expr; - if (this.match(138)) { - this.classScope.usePrivateName(this.state.value, this.state.startLoc); - node.property = this.parsePrivateName(); - } else { - node.property = this.parseIdentifier(true); - } - node.computed = false; - expr = this.finishNode(node, "MemberExpression"); - } - node.expression = this.parseMaybeDecoratorArguments(expr); - } - } else { - node.expression = this.parseExprSubscripts(); - } - return this.finishNode(node, "Decorator"); - } - parseMaybeDecoratorArguments(expr) { - if (this.eat(10)) { - const node = this.startNodeAtNode(expr); - node.callee = expr; - node.arguments = this.parseCallExpressionArguments(11, false); - this.toReferencedList(node.arguments); - return this.finishNode(node, "CallExpression"); - } - return expr; - } - parseBreakContinueStatement(node, isBreak) { - this.next(); - if (this.isLineTerminator()) { - node.label = null; - } else { - node.label = this.parseIdentifier(); - this.semicolon(); - } - this.verifyBreakContinue(node, isBreak); - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); - } - verifyBreakContinue(node, isBreak) { - let i; - for (i = 0; i < this.state.labels.length; ++i) { - const lab = this.state.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === 1)) { - break; - } - if (node.label && isBreak) break; - } - } - if (i === this.state.labels.length) { - const type = isBreak ? "BreakStatement" : "ContinueStatement"; - this.raise(Errors.IllegalBreakContinue, node, { - type - }); - } - } - parseDebuggerStatement(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); - } - parseHeaderExpression() { - this.expect(10); - const val = this.parseExpression(); - this.expect(11); - return val; - } - parseDoWhileStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); - this.state.labels.pop(); - this.expect(92); - node.test = this.parseHeaderExpression(); - this.eat(13); - return this.finishNode(node, "DoWhileStatement"); - } - parseForStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - let awaitAt = null; - if (this.isContextual(96) && this.recordAwaitIfAllowed()) { - awaitAt = this.state.startLoc; - this.next(); - } - this.scope.enter(0); - this.expect(10); - if (this.match(13)) { - if (awaitAt !== null) { - this.unexpected(awaitAt); - } - return this.parseFor(node, null); - } - const startsWithLet = this.isContextual(100); - { - const startsWithAwaitUsing = this.isContextual(96) && this.startsAwaitUsing(); - const starsWithUsingDeclaration = startsWithAwaitUsing || this.isContextual(107) && this.startsUsingForOf(); - const isLetOrUsing = startsWithLet && this.hasFollowingBindingAtom() || starsWithUsingDeclaration; - if (this.match(74) || this.match(75) || isLetOrUsing) { - const initNode = this.startNode(); - let kind; - if (startsWithAwaitUsing) { - kind = "await using"; - if (!this.recordAwaitIfAllowed()) { - this.raise(Errors.AwaitUsingNotInAsyncContext, this.state.startLoc); - } - this.next(); - } else { - kind = this.state.value; - } - this.next(); - this.parseVar(initNode, true, kind); - const init = this.finishNode(initNode, "VariableDeclaration"); - const isForIn = this.match(58); - if (isForIn && starsWithUsingDeclaration) { - this.raise(Errors.ForInUsing, init); - } - if ((isForIn || this.isContextual(102)) && init.declarations.length === 1) { - return this.parseForIn(node, init, awaitAt); - } - if (awaitAt !== null) { - this.unexpected(awaitAt); - } - return this.parseFor(node, init); - } - } - const startsWithAsync = this.isContextual(95); - const refExpressionErrors = new ExpressionErrors(); - const init = this.parseExpression(true, refExpressionErrors); - const isForOf = this.isContextual(102); - if (isForOf) { - if (startsWithLet) { - this.raise(Errors.ForOfLet, init); - } - if (awaitAt === null && startsWithAsync && init.type === "Identifier") { - this.raise(Errors.ForOfAsync, init); - } - } - if (isForOf || this.match(58)) { - this.checkDestructuringPrivate(refExpressionErrors); - this.toAssignable(init, true); - const type = isForOf ? "ForOfStatement" : "ForInStatement"; - this.checkLVal(init, { - type - }); - return this.parseForIn(node, init, awaitAt); - } else { - this.checkExpressionErrors(refExpressionErrors, true); - } - if (awaitAt !== null) { - this.unexpected(awaitAt); - } - return this.parseFor(node, init); - } - parseFunctionStatement(node, isAsync, isHangingDeclaration) { - this.next(); - return this.parseFunction(node, 1 | (isHangingDeclaration ? 2 : 0) | (isAsync ? 8 : 0)); - } - parseIfStatement(node) { - this.next(); - node.test = this.parseHeaderExpression(); - node.consequent = this.parseStatementOrSloppyAnnexBFunctionDeclaration(); - node.alternate = this.eat(66) ? this.parseStatementOrSloppyAnnexBFunctionDeclaration() : null; - return this.finishNode(node, "IfStatement"); - } - parseReturnStatement(node) { - if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) { - this.raise(Errors.IllegalReturn, this.state.startLoc); - } - this.next(); - if (this.isLineTerminator()) { - node.argument = null; - } else { - node.argument = this.parseExpression(); - this.semicolon(); - } - return this.finishNode(node, "ReturnStatement"); - } - parseSwitchStatement(node) { - this.next(); - node.discriminant = this.parseHeaderExpression(); - const cases = node.cases = []; - this.expect(5); - this.state.labels.push(switchLabel); - this.scope.enter(0); - let cur; - for (let sawDefault; !this.match(8);) { - if (this.match(61) || this.match(65)) { - const isCase = this.match(61); - if (cur) this.finishNode(cur, "SwitchCase"); - cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) { - this.raise(Errors.MultipleDefaultsInSwitch, this.state.lastTokStartLoc); - } - sawDefault = true; - cur.test = null; - } - this.expect(14); - } else { - if (cur) { - cur.consequent.push(this.parseStatementListItem()); - } else { - this.unexpected(); - } - } - } - this.scope.exit(); - if (cur) this.finishNode(cur, "SwitchCase"); - this.next(); - this.state.labels.pop(); - return this.finishNode(node, "SwitchStatement"); - } - parseThrowStatement(node) { - this.next(); - if (this.hasPrecedingLineBreak()) { - this.raise(Errors.NewlineAfterThrow, this.state.lastTokEndLoc); - } - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); - } - parseCatchClauseParam() { - const param = this.parseBindingAtom(); - this.scope.enter(this.options.annexB && param.type === "Identifier" ? 8 : 0); - this.checkLVal(param, { - type: "CatchClause" - }, 9); - return param; - } - parseTryStatement(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.match(62)) { - const clause = this.startNode(); - this.next(); - if (this.match(10)) { - this.expect(10); - clause.param = this.parseCatchClauseParam(); - this.expect(11); - } else { - clause.param = null; - this.scope.enter(0); - } - clause.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(false, false)); - this.scope.exit(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.finalizer = this.eat(67) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) { - this.raise(Errors.NoCatchOrFinally, node); - } - return this.finishNode(node, "TryStatement"); - } - parseVarStatement(node, kind, allowMissingInitializer = false) { - this.next(); - this.parseVar(node, false, kind, allowMissingInitializer); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); - } - parseWhileStatement(node) { - this.next(); - node.test = this.parseHeaderExpression(); - this.state.labels.push(loopLabel); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); - this.state.labels.pop(); - return this.finishNode(node, "WhileStatement"); - } - parseWithStatement(node) { - if (this.state.strict) { - this.raise(Errors.StrictWith, this.state.startLoc); - } - this.next(); - node.object = this.parseHeaderExpression(); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); - return this.finishNode(node, "WithStatement"); - } - parseEmptyStatement(node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); - } - parseLabeledStatement(node, maybeName, expr, flags) { - for (const label of this.state.labels) { - if (label.name === maybeName) { - this.raise(Errors.LabelRedeclaration, expr, { - labelName: maybeName - }); - } - } - const kind = tokenIsLoop(this.state.type) ? 1 : this.match(71) ? 2 : null; - for (let i = this.state.labels.length - 1; i >= 0; i--) { - const label = this.state.labels[i]; - if (label.statementStart === node.start) { - label.statementStart = this.state.start; - label.kind = kind; - } else { - break; - } - } - this.state.labels.push({ - name: maybeName, - kind: kind, - statementStart: this.state.start - }); - node.body = flags & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(true) : this.parseStatement(); - this.state.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); - } - parseExpressionStatement(node, expr, decorators) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); - } - parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) { - const node = this.startNode(); - if (allowDirectives) { - this.state.strictErrors.clear(); - } - this.expect(5); - if (createNewLexicalScope) { - this.scope.enter(0); - } - this.parseBlockBody(node, allowDirectives, false, 8, afterBlockParse); - if (createNewLexicalScope) { - this.scope.exit(); - } - return this.finishNode(node, "BlockStatement"); - } - isValidDirective(stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; - } - parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) { - const body = node.body = []; - const directives = node.directives = []; - this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end, afterBlockParse); - } - parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) { - const oldStrict = this.state.strict; - let hasStrictModeDirective = false; - let parsedNonDirective = false; - while (!this.match(end)) { - const stmt = topLevel ? this.parseModuleItem() : this.parseStatementListItem(); - if (directives && !parsedNonDirective) { - if (this.isValidDirective(stmt)) { - const directive = this.stmtToDirective(stmt); - directives.push(directive); - if (!hasStrictModeDirective && directive.value.value === "use strict") { - hasStrictModeDirective = true; - this.setStrict(true); - } - continue; - } - parsedNonDirective = true; - this.state.strictErrors.clear(); - } - body.push(stmt); - } - afterBlockParse == null || afterBlockParse.call(this, hasStrictModeDirective); - if (!oldStrict) { - this.setStrict(false); - } - this.next(); - } - parseFor(node, init) { - node.init = init; - this.semicolon(false); - node.test = this.match(13) ? null : this.parseExpression(); - this.semicolon(false); - node.update = this.match(11) ? null : this.parseExpression(); - this.expect(11); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); - this.scope.exit(); - this.state.labels.pop(); - return this.finishNode(node, "ForStatement"); - } - parseForIn(node, init, awaitAt) { - const isForIn = this.match(58); - this.next(); - if (isForIn) { - if (awaitAt !== null) this.unexpected(awaitAt); - } else { - node.await = awaitAt !== null; - } - if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || !this.options.annexB || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) { - this.raise(Errors.ForInOfLoopInitializer, init, { - type: isForIn ? "ForInStatement" : "ForOfStatement" - }); - } - if (init.type === "AssignmentPattern") { - this.raise(Errors.InvalidLhs, init, { - ancestor: { - type: "ForStatement" - } - }); - } - node.left = init; - node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn(); - this.expect(11); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); - this.scope.exit(); - this.state.labels.pop(); - return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement"); - } - parseVar(node, isFor, kind, allowMissingInitializer = false) { - const declarations = node.declarations = []; - node.kind = kind; - for (;;) { - const decl = this.startNode(); - this.parseVarId(decl, kind); - decl.init = !this.eat(29) ? null : isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn(); - if (decl.init === null && !allowMissingInitializer) { - if (decl.id.type !== "Identifier" && !(isFor && (this.match(58) || this.isContextual(102)))) { - this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, { - kind: "destructuring" - }); - } else if ((kind === "const" || kind === "using" || kind === "await using") && !(this.match(58) || this.isContextual(102))) { - this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, { - kind - }); - } - } - declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(12)) break; - } - return node; - } - parseVarId(decl, kind) { - const id = this.parseBindingAtom(); - if (kind === "using" || kind === "await using") { - if (id.type === "ArrayPattern" || id.type === "ObjectPattern") { - this.raise(Errors.UsingDeclarationHasBindingPattern, id.loc.start); - } - } - this.checkLVal(id, { - type: "VariableDeclarator" - }, kind === "var" ? 5 : 8201); - decl.id = id; - } - parseAsyncFunctionExpression(node) { - return this.parseFunction(node, 8); - } - parseFunction(node, flags = 0) { - const hangingDeclaration = flags & 2; - const isDeclaration = !!(flags & 1); - const requireId = isDeclaration && !(flags & 4); - const isAsync = !!(flags & 8); - this.initFunction(node, isAsync); - if (this.match(55)) { - if (hangingDeclaration) { - this.raise(Errors.GeneratorInSingleStatementContext, this.state.startLoc); - } - this.next(); - node.generator = true; - } - if (isDeclaration) { - node.id = this.parseFunctionId(requireId); - } - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - this.state.maybeInArrowParameters = false; - this.scope.enter(2); - this.prodParam.enter(functionFlags(isAsync, node.generator)); - if (!isDeclaration) { - node.id = this.parseFunctionId(); - } - this.parseFunctionParams(node, false); - this.withSmartMixTopicForbiddingContext(() => { - this.parseFunctionBodyAndFinish(node, isDeclaration ? "FunctionDeclaration" : "FunctionExpression"); - }); - this.prodParam.exit(); - this.scope.exit(); - if (isDeclaration && !hangingDeclaration) { - this.registerFunctionStatementId(node); - } - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - return node; - } - parseFunctionId(requireId) { - return requireId || tokenIsIdentifier(this.state.type) ? this.parseIdentifier() : null; - } - parseFunctionParams(node, isConstructor) { - this.expect(10); - this.expressionScope.enter(newParameterDeclarationScope()); - node.params = this.parseBindingList(11, 41, 2 | (isConstructor ? 4 : 0)); - this.expressionScope.exit(); - } - registerFunctionStatementId(node) { - if (!node.id) return; - this.scope.declareName(node.id.name, !this.options.annexB || this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? 5 : 8201 : 17, node.id.loc.start); - } - parseClass(node, isStatement, optionalId) { - this.next(); - const oldStrict = this.state.strict; - this.state.strict = true; - this.parseClassId(node, isStatement, optionalId); - this.parseClassSuper(node); - node.body = this.parseClassBody(!!node.superClass, oldStrict); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); - } - isClassProperty() { - return this.match(29) || this.match(13) || this.match(8); - } - isClassMethod() { - return this.match(10); - } - nameIsConstructor(key) { - return key.type === "Identifier" && key.name === "constructor" || key.type === "StringLiteral" && key.value === "constructor"; - } - isNonstaticConstructor(method) { - return !method.computed && !method.static && this.nameIsConstructor(method.key); - } - parseClassBody(hadSuperClass, oldStrict) { - this.classScope.enter(); - const state = { - hadConstructor: false, - hadSuperClass - }; - let decorators = []; - const classBody = this.startNode(); - classBody.body = []; - this.expect(5); - this.withSmartMixTopicForbiddingContext(() => { - while (!this.match(8)) { - if (this.eat(13)) { - if (decorators.length > 0) { - throw this.raise(Errors.DecoratorSemicolon, this.state.lastTokEndLoc); - } - continue; - } - if (this.match(26)) { - decorators.push(this.parseDecorator()); - continue; - } - const member = this.startNode(); - if (decorators.length) { - member.decorators = decorators; - this.resetStartLocationFromNode(member, decorators[0]); - decorators = []; - } - this.parseClassMember(classBody, member, state); - if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { - this.raise(Errors.DecoratorConstructor, member); - } - } - }); - this.state.strict = oldStrict; - this.next(); - if (decorators.length) { - throw this.raise(Errors.TrailingDecorator, this.state.startLoc); - } - this.classScope.exit(); - return this.finishNode(classBody, "ClassBody"); - } - parseClassMemberFromModifier(classBody, member) { - const key = this.parseIdentifier(true); - if (this.isClassMethod()) { - const method = member; - method.kind = "method"; - method.computed = false; - method.key = key; - method.static = false; - this.pushClassMethod(classBody, method, false, false, false, false); - return true; - } else if (this.isClassProperty()) { - const prop = member; - prop.computed = false; - prop.key = key; - prop.static = false; - classBody.body.push(this.parseClassProperty(prop)); - return true; - } - this.resetPreviousNodeTrailingComments(key); - return false; - } - parseClassMember(classBody, member, state) { - const isStatic = this.isContextual(106); - if (isStatic) { - if (this.parseClassMemberFromModifier(classBody, member)) { - return; - } - if (this.eat(5)) { - this.parseClassStaticBlock(classBody, member); - return; - } - } - this.parseClassMemberWithIsStatic(classBody, member, state, isStatic); - } - parseClassMemberWithIsStatic(classBody, member, state, isStatic) { - const publicMethod = member; - const privateMethod = member; - const publicProp = member; - const privateProp = member; - const accessorProp = member; - const method = publicMethod; - const publicMember = publicMethod; - member.static = isStatic; - this.parsePropertyNamePrefixOperator(member); - if (this.eat(55)) { - method.kind = "method"; - const isPrivateName = this.match(138); - this.parseClassElementName(method); - if (isPrivateName) { - this.pushClassPrivateMethod(classBody, privateMethod, true, false); - return; - } - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(Errors.ConstructorIsGenerator, publicMethod.key); - } - this.pushClassMethod(classBody, publicMethod, true, false, false, false); - return; - } - const isContextual = !this.state.containsEsc && tokenIsIdentifier(this.state.type); - const key = this.parseClassElementName(member); - const maybeContextualKw = isContextual ? key.name : null; - const isPrivate = this.isPrivateName(key); - const maybeQuestionTokenStartLoc = this.state.startLoc; - this.parsePostMemberNameModifiers(publicMember); - if (this.isClassMethod()) { - method.kind = "method"; - if (isPrivate) { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - return; - } - const isConstructor = this.isNonstaticConstructor(publicMethod); - let allowsDirectSuper = false; - if (isConstructor) { - publicMethod.kind = "constructor"; - if (state.hadConstructor && !this.hasPlugin("typescript")) { - this.raise(Errors.DuplicateConstructor, key); - } - if (isConstructor && this.hasPlugin("typescript") && member.override) { - this.raise(Errors.OverrideOnConstructor, key); - } - state.hadConstructor = true; - allowsDirectSuper = state.hadSuperClass; - } - this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper); - } else if (this.isClassProperty()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else if (maybeContextualKw === "async" && !this.isLineTerminator()) { - this.resetPreviousNodeTrailingComments(key); - const isGenerator = this.eat(55); - if (publicMember.optional) { - this.unexpected(maybeQuestionTokenStartLoc); - } - method.kind = "method"; - const isPrivate = this.match(138); - this.parseClassElementName(method); - this.parsePostMemberNameModifiers(publicMember); - if (isPrivate) { - this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(Errors.ConstructorIsAsync, publicMethod.key); - } - this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false); - } - } else if ((maybeContextualKw === "get" || maybeContextualKw === "set") && !(this.match(55) && this.isLineTerminator())) { - this.resetPreviousNodeTrailingComments(key); - method.kind = maybeContextualKw; - const isPrivate = this.match(138); - this.parseClassElementName(publicMethod); - if (isPrivate) { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(Errors.ConstructorIsAccessor, publicMethod.key); - } - this.pushClassMethod(classBody, publicMethod, false, false, false, false); - } - this.checkGetterSetterParams(publicMethod); - } else if (maybeContextualKw === "accessor" && !this.isLineTerminator()) { - this.expectPlugin("decoratorAutoAccessors"); - this.resetPreviousNodeTrailingComments(key); - const isPrivate = this.match(138); - this.parseClassElementName(publicProp); - this.pushClassAccessorProperty(classBody, accessorProp, isPrivate); - } else if (this.isLineTerminator()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else { - this.unexpected(); - } - } - parseClassElementName(member) { - const { - type, - value - } = this.state; - if ((type === 132 || type === 133) && member.static && value === "prototype") { - this.raise(Errors.StaticPrototype, this.state.startLoc); - } - if (type === 138) { - if (value === "constructor") { - this.raise(Errors.ConstructorClassPrivateField, this.state.startLoc); - } - const key = this.parsePrivateName(); - member.key = key; - return key; - } - this.parsePropertyName(member); - return member.key; - } - parseClassStaticBlock(classBody, member) { - var _member$decorators; - this.scope.enter(64 | 128 | 16); - const oldLabels = this.state.labels; - this.state.labels = []; - this.prodParam.enter(0); - const body = member.body = []; - this.parseBlockOrModuleBlockBody(body, undefined, false, 8); - this.prodParam.exit(); - this.scope.exit(); - this.state.labels = oldLabels; - classBody.body.push(this.finishNode(member, "StaticBlock")); - if ((_member$decorators = member.decorators) != null && _member$decorators.length) { - this.raise(Errors.DecoratorStaticBlock, member); - } - } - pushClassProperty(classBody, prop) { - if (!prop.computed && this.nameIsConstructor(prop.key)) { - this.raise(Errors.ConstructorClassField, prop.key); - } - classBody.body.push(this.parseClassProperty(prop)); - } - pushClassPrivateProperty(classBody, prop) { - const node = this.parseClassPrivateProperty(prop); - classBody.body.push(node); - this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), 0, node.key.loc.start); - } - pushClassAccessorProperty(classBody, prop, isPrivate) { - if (!isPrivate && !prop.computed && this.nameIsConstructor(prop.key)) { - this.raise(Errors.ConstructorClassField, prop.key); - } - const node = this.parseClassAccessorProperty(prop); - classBody.body.push(node); - if (isPrivate) { - this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), 0, node.key.loc.start); - } - } - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true)); - } - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true); - classBody.body.push(node); - const kind = node.kind === "get" ? node.static ? 6 : 2 : node.kind === "set" ? node.static ? 5 : 1 : 0; - this.declareClassPrivateMethodInScope(node, kind); - } - declareClassPrivateMethodInScope(node, kind) { - this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.loc.start); - } - parsePostMemberNameModifiers(methodOrProp) {} - parseClassPrivateProperty(node) { - this.parseInitializer(node); - this.semicolon(); - return this.finishNode(node, "ClassPrivateProperty"); - } - parseClassProperty(node) { - this.parseInitializer(node); - this.semicolon(); - return this.finishNode(node, "ClassProperty"); - } - parseClassAccessorProperty(node) { - this.parseInitializer(node); - this.semicolon(); - return this.finishNode(node, "ClassAccessorProperty"); - } - parseInitializer(node) { - this.scope.enter(64 | 16); - this.expressionScope.enter(newExpressionScope()); - this.prodParam.enter(0); - node.value = this.eat(29) ? this.parseMaybeAssignAllowIn() : null; - this.expressionScope.exit(); - this.prodParam.exit(); - this.scope.exit(); - } - parseClassId(node, isStatement, optionalId, bindingType = 8331) { - if (tokenIsIdentifier(this.state.type)) { - node.id = this.parseIdentifier(); - if (isStatement) { - this.declareNameFromIdentifier(node.id, bindingType); - } - } else { - if (optionalId || !isStatement) { - node.id = null; - } else { - throw this.raise(Errors.MissingClassName, this.state.startLoc); - } - } - } - parseClassSuper(node) { - node.superClass = this.eat(81) ? this.parseExprSubscripts() : null; - } - parseExport(node, decorators) { - const maybeDefaultIdentifier = this.parseMaybeImportPhase(node, true); - const hasDefault = this.maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier); - const parseAfterDefault = !hasDefault || this.eat(12); - const hasStar = parseAfterDefault && this.eatExportStar(node); - const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node); - const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(12)); - const isFromRequired = hasDefault || hasStar; - if (hasStar && !hasNamespace) { - if (hasDefault) this.unexpected(); - if (decorators) { - throw this.raise(Errors.UnsupportedDecoratorExport, node); - } - this.parseExportFrom(node, true); - return this.finishNode(node, "ExportAllDeclaration"); - } - const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node); - if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) { - this.unexpected(null, 5); - } - if (hasNamespace && parseAfterNamespace) { - this.unexpected(null, 98); - } - let hasDeclaration; - if (isFromRequired || hasSpecifiers) { - hasDeclaration = false; - if (decorators) { - throw this.raise(Errors.UnsupportedDecoratorExport, node); - } - this.parseExportFrom(node, isFromRequired); - } else { - hasDeclaration = this.maybeParseExportDeclaration(node); - } - if (isFromRequired || hasSpecifiers || hasDeclaration) { - var _node2$declaration; - const node2 = node; - this.checkExport(node2, true, false, !!node2.source); - if (((_node2$declaration = node2.declaration) == null ? void 0 : _node2$declaration.type) === "ClassDeclaration") { - this.maybeTakeDecorators(decorators, node2.declaration, node2); - } else if (decorators) { - throw this.raise(Errors.UnsupportedDecoratorExport, node); - } - return this.finishNode(node2, "ExportNamedDeclaration"); - } - if (this.eat(65)) { - const node2 = node; - const decl = this.parseExportDefaultExpression(); - node2.declaration = decl; - if (decl.type === "ClassDeclaration") { - this.maybeTakeDecorators(decorators, decl, node2); - } else if (decorators) { - throw this.raise(Errors.UnsupportedDecoratorExport, node); - } - this.checkExport(node2, true, true); - return this.finishNode(node2, "ExportDefaultDeclaration"); - } - this.unexpected(null, 5); - } - eatExportStar(node) { - return this.eat(55); - } - maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier) { - if (maybeDefaultIdentifier || this.isExportDefaultSpecifier()) { - this.expectPlugin("exportDefaultFrom", maybeDefaultIdentifier == null ? void 0 : maybeDefaultIdentifier.loc.start); - const id = maybeDefaultIdentifier || this.parseIdentifier(true); - const specifier = this.startNodeAtNode(id); - specifier.exported = id; - node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - return true; - } - return false; - } - maybeParseExportNamespaceSpecifier(node) { - if (this.isContextual(93)) { - var _ref, _ref$specifiers; - (_ref$specifiers = (_ref = node).specifiers) != null ? _ref$specifiers : _ref.specifiers = []; - const specifier = this.startNodeAt(this.state.lastTokStartLoc); - this.next(); - specifier.exported = this.parseModuleExportName(); - node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier")); - return true; - } - return false; - } - maybeParseExportNamedSpecifiers(node) { - if (this.match(5)) { - const node2 = node; - if (!node2.specifiers) node2.specifiers = []; - const isTypeExport = node2.exportKind === "type"; - node2.specifiers.push(...this.parseExportSpecifiers(isTypeExport)); - node2.source = null; - node2.declaration = null; - if (this.hasPlugin("importAssertions")) { - node2.assertions = []; - } - return true; - } - return false; - } - maybeParseExportDeclaration(node) { - if (this.shouldParseExportDeclaration()) { - node.specifiers = []; - node.source = null; - if (this.hasPlugin("importAssertions")) { - node.assertions = []; - } - node.declaration = this.parseExportDeclaration(node); - return true; - } - return false; - } - isAsyncFunction() { - if (!this.isContextual(95)) return false; - const next = this.nextTokenInLineStart(); - return this.isUnparsedContextual(next, "function"); - } - parseExportDefaultExpression() { - const expr = this.startNode(); - if (this.match(68)) { - this.next(); - return this.parseFunction(expr, 1 | 4); - } else if (this.isAsyncFunction()) { - this.next(); - this.next(); - return this.parseFunction(expr, 1 | 4 | 8); - } - if (this.match(80)) { - return this.parseClass(expr, true, true); - } - if (this.match(26)) { - if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") === true) { - this.raise(Errors.DecoratorBeforeExport, this.state.startLoc); - } - return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(false), this.startNode()), true, true); - } - if (this.match(75) || this.match(74) || this.isLet()) { - throw this.raise(Errors.UnsupportedDefaultExport, this.state.startLoc); - } - const res = this.parseMaybeAssignAllowIn(); - this.semicolon(); - return res; - } - parseExportDeclaration(node) { - if (this.match(80)) { - const node = this.parseClass(this.startNode(), true, false); - return node; - } - return this.parseStatementListItem(); - } - isExportDefaultSpecifier() { - const { - type - } = this.state; - if (tokenIsIdentifier(type)) { - if (type === 95 && !this.state.containsEsc || type === 100) { - return false; - } - if ((type === 130 || type === 129) && !this.state.containsEsc) { - const { - type: nextType - } = this.lookahead(); - if (tokenIsIdentifier(nextType) && nextType !== 98 || nextType === 5) { - this.expectOnePlugin(["flow", "typescript"]); - return false; - } - } - } else if (!this.match(65)) { - return false; - } - const next = this.nextTokenStart(); - const hasFrom = this.isUnparsedContextual(next, "from"); - if (this.input.charCodeAt(next) === 44 || tokenIsIdentifier(this.state.type) && hasFrom) { - return true; - } - if (this.match(65) && hasFrom) { - const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4)); - return nextAfterFrom === 34 || nextAfterFrom === 39; - } - return false; - } - parseExportFrom(node, expect) { - if (this.eatContextual(98)) { - node.source = this.parseImportSource(); - this.checkExport(node); - this.maybeParseImportAttributes(node); - this.checkJSONModuleImport(node); - } else if (expect) { - this.unexpected(); - } - this.semicolon(); - } - shouldParseExportDeclaration() { - const { - type - } = this.state; - if (type === 26) { - this.expectOnePlugin(["decorators", "decorators-legacy"]); - if (this.hasPlugin("decorators")) { - if (this.getPluginOption("decorators", "decoratorsBeforeExport") === true) { - this.raise(Errors.DecoratorBeforeExport, this.state.startLoc); - } - return true; - } - } - if (this.isContextual(107)) { - this.raise(Errors.UsingDeclarationExport, this.state.startLoc); - return true; - } - if (this.isContextual(96) && this.startsAwaitUsing()) { - this.raise(Errors.UsingDeclarationExport, this.state.startLoc); - return true; - } - return type === 74 || type === 75 || type === 68 || type === 80 || this.isLet() || this.isAsyncFunction(); - } - checkExport(node, checkNames, isDefault, isFrom) { - if (checkNames) { - var _node$specifiers; - if (isDefault) { - this.checkDuplicateExports(node, "default"); - if (this.hasPlugin("exportDefaultFrom")) { - var _declaration$extra; - const declaration = node.declaration; - if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) { - this.raise(Errors.ExportDefaultFromAsIdentifier, declaration); - } - } - } else if ((_node$specifiers = node.specifiers) != null && _node$specifiers.length) { - for (const specifier of node.specifiers) { - const { - exported - } = specifier; - const exportName = exported.type === "Identifier" ? exported.name : exported.value; - this.checkDuplicateExports(specifier, exportName); - if (!isFrom && specifier.local) { - const { - local - } = specifier; - if (local.type !== "Identifier") { - this.raise(Errors.ExportBindingIsString, specifier, { - localName: local.value, - exportName - }); - } else { - this.checkReservedWord(local.name, local.loc.start, true, false); - this.scope.checkLocalExport(local); - } - } - } - } else if (node.declaration) { - const decl = node.declaration; - if (decl.type === "FunctionDeclaration" || decl.type === "ClassDeclaration") { - const { - id - } = decl; - if (!id) throw new Error("Assertion failure"); - this.checkDuplicateExports(node, id.name); - } else if (decl.type === "VariableDeclaration") { - for (const declaration of decl.declarations) { - this.checkDeclaration(declaration.id); - } - } - } - } - } - checkDeclaration(node) { - if (node.type === "Identifier") { - this.checkDuplicateExports(node, node.name); - } else if (node.type === "ObjectPattern") { - for (const prop of node.properties) { - this.checkDeclaration(prop); - } - } else if (node.type === "ArrayPattern") { - for (const elem of node.elements) { - if (elem) { - this.checkDeclaration(elem); - } - } - } else if (node.type === "ObjectProperty") { - this.checkDeclaration(node.value); - } else if (node.type === "RestElement") { - this.checkDeclaration(node.argument); - } else if (node.type === "AssignmentPattern") { - this.checkDeclaration(node.left); - } - } - checkDuplicateExports(node, exportName) { - if (this.exportedIdentifiers.has(exportName)) { - if (exportName === "default") { - this.raise(Errors.DuplicateDefaultExport, node); - } else { - this.raise(Errors.DuplicateExport, node, { - exportName - }); - } - } - this.exportedIdentifiers.add(exportName); - } - parseExportSpecifiers(isInTypeExport) { - const nodes = []; - let first = true; - this.expect(5); - while (!this.eat(8)) { - if (first) { - first = false; - } else { - this.expect(12); - if (this.eat(8)) break; - } - const isMaybeTypeOnly = this.isContextual(130); - const isString = this.match(133); - const node = this.startNode(); - node.local = this.parseModuleExportName(); - nodes.push(this.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly)); - } - return nodes; - } - parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { - if (this.eatContextual(93)) { - node.exported = this.parseModuleExportName(); - } else if (isString) { - node.exported = cloneStringLiteral(node.local); - } else if (!node.exported) { - node.exported = cloneIdentifier(node.local); - } - return this.finishNode(node, "ExportSpecifier"); - } - parseModuleExportName() { - if (this.match(133)) { - const result = this.parseStringLiteral(this.state.value); - const surrogate = loneSurrogate.exec(result.value); - if (surrogate) { - this.raise(Errors.ModuleExportNameHasLoneSurrogate, result, { - surrogateCharCode: surrogate[0].charCodeAt(0) - }); - } - return result; - } - return this.parseIdentifier(true); - } - isJSONModuleImport(node) { - if (node.assertions != null) { - return node.assertions.some(({ - key, - value - }) => { - return value.value === "json" && (key.type === "Identifier" ? key.name === "type" : key.value === "type"); - }); - } - return false; - } - checkImportReflection(node) { - const { - specifiers - } = node; - const singleBindingType = specifiers.length === 1 ? specifiers[0].type : null; - if (node.phase === "source") { - if (singleBindingType !== "ImportDefaultSpecifier") { - this.raise(Errors.SourcePhaseImportRequiresDefault, specifiers[0].loc.start); - } - } else if (node.phase === "defer") { - if (singleBindingType !== "ImportNamespaceSpecifier") { - this.raise(Errors.DeferImportRequiresNamespace, specifiers[0].loc.start); - } - } else if (node.module) { - var _node$assertions; - if (singleBindingType !== "ImportDefaultSpecifier") { - this.raise(Errors.ImportReflectionNotBinding, specifiers[0].loc.start); - } - if (((_node$assertions = node.assertions) == null ? void 0 : _node$assertions.length) > 0) { - this.raise(Errors.ImportReflectionHasAssertion, specifiers[0].loc.start); - } - } - } - checkJSONModuleImport(node) { - if (this.isJSONModuleImport(node) && node.type !== "ExportAllDeclaration") { - const { - specifiers - } = node; - if (specifiers != null) { - const nonDefaultNamedSpecifier = specifiers.find(specifier => { - let imported; - if (specifier.type === "ExportSpecifier") { - imported = specifier.local; - } else if (specifier.type === "ImportSpecifier") { - imported = specifier.imported; - } - if (imported !== undefined) { - return imported.type === "Identifier" ? imported.name !== "default" : imported.value !== "default"; - } - }); - if (nonDefaultNamedSpecifier !== undefined) { - this.raise(Errors.ImportJSONBindingNotDefault, nonDefaultNamedSpecifier.loc.start); - } - } - } - } - isPotentialImportPhase(isExport) { - if (isExport) return false; - return this.isContextual(105) || this.isContextual(97) || this.isContextual(127); - } - applyImportPhase(node, isExport, phase, loc) { - if (isExport) { - return; - } - if (phase === "module") { - this.expectPlugin("importReflection", loc); - node.module = true; - } else if (this.hasPlugin("importReflection")) { - node.module = false; - } - if (phase === "source") { - this.expectPlugin("sourcePhaseImports", loc); - node.phase = "source"; - } else if (phase === "defer") { - this.expectPlugin("deferredImportEvaluation", loc); - node.phase = "defer"; - } else if (this.hasPlugin("sourcePhaseImports")) { - node.phase = null; - } - } - parseMaybeImportPhase(node, isExport) { - if (!this.isPotentialImportPhase(isExport)) { - this.applyImportPhase(node, isExport, null); - return null; - } - const phaseIdentifier = this.parseIdentifier(true); - const { - type - } = this.state; - const isImportPhase = tokenIsKeywordOrIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12; - if (isImportPhase) { - this.resetPreviousIdentifierLeadingComments(phaseIdentifier); - this.applyImportPhase(node, isExport, phaseIdentifier.name, phaseIdentifier.loc.start); - return null; - } else { - this.applyImportPhase(node, isExport, null); - return phaseIdentifier; - } - } - isPrecedingIdImportPhase(phase) { - const { - type - } = this.state; - return tokenIsIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12; - } - parseImport(node) { - if (this.match(133)) { - return this.parseImportSourceAndAttributes(node); - } - return this.parseImportSpecifiersAndAfter(node, this.parseMaybeImportPhase(node, false)); - } - parseImportSpecifiersAndAfter(node, maybeDefaultIdentifier) { - node.specifiers = []; - const hasDefault = this.maybeParseDefaultImportSpecifier(node, maybeDefaultIdentifier); - const parseNext = !hasDefault || this.eat(12); - const hasStar = parseNext && this.maybeParseStarImportSpecifier(node); - if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node); - this.expectContextual(98); - return this.parseImportSourceAndAttributes(node); - } - parseImportSourceAndAttributes(node) { - var _node$specifiers2; - (_node$specifiers2 = node.specifiers) != null ? _node$specifiers2 : node.specifiers = []; - node.source = this.parseImportSource(); - this.maybeParseImportAttributes(node); - this.checkImportReflection(node); - this.checkJSONModuleImport(node); - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - } - parseImportSource() { - if (!this.match(133)) this.unexpected(); - return this.parseExprAtom(); - } - parseImportSpecifierLocal(node, specifier, type) { - specifier.local = this.parseIdentifier(); - node.specifiers.push(this.finishImportSpecifier(specifier, type)); - } - finishImportSpecifier(specifier, type, bindingType = 8201) { - this.checkLVal(specifier.local, { - type - }, bindingType); - return this.finishNode(specifier, type); - } - parseImportAttributes() { - this.expect(5); - const attrs = []; - const attrNames = new Set(); - do { - if (this.match(8)) { - break; - } - const node = this.startNode(); - const keyName = this.state.value; - if (attrNames.has(keyName)) { - this.raise(Errors.ModuleAttributesWithDuplicateKeys, this.state.startLoc, { - key: keyName - }); - } - attrNames.add(keyName); - if (this.match(133)) { - node.key = this.parseStringLiteral(keyName); - } else { - node.key = this.parseIdentifier(true); - } - this.expect(14); - if (!this.match(133)) { - throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc); - } - node.value = this.parseStringLiteral(this.state.value); - attrs.push(this.finishNode(node, "ImportAttribute")); - } while (this.eat(12)); - this.expect(8); - return attrs; - } - parseModuleAttributes() { - const attrs = []; - const attributes = new Set(); - do { - const node = this.startNode(); - node.key = this.parseIdentifier(true); - if (node.key.name !== "type") { - this.raise(Errors.ModuleAttributeDifferentFromType, node.key); - } - if (attributes.has(node.key.name)) { - this.raise(Errors.ModuleAttributesWithDuplicateKeys, node.key, { - key: node.key.name - }); - } - attributes.add(node.key.name); - this.expect(14); - if (!this.match(133)) { - throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc); - } - node.value = this.parseStringLiteral(this.state.value); - attrs.push(this.finishNode(node, "ImportAttribute")); - } while (this.eat(12)); - return attrs; - } - maybeParseImportAttributes(node) { - let attributes; - let useWith = false; - if (this.match(76)) { - if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40) { - return; - } - this.next(); - { - if (this.hasPlugin("moduleAttributes")) { - attributes = this.parseModuleAttributes(); - } else { - this.expectImportAttributesPlugin(); - attributes = this.parseImportAttributes(); - } - } - useWith = true; - } else if (this.isContextual(94) && !this.hasPrecedingLineBreak()) { - if (this.hasPlugin("importAttributes")) { - if (this.getPluginOption("importAttributes", "deprecatedAssertSyntax") !== true) { - this.raise(Errors.ImportAttributesUseAssert, this.state.startLoc); - } - this.addExtra(node, "deprecatedAssertSyntax", true); - } else { - this.expectOnePlugin(["importAttributes", "importAssertions"]); - } - this.next(); - attributes = this.parseImportAttributes(); - } else if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { - attributes = []; - } else { - if (this.hasPlugin("moduleAttributes")) { - attributes = []; - } else return; - } - if (!useWith && this.hasPlugin("importAssertions")) { - node.assertions = attributes; - } else { - node.attributes = attributes; - } - } - maybeParseDefaultImportSpecifier(node, maybeDefaultIdentifier) { - if (maybeDefaultIdentifier) { - const specifier = this.startNodeAtNode(maybeDefaultIdentifier); - specifier.local = maybeDefaultIdentifier; - node.specifiers.push(this.finishImportSpecifier(specifier, "ImportDefaultSpecifier")); - return true; - } else if (tokenIsKeywordOrIdentifier(this.state.type)) { - this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier"); - return true; - } - return false; - } - maybeParseStarImportSpecifier(node) { - if (this.match(55)) { - const specifier = this.startNode(); - this.next(); - this.expectContextual(93); - this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier"); - return true; - } - return false; - } - parseNamedImportSpecifiers(node) { - let first = true; - this.expect(5); - while (!this.eat(8)) { - if (first) { - first = false; - } else { - if (this.eat(14)) { - throw this.raise(Errors.DestructureNamedImport, this.state.startLoc); - } - this.expect(12); - if (this.eat(8)) break; - } - const specifier = this.startNode(); - const importedIsString = this.match(133); - const isMaybeTypeOnly = this.isContextual(130); - specifier.imported = this.parseModuleExportName(); - const importSpecifier = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly, undefined); - node.specifiers.push(importSpecifier); - } - } - parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { - if (this.eatContextual(93)) { - specifier.local = this.parseIdentifier(); - } else { - const { - imported - } = specifier; - if (importedIsString) { - throw this.raise(Errors.ImportBindingIsString, specifier, { - importName: imported.value - }); - } - this.checkReservedWord(imported.name, specifier.loc.start, true, true); - if (!specifier.local) { - specifier.local = cloneIdentifier(imported); - } - } - return this.finishImportSpecifier(specifier, "ImportSpecifier", bindingType); - } - isThisParam(param) { - return param.type === "Identifier" && param.name === "this"; - } - } - class Parser extends StatementParser { - constructor(options, input, pluginsMap) { - options = getOptions(options); - super(options, input); - this.options = options; - this.initializeScopes(); - this.plugins = pluginsMap; - this.filename = options.sourceFilename; - } - getScopeHandler() { - return ScopeHandler; - } - parse() { - this.enterInitialScopes(); - const file = this.startNode(); - const program = this.startNode(); - this.nextToken(); - file.errors = null; - this.parseTopLevel(file, program); - file.errors = this.state.errors; - file.comments.length = this.state.commentsLen; - return file; - } - } - function parse(input, options) { - var _options; - if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") { - options = Object.assign({}, options); - try { - options.sourceType = "module"; - const parser = getParser(options, input); - const ast = parser.parse(); - if (parser.sawUnambiguousESM) { - return ast; - } - if (parser.ambiguousScriptDifferentAst) { - try { - options.sourceType = "script"; - return getParser(options, input).parse(); - } catch (_unused) {} - } else { - ast.program.sourceType = "script"; - } - return ast; - } catch (moduleError) { - try { - options.sourceType = "script"; - return getParser(options, input).parse(); - } catch (_unused2) {} - throw moduleError; - } - } else { - return getParser(options, input).parse(); - } - } - function parseExpression(input, options) { - const parser = getParser(options, input); - if (parser.options.strictMode) { - parser.state.strict = true; - } - return parser.getExpression(); - } - function generateExportedTokenTypes(internalTokenTypes) { - const tokenTypes = {}; - for (const typeName of Object.keys(internalTokenTypes)) { - tokenTypes[typeName] = getExportedToken(internalTokenTypes[typeName]); - } - return tokenTypes; - } - const tokTypes = generateExportedTokenTypes(tt); - function getParser(options, input) { - let cls = Parser; - const pluginsMap = new Map(); - if (options != null && options.plugins) { - for (const plugin of options.plugins) { - let name, opts; - if (typeof plugin === "string") { - name = plugin; - } else { - [name, opts] = plugin; - } - if (!pluginsMap.has(name)) { - pluginsMap.set(name, opts || {}); - } - } - validatePlugins(pluginsMap); - cls = getParserClass(pluginsMap); - } - return new cls(options, input, pluginsMap); - } - const parserClassCache = new Map(); - function getParserClass(pluginsMap) { - const pluginList = []; - for (const name of mixinPluginNames) { - if (pluginsMap.has(name)) { - pluginList.push(name); - } - } - const key = pluginList.join("|"); - let cls = parserClassCache.get(key); - if (!cls) { - cls = Parser; - for (const plugin of pluginList) { - cls = mixinPlugins[plugin](cls); - } - parserClassCache.set(key, cls); - } - return cls; - } - lib.parse = parse; - lib.parseExpression = parseExpression; - lib.tokTypes = tokTypes; - - return lib; -} - -var libExports = /*@__PURE__*/ requireLib(); - -// @ts-check -/** @typedef { import('estree').BaseNode} BaseNode */ - -/** @typedef {{ - skip: () => void; - remove: () => void; - replace: (node: BaseNode) => void; -}} WalkerContext */ - -class WalkerBase { - constructor() { - /** @type {boolean} */ - this.should_skip = false; - - /** @type {boolean} */ - this.should_remove = false; - - /** @type {BaseNode | null} */ - this.replacement = null; - - /** @type {WalkerContext} */ - this.context = { - skip: () => (this.should_skip = true), - remove: () => (this.should_remove = true), - replace: (node) => (this.replacement = node) - }; - } - - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - * @param {BaseNode} node - */ - replace(parent, prop, index, node) { - if (parent) { - if (index !== null) { - parent[prop][index] = node; - } else { - parent[prop] = node; - } - } - } - - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - */ - remove(parent, prop, index) { - if (parent) { - if (index !== null) { - parent[prop].splice(index, 1); - } else { - delete parent[prop]; - } - } - } -} - -// @ts-check - -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./walker.js').WalkerContext} WalkerContext */ - -/** @typedef {( - * this: WalkerContext, - * node: BaseNode, - * parent: BaseNode, - * key: string, - * index: number - * ) => void} SyncHandler */ - -class SyncWalker extends WalkerBase { - /** - * - * @param {SyncHandler} enter - * @param {SyncHandler} leave - */ - constructor(enter, leave) { - super(); - - /** @type {SyncHandler} */ - this.enter = enter; - - /** @type {SyncHandler} */ - this.leave = leave; - } - - /** - * - * @param {BaseNode} node - * @param {BaseNode} parent - * @param {string} [prop] - * @param {number} [index] - * @returns {BaseNode} - */ - visit(node, parent, prop, index) { - if (node) { - if (this.enter) { - const _should_skip = this.should_skip; - const _should_remove = this.should_remove; - const _replacement = this.replacement; - this.should_skip = false; - this.should_remove = false; - this.replacement = null; - - this.enter.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const skipped = this.should_skip; - const removed = this.should_remove; - - this.should_skip = _should_skip; - this.should_remove = _should_remove; - this.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 i = 0; i < value.length; i += 1) { - if (value[i] !== null && typeof value[i].type === 'string') { - if (!this.visit(value[i], node, key, i)) { - // removed - i--; - } - } - } - } else if (value !== null && typeof value.type === "string") { - this.visit(value, node, key, null); - } - } - - if (this.leave) { - const _replacement = this.replacement; - const _should_remove = this.should_remove; - this.replacement = null; - this.should_remove = false; - - this.leave.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const removed = this.should_remove; - - this.replacement = _replacement; - this.should_remove = _should_remove; - - if (removed) return null; - } - } - - return node; - } -} - -// @ts-check - -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./sync.js').SyncHandler} SyncHandler */ -/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ - -/** - * - * @param {BaseNode} ast - * @param {{ - * enter?: SyncHandler - * leave?: SyncHandler - * }} walker - * @returns {BaseNode} - */ -function walk$2(ast, { enter, leave }) { - const instance = new SyncWalker(enter, leave); - return instance.visit(ast, null); -} - -function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { - const rootExp = root.type === "Program" ? root.body[0].type === "ExpressionStatement" && root.body[0].expression : root; - walk$2(root, { - enter(node, parent) { - parent && parentStack.push(parent); - if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) { - return this.skip(); - } - if (node.type === "Identifier") { - const isLocal = !!knownIds[node.name]; - const isRefed = isReferencedIdentifier(node, parent, parentStack); - if (includeAll || isRefed && !isLocal) { - onIdentifier(node, parent, parentStack, isRefed, isLocal); - } - } else if (node.type === "ObjectProperty" && // eslint-disable-next-line no-restricted-syntax - (parent == null ? void 0 : parent.type) === "ObjectPattern") { - node.inPattern = true; - } else if (isFunctionType(node)) { - if (node.scopeIds) { - node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); - } else { - walkFunctionParams( - node, - (id) => markScopeIdentifier(node, id, knownIds) - ); - } - } else if (node.type === "BlockStatement") { - if (node.scopeIds) { - node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); - } else { - walkBlockDeclarations( - node, - (id) => markScopeIdentifier(node, id, knownIds) - ); - } - } else if (node.type === "CatchClause" && node.param) { - for (const id of extractIdentifiers$1(node.param)) { - markScopeIdentifier(node, id, knownIds); - } - } else if (isForStatement(node)) { - walkForStatement( - node, - false, - (id) => markScopeIdentifier(node, id, knownIds) - ); - } - }, - leave(node, parent) { - parent && parentStack.pop(); - if (node !== rootExp && node.scopeIds) { - for (const id of node.scopeIds) { - knownIds[id]--; - if (knownIds[id] === 0) { - delete knownIds[id]; - } - } - } - } - }); -} -function isReferencedIdentifier(id, parent, parentStack) { - if (!parent) { - return true; - } - if (id.name === "arguments") { - return false; - } - if (isReferenced(id, parent)) { - return true; - } - switch (parent.type) { - case "AssignmentExpression": - case "AssignmentPattern": - return true; - case "ObjectPattern": - case "ArrayPattern": - return isInDestructureAssignment(parent, parentStack); - } - return false; -} -function isInDestructureAssignment(parent, parentStack) { - if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === "AssignmentExpression") { - return true; - } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { - break; - } - } - } - return false; -} -function isInNewExpression(parentStack) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === "NewExpression") { - return true; - } else if (p.type !== "MemberExpression") { - break; - } - } - return false; -} -function walkFunctionParams(node, onIdent) { - for (const p of node.params) { - for (const id of extractIdentifiers$1(p)) { - onIdent(id); - } - } -} -function walkBlockDeclarations(block, onIdent) { - for (const stmt of block.body) { - if (stmt.type === "VariableDeclaration") { - if (stmt.declare) continue; - for (const decl of stmt.declarations) { - for (const id of extractIdentifiers$1(decl.id)) { - onIdent(id); - } - } - } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { - if (stmt.declare || !stmt.id) continue; - onIdent(stmt.id); - } else if (isForStatement(stmt)) { - walkForStatement(stmt, true, onIdent); - } - } -} -function isForStatement(stmt) { - return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement"; -} -function walkForStatement(stmt, isVar, onIdent) { - const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; - if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) { - for (const decl of variable.declarations) { - for (const id of extractIdentifiers$1(decl.id)) { - onIdent(id); - } - } - } -} -function extractIdentifiers$1(param, nodes = []) { - switch (param.type) { - case "Identifier": - nodes.push(param); - break; - case "MemberExpression": - let object = param; - while (object.type === "MemberExpression") { - object = object.object; - } - nodes.push(object); - break; - case "ObjectPattern": - for (const prop of param.properties) { - if (prop.type === "RestElement") { - extractIdentifiers$1(prop.argument, nodes); - } else { - extractIdentifiers$1(prop.value, nodes); - } - } - break; - case "ArrayPattern": - param.elements.forEach((element) => { - if (element) extractIdentifiers$1(element, nodes); - }); - break; - case "RestElement": - extractIdentifiers$1(param.argument, nodes); - break; - case "AssignmentPattern": - extractIdentifiers$1(param.left, nodes); - break; - } - return nodes; -} -function markKnownIds(name, knownIds) { - if (name in knownIds) { - knownIds[name]++; - } else { - knownIds[name] = 1; - } -} -function markScopeIdentifier(node, child, knownIds) { - const { name } = child; - if (node.scopeIds && node.scopeIds.has(name)) { - return; - } - markKnownIds(name, knownIds); - (node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name); -} -const isFunctionType = (node) => { - return /Function(?:Expression|Declaration)$|Method$/.test(node.type); -}; -const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; -const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; -function isReferenced(node, parent, grandparent) { - switch (parent.type) { - // yes: PARENT[NODE] - // yes: NODE.child - // no: parent.NODE - case "MemberExpression": - case "OptionalMemberExpression": - if (parent.property === node) { - return !!parent.computed; - } - return parent.object === node; - case "JSXMemberExpression": - return parent.object === node; - // no: let NODE = init; - // yes: let id = NODE; - case "VariableDeclarator": - return parent.init === node; - // yes: () => NODE - // no: (NODE) => {} - case "ArrowFunctionExpression": - return parent.body === node; - // no: class { #NODE; } - // no: class { get #NODE() {} } - // no: class { #NODE() {} } - // no: class { fn() { return this.#NODE; } } - case "PrivateName": - return false; - // no: class { NODE() {} } - // yes: class { [NODE]() {} } - // no: class { foo(NODE) {} } - case "ClassMethod": - case "ClassPrivateMethod": - case "ObjectMethod": - if (parent.key === node) { - return !!parent.computed; - } - return false; - // yes: { [NODE]: "" } - // no: { NODE: "" } - // depends: { NODE } - // depends: { key: NODE } - case "ObjectProperty": - if (parent.key === node) { - return !!parent.computed; - } - return !grandparent; - // no: class { NODE = value; } - // yes: class { [NODE] = value; } - // yes: class { key = NODE; } - case "ClassProperty": - if (parent.key === node) { - return !!parent.computed; - } - return true; - case "ClassPrivateProperty": - return parent.key !== node; - // no: class NODE {} - // yes: class Foo extends NODE {} - case "ClassDeclaration": - case "ClassExpression": - return parent.superClass === node; - // yes: left = NODE; - // no: NODE = right; - case "AssignmentExpression": - return parent.right === node; - // no: [NODE = foo] = []; - // yes: [foo = NODE] = []; - case "AssignmentPattern": - return parent.right === node; - // no: NODE: for (;;) {} - case "LabeledStatement": - return false; - // no: try {} catch (NODE) {} - case "CatchClause": - return false; - // no: function foo(...NODE) {} - case "RestElement": - return false; - case "BreakStatement": - case "ContinueStatement": - return false; - // no: function NODE() {} - // no: function foo(NODE) {} - case "FunctionDeclaration": - case "FunctionExpression": - return false; - // no: export NODE from "foo"; - // no: export * as NODE from "foo"; - case "ExportNamespaceSpecifier": - case "ExportDefaultSpecifier": - return false; - // no: export { foo as NODE }; - // yes: export { NODE as foo }; - // no: export { NODE as foo } from "foo"; - case "ExportSpecifier": - return parent.local === node; - // no: import NODE from "foo"; - // no: import * as NODE from "foo"; - // no: import { NODE as foo } from "foo"; - // no: import { foo as NODE } from "foo"; - // no: import NODE from "bar"; - case "ImportDefaultSpecifier": - case "ImportNamespaceSpecifier": - case "ImportSpecifier": - return false; - // no: import "foo" assert { NODE: "json" } - case "ImportAttribute": - return false; - // no: <div NODE="foo" /> - case "JSXAttribute": - return false; - // no: [NODE] = []; - // no: ({ NODE }) = []; - case "ObjectPattern": - case "ArrayPattern": - return false; - // no: new.NODE - // no: NODE.target - case "MetaProperty": - return false; - // yes: type X = { someProperty: NODE } - // no: type X = { NODE: OtherType } - case "ObjectTypeProperty": - return parent.key !== node; - // yes: enum X { Foo = NODE } - // no: enum X { NODE } - case "TSEnumMember": - return parent.id !== node; - // yes: { [NODE]: value } - // no: { NODE: value } - case "TSPropertySignature": - if (parent.key === node) { - return !!parent.computed; - } - return true; - } - return true; -} -const TS_NODE_TYPES = [ - "TSAsExpression", - // foo as number - "TSTypeAssertion", - // (<number>foo) - "TSNonNullExpression", - // foo! - "TSInstantiationExpression", - // foo<string> - "TSSatisfiesExpression" - // foo satisfies T -]; -function unwrapTSNode(node) { - if (TS_NODE_TYPES.includes(node.type)) { - return unwrapTSNode(node.expression); - } else { - return node; - } -} - -const isStaticExp = (p) => p.type === 4 && p.isStatic; -function isCoreComponent(tag) { - switch (tag) { - case "Teleport": - case "teleport": - return TELEPORT; - case "Suspense": - case "suspense": - return SUSPENSE; - case "KeepAlive": - case "keep-alive": - return KEEP_ALIVE; - case "BaseTransition": - case "base-transition": - return BASE_TRANSITION; - } -} -const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; -const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); -const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; -const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; -const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; -const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; -const isMemberExpressionBrowser = (exp) => { - const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === "[") { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } else if (char === "(") { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === "`") { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } else if (char === `[`) { - currentOpenBracketCount++; - } else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === "`") { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } else if (char === `(`) { - currentOpenParensCount++; - } else if (char === `)`) { - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; - } - } - return !currentOpenBracketCount && !currentOpenParensCount; -}; -const isMemberExpressionNode = (exp, context) => { - try { - let ret = exp.ast || libExports.parseExpression(getExpSource(exp), { - plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] - }); - ret = unwrapTSNode(ret); - return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined"; - } catch (e) { - return false; - } -}; -const isMemberExpression = isMemberExpressionNode; -const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; -const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); -const isFnExpressionNode = (exp, context) => { - try { - let ret = exp.ast || libExports.parseExpression(getExpSource(exp), { - plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] - }); - if (ret.type === "Program") { - ret = ret.body[0]; - if (ret.type === "ExpressionStatement") { - ret = ret.expression; - } - } - ret = unwrapTSNode(ret); - return ret.type === "FunctionExpression" || ret.type === "ArrowFunctionExpression"; - } catch (e) { - return false; - } -}; -const isFnExpression = isFnExpressionNode; -function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation( - { - offset: pos.offset, - line: pos.line, - column: pos.column - }, - source, - numberOfCharacters - ); -} -function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10) { - linesCount++; - lastNewLinePos = i; - } - } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; - return pos; -} -function assert(condition, msg) { - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } -} -function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && (allowEmpty || p.exp) && (isString$1(name) ? p.name === name : name.test(p.name))) { - return p; - } - } -} -function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - if (dynamicOnly) continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { - return p; - } - } -} -function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); -} -function hasDynamicKeyVBind(node) { - return node.props.some( - (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" - p.arg.type !== 4 || // v-bind:[_ctx.foo] - !p.arg.isStatic) - // v-bind:[foo] - ); -} -function isText$1(node) { - return node.type === 5 || node.type === 2; -} -function isVSlot(p) { - return p.type === 7 && p.name === "slot"; -} -function isTemplateNode(node) { - return node.type === 1 && node.tagType === 3; -} -function isSlotOutlet(node) { - return node.type === 1 && node.tagType === 2; -} -const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); -function getUnnormalizedProps(props, callPath = []) { - if (props && !isString$1(props) && props.type === 14) { - const callee = props.callee; - if (!isString$1(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps( - props.arguments[0], - callPath.concat(props) - ); - } - } - return [props, callPath]; -} -function injectProp(node, prop, context) { - let propsWithInjection; - let props = node.type === 13 ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && !isString$1(props) && props.type === 14) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || isString$1(props)) { - propsWithInjection = createObjectExpression([prop]); - } else if (props.type === 14) { - const first = props.arguments[0]; - if (!isString$1(first) && first.type === 15) { - if (!hasProp(prop, first)) { - first.properties.unshift(prop); - } - } else { - if (props.callee === TO_HANDLERS) { - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } else if (props.type === 15) { - if (!hasProp(prop, props)) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } else { - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } - } - if (node.type === 13) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } else { - node.props = propsWithInjection; - } - } else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } else { - node.arguments[2] = propsWithInjection; - } - } -} -function hasProp(prop, props) { - let result = false; - if (prop.key.type === 4) { - const propKeyName = prop.key.content; - result = props.properties.some( - (p) => p.key.type === 4 && p.key.content === propKeyName - ); - } - return result; -} -function toValidAssetId(name, type) { - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); - })}`; -} -function hasScopeRef(node, ids) { - if (!node || Object.keys(ids).length === 0) { - return false; - } - switch (node.type) { - case 1: - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { - return true; - } - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 11: - if (hasScopeRef(node.source, ids)) { - return true; - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 9: - return node.branches.some((b) => hasScopeRef(b, ids)); - case 10: - if (hasScopeRef(node.condition, ids)) { - return true; - } - return node.children.some((c) => hasScopeRef(c, ids)); - case 4: - return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; - case 8: - return node.children.some((c) => isObject$2(c) && hasScopeRef(c, ids)); - case 5: - case 12: - return hasScopeRef(node.content, ids); - case 2: - case 3: - case 20: - return false; - default: - return false; - } -} -function getMemoedVNodeCall(node) { - if (node.type === 14 && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } else { - return node; - } -} -const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; - -const defaultParserOptions = { - parseMode: "base", - ns: 0, - delimiters: [`{{`, `}}`], - getNamespace: () => 0, - isVoidTag: NO, - isPreTag: NO, - isIgnoreNewlineTag: NO, - isCustomElement: NO, - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: true, - prefixIdentifiers: false -}; -let currentOptions = defaultParserOptions; -let currentRoot = null; -let currentInput = ""; -let currentOpenTag = null; -let currentProp = null; -let currentAttrValue = ""; -let currentAttrStartIndex = -1; -let currentAttrEndIndex = -1; -let inPre = 0; -let inVPre = false; -let currentVPreBoundary = null; -const stack = []; -const tokenizer = new Tokenizer(stack, { - onerr: emitError, - ontext(start, end) { - onText(getSlice(start, end), start, end); - }, - ontextentity(char, start, end) { - onText(char, start, end); - }, - oninterpolation(start, end) { - if (inVPre) { - return onText(getSlice(start, end), start, end); - } - let innerStart = start + tokenizer.delimiterOpen.length; - let innerEnd = end - tokenizer.delimiterClose.length; - while (isWhitespace(currentInput.charCodeAt(innerStart))) { - innerStart++; - } - while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { - innerEnd--; - } - let exp = getSlice(innerStart, innerEnd); - if (exp.includes("&")) { - { - exp = decodeHTML(exp); - } - } - addNode({ - type: 5, - content: createExp(exp, false, getLoc(innerStart, innerEnd)), - loc: getLoc(start, end) - }); - }, - onopentagname(start, end) { - const name = getSlice(start, end); - currentOpenTag = { - type: 1, - tag: name, - ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), - tagType: 0, - // will be refined on tag close - props: [], - children: [], - loc: getLoc(start - 1, end), - codegenNode: void 0 - }; - }, - onopentagend(end) { - endOpenTag(end); - }, - onclosetag(start, end) { - const name = getSlice(start, end); - if (!currentOptions.isVoidTag(name)) { - let found = false; - for (let i = 0; i < stack.length; i++) { - const e = stack[i]; - if (e.tag.toLowerCase() === name.toLowerCase()) { - found = true; - if (i > 0) { - emitError(24, stack[0].loc.start.offset); - } - for (let j = 0; j <= i; j++) { - const el = stack.shift(); - onCloseTag(el, end, j < i); - } - break; - } - } - if (!found) { - emitError(23, backTrack(start, 60)); - } - } - }, - onselfclosingtag(end) { - const name = currentOpenTag.tag; - currentOpenTag.isSelfClosing = true; - endOpenTag(end); - if (stack[0] && stack[0].tag === name) { - onCloseTag(stack.shift(), end); - } - }, - onattribname(start, end) { - currentProp = { - type: 6, - name: getSlice(start, end), - nameLoc: getLoc(start, end), - value: void 0, - loc: getLoc(start) - }; - }, - ondirname(start, end) { - const raw = getSlice(start, end); - const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); - if (!inVPre && name === "") { - emitError(26, start); - } - if (inVPre || name === "") { - currentProp = { - type: 6, - name: raw, - nameLoc: getLoc(start, end), - value: void 0, - loc: getLoc(start) - }; - } else { - currentProp = { - type: 7, - name, - rawName: raw, - exp: void 0, - arg: void 0, - modifiers: raw === "." ? [createSimpleExpression("prop")] : [], - loc: getLoc(start) - }; - if (name === "pre") { - inVPre = tokenizer.inVPre = true; - currentVPreBoundary = currentOpenTag; - const props = currentOpenTag.props; - for (let i = 0; i < props.length; i++) { - if (props[i].type === 7) { - props[i] = dirToAttr(props[i]); - } - } - } - } - }, - ondirarg(start, end) { - if (start === end) return; - const arg = getSlice(start, end); - if (inVPre) { - currentProp.name += arg; - setLocEnd(currentProp.nameLoc, end); - } else { - const isStatic = arg[0] !== `[`; - currentProp.arg = createExp( - isStatic ? arg : arg.slice(1, -1), - isStatic, - getLoc(start, end), - isStatic ? 3 : 0 - ); - } - }, - ondirmodifier(start, end) { - const mod = getSlice(start, end); - if (inVPre) { - currentProp.name += "." + mod; - setLocEnd(currentProp.nameLoc, end); - } else if (currentProp.name === "slot") { - const arg = currentProp.arg; - if (arg) { - arg.content += "." + mod; - setLocEnd(arg.loc, end); - } - } else { - const exp = createSimpleExpression(mod, true, getLoc(start, end)); - currentProp.modifiers.push(exp); - } - }, - onattribdata(start, end) { - currentAttrValue += getSlice(start, end); - if (currentAttrStartIndex < 0) currentAttrStartIndex = start; - currentAttrEndIndex = end; - }, - onattribentity(char, start, end) { - currentAttrValue += char; - if (currentAttrStartIndex < 0) currentAttrStartIndex = start; - currentAttrEndIndex = end; - }, - onattribnameend(end) { - const start = currentProp.loc.start.offset; - const name = getSlice(start, end); - if (currentProp.type === 7) { - currentProp.rawName = name; - } - if (currentOpenTag.props.some( - (p) => (p.type === 7 ? p.rawName : p.name) === name - )) { - emitError(2, start); - } - }, - onattribend(quote, end) { - if (currentOpenTag && currentProp) { - setLocEnd(currentProp.loc, end); - if (quote !== 0) { - if (currentProp.type === 6) { - if (currentProp.name === "class") { - currentAttrValue = condense(currentAttrValue).trim(); - } - if (quote === 1 && !currentAttrValue) { - emitError(13, end); - } - currentProp.value = { - type: 2, - content: currentAttrValue, - loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) - }; - if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { - tokenizer.enterRCDATA(toCharCodes(`</template`), 0); - } - } else { - let expParseMode = 0 /* Normal */; - { - if (currentProp.name === "for") { - expParseMode = 3 /* Skip */; - } else if (currentProp.name === "slot") { - expParseMode = 1 /* Params */; - } else if (currentProp.name === "on" && currentAttrValue.includes(";")) { - expParseMode = 2 /* Statements */; - } - } - currentProp.exp = createExp( - currentAttrValue, - false, - getLoc(currentAttrStartIndex, currentAttrEndIndex), - 0, - expParseMode - ); - if (currentProp.name === "for") { - currentProp.forParseResult = parseForExpression(currentProp.exp); - } - } - } - if (currentProp.type !== 7 || currentProp.name !== "pre") { - currentOpenTag.props.push(currentProp); - } - } - currentAttrValue = ""; - currentAttrStartIndex = currentAttrEndIndex = -1; - }, - oncomment(start, end) { - if (currentOptions.comments) { - addNode({ - type: 3, - content: getSlice(start, end), - loc: getLoc(start - 4, end + 3) - }); - } - }, - onend() { - const end = currentInput.length; - if (tokenizer.state !== 1) { - switch (tokenizer.state) { - case 5: - case 8: - emitError(5, end); - break; - case 3: - case 4: - emitError( - 25, - tokenizer.sectionStart - ); - break; - case 28: - if (tokenizer.currentSequence === Sequences.CdataEnd) { - emitError(6, end); - } else { - emitError(7, end); - } - break; - case 6: - case 7: - case 9: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - // " - case 20: - // ' - case 21: - emitError(9, end); - break; - } - } - for (let index = 0; index < stack.length; index++) { - onCloseTag(stack[index], end - 1); - emitError(24, stack[index].loc.start.offset); - } - }, - oncdata(start, end) { - if (stack[0].ns !== 0) { - onText(getSlice(start, end), start, end); - } else { - emitError(1, start - 9); - } - }, - onprocessinginstruction(start) { - if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { - emitError( - 21, - start - 1 - ); - } - } -}); -const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; -const stripParensRE = /^\(|\)$/g; -function parseForExpression(input) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) return; - const [, LHS, RHS] = inMatch; - const createAliasExpression = (content, offset, asParam = false) => { - const start = loc.start.offset + offset; - const end = start + content.length; - return createExp( - content, - false, - getLoc(start, end), - 0, - asParam ? 1 /* Params */ : 0 /* Normal */ - ); - }; - const result = { - source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: void 0, - key: void 0, - index: void 0, - finalized: false - }; - let valueContent = LHS.trim().replace(stripParensRE, "").trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, "").trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(keyContent, keyOffset, true); - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression( - indexContent, - exp.indexOf( - indexContent, - result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length - ), - true - ); - } - } - } - if (valueContent) { - result.value = createAliasExpression(valueContent, trimmedOffset, true); - } - return result; -} -function getSlice(start, end) { - return currentInput.slice(start, end); -} -function endOpenTag(end) { - if (tokenizer.inSFCRoot) { - currentOpenTag.innerLoc = getLoc(end + 1, end + 1); - } - addNode(currentOpenTag); - const { tag, ns } = currentOpenTag; - if (ns === 0 && currentOptions.isPreTag(tag)) { - inPre++; - } - if (currentOptions.isVoidTag(tag)) { - onCloseTag(currentOpenTag, end); - } else { - stack.unshift(currentOpenTag); - if (ns === 1 || ns === 2) { - tokenizer.inXML = true; - } - } - currentOpenTag = null; -} -function onText(content, start, end) { - const parent = stack[0] || currentRoot; - const lastNode = parent.children[parent.children.length - 1]; - if (lastNode && lastNode.type === 2) { - lastNode.content += content; - setLocEnd(lastNode.loc, end); - } else { - parent.children.push({ - type: 2, - content, - loc: getLoc(start, end) - }); - } -} -function onCloseTag(el, end, isImplied = false) { - if (isImplied) { - setLocEnd(el.loc, backTrack(end, 60)); - } else { - setLocEnd(el.loc, lookAhead(end, 62) + 1); - } - if (tokenizer.inSFCRoot) { - if (el.children.length) { - el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); - } else { - el.innerLoc.end = extend({}, el.innerLoc.start); - } - el.innerLoc.source = getSlice( - el.innerLoc.start.offset, - el.innerLoc.end.offset - ); - } - const { tag, ns, children } = el; - if (!inVPre) { - if (tag === "slot") { - el.tagType = 2; - } else if (isFragmentTemplate(el)) { - el.tagType = 3; - } else if (isComponent(el)) { - el.tagType = 1; - } - } - if (!tokenizer.inRCDATA) { - el.children = condenseWhitespace(children); - } - if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { - const first = children[0]; - if (first && first.type === 2) { - first.content = first.content.replace(/^\r?\n/, ""); - } - } - if (ns === 0 && currentOptions.isPreTag(tag)) { - inPre--; - } - if (currentVPreBoundary === el) { - inVPre = tokenizer.inVPre = false; - currentVPreBoundary = null; - } - if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { - tokenizer.inXML = false; - } -} -function lookAhead(index, c) { - let i = index; - while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; - return i; -} -function backTrack(index, c) { - let i = index; - while (currentInput.charCodeAt(i) !== c && i >= 0) i--; - return i; -} -const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); -function isFragmentTemplate({ tag, props }) { - if (tag === "template") { - for (let i = 0; i < props.length; i++) { - if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { - return true; - } - } - } - return false; -} -function isComponent({ tag, props }) { - if (currentOptions.isCustomElement(tag)) { - return false; - } - if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { - return true; - } - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6) { - if (p.name === "is" && p.value) { - if (p.value.content.startsWith("vue:")) { - return true; - } - } - } - } - return false; -} -function isUpperCase(c) { - return c > 64 && c < 91; -} -const windowsNewlineRE = /\r\n/g; -function condenseWhitespace(nodes, tag) { - const shouldCondense = currentOptions.whitespace !== "preserve"; - let removedWhitespace = false; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (node.type === 2) { - if (!inPre) { - if (isAllWhitespace(node.content)) { - const prev = nodes[i - 1] && nodes[i - 1].type; - const next = nodes[i + 1] && nodes[i + 1].type; - if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { - removedWhitespace = true; - nodes[i] = null; - } else { - node.content = " "; - } - } else if (shouldCondense) { - node.content = condense(node.content); - } - } else { - node.content = node.content.replace(windowsNewlineRE, "\n"); - } - } - } - return removedWhitespace ? nodes.filter(Boolean) : nodes; -} -function isAllWhitespace(str) { - for (let i = 0; i < str.length; i++) { - if (!isWhitespace(str.charCodeAt(i))) { - return false; - } - } - return true; -} -function hasNewlineChar(str) { - for (let i = 0; i < str.length; i++) { - const c = str.charCodeAt(i); - if (c === 10 || c === 13) { - return true; - } - } - return false; -} -function condense(str) { - let ret = ""; - let prevCharIsWhitespace = false; - for (let i = 0; i < str.length; i++) { - if (isWhitespace(str.charCodeAt(i))) { - if (!prevCharIsWhitespace) { - ret += " "; - prevCharIsWhitespace = true; - } - } else { - ret += str[i]; - prevCharIsWhitespace = false; - } - } - return ret; -} -function addNode(node) { - (stack[0] || currentRoot).children.push(node); -} -function getLoc(start, end) { - return { - start: tokenizer.getPos(start), - // @ts-expect-error allow late attachment - end: end == null ? end : tokenizer.getPos(end), - // @ts-expect-error allow late attachment - source: end == null ? end : getSlice(start, end) - }; -} -function cloneLoc(loc) { - return getLoc(loc.start.offset, loc.end.offset); -} -function setLocEnd(loc, end) { - loc.end = tokenizer.getPos(end); - loc.source = getSlice(loc.start.offset, end); -} -function dirToAttr(dir) { - const attr = { - type: 6, - name: dir.rawName, - nameLoc: getLoc( - dir.loc.start.offset, - dir.loc.start.offset + dir.rawName.length - ), - value: void 0, - loc: dir.loc - }; - if (dir.exp) { - const loc = dir.exp.loc; - if (loc.end.offset < dir.loc.end.offset) { - loc.start.offset--; - loc.start.column--; - loc.end.offset++; - loc.end.column++; - } - attr.value = { - type: 2, - content: dir.exp.content, - loc - }; - } - return attr; -} -function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { - const exp = createSimpleExpression(content, isStatic, loc, constType); - if (!isStatic && currentOptions.prefixIdentifiers && parseMode !== 3 /* Skip */ && content.trim()) { - if (isSimpleIdentifier(content)) { - exp.ast = null; - return exp; - } - try { - const plugins = currentOptions.expressionPlugins; - const options = { - plugins: plugins ? [...plugins, "typescript"] : ["typescript"] - }; - if (parseMode === 2 /* Statements */) { - exp.ast = libExports.parse(` ${content} `, options).program; - } else if (parseMode === 1 /* Params */) { - exp.ast = libExports.parseExpression(`(${content})=>{}`, options); - } else { - exp.ast = libExports.parseExpression(`(${content})`, options); - } - } catch (e) { - exp.ast = false; - emitError(45, loc.start.offset, e.message); - } - } - return exp; -} -function emitError(code, index, message) { - currentOptions.onError( - createCompilerError(code, getLoc(index, index), void 0, message) - ); -} -function reset() { - tokenizer.reset(); - currentOpenTag = null; - currentProp = null; - currentAttrValue = ""; - currentAttrStartIndex = -1; - currentAttrEndIndex = -1; - stack.length = 0; -} -function baseParse(input, options) { - reset(); - currentInput = input; - currentOptions = extend({}, defaultParserOptions); - if (options) { - let key; - for (key in options) { - if (options[key] != null) { - currentOptions[key] = options[key]; - } - } - } - { - if (currentOptions.decodeEntities) { - console.warn( - `[@vue/compiler-core] decodeEntities option is passed but will be ignored in non-browser builds.` - ); - } - } - tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; - tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; - const delimiters = options && options.delimiters; - if (delimiters) { - tokenizer.delimiterOpen = toCharCodes(delimiters[0]); - tokenizer.delimiterClose = toCharCodes(delimiters[1]); - } - const root = currentRoot = createRoot([], input); - tokenizer.parse(currentInput); - root.loc = getLoc(0, input.length); - root.children = condenseWhitespace(root.children); - currentRoot = null; - return root; -} - -function cacheStatic(root, context) { - walk$1( - root, - void 0, - context, - // Root node is unfortunately non-hoistable due to potential parent - // fallthrough attributes. - isSingleElementRoot(root, root.children[0]) - ); -} -function isSingleElementRoot(root, child) { - const { children } = root; - return children.length === 1 && child.type === 1 && !isSlotOutlet(child); -} -function walk$1(node, parent, context, doNotHoistNode = false, inFor = false) { - const { children } = node; - const toCache = []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.type === 1 && child.tagType === 0) { - const constantType = doNotHoistNode ? 0 : getConstantType(child, context); - if (constantType > 0) { - if (constantType >= 2) { - child.codegenNode.patchFlag = -1; - toCache.push(child); - continue; - } - } else { - const codegenNode = child.codegenNode; - if (codegenNode.type === 13) { - const flag = codegenNode.patchFlag; - if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } - } else if (child.type === 12) { - const constantType = doNotHoistNode ? 0 : getConstantType(child, context); - if (constantType >= 2) { - toCache.push(child); - continue; - } - } - if (child.type === 1) { - const isComponent = child.tagType === 1; - if (isComponent) { - context.scopes.vSlot++; - } - walk$1(child, node, context, false, inFor); - if (isComponent) { - context.scopes.vSlot--; - } - } else if (child.type === 11) { - walk$1(child, node, context, child.children.length === 1, true); - } else if (child.type === 9) { - for (let i2 = 0; i2 < child.branches.length; i2++) { - walk$1( - child.branches[i2], - node, - context, - child.branches[i2].children.length === 1, - inFor - ); - } - } - } - let cachedAsArray = false; - if (toCache.length === children.length && node.type === 1) { - if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray$3(node.codegenNode.children)) { - node.codegenNode.children = getCacheExpression( - createArrayExpression(node.codegenNode.children) - ); - cachedAsArray = true; - } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray$3(node.codegenNode.children) && node.codegenNode.children.type === 15) { - const slot = getSlotNode(node.codegenNode, "default"); - if (slot) { - slot.returns = getCacheExpression( - createArrayExpression(slot.returns) - ); - cachedAsArray = true; - } - } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !isArray$3(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { - const slotName = findDir(node, "slot", true); - const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); - if (slot) { - slot.returns = getCacheExpression( - createArrayExpression(slot.returns) - ); - cachedAsArray = true; - } - } - } - if (!cachedAsArray) { - for (const child of toCache) { - child.codegenNode = context.cache(child.codegenNode); - } - } - function getCacheExpression(value) { - const exp = context.cache(value); - if (inFor && context.hmr) { - exp.needArraySpread = true; - } - return exp; - } - function getSlotNode(node2, name) { - if (node2.children && !isArray$3(node2.children) && node2.children.type === 15) { - const slot = node2.children.properties.find( - (p) => p.key === name || p.key.content === name - ); - return slot && slot.value; - } - } - if (toCache.length && context.transformHoist) { - context.transformHoist(children, context, node); - } -} -function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1: - if (node.tagType !== 0) { - return 0; - } - const cached = constantCache.get(node); - if (cached !== void 0) { - return cached; - } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13) { - return 0; - } - if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { - return 0; - } - if (codegenNode.patchFlag === void 0) { - let returnType2 = 3; - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0) { - constantCache.set(node, 0); - return 0; - } - if (generatedPropsType < returnType2) { - returnType2 = generatedPropsType; - } - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0) { - constantCache.set(node, 0); - return 0; - } - if (childType < returnType2) { - returnType2 = childType; - } - } - if (returnType2 > 1) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 && p.name === "bind" && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0) { - constantCache.set(node, 0); - return 0; - } - if (expType < returnType2) { - returnType2 = expType; - } - } - } - } - if (codegenNode.isBlock) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7) { - constantCache.set(node, 0); - return 0; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper( - getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) - ); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType2); - return returnType2; - } else { - constantCache.set(node, 0); - return 0; - } - case 2: - case 3: - return 3; - case 9: - case 11: - case 10: - return 0; - case 5: - case 12: - return getConstantType(node.content, context); - case 4: - return node.constType; - case 8: - let returnType = 3; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString$1(child) || isSymbol$1(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0) { - return 0; - } else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - case 20: - return 2; - default: - return 0; - } -} -const allowHoistedHelperSet = /* @__PURE__ */ new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS -]); -function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 && !isString$1(value.callee) && allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4) { - return getConstantType(arg, context); - } else if (arg.type === 14) { - return getConstantTypeOfHelperCall(arg, context); - } - } - return 0; -} -function getGeneratedPropsConstantType(node, context) { - let returnType = 3; - const props = getNodeProps(node); - if (props && props.type === 15) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4) { - valueType = getConstantType(value, context); - } else if (value.type === 14) { - valueType = getConstantTypeOfHelperCall(value, context); - } else { - valueType = 0; - } - if (valueType === 0) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } - } - return returnType; -} -function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13) { - return codegenNode.props; - } -} - -function createTransformContext(root, { - filename = "", - prefixIdentifiers = false, - hoistStatic = false, - hmr = false, - cacheHandlers = false, - nodeTransforms = [], - directiveTransforms = {}, - transformHoist = null, - isBuiltInComponent = NOOP, - isCustomElement = NOOP, - expressionPlugins = [], - scopeId = null, - slotted = true, - ssr = false, - inSSR = false, - ssrCssVars = ``, - bindingMetadata = EMPTY_OBJ, - inline = false, - isTS = false, - onError = defaultOnError, - onWarn = defaultOnWarn, - compatConfig -}) { - const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); - const context = { - // options - filename, - selfName: nameMatch && capitalize(camelize(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - hmr, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: /* @__PURE__ */ new Map(), - components: /* @__PURE__ */ new Set(), - directives: /* @__PURE__ */ new Set(), - hoists: [], - imports: [], - cached: [], - constantCache: /* @__PURE__ */ new WeakMap(), - temps: 0, - identifiers: /* @__PURE__ */ Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - grandParent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - { - if (!context.currentNode) { - throw new Error(`Node being replaced is already removed.`); - } - if (!context.parent) { - throw new Error(`Cannot replace root node.`); - } - } - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - if (!context.parent) { - throw new Error(`Cannot remove root node.`); - } - const list = context.parent.children; - const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; - if (removalIndex < 0) { - throw new Error(`node being removed is not a child of current parent`); - } - if (!node || node === context.currentNode) { - context.currentNode = null; - context.onNodeRemoved(); - } else { - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: NOOP, - addIdentifiers(exp) { - { - if (isString$1(exp)) { - addId(exp); - } else if (exp.identifiers) { - exp.identifiers.forEach(addId); - } else if (exp.type === 4) { - addId(exp.content); - } - } - }, - removeIdentifiers(exp) { - { - if (isString$1(exp)) { - removeId(exp); - } else if (exp.identifiers) { - exp.identifiers.forEach(removeId); - } else if (exp.type === 4) { - removeId(exp.content); - } - } - }, - hoist(exp) { - if (isString$1(exp)) exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression( - `_hoisted_${context.hoists.length}`, - false, - exp.loc, - 2 - ); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false, inVOnce = false) { - const cacheExp = createCacheExpression( - context.cached.length, - exp, - isVNode, - inVOnce - ); - context.cached.push(cacheExp); - return cacheExp; - } - }; - function addId(id) { - const { identifiers } = context; - if (identifiers[id] === void 0) { - identifiers[id] = 0; - } - identifiers[id]++; - } - function removeId(id) { - context.identifiers[id]--; - } - return context; -} -function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - cacheStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; - root.transformed = true; -} -function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - if (isSingleElementRoot(root, child) && child.codegenNode) { - const codegenNode = child.codegenNode; - if (codegenNode.type === 13) { - convertToBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } else { - root.codegenNode = child; - } - } else if (children.length > 1) { - let patchFlag = 64; - if (children.filter((c) => c.type !== 3).length === 1) { - patchFlag |= 2048; - } - root.codegenNode = createVNodeCall( - context, - helper(FRAGMENT), - void 0, - root.children, - patchFlag, - void 0, - void 0, - true, - void 0, - false - ); - } else ; -} -function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (isString$1(child)) continue; - context.grandParent = context.parent; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } -} -function traverseNode(node, context) { - context.currentNode = node; - const { nodeTransforms } = context; - const exitFns = []; - for (let i2 = 0; i2 < nodeTransforms.length; i2++) { - const onExit = nodeTransforms[i2](node, context); - if (onExit) { - if (isArray$3(onExit)) { - exitFns.push(...onExit); - } else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - return; - } else { - node = context.currentNode; - } - } - switch (node.type) { - case 3: - if (!context.ssr) { - context.helper(CREATE_COMMENT); - } - break; - case 5: - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9: - for (let i2 = 0; i2 < node.branches.length; i2++) { - traverseNode(node.branches[i2], context); - } - break; - case 10: - case 11: - case 1: - case 0: - traverseChildren(node, context); - break; - } - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); - } -} -function createStructuralDirectiveTransform(name, fn) { - const matches = isString$1(name) ? (n) => n === name : (n) => name.test(n); - return (node, context) => { - if (node.type === 1) { - const { props } = node; - if (node.tagType === 3 && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 && matches(prop.name)) { - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) exitFns.push(onExit); - } - } - return exitFns; - } - }; -} - -var sourceMap$2 = {}; - -var sourceMapGenerator$2 = {}; - -var base64Vlq$2 = {}; - -var base64$2 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredBase64$2; - -function requireBase64$2 () { - if (hasRequiredBase64$2) return base64$2; - hasRequiredBase64$2 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - base64$2.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - base64$2.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - return base64$2; -} - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredBase64Vlq$2; - -function requireBase64Vlq$2 () { - if (hasRequiredBase64Vlq$2) return base64Vlq$2; - hasRequiredBase64Vlq$2 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = /*@__PURE__*/ requireBase64$2(); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - base64Vlq$2.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - base64Vlq$2.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - return base64Vlq$2; -} - -var util$3 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredUtil$3; - -function requireUtil$3 () { - if (hasRequiredUtil$3) return util$3; - hasRequiredUtil$3 = 1; - (function (exports) { - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port; - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - var MAX_CACHED_INPUTS = 32; - - /** - * Takes some function `f(input) -> result` and returns a memoized version of - * `f`. - * - * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The - * memoization is a dumb-simple, linear least-recently-used cache. - */ - function lruMemoize(f) { - var cache = []; - - return function(input) { - for (var i = 0; i < cache.length; i++) { - if (cache[i].input === input) { - var temp = cache[0]; - cache[0] = cache[i]; - cache[i] = temp; - return cache[0].result; - } - } - - var result = f(input); - - cache.unshift({ - input, - result, - }); - - if (cache.length > MAX_CACHED_INPUTS) { - cache.pop(); - } - - return result; - }; - } - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '<dir>/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - var normalize = lruMemoize(function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - // Split the path into parts between `/` characters. This is much faster than - // using `.split(/\/+/g)`. - var parts = []; - var start = 0; - var i = 0; - while (true) { - start = i; - i = path.indexOf("/", start); - if (i === -1) { - parts.push(path.slice(start)); - break; - } else { - parts.push(path.slice(start, i)); - while (i < path.length && path[i] === "/") { - i++; - } - } - } - - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - }); - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { - var cmp; - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - /** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ - function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); - } - exports.parseSourceMapInput = parseSourceMapInput; - - /** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ - function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); - } - exports.computeSourceURL = computeSourceURL; - } (util$3)); - return util$3; -} - -var arraySet$2 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredArraySet$2; - -function requireArraySet$2 () { - if (hasRequiredArraySet$2) return arraySet$2; - hasRequiredArraySet$2 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = /*@__PURE__*/ requireUtil$3(); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - arraySet$2.ArraySet = ArraySet; - return arraySet$2; -} - -var mappingList$2 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredMappingList$2; - -function requireMappingList$2 () { - if (hasRequiredMappingList$2) return mappingList$2; - hasRequiredMappingList$2 = 1; - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = /*@__PURE__*/ requireUtil$3(); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - mappingList$2.MappingList = MappingList; - return mappingList$2; -} - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredSourceMapGenerator$2; - -function requireSourceMapGenerator$2 () { - if (hasRequiredSourceMapGenerator$2) return sourceMapGenerator$2; - hasRequiredSourceMapGenerator$2 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = /*@__PURE__*/ requireBase64Vlq$2(); - var util = /*@__PURE__*/ requireUtil$3(); - var ArraySet = /*@__PURE__*/ requireArraySet$2().ArraySet; - var MappingList = /*@__PURE__*/ requireMappingList$2().MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, { - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - })); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - if (this._validateMapping(generated, original, source, name) === false) { - return; - } - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source); - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - var message = 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.'; - - if (this._ignoreInvalidMapping) { - if (typeof console !== 'undefined' && console.warn) { - console.warn(message); - } - return false; - } else { - throw new Error(message); - } - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - var message = 'Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - }); - - if (this._ignoreInvalidMapping) { - if (typeof console !== 'undefined' && console.warn) { - console.warn(message); - } - return false; - } else { - throw new Error(message) - } - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = ''; - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - sourceMapGenerator$2.SourceMapGenerator = SourceMapGenerator; - return sourceMapGenerator$2; -} - -var sourceMapConsumer$2 = {}; - -var binarySearch$2 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredBinarySearch$2; - -function requireBinarySearch$2 () { - if (hasRequiredBinarySearch$2) return binarySearch$2; - hasRequiredBinarySearch$2 = 1; - (function (exports) { - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - } (binarySearch$2)); - return binarySearch$2; -} - -var quickSort$2 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredQuickSort$2; - -function requireQuickSort$2 () { - if (hasRequiredQuickSort$2) return quickSort$2; - hasRequiredQuickSort$2 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - function SortTemplate(comparator) { - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot, false) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - return doQuickSort; - } - - function cloneSort(comparator) { - let template = SortTemplate.toString(); - let templateFn = new Function(`return ${template}`)(); - return templateFn(comparator); - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - - let sortCache = new WeakMap(); - quickSort$2.quickSort = function (ary, comparator, start = 0) { - let doQuickSort = sortCache.get(comparator); - if (doQuickSort === void 0) { - doQuickSort = cloneSort(comparator); - sortCache.set(comparator, doQuickSort); - } - doQuickSort(ary, comparator, start, ary.length - 1); - }; - return quickSort$2; -} - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredSourceMapConsumer$2; - -function requireSourceMapConsumer$2 () { - if (hasRequiredSourceMapConsumer$2) return sourceMapConsumer$2; - hasRequiredSourceMapConsumer$2 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = /*@__PURE__*/ requireUtil$3(); - var binarySearch = /*@__PURE__*/ requireBinarySearch$2(); - var ArraySet = /*@__PURE__*/ requireArraySet$2().ArraySet; - var base64VLQ = /*@__PURE__*/ requireBase64Vlq$2(); - var quickSort = /*@__PURE__*/ requireQuickSort$2().quickSort; - - function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - var boundCallback = aCallback.bind(context); - var names = this._names; - var sources = this._sources; - var sourceMapURL = this._sourceMapURL; - - for (var i = 0, n = mappings.length; i < n; i++) { - var mapping = mappings[i]; - var source = mapping.source === null ? null : sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, sourceMapURL); - boundCallback({ - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : names.at(mapping.name) - }); - } - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - sourceMapConsumer$2.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ - BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; - }; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - - const compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine; - function sortGenerated(array, start) { - let l = array.length; - let n = array.length - start; - if (n <= 1) { - return; - } else if (n == 2) { - let a = array[start]; - let b = array[start + 1]; - if (compareGenerated(a, b) > 0) { - array[start] = b; - array[start + 1] = a; - } - } else if (n < 20) { - for (let i = start; i < l; i++) { - for (let j = i; j > start; j--) { - let a = array[j - 1]; - let b = array[j]; - if (compareGenerated(a, b) <= 0) { - break; - } - array[j - 1] = b; - array[j] = a; - } - } - } else { - quickSort(array, compareGenerated, start); - } - } - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, segment, end, value; - - let subarrayStart = 0; - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - - sortGenerated(generatedMappings, subarrayStart); - subarrayStart = generatedMappings.length; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - aStr.slice(index, end); - - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - let currentSource = mapping.source; - while (originalMappings.length <= currentSource) { - originalMappings.push(null); - } - if (originalMappings[currentSource] === null) { - originalMappings[currentSource] = []; - } - originalMappings[currentSource].push(mapping); - } - } - } - - sortGenerated(generatedMappings, subarrayStart); - this.__generatedMappings = generatedMappings; - - for (var i = 0; i < originalMappings.length; i++) { - if (originalMappings[i] != null) { - quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource); - } - } - this.__originalMappings = [].concat(...originalMappings); - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - sourceMapConsumer$2.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content || content === '') { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - sourceMapConsumer$2.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - return sourceMapConsumer$2; -} - -var sourceNode$2 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredSourceNode$2; - -function requireSourceNode$2 () { - if (hasRequiredSourceNode$2) return sourceNode$2; - hasRequiredSourceNode$2 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator$2().SourceMapGenerator; - var util = /*@__PURE__*/ requireUtil$3(); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - sourceNode$2.SourceNode = SourceNode; - return sourceNode$2; -} - -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredSourceMap$2; - -function requireSourceMap$2 () { - if (hasRequiredSourceMap$2) return sourceMap$2; - hasRequiredSourceMap$2 = 1; - sourceMap$2.SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator$2().SourceMapGenerator; - sourceMap$2.SourceMapConsumer = /*@__PURE__*/ requireSourceMapConsumer$2().SourceMapConsumer; - sourceMap$2.SourceNode = /*@__PURE__*/ requireSourceNode$2().SourceNode; - return sourceMap$2; -} - -var sourceMapExports = /*@__PURE__*/ requireSourceMap$2(); - -const PURE_ANNOTATION = `/*@__PURE__*/`; -const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; -function createCodegenContext(ast, { - mode = "function", - prefixIdentifiers = mode === "module", - sourceMap = false, - filename = `template.vue.html`, - scopeId = null, - optimizeImports = false, - runtimeGlobalName = `Vue`, - runtimeModuleName = `vue`, - ssrRuntimeModuleName = "vue/server-renderer", - ssr = false, - isTS = false, - inSSR = false -}) { - const context = { - mode, - prefixIdentifiers, - sourceMap, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: void 0, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, newlineIndex = -2 /* None */, node) { - context.code += code; - if (context.map) { - if (node) { - let name; - if (node.type === 4 && !node.isStatic) { - const content = node.content.replace(/^_ctx\./, ""); - if (content !== node.content && isSimpleIdentifier(content)) { - name = content; - } - } - addMapping(node.loc.start, name); - } - if (newlineIndex === -3 /* Unknown */) { - advancePositionWithMutation(context, code); - } else { - context.offset += code.length; - if (newlineIndex === -2 /* None */) { - context.column += code.length; - } else { - if (newlineIndex === -1 /* End */) { - newlineIndex = code.length - 1; - } - context.line++; - context.column = code.length - newlineIndex; - } - } - if (node && node.loc !== locStub) { - addMapping(node.loc.end); - } - } - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); - } - }; - function newline(n) { - context.push("\n" + ` `.repeat(n), 0 /* Start */); - } - function addMapping(loc, name = null) { - const { _names, _mappings } = context.map; - if (name !== null && !_names.has(name)) _names.add(name); - _mappings.add({ - originalLine: loc.line, - originalColumn: loc.column - 1, - // source-map column is 0 based - generatedLine: context.line, - generatedColumn: context.column - 1, - source: filename, - name - }); - } - if (sourceMap) { - context.map = new sourceMapExports.SourceMapGenerator(); - context.map.setSourceContent(filename, context.source); - context.map._sources.add(filename); - } - return context; -} -function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) options.onContextCreated(context); - const { - mode, - push, - prefixIdentifiers, - indent, - deindent, - newline, - scopeId, - ssr - } = context; - const helpers = Array.from(ast.helpers); - const hasHelpers = helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== "module"; - const genScopeId = scopeId != null && mode === "module"; - const isSetupInlined = !!options.inline; - const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; - if (mode === "module") { - genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined); - } else { - genFunctionPreamble(ast, preambleContext); - } - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; - if (options.bindingMetadata && !options.inline) { - args.push("$props", "$setup", "$data", "$options"); - } - const signature = options.isTS ? args.map((arg) => `${arg}: any`).join(",") : args.join(", "); - if (isSetupInlined) { - push(`(${signature}) => {`); - } else { - push(`function ${functionName}(${signature}) {`); - } - indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - if (hasHelpers) { - push( - `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue -`, - -1 /* End */ - ); - newline(); - } - } - if (ast.components.length) { - genAssets(ast.components, "component", context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, "directive", context); - if (ast.temps > 0) { - newline(); - } - } - if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } - } - if (ast.components.length || ast.directives.length || ast.temps) { - push(` -`, 0 /* Start */); - newline(); - } - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); - } - deindent(); - push(`}`); - return { - ast, - code: context.code, - preamble: isSetupInlined ? preambleContext.code : ``, - map: context.map ? context.map.toJSON() : void 0 - }; -} -function genFunctionPreamble(ast, context) { - const { - ssr, - prefixIdentifiers, - push, - newline, - runtimeModuleName, - runtimeGlobalName, - ssrRuntimeModuleName - } = context; - const VueBinding = ssr ? `require(${JSON.stringify(runtimeModuleName)})` : runtimeGlobalName; - const helpers = Array.from(ast.helpers); - if (helpers.length > 0) { - if (prefixIdentifiers) { - push( - `const { ${helpers.map(aliasHelper).join(", ")} } = ${VueBinding} -`, - -1 /* End */ - ); - } else { - push(`const _Vue = ${VueBinding} -`, -1 /* End */); - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); - push(`const { ${staticHelpers} } = _Vue -`, -1 /* End */); - } - } - } - if (ast.ssrHelpers && ast.ssrHelpers.length) { - push( - `const { ${ast.ssrHelpers.map(aliasHelper).join(", ")} } = require("${ssrRuntimeModuleName}") -`, - -1 /* End */ - ); - } - genHoists(ast.hoists, context); - newline(); - push(`return `); -} -function genModulePreamble(ast, context, genScopeId, inline) { - const { - push, - newline, - optimizeImports, - runtimeModuleName, - ssrRuntimeModuleName - } = context; - if (ast.helpers.size) { - const helpers = Array.from(ast.helpers); - if (optimizeImports) { - push( - `import { ${helpers.map((s) => helperNameMap[s]).join(", ")} } from ${JSON.stringify(runtimeModuleName)} -`, - -1 /* End */ - ); - push( - ` -// Binding optimization for webpack code-split -const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(", ")} -`, - -1 /* End */ - ); - } else { - push( - `import { ${helpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from ${JSON.stringify(runtimeModuleName)} -`, - -1 /* End */ - ); - } - } - if (ast.ssrHelpers && ast.ssrHelpers.length) { - push( - `import { ${ast.ssrHelpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from "${ssrRuntimeModuleName}" -`, - -1 /* End */ - ); - } - if (ast.imports.length) { - genImports(ast.imports, context); - newline(); - } - genHoists(ast.hoists, context); - newline(); - if (!inline) { - push(`export `); - } -} -function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper( - type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE - ); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - const maybeSelfReference = id.endsWith("__self"); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push( - `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` - ); - if (i < assets.length - 1) { - newline(); - } - } -} -function genHoists(hoists, context) { - if (!hoists.length) { - return; - } - context.pure = true; - const { push, newline } = context; - newline(); - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - push(`const _hoisted_${i + 1} = `); - genNode(exp, context); - newline(); - } - } - context.pure = false; -} -function genImports(importsOptions, context) { - if (!importsOptions.length) { - return; - } - importsOptions.forEach((imports) => { - context.push(`import `); - genNode(imports.exp, context); - context.push(` from '${imports.path}'`); - context.newline(); - }); -} -function isText(n) { - return isString$1(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; -} -function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || nodes.some((n) => isArray$3(n) || !isText(n)); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); -} -function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (isString$1(node)) { - push(node, -3 /* Unknown */); - } else if (isArray$3(node)) { - genNodeListAsArray(node, context); - } else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(","); - newline(); - } else { - comma && push(", "); - } - } - } -} -function genNode(node, context) { - if (isString$1(node)) { - context.push(node, -3 /* Unknown */); - return; - } - if (isSymbol$1(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1: - case 9: - case 11: - assert( - node.codegenNode != null, - `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` - ); - genNode(node.codegenNode, context); - break; - case 2: - genText(node, context); - break; - case 4: - genExpression(node, context); - break; - case 5: - genInterpolation(node, context); - break; - case 12: - genNode(node.codegenNode, context); - break; - case 8: - genCompoundExpression(node, context); - break; - case 3: - genComment(node, context); - break; - case 13: - genVNodeCall(node, context); - break; - case 14: - genCallExpression(node, context); - break; - case 15: - genObjectExpression(node, context); - break; - case 17: - genArrayExpression(node, context); - break; - case 18: - genFunctionExpression(node, context); - break; - case 19: - genConditionalExpression(node, context); - break; - case 20: - genCacheExpression(node, context); - break; - case 21: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22: - genTemplateLiteral(node, context); - break; - case 23: - genIfStatement(node, context); - break; - case 24: - genAssignmentExpression(node, context); - break; - case 25: - genSequenceExpression(node, context); - break; - case 26: - genReturnStatement(node, context); - break; - /* v8 ignore start */ - case 10: - break; - default: - { - assert(false, `unhandled codegen node type: ${node.type}`); - const exhaustiveCheck = node; - return exhaustiveCheck; - } - } -} -function genText(node, context) { - context.push(JSON.stringify(node.content), -3 /* Unknown */, node); -} -function genExpression(node, context) { - const { content, isStatic } = node; - context.push( - isStatic ? JSON.stringify(content) : content, - -3 /* Unknown */, - node - ); -} -function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); -} -function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString$1(child)) { - context.push(child, -3 /* Unknown */); - } else { - genNode(child, context); - } - } -} -function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } else if (node.isStatic) { - const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); - push(text, -2 /* None */, node); - } else { - push(`[${node.content}]`, -3 /* Unknown */, node); - } -} -function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push( - `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, - -3 /* Unknown */, - node - ); -} -function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent - } = node; - let patchFlagString; - if (patchFlag) { - { - if (patchFlag < 0) { - patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; - } else { - const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); - patchFlagString = patchFlag + ` /* ${flagNames} */`; - } - } - } - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, -2 /* None */, node); - genNodeList( - genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), - context - ); - push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } -} -function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) break; - } - return args.slice(0, i + 1).map((arg) => arg || `null`); -} -function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = isString$1(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, -2 /* None */, node); - genNodeList(node.arguments, context); - push(`)`); -} -function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, -2 /* None */, node); - return; - } - const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - genExpressionAsPropertyKey(key, context); - push(`: `); - genNode(value, context); - if (i < properties.length - 1) { - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); -} -function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); -} -function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - push(`_${helperNameMap[WITH_CTX]}(`); - } - push(`(`, -2 /* None */, node); - if (isArray$3(params)) { - genNodeList(params, context); - } else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (isArray$3(returns)) { - genNodeListAsArray(returns, context); - } else { - genNode(returns, context); - } - } else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - push(`)`); - } -} -function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); - context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); - context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent( - true - /* without newline */ - ); -} -function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - const { needPauseTracking, needArraySpread } = node; - if (needArraySpread) { - push(`[...(`); - } - push(`_cache[${node.index}] || (`); - if (needPauseTracking) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1`); - if (node.inVOnce) push(`, true`); - push(`),`); - newline(); - push(`(`); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (needPauseTracking) { - push(`).cacheIndex = ${node.index},`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); - } - push(`)`); - if (needArraySpread) { - push(`)]`); - } -} -function genTemplateLiteral(node, context) { - const { push, indent, deindent } = context; - push("`"); - const l = node.elements.length; - const multilines = l > 3; - for (let i = 0; i < l; i++) { - const e = node.elements[i]; - if (isString$1(e)) { - push(e.replace(/(`|\$|\\)/g, "\\$1"), -3 /* Unknown */); - } else { - push("${"); - if (multilines) indent(); - genNode(e, context); - if (multilines) deindent(); - push("}"); - } - } - push("`"); -} -function genIfStatement(node, context) { - const { push, indent, deindent } = context; - const { test, consequent, alternate } = node; - push(`if (`); - genNode(test, context); - push(`) {`); - indent(); - genNode(consequent, context); - deindent(); - push(`}`); - if (alternate) { - push(` else `); - if (alternate.type === 23) { - genIfStatement(alternate, context); - } else { - push(`{`); - indent(); - genNode(alternate, context); - deindent(); - push(`}`); - } - } -} -function genAssignmentExpression(node, context) { - genNode(node.left, context); - context.push(` = `); - genNode(node.right, context); -} -function genSequenceExpression(node, context) { - context.push(`(`); - genNodeList(node.expressions, context); - context.push(`)`); -} -function genReturnStatement({ returns }, context) { - context.push(`return `); - if (isArray$3(returns)) { - genNodeListAsArray(returns, context); - } else { - genNode(returns, context); - } -} - -const isLiteralWhitelisted = /* @__PURE__ */ makeMap("true,false,null,this"); -const transformExpression = (node, context) => { - if (node.type === 5) { - node.content = processExpression( - node.content, - context - ); - } else if (node.type === 1) { - const memo = findDir(node, "memo"); - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - if (dir.type === 7 && dir.name !== "for") { - const exp = dir.exp; - const arg = dir.arg; - if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) - !(memo && arg && arg.type === 4 && arg.content === "key")) { - dir.exp = processExpression( - exp, - context, - // slot args must be processed as function params - dir.name === "slot" - ); - } - if (arg && arg.type === 4 && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } - } - } -}; -function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { - if (!context.prefixIdentifiers || !node.content.trim()) { - return node; - } - const { inline, bindingMetadata } = context; - const rewriteIdentifier = (raw, parent, id) => { - const type = hasOwn(bindingMetadata, raw) && bindingMetadata[raw]; - if (inline) { - const isAssignmentLVal = parent && parent.type === "AssignmentExpression" && parent.left === id; - const isUpdateArg = parent && parent.type === "UpdateExpression" && parent.argument === id; - const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack); - const isNewExpression = parent && isInNewExpression(parentStack); - const wrapWithUnref = (raw2) => { - const wrapped = `${context.helperString(UNREF)}(${raw2})`; - return isNewExpression ? `(${wrapped})` : wrapped; - }; - if (isConst(type) || type === "setup-reactive-const" || localVars[raw]) { - return raw; - } else if (type === "setup-ref") { - return `${raw}.value`; - } else if (type === "setup-maybe-ref") { - return isAssignmentLVal || isUpdateArg || isDestructureAssignment ? `${raw}.value` : wrapWithUnref(raw); - } else if (type === "setup-let") { - if (isAssignmentLVal) { - const { right: rVal, operator } = parent; - const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1); - const rExpString = stringifyExpression( - processExpression( - createSimpleExpression(rExp, false), - context, - false, - false, - knownIds - ) - ); - return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore -` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`; - } else if (isUpdateArg) { - id.start = parent.start; - id.end = parent.end; - const { prefix: isPrefix, operator } = parent; - const prefix = isPrefix ? operator : ``; - const postfix = isPrefix ? `` : operator; - return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore -` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`; - } else if (isDestructureAssignment) { - return raw; - } else { - return wrapWithUnref(raw); - } - } else if (type === "props") { - return genPropsAccessExp(raw); - } else if (type === "props-aliased") { - return genPropsAccessExp(bindingMetadata.__propsAliases[raw]); - } - } else { - if (type && type.startsWith("setup") || type === "literal-const") { - return `$setup.${raw}`; - } else if (type === "props-aliased") { - return `$props['${bindingMetadata.__propsAliases[raw]}']`; - } else if (type) { - return `$${type}.${raw}`; - } - } - return `_ctx.${raw}`; - }; - const rawExp = node.content; - let ast = node.ast; - if (ast === false) { - return node; - } - if (ast === null || !ast && isSimpleIdentifier(rawExp)) { - const isScopeVarReference = context.identifiers[rawExp]; - const isAllowedGlobal = isGloballyAllowed(rawExp); - const isLiteral = isLiteralWhitelisted(rawExp); - if (!asParams && !isScopeVarReference && !isLiteral && (!isAllowedGlobal || bindingMetadata[rawExp])) { - if (isConst(bindingMetadata[rawExp])) { - node.constType = 1; - } - node.content = rewriteIdentifier(rawExp); - } else if (!isScopeVarReference) { - if (isLiteral) { - node.constType = 3; - } else { - node.constType = 2; - } - } - return node; - } - if (!ast) { - const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`; - try { - ast = libExports.parseExpression(source, { - sourceType: "module", - plugins: context.expressionPlugins - }); - } catch (e) { - context.onError( - createCompilerError( - 45, - node.loc, - void 0, - e.message - ) - ); - return node; - } - } - const ids = []; - const parentStack = []; - const knownIds = Object.create(context.identifiers); - walkIdentifiers( - ast, - (node2, parent, _, isReferenced, isLocal) => { - if (isStaticPropertyKey(node2, parent)) { - return; - } - const needPrefix = isReferenced && canPrefix(node2); - if (needPrefix && !isLocal) { - if (isStaticProperty(parent) && parent.shorthand) { - node2.prefix = `${node2.name}: `; - } - node2.name = rewriteIdentifier(node2.name, parent, node2); - ids.push(node2); - } else { - if (!(needPrefix && isLocal) && (!parent || parent.type !== "CallExpression" && parent.type !== "NewExpression" && parent.type !== "MemberExpression")) { - node2.isConstant = true; - } - ids.push(node2); - } - }, - true, - // invoke on ALL identifiers - parentStack, - knownIds - ); - const children = []; - ids.sort((a, b) => a.start - b.start); - ids.forEach((id, i) => { - const start = id.start - 1; - const end = id.end - 1; - const last = ids[i - 1]; - const leadingText = rawExp.slice(last ? last.end - 1 : 0, start); - if (leadingText.length || id.prefix) { - children.push(leadingText + (id.prefix || ``)); - } - const source = rawExp.slice(start, end); - children.push( - createSimpleExpression( - id.name, - false, - { - start: advancePositionWithClone(node.loc.start, source, start), - end: advancePositionWithClone(node.loc.start, source, end), - source - }, - id.isConstant ? 3 : 0 - ) - ); - if (i === ids.length - 1 && end < rawExp.length) { - children.push(rawExp.slice(end)); - } - }); - let ret; - if (children.length) { - ret = createCompoundExpression(children, node.loc); - ret.ast = ast; - } else { - ret = node; - ret.constType = 3; - } - ret.identifiers = Object.keys(knownIds); - return ret; -} -function canPrefix(id) { - if (isGloballyAllowed(id.name)) { - return false; - } - if (id.name === "require") { - return false; - } - return true; -} -function stringifyExpression(exp) { - if (isString$1(exp)) { - return exp; - } else if (exp.type === 4) { - return exp.content; - } else { - return exp.children.map(stringifyExpression).join(""); - } -} -function isConst(type) { - return type === "setup-const" || type === "literal-const"; -} - -const transformIf = createStructuralDirectiveTransform( - /^(if|else|else-if)$/, - (node, dir, context) => { - return processIf(node, dir, context, (ifNode, branch, isRoot) => { - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9) { - key += sibling.branches.length; - } - } - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch( - branch, - key, - context - ); - } else { - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch( - branch, - key + ifNode.branches.length - 1, - context - ); - } - }; - }); - } -); -function processIf(node, dir, context, processCodegen) { - if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError( - createCompilerError(28, dir.loc) - ); - dir.exp = createSimpleExpression(`true`, false, loc); - } - if (context.prefixIdentifiers && dir.exp) { - dir.exp = processExpression(dir.exp, context); - } - if (dir.name === "if") { - const branch = createIfBranch(node, dir); - const ifNode = { - type: 9, - loc: cloneLoc(node.loc), - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); - } - } else { - const siblings = context.parent.children; - const comments = []; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if (sibling && sibling.type === 3) { - context.removeNode(sibling); - comments.unshift(sibling); - continue; - } - if (sibling && sibling.type === 2 && !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9) { - if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { - context.onError( - createCompilerError(30, node.loc) - ); - } - context.removeNode(); - const branch = createIfBranch(node, dir); - if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> - !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { - branch.children = [...comments, ...branch.children]; - } - { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError( - createCompilerError( - 29, - branch.userKey.loc - ) - ); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - traverseNode(branch, context); - if (onExit) onExit(); - context.currentNode = null; - } else { - context.onError( - createCompilerError(30, node.loc) - ); - } - break; - } - } -} -function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3; - return { - type: 10, - loc: node.loc, - condition: dir.name === "else" ? void 0 : dir.exp, - children: isTemplateIf && !findDir(node, "for") ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; -} -function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression( - branch.condition, - createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - '"v-if"' , - "true" - ]) - ); - } else { - return createChildrenCodegenNode(branch, keyIndex, context); - } -} -function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty( - `key`, - createSimpleExpression( - `${keyIndex}`, - false, - locStub, - 2 - ) - ); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11) { - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } else { - let patchFlag = 64; - if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { - patchFlag |= 2048; - } - return createVNodeCall( - context, - helper(FRAGMENT), - createObjectExpression([keyProperty]), - children, - patchFlag, - void 0, - void 0, - true, - false, - false, - branch.loc - ); - } - } else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - if (vnodeCall.type === 13) { - convertToBlock(vnodeCall, context); - } - injectProp(vnodeCall, keyProperty, context); - return ret; - } -} -function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; - } - if (a.type === 6) { - if (a.value.content !== b.value.content) { - return false; - } - } else { - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { - return false; - } - } - return true; -} -function getParentCondition(node) { - while (true) { - if (node.type === 19) { - if (node.alternate.type === 19) { - node = node.alternate; - } else { - return node; - } - } else if (node.type === 20) { - node = node.value; - } - } -} - -const transformBind = (dir, _node, context) => { - const { modifiers, loc } = dir; - const arg = dir.arg; - let { exp } = dir; - if (exp && exp.type === 4 && !exp.content.trim()) { - { - context.onError( - createCompilerError(34, loc) - ); - return { - props: [ - createObjectProperty(arg, createSimpleExpression("", true, loc)) - ] - }; - } - } - if (!exp) { - if (arg.type !== 4 || !arg.isStatic) { - context.onError( - createCompilerError( - 52, - arg.loc - ) - ); - return { - props: [ - createObjectProperty(arg, createSimpleExpression("", true, loc)) - ] - }; - } - transformBindShorthand(dir, context); - exp = dir.exp; - } - if (arg.type !== 4) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); - } else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; - } - if (modifiers.some((mod) => mod.content === "camel")) { - if (arg.type === 4) { - if (arg.isStatic) { - arg.content = camelize(arg.content); - } else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } - } - if (!context.inSSR) { - if (modifiers.some((mod) => mod.content === "prop")) { - injectPrefix(arg, "."); - } - if (modifiers.some((mod) => mod.content === "attr")) { - injectPrefix(arg, "^"); - } - } - return { - props: [createObjectProperty(arg, exp)] - }; -}; -const transformBindShorthand = (dir, context) => { - const arg = dir.arg; - const propName = camelize(arg.content); - dir.exp = createSimpleExpression(propName, false, arg.loc); - { - dir.exp = processExpression(dir.exp, context); - } -}; -const injectPrefix = (arg, prefix) => { - if (arg.type === 4) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); - } -}; - -const transformFor = createStructuralDirectiveTransform( - "for", - (node, dir, context) => { - const { helper, removeHelper } = context; - return processFor(node, dir, context, (forNode) => { - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, "memo"); - const keyProp = findProp(node, `key`, false, true); - const isDirKey = keyProp && keyProp.type === 7; - if (isDirKey && !keyProp.exp) { - transformBindShorthand(keyProp, context); - } - let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); - if (memo && keyExp && isDirKey) { - { - keyProp.exp = keyExp = processExpression( - keyExp, - context - ); - } - } - const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; - if (isTemplate) { - if (memo) { - memo.exp = processExpression( - memo.exp, - context - ); - } - if (keyProperty && keyProp.type !== 6) { - keyProperty.value = processExpression( - keyProperty.value, - context - ); - } - } - const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; - const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; - forNode.codegenNode = createVNodeCall( - context, - helper(FRAGMENT), - void 0, - renderExp, - fragmentFlag, - void 0, - void 0, - true, - !isStableFragment, - false, - node.loc - ); - return () => { - let childBlock; - const { children } = forNode; - if (isTemplate) { - node.children.some((c) => { - if (c.type === 1) { - const key = findProp(c, "key"); - if (key) { - context.onError( - createCompilerError( - 33, - key.loc - ) - ); - return true; - } - } - }); - } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; - const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; - if (slotOutlet) { - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - } else if (needFragmentWrapper) { - childBlock = createVNodeCall( - context, - helper(FRAGMENT), - keyProperty ? createObjectExpression([keyProperty]) : void 0, - node.children, - 64, - void 0, - void 0, - true, - void 0, - false - ); - } else { - childBlock = children[0].codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - removeHelper(OPEN_BLOCK); - removeHelper( - getVNodeBlockHelper(context.inSSR, childBlock.isComponent) - ); - } else { - removeHelper( - getVNodeHelper(context.inSSR, childBlock.isComponent) - ); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression( - createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ]) - ); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...keyExp ? [` && _cached.key === `, keyExp] : [], - ` && ${context.helperString( - IS_MEMO_SAME - )}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push( - loop, - createSimpleExpression(`_cache`), - createSimpleExpression(String(context.cached.length)) - ); - context.cached.push(null); - } else { - renderExp.arguments.push( - createFunctionExpression( - createForLoopParams(forNode.parseResult), - childBlock, - true - ) - ); - } - }; - }); - } -); -function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError( - createCompilerError(31, dir.loc) - ); - return; - } - const parseResult = dir.forParseResult; - if (!parseResult) { - context.onError( - createCompilerError(32, dir.loc) - ); - return; - } - finalizeForParseResult(parseResult, context); - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - scopes.vFor++; - if (context.prefixIdentifiers) { - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - } - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (context.prefixIdentifiers) { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - } - if (onExit) onExit(); - }; -} -function finalizeForParseResult(result, context) { - if (result.finalized) return; - if (context.prefixIdentifiers) { - result.source = processExpression( - result.source, - context - ); - if (result.key) { - result.key = processExpression( - result.key, - context, - true - ); - } - if (result.index) { - result.index = processExpression( - result.index, - context, - true - ); - } - if (result.value) { - result.value = processExpression( - result.value, - context, - true - ); - } - } - result.finalized = true; -} -function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); -} -function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) break; - } - return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); -} - -const defaultFallback = createSimpleExpression(`undefined`, false); -const trackSlotScopes = (node, context) => { - if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { - const vSlot = findDir(node, "slot"); - if (vSlot) { - const slotProps = vSlot.exp; - if (context.prefixIdentifiers) { - slotProps && context.addIdentifiers(slotProps); - } - context.scopes.vSlot++; - return () => { - if (context.prefixIdentifiers) { - slotProps && context.removeIdentifiers(slotProps); - } - context.scopes.vSlot--; - }; - } - } -}; -const trackVForSlotScopes = (node, context) => { - let vFor; - if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { - const result = vFor.forParseResult; - if (result) { - finalizeForParseResult(result, context); - const { value, key, index } = result; - const { addIdentifiers, removeIdentifiers } = context; - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - return () => { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - }; - } - } -}; -const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( - props, - children, - false, - true, - children.length ? children[0].loc : loc -); -function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - if (!context.ssr && context.prefixIdentifiers) { - hasDynamicSlots = hasScopeRef(node, context.identifiers); - } - const onComponentSlot = findDir(node, "slot", true); - if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push( - createObjectProperty( - arg || createSimpleExpression("default", true), - buildSlotFn(exp, void 0, children, loc) - ) - ); - } - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = /* @__PURE__ */ new Set(); - let conditionalBranchIndex = 0; - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { - if (slotElement.type !== 3) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - context.onError( - createCompilerError(37, slotDir.loc) - ); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { - arg: slotName = createSimpleExpression(`default`, true), - exp: slotProps, - loc: dirLoc - } = slotDir; - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } else { - hasDynamicSlots = true; - } - const vFor = findDir(slotElement, "for"); - const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); - let vIf; - let vElse; - if (vIf = findDir(slotElement, "if")) { - hasDynamicSlots = true; - dynamicSlots.push( - createConditionalExpression( - vIf.exp, - buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), - defaultFallback - ) - ); - } else if (vElse = findDir( - slotElement, - /^else(-if)?$/, - true - /* allowEmpty */ - )) { - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp ? createConditionalExpression( - vElse.exp, - buildDynamicSlot( - slotName, - slotFunction, - conditionalBranchIndex++ - ), - defaultFallback - ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); - } else { - context.onError( - createCompilerError(30, vElse.loc) - ); - } - } else if (vFor) { - hasDynamicSlots = true; - const parseResult = vFor.forParseResult; - if (parseResult) { - finalizeForParseResult(parseResult, context); - dynamicSlots.push( - createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression( - createForLoopParams(parseResult), - buildDynamicSlot(slotName, slotFunction), - true - ) - ]) - ); - } else { - context.onError( - createCompilerError( - 32, - vFor.loc - ) - ); - } - } else { - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError( - createCompilerError( - 38, - dirLoc - ) - ); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === "default") { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } - } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children2) => { - const fn = buildSlotFn(props, void 0, children2, loc); - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - slotsProperties.push(buildDefaultSlotProperty(void 0, children)); - } else if (implicitDefaultChildren.length && // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { - if (hasNamedDefaultSlot) { - context.onError( - createCompilerError( - 39, - implicitDefaultChildren[0].loc - ) - ); - } else { - slotsProperties.push( - buildDefaultSlotProperty(void 0, implicitDefaultChildren) - ); - } - } - } - const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; - let slots = createObjectExpression( - slotsProperties.concat( - createObjectProperty( - `_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression( - slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), - false - ) - ) - ), - loc - ); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots - }; -} -function buildDynamicSlot(name, fn, index) { - const props = [ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) - ]; - if (index != null) { - props.push( - createObjectProperty(`key`, createSimpleExpression(String(index), true)) - ); - } - return createObjectExpression(props); -} -function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1: - if (child.tagType === 2 || hasForwardedSlots(child.children)) { - return true; - } - break; - case 9: - if (hasForwardedSlots(child.branches)) return true; - break; - case 10: - case 11: - if (hasForwardedSlots(child.children)) return true; - break; - } - } - return false; -} -function isNonWhitespaceContent(node) { - if (node.type !== 2 && node.type !== 12) - return true; - return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); -} - -const directiveImportMap = /* @__PURE__ */ new WeakMap(); -const transformElement = (node, context) => { - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { - return; - } - const { tag, props } = node; - const isComponent = node.tagType === 1; - let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; - const isDynamicComponent = isObject$2(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = ( - // dynamic component may resolve to plain elements - isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === "svg" || tag === "foreignObject" || tag === "math") - ); - if (props.length > 0) { - const propsBuildResult = buildProps( - node, - context, - void 0, - isComponent, - isDynamicComponent - ); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = directives && directives.length ? createArrayExpression( - directives.map((dir) => buildDirectiveArgs(dir, context)) - ) : void 0; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } - } - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - shouldUseBlock = true; - patchFlag |= 1024; - if (node.children.length > 1) { - context.onError( - createCompilerError(46, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: "" - }) - ); - } - } - const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024; - } - } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - const hasDynamicTextChild = type === 5 || type === 8; - if (hasDynamicTextChild && getConstantType(child, context) === 0) { - patchFlag |= 1; - } - if (hasDynamicTextChild || type === 2) { - vnodeChildren = child; - } else { - vnodeChildren = node.children; - } - } else { - vnodeChildren = node.children; - } - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } - node.codegenNode = createVNodeCall( - context, - vnodeTag, - vnodeProps, - vnodeChildren, - patchFlag === 0 ? void 0 : patchFlag, - vnodeDynamicProps, - vnodeDirectives, - !!shouldUseBlock, - false, - isComponent, - node.loc - ); - }; -}; -function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp( - node, - "is", - false, - true - /* allow empty */ - ); - if (isProp) { - if (isExplicitDynamic || false) { - let exp; - if (isProp.type === 6) { - exp = isProp.value && createSimpleExpression(isProp.value.content, true); - } else { - exp = isProp.exp; - if (!exp) { - exp = createSimpleExpression(`is`, false, isProp.arg.loc); - { - exp = isProp.exp = processExpression(exp, context); - } - } - } - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { - tag = isProp.value.content.slice(4); - } - } - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - if (!ssr) context.helper(builtIn); - return builtIn; - } - { - const fromSetup = resolveSetupReference(tag, context); - if (fromSetup) { - return fromSetup; - } - const dotIndex = tag.indexOf("."); - if (dotIndex > 0) { - const ns = resolveSetupReference(tag.slice(0, dotIndex), context); - if (ns) { - return ns + tag.slice(dotIndex); - } - } - } - if (context.selfName && capitalize(camelize(tag)) === context.selfName) { - context.helper(RESOLVE_COMPONENT); - context.components.add(tag + `__self`); - return toValidAssetId(tag, `component`); - } - context.helper(RESOLVE_COMPONENT); - context.components.add(tag); - return toValidAssetId(tag, `component`); -} -function resolveSetupReference(name, context) { - const bindings = context.bindingMetadata; - if (!bindings || bindings.__isScriptSetup === false) { - return; - } - const camelName = camelize(name); - const PascalName = capitalize(camelName); - const checkType = (type) => { - if (bindings[name] === type) { - return name; - } - if (bindings[camelName] === type) { - return camelName; - } - if (bindings[PascalName] === type) { - return PascalName; - } - }; - const fromConst = checkType("setup-const") || checkType("setup-reactive-const") || checkType("literal-const"); - if (fromConst) { - return context.inline ? ( - // in inline mode, const setup bindings (e.g. imports) can be used as-is - fromConst - ) : `$setup[${JSON.stringify(fromConst)}]`; - } - const fromMaybeRef = checkType("setup-let") || checkType("setup-ref") || checkType("setup-maybe-ref"); - if (fromMaybeRef) { - return context.inline ? ( - // setup scope bindings that may be refs need to be unrefed - `${context.helperString(UNREF)}(${fromMaybeRef})` - ) : `$setup[${JSON.stringify(fromMaybeRef)}]`; - } - const fromProps = checkType("props"); - if (fromProps) { - return `${context.helperString(UNREF)}(${context.inline ? "__props" : "$props"}[${JSON.stringify(fromProps)}])`; - } -} -function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const pushMergeArg = (arg) => { - if (properties.length) { - mergeArgs.push( - createObjectExpression(dedupeProperties(properties), elementLoc) - ); - properties = []; - } - if (arg) mergeArgs.push(arg); - }; - const pushRefVForMarker = () => { - if (context.scopes.vFor > 0) { - properties.push( - createObjectProperty( - createSimpleExpression("ref_for", true), - createSimpleExpression("true") - ) - ); - } - }; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = isOn(name); - if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== "onclick" && // omit v-model handlers - name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks - !isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && isReservedProp(name)) { - hasVnodeHook = true; - } - if (isEventHandler && value.type === 14) { - value = value.arguments[0]; - } - if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { - return; - } - if (name === "ref") { - hasRef = true; - } else if (name === "class") { - hasClassBinding = true; - } else if (name === "style") { - hasStyleBinding = true; - } else if (name !== "key" && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - } else { - hasDynamicKeys = true; - } - }; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 6) { - const { loc, name, nameLoc, value } = prop; - let isStatic = true; - if (name === "ref") { - hasRef = true; - pushRefVForMarker(); - if (value && context.inline) { - const binding = context.bindingMetadata[value.content]; - if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") { - isStatic = false; - properties.push( - createObjectProperty( - createSimpleExpression("ref_key", true), - createSimpleExpression(value.content, true, value.loc) - ) - ); - } - } - } - if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || false)) { - continue; - } - properties.push( - createObjectProperty( - createSimpleExpression(name, true, nameLoc), - createSimpleExpression( - value ? value.content : "", - isStatic, - value ? value.loc : loc - ) - ) - ); - } else { - const { name, arg, exp, loc, modifiers } = prop; - const isVBind = name === "bind"; - const isVOn = name === "on"; - if (name === "slot") { - if (!isComponent) { - context.onError( - createCompilerError(40, loc) - ); - } - continue; - } - if (name === "once" || name === "memo") { - continue; - } - if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || false)) { - continue; - } - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked - // before children - isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") - ) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, "ref")) { - pushRefVForMarker(); - } - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (isVBind) { - pushRefVForMarker(); - pushMergeArg(); - mergeArgs.push(exp); - } else { - pushMergeArg({ - type: 14, - loc, - callee: context.helper(TO_HANDLERS), - arguments: isComponent ? [exp] : [exp, `true`] - }); - } - } else { - context.onError( - createCompilerError( - isVBind ? 34 : 35, - loc - ) - ); - } - continue; - } - if (isVBind && modifiers.some((mod) => mod.content === "prop")) { - patchFlag |= 32; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - const { props: props2, needRuntime } = directiveTransform(prop, node, context); - !ssr && props2.forEach(analyzePatchFlag); - if (isVOn && arg && !isStaticExp(arg)) { - pushMergeArg(createObjectExpression(props2, elementLoc)); - } else { - properties.push(...props2); - } - if (needRuntime) { - runtimeDirectives.push(prop); - if (isSymbol$1(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } else if (!isBuiltInDirective(name)) { - runtimeDirectives.push(prop); - if (hasChildren) { - shouldUseBlock = true; - } - } - } - } - let propsExpression = void 0; - if (mergeArgs.length) { - pushMergeArg(); - if (mergeArgs.length > 1) { - propsExpression = createCallExpression( - context.helper(MERGE_PROPS), - mergeArgs, - elementLoc - ); - } else { - propsExpression = mergeArgs[0]; - } - } else if (properties.length) { - propsExpression = createObjectExpression( - dedupeProperties(properties), - elementLoc - ); - } - if (hasDynamicKeys) { - patchFlag |= 16; - } else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2; - } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4; - } - if (dynamicPropNames.length) { - patchFlag |= 8; - } - if (hasHydrationEventBinding) { - patchFlag |= 32; - } - } - if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512; - } - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15: - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === "class") { - classKeyIndex = i; - } else if (key.content === "style") { - styleKeyIndex = i; - } - } else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression( - context.helper(NORMALIZE_CLASS), - [classProp.value] - ); - } - if (styleProp && // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17)) { - styleProp.value = createCallExpression( - context.helper(NORMALIZE_STYLE), - [styleProp.value] - ); - } - } else { - propsExpression = createCallExpression( - context.helper(NORMALIZE_PROPS), - [propsExpression] - ); - } - break; - case 14: - break; - default: - propsExpression = createCallExpression( - context.helper(NORMALIZE_PROPS), - [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ] - ); - break; - } - } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; -} -function dedupeProperties(properties) { - const knownProps = /* @__PURE__ */ new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - if (prop.key.type === 8 || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === "style" || name === "class" || isOn(name)) { - mergeAsArray(existing, prop); - } - } else { - knownProps.set(name, prop); - deduped.push(prop); - } - } - return deduped; -} -function mergeAsArray(existing, incoming) { - if (existing.value.type === 17) { - existing.value.elements.push(incoming.value); - } else { - existing.value = createArrayExpression( - [existing.value, incoming.value], - existing.loc - ); - } -} -function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - dirArgs.push(context.helperString(runtime)); - } else { - const fromSetup = resolveSetupReference("v-" + dir.name, context); - if (fromSetup) { - dirArgs.push(fromSetup); - } else { - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } - } - const { loc } = dir; - if (dir.exp) dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); - } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push( - createObjectExpression( - dir.modifiers.map( - (modifier) => createObjectProperty(modifier, trueExpression) - ), - loc - ) - ); - } - return createArrayExpression(dirArgs, dir.loc); -} -function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) propsNamesString += ", "; - } - return propsNamesString + `]`; -} -function isComponentTag(tag) { - return tag === "component" || tag === "Component"; -} - -const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - "{}", - "undefined", - "true" - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); - node.codegenNode = createCallExpression( - context.helper(RENDER_SLOT), - slotArgs, - loc - ); - } -}; -function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = void 0; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - if (p.value) { - if (p.name === "name") { - slotName = JSON.stringify(p.value.content); - } else { - p.name = camelize(p.name); - nonNameProps.push(p); - } - } - } else { - if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { - if (p.exp) { - slotName = p.exp; - } else if (p.arg && p.arg.type === 4) { - const name = camelize(p.arg.content); - slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); - { - slotName = p.exp = processExpression(p.exp, context); - } - } - } else { - if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { - p.arg.content = camelize(p.arg.content); - } - nonNameProps.push(p); - } - } - } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps( - node, - context, - nonNameProps, - false, - false - ); - slotProps = props; - if (directives.length) { - context.onError( - createCompilerError( - 36, - directives[0].loc - ) - ); - } - } - return { - slotName, - slotProps - }; -} - -const transformOn$1 = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35, loc)); - } - let eventName; - if (arg.type === 4) { - if (arg.isStatic) { - let rawName = arg.content; - if (rawName.startsWith("vnode")) { - context.onError(createCompilerError(51, arg.loc)); - } - if (rawName.startsWith("vue:")) { - rawName = `vnode-${rawName.slice(4)}`; - } - const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( - // for non-element and vnode lifecycle event listeners, auto convert - // it to camelCase. See issue #2249 - toHandlerKey(camelize(rawName)) - ) : ( - // preserve case for plain element listeners that have uppercase - // letters, as these may be custom elements' custom events - `on:${rawName}` - ); - eventName = createSimpleExpression(eventString, true, arg.loc); - } else { - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); - } - } else { - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); - } - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = void 0; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp, context); - const isInlineStatement = !(isMemberExp || isFnExpression(exp, context)); - const hasMultipleStatements = exp.content.includes(`;`); - if (context.prefixIdentifiers) { - isInlineStatement && context.addIdentifiers(`$event`); - exp = dir.exp = processExpression( - exp, - context, - false, - hasMultipleStatements - ); - isInlineStatement && context.removeIdentifiers(`$event`); - shouldCache = context.cacheHandlers && // unnecessary to cache inside v-once - !context.inVOnce && // runtime constants don't need to be cached - // (this is analyzed by compileScript in SFC <script setup>) - !(exp.type === 4 && exp.constType > 0) && // #1541 bail if this is a member exp handler passed to a component - - // we need to use the original function to preserve arity, - // e.g. <transition> relies on checking cb.length to determine - // transition end handling. Inline function is ok since its arity - // is preserved even when cached. - !(isMemberExp && node.tagType === 1) && // bail if the function references closure variables (v-for, v-slot) - // it must be passed fresh to avoid stale values. - !hasScopeRef(exp, context.identifiers); - if (shouldCache && isMemberExp) { - if (exp.type === 4) { - exp.content = `${exp.content} && ${exp.content}(...args)`; - } else { - exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`]; - } - } - } - if (isInlineStatement || shouldCache && isMemberExp) { - exp = createCompoundExpression([ - `${isInlineStatement ? context.isTS ? `($event: any)` : `$event` : `${context.isTS ? ` -//@ts-ignore -` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty( - eventName, - exp || createSimpleExpression(`() => {}`, false, loc) - ) - ] - }; - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - ret.props[0].value = context.cache(ret.props[0].value); - } - ret.props.forEach((p) => p.key.isHandlerKey = true); - return ret; -}; - -const transformText = (node, context) => { - if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { - return () => { - const children = node.children; - let currentContainer = void 0; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText$1(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText$1(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression( - [child], - child.loc - ); - } - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } else { - currentContainer = void 0; - break; - } - } - } - } - if (!hasText || // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find( - (p) => p.type === 7 && !context.directiveTransforms[p.name] - ) && // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - true)) { - return; - } - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText$1(child) || child.type === 8) { - const callArgs = []; - if (child.type !== 2 || child.content !== " ") { - callArgs.push(child); - } - if (!context.ssr && getConstantType(child, context) === 0) { - callArgs.push( - 1 + (` /* ${PatchFlagNames[1]} */` ) - ); - } - children[i] = { - type: 12, - content: child, - loc: child.loc, - codegenNode: createCallExpression( - context.helper(CREATE_TEXT), - callArgs - ) - }; - } - } - }; - } -}; - -const seen$1 = /* @__PURE__ */ new WeakSet(); -const transformOnce = (node, context) => { - if (node.type === 1 && findDir(node, "once", true)) { - if (seen$1.has(node) || context.inVOnce || context.inSSR) { - return; - } - seen$1.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache( - cur.codegenNode, - true, - true - ); - } - }; - } -}; - -const transformModel$1 = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError( - createCompilerError(41, dir.loc) - ); - return createTransformProps(); - } - const rawExp = exp.loc.source.trim(); - const expString = exp.type === 4 ? exp.content : rawExp; - const bindingType = context.bindingMetadata[rawExp]; - if (bindingType === "props" || bindingType === "props-aliased") { - context.onError(createCompilerError(44, exp.loc)); - return createTransformProps(); - } - const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref"); - if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) { - context.onError( - createCompilerError(42, exp.loc) - ); - return createTransformProps(); - } - if (context.prefixIdentifiers && isSimpleIdentifier(expString) && context.identifiers[expString]) { - context.onError( - createCompilerError(43, exp.loc) - ); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression("modelValue", true); - const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - if (maybeRef) { - if (bindingType === "setup-ref") { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - createSimpleExpression(rawExp, false, exp.loc), - `).value = $event)` - ]); - } else { - const altAssignment = bindingType === "setup-let" ? `${rawExp} = $event` : `null`; - assignmentExp = createCompoundExpression([ - `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`, - createSimpleExpression(rawExp, false, exp.loc), - `).value = $event : ${altAssignment})` - ]); - } - } else { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - if (context.prefixIdentifiers && !context.inVOnce && context.cacheHandlers && !hasScopeRef(exp, context.identifiers)) { - props[1].value = context.cache(props[1].value); - } - if (dir.modifiers.length && node.tagType === 1) { - const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); - const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; - props.push( - createObjectProperty( - modifiersKey, - createSimpleExpression( - `{ ${modifiers} }`, - false, - dir.loc, - 2 - ) - ) - ); - } - return createTransformProps(props); -}; -function createTransformProps(props = []) { - return { props }; -} - -const seen = /* @__PURE__ */ new WeakSet(); -const transformMemo = (node, context) => { - if (node.type === 1) { - const dir = findDir(node, "memo"); - if (!dir || seen.has(node)) { - return; - } - seen.add(node); - return () => { - const codegenNode = node.codegenNode || context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13) { - if (node.tagType !== 1) { - convertToBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(void 0, codegenNode), - `_cache`, - String(context.cached.length) - ]); - context.cached.push(null); - } - }; - } -}; - -function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...[], - ...prefixIdentifiers ? [ - // order is important - trackVForSlotScopes, - transformExpression - ] : [], - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn$1, - bind: transformBind, - model: transformModel$1 - } - ]; -} -function baseCompile(source, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === "module"; - const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode; - if (!prefixIdentifiers && options.cacheHandlers) { - onError(createCompilerError(49)); - } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(50)); - } - const resolvedOptions = extend({}, options, { - prefixIdentifiers - }); - const ast = isString$1(source) ? baseParse(source, resolvedOptions) : source; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers); - if (options.isTS) { - const { expressionPlugins } = options; - if (!expressionPlugins || !expressionPlugins.includes("typescript")) { - options.expressionPlugins = [...expressionPlugins || [], "typescript"]; - } - } - transform( - ast, - extend({}, resolvedOptions, { - nodeTransforms: [ - ...nodeTransforms, - ...options.nodeTransforms || [] - // user transforms - ], - directiveTransforms: extend( - {}, - directiveTransforms, - options.directiveTransforms || {} - // user transforms - ) - }) - ); - return generate(ast, resolvedOptions); -} - -const BindingTypes = { - "DATA": "data", - "PROPS": "props", - "PROPS_ALIASED": "props-aliased", - "SETUP_LET": "setup-let", - "SETUP_CONST": "setup-const", - "SETUP_REACTIVE_CONST": "setup-reactive-const", - "SETUP_MAYBE_REF": "setup-maybe-ref", - "SETUP_REF": "setup-ref", - "OPTIONS": "options", - "LITERAL_CONST": "literal-const" -}; - -const noopDirectiveTransform = () => ({ props: [] }); - -const V_MODEL_RADIO = Symbol(`vModelRadio` ); -const V_MODEL_CHECKBOX = Symbol( - `vModelCheckbox` -); -const V_MODEL_TEXT = Symbol(`vModelText` ); -const V_MODEL_SELECT = Symbol( - `vModelSelect` -); -const V_MODEL_DYNAMIC = Symbol( - `vModelDynamic` -); -const V_ON_WITH_MODIFIERS = Symbol( - `vOnModifiersGuard` -); -const V_ON_WITH_KEYS = Symbol( - `vOnKeysGuard` -); -const V_SHOW = Symbol(`vShow` ); -const TRANSITION = Symbol(`Transition` ); -const TRANSITION_GROUP = Symbol( - `TransitionGroup` -); -registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` -}); - -const parserOptions = { - parseMode: "html", - isVoidTag, - isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), - isPreTag: (tag) => tag === "pre", - isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", - decodeEntities: void 0, - isBuiltInComponent: (tag) => { - if (tag === "Transition" || tag === "transition") { - return TRANSITION; - } else if (tag === "TransitionGroup" || tag === "transition-group") { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent, rootNamespace) { - let ns = parent ? parent.ns : rootNamespace; - if (parent && ns === 2) { - if (parent.tag === "annotation-xml") { - if (tag === "svg") { - return 1; - } - if (parent.props.some( - (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") - )) { - ns = 0; - } - } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { - ns = 0; - } - } else if (parent && ns === 1) { - if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { - ns = 0; - } - } - if (ns === 0) { - if (tag === "svg") { - return 1; - } - if (tag === "math") { - return 2; - } - } - return ns; - } -}; - -const transformStyle = (node) => { - if (node.type === 1) { - node.props.forEach((p, i) => { - if (p.type === 6 && p.name === "style" && p.value) { - node.props[i] = { - type: 7, - name: `bind`, - arg: createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } -}; -const parseInlineCSS = (cssText, loc) => { - const normalized = parseStringStyle(cssText); - return createSimpleExpression( - JSON.stringify(normalized), - false, - loc, - 3 - ); -}; - -function createDOMCompilerError(code, loc) { - return createCompilerError( - code, - loc, - DOMErrorMessages - ); -} -const DOMErrorCodes = { - "X_V_HTML_NO_EXPRESSION": 53, - "53": "X_V_HTML_NO_EXPRESSION", - "X_V_HTML_WITH_CHILDREN": 54, - "54": "X_V_HTML_WITH_CHILDREN", - "X_V_TEXT_NO_EXPRESSION": 55, - "55": "X_V_TEXT_NO_EXPRESSION", - "X_V_TEXT_WITH_CHILDREN": 56, - "56": "X_V_TEXT_WITH_CHILDREN", - "X_V_MODEL_ON_INVALID_ELEMENT": 57, - "57": "X_V_MODEL_ON_INVALID_ELEMENT", - "X_V_MODEL_ARG_ON_ELEMENT": 58, - "58": "X_V_MODEL_ARG_ON_ELEMENT", - "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, - "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", - "X_V_MODEL_UNNECESSARY_VALUE": 60, - "60": "X_V_MODEL_UNNECESSARY_VALUE", - "X_V_SHOW_NO_EXPRESSION": 61, - "61": "X_V_SHOW_NO_EXPRESSION", - "X_TRANSITION_INVALID_CHILDREN": 62, - "62": "X_TRANSITION_INVALID_CHILDREN", - "X_IGNORED_SIDE_EFFECT_TAG": 63, - "63": "X_IGNORED_SIDE_EFFECT_TAG", - "__EXTEND_POINT__": 64, - "64": "__EXTEND_POINT__" -}; -const DOMErrorMessages = { - [53]: `v-html is missing expression.`, - [54]: `v-html will override element children.`, - [55]: `v-text is missing expression.`, - [56]: `v-text will override element children.`, - [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [58]: `v-model argument is not supported on plain elements.`, - [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [61]: `v-show is missing expression.`, - [62]: `<Transition> expects exactly one child element or component.`, - [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` -}; - -const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(53, loc) - ); - } - if (node.children.length) { - context.onError( - createDOMCompilerError(54, loc) - ); - node.children.length = 0; - } - return { - props: [ - createObjectProperty( - createSimpleExpression(`innerHTML`, true, loc), - exp || createSimpleExpression("", true) - ) - ] - }; -}; - -const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(55, loc) - ); - } - if (node.children.length) { - context.onError( - createDOMCompilerError(56, loc) - ); - node.children.length = 0; - } - return { - props: [ - createObjectProperty( - createSimpleExpression(`textContent`, true), - exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( - context.helperString(TO_DISPLAY_STRING), - [exp], - loc - ) : createSimpleExpression("", true) - ) - ] - }; -}; - -const transformModel = (dir, node, context) => { - const baseResult = transformModel$1(dir, node, context); - if (!baseResult.props.length || node.tagType === 1) { - return baseResult; - } - if (dir.arg) { - context.onError( - createDOMCompilerError( - 58, - dir.arg.loc - ) - ); - } - function checkDuplicatedValue() { - const value = findDir(node, "bind"); - if (value && isStaticArgOf(value.arg, "value")) { - context.onError( - createDOMCompilerError( - 60, - value.loc - ) - ); - } - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === "input" || isCustomElement) { - const type = findProp(node, `type`); - if (type) { - if (type.type === 7) { - directiveToUse = V_MODEL_DYNAMIC; - } else if (type.value) { - switch (type.value.content) { - case "radio": - directiveToUse = V_MODEL_RADIO; - break; - case "checkbox": - directiveToUse = V_MODEL_CHECKBOX; - break; - case "file": - isInvalidType = true; - context.onError( - createDOMCompilerError( - 59, - dir.loc - ) - ); - break; - default: - checkDuplicatedValue(); - break; - } - } - } else if (hasDynamicKeyVBind(node)) { - directiveToUse = V_MODEL_DYNAMIC; - } else { - checkDuplicatedValue(); - } - } else if (tag === "select") { - directiveToUse = V_MODEL_SELECT; - } else { - checkDuplicatedValue(); - } - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } else { - context.onError( - createDOMCompilerError( - 57, - dir.loc - ) - ); - } - baseResult.props = baseResult.props.filter( - (p) => !(p.key.type === 4 && p.key.content === "modelValue") - ); - return baseResult; -}; - -const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); -const isNonKeyModifier = /* @__PURE__ */ makeMap( - // event propagation management - `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` -); -const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); -const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`); -const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i].content; - if (isEventOptionModifier(modifier)) { - eventOptionModifiers.push(modifier); - } else { - if (maybeKeyModifier(modifier)) { - if (isStaticExp(key)) { - if (isKeyboardEvent(key.content.toLowerCase())) { - keyModifiers.push(modifier); - } else { - nonKeyModifiers.push(modifier); - } - } else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } else { - keyModifiers.push(modifier); - } - } - } - } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; -}; -const transformClick = (key, event) => { - const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; - return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) : key; -}; -const transformOn = (dir, node, context) => { - return transformOn$1(dir, node, context, (baseResult) => { - const { modifiers } = dir; - if (!modifiers.length) return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - if (nonKeyModifiers.includes("right")) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes("middle")) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard - (!isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); - key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [createObjectProperty(key, handlerExp)] - }; - }); -}; - -const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError( - createDOMCompilerError(61, loc) - ); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; -}; - -const transformTransition = (node, context) => { - if (node.type === 1 && node.tagType === 1) { - const component = context.isBuiltInComponent(node.tag); - if (component === TRANSITION) { - return () => { - if (!node.children.length) { - return; - } - if (hasMultipleChildren(node)) { - context.onError( - createDOMCompilerError( - 62, - { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: "" - } - ) - ); - } - const child = node.children[0]; - if (child.type === 1) { - for (const p of child.props) { - if (p.type === 7 && p.name === "show") { - node.props.push({ - type: 6, - name: "persisted", - nameLoc: node.loc, - value: void 0, - loc: node.loc - }); - } - } - } - }; - } - } -}; -function hasMultipleChildren(node) { - const children = node.children = node.children.filter( - (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) - ); - const child = children[0]; - return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); -} - -const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g; -const stringifyStatic = (children, context, parent) => { - if (context.scopes.vSlot > 0) { - return; - } - const isParentCached = parent.type === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !isArray$3(parent.codegenNode.children) && parent.codegenNode.children.type === 20; - let nc = 0; - let ec = 0; - const currentChunk = []; - const stringifyCurrentChunk = (currentIndex) => { - if (nc >= 20 || ec >= 5) { - const staticCall = createCallExpression(context.helper(CREATE_STATIC), [ - JSON.stringify( - currentChunk.map((node) => stringifyNode(node, context)).join("") - ).replace(expReplaceRE, `" + $1 + "`), - // the 2nd argument indicates the number of DOM nodes this static vnode - // will insert / hydrate - String(currentChunk.length) - ]); - const deleteCount = currentChunk.length - 1; - if (isParentCached) { - children.splice( - currentIndex - currentChunk.length, - currentChunk.length, - // @ts-expect-error - staticCall - ); - } else { - currentChunk[0].codegenNode.value = staticCall; - if (currentChunk.length > 1) { - children.splice(currentIndex - currentChunk.length + 1, deleteCount); - const cacheIndex = context.cached.indexOf( - currentChunk[currentChunk.length - 1].codegenNode - ); - if (cacheIndex > -1) { - for (let i2 = cacheIndex; i2 < context.cached.length; i2++) { - const c = context.cached[i2]; - if (c) c.index -= deleteCount; - } - context.cached.splice(cacheIndex - deleteCount + 1, deleteCount); - } - } - } - return deleteCount; - } - return 0; - }; - let i = 0; - for (; i < children.length; i++) { - const child = children[i]; - const isCached = isParentCached || getCachedNode(child); - if (isCached) { - const result = analyzeNode(child); - if (result) { - nc += result[0]; - ec += result[1]; - currentChunk.push(child); - continue; - } - } - i -= stringifyCurrentChunk(i); - nc = 0; - ec = 0; - currentChunk.length = 0; - } - stringifyCurrentChunk(i); -}; -const getCachedNode = (node) => { - if ((node.type === 1 && node.tagType === 0 || node.type === 12) && node.codegenNode && node.codegenNode.type === 20) { - return node.codegenNode; - } -}; -const dataAriaRE = /^(data|aria)-/; -const isStringifiableAttr = (name, ns) => { - return (ns === 0 ? isKnownHtmlAttr(name) : ns === 1 ? isKnownSvgAttr(name) : ns === 2 ? isKnownMathMLAttr(name) : false) || dataAriaRE.test(name); -}; -const isNonStringifiable = /* @__PURE__ */ makeMap( - `caption,thead,tr,th,tbody,td,tfoot,colgroup,col` -); -function analyzeNode(node) { - if (node.type === 1 && isNonStringifiable(node.tag)) { - return false; - } - if (node.type === 12) { - return [1, 0]; - } - let nc = 1; - let ec = node.props.length > 0 ? 1 : 0; - let bailed = false; - const bail = () => { - bailed = true; - return false; - }; - function walk(node2) { - const isOptionTag = node2.tag === "option" && node2.ns === 0; - for (let i = 0; i < node2.props.length; i++) { - const p = node2.props[i]; - if (p.type === 6 && !isStringifiableAttr(p.name, node2.ns)) { - return bail(); - } - if (p.type === 7 && p.name === "bind") { - if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node2.ns))) { - return bail(); - } - if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) { - return bail(); - } - if (isOptionTag && isStaticArgOf(p.arg, "value") && p.exp && !p.exp.isStatic) { - return bail(); - } - } - } - for (let i = 0; i < node2.children.length; i++) { - nc++; - const child = node2.children[i]; - if (child.type === 1) { - if (child.props.length > 0) { - ec++; - } - walk(child); - if (bailed) { - return false; - } - } - } - return true; - } - return walk(node) ? [nc, ec] : false; -} -function stringifyNode(node, context) { - if (isString$1(node)) { - return node; - } - if (isSymbol$1(node)) { - return ``; - } - switch (node.type) { - case 1: - return stringifyElement(node, context); - case 2: - return escapeHtml(node.content); - case 3: - return `<!--${escapeHtml(node.content)}-->`; - case 5: - return escapeHtml(toDisplayString(evaluateConstant(node.content))); - case 8: - return escapeHtml(evaluateConstant(node)); - case 12: - return stringifyNode(node.content, context); - default: - return ""; - } -} -function stringifyElement(node, context) { - let res = `<${node.tag}`; - let innerHTML = ""; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6) { - res += ` ${p.name}`; - if (p.value) { - res += `="${escapeHtml(p.value.content)}"`; - } - } else if (p.type === 7) { - if (p.name === "bind") { - const exp = p.exp; - if (exp.content[0] === "_") { - res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`; - continue; - } - if (isBooleanAttr(p.arg.content) && exp.content === "false") { - continue; - } - let evaluated = evaluateConstant(exp); - if (evaluated != null) { - const arg = p.arg && p.arg.content; - if (arg === "class") { - evaluated = normalizeClass(evaluated); - } else if (arg === "style") { - evaluated = stringifyStyle(normalizeStyle(evaluated)); - } - res += ` ${p.arg.content}="${escapeHtml( - evaluated - )}"`; - } - } else if (p.name === "html") { - innerHTML = evaluateConstant(p.exp); - } else if (p.name === "text") { - innerHTML = escapeHtml( - toDisplayString(evaluateConstant(p.exp)) - ); - } - } - } - if (context.scopeId) { - res += ` ${context.scopeId}`; - } - res += `>`; - if (innerHTML) { - res += innerHTML; - } else { - for (let i = 0; i < node.children.length; i++) { - res += stringifyNode(node.children[i], context); - } - } - if (!isVoidTag(node.tag)) { - res += `</${node.tag}>`; - } - return res; -} -function evaluateConstant(exp) { - if (exp.type === 4) { - return new Function(`return (${exp.content})`)(); - } else { - let res = ``; - exp.children.forEach((c) => { - if (isString$1(c) || isSymbol$1(c)) { - return; - } - if (c.type === 2) { - res += c.content; - } else if (c.type === 5) { - res += toDisplayString(evaluateConstant(c.content)); - } else { - res += evaluateConstant(c); - } - }); - return res; - } -} - -const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { - context.onError( - createDOMCompilerError( - 63, - node.loc - ) - ); - context.removeNode(); - } -}; - -function isValidHTMLNesting(parent, child) { - if (parent in onlyValidChildren) { - return onlyValidChildren[parent].has(child); - } - if (child in onlyValidParents) { - return onlyValidParents[child].has(parent); - } - if (parent in knownInvalidChildren) { - if (knownInvalidChildren[parent].has(child)) return false; - } - if (child in knownInvalidParents) { - if (knownInvalidParents[child].has(parent)) return false; - } - return true; -} -const headings = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]); -const emptySet = /* @__PURE__ */ new Set([]); -const onlyValidChildren = { - head: /* @__PURE__ */ new Set([ - "base", - "basefront", - "bgsound", - "link", - "meta", - "title", - "noscript", - "noframes", - "style", - "script", - "template" - ]), - optgroup: /* @__PURE__ */ new Set(["option"]), - select: /* @__PURE__ */ new Set(["optgroup", "option", "hr"]), - // table - table: /* @__PURE__ */ new Set(["caption", "colgroup", "tbody", "tfoot", "thead"]), - tr: /* @__PURE__ */ new Set(["td", "th"]), - colgroup: /* @__PURE__ */ new Set(["col"]), - tbody: /* @__PURE__ */ new Set(["tr"]), - thead: /* @__PURE__ */ new Set(["tr"]), - tfoot: /* @__PURE__ */ new Set(["tr"]), - // these elements can not have any children elements - script: emptySet, - iframe: emptySet, - option: emptySet, - textarea: emptySet, - style: emptySet, - title: emptySet -}; -const onlyValidParents = { - // sections - html: emptySet, - body: /* @__PURE__ */ new Set(["html"]), - head: /* @__PURE__ */ new Set(["html"]), - // table - td: /* @__PURE__ */ new Set(["tr"]), - colgroup: /* @__PURE__ */ new Set(["table"]), - caption: /* @__PURE__ */ new Set(["table"]), - tbody: /* @__PURE__ */ new Set(["table"]), - tfoot: /* @__PURE__ */ new Set(["table"]), - col: /* @__PURE__ */ new Set(["colgroup"]), - th: /* @__PURE__ */ new Set(["tr"]), - thead: /* @__PURE__ */ new Set(["table"]), - tr: /* @__PURE__ */ new Set(["tbody", "thead", "tfoot"]), - // data list - dd: /* @__PURE__ */ new Set(["dl", "div"]), - dt: /* @__PURE__ */ new Set(["dl", "div"]), - // other - figcaption: /* @__PURE__ */ new Set(["figure"]), - // li: new Set(["ul", "ol"]), - summary: /* @__PURE__ */ new Set(["details"]), - area: /* @__PURE__ */ new Set(["map"]) -}; -const knownInvalidChildren = { - p: /* @__PURE__ */ new Set([ - "address", - "article", - "aside", - "blockquote", - "center", - "details", - "dialog", - "dir", - "div", - "dl", - "fieldset", - "figure", - "footer", - "form", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "header", - "hgroup", - "hr", - "li", - "main", - "nav", - "menu", - "ol", - "p", - "pre", - "section", - "table", - "ul" - ]), - svg: /* @__PURE__ */ new Set([ - "b", - "blockquote", - "br", - "code", - "dd", - "div", - "dl", - "dt", - "em", - "embed", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "hr", - "i", - "img", - "li", - "menu", - "meta", - "ol", - "p", - "pre", - "ruby", - "s", - "small", - "span", - "strong", - "sub", - "sup", - "table", - "u", - "ul", - "var" - ]) -}; -const knownInvalidParents = { - a: /* @__PURE__ */ new Set(["a"]), - button: /* @__PURE__ */ new Set(["button"]), - dd: /* @__PURE__ */ new Set(["dd", "dt"]), - dt: /* @__PURE__ */ new Set(["dd", "dt"]), - form: /* @__PURE__ */ new Set(["form"]), - li: /* @__PURE__ */ new Set(["li"]), - h1: headings, - h2: headings, - h3: headings, - h4: headings, - h5: headings, - h6: headings -}; - -const validateHtmlNesting = (node, context) => { - if (node.type === 1 && node.tagType === 0 && context.parent && context.parent.type === 1 && context.parent.tagType === 0 && !isValidHTMLNesting(context.parent.tag, node.tag)) { - const error = new SyntaxError( - `<${node.tag}> cannot be child of <${context.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.` - ); - error.loc = node.loc; - context.onWarn(error); - } -}; - -const DOMNodeTransforms = [ - transformStyle, - ...[transformTransition, validateHtmlNesting] -]; -const DOMDirectiveTransforms = { - cloak: noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel, - // override compiler-core - on: transformOn, - // override compiler-core - show: transformShow -}; -function compile$1(src, options = {}) { - return baseCompile( - src, - extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...options.nodeTransforms || [] - ], - directiveTransforms: extend( - {}, - DOMDirectiveTransforms, - options.directiveTransforms || {} - ), - transformHoist: stringifyStatic - }) - ); -} -function parse$3(template, options = {}) { - return baseParse(template, extend({}, parserOptions, options)); -} - -var CompilerDOM = /*#__PURE__*/Object.freeze({ - __proto__: null, - BASE_TRANSITION: BASE_TRANSITION, - BindingTypes: BindingTypes, - CAMELIZE: CAMELIZE, - CAPITALIZE: CAPITALIZE, - CREATE_BLOCK: CREATE_BLOCK, - CREATE_COMMENT: CREATE_COMMENT, - CREATE_ELEMENT_BLOCK: CREATE_ELEMENT_BLOCK, - CREATE_ELEMENT_VNODE: CREATE_ELEMENT_VNODE, - CREATE_SLOTS: CREATE_SLOTS, - CREATE_STATIC: CREATE_STATIC, - CREATE_TEXT: CREATE_TEXT, - CREATE_VNODE: CREATE_VNODE, - CompilerDeprecationTypes: CompilerDeprecationTypes, - ConstantTypes: ConstantTypes, - DOMDirectiveTransforms: DOMDirectiveTransforms, - DOMErrorCodes: DOMErrorCodes, - DOMErrorMessages: DOMErrorMessages, - DOMNodeTransforms: DOMNodeTransforms, - ElementTypes: ElementTypes, - ErrorCodes: ErrorCodes, - FRAGMENT: FRAGMENT, - GUARD_REACTIVE_PROPS: GUARD_REACTIVE_PROPS, - IS_MEMO_SAME: IS_MEMO_SAME, - IS_REF: IS_REF, - KEEP_ALIVE: KEEP_ALIVE, - MERGE_PROPS: MERGE_PROPS, - NORMALIZE_CLASS: NORMALIZE_CLASS, - NORMALIZE_PROPS: NORMALIZE_PROPS, - NORMALIZE_STYLE: NORMALIZE_STYLE, - Namespaces: Namespaces, - NodeTypes: NodeTypes, - OPEN_BLOCK: OPEN_BLOCK, - POP_SCOPE_ID: POP_SCOPE_ID, - PUSH_SCOPE_ID: PUSH_SCOPE_ID, - RENDER_LIST: RENDER_LIST, - RENDER_SLOT: RENDER_SLOT, - RESOLVE_COMPONENT: RESOLVE_COMPONENT, - RESOLVE_DIRECTIVE: RESOLVE_DIRECTIVE, - RESOLVE_DYNAMIC_COMPONENT: RESOLVE_DYNAMIC_COMPONENT, - RESOLVE_FILTER: RESOLVE_FILTER, - SET_BLOCK_TRACKING: SET_BLOCK_TRACKING, - SUSPENSE: SUSPENSE, - TELEPORT: TELEPORT, - TO_DISPLAY_STRING: TO_DISPLAY_STRING, - TO_HANDLERS: TO_HANDLERS, - TO_HANDLER_KEY: TO_HANDLER_KEY, - TRANSITION: TRANSITION, - TRANSITION_GROUP: TRANSITION_GROUP, - TS_NODE_TYPES: TS_NODE_TYPES, - UNREF: UNREF, - V_MODEL_CHECKBOX: V_MODEL_CHECKBOX, - V_MODEL_DYNAMIC: V_MODEL_DYNAMIC, - V_MODEL_RADIO: V_MODEL_RADIO, - V_MODEL_SELECT: V_MODEL_SELECT, - V_MODEL_TEXT: V_MODEL_TEXT, - V_ON_WITH_KEYS: V_ON_WITH_KEYS, - V_ON_WITH_MODIFIERS: V_ON_WITH_MODIFIERS, - V_SHOW: V_SHOW, - WITH_CTX: WITH_CTX, - WITH_DIRECTIVES: WITH_DIRECTIVES, - WITH_MEMO: WITH_MEMO, - advancePositionWithClone: advancePositionWithClone, - advancePositionWithMutation: advancePositionWithMutation, - assert: assert, - baseCompile: baseCompile, - baseParse: baseParse, - buildDirectiveArgs: buildDirectiveArgs, - buildProps: buildProps, - buildSlots: buildSlots, - checkCompatEnabled: checkCompatEnabled, - compile: compile$1, - convertToBlock: convertToBlock, - createArrayExpression: createArrayExpression, - createAssignmentExpression: createAssignmentExpression, - createBlockStatement: createBlockStatement, - createCacheExpression: createCacheExpression, - createCallExpression: createCallExpression, - createCompilerError: createCompilerError, - createCompoundExpression: createCompoundExpression, - createConditionalExpression: createConditionalExpression, - createDOMCompilerError: createDOMCompilerError, - createForLoopParams: createForLoopParams, - createFunctionExpression: createFunctionExpression, - createIfStatement: createIfStatement, - createInterpolation: createInterpolation, - createObjectExpression: createObjectExpression, - createObjectProperty: createObjectProperty, - createReturnStatement: createReturnStatement, - createRoot: createRoot, - createSequenceExpression: createSequenceExpression, - createSimpleExpression: createSimpleExpression, - createStructuralDirectiveTransform: createStructuralDirectiveTransform, - createTemplateLiteral: createTemplateLiteral, - createTransformContext: createTransformContext, - createVNodeCall: createVNodeCall, - errorMessages: errorMessages$1, - extractIdentifiers: extractIdentifiers$1, - findDir: findDir, - findProp: findProp, - forAliasRE: forAliasRE, - generate: generate, - generateCodeFrame: generateCodeFrame, - getBaseTransformPreset: getBaseTransformPreset, - getConstantType: getConstantType, - getMemoedVNodeCall: getMemoedVNodeCall, - getVNodeBlockHelper: getVNodeBlockHelper, - getVNodeHelper: getVNodeHelper, - hasDynamicKeyVBind: hasDynamicKeyVBind, - hasScopeRef: hasScopeRef, - helperNameMap: helperNameMap, - injectProp: injectProp, - isCoreComponent: isCoreComponent, - isFnExpression: isFnExpression, - isFnExpressionBrowser: isFnExpressionBrowser, - isFnExpressionNode: isFnExpressionNode, - isFunctionType: isFunctionType, - isInDestructureAssignment: isInDestructureAssignment, - isInNewExpression: isInNewExpression, - isMemberExpression: isMemberExpression, - isMemberExpressionBrowser: isMemberExpressionBrowser, - isMemberExpressionNode: isMemberExpressionNode, - isReferencedIdentifier: isReferencedIdentifier, - isSimpleIdentifier: isSimpleIdentifier, - isSlotOutlet: isSlotOutlet, - isStaticArgOf: isStaticArgOf, - isStaticExp: isStaticExp, - isStaticProperty: isStaticProperty, - isStaticPropertyKey: isStaticPropertyKey, - isTemplateNode: isTemplateNode, - isText: isText$1, - isVSlot: isVSlot, - locStub: locStub, - noopDirectiveTransform: noopDirectiveTransform, - parse: parse$3, - parserOptions: parserOptions, - processExpression: processExpression, - processFor: processFor, - processIf: processIf, - processSlotOutlet: processSlotOutlet, - registerRuntimeHelpers: registerRuntimeHelpers, - resolveComponentType: resolveComponentType, - stringifyExpression: stringifyExpression, - toValidAssetId: toValidAssetId, - trackSlotScopes: trackSlotScopes, - trackVForSlotScopes: trackVForSlotScopes, - transform: transform, - transformBind: transformBind, - transformElement: transformElement, - transformExpression: transformExpression, - transformModel: transformModel$1, - transformOn: transformOn$1, - transformStyle: transformStyle, - traverseNode: traverseNode, - unwrapTSNode: unwrapTSNode, - walkBlockDeclarations: walkBlockDeclarations, - walkFunctionParams: walkFunctionParams, - walkIdentifiers: walkIdentifiers, - warnDeprecation: warnDeprecation -}); - -var hashSum; -var hasRequiredHashSum; - -function requireHashSum () { - if (hasRequiredHashSum) return hashSum; - hasRequiredHashSum = 1; - - function pad (hash, len) { - while (hash.length < len) { - hash = '0' + hash; - } - return hash; - } - - function fold (hash, text) { - var i; - var chr; - var len; - if (text.length === 0) { - return hash; - } - for (i = 0, len = text.length; i < len; i++) { - chr = text.charCodeAt(i); - hash = ((hash << 5) - hash) + chr; - hash |= 0; - } - return hash < 0 ? hash * -2 : hash; - } - - function foldObject (hash, o, seen) { - return Object.keys(o).sort().reduce(foldKey, hash); - function foldKey (hash, key) { - return foldValue(hash, o[key], key, seen); - } - } - - function foldValue (input, value, key, seen) { - var hash = fold(fold(fold(input, key), toString(value)), typeof value); - if (value === null) { - return fold(hash, 'null'); - } - if (value === undefined) { - return fold(hash, 'undefined'); - } - if (typeof value === 'object' || typeof value === 'function') { - if (seen.indexOf(value) !== -1) { - return fold(hash, '[Circular]' + key); - } - seen.push(value); - - var objHash = foldObject(hash, value, seen); - - if (!('valueOf' in value) || typeof value.valueOf !== 'function') { - return objHash; - } - - try { - return fold(objHash, String(value.valueOf())) - } catch (err) { - return fold(objHash, '[valueOf exception]' + (err.stack || err.message)) - } - } - return fold(hash, value.toString()); - } - - function toString (o) { - return Object.prototype.toString.call(o); - } - - function sum (o) { - return pad(foldValue(0, o, '', []).toString(16), 8); - } - - hashSum = sum; - return hashSum; -} - -var hashSumExports = /*@__PURE__*/ requireHashSum(); -var hash = /*@__PURE__*/getDefaultExportFromCjs(hashSumExports); - -const CSS_VARS_HELPER = `useCssVars`; -function genCssVarsFromList(vars, id, isProd, isSSR = false) { - return `{ - ${vars.map( - (key) => `"${isSSR ? `--` : ``}${genVarName(id, key, isProd, isSSR)}": (${key})` - ).join(",\n ")} -}`; -} -function genVarName(id, raw, isProd, isSSR = false) { - if (isProd) { - return hash(id + raw); - } else { - return `${id}-${getEscapedCssVarName(raw, isSSR)}`; - } -} -function normalizeExpression(exp) { - exp = exp.trim(); - if (exp[0] === `'` && exp[exp.length - 1] === `'` || exp[0] === `"` && exp[exp.length - 1] === `"`) { - return exp.slice(1, -1); - } - return exp; -} -const vBindRE = /v-bind\s*\(/g; -function parseCssVars(sfc) { - const vars = []; - sfc.styles.forEach((style) => { - let match; - const content = style.content.replace(/\/\*([\s\S]*?)\*\/|\/\/.*/g, ""); - while (match = vBindRE.exec(content)) { - const start = match.index + match[0].length; - const end = lexBinding(content, start); - if (end !== null) { - const variable = normalizeExpression(content.slice(start, end)); - if (!vars.includes(variable)) { - vars.push(variable); - } - } - } - }); - return vars; -} -function lexBinding(content, start) { - let state = 0 /* inParens */; - let parenDepth = 0; - for (let i = start; i < content.length; i++) { - const char = content.charAt(i); - switch (state) { - case 0 /* inParens */: - if (char === `'`) { - state = 1 /* inSingleQuoteString */; - } else if (char === `"`) { - state = 2 /* inDoubleQuoteString */; - } else if (char === `(`) { - parenDepth++; - } else if (char === `)`) { - if (parenDepth > 0) { - parenDepth--; - } else { - return i; - } - } - break; - case 1 /* inSingleQuoteString */: - if (char === `'`) { - state = 0 /* inParens */; - } - break; - case 2 /* inDoubleQuoteString */: - if (char === `"`) { - state = 0 /* inParens */; - } - break; - } - } - return null; -} -const cssVarsPlugin = (opts) => { - const { id, isProd } = opts; - return { - postcssPlugin: "vue-sfc-vars", - Declaration(decl) { - const value = decl.value; - if (vBindRE.test(value)) { - vBindRE.lastIndex = 0; - let transformed = ""; - let lastIndex = 0; - let match; - while (match = vBindRE.exec(value)) { - const start = match.index + match[0].length; - const end = lexBinding(value, start); - if (end !== null) { - const variable = normalizeExpression(value.slice(start, end)); - transformed += value.slice(lastIndex, match.index) + `var(--${genVarName(id, variable, isProd)})`; - lastIndex = end + 1; - } - } - decl.value = transformed + value.slice(lastIndex); - } - } - }; -}; -cssVarsPlugin.postcss = true; -function genCssVarsCode(vars, bindings, id, isProd) { - const varsExp = genCssVarsFromList(vars, id, isProd); - const exp = createSimpleExpression(varsExp, false); - const context = createTransformContext(createRoot([]), { - prefixIdentifiers: true, - inline: true, - bindingMetadata: bindings.__isScriptSetup === false ? void 0 : bindings - }); - const transformed = processExpression(exp, context); - const transformedString = transformed.type === 4 ? transformed.content : transformed.children.map((c) => { - return typeof c === "string" ? c : c.content; - }).join(""); - return `_${CSS_VARS_HELPER}(_ctx => (${transformedString}))`; -} -function genNormalScriptCssVarsCode(cssVars, bindings, id, isProd, defaultVar) { - return ` -import { ${CSS_VARS_HELPER} as _${CSS_VARS_HELPER} } from 'vue' -const __injectCSSVars__ = () => { -${genCssVarsCode( - cssVars, - bindings, - id, - isProd - )}} -const __setup__ = ${defaultVar}.setup -${defaultVar}.setup = __setup__ - ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) } - : __injectCSSVars__ -`; -} - -var global$1 = (typeof global !== "undefined" ? global : - typeof self !== "undefined" ? self : - typeof window !== "undefined" ? window : {}); - -// shim for using process in browser -// based off https://github.com/defunctzombie/node-process/blob/master/browser.js - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -var cachedSetTimeout = defaultSetTimout; -var cachedClearTimeout = defaultClearTimeout; -if (typeof global$1.setTimeout === 'function') { - cachedSetTimeout = setTimeout; -} -if (typeof global$1.clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; -} - -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} -function nextTick(fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -} -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -var title = 'browser'; -var platform = 'browser'; -var browser = true; -var env = {}; -var argv = []; -var version$1 = ''; // empty string to avoid regexp issues -var versions = {}; -var release = {}; -var config = {}; - -function noop() {} - -var on = noop; -var addListener = noop; -var once = noop; -var off = noop; -var removeListener = noop; -var removeAllListeners = noop; -var emit = noop; - -function binding(name) { - throw new Error('process.binding is not supported'); -} - -function cwd () { return '/' } -function chdir (dir) { - throw new Error('process.chdir is not supported'); -}function umask() { return 0; } - -// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js -var performance = global$1.performance || {}; -var performanceNow = - performance.now || - performance.mozNow || - performance.msNow || - performance.oNow || - performance.webkitNow || - function(){ return (new Date()).getTime() }; - -// generate timestamp or delta -// see http://nodejs.org/api/process.html#process_process_hrtime -function hrtime(previousTimestamp){ - var clocktime = performanceNow.call(performance)*1e-3; - var seconds = Math.floor(clocktime); - var nanoseconds = Math.floor((clocktime%1)*1e9); - if (previousTimestamp) { - seconds = seconds - previousTimestamp[0]; - nanoseconds = nanoseconds - previousTimestamp[1]; - if (nanoseconds<0) { - seconds--; - nanoseconds += 1e9; - } - } - return [seconds,nanoseconds] -} - -var startTime = new Date(); -function uptime() { - var currentTime = new Date(); - var dif = currentTime - startTime; - return dif / 1000; -} - -var browser$1 = { - nextTick: nextTick, - title: title, - browser: browser, - env: env, - argv: argv, - version: version$1, - versions: versions, - on: on, - addListener: addListener, - once: once, - off: off, - removeListener: removeListener, - removeAllListeners: removeAllListeners, - emit: emit, - binding: binding, - cwd: cwd, - chdir: chdir, - umask: umask, - hrtime: hrtime, - platform: platform, - release: release, - config: config, - uptime: uptime -}; - -function createCache(max = 500) { - { - return /* @__PURE__ */ new Map(); - } -} - -function isImportUsed(local, sfc) { - return resolveTemplateUsedIdentifiers(sfc).has(local); -} -const templateUsageCheckCache = createCache(); -function resolveTemplateUsedIdentifiers(sfc) { - const { content, ast } = sfc.template; - const cached = templateUsageCheckCache.get(content); - if (cached) { - return cached; - } - const ids = /* @__PURE__ */ new Set(); - ast.children.forEach(walk); - function walk(node) { - var _a; - switch (node.type) { - case 1: - let tag = node.tag; - if (tag.includes(".")) tag = tag.split(".")[0].trim(); - if (!parserOptions.isNativeTag(tag) && !parserOptions.isBuiltInComponent(tag)) { - ids.add(camelize(tag)); - ids.add(capitalize(camelize(tag))); - } - for (let i = 0; i < node.props.length; i++) { - const prop = node.props[i]; - if (prop.type === 7) { - if (!isBuiltInDirective(prop.name)) { - ids.add(`v${capitalize(camelize(prop.name))}`); - } - if (prop.arg && !prop.arg.isStatic) { - extractIdentifiers(ids, prop.arg); - } - if (prop.name === "for") { - extractIdentifiers(ids, prop.forParseResult.source); - } else if (prop.exp) { - extractIdentifiers(ids, prop.exp); - } else if (prop.name === "bind" && !prop.exp) { - ids.add(camelize(prop.arg.content)); - } - } - if (prop.type === 6 && prop.name === "ref" && ((_a = prop.value) == null ? void 0 : _a.content)) { - ids.add(prop.value.content); - } - } - node.children.forEach(walk); - break; - case 5: - extractIdentifiers(ids, node.content); - break; - } - } - templateUsageCheckCache.set(content, ids); - return ids; -} -function extractIdentifiers(ids, node) { - if (node.ast) { - walkIdentifiers(node.ast, (n) => ids.add(n.name)); - } else if (node.ast === null) { - ids.add(node.content); - } -} - -var __defProp$a = Object.defineProperty; -var __defProps$9 = Object.defineProperties; -var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$a = Object.getOwnPropertySymbols; -var __hasOwnProp$a = Object.prototype.hasOwnProperty; -var __propIsEnum$a = Object.prototype.propertyIsEnumerable; -var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues$a = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$a.call(b, prop)) - __defNormalProp$a(a, prop, b[prop]); - if (__getOwnPropSymbols$a) - for (var prop of __getOwnPropSymbols$a(b)) { - if (__propIsEnum$a.call(b, prop)) - __defNormalProp$a(a, prop, b[prop]); - } - return a; -}; -var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b)); -const DEFAULT_FILENAME = "anonymous.vue"; -const parseCache$1 = createCache(); -function parse$2(source, options = {}) { - var _a; - const sourceKey = genCacheKey(source, __spreadProps$9(__spreadValues$a({}, options), { - compiler: { parse: (_a = options.compiler) == null ? void 0 : _a.parse } - })); - const cache = parseCache$1.get(sourceKey); - if (cache) { - return cache; - } - const { - sourceMap = true, - filename = DEFAULT_FILENAME, - sourceRoot = "", - pad = false, - ignoreEmpty = true, - compiler = CompilerDOM, - templateParseOptions = {} - } = options; - const descriptor = { - filename, - source, - template: null, - script: null, - scriptSetup: null, - styles: [], - customBlocks: [], - cssVars: [], - slotted: false, - shouldForceReload: (prevImports) => hmrShouldReload(prevImports, descriptor) - }; - const errors = []; - const ast = compiler.parse(source, __spreadProps$9(__spreadValues$a({ - parseMode: "sfc", - prefixIdentifiers: true - }, templateParseOptions), { - onError: (e) => { - errors.push(e); - } - })); - ast.children.forEach((node) => { - if (node.type !== 1) { - return; - } - if (ignoreEmpty && node.tag !== "template" && isEmpty(node) && !hasSrc(node)) { - return; - } - switch (node.tag) { - case "template": - if (!descriptor.template) { - const templateBlock = descriptor.template = createBlock( - node, - source, - false - ); - if (!templateBlock.attrs.src) { - templateBlock.ast = createRoot(node.children, source); - } - if (templateBlock.attrs.functional) { - const err = new SyntaxError( - `<template functional> is no longer supported in Vue 3, since functional components no longer have significant performance difference from stateful ones. Just use a normal <template> instead.` - ); - err.loc = node.props.find( - (p) => p.type === 6 && p.name === "functional" - ).loc; - errors.push(err); - } - } else { - errors.push(createDuplicateBlockError(node)); - } - break; - case "script": - const scriptBlock = createBlock(node, source, pad); - const isSetup = !!scriptBlock.attrs.setup; - if (isSetup && !descriptor.scriptSetup) { - descriptor.scriptSetup = scriptBlock; - break; - } - if (!isSetup && !descriptor.script) { - descriptor.script = scriptBlock; - break; - } - errors.push(createDuplicateBlockError(node, isSetup)); - break; - case "style": - const styleBlock = createBlock(node, source, pad); - if (styleBlock.attrs.vars) { - errors.push( - new SyntaxError( - `<style vars> has been replaced by a new proposal: https://github.com/vuejs/rfcs/pull/231` - ) - ); - } - descriptor.styles.push(styleBlock); - break; - default: - descriptor.customBlocks.push(createBlock(node, source, pad)); - break; - } - }); - if (!descriptor.template && !descriptor.script && !descriptor.scriptSetup) { - errors.push( - new SyntaxError( - `At least one <template> or <script> is required in a single file component. ${descriptor.filename}` - ) - ); - } - if (descriptor.scriptSetup) { - if (descriptor.scriptSetup.src) { - errors.push( - new SyntaxError( - `<script setup> cannot use the "src" attribute because its syntax will be ambiguous outside of the component.` - ) - ); - descriptor.scriptSetup = null; - } - if (descriptor.script && descriptor.script.src) { - errors.push( - new SyntaxError( - `<script> cannot use the "src" attribute when <script setup> is also present because they must be processed together.` - ) - ); - descriptor.script = null; - } - } - let templateColumnOffset = 0; - if (descriptor.template && (descriptor.template.lang === "pug" || descriptor.template.lang === "jade")) { - [descriptor.template.content, templateColumnOffset] = dedent( - descriptor.template.content - ); - } - if (sourceMap) { - const genMap = (block, columnOffset = 0) => { - if (block && !block.src) { - block.map = generateSourceMap( - filename, - source, - block.content, - sourceRoot, - !pad || block.type === "template" ? block.loc.start.line - 1 : 0, - columnOffset - ); - } - }; - genMap(descriptor.template, templateColumnOffset); - genMap(descriptor.script); - descriptor.styles.forEach((s) => genMap(s)); - descriptor.customBlocks.forEach((s) => genMap(s)); - } - descriptor.cssVars = parseCssVars(descriptor); - const slottedRE = /(?:::v-|:)slotted\(/; - descriptor.slotted = descriptor.styles.some( - (s) => s.scoped && slottedRE.test(s.content) - ); - const result = { - descriptor, - errors - }; - parseCache$1.set(sourceKey, result); - return result; -} -function createDuplicateBlockError(node, isScriptSetup = false) { - const err = new SyntaxError( - `Single file component can contain only one <${node.tag}${isScriptSetup ? ` setup` : ``}> element` - ); - err.loc = node.loc; - return err; -} -function createBlock(node, source, pad) { - const type = node.tag; - const loc = node.innerLoc; - const attrs = {}; - const block = { - type, - content: source.slice(loc.start.offset, loc.end.offset), - loc, - attrs - }; - if (pad) { - block.content = padContent(source, block, pad) + block.content; - } - node.props.forEach((p) => { - if (p.type === 6) { - const name = p.name; - attrs[name] = p.value ? p.value.content || true : true; - if (name === "lang") { - block.lang = p.value && p.value.content; - } else if (name === "src") { - block.src = p.value && p.value.content; - } else if (type === "style") { - if (name === "scoped") { - block.scoped = true; - } else if (name === "module") { - block.module = attrs[name]; - } - } else if (type === "script" && name === "setup") { - block.setup = attrs.setup; - } - } - }); - return block; -} -const splitRE = /\r?\n/g; -const emptyRE = /^(?:\/\/)?\s*$/; -const replaceRE = /./g; -function generateSourceMap(filename, source, generated, sourceRoot, lineOffset, columnOffset) { - const map = new sourceMapExports.SourceMapGenerator({ - file: filename.replace(/\\/g, "/"), - sourceRoot: sourceRoot.replace(/\\/g, "/") - }); - map.setSourceContent(filename, source); - map._sources.add(filename); - generated.split(splitRE).forEach((line, index) => { - if (!emptyRE.test(line)) { - const originalLine = index + 1 + lineOffset; - const generatedLine = index + 1; - for (let i = 0; i < line.length; i++) { - if (!/\s/.test(line[i])) { - map._mappings.add({ - originalLine, - originalColumn: i + columnOffset, - generatedLine, - generatedColumn: i, - source: filename, - name: null - }); - } - } - } - }); - return map.toJSON(); -} -function padContent(content, block, pad) { - content = content.slice(0, block.loc.start.offset); - if (pad === "space") { - return content.replace(replaceRE, " "); - } else { - const offset = content.split(splitRE).length; - const padChar = block.type === "script" && !block.lang ? "//\n" : "\n"; - return Array(offset).join(padChar); - } -} -function hasSrc(node) { - return node.props.some((p) => { - if (p.type !== 6) { - return false; - } - return p.name === "src"; - }); -} -function isEmpty(node) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (child.type !== 2 || child.content.trim() !== "") { - return false; - } - } - return true; -} -function hmrShouldReload(prevImports, next) { - if (!next.scriptSetup || next.scriptSetup.lang !== "ts" && next.scriptSetup.lang !== "tsx") { - return false; - } - for (const key in prevImports) { - if (!prevImports[key].isUsedInTemplate && isImportUsed(key, next)) { - return true; - } - } - return false; -} -function dedent(s) { - const lines = s.split("\n"); - const minIndent = lines.reduce(function(minIndent2, line) { - var _a, _b; - if (line.trim() === "") { - return minIndent2; - } - const indent = ((_b = (_a = line.match(/^\s*/)) == null ? void 0 : _a[0]) == null ? void 0 : _b.length) || 0; - return Math.min(indent, minIndent2); - }, Infinity); - if (minIndent === 0) { - return [s, minIndent]; - } - return [ - lines.map(function(line) { - return line.slice(minIndent); - }).join("\n"), - minIndent - ]; -} - -// Copyright Joyent, Inc. and other Node 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. - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; -var splitPath = function(filename) { - return splitPathRe.exec(filename).slice(1); -}; - -// path.resolve([from ...], to) -// posix version -function resolve() { - var resolvedPath = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : '/'; - - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -} -// path.normalize(path) -// posix version -function normalize$1(path) { - var isPathAbsolute = isAbsolute(path), - trailingSlash = substr(path, -1) === '/'; - - // Normalize the path - path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isPathAbsolute).join('/'); - - if (!path && !isPathAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isPathAbsolute ? '/' : '') + path; -} -// posix version -function isAbsolute(path) { - return path.charAt(0) === '/'; -} - -// posix version -function join() { - var paths = Array.prototype.slice.call(arguments, 0); - return normalize$1(filter(paths, function(p, index) { - if (typeof p !== 'string') { - throw new TypeError('Arguments to path.join must be strings'); - } - return p; - }).join('/')); -} - - -// path.relative(from, to) -// posix version -function relative(from, to) { - from = resolve(from).substr(1); - to = resolve(to).substr(1); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end - start + 1); - } - - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -} - -var sep = '/'; -var delimiter$1 = ':'; - -function dirname(path) { - var result = splitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -} - -function basename(path, ext) { - var f = splitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -} - - -function extname(path) { - return splitPath(path)[3]; -} -var path = { - extname: extname, - basename: basename, - dirname: dirname, - sep: sep, - delimiter: delimiter$1, - relative: relative, - join: join, - isAbsolute: isAbsolute, - normalize: normalize$1, - resolve: resolve -}; -function filter (xs, f) { - if (xs.filter) return xs.filter(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - if (f(xs[i], i, xs)) res.push(xs[i]); - } - return res; -} - -// String.prototype.substr - negative index don't work in IE8 -var substr = 'ab'.substr(-1) === 'b' ? - function (str, start, len) { return str.substr(start, len) } : - function (str, start, len) { - if (start < 0) start = str.length + start; - return str.substr(start, len); - } -; - -var _polyfillNode_path = /*#__PURE__*/Object.freeze({ - __proto__: null, - basename: basename, - default: path, - delimiter: delimiter$1, - dirname: dirname, - extname: extname, - isAbsolute: isAbsolute, - join: join, - normalize: normalize$1, - relative: relative, - resolve: resolve, - sep: sep -}); - -/*! https://mths.be/punycode v1.4.1 by @mathias */ - - -/** Highest positive signed 32-bit float value */ -var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -var base = 36; -var tMin = 1; -var tMax = 26; -var skew = 38; -var damp = 700; -var initialBias = 72; -var initialN = 128; // 0x80 -var delimiter = '-'; // '\x2D' -var regexNonASCII = /[^\x20-\x7E]/; // unprintable ASCII chars + non-ASCII chars -var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -var errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -var baseMinusTMin = base - tMin; -var floor = Math.floor; -var stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map$1(array, fn) { - var length = array.length; - var result = []; - while (length--) { - result[length] = fn(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ -function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map$1(labels, fn).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see <https://mathiasbynens.be/notes/javascript-encoding> - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -} - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for ( /* no initialization */ ; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -} - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -function encode$1(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */ ; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); -} - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -function toASCII(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) ? - 'xn--' + encode$1(string) : - string; - }); -} - -var lookup = []; -var revLookup = []; -var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; -var inited = false; -function init () { - inited = true; - var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i]; - revLookup[code.charCodeAt(i)] = i; - } - - revLookup['-'.charCodeAt(0)] = 62; - revLookup['_'.charCodeAt(0)] = 63; -} - -function toByteArray (b64) { - if (!inited) { - init(); - } - var i, j, l, tmp, placeHolders, arr; - var len = b64.length; - - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(len * 3 / 4 - placeHolders); - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? len - 4 : len; - - var L = 0; - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]; - arr[L++] = (tmp >> 16) & 0xFF; - arr[L++] = (tmp >> 8) & 0xFF; - arr[L++] = tmp & 0xFF; - } - - if (placeHolders === 2) { - tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4); - arr[L++] = tmp & 0xFF; - } else if (placeHolders === 1) { - tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2); - arr[L++] = (tmp >> 8) & 0xFF; - arr[L++] = tmp & 0xFF; - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp; - var output = []; - for (var i = start; i < end; i += 3) { - tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); - output.push(tripletToBase64(tmp)); - } - return output.join('') -} - -function fromByteArray (uint8) { - if (!inited) { - init(); - } - var tmp; - var len = uint8.length; - var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes - var output = ''; - var parts = []; - var maxChunkLength = 16383; // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))); - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1]; - output += lookup[tmp >> 2]; - output += lookup[(tmp << 4) & 0x3F]; - output += '=='; - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + (uint8[len - 1]); - output += lookup[tmp >> 10]; - output += lookup[(tmp >> 4) & 0x3F]; - output += lookup[(tmp << 2) & 0x3F]; - output += '='; - } - - parts.push(output); - - return parts.join('') -} - -function read (buffer, offset, isLE, mLen, nBytes) { - var e, m; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var nBits = -7; - var i = isLE ? (nBytes - 1) : 0; - var d = isLE ? -1 : 1; - var s = buffer[offset + i]; - - i += d; - - e = s & ((1 << (-nBits)) - 1); - s >>= (-nBits); - nBits += eLen; - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1); - e >>= (-nBits); - nBits += mLen; - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias; - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen); - e = e - eBias; - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -function write (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0); - var i = isLE ? 0 : (nBytes - 1); - var d = isLE ? 1 : -1; - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; - - value = Math.abs(value); - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0; - e = eMax; - } else { - e = Math.floor(Math.log(value) / Math.LN2); - if (value * (c = Math.pow(2, -e)) < 1) { - e--; - c *= 2; - } - if (e + eBias >= 1) { - value += rt / c; - } else { - value += rt * Math.pow(2, 1 - eBias); - } - if (value * c >= 2) { - e++; - c /= 2; - } - - if (e + eBias >= eMax) { - m = 0; - e = eMax; - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen); - e = e + eBias; - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); - e = 0; - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m; - eLen += mLen; - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128; -} - -var toString$1 = {}.toString; - -var isArray$2 = Array.isArray || function (arr) { - return toString$1.call(arr) == '[object Array]'; -}; - -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> - * @license MIT - */ -/* eslint-disable no-proto */ - - -var INSPECT_MAX_BYTES = 50; - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer$1.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined - ? global$1.TYPED_ARRAY_SUPPORT - : true; - -/* - * Export kMaxLength after typed array support is determined. - */ -kMaxLength(); - -function kMaxLength () { - return Buffer$1.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} - -function createBuffer (that, length) { - if (kMaxLength() < length) { - throw new RangeError('Invalid typed array length') - } - if (Buffer$1.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = new Uint8Array(length); - that.__proto__ = Buffer$1.prototype; - } else { - // Fallback: Return an object instance of the Buffer class - if (that === null) { - that = new Buffer$1(length); - } - that.length = length; - } - - return that -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer$1 (arg, encodingOrOffset, length) { - if (!Buffer$1.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer$1)) { - return new Buffer$1(arg, encodingOrOffset, length) - } - - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new Error( - 'If encoding is specified then the first argument must be a string' - ) - } - return allocUnsafe(this, arg) - } - return from(this, arg, encodingOrOffset, length) -} - -Buffer$1.poolSize = 8192; // not used by this implementation - -// TODO: Legacy, not needed anymore. Remove in next major version. -Buffer$1._augment = function (arr) { - arr.__proto__ = Buffer$1.prototype; - return arr -}; - -function from (that, value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number') - } - - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - return fromArrayBuffer(that, value, encodingOrOffset, length) - } - - if (typeof value === 'string') { - return fromString(that, value, encodingOrOffset) - } - - return fromObject(that, value) -} - -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer$1.from = function (value, encodingOrOffset, length) { - return from(null, value, encodingOrOffset, length) -}; - -if (Buffer$1.TYPED_ARRAY_SUPPORT) { - Buffer$1.prototype.__proto__ = Uint8Array.prototype; - Buffer$1.__proto__ = Uint8Array; - if (typeof Symbol !== 'undefined' && Symbol.species && - Buffer$1[Symbol.species] === Buffer$1) ; -} - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be a number') - } else if (size < 0) { - throw new RangeError('"size" argument must not be negative') - } -} - -function alloc (that, size, fill, encoding) { - assertSize(size); - if (size <= 0) { - return createBuffer(that, size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(that, size).fill(fill, encoding) - : createBuffer(that, size).fill(fill) - } - return createBuffer(that, size) -} - -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer$1.alloc = function (size, fill, encoding) { - return alloc(null, size, fill, encoding) -}; - -function allocUnsafe (that, size) { - assertSize(size); - that = createBuffer(that, size < 0 ? 0 : checked(size) | 0); - if (!Buffer$1.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < size; ++i) { - that[i] = 0; - } - } - return that -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer$1.allocUnsafe = function (size) { - return allocUnsafe(null, size) -}; -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer$1.allocUnsafeSlow = function (size) { - return allocUnsafe(null, size) -}; - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8'; - } - - if (!Buffer$1.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding') - } - - var length = byteLength(string, encoding) | 0; - that = createBuffer(that, length); - - var actual = that.write(string, encoding); - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - that = that.slice(0, actual); - } - - return that -} - -function fromArrayLike (that, array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0; - that = createBuffer(that, length); - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255; - } - return that -} - -function fromArrayBuffer (that, array, byteOffset, length) { - array.byteLength; // this throws if `array` is not a valid ArrayBuffer - - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('\'offset\' is out of bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('\'length\' is out of bounds') - } - - if (byteOffset === undefined && length === undefined) { - array = new Uint8Array(array); - } else if (length === undefined) { - array = new Uint8Array(array, byteOffset); - } else { - array = new Uint8Array(array, byteOffset, length); - } - - if (Buffer$1.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = array; - that.__proto__ = Buffer$1.prototype; - } else { - // Fallback: Return an object instance of the Buffer class - that = fromArrayLike(that, array); - } - return that -} - -function fromObject (that, obj) { - if (internalIsBuffer(obj)) { - var len = checked(obj.length) | 0; - that = createBuffer(that, len); - - if (that.length === 0) { - return that - } - - obj.copy(that, 0, 0, len); - return that - } - - if (obj) { - if ((typeof ArrayBuffer !== 'undefined' && - obj.buffer instanceof ArrayBuffer) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { - return createBuffer(that, 0) - } - return fromArrayLike(that, obj) - } - - if (obj.type === 'Buffer' && isArray$2(obj.data)) { - return fromArrayLike(that, obj.data) - } - } - - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') -} - -function checked (length) { - // Note: cannot use `length < kMaxLength()` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 -} -Buffer$1.isBuffer = isBuffer$1; -function internalIsBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer$1.compare = function compare (a, b) { - if (!internalIsBuffer(a) || !internalIsBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length; - var y = b.length; - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i]; - y = b[i]; - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -}; - -Buffer$1.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -}; - -Buffer$1.concat = function concat (list, length) { - if (!isArray$2(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer$1.alloc(0) - } - - var i; - if (length === undefined) { - length = 0; - for (i = 0; i < list.length; ++i) { - length += list[i].length; - } - } - - var buffer = Buffer$1.allocUnsafe(length); - var pos = 0; - for (i = 0; i < list.length; ++i) { - var buf = list[i]; - if (!internalIsBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos); - pos += buf.length; - } - return buffer -}; - -function byteLength (string, encoding) { - if (internalIsBuffer(string)) { - return string.length - } - if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && - (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - string = '' + string; - } - - var len = string.length; - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false; - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - case undefined: - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase(); - loweredCase = true; - } - } -} -Buffer$1.byteLength = byteLength; - -function slowToString (encoding, start, end) { - var loweredCase = false; - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0; - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length; - } - - if (end <= 0) { - return '' - } - - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0; - start >>>= 0; - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8'; - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase(); - loweredCase = true; - } - } -} - -// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect -// Buffer instances. -Buffer$1.prototype._isBuffer = true; - -function swap (b, n, m) { - var i = b[n]; - b[n] = b[m]; - b[m] = i; -} - -Buffer$1.prototype.swap16 = function swap16 () { - var len = this.length; - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1); - } - return this -}; - -Buffer$1.prototype.swap32 = function swap32 () { - var len = this.length; - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3); - swap(this, i + 1, i + 2); - } - return this -}; - -Buffer$1.prototype.swap64 = function swap64 () { - var len = this.length; - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7); - swap(this, i + 1, i + 6); - swap(this, i + 2, i + 5); - swap(this, i + 3, i + 4); - } - return this -}; - -Buffer$1.prototype.toString = function toString () { - var length = this.length | 0; - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -}; - -Buffer$1.prototype.equals = function equals (b) { - if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer$1.compare(this, b) === 0 -}; - -Buffer$1.prototype.inspect = function inspect () { - var str = ''; - var max = INSPECT_MAX_BYTES; - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); - if (this.length > max) str += ' ... '; - } - return '<Buffer ' + str + '>' -}; - -Buffer$1.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (!internalIsBuffer(target)) { - throw new TypeError('Argument must be a Buffer') - } - - if (start === undefined) { - start = 0; - } - if (end === undefined) { - end = target ? target.length : 0; - } - if (thisStart === undefined) { - thisStart = 0; - } - if (thisEnd === undefined) { - thisEnd = this.length; - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0; - end >>>= 0; - thisStart >>>= 0; - thisEnd >>>= 0; - - if (this === target) return 0 - - var x = thisEnd - thisStart; - var y = end - start; - var len = Math.min(x, y); - - var thisCopy = this.slice(thisStart, thisEnd); - var targetCopy = target.slice(start, end); - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i]; - y = targetCopy[i]; - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -}; - -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset; - byteOffset = 0; - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff; - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000; - } - byteOffset = +byteOffset; // Coerce to Number. - if (isNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1); - } - - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset; - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1; - } else if (byteOffset < 0) { - if (dir) byteOffset = 0; - else return -1 - } - - // Normalize val - if (typeof val === 'string') { - val = Buffer$1.from(val, encoding); - } - - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (internalIsBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF; // Search for a byte value [0-255] - if (Buffer$1.TYPED_ARRAY_SUPPORT && - typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) - } - - throw new TypeError('val must be string, number or Buffer') -} - -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1; - var arrLength = arr.length; - var valLength = val.length; - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase(); - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2; - arrLength /= 2; - valLength /= 2; - byteOffset /= 2; - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - var i; - if (dir) { - var foundIndex = -1; - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i; - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex; - foundIndex = -1; - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; - for (i = byteOffset; i >= 0; i--) { - var found = true; - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false; - break - } - } - if (found) return i - } - } - - return -1 -} - -Buffer$1.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -}; - -Buffer$1.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -}; - -Buffer$1.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -}; - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0; - var remaining = buf.length - offset; - if (!length) { - length = remaining; - } else { - length = Number(length); - if (length > remaining) { - length = remaining; - } - } - - // must be an even number of digits - var strLen = string.length; - if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2; - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16); - if (isNaN(parsed)) return i - buf[offset + i] = parsed; - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer$1.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8'; - length = this.length; - offset = 0; - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset; - length = this.length; - offset = 0; - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0; - if (isFinite(length)) { - length = length | 0; - if (encoding === undefined) encoding = 'utf8'; - } else { - encoding = length; - length = undefined; - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset; - if (length === undefined || length > remaining) length = remaining; - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8'; - - var loweredCase = false; - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase(); - loweredCase = true; - } - } -}; - -Buffer$1.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -}; - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return fromByteArray(buf) - } else { - return fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end); - var res = []; - - var i = start; - while (i < end) { - var firstByte = buf[i]; - var codePoint = null; - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1; - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint; - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte; - } - break - case 2: - secondByte = buf[i + 1]; - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F); - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint; - } - } - break - case 3: - secondByte = buf[i + 1]; - thirdByte = buf[i + 2]; - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F); - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint; - } - } - break - case 4: - secondByte = buf[i + 1]; - thirdByte = buf[i + 2]; - fourthByte = buf[i + 3]; - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F); - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint; - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD; - bytesPerSequence = 1; - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000; - res.push(codePoint >>> 10 & 0x3FF | 0xD800); - codePoint = 0xDC00 | codePoint & 0x3FF; - } - - res.push(codePoint); - i += bytesPerSequence; - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000; - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length; - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = ''; - var i = 0; - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ); - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = ''; - end = Math.min(buf.length, end); - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F); - } - return ret -} - -function latin1Slice (buf, start, end) { - var ret = ''; - end = Math.min(buf.length, end); - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]); - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length; - - if (!start || start < 0) start = 0; - if (!end || end < 0 || end > len) end = len; - - var out = ''; - for (var i = start; i < end; ++i) { - out += toHex(buf[i]); - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end); - var res = ''; - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); - } - return res -} - -Buffer$1.prototype.slice = function slice (start, end) { - var len = this.length; - start = ~~start; - end = end === undefined ? len : ~~end; - - if (start < 0) { - start += len; - if (start < 0) start = 0; - } else if (start > len) { - start = len; - } - - if (end < 0) { - end += len; - if (end < 0) end = 0; - } else if (end > len) { - end = len; - } - - if (end < start) end = start; - - var newBuf; - if (Buffer$1.TYPED_ARRAY_SUPPORT) { - newBuf = this.subarray(start, end); - newBuf.__proto__ = Buffer$1.prototype; - } else { - var sliceLen = end - start; - newBuf = new Buffer$1(sliceLen, undefined); - for (var i = 0; i < sliceLen; ++i) { - newBuf[i] = this[i + start]; - } - } - - return newBuf -}; - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer$1.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - - var val = this[offset]; - var mul = 1; - var i = 0; - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul; - } - - return val -}; - -Buffer$1.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) { - checkOffset(offset, byteLength, this.length); - } - - var val = this[offset + --byteLength]; - var mul = 1; - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul; - } - - return val -}; - -Buffer$1.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length); - return this[offset] -}; - -Buffer$1.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - return this[offset] | (this[offset + 1] << 8) -}; - -Buffer$1.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - return (this[offset] << 8) | this[offset + 1] -}; - -Buffer$1.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -}; - -Buffer$1.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -}; - -Buffer$1.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - - var val = this[offset]; - var mul = 1; - var i = 0; - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul; - } - mul *= 0x80; - - if (val >= mul) val -= Math.pow(2, 8 * byteLength); - - return val -}; - -Buffer$1.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - - var i = byteLength; - var mul = 1; - var val = this[offset + --i]; - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul; - } - mul *= 0x80; - - if (val >= mul) val -= Math.pow(2, 8 * byteLength); - - return val -}; - -Buffer$1.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length); - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -}; - -Buffer$1.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - var val = this[offset] | (this[offset + 1] << 8); - return (val & 0x8000) ? val | 0xFFFF0000 : val -}; - -Buffer$1.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - var val = this[offset + 1] | (this[offset] << 8); - return (val & 0x8000) ? val | 0xFFFF0000 : val -}; - -Buffer$1.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -}; - -Buffer$1.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -}; - -Buffer$1.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return read(this, offset, true, 23, 4) -}; - -Buffer$1.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return read(this, offset, false, 23, 4) -}; - -Buffer$1.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length); - return read(this, offset, true, 52, 8) -}; - -Buffer$1.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length); - return read(this, offset, false, 52, 8) -}; - -function checkInt (buf, value, offset, ext, max, min) { - if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer$1.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1; - checkInt(this, value, offset, byteLength, maxBytes, 0); - } - - var mul = 1; - var i = 0; - this[offset] = value & 0xFF; - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF; - } - - return offset + byteLength -}; - -Buffer$1.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1; - checkInt(this, value, offset, byteLength, maxBytes, 0); - } - - var i = byteLength - 1; - var mul = 1; - this[offset + i] = value & 0xFF; - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF; - } - - return offset + byteLength -}; - -Buffer$1.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); - if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value); - this[offset] = (value & 0xff); - return offset + 1 -}; - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1; - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8; - } -} - -Buffer$1.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff); - this[offset + 1] = (value >>> 8); - } else { - objectWriteUInt16(this, value, offset, true); - } - return offset + 2 -}; - -Buffer$1.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8); - this[offset + 1] = (value & 0xff); - } else { - objectWriteUInt16(this, value, offset, false); - } - return offset + 2 -}; - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1; - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff; - } -} - -Buffer$1.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24); - this[offset + 2] = (value >>> 16); - this[offset + 1] = (value >>> 8); - this[offset] = (value & 0xff); - } else { - objectWriteUInt32(this, value, offset, true); - } - return offset + 4 -}; - -Buffer$1.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24); - this[offset + 1] = (value >>> 16); - this[offset + 2] = (value >>> 8); - this[offset + 3] = (value & 0xff); - } else { - objectWriteUInt32(this, value, offset, false); - } - return offset + 4 -}; - -Buffer$1.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1); - - checkInt(this, value, offset, byteLength, limit - 1, -limit); - } - - var i = 0; - var mul = 1; - var sub = 0; - this[offset] = value & 0xFF; - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1; - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; - } - - return offset + byteLength -}; - -Buffer$1.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1); - - checkInt(this, value, offset, byteLength, limit - 1, -limit); - } - - var i = byteLength - 1; - var mul = 1; - var sub = 0; - this[offset + i] = value & 0xFF; - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1; - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; - } - - return offset + byteLength -}; - -Buffer$1.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); - if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value); - if (value < 0) value = 0xff + value + 1; - this[offset] = (value & 0xff); - return offset + 1 -}; - -Buffer$1.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff); - this[offset + 1] = (value >>> 8); - } else { - objectWriteUInt16(this, value, offset, true); - } - return offset + 2 -}; - -Buffer$1.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8); - this[offset + 1] = (value & 0xff); - } else { - objectWriteUInt16(this, value, offset, false); - } - return offset + 2 -}; - -Buffer$1.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff); - this[offset + 1] = (value >>> 8); - this[offset + 2] = (value >>> 16); - this[offset + 3] = (value >>> 24); - } else { - objectWriteUInt32(this, value, offset, true); - } - return offset + 4 -}; - -Buffer$1.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); - if (value < 0) value = 0xffffffff + value + 1; - if (Buffer$1.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24); - this[offset + 1] = (value >>> 16); - this[offset + 2] = (value >>> 8); - this[offset + 3] = (value & 0xff); - } else { - objectWriteUInt32(this, value, offset, false); - } - return offset + 4 -}; - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4); - } - write(buf, value, offset, littleEndian, 23, 4); - return offset + 4 -} - -Buffer$1.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -}; - -Buffer$1.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -}; - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8); - } - write(buf, value, offset, littleEndian, 52, 8); - return offset + 8 -} - -Buffer$1.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -}; - -Buffer$1.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -}; - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer$1.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0; - if (!end && end !== 0) end = this.length; - if (targetStart >= target.length) targetStart = target.length; - if (!targetStart) targetStart = 0; - if (end > 0 && end < start) end = start; - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length; - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start; - } - - var len = end - start; - var i; - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start]; - } - } else if (len < 1000 || !Buffer$1.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; ++i) { - target[i + targetStart] = this[i + start]; - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, start + len), - targetStart - ); - } - - return len -}; - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer$1.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start; - start = 0; - end = this.length; - } else if (typeof end === 'string') { - encoding = end; - end = this.length; - } - if (val.length === 1) { - var code = val.charCodeAt(0); - if (code < 256) { - val = code; - } - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer$1.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - } else if (typeof val === 'number') { - val = val & 255; - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0; - end = end === undefined ? this.length : end >>> 0; - - if (!val) val = 0; - - var i; - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val; - } - } else { - var bytes = internalIsBuffer(val) - ? val - : utf8ToBytes(new Buffer$1(val, encoding).toString()); - var len = bytes.length; - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len]; - } - } - - return this -}; - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, ''); - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '='; - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity; - var codePoint; - var length = string.length; - var leadSurrogate = null; - var bytes = []; - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i); - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - continue - } - - // valid lead - leadSurrogate = codePoint; - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - leadSurrogate = codePoint; - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - } - - leadSurrogate = null; - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint); - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ); - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ); - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ); - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = []; - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF); - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo; - var byteArray = []; - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i); - hi = c >> 8; - lo = c % 256; - byteArray.push(lo); - byteArray.push(hi); - } - - return byteArray -} - - -function base64ToBytes (str) { - return toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i]; - } - return i -} - -function isnan (val) { - return val !== val // eslint-disable-line no-self-compare -} - - -// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence -// The _isBuffer check is for Safari 5-7 support, because it's missing -// Object.prototype.constructor. Remove this eventually -function isBuffer$1(obj) { - return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj)) -} - -function isFastBuffer (obj) { - return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) -} - -// For Node v0.10 support. Remove this eventually. -function isSlowBuffer (obj) { - return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0)) -} - -var inherits; -if (typeof Object.create === 'function'){ - inherits = function inherits(ctor, superCtor) { - // implementation from standard node.js 'util' module - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - inherits = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function () {}; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; -} - -var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || - function getOwnPropertyDescriptors(obj) { - var keys = Object.keys(obj); - var descriptors = {}; - for (var i = 0; i < keys.length; i++) { - descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]); - } - return descriptors; - }; - -var formatRegExp = /%[sdj%]/g; -function format$1(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject$1(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -} - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -function deprecate(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global$1.process)) { - return function() { - return deprecate(fn, msg).apply(this, arguments); - }; - } - - if (browser$1.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (browser$1.throwDeprecation) { - throw new Error(msg); - } else if (browser$1.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -var debugs = {}; -var debugEnviron; -function debuglog(set) { - if (isUndefined(debugEnviron)) - debugEnviron = browser$1.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = 0; - debugs[set] = function() { - var msg = format$1.apply(null, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -} - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - _extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray$1(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty$2(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty$2(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var length = output.reduce(function(prev, cur) { - if (cur.indexOf('\n') >= 0) ; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray$1(ar) { - return Array.isArray(ar); -} - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} - -function isNull(arg) { - return arg === null; -} - -function isNullOrUndefined(arg) { - return arg == null; -} - -function isNumber(arg) { - return typeof arg === 'number'; -} - -function isString(arg) { - return typeof arg === 'string'; -} - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} - -function isUndefined(arg) { - return arg === void 0; -} - -function isRegExp(re) { - return isObject$1(re) && objectToString(re) === '[object RegExp]'; -} - -function isObject$1(arg) { - return typeof arg === 'object' && arg !== null; -} - -function isDate(d) { - return isObject$1(d) && objectToString(d) === '[object Date]'; -} - -function isError(e) { - return isObject$1(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} - -function isFunction(arg) { - return typeof arg === 'function'; -} - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} - -function isBuffer(maybeBuf) { - return Buffer$1.isBuffer(maybeBuf); -} - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -function log() { - console.log('%s - %s', timestamp(), format$1.apply(null, arguments)); -} - -function _extend(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject$1(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -} -function hasOwnProperty$2(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined; - -function promisify(original) { - if (typeof original !== 'function') - throw new TypeError('The "original" argument must be of type Function'); - - if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) { - var fn = original[kCustomPromisifiedSymbol]; - if (typeof fn !== 'function') { - throw new TypeError('The "util.promisify.custom" argument must be of type Function'); - } - Object.defineProperty(fn, kCustomPromisifiedSymbol, { - value: fn, enumerable: false, writable: false, configurable: true - }); - return fn; - } - - function fn() { - var promiseResolve, promiseReject; - var promise = new Promise(function (resolve, reject) { - promiseResolve = resolve; - promiseReject = reject; - }); - - var args = []; - for (var i = 0; i < arguments.length; i++) { - args.push(arguments[i]); - } - args.push(function (err, value) { - if (err) { - promiseReject(err); - } else { - promiseResolve(value); - } - }); - - try { - original.apply(this, args); - } catch (err) { - promiseReject(err); - } - - return promise; - } - - Object.setPrototypeOf(fn, Object.getPrototypeOf(original)); - - if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, { - value: fn, enumerable: false, writable: false, configurable: true - }); - return Object.defineProperties( - fn, - getOwnPropertyDescriptors(original) - ); -} - -promisify.custom = kCustomPromisifiedSymbol; - -function callbackifyOnRejected(reason, cb) { - // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M). - // Because `null` is a special error value in callbacks which means "no error - // occurred", we error-wrap so the callback consumer can distinguish between - // "the promise rejected with null" or "the promise fulfilled with undefined". - if (!reason) { - var newReason = new Error('Promise was rejected with a falsy value'); - newReason.reason = reason; - reason = newReason; - } - return cb(reason); -} - -function callbackify(original) { - if (typeof original !== 'function') { - throw new TypeError('The "original" argument must be of type Function'); - } - - // We DO NOT return the promise as it gives the user a false sense that - // the promise is actually somehow related to the callback's execution - // and that the callback throwing will reject the promise. - function callbackified() { - var args = []; - for (var i = 0; i < arguments.length; i++) { - args.push(arguments[i]); - } - - var maybeCb = args.pop(); - if (typeof maybeCb !== 'function') { - throw new TypeError('The last argument must be of type Function'); - } - var self = this; - var cb = function() { - return maybeCb.apply(self, arguments); - }; - // In true node style we process the callback on `nextTick` with all the - // implications (stack, `uncaughtException`, `async_hooks`) - original.apply(this, args) - .then(function(ret) { browser$1.nextTick(cb.bind(null, null, ret)); }, - function(rej) { browser$1.nextTick(callbackifyOnRejected.bind(null, rej, cb)); }); - } - - Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original)); - Object.defineProperties(callbackified, getOwnPropertyDescriptors(original)); - return callbackified; -} - -var _polyfillNode_util = { - inherits: inherits, - _extend: _extend, - log: log, - isBuffer: isBuffer, - isPrimitive: isPrimitive, - isFunction: isFunction, - isError: isError, - isDate: isDate, - isObject: isObject$1, - isRegExp: isRegExp, - isUndefined: isUndefined, - isSymbol: isSymbol, - isString: isString, - isNumber: isNumber, - isNullOrUndefined: isNullOrUndefined, - isNull: isNull, - isBoolean: isBoolean, - isArray: isArray$1, - inspect: inspect, - deprecate: deprecate, - format: format$1, - debuglog: debuglog, - promisify: promisify, - callbackify: callbackify, -}; - -var _polyfillNode_util$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - _extend: _extend, - callbackify: callbackify, - debuglog: debuglog, - default: _polyfillNode_util, - deprecate: deprecate, - format: format$1, - inherits: inherits, - inspect: inspect, - isArray: isArray$1, - isBoolean: isBoolean, - isBuffer: isBuffer, - isDate: isDate, - isError: isError, - isFunction: isFunction, - isNull: isNull, - isNullOrUndefined: isNullOrUndefined, - isNumber: isNumber, - isObject: isObject$1, - isPrimitive: isPrimitive, - isRegExp: isRegExp, - isString: isString, - isSymbol: isSymbol, - isUndefined: isUndefined, - log: log, - promisify: promisify -}); - -// Copyright Joyent, Inc. and other Node 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. - - -// If obj.hasOwnProperty has been overridden, then calling -// obj.hasOwnProperty(prop) will break. -// See: https://github.com/joyent/node/issues/1707 -function hasOwnProperty$1(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; -function stringifyPrimitive(v) { - switch (typeof v) { - case 'string': - return v; - - case 'boolean': - return v ? 'true' : 'false'; - - case 'number': - return isFinite(v) ? v : ''; - - default: - return ''; - } -} - -function stringify (obj, sep, eq, name) { - sep = sep || '&'; - eq = eq || '='; - if (obj === null) { - obj = undefined; - } - - if (typeof obj === 'object') { - return map(objectKeys(obj), function(k) { - var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; - if (isArray(obj[k])) { - return map(obj[k], function(v) { - return ks + encodeURIComponent(stringifyPrimitive(v)); - }).join(sep); - } else { - return ks + encodeURIComponent(stringifyPrimitive(obj[k])); - } - }).join(sep); - - } - - if (!name) return ''; - return encodeURIComponent(stringifyPrimitive(name)) + eq + - encodeURIComponent(stringifyPrimitive(obj)); -} -function map (xs, f) { - if (xs.map) return xs.map(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - res.push(f(xs[i], i)); - } - return res; -} - -var objectKeys = Object.keys || function (obj) { - var res = []; - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); - } - return res; -}; - -function parse$1(qs, sep, eq, options) { - sep = sep || '&'; - eq = eq || '='; - var obj = {}; - - if (typeof qs !== 'string' || qs.length === 0) { - return obj; - } - - var regexp = /\+/g; - qs = qs.split(sep); - - var maxKeys = 1000; - if (options && typeof options.maxKeys === 'number') { - maxKeys = options.maxKeys; - } - - var len = qs.length; - // maxKeys <= 0 means that we should not limit keys count - if (maxKeys > 0 && len > maxKeys) { - len = maxKeys; - } - - for (var i = 0; i < len; ++i) { - var x = qs[i].replace(regexp, '%20'), - idx = x.indexOf(eq), - kstr, vstr, k, v; - - if (idx >= 0) { - kstr = x.substr(0, idx); - vstr = x.substr(idx + 1); - } else { - kstr = x; - vstr = ''; - } - - k = decodeURIComponent(kstr); - v = decodeURIComponent(vstr); - - if (!hasOwnProperty$1(obj, k)) { - obj[k] = v; - } else if (isArray(obj[k])) { - obj[k].push(v); - } else { - obj[k] = [obj[k], v]; - } - } - - return obj; -} - -// WHATWG API -const URL$1 = global$1.URL; -const URLSearchParams = global$1.URLSearchParams; -var _polyfillNode_url = { - parse: urlParse, - resolve: urlResolve, - resolveObject: urlResolveObject, - fileURLToPath: urlFileURLToPath, - format: urlFormat, - Url: Url, - - // WHATWG API - URL: URL$1, - URLSearchParams, -}; -function Url() { - this.protocol = null; - this.slashes = null; - this.auth = null; - this.host = null; - this.port = null; - this.hostname = null; - this.hash = null; - this.search = null; - this.query = null; - this.pathname = null; - this.path = null; - this.href = null; -} - -// Reference: RFC 3986, RFC 1808, RFC 2396 - -// define these here so at least they only have to be -// compiled once on the first module load. -var protocolPattern = /^([a-z0-9.+-]+:)/i, - portPattern = /:[0-9]*$/, - - // Special case for a simple path URL - simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, - - // RFC 2396: characters reserved for delimiting URLs. - // We actually just auto-escape these. - delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], - - // RFC 2396: characters not allowed for various reasons. - unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), - - // Allowed by RFCs, but cause of XSS attacks. Always escape these. - autoEscape = ['\''].concat(unwise), - // Characters that are never ever allowed in a hostname. - // Note that any invalid chars are also handled, but these - // are the ones that are *expected* to be seen, so we fast-path - // them. - nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), - hostEndingChars = ['/', '?', '#'], - hostnameMaxLen = 255, - hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, - hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, - // protocols that can allow "unsafe" and "unwise" chars. - unsafeProtocol = { - 'javascript': true, - 'javascript:': true - }, - // protocols that never have a hostname. - hostlessProtocol = { - 'javascript': true, - 'javascript:': true - }, - // protocols that always contain a // bit. - slashedProtocol = { - 'http': true, - 'https': true, - 'ftp': true, - 'gopher': true, - 'file': true, - 'http:': true, - 'https:': true, - 'ftp:': true, - 'gopher:': true, - 'file:': true - }; - -function urlParse(url, parseQueryString, slashesDenoteHost) { - if (url && isObject$1(url) && url instanceof Url) return url; - - var u = new Url; - u.parse(url, parseQueryString, slashesDenoteHost); - return u; -} -Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { - return parse(this, url, parseQueryString, slashesDenoteHost); -}; - -function parse(self, url, parseQueryString, slashesDenoteHost) { - if (!isString(url)) { - throw new TypeError('Parameter \'url\' must be a string, not ' + typeof url); - } - - // Copy chrome, IE, opera backslash-handling behavior. - // Back slashes before the query string get converted to forward slashes - // See: https://code.google.com/p/chromium/issues/detail?id=25916 - var queryIndex = url.indexOf('?'), - splitter = - (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', - uSplit = url.split(splitter), - slashRegex = /\\/g; - uSplit[0] = uSplit[0].replace(slashRegex, '/'); - url = uSplit.join(splitter); - - var rest = url; - - // trim before proceeding. - // This is to support parse stuff like " http://foo.com \n" - rest = rest.trim(); - - if (!slashesDenoteHost && url.split('#').length === 1) { - // Try fast path regexp - var simplePath = simplePathPattern.exec(rest); - if (simplePath) { - self.path = rest; - self.href = rest; - self.pathname = simplePath[1]; - if (simplePath[2]) { - self.search = simplePath[2]; - if (parseQueryString) { - self.query = parse$1(self.search.substr(1)); - } else { - self.query = self.search.substr(1); - } - } else if (parseQueryString) { - self.search = ''; - self.query = {}; - } - return self; - } - } - - var proto = protocolPattern.exec(rest); - if (proto) { - proto = proto[0]; - var lowerProto = proto.toLowerCase(); - self.protocol = lowerProto; - rest = rest.substr(proto.length); - } - - // figure out if it's got a host - // user@server is *always* interpreted as a hostname, and url - // resolution will treat //foo/bar as host=foo,path=bar because that's - // how the browser resolves relative URLs. - if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { - var slashes = rest.substr(0, 2) === '//'; - if (slashes && !(proto && hostlessProtocol[proto])) { - rest = rest.substr(2); - self.slashes = true; - } - } - var i, hec, l, p; - if (!hostlessProtocol[proto] && - (slashes || (proto && !slashedProtocol[proto]))) { - - // there's a hostname. - // the first instance of /, ?, ;, or # ends the host. - // - // If there is an @ in the hostname, then non-host chars *are* allowed - // to the left of the last @ sign, unless some host-ending character - // comes *before* the @-sign. - // URLs are obnoxious. - // - // ex: - // http://a@b@c/ => user:a@b host:c - // http://a@b?@c => user:a host:c path:/?@c - - // v0.12 TODO(isaacs): This is not quite how Chrome does things. - // Review our test case against browsers more comprehensively. - - // find the first instance of any hostEndingChars - var hostEnd = -1; - for (i = 0; i < hostEndingChars.length; i++) { - hec = rest.indexOf(hostEndingChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) - hostEnd = hec; - } - - // at this point, either we have an explicit point where the - // auth portion cannot go past, or the last @ char is the decider. - var auth, atSign; - if (hostEnd === -1) { - // atSign can be anywhere. - atSign = rest.lastIndexOf('@'); - } else { - // atSign must be in auth portion. - // http://a@b/c@d => host:b auth:a path:/c@d - atSign = rest.lastIndexOf('@', hostEnd); - } - - // Now we have a portion which is definitely the auth. - // Pull that off. - if (atSign !== -1) { - auth = rest.slice(0, atSign); - rest = rest.slice(atSign + 1); - self.auth = decodeURIComponent(auth); - } - - // the host is the remaining to the left of the first non-host char - hostEnd = -1; - for (i = 0; i < nonHostChars.length; i++) { - hec = rest.indexOf(nonHostChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) - hostEnd = hec; - } - // if we still have not hit it, then the entire thing is a host. - if (hostEnd === -1) - hostEnd = rest.length; - - self.host = rest.slice(0, hostEnd); - rest = rest.slice(hostEnd); - - // pull out port. - parseHost(self); - - // we've indicated that there is a hostname, - // so even if it's empty, it has to be present. - self.hostname = self.hostname || ''; - - // if hostname begins with [ and ends with ] - // assume that it's an IPv6 address. - var ipv6Hostname = self.hostname[0] === '[' && - self.hostname[self.hostname.length - 1] === ']'; - - // validate a little. - if (!ipv6Hostname) { - var hostparts = self.hostname.split(/\./); - for (i = 0, l = hostparts.length; i < l; i++) { - var part = hostparts[i]; - if (!part) continue; - if (!part.match(hostnamePartPattern)) { - var newpart = ''; - for (var j = 0, k = part.length; j < k; j++) { - if (part.charCodeAt(j) > 127) { - // we replace non-ASCII char with a temporary placeholder - // we need this to make sure size of hostname is not - // broken by replacing non-ASCII by nothing - newpart += 'x'; - } else { - newpart += part[j]; - } - } - // we test again with ASCII char only - if (!newpart.match(hostnamePartPattern)) { - var validParts = hostparts.slice(0, i); - var notHost = hostparts.slice(i + 1); - var bit = part.match(hostnamePartStart); - if (bit) { - validParts.push(bit[1]); - notHost.unshift(bit[2]); - } - if (notHost.length) { - rest = '/' + notHost.join('.') + rest; - } - self.hostname = validParts.join('.'); - break; - } - } - } - } - - if (self.hostname.length > hostnameMaxLen) { - self.hostname = ''; - } else { - // hostnames are always lower case. - self.hostname = self.hostname.toLowerCase(); - } - - if (!ipv6Hostname) { - // IDNA Support: Returns a punycoded representation of "domain". - // It only converts parts of the domain name that - // have non-ASCII characters, i.e. it doesn't matter if - // you call it with a domain that already is ASCII-only. - self.hostname = toASCII(self.hostname); - } - - p = self.port ? ':' + self.port : ''; - var h = self.hostname || ''; - self.host = h + p; - self.href += self.host; - - // strip [ and ] from the hostname - // the host field still retains them, though - if (ipv6Hostname) { - self.hostname = self.hostname.substr(1, self.hostname.length - 2); - if (rest[0] !== '/') { - rest = '/' + rest; - } - } - } - - // now rest is set to the post-host stuff. - // chop off any delim chars. - if (!unsafeProtocol[lowerProto]) { - - // First, make 100% sure that any "autoEscape" chars get - // escaped, even if encodeURIComponent doesn't think they - // need to be. - for (i = 0, l = autoEscape.length; i < l; i++) { - var ae = autoEscape[i]; - if (rest.indexOf(ae) === -1) - continue; - var esc = encodeURIComponent(ae); - if (esc === ae) { - esc = escape(ae); - } - rest = rest.split(ae).join(esc); - } - } - - - // chop off from the tail first. - var hash = rest.indexOf('#'); - if (hash !== -1) { - // got a fragment string. - self.hash = rest.substr(hash); - rest = rest.slice(0, hash); - } - var qm = rest.indexOf('?'); - if (qm !== -1) { - self.search = rest.substr(qm); - self.query = rest.substr(qm + 1); - if (parseQueryString) { - self.query = parse$1(self.query); - } - rest = rest.slice(0, qm); - } else if (parseQueryString) { - // no query string, but parseQueryString still requested - self.search = ''; - self.query = {}; - } - if (rest) self.pathname = rest; - if (slashedProtocol[lowerProto] && - self.hostname && !self.pathname) { - self.pathname = '/'; - } - - //to support http.request - if (self.pathname || self.search) { - p = self.pathname || ''; - var s = self.search || ''; - self.path = p + s; - } - - // finally, reconstruct the href based on what has been validated. - self.href = format(self); - return self; -} - -function urlFileURLToPath(path) { - if (typeof path === 'string') - path = new Url().parse(path); - else if (!(path instanceof Url)) - throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type ' + (typeof path) + String(path)); - if (path.protocol !== 'file:') - throw new TypeError('The URL must be of scheme file'); - return getPathFromURLPosix(path); -} - -function getPathFromURLPosix(url) { - const pathname = url.pathname; - for (let n = 0; n < pathname.length; n++) { - if (pathname[n] === '%') { - const third = pathname.codePointAt(n + 2) | 0x20; - if (pathname[n + 1] === '2' && third === 102) { - throw new TypeError( - 'must not include encoded / characters' - ); - } - } - } - return decodeURIComponent(pathname); -} - -// format a parsed object into a url string -function urlFormat(obj) { - // ensure it's an object, and not a string url. - // If it's an obj, this is a no-op. - // this way, you can call url_format() on strings - // to clean up potentially wonky urls. - if (isString(obj)) obj = parse({}, obj); - return format(obj); -} - -function format(self) { - var auth = self.auth || ''; - if (auth) { - auth = encodeURIComponent(auth); - auth = auth.replace(/%3A/i, ':'); - auth += '@'; - } - - var protocol = self.protocol || '', - pathname = self.pathname || '', - hash = self.hash || '', - host = false, - query = ''; - - if (self.host) { - host = auth + self.host; - } else if (self.hostname) { - host = auth + (self.hostname.indexOf(':') === -1 ? - self.hostname : - '[' + this.hostname + ']'); - if (self.port) { - host += ':' + self.port; - } - } - - if (self.query && - isObject$1(self.query) && - Object.keys(self.query).length) { - query = stringify(self.query); - } - - var search = self.search || (query && ('?' + query)) || ''; - - if (protocol && protocol.substr(-1) !== ':') protocol += ':'; - - // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. - // unless they had them to begin with. - if (self.slashes || - (!protocol || slashedProtocol[protocol]) && host !== false) { - host = '//' + (host || ''); - if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; - } else if (!host) { - host = ''; - } - - if (hash && hash.charAt(0) !== '#') hash = '#' + hash; - if (search && search.charAt(0) !== '?') search = '?' + search; - - pathname = pathname.replace(/[?#]/g, function(match) { - return encodeURIComponent(match); - }); - search = search.replace('#', '%23'); - - return protocol + host + pathname + search + hash; -} - -Url.prototype.format = function() { - return format(this); -}; - -function urlResolve(source, relative) { - return urlParse(source, false, true).resolve(relative); -} - -Url.prototype.resolve = function(relative) { - return this.resolveObject(urlParse(relative, false, true)).format(); -}; - -function urlResolveObject(source, relative) { - if (!source) return relative; - return urlParse(source, false, true).resolveObject(relative); -} - -Url.prototype.resolveObject = function(relative) { - if (isString(relative)) { - var rel = new Url(); - rel.parse(relative, false, true); - relative = rel; - } - - var result = new Url(); - var tkeys = Object.keys(this); - for (var tk = 0; tk < tkeys.length; tk++) { - var tkey = tkeys[tk]; - result[tkey] = this[tkey]; - } - - // hash is always overridden, no matter what. - // even href="" will remove it. - result.hash = relative.hash; - - // if the relative url is empty, then there's nothing left to do here. - if (relative.href === '') { - result.href = result.format(); - return result; - } - - // hrefs like //foo/bar always cut to the protocol. - if (relative.slashes && !relative.protocol) { - // take everything except the protocol from relative - var rkeys = Object.keys(relative); - for (var rk = 0; rk < rkeys.length; rk++) { - var rkey = rkeys[rk]; - if (rkey !== 'protocol') - result[rkey] = relative[rkey]; - } - - //urlParse appends trailing / to urls like http://www.example.com - if (slashedProtocol[result.protocol] && - result.hostname && !result.pathname) { - result.path = result.pathname = '/'; - } - - result.href = result.format(); - return result; - } - var relPath; - if (relative.protocol && relative.protocol !== result.protocol) { - // if it's a known url protocol, then changing - // the protocol does weird things - // first, if it's not file:, then we MUST have a host, - // and if there was a path - // to begin with, then we MUST have a path. - // if it is file:, then the host is dropped, - // because that's known to be hostless. - // anything else is assumed to be absolute. - if (!slashedProtocol[relative.protocol]) { - var keys = Object.keys(relative); - for (var v = 0; v < keys.length; v++) { - var k = keys[v]; - result[k] = relative[k]; - } - result.href = result.format(); - return result; - } - - result.protocol = relative.protocol; - if (!relative.host && !hostlessProtocol[relative.protocol]) { - relPath = (relative.pathname || '').split('/'); - while (relPath.length && !(relative.host = relPath.shift())); - if (!relative.host) relative.host = ''; - if (!relative.hostname) relative.hostname = ''; - if (relPath[0] !== '') relPath.unshift(''); - if (relPath.length < 2) relPath.unshift(''); - result.pathname = relPath.join('/'); - } else { - result.pathname = relative.pathname; - } - result.search = relative.search; - result.query = relative.query; - result.host = relative.host || ''; - result.auth = relative.auth; - result.hostname = relative.hostname || relative.host; - result.port = relative.port; - // to support http.request - if (result.pathname || result.search) { - var p = result.pathname || ''; - var s = result.search || ''; - result.path = p + s; - } - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; - } - - var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), - isRelAbs = ( - relative.host || - relative.pathname && relative.pathname.charAt(0) === '/' - ), - mustEndAbs = (isRelAbs || isSourceAbs || - (result.host && relative.pathname)), - removeAllDots = mustEndAbs, - srcPath = result.pathname && result.pathname.split('/') || [], - psychotic = result.protocol && !slashedProtocol[result.protocol]; - relPath = relative.pathname && relative.pathname.split('/') || []; - // if the url is a non-slashed url, then relative - // links like ../.. should be able - // to crawl up to the hostname, as well. This is strange. - // result.protocol has already been set by now. - // Later on, put the first path part into the host field. - if (psychotic) { - result.hostname = ''; - result.port = null; - if (result.host) { - if (srcPath[0] === '') srcPath[0] = result.host; - else srcPath.unshift(result.host); - } - result.host = ''; - if (relative.protocol) { - relative.hostname = null; - relative.port = null; - if (relative.host) { - if (relPath[0] === '') relPath[0] = relative.host; - else relPath.unshift(relative.host); - } - relative.host = null; - } - mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); - } - var authInHost; - if (isRelAbs) { - // it's absolute. - result.host = (relative.host || relative.host === '') ? - relative.host : result.host; - result.hostname = (relative.hostname || relative.hostname === '') ? - relative.hostname : result.hostname; - result.search = relative.search; - result.query = relative.query; - srcPath = relPath; - // fall through to the dot-handling below. - } else if (relPath.length) { - // it's relative - // throw away the existing file, and take the new path instead. - if (!srcPath) srcPath = []; - srcPath.pop(); - srcPath = srcPath.concat(relPath); - result.search = relative.search; - result.query = relative.query; - } else if (!isNullOrUndefined(relative.search)) { - // just pull out the search. - // like href='?foo'. - // Put this after the other two cases because it simplifies the booleans - if (psychotic) { - result.hostname = result.host = srcPath.shift(); - //occationaly the auth can get stuck only in host - //this especially happens in cases like - //url.resolveObject('mailto:local1@domain1', 'local2@domain2') - authInHost = result.host && result.host.indexOf('@') > 0 ? - result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.host = result.hostname = authInHost.shift(); - } - } - result.search = relative.search; - result.query = relative.query; - //to support http.request - if (!isNull(result.pathname) || !isNull(result.search)) { - result.path = (result.pathname ? result.pathname : '') + - (result.search ? result.search : ''); - } - result.href = result.format(); - return result; - } - - if (!srcPath.length) { - // no path at all. easy. - // we've already handled the other stuff above. - result.pathname = null; - //to support http.request - if (result.search) { - result.path = '/' + result.search; - } else { - result.path = null; - } - result.href = result.format(); - return result; - } - - // if a url ENDs in . or .., then it must get a trailing slash. - // however, if it ends in anything else non-slashy, - // then it must NOT get a trailing slash. - var last = srcPath.slice(-1)[0]; - var hasTrailingSlash = ( - (result.host || relative.host || srcPath.length > 1) && - (last === '.' || last === '..') || last === ''); - - // strip single dots, resolve double dots to parent dir - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = srcPath.length; i >= 0; i--) { - last = srcPath[i]; - if (last === '.') { - srcPath.splice(i, 1); - } else if (last === '..') { - srcPath.splice(i, 1); - up++; - } else if (up) { - srcPath.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (!mustEndAbs && !removeAllDots) { - for (; up--; up) { - srcPath.unshift('..'); - } - } - - if (mustEndAbs && srcPath[0] !== '' && - (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { - srcPath.unshift(''); - } - - if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { - srcPath.push(''); - } - - var isAbsolute = srcPath[0] === '' || - (srcPath[0] && srcPath[0].charAt(0) === '/'); - - // put the host back - if (psychotic) { - result.hostname = result.host = isAbsolute ? '' : - srcPath.length ? srcPath.shift() : ''; - //occationaly the auth can get stuck only in host - //this especially happens in cases like - //url.resolveObject('mailto:local1@domain1', 'local2@domain2') - authInHost = result.host && result.host.indexOf('@') > 0 ? - result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.host = result.hostname = authInHost.shift(); - } - } - - mustEndAbs = mustEndAbs || (result.host && srcPath.length); - - if (mustEndAbs && !isAbsolute) { - srcPath.unshift(''); - } - - if (!srcPath.length) { - result.pathname = null; - result.path = null; - } else { - result.pathname = srcPath.join('/'); - } - - //to support request.http - if (!isNull(result.pathname) || !isNull(result.search)) { - result.path = (result.pathname ? result.pathname : '') + - (result.search ? result.search : ''); - } - result.auth = relative.auth || result.auth; - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; -}; - -Url.prototype.parseHost = function() { - return parseHost(this); -}; - -function parseHost(self) { - var host = self.host; - var port = portPattern.exec(host); - if (port) { - port = port[0]; - if (port !== ':') { - self.port = port.substr(1); - } - host = host.substr(0, host.length - port.length); - } - if (host) self.hostname = host; -} - -var _polyfillNode_url$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - URL: URL$1, - URLSearchParams: URLSearchParams, - Url: Url, - default: _polyfillNode_url, - fileURLToPath: urlFileURLToPath, - format: urlFormat, - parse: urlParse, - resolve: urlResolve, - resolveObject: urlResolveObject -}); - -function isRelativeUrl(url) { - const firstChar = url.charAt(0); - return firstChar === "." || firstChar === "~" || firstChar === "@"; -} -const externalRE = /^(https?:)?\/\//; -function isExternalUrl(url) { - return externalRE.test(url); -} -const dataUrlRE = /^\s*data:/i; -function isDataUrl(url) { - return dataUrlRE.test(url); -} -function parseUrl(url) { - const firstChar = url.charAt(0); - if (firstChar === "~") { - const secondChar = url.charAt(1); - url = url.slice(secondChar === "/" ? 2 : 1); - } - return parseUriParts(url); -} -function parseUriParts(urlString) { - return urlParse(isString$1(urlString) ? urlString : "", false, true); -} - -var __defProp$9 = Object.defineProperty; -var __defProps$8 = Object.defineProperties; -var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols; -var __hasOwnProp$9 = Object.prototype.hasOwnProperty; -var __propIsEnum$9 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues$9 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$9.call(b, prop)) - __defNormalProp$9(a, prop, b[prop]); - if (__getOwnPropSymbols$9) - for (var prop of __getOwnPropSymbols$9(b)) { - if (__propIsEnum$9.call(b, prop)) - __defNormalProp$9(a, prop, b[prop]); - } - return a; -}; -var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b)); -const defaultAssetUrlOptions = { - base: null, - includeAbsolute: false, - tags: { - video: ["src", "poster"], - source: ["src"], - img: ["src"], - image: ["xlink:href", "href"], - use: ["xlink:href", "href"] - } -}; -const normalizeOptions = (options) => { - if (Object.keys(options).some((key) => isArray$3(options[key]))) { - return __spreadProps$8(__spreadValues$9({}, defaultAssetUrlOptions), { - tags: options - }); - } - return __spreadValues$9(__spreadValues$9({}, defaultAssetUrlOptions), options); -}; -const createAssetUrlTransformWithOptions = (options) => { - return (node, context) => transformAssetUrl(node, context, options); -}; -const transformAssetUrl = (node, context, options = defaultAssetUrlOptions) => { - if (node.type === 1) { - if (!node.props.length) { - return; - } - const tags = options.tags || defaultAssetUrlOptions.tags; - const attrs = tags[node.tag]; - const wildCardAttrs = tags["*"]; - if (!attrs && !wildCardAttrs) { - return; - } - const assetAttrs = (attrs || []).concat(wildCardAttrs || []); - node.props.forEach((attr, index) => { - if (attr.type !== 6 || !assetAttrs.includes(attr.name) || !attr.value || isExternalUrl(attr.value.content) || isDataUrl(attr.value.content) || attr.value.content[0] === "#" || !options.includeAbsolute && !isRelativeUrl(attr.value.content)) { - return; - } - const url = parseUrl(attr.value.content); - if (options.base && attr.value.content[0] === ".") { - const base = parseUrl(options.base); - const protocol = base.protocol || ""; - const host = base.host ? protocol + "//" + base.host : ""; - const basePath = base.path || "/"; - attr.value.content = host + (path.posix || path).join(basePath, url.path + (url.hash || "")); - return; - } - const exp = getImportsExpressionExp(url.path, url.hash, attr.loc, context); - node.props[index] = { - type: 7, - name: "bind", - arg: createSimpleExpression(attr.name, true, attr.loc), - exp, - modifiers: [], - loc: attr.loc - }; - }); - } -}; -function getImportsExpressionExp(path2, hash, loc, context) { - if (path2) { - let name; - let exp; - const existingIndex = context.imports.findIndex((i) => i.path === path2); - if (existingIndex > -1) { - name = `_imports_${existingIndex}`; - exp = context.imports[existingIndex].exp; - } else { - name = `_imports_${context.imports.length}`; - exp = createSimpleExpression( - name, - false, - loc, - 3 - ); - context.imports.push({ - exp, - path: decodeURIComponent(path2) - }); - } - if (!hash) { - return exp; - } - const hashExp = `${name} + '${hash}'`; - const finalExp = createSimpleExpression( - hashExp, - false, - loc, - 3 - ); - if (!context.hoistStatic) { - return finalExp; - } - const existingHoistIndex = context.hoists.findIndex((h) => { - return h && h.type === 4 && !h.isStatic && h.content === hashExp; - }); - if (existingHoistIndex > -1) { - return createSimpleExpression( - `_hoisted_${existingHoistIndex + 1}`, - false, - loc, - 3 - ); - } - return context.hoist(finalExp); - } else { - return createSimpleExpression(`''`, false, loc, 3); - } -} - -const srcsetTags = ["img", "source"]; -const escapedSpaceCharacters = /( |\\t|\\n|\\f|\\r)+/g; -const createSrcsetTransformWithOptions = (options) => { - return (node, context) => transformSrcset(node, context, options); -}; -const transformSrcset = (node, context, options = defaultAssetUrlOptions) => { - if (node.type === 1) { - if (srcsetTags.includes(node.tag) && node.props.length) { - node.props.forEach((attr, index) => { - if (attr.name === "srcset" && attr.type === 6) { - if (!attr.value) return; - const value = attr.value.content; - if (!value) return; - const imageCandidates = value.split(",").map((s) => { - const [url, descriptor] = s.replace(escapedSpaceCharacters, " ").trim().split(" ", 2); - return { url, descriptor }; - }); - for (let i = 0; i < imageCandidates.length; i++) { - const { url } = imageCandidates[i]; - if (isDataUrl(url)) { - imageCandidates[i + 1].url = url + "," + imageCandidates[i + 1].url; - imageCandidates.splice(i, 1); - } - } - const shouldProcessUrl = (url) => { - return !isExternalUrl(url) && !isDataUrl(url) && (options.includeAbsolute || isRelativeUrl(url)); - }; - if (!imageCandidates.some(({ url }) => shouldProcessUrl(url))) { - return; - } - if (options.base) { - const base = options.base; - const set = []; - let needImportTransform = false; - imageCandidates.forEach((candidate) => { - let { url, descriptor } = candidate; - descriptor = descriptor ? ` ${descriptor}` : ``; - if (url[0] === ".") { - candidate.url = (path.posix || path).join(base, url); - set.push(candidate.url + descriptor); - } else if (shouldProcessUrl(url)) { - needImportTransform = true; - } else { - set.push(url + descriptor); - } - }); - if (!needImportTransform) { - attr.value.content = set.join(", "); - return; - } - } - const compoundExpression = createCompoundExpression([], attr.loc); - imageCandidates.forEach(({ url, descriptor }, index2) => { - if (shouldProcessUrl(url)) { - const { path: path2 } = parseUrl(url); - let exp2; - if (path2) { - const existingImportsIndex = context.imports.findIndex( - (i) => i.path === path2 - ); - if (existingImportsIndex > -1) { - exp2 = createSimpleExpression( - `_imports_${existingImportsIndex}`, - false, - attr.loc, - 3 - ); - } else { - exp2 = createSimpleExpression( - `_imports_${context.imports.length}`, - false, - attr.loc, - 3 - ); - context.imports.push({ exp: exp2, path: path2 }); - } - compoundExpression.children.push(exp2); - } - } else { - const exp2 = createSimpleExpression( - `"${url}"`, - false, - attr.loc, - 3 - ); - compoundExpression.children.push(exp2); - } - const isNotLast = imageCandidates.length - 1 > index2; - if (descriptor && isNotLast) { - compoundExpression.children.push(` + ' ${descriptor}, ' + `); - } else if (descriptor) { - compoundExpression.children.push(` + ' ${descriptor}'`); - } else if (isNotLast) { - compoundExpression.children.push(` + ', ' + `); - } - }); - let exp = compoundExpression; - if (context.hoistStatic) { - exp = context.hoist(compoundExpression); - exp.constType = 3; - } - node.props[index] = { - type: 7, - name: "bind", - arg: createSimpleExpression("srcset", true, attr.loc), - exp, - modifiers: [], - loc: attr.loc - }; - } - }); - } - } -}; - -const SSR_INTERPOLATE = Symbol(`ssrInterpolate`); -const SSR_RENDER_VNODE = Symbol(`ssrRenderVNode`); -const SSR_RENDER_COMPONENT = Symbol(`ssrRenderComponent`); -const SSR_RENDER_SLOT = Symbol(`ssrRenderSlot`); -const SSR_RENDER_SLOT_INNER = Symbol(`ssrRenderSlotInner`); -const SSR_RENDER_CLASS = Symbol(`ssrRenderClass`); -const SSR_RENDER_STYLE = Symbol(`ssrRenderStyle`); -const SSR_RENDER_ATTRS = Symbol(`ssrRenderAttrs`); -const SSR_RENDER_ATTR = Symbol(`ssrRenderAttr`); -const SSR_RENDER_DYNAMIC_ATTR = Symbol(`ssrRenderDynamicAttr`); -const SSR_RENDER_LIST = Symbol(`ssrRenderList`); -const SSR_INCLUDE_BOOLEAN_ATTR = Symbol( - `ssrIncludeBooleanAttr` -); -const SSR_LOOSE_EQUAL = Symbol(`ssrLooseEqual`); -const SSR_LOOSE_CONTAIN = Symbol(`ssrLooseContain`); -const SSR_RENDER_DYNAMIC_MODEL = Symbol( - `ssrRenderDynamicModel` -); -const SSR_GET_DYNAMIC_MODEL_PROPS = Symbol( - `ssrGetDynamicModelProps` -); -const SSR_RENDER_TELEPORT = Symbol(`ssrRenderTeleport`); -const SSR_RENDER_SUSPENSE = Symbol(`ssrRenderSuspense`); -const SSR_GET_DIRECTIVE_PROPS = Symbol(`ssrGetDirectiveProps`); -const ssrHelpers = { - [SSR_INTERPOLATE]: `ssrInterpolate`, - [SSR_RENDER_VNODE]: `ssrRenderVNode`, - [SSR_RENDER_COMPONENT]: `ssrRenderComponent`, - [SSR_RENDER_SLOT]: `ssrRenderSlot`, - [SSR_RENDER_SLOT_INNER]: `ssrRenderSlotInner`, - [SSR_RENDER_CLASS]: `ssrRenderClass`, - [SSR_RENDER_STYLE]: `ssrRenderStyle`, - [SSR_RENDER_ATTRS]: `ssrRenderAttrs`, - [SSR_RENDER_ATTR]: `ssrRenderAttr`, - [SSR_RENDER_DYNAMIC_ATTR]: `ssrRenderDynamicAttr`, - [SSR_RENDER_LIST]: `ssrRenderList`, - [SSR_INCLUDE_BOOLEAN_ATTR]: `ssrIncludeBooleanAttr`, - [SSR_LOOSE_EQUAL]: `ssrLooseEqual`, - [SSR_LOOSE_CONTAIN]: `ssrLooseContain`, - [SSR_RENDER_DYNAMIC_MODEL]: `ssrRenderDynamicModel`, - [SSR_GET_DYNAMIC_MODEL_PROPS]: `ssrGetDynamicModelProps`, - [SSR_RENDER_TELEPORT]: `ssrRenderTeleport`, - [SSR_RENDER_SUSPENSE]: `ssrRenderSuspense`, - [SSR_GET_DIRECTIVE_PROPS]: `ssrGetDirectiveProps` -}; -registerRuntimeHelpers(ssrHelpers); - -const ssrTransformIf = createStructuralDirectiveTransform( - /^(if|else|else-if)$/, - processIf -); -function ssrProcessIf(node, context, disableNestedFragments = false, disableComment = false) { - const [rootBranch] = node.branches; - const ifStatement = createIfStatement( - rootBranch.condition, - processIfBranch(rootBranch, context, disableNestedFragments) - ); - context.pushStatement(ifStatement); - let currentIf = ifStatement; - for (let i = 1; i < node.branches.length; i++) { - const branch = node.branches[i]; - const branchBlockStatement = processIfBranch( - branch, - context, - disableNestedFragments - ); - if (branch.condition) { - currentIf = currentIf.alternate = createIfStatement( - branch.condition, - branchBlockStatement - ); - } else { - currentIf.alternate = branchBlockStatement; - } - } - if (!currentIf.alternate && !disableComment) { - currentIf.alternate = createBlockStatement([ - createCallExpression(`_push`, ["`<!---->`"]) - ]); - } -} -function processIfBranch(branch, context, disableNestedFragments = false) { - const { children } = branch; - const needFragmentWrapper = !disableNestedFragments && (children.length !== 1 || children[0].type !== 1) && // optimize away nested fragments when the only child is a ForNode - !(children.length === 1 && children[0].type === 11); - return processChildrenAsStatement(branch, context, needFragmentWrapper); -} - -const ssrTransformFor = createStructuralDirectiveTransform("for", processFor); -function ssrProcessFor(node, context, disableNestedFragments = false) { - const needFragmentWrapper = !disableNestedFragments && (node.children.length !== 1 || node.children[0].type !== 1); - const renderLoop = createFunctionExpression( - createForLoopParams(node.parseResult) - ); - renderLoop.body = processChildrenAsStatement( - node, - context, - needFragmentWrapper - ); - if (!disableNestedFragments) { - context.pushStringPart(`<!--[-->`); - } - context.pushStatement( - createCallExpression(context.helper(SSR_RENDER_LIST), [ - node.source, - renderLoop - ]) - ); - if (!disableNestedFragments) { - context.pushStringPart(`<!--]-->`); - } -} - -const ssrTransformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { slotName, slotProps } = processSlotOutlet(node, context); - const args = [ - `_ctx.$slots`, - slotName, - slotProps || `{}`, - // fallback content placeholder. will be replaced in the process phase - `null`, - `_push`, - `_parent` - ]; - if (context.scopeId && context.slotted !== false) { - args.push(`"${context.scopeId}-s"`); - } - let method = SSR_RENDER_SLOT; - let parent = context.parent; - if (parent) { - const children = parent.children; - if (parent.type === 10) { - parent = context.grandParent; - } - let componentType; - if (parent.type === 1 && parent.tagType === 1 && ((componentType = resolveComponentType(parent, context, true)) === TRANSITION || componentType === TRANSITION_GROUP) && children.filter((c) => c.type === 1).length === 1) { - method = SSR_RENDER_SLOT_INNER; - if (!(context.scopeId && context.slotted !== false)) { - args.push("null"); - } - args.push("true"); - } - } - node.ssrCodegenNode = createCallExpression(context.helper(method), args); - } -}; -function ssrProcessSlotOutlet(node, context) { - const renderCall = node.ssrCodegenNode; - if (node.children.length) { - const fallbackRenderFn = createFunctionExpression([]); - fallbackRenderFn.body = processChildrenAsStatement(node, context); - renderCall.arguments[3] = fallbackRenderFn; - } - if (context.withSlotScopeId) { - const slotScopeId = renderCall.arguments[6]; - renderCall.arguments[6] = slotScopeId ? `${slotScopeId} + _scopeId` : `_scopeId`; - } - context.pushStatement(node.ssrCodegenNode); -} - -function createSSRCompilerError(code, loc) { - return createCompilerError(code, loc, SSRErrorMessages); -} -const SSRErrorMessages = { - [65]: `Unsafe attribute name for SSR.`, - [66]: `Missing the 'to' prop on teleport element.`, - [67]: `Invalid AST node during SSR transform.` -}; - -function ssrProcessTeleport(node, context) { - const targetProp = findProp(node, "to"); - if (!targetProp) { - context.onError( - createSSRCompilerError(66, node.loc) - ); - return; - } - let target; - if (targetProp.type === 6) { - target = targetProp.value && createSimpleExpression(targetProp.value.content, true); - } else { - target = targetProp.exp; - } - if (!target) { - context.onError( - createSSRCompilerError( - 66, - targetProp.loc - ) - ); - return; - } - const disabledProp = findProp( - node, - "disabled", - false, - true - /* allow empty */ - ); - const disabled = disabledProp ? disabledProp.type === 6 ? `true` : disabledProp.exp || `false` : `false`; - const contentRenderFn = createFunctionExpression( - [`_push`], - void 0, - // Body is added later - true, - // newline - false, - // isSlot - node.loc - ); - contentRenderFn.body = processChildrenAsStatement(node, context); - context.pushStatement( - createCallExpression(context.helper(SSR_RENDER_TELEPORT), [ - `_push`, - contentRenderFn, - target, - disabled, - `_parent` - ]) - ); -} - -const wipMap$3 = /* @__PURE__ */ new WeakMap(); -function ssrTransformSuspense(node, context) { - return () => { - if (node.children.length) { - const wipEntry = { - slotsExp: null, - // to be immediately set - wipSlots: [] - }; - wipMap$3.set(node, wipEntry); - wipEntry.slotsExp = buildSlots( - node, - context, - (_props, _vForExp, children, loc) => { - const fn = createFunctionExpression( - [], - void 0, - // no return, assign body later - true, - // newline - false, - // suspense slots are not treated as normal slots - loc - ); - wipEntry.wipSlots.push({ - fn, - children - }); - return fn; - } - ).slots; - } - }; -} -function ssrProcessSuspense(node, context) { - const wipEntry = wipMap$3.get(node); - if (!wipEntry) { - return; - } - const { slotsExp, wipSlots } = wipEntry; - for (let i = 0; i < wipSlots.length; i++) { - const slot = wipSlots[i]; - slot.fn.body = processChildrenAsStatement(slot, context); - } - context.pushStatement( - createCallExpression(context.helper(SSR_RENDER_SUSPENSE), [ - `_push`, - slotsExp - ]) - ); -} - -const rawChildrenMap = /* @__PURE__ */ new WeakMap(); -const ssrTransformElement = (node, context) => { - if (node.type !== 1 || node.tagType !== 0) { - return; - } - return function ssrPostTransformElement() { - const openTag = [`<${node.tag}`]; - const needTagForRuntime = node.tag === "textarea" || node.tag.indexOf("-") > 0; - const hasDynamicVBind = hasDynamicKeyVBind(node); - const hasCustomDir = node.props.some( - (p) => p.type === 7 && !isBuiltInDirective(p.name) - ); - const needMergeProps = hasDynamicVBind || hasCustomDir; - if (needMergeProps) { - const { props, directives } = buildProps( - node, - context, - node.props, - false, - false, - true - ); - if (props || directives.length) { - const mergedProps = buildSSRProps(props, directives, context); - const propsExp = createCallExpression( - context.helper(SSR_RENDER_ATTRS), - [mergedProps] - ); - if (node.tag === "textarea") { - const existingText = node.children[0]; - if (!existingText || existingText.type !== 5) { - const tempId = `_temp${context.temps++}`; - propsExp.arguments = [ - createAssignmentExpression( - createSimpleExpression(tempId, false), - mergedProps - ) - ]; - rawChildrenMap.set( - node, - createCallExpression(context.helper(SSR_INTERPOLATE), [ - createConditionalExpression( - createSimpleExpression(`"value" in ${tempId}`, false), - createSimpleExpression(`${tempId}.value`, false), - createSimpleExpression( - existingText ? existingText.content : ``, - true - ), - false - ) - ]) - ); - } - } else if (node.tag === "input") { - const vModel = findVModel(node); - if (vModel) { - const tempId = `_temp${context.temps++}`; - const tempExp = createSimpleExpression(tempId, false); - propsExp.arguments = [ - createSequenceExpression([ - createAssignmentExpression(tempExp, mergedProps), - createCallExpression(context.helper(MERGE_PROPS), [ - tempExp, - createCallExpression( - context.helper(SSR_GET_DYNAMIC_MODEL_PROPS), - [ - tempExp, - // existing props - vModel.exp - // model - ] - ) - ]) - ]) - ]; - } - } else if (directives.length && !node.children.length) { - const vText = findDir(node, "text"); - if (!vText) { - const tempId = `_temp${context.temps++}`; - propsExp.arguments = [ - createAssignmentExpression( - createSimpleExpression(tempId, false), - mergedProps - ) - ]; - rawChildrenMap.set( - node, - createConditionalExpression( - createSimpleExpression(`"textContent" in ${tempId}`, false), - createCallExpression(context.helper(SSR_INTERPOLATE), [ - createSimpleExpression(`${tempId}.textContent`, false) - ]), - createSimpleExpression(`${tempId}.innerHTML ?? ''`, false), - false - ) - ); - } - } - if (needTagForRuntime) { - propsExp.arguments.push(`"${node.tag}"`); - } - openTag.push(propsExp); - } - } - let dynamicClassBinding = void 0; - let staticClassBinding = void 0; - let dynamicStyleBinding = void 0; - for (let i = 0; i < node.props.length; i++) { - const prop = node.props[i]; - if (node.tag === "input" && isTrueFalseValue(prop)) { - continue; - } - if (prop.type === 7) { - if (prop.name === "html" && prop.exp) { - rawChildrenMap.set( - node, - createCompoundExpression([`(`, prop.exp, `) ?? ''`]) - ); - } else if (prop.name === "text" && prop.exp) { - node.children = [createInterpolation(prop.exp, prop.loc)]; - } else if (prop.name === "slot") { - context.onError( - createCompilerError(40, prop.loc) - ); - } else if (isTextareaWithValue(node, prop) && prop.exp) { - if (!needMergeProps) { - node.children = [createInterpolation(prop.exp, prop.loc)]; - } - } else if (!needMergeProps && prop.name !== "on") { - const directiveTransform = context.directiveTransforms[prop.name]; - if (directiveTransform) { - const { props, ssrTagParts } = directiveTransform( - prop, - node, - context - ); - if (ssrTagParts) { - openTag.push(...ssrTagParts); - } - for (let j = 0; j < props.length; j++) { - const { key, value } = props[j]; - if (isStaticExp(key)) { - let attrName = key.content; - if (attrName === "key" || attrName === "ref") { - continue; - } - if (attrName === "class") { - openTag.push( - ` class="`, - dynamicClassBinding = createCallExpression( - context.helper(SSR_RENDER_CLASS), - [value] - ), - `"` - ); - } else if (attrName === "style") { - if (dynamicStyleBinding) { - mergeCall(dynamicStyleBinding, value); - } else { - openTag.push( - ` style="`, - dynamicStyleBinding = createCallExpression( - context.helper(SSR_RENDER_STYLE), - [value] - ), - `"` - ); - } - } else { - attrName = node.tag.indexOf("-") > 0 ? attrName : propsToAttrMap[attrName] || attrName.toLowerCase(); - if (isBooleanAttr(attrName)) { - openTag.push( - createConditionalExpression( - createCallExpression( - context.helper(SSR_INCLUDE_BOOLEAN_ATTR), - [value] - ), - createSimpleExpression(" " + attrName, true), - createSimpleExpression("", true), - false - ) - ); - } else if (isSSRSafeAttrName(attrName)) { - openTag.push( - createCallExpression(context.helper(SSR_RENDER_ATTR), [ - key, - value - ]) - ); - } else { - context.onError( - createSSRCompilerError( - 65, - key.loc - ) - ); - } - } - } else { - const args = [key, value]; - if (needTagForRuntime) { - args.push(`"${node.tag}"`); - } - openTag.push( - createCallExpression( - context.helper(SSR_RENDER_DYNAMIC_ATTR), - args - ) - ); - } - } - } - } - } else { - const name = prop.name; - if (node.tag === "textarea" && name === "value" && prop.value) { - rawChildrenMap.set(node, escapeHtml(prop.value.content)); - } else if (!needMergeProps) { - if (name === "key" || name === "ref") { - continue; - } - if (name === "class" && prop.value) { - staticClassBinding = JSON.stringify(prop.value.content); - } - openTag.push( - ` ${prop.name}` + (prop.value ? `="${escapeHtml(prop.value.content)}"` : ``) - ); - } - } - } - if (dynamicClassBinding && staticClassBinding) { - mergeCall(dynamicClassBinding, staticClassBinding); - removeStaticBinding(openTag, "class"); - } - if (context.scopeId) { - openTag.push(` ${context.scopeId}`); - } - node.ssrCodegenNode = createTemplateLiteral(openTag); - }; -}; -function buildSSRProps(props, directives, context) { - let mergePropsArgs = []; - if (props) { - if (props.type === 14) { - mergePropsArgs = props.arguments; - } else { - mergePropsArgs.push(props); - } - } - if (directives.length) { - for (const dir of directives) { - mergePropsArgs.push( - createCallExpression(context.helper(SSR_GET_DIRECTIVE_PROPS), [ - `_ctx`, - ...buildDirectiveArgs(dir, context).elements - ]) - ); - } - } - return mergePropsArgs.length > 1 ? createCallExpression(context.helper(MERGE_PROPS), mergePropsArgs) : mergePropsArgs[0]; -} -function isTrueFalseValue(prop) { - if (prop.type === 7) { - return prop.name === "bind" && prop.arg && isStaticExp(prop.arg) && (prop.arg.content === "true-value" || prop.arg.content === "false-value"); - } else { - return prop.name === "true-value" || prop.name === "false-value"; - } -} -function isTextareaWithValue(node, prop) { - return !!(node.tag === "textarea" && prop.name === "bind" && isStaticArgOf(prop.arg, "value")); -} -function mergeCall(call, arg) { - const existing = call.arguments[0]; - if (existing.type === 17) { - existing.elements.push(arg); - } else { - call.arguments[0] = createArrayExpression([existing, arg]); - } -} -function removeStaticBinding(tag, binding) { - const regExp = new RegExp(`^ ${binding}=".+"$`); - const i = tag.findIndex((e) => typeof e === "string" && regExp.test(e)); - if (i > -1) { - tag.splice(i, 1); - } -} -function findVModel(node) { - return node.props.find( - (p) => p.type === 7 && p.name === "model" && p.exp - ); -} -function ssrProcessElement(node, context) { - const isVoidTag = context.options.isVoidTag || NO; - const elementsToAdd = node.ssrCodegenNode.elements; - for (let j = 0; j < elementsToAdd.length; j++) { - context.pushStringPart(elementsToAdd[j]); - } - if (context.withSlotScopeId) { - context.pushStringPart(createSimpleExpression(`_scopeId`, false)); - } - context.pushStringPart(`>`); - const rawChildren = rawChildrenMap.get(node); - if (rawChildren) { - context.pushStringPart(rawChildren); - } else if (node.children.length) { - processChildren(node, context); - } - if (!isVoidTag(node.tag)) { - context.pushStringPart(`</${node.tag}>`); - } -} - -const wipMap$2 = /* @__PURE__ */ new WeakMap(); -function ssrTransformTransitionGroup(node, context) { - return () => { - const tag = findProp(node, "tag"); - if (tag) { - const otherProps = node.props.filter((p) => p !== tag); - const { props, directives } = buildProps( - node, - context, - otherProps, - true, - false, - true - ); - let propsExp = null; - if (props || directives.length) { - propsExp = createCallExpression(context.helper(SSR_RENDER_ATTRS), [ - buildSSRProps(props, directives, context) - ]); - } - wipMap$2.set(node, { - tag, - propsExp, - scopeId: context.scopeId || null - }); - } - }; -} -function ssrProcessTransitionGroup(node, context) { - const entry = wipMap$2.get(node); - if (entry) { - const { tag, propsExp, scopeId } = entry; - if (tag.type === 7) { - context.pushStringPart(`<`); - context.pushStringPart(tag.exp); - if (propsExp) { - context.pushStringPart(propsExp); - } - if (scopeId) { - context.pushStringPart(` ${scopeId}`); - } - context.pushStringPart(`>`); - processChildren( - node, - context, - false, - /** - * TransitionGroup has the special runtime behavior of flattening and - * concatenating all children into a single fragment (in order for them to - * be patched using the same key map) so we need to account for that here - * by disabling nested fragment wrappers from being generated. - */ - true, - /** - * TransitionGroup filters out comment children at runtime and thus - * doesn't expect comments to be present during hydration. We need to - * account for that by disabling the empty comment that is otherwise - * rendered for a falsy v-if that has no v-else specified. (#6715) - */ - true - ); - context.pushStringPart(`</`); - context.pushStringPart(tag.exp); - context.pushStringPart(`>`); - } else { - context.pushStringPart(`<${tag.value.content}`); - if (propsExp) { - context.pushStringPart(propsExp); - } - if (scopeId) { - context.pushStringPart(` ${scopeId}`); - } - context.pushStringPart(`>`); - processChildren(node, context, false, true, true); - context.pushStringPart(`</${tag.value.content}>`); - } - } else { - processChildren(node, context, true, true, true); - } -} - -const wipMap$1 = /* @__PURE__ */ new WeakMap(); -function ssrTransformTransition(node, context) { - return () => { - const appear = findProp(node, "appear", false, true); - wipMap$1.set(node, !!appear); - }; -} -function ssrProcessTransition(node, context) { - node.children = node.children.filter((c) => c.type !== 3); - const appear = wipMap$1.get(node); - if (appear) { - context.pushStringPart(`<template>`); - processChildren(node, context, false, true); - context.pushStringPart(`</template>`); - } else { - processChildren(node, context, false, true); - } -} - -var __defProp$8 = Object.defineProperty; -var __defProps$7 = Object.defineProperties; -var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols; -var __hasOwnProp$8 = Object.prototype.hasOwnProperty; -var __propIsEnum$8 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues$8 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$8.call(b, prop)) - __defNormalProp$8(a, prop, b[prop]); - if (__getOwnPropSymbols$8) - for (var prop of __getOwnPropSymbols$8(b)) { - if (__propIsEnum$8.call(b, prop)) - __defNormalProp$8(a, prop, b[prop]); - } - return a; -}; -var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b)); -const wipMap = /* @__PURE__ */ new WeakMap(); -const WIP_SLOT = Symbol(); -const componentTypeMap = /* @__PURE__ */ new WeakMap(); -const ssrTransformComponent = (node, context) => { - if (node.type !== 1 || node.tagType !== 1) { - return; - } - const component = resolveComponentType( - node, - context, - true - /* ssr */ - ); - const isDynamicComponent = isObject$2(component) && component.callee === RESOLVE_DYNAMIC_COMPONENT; - componentTypeMap.set(node, component); - if (isSymbol$1(component)) { - if (component === SUSPENSE) { - return ssrTransformSuspense(node, context); - } else if (component === TRANSITION_GROUP) { - return ssrTransformTransitionGroup(node, context); - } else if (component === TRANSITION) { - return ssrTransformTransition(node); - } - return; - } - const vnodeBranches = []; - const clonedNode = clone(node); - return function ssrPostTransformComponent() { - if (clonedNode.children.length) { - buildSlots(clonedNode, context, (props, vFor, children) => { - vnodeBranches.push( - createVNodeSlotBranch(props, vFor, children, context) - ); - return createFunctionExpression(void 0); - }); - } - let propsExp = `null`; - if (node.props.length) { - const { props, directives } = buildProps( - node, - context, - void 0, - true, - isDynamicComponent - ); - if (props || directives.length) { - propsExp = buildSSRProps(props, directives, context); - } - } - const wipEntries = []; - wipMap.set(node, wipEntries); - const buildSSRSlotFn = (props, _vForExp, children, loc) => { - const param0 = props && stringifyExpression(props) || `_`; - const fn = createFunctionExpression( - [param0, `_push`, `_parent`, `_scopeId`], - void 0, - // no return, assign body later - true, - // newline - true, - // isSlot - loc - ); - wipEntries.push({ - type: WIP_SLOT, - fn, - children, - // also collect the corresponding vnode branch built earlier - vnodeBranch: vnodeBranches[wipEntries.length] - }); - return fn; - }; - const slots = node.children.length ? buildSlots(node, context, buildSSRSlotFn).slots : `null`; - if (typeof component !== "string") { - node.ssrCodegenNode = createCallExpression( - context.helper(SSR_RENDER_VNODE), - [ - `_push`, - createCallExpression(context.helper(CREATE_VNODE), [ - component, - propsExp, - slots - ]), - `_parent` - ] - ); - } else { - node.ssrCodegenNode = createCallExpression( - context.helper(SSR_RENDER_COMPONENT), - [component, propsExp, slots, `_parent`] - ); - } - }; -}; -function ssrProcessComponent(node, context, parent) { - const component = componentTypeMap.get(node); - if (!node.ssrCodegenNode) { - if (component === TELEPORT) { - return ssrProcessTeleport(node, context); - } else if (component === SUSPENSE) { - return ssrProcessSuspense(node, context); - } else if (component === TRANSITION_GROUP) { - return ssrProcessTransitionGroup(node, context); - } else { - if (parent.type === WIP_SLOT) { - context.pushStringPart(``); - } - if (component === TRANSITION) { - return ssrProcessTransition(node, context); - } - processChildren(node, context); - } - } else { - const wipEntries = wipMap.get(node) || []; - for (let i = 0; i < wipEntries.length; i++) { - const { fn, vnodeBranch } = wipEntries[i]; - fn.body = createIfStatement( - createSimpleExpression(`_push`, false), - processChildrenAsStatement( - wipEntries[i], - context, - false, - true - ), - vnodeBranch - ); - } - if (context.withSlotScopeId) { - node.ssrCodegenNode.arguments.push(`_scopeId`); - } - if (typeof component === "string") { - context.pushStatement( - createCallExpression(`_push`, [node.ssrCodegenNode]) - ); - } else { - context.pushStatement(node.ssrCodegenNode); - } - } -} -const rawOptionsMap = /* @__PURE__ */ new WeakMap(); -const [baseNodeTransforms, baseDirectiveTransforms] = getBaseTransformPreset(true); -const vnodeNodeTransforms = [...baseNodeTransforms, ...DOMNodeTransforms]; -const vnodeDirectiveTransforms = __spreadValues$8(__spreadValues$8({}, baseDirectiveTransforms), DOMDirectiveTransforms); -function createVNodeSlotBranch(slotProps, vFor, children, parentContext) { - const rawOptions = rawOptionsMap.get(parentContext.root); - const subOptions = __spreadProps$7(__spreadValues$8({}, rawOptions), { - // overwrite with vnode-based transforms - nodeTransforms: [ - ...vnodeNodeTransforms, - ...rawOptions.nodeTransforms || [] - ], - directiveTransforms: __spreadValues$8(__spreadValues$8({}, vnodeDirectiveTransforms), rawOptions.directiveTransforms || {}) - }); - const wrapperProps = []; - if (slotProps) { - wrapperProps.push({ - type: 7, - name: "slot", - exp: slotProps, - arg: void 0, - modifiers: [], - loc: locStub - }); - } - if (vFor) { - wrapperProps.push(extend({}, vFor)); - } - const wrapperNode = { - type: 1, - ns: 0, - tag: "template", - tagType: 3, - props: wrapperProps, - children, - loc: locStub, - codegenNode: void 0 - }; - subTransform(wrapperNode, subOptions, parentContext); - return createReturnStatement(children); -} -function subTransform(node, options, parentContext) { - const childRoot = createRoot([node]); - const childContext = createTransformContext(childRoot, options); - childContext.ssr = false; - childContext.scopes = __spreadValues$8({}, parentContext.scopes); - childContext.identifiers = __spreadValues$8({}, parentContext.identifiers); - childContext.imports = parentContext.imports; - traverseNode(childRoot, childContext); - ["helpers", "components", "directives"].forEach((key) => { - childContext[key].forEach((value, helperKey) => { - if (key === "helpers") { - const parentCount = parentContext.helpers.get(helperKey); - if (parentCount === void 0) { - parentContext.helpers.set(helperKey, value); - } else { - parentContext.helpers.set(helperKey, value + parentCount); - } - } else { - parentContext[key].add(value); - } - }); - }); -} -function clone(v) { - if (isArray$3(v)) { - return v.map(clone); - } else if (isPlainObject(v)) { - const res = {}; - for (const key in v) { - res[key] = clone(v[key]); - } - return res; - } else { - return v; - } -} - -function ssrCodegenTransform(ast, options) { - const context = createSSRTransformContext(ast, options); - if (options.ssrCssVars) { - const cssContext = createTransformContext(createRoot([]), options); - const varsExp = processExpression( - createSimpleExpression(options.ssrCssVars, false), - cssContext - ); - context.body.push( - createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`]) - ); - Array.from(cssContext.helpers.keys()).forEach((helper) => { - ast.helpers.add(helper); - }); - } - const isFragment = ast.children.length > 1 && ast.children.some((c) => !isText$1(c)); - processChildren(ast, context, isFragment); - ast.codegenNode = createBlockStatement(context.body); - ast.ssrHelpers = Array.from( - /* @__PURE__ */ new Set([ - ...Array.from(ast.helpers).filter((h) => h in ssrHelpers), - ...context.helpers - ]) - ); - ast.helpers = new Set(Array.from(ast.helpers).filter((h) => !(h in ssrHelpers))); -} -function createSSRTransformContext(root, options, helpers = /* @__PURE__ */ new Set(), withSlotScopeId = false) { - const body = []; - let currentString = null; - return { - root, - options, - body, - helpers, - withSlotScopeId, - onError: options.onError || ((e) => { - throw e; - }), - helper(name) { - helpers.add(name); - return name; - }, - pushStringPart(part) { - if (!currentString) { - const currentCall = createCallExpression(`_push`); - body.push(currentCall); - currentString = createTemplateLiteral([]); - currentCall.arguments.push(currentString); - } - const bufferedElements = currentString.elements; - const lastItem = bufferedElements[bufferedElements.length - 1]; - if (isString$1(part) && isString$1(lastItem)) { - bufferedElements[bufferedElements.length - 1] += part; - } else { - bufferedElements.push(part); - } - }, - pushStatement(statement) { - currentString = null; - body.push(statement); - } - }; -} -function createChildContext(parent, withSlotScopeId = parent.withSlotScopeId) { - return createSSRTransformContext( - parent.root, - parent.options, - parent.helpers, - withSlotScopeId - ); -} -function processChildren(parent, context, asFragment = false, disableNestedFragments = false, disableComment = false) { - if (asFragment) { - context.pushStringPart(`<!--[-->`); - } - const { children } = parent; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1: - switch (child.tagType) { - case 0: - ssrProcessElement(child, context); - break; - case 1: - ssrProcessComponent(child, context, parent); - break; - case 2: - ssrProcessSlotOutlet(child, context); - break; - case 3: - break; - default: - context.onError( - createSSRCompilerError( - 67, - child.loc - ) - ); - const exhaustiveCheck2 = child; - return exhaustiveCheck2; - } - break; - case 2: - context.pushStringPart(escapeHtml(child.content)); - break; - case 3: - if (!disableComment) { - context.pushStringPart(`<!--${child.content}-->`); - } - break; - case 5: - context.pushStringPart( - createCallExpression(context.helper(SSR_INTERPOLATE), [ - child.content - ]) - ); - break; - case 9: - ssrProcessIf(child, context, disableNestedFragments, disableComment); - break; - case 11: - ssrProcessFor(child, context, disableNestedFragments); - break; - case 10: - break; - case 12: - case 8: - break; - default: - context.onError( - createSSRCompilerError( - 67, - child.loc - ) - ); - const exhaustiveCheck = child; - return exhaustiveCheck; - } - } - if (asFragment) { - context.pushStringPart(`<!--]-->`); - } -} -function processChildrenAsStatement(parent, parentContext, asFragment = false, withSlotScopeId = parentContext.withSlotScopeId) { - const childContext = createChildContext(parentContext, withSlotScopeId); - processChildren(parent, childContext, asFragment); - return createBlockStatement(childContext.body); -} - -const ssrTransformModel = (dir, node, context) => { - const model = dir.exp; - function checkDuplicatedValue() { - const value = findProp(node, "value"); - if (value) { - context.onError( - createDOMCompilerError( - 60, - value.loc - ) - ); - } - } - function processOption(plainNode) { - if (plainNode.tag === "option") { - if (plainNode.props.findIndex((p) => p.name === "selected") === -1) { - const value = findValueBinding(plainNode); - plainNode.ssrCodegenNode.elements.push( - createConditionalExpression( - createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [ - createConditionalExpression( - createCallExpression(`Array.isArray`, [model]), - createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ - model, - value - ]), - createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ - model, - value - ]) - ) - ]), - createSimpleExpression(" selected", true), - createSimpleExpression("", true), - false - ) - ); - } - } else if (plainNode.tag === "optgroup") { - plainNode.children.forEach( - (option) => processOption(option) - ); - } - } - if (node.tagType === 0) { - const res = { props: [] }; - const defaultProps = [ - // default value binding for text type inputs - createObjectProperty(`value`, model) - ]; - if (node.tag === "input") { - const type = findProp(node, "type"); - if (type) { - const value = findValueBinding(node); - if (type.type === 7) { - res.ssrTagParts = [ - createCallExpression(context.helper(SSR_RENDER_DYNAMIC_MODEL), [ - type.exp, - model, - value - ]) - ]; - } else if (type.value) { - switch (type.value.content) { - case "radio": - res.props = [ - createObjectProperty( - `checked`, - createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ - model, - value - ]) - ) - ]; - break; - case "checkbox": - const trueValueBinding = findProp(node, "true-value"); - if (trueValueBinding) { - const trueValue = trueValueBinding.type === 6 ? JSON.stringify(trueValueBinding.value.content) : trueValueBinding.exp; - res.props = [ - createObjectProperty( - `checked`, - createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ - model, - trueValue - ]) - ) - ]; - } else { - res.props = [ - createObjectProperty( - `checked`, - createConditionalExpression( - createCallExpression(`Array.isArray`, [model]), - createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ - model, - value - ]), - model - ) - ) - ]; - } - break; - case "file": - context.onError( - createDOMCompilerError( - 59, - dir.loc - ) - ); - break; - default: - checkDuplicatedValue(); - res.props = defaultProps; - break; - } - } - } else if (hasDynamicKeyVBind(node)) ; else { - checkDuplicatedValue(); - res.props = defaultProps; - } - } else if (node.tag === "textarea") { - checkDuplicatedValue(); - node.children = [createInterpolation(model, model.loc)]; - } else if (node.tag === "select") { - const processChildren = (children) => { - children.forEach((child) => { - if (child.type === 1) { - processOption(child); - } else if (child.type === 11) { - processChildren(child.children); - } else if (child.type === 9) { - child.branches.forEach((b) => processChildren(b.children)); - } - }); - }; - processChildren(node.children); - } else { - context.onError( - createDOMCompilerError( - 57, - dir.loc - ) - ); - } - return res; - } else { - return transformModel$1(dir, node, context); - } -}; -function findValueBinding(node) { - const valueBinding = findProp(node, "value"); - return valueBinding ? valueBinding.type === 7 ? valueBinding.exp : createSimpleExpression(valueBinding.value.content, true) : createSimpleExpression(`null`, false); -} - -const ssrTransformShow = (dir, node, context) => { - if (!dir.exp) { - context.onError( - createDOMCompilerError(61) - ); - } - return { - props: [ - createObjectProperty( - `style`, - createConditionalExpression( - dir.exp, - createSimpleExpression(`null`, false), - createObjectExpression([ - createObjectProperty( - `display`, - createSimpleExpression(`none`, true) - ) - ]), - false - ) - ) - ] - }; -}; - -const filterChild = (node) => node.children.filter((n) => n.type !== 3); -const hasSingleChild = (node) => filterChild(node).length === 1; -const ssrInjectFallthroughAttrs = (node, context) => { - if (node.type === 0) { - context.identifiers._attrs = 1; - } - if (node.type === 1 && node.tagType === 1 && (node.tag === "transition" || node.tag === "Transition" || node.tag === "KeepAlive" || node.tag === "keep-alive")) { - const rootChildren = filterChild(context.root); - if (rootChildren.length === 1 && rootChildren[0] === node) { - if (hasSingleChild(node)) { - injectFallthroughAttrs(node.children[0]); - } - return; - } - } - const parent = context.parent; - if (!parent || parent.type !== 0) { - return; - } - if (node.type === 10 && hasSingleChild(node)) { - let hasEncounteredIf = false; - for (const c of filterChild(parent)) { - if (c.type === 9 || c.type === 1 && findDir(c, "if")) { - if (hasEncounteredIf) return; - hasEncounteredIf = true; - } else if ( - // node before v-if - !hasEncounteredIf || // non else nodes - !(c.type === 1 && findDir(c, /else/, true)) - ) { - return; - } - } - injectFallthroughAttrs(node.children[0]); - } else if (hasSingleChild(parent)) { - injectFallthroughAttrs(node); - } -}; -function injectFallthroughAttrs(node) { - if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !findDir(node, "for")) { - node.props.push({ - type: 7, - name: "bind", - arg: void 0, - exp: createSimpleExpression(`_attrs`, false), - modifiers: [], - loc: locStub - }); - } -} - -const ssrInjectCssVars = (node, context) => { - if (!context.ssrCssVars) { - return; - } - if (node.type === 0) { - context.identifiers._cssVars = 1; - } - const parent = context.parent; - if (!parent || parent.type !== 0) { - return; - } - if (node.type === 10) { - for (const child of node.children) { - injectCssVars(child); - } - } else { - injectCssVars(node); - } -}; -function injectCssVars(node) { - if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !findDir(node, "for")) { - if (node.tag === "suspense" || node.tag === "Suspense") { - for (const child of node.children) { - if (child.type === 1 && child.tagType === 3) { - child.children.forEach(injectCssVars); - } else { - injectCssVars(child); - } - } - } else { - node.props.push({ - type: 7, - name: "bind", - arg: void 0, - exp: createSimpleExpression(`_cssVars`, false), - modifiers: [], - loc: locStub - }); - } - } -} - -var __defProp$7 = Object.defineProperty; -var __defProps$6 = Object.defineProperties; -var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols; -var __hasOwnProp$7 = Object.prototype.hasOwnProperty; -var __propIsEnum$7 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues$7 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$7.call(b, prop)) - __defNormalProp$7(a, prop, b[prop]); - if (__getOwnPropSymbols$7) - for (var prop of __getOwnPropSymbols$7(b)) { - if (__propIsEnum$7.call(b, prop)) - __defNormalProp$7(a, prop, b[prop]); - } - return a; -}; -var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b)); -function compile(source, options = {}) { - options = __spreadProps$6(__spreadValues$7(__spreadValues$7({}, options), parserOptions), { - ssr: true, - inSSR: true, - scopeId: options.mode === "function" ? null : options.scopeId, - // always prefix since compiler-ssr doesn't have size concern - prefixIdentifiers: true, - // disable optimizations that are unnecessary for ssr - cacheHandlers: false, - hoistStatic: false - }); - const ast = typeof source === "string" ? baseParse(source, options) : source; - rawOptionsMap.set(ast, options); - transform(ast, __spreadProps$6(__spreadValues$7({}, options), { - hoistStatic: false, - nodeTransforms: [ - ssrTransformIf, - ssrTransformFor, - trackVForSlotScopes, - transformExpression, - ssrTransformSlotOutlet, - ssrInjectFallthroughAttrs, - ssrInjectCssVars, - ssrTransformElement, - ssrTransformComponent, - trackSlotScopes, - transformStyle, - ...options.nodeTransforms || [] - // user transforms - ], - directiveTransforms: __spreadValues$7({ - // reusing core v-bind - bind: transformBind, - on: transformOn$1, - // model and show have dedicated SSR handling - model: ssrTransformModel, - show: ssrTransformShow, - // the following are ignored during SSR - // on: noopDirectiveTransform, - cloak: noopDirectiveTransform, - once: noopDirectiveTransform, - memo: noopDirectiveTransform - }, options.directiveTransforms || {}) - })); - ssrCodegenTransform(ast, options); - return generate(ast, options); -} - -var CompilerSSR = /*#__PURE__*/Object.freeze({ - __proto__: null, - compile: compile -}); - -var _polyfillNode_fs = {}; - -var _polyfillNode_fs$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - default: _polyfillNode_fs -}); - -var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_fs$1); - -var require$$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_path); - -var require$$0 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_util$1); - -const hasWarned = {}; -function warnOnce$1(msg) { - const isNodeProd = typeof process !== "undefined" && process.env.NODE_ENV === "production"; - if (!isNodeProd && true && !hasWarned[msg]) { - hasWarned[msg] = true; - warn(msg); - } -} -function warn(msg) { - console.warn( - `\x1B[1m\x1B[33m[@vue/compiler-sfc]\x1B[0m\x1B[33m ${msg}\x1B[0m -` - ); -} - -var __defProp$6 = Object.defineProperty; -var __defProps$5 = Object.defineProperties; -var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols; -var __hasOwnProp$6 = Object.prototype.hasOwnProperty; -var __propIsEnum$6 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues$6 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$6.call(b, prop)) - __defNormalProp$6(a, prop, b[prop]); - if (__getOwnPropSymbols$6) - for (var prop of __getOwnPropSymbols$6(b)) { - if (__propIsEnum$6.call(b, prop)) - __defNormalProp$6(a, prop, b[prop]); - } - return a; -}; -var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b)); -function preprocess$1({ source, filename, preprocessOptions }, preprocessor) { - let res = ""; - let err = null; - preprocessor.render( - source, - __spreadValues$6({ filename }, preprocessOptions), - (_err, _res) => { - if (_err) err = _err; - res = _res; - } - ); - if (err) throw err; - return res; -} -function compileTemplate(options) { - const { preprocessLang, preprocessCustomRequire } = options; - if (preprocessLang && !preprocessCustomRequire) { - throw new Error( - `[@vue/compiler-sfc] Template preprocessing in the browser build must provide the \`preprocessCustomRequire\` option to return the in-browser version of the preprocessor in the shape of { render(): string }.` - ); - } - const preprocessor = preprocessLang ? preprocessCustomRequire ? preprocessCustomRequire(preprocessLang) : void 0 : false; - if (preprocessor) { - try { - return doCompileTemplate(__spreadProps$5(__spreadValues$6({}, options), { - source: preprocess$1(options, preprocessor), - ast: void 0 - // invalidate AST if template goes through preprocessor - })); - } catch (e) { - return { - code: `export default function render() {}`, - source: options.source, - tips: [], - errors: [e] - }; - } - } else if (preprocessLang) { - return { - code: `export default function render() {}`, - source: options.source, - tips: [ - `Component ${options.filename} uses lang ${preprocessLang} for template. Please install the language preprocessor.` - ], - errors: [ - `Component ${options.filename} uses lang ${preprocessLang} for template, however it is not installed.` - ] - }; - } else { - return doCompileTemplate(options); - } -} -function doCompileTemplate({ - filename, - id, - scoped, - slotted, - inMap, - source, - ast: inAST, - ssr = false, - ssrCssVars, - isProd = false, - compiler, - compilerOptions = {}, - transformAssetUrls -}) { - const errors = []; - const warnings = []; - let nodeTransforms = []; - if (isObject$2(transformAssetUrls)) { - const assetOptions = normalizeOptions(transformAssetUrls); - nodeTransforms = [ - createAssetUrlTransformWithOptions(assetOptions), - createSrcsetTransformWithOptions(assetOptions) - ]; - } else if (transformAssetUrls !== false) { - nodeTransforms = [transformAssetUrl, transformSrcset]; - } - if (ssr && !ssrCssVars) { - warnOnce$1( - `compileTemplate is called with \`ssr: true\` but no corresponding \`cssVars\` option.` - ); - } - if (!id) { - warnOnce$1(`compileTemplate now requires the \`id\` option.`); - id = ""; - } - const shortId = id.replace(/^data-v-/, ""); - const longId = `data-v-${shortId}`; - const defaultCompiler = ssr ? CompilerSSR : CompilerDOM; - compiler = compiler || defaultCompiler; - if (compiler !== defaultCompiler) { - inAST = void 0; - } - if (inAST == null ? void 0 : inAST.transformed) { - const newAST = (ssr ? CompilerDOM : compiler).parse(inAST.source, __spreadProps$5(__spreadValues$6({ - prefixIdentifiers: true - }, compilerOptions), { - parseMode: "sfc", - onError: (e) => errors.push(e) - })); - const template = newAST.children.find( - (node) => node.type === 1 && node.tag === "template" - ); - inAST = createRoot(template.children, inAST.source); - } - let { code, ast, preamble, map } = compiler.compile(inAST || source, __spreadProps$5(__spreadValues$6({ - mode: "module", - prefixIdentifiers: true, - hoistStatic: true, - cacheHandlers: true, - ssrCssVars: ssr && ssrCssVars && ssrCssVars.length ? genCssVarsFromList(ssrCssVars, shortId, isProd, true) : "", - scopeId: scoped ? longId : void 0, - slotted, - sourceMap: true - }, compilerOptions), { - hmr: !isProd, - nodeTransforms: nodeTransforms.concat(compilerOptions.nodeTransforms || []), - filename, - onError: (e) => errors.push(e), - onWarn: (w) => warnings.push(w) - })); - if (inMap && !inAST) { - if (map) { - map = mapLines(inMap, map); - } - if (errors.length) { - patchErrors(errors, source, inMap); - } - } - const tips = warnings.map((w) => { - let msg = w.message; - if (w.loc) { - msg += ` -${generateCodeFrame( - (inAST == null ? void 0 : inAST.source) || source, - w.loc.start.offset, - w.loc.end.offset - )}`; - } - return msg; - }); - return { code, ast, preamble, source, errors, tips, map }; -} -function mapLines(oldMap, newMap) { - if (!oldMap) return newMap; - if (!newMap) return oldMap; - const oldMapConsumer = new sourceMapExports.SourceMapConsumer(oldMap); - const newMapConsumer = new sourceMapExports.SourceMapConsumer(newMap); - const mergedMapGenerator = new sourceMapExports.SourceMapGenerator(); - newMapConsumer.eachMapping((m) => { - if (m.originalLine == null) { - return; - } - const origPosInOldMap = oldMapConsumer.originalPositionFor({ - line: m.originalLine, - column: m.originalColumn - }); - if (origPosInOldMap.source == null) { - return; - } - mergedMapGenerator.addMapping({ - generated: { - line: m.generatedLine, - column: m.generatedColumn - }, - original: { - line: origPosInOldMap.line, - // map line - // use current column, since the oldMap produced by @vue/compiler-sfc - // does not - column: m.originalColumn - }, - source: origPosInOldMap.source, - name: origPosInOldMap.name - }); - }); - const generator = mergedMapGenerator; - oldMapConsumer.sources.forEach((sourceFile) => { - generator._sources.add(sourceFile); - const sourceContent = oldMapConsumer.sourceContentFor(sourceFile); - if (sourceContent != null) { - mergedMapGenerator.setSourceContent(sourceFile, sourceContent); - } - }); - generator._sourceRoot = oldMap.sourceRoot; - generator._file = oldMap.file; - return generator.toJSON(); -} -function patchErrors(errors, source, inMap) { - const originalSource = inMap.sourcesContent[0]; - const offset = originalSource.indexOf(source); - const lineOffset = originalSource.slice(0, offset).split(/\r?\n/).length - 1; - errors.forEach((err) => { - if (err.loc) { - err.loc.start.line += lineOffset; - err.loc.start.offset += offset; - if (err.loc.end !== err.loc.start) { - err.loc.end.line += lineOffset; - err.loc.end.offset += offset; - } - } - }); -} - -var picocolors = {exports: {}}; - -var hasRequiredPicocolors; - -function requirePicocolors () { - if (hasRequiredPicocolors) return picocolors.exports; - hasRequiredPicocolors = 1; - let p = browser$1 || {}, argv = p.argv || [], env = p.env || {}; - let isColorSupported = - !(!!env.NO_COLOR || argv.includes("--no-color")) && - (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI); - - let formatter = (open, close, replace = open) => - input => { - let string = "" + input, index = string.indexOf(close, open.length); - return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close - }; - - let replaceClose = (string, close, replace, index) => { - let result = "", cursor = 0; - do { - result += string.substring(cursor, index) + replace; - cursor = index + close.length; - index = string.indexOf(close, cursor); - } while (~index) - return result + string.substring(cursor) - }; - - let createColors = (enabled = isColorSupported) => { - let f = enabled ? formatter : () => String; - return { - isColorSupported: enabled, - reset: f("\x1b[0m", "\x1b[0m"), - bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"), - dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"), - italic: f("\x1b[3m", "\x1b[23m"), - underline: f("\x1b[4m", "\x1b[24m"), - inverse: f("\x1b[7m", "\x1b[27m"), - hidden: f("\x1b[8m", "\x1b[28m"), - strikethrough: f("\x1b[9m", "\x1b[29m"), - - black: f("\x1b[30m", "\x1b[39m"), - red: f("\x1b[31m", "\x1b[39m"), - green: f("\x1b[32m", "\x1b[39m"), - yellow: f("\x1b[33m", "\x1b[39m"), - blue: f("\x1b[34m", "\x1b[39m"), - magenta: f("\x1b[35m", "\x1b[39m"), - cyan: f("\x1b[36m", "\x1b[39m"), - white: f("\x1b[37m", "\x1b[39m"), - gray: f("\x1b[90m", "\x1b[39m"), - - bgBlack: f("\x1b[40m", "\x1b[49m"), - bgRed: f("\x1b[41m", "\x1b[49m"), - bgGreen: f("\x1b[42m", "\x1b[49m"), - bgYellow: f("\x1b[43m", "\x1b[49m"), - bgBlue: f("\x1b[44m", "\x1b[49m"), - bgMagenta: f("\x1b[45m", "\x1b[49m"), - bgCyan: f("\x1b[46m", "\x1b[49m"), - bgWhite: f("\x1b[47m", "\x1b[49m"), - - blackBright: f("\x1b[90m", "\x1b[39m"), - redBright: f("\x1b[91m", "\x1b[39m"), - greenBright: f("\x1b[92m", "\x1b[39m"), - yellowBright: f("\x1b[93m", "\x1b[39m"), - blueBright: f("\x1b[94m", "\x1b[39m"), - magentaBright: f("\x1b[95m", "\x1b[39m"), - cyanBright: f("\x1b[96m", "\x1b[39m"), - whiteBright: f("\x1b[97m", "\x1b[39m"), - - bgBlackBright: f("\x1b[100m", "\x1b[49m"), - bgRedBright: f("\x1b[101m", "\x1b[49m"), - bgGreenBright: f("\x1b[102m", "\x1b[49m"), - bgYellowBright: f("\x1b[103m", "\x1b[49m"), - bgBlueBright: f("\x1b[104m", "\x1b[49m"), - bgMagentaBright: f("\x1b[105m", "\x1b[49m"), - bgCyanBright: f("\x1b[106m", "\x1b[49m"), - bgWhiteBright: f("\x1b[107m", "\x1b[49m"), - } - }; - - picocolors.exports = createColors(); - picocolors.exports.createColors = createColors; - return picocolors.exports; -} - -var tokenize$1; -var hasRequiredTokenize$1; - -function requireTokenize$1 () { - if (hasRequiredTokenize$1) return tokenize$1; - hasRequiredTokenize$1 = 1; - - const SINGLE_QUOTE = "'".charCodeAt(0); - const DOUBLE_QUOTE = '"'.charCodeAt(0); - const BACKSLASH = '\\'.charCodeAt(0); - const SLASH = '/'.charCodeAt(0); - const NEWLINE = '\n'.charCodeAt(0); - const SPACE = ' '.charCodeAt(0); - const FEED = '\f'.charCodeAt(0); - const TAB = '\t'.charCodeAt(0); - const CR = '\r'.charCodeAt(0); - const OPEN_SQUARE = '['.charCodeAt(0); - const CLOSE_SQUARE = ']'.charCodeAt(0); - const OPEN_PARENTHESES = '('.charCodeAt(0); - const CLOSE_PARENTHESES = ')'.charCodeAt(0); - const OPEN_CURLY = '{'.charCodeAt(0); - const CLOSE_CURLY = '}'.charCodeAt(0); - const SEMICOLON = ';'.charCodeAt(0); - const ASTERISK = '*'.charCodeAt(0); - const COLON = ':'.charCodeAt(0); - const AT = '@'.charCodeAt(0); - - const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g; - const RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g; - const RE_BAD_BRACKET = /.[\r\n"'(/\\]/; - const RE_HEX_ESCAPE = /[\da-f]/i; - - tokenize$1 = function tokenizer(input, options = {}) { - let css = input.css.valueOf(); - let ignore = options.ignoreErrors; - - let code, content, escape, next, quote; - let currentToken, escaped, escapePos, n, prev; - - let length = css.length; - let pos = 0; - let buffer = []; - let returned = []; - - function position() { - return pos - } - - function unclosed(what) { - throw input.error('Unclosed ' + what, pos) - } - - function endOfFile() { - return returned.length === 0 && pos >= length - } - - function nextToken(opts) { - if (returned.length) return returned.pop() - if (pos >= length) return - - let ignoreUnclosed = opts ? opts.ignoreUnclosed : false; - - code = css.charCodeAt(pos); - - switch (code) { - case NEWLINE: - case SPACE: - case TAB: - case CR: - case FEED: { - next = pos; - do { - next += 1; - code = css.charCodeAt(next); - } while ( - code === SPACE || - code === NEWLINE || - code === TAB || - code === CR || - code === FEED - ) - - currentToken = ['space', css.slice(pos, next)]; - pos = next - 1; - break - } - - case OPEN_SQUARE: - case CLOSE_SQUARE: - case OPEN_CURLY: - case CLOSE_CURLY: - case COLON: - case SEMICOLON: - case CLOSE_PARENTHESES: { - let controlChar = String.fromCharCode(code); - currentToken = [controlChar, controlChar, pos]; - break - } - - case OPEN_PARENTHESES: { - prev = buffer.length ? buffer.pop()[1] : ''; - n = css.charCodeAt(pos + 1); - if ( - prev === 'url' && - n !== SINGLE_QUOTE && - n !== DOUBLE_QUOTE && - n !== SPACE && - n !== NEWLINE && - n !== TAB && - n !== FEED && - n !== CR - ) { - next = pos; - do { - escaped = false; - next = css.indexOf(')', next + 1); - if (next === -1) { - if (ignore || ignoreUnclosed) { - next = pos; - break - } else { - unclosed('bracket'); - } - } - escapePos = next; - while (css.charCodeAt(escapePos - 1) === BACKSLASH) { - escapePos -= 1; - escaped = !escaped; - } - } while (escaped) - - currentToken = ['brackets', css.slice(pos, next + 1), pos, next]; - - pos = next; - } else { - next = css.indexOf(')', pos + 1); - content = css.slice(pos, next + 1); - - if (next === -1 || RE_BAD_BRACKET.test(content)) { - currentToken = ['(', '(', pos]; - } else { - currentToken = ['brackets', content, pos, next]; - pos = next; - } - } - - break - } - - case SINGLE_QUOTE: - case DOUBLE_QUOTE: { - quote = code === SINGLE_QUOTE ? "'" : '"'; - next = pos; - do { - escaped = false; - next = css.indexOf(quote, next + 1); - if (next === -1) { - if (ignore || ignoreUnclosed) { - next = pos + 1; - break - } else { - unclosed('string'); - } - } - escapePos = next; - while (css.charCodeAt(escapePos - 1) === BACKSLASH) { - escapePos -= 1; - escaped = !escaped; - } - } while (escaped) - - currentToken = ['string', css.slice(pos, next + 1), pos, next]; - pos = next; - break - } - - case AT: { - RE_AT_END.lastIndex = pos + 1; - RE_AT_END.test(css); - if (RE_AT_END.lastIndex === 0) { - next = css.length - 1; - } else { - next = RE_AT_END.lastIndex - 2; - } - - currentToken = ['at-word', css.slice(pos, next + 1), pos, next]; - - pos = next; - break - } - - case BACKSLASH: { - next = pos; - escape = true; - while (css.charCodeAt(next + 1) === BACKSLASH) { - next += 1; - escape = !escape; - } - code = css.charCodeAt(next + 1); - if ( - escape && - code !== SLASH && - code !== SPACE && - code !== NEWLINE && - code !== TAB && - code !== CR && - code !== FEED - ) { - next += 1; - if (RE_HEX_ESCAPE.test(css.charAt(next))) { - while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) { - next += 1; - } - if (css.charCodeAt(next + 1) === SPACE) { - next += 1; - } - } - } - - currentToken = ['word', css.slice(pos, next + 1), pos, next]; - - pos = next; - break - } - - default: { - if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) { - next = css.indexOf('*/', pos + 2) + 1; - if (next === 0) { - if (ignore || ignoreUnclosed) { - next = css.length; - } else { - unclosed('comment'); - } - } - - currentToken = ['comment', css.slice(pos, next + 1), pos, next]; - pos = next; - } else { - RE_WORD_END.lastIndex = pos + 1; - RE_WORD_END.test(css); - if (RE_WORD_END.lastIndex === 0) { - next = css.length - 1; - } else { - next = RE_WORD_END.lastIndex - 2; - } - - currentToken = ['word', css.slice(pos, next + 1), pos, next]; - buffer.push(currentToken); - pos = next; - } - - break - } - } - - pos++; - return currentToken - } - - function back(token) { - returned.push(token); - } - - return { - back, - endOfFile, - nextToken, - position - } - }; - return tokenize$1; -} - -var terminalHighlight_1; -var hasRequiredTerminalHighlight; - -function requireTerminalHighlight () { - if (hasRequiredTerminalHighlight) return terminalHighlight_1; - hasRequiredTerminalHighlight = 1; - - let pico = /*@__PURE__*/ requirePicocolors(); - - let tokenizer = /*@__PURE__*/ requireTokenize$1(); - - let Input; - - function registerInput(dependant) { - Input = dependant; - } - - const HIGHLIGHT_THEME = { - ';': pico.yellow, - ':': pico.yellow, - '(': pico.cyan, - ')': pico.cyan, - '[': pico.yellow, - ']': pico.yellow, - '{': pico.yellow, - '}': pico.yellow, - 'at-word': pico.cyan, - 'brackets': pico.cyan, - 'call': pico.cyan, - 'class': pico.yellow, - 'comment': pico.gray, - 'hash': pico.magenta, - 'string': pico.green - }; - - function getTokenType([type, value], processor) { - if (type === 'word') { - if (value[0] === '.') { - return 'class' - } - if (value[0] === '#') { - return 'hash' - } - } - - if (!processor.endOfFile()) { - let next = processor.nextToken(); - processor.back(next); - if (next[0] === 'brackets' || next[0] === '(') return 'call' - } - - return type - } - - function terminalHighlight(css) { - let processor = tokenizer(new Input(css), { ignoreErrors: true }); - let result = ''; - while (!processor.endOfFile()) { - let token = processor.nextToken(); - let color = HIGHLIGHT_THEME[getTokenType(token, processor)]; - if (color) { - result += token[1] - .split(/\r?\n/) - .map(i => color(i)) - .join('\n'); - } else { - result += token[1]; - } - } - return result - } - - terminalHighlight.registerInput = registerInput; - - terminalHighlight_1 = terminalHighlight; - return terminalHighlight_1; -} - -var cssSyntaxError; -var hasRequiredCssSyntaxError; - -function requireCssSyntaxError () { - if (hasRequiredCssSyntaxError) return cssSyntaxError; - hasRequiredCssSyntaxError = 1; - - let pico = /*@__PURE__*/ requirePicocolors(); - - let terminalHighlight = /*@__PURE__*/ requireTerminalHighlight(); - - class CssSyntaxError extends Error { - constructor(message, line, column, source, file, plugin) { - super(message); - this.name = 'CssSyntaxError'; - this.reason = message; - - if (file) { - this.file = file; - } - if (source) { - this.source = source; - } - if (plugin) { - this.plugin = plugin; - } - if (typeof line !== 'undefined' && typeof column !== 'undefined') { - if (typeof line === 'number') { - this.line = line; - this.column = column; - } else { - this.line = line.line; - this.column = line.column; - this.endLine = column.line; - this.endColumn = column.column; - } - } - - this.setMessage(); - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, CssSyntaxError); - } - } - - setMessage() { - this.message = this.plugin ? this.plugin + ': ' : ''; - this.message += this.file ? this.file : '<css input>'; - if (typeof this.line !== 'undefined') { - this.message += ':' + this.line + ':' + this.column; - } - this.message += ': ' + this.reason; - } - - showSourceCode(color) { - if (!this.source) return '' - - let css = this.source; - if (color == null) color = pico.isColorSupported; - - let aside = text => text; - let mark = text => text; - let highlight = text => text; - if (color) { - let { bold, gray, red } = pico.createColors(true); - mark = text => bold(red(text)); - aside = text => gray(text); - if (terminalHighlight) { - highlight = text => terminalHighlight(text); - } - } - - let lines = css.split(/\r?\n/); - let start = Math.max(this.line - 3, 0); - let end = Math.min(this.line + 2, lines.length); - let maxWidth = String(end).length; - - return lines - .slice(start, end) - .map((line, index) => { - let number = start + 1 + index; - let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '; - if (number === this.line) { - if (line.length > 160) { - let padding = 20; - let subLineStart = Math.max(0, this.column - padding); - let subLineEnd = Math.max( - this.column + padding, - this.endColumn + padding - ); - let subLine = line.slice(subLineStart, subLineEnd); - - let spacing = - aside(gutter.replace(/\d/g, ' ')) + - line - .slice(0, Math.min(this.column - 1, padding - 1)) - .replace(/[^\t]/g, ' '); - - return ( - mark('>') + - aside(gutter) + - highlight(subLine) + - '\n ' + - spacing + - mark('^') - ) - } - - let spacing = - aside(gutter.replace(/\d/g, ' ')) + - line.slice(0, this.column - 1).replace(/[^\t]/g, ' '); - - return ( - mark('>') + - aside(gutter) + - highlight(line) + - '\n ' + - spacing + - mark('^') - ) - } - - return ' ' + aside(gutter) + highlight(line) - }) - .join('\n') - } - - toString() { - let code = this.showSourceCode(); - if (code) { - code = '\n\n' + code + '\n'; - } - return this.name + ': ' + this.message + code - } - } - - cssSyntaxError = CssSyntaxError; - CssSyntaxError.default = CssSyntaxError; - return cssSyntaxError; -} - -var stringifier; -var hasRequiredStringifier; - -function requireStringifier () { - if (hasRequiredStringifier) return stringifier; - hasRequiredStringifier = 1; - - const DEFAULT_RAW = { - after: '\n', - beforeClose: '\n', - beforeComment: '\n', - beforeDecl: '\n', - beforeOpen: ' ', - beforeRule: '\n', - colon: ': ', - commentLeft: ' ', - commentRight: ' ', - emptyBody: '', - indent: ' ', - semicolon: false - }; - - function capitalize(str) { - return str[0].toUpperCase() + str.slice(1) - } - - class Stringifier { - constructor(builder) { - this.builder = builder; - } - - atrule(node, semicolon) { - let name = '@' + node.name; - let params = node.params ? this.rawValue(node, 'params') : ''; - - if (typeof node.raws.afterName !== 'undefined') { - name += node.raws.afterName; - } else if (params) { - name += ' '; - } - - if (node.nodes) { - this.block(node, name + params); - } else { - let end = (node.raws.between || '') + (semicolon ? ';' : ''); - this.builder(name + params + end, node); - } - } - - beforeAfter(node, detect) { - let value; - if (node.type === 'decl') { - value = this.raw(node, null, 'beforeDecl'); - } else if (node.type === 'comment') { - value = this.raw(node, null, 'beforeComment'); - } else if (detect === 'before') { - value = this.raw(node, null, 'beforeRule'); - } else { - value = this.raw(node, null, 'beforeClose'); - } - - let buf = node.parent; - let depth = 0; - while (buf && buf.type !== 'root') { - depth += 1; - buf = buf.parent; - } - - if (value.includes('\n')) { - let indent = this.raw(node, null, 'indent'); - if (indent.length) { - for (let step = 0; step < depth; step++) value += indent; - } - } - - return value - } - - block(node, start) { - let between = this.raw(node, 'between', 'beforeOpen'); - this.builder(start + between + '{', node, 'start'); - - let after; - if (node.nodes && node.nodes.length) { - this.body(node); - after = this.raw(node, 'after'); - } else { - after = this.raw(node, 'after', 'emptyBody'); - } - - if (after) this.builder(after); - this.builder('}', node, 'end'); - } - - body(node) { - let last = node.nodes.length - 1; - while (last > 0) { - if (node.nodes[last].type !== 'comment') break - last -= 1; - } - - let semicolon = this.raw(node, 'semicolon'); - for (let i = 0; i < node.nodes.length; i++) { - let child = node.nodes[i]; - let before = this.raw(child, 'before'); - if (before) this.builder(before); - this.stringify(child, last !== i || semicolon); - } - } - - comment(node) { - let left = this.raw(node, 'left', 'commentLeft'); - let right = this.raw(node, 'right', 'commentRight'); - this.builder('/*' + left + node.text + right + '*/', node); - } - - decl(node, semicolon) { - let between = this.raw(node, 'between', 'colon'); - let string = node.prop + between + this.rawValue(node, 'value'); - - if (node.important) { - string += node.raws.important || ' !important'; - } - - if (semicolon) string += ';'; - this.builder(string, node); - } - - document(node) { - this.body(node); - } - - raw(node, own, detect) { - let value; - if (!detect) detect = own; - - // Already had - if (own) { - value = node.raws[own]; - if (typeof value !== 'undefined') return value - } - - let parent = node.parent; - - if (detect === 'before') { - // Hack for first rule in CSS - if (!parent || (parent.type === 'root' && parent.first === node)) { - return '' - } - - // `root` nodes in `document` should use only their own raws - if (parent && parent.type === 'document') { - return '' - } - } - - // Floating child without parent - if (!parent) return DEFAULT_RAW[detect] - - // Detect style by other nodes - let root = node.root(); - if (!root.rawCache) root.rawCache = {}; - if (typeof root.rawCache[detect] !== 'undefined') { - return root.rawCache[detect] - } - - if (detect === 'before' || detect === 'after') { - return this.beforeAfter(node, detect) - } else { - let method = 'raw' + capitalize(detect); - if (this[method]) { - value = this[method](root, node); - } else { - root.walk(i => { - value = i.raws[own]; - if (typeof value !== 'undefined') return false - }); - } - } - - if (typeof value === 'undefined') value = DEFAULT_RAW[detect]; - - root.rawCache[detect] = value; - return value - } - - rawBeforeClose(root) { - let value; - root.walk(i => { - if (i.nodes && i.nodes.length > 0) { - if (typeof i.raws.after !== 'undefined') { - value = i.raws.after; - if (value.includes('\n')) { - value = value.replace(/[^\n]+$/, ''); - } - return false - } - } - }); - if (value) value = value.replace(/\S/g, ''); - return value - } - - rawBeforeComment(root, node) { - let value; - root.walkComments(i => { - if (typeof i.raws.before !== 'undefined') { - value = i.raws.before; - if (value.includes('\n')) { - value = value.replace(/[^\n]+$/, ''); - } - return false - } - }); - if (typeof value === 'undefined') { - value = this.raw(node, null, 'beforeDecl'); - } else if (value) { - value = value.replace(/\S/g, ''); - } - return value - } - - rawBeforeDecl(root, node) { - let value; - root.walkDecls(i => { - if (typeof i.raws.before !== 'undefined') { - value = i.raws.before; - if (value.includes('\n')) { - value = value.replace(/[^\n]+$/, ''); - } - return false - } - }); - if (typeof value === 'undefined') { - value = this.raw(node, null, 'beforeRule'); - } else if (value) { - value = value.replace(/\S/g, ''); - } - return value - } - - rawBeforeOpen(root) { - let value; - root.walk(i => { - if (i.type !== 'decl') { - value = i.raws.between; - if (typeof value !== 'undefined') return false - } - }); - return value - } - - rawBeforeRule(root) { - let value; - root.walk(i => { - if (i.nodes && (i.parent !== root || root.first !== i)) { - if (typeof i.raws.before !== 'undefined') { - value = i.raws.before; - if (value.includes('\n')) { - value = value.replace(/[^\n]+$/, ''); - } - return false - } - } - }); - if (value) value = value.replace(/\S/g, ''); - return value - } - - rawColon(root) { - let value; - root.walkDecls(i => { - if (typeof i.raws.between !== 'undefined') { - value = i.raws.between.replace(/[^\s:]/g, ''); - return false - } - }); - return value - } - - rawEmptyBody(root) { - let value; - root.walk(i => { - if (i.nodes && i.nodes.length === 0) { - value = i.raws.after; - if (typeof value !== 'undefined') return false - } - }); - return value - } - - rawIndent(root) { - if (root.raws.indent) return root.raws.indent - let value; - root.walk(i => { - let p = i.parent; - if (p && p !== root && p.parent && p.parent === root) { - if (typeof i.raws.before !== 'undefined') { - let parts = i.raws.before.split('\n'); - value = parts[parts.length - 1]; - value = value.replace(/\S/g, ''); - return false - } - } - }); - return value - } - - rawSemicolon(root) { - let value; - root.walk(i => { - if (i.nodes && i.nodes.length && i.last.type === 'decl') { - value = i.raws.semicolon; - if (typeof value !== 'undefined') return false - } - }); - return value - } - - rawValue(node, prop) { - let value = node[prop]; - let raw = node.raws[prop]; - if (raw && raw.value === value) { - return raw.raw - } - - return value - } - - root(node) { - this.body(node); - if (node.raws.after) this.builder(node.raws.after); - } - - rule(node) { - this.block(node, this.rawValue(node, 'selector')); - if (node.raws.ownSemicolon) { - this.builder(node.raws.ownSemicolon, node, 'end'); - } - } - - stringify(node, semicolon) { - /* c8 ignore start */ - if (!this[node.type]) { - throw new Error( - 'Unknown AST node type ' + - node.type + - '. ' + - 'Maybe you need to change PostCSS stringifier.' - ) - } - /* c8 ignore stop */ - this[node.type](node, semicolon); - } - } - - stringifier = Stringifier; - Stringifier.default = Stringifier; - return stringifier; -} - -var stringify_1; -var hasRequiredStringify; - -function requireStringify () { - if (hasRequiredStringify) return stringify_1; - hasRequiredStringify = 1; - - let Stringifier = /*@__PURE__*/ requireStringifier(); - - function stringify(node, builder) { - let str = new Stringifier(builder); - str.stringify(node); - } - - stringify_1 = stringify; - stringify.default = stringify; - return stringify_1; -} - -var symbols = {}; - -var hasRequiredSymbols; - -function requireSymbols () { - if (hasRequiredSymbols) return symbols; - hasRequiredSymbols = 1; - - symbols.isClean = Symbol('isClean'); - - symbols.my = Symbol('my'); - return symbols; -} - -var node$2; -var hasRequiredNode$2; - -function requireNode$2 () { - if (hasRequiredNode$2) return node$2; - hasRequiredNode$2 = 1; - - let CssSyntaxError = /*@__PURE__*/ requireCssSyntaxError(); - let Stringifier = /*@__PURE__*/ requireStringifier(); - let stringify = /*@__PURE__*/ requireStringify(); - let { isClean, my } = /*@__PURE__*/ requireSymbols(); - - function cloneNode(obj, parent) { - let cloned = new obj.constructor(); - - for (let i in obj) { - if (!Object.prototype.hasOwnProperty.call(obj, i)) { - /* c8 ignore next 2 */ - continue - } - if (i === 'proxyCache') continue - let value = obj[i]; - let type = typeof value; - - if (i === 'parent' && type === 'object') { - if (parent) cloned[i] = parent; - } else if (i === 'source') { - cloned[i] = value; - } else if (Array.isArray(value)) { - cloned[i] = value.map(j => cloneNode(j, cloned)); - } else { - if (type === 'object' && value !== null) value = cloneNode(value); - cloned[i] = value; - } - } - - return cloned - } - - class Node { - constructor(defaults = {}) { - this.raws = {}; - this[isClean] = false; - this[my] = true; - - for (let name in defaults) { - if (name === 'nodes') { - this.nodes = []; - for (let node of defaults[name]) { - if (typeof node.clone === 'function') { - this.append(node.clone()); - } else { - this.append(node); - } - } - } else { - this[name] = defaults[name]; - } - } - } - - addToError(error) { - error.postcssNode = this; - if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { - let s = this.source; - error.stack = error.stack.replace( - /\n\s{4}at /, - `$&${s.input.from}:${s.start.line}:${s.start.column}$&` - ); - } - return error - } - - after(add) { - this.parent.insertAfter(this, add); - return this - } - - assign(overrides = {}) { - for (let name in overrides) { - this[name] = overrides[name]; - } - return this - } - - before(add) { - this.parent.insertBefore(this, add); - return this - } - - cleanRaws(keepBetween) { - delete this.raws.before; - delete this.raws.after; - if (!keepBetween) delete this.raws.between; - } - - clone(overrides = {}) { - let cloned = cloneNode(this); - for (let name in overrides) { - cloned[name] = overrides[name]; - } - return cloned - } - - cloneAfter(overrides = {}) { - let cloned = this.clone(overrides); - this.parent.insertAfter(this, cloned); - return cloned - } - - cloneBefore(overrides = {}) { - let cloned = this.clone(overrides); - this.parent.insertBefore(this, cloned); - return cloned - } - - error(message, opts = {}) { - if (this.source) { - let { end, start } = this.rangeBy(opts); - return this.source.input.error( - message, - { column: start.column, line: start.line }, - { column: end.column, line: end.line }, - opts - ) - } - return new CssSyntaxError(message) - } - - getProxyProcessor() { - return { - get(node, prop) { - if (prop === 'proxyOf') { - return node - } else if (prop === 'root') { - return () => node.root().toProxy() - } else { - return node[prop] - } - }, - - set(node, prop, value) { - if (node[prop] === value) return true - node[prop] = value; - if ( - prop === 'prop' || - prop === 'value' || - prop === 'name' || - prop === 'params' || - prop === 'important' || - /* c8 ignore next */ - prop === 'text' - ) { - node.markDirty(); - } - return true - } - } - } - - /* c8 ignore next 3 */ - markClean() { - this[isClean] = true; - } - - markDirty() { - if (this[isClean]) { - this[isClean] = false; - let next = this; - while ((next = next.parent)) { - next[isClean] = false; - } - } - } - - next() { - if (!this.parent) return undefined - let index = this.parent.index(this); - return this.parent.nodes[index + 1] - } - - positionBy(opts, stringRepresentation) { - let pos = this.source.start; - if (opts.index) { - pos = this.positionInside(opts.index); - } else if (opts.word) { - stringRepresentation = this.source.input.css.slice(this.source.start.offset, this.source.end.offset); - let index = stringRepresentation.indexOf(opts.word); - if (index !== -1) pos = this.positionInside(index); - } - return pos - } - - positionInside(index) { - let column = this.source.start.column; - let line = this.source.start.line; - let offset = this.source.start.offset; - let end = offset + index; - - for (let i = offset; i < end; i++) { - if (this.source.input.css[i] === '\n') { - column = 1; - line += 1; - } else { - column += 1; - } - } - - return { column, line } - } - - prev() { - if (!this.parent) return undefined - let index = this.parent.index(this); - return this.parent.nodes[index - 1] - } - - rangeBy(opts) { - let start = { - column: this.source.start.column, - line: this.source.start.line - }; - let end = this.source.end - ? { - column: this.source.end.column + 1, - line: this.source.end.line - } - : { - column: start.column + 1, - line: start.line - }; - - if (opts.word) { - let stringRepresentation = this.source.input.css.slice(this.source.start.offset, this.source.end.offset); - let index = stringRepresentation.indexOf(opts.word); - if (index !== -1) { - start = this.positionInside(index, stringRepresentation); - end = this.positionInside( - index + opts.word.length, - stringRepresentation - ); - } - } else { - if (opts.start) { - start = { - column: opts.start.column, - line: opts.start.line - }; - } else if (opts.index) { - start = this.positionInside(opts.index); - } - - if (opts.end) { - end = { - column: opts.end.column, - line: opts.end.line - }; - } else if (typeof opts.endIndex === 'number') { - end = this.positionInside(opts.endIndex); - } else if (opts.index) { - end = this.positionInside(opts.index + 1); - } - } - - if ( - end.line < start.line || - (end.line === start.line && end.column <= start.column) - ) { - end = { column: start.column + 1, line: start.line }; - } - - return { end, start } - } - - raw(prop, defaultType) { - let str = new Stringifier(); - return str.raw(this, prop, defaultType) - } - - remove() { - if (this.parent) { - this.parent.removeChild(this); - } - this.parent = undefined; - return this - } - - replaceWith(...nodes) { - if (this.parent) { - let bookmark = this; - let foundSelf = false; - for (let node of nodes) { - if (node === this) { - foundSelf = true; - } else if (foundSelf) { - this.parent.insertAfter(bookmark, node); - bookmark = node; - } else { - this.parent.insertBefore(bookmark, node); - } - } - - if (!foundSelf) { - this.remove(); - } - } - - return this - } - - root() { - let result = this; - while (result.parent && result.parent.type !== 'document') { - result = result.parent; - } - return result - } - - toJSON(_, inputs) { - let fixed = {}; - let emitInputs = inputs == null; - inputs = inputs || new Map(); - let inputsNextIndex = 0; - - for (let name in this) { - if (!Object.prototype.hasOwnProperty.call(this, name)) { - /* c8 ignore next 2 */ - continue - } - if (name === 'parent' || name === 'proxyCache') continue - let value = this[name]; - - if (Array.isArray(value)) { - fixed[name] = value.map(i => { - if (typeof i === 'object' && i.toJSON) { - return i.toJSON(null, inputs) - } else { - return i - } - }); - } else if (typeof value === 'object' && value.toJSON) { - fixed[name] = value.toJSON(null, inputs); - } else if (name === 'source') { - let inputId = inputs.get(value.input); - if (inputId == null) { - inputId = inputsNextIndex; - inputs.set(value.input, inputsNextIndex); - inputsNextIndex++; - } - fixed[name] = { - end: value.end, - inputId, - start: value.start - }; - } else { - fixed[name] = value; - } - } - - if (emitInputs) { - fixed.inputs = [...inputs.keys()].map(input => input.toJSON()); - } - - return fixed - } - - toProxy() { - if (!this.proxyCache) { - this.proxyCache = new Proxy(this, this.getProxyProcessor()); - } - return this.proxyCache - } - - toString(stringifier = stringify) { - if (stringifier.stringify) stringifier = stringifier.stringify; - let result = ''; - stringifier(this, i => { - result += i; - }); - return result - } - - warn(result, text, opts) { - let data = { node: this }; - for (let i in opts) data[i] = opts[i]; - return result.warn(text, data) - } - - get proxyOf() { - return this - } - } - - node$2 = Node; - Node.default = Node; - return node$2; -} - -var comment$1; -var hasRequiredComment$1; - -function requireComment$1 () { - if (hasRequiredComment$1) return comment$1; - hasRequiredComment$1 = 1; - - let Node = /*@__PURE__*/ requireNode$2(); - - class Comment extends Node { - constructor(defaults) { - super(defaults); - this.type = 'comment'; - } - } - - comment$1 = Comment; - Comment.default = Comment; - return comment$1; -} - -var declaration; -var hasRequiredDeclaration; - -function requireDeclaration () { - if (hasRequiredDeclaration) return declaration; - hasRequiredDeclaration = 1; - - let Node = /*@__PURE__*/ requireNode$2(); - - class Declaration extends Node { - constructor(defaults) { - if ( - defaults && - typeof defaults.value !== 'undefined' && - typeof defaults.value !== 'string' - ) { - defaults = { ...defaults, value: String(defaults.value) }; - } - super(defaults); - this.type = 'decl'; - } - - get variable() { - return this.prop.startsWith('--') || this.prop[0] === '$' - } - } - - declaration = Declaration; - Declaration.default = Declaration; - return declaration; -} - -var container$1; -var hasRequiredContainer$1; - -function requireContainer$1 () { - if (hasRequiredContainer$1) return container$1; - hasRequiredContainer$1 = 1; - - let Comment = /*@__PURE__*/ requireComment$1(); - let Declaration = /*@__PURE__*/ requireDeclaration(); - let Node = /*@__PURE__*/ requireNode$2(); - let { isClean, my } = /*@__PURE__*/ requireSymbols(); - - let AtRule, parse, Root, Rule; - - function cleanSource(nodes) { - return nodes.map(i => { - if (i.nodes) i.nodes = cleanSource(i.nodes); - delete i.source; - return i - }) - } - - function markTreeDirty(node) { - node[isClean] = false; - if (node.proxyOf.nodes) { - for (let i of node.proxyOf.nodes) { - markTreeDirty(i); - } - } - } - - class Container extends Node { - append(...children) { - for (let child of children) { - let nodes = this.normalize(child, this.last); - for (let node of nodes) this.proxyOf.nodes.push(node); - } - - this.markDirty(); - - return this - } - - cleanRaws(keepBetween) { - super.cleanRaws(keepBetween); - if (this.nodes) { - for (let node of this.nodes) node.cleanRaws(keepBetween); - } - } - - each(callback) { - if (!this.proxyOf.nodes) return undefined - let iterator = this.getIterator(); - - let index, result; - while (this.indexes[iterator] < this.proxyOf.nodes.length) { - index = this.indexes[iterator]; - result = callback(this.proxyOf.nodes[index], index); - if (result === false) break - - this.indexes[iterator] += 1; - } - - delete this.indexes[iterator]; - return result - } - - every(condition) { - return this.nodes.every(condition) - } - - getIterator() { - if (!this.lastEach) this.lastEach = 0; - if (!this.indexes) this.indexes = {}; - - this.lastEach += 1; - let iterator = this.lastEach; - this.indexes[iterator] = 0; - - return iterator - } - - getProxyProcessor() { - return { - get(node, prop) { - if (prop === 'proxyOf') { - return node - } else if (!node[prop]) { - return node[prop] - } else if ( - prop === 'each' || - (typeof prop === 'string' && prop.startsWith('walk')) - ) { - return (...args) => { - return node[prop]( - ...args.map(i => { - if (typeof i === 'function') { - return (child, index) => i(child.toProxy(), index) - } else { - return i - } - }) - ) - } - } else if (prop === 'every' || prop === 'some') { - return cb => { - return node[prop]((child, ...other) => - cb(child.toProxy(), ...other) - ) - } - } else if (prop === 'root') { - return () => node.root().toProxy() - } else if (prop === 'nodes') { - return node.nodes.map(i => i.toProxy()) - } else if (prop === 'first' || prop === 'last') { - return node[prop].toProxy() - } else { - return node[prop] - } - }, - - set(node, prop, value) { - if (node[prop] === value) return true - node[prop] = value; - if (prop === 'name' || prop === 'params' || prop === 'selector') { - node.markDirty(); - } - return true - } - } - } - - index(child) { - if (typeof child === 'number') return child - if (child.proxyOf) child = child.proxyOf; - return this.proxyOf.nodes.indexOf(child) - } - - insertAfter(exist, add) { - let existIndex = this.index(exist); - let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse(); - existIndex = this.index(exist); - for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node); - - let index; - for (let id in this.indexes) { - index = this.indexes[id]; - if (existIndex < index) { - this.indexes[id] = index + nodes.length; - } - } - - this.markDirty(); - - return this - } - - insertBefore(exist, add) { - let existIndex = this.index(exist); - let type = existIndex === 0 ? 'prepend' : false; - let nodes = this.normalize( - add, - this.proxyOf.nodes[existIndex], - type - ).reverse(); - existIndex = this.index(exist); - for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node); - - let index; - for (let id in this.indexes) { - index = this.indexes[id]; - if (existIndex <= index) { - this.indexes[id] = index + nodes.length; - } - } - - this.markDirty(); - - return this - } - - normalize(nodes, sample) { - if (typeof nodes === 'string') { - nodes = cleanSource(parse(nodes).nodes); - } else if (typeof nodes === 'undefined') { - nodes = []; - } else if (Array.isArray(nodes)) { - nodes = nodes.slice(0); - for (let i of nodes) { - if (i.parent) i.parent.removeChild(i, 'ignore'); - } - } else if (nodes.type === 'root' && this.type !== 'document') { - nodes = nodes.nodes.slice(0); - for (let i of nodes) { - if (i.parent) i.parent.removeChild(i, 'ignore'); - } - } else if (nodes.type) { - nodes = [nodes]; - } else if (nodes.prop) { - if (typeof nodes.value === 'undefined') { - throw new Error('Value field is missed in node creation') - } else if (typeof nodes.value !== 'string') { - nodes.value = String(nodes.value); - } - nodes = [new Declaration(nodes)]; - } else if (nodes.selector || nodes.selectors) { - nodes = [new Rule(nodes)]; - } else if (nodes.name) { - nodes = [new AtRule(nodes)]; - } else if (nodes.text) { - nodes = [new Comment(nodes)]; - } else { - throw new Error('Unknown node type in node creation') - } - - let processed = nodes.map(i => { - /* c8 ignore next */ - if (!i[my]) Container.rebuild(i); - i = i.proxyOf; - if (i.parent) i.parent.removeChild(i); - if (i[isClean]) markTreeDirty(i); - - if (!i.raws) i.raws = {}; - if (typeof i.raws.before === 'undefined') { - if (sample && typeof sample.raws.before !== 'undefined') { - i.raws.before = sample.raws.before.replace(/\S/g, ''); - } - } - i.parent = this.proxyOf; - return i - }); - - return processed - } - - prepend(...children) { - children = children.reverse(); - for (let child of children) { - let nodes = this.normalize(child, this.first, 'prepend').reverse(); - for (let node of nodes) this.proxyOf.nodes.unshift(node); - for (let id in this.indexes) { - this.indexes[id] = this.indexes[id] + nodes.length; - } - } - - this.markDirty(); - - return this - } - - push(child) { - child.parent = this; - this.proxyOf.nodes.push(child); - return this - } - - removeAll() { - for (let node of this.proxyOf.nodes) node.parent = undefined; - this.proxyOf.nodes = []; - - this.markDirty(); - - return this - } - - removeChild(child) { - child = this.index(child); - this.proxyOf.nodes[child].parent = undefined; - this.proxyOf.nodes.splice(child, 1); - - let index; - for (let id in this.indexes) { - index = this.indexes[id]; - if (index >= child) { - this.indexes[id] = index - 1; - } - } - - this.markDirty(); - - return this - } - - replaceValues(pattern, opts, callback) { - if (!callback) { - callback = opts; - opts = {}; - } - - this.walkDecls(decl => { - if (opts.props && !opts.props.includes(decl.prop)) return - if (opts.fast && !decl.value.includes(opts.fast)) return - - decl.value = decl.value.replace(pattern, callback); - }); - - this.markDirty(); - - return this - } - - some(condition) { - return this.nodes.some(condition) - } - - walk(callback) { - return this.each((child, i) => { - let result; - try { - result = callback(child, i); - } catch (e) { - throw child.addToError(e) - } - if (result !== false && child.walk) { - result = child.walk(callback); - } - - return result - }) - } - - walkAtRules(name, callback) { - if (!callback) { - callback = name; - return this.walk((child, i) => { - if (child.type === 'atrule') { - return callback(child, i) - } - }) - } - if (name instanceof RegExp) { - return this.walk((child, i) => { - if (child.type === 'atrule' && name.test(child.name)) { - return callback(child, i) - } - }) - } - return this.walk((child, i) => { - if (child.type === 'atrule' && child.name === name) { - return callback(child, i) - } - }) - } - - walkComments(callback) { - return this.walk((child, i) => { - if (child.type === 'comment') { - return callback(child, i) - } - }) - } - - walkDecls(prop, callback) { - if (!callback) { - callback = prop; - return this.walk((child, i) => { - if (child.type === 'decl') { - return callback(child, i) - } - }) - } - if (prop instanceof RegExp) { - return this.walk((child, i) => { - if (child.type === 'decl' && prop.test(child.prop)) { - return callback(child, i) - } - }) - } - return this.walk((child, i) => { - if (child.type === 'decl' && child.prop === prop) { - return callback(child, i) - } - }) - } - - walkRules(selector, callback) { - if (!callback) { - callback = selector; - - return this.walk((child, i) => { - if (child.type === 'rule') { - return callback(child, i) - } - }) - } - if (selector instanceof RegExp) { - return this.walk((child, i) => { - if (child.type === 'rule' && selector.test(child.selector)) { - return callback(child, i) - } - }) - } - return this.walk((child, i) => { - if (child.type === 'rule' && child.selector === selector) { - return callback(child, i) - } - }) - } - - get first() { - if (!this.proxyOf.nodes) return undefined - return this.proxyOf.nodes[0] - } - - get last() { - if (!this.proxyOf.nodes) return undefined - return this.proxyOf.nodes[this.proxyOf.nodes.length - 1] - } - } - - Container.registerParse = dependant => { - parse = dependant; - }; - - Container.registerRule = dependant => { - Rule = dependant; - }; - - Container.registerAtRule = dependant => { - AtRule = dependant; - }; - - Container.registerRoot = dependant => { - Root = dependant; - }; - - container$1 = Container; - Container.default = Container; - - /* c8 ignore start */ - Container.rebuild = node => { - if (node.type === 'atrule') { - Object.setPrototypeOf(node, AtRule.prototype); - } else if (node.type === 'rule') { - Object.setPrototypeOf(node, Rule.prototype); - } else if (node.type === 'decl') { - Object.setPrototypeOf(node, Declaration.prototype); - } else if (node.type === 'comment') { - Object.setPrototypeOf(node, Comment.prototype); - } else if (node.type === 'root') { - Object.setPrototypeOf(node, Root.prototype); - } - - node[my] = true; - - if (node.nodes) { - node.nodes.forEach(child => { - Container.rebuild(child); - }); - } - }; - /* c8 ignore stop */ - return container$1; -} - -var atRule; -var hasRequiredAtRule; - -function requireAtRule () { - if (hasRequiredAtRule) return atRule; - hasRequiredAtRule = 1; - - let Container = /*@__PURE__*/ requireContainer$1(); - - class AtRule extends Container { - constructor(defaults) { - super(defaults); - this.type = 'atrule'; - } - - append(...children) { - if (!this.proxyOf.nodes) this.nodes = []; - return super.append(...children) - } - - prepend(...children) { - if (!this.proxyOf.nodes) this.nodes = []; - return super.prepend(...children) - } - } - - atRule = AtRule; - AtRule.default = AtRule; - - Container.registerAtRule(AtRule); - return atRule; -} - -var document; -var hasRequiredDocument; - -function requireDocument () { - if (hasRequiredDocument) return document; - hasRequiredDocument = 1; - - let Container = /*@__PURE__*/ requireContainer$1(); - - let LazyResult, Processor; - - class Document extends Container { - constructor(defaults) { - // type needs to be passed to super, otherwise child roots won't be normalized correctly - super({ type: 'document', ...defaults }); - - if (!this.nodes) { - this.nodes = []; - } - } - - toResult(opts = {}) { - let lazy = new LazyResult(new Processor(), this, opts); - - return lazy.stringify() - } - } - - Document.registerLazyResult = dependant => { - LazyResult = dependant; - }; - - Document.registerProcessor = dependant => { - Processor = dependant; - }; - - document = Document; - Document.default = Document; - return document; -} - -var nonSecure; -var hasRequiredNonSecure; - -function requireNonSecure () { - if (hasRequiredNonSecure) return nonSecure; - hasRequiredNonSecure = 1; - let urlAlphabet = - 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'; - let customAlphabet = (alphabet, defaultSize = 21) => { - return (size = defaultSize) => { - let id = ''; - let i = size; - while (i--) { - id += alphabet[(Math.random() * alphabet.length) | 0]; - } - return id - } - }; - let nanoid = (size = 21) => { - let id = ''; - let i = size; - while (i--) { - id += urlAlphabet[(Math.random() * 64) | 0]; - } - return id - }; - nonSecure = { nanoid, customAlphabet }; - return nonSecure; -} - -var sourceMap$1 = {}; - -var sourceMapGenerator$1 = {}; - -var base64Vlq$1 = {}; - -var base64$1 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredBase64$1; - -function requireBase64$1 () { - if (hasRequiredBase64$1) return base64$1; - hasRequiredBase64$1 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - base64$1.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - base64$1.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - return base64$1; -} - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredBase64Vlq$1; - -function requireBase64Vlq$1 () { - if (hasRequiredBase64Vlq$1) return base64Vlq$1; - hasRequiredBase64Vlq$1 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = /*@__PURE__*/ requireBase64$1(); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - base64Vlq$1.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - base64Vlq$1.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - return base64Vlq$1; -} - -var util$2 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredUtil$2; - -function requireUtil$2 () { - if (hasRequiredUtil$2) return util$2; - hasRequiredUtil$2 = 1; - (function (exports) { - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port; - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - var MAX_CACHED_INPUTS = 32; - - /** - * Takes some function `f(input) -> result` and returns a memoized version of - * `f`. - * - * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The - * memoization is a dumb-simple, linear least-recently-used cache. - */ - function lruMemoize(f) { - var cache = []; - - return function(input) { - for (var i = 0; i < cache.length; i++) { - if (cache[i].input === input) { - var temp = cache[0]; - cache[0] = cache[i]; - cache[i] = temp; - return cache[0].result; - } - } - - var result = f(input); - - cache.unshift({ - input, - result, - }); - - if (cache.length > MAX_CACHED_INPUTS) { - cache.pop(); - } - - return result; - }; - } - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '<dir>/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - var normalize = lruMemoize(function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - // Split the path into parts between `/` characters. This is much faster than - // using `.split(/\/+/g)`. - var parts = []; - var start = 0; - var i = 0; - while (true) { - start = i; - i = path.indexOf("/", start); - if (i === -1) { - parts.push(path.slice(start)); - break; - } else { - parts.push(path.slice(start, i)); - while (i < path.length && path[i] === "/") { - i++; - } - } - } - - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - }); - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { - var cmp; - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - /** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ - function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); - } - exports.parseSourceMapInput = parseSourceMapInput; - - /** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ - function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); - } - exports.computeSourceURL = computeSourceURL; - } (util$2)); - return util$2; -} - -var arraySet$1 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredArraySet$1; - -function requireArraySet$1 () { - if (hasRequiredArraySet$1) return arraySet$1; - hasRequiredArraySet$1 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = /*@__PURE__*/ requireUtil$2(); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - arraySet$1.ArraySet = ArraySet; - return arraySet$1; -} - -var mappingList$1 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredMappingList$1; - -function requireMappingList$1 () { - if (hasRequiredMappingList$1) return mappingList$1; - hasRequiredMappingList$1 = 1; - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = /*@__PURE__*/ requireUtil$2(); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - mappingList$1.MappingList = MappingList; - return mappingList$1; -} - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredSourceMapGenerator$1; - -function requireSourceMapGenerator$1 () { - if (hasRequiredSourceMapGenerator$1) return sourceMapGenerator$1; - hasRequiredSourceMapGenerator$1 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = /*@__PURE__*/ requireBase64Vlq$1(); - var util = /*@__PURE__*/ requireUtil$2(); - var ArraySet = /*@__PURE__*/ requireArraySet$1().ArraySet; - var MappingList = /*@__PURE__*/ requireMappingList$1().MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, { - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - })); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - if (this._validateMapping(generated, original, source, name) === false) { - return; - } - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source); - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - var message = 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.'; - - if (this._ignoreInvalidMapping) { - if (typeof console !== 'undefined' && console.warn) { - console.warn(message); - } - return false; - } else { - throw new Error(message); - } - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - var message = 'Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - }); - - if (this._ignoreInvalidMapping) { - if (typeof console !== 'undefined' && console.warn) { - console.warn(message); - } - return false; - } else { - throw new Error(message) - } - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = ''; - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - sourceMapGenerator$1.SourceMapGenerator = SourceMapGenerator; - return sourceMapGenerator$1; -} - -var sourceMapConsumer$1 = {}; - -var binarySearch$1 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredBinarySearch$1; - -function requireBinarySearch$1 () { - if (hasRequiredBinarySearch$1) return binarySearch$1; - hasRequiredBinarySearch$1 = 1; - (function (exports) { - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - } (binarySearch$1)); - return binarySearch$1; -} - -var quickSort$1 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredQuickSort$1; - -function requireQuickSort$1 () { - if (hasRequiredQuickSort$1) return quickSort$1; - hasRequiredQuickSort$1 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - function SortTemplate(comparator) { - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot, false) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - return doQuickSort; - } - - function cloneSort(comparator) { - let template = SortTemplate.toString(); - let templateFn = new Function(`return ${template}`)(); - return templateFn(comparator); - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - - let sortCache = new WeakMap(); - quickSort$1.quickSort = function (ary, comparator, start = 0) { - let doQuickSort = sortCache.get(comparator); - if (doQuickSort === void 0) { - doQuickSort = cloneSort(comparator); - sortCache.set(comparator, doQuickSort); - } - doQuickSort(ary, comparator, start, ary.length - 1); - }; - return quickSort$1; -} - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredSourceMapConsumer$1; - -function requireSourceMapConsumer$1 () { - if (hasRequiredSourceMapConsumer$1) return sourceMapConsumer$1; - hasRequiredSourceMapConsumer$1 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = /*@__PURE__*/ requireUtil$2(); - var binarySearch = /*@__PURE__*/ requireBinarySearch$1(); - var ArraySet = /*@__PURE__*/ requireArraySet$1().ArraySet; - var base64VLQ = /*@__PURE__*/ requireBase64Vlq$1(); - var quickSort = /*@__PURE__*/ requireQuickSort$1().quickSort; - - function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - var boundCallback = aCallback.bind(context); - var names = this._names; - var sources = this._sources; - var sourceMapURL = this._sourceMapURL; - - for (var i = 0, n = mappings.length; i < n; i++) { - var mapping = mappings[i]; - var source = mapping.source === null ? null : sources.at(mapping.source); - if(source !== null) { - source = util.computeSourceURL(sourceRoot, source, sourceMapURL); - } - boundCallback({ - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : names.at(mapping.name) - }); - } - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - sourceMapConsumer$1.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ - BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; - }; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - - const compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine; - function sortGenerated(array, start) { - let l = array.length; - let n = array.length - start; - if (n <= 1) { - return; - } else if (n == 2) { - let a = array[start]; - let b = array[start + 1]; - if (compareGenerated(a, b) > 0) { - array[start] = b; - array[start + 1] = a; - } - } else if (n < 20) { - for (let i = start; i < l; i++) { - for (let j = i; j > start; j--) { - let a = array[j - 1]; - let b = array[j]; - if (compareGenerated(a, b) <= 0) { - break; - } - array[j - 1] = b; - array[j] = a; - } - } - } else { - quickSort(array, compareGenerated, start); - } - } - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, segment, end, value; - - let subarrayStart = 0; - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - - sortGenerated(generatedMappings, subarrayStart); - subarrayStart = generatedMappings.length; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - aStr.slice(index, end); - - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - let currentSource = mapping.source; - while (originalMappings.length <= currentSource) { - originalMappings.push(null); - } - if (originalMappings[currentSource] === null) { - originalMappings[currentSource] = []; - } - originalMappings[currentSource].push(mapping); - } - } - } - - sortGenerated(generatedMappings, subarrayStart); - this.__generatedMappings = generatedMappings; - - for (var i = 0; i < originalMappings.length; i++) { - if (originalMappings[i] != null) { - quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource); - } - } - this.__originalMappings = [].concat(...originalMappings); - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - sourceMapConsumer$1.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content || content === '') { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if(source !== null) { - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - sourceMapConsumer$1.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - return sourceMapConsumer$1; -} - -var sourceNode$1 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredSourceNode$1; - -function requireSourceNode$1 () { - if (hasRequiredSourceNode$1) return sourceNode$1; - hasRequiredSourceNode$1 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator$1().SourceMapGenerator; - var util = /*@__PURE__*/ requireUtil$2(); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - sourceNode$1.SourceNode = SourceNode; - return sourceNode$1; -} - -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredSourceMap$1; - -function requireSourceMap$1 () { - if (hasRequiredSourceMap$1) return sourceMap$1; - hasRequiredSourceMap$1 = 1; - sourceMap$1.SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator$1().SourceMapGenerator; - sourceMap$1.SourceMapConsumer = /*@__PURE__*/ requireSourceMapConsumer$1().SourceMapConsumer; - sourceMap$1.SourceNode = /*@__PURE__*/ requireSourceNode$1().SourceNode; - return sourceMap$1; -} - -var require$$2 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_url$1); - -var previousMap; -var hasRequiredPreviousMap; - -function requirePreviousMap () { - if (hasRequiredPreviousMap) return previousMap; - hasRequiredPreviousMap = 1; - - let { existsSync, readFileSync } = require$$0$1; - let { dirname, join } = require$$1; - let { SourceMapConsumer, SourceMapGenerator } = /*@__PURE__*/ requireSourceMap$1(); - - function fromBase64(str) { - if (Buffer$1) { - return Buffer$1.from(str, 'base64').toString() - } else { - /* c8 ignore next 2 */ - return window.atob(str) - } - } - - class PreviousMap { - constructor(css, opts) { - if (opts.map === false) return - this.loadAnnotation(css); - this.inline = this.startWith(this.annotation, 'data:'); - - let prev = opts.map ? opts.map.prev : undefined; - let text = this.loadMap(opts.from, prev); - if (!this.mapFile && opts.from) { - this.mapFile = opts.from; - } - if (this.mapFile) this.root = dirname(this.mapFile); - if (text) this.text = text; - } - - consumer() { - if (!this.consumerCache) { - this.consumerCache = new SourceMapConsumer(this.text); - } - return this.consumerCache - } - - decodeInline(text) { - let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/; - let baseUri = /^data:application\/json;base64,/; - let charsetUri = /^data:application\/json;charset=utf-?8,/; - let uri = /^data:application\/json,/; - - let uriMatch = text.match(charsetUri) || text.match(uri); - if (uriMatch) { - return decodeURIComponent(text.substr(uriMatch[0].length)) - } - - let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri); - if (baseUriMatch) { - return fromBase64(text.substr(baseUriMatch[0].length)) - } - - let encoding = text.match(/data:application\/json;([^,]+),/)[1]; - throw new Error('Unsupported source map encoding ' + encoding) - } - - getAnnotationURL(sourceMapString) { - return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim() - } - - isMap(map) { - if (typeof map !== 'object') return false - return ( - typeof map.mappings === 'string' || - typeof map._mappings === 'string' || - Array.isArray(map.sections) - ) - } - - loadAnnotation(css) { - let comments = css.match(/\/\*\s*# sourceMappingURL=/g); - if (!comments) return - - // sourceMappingURLs from comments, strings, etc. - let start = css.lastIndexOf(comments.pop()); - let end = css.indexOf('*/', start); - - if (start > -1 && end > -1) { - // Locate the last sourceMappingURL to avoid pickin - this.annotation = this.getAnnotationURL(css.substring(start, end)); - } - } - - loadFile(path) { - this.root = dirname(path); - if (existsSync(path)) { - this.mapFile = path; - return readFileSync(path, 'utf-8').toString().trim() - } - } - - loadMap(file, prev) { - if (prev === false) return false - - if (prev) { - if (typeof prev === 'string') { - return prev - } else if (typeof prev === 'function') { - let prevPath = prev(file); - if (prevPath) { - let map = this.loadFile(prevPath); - if (!map) { - throw new Error( - 'Unable to load previous source map: ' + prevPath.toString() - ) - } - return map - } - } else if (prev instanceof SourceMapConsumer) { - return SourceMapGenerator.fromSourceMap(prev).toString() - } else if (prev instanceof SourceMapGenerator) { - return prev.toString() - } else if (this.isMap(prev)) { - return JSON.stringify(prev) - } else { - throw new Error( - 'Unsupported previous source map format: ' + prev.toString() - ) - } - } else if (this.inline) { - return this.decodeInline(this.annotation) - } else if (this.annotation) { - let map = this.annotation; - if (file) map = join(dirname(file), map); - return this.loadFile(map) - } - } - - startWith(string, start) { - if (!string) return false - return string.substr(0, start.length) === start - } - - withContent() { - return !!( - this.consumer().sourcesContent && - this.consumer().sourcesContent.length > 0 - ) - } - } - - previousMap = PreviousMap; - PreviousMap.default = PreviousMap; - return previousMap; -} - -var input; -var hasRequiredInput; - -function requireInput () { - if (hasRequiredInput) return input; - hasRequiredInput = 1; - - let { nanoid } = /*@__PURE__*/ requireNonSecure(); - let { isAbsolute, resolve } = require$$1; - let { SourceMapConsumer, SourceMapGenerator } = /*@__PURE__*/ requireSourceMap$1(); - let { fileURLToPath, pathToFileURL } = require$$2; - - let CssSyntaxError = /*@__PURE__*/ requireCssSyntaxError(); - let PreviousMap = /*@__PURE__*/ requirePreviousMap(); - let terminalHighlight = /*@__PURE__*/ requireTerminalHighlight(); - - let fromOffsetCache = Symbol('fromOffsetCache'); - - let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator); - let pathAvailable = Boolean(resolve && isAbsolute); - - class Input { - constructor(css, opts = {}) { - if ( - css === null || - typeof css === 'undefined' || - (typeof css === 'object' && !css.toString) - ) { - throw new Error(`PostCSS received ${css} instead of CSS string`) - } - - this.css = css.toString(); - - if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') { - this.hasBOM = true; - this.css = this.css.slice(1); - } else { - this.hasBOM = false; - } - - if (opts.from) { - if ( - !pathAvailable || - /^\w+:\/\//.test(opts.from) || - isAbsolute(opts.from) - ) { - this.file = opts.from; - } else { - this.file = resolve(opts.from); - } - } - - if (pathAvailable && sourceMapAvailable) { - let map = new PreviousMap(this.css, opts); - if (map.text) { - this.map = map; - let file = map.consumer().file; - if (!this.file && file) this.file = this.mapResolve(file); - } - } - - if (!this.file) { - this.id = '<input css ' + nanoid(6) + '>'; - } - if (this.map) this.map.file = this.from; - } - - error(message, line, column, opts = {}) { - let endColumn, endLine, result; - - if (line && typeof line === 'object') { - let start = line; - let end = column; - if (typeof start.offset === 'number') { - let pos = this.fromOffset(start.offset); - line = pos.line; - column = pos.col; - } else { - line = start.line; - column = start.column; - } - if (typeof end.offset === 'number') { - let pos = this.fromOffset(end.offset); - endLine = pos.line; - endColumn = pos.col; - } else { - endLine = end.line; - endColumn = end.column; - } - } else if (!column) { - let pos = this.fromOffset(line); - line = pos.line; - column = pos.col; - } - - let origin = this.origin(line, column, endLine, endColumn); - if (origin) { - result = new CssSyntaxError( - message, - origin.endLine === undefined - ? origin.line - : { column: origin.column, line: origin.line }, - origin.endLine === undefined - ? origin.column - : { column: origin.endColumn, line: origin.endLine }, - origin.source, - origin.file, - opts.plugin - ); - } else { - result = new CssSyntaxError( - message, - endLine === undefined ? line : { column, line }, - endLine === undefined ? column : { column: endColumn, line: endLine }, - this.css, - this.file, - opts.plugin - ); - } - - result.input = { column, endColumn, endLine, line, source: this.css }; - if (this.file) { - if (pathToFileURL) { - result.input.url = pathToFileURL(this.file).toString(); - } - result.input.file = this.file; - } - - return result - } - - fromOffset(offset) { - let lastLine, lineToIndex; - if (!this[fromOffsetCache]) { - let lines = this.css.split('\n'); - lineToIndex = new Array(lines.length); - let prevIndex = 0; - - for (let i = 0, l = lines.length; i < l; i++) { - lineToIndex[i] = prevIndex; - prevIndex += lines[i].length + 1; - } - - this[fromOffsetCache] = lineToIndex; - } else { - lineToIndex = this[fromOffsetCache]; - } - lastLine = lineToIndex[lineToIndex.length - 1]; - - let min = 0; - if (offset >= lastLine) { - min = lineToIndex.length - 1; - } else { - let max = lineToIndex.length - 2; - let mid; - while (min < max) { - mid = min + ((max - min) >> 1); - if (offset < lineToIndex[mid]) { - max = mid - 1; - } else if (offset >= lineToIndex[mid + 1]) { - min = mid + 1; - } else { - min = mid; - break - } - } - } - return { - col: offset - lineToIndex[min] + 1, - line: min + 1 - } - } - - mapResolve(file) { - if (/^\w+:\/\//.test(file)) { - return file - } - return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file) - } - - origin(line, column, endLine, endColumn) { - if (!this.map) return false - let consumer = this.map.consumer(); - - let from = consumer.originalPositionFor({ column, line }); - if (!from.source) return false - - let to; - if (typeof endLine === 'number') { - to = consumer.originalPositionFor({ column: endColumn, line: endLine }); - } - - let fromUrl; - - if (isAbsolute(from.source)) { - fromUrl = pathToFileURL(from.source); - } else { - fromUrl = new URL( - from.source, - this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile) - ); - } - - let result = { - column: from.column, - endColumn: to && to.column, - endLine: to && to.line, - line: from.line, - url: fromUrl.toString() - }; - - if (fromUrl.protocol === 'file:') { - if (fileURLToPath) { - result.file = fileURLToPath(fromUrl); - } else { - /* c8 ignore next 2 */ - throw new Error(`file: protocol is not available in this PostCSS build`) - } - } - - let source = consumer.sourceContentFor(from.source); - if (source) result.source = source; - - return result - } - - toJSON() { - let json = {}; - for (let name of ['hasBOM', 'css', 'file', 'id']) { - if (this[name] != null) { - json[name] = this[name]; - } - } - if (this.map) { - json.map = { ...this.map }; - if (json.map.consumerCache) { - json.map.consumerCache = undefined; - } - } - return json - } - - get from() { - return this.file || this.id - } - } - - input = Input; - Input.default = Input; - - if (terminalHighlight && terminalHighlight.registerInput) { - terminalHighlight.registerInput(Input); - } - return input; -} - -var root$1; -var hasRequiredRoot$1; - -function requireRoot$1 () { - if (hasRequiredRoot$1) return root$1; - hasRequiredRoot$1 = 1; - - let Container = /*@__PURE__*/ requireContainer$1(); - - let LazyResult, Processor; - - class Root extends Container { - constructor(defaults) { - super(defaults); - this.type = 'root'; - if (!this.nodes) this.nodes = []; - } - - normalize(child, sample, type) { - let nodes = super.normalize(child); - - if (sample) { - if (type === 'prepend') { - if (this.nodes.length > 1) { - sample.raws.before = this.nodes[1].raws.before; - } else { - delete sample.raws.before; - } - } else if (this.first !== sample) { - for (let node of nodes) { - node.raws.before = sample.raws.before; - } - } - } - - return nodes - } - - removeChild(child, ignore) { - let index = this.index(child); - - if (!ignore && index === 0 && this.nodes.length > 1) { - this.nodes[1].raws.before = this.nodes[index].raws.before; - } - - return super.removeChild(child) - } - - toResult(opts = {}) { - let lazy = new LazyResult(new Processor(), this, opts); - return lazy.stringify() - } - } - - Root.registerLazyResult = dependant => { - LazyResult = dependant; - }; - - Root.registerProcessor = dependant => { - Processor = dependant; - }; - - root$1 = Root; - Root.default = Root; - - Container.registerRoot(Root); - return root$1; -} - -var list_1; -var hasRequiredList; - -function requireList () { - if (hasRequiredList) return list_1; - hasRequiredList = 1; - - let list = { - comma(string) { - return list.split(string, [','], true) - }, - - space(string) { - let spaces = [' ', '\n', '\t']; - return list.split(string, spaces) - }, - - split(string, separators, last) { - let array = []; - let current = ''; - let split = false; - - let func = 0; - let inQuote = false; - let prevQuote = ''; - let escape = false; - - for (let letter of string) { - if (escape) { - escape = false; - } else if (letter === '\\') { - escape = true; - } else if (inQuote) { - if (letter === prevQuote) { - inQuote = false; - } - } else if (letter === '"' || letter === "'") { - inQuote = true; - prevQuote = letter; - } else if (letter === '(') { - func += 1; - } else if (letter === ')') { - if (func > 0) func -= 1; - } else if (func === 0) { - if (separators.includes(letter)) split = true; - } - - if (split) { - if (current !== '') array.push(current.trim()); - current = ''; - split = false; - } else { - current += letter; - } - } - - if (last || current !== '') array.push(current.trim()); - return array - } - }; - - list_1 = list; - list.default = list; - return list_1; -} - -var rule; -var hasRequiredRule; - -function requireRule () { - if (hasRequiredRule) return rule; - hasRequiredRule = 1; - - let Container = /*@__PURE__*/ requireContainer$1(); - let list = /*@__PURE__*/ requireList(); - - class Rule extends Container { - constructor(defaults) { - super(defaults); - this.type = 'rule'; - if (!this.nodes) this.nodes = []; - } - - get selectors() { - return list.comma(this.selector) - } - - set selectors(values) { - let match = this.selector ? this.selector.match(/,\s*/) : null; - let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen'); - this.selector = values.join(sep); - } - } - - rule = Rule; - Rule.default = Rule; - - Container.registerRule(Rule); - return rule; -} - -var fromJSON_1; -var hasRequiredFromJSON; - -function requireFromJSON () { - if (hasRequiredFromJSON) return fromJSON_1; - hasRequiredFromJSON = 1; - - let AtRule = /*@__PURE__*/ requireAtRule(); - let Comment = /*@__PURE__*/ requireComment$1(); - let Declaration = /*@__PURE__*/ requireDeclaration(); - let Input = /*@__PURE__*/ requireInput(); - let PreviousMap = /*@__PURE__*/ requirePreviousMap(); - let Root = /*@__PURE__*/ requireRoot$1(); - let Rule = /*@__PURE__*/ requireRule(); - - function fromJSON(json, inputs) { - if (Array.isArray(json)) return json.map(n => fromJSON(n)) - - let { inputs: ownInputs, ...defaults } = json; - if (ownInputs) { - inputs = []; - for (let input of ownInputs) { - let inputHydrated = { ...input, __proto__: Input.prototype }; - if (inputHydrated.map) { - inputHydrated.map = { - ...inputHydrated.map, - __proto__: PreviousMap.prototype - }; - } - inputs.push(inputHydrated); - } - } - if (defaults.nodes) { - defaults.nodes = json.nodes.map(n => fromJSON(n, inputs)); - } - if (defaults.source) { - let { inputId, ...source } = defaults.source; - defaults.source = source; - if (inputId != null) { - defaults.source.input = inputs[inputId]; - } - } - if (defaults.type === 'root') { - return new Root(defaults) - } else if (defaults.type === 'decl') { - return new Declaration(defaults) - } else if (defaults.type === 'rule') { - return new Rule(defaults) - } else if (defaults.type === 'comment') { - return new Comment(defaults) - } else if (defaults.type === 'atrule') { - return new AtRule(defaults) - } else { - throw new Error('Unknown node type: ' + json.type) - } - } - - fromJSON_1 = fromJSON; - fromJSON.default = fromJSON; - return fromJSON_1; -} - -var mapGenerator; -var hasRequiredMapGenerator; - -function requireMapGenerator () { - if (hasRequiredMapGenerator) return mapGenerator; - hasRequiredMapGenerator = 1; - - let { dirname, relative, resolve, sep } = require$$1; - let { SourceMapConsumer, SourceMapGenerator } = /*@__PURE__*/ requireSourceMap$1(); - let { pathToFileURL } = require$$2; - - let Input = /*@__PURE__*/ requireInput(); - - let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator); - let pathAvailable = Boolean(dirname && resolve && relative && sep); - - class MapGenerator { - constructor(stringify, root, opts, cssString) { - this.stringify = stringify; - this.mapOpts = opts.map || {}; - this.root = root; - this.opts = opts; - this.css = cssString; - this.originalCSS = cssString; - this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute; - - this.memoizedFileURLs = new Map(); - this.memoizedPaths = new Map(); - this.memoizedURLs = new Map(); - } - - addAnnotation() { - let content; - - if (this.isInline()) { - content = - 'data:application/json;base64,' + this.toBase64(this.map.toString()); - } else if (typeof this.mapOpts.annotation === 'string') { - content = this.mapOpts.annotation; - } else if (typeof this.mapOpts.annotation === 'function') { - content = this.mapOpts.annotation(this.opts.to, this.root); - } else { - content = this.outputFile() + '.map'; - } - let eol = '\n'; - if (this.css.includes('\r\n')) eol = '\r\n'; - - this.css += eol + '/*# sourceMappingURL=' + content + ' */'; - } - - applyPrevMaps() { - for (let prev of this.previous()) { - let from = this.toUrl(this.path(prev.file)); - let root = prev.root || dirname(prev.file); - let map; - - if (this.mapOpts.sourcesContent === false) { - map = new SourceMapConsumer(prev.text); - if (map.sourcesContent) { - map.sourcesContent = null; - } - } else { - map = prev.consumer(); - } - - this.map.applySourceMap(map, from, this.toUrl(this.path(root))); - } - } - - clearAnnotation() { - if (this.mapOpts.annotation === false) return - - if (this.root) { - let node; - for (let i = this.root.nodes.length - 1; i >= 0; i--) { - node = this.root.nodes[i]; - if (node.type !== 'comment') continue - if (node.text.startsWith('# sourceMappingURL=')) { - this.root.removeChild(i); - } - } - } else if (this.css) { - this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ''); - } - } - - generate() { - this.clearAnnotation(); - if (pathAvailable && sourceMapAvailable && this.isMap()) { - return this.generateMap() - } else { - let result = ''; - this.stringify(this.root, i => { - result += i; - }); - return [result] - } - } - - generateMap() { - if (this.root) { - this.generateString(); - } else if (this.previous().length === 1) { - let prev = this.previous()[0].consumer(); - prev.file = this.outputFile(); - this.map = SourceMapGenerator.fromSourceMap(prev, { - ignoreInvalidMapping: true - }); - } else { - this.map = new SourceMapGenerator({ - file: this.outputFile(), - ignoreInvalidMapping: true - }); - this.map.addMapping({ - generated: { column: 0, line: 1 }, - original: { column: 0, line: 1 }, - source: this.opts.from - ? this.toUrl(this.path(this.opts.from)) - : '<no source>' - }); - } - - if (this.isSourcesContent()) this.setSourcesContent(); - if (this.root && this.previous().length > 0) this.applyPrevMaps(); - if (this.isAnnotation()) this.addAnnotation(); - - if (this.isInline()) { - return [this.css] - } else { - return [this.css, this.map] - } - } - - generateString() { - this.css = ''; - this.map = new SourceMapGenerator({ - file: this.outputFile(), - ignoreInvalidMapping: true - }); - - let line = 1; - let column = 1; - - let noSource = '<no source>'; - let mapping = { - generated: { column: 0, line: 0 }, - original: { column: 0, line: 0 }, - source: '' - }; - - let last, lines; - this.stringify(this.root, (str, node, type) => { - this.css += str; - - if (node && type !== 'end') { - mapping.generated.line = line; - mapping.generated.column = column - 1; - if (node.source && node.source.start) { - mapping.source = this.sourcePath(node); - mapping.original.line = node.source.start.line; - mapping.original.column = node.source.start.column - 1; - this.map.addMapping(mapping); - } else { - mapping.source = noSource; - mapping.original.line = 1; - mapping.original.column = 0; - this.map.addMapping(mapping); - } - } - - lines = str.match(/\n/g); - if (lines) { - line += lines.length; - last = str.lastIndexOf('\n'); - column = str.length - last; - } else { - column += str.length; - } - - if (node && type !== 'start') { - let p = node.parent || { raws: {} }; - let childless = - node.type === 'decl' || (node.type === 'atrule' && !node.nodes); - if (!childless || node !== p.last || p.raws.semicolon) { - if (node.source && node.source.end) { - mapping.source = this.sourcePath(node); - mapping.original.line = node.source.end.line; - mapping.original.column = node.source.end.column - 1; - mapping.generated.line = line; - mapping.generated.column = column - 2; - this.map.addMapping(mapping); - } else { - mapping.source = noSource; - mapping.original.line = 1; - mapping.original.column = 0; - mapping.generated.line = line; - mapping.generated.column = column - 1; - this.map.addMapping(mapping); - } - } - } - }); - } - - isAnnotation() { - if (this.isInline()) { - return true - } - if (typeof this.mapOpts.annotation !== 'undefined') { - return this.mapOpts.annotation - } - if (this.previous().length) { - return this.previous().some(i => i.annotation) - } - return true - } - - isInline() { - if (typeof this.mapOpts.inline !== 'undefined') { - return this.mapOpts.inline - } - - let annotation = this.mapOpts.annotation; - if (typeof annotation !== 'undefined' && annotation !== true) { - return false - } - - if (this.previous().length) { - return this.previous().some(i => i.inline) - } - return true - } - - isMap() { - if (typeof this.opts.map !== 'undefined') { - return !!this.opts.map - } - return this.previous().length > 0 - } - - isSourcesContent() { - if (typeof this.mapOpts.sourcesContent !== 'undefined') { - return this.mapOpts.sourcesContent - } - if (this.previous().length) { - return this.previous().some(i => i.withContent()) - } - return true - } - - outputFile() { - if (this.opts.to) { - return this.path(this.opts.to) - } else if (this.opts.from) { - return this.path(this.opts.from) - } else { - return 'to.css' - } - } - - path(file) { - if (this.mapOpts.absolute) return file - if (file.charCodeAt(0) === 60 /* `<` */) return file - if (/^\w+:\/\//.test(file)) return file - let cached = this.memoizedPaths.get(file); - if (cached) return cached - - let from = this.opts.to ? dirname(this.opts.to) : '.'; - - if (typeof this.mapOpts.annotation === 'string') { - from = dirname(resolve(from, this.mapOpts.annotation)); - } - - let path = relative(from, file); - this.memoizedPaths.set(file, path); - - return path - } - - previous() { - if (!this.previousMaps) { - this.previousMaps = []; - if (this.root) { - this.root.walk(node => { - if (node.source && node.source.input.map) { - let map = node.source.input.map; - if (!this.previousMaps.includes(map)) { - this.previousMaps.push(map); - } - } - }); - } else { - let input = new Input(this.originalCSS, this.opts); - if (input.map) this.previousMaps.push(input.map); - } - } - - return this.previousMaps - } - - setSourcesContent() { - let already = {}; - if (this.root) { - this.root.walk(node => { - if (node.source) { - let from = node.source.input.from; - if (from && !already[from]) { - already[from] = true; - let fromUrl = this.usesFileUrls - ? this.toFileUrl(from) - : this.toUrl(this.path(from)); - this.map.setSourceContent(fromUrl, node.source.input.css); - } - } - }); - } else if (this.css) { - let from = this.opts.from - ? this.toUrl(this.path(this.opts.from)) - : '<no source>'; - this.map.setSourceContent(from, this.css); - } - } - - sourcePath(node) { - if (this.mapOpts.from) { - return this.toUrl(this.mapOpts.from) - } else if (this.usesFileUrls) { - return this.toFileUrl(node.source.input.from) - } else { - return this.toUrl(this.path(node.source.input.from)) - } - } - - toBase64(str) { - if (Buffer$1) { - return Buffer$1.from(str).toString('base64') - } else { - return window.btoa(unescape(encodeURIComponent(str))) - } - } - - toFileUrl(path) { - let cached = this.memoizedFileURLs.get(path); - if (cached) return cached - - if (pathToFileURL) { - let fileURL = pathToFileURL(path).toString(); - this.memoizedFileURLs.set(path, fileURL); - - return fileURL - } else { - throw new Error( - '`map.absolute` option is not available in this PostCSS build' - ) - } - } - - toUrl(path) { - let cached = this.memoizedURLs.get(path); - if (cached) return cached - - if (sep === '\\') { - path = path.replace(/\\/g, '/'); - } - - let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent); - this.memoizedURLs.set(path, url); - - return url - } - } - - mapGenerator = MapGenerator; - return mapGenerator; -} - -var parser$1; -var hasRequiredParser$1; - -function requireParser$1 () { - if (hasRequiredParser$1) return parser$1; - hasRequiredParser$1 = 1; - - let AtRule = /*@__PURE__*/ requireAtRule(); - let Comment = /*@__PURE__*/ requireComment$1(); - let Declaration = /*@__PURE__*/ requireDeclaration(); - let Root = /*@__PURE__*/ requireRoot$1(); - let Rule = /*@__PURE__*/ requireRule(); - let tokenizer = /*@__PURE__*/ requireTokenize$1(); - - const SAFE_COMMENT_NEIGHBOR = { - empty: true, - space: true - }; - - function findLastWithPosition(tokens) { - for (let i = tokens.length - 1; i >= 0; i--) { - let token = tokens[i]; - let pos = token[3] || token[2]; - if (pos) return pos - } - } - - class Parser { - constructor(input) { - this.input = input; - - this.root = new Root(); - this.current = this.root; - this.spaces = ''; - this.semicolon = false; - - this.createTokenizer(); - this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }; - } - - atrule(token) { - let node = new AtRule(); - node.name = token[1].slice(1); - if (node.name === '') { - this.unnamedAtrule(node, token); - } - this.init(node, token[2]); - - let type; - let prev; - let shift; - let last = false; - let open = false; - let params = []; - let brackets = []; - - while (!this.tokenizer.endOfFile()) { - token = this.tokenizer.nextToken(); - type = token[0]; - - if (type === '(' || type === '[') { - brackets.push(type === '(' ? ')' : ']'); - } else if (type === '{' && brackets.length > 0) { - brackets.push('}'); - } else if (type === brackets[brackets.length - 1]) { - brackets.pop(); - } - - if (brackets.length === 0) { - if (type === ';') { - node.source.end = this.getPosition(token[2]); - node.source.end.offset++; - this.semicolon = true; - break - } else if (type === '{') { - open = true; - break - } else if (type === '}') { - if (params.length > 0) { - shift = params.length - 1; - prev = params[shift]; - while (prev && prev[0] === 'space') { - prev = params[--shift]; - } - if (prev) { - node.source.end = this.getPosition(prev[3] || prev[2]); - node.source.end.offset++; - } - } - this.end(token); - break - } else { - params.push(token); - } - } else { - params.push(token); - } - - if (this.tokenizer.endOfFile()) { - last = true; - break - } - } - - node.raws.between = this.spacesAndCommentsFromEnd(params); - if (params.length) { - node.raws.afterName = this.spacesAndCommentsFromStart(params); - this.raw(node, 'params', params); - if (last) { - token = params[params.length - 1]; - node.source.end = this.getPosition(token[3] || token[2]); - node.source.end.offset++; - this.spaces = node.raws.between; - node.raws.between = ''; - } - } else { - node.raws.afterName = ''; - node.params = ''; - } - - if (open) { - node.nodes = []; - this.current = node; - } - } - - checkMissedSemicolon(tokens) { - let colon = this.colon(tokens); - if (colon === false) return - - let founded = 0; - let token; - for (let j = colon - 1; j >= 0; j--) { - token = tokens[j]; - if (token[0] !== 'space') { - founded += 1; - if (founded === 2) break - } - } - // If the token is a word, e.g. `!important`, `red` or any other valid property's value. - // Then we need to return the colon after that word token. [3] is the "end" colon of that word. - // And because we need it after that one we do +1 to get the next one. - throw this.input.error( - 'Missed semicolon', - token[0] === 'word' ? token[3] + 1 : token[2] - ) - } - - colon(tokens) { - let brackets = 0; - let prev, token, type; - for (let [i, element] of tokens.entries()) { - token = element; - type = token[0]; - - if (type === '(') { - brackets += 1; - } - if (type === ')') { - brackets -= 1; - } - if (brackets === 0 && type === ':') { - if (!prev) { - this.doubleColon(token); - } else if (prev[0] === 'word' && prev[1] === 'progid') { - continue - } else { - return i - } - } - - prev = token; - } - return false - } - - comment(token) { - let node = new Comment(); - this.init(node, token[2]); - node.source.end = this.getPosition(token[3] || token[2]); - node.source.end.offset++; - - let text = token[1].slice(2, -2); - if (/^\s*$/.test(text)) { - node.text = ''; - node.raws.left = text; - node.raws.right = ''; - } else { - let match = text.match(/^(\s*)([^]*\S)(\s*)$/); - node.text = match[2]; - node.raws.left = match[1]; - node.raws.right = match[3]; - } - } - - createTokenizer() { - this.tokenizer = tokenizer(this.input); - } - - decl(tokens, customProperty) { - let node = new Declaration(); - this.init(node, tokens[0][2]); - - let last = tokens[tokens.length - 1]; - if (last[0] === ';') { - this.semicolon = true; - tokens.pop(); - } - - node.source.end = this.getPosition( - last[3] || last[2] || findLastWithPosition(tokens) - ); - node.source.end.offset++; - - while (tokens[0][0] !== 'word') { - if (tokens.length === 1) this.unknownWord(tokens); - node.raws.before += tokens.shift()[1]; - } - node.source.start = this.getPosition(tokens[0][2]); - - node.prop = ''; - while (tokens.length) { - let type = tokens[0][0]; - if (type === ':' || type === 'space' || type === 'comment') { - break - } - node.prop += tokens.shift()[1]; - } - - node.raws.between = ''; - - let token; - while (tokens.length) { - token = tokens.shift(); - - if (token[0] === ':') { - node.raws.between += token[1]; - break - } else { - if (token[0] === 'word' && /\w/.test(token[1])) { - this.unknownWord([token]); - } - node.raws.between += token[1]; - } - } - - if (node.prop[0] === '_' || node.prop[0] === '*') { - node.raws.before += node.prop[0]; - node.prop = node.prop.slice(1); - } - - let firstSpaces = []; - let next; - while (tokens.length) { - next = tokens[0][0]; - if (next !== 'space' && next !== 'comment') break - firstSpaces.push(tokens.shift()); - } - - this.precheckMissedSemicolon(tokens); - - for (let i = tokens.length - 1; i >= 0; i--) { - token = tokens[i]; - if (token[1].toLowerCase() === '!important') { - node.important = true; - let string = this.stringFrom(tokens, i); - string = this.spacesFromEnd(tokens) + string; - if (string !== ' !important') node.raws.important = string; - break - } else if (token[1].toLowerCase() === 'important') { - let cache = tokens.slice(0); - let str = ''; - for (let j = i; j > 0; j--) { - let type = cache[j][0]; - if (str.trim().startsWith('!') && type !== 'space') { - break - } - str = cache.pop()[1] + str; - } - if (str.trim().startsWith('!')) { - node.important = true; - node.raws.important = str; - tokens = cache; - } - } - - if (token[0] !== 'space' && token[0] !== 'comment') { - break - } - } - - let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment'); - - if (hasWord) { - node.raws.between += firstSpaces.map(i => i[1]).join(''); - firstSpaces = []; - } - this.raw(node, 'value', firstSpaces.concat(tokens), customProperty); - - if (node.value.includes(':') && !customProperty) { - this.checkMissedSemicolon(tokens); - } - } - - doubleColon(token) { - throw this.input.error( - 'Double colon', - { offset: token[2] }, - { offset: token[2] + token[1].length } - ) - } - - emptyRule(token) { - let node = new Rule(); - this.init(node, token[2]); - node.selector = ''; - node.raws.between = ''; - this.current = node; - } - - end(token) { - if (this.current.nodes && this.current.nodes.length) { - this.current.raws.semicolon = this.semicolon; - } - this.semicolon = false; - - this.current.raws.after = (this.current.raws.after || '') + this.spaces; - this.spaces = ''; - - if (this.current.parent) { - this.current.source.end = this.getPosition(token[2]); - this.current.source.end.offset++; - this.current = this.current.parent; - } else { - this.unexpectedClose(token); - } - } - - endFile() { - if (this.current.parent) this.unclosedBlock(); - if (this.current.nodes && this.current.nodes.length) { - this.current.raws.semicolon = this.semicolon; - } - this.current.raws.after = (this.current.raws.after || '') + this.spaces; - this.root.source.end = this.getPosition(this.tokenizer.position()); - } - - freeSemicolon(token) { - this.spaces += token[1]; - if (this.current.nodes) { - let prev = this.current.nodes[this.current.nodes.length - 1]; - if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) { - prev.raws.ownSemicolon = this.spaces; - this.spaces = ''; - } - } - } - - // Helpers - - getPosition(offset) { - let pos = this.input.fromOffset(offset); - return { - column: pos.col, - line: pos.line, - offset - } - } - - init(node, offset) { - this.current.push(node); - node.source = { - input: this.input, - start: this.getPosition(offset) - }; - node.raws.before = this.spaces; - this.spaces = ''; - if (node.type !== 'comment') this.semicolon = false; - } - - other(start) { - let end = false; - let type = null; - let colon = false; - let bracket = null; - let brackets = []; - let customProperty = start[1].startsWith('--'); - - let tokens = []; - let token = start; - while (token) { - type = token[0]; - tokens.push(token); - - if (type === '(' || type === '[') { - if (!bracket) bracket = token; - brackets.push(type === '(' ? ')' : ']'); - } else if (customProperty && colon && type === '{') { - if (!bracket) bracket = token; - brackets.push('}'); - } else if (brackets.length === 0) { - if (type === ';') { - if (colon) { - this.decl(tokens, customProperty); - return - } else { - break - } - } else if (type === '{') { - this.rule(tokens); - return - } else if (type === '}') { - this.tokenizer.back(tokens.pop()); - end = true; - break - } else if (type === ':') { - colon = true; - } - } else if (type === brackets[brackets.length - 1]) { - brackets.pop(); - if (brackets.length === 0) bracket = null; - } - - token = this.tokenizer.nextToken(); - } - - if (this.tokenizer.endOfFile()) end = true; - if (brackets.length > 0) this.unclosedBracket(bracket); - - if (end && colon) { - if (!customProperty) { - while (tokens.length) { - token = tokens[tokens.length - 1][0]; - if (token !== 'space' && token !== 'comment') break - this.tokenizer.back(tokens.pop()); - } - } - this.decl(tokens, customProperty); - } else { - this.unknownWord(tokens); - } - } - - parse() { - let token; - while (!this.tokenizer.endOfFile()) { - token = this.tokenizer.nextToken(); - - switch (token[0]) { - case 'space': - this.spaces += token[1]; - break - - case ';': - this.freeSemicolon(token); - break - - case '}': - this.end(token); - break - - case 'comment': - this.comment(token); - break - - case 'at-word': - this.atrule(token); - break - - case '{': - this.emptyRule(token); - break - - default: - this.other(token); - break - } - } - this.endFile(); - } - - precheckMissedSemicolon(/* tokens */) { - // Hook for Safe Parser - } - - raw(node, prop, tokens, customProperty) { - let token, type; - let length = tokens.length; - let value = ''; - let clean = true; - let next, prev; - - for (let i = 0; i < length; i += 1) { - token = tokens[i]; - type = token[0]; - if (type === 'space' && i === length - 1 && !customProperty) { - clean = false; - } else if (type === 'comment') { - prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'; - next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'; - if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) { - if (value.slice(-1) === ',') { - clean = false; - } else { - value += token[1]; - } - } else { - clean = false; - } - } else { - value += token[1]; - } - } - if (!clean) { - let raw = tokens.reduce((all, i) => all + i[1], ''); - node.raws[prop] = { raw, value }; - } - node[prop] = value; - } - - rule(tokens) { - tokens.pop(); - - let node = new Rule(); - this.init(node, tokens[0][2]); - - node.raws.between = this.spacesAndCommentsFromEnd(tokens); - this.raw(node, 'selector', tokens); - this.current = node; - } - - spacesAndCommentsFromEnd(tokens) { - let lastTokenType; - let spaces = ''; - while (tokens.length) { - lastTokenType = tokens[tokens.length - 1][0]; - if (lastTokenType !== 'space' && lastTokenType !== 'comment') break - spaces = tokens.pop()[1] + spaces; - } - return spaces - } - - // Errors - - spacesAndCommentsFromStart(tokens) { - let next; - let spaces = ''; - while (tokens.length) { - next = tokens[0][0]; - if (next !== 'space' && next !== 'comment') break - spaces += tokens.shift()[1]; - } - return spaces - } - - spacesFromEnd(tokens) { - let lastTokenType; - let spaces = ''; - while (tokens.length) { - lastTokenType = tokens[tokens.length - 1][0]; - if (lastTokenType !== 'space') break - spaces = tokens.pop()[1] + spaces; - } - return spaces - } - - stringFrom(tokens, from) { - let result = ''; - for (let i = from; i < tokens.length; i++) { - result += tokens[i][1]; - } - tokens.splice(from, tokens.length - from); - return result - } - - unclosedBlock() { - let pos = this.current.source.start; - throw this.input.error('Unclosed block', pos.line, pos.column) - } - - unclosedBracket(bracket) { - throw this.input.error( - 'Unclosed bracket', - { offset: bracket[2] }, - { offset: bracket[2] + 1 } - ) - } - - unexpectedClose(token) { - throw this.input.error( - 'Unexpected }', - { offset: token[2] }, - { offset: token[2] + 1 } - ) - } - - unknownWord(tokens) { - throw this.input.error( - 'Unknown word', - { offset: tokens[0][2] }, - { offset: tokens[0][2] + tokens[0][1].length } - ) - } - - unnamedAtrule(node, token) { - throw this.input.error( - 'At-rule without name', - { offset: token[2] }, - { offset: token[2] + token[1].length } - ) - } - } - - parser$1 = Parser; - return parser$1; -} - -var parse_1; -var hasRequiredParse; - -function requireParse () { - if (hasRequiredParse) return parse_1; - hasRequiredParse = 1; - - let Container = /*@__PURE__*/ requireContainer$1(); - let Input = /*@__PURE__*/ requireInput(); - let Parser = /*@__PURE__*/ requireParser$1(); - - function parse(css, opts) { - let input = new Input(css, opts); - let parser = new Parser(input); - try { - parser.parse(); - } catch (e) { - if (browser$1.env.NODE_ENV !== 'production') { - if (e.name === 'CssSyntaxError' && opts && opts.from) { - if (/\.scss$/i.test(opts.from)) { - e.message += - '\nYou tried to parse SCSS with ' + - 'the standard CSS parser; ' + - 'try again with the postcss-scss parser'; - } else if (/\.sass/i.test(opts.from)) { - e.message += - '\nYou tried to parse Sass with ' + - 'the standard CSS parser; ' + - 'try again with the postcss-sass parser'; - } else if (/\.less$/i.test(opts.from)) { - e.message += - '\nYou tried to parse Less with ' + - 'the standard CSS parser; ' + - 'try again with the postcss-less parser'; - } - } - } - throw e - } - - return parser.root - } - - parse_1 = parse; - parse.default = parse; - - Container.registerParse(parse); - return parse_1; -} - -var warning; -var hasRequiredWarning; - -function requireWarning () { - if (hasRequiredWarning) return warning; - hasRequiredWarning = 1; - - class Warning { - constructor(text, opts = {}) { - this.type = 'warning'; - this.text = text; - - if (opts.node && opts.node.source) { - let range = opts.node.rangeBy(opts); - this.line = range.start.line; - this.column = range.start.column; - this.endLine = range.end.line; - this.endColumn = range.end.column; - } - - for (let opt in opts) this[opt] = opts[opt]; - } - - toString() { - if (this.node) { - return this.node.error(this.text, { - index: this.index, - plugin: this.plugin, - word: this.word - }).message - } - - if (this.plugin) { - return this.plugin + ': ' + this.text - } - - return this.text - } - } - - warning = Warning; - Warning.default = Warning; - return warning; -} - -var result; -var hasRequiredResult; - -function requireResult () { - if (hasRequiredResult) return result; - hasRequiredResult = 1; - - let Warning = /*@__PURE__*/ requireWarning(); - - class Result { - constructor(processor, root, opts) { - this.processor = processor; - this.messages = []; - this.root = root; - this.opts = opts; - this.css = undefined; - this.map = undefined; - } - - toString() { - return this.css - } - - warn(text, opts = {}) { - if (!opts.plugin) { - if (this.lastPlugin && this.lastPlugin.postcssPlugin) { - opts.plugin = this.lastPlugin.postcssPlugin; - } - } - - let warning = new Warning(text, opts); - this.messages.push(warning); - - return warning - } - - warnings() { - return this.messages.filter(i => i.type === 'warning') - } - - get content() { - return this.css - } - } - - result = Result; - Result.default = Result; - return result; -} - -/* eslint-disable no-console */ - -var warnOnce; -var hasRequiredWarnOnce; - -function requireWarnOnce () { - if (hasRequiredWarnOnce) return warnOnce; - hasRequiredWarnOnce = 1; - - let printed = {}; - - warnOnce = function warnOnce(message) { - if (printed[message]) return - printed[message] = true; - - if (typeof console !== 'undefined' && console.warn) { - console.warn(message); - } - }; - return warnOnce; -} - -var lazyResult; -var hasRequiredLazyResult; - -function requireLazyResult () { - if (hasRequiredLazyResult) return lazyResult; - hasRequiredLazyResult = 1; - - let Container = /*@__PURE__*/ requireContainer$1(); - let Document = /*@__PURE__*/ requireDocument(); - let MapGenerator = /*@__PURE__*/ requireMapGenerator(); - let parse = /*@__PURE__*/ requireParse(); - let Result = /*@__PURE__*/ requireResult(); - let Root = /*@__PURE__*/ requireRoot$1(); - let stringify = /*@__PURE__*/ requireStringify(); - let { isClean, my } = /*@__PURE__*/ requireSymbols(); - let warnOnce = /*@__PURE__*/ requireWarnOnce(); - - const TYPE_TO_CLASS_NAME = { - atrule: 'AtRule', - comment: 'Comment', - decl: 'Declaration', - document: 'Document', - root: 'Root', - rule: 'Rule' - }; - - const PLUGIN_PROPS = { - AtRule: true, - AtRuleExit: true, - Comment: true, - CommentExit: true, - Declaration: true, - DeclarationExit: true, - Document: true, - DocumentExit: true, - Once: true, - OnceExit: true, - postcssPlugin: true, - prepare: true, - Root: true, - RootExit: true, - Rule: true, - RuleExit: true - }; - - const NOT_VISITORS = { - Once: true, - postcssPlugin: true, - prepare: true - }; - - const CHILDREN = 0; - - function isPromise(obj) { - return typeof obj === 'object' && typeof obj.then === 'function' - } - - function getEvents(node) { - let key = false; - let type = TYPE_TO_CLASS_NAME[node.type]; - if (node.type === 'decl') { - key = node.prop.toLowerCase(); - } else if (node.type === 'atrule') { - key = node.name.toLowerCase(); - } - - if (key && node.append) { - return [ - type, - type + '-' + key, - CHILDREN, - type + 'Exit', - type + 'Exit-' + key - ] - } else if (key) { - return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key] - } else if (node.append) { - return [type, CHILDREN, type + 'Exit'] - } else { - return [type, type + 'Exit'] - } - } - - function toStack(node) { - let events; - if (node.type === 'document') { - events = ['Document', CHILDREN, 'DocumentExit']; - } else if (node.type === 'root') { - events = ['Root', CHILDREN, 'RootExit']; - } else { - events = getEvents(node); - } - - return { - eventIndex: 0, - events, - iterator: 0, - node, - visitorIndex: 0, - visitors: [] - } - } - - function cleanMarks(node) { - node[isClean] = false; - if (node.nodes) node.nodes.forEach(i => cleanMarks(i)); - return node - } - - let postcss = {}; - - class LazyResult { - constructor(processor, css, opts) { - this.stringified = false; - this.processed = false; - - let root; - if ( - typeof css === 'object' && - css !== null && - (css.type === 'root' || css.type === 'document') - ) { - root = cleanMarks(css); - } else if (css instanceof LazyResult || css instanceof Result) { - root = cleanMarks(css.root); - if (css.map) { - if (typeof opts.map === 'undefined') opts.map = {}; - if (!opts.map.inline) opts.map.inline = false; - opts.map.prev = css.map; - } - } else { - let parser = parse; - if (opts.syntax) parser = opts.syntax.parse; - if (opts.parser) parser = opts.parser; - if (parser.parse) parser = parser.parse; - - try { - root = parser(css, opts); - } catch (error) { - this.processed = true; - this.error = error; - } - - if (root && !root[my]) { - /* c8 ignore next 2 */ - Container.rebuild(root); - } - } - - this.result = new Result(processor, root, opts); - this.helpers = { ...postcss, postcss, result: this.result }; - this.plugins = this.processor.plugins.map(plugin => { - if (typeof plugin === 'object' && plugin.prepare) { - return { ...plugin, ...plugin.prepare(this.result) } - } else { - return plugin - } - }); - } - - async() { - if (this.error) return Promise.reject(this.error) - if (this.processed) return Promise.resolve(this.result) - if (!this.processing) { - this.processing = this.runAsync(); - } - return this.processing - } - - catch(onRejected) { - return this.async().catch(onRejected) - } - - finally(onFinally) { - return this.async().then(onFinally, onFinally) - } - - getAsyncError() { - throw new Error('Use process(css).then(cb) to work with async plugins') - } - - handleError(error, node) { - let plugin = this.result.lastPlugin; - try { - if (node) node.addToError(error); - this.error = error; - if (error.name === 'CssSyntaxError' && !error.plugin) { - error.plugin = plugin.postcssPlugin; - error.setMessage(); - } else if (plugin.postcssVersion) { - if (browser$1.env.NODE_ENV !== 'production') { - let pluginName = plugin.postcssPlugin; - let pluginVer = plugin.postcssVersion; - let runtimeVer = this.result.processor.version; - let a = pluginVer.split('.'); - let b = runtimeVer.split('.'); - - if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { - // eslint-disable-next-line no-console - console.error( - 'Unknown error from PostCSS plugin. Your current PostCSS ' + - 'version is ' + - runtimeVer + - ', but ' + - pluginName + - ' uses ' + - pluginVer + - '. Perhaps this is the source of the error below.' - ); - } - } - } - } catch (err) { - /* c8 ignore next 3 */ - // eslint-disable-next-line no-console - if (console && console.error) console.error(err); - } - return error - } - - prepareVisitors() { - this.listeners = {}; - let add = (plugin, type, cb) => { - if (!this.listeners[type]) this.listeners[type] = []; - this.listeners[type].push([plugin, cb]); - }; - for (let plugin of this.plugins) { - if (typeof plugin === 'object') { - for (let event in plugin) { - if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) { - throw new Error( - `Unknown event ${event} in ${plugin.postcssPlugin}. ` + - `Try to update PostCSS (${this.processor.version} now).` - ) - } - if (!NOT_VISITORS[event]) { - if (typeof plugin[event] === 'object') { - for (let filter in plugin[event]) { - if (filter === '*') { - add(plugin, event, plugin[event][filter]); - } else { - add( - plugin, - event + '-' + filter.toLowerCase(), - plugin[event][filter] - ); - } - } - } else if (typeof plugin[event] === 'function') { - add(plugin, event, plugin[event]); - } - } - } - } - } - this.hasListener = Object.keys(this.listeners).length > 0; - } - - async runAsync() { - this.plugin = 0; - for (let i = 0; i < this.plugins.length; i++) { - let plugin = this.plugins[i]; - let promise = this.runOnRoot(plugin); - if (isPromise(promise)) { - try { - await promise; - } catch (error) { - throw this.handleError(error) - } - } - } - - this.prepareVisitors(); - if (this.hasListener) { - let root = this.result.root; - while (!root[isClean]) { - root[isClean] = true; - let stack = [toStack(root)]; - while (stack.length > 0) { - let promise = this.visitTick(stack); - if (isPromise(promise)) { - try { - await promise; - } catch (e) { - let node = stack[stack.length - 1].node; - throw this.handleError(e, node) - } - } - } - } - - if (this.listeners.OnceExit) { - for (let [plugin, visitor] of this.listeners.OnceExit) { - this.result.lastPlugin = plugin; - try { - if (root.type === 'document') { - let roots = root.nodes.map(subRoot => - visitor(subRoot, this.helpers) - ); - - await Promise.all(roots); - } else { - await visitor(root, this.helpers); - } - } catch (e) { - throw this.handleError(e) - } - } - } - } - - this.processed = true; - return this.stringify() - } - - runOnRoot(plugin) { - this.result.lastPlugin = plugin; - try { - if (typeof plugin === 'object' && plugin.Once) { - if (this.result.root.type === 'document') { - let roots = this.result.root.nodes.map(root => - plugin.Once(root, this.helpers) - ); - - if (isPromise(roots[0])) { - return Promise.all(roots) - } - - return roots - } - - return plugin.Once(this.result.root, this.helpers) - } else if (typeof plugin === 'function') { - return plugin(this.result.root, this.result) - } - } catch (error) { - throw this.handleError(error) - } - } - - stringify() { - if (this.error) throw this.error - if (this.stringified) return this.result - this.stringified = true; - - this.sync(); - - let opts = this.result.opts; - let str = stringify; - if (opts.syntax) str = opts.syntax.stringify; - if (opts.stringifier) str = opts.stringifier; - if (str.stringify) str = str.stringify; - - let map = new MapGenerator(str, this.result.root, this.result.opts); - let data = map.generate(); - this.result.css = data[0]; - this.result.map = data[1]; - - return this.result - } - - sync() { - if (this.error) throw this.error - if (this.processed) return this.result - this.processed = true; - - if (this.processing) { - throw this.getAsyncError() - } - - for (let plugin of this.plugins) { - let promise = this.runOnRoot(plugin); - if (isPromise(promise)) { - throw this.getAsyncError() - } - } - - this.prepareVisitors(); - if (this.hasListener) { - let root = this.result.root; - while (!root[isClean]) { - root[isClean] = true; - this.walkSync(root); - } - if (this.listeners.OnceExit) { - if (root.type === 'document') { - for (let subRoot of root.nodes) { - this.visitSync(this.listeners.OnceExit, subRoot); - } - } else { - this.visitSync(this.listeners.OnceExit, root); - } - } - } - - return this.result - } - - then(onFulfilled, onRejected) { - if (browser$1.env.NODE_ENV !== 'production') { - if (!('from' in this.opts)) { - warnOnce( - 'Without `from` option PostCSS could generate wrong source map ' + - 'and will not find Browserslist config. Set it to CSS file path ' + - 'or to `undefined` to prevent this warning.' - ); - } - } - return this.async().then(onFulfilled, onRejected) - } - - toString() { - return this.css - } - - visitSync(visitors, node) { - for (let [plugin, visitor] of visitors) { - this.result.lastPlugin = plugin; - let promise; - try { - promise = visitor(node, this.helpers); - } catch (e) { - throw this.handleError(e, node.proxyOf) - } - if (node.type !== 'root' && node.type !== 'document' && !node.parent) { - return true - } - if (isPromise(promise)) { - throw this.getAsyncError() - } - } - } - - visitTick(stack) { - let visit = stack[stack.length - 1]; - let { node, visitors } = visit; - - if (node.type !== 'root' && node.type !== 'document' && !node.parent) { - stack.pop(); - return - } - - if (visitors.length > 0 && visit.visitorIndex < visitors.length) { - let [plugin, visitor] = visitors[visit.visitorIndex]; - visit.visitorIndex += 1; - if (visit.visitorIndex === visitors.length) { - visit.visitors = []; - visit.visitorIndex = 0; - } - this.result.lastPlugin = plugin; - try { - return visitor(node.toProxy(), this.helpers) - } catch (e) { - throw this.handleError(e, node) - } - } - - if (visit.iterator !== 0) { - let iterator = visit.iterator; - let child; - while ((child = node.nodes[node.indexes[iterator]])) { - node.indexes[iterator] += 1; - if (!child[isClean]) { - child[isClean] = true; - stack.push(toStack(child)); - return - } - } - visit.iterator = 0; - delete node.indexes[iterator]; - } - - let events = visit.events; - while (visit.eventIndex < events.length) { - let event = events[visit.eventIndex]; - visit.eventIndex += 1; - if (event === CHILDREN) { - if (node.nodes && node.nodes.length) { - node[isClean] = true; - visit.iterator = node.getIterator(); - } - return - } else if (this.listeners[event]) { - visit.visitors = this.listeners[event]; - return - } - } - stack.pop(); - } - - walkSync(node) { - node[isClean] = true; - let events = getEvents(node); - for (let event of events) { - if (event === CHILDREN) { - if (node.nodes) { - node.each(child => { - if (!child[isClean]) this.walkSync(child); - }); - } - } else { - let visitors = this.listeners[event]; - if (visitors) { - if (this.visitSync(visitors, node.toProxy())) return - } - } - } - } - - warnings() { - return this.sync().warnings() - } - - get content() { - return this.stringify().content - } - - get css() { - return this.stringify().css - } - - get map() { - return this.stringify().map - } - - get messages() { - return this.sync().messages - } - - get opts() { - return this.result.opts - } - - get processor() { - return this.result.processor - } - - get root() { - return this.sync().root - } - - get [Symbol.toStringTag]() { - return 'LazyResult' - } - } - - LazyResult.registerPostcss = dependant => { - postcss = dependant; - }; - - lazyResult = LazyResult; - LazyResult.default = LazyResult; - - Root.registerLazyResult(LazyResult); - Document.registerLazyResult(LazyResult); - return lazyResult; -} - -var noWorkResult; -var hasRequiredNoWorkResult; - -function requireNoWorkResult () { - if (hasRequiredNoWorkResult) return noWorkResult; - hasRequiredNoWorkResult = 1; - - let MapGenerator = /*@__PURE__*/ requireMapGenerator(); - let parse = /*@__PURE__*/ requireParse(); - const Result = /*@__PURE__*/ requireResult(); - let stringify = /*@__PURE__*/ requireStringify(); - let warnOnce = /*@__PURE__*/ requireWarnOnce(); - - class NoWorkResult { - constructor(processor, css, opts) { - css = css.toString(); - this.stringified = false; - - this._processor = processor; - this._css = css; - this._opts = opts; - this._map = undefined; - let root; - - let str = stringify; - this.result = new Result(this._processor, root, this._opts); - this.result.css = css; - - let self = this; - Object.defineProperty(this.result, 'root', { - get() { - return self.root - } - }); - - let map = new MapGenerator(str, root, this._opts, css); - if (map.isMap()) { - let [generatedCSS, generatedMap] = map.generate(); - if (generatedCSS) { - this.result.css = generatedCSS; - } - if (generatedMap) { - this.result.map = generatedMap; - } - } else { - map.clearAnnotation(); - this.result.css = map.css; - } - } - - async() { - if (this.error) return Promise.reject(this.error) - return Promise.resolve(this.result) - } - - catch(onRejected) { - return this.async().catch(onRejected) - } - - finally(onFinally) { - return this.async().then(onFinally, onFinally) - } - - sync() { - if (this.error) throw this.error - return this.result - } - - then(onFulfilled, onRejected) { - if (browser$1.env.NODE_ENV !== 'production') { - if (!('from' in this._opts)) { - warnOnce( - 'Without `from` option PostCSS could generate wrong source map ' + - 'and will not find Browserslist config. Set it to CSS file path ' + - 'or to `undefined` to prevent this warning.' - ); - } - } - - return this.async().then(onFulfilled, onRejected) - } - - toString() { - return this._css - } - - warnings() { - return [] - } - - get content() { - return this.result.css - } - - get css() { - return this.result.css - } - - get map() { - return this.result.map - } - - get messages() { - return [] - } - - get opts() { - return this.result.opts - } - - get processor() { - return this.result.processor - } - - get root() { - if (this._root) { - return this._root - } - - let root; - let parser = parse; - - try { - root = parser(this._css, this._opts); - } catch (error) { - this.error = error; - } - - if (this.error) { - throw this.error - } else { - this._root = root; - return root - } - } - - get [Symbol.toStringTag]() { - return 'NoWorkResult' - } - } - - noWorkResult = NoWorkResult; - NoWorkResult.default = NoWorkResult; - return noWorkResult; -} - -var processor$1; -var hasRequiredProcessor$1; - -function requireProcessor$1 () { - if (hasRequiredProcessor$1) return processor$1; - hasRequiredProcessor$1 = 1; - - let Document = /*@__PURE__*/ requireDocument(); - let LazyResult = /*@__PURE__*/ requireLazyResult(); - let NoWorkResult = /*@__PURE__*/ requireNoWorkResult(); - let Root = /*@__PURE__*/ requireRoot$1(); - - class Processor { - constructor(plugins = []) { - this.version = '8.4.48'; - this.plugins = this.normalize(plugins); - } - - normalize(plugins) { - let normalized = []; - for (let i of plugins) { - if (i.postcss === true) { - i = i(); - } else if (i.postcss) { - i = i.postcss; - } - - if (typeof i === 'object' && Array.isArray(i.plugins)) { - normalized = normalized.concat(i.plugins); - } else if (typeof i === 'object' && i.postcssPlugin) { - normalized.push(i); - } else if (typeof i === 'function') { - normalized.push(i); - } else if (typeof i === 'object' && (i.parse || i.stringify)) { - if (browser$1.env.NODE_ENV !== 'production') { - throw new Error( - 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' + - 'one of the syntax/parser/stringifier options as outlined ' + - 'in your PostCSS runner documentation.' - ) - } - } else { - throw new Error(i + ' is not a PostCSS plugin') - } - } - return normalized - } - - process(css, opts = {}) { - if ( - !this.plugins.length && - !opts.parser && - !opts.stringifier && - !opts.syntax - ) { - return new NoWorkResult(this, css, opts) - } else { - return new LazyResult(this, css, opts) - } - } - - use(plugin) { - this.plugins = this.plugins.concat(this.normalize([plugin])); - return this - } - } - - processor$1 = Processor; - Processor.default = Processor; - - Root.registerProcessor(Processor); - Document.registerProcessor(Processor); - return processor$1; -} - -var postcss_1; -var hasRequiredPostcss; - -function requirePostcss () { - if (hasRequiredPostcss) return postcss_1; - hasRequiredPostcss = 1; - - let AtRule = /*@__PURE__*/ requireAtRule(); - let Comment = /*@__PURE__*/ requireComment$1(); - let Container = /*@__PURE__*/ requireContainer$1(); - let CssSyntaxError = /*@__PURE__*/ requireCssSyntaxError(); - let Declaration = /*@__PURE__*/ requireDeclaration(); - let Document = /*@__PURE__*/ requireDocument(); - let fromJSON = /*@__PURE__*/ requireFromJSON(); - let Input = /*@__PURE__*/ requireInput(); - let LazyResult = /*@__PURE__*/ requireLazyResult(); - let list = /*@__PURE__*/ requireList(); - let Node = /*@__PURE__*/ requireNode$2(); - let parse = /*@__PURE__*/ requireParse(); - let Processor = /*@__PURE__*/ requireProcessor$1(); - let Result = /*@__PURE__*/ requireResult(); - let Root = /*@__PURE__*/ requireRoot$1(); - let Rule = /*@__PURE__*/ requireRule(); - let stringify = /*@__PURE__*/ requireStringify(); - let Warning = /*@__PURE__*/ requireWarning(); - - function postcss(...plugins) { - if (plugins.length === 1 && Array.isArray(plugins[0])) { - plugins = plugins[0]; - } - return new Processor(plugins) - } - - postcss.plugin = function plugin(name, initializer) { - let warningPrinted = false; - function creator(...args) { - // eslint-disable-next-line no-console - if (console && console.warn && !warningPrinted) { - warningPrinted = true; - // eslint-disable-next-line no-console - console.warn( - name + - ': postcss.plugin was deprecated. Migration guide:\n' + - 'https://evilmartians.com/chronicles/postcss-8-plugin-migration' - ); - if (browser$1.env.LANG && browser$1.env.LANG.startsWith('cn')) { - /* c8 ignore next 7 */ - // eslint-disable-next-line no-console - console.warn( - name + - ': 里面 postcss.plugin 被弃用. 迁移指南:\n' + - 'https://www.w3ctech.com/topic/2226' - ); - } - } - let transformer = initializer(...args); - transformer.postcssPlugin = name; - transformer.postcssVersion = new Processor().version; - return transformer - } - - let cache; - Object.defineProperty(creator, 'postcss', { - get() { - if (!cache) cache = creator(); - return cache - } - }); - - creator.process = function (css, processOpts, pluginOpts) { - return postcss([creator(pluginOpts)]).process(css, processOpts) - }; - - return creator - }; - - postcss.stringify = stringify; - postcss.parse = parse; - postcss.fromJSON = fromJSON; - postcss.list = list; - - postcss.comment = defaults => new Comment(defaults); - postcss.atRule = defaults => new AtRule(defaults); - postcss.decl = defaults => new Declaration(defaults); - postcss.rule = defaults => new Rule(defaults); - postcss.root = defaults => new Root(defaults); - postcss.document = defaults => new Document(defaults); - - postcss.CssSyntaxError = CssSyntaxError; - postcss.Declaration = Declaration; - postcss.Container = Container; - postcss.Processor = Processor; - postcss.Document = Document; - postcss.Comment = Comment; - postcss.Warning = Warning; - postcss.AtRule = AtRule; - postcss.Result = Result; - postcss.Input = Input; - postcss.Rule = Rule; - postcss.Root = Root; - postcss.Node = Node; - - LazyResult.registerPostcss(postcss); - - postcss_1 = postcss; - postcss.default = postcss; - return postcss_1; -} - -var postcssExports = /*@__PURE__*/ requirePostcss(); -var postcss = /*@__PURE__*/getDefaultExportFromCjs(postcssExports); - -postcss.stringify; -postcss.fromJSON; -postcss.plugin; -postcss.parse; -postcss.list; - -postcss.document; -postcss.comment; -postcss.atRule; -postcss.rule; -postcss.decl; -postcss.root; - -postcss.CssSyntaxError; -postcss.Declaration; -postcss.Container; -postcss.Processor; -postcss.Document; -postcss.Comment; -postcss.Warning; -postcss.AtRule; -postcss.Result; -postcss.Input; -const Rule = postcss.Rule; -postcss.Root; -postcss.Node; - -const trimPlugin = () => { - return { - postcssPlugin: "vue-sfc-trim", - Once(root) { - root.walk(({ type, raws }) => { - if (type === "rule" || type === "atrule") { - if (raws.before) raws.before = "\n"; - if ("after" in raws && raws.after) raws.after = "\n"; - } - }); - } - }; -}; -trimPlugin.postcss = true; - -var dist = {exports: {}}; - -var processor = {exports: {}}; - -var parser = {exports: {}}; - -var root = {exports: {}}; - -var container = {exports: {}}; - -var node$1 = {exports: {}}; - -var util$1 = {}; - -var unesc = {exports: {}}; - -var hasRequiredUnesc; - -function requireUnesc () { - if (hasRequiredUnesc) return unesc.exports; - hasRequiredUnesc = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = unesc; - // Many thanks for this post which made this migration much easier. - // https://mathiasbynens.be/notes/css-escapes - - /** - * - * @param {string} str - * @returns {[string, number]|undefined} - */ - function gobbleHex(str) { - var lower = str.toLowerCase(); - var hex = ''; - var spaceTerminated = false; - for (var i = 0; i < 6 && lower[i] !== undefined; i++) { - var code = lower.charCodeAt(i); - // check to see if we are dealing with a valid hex char [a-f|0-9] - var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; - // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point - spaceTerminated = code === 32; - if (!valid) { - break; - } - hex += lower[i]; - } - if (hex.length === 0) { - return undefined; - } - var codePoint = parseInt(hex, 16); - var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; - // Add special case for - // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point" - // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point - if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) { - return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)]; - } - return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)]; - } - var CONTAINS_ESCAPE = /\\/; - function unesc(str) { - var needToProcess = CONTAINS_ESCAPE.test(str); - if (!needToProcess) { - return str; - } - var ret = ""; - for (var i = 0; i < str.length; i++) { - if (str[i] === "\\") { - var gobbled = gobbleHex(str.slice(i + 1, i + 7)); - if (gobbled !== undefined) { - ret += gobbled[0]; - i += gobbled[1]; - continue; - } - - // Retain a pair of \\ if double escaped `\\\\` - // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e - if (str[i + 1] === "\\") { - ret += "\\"; - i++; - continue; - } - - // if \\ is at the end of the string retain it - // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb - if (str.length === i + 1) { - ret += str[i]; - } - continue; - } - ret += str[i]; - } - return ret; - } - module.exports = exports.default; - } (unesc, unesc.exports)); - return unesc.exports; -} - -var getProp = {exports: {}}; - -var hasRequiredGetProp; - -function requireGetProp () { - if (hasRequiredGetProp) return getProp.exports; - hasRequiredGetProp = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = getProp; - function getProp(obj) { - for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - props[_key - 1] = arguments[_key]; - } - while (props.length > 0) { - var prop = props.shift(); - if (!obj[prop]) { - return undefined; - } - obj = obj[prop]; - } - return obj; - } - module.exports = exports.default; - } (getProp, getProp.exports)); - return getProp.exports; -} - -var ensureObject = {exports: {}}; - -var hasRequiredEnsureObject; - -function requireEnsureObject () { - if (hasRequiredEnsureObject) return ensureObject.exports; - hasRequiredEnsureObject = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = ensureObject; - function ensureObject(obj) { - for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - props[_key - 1] = arguments[_key]; - } - while (props.length > 0) { - var prop = props.shift(); - if (!obj[prop]) { - obj[prop] = {}; - } - obj = obj[prop]; - } - } - module.exports = exports.default; - } (ensureObject, ensureObject.exports)); - return ensureObject.exports; -} - -var stripComments = {exports: {}}; - -var hasRequiredStripComments; - -function requireStripComments () { - if (hasRequiredStripComments) return stripComments.exports; - hasRequiredStripComments = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = stripComments; - function stripComments(str) { - var s = ""; - var commentStart = str.indexOf("/*"); - var lastEnd = 0; - while (commentStart >= 0) { - s = s + str.slice(lastEnd, commentStart); - var commentEnd = str.indexOf("*/", commentStart + 2); - if (commentEnd < 0) { - return s; - } - lastEnd = commentEnd + 2; - commentStart = str.indexOf("/*", lastEnd); - } - s = s + str.slice(lastEnd); - return s; - } - module.exports = exports.default; - } (stripComments, stripComments.exports)); - return stripComments.exports; -} - -var hasRequiredUtil$1; - -function requireUtil$1 () { - if (hasRequiredUtil$1) return util$1; - hasRequiredUtil$1 = 1; - - util$1.__esModule = true; - util$1.unesc = util$1.stripComments = util$1.getProp = util$1.ensureObject = void 0; - var _unesc = _interopRequireDefault(/*@__PURE__*/ requireUnesc()); - util$1.unesc = _unesc["default"]; - var _getProp = _interopRequireDefault(/*@__PURE__*/ requireGetProp()); - util$1.getProp = _getProp["default"]; - var _ensureObject = _interopRequireDefault(/*@__PURE__*/ requireEnsureObject()); - util$1.ensureObject = _ensureObject["default"]; - var _stripComments = _interopRequireDefault(/*@__PURE__*/ requireStripComments()); - util$1.stripComments = _stripComments["default"]; - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - return util$1; -} - -var hasRequiredNode$1; - -function requireNode$1 () { - if (hasRequiredNode$1) return node$1.exports; - hasRequiredNode$1 = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _util = /*@__PURE__*/ requireUtil$1(); - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - var cloneNode = function cloneNode(obj, parent) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - var cloned = new obj.constructor(); - for (var i in obj) { - if (!obj.hasOwnProperty(i)) { - continue; - } - var value = obj[i]; - var type = typeof value; - if (i === 'parent' && type === 'object') { - if (parent) { - cloned[i] = parent; - } - } else if (value instanceof Array) { - cloned[i] = value.map(function (j) { - return cloneNode(j, cloned); - }); - } else { - cloned[i] = cloneNode(value, cloned); - } - } - return cloned; - }; - var Node = /*#__PURE__*/function () { - function Node(opts) { - if (opts === void 0) { - opts = {}; - } - Object.assign(this, opts); - this.spaces = this.spaces || {}; - this.spaces.before = this.spaces.before || ''; - this.spaces.after = this.spaces.after || ''; - } - var _proto = Node.prototype; - _proto.remove = function remove() { - if (this.parent) { - this.parent.removeChild(this); - } - this.parent = undefined; - return this; - }; - _proto.replaceWith = function replaceWith() { - if (this.parent) { - for (var index in arguments) { - this.parent.insertBefore(this, arguments[index]); - } - this.remove(); - } - return this; - }; - _proto.next = function next() { - return this.parent.at(this.parent.index(this) + 1); - }; - _proto.prev = function prev() { - return this.parent.at(this.parent.index(this) - 1); - }; - _proto.clone = function clone(overrides) { - if (overrides === void 0) { - overrides = {}; - } - var cloned = cloneNode(this); - for (var name in overrides) { - cloned[name] = overrides[name]; - } - return cloned; - } - - /** - * Some non-standard syntax doesn't follow normal escaping rules for css. - * This allows non standard syntax to be appended to an existing property - * by specifying the escaped value. By specifying the escaped value, - * illegal characters are allowed to be directly inserted into css output. - * @param {string} name the property to set - * @param {any} value the unescaped value of the property - * @param {string} valueEscaped optional. the escaped value of the property. - */; - _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { - if (!this.raws) { - this.raws = {}; - } - var originalValue = this[name]; - var originalEscaped = this.raws[name]; - this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first. - if (originalEscaped || valueEscaped !== value) { - this.raws[name] = (originalEscaped || originalValue) + valueEscaped; - } else { - delete this.raws[name]; // delete any escaped value that was created by the setter. - } - } - - /** - * Some non-standard syntax doesn't follow normal escaping rules for css. - * This allows the escaped value to be specified directly, allowing illegal - * characters to be directly inserted into css output. - * @param {string} name the property to set - * @param {any} value the unescaped value of the property - * @param {string} valueEscaped the escaped value of the property. - */; - _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { - if (!this.raws) { - this.raws = {}; - } - this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. - this.raws[name] = valueEscaped; - } - - /** - * When you want a value to passed through to CSS directly. This method - * deletes the corresponding raw value causing the stringifier to fallback - * to the unescaped value. - * @param {string} name the property to set. - * @param {any} value The value that is both escaped and unescaped. - */; - _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { - this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. - if (this.raws) { - delete this.raws[name]; - } - } - - /** - * - * @param {number} line The number (starting with 1) - * @param {number} column The column number (starting with 1) - */; - _proto.isAtPosition = function isAtPosition(line, column) { - if (this.source && this.source.start && this.source.end) { - if (this.source.start.line > line) { - return false; - } - if (this.source.end.line < line) { - return false; - } - if (this.source.start.line === line && this.source.start.column > column) { - return false; - } - if (this.source.end.line === line && this.source.end.column < column) { - return false; - } - return true; - } - return undefined; - }; - _proto.stringifyProperty = function stringifyProperty(name) { - return this.raws && this.raws[name] || this[name]; - }; - _proto.valueToString = function valueToString() { - return String(this.stringifyProperty("value")); - }; - _proto.toString = function toString() { - return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join(''); - }; - _createClass(Node, [{ - key: "rawSpaceBefore", - get: function get() { - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; - if (rawSpace === undefined) { - rawSpace = this.spaces && this.spaces.before; - } - return rawSpace || ""; - }, - set: function set(raw) { - (0, _util.ensureObject)(this, "raws", "spaces"); - this.raws.spaces.before = raw; - } - }, { - key: "rawSpaceAfter", - get: function get() { - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; - if (rawSpace === undefined) { - rawSpace = this.spaces.after; - } - return rawSpace || ""; - }, - set: function set(raw) { - (0, _util.ensureObject)(this, "raws", "spaces"); - this.raws.spaces.after = raw; - } - }]); - return Node; - }(); - exports["default"] = Node; - module.exports = exports.default; - } (node$1, node$1.exports)); - return node$1.exports; -} - -var types = {}; - -var hasRequiredTypes; - -function requireTypes () { - if (hasRequiredTypes) return types; - hasRequiredTypes = 1; - - types.__esModule = true; - types.UNIVERSAL = types.TAG = types.STRING = types.SELECTOR = types.ROOT = types.PSEUDO = types.NESTING = types.ID = types.COMMENT = types.COMBINATOR = types.CLASS = types.ATTRIBUTE = void 0; - var TAG = 'tag'; - types.TAG = TAG; - var STRING = 'string'; - types.STRING = STRING; - var SELECTOR = 'selector'; - types.SELECTOR = SELECTOR; - var ROOT = 'root'; - types.ROOT = ROOT; - var PSEUDO = 'pseudo'; - types.PSEUDO = PSEUDO; - var NESTING = 'nesting'; - types.NESTING = NESTING; - var ID = 'id'; - types.ID = ID; - var COMMENT = 'comment'; - types.COMMENT = COMMENT; - var COMBINATOR = 'combinator'; - types.COMBINATOR = COMBINATOR; - var CLASS = 'class'; - types.CLASS = CLASS; - var ATTRIBUTE = 'attribute'; - types.ATTRIBUTE = ATTRIBUTE; - var UNIVERSAL = 'universal'; - types.UNIVERSAL = UNIVERSAL; - return types; -} - -var hasRequiredContainer; - -function requireContainer () { - if (hasRequiredContainer) return container.exports; - hasRequiredContainer = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); - var types = _interopRequireWildcard(/*@__PURE__*/ requireTypes()); - function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - 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(o); 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 _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Container = /*#__PURE__*/function (_Node) { - _inheritsLoose(Container, _Node); - function Container(opts) { - var _this; - _this = _Node.call(this, opts) || this; - if (!_this.nodes) { - _this.nodes = []; - } - return _this; - } - var _proto = Container.prototype; - _proto.append = function append(selector) { - selector.parent = this; - this.nodes.push(selector); - return this; - }; - _proto.prepend = function prepend(selector) { - selector.parent = this; - this.nodes.unshift(selector); - for (var id in this.indexes) { - this.indexes[id]++; - } - return this; - }; - _proto.at = function at(index) { - return this.nodes[index]; - }; - _proto.index = function index(child) { - if (typeof child === 'number') { - return child; - } - return this.nodes.indexOf(child); - }; - _proto.removeChild = function removeChild(child) { - child = this.index(child); - this.at(child).parent = undefined; - this.nodes.splice(child, 1); - var index; - for (var id in this.indexes) { - index = this.indexes[id]; - if (index >= child) { - this.indexes[id] = index - 1; - } - } - return this; - }; - _proto.removeAll = function removeAll() { - for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { - var node = _step.value; - node.parent = undefined; - } - this.nodes = []; - return this; - }; - _proto.empty = function empty() { - return this.removeAll(); - }; - _proto.insertAfter = function insertAfter(oldNode, newNode) { - newNode.parent = this; - var oldIndex = this.index(oldNode); - this.nodes.splice(oldIndex + 1, 0, newNode); - newNode.parent = this; - var index; - for (var id in this.indexes) { - index = this.indexes[id]; - if (oldIndex < index) { - this.indexes[id] = index + 1; - } - } - return this; - }; - _proto.insertBefore = function insertBefore(oldNode, newNode) { - newNode.parent = this; - var oldIndex = this.index(oldNode); - this.nodes.splice(oldIndex, 0, newNode); - newNode.parent = this; - var index; - for (var id in this.indexes) { - index = this.indexes[id]; - if (index >= oldIndex) { - this.indexes[id] = index + 1; - } - } - return this; - }; - _proto._findChildAtPosition = function _findChildAtPosition(line, col) { - var found = undefined; - this.each(function (node) { - if (node.atPosition) { - var foundChild = node.atPosition(line, col); - if (foundChild) { - found = foundChild; - return false; - } - } else if (node.isAtPosition(line, col)) { - found = node; - return false; - } - }); - return found; - } - - /** - * Return the most specific node at the line and column number given. - * The source location is based on the original parsed location, locations aren't - * updated as selector nodes are mutated. - * - * Note that this location is relative to the location of the first character - * of the selector, and not the location of the selector in the overall document - * when used in conjunction with postcss. - * - * If not found, returns undefined. - * @param {number} line The line number of the node to find. (1-based index) - * @param {number} col The column number of the node to find. (1-based index) - */; - _proto.atPosition = function atPosition(line, col) { - if (this.isAtPosition(line, col)) { - return this._findChildAtPosition(line, col) || this; - } else { - return undefined; - } - }; - _proto._inferEndPosition = function _inferEndPosition() { - if (this.last && this.last.source && this.last.source.end) { - this.source = this.source || {}; - this.source.end = this.source.end || {}; - Object.assign(this.source.end, this.last.source.end); - } - }; - _proto.each = function each(callback) { - if (!this.lastEach) { - this.lastEach = 0; - } - if (!this.indexes) { - this.indexes = {}; - } - this.lastEach++; - var id = this.lastEach; - this.indexes[id] = 0; - if (!this.length) { - return undefined; - } - var index, result; - while (this.indexes[id] < this.length) { - index = this.indexes[id]; - result = callback(this.at(index), index); - if (result === false) { - break; - } - this.indexes[id] += 1; - } - delete this.indexes[id]; - if (result === false) { - return false; - } - }; - _proto.walk = function walk(callback) { - return this.each(function (node, i) { - var result = callback(node, i); - if (result !== false && node.length) { - result = node.walk(callback); - } - if (result === false) { - return false; - } - }); - }; - _proto.walkAttributes = function walkAttributes(callback) { - var _this2 = this; - return this.walk(function (selector) { - if (selector.type === types.ATTRIBUTE) { - return callback.call(_this2, selector); - } - }); - }; - _proto.walkClasses = function walkClasses(callback) { - var _this3 = this; - return this.walk(function (selector) { - if (selector.type === types.CLASS) { - return callback.call(_this3, selector); - } - }); - }; - _proto.walkCombinators = function walkCombinators(callback) { - var _this4 = this; - return this.walk(function (selector) { - if (selector.type === types.COMBINATOR) { - return callback.call(_this4, selector); - } - }); - }; - _proto.walkComments = function walkComments(callback) { - var _this5 = this; - return this.walk(function (selector) { - if (selector.type === types.COMMENT) { - return callback.call(_this5, selector); - } - }); - }; - _proto.walkIds = function walkIds(callback) { - var _this6 = this; - return this.walk(function (selector) { - if (selector.type === types.ID) { - return callback.call(_this6, selector); - } - }); - }; - _proto.walkNesting = function walkNesting(callback) { - var _this7 = this; - return this.walk(function (selector) { - if (selector.type === types.NESTING) { - return callback.call(_this7, selector); - } - }); - }; - _proto.walkPseudos = function walkPseudos(callback) { - var _this8 = this; - return this.walk(function (selector) { - if (selector.type === types.PSEUDO) { - return callback.call(_this8, selector); - } - }); - }; - _proto.walkTags = function walkTags(callback) { - var _this9 = this; - return this.walk(function (selector) { - if (selector.type === types.TAG) { - return callback.call(_this9, selector); - } - }); - }; - _proto.walkUniversals = function walkUniversals(callback) { - var _this10 = this; - return this.walk(function (selector) { - if (selector.type === types.UNIVERSAL) { - return callback.call(_this10, selector); - } - }); - }; - _proto.split = function split(callback) { - var _this11 = this; - var current = []; - return this.reduce(function (memo, node, index) { - var split = callback.call(_this11, node); - current.push(node); - if (split) { - memo.push(current); - current = []; - } else if (index === _this11.length - 1) { - memo.push(current); - } - return memo; - }, []); - }; - _proto.map = function map(callback) { - return this.nodes.map(callback); - }; - _proto.reduce = function reduce(callback, memo) { - return this.nodes.reduce(callback, memo); - }; - _proto.every = function every(callback) { - return this.nodes.every(callback); - }; - _proto.some = function some(callback) { - return this.nodes.some(callback); - }; - _proto.filter = function filter(callback) { - return this.nodes.filter(callback); - }; - _proto.sort = function sort(callback) { - return this.nodes.sort(callback); - }; - _proto.toString = function toString() { - return this.map(String).join(''); - }; - _createClass(Container, [{ - key: "first", - get: function get() { - return this.at(0); - } - }, { - key: "last", - get: function get() { - return this.at(this.length - 1); - } - }, { - key: "length", - get: function get() { - return this.nodes.length; - } - }]); - return Container; - }(_node["default"]); - exports["default"] = Container; - module.exports = exports.default; - } (container, container.exports)); - return container.exports; -} - -var hasRequiredRoot; - -function requireRoot () { - if (hasRequiredRoot) return root.exports; - hasRequiredRoot = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Root = /*#__PURE__*/function (_Container) { - _inheritsLoose(Root, _Container); - function Root(opts) { - var _this; - _this = _Container.call(this, opts) || this; - _this.type = _types.ROOT; - return _this; - } - var _proto = Root.prototype; - _proto.toString = function toString() { - var str = this.reduce(function (memo, selector) { - memo.push(String(selector)); - return memo; - }, []).join(','); - return this.trailingComma ? str + ',' : str; - }; - _proto.error = function error(message, options) { - if (this._error) { - return this._error(message, options); - } else { - return new Error(message); - } - }; - _createClass(Root, [{ - key: "errorGenerator", - set: function set(handler) { - this._error = handler; - } - }]); - return Root; - }(_container["default"]); - exports["default"] = Root; - module.exports = exports.default; - } (root, root.exports)); - return root.exports; -} - -var selector = {exports: {}}; - -var hasRequiredSelector; - -function requireSelector () { - if (hasRequiredSelector) return selector.exports; - hasRequiredSelector = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Selector = /*#__PURE__*/function (_Container) { - _inheritsLoose(Selector, _Container); - function Selector(opts) { - var _this; - _this = _Container.call(this, opts) || this; - _this.type = _types.SELECTOR; - return _this; - } - return Selector; - }(_container["default"]); - exports["default"] = Selector; - module.exports = exports.default; - } (selector, selector.exports)); - return selector.exports; -} - -var className = {exports: {}}; - -/*! https://mths.be/cssesc v3.0.0 by @mathias */ - -var cssesc_1; -var hasRequiredCssesc; - -function requireCssesc () { - if (hasRequiredCssesc) return cssesc_1; - hasRequiredCssesc = 1; - - var object = {}; - var hasOwnProperty = object.hasOwnProperty; - var merge = function merge(options, defaults) { - if (!options) { - return defaults; - } - var result = {}; - for (var key in defaults) { - // `if (defaults.hasOwnProperty(key) { … }` is not needed here, since - // only recognized option names are used. - result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key]; - } - return result; - }; - - var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/; - var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/; - var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g; - - // https://mathiasbynens.be/notes/css-escapes#css - var cssesc = function cssesc(string, options) { - options = merge(options, cssesc.options); - if (options.quotes != 'single' && options.quotes != 'double') { - options.quotes = 'single'; - } - var quote = options.quotes == 'double' ? '"' : '\''; - var isIdentifier = options.isIdentifier; - - var firstChar = string.charAt(0); - var output = ''; - var counter = 0; - var length = string.length; - while (counter < length) { - var character = string.charAt(counter++); - var codePoint = character.charCodeAt(); - var value = void 0; - // If it’s not a printable ASCII character… - if (codePoint < 0x20 || codePoint > 0x7E) { - if (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) { - // It’s a high surrogate, and there is a next character. - var extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // next character is low surrogate - codePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000; - } else { - // It’s an unmatched surrogate; only append this code unit, in case - // the next code unit is the high surrogate of a surrogate pair. - counter--; - } - } - value = '\\' + codePoint.toString(16).toUpperCase() + ' '; - } else { - if (options.escapeEverything) { - if (regexAnySingleEscape.test(character)) { - value = '\\' + character; - } else { - value = '\\' + codePoint.toString(16).toUpperCase() + ' '; - } - } else if (/[\t\n\f\r\x0B]/.test(character)) { - value = '\\' + codePoint.toString(16).toUpperCase() + ' '; - } else if (character == '\\' || !isIdentifier && (character == '"' && quote == character || character == '\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) { - value = '\\' + character; - } else { - value = character; - } - } - output += value; - } - - if (isIdentifier) { - if (/^-[-\d]/.test(output)) { - output = '\\-' + output.slice(1); - } else if (/\d/.test(firstChar)) { - output = '\\3' + firstChar + ' ' + output.slice(1); - } - } - - // Remove spaces after `\HEX` escapes that are not followed by a hex digit, - // since they’re redundant. Note that this is only possible if the escape - // sequence isn’t preceded by an odd number of backslashes. - output = output.replace(regexExcessiveSpaces, function ($0, $1, $2) { - if ($1 && $1.length % 2) { - // It’s not safe to remove the space, so don’t. - return $0; - } - // Strip the space. - return ($1 || '') + $2; - }); - - if (!isIdentifier && options.wrap) { - return quote + output + quote; - } - return output; - }; - - // Expose default options (so they can be overridden globally). - cssesc.options = { - 'escapeEverything': false, - 'isIdentifier': false, - 'quotes': 'single', - 'wrap': false - }; - - cssesc.version = '3.0.0'; - - cssesc_1 = cssesc; - return cssesc_1; -} - -var hasRequiredClassName; - -function requireClassName () { - if (hasRequiredClassName) return className.exports; - hasRequiredClassName = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); - var _util = /*@__PURE__*/ requireUtil$1(); - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var ClassName = /*#__PURE__*/function (_Node) { - _inheritsLoose(ClassName, _Node); - function ClassName(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.CLASS; - _this._constructed = true; - return _this; - } - var _proto = ClassName.prototype; - _proto.valueToString = function valueToString() { - return '.' + _Node.prototype.valueToString.call(this); - }; - _createClass(ClassName, [{ - key: "value", - get: function get() { - return this._value; - }, - set: function set(v) { - if (this._constructed) { - var escaped = (0, _cssesc["default"])(v, { - isIdentifier: true - }); - if (escaped !== v) { - (0, _util.ensureObject)(this, "raws"); - this.raws.value = escaped; - } else if (this.raws) { - delete this.raws.value; - } - } - this._value = v; - } - }]); - return ClassName; - }(_node["default"]); - exports["default"] = ClassName; - module.exports = exports.default; - } (className, className.exports)); - return className.exports; -} - -var comment = {exports: {}}; - -var hasRequiredComment; - -function requireComment () { - if (hasRequiredComment) return comment.exports; - hasRequiredComment = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Comment = /*#__PURE__*/function (_Node) { - _inheritsLoose(Comment, _Node); - function Comment(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.COMMENT; - return _this; - } - return Comment; - }(_node["default"]); - exports["default"] = Comment; - module.exports = exports.default; - } (comment, comment.exports)); - return comment.exports; -} - -var id = {exports: {}}; - -var hasRequiredId; - -function requireId () { - if (hasRequiredId) return id.exports; - hasRequiredId = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var ID = /*#__PURE__*/function (_Node) { - _inheritsLoose(ID, _Node); - function ID(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.ID; - return _this; - } - var _proto = ID.prototype; - _proto.valueToString = function valueToString() { - return '#' + _Node.prototype.valueToString.call(this); - }; - return ID; - }(_node["default"]); - exports["default"] = ID; - module.exports = exports.default; - } (id, id.exports)); - return id.exports; -} - -var tag = {exports: {}}; - -var namespace = {exports: {}}; - -var hasRequiredNamespace; - -function requireNamespace () { - if (hasRequiredNamespace) return namespace.exports; - hasRequiredNamespace = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); - var _util = /*@__PURE__*/ requireUtil$1(); - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Namespace = /*#__PURE__*/function (_Node) { - _inheritsLoose(Namespace, _Node); - function Namespace() { - return _Node.apply(this, arguments) || this; - } - var _proto = Namespace.prototype; - _proto.qualifiedName = function qualifiedName(value) { - if (this.namespace) { - return this.namespaceString + "|" + value; - } else { - return value; - } - }; - _proto.valueToString = function valueToString() { - return this.qualifiedName(_Node.prototype.valueToString.call(this)); - }; - _createClass(Namespace, [{ - key: "namespace", - get: function get() { - return this._namespace; - }, - set: function set(namespace) { - if (namespace === true || namespace === "*" || namespace === "&") { - this._namespace = namespace; - if (this.raws) { - delete this.raws.namespace; - } - return; - } - var escaped = (0, _cssesc["default"])(namespace, { - isIdentifier: true - }); - this._namespace = namespace; - if (escaped !== namespace) { - (0, _util.ensureObject)(this, "raws"); - this.raws.namespace = escaped; - } else if (this.raws) { - delete this.raws.namespace; - } - } - }, { - key: "ns", - get: function get() { - return this._namespace; - }, - set: function set(namespace) { - this.namespace = namespace; - } - }, { - key: "namespaceString", - get: function get() { - if (this.namespace) { - var ns = this.stringifyProperty("namespace"); - if (ns === true) { - return ''; - } else { - return ns; - } - } else { - return ''; - } - } - }]); - return Namespace; - }(_node["default"]); - exports["default"] = Namespace; - module.exports = exports.default; - } (namespace, namespace.exports)); - return namespace.exports; -} - -var hasRequiredTag; - -function requireTag () { - if (hasRequiredTag) return tag.exports; - hasRequiredTag = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Tag = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Tag, _Namespace); - function Tag(opts) { - var _this; - _this = _Namespace.call(this, opts) || this; - _this.type = _types.TAG; - return _this; - } - return Tag; - }(_namespace["default"]); - exports["default"] = Tag; - module.exports = exports.default; - } (tag, tag.exports)); - return tag.exports; -} - -var string = {exports: {}}; - -var hasRequiredString; - -function requireString () { - if (hasRequiredString) return string.exports; - hasRequiredString = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var String = /*#__PURE__*/function (_Node) { - _inheritsLoose(String, _Node); - function String(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.STRING; - return _this; - } - return String; - }(_node["default"]); - exports["default"] = String; - module.exports = exports.default; - } (string, string.exports)); - return string.exports; -} - -var pseudo = {exports: {}}; - -var hasRequiredPseudo; - -function requirePseudo () { - if (hasRequiredPseudo) return pseudo.exports; - hasRequiredPseudo = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Pseudo = /*#__PURE__*/function (_Container) { - _inheritsLoose(Pseudo, _Container); - function Pseudo(opts) { - var _this; - _this = _Container.call(this, opts) || this; - _this.type = _types.PSEUDO; - return _this; - } - var _proto = Pseudo.prototype; - _proto.toString = function toString() { - var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; - return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join(''); - }; - return Pseudo; - }(_container["default"]); - exports["default"] = Pseudo; - module.exports = exports.default; - } (pseudo, pseudo.exports)); - return pseudo.exports; -} - -var attribute = {}; - -var node; -var hasRequiredNode; - -function requireNode () { - if (hasRequiredNode) return node; - hasRequiredNode = 1; - /** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - - node = require$$0.deprecate; - return node; -} - -var hasRequiredAttribute; - -function requireAttribute () { - if (hasRequiredAttribute) return attribute; - hasRequiredAttribute = 1; - (function (exports) { - - exports.__esModule = true; - exports["default"] = void 0; - exports.unescapeValue = unescapeValue; - var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); - var _unesc = _interopRequireDefault(/*@__PURE__*/ requireUnesc()); - var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace()); - var _types = /*@__PURE__*/ requireTypes(); - var _CSSESC_QUOTE_OPTIONS; - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var deprecate = /*@__PURE__*/ requireNode(); - var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; - var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead."); - var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); - var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); - function unescapeValue(value) { - var deprecatedUsage = false; - var quoteMark = null; - var unescaped = value; - var m = unescaped.match(WRAPPED_IN_QUOTES); - if (m) { - quoteMark = m[1]; - unescaped = m[2]; - } - unescaped = (0, _unesc["default"])(unescaped); - if (unescaped !== value) { - deprecatedUsage = true; - } - return { - deprecatedUsage: deprecatedUsage, - unescaped: unescaped, - quoteMark: quoteMark - }; - } - function handleDeprecatedContructorOpts(opts) { - if (opts.quoteMark !== undefined) { - return opts; - } - if (opts.value === undefined) { - return opts; - } - warnOfDeprecatedConstructor(); - var _unescapeValue = unescapeValue(opts.value), - quoteMark = _unescapeValue.quoteMark, - unescaped = _unescapeValue.unescaped; - if (!opts.raws) { - opts.raws = {}; - } - if (opts.raws.value === undefined) { - opts.raws.value = opts.value; - } - opts.value = unescaped; - opts.quoteMark = quoteMark; - return opts; - } - var Attribute = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Attribute, _Namespace); - function Attribute(opts) { - var _this; - if (opts === void 0) { - opts = {}; - } - _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; - _this.type = _types.ATTRIBUTE; - _this.raws = _this.raws || {}; - Object.defineProperty(_this.raws, 'unquoted', { - get: deprecate(function () { - return _this.value; - }, "attr.raws.unquoted is deprecated. Call attr.value instead."), - set: deprecate(function () { - return _this.value; - }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.") - }); - _this._constructed = true; - return _this; - } - - /** - * Returns the Attribute's value quoted such that it would be legal to use - * in the value of a css file. The original value's quotation setting - * used for stringification is left unchanged. See `setValue(value, options)` - * if you want to control the quote settings of a new value for the attribute. - * - * You can also change the quotation used for the current value by setting quoteMark. - * - * Options: - * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this - * option is not set, the original value for quoteMark will be used. If - * indeterminate, a double quote is used. The legal values are: - * * `null` - the value will be unquoted and characters will be escaped as necessary. - * * `'` - the value will be quoted with a single quote and single quotes are escaped. - * * `"` - the value will be quoted with a double quote and double quotes are escaped. - * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark - * over the quoteMark option value. - * * smart {boolean} - if true, will select a quote mark based on the value - * and the other options specified here. See the `smartQuoteMark()` - * method. - **/ - var _proto = Attribute.prototype; - _proto.getQuotedValue = function getQuotedValue(options) { - if (options === void 0) { - options = {}; - } - var quoteMark = this._determineQuoteMark(options); - var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark]; - var escaped = (0, _cssesc["default"])(this._value, cssescopts); - return escaped; - }; - _proto._determineQuoteMark = function _determineQuoteMark(options) { - return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); - } - - /** - * Set the unescaped value with the specified quotation options. The value - * provided must not include any wrapping quote marks -- those quotes will - * be interpreted as part of the value and escaped accordingly. - */; - _proto.setValue = function setValue(value, options) { - if (options === void 0) { - options = {}; - } - this._value = value; - this._quoteMark = this._determineQuoteMark(options); - this._syncRawValue(); - } - - /** - * Intelligently select a quoteMark value based on the value's contents. If - * the value is a legal CSS ident, it will not be quoted. Otherwise a quote - * mark will be picked that minimizes the number of escapes. - * - * If there's no clear winner, the quote mark from these options is used, - * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is - * true). If the quoteMark is unspecified, a double quote is used. - * - * @param options This takes the quoteMark and preferCurrentQuoteMark options - * from the quoteValue method. - */; - _proto.smartQuoteMark = function smartQuoteMark(options) { - var v = this.value; - var numSingleQuotes = v.replace(/[^']/g, '').length; - var numDoubleQuotes = v.replace(/[^"]/g, '').length; - if (numSingleQuotes + numDoubleQuotes === 0) { - var escaped = (0, _cssesc["default"])(v, { - isIdentifier: true - }); - if (escaped === v) { - return Attribute.NO_QUOTE; - } else { - var pref = this.preferredQuoteMark(options); - if (pref === Attribute.NO_QUOTE) { - // pick a quote mark that isn't none and see if it's smaller - var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE; - var opts = CSSESC_QUOTE_OPTIONS[quote]; - var quoteValue = (0, _cssesc["default"])(v, opts); - if (quoteValue.length < escaped.length) { - return quote; - } - } - return pref; - } - } else if (numDoubleQuotes === numSingleQuotes) { - return this.preferredQuoteMark(options); - } else if (numDoubleQuotes < numSingleQuotes) { - return Attribute.DOUBLE_QUOTE; - } else { - return Attribute.SINGLE_QUOTE; - } - } - - /** - * Selects the preferred quote mark based on the options and the current quote mark value. - * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` - * instead. - */; - _proto.preferredQuoteMark = function preferredQuoteMark(options) { - var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; - if (quoteMark === undefined) { - quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; - } - if (quoteMark === undefined) { - quoteMark = Attribute.DOUBLE_QUOTE; - } - return quoteMark; - }; - _proto._syncRawValue = function _syncRawValue() { - var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); - if (rawValue === this._value) { - if (this.raws) { - delete this.raws.value; - } - } else { - this.raws.value = rawValue; - } - }; - _proto._handleEscapes = function _handleEscapes(prop, value) { - if (this._constructed) { - var escaped = (0, _cssesc["default"])(value, { - isIdentifier: true - }); - if (escaped !== value) { - this.raws[prop] = escaped; - } else { - delete this.raws[prop]; - } - } - }; - _proto._spacesFor = function _spacesFor(name) { - var attrSpaces = { - before: '', - after: '' - }; - var spaces = this.spaces[name] || {}; - var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; - return Object.assign(attrSpaces, spaces, rawSpaces); - }; - _proto._stringFor = function _stringFor(name, spaceName, concat) { - if (spaceName === void 0) { - spaceName = name; - } - if (concat === void 0) { - concat = defaultAttrConcat; - } - var attrSpaces = this._spacesFor(spaceName); - return concat(this.stringifyProperty(name), attrSpaces); - } - - /** - * returns the offset of the attribute part specified relative to the - * start of the node of the output string. - * - * * "ns" - alias for "namespace" - * * "namespace" - the namespace if it exists. - * * "attribute" - the attribute name - * * "attributeNS" - the start of the attribute or its namespace - * * "operator" - the match operator of the attribute - * * "value" - The value (string or identifier) - * * "insensitive" - the case insensitivity flag; - * @param part One of the possible values inside an attribute. - * @returns -1 if the name is invalid or the value doesn't exist in this attribute. - */; - _proto.offsetOf = function offsetOf(name) { - var count = 1; - var attributeSpaces = this._spacesFor("attribute"); - count += attributeSpaces.before.length; - if (name === "namespace" || name === "ns") { - return this.namespace ? count : -1; - } - if (name === "attributeNS") { - return count; - } - count += this.namespaceString.length; - if (this.namespace) { - count += 1; - } - if (name === "attribute") { - return count; - } - count += this.stringifyProperty("attribute").length; - count += attributeSpaces.after.length; - var operatorSpaces = this._spacesFor("operator"); - count += operatorSpaces.before.length; - var operator = this.stringifyProperty("operator"); - if (name === "operator") { - return operator ? count : -1; - } - count += operator.length; - count += operatorSpaces.after.length; - var valueSpaces = this._spacesFor("value"); - count += valueSpaces.before.length; - var value = this.stringifyProperty("value"); - if (name === "value") { - return value ? count : -1; - } - count += value.length; - count += valueSpaces.after.length; - var insensitiveSpaces = this._spacesFor("insensitive"); - count += insensitiveSpaces.before.length; - if (name === "insensitive") { - return this.insensitive ? count : -1; - } - return -1; - }; - _proto.toString = function toString() { - var _this2 = this; - var selector = [this.rawSpaceBefore, '[']; - selector.push(this._stringFor('qualifiedAttribute', 'attribute')); - if (this.operator && (this.value || this.value === '')) { - selector.push(this._stringFor('operator')); - selector.push(this._stringFor('value')); - selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) { - if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) { - attrSpaces.before = " "; - } - return defaultAttrConcat(attrValue, attrSpaces); - })); - } - selector.push(']'); - selector.push(this.rawSpaceAfter); - return selector.join(''); - }; - _createClass(Attribute, [{ - key: "quoted", - get: function get() { - var qm = this.quoteMark; - return qm === "'" || qm === '"'; - }, - set: function set(value) { - warnOfDeprecatedQuotedAssignment(); - } - - /** - * returns a single (`'`) or double (`"`) quote character if the value is quoted. - * returns `null` if the value is not quoted. - * returns `undefined` if the quotation state is unknown (this can happen when - * the attribute is constructed without specifying a quote mark.) - */ - }, { - key: "quoteMark", - get: function get() { - return this._quoteMark; - } - - /** - * Set the quote mark to be used by this attribute's value. - * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute - * value is updated accordingly. - * - * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted. - */, - set: function set(quoteMark) { - if (!this._constructed) { - this._quoteMark = quoteMark; - return; - } - if (this._quoteMark !== quoteMark) { - this._quoteMark = quoteMark; - this._syncRawValue(); - } - } - }, { - key: "qualifiedAttribute", - get: function get() { - return this.qualifiedName(this.raws.attribute || this.attribute); - } - }, { - key: "insensitiveFlag", - get: function get() { - return this.insensitive ? 'i' : ''; - } - }, { - key: "value", - get: function get() { - return this._value; - }, - set: - /** - * Before 3.0, the value had to be set to an escaped value including any wrapped - * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value - * is unescaped during parsing and any quote marks are removed. - * - * Because the ambiguity of this semantic change, if you set `attr.value = newValue`, - * a deprecation warning is raised when the new value contains any characters that would - * require escaping (including if it contains wrapped quotes). - * - * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe - * how the new value is quoted. - */ - function set(v) { - if (this._constructed) { - var _unescapeValue2 = unescapeValue(v), - deprecatedUsage = _unescapeValue2.deprecatedUsage, - unescaped = _unescapeValue2.unescaped, - quoteMark = _unescapeValue2.quoteMark; - if (deprecatedUsage) { - warnOfDeprecatedValueAssignment(); - } - if (unescaped === this._value && quoteMark === this._quoteMark) { - return; - } - this._value = unescaped; - this._quoteMark = quoteMark; - this._syncRawValue(); - } else { - this._value = v; - } - } - }, { - key: "insensitive", - get: function get() { - return this._insensitive; - } - - /** - * Set the case insensitive flag. - * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag` - * of the attribute is updated accordingly. - * - * @param {true | false} insensitive true if the attribute should match case-insensitively. - */, - set: function set(insensitive) { - if (!insensitive) { - this._insensitive = false; - - // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation. - // When setting `attr.insensitive = false` both should be erased to ensure correct serialization. - if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) { - this.raws.insensitiveFlag = undefined; - } - } - this._insensitive = insensitive; - } - }, { - key: "attribute", - get: function get() { - return this._attribute; - }, - set: function set(name) { - this._handleEscapes("attribute", name); - this._attribute = name; - } - }]); - return Attribute; - }(_namespace["default"]); - exports["default"] = Attribute; - Attribute.NO_QUOTE = null; - Attribute.SINGLE_QUOTE = "'"; - Attribute.DOUBLE_QUOTE = '"'; - var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { - "'": { - quotes: 'single', - wrap: true - }, - '"': { - quotes: 'double', - wrap: true - } - }, _CSSESC_QUOTE_OPTIONS[null] = { - isIdentifier: true - }, _CSSESC_QUOTE_OPTIONS); - function defaultAttrConcat(attrValue, attrSpaces) { - return "" + attrSpaces.before + attrValue + attrSpaces.after; - } - } (attribute)); - return attribute; -} - -var universal = {exports: {}}; - -var hasRequiredUniversal; - -function requireUniversal () { - if (hasRequiredUniversal) return universal.exports; - hasRequiredUniversal = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Universal = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Universal, _Namespace); - function Universal(opts) { - var _this; - _this = _Namespace.call(this, opts) || this; - _this.type = _types.UNIVERSAL; - _this.value = '*'; - return _this; - } - return Universal; - }(_namespace["default"]); - exports["default"] = Universal; - module.exports = exports.default; - } (universal, universal.exports)); - return universal.exports; -} - -var combinator = {exports: {}}; - -var hasRequiredCombinator; - -function requireCombinator () { - if (hasRequiredCombinator) return combinator.exports; - hasRequiredCombinator = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Combinator = /*#__PURE__*/function (_Node) { - _inheritsLoose(Combinator, _Node); - function Combinator(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.COMBINATOR; - return _this; - } - return Combinator; - }(_node["default"]); - exports["default"] = Combinator; - module.exports = exports.default; - } (combinator, combinator.exports)); - return combinator.exports; -} - -var nesting = {exports: {}}; - -var hasRequiredNesting; - -function requireNesting () { - if (hasRequiredNesting) return nesting.exports; - hasRequiredNesting = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); - var _types = /*@__PURE__*/ requireTypes(); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - var Nesting = /*#__PURE__*/function (_Node) { - _inheritsLoose(Nesting, _Node); - function Nesting(opts) { - var _this; - _this = _Node.call(this, opts) || this; - _this.type = _types.NESTING; - _this.value = '&'; - return _this; - } - return Nesting; - }(_node["default"]); - exports["default"] = Nesting; - module.exports = exports.default; - } (nesting, nesting.exports)); - return nesting.exports; -} - -var sortAscending = {exports: {}}; - -var hasRequiredSortAscending; - -function requireSortAscending () { - if (hasRequiredSortAscending) return sortAscending.exports; - hasRequiredSortAscending = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = sortAscending; - function sortAscending(list) { - return list.sort(function (a, b) { - return a - b; - }); - } - module.exports = exports.default; - } (sortAscending, sortAscending.exports)); - return sortAscending.exports; -} - -var tokenize = {}; - -var tokenTypes = {}; - -var hasRequiredTokenTypes; - -function requireTokenTypes () { - if (hasRequiredTokenTypes) return tokenTypes; - hasRequiredTokenTypes = 1; - - tokenTypes.__esModule = true; - tokenTypes.word = tokenTypes.tilde = tokenTypes.tab = tokenTypes.str = tokenTypes.space = tokenTypes.slash = tokenTypes.singleQuote = tokenTypes.semicolon = tokenTypes.plus = tokenTypes.pipe = tokenTypes.openSquare = tokenTypes.openParenthesis = tokenTypes.newline = tokenTypes.greaterThan = tokenTypes.feed = tokenTypes.equals = tokenTypes.doubleQuote = tokenTypes.dollar = tokenTypes.cr = tokenTypes.comment = tokenTypes.comma = tokenTypes.combinator = tokenTypes.colon = tokenTypes.closeSquare = tokenTypes.closeParenthesis = tokenTypes.caret = tokenTypes.bang = tokenTypes.backslash = tokenTypes.at = tokenTypes.asterisk = tokenTypes.ampersand = void 0; - var ampersand = 38; // `&`.charCodeAt(0); - tokenTypes.ampersand = ampersand; - var asterisk = 42; // `*`.charCodeAt(0); - tokenTypes.asterisk = asterisk; - var at = 64; // `@`.charCodeAt(0); - tokenTypes.at = at; - var comma = 44; // `,`.charCodeAt(0); - tokenTypes.comma = comma; - var colon = 58; // `:`.charCodeAt(0); - tokenTypes.colon = colon; - var semicolon = 59; // `;`.charCodeAt(0); - tokenTypes.semicolon = semicolon; - var openParenthesis = 40; // `(`.charCodeAt(0); - tokenTypes.openParenthesis = openParenthesis; - var closeParenthesis = 41; // `)`.charCodeAt(0); - tokenTypes.closeParenthesis = closeParenthesis; - var openSquare = 91; // `[`.charCodeAt(0); - tokenTypes.openSquare = openSquare; - var closeSquare = 93; // `]`.charCodeAt(0); - tokenTypes.closeSquare = closeSquare; - var dollar = 36; // `$`.charCodeAt(0); - tokenTypes.dollar = dollar; - var tilde = 126; // `~`.charCodeAt(0); - tokenTypes.tilde = tilde; - var caret = 94; // `^`.charCodeAt(0); - tokenTypes.caret = caret; - var plus = 43; // `+`.charCodeAt(0); - tokenTypes.plus = plus; - var equals = 61; // `=`.charCodeAt(0); - tokenTypes.equals = equals; - var pipe = 124; // `|`.charCodeAt(0); - tokenTypes.pipe = pipe; - var greaterThan = 62; // `>`.charCodeAt(0); - tokenTypes.greaterThan = greaterThan; - var space = 32; // ` `.charCodeAt(0); - tokenTypes.space = space; - var singleQuote = 39; // `'`.charCodeAt(0); - tokenTypes.singleQuote = singleQuote; - var doubleQuote = 34; // `"`.charCodeAt(0); - tokenTypes.doubleQuote = doubleQuote; - var slash = 47; // `/`.charCodeAt(0); - tokenTypes.slash = slash; - var bang = 33; // `!`.charCodeAt(0); - tokenTypes.bang = bang; - var backslash = 92; // '\\'.charCodeAt(0); - tokenTypes.backslash = backslash; - var cr = 13; // '\r'.charCodeAt(0); - tokenTypes.cr = cr; - var feed = 12; // '\f'.charCodeAt(0); - tokenTypes.feed = feed; - var newline = 10; // '\n'.charCodeAt(0); - tokenTypes.newline = newline; - var tab = 9; // '\t'.charCodeAt(0); - - // Expose aliases primarily for readability. - tokenTypes.tab = tab; - var str = singleQuote; - - // No good single character representation! - tokenTypes.str = str; - var comment = -1; - tokenTypes.comment = comment; - var word = -2; - tokenTypes.word = word; - var combinator = -3; - tokenTypes.combinator = combinator; - return tokenTypes; -} - -var hasRequiredTokenize; - -function requireTokenize () { - if (hasRequiredTokenize) return tokenize; - hasRequiredTokenize = 1; - (function (exports) { - - exports.__esModule = true; - exports.FIELDS = void 0; - exports["default"] = tokenize; - var t = _interopRequireWildcard(/*@__PURE__*/ requireTokenTypes()); - var _unescapable, _wordDelimiters; - function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); - var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); - var hex = {}; - var hexChars = "0123456789abcdefABCDEF"; - for (var i = 0; i < hexChars.length; i++) { - hex[hexChars.charCodeAt(i)] = true; - } - - /** - * Returns the last index of the bar css word - * @param {string} css The string in which the word begins - * @param {number} start The index into the string where word's first letter occurs - */ - function consumeWord(css, start) { - var next = start; - var code; - do { - code = css.charCodeAt(next); - if (wordDelimiters[code]) { - return next - 1; - } else if (code === t.backslash) { - next = consumeEscape(css, next) + 1; - } else { - // All other characters are part of the word - next++; - } - } while (next < css.length); - return next - 1; - } - - /** - * Returns the last index of the escape sequence - * @param {string} css The string in which the sequence begins - * @param {number} start The index into the string where escape character (`\`) occurs. - */ - function consumeEscape(css, start) { - var next = start; - var code = css.charCodeAt(next + 1); - if (unescapable[code]) ; else if (hex[code]) { - var hexDigits = 0; - // consume up to 6 hex chars - do { - next++; - hexDigits++; - code = css.charCodeAt(next + 1); - } while (hex[code] && hexDigits < 6); - // if fewer than 6 hex chars, a trailing space ends the escape - if (hexDigits < 6 && code === t.space) { - next++; - } - } else { - // the next char is part of the current word - next++; - } - return next; - } - var FIELDS = { - TYPE: 0, - START_LINE: 1, - START_COL: 2, - END_LINE: 3, - END_COL: 4, - START_POS: 5, - END_POS: 6 - }; - exports.FIELDS = FIELDS; - function tokenize(input) { - var tokens = []; - var css = input.css.valueOf(); - var _css = css, - length = _css.length; - var offset = -1; - var line = 1; - var start = 0; - var end = 0; - var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; - function unclosed(what, fix) { - if (input.safe) { - // fyi: this is never set to true. - css += fix; - next = css.length - 1; - } else { - throw input.error('Unclosed ' + what, line, start - offset, start); - } - } - while (start < length) { - code = css.charCodeAt(start); - if (code === t.newline) { - offset = start; - line += 1; - } - switch (code) { - case t.space: - case t.tab: - case t.newline: - case t.cr: - case t.feed: - next = start; - do { - next += 1; - code = css.charCodeAt(next); - if (code === t.newline) { - offset = next; - line += 1; - } - } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); - tokenType = t.space; - endLine = line; - endColumn = next - offset - 1; - end = next; - break; - case t.plus: - case t.greaterThan: - case t.tilde: - case t.pipe: - next = start; - do { - next += 1; - code = css.charCodeAt(next); - } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); - tokenType = t.combinator; - endLine = line; - endColumn = start - offset; - end = next; - break; - - // Consume these characters as single tokens. - case t.asterisk: - case t.ampersand: - case t.bang: - case t.comma: - case t.equals: - case t.dollar: - case t.caret: - case t.openSquare: - case t.closeSquare: - case t.colon: - case t.semicolon: - case t.openParenthesis: - case t.closeParenthesis: - next = start; - tokenType = code; - endLine = line; - endColumn = start - offset; - end = next + 1; - break; - case t.singleQuote: - case t.doubleQuote: - quote = code === t.singleQuote ? "'" : '"'; - next = start; - do { - escaped = false; - next = css.indexOf(quote, next + 1); - if (next === -1) { - unclosed('quote', quote); - } - escapePos = next; - while (css.charCodeAt(escapePos - 1) === t.backslash) { - escapePos -= 1; - escaped = !escaped; - } - } while (escaped); - tokenType = t.str; - endLine = line; - endColumn = start - offset; - end = next + 1; - break; - default: - if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { - next = css.indexOf('*/', start + 2) + 1; - if (next === 0) { - unclosed('comment', '*/'); - } - content = css.slice(start, next + 1); - lines = content.split('\n'); - last = lines.length - 1; - if (last > 0) { - nextLine = line + last; - nextOffset = next - lines[last].length; - } else { - nextLine = line; - nextOffset = offset; - } - tokenType = t.comment; - line = nextLine; - endLine = nextLine; - endColumn = next - nextOffset; - } else if (code === t.slash) { - next = start; - tokenType = code; - endLine = line; - endColumn = start - offset; - end = next + 1; - } else { - next = consumeWord(css, start); - tokenType = t.word; - endLine = line; - endColumn = next - offset; - } - end = next + 1; - break; - } - - // Ensure that the token structure remains consistent - tokens.push([tokenType, - // [0] Token type - line, - // [1] Starting line - start - offset, - // [2] Starting column - endLine, - // [3] Ending line - endColumn, - // [4] Ending column - start, - // [5] Start position / Source index - end // [6] End position - ]); - - // Reset offset for the next token - if (nextOffset) { - offset = nextOffset; - nextOffset = null; - } - start = end; - } - return tokens; - } - } (tokenize)); - return tokenize; -} - -var hasRequiredParser; - -function requireParser () { - if (hasRequiredParser) return parser.exports; - hasRequiredParser = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _root = _interopRequireDefault(/*@__PURE__*/ requireRoot()); - var _selector = _interopRequireDefault(/*@__PURE__*/ requireSelector()); - var _className = _interopRequireDefault(/*@__PURE__*/ requireClassName()); - var _comment = _interopRequireDefault(/*@__PURE__*/ requireComment()); - var _id = _interopRequireDefault(/*@__PURE__*/ requireId()); - var _tag = _interopRequireDefault(/*@__PURE__*/ requireTag()); - var _string = _interopRequireDefault(/*@__PURE__*/ requireString()); - var _pseudo = _interopRequireDefault(/*@__PURE__*/ requirePseudo()); - var _attribute = _interopRequireWildcard(/*@__PURE__*/ requireAttribute()); - var _universal = _interopRequireDefault(/*@__PURE__*/ requireUniversal()); - var _combinator = _interopRequireDefault(/*@__PURE__*/ requireCombinator()); - var _nesting = _interopRequireDefault(/*@__PURE__*/ requireNesting()); - var _sortAscending = _interopRequireDefault(/*@__PURE__*/ requireSortAscending()); - var _tokenize = _interopRequireWildcard(/*@__PURE__*/ requireTokenize()); - var tokens = _interopRequireWildcard(/*@__PURE__*/ requireTokenTypes()); - var types = _interopRequireWildcard(/*@__PURE__*/ requireTypes()); - var _util = /*@__PURE__*/ requireUtil$1(); - var _WHITESPACE_TOKENS, _Object$assign; - function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); - var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); - function tokenStart(token) { - return { - line: token[_tokenize.FIELDS.START_LINE], - column: token[_tokenize.FIELDS.START_COL] - }; - } - function tokenEnd(token) { - return { - line: token[_tokenize.FIELDS.END_LINE], - column: token[_tokenize.FIELDS.END_COL] - }; - } - function getSource(startLine, startColumn, endLine, endColumn) { - return { - start: { - line: startLine, - column: startColumn - }, - end: { - line: endLine, - column: endColumn - } - }; - } - function getTokenSource(token) { - return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); - } - function getTokenSourceSpan(startToken, endToken) { - if (!startToken) { - return undefined; - } - return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); - } - function unescapeProp(node, prop) { - var value = node[prop]; - if (typeof value !== "string") { - return; - } - if (value.indexOf("\\") !== -1) { - (0, _util.ensureObject)(node, 'raws'); - node[prop] = (0, _util.unesc)(value); - if (node.raws[prop] === undefined) { - node.raws[prop] = value; - } - } - return node; - } - function indexesOf(array, item) { - var i = -1; - var indexes = []; - while ((i = array.indexOf(item, i + 1)) !== -1) { - indexes.push(i); - } - return indexes; - } - function uniqs() { - var list = Array.prototype.concat.apply([], arguments); - return list.filter(function (item, i) { - return i === list.indexOf(item); - }); - } - var Parser = /*#__PURE__*/function () { - function Parser(rule, options) { - if (options === void 0) { - options = {}; - } - this.rule = rule; - this.options = Object.assign({ - lossy: false, - safe: false - }, options); - this.position = 0; - this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector; - this.tokens = (0, _tokenize["default"])({ - css: this.css, - error: this._errorGenerator(), - safe: this.options.safe - }); - var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]); - this.root = new _root["default"]({ - source: rootSource - }); - this.root.errorGenerator = this._errorGenerator(); - var selector = new _selector["default"]({ - source: { - start: { - line: 1, - column: 1 - } - }, - sourceIndex: 0 - }); - this.root.append(selector); - this.current = selector; - this.loop(); - } - var _proto = Parser.prototype; - _proto._errorGenerator = function _errorGenerator() { - var _this = this; - return function (message, errorOptions) { - if (typeof _this.rule === 'string') { - return new Error(message); - } - return _this.rule.error(message, errorOptions); - }; - }; - _proto.attribute = function attribute() { - var attr = []; - var startingToken = this.currToken; - this.position++; - while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { - attr.push(this.currToken); - this.position++; - } - if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { - return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]); - } - var len = attr.length; - var node = { - source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), - sourceIndex: startingToken[_tokenize.FIELDS.START_POS] - }; - if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) { - return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]); - } - var pos = 0; - var spaceBefore = ''; - var commentBefore = ''; - var lastAdded = null; - var spaceAfterMeaningfulToken = false; - while (pos < len) { - var token = attr[pos]; - var content = this.content(token); - var next = attr[pos + 1]; - switch (token[_tokenize.FIELDS.TYPE]) { - case tokens.space: - // if ( - // len === 1 || - // pos === 0 && this.content(next) === '|' - // ) { - // return this.expected('attribute', token[TOKEN.START_POS], content); - // } - spaceAfterMeaningfulToken = true; - if (this.options.lossy) { - break; - } - if (lastAdded) { - (0, _util.ensureObject)(node, 'spaces', lastAdded); - var prevContent = node.spaces[lastAdded].after || ''; - node.spaces[lastAdded].after = prevContent + content; - var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null; - if (existingComment) { - node.raws.spaces[lastAdded].after = existingComment + content; - } - } else { - spaceBefore = spaceBefore + content; - commentBefore = commentBefore + content; - } - break; - case tokens.asterisk: - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) { - if (spaceBefore) { - (0, _util.ensureObject)(node, 'spaces', 'attribute'); - node.spaces.attribute.before = spaceBefore; - spaceBefore = ''; - } - if (commentBefore) { - (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); - node.raws.spaces.attribute.before = spaceBefore; - commentBefore = ''; - } - node.namespace = (node.namespace || "") + content; - var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null; - if (rawValue) { - node.raws.namespace += content; - } - lastAdded = 'namespace'; - } - spaceAfterMeaningfulToken = false; - break; - case tokens.dollar: - if (lastAdded === "value") { - var oldRawValue = (0, _util.getProp)(node, 'raws', 'value'); - node.value += "$"; - if (oldRawValue) { - node.raws.value = oldRawValue + "$"; - } - break; - } - // Falls through - case tokens.caret: - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } - spaceAfterMeaningfulToken = false; - break; - case tokens.combinator: - if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } - if (content !== '|') { - spaceAfterMeaningfulToken = false; - break; - } - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } else if (!node.namespace && !node.attribute) { - node.namespace = true; - } - spaceAfterMeaningfulToken = false; - break; - case tokens.word: - if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && - // this look-ahead probably fails with comment nodes involved. - !node.operator && !node.namespace) { - node.namespace = content; - lastAdded = 'namespace'; - } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) { - if (spaceBefore) { - (0, _util.ensureObject)(node, 'spaces', 'attribute'); - node.spaces.attribute.before = spaceBefore; - spaceBefore = ''; - } - if (commentBefore) { - (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); - node.raws.spaces.attribute.before = commentBefore; - commentBefore = ''; - } - node.attribute = (node.attribute || "") + content; - var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null; - if (_rawValue) { - node.raws.attribute += content; - } - lastAdded = 'attribute'; - } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) { - var _unescaped = (0, _util.unesc)(content); - var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || ''; - var oldValue = node.value || ''; - node.value = oldValue + _unescaped; - node.quoteMark = null; - if (_unescaped !== content || _oldRawValue) { - (0, _util.ensureObject)(node, 'raws'); - node.raws.value = (_oldRawValue || oldValue) + content; - } - lastAdded = 'value'; - } else { - var insensitive = content === 'i' || content === "I"; - if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) { - node.insensitive = insensitive; - if (!insensitive || content === "I") { - (0, _util.ensureObject)(node, 'raws'); - node.raws.insensitiveFlag = content; - } - lastAdded = 'insensitive'; - if (spaceBefore) { - (0, _util.ensureObject)(node, 'spaces', 'insensitive'); - node.spaces.insensitive.before = spaceBefore; - spaceBefore = ''; - } - if (commentBefore) { - (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive'); - node.raws.spaces.insensitive.before = commentBefore; - commentBefore = ''; - } - } else if (node.value || node.value === '') { - lastAdded = 'value'; - node.value += content; - if (node.raws.value) { - node.raws.value += content; - } - } - } - spaceAfterMeaningfulToken = false; - break; - case tokens.str: - if (!node.attribute || !node.operator) { - return this.error("Expected an attribute followed by an operator preceding the string.", { - index: token[_tokenize.FIELDS.START_POS] - }); - } - var _unescapeValue = (0, _attribute.unescapeValue)(content), - unescaped = _unescapeValue.unescaped, - quoteMark = _unescapeValue.quoteMark; - node.value = unescaped; - node.quoteMark = quoteMark; - lastAdded = 'value'; - (0, _util.ensureObject)(node, 'raws'); - node.raws.value = content; - spaceAfterMeaningfulToken = false; - break; - case tokens.equals: - if (!node.attribute) { - return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content); - } - if (node.value) { - return this.error('Unexpected "=" found; an operator was already defined.', { - index: token[_tokenize.FIELDS.START_POS] - }); - } - node.operator = node.operator ? node.operator + content : content; - lastAdded = 'operator'; - spaceAfterMeaningfulToken = false; - break; - case tokens.comment: - if (lastAdded) { - if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') { - var lastComment = (0, _util.getProp)(node, 'spaces', lastAdded, 'after') || ''; - var rawLastComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment; - (0, _util.ensureObject)(node, 'raws', 'spaces', lastAdded); - node.raws.spaces[lastAdded].after = rawLastComment + content; - } else { - var lastValue = node[lastAdded] || ''; - var rawLastValue = (0, _util.getProp)(node, 'raws', lastAdded) || lastValue; - (0, _util.ensureObject)(node, 'raws'); - node.raws[lastAdded] = rawLastValue + content; - } - } else { - commentBefore = commentBefore + content; - } - break; - default: - return this.error("Unexpected \"" + content + "\" found.", { - index: token[_tokenize.FIELDS.START_POS] - }); - } - pos++; - } - unescapeProp(node, "attribute"); - unescapeProp(node, "namespace"); - this.newNode(new _attribute["default"](node)); - this.position++; - } - - /** - * return a node containing meaningless garbage up to (but not including) the specified token position. - * if the token position is negative, all remaining tokens are consumed. - * - * This returns an array containing a single string node if all whitespace, - * otherwise an array of comment nodes with space before and after. - * - * These tokens are not added to the current selector, the caller can add them or use them to amend - * a previous node's space metadata. - * - * In lossy mode, this returns only comments. - */; - _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { - if (stopPosition < 0) { - stopPosition = this.tokens.length; - } - var startPosition = this.position; - var nodes = []; - var space = ""; - var lastComment = undefined; - do { - if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { - if (!this.options.lossy) { - space += this.content(); - } - } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { - var spaces = {}; - if (space) { - spaces.before = space; - space = ""; - } - lastComment = new _comment["default"]({ - value: this.content(), - source: getTokenSource(this.currToken), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], - spaces: spaces - }); - nodes.push(lastComment); - } - } while (++this.position < stopPosition); - if (space) { - if (lastComment) { - lastComment.spaces.after = space; - } else if (!this.options.lossy) { - var firstToken = this.tokens[startPosition]; - var lastToken = this.tokens[this.position - 1]; - nodes.push(new _string["default"]({ - value: '', - source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]), - sourceIndex: firstToken[_tokenize.FIELDS.START_POS], - spaces: { - before: space, - after: '' - } - })); - } - } - return nodes; - } - - /** - * - * @param {*} nodes - */; - _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { - var _this2 = this; - if (requiredSpace === void 0) { - requiredSpace = false; - } - var space = ""; - var rawSpace = ""; - nodes.forEach(function (n) { - var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); - var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); - space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); - rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); - }); - if (rawSpace === space) { - rawSpace = undefined; - } - var result = { - space: space, - rawSpace: rawSpace - }; - return result; - }; - _proto.isNamedCombinator = function isNamedCombinator(position) { - if (position === void 0) { - position = this.position; - } - return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; - }; - _proto.namedCombinator = function namedCombinator() { - if (this.isNamedCombinator()) { - var nameRaw = this.content(this.tokens[this.position + 1]); - var name = (0, _util.unesc)(nameRaw).toLowerCase(); - var raws = {}; - if (name !== nameRaw) { - raws.value = "/" + nameRaw + "/"; - } - var node = new _combinator["default"]({ - value: "/" + name + "/", - source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], - raws: raws - }); - this.position = this.position + 3; - return node; - } else { - this.unexpected(); - } - }; - _proto.combinator = function combinator() { - var _this3 = this; - if (this.content() === '|') { - return this.namespace(); - } - // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. - var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); - if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); - if (nodes.length > 0) { - var last = this.current.last; - if (last) { - var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), - space = _this$convertWhitespa.space, - rawSpace = _this$convertWhitespa.rawSpace; - if (rawSpace !== undefined) { - last.rawSpaceAfter += rawSpace; - } - last.spaces.after += space; - } else { - nodes.forEach(function (n) { - return _this3.newNode(n); - }); - } - } - return; - } - var firstToken = this.currToken; - var spaceOrDescendantSelectorNodes = undefined; - if (nextSigTokenPos > this.position) { - spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); - } - var node; - if (this.isNamedCombinator()) { - node = this.namedCombinator(); - } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { - node = new _combinator["default"]({ - value: this.content(), - source: getTokenSource(this.currToken), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] - }); - this.position++; - } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) ; else if (!spaceOrDescendantSelectorNodes) { - this.unexpected(); - } - if (node) { - if (spaceOrDescendantSelectorNodes) { - var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), - _space = _this$convertWhitespa2.space, - _rawSpace = _this$convertWhitespa2.rawSpace; - node.spaces.before = _space; - node.rawSpaceBefore = _rawSpace; - } - } else { - // descendant combinator - var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), - _space2 = _this$convertWhitespa3.space, - _rawSpace2 = _this$convertWhitespa3.rawSpace; - if (!_rawSpace2) { - _rawSpace2 = _space2; - } - var spaces = {}; - var raws = { - spaces: {} - }; - if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) { - spaces.before = _space2.slice(0, _space2.length - 1); - raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); - } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) { - spaces.after = _space2.slice(1); - raws.spaces.after = _rawSpace2.slice(1); - } else { - raws.value = _rawSpace2; - } - node = new _combinator["default"]({ - value: ' ', - source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), - sourceIndex: firstToken[_tokenize.FIELDS.START_POS], - spaces: spaces, - raws: raws - }); - } - if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { - node.spaces.after = this.optionalSpace(this.content()); - this.position++; - } - return this.newNode(node); - }; - _proto.comma = function comma() { - if (this.position === this.tokens.length - 1) { - this.root.trailingComma = true; - this.position++; - return; - } - this.current._inferEndPosition(); - var selector = new _selector["default"]({ - source: { - start: tokenStart(this.tokens[this.position + 1]) - }, - sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS] - }); - this.current.parent.append(selector); - this.current = selector; - this.position++; - }; - _proto.comment = function comment() { - var current = this.currToken; - this.newNode(new _comment["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - _proto.error = function error(message, opts) { - throw this.root.error(message, opts); - }; - _proto.missingBackslash = function missingBackslash() { - return this.error('Expected a backslash preceding the semicolon.', { - index: this.currToken[_tokenize.FIELDS.START_POS] - }); - }; - _proto.missingParenthesis = function missingParenthesis() { - return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.missingSquareBracket = function missingSquareBracket() { - return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.unexpected = function unexpected() { - return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.unexpectedPipe = function unexpectedPipe() { - return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.namespace = function namespace() { - var before = this.prevToken && this.content(this.prevToken) || true; - if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) { - this.position++; - return this.word(before); - } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) { - this.position++; - return this.universal(before); - } - this.unexpectedPipe(); - }; - _proto.nesting = function nesting() { - if (this.nextToken) { - var nextContent = this.content(this.nextToken); - if (nextContent === "|") { - this.position++; - return; - } - } - var current = this.currToken; - this.newNode(new _nesting["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - _proto.parentheses = function parentheses() { - var last = this.current.last; - var unbalanced = 1; - this.position++; - if (last && last.type === types.PSEUDO) { - var selector = new _selector["default"]({ - source: { - start: tokenStart(this.tokens[this.position]) - }, - sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS] - }); - var cache = this.current; - last.append(selector); - this.current = selector; - while (this.position < this.tokens.length && unbalanced) { - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - unbalanced++; - } - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - unbalanced--; - } - if (unbalanced) { - this.parse(); - } else { - this.current.source.end = tokenEnd(this.currToken); - this.current.parent.source.end = tokenEnd(this.currToken); - this.position++; - } - } - this.current = cache; - } else { - // I think this case should be an error. It's used to implement a basic parse of media queries - // but I don't think it's a good idea. - var parenStart = this.currToken; - var parenValue = "("; - var parenEnd; - while (this.position < this.tokens.length && unbalanced) { - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - unbalanced++; - } - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - unbalanced--; - } - parenEnd = this.currToken; - parenValue += this.parseParenthesisToken(this.currToken); - this.position++; - } - if (last) { - last.appendToPropertyAndEscape("value", parenValue, parenValue); - } else { - this.newNode(new _string["default"]({ - value: parenValue, - source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]), - sourceIndex: parenStart[_tokenize.FIELDS.START_POS] - })); - } - } - if (unbalanced) { - return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); - } - }; - _proto.pseudo = function pseudo() { - var _this4 = this; - var pseudoStr = ''; - var startingToken = this.currToken; - while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { - pseudoStr += this.content(); - this.position++; - } - if (!this.currToken) { - return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1); - } - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) { - this.splitWord(false, function (first, length) { - pseudoStr += first; - _this4.newNode(new _pseudo["default"]({ - value: pseudoStr, - source: getTokenSourceSpan(startingToken, _this4.currToken), - sourceIndex: startingToken[_tokenize.FIELDS.START_POS] - })); - if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - _this4.error('Misplaced parenthesis.', { - index: _this4.nextToken[_tokenize.FIELDS.START_POS] - }); - } - }); - } else { - return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]); - } - }; - _proto.space = function space() { - var content = this.content(); - // Handle space before and after the selector - if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) { - return node.type === 'comment'; - })) { - this.spaces = this.optionalSpace(content); - this.position++; - } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - this.current.last.spaces.after = this.optionalSpace(content); - this.position++; - } else { - this.combinator(); - } - }; - _proto.string = function string() { - var current = this.currToken; - this.newNode(new _string["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - _proto.universal = function universal(namespace) { - var nextToken = this.nextToken; - if (nextToken && this.content(nextToken) === '|') { - this.position++; - return this.namespace(); - } - var current = this.currToken; - this.newNode(new _universal["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - }), namespace); - this.position++; - }; - _proto.splitWord = function splitWord(namespace, firstCallback) { - var _this5 = this; - var nextToken = this.nextToken; - var word = this.content(); - while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { - this.position++; - var current = this.content(); - word += current; - if (current.lastIndexOf('\\') === current.length - 1) { - var next = this.nextToken; - if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { - word += this.requiredSpace(this.content(next)); - this.position++; - } - } - nextToken = this.nextToken; - } - var hasClass = indexesOf(word, '.').filter(function (i) { - // Allow escaped dot within class name - var escapedDot = word[i - 1] === '\\'; - // Allow decimal numbers percent in @keyframes - var isKeyframesPercent = /^\d+\.\d+%$/.test(word); - return !escapedDot && !isKeyframesPercent; - }); - var hasId = indexesOf(word, '#').filter(function (i) { - return word[i - 1] !== '\\'; - }); - // Eliminate Sass interpolations from the list of id indexes - var interpolations = indexesOf(word, '#{'); - if (interpolations.length) { - hasId = hasId.filter(function (hashIndex) { - return !~interpolations.indexOf(hashIndex); - }); - } - var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); - indices.forEach(function (ind, i) { - var index = indices[i + 1] || word.length; - var value = word.slice(ind, index); - if (i === 0 && firstCallback) { - return firstCallback.call(_this5, value, indices.length); - } - var node; - var current = _this5.currToken; - var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i]; - var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1)); - if (~hasClass.indexOf(ind)) { - var classNameOpts = { - value: value.slice(1), - source: source, - sourceIndex: sourceIndex - }; - node = new _className["default"](unescapeProp(classNameOpts, "value")); - } else if (~hasId.indexOf(ind)) { - var idOpts = { - value: value.slice(1), - source: source, - sourceIndex: sourceIndex - }; - node = new _id["default"](unescapeProp(idOpts, "value")); - } else { - var tagOpts = { - value: value, - source: source, - sourceIndex: sourceIndex - }; - unescapeProp(tagOpts, "value"); - node = new _tag["default"](tagOpts); - } - _this5.newNode(node, namespace); - // Ensure that the namespace is used only once - namespace = null; - }); - this.position++; - }; - _proto.word = function word(namespace) { - var nextToken = this.nextToken; - if (nextToken && this.content(nextToken) === '|') { - this.position++; - return this.namespace(); - } - return this.splitWord(namespace); - }; - _proto.loop = function loop() { - while (this.position < this.tokens.length) { - this.parse(true); - } - this.current._inferEndPosition(); - return this.root; - }; - _proto.parse = function parse(throwOnParenthesis) { - switch (this.currToken[_tokenize.FIELDS.TYPE]) { - case tokens.space: - this.space(); - break; - case tokens.comment: - this.comment(); - break; - case tokens.openParenthesis: - this.parentheses(); - break; - case tokens.closeParenthesis: - if (throwOnParenthesis) { - this.missingParenthesis(); - } - break; - case tokens.openSquare: - this.attribute(); - break; - case tokens.dollar: - case tokens.caret: - case tokens.equals: - case tokens.word: - this.word(); - break; - case tokens.colon: - this.pseudo(); - break; - case tokens.comma: - this.comma(); - break; - case tokens.asterisk: - this.universal(); - break; - case tokens.ampersand: - this.nesting(); - break; - case tokens.slash: - case tokens.combinator: - this.combinator(); - break; - case tokens.str: - this.string(); - break; - // These cases throw; no break needed. - case tokens.closeSquare: - this.missingSquareBracket(); - case tokens.semicolon: - this.missingBackslash(); - default: - this.unexpected(); - } - } - - /** - * Helpers - */; - _proto.expected = function expected(description, index, found) { - if (Array.isArray(description)) { - var last = description.pop(); - description = description.join(', ') + " or " + last; - } - var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a'; - if (!found) { - return this.error("Expected " + an + " " + description + ".", { - index: index - }); - } - return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { - index: index - }); - }; - _proto.requiredSpace = function requiredSpace(space) { - return this.options.lossy ? ' ' : space; - }; - _proto.optionalSpace = function optionalSpace(space) { - return this.options.lossy ? '' : space; - }; - _proto.lossySpace = function lossySpace(space, required) { - if (this.options.lossy) { - return required ? ' ' : ''; - } else { - return space; - } - }; - _proto.parseParenthesisToken = function parseParenthesisToken(token) { - var content = this.content(token); - if (token[_tokenize.FIELDS.TYPE] === tokens.space) { - return this.requiredSpace(content); - } else { - return content; - } - }; - _proto.newNode = function newNode(node, namespace) { - if (namespace) { - if (/^ +$/.test(namespace)) { - if (!this.options.lossy) { - this.spaces = (this.spaces || '') + namespace; - } - namespace = true; - } - node.namespace = namespace; - unescapeProp(node, "namespace"); - } - if (this.spaces) { - node.spaces.before = this.spaces; - this.spaces = ''; - } - return this.current.append(node); - }; - _proto.content = function content(token) { - if (token === void 0) { - token = this.currToken; - } - return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); - }; - /** - * returns the index of the next non-whitespace, non-comment token. - * returns -1 if no meaningful token is found. - */ - _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) { - if (startPosition === void 0) { - startPosition = this.position + 1; - } - var searchPosition = startPosition; - while (searchPosition < this.tokens.length) { - if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { - searchPosition++; - continue; - } else { - return searchPosition; - } - } - return -1; - }; - _createClass(Parser, [{ - key: "currToken", - get: function get() { - return this.tokens[this.position]; - } - }, { - key: "nextToken", - get: function get() { - return this.tokens[this.position + 1]; - } - }, { - key: "prevToken", - get: function get() { - return this.tokens[this.position - 1]; - } - }]); - return Parser; - }(); - exports["default"] = Parser; - module.exports = exports.default; - } (parser, parser.exports)); - return parser.exports; -} - -var hasRequiredProcessor; - -function requireProcessor () { - if (hasRequiredProcessor) return processor.exports; - hasRequiredProcessor = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _parser = _interopRequireDefault(/*@__PURE__*/ requireParser()); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - var Processor = /*#__PURE__*/function () { - function Processor(func, options) { - this.func = func || function noop() {}; - this.funcRes = null; - this.options = options; - } - var _proto = Processor.prototype; - _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { - if (options === void 0) { - options = {}; - } - var merged = Object.assign({}, this.options, options); - if (merged.updateSelector === false) { - return false; - } else { - return typeof rule !== "string"; - } - }; - _proto._isLossy = function _isLossy(options) { - if (options === void 0) { - options = {}; - } - var merged = Object.assign({}, this.options, options); - if (merged.lossless === false) { - return true; - } else { - return false; - } - }; - _proto._root = function _root(rule, options) { - if (options === void 0) { - options = {}; - } - var parser = new _parser["default"](rule, this._parseOptions(options)); - return parser.root; - }; - _proto._parseOptions = function _parseOptions(options) { - return { - lossy: this._isLossy(options) - }; - }; - _proto._run = function _run(rule, options) { - var _this = this; - if (options === void 0) { - options = {}; - } - return new Promise(function (resolve, reject) { - try { - var root = _this._root(rule, options); - Promise.resolve(_this.func(root)).then(function (transform) { - var string = undefined; - if (_this._shouldUpdateSelector(rule, options)) { - string = root.toString(); - rule.selector = string; - } - return { - transform: transform, - root: root, - string: string - }; - }).then(resolve, reject); - } catch (e) { - reject(e); - return; - } - }); - }; - _proto._runSync = function _runSync(rule, options) { - if (options === void 0) { - options = {}; - } - var root = this._root(rule, options); - var transform = this.func(root); - if (transform && typeof transform.then === "function") { - throw new Error("Selector processor returned a promise to a synchronous call."); - } - var string = undefined; - if (options.updateSelector && typeof rule !== "string") { - string = root.toString(); - rule.selector = string; - } - return { - transform: transform, - root: root, - string: string - }; - } - - /** - * Process rule into a selector AST. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {Promise<parser.Root>} The AST of the selector after processing it. - */; - _proto.ast = function ast(rule, options) { - return this._run(rule, options).then(function (result) { - return result.root; - }); - } - - /** - * Process rule into a selector AST synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {parser.Root} The AST of the selector after processing it. - */; - _proto.astSync = function astSync(rule, options) { - return this._runSync(rule, options).root; - } - - /** - * Process a selector into a transformed value asynchronously - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {Promise<any>} The value returned by the processor. - */; - _proto.transform = function transform(rule, options) { - return this._run(rule, options).then(function (result) { - return result.transform; - }); - } - - /** - * Process a selector into a transformed value synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {any} The value returned by the processor. - */; - _proto.transformSync = function transformSync(rule, options) { - return this._runSync(rule, options).transform; - } - - /** - * Process a selector into a new selector string asynchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {string} the selector after processing. - */; - _proto.process = function process(rule, options) { - return this._run(rule, options).then(function (result) { - return result.string || result.root.toString(); - }); - } - - /** - * Process a selector into a new selector string synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {string} the selector after processing. - */; - _proto.processSync = function processSync(rule, options) { - var result = this._runSync(rule, options); - return result.string || result.root.toString(); - }; - return Processor; - }(); - exports["default"] = Processor; - module.exports = exports.default; - } (processor, processor.exports)); - return processor.exports; -} - -var selectors = {}; - -var constructors = {}; - -var hasRequiredConstructors; - -function requireConstructors () { - if (hasRequiredConstructors) return constructors; - hasRequiredConstructors = 1; - - constructors.__esModule = true; - constructors.universal = constructors.tag = constructors.string = constructors.selector = constructors.root = constructors.pseudo = constructors.nesting = constructors.id = constructors.comment = constructors.combinator = constructors.className = constructors.attribute = void 0; - var _attribute = _interopRequireDefault(/*@__PURE__*/ requireAttribute()); - var _className = _interopRequireDefault(/*@__PURE__*/ requireClassName()); - var _combinator = _interopRequireDefault(/*@__PURE__*/ requireCombinator()); - var _comment = _interopRequireDefault(/*@__PURE__*/ requireComment()); - var _id = _interopRequireDefault(/*@__PURE__*/ requireId()); - var _nesting = _interopRequireDefault(/*@__PURE__*/ requireNesting()); - var _pseudo = _interopRequireDefault(/*@__PURE__*/ requirePseudo()); - var _root = _interopRequireDefault(/*@__PURE__*/ requireRoot()); - var _selector = _interopRequireDefault(/*@__PURE__*/ requireSelector()); - var _string = _interopRequireDefault(/*@__PURE__*/ requireString()); - var _tag = _interopRequireDefault(/*@__PURE__*/ requireTag()); - var _universal = _interopRequireDefault(/*@__PURE__*/ requireUniversal()); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - var attribute = function attribute(opts) { - return new _attribute["default"](opts); - }; - constructors.attribute = attribute; - var className = function className(opts) { - return new _className["default"](opts); - }; - constructors.className = className; - var combinator = function combinator(opts) { - return new _combinator["default"](opts); - }; - constructors.combinator = combinator; - var comment = function comment(opts) { - return new _comment["default"](opts); - }; - constructors.comment = comment; - var id = function id(opts) { - return new _id["default"](opts); - }; - constructors.id = id; - var nesting = function nesting(opts) { - return new _nesting["default"](opts); - }; - constructors.nesting = nesting; - var pseudo = function pseudo(opts) { - return new _pseudo["default"](opts); - }; - constructors.pseudo = pseudo; - var root = function root(opts) { - return new _root["default"](opts); - }; - constructors.root = root; - var selector = function selector(opts) { - return new _selector["default"](opts); - }; - constructors.selector = selector; - var string = function string(opts) { - return new _string["default"](opts); - }; - constructors.string = string; - var tag = function tag(opts) { - return new _tag["default"](opts); - }; - constructors.tag = tag; - var universal = function universal(opts) { - return new _universal["default"](opts); - }; - constructors.universal = universal; - return constructors; -} - -var guards = {}; - -var hasRequiredGuards; - -function requireGuards () { - if (hasRequiredGuards) return guards; - hasRequiredGuards = 1; - - guards.__esModule = true; - guards.isComment = guards.isCombinator = guards.isClassName = guards.isAttribute = void 0; - guards.isContainer = isContainer; - guards.isIdentifier = void 0; - guards.isNamespace = isNamespace; - guards.isNesting = void 0; - guards.isNode = isNode; - guards.isPseudo = void 0; - guards.isPseudoClass = isPseudoClass; - guards.isPseudoElement = isPseudoElement; - guards.isUniversal = guards.isTag = guards.isString = guards.isSelector = guards.isRoot = void 0; - var _types = /*@__PURE__*/ requireTypes(); - var _IS_TYPE; - var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE); - function isNode(node) { - return typeof node === "object" && IS_TYPE[node.type]; - } - function isNodeType(type, node) { - return isNode(node) && node.type === type; - } - var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE); - guards.isAttribute = isAttribute; - var isClassName = isNodeType.bind(null, _types.CLASS); - guards.isClassName = isClassName; - var isCombinator = isNodeType.bind(null, _types.COMBINATOR); - guards.isCombinator = isCombinator; - var isComment = isNodeType.bind(null, _types.COMMENT); - guards.isComment = isComment; - var isIdentifier = isNodeType.bind(null, _types.ID); - guards.isIdentifier = isIdentifier; - var isNesting = isNodeType.bind(null, _types.NESTING); - guards.isNesting = isNesting; - var isPseudo = isNodeType.bind(null, _types.PSEUDO); - guards.isPseudo = isPseudo; - var isRoot = isNodeType.bind(null, _types.ROOT); - guards.isRoot = isRoot; - var isSelector = isNodeType.bind(null, _types.SELECTOR); - guards.isSelector = isSelector; - var isString = isNodeType.bind(null, _types.STRING); - guards.isString = isString; - var isTag = isNodeType.bind(null, _types.TAG); - guards.isTag = isTag; - var isUniversal = isNodeType.bind(null, _types.UNIVERSAL); - guards.isUniversal = isUniversal; - function isPseudoElement(node) { - return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line"); - } - function isPseudoClass(node) { - return isPseudo(node) && !isPseudoElement(node); - } - function isContainer(node) { - return !!(isNode(node) && node.walk); - } - function isNamespace(node) { - return isAttribute(node) || isTag(node); - } - return guards; -} - -var hasRequiredSelectors; - -function requireSelectors () { - if (hasRequiredSelectors) return selectors; - hasRequiredSelectors = 1; - (function (exports) { - - exports.__esModule = true; - var _types = /*@__PURE__*/ requireTypes(); - Object.keys(_types).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _types[key]) return; - exports[key] = _types[key]; - }); - var _constructors = /*@__PURE__*/ requireConstructors(); - Object.keys(_constructors).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _constructors[key]) return; - exports[key] = _constructors[key]; - }); - var _guards = /*@__PURE__*/ requireGuards(); - Object.keys(_guards).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _guards[key]) return; - exports[key] = _guards[key]; - }); - } (selectors)); - return selectors; -} - -var hasRequiredDist; - -function requireDist () { - if (hasRequiredDist) return dist.exports; - hasRequiredDist = 1; - (function (module, exports) { - - exports.__esModule = true; - exports["default"] = void 0; - var _processor = _interopRequireDefault(/*@__PURE__*/ requireProcessor()); - var selectors = _interopRequireWildcard(/*@__PURE__*/ requireSelectors()); - function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - var parser = function parser(processor) { - return new _processor["default"](processor); - }; - Object.assign(parser, selectors); - delete parser.__esModule; - var _default = parser; - exports["default"] = _default; - module.exports = exports.default; - } (dist, dist.exports)); - return dist.exports; -} - -var distExports = /*@__PURE__*/ requireDist(); -var selectorParser = /*@__PURE__*/getDefaultExportFromCjs(distExports); - -const animationNameRE = /^(-\w+-)?animation-name$/; -const animationRE = /^(-\w+-)?animation$/; -const scopedPlugin = (id = "") => { - const keyframes = /* @__PURE__ */ Object.create(null); - const shortId = id.replace(/^data-v-/, ""); - return { - postcssPlugin: "vue-sfc-scoped", - Rule(rule) { - processRule(id, rule); - }, - AtRule(node) { - if (/-?keyframes$/.test(node.name) && !node.params.endsWith(`-${shortId}`)) { - keyframes[node.params] = node.params = node.params + "-" + shortId; - } - }, - OnceExit(root) { - if (Object.keys(keyframes).length) { - root.walkDecls((decl) => { - if (animationNameRE.test(decl.prop)) { - decl.value = decl.value.split(",").map((v) => keyframes[v.trim()] || v.trim()).join(","); - } - if (animationRE.test(decl.prop)) { - decl.value = decl.value.split(",").map((v) => { - const vals = v.trim().split(/\s+/); - const i = vals.findIndex((val) => keyframes[val]); - if (i !== -1) { - vals.splice(i, 1, keyframes[vals[i]]); - return vals.join(" "); - } else { - return v; - } - }).join(","); - } - }); - } - } - }; -}; -const processedRules = /* @__PURE__ */ new WeakSet(); -function processRule(id, rule) { - if (processedRules.has(rule) || rule.parent && rule.parent.type === "atrule" && /-?keyframes$/.test(rule.parent.name)) { - return; - } - processedRules.add(rule); - let deep = false; - let parent = rule.parent; - while (parent && parent.type !== "root") { - if (parent.__deep) { - deep = true; - break; - } - parent = parent.parent; - } - rule.selector = selectorParser((selectorRoot) => { - selectorRoot.each((selector) => { - rewriteSelector(id, rule, selector, selectorRoot, deep); - }); - }).processSync(rule.selector); -} -function rewriteSelector(id, rule, selector, selectorRoot, deep, slotted = false) { - let node = null; - let shouldInject = !deep; - selector.each((n) => { - if (n.type === "combinator" && (n.value === ">>>" || n.value === "/deep/")) { - n.value = " "; - n.spaces.before = n.spaces.after = ""; - warn( - `the >>> and /deep/ combinators have been deprecated. Use :deep() instead.` - ); - return false; - } - if (n.type === "pseudo") { - const { value } = n; - if (value === ":deep" || value === "::v-deep") { - rule.__deep = true; - if (n.nodes.length) { - let last = n; - n.nodes[0].each((ss) => { - selector.insertAfter(last, ss); - last = ss; - }); - const prev = selector.at(selector.index(n) - 1); - if (!prev || !isSpaceCombinator(prev)) { - selector.insertAfter( - n, - selectorParser.combinator({ - value: " " - }) - ); - } - selector.removeChild(n); - } else { - warn( - `${value} usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead of ${value} <inner-selector>.` - ); - const prev = selector.at(selector.index(n) - 1); - if (prev && isSpaceCombinator(prev)) { - selector.removeChild(prev); - } - selector.removeChild(n); - } - return false; - } - if (value === ":slotted" || value === "::v-slotted") { - rewriteSelector( - id, - rule, - n.nodes[0], - selectorRoot, - deep, - true - ); - let last = n; - n.nodes[0].each((ss) => { - selector.insertAfter(last, ss); - last = ss; - }); - selector.removeChild(n); - shouldInject = false; - return false; - } - if (value === ":global" || value === "::v-global") { - selector.replaceWith(n.nodes[0]); - return false; - } - } - if (n.type === "universal") { - const prev = selector.at(selector.index(n) - 1); - const next = selector.at(selector.index(n) + 1); - if (!prev) { - if (next) { - if (next.type === "combinator" && next.value === " ") { - selector.removeChild(next); - } - selector.removeChild(n); - return; - } else { - node = selectorParser.combinator({ - value: "" - }); - selector.insertBefore(n, node); - selector.removeChild(n); - return false; - } - } - if (node) return; - } - if (n.type !== "pseudo" && n.type !== "combinator" || n.type === "pseudo" && (n.value === ":is" || n.value === ":where") && !node) { - node = n; - } - }); - if (rule.nodes.some((node2) => node2.type === "rule")) { - const deep2 = rule.__deep; - if (!deep2) { - extractAndWrapNodes(rule); - const atruleNodes = rule.nodes.filter((node2) => node2.type === "atrule"); - for (const atnode of atruleNodes) { - extractAndWrapNodes(atnode); - } - } - shouldInject = deep2; - } - if (node) { - const { type, value } = node; - if (type === "pseudo" && (value === ":is" || value === ":where")) { - node.nodes.forEach( - (value2) => rewriteSelector(id, rule, value2, selectorRoot, deep, slotted) - ); - shouldInject = false; - } - } - if (node) { - node.spaces.after = ""; - } else { - selector.first.spaces.before = ""; - } - if (shouldInject) { - const idToAdd = slotted ? id + "-s" : id; - selector.insertAfter( - // If node is null it means we need to inject [id] at the start - // insertAfter can handle `null` here - node, - selectorParser.attribute({ - attribute: idToAdd, - value: idToAdd, - raws: {}, - quoteMark: `"` - }) - ); - } -} -function isSpaceCombinator(node) { - return node.type === "combinator" && /^\s+$/.test(node.value); -} -function extractAndWrapNodes(parentNode) { - if (!parentNode.nodes) return; - const nodes = parentNode.nodes.filter( - (node) => node.type === "decl" || node.type === "comment" - ); - if (nodes.length) { - for (const node of nodes) { - parentNode.removeChild(node); - } - const wrappedRule = new Rule({ - nodes, - selector: "&" - }); - parentNode.prepend(wrappedRule); - } -} -scopedPlugin.postcss = true; - -var sourceMap = {}; - -var sourceMapGenerator = {}; - -var base64Vlq = {}; - -var base64 = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredBase64; - -function requireBase64 () { - if (hasRequiredBase64) return base64; - hasRequiredBase64 = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - base64.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - base64.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - return base64; -} - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredBase64Vlq; - -function requireBase64Vlq () { - if (hasRequiredBase64Vlq) return base64Vlq; - hasRequiredBase64Vlq = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = /*@__PURE__*/ requireBase64(); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - base64Vlq.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - base64Vlq.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - return base64Vlq; -} - -var util = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredUtil; - -function requireUtil () { - if (hasRequiredUtil) return util; - hasRequiredUtil = 1; - (function (exports) { - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port; - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '<dir>/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - /** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ - function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); - } - exports.parseSourceMapInput = parseSourceMapInput; - - /** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ - function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); - } - exports.computeSourceURL = computeSourceURL; - } (util)); - return util; -} - -var arraySet = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredArraySet; - -function requireArraySet () { - if (hasRequiredArraySet) return arraySet; - hasRequiredArraySet = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = /*@__PURE__*/ requireUtil(); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - arraySet.ArraySet = ArraySet; - return arraySet; -} - -var mappingList = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredMappingList; - -function requireMappingList () { - if (hasRequiredMappingList) return mappingList; - hasRequiredMappingList = 1; - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = /*@__PURE__*/ requireUtil(); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - mappingList.MappingList = MappingList; - return mappingList; -} - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredSourceMapGenerator; - -function requireSourceMapGenerator () { - if (hasRequiredSourceMapGenerator) return sourceMapGenerator; - hasRequiredSourceMapGenerator = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = /*@__PURE__*/ requireBase64Vlq(); - var util = /*@__PURE__*/ requireUtil(); - var ArraySet = /*@__PURE__*/ requireArraySet().ArraySet; - var MappingList = /*@__PURE__*/ requireMappingList().MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source); - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = ''; - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - sourceMapGenerator.SourceMapGenerator = SourceMapGenerator; - return sourceMapGenerator; -} - -var sourceMapConsumer = {}; - -var binarySearch = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredBinarySearch; - -function requireBinarySearch () { - if (hasRequiredBinarySearch) return binarySearch; - hasRequiredBinarySearch = 1; - (function (exports) { - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - } (binarySearch)); - return binarySearch; -} - -var quickSort = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredQuickSort; - -function requireQuickSort () { - if (hasRequiredQuickSort) return quickSort; - hasRequiredQuickSort = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - quickSort.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - return quickSort; -} - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredSourceMapConsumer; - -function requireSourceMapConsumer () { - if (hasRequiredSourceMapConsumer) return sourceMapConsumer; - hasRequiredSourceMapConsumer = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = /*@__PURE__*/ requireUtil(); - var binarySearch = /*@__PURE__*/ requireBinarySearch(); - var ArraySet = /*@__PURE__*/ requireArraySet().ArraySet; - var base64VLQ = /*@__PURE__*/ requireBase64Vlq(); - var quickSort = /*@__PURE__*/ requireQuickSort().quickSort; - - function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - sourceMapConsumer.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ - BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; - }; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - sourceMapConsumer.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - sourceMapConsumer.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - return sourceMapConsumer; -} - -var sourceNode = {}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var hasRequiredSourceNode; - -function requireSourceNode () { - if (hasRequiredSourceNode) return sourceNode; - hasRequiredSourceNode = 1; - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator().SourceMapGenerator; - var util = /*@__PURE__*/ requireUtil(); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - sourceNode.SourceNode = SourceNode; - return sourceNode; -} - -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredSourceMap; - -function requireSourceMap () { - if (hasRequiredSourceMap) return sourceMap; - hasRequiredSourceMap = 1; - sourceMap.SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator().SourceMapGenerator; - sourceMap.SourceMapConsumer = /*@__PURE__*/ requireSourceMapConsumer().SourceMapConsumer; - sourceMap.SourceNode = /*@__PURE__*/ requireSourceNode().SourceNode; - return sourceMap; -} - -var mergeSourceMap; -var hasRequiredMergeSourceMap; - -function requireMergeSourceMap () { - if (hasRequiredMergeSourceMap) return mergeSourceMap; - hasRequiredMergeSourceMap = 1; - var sourceMap = /*@__PURE__*/ requireSourceMap(); - var SourceMapConsumer = sourceMap.SourceMapConsumer; - var SourceMapGenerator = sourceMap.SourceMapGenerator; - - mergeSourceMap = merge; - - /** - * Merge old source map and new source map and return merged. - * If old or new source map value is falsy, return another one as it is. - * - * @param {object|string} [oldMap] old source map object - * @param {object|string} [newmap] new source map object - * @return {object|undefined} merged source map object, or undefined when both old and new source map are undefined - */ - function merge(oldMap, newMap) { - if (!oldMap) return newMap - if (!newMap) return oldMap - - var oldMapConsumer = new SourceMapConsumer(oldMap); - var newMapConsumer = new SourceMapConsumer(newMap); - var mergedMapGenerator = new SourceMapGenerator(); - - // iterate on new map and overwrite original position of new map with one of old map - newMapConsumer.eachMapping(function(m) { - // pass when `originalLine` is null. - // It occurs in case that the node does not have origin in original code. - if (m.originalLine == null) return - - var origPosInOldMap = oldMapConsumer.originalPositionFor({ - line: m.originalLine, - column: m.originalColumn - }); - - if (origPosInOldMap.source == null) return - - mergedMapGenerator.addMapping({ - original: { - line: origPosInOldMap.line, - column: origPosInOldMap.column - }, - generated: { - line: m.generatedLine, - column: m.generatedColumn - }, - source: origPosInOldMap.source, - name: origPosInOldMap.name - }); - }); - - var consumers = [oldMapConsumer, newMapConsumer]; - consumers.forEach(function(consumer) { - consumer.sources.forEach(function(sourceFile) { - mergedMapGenerator._sources.add(sourceFile); - var sourceContent = consumer.sourceContentFor(sourceFile); - if (sourceContent != null) { - mergedMapGenerator.setSourceContent(sourceFile, sourceContent); - } - }); - }); - - mergedMapGenerator._sourceRoot = oldMap.sourceRoot; - mergedMapGenerator._file = oldMap.file; - - return JSON.parse(mergedMapGenerator.toString()) - } - return mergeSourceMap; -} - -var mergeSourceMapExports = /*@__PURE__*/ requireMergeSourceMap(); -var merge = /*@__PURE__*/getDefaultExportFromCjs(mergeSourceMapExports); - -var __defProp$5 = Object.defineProperty; -var __defProps$4 = Object.defineProperties; -var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols; -var __hasOwnProp$5 = Object.prototype.hasOwnProperty; -var __propIsEnum$5 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues$5 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$5.call(b, prop)) - __defNormalProp$5(a, prop, b[prop]); - if (__getOwnPropSymbols$5) - for (var prop of __getOwnPropSymbols$5(b)) { - if (__propIsEnum$5.call(b, prop)) - __defNormalProp$5(a, prop, b[prop]); - } - return a; -}; -var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b)); -const scss = (source, map, options, load = require) => { - const nodeSass = load("sass"); - const { compileString, renderSync } = nodeSass; - const data = getSource(source, options.filename, options.additionalData); - let css; - let dependencies; - let sourceMap; - try { - if (compileString) { - const { pathToFileURL, fileURLToPath } = load("url"); - const result = compileString(data, __spreadProps$4(__spreadValues$5({}, options), { - url: pathToFileURL(options.filename), - sourceMap: !!map - })); - css = result.css; - dependencies = result.loadedUrls.map((url) => fileURLToPath(url)); - sourceMap = map ? result.sourceMap : void 0; - } else { - const result = renderSync(__spreadProps$4(__spreadValues$5({}, options), { - data, - file: options.filename, - outFile: options.filename, - sourceMap: !!map - })); - css = result.css.toString(); - dependencies = result.stats.includedFiles; - sourceMap = map ? JSON.parse(result.map.toString()) : void 0; - } - if (map) { - return { - code: css, - errors: [], - dependencies, - map: merge(map, sourceMap) - }; - } - return { code: css, errors: [], dependencies }; - } catch (e) { - return { code: "", errors: [e], dependencies: [] }; - } -}; -const sass = (source, map, options, load) => scss( - source, - map, - __spreadProps$4(__spreadValues$5({}, options), { - indentedSyntax: true - }), - load -); -const less = (source, map, options, load = require) => { - const nodeLess = load("less"); - let result; - let error = null; - nodeLess.render( - getSource(source, options.filename, options.additionalData), - __spreadProps$4(__spreadValues$5({}, options), { syncImport: true }), - (err, output) => { - error = err; - result = output; - } - ); - if (error) return { code: "", errors: [error], dependencies: [] }; - const dependencies = result.imports; - if (map) { - return { - code: result.css.toString(), - map: merge(map, result.map), - errors: [], - dependencies - }; - } - return { - code: result.css.toString(), - errors: [], - dependencies - }; -}; -const styl = (source, map, options, load = require) => { - const nodeStylus = load("stylus"); - try { - const ref = nodeStylus(source, options); - if (map) ref.set("sourcemap", { inline: false, comment: false }); - const result = ref.render(); - const dependencies = ref.deps(); - if (map) { - return { - code: result, - map: merge(map, ref.sourcemap), - errors: [], - dependencies - }; - } - return { code: result, errors: [], dependencies }; - } catch (e) { - return { code: "", errors: [e], dependencies: [] }; - } -}; -function getSource(source, filename, additionalData) { - if (!additionalData) return source; - if (isFunction$1(additionalData)) { - return additionalData(source, filename); - } - return additionalData + source; -} -const processors = { - less, - sass, - scss, - styl, - stylus: styl -}; - -var __defProp$4 = Object.defineProperty; -var __defProps$3 = Object.defineProperties; -var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols; -var __hasOwnProp$4 = Object.prototype.hasOwnProperty; -var __propIsEnum$4 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues$4 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$4.call(b, prop)) - __defNormalProp$4(a, prop, b[prop]); - if (__getOwnPropSymbols$4) - for (var prop of __getOwnPropSymbols$4(b)) { - if (__propIsEnum$4.call(b, prop)) - __defNormalProp$4(a, prop, b[prop]); - } - return a; -}; -var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b)); -function compileStyle(options) { - return doCompileStyle(__spreadProps$3(__spreadValues$4({}, options), { - isAsync: false - })); -} -function compileStyleAsync(options) { - return doCompileStyle(__spreadProps$3(__spreadValues$4({}, options), { - isAsync: true - })); -} -function doCompileStyle(options) { - const { - filename, - id, - scoped = false, - trim = true, - isProd = false, - modules = false, - modulesOptions = {}, - preprocessLang, - postcssOptions, - postcssPlugins - } = options; - const preprocessor = preprocessLang && processors[preprocessLang]; - const preProcessedSource = preprocessor && preprocess(options, preprocessor); - const map = preProcessedSource ? preProcessedSource.map : options.inMap || options.map; - const source = preProcessedSource ? preProcessedSource.code : options.source; - const shortId = id.replace(/^data-v-/, ""); - const longId = `data-v-${shortId}`; - const plugins = (postcssPlugins || []).slice(); - plugins.unshift(cssVarsPlugin({ id: shortId, isProd })); - if (trim) { - plugins.push(trimPlugin()); - } - if (scoped) { - plugins.push(scopedPlugin(longId)); - } - let cssModules; - if (modules) { - { - throw new Error( - "[@vue/compiler-sfc] `modules` option is not supported in the browser build." - ); - } - } - const postCSSOptions = __spreadProps$3(__spreadValues$4({}, postcssOptions), { - to: filename, - from: filename - }); - if (map) { - postCSSOptions.map = { - inline: false, - annotation: false, - prev: map - }; - } - let result; - let code; - let outMap; - const dependencies = new Set( - preProcessedSource ? preProcessedSource.dependencies : [] - ); - dependencies.delete(filename); - const errors = []; - if (preProcessedSource && preProcessedSource.errors.length) { - errors.push(...preProcessedSource.errors); - } - const recordPlainCssDependencies = (messages) => { - messages.forEach((msg) => { - if (msg.type === "dependency") { - dependencies.add(msg.file); - } - }); - return dependencies; - }; - try { - result = postcss(plugins).process(source, postCSSOptions); - if (options.isAsync) { - return result.then((result2) => ({ - code: result2.css || "", - map: result2.map && result2.map.toJSON(), - errors, - modules: cssModules, - rawResult: result2, - dependencies: recordPlainCssDependencies(result2.messages) - })).catch((error) => ({ - code: "", - map: void 0, - errors: [...errors, error], - rawResult: void 0, - dependencies - })); - } - recordPlainCssDependencies(result.messages); - code = result.css; - outMap = result.map; - } catch (e) { - errors.push(e); - } - return { - code: code || ``, - map: outMap && outMap.toJSON(), - errors, - rawResult: result, - dependencies - }; -} -function preprocess(options, preprocessor) { - if (!options.preprocessCustomRequire) { - throw new Error( - `[@vue/compiler-sfc] Style preprocessing in the browser build must provide the \`preprocessCustomRequire\` option to return the in-browser version of the preprocessor.` - ); - } - return preprocessor( - options.source, - options.inMap || options.map, - __spreadValues$4({ - filename: options.filename - }, options.preprocessOptions), - options.preprocessCustomRequire - ); -} - -const UNKNOWN_TYPE = "Unknown"; -function resolveObjectKey(node, computed) { - switch (node.type) { - case "StringLiteral": - case "NumericLiteral": - return String(node.value); - case "Identifier": - if (!computed) return node.name; - } - return void 0; -} -function concatStrings(strs) { - return strs.filter((s) => !!s).join(", "); -} -function isLiteralNode(node) { - return node.type.endsWith("Literal"); -} -function isCallOf(node, test) { - return !!(node && test && node.type === "CallExpression" && node.callee.type === "Identifier" && (typeof test === "string" ? node.callee.name === test : test(node.callee.name))); -} -function toRuntimeTypeString(types) { - return types.length > 1 ? `[${types.join(", ")}]` : types[0]; -} -function getImportedName(specifier) { - if (specifier.type === "ImportSpecifier") - return specifier.imported.type === "Identifier" ? specifier.imported.name : specifier.imported.value; - else if (specifier.type === "ImportNamespaceSpecifier") return "*"; - return "default"; -} -function getId(node) { - return node.type === "Identifier" ? node.name : node.type === "StringLiteral" ? node.value : null; -} -const normalize = (path.posix || path).normalize; -const windowsSlashRE = /\\/g; -function normalizePath(p) { - return normalize(p.replace(windowsSlashRE, "/")); -} -const joinPaths = (path.posix || path).join; -const propNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~\-]/; -function getEscapedPropName(key) { - return propNameEscapeSymbolsRE.test(key) ? JSON.stringify(key) : key; -} - -function analyzeScriptBindings(ast) { - for (const node of ast) { - if (node.type === "ExportDefaultDeclaration" && node.declaration.type === "ObjectExpression") { - return analyzeBindingsFromOptions(node.declaration); - } - } - return {}; -} -function analyzeBindingsFromOptions(node) { - const bindings = {}; - Object.defineProperty(bindings, "__isScriptSetup", { - enumerable: false, - value: false - }); - for (const property of node.properties) { - if (property.type === "ObjectProperty" && !property.computed && property.key.type === "Identifier") { - if (property.key.name === "props") { - for (const key of getObjectOrArrayExpressionKeys(property.value)) { - bindings[key] = "props"; - } - } else if (property.key.name === "inject") { - for (const key of getObjectOrArrayExpressionKeys(property.value)) { - bindings[key] = "options"; - } - } else if (property.value.type === "ObjectExpression" && (property.key.name === "computed" || property.key.name === "methods")) { - for (const key of getObjectExpressionKeys(property.value)) { - bindings[key] = "options"; - } - } - } else if (property.type === "ObjectMethod" && property.key.type === "Identifier" && (property.key.name === "setup" || property.key.name === "data")) { - for (const bodyItem of property.body.body) { - if (bodyItem.type === "ReturnStatement" && bodyItem.argument && bodyItem.argument.type === "ObjectExpression") { - for (const key of getObjectExpressionKeys(bodyItem.argument)) { - bindings[key] = property.key.name === "setup" ? "setup-maybe-ref" : "data"; - } - } - } - } - } - return bindings; -} -function getObjectExpressionKeys(node) { - const keys = []; - for (const prop of node.properties) { - if (prop.type === "SpreadElement") continue; - const key = resolveObjectKey(prop.key, prop.computed); - if (key) keys.push(String(key)); - } - return keys; -} -function getArrayExpressionKeys(node) { - const keys = []; - for (const element of node.elements) { - if (element && element.type === "StringLiteral") { - keys.push(element.value); - } - } - return keys; -} -function getObjectOrArrayExpressionKeys(value) { - if (value.type === "ArrayExpression") { - return getArrayExpressionKeys(value); - } - if (value.type === "ObjectExpression") { - return getObjectExpressionKeys(value); - } - return []; -} - -const comma = ','.charCodeAt(0); -const semicolon = ';'.charCodeAt(0); -const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -const intToChar = new Uint8Array(64); // 64 possible chars. -const charToInt = new Uint8Array(128); // z is 122 in ASCII -for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; -} -function encodeInteger(builder, num, relative) { - let delta = num - relative; - delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; - do { - let clamped = delta & 0b011111; - delta >>>= 5; - if (delta > 0) - clamped |= 0b100000; - builder.write(intToChar[clamped]); - } while (delta > 0); - return num; -} - -const bufLength = 1024 * 16; -// Provide a fallback for older environments. -const td = typeof TextDecoder !== 'undefined' - ? /* #__PURE__ */ new TextDecoder() - : typeof Buffer !== 'undefined' - ? { - decode(buf) { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - }, - } - : { - decode(buf) { - let out = ''; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - }, - }; -class StringWriter { - constructor() { - this.pos = 0; - this.out = ''; - this.buffer = new Uint8Array(bufLength); - } - write(v) { - const { buffer } = this; - buffer[this.pos++] = v; - if (this.pos === bufLength) { - this.out += td.decode(buffer); - this.pos = 0; - } - } - flush() { - const { buffer, out, pos } = this; - return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; - } -} -function encode(decoded) { - const writer = new StringWriter(); - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) - writer.write(semicolon); - if (line.length === 0) - continue; - let genColumn = 0; - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - if (j > 0) - writer.write(comma); - genColumn = encodeInteger(writer, segment[0], genColumn); - if (segment.length === 1) - continue; - sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); - sourceLine = encodeInteger(writer, segment[2], sourceLine); - sourceColumn = encodeInteger(writer, segment[3], sourceColumn); - if (segment.length === 4) - continue; - namesIndex = encodeInteger(writer, segment[4], namesIndex); - } - } - return writer.flush(); -} - -class BitSet { - constructor(arg) { - this.bits = arg instanceof BitSet ? arg.bits.slice() : []; - } - - add(n) { - this.bits[n >> 5] |= 1 << (n & 31); - } - - has(n) { - return !!(this.bits[n >> 5] & (1 << (n & 31))); - } -} - -class Chunk { - constructor(start, end, content) { - this.start = start; - this.end = end; - this.original = content; - - this.intro = ''; - this.outro = ''; - - this.content = content; - this.storeName = false; - this.edited = false; - - { - this.previous = null; - this.next = null; - } - } - - appendLeft(content) { - this.outro += content; - } - - appendRight(content) { - this.intro = this.intro + content; - } - - clone() { - const chunk = new Chunk(this.start, this.end, this.original); - - chunk.intro = this.intro; - chunk.outro = this.outro; - chunk.content = this.content; - chunk.storeName = this.storeName; - chunk.edited = this.edited; - - return chunk; - } - - contains(index) { - return this.start < index && index < this.end; - } - - eachNext(fn) { - let chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.next; - } - } - - eachPrevious(fn) { - let chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.previous; - } - } - - edit(content, storeName, contentOnly) { - this.content = content; - if (!contentOnly) { - this.intro = ''; - this.outro = ''; - } - this.storeName = storeName; - - this.edited = true; - - return this; - } - - prependLeft(content) { - this.outro = content + this.outro; - } - - prependRight(content) { - this.intro = content + this.intro; - } - - reset() { - this.intro = ''; - this.outro = ''; - if (this.edited) { - this.content = this.original; - this.storeName = false; - this.edited = false; - } - } - - split(index) { - const sliceIndex = index - this.start; - - const originalBefore = this.original.slice(0, sliceIndex); - const originalAfter = this.original.slice(sliceIndex); - - this.original = originalBefore; - - const newChunk = new Chunk(index, this.end, originalAfter); - newChunk.outro = this.outro; - this.outro = ''; - - this.end = index; - - if (this.edited) { - // after split we should save the edit content record into the correct chunk - // to make sure sourcemap correct - // For example: - // ' test'.trim() - // split -> ' ' + 'test' - // ✔️ edit -> '' + 'test' - // ✖️ edit -> 'test' + '' - // TODO is this block necessary?... - newChunk.edit('', false); - this.content = ''; - } else { - this.content = originalBefore; - } - - newChunk.next = this.next; - if (newChunk.next) newChunk.next.previous = newChunk; - newChunk.previous = this; - this.next = newChunk; - - return newChunk; - } - - toString() { - return this.intro + this.content + this.outro; - } - - trimEnd(rx) { - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) return true; - - const trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - this.split(this.start + trimmed.length).edit('', undefined, true); - if (this.edited) { - // save the change, if it has been edited - this.edit(trimmed, this.storeName, true); - } - } - return true; - } else { - this.edit('', undefined, true); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) return true; - } - } - - trimStart(rx) { - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) return true; - - const trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - const newChunk = this.split(this.end - trimmed.length); - if (this.edited) { - // save the change, if it has been edited - newChunk.edit(trimmed, this.storeName, true); - } - this.edit('', undefined, true); - } - return true; - } else { - this.edit('', undefined, true); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) return true; - } - } -} - -function getBtoa() { - if (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') { - return (str) => globalThis.btoa(unescape(encodeURIComponent(str))); - } else if (typeof Buffer === 'function') { - return (str) => Buffer.from(str, 'utf-8').toString('base64'); - } else { - return () => { - throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); - }; - } -} - -const btoa = /*#__PURE__*/ getBtoa(); - -class SourceMap { - constructor(properties) { - this.version = 3; - this.file = properties.file; - this.sources = properties.sources; - this.sourcesContent = properties.sourcesContent; - this.names = properties.names; - this.mappings = encode(properties.mappings); - if (typeof properties.x_google_ignoreList !== 'undefined') { - this.x_google_ignoreList = properties.x_google_ignoreList; - } - } - - toString() { - return JSON.stringify(this); - } - - toUrl() { - return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); - } -} - -function guessIndent(code) { - const lines = code.split('\n'); - - const tabbed = lines.filter((line) => /^\t+/.test(line)); - const spaced = lines.filter((line) => /^ {2,}/.test(line)); - - if (tabbed.length === 0 && spaced.length === 0) { - return null; - } - - // More lines tabbed than spaced? Assume tabs, and - // default to tabs in the case of a tie (or nothing - // to go on) - if (tabbed.length >= spaced.length) { - return '\t'; - } - - // Otherwise, we need to guess the multiple - const min = spaced.reduce((previous, current) => { - const numSpaces = /^ +/.exec(current)[0].length; - return Math.min(numSpaces, previous); - }, Infinity); - - return new Array(min + 1).join(' '); -} - -function getRelativePath(from, to) { - const fromParts = from.split(/[/\\]/); - const toParts = to.split(/[/\\]/); - - fromParts.pop(); // get dirname - - while (fromParts[0] === toParts[0]) { - fromParts.shift(); - toParts.shift(); - } - - if (fromParts.length) { - let i = fromParts.length; - while (i--) fromParts[i] = '..'; - } - - return fromParts.concat(toParts).join('/'); -} - -const toString = Object.prototype.toString; - -function isObject(thing) { - return toString.call(thing) === '[object Object]'; -} - -function getLocator(source) { - const originalLines = source.split('\n'); - const lineOffsets = []; - - for (let i = 0, pos = 0; i < originalLines.length; i++) { - lineOffsets.push(pos); - pos += originalLines[i].length + 1; - } - - return function locate(index) { - let i = 0; - let j = lineOffsets.length; - while (i < j) { - const m = (i + j) >> 1; - if (index < lineOffsets[m]) { - j = m; - } else { - i = m + 1; - } - } - const line = i - 1; - const column = index - lineOffsets[line]; - return { line, column }; - }; -} - -const wordRegex = /\w/; - -class Mappings { - constructor(hires) { - this.hires = hires; - this.generatedCodeLine = 0; - this.generatedCodeColumn = 0; - this.raw = []; - this.rawSegments = this.raw[this.generatedCodeLine] = []; - this.pending = null; - } - - addEdit(sourceIndex, content, loc, nameIndex) { - if (content.length) { - const contentLengthMinusOne = content.length - 1; - let contentLineEnd = content.indexOf('\n', 0); - let previousContentLineEnd = -1; - // Loop through each line in the content and add a segment, but stop if the last line is empty, - // else code afterwards would fill one line too many - while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) { - const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - if (nameIndex >= 0) { - segment.push(nameIndex); - } - this.rawSegments.push(segment); - - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - - previousContentLineEnd = contentLineEnd; - contentLineEnd = content.indexOf('\n', contentLineEnd + 1); - } - - const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - if (nameIndex >= 0) { - segment.push(nameIndex); - } - this.rawSegments.push(segment); - - this.advance(content.slice(previousContentLineEnd + 1)); - } else if (this.pending) { - this.rawSegments.push(this.pending); - this.advance(content); - } - - this.pending = null; - } - - addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { - let originalCharIndex = chunk.start; - let first = true; - // when iterating each char, check if it's in a word boundary - let charInHiresBoundary = false; - - while (originalCharIndex < chunk.end) { - if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { - const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - - if (this.hires === 'boundary') { - // in hires "boundary", group segments per word boundary than per char - if (wordRegex.test(original[originalCharIndex])) { - // for first char in the boundary found, start the boundary by pushing a segment - if (!charInHiresBoundary) { - this.rawSegments.push(segment); - charInHiresBoundary = true; - } - } else { - // for non-word char, end the boundary by pushing a segment - this.rawSegments.push(segment); - charInHiresBoundary = false; - } - } else { - this.rawSegments.push(segment); - } - } - - if (original[originalCharIndex] === '\n') { - loc.line += 1; - loc.column = 0; - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - first = true; - } else { - loc.column += 1; - this.generatedCodeColumn += 1; - first = false; - } - - originalCharIndex += 1; - } - - this.pending = null; - } - - advance(str) { - if (!str) return; - - const lines = str.split('\n'); - - if (lines.length > 1) { - for (let i = 0; i < lines.length - 1; i++) { - this.generatedCodeLine++; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - } - this.generatedCodeColumn = 0; - } - - this.generatedCodeColumn += lines[lines.length - 1].length; - } -} - -const n = '\n'; - -const warned = { - insertLeft: false, - insertRight: false, - storeName: false, -}; - -class MagicString { - constructor(string, options = {}) { - const chunk = new Chunk(0, string.length, string); - - Object.defineProperties(this, { - original: { writable: true, value: string }, - outro: { writable: true, value: '' }, - intro: { writable: true, value: '' }, - firstChunk: { writable: true, value: chunk }, - lastChunk: { writable: true, value: chunk }, - lastSearchedChunk: { writable: true, value: chunk }, - byStart: { writable: true, value: {} }, - byEnd: { writable: true, value: {} }, - filename: { writable: true, value: options.filename }, - indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, - sourcemapLocations: { writable: true, value: new BitSet() }, - storedNames: { writable: true, value: {} }, - indentStr: { writable: true, value: undefined }, - ignoreList: { writable: true, value: options.ignoreList }, - }); - - this.byStart[0] = chunk; - this.byEnd[string.length] = chunk; - } - - addSourcemapLocation(char) { - this.sourcemapLocations.add(char); - } - - append(content) { - if (typeof content !== 'string') throw new TypeError('outro content must be a string'); - - this.outro += content; - return this; - } - - appendLeft(index, content) { - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byEnd[index]; - - if (chunk) { - chunk.appendLeft(content); - } else { - this.intro += content; - } - return this; - } - - appendRight(index, content) { - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byStart[index]; - - if (chunk) { - chunk.appendRight(content); - } else { - this.outro += content; - } - return this; - } - - clone() { - const cloned = new MagicString(this.original, { filename: this.filename }); - - let originalChunk = this.firstChunk; - let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); - - while (originalChunk) { - cloned.byStart[clonedChunk.start] = clonedChunk; - cloned.byEnd[clonedChunk.end] = clonedChunk; - - const nextOriginalChunk = originalChunk.next; - const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); - - if (nextClonedChunk) { - clonedChunk.next = nextClonedChunk; - nextClonedChunk.previous = clonedChunk; - - clonedChunk = nextClonedChunk; - } - - originalChunk = nextOriginalChunk; - } - - cloned.lastChunk = clonedChunk; - - if (this.indentExclusionRanges) { - cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); - } - - cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); - - cloned.intro = this.intro; - cloned.outro = this.outro; - - return cloned; - } - - generateDecodedMap(options) { - options = options || {}; - - const sourceIndex = 0; - const names = Object.keys(this.storedNames); - const mappings = new Mappings(options.hires); - - const locate = getLocator(this.original); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.firstChunk.eachNext((chunk) => { - const loc = locate(chunk.start); - - if (chunk.intro.length) mappings.advance(chunk.intro); - - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1, - ); - } else { - mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); - } - - if (chunk.outro.length) mappings.advance(chunk.outro); - }); - - return { - file: options.file ? options.file.split(/[/\\]/).pop() : undefined, - sources: [ - options.source ? getRelativePath(options.file || '', options.source) : options.file || '', - ], - sourcesContent: options.includeContent ? [this.original] : undefined, - names, - mappings: mappings.raw, - x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, - }; - } - - generateMap(options) { - return new SourceMap(this.generateDecodedMap(options)); - } - - _ensureindentStr() { - if (this.indentStr === undefined) { - this.indentStr = guessIndent(this.original); - } - } - - _getRawIndentString() { - this._ensureindentStr(); - return this.indentStr; - } - - getIndentString() { - this._ensureindentStr(); - return this.indentStr === null ? '\t' : this.indentStr; - } - - indent(indentStr, options) { - const pattern = /^[^\r\n]/gm; - - if (isObject(indentStr)) { - options = indentStr; - indentStr = undefined; - } - - if (indentStr === undefined) { - this._ensureindentStr(); - indentStr = this.indentStr || '\t'; - } - - if (indentStr === '') return this; // noop - - options = options || {}; - - // Process exclusion ranges - const isExcluded = {}; - - if (options.exclude) { - const exclusions = - typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; - exclusions.forEach((exclusion) => { - for (let i = exclusion[0]; i < exclusion[1]; i += 1) { - isExcluded[i] = true; - } - }); - } - - let shouldIndentNextCharacter = options.indentStart !== false; - const replacer = (match) => { - if (shouldIndentNextCharacter) return `${indentStr}${match}`; - shouldIndentNextCharacter = true; - return match; - }; - - this.intro = this.intro.replace(pattern, replacer); - - let charIndex = 0; - let chunk = this.firstChunk; - - while (chunk) { - const end = chunk.end; - - if (chunk.edited) { - if (!isExcluded[charIndex]) { - chunk.content = chunk.content.replace(pattern, replacer); - - if (chunk.content.length) { - shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; - } - } - } else { - charIndex = chunk.start; - - while (charIndex < end) { - if (!isExcluded[charIndex]) { - const char = this.original[charIndex]; - - if (char === '\n') { - shouldIndentNextCharacter = true; - } else if (char !== '\r' && shouldIndentNextCharacter) { - shouldIndentNextCharacter = false; - - if (charIndex === chunk.start) { - chunk.prependRight(indentStr); - } else { - this._splitChunk(chunk, charIndex); - chunk = chunk.next; - chunk.prependRight(indentStr); - } - } - } - - charIndex += 1; - } - } - - charIndex = chunk.end; - chunk = chunk.next; - } - - this.outro = this.outro.replace(pattern, replacer); - - return this; - } - - insert() { - throw new Error( - 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', - ); - } - - insertLeft(index, content) { - if (!warned.insertLeft) { - console.warn( - 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', - ); // eslint-disable-line no-console - warned.insertLeft = true; - } - - return this.appendLeft(index, content); - } - - insertRight(index, content) { - if (!warned.insertRight) { - console.warn( - 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', - ); // eslint-disable-line no-console - warned.insertRight = true; - } - - return this.prependRight(index, content); - } - - move(start, end, index) { - if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); - - this._split(start); - this._split(end); - this._split(index); - - const first = this.byStart[start]; - const last = this.byEnd[end]; - - const oldLeft = first.previous; - const oldRight = last.next; - - const newRight = this.byStart[index]; - if (!newRight && last === this.lastChunk) return this; - const newLeft = newRight ? newRight.previous : this.lastChunk; - - if (oldLeft) oldLeft.next = oldRight; - if (oldRight) oldRight.previous = oldLeft; - - if (newLeft) newLeft.next = first; - if (newRight) newRight.previous = last; - - if (!first.previous) this.firstChunk = last.next; - if (!last.next) { - this.lastChunk = first.previous; - this.lastChunk.next = null; - } - - first.previous = newLeft; - last.next = newRight || null; - - if (!newLeft) this.firstChunk = first; - if (!newRight) this.lastChunk = last; - return this; - } - - overwrite(start, end, content, options) { - options = options || {}; - return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); - } - - update(start, end, content, options) { - if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); - - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - if (end > this.original.length) throw new Error('end is out of bounds'); - if (start === end) - throw new Error( - 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', - ); - - this._split(start); - this._split(end); - - if (options === true) { - if (!warned.storeName) { - console.warn( - 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', - ); // eslint-disable-line no-console - warned.storeName = true; - } - - options = { storeName: true }; - } - const storeName = options !== undefined ? options.storeName : false; - const overwrite = options !== undefined ? options.overwrite : false; - - if (storeName) { - const original = this.original.slice(start, end); - Object.defineProperty(this.storedNames, original, { - writable: true, - value: true, - enumerable: true, - }); - } - - const first = this.byStart[start]; - const last = this.byEnd[end]; - - if (first) { - let chunk = first; - while (chunk !== last) { - if (chunk.next !== this.byStart[chunk.end]) { - throw new Error('Cannot overwrite across a split point'); - } - chunk = chunk.next; - chunk.edit('', false); - } - - first.edit(content, storeName, !overwrite); - } else { - // must be inserting at the end - const newChunk = new Chunk(start, end, '').edit(content, storeName); - - // TODO last chunk in the array may not be the last chunk, if it's moved... - last.next = newChunk; - newChunk.previous = last; - } - return this; - } - - prepend(content) { - if (typeof content !== 'string') throw new TypeError('outro content must be a string'); - - this.intro = content + this.intro; - return this; - } - - prependLeft(index, content) { - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byEnd[index]; - - if (chunk) { - chunk.prependLeft(content); - } else { - this.intro = content + this.intro; - } - return this; - } - - prependRight(index, content) { - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byStart[index]; - - if (chunk) { - chunk.prependRight(content); - } else { - this.outro = content + this.outro; - } - return this; - } - - remove(start, end) { - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - if (start === end) return this; - - if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); - if (start > end) throw new Error('end must be greater than start'); - - this._split(start); - this._split(end); - - let chunk = this.byStart[start]; - - while (chunk) { - chunk.intro = ''; - chunk.outro = ''; - chunk.edit(''); - - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; - } - - reset(start, end) { - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - if (start === end) return this; - - if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); - if (start > end) throw new Error('end must be greater than start'); - - this._split(start); - this._split(end); - - let chunk = this.byStart[start]; - - while (chunk) { - chunk.reset(); - - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; - } - - lastChar() { - if (this.outro.length) return this.outro[this.outro.length - 1]; - let chunk = this.lastChunk; - do { - if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; - if (chunk.content.length) return chunk.content[chunk.content.length - 1]; - if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; - } while ((chunk = chunk.previous)); - if (this.intro.length) return this.intro[this.intro.length - 1]; - return ''; - } - - lastLine() { - let lineIndex = this.outro.lastIndexOf(n); - if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); - let lineStr = this.outro; - let chunk = this.lastChunk; - do { - if (chunk.outro.length > 0) { - lineIndex = chunk.outro.lastIndexOf(n); - if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; - lineStr = chunk.outro + lineStr; - } - - if (chunk.content.length > 0) { - lineIndex = chunk.content.lastIndexOf(n); - if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; - lineStr = chunk.content + lineStr; - } - - if (chunk.intro.length > 0) { - lineIndex = chunk.intro.lastIndexOf(n); - if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; - lineStr = chunk.intro + lineStr; - } - } while ((chunk = chunk.previous)); - lineIndex = this.intro.lastIndexOf(n); - if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; - return this.intro + lineStr; - } - - slice(start = 0, end = this.original.length) { - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - let result = ''; - - // find start chunk - let chunk = this.firstChunk; - while (chunk && (chunk.start > start || chunk.end <= start)) { - // found end chunk before start - if (chunk.start < end && chunk.end >= end) { - return result; - } - - chunk = chunk.next; - } - - if (chunk && chunk.edited && chunk.start !== start) - throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); - - const startChunk = chunk; - while (chunk) { - if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { - result += chunk.intro; - } - - const containsEnd = chunk.start < end && chunk.end >= end; - if (containsEnd && chunk.edited && chunk.end !== end) - throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); - - const sliceStart = startChunk === chunk ? start - chunk.start : 0; - const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; - - result += chunk.content.slice(sliceStart, sliceEnd); - - if (chunk.outro && (!containsEnd || chunk.end === end)) { - result += chunk.outro; - } - - if (containsEnd) { - break; - } - - chunk = chunk.next; - } - - return result; - } - - // TODO deprecate this? not really very useful - snip(start, end) { - const clone = this.clone(); - clone.remove(0, start); - clone.remove(end, clone.original.length); - - return clone; - } - - _split(index) { - if (this.byStart[index] || this.byEnd[index]) return; - - let chunk = this.lastSearchedChunk; - const searchForward = index > chunk.end; - - while (chunk) { - if (chunk.contains(index)) return this._splitChunk(chunk, index); - - chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; - } - } - - _splitChunk(chunk, index) { - if (chunk.edited && chunk.content.length) { - // zero-length edited chunks are a special case (overlapping replacements) - const loc = getLocator(this.original)(index); - throw new Error( - `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, - ); - } - - const newChunk = chunk.split(index); - - this.byEnd[index] = chunk; - this.byStart[index] = newChunk; - this.byEnd[newChunk.end] = newChunk; - - if (chunk === this.lastChunk) this.lastChunk = newChunk; - - this.lastSearchedChunk = chunk; - return true; - } - - toString() { - let str = this.intro; - - let chunk = this.firstChunk; - while (chunk) { - str += chunk.toString(); - chunk = chunk.next; - } - - return str + this.outro; - } - - isEmpty() { - let chunk = this.firstChunk; - do { - if ( - (chunk.intro.length && chunk.intro.trim()) || - (chunk.content.length && chunk.content.trim()) || - (chunk.outro.length && chunk.outro.trim()) - ) - return false; - } while ((chunk = chunk.next)); - return true; - } - - length() { - let chunk = this.firstChunk; - let length = 0; - do { - length += chunk.intro.length + chunk.content.length + chunk.outro.length; - } while ((chunk = chunk.next)); - return length; - } - - trimLines() { - return this.trim('[\\r\\n]'); - } - - trim(charType) { - return this.trimStart(charType).trimEnd(charType); - } - - trimEndAborted(charType) { - const rx = new RegExp((charType || '\\s') + '+$'); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) return true; - - let chunk = this.lastChunk; - - do { - const end = chunk.end; - const aborted = chunk.trimEnd(rx); - - // if chunk was trimmed, we have a new lastChunk - if (chunk.end !== end) { - if (this.lastChunk === chunk) { - this.lastChunk = chunk.next; - } - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) return true; - chunk = chunk.previous; - } while (chunk); - - return false; - } - - trimEnd(charType) { - this.trimEndAborted(charType); - return this; - } - trimStartAborted(charType) { - const rx = new RegExp('^' + (charType || '\\s') + '+'); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) return true; - - let chunk = this.firstChunk; - - do { - const end = chunk.end; - const aborted = chunk.trimStart(rx); - - if (chunk.end !== end) { - // special case... - if (chunk === this.lastChunk) this.lastChunk = chunk.next; - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) return true; - chunk = chunk.next; - } while (chunk); - - return false; - } - - trimStart(charType) { - this.trimStartAborted(charType); - return this; - } - - hasChanged() { - return this.original !== this.toString(); - } - - _replaceRegexp(searchValue, replacement) { - function getReplacement(match, str) { - if (typeof replacement === 'string') { - return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter - if (i === '$') return '$'; - if (i === '&') return match[0]; - const num = +i; - if (num < match.length) return match[+i]; - return `$${i}`; - }); - } else { - return replacement(...match, match.index, str, match.groups); - } - } - function matchAll(re, str) { - let match; - const matches = []; - while ((match = re.exec(str))) { - matches.push(match); - } - return matches; - } - if (searchValue.global) { - const matches = matchAll(searchValue, this.original); - matches.forEach((match) => { - if (match.index != null) { - const replacement = getReplacement(match, this.original); - if (replacement !== match[0]) { - this.overwrite( - match.index, - match.index + match[0].length, - replacement - ); - } - } - }); - } else { - const match = this.original.match(searchValue); - if (match && match.index != null) { - const replacement = getReplacement(match, this.original); - if (replacement !== match[0]) { - this.overwrite( - match.index, - match.index + match[0].length, - replacement - ); - } - } - } - return this; - } - - _replaceString(string, replacement) { - const { original } = this; - const index = original.indexOf(string); - - if (index !== -1) { - this.overwrite(index, index + string.length, replacement); - } - - return this; - } - - replace(searchValue, replacement) { - if (typeof searchValue === 'string') { - return this._replaceString(searchValue, replacement); - } - - return this._replaceRegexp(searchValue, replacement); - } - - _replaceAllString(string, replacement) { - const { original } = this; - const stringLength = string.length; - for ( - let index = original.indexOf(string); - index !== -1; - index = original.indexOf(string, index + stringLength) - ) { - const previous = original.slice(index, index + stringLength); - if (previous !== replacement) - this.overwrite(index, index + stringLength, replacement); - } - - return this; - } - - replaceAll(searchValue, replacement) { - if (typeof searchValue === 'string') { - return this._replaceAllString(searchValue, replacement); - } - - if (!searchValue.global) { - throw new TypeError( - 'MagicString.prototype.replaceAll called with a non-global RegExp argument', - ); - } - - return this._replaceRegexp(searchValue, replacement); - } -} - -var _a, _b; -class ScriptCompileContext { - constructor(descriptor, options) { - this.descriptor = descriptor; - this.options = options; - this.isCE = false; - this.source = this.descriptor.source; - this.filename = this.descriptor.filename; - this.s = new MagicString(this.source); - this.startOffset = (_a = this.descriptor.scriptSetup) == null ? void 0 : _a.loc.start.offset; - this.endOffset = (_b = this.descriptor.scriptSetup) == null ? void 0 : _b.loc.end.offset; - this.userImports = /* @__PURE__ */ Object.create(null); - // macros presence check - this.hasDefinePropsCall = false; - this.hasDefineEmitCall = false; - this.hasDefineExposeCall = false; - this.hasDefaultExportName = false; - this.hasDefaultExportRender = false; - this.hasDefineOptionsCall = false; - this.hasDefineSlotsCall = false; - this.hasDefineModelCall = false; - this.propsDestructuredBindings = /* @__PURE__ */ Object.create(null); - // defineModel - this.modelDecls = /* @__PURE__ */ Object.create(null); - // codegen - this.bindingMetadata = {}; - this.helperImports = /* @__PURE__ */ new Set(); - const { script, scriptSetup } = descriptor; - const scriptLang = script && script.lang; - const scriptSetupLang = scriptSetup && scriptSetup.lang; - this.isJS = scriptLang === "js" || scriptLang === "jsx" || scriptSetupLang === "js" || scriptSetupLang === "jsx"; - this.isTS = scriptLang === "ts" || scriptLang === "tsx" || scriptSetupLang === "ts" || scriptSetupLang === "tsx"; - const customElement = options.customElement; - const filename = this.descriptor.filename; - if (customElement) { - this.isCE = typeof customElement === "boolean" ? customElement : customElement(filename); - } - const plugins = resolveParserPlugins( - scriptLang || scriptSetupLang, - options.babelParserPlugins - ); - function parse(input, offset) { - try { - return libExports.parse(input, { - plugins, - sourceType: "module" - }).program; - } catch (e) { - e.message = `[vue/compiler-sfc] ${e.message} - -${descriptor.filename} -${generateCodeFrame( - descriptor.source, - e.pos + offset, - e.pos + offset + 1 - )}`; - throw e; - } - } - this.scriptAst = descriptor.script && parse(descriptor.script.content, descriptor.script.loc.start.offset); - this.scriptSetupAst = descriptor.scriptSetup && parse(descriptor.scriptSetup.content, this.startOffset); - } - helper(key) { - this.helperImports.add(key); - return `_${key}`; - } - getString(node, scriptSetup = true) { - const block = scriptSetup ? this.descriptor.scriptSetup : this.descriptor.script; - return block.content.slice(node.start, node.end); - } - warn(msg, node, scope) { - warn(generateError(msg, node, this, scope)); - } - error(msg, node, scope) { - throw new Error( - `[@vue/compiler-sfc] ${generateError(msg, node, this, scope)}` - ); - } -} -function generateError(msg, node, ctx, scope) { - const offset = scope ? scope.offset : ctx.startOffset; - return `${msg} - -${(scope || ctx.descriptor).filename} -${generateCodeFrame( - (scope || ctx.descriptor).source, - node.start + offset, - node.end + offset - )}`; -} -function resolveParserPlugins(lang, userPlugins, dts = false) { - const plugins = []; - if (!userPlugins || !userPlugins.some( - (p) => p === "importAssertions" || p === "importAttributes" || isArray$3(p) && p[0] === "importAttributes" - )) { - plugins.push("importAttributes"); - } - if (lang === "jsx" || lang === "tsx" || lang === "mtsx") { - plugins.push("jsx"); - } else if (userPlugins) { - userPlugins = userPlugins.filter((p) => p !== "jsx"); - } - if (lang === "ts" || lang === "mts" || lang === "tsx" || lang === "mtsx") { - plugins.push(["typescript", { dts }], "explicitResourceManagement"); - if (!userPlugins || !userPlugins.includes("decorators")) { - plugins.push("decorators-legacy"); - } - } - if (userPlugins) { - plugins.push(...userPlugins); - } - return plugins; -} - -function rewriteDefault(input, as, parserPlugins) { - const ast = libExports.parse(input, { - sourceType: "module", - plugins: resolveParserPlugins("js", parserPlugins) - }).program.body; - const s = new MagicString(input); - rewriteDefaultAST(ast, s, as); - return s.toString(); -} -function rewriteDefaultAST(ast, s, as) { - if (!hasDefaultExport(ast)) { - s.append(` -const ${as} = {}`); - return; - } - ast.forEach((node) => { - if (node.type === "ExportDefaultDeclaration") { - if (node.declaration.type === "ClassDeclaration" && node.declaration.id) { - let start = node.declaration.decorators && node.declaration.decorators.length > 0 ? node.declaration.decorators[node.declaration.decorators.length - 1].end : node.start; - s.overwrite(start, node.declaration.id.start, ` class `); - s.append(` -const ${as} = ${node.declaration.id.name}`); - } else { - s.overwrite(node.start, node.declaration.start, `const ${as} = `); - } - } else if (node.type === "ExportNamedDeclaration") { - for (const specifier of node.specifiers) { - if (specifier.type === "ExportSpecifier" && specifier.exported.type === "Identifier" && specifier.exported.name === "default") { - if (node.source) { - if (specifier.local.name === "default") { - s.prepend( - `import { default as __VUE_DEFAULT__ } from '${node.source.value}' -` - ); - const end2 = specifierEnd(s, specifier.local.end, node.end); - s.remove(specifier.start, end2); - s.append(` -const ${as} = __VUE_DEFAULT__`); - continue; - } else { - s.prepend( - `import { ${s.slice( - specifier.local.start, - specifier.local.end - )} as __VUE_DEFAULT__ } from '${node.source.value}' -` - ); - const end2 = specifierEnd(s, specifier.exported.end, node.end); - s.remove(specifier.start, end2); - s.append(` -const ${as} = __VUE_DEFAULT__`); - continue; - } - } - const end = specifierEnd(s, specifier.end, node.end); - s.remove(specifier.start, end); - s.append(` -const ${as} = ${specifier.local.name}`); - } - } - } - }); -} -function hasDefaultExport(ast) { - for (const stmt of ast) { - if (stmt.type === "ExportDefaultDeclaration") { - return true; - } else if (stmt.type === "ExportNamedDeclaration" && stmt.specifiers.some( - (spec) => spec.exported.name === "default" - )) { - return true; - } - } - return false; -} -function specifierEnd(s, end, nodeEnd) { - let hasCommas = false; - let oldEnd = end; - while (end < nodeEnd) { - if (/\s/.test(s.slice(end, end + 1))) { - end++; - } else if (s.slice(end, end + 1) === ",") { - end++; - hasCommas = true; - break; - } else if (s.slice(end, end + 1) === "}") { - break; - } - } - return hasCommas ? end : oldEnd; -} - -var __defProp$3 = Object.defineProperty; -var __defProps$2 = Object.defineProperties; -var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols; -var __hasOwnProp$3 = Object.prototype.hasOwnProperty; -var __propIsEnum$3 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues$3 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$3.call(b, prop)) - __defNormalProp$3(a, prop, b[prop]); - if (__getOwnPropSymbols$3) - for (var prop of __getOwnPropSymbols$3(b)) { - if (__propIsEnum$3.call(b, prop)) - __defNormalProp$3(a, prop, b[prop]); - } - return a; -}; -var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b)); -const normalScriptDefaultVar = `__default__`; -function processNormalScript(ctx, scopeId) { - var _a; - const script = ctx.descriptor.script; - if (script.lang && !ctx.isJS && !ctx.isTS) { - return script; - } - try { - let content = script.content; - let map = script.map; - const scriptAst = ctx.scriptAst; - const bindings = analyzeScriptBindings(scriptAst.body); - const { cssVars } = ctx.descriptor; - const { genDefaultAs, isProd } = ctx.options; - if (cssVars.length || genDefaultAs) { - const defaultVar = genDefaultAs || normalScriptDefaultVar; - const s = new MagicString(content); - rewriteDefaultAST(scriptAst.body, s, defaultVar); - content = s.toString(); - if (cssVars.length && !((_a = ctx.options.templateOptions) == null ? void 0 : _a.ssr)) { - content += genNormalScriptCssVarsCode( - cssVars, - bindings, - scopeId, - !!isProd, - defaultVar - ); - } - if (!genDefaultAs) { - content += ` -export default ${defaultVar}`; - } - } - return __spreadProps$2(__spreadValues$3({}, script), { - content, - map, - bindings, - scriptAst: scriptAst.body - }); - } catch (e) { - return script; - } -} - -var __defProp$2 = Object.defineProperty; -var __defProps$1 = Object.defineProperties; -var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols; -var __hasOwnProp$2 = Object.prototype.hasOwnProperty; -var __propIsEnum$2 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues$2 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$2.call(b, prop)) - __defNormalProp$2(a, prop, b[prop]); - if (__getOwnPropSymbols$2) - for (var prop of __getOwnPropSymbols$2(b)) { - if (__propIsEnum$2.call(b, prop)) - __defNormalProp$2(a, prop, b[prop]); - } - return a; -}; -var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b)); -class TypeScope { - constructor(filename, source, offset = 0, imports = /* @__PURE__ */ Object.create(null), types = /* @__PURE__ */ Object.create(null), declares = /* @__PURE__ */ Object.create(null)) { - this.filename = filename; - this.source = source; - this.offset = offset; - this.imports = imports; - this.types = types; - this.declares = declares; - this.isGenericScope = false; - this.resolvedImportSources = /* @__PURE__ */ Object.create(null); - this.exportedTypes = /* @__PURE__ */ Object.create(null); - this.exportedDeclares = /* @__PURE__ */ Object.create(null); - } -} -function resolveTypeElements(ctx, node, scope, typeParameters) { - const canCache = !typeParameters; - if (canCache && node._resolvedElements) { - return node._resolvedElements; - } - const resolved = innerResolveTypeElements( - ctx, - node, - node._ownerScope || scope || ctxToScope(ctx), - typeParameters - ); - return canCache ? node._resolvedElements = resolved : resolved; -} -function innerResolveTypeElements(ctx, node, scope, typeParameters) { - var _a, _b; - if (node.leadingComments && node.leadingComments.some((c) => c.value.includes("@vue-ignore"))) { - return { props: {} }; - } - switch (node.type) { - case "TSTypeLiteral": - return typeElementsToMap(ctx, node.members, scope, typeParameters); - case "TSInterfaceDeclaration": - return resolveInterfaceMembers(ctx, node, scope, typeParameters); - case "TSTypeAliasDeclaration": - case "TSTypeAnnotation": - case "TSParenthesizedType": - return resolveTypeElements( - ctx, - node.typeAnnotation, - scope, - typeParameters - ); - case "TSFunctionType": { - return { props: {}, calls: [node] }; - } - case "TSUnionType": - case "TSIntersectionType": - return mergeElements( - node.types.map((t) => resolveTypeElements(ctx, t, scope, typeParameters)), - node.type - ); - case "TSMappedType": - return resolveMappedType(ctx, node, scope, typeParameters); - case "TSIndexedAccessType": { - const types = resolveIndexType(ctx, node, scope); - return mergeElements( - types.map((t) => resolveTypeElements(ctx, t, t._ownerScope)), - "TSUnionType" - ); - } - case "TSExpressionWithTypeArguments": - // referenced by interface extends - case "TSTypeReference": { - const typeName = getReferenceName(node); - if ((typeName === "ExtractPropTypes" || typeName === "ExtractPublicPropTypes") && node.typeParameters && ((_a = scope.imports[typeName]) == null ? void 0 : _a.source) === "vue") { - return resolveExtractPropTypes( - resolveTypeElements( - ctx, - node.typeParameters.params[0], - scope, - typeParameters - ), - scope - ); - } - const resolved = resolveTypeReference(ctx, node, scope); - if (resolved) { - let typeParams; - if ((resolved.type === "TSTypeAliasDeclaration" || resolved.type === "TSInterfaceDeclaration") && resolved.typeParameters && node.typeParameters) { - typeParams = /* @__PURE__ */ Object.create(null); - resolved.typeParameters.params.forEach((p, i) => { - let param = typeParameters && typeParameters[p.name]; - if (!param) param = node.typeParameters.params[i]; - typeParams[p.name] = param; - }); - } - return resolveTypeElements( - ctx, - resolved, - resolved._ownerScope, - typeParams - ); - } else { - if (typeof typeName === "string") { - if (typeParameters && typeParameters[typeName]) { - return resolveTypeElements( - ctx, - typeParameters[typeName], - scope, - typeParameters - ); - } - if ( - // @ts-expect-error - SupportedBuiltinsSet.has(typeName) - ) { - return resolveBuiltin( - ctx, - node, - typeName, - scope, - typeParameters - ); - } else if (typeName === "ReturnType" && node.typeParameters) { - const ret = resolveReturnType( - ctx, - node.typeParameters.params[0], - scope - ); - if (ret) { - return resolveTypeElements(ctx, ret, scope); - } - } - } - return ctx.error( - `Unresolvable type reference or unsupported built-in utility type`, - node, - scope - ); - } - } - case "TSImportType": { - if (getId(node.argument) === "vue" && ((_b = node.qualifier) == null ? void 0 : _b.type) === "Identifier" && node.qualifier.name === "ExtractPropTypes" && node.typeParameters) { - return resolveExtractPropTypes( - resolveTypeElements(ctx, node.typeParameters.params[0], scope), - scope - ); - } - const sourceScope = importSourceToScope( - ctx, - node.argument, - scope, - node.argument.value - ); - const resolved = resolveTypeReference(ctx, node, sourceScope); - if (resolved) { - return resolveTypeElements(ctx, resolved, resolved._ownerScope); - } - break; - } - case "TSTypeQuery": - { - const resolved = resolveTypeReference(ctx, node, scope); - if (resolved) { - return resolveTypeElements(ctx, resolved, resolved._ownerScope); - } - } - break; - } - return ctx.error(`Unresolvable type: ${node.type}`, node, scope); -} -function typeElementsToMap(ctx, elements, scope = ctxToScope(ctx), typeParameters) { - const res = { props: {} }; - for (const e of elements) { - if (e.type === "TSPropertySignature" || e.type === "TSMethodSignature") { - if (typeParameters) { - scope = createChildScope(scope); - scope.isGenericScope = true; - Object.assign(scope.types, typeParameters); - } - e._ownerScope = scope; - const name = getId(e.key); - if (name && !e.computed) { - res.props[name] = e; - } else if (e.key.type === "TemplateLiteral") { - for (const key of resolveTemplateKeys(ctx, e.key, scope)) { - res.props[key] = e; - } - } else { - ctx.error( - `Unsupported computed key in type referenced by a macro`, - e.key, - scope - ); - } - } else if (e.type === "TSCallSignatureDeclaration") { - (res.calls || (res.calls = [])).push(e); - } - } - return res; -} -function mergeElements(maps, type) { - if (maps.length === 1) return maps[0]; - const res = { props: {} }; - const { props: baseProps } = res; - for (const { props, calls } of maps) { - for (const key in props) { - if (!hasOwn(baseProps, key)) { - baseProps[key] = props[key]; - } else { - baseProps[key] = createProperty( - baseProps[key].key, - { - type, - // @ts-expect-error - types: [baseProps[key], props[key]] - }, - baseProps[key]._ownerScope, - baseProps[key].optional || props[key].optional - ); - } - } - if (calls) { - (res.calls || (res.calls = [])).push(...calls); - } - } - return res; -} -function createProperty(key, typeAnnotation, scope, optional) { - return { - type: "TSPropertySignature", - key, - kind: "get", - optional, - typeAnnotation: { - type: "TSTypeAnnotation", - typeAnnotation - }, - _ownerScope: scope - }; -} -function resolveInterfaceMembers(ctx, node, scope, typeParameters) { - const base = typeElementsToMap( - ctx, - node.body.body, - node._ownerScope, - typeParameters - ); - if (node.extends) { - for (const ext of node.extends) { - try { - const { props, calls } = resolveTypeElements(ctx, ext, scope); - for (const key in props) { - if (!hasOwn(base.props, key)) { - base.props[key] = props[key]; - } - } - if (calls) { - ; - (base.calls || (base.calls = [])).push(...calls); - } - } catch (e) { - ctx.error( - `Failed to resolve extends base type. -If this previously worked in 3.2, you can instruct the compiler to ignore this extend by adding /* @vue-ignore */ before it, for example: - -interface Props extends /* @vue-ignore */ Base {} - -Note: both in 3.2 or with the ignore, the properties in the base type are treated as fallthrough attrs at runtime.`, - ext, - scope - ); - } - } - } - return base; -} -function resolveMappedType(ctx, node, scope, typeParameters) { - const res = { props: {} }; - let keys; - if (node.nameType) { - const { name, constraint } = node.typeParameter; - scope = createChildScope(scope); - Object.assign(scope.types, __spreadProps$1(__spreadValues$2({}, typeParameters), { [name]: constraint })); - keys = resolveStringType(ctx, node.nameType, scope); - } else { - keys = resolveStringType(ctx, node.typeParameter.constraint, scope); - } - for (const key of keys) { - res.props[key] = createProperty( - { - type: "Identifier", - name: key - }, - node.typeAnnotation, - scope, - !!node.optional - ); - } - return res; -} -function resolveIndexType(ctx, node, scope) { - var _a, _b; - if (node.indexType.type === "TSNumberKeyword") { - return resolveArrayElementType(ctx, node.objectType, scope); - } - const { indexType, objectType } = node; - const types = []; - let keys; - let resolved; - if (indexType.type === "TSStringKeyword") { - resolved = resolveTypeElements(ctx, objectType, scope); - keys = Object.keys(resolved.props); - } else { - keys = resolveStringType(ctx, indexType, scope); - resolved = resolveTypeElements(ctx, objectType, scope); - } - for (const key of keys) { - const targetType = (_b = (_a = resolved.props[key]) == null ? void 0 : _a.typeAnnotation) == null ? void 0 : _b.typeAnnotation; - if (targetType) { - targetType._ownerScope = resolved.props[key]._ownerScope; - types.push(targetType); - } - } - return types; -} -function resolveArrayElementType(ctx, node, scope) { - if (node.type === "TSArrayType") { - return [node.elementType]; - } - if (node.type === "TSTupleType") { - return node.elementTypes.map( - (t) => t.type === "TSNamedTupleMember" ? t.elementType : t - ); - } - if (node.type === "TSTypeReference") { - if (getReferenceName(node) === "Array" && node.typeParameters) { - return node.typeParameters.params; - } else { - const resolved = resolveTypeReference(ctx, node, scope); - if (resolved) { - return resolveArrayElementType(ctx, resolved, scope); - } - } - } - return ctx.error( - "Failed to resolve element type from target type", - node, - scope - ); -} -function resolveStringType(ctx, node, scope) { - switch (node.type) { - case "StringLiteral": - return [node.value]; - case "TSLiteralType": - return resolveStringType(ctx, node.literal, scope); - case "TSUnionType": - return node.types.map((t) => resolveStringType(ctx, t, scope)).flat(); - case "TemplateLiteral": { - return resolveTemplateKeys(ctx, node, scope); - } - case "TSTypeReference": { - const resolved = resolveTypeReference(ctx, node, scope); - if (resolved) { - return resolveStringType(ctx, resolved, scope); - } - if (node.typeName.type === "Identifier") { - const getParam = (index = 0) => resolveStringType(ctx, node.typeParameters.params[index], scope); - switch (node.typeName.name) { - case "Extract": - return getParam(1); - case "Exclude": { - const excluded = getParam(1); - return getParam().filter((s) => !excluded.includes(s)); - } - case "Uppercase": - return getParam().map((s) => s.toUpperCase()); - case "Lowercase": - return getParam().map((s) => s.toLowerCase()); - case "Capitalize": - return getParam().map(capitalize); - case "Uncapitalize": - return getParam().map((s) => s[0].toLowerCase() + s.slice(1)); - default: - ctx.error( - "Unsupported type when resolving index type", - node.typeName, - scope - ); - } - } - } - } - return ctx.error("Failed to resolve index type into finite keys", node, scope); -} -function resolveTemplateKeys(ctx, node, scope) { - if (!node.expressions.length) { - return [node.quasis[0].value.raw]; - } - const res = []; - const e = node.expressions[0]; - const q = node.quasis[0]; - const leading = q ? q.value.raw : ``; - const resolved = resolveStringType(ctx, e, scope); - const restResolved = resolveTemplateKeys( - ctx, - __spreadProps$1(__spreadValues$2({}, node), { - expressions: node.expressions.slice(1), - quasis: q ? node.quasis.slice(1) : node.quasis - }), - scope - ); - for (const r of resolved) { - for (const rr of restResolved) { - res.push(leading + r + rr); - } - } - return res; -} -const SupportedBuiltinsSet = /* @__PURE__ */ new Set([ - "Partial", - "Required", - "Readonly", - "Pick", - "Omit" -]); -function resolveBuiltin(ctx, node, name, scope, typeParameters) { - const t = resolveTypeElements( - ctx, - node.typeParameters.params[0], - scope, - typeParameters - ); - switch (name) { - case "Partial": { - const res2 = { props: {}, calls: t.calls }; - Object.keys(t.props).forEach((key) => { - res2.props[key] = __spreadProps$1(__spreadValues$2({}, t.props[key]), { optional: true }); - }); - return res2; - } - case "Required": { - const res2 = { props: {}, calls: t.calls }; - Object.keys(t.props).forEach((key) => { - res2.props[key] = __spreadProps$1(__spreadValues$2({}, t.props[key]), { optional: false }); - }); - return res2; - } - case "Readonly": - return t; - case "Pick": { - const picked = resolveStringType( - ctx, - node.typeParameters.params[1], - scope - ); - const res2 = { props: {}, calls: t.calls }; - for (const key of picked) { - res2.props[key] = t.props[key]; - } - return res2; - } - case "Omit": - const omitted = resolveStringType( - ctx, - node.typeParameters.params[1], - scope - ); - const res = { props: {}, calls: t.calls }; - for (const key in t.props) { - if (!omitted.includes(key)) { - res.props[key] = t.props[key]; - } - } - return res; - } -} -function resolveTypeReference(ctx, node, scope, name, onlyExported = false) { - const canCache = !(scope == null ? void 0 : scope.isGenericScope); - if (canCache && node._resolvedReference) { - return node._resolvedReference; - } - const resolved = innerResolveTypeReference( - ctx, - scope || ctxToScope(ctx), - name || getReferenceName(node), - node, - onlyExported - ); - return canCache ? node._resolvedReference = resolved : resolved; -} -function innerResolveTypeReference(ctx, scope, name, node, onlyExported) { - if (typeof name === "string") { - if (scope.imports[name]) { - return resolveTypeFromImport(ctx, node, name, scope); - } else { - const lookupSource = node.type === "TSTypeQuery" ? onlyExported ? scope.exportedDeclares : scope.declares : onlyExported ? scope.exportedTypes : scope.types; - if (lookupSource[name]) { - return lookupSource[name]; - } else { - const globalScopes = resolveGlobalScope(ctx); - if (globalScopes) { - for (const s of globalScopes) { - const src = node.type === "TSTypeQuery" ? s.declares : s.types; - if (src[name]) { - (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(s.filename); - return src[name]; - } - } - } - } - } - } else { - let ns = innerResolveTypeReference(ctx, scope, name[0], node, onlyExported); - if (ns) { - if (ns.type !== "TSModuleDeclaration") { - ns = ns._ns; - } - if (ns) { - const childScope = moduleDeclToScope(ctx, ns, ns._ownerScope || scope); - return innerResolveTypeReference( - ctx, - childScope, - name.length > 2 ? name.slice(1) : name[name.length - 1], - node, - !ns.declare - ); - } - } - } -} -function getReferenceName(node) { - const ref = node.type === "TSTypeReference" ? node.typeName : node.type === "TSExpressionWithTypeArguments" ? node.expression : node.type === "TSImportType" ? node.qualifier : node.exprName; - if ((ref == null ? void 0 : ref.type) === "Identifier") { - return ref.name; - } else if ((ref == null ? void 0 : ref.type) === "TSQualifiedName") { - return qualifiedNameToPath(ref); - } else { - return "default"; - } -} -function qualifiedNameToPath(node) { - if (node.type === "Identifier") { - return [node.name]; - } else { - return [...qualifiedNameToPath(node.left), node.right.name]; - } -} -function resolveGlobalScope(ctx) { - if (ctx.options.globalTypeFiles) { - const fs = resolveFS(ctx); - if (!fs) { - throw new Error("[vue/compiler-sfc] globalTypeFiles requires fs access."); - } - return ctx.options.globalTypeFiles.map( - (file) => fileToScope(ctx, normalizePath(file), true) - ); - } -} -let ts; -let loadTS; -function registerTS(_loadTS) { - loadTS = () => { - try { - return _loadTS(); - } catch (err) { - if (typeof err.message === "string" && err.message.includes("Cannot find module")) { - throw new Error( - 'Failed to load TypeScript, which is required for resolving imported types. Please make sure "typescript" is installed as a project dependency.' - ); - } else { - throw new Error( - "Failed to load TypeScript for resolving imported types." - ); - } - } - }; -} -function resolveFS(ctx) { - if (ctx.fs) { - return ctx.fs; - } - if (!ts && loadTS) { - ts = loadTS(); - } - const fs = ctx.options.fs || (ts == null ? void 0 : ts.sys); - if (!fs) { - return; - } - return ctx.fs = { - fileExists(file) { - if (file.endsWith(".vue.ts")) { - file = file.replace(/\.ts$/, ""); - } - return fs.fileExists(file); - }, - readFile(file) { - if (file.endsWith(".vue.ts")) { - file = file.replace(/\.ts$/, ""); - } - return fs.readFile(file); - }, - realpath: fs.realpath - }; -} -function resolveTypeFromImport(ctx, node, name, scope) { - const { source, imported } = scope.imports[name]; - const sourceScope = importSourceToScope(ctx, node, scope, source); - return resolveTypeReference(ctx, node, sourceScope, imported, true); -} -function importSourceToScope(ctx, node, scope, source) { - let fs; - try { - fs = resolveFS(ctx); - } catch (err) { - return ctx.error(err.message, node, scope); - } - if (!fs) { - return ctx.error( - `No fs option provided to \`compileScript\` in non-Node environment. File system access is required for resolving imported types.`, - node, - scope - ); - } - let resolved = scope.resolvedImportSources[source]; - if (!resolved) { - if (source.startsWith("..")) { - const osSpecificJoinFn = joinPaths; - const filename = osSpecificJoinFn(dirname(scope.filename), source); - resolved = resolveExt(filename, fs); - } else if (source[0] === ".") { - const filename = joinPaths(dirname(scope.filename), source); - resolved = resolveExt(filename, fs); - } else { - { - return ctx.error( - `Type import from non-relative sources is not supported in the browser build.`, - node, - scope - ); - } - } - if (resolved) { - resolved = scope.resolvedImportSources[source] = normalizePath(resolved); - } - } - if (resolved) { - (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(resolved); - return fileToScope(ctx, resolved); - } else { - return ctx.error( - `Failed to resolve import source ${JSON.stringify(source)}.`, - node, - scope - ); - } -} -function resolveExt(filename, fs) { - filename = filename.replace(/\.js$/, ""); - const tryResolve = (filename2) => { - if (fs.fileExists(filename2)) return filename2; - }; - return tryResolve(filename) || tryResolve(filename + `.ts`) || tryResolve(filename + `.tsx`) || tryResolve(filename + `.d.ts`) || tryResolve(joinPaths(filename, `index.ts`)) || tryResolve(joinPaths(filename, `index.tsx`)) || tryResolve(joinPaths(filename, `index.d.ts`)); -} -const tsConfigCache = createCache(); -const tsConfigRefMap = /* @__PURE__ */ new Map(); -const fileToScopeCache = createCache(); -function invalidateTypeCache(filename) { - filename = normalizePath(filename); - fileToScopeCache.delete(filename); - tsConfigCache.delete(filename); - const affectedConfig = tsConfigRefMap.get(filename); - if (affectedConfig) tsConfigCache.delete(affectedConfig); -} -function fileToScope(ctx, filename, asGlobal = false) { - const cached = fileToScopeCache.get(filename); - if (cached) { - return cached; - } - const fs = resolveFS(ctx); - const source = fs.readFile(filename) || ""; - const body = parseFile(filename, source, ctx.options.babelParserPlugins); - const scope = new TypeScope(filename, source, 0, recordImports(body)); - recordTypes(ctx, body, scope, asGlobal); - fileToScopeCache.set(filename, scope); - return scope; -} -function parseFile(filename, content, parserPlugins) { - const ext = extname(filename); - if (ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".mtsx") { - return libExports.parse(content, { - plugins: resolveParserPlugins( - ext.slice(1), - parserPlugins, - /\.d\.m?ts$/.test(filename) - ), - sourceType: "module" - }).program.body; - } else if (ext === ".vue") { - const { - descriptor: { script, scriptSetup } - } = parse$2(content); - if (!script && !scriptSetup) { - return []; - } - const scriptOffset = script ? script.loc.start.offset : Infinity; - const scriptSetupOffset = scriptSetup ? scriptSetup.loc.start.offset : Infinity; - const firstBlock = scriptOffset < scriptSetupOffset ? script : scriptSetup; - const secondBlock = scriptOffset < scriptSetupOffset ? scriptSetup : script; - let scriptContent = " ".repeat(Math.min(scriptOffset, scriptSetupOffset)) + firstBlock.content; - if (secondBlock) { - scriptContent += " ".repeat(secondBlock.loc.start.offset - script.loc.end.offset) + secondBlock.content; - } - const lang = (script == null ? void 0 : script.lang) || (scriptSetup == null ? void 0 : scriptSetup.lang); - return libExports.parse(scriptContent, { - plugins: resolveParserPlugins(lang, parserPlugins), - sourceType: "module" - }).program.body; - } - return []; -} -function ctxToScope(ctx) { - if (ctx.scope) { - return ctx.scope; - } - const body = "ast" in ctx ? ctx.ast : ctx.scriptAst ? [...ctx.scriptAst.body, ...ctx.scriptSetupAst.body] : ctx.scriptSetupAst.body; - const scope = new TypeScope( - ctx.filename, - ctx.source, - "startOffset" in ctx ? ctx.startOffset : 0, - "userImports" in ctx ? Object.create(ctx.userImports) : recordImports(body) - ); - recordTypes(ctx, body, scope); - return ctx.scope = scope; -} -function moduleDeclToScope(ctx, node, parentScope) { - if (node._resolvedChildScope) { - return node._resolvedChildScope; - } - const scope = createChildScope(parentScope); - if (node.body.type === "TSModuleDeclaration") { - const decl = node.body; - decl._ownerScope = scope; - const id = getId(decl.id); - scope.types[id] = scope.exportedTypes[id] = decl; - } else { - recordTypes(ctx, node.body.body, scope); - } - return node._resolvedChildScope = scope; -} -function createChildScope(parentScope) { - return new TypeScope( - parentScope.filename, - parentScope.source, - parentScope.offset, - Object.create(parentScope.imports), - Object.create(parentScope.types), - Object.create(parentScope.declares) - ); -} -const importExportRE = /^Import|^Export/; -function recordTypes(ctx, body, scope, asGlobal = false) { - const { types, declares, exportedTypes, exportedDeclares, imports } = scope; - const isAmbient = asGlobal ? !body.some((s) => importExportRE.test(s.type)) : false; - for (const stmt of body) { - if (asGlobal) { - if (isAmbient) { - if (stmt.declare) { - recordType(stmt, types, declares); - } - } else if (stmt.type === "TSModuleDeclaration" && stmt.global) { - for (const s of stmt.body.body) { - recordType(s, types, declares); - } - } - } else { - recordType(stmt, types, declares); - } - } - if (!asGlobal) { - for (const stmt of body) { - if (stmt.type === "ExportNamedDeclaration") { - if (stmt.declaration) { - recordType(stmt.declaration, types, declares); - recordType(stmt.declaration, exportedTypes, exportedDeclares); - } else { - for (const spec of stmt.specifiers) { - if (spec.type === "ExportSpecifier") { - const local = spec.local.name; - const exported = getId(spec.exported); - if (stmt.source) { - imports[exported] = { - source: stmt.source.value, - imported: local - }; - exportedTypes[exported] = { - type: "TSTypeReference", - typeName: { - type: "Identifier", - name: local - }, - _ownerScope: scope - }; - } else if (types[local]) { - exportedTypes[exported] = types[local]; - } - } - } - } - } else if (stmt.type === "ExportAllDeclaration") { - const sourceScope = importSourceToScope( - ctx, - stmt.source, - scope, - stmt.source.value - ); - Object.assign(scope.exportedTypes, sourceScope.exportedTypes); - } else if (stmt.type === "ExportDefaultDeclaration" && stmt.declaration) { - if (stmt.declaration.type !== "Identifier") { - recordType(stmt.declaration, types, declares, "default"); - recordType( - stmt.declaration, - exportedTypes, - exportedDeclares, - "default" - ); - } else if (types[stmt.declaration.name]) { - exportedTypes["default"] = types[stmt.declaration.name]; - } - } - } - } - for (const key of Object.keys(types)) { - const node = types[key]; - node._ownerScope = scope; - if (node._ns) node._ns._ownerScope = scope; - } - for (const key of Object.keys(declares)) { - declares[key]._ownerScope = scope; - } -} -function recordType(node, types, declares, overwriteId) { - switch (node.type) { - case "TSInterfaceDeclaration": - case "TSEnumDeclaration": - case "TSModuleDeclaration": { - const id = overwriteId || getId(node.id); - let existing = types[id]; - if (existing) { - if (node.type === "TSModuleDeclaration") { - if (existing.type === "TSModuleDeclaration") { - mergeNamespaces(existing, node); - } else { - attachNamespace(existing, node); - } - break; - } - if (existing.type === "TSModuleDeclaration") { - types[id] = node; - attachNamespace(node, existing); - break; - } - if (existing.type !== node.type) { - break; - } - if (node.type === "TSInterfaceDeclaration") { - existing.body.body.push(...node.body.body); - } else { - existing.members.push(...node.members); - } - } else { - types[id] = node; - } - break; - } - case "ClassDeclaration": - if (overwriteId || node.id) types[overwriteId || getId(node.id)] = node; - break; - case "TSTypeAliasDeclaration": - types[node.id.name] = node.typeParameters ? node : node.typeAnnotation; - break; - case "TSDeclareFunction": - if (node.id) declares[node.id.name] = node; - break; - case "VariableDeclaration": { - if (node.declare) { - for (const decl of node.declarations) { - if (decl.id.type === "Identifier" && decl.id.typeAnnotation) { - declares[decl.id.name] = decl.id.typeAnnotation.typeAnnotation; - } - } - } - break; - } - } -} -function mergeNamespaces(to, from) { - const toBody = to.body; - const fromBody = from.body; - if (toBody.type === "TSModuleDeclaration") { - if (fromBody.type === "TSModuleDeclaration") { - mergeNamespaces(toBody, fromBody); - } else { - fromBody.body.push({ - type: "ExportNamedDeclaration", - declaration: toBody, - exportKind: "type", - specifiers: [] - }); - } - } else if (fromBody.type === "TSModuleDeclaration") { - toBody.body.push({ - type: "ExportNamedDeclaration", - declaration: fromBody, - exportKind: "type", - specifiers: [] - }); - } else { - toBody.body.push(...fromBody.body); - } -} -function attachNamespace(to, ns) { - if (!to._ns) { - to._ns = ns; - } else { - mergeNamespaces(to._ns, ns); - } -} -function recordImports(body) { - const imports = /* @__PURE__ */ Object.create(null); - for (const s of body) { - recordImport(s, imports); - } - return imports; -} -function recordImport(node, imports) { - if (node.type !== "ImportDeclaration") { - return; - } - for (const s of node.specifiers) { - imports[s.local.name] = { - imported: getImportedName(s), - source: node.source.value - }; - } -} -function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx), isKeyOf = false) { - try { - switch (node.type) { - case "TSStringKeyword": - return ["String"]; - case "TSNumberKeyword": - return ["Number"]; - case "TSBooleanKeyword": - return ["Boolean"]; - case "TSObjectKeyword": - return ["Object"]; - case "TSNullKeyword": - return ["null"]; - case "TSTypeLiteral": - case "TSInterfaceDeclaration": { - const types = /* @__PURE__ */ new Set(); - const members = node.type === "TSTypeLiteral" ? node.members : node.body.body; - for (const m of members) { - if (isKeyOf) { - if (m.type === "TSPropertySignature" && m.key.type === "NumericLiteral") { - types.add("Number"); - } else if (m.type === "TSIndexSignature") { - const annotation = m.parameters[0].typeAnnotation; - if (annotation && annotation.type !== "Noop") { - const type = inferRuntimeType( - ctx, - annotation.typeAnnotation, - scope - )[0]; - if (type === UNKNOWN_TYPE) return [UNKNOWN_TYPE]; - types.add(type); - } - } else { - types.add("String"); - } - } else if (m.type === "TSCallSignatureDeclaration" || m.type === "TSConstructSignatureDeclaration") { - types.add("Function"); - } else { - types.add("Object"); - } - } - return types.size ? Array.from(types) : [isKeyOf ? UNKNOWN_TYPE : "Object"]; - } - case "TSPropertySignature": - if (node.typeAnnotation) { - return inferRuntimeType( - ctx, - node.typeAnnotation.typeAnnotation, - scope - ); - } - break; - case "TSMethodSignature": - case "TSFunctionType": - return ["Function"]; - case "TSArrayType": - case "TSTupleType": - return ["Array"]; - case "TSLiteralType": - switch (node.literal.type) { - case "StringLiteral": - return ["String"]; - case "BooleanLiteral": - return ["Boolean"]; - case "NumericLiteral": - case "BigIntLiteral": - return ["Number"]; - default: - return [UNKNOWN_TYPE]; - } - case "TSTypeReference": { - const resolved = resolveTypeReference(ctx, node, scope); - if (resolved) { - return inferRuntimeType(ctx, resolved, resolved._ownerScope, isKeyOf); - } - if (node.typeName.type === "Identifier") { - if (isKeyOf) { - switch (node.typeName.name) { - case "String": - case "Array": - case "ArrayLike": - case "Parameters": - case "ConstructorParameters": - case "ReadonlyArray": - return ["String", "Number"]; - // TS built-in utility types - case "Record": - case "Partial": - case "Required": - case "Readonly": - if (node.typeParameters && node.typeParameters.params[0]) { - return inferRuntimeType( - ctx, - node.typeParameters.params[0], - scope, - true - ); - } - break; - case "Pick": - case "Extract": - if (node.typeParameters && node.typeParameters.params[1]) { - return inferRuntimeType( - ctx, - node.typeParameters.params[1], - scope - ); - } - break; - case "Function": - case "Object": - case "Set": - case "Map": - case "WeakSet": - case "WeakMap": - case "Date": - case "Promise": - case "Error": - case "Uppercase": - case "Lowercase": - case "Capitalize": - case "Uncapitalize": - case "ReadonlyMap": - case "ReadonlySet": - return ["String"]; - } - } else { - switch (node.typeName.name) { - case "Array": - case "Function": - case "Object": - case "Set": - case "Map": - case "WeakSet": - case "WeakMap": - case "Date": - case "Promise": - case "Error": - return [node.typeName.name]; - // TS built-in utility types - // https://www.typescriptlang.org/docs/handbook/utility-types.html - case "Partial": - case "Required": - case "Readonly": - case "Record": - case "Pick": - case "Omit": - case "InstanceType": - return ["Object"]; - case "Uppercase": - case "Lowercase": - case "Capitalize": - case "Uncapitalize": - return ["String"]; - case "Parameters": - case "ConstructorParameters": - case "ReadonlyArray": - return ["Array"]; - case "ReadonlyMap": - return ["Map"]; - case "ReadonlySet": - return ["Set"]; - case "NonNullable": - if (node.typeParameters && node.typeParameters.params[0]) { - return inferRuntimeType( - ctx, - node.typeParameters.params[0], - scope - ).filter((t) => t !== "null"); - } - break; - case "Extract": - if (node.typeParameters && node.typeParameters.params[1]) { - return inferRuntimeType( - ctx, - node.typeParameters.params[1], - scope - ); - } - break; - case "Exclude": - case "OmitThisParameter": - if (node.typeParameters && node.typeParameters.params[0]) { - return inferRuntimeType( - ctx, - node.typeParameters.params[0], - scope - ); - } - break; - } - } - } - break; - } - case "TSParenthesizedType": - return inferRuntimeType(ctx, node.typeAnnotation, scope); - case "TSUnionType": - return flattenTypes(ctx, node.types, scope, isKeyOf); - case "TSIntersectionType": { - return flattenTypes(ctx, node.types, scope, isKeyOf).filter( - (t) => t !== UNKNOWN_TYPE - ); - } - case "TSEnumDeclaration": - return inferEnumType(node); - case "TSSymbolKeyword": - return ["Symbol"]; - case "TSIndexedAccessType": { - const types = resolveIndexType(ctx, node, scope); - return flattenTypes(ctx, types, scope, isKeyOf); - } - case "ClassDeclaration": - return ["Object"]; - case "TSImportType": { - const sourceScope = importSourceToScope( - ctx, - node.argument, - scope, - node.argument.value - ); - const resolved = resolveTypeReference(ctx, node, sourceScope); - if (resolved) { - return inferRuntimeType(ctx, resolved, resolved._ownerScope); - } - break; - } - case "TSTypeQuery": { - const id = node.exprName; - if (id.type === "Identifier") { - const matched = scope.declares[id.name]; - if (matched) { - return inferRuntimeType(ctx, matched, matched._ownerScope, isKeyOf); - } - } - break; - } - // e.g. readonly - case "TSTypeOperator": { - return inferRuntimeType( - ctx, - node.typeAnnotation, - scope, - node.operator === "keyof" - ); - } - case "TSAnyKeyword": { - if (isKeyOf) { - return ["String", "Number", "Symbol"]; - } - break; - } - } - } catch (e) { - } - return [UNKNOWN_TYPE]; -} -function flattenTypes(ctx, types, scope, isKeyOf = false) { - if (types.length === 1) { - return inferRuntimeType(ctx, types[0], scope, isKeyOf); - } - return [ - ...new Set( - [].concat( - ...types.map((t) => inferRuntimeType(ctx, t, scope, isKeyOf)) - ) - ) - ]; -} -function inferEnumType(node) { - const types = /* @__PURE__ */ new Set(); - for (const m of node.members) { - if (m.initializer) { - switch (m.initializer.type) { - case "StringLiteral": - types.add("String"); - break; - case "NumericLiteral": - types.add("Number"); - break; - } - } - } - return types.size ? [...types] : ["Number"]; -} -function resolveExtractPropTypes({ props }, scope) { - const res = { props: {} }; - for (const key in props) { - const raw = props[key]; - res.props[key] = reverseInferType( - raw.key, - raw.typeAnnotation.typeAnnotation, - scope - ); - } - return res; -} -function reverseInferType(key, node, scope, optional = true, checkObjectSyntax = true) { - if (checkObjectSyntax && node.type === "TSTypeLiteral") { - const typeType = findStaticPropertyType(node, "type"); - if (typeType) { - const requiredType = findStaticPropertyType(node, "required"); - const optional2 = requiredType && requiredType.type === "TSLiteralType" && requiredType.literal.type === "BooleanLiteral" ? !requiredType.literal.value : true; - return reverseInferType(key, typeType, scope, optional2, false); - } - } else if (node.type === "TSTypeReference" && node.typeName.type === "Identifier") { - if (node.typeName.name.endsWith("Constructor")) { - return createProperty( - key, - ctorToType(node.typeName.name), - scope, - optional - ); - } else if (node.typeName.name === "PropType" && node.typeParameters) { - return createProperty(key, node.typeParameters.params[0], scope, optional); - } - } - if ((node.type === "TSTypeReference" || node.type === "TSImportType") && node.typeParameters) { - for (const t of node.typeParameters.params) { - const inferred = reverseInferType(key, t, scope, optional); - if (inferred) return inferred; - } - } - return createProperty(key, { type: `TSNullKeyword` }, scope, optional); -} -function ctorToType(ctorType) { - const ctor = ctorType.slice(0, -11); - switch (ctor) { - case "String": - case "Number": - case "Boolean": - return { type: `TS${ctor}Keyword` }; - case "Array": - case "Function": - case "Object": - case "Set": - case "Map": - case "WeakSet": - case "WeakMap": - case "Date": - case "Promise": - return { - type: "TSTypeReference", - typeName: { type: "Identifier", name: ctor } - }; - } - return { type: `TSNullKeyword` }; -} -function findStaticPropertyType(node, key) { - const prop = node.members.find( - (m) => m.type === "TSPropertySignature" && !m.computed && getId(m.key) === key && m.typeAnnotation - ); - return prop && prop.typeAnnotation.typeAnnotation; -} -function resolveReturnType(ctx, arg, scope) { - var _a; - let resolved = arg; - if (arg.type === "TSTypeReference" || arg.type === "TSTypeQuery" || arg.type === "TSImportType") { - resolved = resolveTypeReference(ctx, arg, scope); - } - if (!resolved) return; - if (resolved.type === "TSFunctionType") { - return (_a = resolved.typeAnnotation) == null ? void 0 : _a.typeAnnotation; - } - if (resolved.type === "TSDeclareFunction") { - return resolved.returnType; - } -} -function resolveUnionType(ctx, node, scope) { - if (node.type === "TSTypeReference") { - const resolved = resolveTypeReference(ctx, node, scope); - if (resolved) node = resolved; - } - let types; - if (node.type === "TSUnionType") { - types = node.types.flatMap((node2) => resolveUnionType(ctx, node2, scope)); - } else { - types = [node]; - } - return types; -} - -const DEFINE_MODEL = "defineModel"; -function processDefineModel(ctx, node, declId) { - if (!isCallOf(node, DEFINE_MODEL)) { - return false; - } - ctx.hasDefineModelCall = true; - const type = node.typeParameters && node.typeParameters.params[0] || void 0; - let modelName; - let options; - const arg0 = node.arguments[0] && unwrapTSNode(node.arguments[0]); - const hasName = arg0 && arg0.type === "StringLiteral"; - if (hasName) { - modelName = arg0.value; - options = node.arguments[1]; - } else { - modelName = "modelValue"; - options = arg0; - } - if (ctx.modelDecls[modelName]) { - ctx.error(`duplicate model name ${JSON.stringify(modelName)}`, node); - } - let optionsString = options && ctx.getString(options); - let optionsRemoved = !options; - const runtimeOptionNodes = []; - if (options && options.type === "ObjectExpression" && !options.properties.some((p) => p.type === "SpreadElement" || p.computed)) { - let removed = 0; - for (let i = options.properties.length - 1; i >= 0; i--) { - const p = options.properties[i]; - const next = options.properties[i + 1]; - const start = p.start; - const end = next ? next.start : options.end - 1; - if ((p.type === "ObjectProperty" || p.type === "ObjectMethod") && (p.key.type === "Identifier" && (p.key.name === "get" || p.key.name === "set") || p.key.type === "StringLiteral" && (p.key.value === "get" || p.key.value === "set"))) { - optionsString = optionsString.slice(0, start - options.start) + optionsString.slice(end - options.start); - } else { - removed++; - ctx.s.remove(ctx.startOffset + start, ctx.startOffset + end); - runtimeOptionNodes.push(p); - } - } - if (removed === options.properties.length) { - optionsRemoved = true; - ctx.s.remove( - ctx.startOffset + (hasName ? arg0.end : options.start), - ctx.startOffset + options.end - ); - } - } - ctx.modelDecls[modelName] = { - type, - options: optionsString, - runtimeOptionNodes, - identifier: declId && declId.type === "Identifier" ? declId.name : void 0 - }; - ctx.bindingMetadata[modelName] = "props"; - ctx.s.overwrite( - ctx.startOffset + node.callee.start, - ctx.startOffset + node.callee.end, - ctx.helper("useModel") - ); - ctx.s.appendLeft( - ctx.startOffset + (node.arguments.length ? node.arguments[0].start : node.end - 1), - `__props, ` + (hasName ? `` : `${JSON.stringify(modelName)}${optionsRemoved ? `` : `, `}`) - ); - return true; -} -function genModelProps(ctx) { - if (!ctx.hasDefineModelCall) return; - const isProd = !!ctx.options.isProd; - let modelPropsDecl = ""; - for (const [name, { type, options: runtimeOptions }] of Object.entries( - ctx.modelDecls - )) { - let skipCheck = false; - let codegenOptions = ``; - let runtimeTypes = type && inferRuntimeType(ctx, type); - if (runtimeTypes) { - const hasBoolean = runtimeTypes.includes("Boolean"); - const hasFunction = runtimeTypes.includes("Function"); - const hasUnknownType = runtimeTypes.includes(UNKNOWN_TYPE); - if (hasUnknownType) { - if (hasBoolean || hasFunction) { - runtimeTypes = runtimeTypes.filter((t) => t !== UNKNOWN_TYPE); - skipCheck = true; - } else { - runtimeTypes = ["null"]; - } - } - if (!isProd) { - codegenOptions = `type: ${toRuntimeTypeString(runtimeTypes)}` + (skipCheck ? ", skipCheck: true" : ""); - } else if (hasBoolean || runtimeOptions && hasFunction) { - codegenOptions = `type: ${toRuntimeTypeString(runtimeTypes)}`; - } else ; - } - let decl; - if (codegenOptions && runtimeOptions) { - decl = ctx.isTS ? `{ ${codegenOptions}, ...${runtimeOptions} }` : `Object.assign({ ${codegenOptions} }, ${runtimeOptions})`; - } else if (codegenOptions) { - decl = `{ ${codegenOptions} }`; - } else if (runtimeOptions) { - decl = runtimeOptions; - } else { - decl = `{}`; - } - modelPropsDecl += ` - ${JSON.stringify(name)}: ${decl},`; - const modifierPropName = JSON.stringify( - name === "modelValue" ? `modelModifiers` : `${name}Modifiers` - ); - modelPropsDecl += ` - ${modifierPropName}: {},`; - } - return `{${modelPropsDecl} - }`; -} - -const DEFINE_PROPS = "defineProps"; -const WITH_DEFAULTS = "withDefaults"; -function processDefineProps(ctx, node, declId, isWithDefaults = false) { - if (!isCallOf(node, DEFINE_PROPS)) { - return processWithDefaults(ctx, node, declId); - } - if (ctx.hasDefinePropsCall) { - ctx.error(`duplicate ${DEFINE_PROPS}() call`, node); - } - ctx.hasDefinePropsCall = true; - ctx.propsRuntimeDecl = node.arguments[0]; - if (ctx.propsRuntimeDecl) { - for (const key of getObjectOrArrayExpressionKeys(ctx.propsRuntimeDecl)) { - if (!(key in ctx.bindingMetadata)) { - ctx.bindingMetadata[key] = "props"; - } - } - } - if (node.typeParameters) { - if (ctx.propsRuntimeDecl) { - ctx.error( - `${DEFINE_PROPS}() cannot accept both type and non-type arguments at the same time. Use one or the other.`, - node - ); - } - ctx.propsTypeDecl = node.typeParameters.params[0]; - } - if (!isWithDefaults && declId && declId.type === "ObjectPattern") { - processPropsDestructure(ctx, declId); - } - ctx.propsCall = node; - ctx.propsDecl = declId; - return true; -} -function processWithDefaults(ctx, node, declId) { - if (!isCallOf(node, WITH_DEFAULTS)) { - return false; - } - if (!processDefineProps( - ctx, - node.arguments[0], - declId, - true - )) { - ctx.error( - `${WITH_DEFAULTS}' first argument must be a ${DEFINE_PROPS} call.`, - node.arguments[0] || node - ); - } - if (ctx.propsRuntimeDecl) { - ctx.error( - `${WITH_DEFAULTS} can only be used with type-based ${DEFINE_PROPS} declaration.`, - node - ); - } - if (declId && declId.type === "ObjectPattern") { - ctx.warn( - `${WITH_DEFAULTS}() is unnecessary when using destructure with ${DEFINE_PROPS}(). -Reactive destructure will be disabled when using withDefaults(). -Prefer using destructure default values, e.g. const { foo = 1 } = defineProps(...). `, - node.callee - ); - } - ctx.propsRuntimeDefaults = node.arguments[1]; - if (!ctx.propsRuntimeDefaults) { - ctx.error(`The 2nd argument of ${WITH_DEFAULTS} is required.`, node); - } - ctx.propsCall = node; - return true; -} -function genRuntimeProps(ctx) { - let propsDecls; - if (ctx.propsRuntimeDecl) { - propsDecls = ctx.getString(ctx.propsRuntimeDecl).trim(); - if (ctx.propsDestructureDecl) { - const defaults = []; - for (const key in ctx.propsDestructuredBindings) { - const d = genDestructuredDefaultValue(ctx, key); - const finalKey = getEscapedPropName(key); - if (d) - defaults.push( - `${finalKey}: ${d.valueString}${d.needSkipFactory ? `, __skip_${finalKey}: true` : ``}` - ); - } - if (defaults.length) { - propsDecls = `/*@__PURE__*/${ctx.helper( - `mergeDefaults` - )}(${propsDecls}, { - ${defaults.join(",\n ")} -})`; - } - } - } else if (ctx.propsTypeDecl) { - propsDecls = extractRuntimeProps(ctx); - } - const modelsDecls = genModelProps(ctx); - if (propsDecls && modelsDecls) { - return `/*@__PURE__*/${ctx.helper( - "mergeModels" - )}(${propsDecls}, ${modelsDecls})`; - } else { - return modelsDecls || propsDecls; - } -} -function extractRuntimeProps(ctx) { - const props = resolveRuntimePropsFromType(ctx, ctx.propsTypeDecl); - if (!props.length) { - return; - } - const propStrings = []; - const hasStaticDefaults = hasStaticWithDefaults(ctx); - for (const prop of props) { - propStrings.push(genRuntimePropFromType(ctx, prop, hasStaticDefaults)); - if ("bindingMetadata" in ctx && !(prop.key in ctx.bindingMetadata)) { - ctx.bindingMetadata[prop.key] = "props"; - } - } - let propsDecls = `{ - ${propStrings.join(",\n ")} - }`; - if (ctx.propsRuntimeDefaults && !hasStaticDefaults) { - propsDecls = `/*@__PURE__*/${ctx.helper( - "mergeDefaults" - )}(${propsDecls}, ${ctx.getString(ctx.propsRuntimeDefaults)})`; - } - return propsDecls; -} -function resolveRuntimePropsFromType(ctx, node) { - const props = []; - const elements = resolveTypeElements(ctx, node); - for (const key in elements.props) { - const e = elements.props[key]; - let type = inferRuntimeType(ctx, e); - let skipCheck = false; - if (type.includes(UNKNOWN_TYPE)) { - if (type.includes("Boolean") || type.includes("Function")) { - type = type.filter((t) => t !== UNKNOWN_TYPE); - skipCheck = true; - } else { - type = ["null"]; - } - } - props.push({ - key, - required: !e.optional, - type: type || [`null`], - skipCheck - }); - } - return props; -} -function genRuntimePropFromType(ctx, { key, required, type, skipCheck }, hasStaticDefaults) { - let defaultString; - const destructured = genDestructuredDefaultValue(ctx, key, type); - if (destructured) { - defaultString = `default: ${destructured.valueString}${destructured.needSkipFactory ? `, skipFactory: true` : ``}`; - } else if (hasStaticDefaults) { - const prop = ctx.propsRuntimeDefaults.properties.find( - (node) => { - if (node.type === "SpreadElement") return false; - return resolveObjectKey(node.key, node.computed) === key; - } - ); - if (prop) { - if (prop.type === "ObjectProperty") { - defaultString = `default: ${ctx.getString(prop.value)}`; - } else { - defaultString = `${prop.async ? "async " : ""}${prop.kind !== "method" ? `${prop.kind} ` : ""}default() ${ctx.getString(prop.body)}`; - } - } - } - const finalKey = getEscapedPropName(key); - if (!ctx.options.isProd) { - return `${finalKey}: { ${concatStrings([ - `type: ${toRuntimeTypeString(type)}`, - `required: ${required}`, - skipCheck && "skipCheck: true", - defaultString - ])} }`; - } else if (type.some( - (el) => el === "Boolean" || (!hasStaticDefaults || defaultString) && el === "Function" - )) { - return `${finalKey}: { ${concatStrings([ - `type: ${toRuntimeTypeString(type)}`, - defaultString - ])} }`; - } else { - if (ctx.isCE) { - if (defaultString) { - return `${finalKey}: ${`{ ${defaultString}, type: ${toRuntimeTypeString( - type - )} }`}`; - } else { - return `${finalKey}: {type: ${toRuntimeTypeString(type)}}`; - } - } - return `${finalKey}: ${defaultString ? `{ ${defaultString} }` : `{}`}`; - } -} -function hasStaticWithDefaults(ctx) { - return !!(ctx.propsRuntimeDefaults && ctx.propsRuntimeDefaults.type === "ObjectExpression" && ctx.propsRuntimeDefaults.properties.every( - (node) => node.type !== "SpreadElement" && (!node.computed || node.key.type.endsWith("Literal")) - )); -} -function genDestructuredDefaultValue(ctx, key, inferredType) { - const destructured = ctx.propsDestructuredBindings[key]; - const defaultVal = destructured && destructured.default; - if (defaultVal) { - const value = ctx.getString(defaultVal); - const unwrapped = unwrapTSNode(defaultVal); - if (inferredType && inferredType.length && !inferredType.includes("null")) { - const valueType = inferValueType(unwrapped); - if (valueType && !inferredType.includes(valueType)) { - ctx.error( - `Default value of prop "${key}" does not match declared type.`, - unwrapped - ); - } - } - const needSkipFactory = !inferredType && (isFunctionType(unwrapped) || unwrapped.type === "Identifier"); - const needFactoryWrap = !needSkipFactory && !isLiteralNode(unwrapped) && !(inferredType == null ? void 0 : inferredType.includes("Function")); - return { - valueString: needFactoryWrap ? `() => (${value})` : value, - needSkipFactory - }; - } -} -function inferValueType(node) { - switch (node.type) { - case "StringLiteral": - return "String"; - case "NumericLiteral": - return "Number"; - case "BooleanLiteral": - return "Boolean"; - case "ObjectExpression": - return "Object"; - case "ArrayExpression": - return "Array"; - case "FunctionExpression": - case "ArrowFunctionExpression": - return "Function"; - } -} - -function processPropsDestructure(ctx, declId) { - if (ctx.options.propsDestructure === "error") { - ctx.error(`Props destructure is explicitly prohibited via config.`, declId); - } else if (ctx.options.propsDestructure === false) { - return; - } - ctx.propsDestructureDecl = declId; - const registerBinding = (key, local, defaultValue) => { - ctx.propsDestructuredBindings[key] = { local, default: defaultValue }; - if (local !== key) { - ctx.bindingMetadata[local] = "props-aliased"; - (ctx.bindingMetadata.__propsAliases || (ctx.bindingMetadata.__propsAliases = {}))[local] = key; - } - }; - for (const prop of declId.properties) { - if (prop.type === "ObjectProperty") { - const propKey = resolveObjectKey(prop.key, prop.computed); - if (!propKey) { - ctx.error( - `${DEFINE_PROPS}() destructure cannot use computed key.`, - prop.key - ); - } - if (prop.value.type === "AssignmentPattern") { - const { left, right } = prop.value; - if (left.type !== "Identifier") { - ctx.error( - `${DEFINE_PROPS}() destructure does not support nested patterns.`, - left - ); - } - registerBinding(propKey, left.name, right); - } else if (prop.value.type === "Identifier") { - registerBinding(propKey, prop.value.name); - } else { - ctx.error( - `${DEFINE_PROPS}() destructure does not support nested patterns.`, - prop.value - ); - } - } else { - ctx.propsDestructureRestId = prop.argument.name; - ctx.bindingMetadata[ctx.propsDestructureRestId] = "setup-reactive-const"; - } - } -} -function transformDestructuredProps(ctx, vueImportAliases) { - if (ctx.options.propsDestructure === false) { - return; - } - const rootScope = /* @__PURE__ */ Object.create(null); - const scopeStack = [rootScope]; - let currentScope = rootScope; - const excludedIds = /* @__PURE__ */ new WeakSet(); - const parentStack = []; - const propsLocalToPublicMap = /* @__PURE__ */ Object.create(null); - for (const key in ctx.propsDestructuredBindings) { - const { local } = ctx.propsDestructuredBindings[key]; - rootScope[local] = true; - propsLocalToPublicMap[local] = key; - } - function pushScope() { - scopeStack.push(currentScope = Object.create(currentScope)); - } - function popScope() { - scopeStack.pop(); - currentScope = scopeStack[scopeStack.length - 1] || null; - } - function registerLocalBinding(id) { - excludedIds.add(id); - if (currentScope) { - currentScope[id.name] = false; - } else { - ctx.error( - "registerBinding called without active scope, something is wrong.", - id - ); - } - } - function walkScope(node, isRoot = false) { - for (const stmt of node.body) { - if (stmt.type === "VariableDeclaration") { - walkVariableDeclaration(stmt, isRoot); - } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { - if (stmt.declare || !stmt.id) continue; - registerLocalBinding(stmt.id); - } else if ((stmt.type === "ForOfStatement" || stmt.type === "ForInStatement") && stmt.left.type === "VariableDeclaration") { - walkVariableDeclaration(stmt.left); - } else if (stmt.type === "ExportNamedDeclaration" && stmt.declaration && stmt.declaration.type === "VariableDeclaration") { - walkVariableDeclaration(stmt.declaration, isRoot); - } else if (stmt.type === "LabeledStatement" && stmt.body.type === "VariableDeclaration") { - walkVariableDeclaration(stmt.body, isRoot); - } - } - } - function walkVariableDeclaration(stmt, isRoot = false) { - if (stmt.declare) { - return; - } - for (const decl of stmt.declarations) { - const isDefineProps = isRoot && decl.init && isCallOf(unwrapTSNode(decl.init), "defineProps"); - for (const id of extractIdentifiers$1(decl.id)) { - if (isDefineProps) { - excludedIds.add(id); - } else { - registerLocalBinding(id); - } - } - } - } - function rewriteId(id, parent, parentStack2) { - if (parent.type === "AssignmentExpression" && id === parent.left || parent.type === "UpdateExpression") { - ctx.error(`Cannot assign to destructured props as they are readonly.`, id); - } - if (isStaticProperty(parent) && parent.shorthand) { - if (!parent.inPattern || isInDestructureAssignment(parent, parentStack2)) { - ctx.s.appendLeft( - id.end + ctx.startOffset, - `: ${genPropsAccessExp(propsLocalToPublicMap[id.name])}` - ); - } - } else { - ctx.s.overwrite( - id.start + ctx.startOffset, - id.end + ctx.startOffset, - genPropsAccessExp(propsLocalToPublicMap[id.name]) - ); - } - } - function checkUsage(node, method, alias = method) { - if (isCallOf(node, alias)) { - const arg = unwrapTSNode(node.arguments[0]); - if (arg.type === "Identifier" && currentScope[arg.name]) { - ctx.error( - `"${arg.name}" is a destructured prop and should not be passed directly to ${method}(). Pass a getter () => ${arg.name} instead.`, - arg - ); - } - } - } - const ast = ctx.scriptSetupAst; - walkScope(ast, true); - walk$2(ast, { - enter(node, parent) { - parent && parentStack.push(parent); - if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) { - return this.skip(); - } - checkUsage(node, "watch", vueImportAliases.watch); - checkUsage(node, "toRef", vueImportAliases.toRef); - if (isFunctionType(node)) { - pushScope(); - walkFunctionParams(node, registerLocalBinding); - if (node.body.type === "BlockStatement") { - walkScope(node.body); - } - return; - } - if (node.type === "CatchClause") { - pushScope(); - if (node.param && node.param.type === "Identifier") { - registerLocalBinding(node.param); - } - walkScope(node.body); - return; - } - if (node.type === "BlockStatement" && !isFunctionType(parent)) { - pushScope(); - walkScope(node); - return; - } - if (node.type === "Identifier") { - if (isReferencedIdentifier(node, parent, parentStack) && !excludedIds.has(node)) { - if (currentScope[node.name]) { - rewriteId(node, parent, parentStack); - } - } - } - }, - leave(node, parent) { - parent && parentStack.pop(); - if (node.type === "BlockStatement" && !isFunctionType(parent) || isFunctionType(node)) { - popScope(); - } - } - }); -} - -const DEFINE_EMITS = "defineEmits"; -function processDefineEmits(ctx, node, declId) { - if (!isCallOf(node, DEFINE_EMITS)) { - return false; - } - if (ctx.hasDefineEmitCall) { - ctx.error(`duplicate ${DEFINE_EMITS}() call`, node); - } - ctx.hasDefineEmitCall = true; - ctx.emitsRuntimeDecl = node.arguments[0]; - if (node.typeParameters) { - if (ctx.emitsRuntimeDecl) { - ctx.error( - `${DEFINE_EMITS}() cannot accept both type and non-type arguments at the same time. Use one or the other.`, - node - ); - } - ctx.emitsTypeDecl = node.typeParameters.params[0]; - } - ctx.emitDecl = declId; - return true; -} -function genRuntimeEmits(ctx) { - let emitsDecl = ""; - if (ctx.emitsRuntimeDecl) { - emitsDecl = ctx.getString(ctx.emitsRuntimeDecl).trim(); - } else if (ctx.emitsTypeDecl) { - const typeDeclaredEmits = extractRuntimeEmits(ctx); - emitsDecl = typeDeclaredEmits.size ? `[${Array.from(typeDeclaredEmits).map((k) => JSON.stringify(k)).join(", ")}]` : ``; - } - if (ctx.hasDefineModelCall) { - let modelEmitsDecl = `[${Object.keys(ctx.modelDecls).map((n) => JSON.stringify(`update:${n}`)).join(", ")}]`; - emitsDecl = emitsDecl ? `/*@__PURE__*/${ctx.helper( - "mergeModels" - )}(${emitsDecl}, ${modelEmitsDecl})` : modelEmitsDecl; - } - return emitsDecl; -} -function extractRuntimeEmits(ctx) { - const emits = /* @__PURE__ */ new Set(); - const node = ctx.emitsTypeDecl; - if (node.type === "TSFunctionType") { - extractEventNames(ctx, node.parameters[0], emits); - return emits; - } - const { props, calls } = resolveTypeElements(ctx, node); - let hasProperty = false; - for (const key in props) { - emits.add(key); - hasProperty = true; - } - if (calls) { - if (hasProperty) { - ctx.error( - `defineEmits() type cannot mixed call signature and property syntax.`, - node - ); - } - for (const call of calls) { - extractEventNames(ctx, call.parameters[0], emits); - } - } - return emits; -} -function extractEventNames(ctx, eventName, emits) { - if (eventName.type === "Identifier" && eventName.typeAnnotation && eventName.typeAnnotation.type === "TSTypeAnnotation") { - const types = resolveUnionType(ctx, eventName.typeAnnotation.typeAnnotation); - for (const type of types) { - if (type.type === "TSLiteralType") { - if (type.literal.type !== "UnaryExpression" && type.literal.type !== "TemplateLiteral") { - emits.add(String(type.literal.value)); - } - } - } - } -} - -const DEFINE_EXPOSE = "defineExpose"; -function processDefineExpose(ctx, node) { - if (isCallOf(node, DEFINE_EXPOSE)) { - if (ctx.hasDefineExposeCall) { - ctx.error(`duplicate ${DEFINE_EXPOSE}() call`, node); - } - ctx.hasDefineExposeCall = true; - return true; - } - return false; -} - -const DEFINE_SLOTS = "defineSlots"; -function processDefineSlots(ctx, node, declId) { - if (!isCallOf(node, DEFINE_SLOTS)) { - return false; - } - if (ctx.hasDefineSlotsCall) { - ctx.error(`duplicate ${DEFINE_SLOTS}() call`, node); - } - ctx.hasDefineSlotsCall = true; - if (node.arguments.length > 0) { - ctx.error(`${DEFINE_SLOTS}() cannot accept arguments`, node); - } - if (declId) { - ctx.s.overwrite( - ctx.startOffset + node.start, - ctx.startOffset + node.end, - `${ctx.helper("useSlots")}()` - ); - } - return true; -} - -const DEFINE_OPTIONS = "defineOptions"; -function processDefineOptions(ctx, node) { - if (!isCallOf(node, DEFINE_OPTIONS)) { - return false; - } - if (ctx.hasDefineOptionsCall) { - ctx.error(`duplicate ${DEFINE_OPTIONS}() call`, node); - } - if (node.typeParameters) { - ctx.error(`${DEFINE_OPTIONS}() cannot accept type arguments`, node); - } - if (!node.arguments[0]) return true; - ctx.hasDefineOptionsCall = true; - ctx.optionsRuntimeDecl = unwrapTSNode(node.arguments[0]); - let propsOption = void 0; - let emitsOption = void 0; - let exposeOption = void 0; - let slotsOption = void 0; - if (ctx.optionsRuntimeDecl.type === "ObjectExpression") { - for (const prop of ctx.optionsRuntimeDecl.properties) { - if ((prop.type === "ObjectProperty" || prop.type === "ObjectMethod") && prop.key.type === "Identifier") { - switch (prop.key.name) { - case "props": - propsOption = prop; - break; - case "emits": - emitsOption = prop; - break; - case "expose": - exposeOption = prop; - break; - case "slots": - slotsOption = prop; - break; - } - } - } - } - if (propsOption) { - ctx.error( - `${DEFINE_OPTIONS}() cannot be used to declare props. Use ${DEFINE_PROPS}() instead.`, - propsOption - ); - } - if (emitsOption) { - ctx.error( - `${DEFINE_OPTIONS}() cannot be used to declare emits. Use ${DEFINE_EMITS}() instead.`, - emitsOption - ); - } - if (exposeOption) { - ctx.error( - `${DEFINE_OPTIONS}() cannot be used to declare expose. Use ${DEFINE_EXPOSE}() instead.`, - exposeOption - ); - } - if (slotsOption) { - ctx.error( - `${DEFINE_OPTIONS}() cannot be used to declare slots. Use ${DEFINE_SLOTS}() instead.`, - slotsOption - ); - } - return true; -} - -function processAwait(ctx, node, needSemi, isStatement) { - const argumentStart = node.argument.extra && node.argument.extra.parenthesized ? node.argument.extra.parenStart : node.argument.start; - const startOffset = ctx.startOffset; - const argumentStr = ctx.descriptor.source.slice( - argumentStart + startOffset, - node.argument.end + startOffset - ); - const containsNestedAwait = /\bawait\b/.test(argumentStr); - ctx.s.overwrite( - node.start + startOffset, - argumentStart + startOffset, - `${needSemi ? `;` : ``}( - ([__temp,__restore] = ${ctx.helper( - `withAsyncContext` - )}(${containsNestedAwait ? `async ` : ``}() => ` - ); - ctx.s.appendLeft( - node.end + startOffset, - `)), - ${isStatement ? `` : `__temp = `}await __temp, - __restore()${isStatement ? `` : `, - __temp`} -)` - ); -} - -var __defProp$1 = Object.defineProperty; -var __defProps = Object.defineProperties; -var __getOwnPropDescs = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols; -var __hasOwnProp$1 = Object.prototype.hasOwnProperty; -var __propIsEnum$1 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues$1 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$1.call(b, prop)) - __defNormalProp$1(a, prop, b[prop]); - if (__getOwnPropSymbols$1) - for (var prop of __getOwnPropSymbols$1(b)) { - if (__propIsEnum$1.call(b, prop)) - __defNormalProp$1(a, prop, b[prop]); - } - return a; -}; -var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); -const MACROS = [ - DEFINE_PROPS, - DEFINE_EMITS, - DEFINE_EXPOSE, - DEFINE_OPTIONS, - DEFINE_SLOTS, - DEFINE_MODEL, - WITH_DEFAULTS -]; -function compileScript(sfc, options) { - var _a, _b, _c; - if (!options.id) { - warnOnce$1( - `compileScript now requires passing the \`id\` option. -Upgrade your vite or vue-loader version for compatibility with the latest experimental proposals.` - ); - } - const ctx = new ScriptCompileContext(sfc, options); - const { script, scriptSetup, source, filename } = sfc; - const hoistStatic = options.hoistStatic !== false && !script; - const scopeId = options.id ? options.id.replace(/^data-v-/, "") : ""; - const scriptLang = script && script.lang; - const scriptSetupLang = scriptSetup && scriptSetup.lang; - if (!scriptSetup) { - if (!script) { - throw new Error(`[@vue/compiler-sfc] SFC contains no <script> tags.`); - } - return processNormalScript(ctx, scopeId); - } - if (script && scriptLang !== scriptSetupLang) { - throw new Error( - `[@vue/compiler-sfc] <script> and <script setup> must have the same language type.` - ); - } - if (scriptSetupLang && !ctx.isJS && !ctx.isTS) { - return scriptSetup; - } - const scriptBindings = /* @__PURE__ */ Object.create(null); - const setupBindings = /* @__PURE__ */ Object.create(null); - let defaultExport; - let hasAwait = false; - let hasInlinedSsrRenderFn = false; - const startOffset = ctx.startOffset; - const endOffset = ctx.endOffset; - const scriptStartOffset = script && script.loc.start.offset; - const scriptEndOffset = script && script.loc.end.offset; - function hoistNode(node) { - const start = node.start + startOffset; - let end = node.end + startOffset; - if (node.trailingComments && node.trailingComments.length > 0) { - const lastCommentNode = node.trailingComments[node.trailingComments.length - 1]; - end = lastCommentNode.end + startOffset; - } - while (end <= source.length) { - if (!/\s/.test(source.charAt(end))) { - break; - } - end++; - } - ctx.s.move(start, end, 0); - } - function registerUserImport(source2, local, imported, isType, isFromSetup, needTemplateUsageCheck) { - let isUsedInTemplate = needTemplateUsageCheck; - if (needTemplateUsageCheck && ctx.isTS && sfc.template && !sfc.template.src && !sfc.template.lang) { - isUsedInTemplate = isImportUsed(local, sfc); - } - ctx.userImports[local] = { - isType, - imported, - local, - source: source2, - isFromSetup, - isUsedInTemplate - }; - } - function checkInvalidScopeReference(node, method) { - if (!node) return; - walkIdentifiers(node, (id) => { - const binding = setupBindings[id.name]; - if (binding && binding !== "literal-const") { - ctx.error( - `\`${method}()\` in <script setup> cannot reference locally declared variables because it will be hoisted outside of the setup() function. If your component options require initialization in the module scope, use a separate normal <script> to export the options instead.`, - id - ); - } - }); - } - const scriptAst = ctx.scriptAst; - const scriptSetupAst = ctx.scriptSetupAst; - if (scriptAst) { - for (const node of scriptAst.body) { - if (node.type === "ImportDeclaration") { - for (const specifier of node.specifiers) { - const imported = getImportedName(specifier); - registerUserImport( - node.source.value, - specifier.local.name, - imported, - node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type", - false, - !options.inlineTemplate - ); - } - } - } - } - for (const node of scriptSetupAst.body) { - if (node.type === "ImportDeclaration") { - hoistNode(node); - let removed = 0; - const removeSpecifier = (i) => { - const removeLeft = i > removed; - removed++; - const current = node.specifiers[i]; - const next = node.specifiers[i + 1]; - ctx.s.remove( - removeLeft ? node.specifiers[i - 1].end + startOffset : current.start + startOffset, - next && !removeLeft ? next.start + startOffset : current.end + startOffset - ); - }; - for (let i = 0; i < node.specifiers.length; i++) { - const specifier = node.specifiers[i]; - const local = specifier.local.name; - const imported = getImportedName(specifier); - const source2 = node.source.value; - const existing = ctx.userImports[local]; - if (source2 === "vue" && MACROS.includes(imported)) { - if (local === imported) { - warnOnce$1( - `\`${imported}\` is a compiler macro and no longer needs to be imported.` - ); - } else { - ctx.error( - `\`${imported}\` is a compiler macro and cannot be aliased to a different name.`, - specifier - ); - } - removeSpecifier(i); - } else if (existing) { - if (existing.source === source2 && existing.imported === imported) { - removeSpecifier(i); - } else { - ctx.error( - `different imports aliased to same local name.`, - specifier - ); - } - } else { - registerUserImport( - source2, - local, - imported, - node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type", - true, - !options.inlineTemplate - ); - } - } - if (node.specifiers.length && removed === node.specifiers.length) { - ctx.s.remove(node.start + startOffset, node.end + startOffset); - } - } - } - const vueImportAliases = {}; - for (const key in ctx.userImports) { - const { source: source2, imported, local } = ctx.userImports[key]; - if (source2 === "vue") vueImportAliases[imported] = local; - } - if (script && scriptAst) { - for (const node of scriptAst.body) { - if (node.type === "ExportDefaultDeclaration") { - defaultExport = node; - let optionProperties; - if (defaultExport.declaration.type === "ObjectExpression") { - optionProperties = defaultExport.declaration.properties; - } else if (defaultExport.declaration.type === "CallExpression" && defaultExport.declaration.arguments[0] && defaultExport.declaration.arguments[0].type === "ObjectExpression") { - optionProperties = defaultExport.declaration.arguments[0].properties; - } - if (optionProperties) { - for (const p of optionProperties) { - if (p.type === "ObjectProperty" && p.key.type === "Identifier" && p.key.name === "name") { - ctx.hasDefaultExportName = true; - } - if ((p.type === "ObjectMethod" || p.type === "ObjectProperty") && p.key.type === "Identifier" && p.key.name === "render") { - ctx.hasDefaultExportRender = true; - } - } - } - const start = node.start + scriptStartOffset; - const end = node.declaration.start + scriptStartOffset; - ctx.s.overwrite(start, end, `const ${normalScriptDefaultVar} = `); - } else if (node.type === "ExportNamedDeclaration") { - const defaultSpecifier = node.specifiers.find( - (s) => s.exported.type === "Identifier" && s.exported.name === "default" - ); - if (defaultSpecifier) { - defaultExport = node; - if (node.specifiers.length > 1) { - ctx.s.remove( - defaultSpecifier.start + scriptStartOffset, - defaultSpecifier.end + scriptStartOffset - ); - } else { - ctx.s.remove( - node.start + scriptStartOffset, - node.end + scriptStartOffset - ); - } - if (node.source) { - ctx.s.prepend( - `import { ${defaultSpecifier.local.name} as ${normalScriptDefaultVar} } from '${node.source.value}' -` - ); - } else { - ctx.s.appendLeft( - scriptEndOffset, - ` -const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name} -` - ); - } - } - if (node.declaration) { - walkDeclaration( - "script", - node.declaration, - scriptBindings, - vueImportAliases, - hoistStatic - ); - } - } else if ((node.type === "VariableDeclaration" || node.type === "FunctionDeclaration" || node.type === "ClassDeclaration" || node.type === "TSEnumDeclaration") && !node.declare) { - walkDeclaration( - "script", - node, - scriptBindings, - vueImportAliases, - hoistStatic - ); - } - } - if (scriptStartOffset > startOffset) { - if (!/\n$/.test(script.content.trim())) { - ctx.s.appendLeft(scriptEndOffset, ` -`); - } - ctx.s.move(scriptStartOffset, scriptEndOffset, 0); - } - } - for (const node of scriptSetupAst.body) { - if (node.type === "ExpressionStatement") { - const expr = unwrapTSNode(node.expression); - if (processDefineProps(ctx, expr) || processDefineEmits(ctx, expr) || processDefineOptions(ctx, expr) || processDefineSlots(ctx, expr)) { - ctx.s.remove(node.start + startOffset, node.end + startOffset); - } else if (processDefineExpose(ctx, expr)) { - const callee = expr.callee; - ctx.s.overwrite( - callee.start + startOffset, - callee.end + startOffset, - "__expose" - ); - } else { - processDefineModel(ctx, expr); - } - } - if (node.type === "VariableDeclaration" && !node.declare) { - const total = node.declarations.length; - let left = total; - let lastNonRemoved; - for (let i = 0; i < total; i++) { - const decl = node.declarations[i]; - const init = decl.init && unwrapTSNode(decl.init); - if (init) { - if (processDefineOptions(ctx, init)) { - ctx.error( - `${DEFINE_OPTIONS}() has no returning value, it cannot be assigned.`, - node - ); - } - const isDefineProps = processDefineProps(ctx, init, decl.id); - if (ctx.propsDestructureRestId) { - setupBindings[ctx.propsDestructureRestId] = "setup-reactive-const"; - } - const isDefineEmits = !isDefineProps && processDefineEmits(ctx, init, decl.id); - !isDefineEmits && (processDefineSlots(ctx, init, decl.id) || processDefineModel(ctx, init, decl.id)); - if (isDefineProps && !ctx.propsDestructureRestId && ctx.propsDestructureDecl) { - if (left === 1) { - ctx.s.remove(node.start + startOffset, node.end + startOffset); - } else { - let start = decl.start + startOffset; - let end = decl.end + startOffset; - if (i === total - 1) { - start = node.declarations[lastNonRemoved].end + startOffset; - } else { - end = node.declarations[i + 1].start + startOffset; - } - ctx.s.remove(start, end); - left--; - } - } else if (isDefineEmits) { - ctx.s.overwrite( - startOffset + init.start, - startOffset + init.end, - "__emit" - ); - } else { - lastNonRemoved = i; - } - } - } - } - let isAllLiteral = false; - if ((node.type === "VariableDeclaration" || node.type === "FunctionDeclaration" || node.type === "ClassDeclaration" || node.type === "TSEnumDeclaration") && !node.declare) { - isAllLiteral = walkDeclaration( - "scriptSetup", - node, - setupBindings, - vueImportAliases, - hoistStatic, - !!ctx.propsDestructureDecl - ); - } - if (hoistStatic && isAllLiteral) { - hoistNode(node); - } - if (node.type === "VariableDeclaration" && !node.declare || node.type.endsWith("Statement")) { - const scope = [scriptSetupAst.body]; - walk$2(node, { - enter(child, parent) { - if (isFunctionType(child)) { - this.skip(); - } - if (child.type === "BlockStatement") { - scope.push(child.body); - } - if (child.type === "AwaitExpression") { - hasAwait = true; - const currentScope = scope[scope.length - 1]; - const needsSemi = currentScope.some((n, i) => { - return (scope.length === 1 || i > 0) && n.type === "ExpressionStatement" && n.start === child.start; - }); - processAwait( - ctx, - child, - needsSemi, - parent.type === "ExpressionStatement" - ); - } - }, - exit(node2) { - if (node2.type === "BlockStatement") scope.pop(); - } - }); - } - if (node.type === "ExportNamedDeclaration" && node.exportKind !== "type" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration") { - ctx.error( - `<script setup> cannot contain ES module exports. If you are using a previous version of <script setup>, please consult the updated RFC at https://github.com/vuejs/rfcs/pull/227.`, - node - ); - } - if (ctx.isTS) { - if (node.type.startsWith("TS") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "VariableDeclaration" && node.declare) { - if (node.type !== "TSEnumDeclaration") { - hoistNode(node); - } - } - } - } - if (ctx.propsDestructureDecl) { - transformDestructuredProps(ctx, vueImportAliases); - } - checkInvalidScopeReference(ctx.propsRuntimeDecl, DEFINE_PROPS); - checkInvalidScopeReference(ctx.propsRuntimeDefaults, DEFINE_PROPS); - checkInvalidScopeReference(ctx.propsDestructureDecl, DEFINE_PROPS); - checkInvalidScopeReference(ctx.emitsRuntimeDecl, DEFINE_EMITS); - checkInvalidScopeReference(ctx.optionsRuntimeDecl, DEFINE_OPTIONS); - for (const { runtimeOptionNodes } of Object.values(ctx.modelDecls)) { - for (const node of runtimeOptionNodes) { - checkInvalidScopeReference(node, DEFINE_MODEL); - } - } - if (script) { - if (startOffset < scriptStartOffset) { - ctx.s.remove(0, startOffset); - ctx.s.remove(endOffset, scriptStartOffset); - ctx.s.remove(scriptEndOffset, source.length); - } else { - ctx.s.remove(0, scriptStartOffset); - ctx.s.remove(scriptEndOffset, startOffset); - ctx.s.remove(endOffset, source.length); - } - } else { - ctx.s.remove(0, startOffset); - ctx.s.remove(endOffset, source.length); - } - if (scriptAst) { - Object.assign(ctx.bindingMetadata, analyzeScriptBindings(scriptAst.body)); - } - for (const [key, { isType, imported, source: source2 }] of Object.entries( - ctx.userImports - )) { - if (isType) continue; - ctx.bindingMetadata[key] = imported === "*" || imported === "default" && source2.endsWith(".vue") || source2 === "vue" ? "setup-const" : "setup-maybe-ref"; - } - for (const key in scriptBindings) { - ctx.bindingMetadata[key] = scriptBindings[key]; - } - for (const key in setupBindings) { - ctx.bindingMetadata[key] = setupBindings[key]; - } - if (sfc.cssVars.length && // no need to do this when targeting SSR - !((_a = options.templateOptions) == null ? void 0 : _a.ssr)) { - ctx.helperImports.add(CSS_VARS_HELPER); - ctx.helperImports.add("unref"); - ctx.s.prependLeft( - startOffset, - ` -${genCssVarsCode( - sfc.cssVars, - ctx.bindingMetadata, - scopeId, - !!options.isProd - )} -` - ); - } - let args = `__props`; - if (ctx.propsTypeDecl) { - args += `: any`; - } - if (ctx.propsDecl) { - if (ctx.propsDestructureRestId) { - ctx.s.overwrite( - startOffset + ctx.propsCall.start, - startOffset + ctx.propsCall.end, - `${ctx.helper(`createPropsRestProxy`)}(__props, ${JSON.stringify( - Object.keys(ctx.propsDestructuredBindings) - )})` - ); - ctx.s.overwrite( - startOffset + ctx.propsDestructureDecl.start, - startOffset + ctx.propsDestructureDecl.end, - ctx.propsDestructureRestId - ); - } else if (!ctx.propsDestructureDecl) { - ctx.s.overwrite( - startOffset + ctx.propsCall.start, - startOffset + ctx.propsCall.end, - "__props" - ); - } - } - if (hasAwait) { - const any = ctx.isTS ? `: any` : ``; - ctx.s.prependLeft(startOffset, ` -let __temp${any}, __restore${any} -`); - } - const destructureElements = ctx.hasDefineExposeCall || !options.inlineTemplate ? [`expose: __expose`] : []; - if (ctx.emitDecl) { - destructureElements.push(`emit: __emit`); - } - if (destructureElements.length) { - args += `, { ${destructureElements.join(", ")} }`; - } - let returned; - if (!options.inlineTemplate || !sfc.template && ctx.hasDefaultExportRender) { - const allBindings = __spreadValues$1(__spreadValues$1({}, scriptBindings), setupBindings); - for (const key in ctx.userImports) { - if (!ctx.userImports[key].isType && ctx.userImports[key].isUsedInTemplate) { - allBindings[key] = true; - } - } - returned = `{ `; - for (const key in allBindings) { - if (allBindings[key] === true && ctx.userImports[key].source !== "vue" && !ctx.userImports[key].source.endsWith(".vue")) { - returned += `get ${key}() { return ${key} }, `; - } else if (ctx.bindingMetadata[key] === "setup-let") { - const setArg = key === "v" ? `_v` : `v`; - returned += `get ${key}() { return ${key} }, set ${key}(${setArg}) { ${key} = ${setArg} }, `; - } else { - returned += `${key}, `; - } - } - returned = returned.replace(/, $/, "") + ` }`; - } else { - if (sfc.template && !sfc.template.src) { - if (options.templateOptions && options.templateOptions.ssr) { - hasInlinedSsrRenderFn = true; - } - const { code, ast, preamble, tips, errors } = compileTemplate(__spreadProps(__spreadValues$1({ - filename, - ast: sfc.template.ast, - source: sfc.template.content, - inMap: sfc.template.map - }, options.templateOptions), { - id: scopeId, - scoped: sfc.styles.some((s) => s.scoped), - isProd: options.isProd, - ssrCssVars: sfc.cssVars, - compilerOptions: __spreadProps(__spreadValues$1({}, options.templateOptions && options.templateOptions.compilerOptions), { - inline: true, - isTS: ctx.isTS, - bindingMetadata: ctx.bindingMetadata - }) - })); - if (tips.length) { - tips.forEach(warnOnce$1); - } - const err = errors[0]; - if (typeof err === "string") { - throw new Error(err); - } else if (err) { - if (err.loc) { - err.message += ` - -` + sfc.filename + "\n" + generateCodeFrame( - source, - err.loc.start.offset, - err.loc.end.offset - ) + ` -`; - } - throw err; - } - if (preamble) { - ctx.s.prepend(preamble); - } - if (ast && ast.helpers.has(UNREF)) { - ctx.helperImports.delete("unref"); - } - returned = code; - } else { - returned = `() => {}`; - } - } - if (!options.inlineTemplate && true) { - ctx.s.appendRight( - endOffset, - ` -const __returned__ = ${returned} -Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true }) -return __returned__ -} - -` - ); - } else { - ctx.s.appendRight(endOffset, ` -return ${returned} -} - -`); - } - const genDefaultAs = options.genDefaultAs ? `const ${options.genDefaultAs} =` : `export default`; - let runtimeOptions = ``; - if (!ctx.hasDefaultExportName && filename && filename !== DEFAULT_FILENAME) { - const match = filename.match(/([^/\\]+)\.\w+$/); - if (match) { - runtimeOptions += ` - __name: '${match[1]}',`; - } - } - if (hasInlinedSsrRenderFn) { - runtimeOptions += ` - __ssrInlineRender: true,`; - } - const propsDecl = genRuntimeProps(ctx); - if (propsDecl) runtimeOptions += ` - props: ${propsDecl},`; - const emitsDecl = genRuntimeEmits(ctx); - if (emitsDecl) runtimeOptions += ` - emits: ${emitsDecl},`; - let definedOptions = ""; - if (ctx.optionsRuntimeDecl) { - definedOptions = scriptSetup.content.slice(ctx.optionsRuntimeDecl.start, ctx.optionsRuntimeDecl.end).trim(); - } - const exposeCall = ctx.hasDefineExposeCall || options.inlineTemplate ? `` : ` __expose(); -`; - if (ctx.isTS) { - const def = (defaultExport ? ` - ...${normalScriptDefaultVar},` : ``) + (definedOptions ? ` - ...${definedOptions},` : ""); - ctx.s.prependLeft( - startOffset, - ` -${genDefaultAs} /*@__PURE__*/${ctx.helper( - `defineComponent` - )}({${def}${runtimeOptions} - ${hasAwait ? `async ` : ``}setup(${args}) { -${exposeCall}` - ); - ctx.s.appendRight(endOffset, `})`); - } else { - if (defaultExport || definedOptions) { - ctx.s.prependLeft( - startOffset, - ` -${genDefaultAs} /*@__PURE__*/Object.assign(${defaultExport ? `${normalScriptDefaultVar}, ` : ""}${definedOptions ? `${definedOptions}, ` : ""}{${runtimeOptions} - ${hasAwait ? `async ` : ``}setup(${args}) { -${exposeCall}` - ); - ctx.s.appendRight(endOffset, `})`); - } else { - ctx.s.prependLeft( - startOffset, - ` -${genDefaultAs} {${runtimeOptions} - ${hasAwait ? `async ` : ``}setup(${args}) { -${exposeCall}` - ); - ctx.s.appendRight(endOffset, `}`); - } - } - if (ctx.helperImports.size > 0) { - const runtimeModuleName = (_c = (_b = options.templateOptions) == null ? void 0 : _b.compilerOptions) == null ? void 0 : _c.runtimeModuleName; - const importSrc = runtimeModuleName ? JSON.stringify(runtimeModuleName) : `'vue'`; - ctx.s.prepend( - `import { ${[...ctx.helperImports].map((h) => `${h} as _${h}`).join(", ")} } from ${importSrc} -` - ); - } - return __spreadProps(__spreadValues$1({}, scriptSetup), { - bindings: ctx.bindingMetadata, - imports: ctx.userImports, - content: ctx.s.toString(), - map: options.sourceMap !== false ? ctx.s.generateMap({ - source: filename, - hires: true, - includeContent: true - }) : void 0, - scriptAst: scriptAst == null ? void 0 : scriptAst.body, - scriptSetupAst: scriptSetupAst == null ? void 0 : scriptSetupAst.body, - deps: ctx.deps ? [...ctx.deps] : void 0 - }); -} -function registerBinding(bindings, node, type) { - bindings[node.name] = type; -} -function walkDeclaration(from, node, bindings, userImportAliases, hoistStatic, isPropsDestructureEnabled = false) { - let isAllLiteral = false; - if (node.type === "VariableDeclaration") { - const isConst = node.kind === "const"; - isAllLiteral = isConst && node.declarations.every( - (decl) => decl.id.type === "Identifier" && isStaticNode(decl.init) - ); - for (const { id, init: _init } of node.declarations) { - const init = _init && unwrapTSNode(_init); - const isConstMacroCall = isConst && isCallOf( - init, - (c) => c === DEFINE_PROPS || c === DEFINE_EMITS || c === WITH_DEFAULTS || c === DEFINE_SLOTS - ); - if (id.type === "Identifier") { - let bindingType; - const userReactiveBinding = userImportAliases["reactive"]; - if ((hoistStatic || from === "script") && (isAllLiteral || isConst && isStaticNode(init))) { - bindingType = "literal-const"; - } else if (isCallOf(init, userReactiveBinding)) { - bindingType = isConst ? "setup-reactive-const" : "setup-let"; - } else if ( - // if a declaration is a const literal, we can mark it so that - // the generated render fn code doesn't need to unref() it - isConstMacroCall || isConst && canNeverBeRef(init, userReactiveBinding) - ) { - bindingType = isCallOf(init, DEFINE_PROPS) ? "setup-reactive-const" : "setup-const"; - } else if (isConst) { - if (isCallOf( - init, - (m) => m === userImportAliases["ref"] || m === userImportAliases["computed"] || m === userImportAliases["shallowRef"] || m === userImportAliases["customRef"] || m === userImportAliases["toRef"] || m === DEFINE_MODEL - )) { - bindingType = "setup-ref"; - } else { - bindingType = "setup-maybe-ref"; - } - } else { - bindingType = "setup-let"; - } - registerBinding(bindings, id, bindingType); - } else { - if (isCallOf(init, DEFINE_PROPS) && isPropsDestructureEnabled) { - continue; - } - if (id.type === "ObjectPattern") { - walkObjectPattern(id, bindings, isConst, isConstMacroCall); - } else if (id.type === "ArrayPattern") { - walkArrayPattern(id, bindings, isConst, isConstMacroCall); - } - } - } - } else if (node.type === "TSEnumDeclaration") { - isAllLiteral = node.members.every( - (member) => !member.initializer || isStaticNode(member.initializer) - ); - bindings[node.id.name] = isAllLiteral ? "literal-const" : "setup-const"; - } else if (node.type === "FunctionDeclaration" || node.type === "ClassDeclaration") { - bindings[node.id.name] = "setup-const"; - } - return isAllLiteral; -} -function walkObjectPattern(node, bindings, isConst, isDefineCall = false) { - for (const p of node.properties) { - if (p.type === "ObjectProperty") { - if (p.key.type === "Identifier" && p.key === p.value) { - const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; - registerBinding(bindings, p.key, type); - } else { - walkPattern(p.value, bindings, isConst, isDefineCall); - } - } else { - const type = isConst ? "setup-const" : "setup-let"; - registerBinding(bindings, p.argument, type); - } - } -} -function walkArrayPattern(node, bindings, isConst, isDefineCall = false) { - for (const e of node.elements) { - e && walkPattern(e, bindings, isConst, isDefineCall); - } -} -function walkPattern(node, bindings, isConst, isDefineCall = false) { - if (node.type === "Identifier") { - const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; - registerBinding(bindings, node, type); - } else if (node.type === "RestElement") { - const type = isConst ? "setup-const" : "setup-let"; - registerBinding(bindings, node.argument, type); - } else if (node.type === "ObjectPattern") { - walkObjectPattern(node, bindings, isConst); - } else if (node.type === "ArrayPattern") { - walkArrayPattern(node, bindings, isConst); - } else if (node.type === "AssignmentPattern") { - if (node.left.type === "Identifier") { - const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; - registerBinding(bindings, node.left, type); - } else { - walkPattern(node.left, bindings, isConst); - } - } -} -function canNeverBeRef(node, userReactiveImport) { - if (isCallOf(node, userReactiveImport)) { - return true; - } - switch (node.type) { - case "UnaryExpression": - case "BinaryExpression": - case "ArrayExpression": - case "ObjectExpression": - case "FunctionExpression": - case "ArrowFunctionExpression": - case "UpdateExpression": - case "ClassExpression": - case "TaggedTemplateExpression": - return true; - case "SequenceExpression": - return canNeverBeRef( - node.expressions[node.expressions.length - 1], - userReactiveImport - ); - default: - if (isLiteralNode(node)) { - return true; - } - return false; - } -} -function isStaticNode(node) { - node = unwrapTSNode(node); - switch (node.type) { - case "UnaryExpression": - return isStaticNode(node.argument); - case "LogicalExpression": - // 1 > 2 - case "BinaryExpression": - return isStaticNode(node.left) && isStaticNode(node.right); - case "ConditionalExpression": { - return isStaticNode(node.test) && isStaticNode(node.consequent) && isStaticNode(node.alternate); - } - case "SequenceExpression": - // (1, 2) - case "TemplateLiteral": - return node.expressions.every((expr) => isStaticNode(expr)); - case "ParenthesizedExpression": - return isStaticNode(node.expression); - case "StringLiteral": - case "NumericLiteral": - case "BooleanLiteral": - case "NullLiteral": - case "BigIntLiteral": - return true; - } - return false; -} - -var __defProp = Object.defineProperty; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(b)) { - if (__propIsEnum.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - } - return a; -}; -const version = "3.5.13"; -const parseCache = parseCache$1; -const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages); -const walk = walk$2; -const shouldTransformRef = () => false; - -var parse$4 = libExports.parse; -export { MagicString, parse$4 as babelParse, compileScript, compileStyle, compileStyleAsync, compileTemplate, errorMessages, extractIdentifiers$1 as extractIdentifiers, extractRuntimeEmits, extractRuntimeProps, generateCodeFrame, inferRuntimeType, invalidateTypeCache, isInDestructureAssignment, isStaticProperty, parse$2 as parse, parseCache, registerTS, resolveTypeElements, rewriteDefault, rewriteDefaultAST, shouldTransformRef, version, walk, walkIdentifiers }; diff --git a/node_modules/@vue/compiler-sfc/package.json b/node_modules/@vue/compiler-sfc/package.json deleted file mode 100644 index 368ea40..0000000 --- a/node_modules/@vue/compiler-sfc/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "@vue/compiler-sfc", - "version": "3.5.13", - "description": "@vue/compiler-sfc", - "main": "dist/compiler-sfc.cjs.js", - "module": "dist/compiler-sfc.esm-browser.js", - "types": "dist/compiler-sfc.d.ts", - "files": [ - "dist" - ], - "exports": { - ".": { - "types": "./dist/compiler-sfc.d.ts", - "node": "./dist/compiler-sfc.cjs.js", - "module": "./dist/compiler-sfc.esm-browser.js", - "import": "./dist/compiler-sfc.esm-browser.js", - "require": "./dist/compiler-sfc.cjs.js" - }, - "./*": "./*" - }, - "buildOptions": { - "name": "VueCompilerSFC", - "formats": [ - "cjs", - "esm-browser" - ], - "prod": false, - "enableNonBrowserBranches": true - }, - "repository": { - "type": "git", - "url": "git+https://github.com/vuejs/core.git", - "directory": "packages/compiler-sfc" - }, - "keywords": [ - "vue" - ], - "author": "Evan You", - "license": "MIT", - "bugs": { - "url": "https://github.com/vuejs/core/issues" - }, - "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme", - "dependencies": { - "@babel/parser": "^7.25.3", - "estree-walker": "^2.0.2", - "magic-string": "^0.30.11", - "postcss": "^8.4.48", - "source-map-js": "^1.2.0", - "@vue/compiler-core": "3.5.13", - "@vue/shared": "3.5.13", - "@vue/compiler-dom": "3.5.13", - "@vue/compiler-ssr": "3.5.13" - }, - "devDependencies": { - "@babel/types": "^7.25.2", - "@vue/consolidate": "^1.0.0", - "hash-sum": "^2.0.0", - "lru-cache": "10.1.0", - "merge-source-map": "^1.1.0", - "minimatch": "~9.0.5", - "postcss-modules": "^6.0.0", - "postcss-selector-parser": "^7.0.0", - "pug": "^3.0.3", - "sass": "^1.80.6" - } -} \ No newline at end of file diff --git a/node_modules/@vue/compiler-ssr/LICENSE b/node_modules/@vue/compiler-ssr/LICENSE deleted file mode 100644 index 15f1f7e..0000000 --- a/node_modules/@vue/compiler-ssr/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018-present, Yuxi (Evan) You - -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/node_modules/@vue/compiler-ssr/README.md b/node_modules/@vue/compiler-ssr/README.md deleted file mode 100644 index 9337906..0000000 --- a/node_modules/@vue/compiler-ssr/README.md +++ /dev/null @@ -1 +0,0 @@ -# @vue/compiler-ssr diff --git a/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js b/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js deleted file mode 100644 index 241e298..0000000 --- a/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +++ /dev/null @@ -1,1404 +0,0 @@ -/** -* @vue/compiler-ssr v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var compilerDom = require('@vue/compiler-dom'); -var shared = require('@vue/shared'); - -const SSR_INTERPOLATE = Symbol(`ssrInterpolate`); -const SSR_RENDER_VNODE = Symbol(`ssrRenderVNode`); -const SSR_RENDER_COMPONENT = Symbol(`ssrRenderComponent`); -const SSR_RENDER_SLOT = Symbol(`ssrRenderSlot`); -const SSR_RENDER_SLOT_INNER = Symbol(`ssrRenderSlotInner`); -const SSR_RENDER_CLASS = Symbol(`ssrRenderClass`); -const SSR_RENDER_STYLE = Symbol(`ssrRenderStyle`); -const SSR_RENDER_ATTRS = Symbol(`ssrRenderAttrs`); -const SSR_RENDER_ATTR = Symbol(`ssrRenderAttr`); -const SSR_RENDER_DYNAMIC_ATTR = Symbol(`ssrRenderDynamicAttr`); -const SSR_RENDER_LIST = Symbol(`ssrRenderList`); -const SSR_INCLUDE_BOOLEAN_ATTR = Symbol( - `ssrIncludeBooleanAttr` -); -const SSR_LOOSE_EQUAL = Symbol(`ssrLooseEqual`); -const SSR_LOOSE_CONTAIN = Symbol(`ssrLooseContain`); -const SSR_RENDER_DYNAMIC_MODEL = Symbol( - `ssrRenderDynamicModel` -); -const SSR_GET_DYNAMIC_MODEL_PROPS = Symbol( - `ssrGetDynamicModelProps` -); -const SSR_RENDER_TELEPORT = Symbol(`ssrRenderTeleport`); -const SSR_RENDER_SUSPENSE = Symbol(`ssrRenderSuspense`); -const SSR_GET_DIRECTIVE_PROPS = Symbol(`ssrGetDirectiveProps`); -const ssrHelpers = { - [SSR_INTERPOLATE]: `ssrInterpolate`, - [SSR_RENDER_VNODE]: `ssrRenderVNode`, - [SSR_RENDER_COMPONENT]: `ssrRenderComponent`, - [SSR_RENDER_SLOT]: `ssrRenderSlot`, - [SSR_RENDER_SLOT_INNER]: `ssrRenderSlotInner`, - [SSR_RENDER_CLASS]: `ssrRenderClass`, - [SSR_RENDER_STYLE]: `ssrRenderStyle`, - [SSR_RENDER_ATTRS]: `ssrRenderAttrs`, - [SSR_RENDER_ATTR]: `ssrRenderAttr`, - [SSR_RENDER_DYNAMIC_ATTR]: `ssrRenderDynamicAttr`, - [SSR_RENDER_LIST]: `ssrRenderList`, - [SSR_INCLUDE_BOOLEAN_ATTR]: `ssrIncludeBooleanAttr`, - [SSR_LOOSE_EQUAL]: `ssrLooseEqual`, - [SSR_LOOSE_CONTAIN]: `ssrLooseContain`, - [SSR_RENDER_DYNAMIC_MODEL]: `ssrRenderDynamicModel`, - [SSR_GET_DYNAMIC_MODEL_PROPS]: `ssrGetDynamicModelProps`, - [SSR_RENDER_TELEPORT]: `ssrRenderTeleport`, - [SSR_RENDER_SUSPENSE]: `ssrRenderSuspense`, - [SSR_GET_DIRECTIVE_PROPS]: `ssrGetDirectiveProps` -}; -compilerDom.registerRuntimeHelpers(ssrHelpers); - -const ssrTransformIf = compilerDom.createStructuralDirectiveTransform( - /^(if|else|else-if)$/, - compilerDom.processIf -); -function ssrProcessIf(node, context, disableNestedFragments = false, disableComment = false) { - const [rootBranch] = node.branches; - const ifStatement = compilerDom.createIfStatement( - rootBranch.condition, - processIfBranch(rootBranch, context, disableNestedFragments) - ); - context.pushStatement(ifStatement); - let currentIf = ifStatement; - for (let i = 1; i < node.branches.length; i++) { - const branch = node.branches[i]; - const branchBlockStatement = processIfBranch( - branch, - context, - disableNestedFragments - ); - if (branch.condition) { - currentIf = currentIf.alternate = compilerDom.createIfStatement( - branch.condition, - branchBlockStatement - ); - } else { - currentIf.alternate = branchBlockStatement; - } - } - if (!currentIf.alternate && !disableComment) { - currentIf.alternate = compilerDom.createBlockStatement([ - compilerDom.createCallExpression(`_push`, ["`<!---->`"]) - ]); - } -} -function processIfBranch(branch, context, disableNestedFragments = false) { - const { children } = branch; - const needFragmentWrapper = !disableNestedFragments && (children.length !== 1 || children[0].type !== 1) && // optimize away nested fragments when the only child is a ForNode - !(children.length === 1 && children[0].type === 11); - return processChildrenAsStatement(branch, context, needFragmentWrapper); -} - -const ssrTransformFor = compilerDom.createStructuralDirectiveTransform("for", compilerDom.processFor); -function ssrProcessFor(node, context, disableNestedFragments = false) { - const needFragmentWrapper = !disableNestedFragments && (node.children.length !== 1 || node.children[0].type !== 1); - const renderLoop = compilerDom.createFunctionExpression( - compilerDom.createForLoopParams(node.parseResult) - ); - renderLoop.body = processChildrenAsStatement( - node, - context, - needFragmentWrapper - ); - if (!disableNestedFragments) { - context.pushStringPart(`<!--[-->`); - } - context.pushStatement( - compilerDom.createCallExpression(context.helper(SSR_RENDER_LIST), [ - node.source, - renderLoop - ]) - ); - if (!disableNestedFragments) { - context.pushStringPart(`<!--]-->`); - } -} - -const ssrTransformSlotOutlet = (node, context) => { - if (compilerDom.isSlotOutlet(node)) { - const { slotName, slotProps } = compilerDom.processSlotOutlet(node, context); - const args = [ - `_ctx.$slots`, - slotName, - slotProps || `{}`, - // fallback content placeholder. will be replaced in the process phase - `null`, - `_push`, - `_parent` - ]; - if (context.scopeId && context.slotted !== false) { - args.push(`"${context.scopeId}-s"`); - } - let method = SSR_RENDER_SLOT; - let parent = context.parent; - if (parent) { - const children = parent.children; - if (parent.type === 10) { - parent = context.grandParent; - } - let componentType; - if (parent.type === 1 && parent.tagType === 1 && ((componentType = compilerDom.resolveComponentType(parent, context, true)) === compilerDom.TRANSITION || componentType === compilerDom.TRANSITION_GROUP) && children.filter((c) => c.type === 1).length === 1) { - method = SSR_RENDER_SLOT_INNER; - if (!(context.scopeId && context.slotted !== false)) { - args.push("null"); - } - args.push("true"); - } - } - node.ssrCodegenNode = compilerDom.createCallExpression(context.helper(method), args); - } -}; -function ssrProcessSlotOutlet(node, context) { - const renderCall = node.ssrCodegenNode; - if (node.children.length) { - const fallbackRenderFn = compilerDom.createFunctionExpression([]); - fallbackRenderFn.body = processChildrenAsStatement(node, context); - renderCall.arguments[3] = fallbackRenderFn; - } - if (context.withSlotScopeId) { - const slotScopeId = renderCall.arguments[6]; - renderCall.arguments[6] = slotScopeId ? `${slotScopeId} + _scopeId` : `_scopeId`; - } - context.pushStatement(node.ssrCodegenNode); -} - -function createSSRCompilerError(code, loc) { - return compilerDom.createCompilerError(code, loc, SSRErrorMessages); -} -const SSRErrorMessages = { - [65]: `Unsafe attribute name for SSR.`, - [66]: `Missing the 'to' prop on teleport element.`, - [67]: `Invalid AST node during SSR transform.` -}; - -function ssrProcessTeleport(node, context) { - const targetProp = compilerDom.findProp(node, "to"); - if (!targetProp) { - context.onError( - createSSRCompilerError(66, node.loc) - ); - return; - } - let target; - if (targetProp.type === 6) { - target = targetProp.value && compilerDom.createSimpleExpression(targetProp.value.content, true); - } else { - target = targetProp.exp; - } - if (!target) { - context.onError( - createSSRCompilerError( - 66, - targetProp.loc - ) - ); - return; - } - const disabledProp = compilerDom.findProp( - node, - "disabled", - false, - true - /* allow empty */ - ); - const disabled = disabledProp ? disabledProp.type === 6 ? `true` : disabledProp.exp || `false` : `false`; - const contentRenderFn = compilerDom.createFunctionExpression( - [`_push`], - void 0, - // Body is added later - true, - // newline - false, - // isSlot - node.loc - ); - contentRenderFn.body = processChildrenAsStatement(node, context); - context.pushStatement( - compilerDom.createCallExpression(context.helper(SSR_RENDER_TELEPORT), [ - `_push`, - contentRenderFn, - target, - disabled, - `_parent` - ]) - ); -} - -const wipMap$3 = /* @__PURE__ */ new WeakMap(); -function ssrTransformSuspense(node, context) { - return () => { - if (node.children.length) { - const wipEntry = { - slotsExp: null, - // to be immediately set - wipSlots: [] - }; - wipMap$3.set(node, wipEntry); - wipEntry.slotsExp = compilerDom.buildSlots( - node, - context, - (_props, _vForExp, children, loc) => { - const fn = compilerDom.createFunctionExpression( - [], - void 0, - // no return, assign body later - true, - // newline - false, - // suspense slots are not treated as normal slots - loc - ); - wipEntry.wipSlots.push({ - fn, - children - }); - return fn; - } - ).slots; - } - }; -} -function ssrProcessSuspense(node, context) { - const wipEntry = wipMap$3.get(node); - if (!wipEntry) { - return; - } - const { slotsExp, wipSlots } = wipEntry; - for (let i = 0; i < wipSlots.length; i++) { - const slot = wipSlots[i]; - slot.fn.body = processChildrenAsStatement(slot, context); - } - context.pushStatement( - compilerDom.createCallExpression(context.helper(SSR_RENDER_SUSPENSE), [ - `_push`, - slotsExp - ]) - ); -} - -const rawChildrenMap = /* @__PURE__ */ new WeakMap(); -const ssrTransformElement = (node, context) => { - if (node.type !== 1 || node.tagType !== 0) { - return; - } - return function ssrPostTransformElement() { - const openTag = [`<${node.tag}`]; - const needTagForRuntime = node.tag === "textarea" || node.tag.indexOf("-") > 0; - const hasDynamicVBind = compilerDom.hasDynamicKeyVBind(node); - const hasCustomDir = node.props.some( - (p) => p.type === 7 && !shared.isBuiltInDirective(p.name) - ); - const needMergeProps = hasDynamicVBind || hasCustomDir; - if (needMergeProps) { - const { props, directives } = compilerDom.buildProps( - node, - context, - node.props, - false, - false, - true - ); - if (props || directives.length) { - const mergedProps = buildSSRProps(props, directives, context); - const propsExp = compilerDom.createCallExpression( - context.helper(SSR_RENDER_ATTRS), - [mergedProps] - ); - if (node.tag === "textarea") { - const existingText = node.children[0]; - if (!existingText || existingText.type !== 5) { - const tempId = `_temp${context.temps++}`; - propsExp.arguments = [ - compilerDom.createAssignmentExpression( - compilerDom.createSimpleExpression(tempId, false), - mergedProps - ) - ]; - rawChildrenMap.set( - node, - compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [ - compilerDom.createConditionalExpression( - compilerDom.createSimpleExpression(`"value" in ${tempId}`, false), - compilerDom.createSimpleExpression(`${tempId}.value`, false), - compilerDom.createSimpleExpression( - existingText ? existingText.content : ``, - true - ), - false - ) - ]) - ); - } - } else if (node.tag === "input") { - const vModel = findVModel(node); - if (vModel) { - const tempId = `_temp${context.temps++}`; - const tempExp = compilerDom.createSimpleExpression(tempId, false); - propsExp.arguments = [ - compilerDom.createSequenceExpression([ - compilerDom.createAssignmentExpression(tempExp, mergedProps), - compilerDom.createCallExpression(context.helper(compilerDom.MERGE_PROPS), [ - tempExp, - compilerDom.createCallExpression( - context.helper(SSR_GET_DYNAMIC_MODEL_PROPS), - [ - tempExp, - // existing props - vModel.exp - // model - ] - ) - ]) - ]) - ]; - } - } else if (directives.length && !node.children.length) { - const vText = compilerDom.findDir(node, "text"); - if (!vText) { - const tempId = `_temp${context.temps++}`; - propsExp.arguments = [ - compilerDom.createAssignmentExpression( - compilerDom.createSimpleExpression(tempId, false), - mergedProps - ) - ]; - rawChildrenMap.set( - node, - compilerDom.createConditionalExpression( - compilerDom.createSimpleExpression(`"textContent" in ${tempId}`, false), - compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [ - compilerDom.createSimpleExpression(`${tempId}.textContent`, false) - ]), - compilerDom.createSimpleExpression(`${tempId}.innerHTML ?? ''`, false), - false - ) - ); - } - } - if (needTagForRuntime) { - propsExp.arguments.push(`"${node.tag}"`); - } - openTag.push(propsExp); - } - } - let dynamicClassBinding = void 0; - let staticClassBinding = void 0; - let dynamicStyleBinding = void 0; - for (let i = 0; i < node.props.length; i++) { - const prop = node.props[i]; - if (node.tag === "input" && isTrueFalseValue(prop)) { - continue; - } - if (prop.type === 7) { - if (prop.name === "html" && prop.exp) { - rawChildrenMap.set( - node, - compilerDom.createCompoundExpression([`(`, prop.exp, `) ?? ''`]) - ); - } else if (prop.name === "text" && prop.exp) { - node.children = [compilerDom.createInterpolation(prop.exp, prop.loc)]; - } else if (prop.name === "slot") { - context.onError( - compilerDom.createCompilerError(40, prop.loc) - ); - } else if (isTextareaWithValue(node, prop) && prop.exp) { - if (!needMergeProps) { - node.children = [compilerDom.createInterpolation(prop.exp, prop.loc)]; - } - } else if (!needMergeProps && prop.name !== "on") { - const directiveTransform = context.directiveTransforms[prop.name]; - if (directiveTransform) { - const { props, ssrTagParts } = directiveTransform( - prop, - node, - context - ); - if (ssrTagParts) { - openTag.push(...ssrTagParts); - } - for (let j = 0; j < props.length; j++) { - const { key, value } = props[j]; - if (compilerDom.isStaticExp(key)) { - let attrName = key.content; - if (attrName === "key" || attrName === "ref") { - continue; - } - if (attrName === "class") { - openTag.push( - ` class="`, - dynamicClassBinding = compilerDom.createCallExpression( - context.helper(SSR_RENDER_CLASS), - [value] - ), - `"` - ); - } else if (attrName === "style") { - if (dynamicStyleBinding) { - mergeCall(dynamicStyleBinding, value); - } else { - openTag.push( - ` style="`, - dynamicStyleBinding = compilerDom.createCallExpression( - context.helper(SSR_RENDER_STYLE), - [value] - ), - `"` - ); - } - } else { - attrName = node.tag.indexOf("-") > 0 ? attrName : shared.propsToAttrMap[attrName] || attrName.toLowerCase(); - if (shared.isBooleanAttr(attrName)) { - openTag.push( - compilerDom.createConditionalExpression( - compilerDom.createCallExpression( - context.helper(SSR_INCLUDE_BOOLEAN_ATTR), - [value] - ), - compilerDom.createSimpleExpression(" " + attrName, true), - compilerDom.createSimpleExpression("", true), - false - ) - ); - } else if (shared.isSSRSafeAttrName(attrName)) { - openTag.push( - compilerDom.createCallExpression(context.helper(SSR_RENDER_ATTR), [ - key, - value - ]) - ); - } else { - context.onError( - createSSRCompilerError( - 65, - key.loc - ) - ); - } - } - } else { - const args = [key, value]; - if (needTagForRuntime) { - args.push(`"${node.tag}"`); - } - openTag.push( - compilerDom.createCallExpression( - context.helper(SSR_RENDER_DYNAMIC_ATTR), - args - ) - ); - } - } - } - } - } else { - const name = prop.name; - if (node.tag === "textarea" && name === "value" && prop.value) { - rawChildrenMap.set(node, shared.escapeHtml(prop.value.content)); - } else if (!needMergeProps) { - if (name === "key" || name === "ref") { - continue; - } - if (name === "class" && prop.value) { - staticClassBinding = JSON.stringify(prop.value.content); - } - openTag.push( - ` ${prop.name}` + (prop.value ? `="${shared.escapeHtml(prop.value.content)}"` : ``) - ); - } - } - } - if (dynamicClassBinding && staticClassBinding) { - mergeCall(dynamicClassBinding, staticClassBinding); - removeStaticBinding(openTag, "class"); - } - if (context.scopeId) { - openTag.push(` ${context.scopeId}`); - } - node.ssrCodegenNode = compilerDom.createTemplateLiteral(openTag); - }; -}; -function buildSSRProps(props, directives, context) { - let mergePropsArgs = []; - if (props) { - if (props.type === 14) { - mergePropsArgs = props.arguments; - } else { - mergePropsArgs.push(props); - } - } - if (directives.length) { - for (const dir of directives) { - mergePropsArgs.push( - compilerDom.createCallExpression(context.helper(SSR_GET_DIRECTIVE_PROPS), [ - `_ctx`, - ...compilerDom.buildDirectiveArgs(dir, context).elements - ]) - ); - } - } - return mergePropsArgs.length > 1 ? compilerDom.createCallExpression(context.helper(compilerDom.MERGE_PROPS), mergePropsArgs) : mergePropsArgs[0]; -} -function isTrueFalseValue(prop) { - if (prop.type === 7) { - return prop.name === "bind" && prop.arg && compilerDom.isStaticExp(prop.arg) && (prop.arg.content === "true-value" || prop.arg.content === "false-value"); - } else { - return prop.name === "true-value" || prop.name === "false-value"; - } -} -function isTextareaWithValue(node, prop) { - return !!(node.tag === "textarea" && prop.name === "bind" && compilerDom.isStaticArgOf(prop.arg, "value")); -} -function mergeCall(call, arg) { - const existing = call.arguments[0]; - if (existing.type === 17) { - existing.elements.push(arg); - } else { - call.arguments[0] = compilerDom.createArrayExpression([existing, arg]); - } -} -function removeStaticBinding(tag, binding) { - const regExp = new RegExp(`^ ${binding}=".+"$`); - const i = tag.findIndex((e) => typeof e === "string" && regExp.test(e)); - if (i > -1) { - tag.splice(i, 1); - } -} -function findVModel(node) { - return node.props.find( - (p) => p.type === 7 && p.name === "model" && p.exp - ); -} -function ssrProcessElement(node, context) { - const isVoidTag = context.options.isVoidTag || shared.NO; - const elementsToAdd = node.ssrCodegenNode.elements; - for (let j = 0; j < elementsToAdd.length; j++) { - context.pushStringPart(elementsToAdd[j]); - } - if (context.withSlotScopeId) { - context.pushStringPart(compilerDom.createSimpleExpression(`_scopeId`, false)); - } - context.pushStringPart(`>`); - const rawChildren = rawChildrenMap.get(node); - if (rawChildren) { - context.pushStringPart(rawChildren); - } else if (node.children.length) { - processChildren(node, context); - } - if (!isVoidTag(node.tag)) { - context.pushStringPart(`</${node.tag}>`); - } -} - -const wipMap$2 = /* @__PURE__ */ new WeakMap(); -function ssrTransformTransitionGroup(node, context) { - return () => { - const tag = compilerDom.findProp(node, "tag"); - if (tag) { - const otherProps = node.props.filter((p) => p !== tag); - const { props, directives } = compilerDom.buildProps( - node, - context, - otherProps, - true, - false, - true - ); - let propsExp = null; - if (props || directives.length) { - propsExp = compilerDom.createCallExpression(context.helper(SSR_RENDER_ATTRS), [ - buildSSRProps(props, directives, context) - ]); - } - wipMap$2.set(node, { - tag, - propsExp, - scopeId: context.scopeId || null - }); - } - }; -} -function ssrProcessTransitionGroup(node, context) { - const entry = wipMap$2.get(node); - if (entry) { - const { tag, propsExp, scopeId } = entry; - if (tag.type === 7) { - context.pushStringPart(`<`); - context.pushStringPart(tag.exp); - if (propsExp) { - context.pushStringPart(propsExp); - } - if (scopeId) { - context.pushStringPart(` ${scopeId}`); - } - context.pushStringPart(`>`); - processChildren( - node, - context, - false, - /** - * TransitionGroup has the special runtime behavior of flattening and - * concatenating all children into a single fragment (in order for them to - * be patched using the same key map) so we need to account for that here - * by disabling nested fragment wrappers from being generated. - */ - true, - /** - * TransitionGroup filters out comment children at runtime and thus - * doesn't expect comments to be present during hydration. We need to - * account for that by disabling the empty comment that is otherwise - * rendered for a falsy v-if that has no v-else specified. (#6715) - */ - true - ); - context.pushStringPart(`</`); - context.pushStringPart(tag.exp); - context.pushStringPart(`>`); - } else { - context.pushStringPart(`<${tag.value.content}`); - if (propsExp) { - context.pushStringPart(propsExp); - } - if (scopeId) { - context.pushStringPart(` ${scopeId}`); - } - context.pushStringPart(`>`); - processChildren(node, context, false, true, true); - context.pushStringPart(`</${tag.value.content}>`); - } - } else { - processChildren(node, context, true, true, true); - } -} - -const wipMap$1 = /* @__PURE__ */ new WeakMap(); -function ssrTransformTransition(node, context) { - return () => { - const appear = compilerDom.findProp(node, "appear", false, true); - wipMap$1.set(node, !!appear); - }; -} -function ssrProcessTransition(node, context) { - node.children = node.children.filter((c) => c.type !== 3); - const appear = wipMap$1.get(node); - if (appear) { - context.pushStringPart(`<template>`); - processChildren(node, context, false, true); - context.pushStringPart(`</template>`); - } else { - processChildren(node, context, false, true); - } -} - -const wipMap = /* @__PURE__ */ new WeakMap(); -const WIP_SLOT = Symbol(); -const componentTypeMap = /* @__PURE__ */ new WeakMap(); -const ssrTransformComponent = (node, context) => { - if (node.type !== 1 || node.tagType !== 1) { - return; - } - const component = compilerDom.resolveComponentType( - node, - context, - true - /* ssr */ - ); - const isDynamicComponent = shared.isObject(component) && component.callee === compilerDom.RESOLVE_DYNAMIC_COMPONENT; - componentTypeMap.set(node, component); - if (shared.isSymbol(component)) { - if (component === compilerDom.SUSPENSE) { - return ssrTransformSuspense(node, context); - } else if (component === compilerDom.TRANSITION_GROUP) { - return ssrTransformTransitionGroup(node, context); - } else if (component === compilerDom.TRANSITION) { - return ssrTransformTransition(node); - } - return; - } - const vnodeBranches = []; - const clonedNode = clone(node); - return function ssrPostTransformComponent() { - if (clonedNode.children.length) { - compilerDom.buildSlots(clonedNode, context, (props, vFor, children) => { - vnodeBranches.push( - createVNodeSlotBranch(props, vFor, children, context) - ); - return compilerDom.createFunctionExpression(void 0); - }); - } - let propsExp = `null`; - if (node.props.length) { - const { props, directives } = compilerDom.buildProps( - node, - context, - void 0, - true, - isDynamicComponent - ); - if (props || directives.length) { - propsExp = buildSSRProps(props, directives, context); - } - } - const wipEntries = []; - wipMap.set(node, wipEntries); - const buildSSRSlotFn = (props, _vForExp, children, loc) => { - const param0 = props && compilerDom.stringifyExpression(props) || `_`; - const fn = compilerDom.createFunctionExpression( - [param0, `_push`, `_parent`, `_scopeId`], - void 0, - // no return, assign body later - true, - // newline - true, - // isSlot - loc - ); - wipEntries.push({ - type: WIP_SLOT, - fn, - children, - // also collect the corresponding vnode branch built earlier - vnodeBranch: vnodeBranches[wipEntries.length] - }); - return fn; - }; - const slots = node.children.length ? compilerDom.buildSlots(node, context, buildSSRSlotFn).slots : `null`; - if (typeof component !== "string") { - node.ssrCodegenNode = compilerDom.createCallExpression( - context.helper(SSR_RENDER_VNODE), - [ - `_push`, - compilerDom.createCallExpression(context.helper(compilerDom.CREATE_VNODE), [ - component, - propsExp, - slots - ]), - `_parent` - ] - ); - } else { - node.ssrCodegenNode = compilerDom.createCallExpression( - context.helper(SSR_RENDER_COMPONENT), - [component, propsExp, slots, `_parent`] - ); - } - }; -}; -function ssrProcessComponent(node, context, parent) { - const component = componentTypeMap.get(node); - if (!node.ssrCodegenNode) { - if (component === compilerDom.TELEPORT) { - return ssrProcessTeleport(node, context); - } else if (component === compilerDom.SUSPENSE) { - return ssrProcessSuspense(node, context); - } else if (component === compilerDom.TRANSITION_GROUP) { - return ssrProcessTransitionGroup(node, context); - } else { - if (parent.type === WIP_SLOT) { - context.pushStringPart(``); - } - if (component === compilerDom.TRANSITION) { - return ssrProcessTransition(node, context); - } - processChildren(node, context); - } - } else { - const wipEntries = wipMap.get(node) || []; - for (let i = 0; i < wipEntries.length; i++) { - const { fn, vnodeBranch } = wipEntries[i]; - fn.body = compilerDom.createIfStatement( - compilerDom.createSimpleExpression(`_push`, false), - processChildrenAsStatement( - wipEntries[i], - context, - false, - true - ), - vnodeBranch - ); - } - if (context.withSlotScopeId) { - node.ssrCodegenNode.arguments.push(`_scopeId`); - } - if (typeof component === "string") { - context.pushStatement( - compilerDom.createCallExpression(`_push`, [node.ssrCodegenNode]) - ); - } else { - context.pushStatement(node.ssrCodegenNode); - } - } -} -const rawOptionsMap = /* @__PURE__ */ new WeakMap(); -const [baseNodeTransforms, baseDirectiveTransforms] = compilerDom.getBaseTransformPreset(true); -const vnodeNodeTransforms = [...baseNodeTransforms, ...compilerDom.DOMNodeTransforms]; -const vnodeDirectiveTransforms = { - ...baseDirectiveTransforms, - ...compilerDom.DOMDirectiveTransforms -}; -function createVNodeSlotBranch(slotProps, vFor, children, parentContext) { - const rawOptions = rawOptionsMap.get(parentContext.root); - const subOptions = { - ...rawOptions, - // overwrite with vnode-based transforms - nodeTransforms: [ - ...vnodeNodeTransforms, - ...rawOptions.nodeTransforms || [] - ], - directiveTransforms: { - ...vnodeDirectiveTransforms, - ...rawOptions.directiveTransforms || {} - } - }; - const wrapperProps = []; - if (slotProps) { - wrapperProps.push({ - type: 7, - name: "slot", - exp: slotProps, - arg: void 0, - modifiers: [], - loc: compilerDom.locStub - }); - } - if (vFor) { - wrapperProps.push(shared.extend({}, vFor)); - } - const wrapperNode = { - type: 1, - ns: 0, - tag: "template", - tagType: 3, - props: wrapperProps, - children, - loc: compilerDom.locStub, - codegenNode: void 0 - }; - subTransform(wrapperNode, subOptions, parentContext); - return compilerDom.createReturnStatement(children); -} -function subTransform(node, options, parentContext) { - const childRoot = compilerDom.createRoot([node]); - const childContext = compilerDom.createTransformContext(childRoot, options); - childContext.ssr = false; - childContext.scopes = { ...parentContext.scopes }; - childContext.identifiers = { ...parentContext.identifiers }; - childContext.imports = parentContext.imports; - compilerDom.traverseNode(childRoot, childContext); - ["helpers", "components", "directives"].forEach((key) => { - childContext[key].forEach((value, helperKey) => { - if (key === "helpers") { - const parentCount = parentContext.helpers.get(helperKey); - if (parentCount === void 0) { - parentContext.helpers.set(helperKey, value); - } else { - parentContext.helpers.set(helperKey, value + parentCount); - } - } else { - parentContext[key].add(value); - } - }); - }); -} -function clone(v) { - if (shared.isArray(v)) { - return v.map(clone); - } else if (shared.isPlainObject(v)) { - const res = {}; - for (const key in v) { - res[key] = clone(v[key]); - } - return res; - } else { - return v; - } -} - -function ssrCodegenTransform(ast, options) { - const context = createSSRTransformContext(ast, options); - if (options.ssrCssVars) { - const cssContext = compilerDom.createTransformContext(compilerDom.createRoot([]), options); - const varsExp = compilerDom.processExpression( - compilerDom.createSimpleExpression(options.ssrCssVars, false), - cssContext - ); - context.body.push( - compilerDom.createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`]) - ); - Array.from(cssContext.helpers.keys()).forEach((helper) => { - ast.helpers.add(helper); - }); - } - const isFragment = ast.children.length > 1 && ast.children.some((c) => !compilerDom.isText(c)); - processChildren(ast, context, isFragment); - ast.codegenNode = compilerDom.createBlockStatement(context.body); - ast.ssrHelpers = Array.from( - /* @__PURE__ */ new Set([ - ...Array.from(ast.helpers).filter((h) => h in ssrHelpers), - ...context.helpers - ]) - ); - ast.helpers = new Set(Array.from(ast.helpers).filter((h) => !(h in ssrHelpers))); -} -function createSSRTransformContext(root, options, helpers = /* @__PURE__ */ new Set(), withSlotScopeId = false) { - const body = []; - let currentString = null; - return { - root, - options, - body, - helpers, - withSlotScopeId, - onError: options.onError || ((e) => { - throw e; - }), - helper(name) { - helpers.add(name); - return name; - }, - pushStringPart(part) { - if (!currentString) { - const currentCall = compilerDom.createCallExpression(`_push`); - body.push(currentCall); - currentString = compilerDom.createTemplateLiteral([]); - currentCall.arguments.push(currentString); - } - const bufferedElements = currentString.elements; - const lastItem = bufferedElements[bufferedElements.length - 1]; - if (shared.isString(part) && shared.isString(lastItem)) { - bufferedElements[bufferedElements.length - 1] += part; - } else { - bufferedElements.push(part); - } - }, - pushStatement(statement) { - currentString = null; - body.push(statement); - } - }; -} -function createChildContext(parent, withSlotScopeId = parent.withSlotScopeId) { - return createSSRTransformContext( - parent.root, - parent.options, - parent.helpers, - withSlotScopeId - ); -} -function processChildren(parent, context, asFragment = false, disableNestedFragments = false, disableComment = false) { - if (asFragment) { - context.pushStringPart(`<!--[-->`); - } - const { children } = parent; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1: - switch (child.tagType) { - case 0: - ssrProcessElement(child, context); - break; - case 1: - ssrProcessComponent(child, context, parent); - break; - case 2: - ssrProcessSlotOutlet(child, context); - break; - case 3: - break; - default: - context.onError( - createSSRCompilerError( - 67, - child.loc - ) - ); - const exhaustiveCheck2 = child; - return exhaustiveCheck2; - } - break; - case 2: - context.pushStringPart(shared.escapeHtml(child.content)); - break; - case 3: - if (!disableComment) { - context.pushStringPart(`<!--${child.content}-->`); - } - break; - case 5: - context.pushStringPart( - compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [ - child.content - ]) - ); - break; - case 9: - ssrProcessIf(child, context, disableNestedFragments, disableComment); - break; - case 11: - ssrProcessFor(child, context, disableNestedFragments); - break; - case 10: - break; - case 12: - case 8: - break; - default: - context.onError( - createSSRCompilerError( - 67, - child.loc - ) - ); - const exhaustiveCheck = child; - return exhaustiveCheck; - } - } - if (asFragment) { - context.pushStringPart(`<!--]-->`); - } -} -function processChildrenAsStatement(parent, parentContext, asFragment = false, withSlotScopeId = parentContext.withSlotScopeId) { - const childContext = createChildContext(parentContext, withSlotScopeId); - processChildren(parent, childContext, asFragment); - return compilerDom.createBlockStatement(childContext.body); -} - -const ssrTransformModel = (dir, node, context) => { - const model = dir.exp; - function checkDuplicatedValue() { - const value = compilerDom.findProp(node, "value"); - if (value) { - context.onError( - compilerDom.createDOMCompilerError( - 60, - value.loc - ) - ); - } - } - function processOption(plainNode) { - if (plainNode.tag === "option") { - if (plainNode.props.findIndex((p) => p.name === "selected") === -1) { - const value = findValueBinding(plainNode); - plainNode.ssrCodegenNode.elements.push( - compilerDom.createConditionalExpression( - compilerDom.createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [ - compilerDom.createConditionalExpression( - compilerDom.createCallExpression(`Array.isArray`, [model]), - compilerDom.createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ - model, - value - ]), - compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ - model, - value - ]) - ) - ]), - compilerDom.createSimpleExpression(" selected", true), - compilerDom.createSimpleExpression("", true), - false - ) - ); - } - } else if (plainNode.tag === "optgroup") { - plainNode.children.forEach( - (option) => processOption(option) - ); - } - } - if (node.tagType === 0) { - const res = { props: [] }; - const defaultProps = [ - // default value binding for text type inputs - compilerDom.createObjectProperty(`value`, model) - ]; - if (node.tag === "input") { - const type = compilerDom.findProp(node, "type"); - if (type) { - const value = findValueBinding(node); - if (type.type === 7) { - res.ssrTagParts = [ - compilerDom.createCallExpression(context.helper(SSR_RENDER_DYNAMIC_MODEL), [ - type.exp, - model, - value - ]) - ]; - } else if (type.value) { - switch (type.value.content) { - case "radio": - res.props = [ - compilerDom.createObjectProperty( - `checked`, - compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ - model, - value - ]) - ) - ]; - break; - case "checkbox": - const trueValueBinding = compilerDom.findProp(node, "true-value"); - if (trueValueBinding) { - const trueValue = trueValueBinding.type === 6 ? JSON.stringify(trueValueBinding.value.content) : trueValueBinding.exp; - res.props = [ - compilerDom.createObjectProperty( - `checked`, - compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ - model, - trueValue - ]) - ) - ]; - } else { - res.props = [ - compilerDom.createObjectProperty( - `checked`, - compilerDom.createConditionalExpression( - compilerDom.createCallExpression(`Array.isArray`, [model]), - compilerDom.createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ - model, - value - ]), - model - ) - ) - ]; - } - break; - case "file": - context.onError( - compilerDom.createDOMCompilerError( - 59, - dir.loc - ) - ); - break; - default: - checkDuplicatedValue(); - res.props = defaultProps; - break; - } - } - } else if (compilerDom.hasDynamicKeyVBind(node)) ; else { - checkDuplicatedValue(); - res.props = defaultProps; - } - } else if (node.tag === "textarea") { - checkDuplicatedValue(); - node.children = [compilerDom.createInterpolation(model, model.loc)]; - } else if (node.tag === "select") { - const processChildren = (children) => { - children.forEach((child) => { - if (child.type === 1) { - processOption(child); - } else if (child.type === 11) { - processChildren(child.children); - } else if (child.type === 9) { - child.branches.forEach((b) => processChildren(b.children)); - } - }); - }; - processChildren(node.children); - } else { - context.onError( - compilerDom.createDOMCompilerError( - 57, - dir.loc - ) - ); - } - return res; - } else { - return compilerDom.transformModel(dir, node, context); - } -}; -function findValueBinding(node) { - const valueBinding = compilerDom.findProp(node, "value"); - return valueBinding ? valueBinding.type === 7 ? valueBinding.exp : compilerDom.createSimpleExpression(valueBinding.value.content, true) : compilerDom.createSimpleExpression(`null`, false); -} - -const ssrTransformShow = (dir, node, context) => { - if (!dir.exp) { - context.onError( - compilerDom.createDOMCompilerError(61) - ); - } - return { - props: [ - compilerDom.createObjectProperty( - `style`, - compilerDom.createConditionalExpression( - dir.exp, - compilerDom.createSimpleExpression(`null`, false), - compilerDom.createObjectExpression([ - compilerDom.createObjectProperty( - `display`, - compilerDom.createSimpleExpression(`none`, true) - ) - ]), - false - ) - ) - ] - }; -}; - -const filterChild = (node) => node.children.filter((n) => n.type !== 3); -const hasSingleChild = (node) => filterChild(node).length === 1; -const ssrInjectFallthroughAttrs = (node, context) => { - if (node.type === 0) { - context.identifiers._attrs = 1; - } - if (node.type === 1 && node.tagType === 1 && (node.tag === "transition" || node.tag === "Transition" || node.tag === "KeepAlive" || node.tag === "keep-alive")) { - const rootChildren = filterChild(context.root); - if (rootChildren.length === 1 && rootChildren[0] === node) { - if (hasSingleChild(node)) { - injectFallthroughAttrs(node.children[0]); - } - return; - } - } - const parent = context.parent; - if (!parent || parent.type !== 0) { - return; - } - if (node.type === 10 && hasSingleChild(node)) { - let hasEncounteredIf = false; - for (const c of filterChild(parent)) { - if (c.type === 9 || c.type === 1 && compilerDom.findDir(c, "if")) { - if (hasEncounteredIf) return; - hasEncounteredIf = true; - } else if ( - // node before v-if - !hasEncounteredIf || // non else nodes - !(c.type === 1 && compilerDom.findDir(c, /else/, true)) - ) { - return; - } - } - injectFallthroughAttrs(node.children[0]); - } else if (hasSingleChild(parent)) { - injectFallthroughAttrs(node); - } -}; -function injectFallthroughAttrs(node) { - if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !compilerDom.findDir(node, "for")) { - node.props.push({ - type: 7, - name: "bind", - arg: void 0, - exp: compilerDom.createSimpleExpression(`_attrs`, false), - modifiers: [], - loc: compilerDom.locStub - }); - } -} - -const ssrInjectCssVars = (node, context) => { - if (!context.ssrCssVars) { - return; - } - if (node.type === 0) { - context.identifiers._cssVars = 1; - } - const parent = context.parent; - if (!parent || parent.type !== 0) { - return; - } - if (node.type === 10) { - for (const child of node.children) { - injectCssVars(child); - } - } else { - injectCssVars(node); - } -}; -function injectCssVars(node) { - if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !compilerDom.findDir(node, "for")) { - if (node.tag === "suspense" || node.tag === "Suspense") { - for (const child of node.children) { - if (child.type === 1 && child.tagType === 3) { - child.children.forEach(injectCssVars); - } else { - injectCssVars(child); - } - } - } else { - node.props.push({ - type: 7, - name: "bind", - arg: void 0, - exp: compilerDom.createSimpleExpression(`_cssVars`, false), - modifiers: [], - loc: compilerDom.locStub - }); - } - } -} - -function compile(source, options = {}) { - options = { - ...options, - ...compilerDom.parserOptions, - ssr: true, - inSSR: true, - scopeId: options.mode === "function" ? null : options.scopeId, - // always prefix since compiler-ssr doesn't have size concern - prefixIdentifiers: true, - // disable optimizations that are unnecessary for ssr - cacheHandlers: false, - hoistStatic: false - }; - const ast = typeof source === "string" ? compilerDom.baseParse(source, options) : source; - rawOptionsMap.set(ast, options); - compilerDom.transform(ast, { - ...options, - hoistStatic: false, - nodeTransforms: [ - ssrTransformIf, - ssrTransformFor, - compilerDom.trackVForSlotScopes, - compilerDom.transformExpression, - ssrTransformSlotOutlet, - ssrInjectFallthroughAttrs, - ssrInjectCssVars, - ssrTransformElement, - ssrTransformComponent, - compilerDom.trackSlotScopes, - compilerDom.transformStyle, - ...options.nodeTransforms || [] - // user transforms - ], - directiveTransforms: { - // reusing core v-bind - bind: compilerDom.transformBind, - on: compilerDom.transformOn, - // model and show have dedicated SSR handling - model: ssrTransformModel, - show: ssrTransformShow, - // the following are ignored during SSR - // on: noopDirectiveTransform, - cloak: compilerDom.noopDirectiveTransform, - once: compilerDom.noopDirectiveTransform, - memo: compilerDom.noopDirectiveTransform, - ...options.directiveTransforms || {} - // user transforms - } - }); - ssrCodegenTransform(ast, options); - return compilerDom.generate(ast, options); -} - -exports.compile = compile; diff --git a/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts b/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts deleted file mode 100644 index 60dfb21..0000000 --- a/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RootNode, CompilerOptions, CodegenResult } from '@vue/compiler-dom'; - -export declare function compile(source: string | RootNode, options?: CompilerOptions): CodegenResult; - diff --git a/node_modules/@vue/compiler-ssr/package.json b/node_modules/@vue/compiler-ssr/package.json deleted file mode 100644 index 0313249..0000000 --- a/node_modules/@vue/compiler-ssr/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@vue/compiler-ssr", - "version": "3.5.13", - "description": "@vue/compiler-ssr", - "main": "dist/compiler-ssr.cjs.js", - "types": "dist/compiler-ssr.d.ts", - "files": [ - "dist" - ], - "buildOptions": { - "prod": false, - "formats": [ - "cjs" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/vuejs/core.git", - "directory": "packages/compiler-ssr" - }, - "keywords": [ - "vue" - ], - "author": "Evan You", - "license": "MIT", - "bugs": { - "url": "https://github.com/vuejs/core/issues" - }, - "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme", - "dependencies": { - "@vue/shared": "3.5.13", - "@vue/compiler-dom": "3.5.13" - } -} \ No newline at end of file diff --git a/node_modules/@vue/reactivity/LICENSE b/node_modules/@vue/reactivity/LICENSE deleted file mode 100644 index 15f1f7e..0000000 --- a/node_modules/@vue/reactivity/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018-present, Yuxi (Evan) You - -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/node_modules/@vue/reactivity/README.md b/node_modules/@vue/reactivity/README.md deleted file mode 100644 index e478074..0000000 --- a/node_modules/@vue/reactivity/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @vue/reactivity - -## Usage Note - -This package is inlined into Global & Browser ESM builds of user-facing renderers (e.g. `@vue/runtime-dom`), but also published as a package that can be used standalone. The standalone build should not be used alongside a pre-bundled build of a user-facing renderer, as they will have different internal storage for reactivity connections. A user-facing renderer should re-export all APIs from this package. - -For full exposed APIs, see `src/index.ts`. - -## Credits - -The implementation of this module is inspired by the following prior art in the JavaScript ecosystem: - -- [Meteor Tracker](https://docs.meteor.com/api/tracker.html) -- [nx-js/observer-util](https://github.com/nx-js/observer-util) -- [salesforce/observable-membrane](https://github.com/salesforce/observable-membrane) - -## Caveats - -- Built-in objects are not observed except for `Array`, `Map`, `WeakMap`, `Set` and `WeakSet`. diff --git a/node_modules/@vue/reactivity/dist/reactivity.cjs.js b/node_modules/@vue/reactivity/dist/reactivity.cjs.js deleted file mode 100644 index a547a2a..0000000 --- a/node_modules/@vue/reactivity/dist/reactivity.cjs.js +++ /dev/null @@ -1,1939 +0,0 @@ -/** -* @vue/reactivity v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var shared = require('@vue/shared'); - -function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); -} - -let activeEffectScope; -class EffectScope { - constructor(detached = false) { - this.detached = detached; - /** - * @internal - */ - this._active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - this._isPaused = false; - this.parent = activeEffectScope; - if (!detached && activeEffectScope) { - this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( - this - ) - 1; - } - } - get active() { - return this._active; - } - pause() { - if (this._active) { - this._isPaused = true; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].pause(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].pause(); - } - } - } - /** - * Resumes the effect scope, including all child scopes and effects. - */ - resume() { - if (this._active) { - if (this._isPaused) { - this._isPaused = false; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].resume(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].resume(); - } - } - } - } - run(fn) { - if (this._active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } finally { - activeEffectScope = currentEffectScope; - } - } else { - warn(`cannot run an inactive effect scope.`); - } - } - /** - * This should only be called on non-detached scopes - * @internal - */ - on() { - activeEffectScope = this; - } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this._active) { - this._active = false; - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - this.effects.length = 0; - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - this.cleanups.length = 0; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - this.scopes.length = 0; - } - if (!this.detached && this.parent && !fromParent) { - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.parent = void 0; - } - } -} -function effectScope(detached) { - return new EffectScope(detached); -} -function getCurrentScope() { - return activeEffectScope; -} -function onScopeDispose(fn, failSilently = false) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } else if (!failSilently) { - warn( - `onScopeDispose() is called when there is no active effect scope to be associated with.` - ); - } -} - -let activeSub; -const EffectFlags = { - "ACTIVE": 1, - "1": "ACTIVE", - "RUNNING": 2, - "2": "RUNNING", - "TRACKING": 4, - "4": "TRACKING", - "NOTIFIED": 8, - "8": "NOTIFIED", - "DIRTY": 16, - "16": "DIRTY", - "ALLOW_RECURSE": 32, - "32": "ALLOW_RECURSE", - "PAUSED": 64, - "64": "PAUSED" -}; -const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); -class ReactiveEffect { - constructor(fn) { - this.fn = fn; - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 1 | 4; - /** - * @internal - */ - this.next = void 0; - /** - * @internal - */ - this.cleanup = void 0; - this.scheduler = void 0; - if (activeEffectScope && activeEffectScope.active) { - activeEffectScope.effects.push(this); - } - } - pause() { - this.flags |= 64; - } - resume() { - if (this.flags & 64) { - this.flags &= ~64; - if (pausedQueueEffects.has(this)) { - pausedQueueEffects.delete(this); - this.trigger(); - } - } - } - /** - * @internal - */ - notify() { - if (this.flags & 2 && !(this.flags & 32)) { - return; - } - if (!(this.flags & 8)) { - batch(this); - } - } - run() { - if (!(this.flags & 1)) { - return this.fn(); - } - this.flags |= 2; - cleanupEffect(this); - prepareDeps(this); - const prevEffect = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = this; - shouldTrack = true; - try { - return this.fn(); - } finally { - if (activeSub !== this) { - warn( - "Active effect was not restored correctly - this is likely a Vue internal bug." - ); - } - cleanupDeps(this); - activeSub = prevEffect; - shouldTrack = prevShouldTrack; - this.flags &= ~2; - } - } - stop() { - if (this.flags & 1) { - for (let link = this.deps; link; link = link.nextDep) { - removeSub(link); - } - this.deps = this.depsTail = void 0; - cleanupEffect(this); - this.onStop && this.onStop(); - this.flags &= ~1; - } - } - trigger() { - if (this.flags & 64) { - pausedQueueEffects.add(this); - } else if (this.scheduler) { - this.scheduler(); - } else { - this.runIfDirty(); - } - } - /** - * @internal - */ - runIfDirty() { - if (isDirty(this)) { - this.run(); - } - } - get dirty() { - return isDirty(this); - } -} -let batchDepth = 0; -let batchedSub; -let batchedComputed; -function batch(sub, isComputed = false) { - sub.flags |= 8; - if (isComputed) { - sub.next = batchedComputed; - batchedComputed = sub; - return; - } - sub.next = batchedSub; - batchedSub = sub; -} -function startBatch() { - batchDepth++; -} -function endBatch() { - if (--batchDepth > 0) { - return; - } - if (batchedComputed) { - let e = batchedComputed; - batchedComputed = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - e = next; - } - } - let error; - while (batchedSub) { - let e = batchedSub; - batchedSub = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - if (e.flags & 1) { - try { - ; - e.trigger(); - } catch (err) { - if (!error) error = err; - } - } - e = next; - } - } - if (error) throw error; -} -function prepareDeps(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - link.version = -1; - link.prevActiveLink = link.dep.activeLink; - link.dep.activeLink = link; - } -} -function cleanupDeps(sub) { - let head; - let tail = sub.depsTail; - let link = tail; - while (link) { - const prev = link.prevDep; - if (link.version === -1) { - if (link === tail) tail = prev; - removeSub(link); - removeDep(link); - } else { - head = link; - } - link.dep.activeLink = link.prevActiveLink; - link.prevActiveLink = void 0; - link = prev; - } - sub.deps = head; - sub.depsTail = tail; -} -function isDirty(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { - return true; - } - } - if (sub._dirty) { - return true; - } - return false; -} -function refreshComputed(computed) { - if (computed.flags & 4 && !(computed.flags & 16)) { - return; - } - computed.flags &= ~16; - if (computed.globalVersion === globalVersion) { - return; - } - computed.globalVersion = globalVersion; - const dep = computed.dep; - computed.flags |= 2; - if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { - computed.flags &= ~2; - return; - } - const prevSub = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = computed; - shouldTrack = true; - try { - prepareDeps(computed); - const value = computed.fn(computed._value); - if (dep.version === 0 || shared.hasChanged(value, computed._value)) { - computed._value = value; - dep.version++; - } - } catch (err) { - dep.version++; - throw err; - } finally { - activeSub = prevSub; - shouldTrack = prevShouldTrack; - cleanupDeps(computed); - computed.flags &= ~2; - } -} -function removeSub(link, soft = false) { - const { dep, prevSub, nextSub } = link; - if (prevSub) { - prevSub.nextSub = nextSub; - link.prevSub = void 0; - } - if (nextSub) { - nextSub.prevSub = prevSub; - link.nextSub = void 0; - } - if (dep.subsHead === link) { - dep.subsHead = nextSub; - } - if (dep.subs === link) { - dep.subs = prevSub; - if (!prevSub && dep.computed) { - dep.computed.flags &= ~4; - for (let l = dep.computed.deps; l; l = l.nextDep) { - removeSub(l, true); - } - } - } - if (!soft && !--dep.sc && dep.map) { - dep.map.delete(dep.key); - } -} -function removeDep(link) { - const { prevDep, nextDep } = link; - if (prevDep) { - prevDep.nextDep = nextDep; - link.prevDep = void 0; - } - if (nextDep) { - nextDep.prevDep = prevDep; - link.nextDep = void 0; - } -} -function effect(fn, options) { - if (fn.effect instanceof ReactiveEffect) { - fn = fn.effect.fn; - } - const e = new ReactiveEffect(fn); - if (options) { - shared.extend(e, options); - } - try { - e.run(); - } catch (err) { - e.stop(); - throw err; - } - const runner = e.run.bind(e); - runner.effect = e; - return runner; -} -function stop(runner) { - runner.effect.stop(); -} -let shouldTrack = true; -const trackStack = []; -function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; -} -function enableTracking() { - trackStack.push(shouldTrack); - shouldTrack = true; -} -function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === void 0 ? true : last; -} -function onEffectCleanup(fn, failSilently = false) { - if (activeSub instanceof ReactiveEffect) { - activeSub.cleanup = fn; - } else if (!failSilently) { - warn( - `onEffectCleanup() was called when there was no active effect to associate with.` - ); - } -} -function cleanupEffect(e) { - const { cleanup } = e; - e.cleanup = void 0; - if (cleanup) { - const prevSub = activeSub; - activeSub = void 0; - try { - cleanup(); - } finally { - activeSub = prevSub; - } - } -} - -let globalVersion = 0; -class Link { - constructor(sub, dep) { - this.sub = sub; - this.dep = dep; - this.version = dep.version; - this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; - } -} -class Dep { - constructor(computed) { - this.computed = computed; - this.version = 0; - /** - * Link between this dep and the current active effect - */ - this.activeLink = void 0; - /** - * Doubly linked list representing the subscribing effects (tail) - */ - this.subs = void 0; - /** - * For object property deps cleanup - */ - this.map = void 0; - this.key = void 0; - /** - * Subscriber counter - */ - this.sc = 0; - { - this.subsHead = void 0; - } - } - track(debugInfo) { - if (!activeSub || !shouldTrack || activeSub === this.computed) { - return; - } - let link = this.activeLink; - if (link === void 0 || link.sub !== activeSub) { - link = this.activeLink = new Link(activeSub, this); - if (!activeSub.deps) { - activeSub.deps = activeSub.depsTail = link; - } else { - link.prevDep = activeSub.depsTail; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - } - addSub(link); - } else if (link.version === -1) { - link.version = this.version; - if (link.nextDep) { - const next = link.nextDep; - next.prevDep = link.prevDep; - if (link.prevDep) { - link.prevDep.nextDep = next; - } - link.prevDep = activeSub.depsTail; - link.nextDep = void 0; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - if (activeSub.deps === link) { - activeSub.deps = next; - } - } - } - if (activeSub.onTrack) { - activeSub.onTrack( - shared.extend( - { - effect: activeSub - }, - debugInfo - ) - ); - } - return link; - } - trigger(debugInfo) { - this.version++; - globalVersion++; - this.notify(debugInfo); - } - notify(debugInfo) { - startBatch(); - try { - if (true) { - for (let head = this.subsHead; head; head = head.nextSub) { - if (head.sub.onTrigger && !(head.sub.flags & 8)) { - head.sub.onTrigger( - shared.extend( - { - effect: head.sub - }, - debugInfo - ) - ); - } - } - } - for (let link = this.subs; link; link = link.prevSub) { - if (link.sub.notify()) { - ; - link.sub.dep.notify(); - } - } - } finally { - endBatch(); - } - } -} -function addSub(link) { - link.dep.sc++; - if (link.sub.flags & 4) { - const computed = link.dep.computed; - if (computed && !link.dep.subs) { - computed.flags |= 4 | 16; - for (let l = computed.deps; l; l = l.nextDep) { - addSub(l); - } - } - const currentTail = link.dep.subs; - if (currentTail !== link) { - link.prevSub = currentTail; - if (currentTail) currentTail.nextSub = link; - } - if (link.dep.subsHead === void 0) { - link.dep.subsHead = link; - } - link.dep.subs = link; - } -} -const targetMap = /* @__PURE__ */ new WeakMap(); -const ITERATE_KEY = Symbol( - "Object iterate" -); -const MAP_KEY_ITERATE_KEY = Symbol( - "Map keys iterate" -); -const ARRAY_ITERATE_KEY = Symbol( - "Array iterate" -); -function track(target, type, key) { - if (shouldTrack && activeSub) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = new Dep()); - dep.map = depsMap; - dep.key = key; - } - { - dep.track({ - target, - type, - key - }); - } - } -} -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - globalVersion++; - return; - } - const run = (dep) => { - if (dep) { - { - dep.trigger({ - target, - type, - key, - newValue, - oldValue, - oldTarget - }); - } - } - }; - startBatch(); - if (type === "clear") { - depsMap.forEach(run); - } else { - const targetIsArray = shared.isArray(target); - const isArrayIndex = targetIsArray && shared.isIntegerKey(key); - if (targetIsArray && key === "length") { - const newLength = Number(newValue); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !shared.isSymbol(key2) && key2 >= newLength) { - run(dep); - } - }); - } else { - if (key !== void 0 || depsMap.has(void 0)) { - run(depsMap.get(key)); - } - if (isArrayIndex) { - run(depsMap.get(ARRAY_ITERATE_KEY)); - } - switch (type) { - case "add": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (shared.isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isArrayIndex) { - run(depsMap.get("length")); - } - break; - case "delete": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (shared.isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (shared.isMap(target)) { - run(depsMap.get(ITERATE_KEY)); - } - break; - } - } - } - endBatch(); -} -function getDepFromReactive(object, key) { - const depMap = targetMap.get(object); - return depMap && depMap.get(key); -} - -function reactiveReadArray(array) { - const raw = toRaw(array); - if (raw === array) return raw; - track(raw, "iterate", ARRAY_ITERATE_KEY); - return isShallow(array) ? raw : raw.map(toReactive); -} -function shallowReadArray(arr) { - track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); - return arr; -} -const arrayInstrumentations = { - __proto__: null, - [Symbol.iterator]() { - return iterator(this, Symbol.iterator, toReactive); - }, - concat(...args) { - return reactiveReadArray(this).concat( - ...args.map((x) => shared.isArray(x) ? reactiveReadArray(x) : x) - ); - }, - entries() { - return iterator(this, "entries", (value) => { - value[1] = toReactive(value[1]); - return value; - }); - }, - every(fn, thisArg) { - return apply(this, "every", fn, thisArg, void 0, arguments); - }, - filter(fn, thisArg) { - return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); - }, - find(fn, thisArg) { - return apply(this, "find", fn, thisArg, toReactive, arguments); - }, - findIndex(fn, thisArg) { - return apply(this, "findIndex", fn, thisArg, void 0, arguments); - }, - findLast(fn, thisArg) { - return apply(this, "findLast", fn, thisArg, toReactive, arguments); - }, - findLastIndex(fn, thisArg) { - return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); - }, - // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement - forEach(fn, thisArg) { - return apply(this, "forEach", fn, thisArg, void 0, arguments); - }, - includes(...args) { - return searchProxy(this, "includes", args); - }, - indexOf(...args) { - return searchProxy(this, "indexOf", args); - }, - join(separator) { - return reactiveReadArray(this).join(separator); - }, - // keys() iterator only reads `length`, no optimisation required - lastIndexOf(...args) { - return searchProxy(this, "lastIndexOf", args); - }, - map(fn, thisArg) { - return apply(this, "map", fn, thisArg, void 0, arguments); - }, - pop() { - return noTracking(this, "pop"); - }, - push(...args) { - return noTracking(this, "push", args); - }, - reduce(fn, ...args) { - return reduce(this, "reduce", fn, args); - }, - reduceRight(fn, ...args) { - return reduce(this, "reduceRight", fn, args); - }, - shift() { - return noTracking(this, "shift"); - }, - // slice could use ARRAY_ITERATE but also seems to beg for range tracking - some(fn, thisArg) { - return apply(this, "some", fn, thisArg, void 0, arguments); - }, - splice(...args) { - return noTracking(this, "splice", args); - }, - toReversed() { - return reactiveReadArray(this).toReversed(); - }, - toSorted(comparer) { - return reactiveReadArray(this).toSorted(comparer); - }, - toSpliced(...args) { - return reactiveReadArray(this).toSpliced(...args); - }, - unshift(...args) { - return noTracking(this, "unshift", args); - }, - values() { - return iterator(this, "values", toReactive); - } -}; -function iterator(self, method, wrapValue) { - const arr = shallowReadArray(self); - const iter = arr[method](); - if (arr !== self && !isShallow(self)) { - iter._next = iter.next; - iter.next = () => { - const result = iter._next(); - if (result.value) { - result.value = wrapValue(result.value); - } - return result; - }; - } - return iter; -} -const arrayProto = Array.prototype; -function apply(self, method, fn, thisArg, wrappedRetFn, args) { - const arr = shallowReadArray(self); - const needsWrap = arr !== self && !isShallow(self); - const methodFn = arr[method]; - if (methodFn !== arrayProto[method]) { - const result2 = methodFn.apply(self, args); - return needsWrap ? toReactive(result2) : result2; - } - let wrappedFn = fn; - if (arr !== self) { - if (needsWrap) { - wrappedFn = function(item, index) { - return fn.call(this, toReactive(item), index, self); - }; - } else if (fn.length > 2) { - wrappedFn = function(item, index) { - return fn.call(this, item, index, self); - }; - } - } - const result = methodFn.call(arr, wrappedFn, thisArg); - return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; -} -function reduce(self, method, fn, args) { - const arr = shallowReadArray(self); - let wrappedFn = fn; - if (arr !== self) { - if (!isShallow(self)) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, toReactive(item), index, self); - }; - } else if (fn.length > 3) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, item, index, self); - }; - } - } - return arr[method](wrappedFn, ...args); -} -function searchProxy(self, method, args) { - const arr = toRaw(self); - track(arr, "iterate", ARRAY_ITERATE_KEY); - const res = arr[method](...args); - if ((res === -1 || res === false) && isProxy(args[0])) { - args[0] = toRaw(args[0]); - return arr[method](...args); - } - return res; -} -function noTracking(self, method, args = []) { - pauseTracking(); - startBatch(); - const res = toRaw(self)[method].apply(self, args); - endBatch(); - resetTracking(); - return res; -} - -const isNonTrackableKeys = /* @__PURE__ */ shared.makeMap(`__proto__,__v_isRef,__isVue`); -const builtInSymbols = new Set( - /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(shared.isSymbol) -); -function hasOwnProperty(key) { - if (!shared.isSymbol(key)) key = String(key); - const obj = toRaw(this); - track(obj, "has", key); - return obj.hasOwnProperty(key); -} -class BaseReactiveHandler { - constructor(_isReadonly = false, _isShallow = false) { - this._isReadonly = _isReadonly; - this._isShallow = _isShallow; - } - get(target, key, receiver) { - if (key === "__v_skip") return target["__v_skip"]; - const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_isShallow") { - return isShallow2; - } else if (key === "__v_raw") { - if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype - // this means the receiver is a user proxy of the reactive proxy - Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { - return target; - } - return; - } - const targetIsArray = shared.isArray(target); - if (!isReadonly2) { - let fn; - if (targetIsArray && (fn = arrayInstrumentations[key])) { - return fn; - } - if (key === "hasOwnProperty") { - return hasOwnProperty; - } - } - const res = Reflect.get( - target, - key, - // if this is a proxy wrapping a ref, return methods using the raw ref - // as receiver so that we don't have to call `toRaw` on the ref in all - // its class methods - isRef(target) ? target : receiver - ); - if (shared.isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly2) { - track(target, "get", key); - } - if (isShallow2) { - return res; - } - if (isRef(res)) { - return targetIsArray && shared.isIntegerKey(key) ? res : res.value; - } - if (shared.isObject(res)) { - return isReadonly2 ? readonly(res) : reactive(res); - } - return res; - } -} -class MutableReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(false, isShallow2); - } - set(target, key, value, receiver) { - let oldValue = target[key]; - if (!this._isShallow) { - const isOldValueReadonly = isReadonly(oldValue); - if (!isShallow(value) && !isReadonly(value)) { - oldValue = toRaw(oldValue); - value = toRaw(value); - } - if (!shared.isArray(target) && isRef(oldValue) && !isRef(value)) { - if (isOldValueReadonly) { - return false; - } else { - oldValue.value = value; - return true; - } - } - } - const hadKey = shared.isArray(target) && shared.isIntegerKey(key) ? Number(key) < target.length : shared.hasOwn(target, key); - const result = Reflect.set( - target, - key, - value, - isRef(target) ? target : receiver - ); - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add", key, value); - } else if (shared.hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - } - return result; - } - deleteProperty(target, key) { - const hadKey = shared.hasOwn(target, key); - const oldValue = target[key]; - const result = Reflect.deleteProperty(target, key); - if (result && hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - } - has(target, key) { - const result = Reflect.has(target, key); - if (!shared.isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has", key); - } - return result; - } - ownKeys(target) { - track( - target, - "iterate", - shared.isArray(target) ? "length" : ITERATE_KEY - ); - return Reflect.ownKeys(target); - } -} -class ReadonlyReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(true, isShallow2); - } - set(target, key) { - { - warn( - `Set operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } - deleteProperty(target, key) { - { - warn( - `Delete operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } -} -const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); -const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); -const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); -const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); - -const toShallow = (value) => value; -const getProto = (v) => Reflect.getPrototypeOf(v); -function createIterableMethod(method, isReadonly2, isShallow2) { - return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const targetIsMap = shared.isMap(rawTarget); - const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; - const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; - !isReadonly2 && track( - rawTarget, - "iterate", - isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY - ); - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done ? { value, done } : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } - }; - }; -} -function createReadonlyMethod(type) { - return function(...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - warn( - `${shared.capitalize(type)} operation ${key}failed: target is readonly.`, - toRaw(this) - ); - } - return type === "delete" ? false : type === "clear" ? void 0 : this; - }; -} -function createInstrumentations(readonly, shallow) { - const instrumentations = { - get(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (shared.hasChanged(key, rawKey)) { - track(rawTarget, "get", key); - } - track(rawTarget, "get", rawKey); - } - const { has } = getProto(rawTarget); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } else if (target !== rawTarget) { - target.get(key); - } - }, - get size() { - const target = this["__v_raw"]; - !readonly && track(toRaw(target), "iterate", ITERATE_KEY); - return Reflect.get(target, "size", target); - }, - has(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (shared.hasChanged(key, rawKey)) { - track(rawTarget, "has", key); - } - track(rawTarget, "has", rawKey); - } - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); - }, - forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - !readonly && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value, key) => { - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - } - }; - shared.extend( - instrumentations, - readonly ? { - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear") - } : { - add(value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add", value, value); - } - return this; - }, - set(key, value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add", key, value); - } else if (shared.hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - return this; - }, - delete(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : void 0; - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - }, - clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = shared.isMap(target) ? new Map(target) : new Set(target) ; - const result = target.clear(); - if (hadItems) { - trigger( - target, - "clear", - void 0, - void 0, - oldTarget - ); - } - return result; - } - } - ); - const iteratorMethods = [ - "keys", - "values", - "entries", - Symbol.iterator - ]; - iteratorMethods.forEach((method) => { - instrumentations[method] = createIterableMethod(method, readonly, shallow); - }); - return instrumentations; -} -function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = createInstrumentations(isReadonly2, shallow); - return (target, key, receiver) => { - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_raw") { - return target; - } - return Reflect.get( - shared.hasOwn(instrumentations, key) && key in target ? instrumentations : target, - key, - receiver - ); - }; -} -const mutableCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, false) -}; -const shallowCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, true) -}; -const readonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, false) -}; -const shallowReadonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, true) -}; -function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = shared.toRawType(target); - warn( - `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` - ); - } -} - -const reactiveMap = /* @__PURE__ */ new WeakMap(); -const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); -const readonlyMap = /* @__PURE__ */ new WeakMap(); -const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); -function targetTypeMap(rawType) { - switch (rawType) { - case "Object": - case "Array": - return 1 /* COMMON */; - case "Map": - case "Set": - case "WeakMap": - case "WeakSet": - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } -} -function getTargetType(value) { - return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(shared.toRawType(value)); -} -function reactive(target) { - if (isReadonly(target)) { - return target; - } - return createReactiveObject( - target, - false, - mutableHandlers, - mutableCollectionHandlers, - reactiveMap - ); -} -function shallowReactive(target) { - return createReactiveObject( - target, - false, - shallowReactiveHandlers, - shallowCollectionHandlers, - shallowReactiveMap - ); -} -function readonly(target) { - return createReactiveObject( - target, - true, - readonlyHandlers, - readonlyCollectionHandlers, - readonlyMap - ); -} -function shallowReadonly(target) { - return createReactiveObject( - target, - true, - shallowReadonlyHandlers, - shallowReadonlyCollectionHandlers, - shallowReadonlyMap - ); -} -function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!shared.isObject(target)) { - { - warn( - `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( - target - )}` - ); - } - return target; - } - if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { - return target; - } - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy( - target, - targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers - ); - proxyMap.set(target, proxy); - return proxy; -} -function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw"]); - } - return !!(value && value["__v_isReactive"]); -} -function isReadonly(value) { - return !!(value && value["__v_isReadonly"]); -} -function isShallow(value) { - return !!(value && value["__v_isShallow"]); -} -function isProxy(value) { - return value ? !!value["__v_raw"] : false; -} -function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; -} -function markRaw(value) { - if (!shared.hasOwn(value, "__v_skip") && Object.isExtensible(value)) { - shared.def(value, "__v_skip", true); - } - return value; -} -const toReactive = (value) => shared.isObject(value) ? reactive(value) : value; -const toReadonly = (value) => shared.isObject(value) ? readonly(value) : value; - -function isRef(r) { - return r ? r["__v_isRef"] === true : false; -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -class RefImpl { - constructor(value, isShallow2) { - this.dep = new Dep(); - this["__v_isRef"] = true; - this["__v_isShallow"] = false; - this._rawValue = isShallow2 ? value : toRaw(value); - this._value = isShallow2 ? value : toReactive(value); - this["__v_isShallow"] = isShallow2; - } - get value() { - { - this.dep.track({ - target: this, - type: "get", - key: "value" - }); - } - return this._value; - } - set value(newValue) { - const oldValue = this._rawValue; - const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); - newValue = useDirectValue ? newValue : toRaw(newValue); - if (shared.hasChanged(newValue, oldValue)) { - this._rawValue = newValue; - this._value = useDirectValue ? newValue : toReactive(newValue); - { - this.dep.trigger({ - target: this, - type: "set", - key: "value", - newValue, - oldValue - }); - } - } - } -} -function triggerRef(ref2) { - if (ref2.dep) { - { - ref2.dep.trigger({ - target: ref2, - type: "set", - key: "value", - newValue: ref2._value - }); - } - } -} -function unref(ref2) { - return isRef(ref2) ? ref2.value : ref2; -} -function toValue(source) { - return shared.isFunction(source) ? source() : unref(source); -} -const shallowUnwrapHandlers = { - get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -class CustomRefImpl { - constructor(factory) { - this["__v_isRef"] = true; - this._value = void 0; - const dep = this.dep = new Dep(); - const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); - this._get = get; - this._set = set; - } - get value() { - return this._value = this._get(); - } - set value(newVal) { - this._set(newVal); - } -} -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - if (!isProxy(object)) { - warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = shared.isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = propertyToRef(object, key); - } - return ret; -} -class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this["__v_isRef"] = true; - this._value = void 0; - } - get value() { - const val = this._object[this._key]; - return this._value = val === void 0 ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - get dep() { - return getDepFromReactive(toRaw(this._object), this._key); - } -} -class GetterRefImpl { - constructor(_getter) { - this._getter = _getter; - this["__v_isRef"] = true; - this["__v_isReadonly"] = true; - this._value = void 0; - } - get value() { - return this._value = this._getter(); - } -} -function toRef(source, key, defaultValue) { - if (isRef(source)) { - return source; - } else if (shared.isFunction(source)) { - return new GetterRefImpl(source); - } else if (shared.isObject(source) && arguments.length > 1) { - return propertyToRef(source, key, defaultValue); - } else { - return ref(source); - } -} -function propertyToRef(source, key, defaultValue) { - const val = source[key]; - return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); -} - -class ComputedRefImpl { - constructor(fn, setter, isSSR) { - this.fn = fn; - this.setter = setter; - /** - * @internal - */ - this._value = void 0; - /** - * @internal - */ - this.dep = new Dep(this); - /** - * @internal - */ - this.__v_isRef = true; - // TODO isolatedDeclarations "__v_isReadonly" - // A computed is also a subscriber that tracks other deps - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 16; - /** - * @internal - */ - this.globalVersion = globalVersion - 1; - /** - * @internal - */ - this.next = void 0; - // for backwards compat - this.effect = this; - this["__v_isReadonly"] = !setter; - this.isSSR = isSSR; - } - /** - * @internal - */ - notify() { - this.flags |= 16; - if (!(this.flags & 8) && // avoid infinite self recursion - activeSub !== this) { - batch(this, true); - return true; - } - } - get value() { - const link = this.dep.track({ - target: this, - type: "get", - key: "value" - }) ; - refreshComputed(this); - if (link) { - link.version = this.dep.version; - } - return this._value; - } - set value(newValue) { - if (this.setter) { - this.setter(newValue); - } else { - warn("Write operation failed: computed value is readonly"); - } - } -} -function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - if (shared.isFunction(getterOrOptions)) { - getter = getterOrOptions; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, isSSR); - if (debugOptions && !isSSR) { - cRef.onTrack = debugOptions.onTrack; - cRef.onTrigger = debugOptions.onTrigger; - } - return cRef; -} - -const TrackOpTypes = { - "GET": "get", - "HAS": "has", - "ITERATE": "iterate" -}; -const TriggerOpTypes = { - "SET": "set", - "ADD": "add", - "DELETE": "delete", - "CLEAR": "clear" -}; -const ReactiveFlags = { - "SKIP": "__v_skip", - "IS_REACTIVE": "__v_isReactive", - "IS_READONLY": "__v_isReadonly", - "IS_SHALLOW": "__v_isShallow", - "RAW": "__v_raw", - "IS_REF": "__v_isRef" -}; - -const WatchErrorCodes = { - "WATCH_GETTER": 2, - "2": "WATCH_GETTER", - "WATCH_CALLBACK": 3, - "3": "WATCH_CALLBACK", - "WATCH_CLEANUP": 4, - "4": "WATCH_CLEANUP" -}; -const INITIAL_WATCHER_VALUE = {}; -const cleanupMap = /* @__PURE__ */ new WeakMap(); -let activeWatcher = void 0; -function getCurrentWatcher() { - return activeWatcher; -} -function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { - if (owner) { - let cleanups = cleanupMap.get(owner); - if (!cleanups) cleanupMap.set(owner, cleanups = []); - cleanups.push(cleanupFn); - } else if (!failSilently) { - warn( - `onWatcherCleanup() was called when there was no active watcher to associate with.` - ); - } -} -function watch(source, cb, options = shared.EMPTY_OBJ) { - const { immediate, deep, once, scheduler, augmentJob, call } = options; - const warnInvalidSource = (s) => { - (options.onWarn || warn)( - `Invalid watch source: `, - s, - `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` - ); - }; - const reactiveGetter = (source2) => { - if (deep) return source2; - if (isShallow(source2) || deep === false || deep === 0) - return traverse(source2, 1); - return traverse(source2); - }; - let effect; - let getter; - let cleanup; - let boundCleanup; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); - } else if (isReactive(source)) { - getter = () => reactiveGetter(source); - forceTrigger = true; - } else if (shared.isArray(source)) { - isMultiSource = true; - forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); - getter = () => source.map((s) => { - if (isRef(s)) { - return s.value; - } else if (isReactive(s)) { - return reactiveGetter(s); - } else if (shared.isFunction(s)) { - return call ? call(s, 2) : s(); - } else { - warnInvalidSource(s); - } - }); - } else if (shared.isFunction(source)) { - if (cb) { - getter = call ? () => call(source, 2) : source; - } else { - getter = () => { - if (cleanup) { - pauseTracking(); - try { - cleanup(); - } finally { - resetTracking(); - } - } - const currentEffect = activeWatcher; - activeWatcher = effect; - try { - return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); - } finally { - activeWatcher = currentEffect; - } - }; - } - } else { - getter = shared.NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - const depth = deep === true ? Infinity : deep; - getter = () => traverse(baseGetter(), depth); - } - const scope = getCurrentScope(); - const watchHandle = () => { - effect.stop(); - if (scope && scope.active) { - shared.remove(scope.effects, effect); - } - }; - if (once && cb) { - const _cb = cb; - cb = (...args) => { - _cb(...args); - watchHandle(); - }; - } - let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; - const job = (immediateFirstRun) => { - if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { - return; - } - if (cb) { - const newValue = effect.run(); - if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => shared.hasChanged(v, oldValue[i])) : shared.hasChanged(newValue, oldValue))) { - if (cleanup) { - cleanup(); - } - const currentWatcher = activeWatcher; - activeWatcher = effect; - try { - const args = [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, - boundCleanup - ]; - call ? call(cb, 3, args) : ( - // @ts-expect-error - cb(...args) - ); - oldValue = newValue; - } finally { - activeWatcher = currentWatcher; - } - } - } else { - effect.run(); - } - }; - if (augmentJob) { - augmentJob(job); - } - effect = new ReactiveEffect(getter); - effect.scheduler = scheduler ? () => scheduler(job, false) : job; - boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); - cleanup = effect.onStop = () => { - const cleanups = cleanupMap.get(effect); - if (cleanups) { - if (call) { - call(cleanups, 4); - } else { - for (const cleanup2 of cleanups) cleanup2(); - } - cleanupMap.delete(effect); - } - }; - { - effect.onTrack = options.onTrack; - effect.onTrigger = options.onTrigger; - } - if (cb) { - if (immediate) { - job(true); - } else { - oldValue = effect.run(); - } - } else if (scheduler) { - scheduler(job.bind(null, true), true); - } else { - effect.run(); - } - watchHandle.pause = effect.pause.bind(effect); - watchHandle.resume = effect.resume.bind(effect); - watchHandle.stop = watchHandle; - return watchHandle; -} -function traverse(value, depth = Infinity, seen) { - if (depth <= 0 || !shared.isObject(value) || value["__v_skip"]) { - return value; - } - seen = seen || /* @__PURE__ */ new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - depth--; - if (isRef(value)) { - traverse(value.value, depth, seen); - } else if (shared.isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], depth, seen); - } - } else if (shared.isSet(value) || shared.isMap(value)) { - value.forEach((v) => { - traverse(v, depth, seen); - }); - } else if (shared.isPlainObject(value)) { - for (const key in value) { - traverse(value[key], depth, seen); - } - for (const key of Object.getOwnPropertySymbols(value)) { - if (Object.prototype.propertyIsEnumerable.call(value, key)) { - traverse(value[key], depth, seen); - } - } - } - return value; -} - -exports.ARRAY_ITERATE_KEY = ARRAY_ITERATE_KEY; -exports.EffectFlags = EffectFlags; -exports.EffectScope = EffectScope; -exports.ITERATE_KEY = ITERATE_KEY; -exports.MAP_KEY_ITERATE_KEY = MAP_KEY_ITERATE_KEY; -exports.ReactiveEffect = ReactiveEffect; -exports.ReactiveFlags = ReactiveFlags; -exports.TrackOpTypes = TrackOpTypes; -exports.TriggerOpTypes = TriggerOpTypes; -exports.WatchErrorCodes = WatchErrorCodes; -exports.computed = computed; -exports.customRef = customRef; -exports.effect = effect; -exports.effectScope = effectScope; -exports.enableTracking = enableTracking; -exports.getCurrentScope = getCurrentScope; -exports.getCurrentWatcher = getCurrentWatcher; -exports.isProxy = isProxy; -exports.isReactive = isReactive; -exports.isReadonly = isReadonly; -exports.isRef = isRef; -exports.isShallow = isShallow; -exports.markRaw = markRaw; -exports.onEffectCleanup = onEffectCleanup; -exports.onScopeDispose = onScopeDispose; -exports.onWatcherCleanup = onWatcherCleanup; -exports.pauseTracking = pauseTracking; -exports.proxyRefs = proxyRefs; -exports.reactive = reactive; -exports.reactiveReadArray = reactiveReadArray; -exports.readonly = readonly; -exports.ref = ref; -exports.resetTracking = resetTracking; -exports.shallowReactive = shallowReactive; -exports.shallowReadArray = shallowReadArray; -exports.shallowReadonly = shallowReadonly; -exports.shallowRef = shallowRef; -exports.stop = stop; -exports.toRaw = toRaw; -exports.toReactive = toReactive; -exports.toReadonly = toReadonly; -exports.toRef = toRef; -exports.toRefs = toRefs; -exports.toValue = toValue; -exports.track = track; -exports.traverse = traverse; -exports.trigger = trigger; -exports.triggerRef = triggerRef; -exports.unref = unref; -exports.watch = watch; diff --git a/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js b/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js deleted file mode 100644 index ee6811b..0000000 --- a/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +++ /dev/null @@ -1,1789 +0,0 @@ -/** -* @vue/reactivity v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var shared = require('@vue/shared'); - -let activeEffectScope; -class EffectScope { - constructor(detached = false) { - this.detached = detached; - /** - * @internal - */ - this._active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - this._isPaused = false; - this.parent = activeEffectScope; - if (!detached && activeEffectScope) { - this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( - this - ) - 1; - } - } - get active() { - return this._active; - } - pause() { - if (this._active) { - this._isPaused = true; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].pause(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].pause(); - } - } - } - /** - * Resumes the effect scope, including all child scopes and effects. - */ - resume() { - if (this._active) { - if (this._isPaused) { - this._isPaused = false; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].resume(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].resume(); - } - } - } - } - run(fn) { - if (this._active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } finally { - activeEffectScope = currentEffectScope; - } - } - } - /** - * This should only be called on non-detached scopes - * @internal - */ - on() { - activeEffectScope = this; - } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this._active) { - this._active = false; - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - this.effects.length = 0; - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - this.cleanups.length = 0; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - this.scopes.length = 0; - } - if (!this.detached && this.parent && !fromParent) { - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.parent = void 0; - } - } -} -function effectScope(detached) { - return new EffectScope(detached); -} -function getCurrentScope() { - return activeEffectScope; -} -function onScopeDispose(fn, failSilently = false) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } -} - -let activeSub; -const EffectFlags = { - "ACTIVE": 1, - "1": "ACTIVE", - "RUNNING": 2, - "2": "RUNNING", - "TRACKING": 4, - "4": "TRACKING", - "NOTIFIED": 8, - "8": "NOTIFIED", - "DIRTY": 16, - "16": "DIRTY", - "ALLOW_RECURSE": 32, - "32": "ALLOW_RECURSE", - "PAUSED": 64, - "64": "PAUSED" -}; -const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); -class ReactiveEffect { - constructor(fn) { - this.fn = fn; - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 1 | 4; - /** - * @internal - */ - this.next = void 0; - /** - * @internal - */ - this.cleanup = void 0; - this.scheduler = void 0; - if (activeEffectScope && activeEffectScope.active) { - activeEffectScope.effects.push(this); - } - } - pause() { - this.flags |= 64; - } - resume() { - if (this.flags & 64) { - this.flags &= ~64; - if (pausedQueueEffects.has(this)) { - pausedQueueEffects.delete(this); - this.trigger(); - } - } - } - /** - * @internal - */ - notify() { - if (this.flags & 2 && !(this.flags & 32)) { - return; - } - if (!(this.flags & 8)) { - batch(this); - } - } - run() { - if (!(this.flags & 1)) { - return this.fn(); - } - this.flags |= 2; - cleanupEffect(this); - prepareDeps(this); - const prevEffect = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = this; - shouldTrack = true; - try { - return this.fn(); - } finally { - cleanupDeps(this); - activeSub = prevEffect; - shouldTrack = prevShouldTrack; - this.flags &= ~2; - } - } - stop() { - if (this.flags & 1) { - for (let link = this.deps; link; link = link.nextDep) { - removeSub(link); - } - this.deps = this.depsTail = void 0; - cleanupEffect(this); - this.onStop && this.onStop(); - this.flags &= ~1; - } - } - trigger() { - if (this.flags & 64) { - pausedQueueEffects.add(this); - } else if (this.scheduler) { - this.scheduler(); - } else { - this.runIfDirty(); - } - } - /** - * @internal - */ - runIfDirty() { - if (isDirty(this)) { - this.run(); - } - } - get dirty() { - return isDirty(this); - } -} -let batchDepth = 0; -let batchedSub; -let batchedComputed; -function batch(sub, isComputed = false) { - sub.flags |= 8; - if (isComputed) { - sub.next = batchedComputed; - batchedComputed = sub; - return; - } - sub.next = batchedSub; - batchedSub = sub; -} -function startBatch() { - batchDepth++; -} -function endBatch() { - if (--batchDepth > 0) { - return; - } - if (batchedComputed) { - let e = batchedComputed; - batchedComputed = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - e = next; - } - } - let error; - while (batchedSub) { - let e = batchedSub; - batchedSub = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - if (e.flags & 1) { - try { - ; - e.trigger(); - } catch (err) { - if (!error) error = err; - } - } - e = next; - } - } - if (error) throw error; -} -function prepareDeps(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - link.version = -1; - link.prevActiveLink = link.dep.activeLink; - link.dep.activeLink = link; - } -} -function cleanupDeps(sub) { - let head; - let tail = sub.depsTail; - let link = tail; - while (link) { - const prev = link.prevDep; - if (link.version === -1) { - if (link === tail) tail = prev; - removeSub(link); - removeDep(link); - } else { - head = link; - } - link.dep.activeLink = link.prevActiveLink; - link.prevActiveLink = void 0; - link = prev; - } - sub.deps = head; - sub.depsTail = tail; -} -function isDirty(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { - return true; - } - } - if (sub._dirty) { - return true; - } - return false; -} -function refreshComputed(computed) { - if (computed.flags & 4 && !(computed.flags & 16)) { - return; - } - computed.flags &= ~16; - if (computed.globalVersion === globalVersion) { - return; - } - computed.globalVersion = globalVersion; - const dep = computed.dep; - computed.flags |= 2; - if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { - computed.flags &= ~2; - return; - } - const prevSub = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = computed; - shouldTrack = true; - try { - prepareDeps(computed); - const value = computed.fn(computed._value); - if (dep.version === 0 || shared.hasChanged(value, computed._value)) { - computed._value = value; - dep.version++; - } - } catch (err) { - dep.version++; - throw err; - } finally { - activeSub = prevSub; - shouldTrack = prevShouldTrack; - cleanupDeps(computed); - computed.flags &= ~2; - } -} -function removeSub(link, soft = false) { - const { dep, prevSub, nextSub } = link; - if (prevSub) { - prevSub.nextSub = nextSub; - link.prevSub = void 0; - } - if (nextSub) { - nextSub.prevSub = prevSub; - link.nextSub = void 0; - } - if (dep.subs === link) { - dep.subs = prevSub; - if (!prevSub && dep.computed) { - dep.computed.flags &= ~4; - for (let l = dep.computed.deps; l; l = l.nextDep) { - removeSub(l, true); - } - } - } - if (!soft && !--dep.sc && dep.map) { - dep.map.delete(dep.key); - } -} -function removeDep(link) { - const { prevDep, nextDep } = link; - if (prevDep) { - prevDep.nextDep = nextDep; - link.prevDep = void 0; - } - if (nextDep) { - nextDep.prevDep = prevDep; - link.nextDep = void 0; - } -} -function effect(fn, options) { - if (fn.effect instanceof ReactiveEffect) { - fn = fn.effect.fn; - } - const e = new ReactiveEffect(fn); - if (options) { - shared.extend(e, options); - } - try { - e.run(); - } catch (err) { - e.stop(); - throw err; - } - const runner = e.run.bind(e); - runner.effect = e; - return runner; -} -function stop(runner) { - runner.effect.stop(); -} -let shouldTrack = true; -const trackStack = []; -function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; -} -function enableTracking() { - trackStack.push(shouldTrack); - shouldTrack = true; -} -function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === void 0 ? true : last; -} -function onEffectCleanup(fn, failSilently = false) { - if (activeSub instanceof ReactiveEffect) { - activeSub.cleanup = fn; - } -} -function cleanupEffect(e) { - const { cleanup } = e; - e.cleanup = void 0; - if (cleanup) { - const prevSub = activeSub; - activeSub = void 0; - try { - cleanup(); - } finally { - activeSub = prevSub; - } - } -} - -let globalVersion = 0; -class Link { - constructor(sub, dep) { - this.sub = sub; - this.dep = dep; - this.version = dep.version; - this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; - } -} -class Dep { - constructor(computed) { - this.computed = computed; - this.version = 0; - /** - * Link between this dep and the current active effect - */ - this.activeLink = void 0; - /** - * Doubly linked list representing the subscribing effects (tail) - */ - this.subs = void 0; - /** - * For object property deps cleanup - */ - this.map = void 0; - this.key = void 0; - /** - * Subscriber counter - */ - this.sc = 0; - } - track(debugInfo) { - if (!activeSub || !shouldTrack || activeSub === this.computed) { - return; - } - let link = this.activeLink; - if (link === void 0 || link.sub !== activeSub) { - link = this.activeLink = new Link(activeSub, this); - if (!activeSub.deps) { - activeSub.deps = activeSub.depsTail = link; - } else { - link.prevDep = activeSub.depsTail; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - } - addSub(link); - } else if (link.version === -1) { - link.version = this.version; - if (link.nextDep) { - const next = link.nextDep; - next.prevDep = link.prevDep; - if (link.prevDep) { - link.prevDep.nextDep = next; - } - link.prevDep = activeSub.depsTail; - link.nextDep = void 0; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - if (activeSub.deps === link) { - activeSub.deps = next; - } - } - } - return link; - } - trigger(debugInfo) { - this.version++; - globalVersion++; - this.notify(debugInfo); - } - notify(debugInfo) { - startBatch(); - try { - if (false) ; - for (let link = this.subs; link; link = link.prevSub) { - if (link.sub.notify()) { - ; - link.sub.dep.notify(); - } - } - } finally { - endBatch(); - } - } -} -function addSub(link) { - link.dep.sc++; - if (link.sub.flags & 4) { - const computed = link.dep.computed; - if (computed && !link.dep.subs) { - computed.flags |= 4 | 16; - for (let l = computed.deps; l; l = l.nextDep) { - addSub(l); - } - } - const currentTail = link.dep.subs; - if (currentTail !== link) { - link.prevSub = currentTail; - if (currentTail) currentTail.nextSub = link; - } - link.dep.subs = link; - } -} -const targetMap = /* @__PURE__ */ new WeakMap(); -const ITERATE_KEY = Symbol( - "" -); -const MAP_KEY_ITERATE_KEY = Symbol( - "" -); -const ARRAY_ITERATE_KEY = Symbol( - "" -); -function track(target, type, key) { - if (shouldTrack && activeSub) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = new Dep()); - dep.map = depsMap; - dep.key = key; - } - { - dep.track(); - } - } -} -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - globalVersion++; - return; - } - const run = (dep) => { - if (dep) { - { - dep.trigger(); - } - } - }; - startBatch(); - if (type === "clear") { - depsMap.forEach(run); - } else { - const targetIsArray = shared.isArray(target); - const isArrayIndex = targetIsArray && shared.isIntegerKey(key); - if (targetIsArray && key === "length") { - const newLength = Number(newValue); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !shared.isSymbol(key2) && key2 >= newLength) { - run(dep); - } - }); - } else { - if (key !== void 0 || depsMap.has(void 0)) { - run(depsMap.get(key)); - } - if (isArrayIndex) { - run(depsMap.get(ARRAY_ITERATE_KEY)); - } - switch (type) { - case "add": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (shared.isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isArrayIndex) { - run(depsMap.get("length")); - } - break; - case "delete": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (shared.isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (shared.isMap(target)) { - run(depsMap.get(ITERATE_KEY)); - } - break; - } - } - } - endBatch(); -} -function getDepFromReactive(object, key) { - const depMap = targetMap.get(object); - return depMap && depMap.get(key); -} - -function reactiveReadArray(array) { - const raw = toRaw(array); - if (raw === array) return raw; - track(raw, "iterate", ARRAY_ITERATE_KEY); - return isShallow(array) ? raw : raw.map(toReactive); -} -function shallowReadArray(arr) { - track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); - return arr; -} -const arrayInstrumentations = { - __proto__: null, - [Symbol.iterator]() { - return iterator(this, Symbol.iterator, toReactive); - }, - concat(...args) { - return reactiveReadArray(this).concat( - ...args.map((x) => shared.isArray(x) ? reactiveReadArray(x) : x) - ); - }, - entries() { - return iterator(this, "entries", (value) => { - value[1] = toReactive(value[1]); - return value; - }); - }, - every(fn, thisArg) { - return apply(this, "every", fn, thisArg, void 0, arguments); - }, - filter(fn, thisArg) { - return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); - }, - find(fn, thisArg) { - return apply(this, "find", fn, thisArg, toReactive, arguments); - }, - findIndex(fn, thisArg) { - return apply(this, "findIndex", fn, thisArg, void 0, arguments); - }, - findLast(fn, thisArg) { - return apply(this, "findLast", fn, thisArg, toReactive, arguments); - }, - findLastIndex(fn, thisArg) { - return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); - }, - // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement - forEach(fn, thisArg) { - return apply(this, "forEach", fn, thisArg, void 0, arguments); - }, - includes(...args) { - return searchProxy(this, "includes", args); - }, - indexOf(...args) { - return searchProxy(this, "indexOf", args); - }, - join(separator) { - return reactiveReadArray(this).join(separator); - }, - // keys() iterator only reads `length`, no optimisation required - lastIndexOf(...args) { - return searchProxy(this, "lastIndexOf", args); - }, - map(fn, thisArg) { - return apply(this, "map", fn, thisArg, void 0, arguments); - }, - pop() { - return noTracking(this, "pop"); - }, - push(...args) { - return noTracking(this, "push", args); - }, - reduce(fn, ...args) { - return reduce(this, "reduce", fn, args); - }, - reduceRight(fn, ...args) { - return reduce(this, "reduceRight", fn, args); - }, - shift() { - return noTracking(this, "shift"); - }, - // slice could use ARRAY_ITERATE but also seems to beg for range tracking - some(fn, thisArg) { - return apply(this, "some", fn, thisArg, void 0, arguments); - }, - splice(...args) { - return noTracking(this, "splice", args); - }, - toReversed() { - return reactiveReadArray(this).toReversed(); - }, - toSorted(comparer) { - return reactiveReadArray(this).toSorted(comparer); - }, - toSpliced(...args) { - return reactiveReadArray(this).toSpliced(...args); - }, - unshift(...args) { - return noTracking(this, "unshift", args); - }, - values() { - return iterator(this, "values", toReactive); - } -}; -function iterator(self, method, wrapValue) { - const arr = shallowReadArray(self); - const iter = arr[method](); - if (arr !== self && !isShallow(self)) { - iter._next = iter.next; - iter.next = () => { - const result = iter._next(); - if (result.value) { - result.value = wrapValue(result.value); - } - return result; - }; - } - return iter; -} -const arrayProto = Array.prototype; -function apply(self, method, fn, thisArg, wrappedRetFn, args) { - const arr = shallowReadArray(self); - const needsWrap = arr !== self && !isShallow(self); - const methodFn = arr[method]; - if (methodFn !== arrayProto[method]) { - const result2 = methodFn.apply(self, args); - return needsWrap ? toReactive(result2) : result2; - } - let wrappedFn = fn; - if (arr !== self) { - if (needsWrap) { - wrappedFn = function(item, index) { - return fn.call(this, toReactive(item), index, self); - }; - } else if (fn.length > 2) { - wrappedFn = function(item, index) { - return fn.call(this, item, index, self); - }; - } - } - const result = methodFn.call(arr, wrappedFn, thisArg); - return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; -} -function reduce(self, method, fn, args) { - const arr = shallowReadArray(self); - let wrappedFn = fn; - if (arr !== self) { - if (!isShallow(self)) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, toReactive(item), index, self); - }; - } else if (fn.length > 3) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, item, index, self); - }; - } - } - return arr[method](wrappedFn, ...args); -} -function searchProxy(self, method, args) { - const arr = toRaw(self); - track(arr, "iterate", ARRAY_ITERATE_KEY); - const res = arr[method](...args); - if ((res === -1 || res === false) && isProxy(args[0])) { - args[0] = toRaw(args[0]); - return arr[method](...args); - } - return res; -} -function noTracking(self, method, args = []) { - pauseTracking(); - startBatch(); - const res = toRaw(self)[method].apply(self, args); - endBatch(); - resetTracking(); - return res; -} - -const isNonTrackableKeys = /* @__PURE__ */ shared.makeMap(`__proto__,__v_isRef,__isVue`); -const builtInSymbols = new Set( - /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(shared.isSymbol) -); -function hasOwnProperty(key) { - if (!shared.isSymbol(key)) key = String(key); - const obj = toRaw(this); - track(obj, "has", key); - return obj.hasOwnProperty(key); -} -class BaseReactiveHandler { - constructor(_isReadonly = false, _isShallow = false) { - this._isReadonly = _isReadonly; - this._isShallow = _isShallow; - } - get(target, key, receiver) { - if (key === "__v_skip") return target["__v_skip"]; - const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_isShallow") { - return isShallow2; - } else if (key === "__v_raw") { - if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype - // this means the receiver is a user proxy of the reactive proxy - Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { - return target; - } - return; - } - const targetIsArray = shared.isArray(target); - if (!isReadonly2) { - let fn; - if (targetIsArray && (fn = arrayInstrumentations[key])) { - return fn; - } - if (key === "hasOwnProperty") { - return hasOwnProperty; - } - } - const res = Reflect.get( - target, - key, - // if this is a proxy wrapping a ref, return methods using the raw ref - // as receiver so that we don't have to call `toRaw` on the ref in all - // its class methods - isRef(target) ? target : receiver - ); - if (shared.isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly2) { - track(target, "get", key); - } - if (isShallow2) { - return res; - } - if (isRef(res)) { - return targetIsArray && shared.isIntegerKey(key) ? res : res.value; - } - if (shared.isObject(res)) { - return isReadonly2 ? readonly(res) : reactive(res); - } - return res; - } -} -class MutableReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(false, isShallow2); - } - set(target, key, value, receiver) { - let oldValue = target[key]; - if (!this._isShallow) { - const isOldValueReadonly = isReadonly(oldValue); - if (!isShallow(value) && !isReadonly(value)) { - oldValue = toRaw(oldValue); - value = toRaw(value); - } - if (!shared.isArray(target) && isRef(oldValue) && !isRef(value)) { - if (isOldValueReadonly) { - return false; - } else { - oldValue.value = value; - return true; - } - } - } - const hadKey = shared.isArray(target) && shared.isIntegerKey(key) ? Number(key) < target.length : shared.hasOwn(target, key); - const result = Reflect.set( - target, - key, - value, - isRef(target) ? target : receiver - ); - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add", key, value); - } else if (shared.hasChanged(value, oldValue)) { - trigger(target, "set", key, value); - } - } - return result; - } - deleteProperty(target, key) { - const hadKey = shared.hasOwn(target, key); - target[key]; - const result = Reflect.deleteProperty(target, key); - if (result && hadKey) { - trigger(target, "delete", key, void 0); - } - return result; - } - has(target, key) { - const result = Reflect.has(target, key); - if (!shared.isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has", key); - } - return result; - } - ownKeys(target) { - track( - target, - "iterate", - shared.isArray(target) ? "length" : ITERATE_KEY - ); - return Reflect.ownKeys(target); - } -} -class ReadonlyReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(true, isShallow2); - } - set(target, key) { - return true; - } - deleteProperty(target, key) { - return true; - } -} -const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); -const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); -const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); -const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); - -const toShallow = (value) => value; -const getProto = (v) => Reflect.getPrototypeOf(v); -function createIterableMethod(method, isReadonly2, isShallow2) { - return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const targetIsMap = shared.isMap(rawTarget); - const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; - const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; - !isReadonly2 && track( - rawTarget, - "iterate", - isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY - ); - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done ? { value, done } : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } - }; - }; -} -function createReadonlyMethod(type) { - return function(...args) { - return type === "delete" ? false : type === "clear" ? void 0 : this; - }; -} -function createInstrumentations(readonly, shallow) { - const instrumentations = { - get(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (shared.hasChanged(key, rawKey)) { - track(rawTarget, "get", key); - } - track(rawTarget, "get", rawKey); - } - const { has } = getProto(rawTarget); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } else if (target !== rawTarget) { - target.get(key); - } - }, - get size() { - const target = this["__v_raw"]; - !readonly && track(toRaw(target), "iterate", ITERATE_KEY); - return Reflect.get(target, "size", target); - }, - has(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (shared.hasChanged(key, rawKey)) { - track(rawTarget, "has", key); - } - track(rawTarget, "has", rawKey); - } - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); - }, - forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - !readonly && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value, key) => { - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - } - }; - shared.extend( - instrumentations, - readonly ? { - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear") - } : { - add(value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add", value, value); - } - return this; - }, - set(key, value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add", key, value); - } else if (shared.hasChanged(value, oldValue)) { - trigger(target, "set", key, value); - } - return this; - }, - delete(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - get ? get.call(target, key) : void 0; - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete", key, void 0); - } - return result; - }, - clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const result = target.clear(); - if (hadItems) { - trigger( - target, - "clear", - void 0, - void 0); - } - return result; - } - } - ); - const iteratorMethods = [ - "keys", - "values", - "entries", - Symbol.iterator - ]; - iteratorMethods.forEach((method) => { - instrumentations[method] = createIterableMethod(method, readonly, shallow); - }); - return instrumentations; -} -function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = createInstrumentations(isReadonly2, shallow); - return (target, key, receiver) => { - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_raw") { - return target; - } - return Reflect.get( - shared.hasOwn(instrumentations, key) && key in target ? instrumentations : target, - key, - receiver - ); - }; -} -const mutableCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, false) -}; -const shallowCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, true) -}; -const readonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, false) -}; -const shallowReadonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, true) -}; - -const reactiveMap = /* @__PURE__ */ new WeakMap(); -const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); -const readonlyMap = /* @__PURE__ */ new WeakMap(); -const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); -function targetTypeMap(rawType) { - switch (rawType) { - case "Object": - case "Array": - return 1 /* COMMON */; - case "Map": - case "Set": - case "WeakMap": - case "WeakSet": - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } -} -function getTargetType(value) { - return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(shared.toRawType(value)); -} -function reactive(target) { - if (isReadonly(target)) { - return target; - } - return createReactiveObject( - target, - false, - mutableHandlers, - mutableCollectionHandlers, - reactiveMap - ); -} -function shallowReactive(target) { - return createReactiveObject( - target, - false, - shallowReactiveHandlers, - shallowCollectionHandlers, - shallowReactiveMap - ); -} -function readonly(target) { - return createReactiveObject( - target, - true, - readonlyHandlers, - readonlyCollectionHandlers, - readonlyMap - ); -} -function shallowReadonly(target) { - return createReactiveObject( - target, - true, - shallowReadonlyHandlers, - shallowReadonlyCollectionHandlers, - shallowReadonlyMap - ); -} -function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!shared.isObject(target)) { - return target; - } - if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { - return target; - } - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy( - target, - targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers - ); - proxyMap.set(target, proxy); - return proxy; -} -function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw"]); - } - return !!(value && value["__v_isReactive"]); -} -function isReadonly(value) { - return !!(value && value["__v_isReadonly"]); -} -function isShallow(value) { - return !!(value && value["__v_isShallow"]); -} -function isProxy(value) { - return value ? !!value["__v_raw"] : false; -} -function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; -} -function markRaw(value) { - if (!shared.hasOwn(value, "__v_skip") && Object.isExtensible(value)) { - shared.def(value, "__v_skip", true); - } - return value; -} -const toReactive = (value) => shared.isObject(value) ? reactive(value) : value; -const toReadonly = (value) => shared.isObject(value) ? readonly(value) : value; - -function isRef(r) { - return r ? r["__v_isRef"] === true : false; -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -class RefImpl { - constructor(value, isShallow2) { - this.dep = new Dep(); - this["__v_isRef"] = true; - this["__v_isShallow"] = false; - this._rawValue = isShallow2 ? value : toRaw(value); - this._value = isShallow2 ? value : toReactive(value); - this["__v_isShallow"] = isShallow2; - } - get value() { - { - this.dep.track(); - } - return this._value; - } - set value(newValue) { - const oldValue = this._rawValue; - const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); - newValue = useDirectValue ? newValue : toRaw(newValue); - if (shared.hasChanged(newValue, oldValue)) { - this._rawValue = newValue; - this._value = useDirectValue ? newValue : toReactive(newValue); - { - this.dep.trigger(); - } - } - } -} -function triggerRef(ref2) { - if (ref2.dep) { - { - ref2.dep.trigger(); - } - } -} -function unref(ref2) { - return isRef(ref2) ? ref2.value : ref2; -} -function toValue(source) { - return shared.isFunction(source) ? source() : unref(source); -} -const shallowUnwrapHandlers = { - get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -class CustomRefImpl { - constructor(factory) { - this["__v_isRef"] = true; - this._value = void 0; - const dep = this.dep = new Dep(); - const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); - this._get = get; - this._set = set; - } - get value() { - return this._value = this._get(); - } - set value(newVal) { - this._set(newVal); - } -} -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - const ret = shared.isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = propertyToRef(object, key); - } - return ret; -} -class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this["__v_isRef"] = true; - this._value = void 0; - } - get value() { - const val = this._object[this._key]; - return this._value = val === void 0 ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - get dep() { - return getDepFromReactive(toRaw(this._object), this._key); - } -} -class GetterRefImpl { - constructor(_getter) { - this._getter = _getter; - this["__v_isRef"] = true; - this["__v_isReadonly"] = true; - this._value = void 0; - } - get value() { - return this._value = this._getter(); - } -} -function toRef(source, key, defaultValue) { - if (isRef(source)) { - return source; - } else if (shared.isFunction(source)) { - return new GetterRefImpl(source); - } else if (shared.isObject(source) && arguments.length > 1) { - return propertyToRef(source, key, defaultValue); - } else { - return ref(source); - } -} -function propertyToRef(source, key, defaultValue) { - const val = source[key]; - return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); -} - -class ComputedRefImpl { - constructor(fn, setter, isSSR) { - this.fn = fn; - this.setter = setter; - /** - * @internal - */ - this._value = void 0; - /** - * @internal - */ - this.dep = new Dep(this); - /** - * @internal - */ - this.__v_isRef = true; - // TODO isolatedDeclarations "__v_isReadonly" - // A computed is also a subscriber that tracks other deps - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 16; - /** - * @internal - */ - this.globalVersion = globalVersion - 1; - /** - * @internal - */ - this.next = void 0; - // for backwards compat - this.effect = this; - this["__v_isReadonly"] = !setter; - this.isSSR = isSSR; - } - /** - * @internal - */ - notify() { - this.flags |= 16; - if (!(this.flags & 8) && // avoid infinite self recursion - activeSub !== this) { - batch(this, true); - return true; - } - } - get value() { - const link = this.dep.track(); - refreshComputed(this); - if (link) { - link.version = this.dep.version; - } - return this._value; - } - set value(newValue) { - if (this.setter) { - this.setter(newValue); - } - } -} -function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - if (shared.isFunction(getterOrOptions)) { - getter = getterOrOptions; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, isSSR); - return cRef; -} - -const TrackOpTypes = { - "GET": "get", - "HAS": "has", - "ITERATE": "iterate" -}; -const TriggerOpTypes = { - "SET": "set", - "ADD": "add", - "DELETE": "delete", - "CLEAR": "clear" -}; -const ReactiveFlags = { - "SKIP": "__v_skip", - "IS_REACTIVE": "__v_isReactive", - "IS_READONLY": "__v_isReadonly", - "IS_SHALLOW": "__v_isShallow", - "RAW": "__v_raw", - "IS_REF": "__v_isRef" -}; - -const WatchErrorCodes = { - "WATCH_GETTER": 2, - "2": "WATCH_GETTER", - "WATCH_CALLBACK": 3, - "3": "WATCH_CALLBACK", - "WATCH_CLEANUP": 4, - "4": "WATCH_CLEANUP" -}; -const INITIAL_WATCHER_VALUE = {}; -const cleanupMap = /* @__PURE__ */ new WeakMap(); -let activeWatcher = void 0; -function getCurrentWatcher() { - return activeWatcher; -} -function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { - if (owner) { - let cleanups = cleanupMap.get(owner); - if (!cleanups) cleanupMap.set(owner, cleanups = []); - cleanups.push(cleanupFn); - } -} -function watch(source, cb, options = shared.EMPTY_OBJ) { - const { immediate, deep, once, scheduler, augmentJob, call } = options; - const reactiveGetter = (source2) => { - if (deep) return source2; - if (isShallow(source2) || deep === false || deep === 0) - return traverse(source2, 1); - return traverse(source2); - }; - let effect; - let getter; - let cleanup; - let boundCleanup; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); - } else if (isReactive(source)) { - getter = () => reactiveGetter(source); - forceTrigger = true; - } else if (shared.isArray(source)) { - isMultiSource = true; - forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); - getter = () => source.map((s) => { - if (isRef(s)) { - return s.value; - } else if (isReactive(s)) { - return reactiveGetter(s); - } else if (shared.isFunction(s)) { - return call ? call(s, 2) : s(); - } else ; - }); - } else if (shared.isFunction(source)) { - if (cb) { - getter = call ? () => call(source, 2) : source; - } else { - getter = () => { - if (cleanup) { - pauseTracking(); - try { - cleanup(); - } finally { - resetTracking(); - } - } - const currentEffect = activeWatcher; - activeWatcher = effect; - try { - return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); - } finally { - activeWatcher = currentEffect; - } - }; - } - } else { - getter = shared.NOOP; - } - if (cb && deep) { - const baseGetter = getter; - const depth = deep === true ? Infinity : deep; - getter = () => traverse(baseGetter(), depth); - } - const scope = getCurrentScope(); - const watchHandle = () => { - effect.stop(); - if (scope && scope.active) { - shared.remove(scope.effects, effect); - } - }; - if (once && cb) { - const _cb = cb; - cb = (...args) => { - _cb(...args); - watchHandle(); - }; - } - let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; - const job = (immediateFirstRun) => { - if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { - return; - } - if (cb) { - const newValue = effect.run(); - if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => shared.hasChanged(v, oldValue[i])) : shared.hasChanged(newValue, oldValue))) { - if (cleanup) { - cleanup(); - } - const currentWatcher = activeWatcher; - activeWatcher = effect; - try { - const args = [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, - boundCleanup - ]; - call ? call(cb, 3, args) : ( - // @ts-expect-error - cb(...args) - ); - oldValue = newValue; - } finally { - activeWatcher = currentWatcher; - } - } - } else { - effect.run(); - } - }; - if (augmentJob) { - augmentJob(job); - } - effect = new ReactiveEffect(getter); - effect.scheduler = scheduler ? () => scheduler(job, false) : job; - boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); - cleanup = effect.onStop = () => { - const cleanups = cleanupMap.get(effect); - if (cleanups) { - if (call) { - call(cleanups, 4); - } else { - for (const cleanup2 of cleanups) cleanup2(); - } - cleanupMap.delete(effect); - } - }; - if (cb) { - if (immediate) { - job(true); - } else { - oldValue = effect.run(); - } - } else if (scheduler) { - scheduler(job.bind(null, true), true); - } else { - effect.run(); - } - watchHandle.pause = effect.pause.bind(effect); - watchHandle.resume = effect.resume.bind(effect); - watchHandle.stop = watchHandle; - return watchHandle; -} -function traverse(value, depth = Infinity, seen) { - if (depth <= 0 || !shared.isObject(value) || value["__v_skip"]) { - return value; - } - seen = seen || /* @__PURE__ */ new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - depth--; - if (isRef(value)) { - traverse(value.value, depth, seen); - } else if (shared.isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], depth, seen); - } - } else if (shared.isSet(value) || shared.isMap(value)) { - value.forEach((v) => { - traverse(v, depth, seen); - }); - } else if (shared.isPlainObject(value)) { - for (const key in value) { - traverse(value[key], depth, seen); - } - for (const key of Object.getOwnPropertySymbols(value)) { - if (Object.prototype.propertyIsEnumerable.call(value, key)) { - traverse(value[key], depth, seen); - } - } - } - return value; -} - -exports.ARRAY_ITERATE_KEY = ARRAY_ITERATE_KEY; -exports.EffectFlags = EffectFlags; -exports.EffectScope = EffectScope; -exports.ITERATE_KEY = ITERATE_KEY; -exports.MAP_KEY_ITERATE_KEY = MAP_KEY_ITERATE_KEY; -exports.ReactiveEffect = ReactiveEffect; -exports.ReactiveFlags = ReactiveFlags; -exports.TrackOpTypes = TrackOpTypes; -exports.TriggerOpTypes = TriggerOpTypes; -exports.WatchErrorCodes = WatchErrorCodes; -exports.computed = computed; -exports.customRef = customRef; -exports.effect = effect; -exports.effectScope = effectScope; -exports.enableTracking = enableTracking; -exports.getCurrentScope = getCurrentScope; -exports.getCurrentWatcher = getCurrentWatcher; -exports.isProxy = isProxy; -exports.isReactive = isReactive; -exports.isReadonly = isReadonly; -exports.isRef = isRef; -exports.isShallow = isShallow; -exports.markRaw = markRaw; -exports.onEffectCleanup = onEffectCleanup; -exports.onScopeDispose = onScopeDispose; -exports.onWatcherCleanup = onWatcherCleanup; -exports.pauseTracking = pauseTracking; -exports.proxyRefs = proxyRefs; -exports.reactive = reactive; -exports.reactiveReadArray = reactiveReadArray; -exports.readonly = readonly; -exports.ref = ref; -exports.resetTracking = resetTracking; -exports.shallowReactive = shallowReactive; -exports.shallowReadArray = shallowReadArray; -exports.shallowReadonly = shallowReadonly; -exports.shallowRef = shallowRef; -exports.stop = stop; -exports.toRaw = toRaw; -exports.toReactive = toReactive; -exports.toReadonly = toReadonly; -exports.toRef = toRef; -exports.toRefs = toRefs; -exports.toValue = toValue; -exports.track = track; -exports.traverse = traverse; -exports.trigger = trigger; -exports.triggerRef = triggerRef; -exports.unref = unref; -exports.watch = watch; diff --git a/node_modules/@vue/reactivity/dist/reactivity.d.ts b/node_modules/@vue/reactivity/dist/reactivity.d.ts deleted file mode 100644 index da9fc95..0000000 --- a/node_modules/@vue/reactivity/dist/reactivity.d.ts +++ /dev/null @@ -1,754 +0,0 @@ -import { IfAny } from '@vue/shared'; - -export declare enum TrackOpTypes { - GET = "get", - HAS = "has", - ITERATE = "iterate" -} -export declare enum TriggerOpTypes { - SET = "set", - ADD = "add", - DELETE = "delete", - CLEAR = "clear" -} -export declare enum ReactiveFlags { - SKIP = "__v_skip", - IS_REACTIVE = "__v_isReactive", - IS_READONLY = "__v_isReadonly", - IS_SHALLOW = "__v_isShallow", - RAW = "__v_raw", - IS_REF = "__v_isRef" -} - -export type UnwrapNestedRefs<T> = T extends Ref ? T : UnwrapRefSimple<T>; -declare const ReactiveMarkerSymbol: unique symbol; -export interface ReactiveMarker { - [ReactiveMarkerSymbol]?: void; -} -export type Reactive<T> = UnwrapNestedRefs<T> & (T extends readonly any[] ? ReactiveMarker : {}); -/** - * Returns a reactive proxy of the object. - * - * The reactive conversion is "deep": it affects all nested properties. A - * reactive object also deeply unwraps any properties that are refs while - * maintaining reactivity. - * - * @example - * ```js - * const obj = reactive({ count: 0 }) - * ``` - * - * @param target - The source object. - * @see {@link https://vuejs.org/api/reactivity-core.html#reactive} - */ -export declare function reactive<T extends object>(target: T): Reactive<T>; -declare const ShallowReactiveMarker: unique symbol; -export type ShallowReactive<T> = T & { - [ShallowReactiveMarker]?: true; -}; -/** - * Shallow version of {@link reactive()}. - * - * Unlike {@link reactive()}, there is no deep conversion: only root-level - * properties are reactive for a shallow reactive object. Property values are - * stored and exposed as-is - this also means properties with ref values will - * not be automatically unwrapped. - * - * @example - * ```js - * const state = shallowReactive({ - * foo: 1, - * nested: { - * bar: 2 - * } - * }) - * - * // mutating state's own properties is reactive - * state.foo++ - * - * // ...but does not convert nested objects - * isReactive(state.nested) // false - * - * // NOT reactive - * state.nested.bar++ - * ``` - * - * @param target - The source object. - * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive} - */ -export declare function shallowReactive<T extends object>(target: T): ShallowReactive<T>; -type Primitive = string | number | boolean | bigint | symbol | undefined | null; -type Builtin = Primitive | Function | Date | Error | RegExp; -export type DeepReadonly<T> = T extends Builtin ? T : T extends Map<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepReadonly<K>, DeepReadonly<V>> : T extends Set<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends WeakSet<infer U> ? WeakSet<DeepReadonly<U>> : T extends Promise<infer U> ? Promise<DeepReadonly<U>> : T extends Ref<infer U, unknown> ? Readonly<Ref<DeepReadonly<U>>> : T extends {} ? { - readonly [K in keyof T]: DeepReadonly<T[K]>; -} : Readonly<T>; -/** - * Takes an object (reactive or plain) or a ref and returns a readonly proxy to - * the original. - * - * A readonly proxy is deep: any nested property accessed will be readonly as - * well. It also has the same ref-unwrapping behavior as {@link reactive()}, - * except the unwrapped values will also be made readonly. - * - * @example - * ```js - * const original = reactive({ count: 0 }) - * - * const copy = readonly(original) - * - * watchEffect(() => { - * // works for reactivity tracking - * console.log(copy.count) - * }) - * - * // mutating original will trigger watchers relying on the copy - * original.count++ - * - * // mutating the copy will fail and result in a warning - * copy.count++ // warning! - * ``` - * - * @param target - The source object. - * @see {@link https://vuejs.org/api/reactivity-core.html#readonly} - */ -export declare function readonly<T extends object>(target: T): DeepReadonly<UnwrapNestedRefs<T>>; -/** - * Shallow version of {@link readonly()}. - * - * Unlike {@link readonly()}, there is no deep conversion: only root-level - * properties are made readonly. Property values are stored and exposed as-is - - * this also means properties with ref values will not be automatically - * unwrapped. - * - * @example - * ```js - * const state = shallowReadonly({ - * foo: 1, - * nested: { - * bar: 2 - * } - * }) - * - * // mutating state's own properties will fail - * state.foo++ - * - * // ...but works on nested objects - * isReadonly(state.nested) // false - * - * // works - * state.nested.bar++ - * ``` - * - * @param target - The source object. - * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly} - */ -export declare function shallowReadonly<T extends object>(target: T): Readonly<T>; -/** - * Checks if an object is a proxy created by {@link reactive()} or - * {@link shallowReactive()} (or {@link ref()} in some cases). - * - * @example - * ```js - * isReactive(reactive({})) // => true - * isReactive(readonly(reactive({}))) // => true - * isReactive(ref({}).value) // => true - * isReactive(readonly(ref({})).value) // => true - * isReactive(ref(true)) // => false - * isReactive(shallowRef({}).value) // => false - * isReactive(shallowReactive({})) // => true - * ``` - * - * @param value - The value to check. - * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive} - */ -export declare function isReactive(value: unknown): boolean; -/** - * Checks whether the passed value is a readonly object. The properties of a - * readonly object can change, but they can't be assigned directly via the - * passed object. - * - * The proxies created by {@link readonly()} and {@link shallowReadonly()} are - * both considered readonly, as is a computed ref without a set function. - * - * @param value - The value to check. - * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly} - */ -export declare function isReadonly(value: unknown): boolean; -export declare function isShallow(value: unknown): boolean; -/** - * Checks if an object is a proxy created by {@link reactive}, - * {@link readonly}, {@link shallowReactive} or {@link shallowReadonly()}. - * - * @param value - The value to check. - * @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy} - */ -export declare function isProxy(value: any): boolean; -/** - * Returns the raw, original object of a Vue-created proxy. - * - * `toRaw()` can return the original object from proxies created by - * {@link reactive()}, {@link readonly()}, {@link shallowReactive()} or - * {@link shallowReadonly()}. - * - * This is an escape hatch that can be used to temporarily read without - * incurring proxy access / tracking overhead or write without triggering - * changes. It is **not** recommended to hold a persistent reference to the - * original object. Use with caution. - * - * @example - * ```js - * const foo = {} - * const reactiveFoo = reactive(foo) - * - * console.log(toRaw(reactiveFoo) === foo) // true - * ``` - * - * @param observed - The object for which the "raw" value is requested. - * @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw} - */ -export declare function toRaw<T>(observed: T): T; -export type Raw<T> = T & { - [RawSymbol]?: true; -}; -/** - * Marks an object so that it will never be converted to a proxy. Returns the - * object itself. - * - * @example - * ```js - * const foo = markRaw({}) - * console.log(isReactive(reactive(foo))) // false - * - * // also works when nested inside other reactive objects - * const bar = reactive({ foo }) - * console.log(isReactive(bar.foo)) // false - * ``` - * - * **Warning:** `markRaw()` together with the shallow APIs such as - * {@link shallowReactive()} allow you to selectively opt-out of the default - * deep reactive/readonly conversion and embed raw, non-proxied objects in your - * state graph. - * - * @param value - The object to be marked as "raw". - * @see {@link https://vuejs.org/api/reactivity-advanced.html#markraw} - */ -export declare function markRaw<T extends object>(value: T): Raw<T>; -/** - * Returns a reactive proxy of the given value (if possible). - * - * If the given value is not an object, the original value itself is returned. - * - * @param value - The value for which a reactive proxy shall be created. - */ -export declare const toReactive: <T extends unknown>(value: T) => T; -/** - * Returns a readonly proxy of the given value (if possible). - * - * If the given value is not an object, the original value itself is returned. - * - * @param value - The value for which a readonly proxy shall be created. - */ -export declare const toReadonly: <T extends unknown>(value: T) => DeepReadonly<T>; - -export type EffectScheduler = (...args: any[]) => any; -export type DebuggerEvent = { - effect: Subscriber; -} & DebuggerEventExtraInfo; -export type DebuggerEventExtraInfo = { - target: object; - type: TrackOpTypes | TriggerOpTypes; - key: any; - newValue?: any; - oldValue?: any; - oldTarget?: Map<any, any> | Set<any>; -}; -export interface DebuggerOptions { - onTrack?: (event: DebuggerEvent) => void; - onTrigger?: (event: DebuggerEvent) => void; -} -export interface ReactiveEffectOptions extends DebuggerOptions { - scheduler?: EffectScheduler; - allowRecurse?: boolean; - onStop?: () => void; -} -export declare enum EffectFlags { - /** - * ReactiveEffect only - */ - ACTIVE = 1, - RUNNING = 2, - TRACKING = 4, - NOTIFIED = 8, - DIRTY = 16, - ALLOW_RECURSE = 32, - PAUSED = 64 -} -/** - * Subscriber is a type that tracks (or subscribes to) a list of deps. - */ -interface Subscriber extends DebuggerOptions { -} -export declare class ReactiveEffect<T = any> implements Subscriber, ReactiveEffectOptions { - fn: () => T; - scheduler?: EffectScheduler; - onStop?: () => void; - onTrack?: (event: DebuggerEvent) => void; - onTrigger?: (event: DebuggerEvent) => void; - constructor(fn: () => T); - pause(): void; - resume(): void; - run(): T; - stop(): void; - trigger(): void; - get dirty(): boolean; -} -export interface ReactiveEffectRunner<T = any> { - (): T; - effect: ReactiveEffect; -} -export interface ReactiveEffectRunner<T = any> { - (): T; - effect: ReactiveEffect; -} -export declare function effect<T = any>(fn: () => T, options?: ReactiveEffectOptions): ReactiveEffectRunner<T>; -/** - * Stops the effect associated with the given runner. - * - * @param runner - Association with the effect to stop tracking. - */ -export declare function stop(runner: ReactiveEffectRunner): void; -/** - * Temporarily pauses tracking. - */ -export declare function pauseTracking(): void; -/** - * Re-enables effect tracking (if it was paused). - */ -export declare function enableTracking(): void; -/** - * Resets the previous global effect tracking state. - */ -export declare function resetTracking(): void; -/** - * Registers a cleanup function for the current active effect. - * The cleanup function is called right before the next effect run, or when the - * effect is stopped. - * - * Throws a warning if there is no current active effect. The warning can be - * suppressed by passing `true` to the second argument. - * - * @param fn - the cleanup function to be registered - * @param failSilently - if `true`, will not throw warning when called without - * an active effect. - */ -export declare function onEffectCleanup(fn: () => void, failSilently?: boolean): void; - -declare const ComputedRefSymbol: unique symbol; -declare const WritableComputedRefSymbol: unique symbol; -interface BaseComputedRef<T, S = T> extends Ref<T, S> { - [ComputedRefSymbol]: true; - /** - * @deprecated computed no longer uses effect - */ - effect: ComputedRefImpl; -} -export interface ComputedRef<T = any> extends BaseComputedRef<T> { - readonly value: T; -} -export interface WritableComputedRef<T, S = T> extends BaseComputedRef<T, S> { - [WritableComputedRefSymbol]: true; -} -export type ComputedGetter<T> = (oldValue?: T) => T; -export type ComputedSetter<T> = (newValue: T) => void; -export interface WritableComputedOptions<T, S = T> { - get: ComputedGetter<T>; - set: ComputedSetter<S>; -} -/** - * @private exported by @vue/reactivity for Vue core use, but not exported from - * the main vue package - */ -export declare class ComputedRefImpl<T = any> implements Subscriber { - fn: ComputedGetter<T>; - private readonly setter; - effect: this; - onTrack?: (event: DebuggerEvent) => void; - onTrigger?: (event: DebuggerEvent) => void; - constructor(fn: ComputedGetter<T>, setter: ComputedSetter<T> | undefined, isSSR: boolean); - get value(): T; - set value(newValue: T); -} -/** - * Takes a getter function and returns a readonly reactive ref object for the - * returned value from the getter. It can also take an object with get and set - * functions to create a writable ref object. - * - * @example - * ```js - * // Creating a readonly computed ref: - * const count = ref(1) - * const plusOne = computed(() => count.value + 1) - * - * console.log(plusOne.value) // 2 - * plusOne.value++ // error - * ``` - * - * ```js - * // Creating a writable computed ref: - * const count = ref(1) - * const plusOne = computed({ - * get: () => count.value + 1, - * set: (val) => { - * count.value = val - 1 - * } - * }) - * - * plusOne.value = 1 - * console.log(count.value) // 0 - * ``` - * - * @param getter - Function that produces the next value. - * @param debugOptions - For debugging. See {@link https://vuejs.org/guide/extras/reactivity-in-depth.html#computed-debugging}. - * @see {@link https://vuejs.org/api/reactivity-core.html#computed} - */ -export declare function computed<T>(getter: ComputedGetter<T>, debugOptions?: DebuggerOptions): ComputedRef<T>; -export declare function computed<T, S = T>(options: WritableComputedOptions<T, S>, debugOptions?: DebuggerOptions): WritableComputedRef<T, S>; - -declare const RefSymbol: unique symbol; -declare const RawSymbol: unique symbol; -export interface Ref<T = any, S = T> { - get value(): T; - set value(_: S); - /** - * Type differentiator only. - * We need this to be in public d.ts but don't want it to show up in IDE - * autocomplete, so we use a private Symbol instead. - */ - [RefSymbol]: true; -} -/** - * Checks if a value is a ref object. - * - * @param r - The value to inspect. - * @see {@link https://vuejs.org/api/reactivity-utilities.html#isref} - */ -export declare function isRef<T>(r: Ref<T> | unknown): r is Ref<T>; -/** - * Takes an inner value and returns a reactive and mutable ref object, which - * has a single property `.value` that points to the inner value. - * - * @param value - The object to wrap in the ref. - * @see {@link https://vuejs.org/api/reactivity-core.html#ref} - */ -export declare function ref<T>(value: T): [T] extends [Ref] ? IfAny<T, Ref<T>, T> : Ref<UnwrapRef<T>, UnwrapRef<T> | T>; -export declare function ref<T = any>(): Ref<T | undefined>; -declare const ShallowRefMarker: unique symbol; -export type ShallowRef<T = any, S = T> = Ref<T, S> & { - [ShallowRefMarker]?: true; -}; -/** - * Shallow version of {@link ref()}. - * - * @example - * ```js - * const state = shallowRef({ count: 1 }) - * - * // does NOT trigger change - * state.value.count = 2 - * - * // does trigger change - * state.value = { count: 2 } - * ``` - * - * @param value - The "inner value" for the shallow ref. - * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowref} - */ -export declare function shallowRef<T>(value: T): Ref extends T ? T extends Ref ? IfAny<T, ShallowRef<T>, T> : ShallowRef<T> : ShallowRef<T>; -export declare function shallowRef<T = any>(): ShallowRef<T | undefined>; -/** - * Force trigger effects that depends on a shallow ref. This is typically used - * after making deep mutations to the inner value of a shallow ref. - * - * @example - * ```js - * const shallow = shallowRef({ - * greet: 'Hello, world' - * }) - * - * // Logs "Hello, world" once for the first run-through - * watchEffect(() => { - * console.log(shallow.value.greet) - * }) - * - * // This won't trigger the effect because the ref is shallow - * shallow.value.greet = 'Hello, universe' - * - * // Logs "Hello, universe" - * triggerRef(shallow) - * ``` - * - * @param ref - The ref whose tied effects shall be executed. - * @see {@link https://vuejs.org/api/reactivity-advanced.html#triggerref} - */ -export declare function triggerRef(ref: Ref): void; -export type MaybeRef<T = any> = T | Ref<T> | ShallowRef<T> | WritableComputedRef<T>; -export type MaybeRefOrGetter<T = any> = MaybeRef<T> | ComputedRef<T> | (() => T); -/** - * Returns the inner value if the argument is a ref, otherwise return the - * argument itself. This is a sugar function for - * `val = isRef(val) ? val.value : val`. - * - * @example - * ```js - * function useFoo(x: number | Ref<number>) { - * const unwrapped = unref(x) - * // unwrapped is guaranteed to be number now - * } - * ``` - * - * @param ref - Ref or plain value to be converted into the plain value. - * @see {@link https://vuejs.org/api/reactivity-utilities.html#unref} - */ -export declare function unref<T>(ref: MaybeRef<T> | ComputedRef<T>): T; -/** - * Normalizes values / refs / getters to values. - * This is similar to {@link unref()}, except that it also normalizes getters. - * If the argument is a getter, it will be invoked and its return value will - * be returned. - * - * @example - * ```js - * toValue(1) // 1 - * toValue(ref(1)) // 1 - * toValue(() => 1) // 1 - * ``` - * - * @param source - A getter, an existing ref, or a non-function value. - * @see {@link https://vuejs.org/api/reactivity-utilities.html#tovalue} - */ -export declare function toValue<T>(source: MaybeRefOrGetter<T>): T; -/** - * Returns a proxy for the given object that shallowly unwraps properties that - * are refs. If the object already is reactive, it's returned as-is. If not, a - * new reactive proxy is created. - * - * @param objectWithRefs - Either an already-reactive object or a simple object - * that contains refs. - */ -export declare function proxyRefs<T extends object>(objectWithRefs: T): ShallowUnwrapRef<T>; -export type CustomRefFactory<T> = (track: () => void, trigger: () => void) => { - get: () => T; - set: (value: T) => void; -}; -/** - * Creates a customized ref with explicit control over its dependency tracking - * and updates triggering. - * - * @param factory - The function that receives the `track` and `trigger` callbacks. - * @see {@link https://vuejs.org/api/reactivity-advanced.html#customref} - */ -export declare function customRef<T>(factory: CustomRefFactory<T>): Ref<T>; -export type ToRefs<T = any> = { - [K in keyof T]: ToRef<T[K]>; -}; -/** - * Converts a reactive object to a plain object where each property of the - * resulting object is a ref pointing to the corresponding property of the - * original object. Each individual ref is created using {@link toRef()}. - * - * @param object - Reactive object to be made into an object of linked refs. - * @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs} - */ -export declare function toRefs<T extends object>(object: T): ToRefs<T>; -export type ToRef<T> = IfAny<T, Ref<T>, [T] extends [Ref] ? T : Ref<T>>; -/** - * Used to normalize values / refs / getters into refs. - * - * @example - * ```js - * // returns existing refs as-is - * toRef(existingRef) - * - * // creates a ref that calls the getter on .value access - * toRef(() => props.foo) - * - * // creates normal refs from non-function values - * // equivalent to ref(1) - * toRef(1) - * ``` - * - * Can also be used to create a ref for a property on a source reactive object. - * The created ref is synced with its source property: mutating the source - * property will update the ref, and vice-versa. - * - * @example - * ```js - * const state = reactive({ - * foo: 1, - * bar: 2 - * }) - * - * const fooRef = toRef(state, 'foo') - * - * // mutating the ref updates the original - * fooRef.value++ - * console.log(state.foo) // 2 - * - * // mutating the original also updates the ref - * state.foo++ - * console.log(fooRef.value) // 3 - * ``` - * - * @param source - A getter, an existing ref, a non-function value, or a - * reactive object to create a property ref from. - * @param [key] - (optional) Name of the property in the reactive object. - * @see {@link https://vuejs.org/api/reactivity-utilities.html#toref} - */ -export declare function toRef<T>(value: T): T extends () => infer R ? Readonly<Ref<R>> : T extends Ref ? T : Ref<UnwrapRef<T>>; -export declare function toRef<T extends object, K extends keyof T>(object: T, key: K): ToRef<T[K]>; -export declare function toRef<T extends object, K extends keyof T>(object: T, key: K, defaultValue: T[K]): ToRef<Exclude<T[K], undefined>>; -/** - * This is a special exported interface for other packages to declare - * additional types that should bail out for ref unwrapping. For example - * \@vue/runtime-dom can declare it like so in its d.ts: - * - * ``` ts - * declare module '@vue/reactivity' { - * export interface RefUnwrapBailTypes { - * runtimeDOMBailTypes: Node | Window - * } - * } - * ``` - */ -export interface RefUnwrapBailTypes { -} -export type ShallowUnwrapRef<T> = { - [K in keyof T]: DistributeRef<T[K]>; -}; -type DistributeRef<T> = T extends Ref<infer V, unknown> ? V : T; -export type UnwrapRef<T> = T extends ShallowRef<infer V, unknown> ? V : T extends Ref<infer V, unknown> ? UnwrapRefSimple<V> : UnwrapRefSimple<T>; -type UnwrapRefSimple<T> = T extends Builtin | Ref | RefUnwrapBailTypes[keyof RefUnwrapBailTypes] | { - [RawSymbol]?: true; -} ? T : T extends Map<infer K, infer V> ? Map<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Map<any, any>>> : T extends WeakMap<infer K, infer V> ? WeakMap<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakMap<any, any>>> : T extends Set<infer V> ? Set<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Set<any>>> : T extends WeakSet<infer V> ? WeakSet<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakSet<any>>> : T extends ReadonlyArray<any> ? { - [K in keyof T]: UnwrapRefSimple<T[K]>; -} : T extends object & { - [ShallowReactiveMarker]?: never; -} ? { - [P in keyof T]: P extends symbol ? T[P] : UnwrapRef<T[P]>; -} : T; - -export declare const ITERATE_KEY: unique symbol; -export declare const MAP_KEY_ITERATE_KEY: unique symbol; -export declare const ARRAY_ITERATE_KEY: unique symbol; -/** - * Tracks access to a reactive property. - * - * This will check which effect is running at the moment and record it as dep - * which records all effects that depend on the reactive property. - * - * @param target - Object holding the reactive property. - * @param type - Defines the type of access to the reactive property. - * @param key - Identifier of the reactive property to track. - */ -export declare function track(target: object, type: TrackOpTypes, key: unknown): void; -/** - * Finds all deps associated with the target (or a specific property) and - * triggers the effects stored within. - * - * @param target - The reactive object. - * @param type - Defines the type of the operation that needs to trigger effects. - * @param key - Can be used to target a specific reactive property in the target object. - */ -export declare function trigger(target: object, type: TriggerOpTypes, key?: unknown, newValue?: unknown, oldValue?: unknown, oldTarget?: Map<unknown, unknown> | Set<unknown>): void; - -export declare class EffectScope { - detached: boolean; - private _isPaused; - constructor(detached?: boolean); - get active(): boolean; - pause(): void; - /** - * Resumes the effect scope, including all child scopes and effects. - */ - resume(): void; - run<T>(fn: () => T): T | undefined; - stop(fromParent?: boolean): void; -} -/** - * Creates an effect scope object which can capture the reactive effects (i.e. - * computed and watchers) created within it so that these effects can be - * disposed together. For detailed use cases of this API, please consult its - * corresponding {@link https://github.com/vuejs/rfcs/blob/master/active-rfcs/0041-reactivity-effect-scope.md | RFC}. - * - * @param detached - Can be used to create a "detached" effect scope. - * @see {@link https://vuejs.org/api/reactivity-advanced.html#effectscope} - */ -export declare function effectScope(detached?: boolean): EffectScope; -/** - * Returns the current active effect scope if there is one. - * - * @see {@link https://vuejs.org/api/reactivity-advanced.html#getcurrentscope} - */ -export declare function getCurrentScope(): EffectScope | undefined; -/** - * Registers a dispose callback on the current active effect scope. The - * callback will be invoked when the associated effect scope is stopped. - * - * @param fn - The callback function to attach to the scope's cleanup. - * @see {@link https://vuejs.org/api/reactivity-advanced.html#onscopedispose} - */ -export declare function onScopeDispose(fn: () => void, failSilently?: boolean): void; - -/** - * Track array iteration and return: - * - if input is reactive: a cloned raw array with reactive values - * - if input is non-reactive or shallowReactive: the original raw array - */ -export declare function reactiveReadArray<T>(array: T[]): T[]; -/** - * Track array iteration and return raw array - */ -export declare function shallowReadArray<T>(arr: T[]): T[]; - -export declare enum WatchErrorCodes { - WATCH_GETTER = 2, - WATCH_CALLBACK = 3, - WATCH_CLEANUP = 4 -} -export type WatchEffect = (onCleanup: OnCleanup) => void; -export type WatchSource<T = any> = Ref<T, any> | ComputedRef<T> | (() => T); -export type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any; -export type OnCleanup = (cleanupFn: () => void) => void; -export interface WatchOptions<Immediate = boolean> extends DebuggerOptions { - immediate?: Immediate; - deep?: boolean | number; - once?: boolean; - scheduler?: WatchScheduler; - onWarn?: (msg: string, ...args: any[]) => void; -} -export type WatchStopHandle = () => void; -export interface WatchHandle extends WatchStopHandle { - pause: () => void; - resume: () => void; - stop: () => void; -} -export type WatchScheduler = (job: () => void, isFirstRun: boolean) => void; -/** - * Returns the current active effect if there is one. - */ -export declare function getCurrentWatcher(): ReactiveEffect<any> | undefined; -/** - * Registers a cleanup callback on the current active effect. This - * registered cleanup callback will be invoked right before the - * associated effect re-runs. - * - * @param cleanupFn - The callback function to attach to the effect's cleanup. - * @param failSilently - if `true`, will not throw warning when called without - * an active effect. - * @param owner - The effect that this cleanup function should be attached to. - * By default, the current active effect. - */ -export declare function onWatcherCleanup(cleanupFn: () => void, failSilently?: boolean, owner?: ReactiveEffect | undefined): void; -export declare function watch(source: WatchSource | WatchSource[] | WatchEffect | object, cb?: WatchCallback | null, options?: WatchOptions): WatchHandle; -export declare function traverse(value: unknown, depth?: number, seen?: Set<unknown>): unknown; - diff --git a/node_modules/@vue/reactivity/dist/reactivity.esm-browser.js b/node_modules/@vue/reactivity/dist/reactivity.esm-browser.js deleted file mode 100644 index ef30911..0000000 --- a/node_modules/@vue/reactivity/dist/reactivity.esm-browser.js +++ /dev/null @@ -1,1938 +0,0 @@ -/** -* @vue/reactivity v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function makeMap(str) { - const map = /* @__PURE__ */ Object.create(null); - for (const key of str.split(",")) map[key] = 1; - return (val) => val in map; -} - -const EMPTY_OBJ = Object.freeze({}) ; -const NOOP = () => { -}; -const extend = Object.assign; -const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } -}; -const hasOwnProperty$1 = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); -const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === "[object Map]"; -const isSet = (val) => toTypeString(val) === "[object Set]"; -const isFunction = (val) => typeof val === "function"; -const isString = (val) => typeof val === "string"; -const isSymbol = (val) => typeof val === "symbol"; -const isObject = (val) => val !== null && typeof val === "object"; -const objectToString = Object.prototype.toString; -const toTypeString = (value) => objectToString.call(value); -const toRawType = (value) => { - return toTypeString(value).slice(8, -1); -}; -const isPlainObject = (val) => toTypeString(val) === "[object Object]"; -const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; -const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -const capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); -}); -const hasChanged = (value, oldValue) => !Object.is(value, oldValue); -const def = (obj, key, value, writable = false) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - writable, - value - }); -}; - -function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); -} - -let activeEffectScope; -class EffectScope { - constructor(detached = false) { - this.detached = detached; - /** - * @internal - */ - this._active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - this._isPaused = false; - this.parent = activeEffectScope; - if (!detached && activeEffectScope) { - this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( - this - ) - 1; - } - } - get active() { - return this._active; - } - pause() { - if (this._active) { - this._isPaused = true; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].pause(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].pause(); - } - } - } - /** - * Resumes the effect scope, including all child scopes and effects. - */ - resume() { - if (this._active) { - if (this._isPaused) { - this._isPaused = false; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].resume(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].resume(); - } - } - } - } - run(fn) { - if (this._active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } finally { - activeEffectScope = currentEffectScope; - } - } else { - warn(`cannot run an inactive effect scope.`); - } - } - /** - * This should only be called on non-detached scopes - * @internal - */ - on() { - activeEffectScope = this; - } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this._active) { - this._active = false; - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - this.effects.length = 0; - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - this.cleanups.length = 0; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - this.scopes.length = 0; - } - if (!this.detached && this.parent && !fromParent) { - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.parent = void 0; - } - } -} -function effectScope(detached) { - return new EffectScope(detached); -} -function getCurrentScope() { - return activeEffectScope; -} -function onScopeDispose(fn, failSilently = false) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } else if (!failSilently) { - warn( - `onScopeDispose() is called when there is no active effect scope to be associated with.` - ); - } -} - -let activeSub; -const EffectFlags = { - "ACTIVE": 1, - "1": "ACTIVE", - "RUNNING": 2, - "2": "RUNNING", - "TRACKING": 4, - "4": "TRACKING", - "NOTIFIED": 8, - "8": "NOTIFIED", - "DIRTY": 16, - "16": "DIRTY", - "ALLOW_RECURSE": 32, - "32": "ALLOW_RECURSE", - "PAUSED": 64, - "64": "PAUSED" -}; -const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); -class ReactiveEffect { - constructor(fn) { - this.fn = fn; - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 1 | 4; - /** - * @internal - */ - this.next = void 0; - /** - * @internal - */ - this.cleanup = void 0; - this.scheduler = void 0; - if (activeEffectScope && activeEffectScope.active) { - activeEffectScope.effects.push(this); - } - } - pause() { - this.flags |= 64; - } - resume() { - if (this.flags & 64) { - this.flags &= ~64; - if (pausedQueueEffects.has(this)) { - pausedQueueEffects.delete(this); - this.trigger(); - } - } - } - /** - * @internal - */ - notify() { - if (this.flags & 2 && !(this.flags & 32)) { - return; - } - if (!(this.flags & 8)) { - batch(this); - } - } - run() { - if (!(this.flags & 1)) { - return this.fn(); - } - this.flags |= 2; - cleanupEffect(this); - prepareDeps(this); - const prevEffect = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = this; - shouldTrack = true; - try { - return this.fn(); - } finally { - if (activeSub !== this) { - warn( - "Active effect was not restored correctly - this is likely a Vue internal bug." - ); - } - cleanupDeps(this); - activeSub = prevEffect; - shouldTrack = prevShouldTrack; - this.flags &= ~2; - } - } - stop() { - if (this.flags & 1) { - for (let link = this.deps; link; link = link.nextDep) { - removeSub(link); - } - this.deps = this.depsTail = void 0; - cleanupEffect(this); - this.onStop && this.onStop(); - this.flags &= ~1; - } - } - trigger() { - if (this.flags & 64) { - pausedQueueEffects.add(this); - } else if (this.scheduler) { - this.scheduler(); - } else { - this.runIfDirty(); - } - } - /** - * @internal - */ - runIfDirty() { - if (isDirty(this)) { - this.run(); - } - } - get dirty() { - return isDirty(this); - } -} -let batchDepth = 0; -let batchedSub; -let batchedComputed; -function batch(sub, isComputed = false) { - sub.flags |= 8; - if (isComputed) { - sub.next = batchedComputed; - batchedComputed = sub; - return; - } - sub.next = batchedSub; - batchedSub = sub; -} -function startBatch() { - batchDepth++; -} -function endBatch() { - if (--batchDepth > 0) { - return; - } - if (batchedComputed) { - let e = batchedComputed; - batchedComputed = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - e = next; - } - } - let error; - while (batchedSub) { - let e = batchedSub; - batchedSub = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - if (e.flags & 1) { - try { - ; - e.trigger(); - } catch (err) { - if (!error) error = err; - } - } - e = next; - } - } - if (error) throw error; -} -function prepareDeps(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - link.version = -1; - link.prevActiveLink = link.dep.activeLink; - link.dep.activeLink = link; - } -} -function cleanupDeps(sub) { - let head; - let tail = sub.depsTail; - let link = tail; - while (link) { - const prev = link.prevDep; - if (link.version === -1) { - if (link === tail) tail = prev; - removeSub(link); - removeDep(link); - } else { - head = link; - } - link.dep.activeLink = link.prevActiveLink; - link.prevActiveLink = void 0; - link = prev; - } - sub.deps = head; - sub.depsTail = tail; -} -function isDirty(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { - return true; - } - } - if (sub._dirty) { - return true; - } - return false; -} -function refreshComputed(computed) { - if (computed.flags & 4 && !(computed.flags & 16)) { - return; - } - computed.flags &= ~16; - if (computed.globalVersion === globalVersion) { - return; - } - computed.globalVersion = globalVersion; - const dep = computed.dep; - computed.flags |= 2; - if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { - computed.flags &= ~2; - return; - } - const prevSub = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = computed; - shouldTrack = true; - try { - prepareDeps(computed); - const value = computed.fn(computed._value); - if (dep.version === 0 || hasChanged(value, computed._value)) { - computed._value = value; - dep.version++; - } - } catch (err) { - dep.version++; - throw err; - } finally { - activeSub = prevSub; - shouldTrack = prevShouldTrack; - cleanupDeps(computed); - computed.flags &= ~2; - } -} -function removeSub(link, soft = false) { - const { dep, prevSub, nextSub } = link; - if (prevSub) { - prevSub.nextSub = nextSub; - link.prevSub = void 0; - } - if (nextSub) { - nextSub.prevSub = prevSub; - link.nextSub = void 0; - } - if (dep.subsHead === link) { - dep.subsHead = nextSub; - } - if (dep.subs === link) { - dep.subs = prevSub; - if (!prevSub && dep.computed) { - dep.computed.flags &= ~4; - for (let l = dep.computed.deps; l; l = l.nextDep) { - removeSub(l, true); - } - } - } - if (!soft && !--dep.sc && dep.map) { - dep.map.delete(dep.key); - } -} -function removeDep(link) { - const { prevDep, nextDep } = link; - if (prevDep) { - prevDep.nextDep = nextDep; - link.prevDep = void 0; - } - if (nextDep) { - nextDep.prevDep = prevDep; - link.nextDep = void 0; - } -} -function effect(fn, options) { - if (fn.effect instanceof ReactiveEffect) { - fn = fn.effect.fn; - } - const e = new ReactiveEffect(fn); - if (options) { - extend(e, options); - } - try { - e.run(); - } catch (err) { - e.stop(); - throw err; - } - const runner = e.run.bind(e); - runner.effect = e; - return runner; -} -function stop(runner) { - runner.effect.stop(); -} -let shouldTrack = true; -const trackStack = []; -function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; -} -function enableTracking() { - trackStack.push(shouldTrack); - shouldTrack = true; -} -function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === void 0 ? true : last; -} -function onEffectCleanup(fn, failSilently = false) { - if (activeSub instanceof ReactiveEffect) { - activeSub.cleanup = fn; - } else if (!failSilently) { - warn( - `onEffectCleanup() was called when there was no active effect to associate with.` - ); - } -} -function cleanupEffect(e) { - const { cleanup } = e; - e.cleanup = void 0; - if (cleanup) { - const prevSub = activeSub; - activeSub = void 0; - try { - cleanup(); - } finally { - activeSub = prevSub; - } - } -} - -let globalVersion = 0; -class Link { - constructor(sub, dep) { - this.sub = sub; - this.dep = dep; - this.version = dep.version; - this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; - } -} -class Dep { - constructor(computed) { - this.computed = computed; - this.version = 0; - /** - * Link between this dep and the current active effect - */ - this.activeLink = void 0; - /** - * Doubly linked list representing the subscribing effects (tail) - */ - this.subs = void 0; - /** - * For object property deps cleanup - */ - this.map = void 0; - this.key = void 0; - /** - * Subscriber counter - */ - this.sc = 0; - { - this.subsHead = void 0; - } - } - track(debugInfo) { - if (!activeSub || !shouldTrack || activeSub === this.computed) { - return; - } - let link = this.activeLink; - if (link === void 0 || link.sub !== activeSub) { - link = this.activeLink = new Link(activeSub, this); - if (!activeSub.deps) { - activeSub.deps = activeSub.depsTail = link; - } else { - link.prevDep = activeSub.depsTail; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - } - addSub(link); - } else if (link.version === -1) { - link.version = this.version; - if (link.nextDep) { - const next = link.nextDep; - next.prevDep = link.prevDep; - if (link.prevDep) { - link.prevDep.nextDep = next; - } - link.prevDep = activeSub.depsTail; - link.nextDep = void 0; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - if (activeSub.deps === link) { - activeSub.deps = next; - } - } - } - if (activeSub.onTrack) { - activeSub.onTrack( - extend( - { - effect: activeSub - }, - debugInfo - ) - ); - } - return link; - } - trigger(debugInfo) { - this.version++; - globalVersion++; - this.notify(debugInfo); - } - notify(debugInfo) { - startBatch(); - try { - if (true) { - for (let head = this.subsHead; head; head = head.nextSub) { - if (head.sub.onTrigger && !(head.sub.flags & 8)) { - head.sub.onTrigger( - extend( - { - effect: head.sub - }, - debugInfo - ) - ); - } - } - } - for (let link = this.subs; link; link = link.prevSub) { - if (link.sub.notify()) { - ; - link.sub.dep.notify(); - } - } - } finally { - endBatch(); - } - } -} -function addSub(link) { - link.dep.sc++; - if (link.sub.flags & 4) { - const computed = link.dep.computed; - if (computed && !link.dep.subs) { - computed.flags |= 4 | 16; - for (let l = computed.deps; l; l = l.nextDep) { - addSub(l); - } - } - const currentTail = link.dep.subs; - if (currentTail !== link) { - link.prevSub = currentTail; - if (currentTail) currentTail.nextSub = link; - } - if (link.dep.subsHead === void 0) { - link.dep.subsHead = link; - } - link.dep.subs = link; - } -} -const targetMap = /* @__PURE__ */ new WeakMap(); -const ITERATE_KEY = Symbol( - "Object iterate" -); -const MAP_KEY_ITERATE_KEY = Symbol( - "Map keys iterate" -); -const ARRAY_ITERATE_KEY = Symbol( - "Array iterate" -); -function track(target, type, key) { - if (shouldTrack && activeSub) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = new Dep()); - dep.map = depsMap; - dep.key = key; - } - { - dep.track({ - target, - type, - key - }); - } - } -} -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - globalVersion++; - return; - } - const run = (dep) => { - if (dep) { - { - dep.trigger({ - target, - type, - key, - newValue, - oldValue, - oldTarget - }); - } - } - }; - startBatch(); - if (type === "clear") { - depsMap.forEach(run); - } else { - const targetIsArray = isArray(target); - const isArrayIndex = targetIsArray && isIntegerKey(key); - if (targetIsArray && key === "length") { - const newLength = Number(newValue); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { - run(dep); - } - }); - } else { - if (key !== void 0 || depsMap.has(void 0)) { - run(depsMap.get(key)); - } - if (isArrayIndex) { - run(depsMap.get(ARRAY_ITERATE_KEY)); - } - switch (type) { - case "add": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isArrayIndex) { - run(depsMap.get("length")); - } - break; - case "delete": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (isMap(target)) { - run(depsMap.get(ITERATE_KEY)); - } - break; - } - } - } - endBatch(); -} -function getDepFromReactive(object, key) { - const depMap = targetMap.get(object); - return depMap && depMap.get(key); -} - -function reactiveReadArray(array) { - const raw = toRaw(array); - if (raw === array) return raw; - track(raw, "iterate", ARRAY_ITERATE_KEY); - return isShallow(array) ? raw : raw.map(toReactive); -} -function shallowReadArray(arr) { - track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); - return arr; -} -const arrayInstrumentations = { - __proto__: null, - [Symbol.iterator]() { - return iterator(this, Symbol.iterator, toReactive); - }, - concat(...args) { - return reactiveReadArray(this).concat( - ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) - ); - }, - entries() { - return iterator(this, "entries", (value) => { - value[1] = toReactive(value[1]); - return value; - }); - }, - every(fn, thisArg) { - return apply(this, "every", fn, thisArg, void 0, arguments); - }, - filter(fn, thisArg) { - return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); - }, - find(fn, thisArg) { - return apply(this, "find", fn, thisArg, toReactive, arguments); - }, - findIndex(fn, thisArg) { - return apply(this, "findIndex", fn, thisArg, void 0, arguments); - }, - findLast(fn, thisArg) { - return apply(this, "findLast", fn, thisArg, toReactive, arguments); - }, - findLastIndex(fn, thisArg) { - return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); - }, - // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement - forEach(fn, thisArg) { - return apply(this, "forEach", fn, thisArg, void 0, arguments); - }, - includes(...args) { - return searchProxy(this, "includes", args); - }, - indexOf(...args) { - return searchProxy(this, "indexOf", args); - }, - join(separator) { - return reactiveReadArray(this).join(separator); - }, - // keys() iterator only reads `length`, no optimisation required - lastIndexOf(...args) { - return searchProxy(this, "lastIndexOf", args); - }, - map(fn, thisArg) { - return apply(this, "map", fn, thisArg, void 0, arguments); - }, - pop() { - return noTracking(this, "pop"); - }, - push(...args) { - return noTracking(this, "push", args); - }, - reduce(fn, ...args) { - return reduce(this, "reduce", fn, args); - }, - reduceRight(fn, ...args) { - return reduce(this, "reduceRight", fn, args); - }, - shift() { - return noTracking(this, "shift"); - }, - // slice could use ARRAY_ITERATE but also seems to beg for range tracking - some(fn, thisArg) { - return apply(this, "some", fn, thisArg, void 0, arguments); - }, - splice(...args) { - return noTracking(this, "splice", args); - }, - toReversed() { - return reactiveReadArray(this).toReversed(); - }, - toSorted(comparer) { - return reactiveReadArray(this).toSorted(comparer); - }, - toSpliced(...args) { - return reactiveReadArray(this).toSpliced(...args); - }, - unshift(...args) { - return noTracking(this, "unshift", args); - }, - values() { - return iterator(this, "values", toReactive); - } -}; -function iterator(self, method, wrapValue) { - const arr = shallowReadArray(self); - const iter = arr[method](); - if (arr !== self && !isShallow(self)) { - iter._next = iter.next; - iter.next = () => { - const result = iter._next(); - if (result.value) { - result.value = wrapValue(result.value); - } - return result; - }; - } - return iter; -} -const arrayProto = Array.prototype; -function apply(self, method, fn, thisArg, wrappedRetFn, args) { - const arr = shallowReadArray(self); - const needsWrap = arr !== self && !isShallow(self); - const methodFn = arr[method]; - if (methodFn !== arrayProto[method]) { - const result2 = methodFn.apply(self, args); - return needsWrap ? toReactive(result2) : result2; - } - let wrappedFn = fn; - if (arr !== self) { - if (needsWrap) { - wrappedFn = function(item, index) { - return fn.call(this, toReactive(item), index, self); - }; - } else if (fn.length > 2) { - wrappedFn = function(item, index) { - return fn.call(this, item, index, self); - }; - } - } - const result = methodFn.call(arr, wrappedFn, thisArg); - return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; -} -function reduce(self, method, fn, args) { - const arr = shallowReadArray(self); - let wrappedFn = fn; - if (arr !== self) { - if (!isShallow(self)) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, toReactive(item), index, self); - }; - } else if (fn.length > 3) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, item, index, self); - }; - } - } - return arr[method](wrappedFn, ...args); -} -function searchProxy(self, method, args) { - const arr = toRaw(self); - track(arr, "iterate", ARRAY_ITERATE_KEY); - const res = arr[method](...args); - if ((res === -1 || res === false) && isProxy(args[0])) { - args[0] = toRaw(args[0]); - return arr[method](...args); - } - return res; -} -function noTracking(self, method, args = []) { - pauseTracking(); - startBatch(); - const res = toRaw(self)[method].apply(self, args); - endBatch(); - resetTracking(); - return res; -} - -const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); -const builtInSymbols = new Set( - /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) -); -function hasOwnProperty(key) { - if (!isSymbol(key)) key = String(key); - const obj = toRaw(this); - track(obj, "has", key); - return obj.hasOwnProperty(key); -} -class BaseReactiveHandler { - constructor(_isReadonly = false, _isShallow = false) { - this._isReadonly = _isReadonly; - this._isShallow = _isShallow; - } - get(target, key, receiver) { - if (key === "__v_skip") return target["__v_skip"]; - const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_isShallow") { - return isShallow2; - } else if (key === "__v_raw") { - if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype - // this means the receiver is a user proxy of the reactive proxy - Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { - return target; - } - return; - } - const targetIsArray = isArray(target); - if (!isReadonly2) { - let fn; - if (targetIsArray && (fn = arrayInstrumentations[key])) { - return fn; - } - if (key === "hasOwnProperty") { - return hasOwnProperty; - } - } - const res = Reflect.get( - target, - key, - // if this is a proxy wrapping a ref, return methods using the raw ref - // as receiver so that we don't have to call `toRaw` on the ref in all - // its class methods - isRef(target) ? target : receiver - ); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly2) { - track(target, "get", key); - } - if (isShallow2) { - return res; - } - if (isRef(res)) { - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - return isReadonly2 ? readonly(res) : reactive(res); - } - return res; - } -} -class MutableReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(false, isShallow2); - } - set(target, key, value, receiver) { - let oldValue = target[key]; - if (!this._isShallow) { - const isOldValueReadonly = isReadonly(oldValue); - if (!isShallow(value) && !isReadonly(value)) { - oldValue = toRaw(oldValue); - value = toRaw(value); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - if (isOldValueReadonly) { - return false; - } else { - oldValue.value = value; - return true; - } - } - } - const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); - const result = Reflect.set( - target, - key, - value, - isRef(target) ? target : receiver - ); - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - } - return result; - } - deleteProperty(target, key) { - const hadKey = hasOwn(target, key); - const oldValue = target[key]; - const result = Reflect.deleteProperty(target, key); - if (result && hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - } - has(target, key) { - const result = Reflect.has(target, key); - if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has", key); - } - return result; - } - ownKeys(target) { - track( - target, - "iterate", - isArray(target) ? "length" : ITERATE_KEY - ); - return Reflect.ownKeys(target); - } -} -class ReadonlyReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(true, isShallow2); - } - set(target, key) { - { - warn( - `Set operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } - deleteProperty(target, key) { - { - warn( - `Delete operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } -} -const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); -const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); -const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); -const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); - -const toShallow = (value) => value; -const getProto = (v) => Reflect.getPrototypeOf(v); -function createIterableMethod(method, isReadonly2, isShallow2) { - return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; - const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; - !isReadonly2 && track( - rawTarget, - "iterate", - isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY - ); - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done ? { value, done } : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } - }; - }; -} -function createReadonlyMethod(type) { - return function(...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - warn( - `${capitalize(type)} operation ${key}failed: target is readonly.`, - toRaw(this) - ); - } - return type === "delete" ? false : type === "clear" ? void 0 : this; - }; -} -function createInstrumentations(readonly, shallow) { - const instrumentations = { - get(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "get", key); - } - track(rawTarget, "get", rawKey); - } - const { has } = getProto(rawTarget); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } else if (target !== rawTarget) { - target.get(key); - } - }, - get size() { - const target = this["__v_raw"]; - !readonly && track(toRaw(target), "iterate", ITERATE_KEY); - return Reflect.get(target, "size", target); - }, - has(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "has", key); - } - track(rawTarget, "has", rawKey); - } - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); - }, - forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - !readonly && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value, key) => { - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - } - }; - extend( - instrumentations, - readonly ? { - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear") - } : { - add(value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add", value, value); - } - return this; - }, - set(key, value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - return this; - }, - delete(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : void 0; - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - }, - clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; - const result = target.clear(); - if (hadItems) { - trigger( - target, - "clear", - void 0, - void 0, - oldTarget - ); - } - return result; - } - } - ); - const iteratorMethods = [ - "keys", - "values", - "entries", - Symbol.iterator - ]; - iteratorMethods.forEach((method) => { - instrumentations[method] = createIterableMethod(method, readonly, shallow); - }); - return instrumentations; -} -function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = createInstrumentations(isReadonly2, shallow); - return (target, key, receiver) => { - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_raw") { - return target; - } - return Reflect.get( - hasOwn(instrumentations, key) && key in target ? instrumentations : target, - key, - receiver - ); - }; -} -const mutableCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, false) -}; -const shallowCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, true) -}; -const readonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, false) -}; -const shallowReadonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, true) -}; -function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - warn( - `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` - ); - } -} - -const reactiveMap = /* @__PURE__ */ new WeakMap(); -const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); -const readonlyMap = /* @__PURE__ */ new WeakMap(); -const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); -function targetTypeMap(rawType) { - switch (rawType) { - case "Object": - case "Array": - return 1 /* COMMON */; - case "Map": - case "Set": - case "WeakMap": - case "WeakSet": - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } -} -function getTargetType(value) { - return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); -} -function reactive(target) { - if (isReadonly(target)) { - return target; - } - return createReactiveObject( - target, - false, - mutableHandlers, - mutableCollectionHandlers, - reactiveMap - ); -} -function shallowReactive(target) { - return createReactiveObject( - target, - false, - shallowReactiveHandlers, - shallowCollectionHandlers, - shallowReactiveMap - ); -} -function readonly(target) { - return createReactiveObject( - target, - true, - readonlyHandlers, - readonlyCollectionHandlers, - readonlyMap - ); -} -function shallowReadonly(target) { - return createReactiveObject( - target, - true, - shallowReadonlyHandlers, - shallowReadonlyCollectionHandlers, - shallowReadonlyMap - ); -} -function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - { - warn( - `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( - target - )}` - ); - } - return target; - } - if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { - return target; - } - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy( - target, - targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers - ); - proxyMap.set(target, proxy); - return proxy; -} -function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw"]); - } - return !!(value && value["__v_isReactive"]); -} -function isReadonly(value) { - return !!(value && value["__v_isReadonly"]); -} -function isShallow(value) { - return !!(value && value["__v_isShallow"]); -} -function isProxy(value) { - return value ? !!value["__v_raw"] : false; -} -function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; -} -function markRaw(value) { - if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { - def(value, "__v_skip", true); - } - return value; -} -const toReactive = (value) => isObject(value) ? reactive(value) : value; -const toReadonly = (value) => isObject(value) ? readonly(value) : value; - -function isRef(r) { - return r ? r["__v_isRef"] === true : false; -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -class RefImpl { - constructor(value, isShallow2) { - this.dep = new Dep(); - this["__v_isRef"] = true; - this["__v_isShallow"] = false; - this._rawValue = isShallow2 ? value : toRaw(value); - this._value = isShallow2 ? value : toReactive(value); - this["__v_isShallow"] = isShallow2; - } - get value() { - { - this.dep.track({ - target: this, - type: "get", - key: "value" - }); - } - return this._value; - } - set value(newValue) { - const oldValue = this._rawValue; - const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); - newValue = useDirectValue ? newValue : toRaw(newValue); - if (hasChanged(newValue, oldValue)) { - this._rawValue = newValue; - this._value = useDirectValue ? newValue : toReactive(newValue); - { - this.dep.trigger({ - target: this, - type: "set", - key: "value", - newValue, - oldValue - }); - } - } - } -} -function triggerRef(ref2) { - if (ref2.dep) { - { - ref2.dep.trigger({ - target: ref2, - type: "set", - key: "value", - newValue: ref2._value - }); - } - } -} -function unref(ref2) { - return isRef(ref2) ? ref2.value : ref2; -} -function toValue(source) { - return isFunction(source) ? source() : unref(source); -} -const shallowUnwrapHandlers = { - get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -class CustomRefImpl { - constructor(factory) { - this["__v_isRef"] = true; - this._value = void 0; - const dep = this.dep = new Dep(); - const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); - this._get = get; - this._set = set; - } - get value() { - return this._value = this._get(); - } - set value(newVal) { - this._set(newVal); - } -} -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - if (!isProxy(object)) { - warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = propertyToRef(object, key); - } - return ret; -} -class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this["__v_isRef"] = true; - this._value = void 0; - } - get value() { - const val = this._object[this._key]; - return this._value = val === void 0 ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - get dep() { - return getDepFromReactive(toRaw(this._object), this._key); - } -} -class GetterRefImpl { - constructor(_getter) { - this._getter = _getter; - this["__v_isRef"] = true; - this["__v_isReadonly"] = true; - this._value = void 0; - } - get value() { - return this._value = this._getter(); - } -} -function toRef(source, key, defaultValue) { - if (isRef(source)) { - return source; - } else if (isFunction(source)) { - return new GetterRefImpl(source); - } else if (isObject(source) && arguments.length > 1) { - return propertyToRef(source, key, defaultValue); - } else { - return ref(source); - } -} -function propertyToRef(source, key, defaultValue) { - const val = source[key]; - return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); -} - -class ComputedRefImpl { - constructor(fn, setter, isSSR) { - this.fn = fn; - this.setter = setter; - /** - * @internal - */ - this._value = void 0; - /** - * @internal - */ - this.dep = new Dep(this); - /** - * @internal - */ - this.__v_isRef = true; - // TODO isolatedDeclarations "__v_isReadonly" - // A computed is also a subscriber that tracks other deps - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 16; - /** - * @internal - */ - this.globalVersion = globalVersion - 1; - /** - * @internal - */ - this.next = void 0; - // for backwards compat - this.effect = this; - this["__v_isReadonly"] = !setter; - this.isSSR = isSSR; - } - /** - * @internal - */ - notify() { - this.flags |= 16; - if (!(this.flags & 8) && // avoid infinite self recursion - activeSub !== this) { - batch(this, true); - return true; - } - } - get value() { - const link = this.dep.track({ - target: this, - type: "get", - key: "value" - }) ; - refreshComputed(this); - if (link) { - link.version = this.dep.version; - } - return this._value; - } - set value(newValue) { - if (this.setter) { - this.setter(newValue); - } else { - warn("Write operation failed: computed value is readonly"); - } - } -} -function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - if (isFunction(getterOrOptions)) { - getter = getterOrOptions; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, isSSR); - if (debugOptions && !isSSR) { - cRef.onTrack = debugOptions.onTrack; - cRef.onTrigger = debugOptions.onTrigger; - } - return cRef; -} - -const TrackOpTypes = { - "GET": "get", - "HAS": "has", - "ITERATE": "iterate" -}; -const TriggerOpTypes = { - "SET": "set", - "ADD": "add", - "DELETE": "delete", - "CLEAR": "clear" -}; -const ReactiveFlags = { - "SKIP": "__v_skip", - "IS_REACTIVE": "__v_isReactive", - "IS_READONLY": "__v_isReadonly", - "IS_SHALLOW": "__v_isShallow", - "RAW": "__v_raw", - "IS_REF": "__v_isRef" -}; - -const WatchErrorCodes = { - "WATCH_GETTER": 2, - "2": "WATCH_GETTER", - "WATCH_CALLBACK": 3, - "3": "WATCH_CALLBACK", - "WATCH_CLEANUP": 4, - "4": "WATCH_CLEANUP" -}; -const INITIAL_WATCHER_VALUE = {}; -const cleanupMap = /* @__PURE__ */ new WeakMap(); -let activeWatcher = void 0; -function getCurrentWatcher() { - return activeWatcher; -} -function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { - if (owner) { - let cleanups = cleanupMap.get(owner); - if (!cleanups) cleanupMap.set(owner, cleanups = []); - cleanups.push(cleanupFn); - } else if (!failSilently) { - warn( - `onWatcherCleanup() was called when there was no active watcher to associate with.` - ); - } -} -function watch(source, cb, options = EMPTY_OBJ) { - const { immediate, deep, once, scheduler, augmentJob, call } = options; - const warnInvalidSource = (s) => { - (options.onWarn || warn)( - `Invalid watch source: `, - s, - `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` - ); - }; - const reactiveGetter = (source2) => { - if (deep) return source2; - if (isShallow(source2) || deep === false || deep === 0) - return traverse(source2, 1); - return traverse(source2); - }; - let effect; - let getter; - let cleanup; - let boundCleanup; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); - } else if (isReactive(source)) { - getter = () => reactiveGetter(source); - forceTrigger = true; - } else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); - getter = () => source.map((s) => { - if (isRef(s)) { - return s.value; - } else if (isReactive(s)) { - return reactiveGetter(s); - } else if (isFunction(s)) { - return call ? call(s, 2) : s(); - } else { - warnInvalidSource(s); - } - }); - } else if (isFunction(source)) { - if (cb) { - getter = call ? () => call(source, 2) : source; - } else { - getter = () => { - if (cleanup) { - pauseTracking(); - try { - cleanup(); - } finally { - resetTracking(); - } - } - const currentEffect = activeWatcher; - activeWatcher = effect; - try { - return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); - } finally { - activeWatcher = currentEffect; - } - }; - } - } else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - const depth = deep === true ? Infinity : deep; - getter = () => traverse(baseGetter(), depth); - } - const scope = getCurrentScope(); - const watchHandle = () => { - effect.stop(); - if (scope && scope.active) { - remove(scope.effects, effect); - } - }; - if (once && cb) { - const _cb = cb; - cb = (...args) => { - _cb(...args); - watchHandle(); - }; - } - let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; - const job = (immediateFirstRun) => { - if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { - return; - } - if (cb) { - const newValue = effect.run(); - if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { - if (cleanup) { - cleanup(); - } - const currentWatcher = activeWatcher; - activeWatcher = effect; - try { - const args = [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, - boundCleanup - ]; - call ? call(cb, 3, args) : ( - // @ts-expect-error - cb(...args) - ); - oldValue = newValue; - } finally { - activeWatcher = currentWatcher; - } - } - } else { - effect.run(); - } - }; - if (augmentJob) { - augmentJob(job); - } - effect = new ReactiveEffect(getter); - effect.scheduler = scheduler ? () => scheduler(job, false) : job; - boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); - cleanup = effect.onStop = () => { - const cleanups = cleanupMap.get(effect); - if (cleanups) { - if (call) { - call(cleanups, 4); - } else { - for (const cleanup2 of cleanups) cleanup2(); - } - cleanupMap.delete(effect); - } - }; - { - effect.onTrack = options.onTrack; - effect.onTrigger = options.onTrigger; - } - if (cb) { - if (immediate) { - job(true); - } else { - oldValue = effect.run(); - } - } else if (scheduler) { - scheduler(job.bind(null, true), true); - } else { - effect.run(); - } - watchHandle.pause = effect.pause.bind(effect); - watchHandle.resume = effect.resume.bind(effect); - watchHandle.stop = watchHandle; - return watchHandle; -} -function traverse(value, depth = Infinity, seen) { - if (depth <= 0 || !isObject(value) || value["__v_skip"]) { - return value; - } - seen = seen || /* @__PURE__ */ new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - depth--; - if (isRef(value)) { - traverse(value.value, depth, seen); - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], depth, seen); - } - } else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, depth, seen); - }); - } else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], depth, seen); - } - for (const key of Object.getOwnPropertySymbols(value)) { - if (Object.prototype.propertyIsEnumerable.call(value, key)) { - traverse(value[key], depth, seen); - } - } - } - return value; -} - -export { ARRAY_ITERATE_KEY, EffectFlags, EffectScope, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, WatchErrorCodes, computed, customRef, effect, effectScope, enableTracking, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onEffectCleanup, onScopeDispose, onWatcherCleanup, pauseTracking, proxyRefs, reactive, reactiveReadArray, readonly, ref, resetTracking, shallowReactive, shallowReadArray, shallowReadonly, shallowRef, stop, toRaw, toReactive, toReadonly, toRef, toRefs, toValue, track, traverse, trigger, triggerRef, unref, watch }; diff --git a/node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js b/node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js deleted file mode 100644 index fc57b0a..0000000 --- a/node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js +++ /dev/null @@ -1,5 +0,0 @@ -/** -* @vue/reactivity v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let e,t,i,s,r;let n={},l=()=>{},a=Object.assign,o=(e,t)=>{let i=e.indexOf(t);i>-1&&e.splice(i,1)},u=Object.prototype.hasOwnProperty,h=(e,t)=>u.call(e,t),c=Array.isArray,f=e=>"[object Map]"===R(e),p=e=>"[object Set]"===R(e),d=e=>"function"==typeof e,_=e=>"string"==typeof e,v=e=>"symbol"==typeof e,g=e=>null!==e&&"object"==typeof e,y=Object.prototype.toString,R=e=>y.call(e),b=e=>R(e).slice(8,-1),w=e=>"[object Object]"===R(e),S=e=>_(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,x=(e,t)=>!Object.is(e,t),E=(e,t,i,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:i})};class m{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=e,!t&&e&&(this.index=(e.scopes||(e.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(t){if(this._active){let i=e;try{return e=this,t()}finally{e=i}}}on(){e=this}off(){e=this.parent}stop(e){if(this._active){let t,i;for(t=0,this._active=!1,i=this.effects.length;t<i;t++)this.effects[t].stop();for(t=0,this.effects.length=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}function T(e){return new m(e)}function k(){return e}function A(t,i=!1){e&&e.cleanups.push(t)}let D={ACTIVE:1,1:"ACTIVE",RUNNING:2,2:"RUNNING",TRACKING:4,4:"TRACKING",NOTIFIED:8,8:"NOTIFIED",DIRTY:16,16:"DIRTY",ALLOW_RECURSE:32,32:"ALLOW_RECURSE",PAUSED:64,64:"PAUSED"},O=new WeakSet;class I{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,e&&e.active&&e.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,O.has(this)&&(O.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||j(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,q(this),P(this);let e=t,i=U;t=this,U=!0;try{return this.fn()}finally{W(this),t=e,U=i,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)K(e);this.deps=this.depsTail=void 0,q(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?O.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){N(this)&&this.run()}get dirty(){return N(this)}}let L=0;function j(e,t=!1){if(e.flags|=8,t){e.next=s,s=e;return}e.next=i,i=e}function C(){let e;if(!(--L>0)){if(s){let e=s;for(s=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;i;){let t=i;for(i=void 0;t;){let i=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=i}}if(e)throw e}}function P(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function W(e){let t;let i=e.depsTail,s=i;for(;s;){let e=s.prevDep;-1===s.version?(s===i&&(i=e),K(s),function(e){let{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=e}e.deps=t,e.depsTail=i}function N(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(V(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function V(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===J))return;e.globalVersion=J;let i=e.dep;if(e.flags|=2,i.version>0&&!e.isSSR&&e.deps&&!N(e)){e.flags&=-3;return}let s=t,r=U;t=e,U=!0;try{P(e);let t=e.fn(e._value);(0===i.version||x(t,e._value))&&(e._value=t,i.version++)}catch(e){throw i.version++,e}finally{t=s,U=r,W(e),e.flags&=-3}}function K(e,t=!1){let{dep:i,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),i.subs===e&&(i.subs=s,!s&&i.computed)){i.computed.flags&=-5;for(let e=i.computed.deps;e;e=e.nextDep)K(e,!0)}t||--i.sc||!i.map||i.map.delete(i.key)}function M(e,t){e.effect instanceof I&&(e=e.effect.fn);let i=new I(e);t&&a(i,t);try{i.run()}catch(e){throw i.stop(),e}let s=i.run.bind(i);return s.effect=i,s}function H(e){e.effect.stop()}let U=!0,Y=[];function G(){Y.push(U),U=!1}function F(){Y.push(U),U=!0}function z(){let e=Y.pop();U=void 0===e||e}function B(e,i=!1){t instanceof I&&(t.cleanup=e)}function q(e){let{cleanup:i}=e;if(e.cleanup=void 0,i){let e=t;t=void 0;try{i()}finally{t=e}}}let J=0;class Q{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class X{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!t||!U||t===this.computed)return;let i=this.activeLink;if(void 0===i||i.sub!==t)i=this.activeLink=new Q(t,this),t.deps?(i.prevDep=t.depsTail,t.depsTail.nextDep=i,t.depsTail=i):t.deps=t.depsTail=i,function e(t){if(t.dep.sc++,4&t.sub.flags){let i=t.dep.computed;if(i&&!t.dep.subs){i.flags|=20;for(let t=i.deps;t;t=t.nextDep)e(t)}let s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}(i);else if(-1===i.version&&(i.version=this.version,i.nextDep)){let e=i.nextDep;e.prevDep=i.prevDep,i.prevDep&&(i.prevDep.nextDep=e),i.prevDep=t.depsTail,i.nextDep=void 0,t.depsTail.nextDep=i,t.depsTail=i,t.deps===i&&(t.deps=e)}return i}trigger(e){this.version++,J++,this.notify(e)}notify(e){L++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{C()}}}let Z=new WeakMap,$=Symbol(""),ee=Symbol(""),et=Symbol("");function ei(e,i,s){if(U&&t){let t=Z.get(e);t||Z.set(e,t=new Map);let i=t.get(s);i||(t.set(s,i=new X),i.map=t,i.key=s),i.track()}}function es(e,t,i,s,r,n){let l=Z.get(e);if(!l){J++;return}let a=e=>{e&&e.trigger()};if(L++,"clear"===t)l.forEach(a);else{let r=c(e),n=r&&S(i);if(r&&"length"===i){let e=Number(s);l.forEach((t,i)=>{("length"===i||i===et||!v(i)&&i>=e)&&a(t)})}else switch((void 0!==i||l.has(void 0))&&a(l.get(i)),n&&a(l.get(et)),t){case"add":r?n&&a(l.get("length")):(a(l.get($)),f(e)&&a(l.get(ee)));break;case"delete":!r&&(a(l.get($)),f(e)&&a(l.get(ee)));break;case"set":f(e)&&a(l.get($))}}C()}function er(e){let t=eG(e);return t===e?t:(ei(t,"iterate",et),eU(e)?t:t.map(ez))}function en(e){return ei(e=eG(e),"iterate",et),e}let el={__proto__:null,[Symbol.iterator](){return ea(this,Symbol.iterator,ez)},concat(...e){return er(this).concat(...e.map(e=>c(e)?er(e):e))},entries(){return ea(this,"entries",e=>(e[1]=ez(e[1]),e))},every(e,t){return eu(this,"every",e,t,void 0,arguments)},filter(e,t){return eu(this,"filter",e,t,e=>e.map(ez),arguments)},find(e,t){return eu(this,"find",e,t,ez,arguments)},findIndex(e,t){return eu(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eu(this,"findLast",e,t,ez,arguments)},findLastIndex(e,t){return eu(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eu(this,"forEach",e,t,void 0,arguments)},includes(...e){return ec(this,"includes",e)},indexOf(...e){return ec(this,"indexOf",e)},join(e){return er(this).join(e)},lastIndexOf(...e){return ec(this,"lastIndexOf",e)},map(e,t){return eu(this,"map",e,t,void 0,arguments)},pop(){return ef(this,"pop")},push(...e){return ef(this,"push",e)},reduce(e,...t){return eh(this,"reduce",e,t)},reduceRight(e,...t){return eh(this,"reduceRight",e,t)},shift(){return ef(this,"shift")},some(e,t){return eu(this,"some",e,t,void 0,arguments)},splice(...e){return ef(this,"splice",e)},toReversed(){return er(this).toReversed()},toSorted(e){return er(this).toSorted(e)},toSpliced(...e){return er(this).toSpliced(...e)},unshift(...e){return ef(this,"unshift",e)},values(){return ea(this,"values",ez)}};function ea(e,t,i){let s=en(e),r=s[t]();return s===e||eU(e)||(r._next=r.next,r.next=()=>{let e=r._next();return e.value&&(e.value=i(e.value)),e}),r}let eo=Array.prototype;function eu(e,t,i,s,r,n){let l=en(e),a=l!==e&&!eU(e),o=l[t];if(o!==eo[t]){let t=o.apply(e,n);return a?ez(t):t}let u=i;l!==e&&(a?u=function(t,s){return i.call(this,ez(t),s,e)}:i.length>2&&(u=function(t,s){return i.call(this,t,s,e)}));let h=o.call(l,u,s);return a&&r?r(h):h}function eh(e,t,i,s){let r=en(e),n=i;return r!==e&&(eU(e)?i.length>3&&(n=function(t,s,r){return i.call(this,t,s,r,e)}):n=function(t,s,r){return i.call(this,t,ez(s),r,e)}),r[t](n,...s)}function ec(e,t,i){let s=eG(e);ei(s,"iterate",et);let r=s[t](...i);return(-1===r||!1===r)&&eY(i[0])?(i[0]=eG(i[0]),s[t](...i)):r}function ef(e,t,i=[]){G(),L++;let s=eG(e)[t].apply(e,i);return C(),z(),s}let ep=function(e){let t=Object.create(null);for(let i of e.split(","))t[i]=1;return e=>e in t}("__proto__,__v_isRef,__isVue"),ed=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(v));function e_(e){v(e)||(e=String(e));let t=eG(this);return ei(t,"has",e),t.hasOwnProperty(e)}class ev{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if("__v_skip"===t)return e.__v_skip;let s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return i===(s?r?eC:ej:r?eL:eI).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;let n=c(e);if(!s){let e;if(n&&(e=el[t]))return e;if("hasOwnProperty"===t)return e_}let l=Reflect.get(e,t,eq(e)?e:i);return(v(t)?ed.has(t):ep(t))?l:(s||ei(e,"get",t),r)?l:eq(l)?n&&S(t)?l:l.value:g(l)?s?eN(l):eP(l):l}}class eg extends ev{constructor(e=!1){super(!1,e)}set(e,t,i,s){let r=e[t];if(!this._isShallow){let t=eH(r);if(eU(i)||eH(i)||(r=eG(r),i=eG(i)),!c(e)&&eq(r)&&!eq(i))return!t&&(r.value=i,!0)}let n=c(e)&&S(t)?Number(t)<e.length:h(e,t),l=Reflect.set(e,t,i,eq(e)?e:s);return e===eG(s)&&(n?x(i,r)&&es(e,"set",t,i):es(e,"add",t,i)),l}deleteProperty(e,t){let i=h(e,t);e[t];let s=Reflect.deleteProperty(e,t);return s&&i&&es(e,"delete",t,void 0),s}has(e,t){let i=Reflect.has(e,t);return v(t)&&ed.has(t)||ei(e,"has",t),i}ownKeys(e){return ei(e,"iterate",c(e)?"length":$),Reflect.ownKeys(e)}}class ey extends ev{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let eR=new eg,eb=new ey,ew=new eg(!0),eS=new ey(!0),ex=e=>e,eE=e=>Reflect.getPrototypeOf(e);function em(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function eT(e,t){let i=function(e,t){let i={get(i){let s=this.__v_raw,r=eG(s),n=eG(i);e||(x(i,n)&&ei(r,"get",i),ei(r,"get",n));let{has:l}=eE(r),a=t?ex:e?eB:ez;return l.call(r,i)?a(s.get(i)):l.call(r,n)?a(s.get(n)):void(s!==r&&s.get(i))},get size(){let t=this.__v_raw;return e||ei(eG(t),"iterate",$),Reflect.get(t,"size",t)},has(t){let i=this.__v_raw,s=eG(i),r=eG(t);return e||(x(t,r)&&ei(s,"has",t),ei(s,"has",r)),t===r?i.has(t):i.has(t)||i.has(r)},forEach(i,s){let r=this,n=r.__v_raw,l=eG(n),a=t?ex:e?eB:ez;return e||ei(l,"iterate",$),n.forEach((e,t)=>i.call(s,a(e),a(t),r))}};return a(i,e?{add:em("add"),set:em("set"),delete:em("delete"),clear:em("clear")}:{add(e){t||eU(e)||eH(e)||(e=eG(e));let i=eG(this);return eE(i).has.call(i,e)||(i.add(e),es(i,"add",e,e)),this},set(e,i){t||eU(i)||eH(i)||(i=eG(i));let s=eG(this),{has:r,get:n}=eE(s),l=r.call(s,e);l||(e=eG(e),l=r.call(s,e));let a=n.call(s,e);return s.set(e,i),l?x(i,a)&&es(s,"set",e,i):es(s,"add",e,i),this},delete(e){let t=eG(this),{has:i,get:s}=eE(t),r=i.call(t,e);r||(e=eG(e),r=i.call(t,e)),s&&s.call(t,e);let n=t.delete(e);return r&&es(t,"delete",e,void 0),n},clear(){let e=eG(this),t=0!==e.size,i=e.clear();return t&&es(e,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{i[s]=function(...i){let r=this.__v_raw,n=eG(r),l=f(n),a="entries"===s||s===Symbol.iterator&&l,o=r[s](...i),u=t?ex:e?eB:ez;return e||ei(n,"iterate","keys"===s&&l?ee:$),{next(){let{value:e,done:t}=o.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}),i}(e,t);return(t,s,r)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(h(i,s)&&s in t?i:t,s,r)}let ek={get:eT(!1,!1)},eA={get:eT(!1,!0)},eD={get:eT(!0,!1)},eO={get:eT(!0,!0)},eI=new WeakMap,eL=new WeakMap,ej=new WeakMap,eC=new WeakMap;function eP(e){return eH(e)?e:eK(e,!1,eR,ek,eI)}function eW(e){return eK(e,!1,ew,eA,eL)}function eN(e){return eK(e,!0,eb,eD,ej)}function eV(e){return eK(e,!0,eS,eO,eC)}function eK(e,t,i,s,r){if(!g(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let n=r.get(e);if(n)return n;let l=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(b(e));if(0===l)return e;let a=new Proxy(e,2===l?s:i);return r.set(e,a),a}function eM(e){return eH(e)?eM(e.__v_raw):!!(e&&e.__v_isReactive)}function eH(e){return!!(e&&e.__v_isReadonly)}function eU(e){return!!(e&&e.__v_isShallow)}function eY(e){return!!e&&!!e.__v_raw}function eG(e){let t=e&&e.__v_raw;return t?eG(t):e}function eF(e){return!h(e,"__v_skip")&&Object.isExtensible(e)&&E(e,"__v_skip",!0),e}let ez=e=>g(e)?eP(e):e,eB=e=>g(e)?eN(e):e;function eq(e){return!!e&&!0===e.__v_isRef}function eJ(e){return eX(e,!1)}function eQ(e){return eX(e,!0)}function eX(e,t){return eq(e)?e:new eZ(e,t)}class eZ{constructor(e,t){this.dep=new X,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:eG(e),this._value=t?e:ez(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,i=this.__v_isShallow||eU(e)||eH(e);x(e=i?e:eG(e),t)&&(this._rawValue=e,this._value=i?e:ez(e),this.dep.trigger())}}function e$(e){e.dep&&e.dep.trigger()}function e0(e){return eq(e)?e.value:e}function e1(e){return d(e)?e():e0(e)}let e2={get:(e,t,i)=>"__v_raw"===t?e:e0(Reflect.get(e,t,i)),set:(e,t,i,s)=>{let r=e[t];return eq(r)&&!eq(i)?(r.value=i,!0):Reflect.set(e,t,i,s)}};function e4(e){return eM(e)?e:new Proxy(e,e2)}class e3{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new X,{get:i,set:s}=e(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}function e6(e){return new e3(e)}function e8(e){let t=c(e)?Array(e.length):{};for(let i in e)t[i]=te(e,i);return t}class e5{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let i=Z.get(e);return i&&i.get(t)}(eG(this._object),this._key)}}class e9{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function e7(e,t,i){return eq(e)?e:d(e)?new e9(e):g(e)&&arguments.length>1?te(e,t,i):eJ(e)}function te(e,t,i){let s=e[t];return eq(s)?s:new e5(e,t,i)}class tt{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new X(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=J-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(8&this.flags)&&t!==this)return j(this,!0),!0}get value(){let e=this.dep.track();return V(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function ti(e,t,i=!1){let s,r;return d(e)?s=e:(s=e.get,r=e.set),new tt(s,r,i)}let ts={GET:"get",HAS:"has",ITERATE:"iterate"},tr={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},tn={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},tl={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},ta={},to=new WeakMap;function tu(){return r}function th(e,t=!1,i=r){if(i){let t=to.get(i);t||to.set(i,t=[]),t.push(e)}}function tc(e,t,i=n){let s,a,u,h;let{immediate:f,deep:p,once:_,scheduler:v,augmentJob:g,call:y}=i,R=e=>p?e:eU(e)||!1===p||0===p?tf(e,1):tf(e),b=!1,w=!1;if(eq(e)?(a=()=>e.value,b=eU(e)):eM(e)?(a=()=>R(e),b=!0):c(e)?(w=!0,b=e.some(e=>eM(e)||eU(e)),a=()=>e.map(e=>eq(e)?e.value:eM(e)?R(e):d(e)?y?y(e,2):e():void 0)):a=d(e)?t?y?()=>y(e,2):e:()=>{if(u){G();try{u()}finally{z()}}let t=r;r=s;try{return y?y(e,3,[h]):e(h)}finally{r=t}}:l,t&&p){let e=a,t=!0===p?1/0:p;a=()=>tf(e(),t)}let S=k(),E=()=>{s.stop(),S&&S.active&&o(S.effects,s)};if(_&&t){let e=t;t=(...t)=>{e(...t),E()}}let m=w?Array(e.length).fill(ta):ta,T=e=>{if(1&s.flags&&(s.dirty||e)){if(t){let e=s.run();if(p||b||(w?e.some((e,t)=>x(e,m[t])):x(e,m))){u&&u();let i=r;r=s;try{let i=[e,m===ta?void 0:w&&m[0]===ta?[]:m,h];y?y(t,3,i):t(...i),m=e}finally{r=i}}}else s.run()}};return g&&g(T),(s=new I(a)).scheduler=v?()=>v(T,!1):T,h=e=>th(e,!1,s),u=s.onStop=()=>{let e=to.get(s);if(e){if(y)y(e,4);else for(let t of e)t();to.delete(s)}},t?f?T(!0):m=s.run():v?v(T.bind(null,!0),!0):s.run(),E.pause=s.pause.bind(s),E.resume=s.resume.bind(s),E.stop=E,E}function tf(e,t=1/0,i){if(t<=0||!g(e)||e.__v_skip||(i=i||new Set).has(e))return e;if(i.add(e),t--,eq(e))tf(e.value,t,i);else if(c(e))for(let s=0;s<e.length;s++)tf(e[s],t,i);else if(p(e)||f(e))e.forEach(e=>{tf(e,t,i)});else if(w(e)){for(let s in e)tf(e[s],t,i);for(let s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&tf(e[s],t,i)}return e}export{et as ARRAY_ITERATE_KEY,D as EffectFlags,m as EffectScope,$ as ITERATE_KEY,ee as MAP_KEY_ITERATE_KEY,I as ReactiveEffect,tn as ReactiveFlags,ts as TrackOpTypes,tr as TriggerOpTypes,tl as WatchErrorCodes,ti as computed,e6 as customRef,M as effect,T as effectScope,F as enableTracking,k as getCurrentScope,tu as getCurrentWatcher,eY as isProxy,eM as isReactive,eH as isReadonly,eq as isRef,eU as isShallow,eF as markRaw,B as onEffectCleanup,A as onScopeDispose,th as onWatcherCleanup,G as pauseTracking,e4 as proxyRefs,eP as reactive,er as reactiveReadArray,eN as readonly,eJ as ref,z as resetTracking,eW as shallowReactive,en as shallowReadArray,eV as shallowReadonly,eQ as shallowRef,H as stop,eG as toRaw,ez as toReactive,eB as toReadonly,e7 as toRef,e8 as toRefs,e1 as toValue,ei as track,tf as traverse,es as trigger,e$ as triggerRef,e0 as unref,tc as watch}; diff --git a/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js b/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js deleted file mode 100644 index 8f8a91b..0000000 --- a/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +++ /dev/null @@ -1,1896 +0,0 @@ -/** -* @vue/reactivity v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -import { hasChanged, extend, isArray, isIntegerKey, isSymbol, isMap, hasOwn, isObject, makeMap, toRawType, capitalize, def, isFunction, EMPTY_OBJ, isSet, isPlainObject, NOOP, remove } from '@vue/shared'; - -function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); -} - -let activeEffectScope; -class EffectScope { - constructor(detached = false) { - this.detached = detached; - /** - * @internal - */ - this._active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - this._isPaused = false; - this.parent = activeEffectScope; - if (!detached && activeEffectScope) { - this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( - this - ) - 1; - } - } - get active() { - return this._active; - } - pause() { - if (this._active) { - this._isPaused = true; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].pause(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].pause(); - } - } - } - /** - * Resumes the effect scope, including all child scopes and effects. - */ - resume() { - if (this._active) { - if (this._isPaused) { - this._isPaused = false; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].resume(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].resume(); - } - } - } - } - run(fn) { - if (this._active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } finally { - activeEffectScope = currentEffectScope; - } - } else if (!!(process.env.NODE_ENV !== "production")) { - warn(`cannot run an inactive effect scope.`); - } - } - /** - * This should only be called on non-detached scopes - * @internal - */ - on() { - activeEffectScope = this; - } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this._active) { - this._active = false; - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - this.effects.length = 0; - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - this.cleanups.length = 0; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - this.scopes.length = 0; - } - if (!this.detached && this.parent && !fromParent) { - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.parent = void 0; - } - } -} -function effectScope(detached) { - return new EffectScope(detached); -} -function getCurrentScope() { - return activeEffectScope; -} -function onScopeDispose(fn, failSilently = false) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } else if (!!(process.env.NODE_ENV !== "production") && !failSilently) { - warn( - `onScopeDispose() is called when there is no active effect scope to be associated with.` - ); - } -} - -let activeSub; -const EffectFlags = { - "ACTIVE": 1, - "1": "ACTIVE", - "RUNNING": 2, - "2": "RUNNING", - "TRACKING": 4, - "4": "TRACKING", - "NOTIFIED": 8, - "8": "NOTIFIED", - "DIRTY": 16, - "16": "DIRTY", - "ALLOW_RECURSE": 32, - "32": "ALLOW_RECURSE", - "PAUSED": 64, - "64": "PAUSED" -}; -const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); -class ReactiveEffect { - constructor(fn) { - this.fn = fn; - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 1 | 4; - /** - * @internal - */ - this.next = void 0; - /** - * @internal - */ - this.cleanup = void 0; - this.scheduler = void 0; - if (activeEffectScope && activeEffectScope.active) { - activeEffectScope.effects.push(this); - } - } - pause() { - this.flags |= 64; - } - resume() { - if (this.flags & 64) { - this.flags &= ~64; - if (pausedQueueEffects.has(this)) { - pausedQueueEffects.delete(this); - this.trigger(); - } - } - } - /** - * @internal - */ - notify() { - if (this.flags & 2 && !(this.flags & 32)) { - return; - } - if (!(this.flags & 8)) { - batch(this); - } - } - run() { - if (!(this.flags & 1)) { - return this.fn(); - } - this.flags |= 2; - cleanupEffect(this); - prepareDeps(this); - const prevEffect = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = this; - shouldTrack = true; - try { - return this.fn(); - } finally { - if (!!(process.env.NODE_ENV !== "production") && activeSub !== this) { - warn( - "Active effect was not restored correctly - this is likely a Vue internal bug." - ); - } - cleanupDeps(this); - activeSub = prevEffect; - shouldTrack = prevShouldTrack; - this.flags &= ~2; - } - } - stop() { - if (this.flags & 1) { - for (let link = this.deps; link; link = link.nextDep) { - removeSub(link); - } - this.deps = this.depsTail = void 0; - cleanupEffect(this); - this.onStop && this.onStop(); - this.flags &= ~1; - } - } - trigger() { - if (this.flags & 64) { - pausedQueueEffects.add(this); - } else if (this.scheduler) { - this.scheduler(); - } else { - this.runIfDirty(); - } - } - /** - * @internal - */ - runIfDirty() { - if (isDirty(this)) { - this.run(); - } - } - get dirty() { - return isDirty(this); - } -} -let batchDepth = 0; -let batchedSub; -let batchedComputed; -function batch(sub, isComputed = false) { - sub.flags |= 8; - if (isComputed) { - sub.next = batchedComputed; - batchedComputed = sub; - return; - } - sub.next = batchedSub; - batchedSub = sub; -} -function startBatch() { - batchDepth++; -} -function endBatch() { - if (--batchDepth > 0) { - return; - } - if (batchedComputed) { - let e = batchedComputed; - batchedComputed = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - e = next; - } - } - let error; - while (batchedSub) { - let e = batchedSub; - batchedSub = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - if (e.flags & 1) { - try { - ; - e.trigger(); - } catch (err) { - if (!error) error = err; - } - } - e = next; - } - } - if (error) throw error; -} -function prepareDeps(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - link.version = -1; - link.prevActiveLink = link.dep.activeLink; - link.dep.activeLink = link; - } -} -function cleanupDeps(sub) { - let head; - let tail = sub.depsTail; - let link = tail; - while (link) { - const prev = link.prevDep; - if (link.version === -1) { - if (link === tail) tail = prev; - removeSub(link); - removeDep(link); - } else { - head = link; - } - link.dep.activeLink = link.prevActiveLink; - link.prevActiveLink = void 0; - link = prev; - } - sub.deps = head; - sub.depsTail = tail; -} -function isDirty(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { - return true; - } - } - if (sub._dirty) { - return true; - } - return false; -} -function refreshComputed(computed) { - if (computed.flags & 4 && !(computed.flags & 16)) { - return; - } - computed.flags &= ~16; - if (computed.globalVersion === globalVersion) { - return; - } - computed.globalVersion = globalVersion; - const dep = computed.dep; - computed.flags |= 2; - if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { - computed.flags &= ~2; - return; - } - const prevSub = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = computed; - shouldTrack = true; - try { - prepareDeps(computed); - const value = computed.fn(computed._value); - if (dep.version === 0 || hasChanged(value, computed._value)) { - computed._value = value; - dep.version++; - } - } catch (err) { - dep.version++; - throw err; - } finally { - activeSub = prevSub; - shouldTrack = prevShouldTrack; - cleanupDeps(computed); - computed.flags &= ~2; - } -} -function removeSub(link, soft = false) { - const { dep, prevSub, nextSub } = link; - if (prevSub) { - prevSub.nextSub = nextSub; - link.prevSub = void 0; - } - if (nextSub) { - nextSub.prevSub = prevSub; - link.nextSub = void 0; - } - if (!!(process.env.NODE_ENV !== "production") && dep.subsHead === link) { - dep.subsHead = nextSub; - } - if (dep.subs === link) { - dep.subs = prevSub; - if (!prevSub && dep.computed) { - dep.computed.flags &= ~4; - for (let l = dep.computed.deps; l; l = l.nextDep) { - removeSub(l, true); - } - } - } - if (!soft && !--dep.sc && dep.map) { - dep.map.delete(dep.key); - } -} -function removeDep(link) { - const { prevDep, nextDep } = link; - if (prevDep) { - prevDep.nextDep = nextDep; - link.prevDep = void 0; - } - if (nextDep) { - nextDep.prevDep = prevDep; - link.nextDep = void 0; - } -} -function effect(fn, options) { - if (fn.effect instanceof ReactiveEffect) { - fn = fn.effect.fn; - } - const e = new ReactiveEffect(fn); - if (options) { - extend(e, options); - } - try { - e.run(); - } catch (err) { - e.stop(); - throw err; - } - const runner = e.run.bind(e); - runner.effect = e; - return runner; -} -function stop(runner) { - runner.effect.stop(); -} -let shouldTrack = true; -const trackStack = []; -function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; -} -function enableTracking() { - trackStack.push(shouldTrack); - shouldTrack = true; -} -function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === void 0 ? true : last; -} -function onEffectCleanup(fn, failSilently = false) { - if (activeSub instanceof ReactiveEffect) { - activeSub.cleanup = fn; - } else if (!!(process.env.NODE_ENV !== "production") && !failSilently) { - warn( - `onEffectCleanup() was called when there was no active effect to associate with.` - ); - } -} -function cleanupEffect(e) { - const { cleanup } = e; - e.cleanup = void 0; - if (cleanup) { - const prevSub = activeSub; - activeSub = void 0; - try { - cleanup(); - } finally { - activeSub = prevSub; - } - } -} - -let globalVersion = 0; -class Link { - constructor(sub, dep) { - this.sub = sub; - this.dep = dep; - this.version = dep.version; - this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; - } -} -class Dep { - constructor(computed) { - this.computed = computed; - this.version = 0; - /** - * Link between this dep and the current active effect - */ - this.activeLink = void 0; - /** - * Doubly linked list representing the subscribing effects (tail) - */ - this.subs = void 0; - /** - * For object property deps cleanup - */ - this.map = void 0; - this.key = void 0; - /** - * Subscriber counter - */ - this.sc = 0; - if (!!(process.env.NODE_ENV !== "production")) { - this.subsHead = void 0; - } - } - track(debugInfo) { - if (!activeSub || !shouldTrack || activeSub === this.computed) { - return; - } - let link = this.activeLink; - if (link === void 0 || link.sub !== activeSub) { - link = this.activeLink = new Link(activeSub, this); - if (!activeSub.deps) { - activeSub.deps = activeSub.depsTail = link; - } else { - link.prevDep = activeSub.depsTail; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - } - addSub(link); - } else if (link.version === -1) { - link.version = this.version; - if (link.nextDep) { - const next = link.nextDep; - next.prevDep = link.prevDep; - if (link.prevDep) { - link.prevDep.nextDep = next; - } - link.prevDep = activeSub.depsTail; - link.nextDep = void 0; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - if (activeSub.deps === link) { - activeSub.deps = next; - } - } - } - if (!!(process.env.NODE_ENV !== "production") && activeSub.onTrack) { - activeSub.onTrack( - extend( - { - effect: activeSub - }, - debugInfo - ) - ); - } - return link; - } - trigger(debugInfo) { - this.version++; - globalVersion++; - this.notify(debugInfo); - } - notify(debugInfo) { - startBatch(); - try { - if (!!(process.env.NODE_ENV !== "production")) { - for (let head = this.subsHead; head; head = head.nextSub) { - if (head.sub.onTrigger && !(head.sub.flags & 8)) { - head.sub.onTrigger( - extend( - { - effect: head.sub - }, - debugInfo - ) - ); - } - } - } - for (let link = this.subs; link; link = link.prevSub) { - if (link.sub.notify()) { - ; - link.sub.dep.notify(); - } - } - } finally { - endBatch(); - } - } -} -function addSub(link) { - link.dep.sc++; - if (link.sub.flags & 4) { - const computed = link.dep.computed; - if (computed && !link.dep.subs) { - computed.flags |= 4 | 16; - for (let l = computed.deps; l; l = l.nextDep) { - addSub(l); - } - } - const currentTail = link.dep.subs; - if (currentTail !== link) { - link.prevSub = currentTail; - if (currentTail) currentTail.nextSub = link; - } - if (!!(process.env.NODE_ENV !== "production") && link.dep.subsHead === void 0) { - link.dep.subsHead = link; - } - link.dep.subs = link; - } -} -const targetMap = /* @__PURE__ */ new WeakMap(); -const ITERATE_KEY = Symbol( - !!(process.env.NODE_ENV !== "production") ? "Object iterate" : "" -); -const MAP_KEY_ITERATE_KEY = Symbol( - !!(process.env.NODE_ENV !== "production") ? "Map keys iterate" : "" -); -const ARRAY_ITERATE_KEY = Symbol( - !!(process.env.NODE_ENV !== "production") ? "Array iterate" : "" -); -function track(target, type, key) { - if (shouldTrack && activeSub) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = new Dep()); - dep.map = depsMap; - dep.key = key; - } - if (!!(process.env.NODE_ENV !== "production")) { - dep.track({ - target, - type, - key - }); - } else { - dep.track(); - } - } -} -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - globalVersion++; - return; - } - const run = (dep) => { - if (dep) { - if (!!(process.env.NODE_ENV !== "production")) { - dep.trigger({ - target, - type, - key, - newValue, - oldValue, - oldTarget - }); - } else { - dep.trigger(); - } - } - }; - startBatch(); - if (type === "clear") { - depsMap.forEach(run); - } else { - const targetIsArray = isArray(target); - const isArrayIndex = targetIsArray && isIntegerKey(key); - if (targetIsArray && key === "length") { - const newLength = Number(newValue); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { - run(dep); - } - }); - } else { - if (key !== void 0 || depsMap.has(void 0)) { - run(depsMap.get(key)); - } - if (isArrayIndex) { - run(depsMap.get(ARRAY_ITERATE_KEY)); - } - switch (type) { - case "add": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isArrayIndex) { - run(depsMap.get("length")); - } - break; - case "delete": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (isMap(target)) { - run(depsMap.get(ITERATE_KEY)); - } - break; - } - } - } - endBatch(); -} -function getDepFromReactive(object, key) { - const depMap = targetMap.get(object); - return depMap && depMap.get(key); -} - -function reactiveReadArray(array) { - const raw = toRaw(array); - if (raw === array) return raw; - track(raw, "iterate", ARRAY_ITERATE_KEY); - return isShallow(array) ? raw : raw.map(toReactive); -} -function shallowReadArray(arr) { - track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); - return arr; -} -const arrayInstrumentations = { - __proto__: null, - [Symbol.iterator]() { - return iterator(this, Symbol.iterator, toReactive); - }, - concat(...args) { - return reactiveReadArray(this).concat( - ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) - ); - }, - entries() { - return iterator(this, "entries", (value) => { - value[1] = toReactive(value[1]); - return value; - }); - }, - every(fn, thisArg) { - return apply(this, "every", fn, thisArg, void 0, arguments); - }, - filter(fn, thisArg) { - return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); - }, - find(fn, thisArg) { - return apply(this, "find", fn, thisArg, toReactive, arguments); - }, - findIndex(fn, thisArg) { - return apply(this, "findIndex", fn, thisArg, void 0, arguments); - }, - findLast(fn, thisArg) { - return apply(this, "findLast", fn, thisArg, toReactive, arguments); - }, - findLastIndex(fn, thisArg) { - return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); - }, - // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement - forEach(fn, thisArg) { - return apply(this, "forEach", fn, thisArg, void 0, arguments); - }, - includes(...args) { - return searchProxy(this, "includes", args); - }, - indexOf(...args) { - return searchProxy(this, "indexOf", args); - }, - join(separator) { - return reactiveReadArray(this).join(separator); - }, - // keys() iterator only reads `length`, no optimisation required - lastIndexOf(...args) { - return searchProxy(this, "lastIndexOf", args); - }, - map(fn, thisArg) { - return apply(this, "map", fn, thisArg, void 0, arguments); - }, - pop() { - return noTracking(this, "pop"); - }, - push(...args) { - return noTracking(this, "push", args); - }, - reduce(fn, ...args) { - return reduce(this, "reduce", fn, args); - }, - reduceRight(fn, ...args) { - return reduce(this, "reduceRight", fn, args); - }, - shift() { - return noTracking(this, "shift"); - }, - // slice could use ARRAY_ITERATE but also seems to beg for range tracking - some(fn, thisArg) { - return apply(this, "some", fn, thisArg, void 0, arguments); - }, - splice(...args) { - return noTracking(this, "splice", args); - }, - toReversed() { - return reactiveReadArray(this).toReversed(); - }, - toSorted(comparer) { - return reactiveReadArray(this).toSorted(comparer); - }, - toSpliced(...args) { - return reactiveReadArray(this).toSpliced(...args); - }, - unshift(...args) { - return noTracking(this, "unshift", args); - }, - values() { - return iterator(this, "values", toReactive); - } -}; -function iterator(self, method, wrapValue) { - const arr = shallowReadArray(self); - const iter = arr[method](); - if (arr !== self && !isShallow(self)) { - iter._next = iter.next; - iter.next = () => { - const result = iter._next(); - if (result.value) { - result.value = wrapValue(result.value); - } - return result; - }; - } - return iter; -} -const arrayProto = Array.prototype; -function apply(self, method, fn, thisArg, wrappedRetFn, args) { - const arr = shallowReadArray(self); - const needsWrap = arr !== self && !isShallow(self); - const methodFn = arr[method]; - if (methodFn !== arrayProto[method]) { - const result2 = methodFn.apply(self, args); - return needsWrap ? toReactive(result2) : result2; - } - let wrappedFn = fn; - if (arr !== self) { - if (needsWrap) { - wrappedFn = function(item, index) { - return fn.call(this, toReactive(item), index, self); - }; - } else if (fn.length > 2) { - wrappedFn = function(item, index) { - return fn.call(this, item, index, self); - }; - } - } - const result = methodFn.call(arr, wrappedFn, thisArg); - return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; -} -function reduce(self, method, fn, args) { - const arr = shallowReadArray(self); - let wrappedFn = fn; - if (arr !== self) { - if (!isShallow(self)) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, toReactive(item), index, self); - }; - } else if (fn.length > 3) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, item, index, self); - }; - } - } - return arr[method](wrappedFn, ...args); -} -function searchProxy(self, method, args) { - const arr = toRaw(self); - track(arr, "iterate", ARRAY_ITERATE_KEY); - const res = arr[method](...args); - if ((res === -1 || res === false) && isProxy(args[0])) { - args[0] = toRaw(args[0]); - return arr[method](...args); - } - return res; -} -function noTracking(self, method, args = []) { - pauseTracking(); - startBatch(); - const res = toRaw(self)[method].apply(self, args); - endBatch(); - resetTracking(); - return res; -} - -const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); -const builtInSymbols = new Set( - /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) -); -function hasOwnProperty(key) { - if (!isSymbol(key)) key = String(key); - const obj = toRaw(this); - track(obj, "has", key); - return obj.hasOwnProperty(key); -} -class BaseReactiveHandler { - constructor(_isReadonly = false, _isShallow = false) { - this._isReadonly = _isReadonly; - this._isShallow = _isShallow; - } - get(target, key, receiver) { - if (key === "__v_skip") return target["__v_skip"]; - const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_isShallow") { - return isShallow2; - } else if (key === "__v_raw") { - if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype - // this means the receiver is a user proxy of the reactive proxy - Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { - return target; - } - return; - } - const targetIsArray = isArray(target); - if (!isReadonly2) { - let fn; - if (targetIsArray && (fn = arrayInstrumentations[key])) { - return fn; - } - if (key === "hasOwnProperty") { - return hasOwnProperty; - } - } - const res = Reflect.get( - target, - key, - // if this is a proxy wrapping a ref, return methods using the raw ref - // as receiver so that we don't have to call `toRaw` on the ref in all - // its class methods - isRef(target) ? target : receiver - ); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly2) { - track(target, "get", key); - } - if (isShallow2) { - return res; - } - if (isRef(res)) { - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - return isReadonly2 ? readonly(res) : reactive(res); - } - return res; - } -} -class MutableReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(false, isShallow2); - } - set(target, key, value, receiver) { - let oldValue = target[key]; - if (!this._isShallow) { - const isOldValueReadonly = isReadonly(oldValue); - if (!isShallow(value) && !isReadonly(value)) { - oldValue = toRaw(oldValue); - value = toRaw(value); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - if (isOldValueReadonly) { - return false; - } else { - oldValue.value = value; - return true; - } - } - } - const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); - const result = Reflect.set( - target, - key, - value, - isRef(target) ? target : receiver - ); - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - } - return result; - } - deleteProperty(target, key) { - const hadKey = hasOwn(target, key); - const oldValue = target[key]; - const result = Reflect.deleteProperty(target, key); - if (result && hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - } - has(target, key) { - const result = Reflect.has(target, key); - if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has", key); - } - return result; - } - ownKeys(target) { - track( - target, - "iterate", - isArray(target) ? "length" : ITERATE_KEY - ); - return Reflect.ownKeys(target); - } -} -class ReadonlyReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(true, isShallow2); - } - set(target, key) { - if (!!(process.env.NODE_ENV !== "production")) { - warn( - `Set operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } - deleteProperty(target, key) { - if (!!(process.env.NODE_ENV !== "production")) { - warn( - `Delete operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } -} -const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); -const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); -const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); -const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); - -const toShallow = (value) => value; -const getProto = (v) => Reflect.getPrototypeOf(v); -function createIterableMethod(method, isReadonly2, isShallow2) { - return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; - const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; - !isReadonly2 && track( - rawTarget, - "iterate", - isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY - ); - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done ? { value, done } : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } - }; - }; -} -function createReadonlyMethod(type) { - return function(...args) { - if (!!(process.env.NODE_ENV !== "production")) { - const key = args[0] ? `on key "${args[0]}" ` : ``; - warn( - `${capitalize(type)} operation ${key}failed: target is readonly.`, - toRaw(this) - ); - } - return type === "delete" ? false : type === "clear" ? void 0 : this; - }; -} -function createInstrumentations(readonly, shallow) { - const instrumentations = { - get(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "get", key); - } - track(rawTarget, "get", rawKey); - } - const { has } = getProto(rawTarget); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } else if (target !== rawTarget) { - target.get(key); - } - }, - get size() { - const target = this["__v_raw"]; - !readonly && track(toRaw(target), "iterate", ITERATE_KEY); - return Reflect.get(target, "size", target); - }, - has(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "has", key); - } - track(rawTarget, "has", rawKey); - } - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); - }, - forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - !readonly && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value, key) => { - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - } - }; - extend( - instrumentations, - readonly ? { - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear") - } : { - add(value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add", value, value); - } - return this; - }, - set(key, value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else if (!!(process.env.NODE_ENV !== "production")) { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - return this; - }, - delete(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else if (!!(process.env.NODE_ENV !== "production")) { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : void 0; - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - }, - clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = !!(process.env.NODE_ENV !== "production") ? isMap(target) ? new Map(target) : new Set(target) : void 0; - const result = target.clear(); - if (hadItems) { - trigger( - target, - "clear", - void 0, - void 0, - oldTarget - ); - } - return result; - } - } - ); - const iteratorMethods = [ - "keys", - "values", - "entries", - Symbol.iterator - ]; - iteratorMethods.forEach((method) => { - instrumentations[method] = createIterableMethod(method, readonly, shallow); - }); - return instrumentations; -} -function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = createInstrumentations(isReadonly2, shallow); - return (target, key, receiver) => { - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_raw") { - return target; - } - return Reflect.get( - hasOwn(instrumentations, key) && key in target ? instrumentations : target, - key, - receiver - ); - }; -} -const mutableCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, false) -}; -const shallowCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, true) -}; -const readonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, false) -}; -const shallowReadonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, true) -}; -function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - warn( - `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` - ); - } -} - -const reactiveMap = /* @__PURE__ */ new WeakMap(); -const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); -const readonlyMap = /* @__PURE__ */ new WeakMap(); -const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); -function targetTypeMap(rawType) { - switch (rawType) { - case "Object": - case "Array": - return 1 /* COMMON */; - case "Map": - case "Set": - case "WeakMap": - case "WeakSet": - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } -} -function getTargetType(value) { - return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); -} -function reactive(target) { - if (isReadonly(target)) { - return target; - } - return createReactiveObject( - target, - false, - mutableHandlers, - mutableCollectionHandlers, - reactiveMap - ); -} -function shallowReactive(target) { - return createReactiveObject( - target, - false, - shallowReactiveHandlers, - shallowCollectionHandlers, - shallowReactiveMap - ); -} -function readonly(target) { - return createReactiveObject( - target, - true, - readonlyHandlers, - readonlyCollectionHandlers, - readonlyMap - ); -} -function shallowReadonly(target) { - return createReactiveObject( - target, - true, - shallowReadonlyHandlers, - shallowReadonlyCollectionHandlers, - shallowReadonlyMap - ); -} -function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - if (!!(process.env.NODE_ENV !== "production")) { - warn( - `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( - target - )}` - ); - } - return target; - } - if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { - return target; - } - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy( - target, - targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers - ); - proxyMap.set(target, proxy); - return proxy; -} -function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw"]); - } - return !!(value && value["__v_isReactive"]); -} -function isReadonly(value) { - return !!(value && value["__v_isReadonly"]); -} -function isShallow(value) { - return !!(value && value["__v_isShallow"]); -} -function isProxy(value) { - return value ? !!value["__v_raw"] : false; -} -function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; -} -function markRaw(value) { - if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { - def(value, "__v_skip", true); - } - return value; -} -const toReactive = (value) => isObject(value) ? reactive(value) : value; -const toReadonly = (value) => isObject(value) ? readonly(value) : value; - -function isRef(r) { - return r ? r["__v_isRef"] === true : false; -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -class RefImpl { - constructor(value, isShallow2) { - this.dep = new Dep(); - this["__v_isRef"] = true; - this["__v_isShallow"] = false; - this._rawValue = isShallow2 ? value : toRaw(value); - this._value = isShallow2 ? value : toReactive(value); - this["__v_isShallow"] = isShallow2; - } - get value() { - if (!!(process.env.NODE_ENV !== "production")) { - this.dep.track({ - target: this, - type: "get", - key: "value" - }); - } else { - this.dep.track(); - } - return this._value; - } - set value(newValue) { - const oldValue = this._rawValue; - const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); - newValue = useDirectValue ? newValue : toRaw(newValue); - if (hasChanged(newValue, oldValue)) { - this._rawValue = newValue; - this._value = useDirectValue ? newValue : toReactive(newValue); - if (!!(process.env.NODE_ENV !== "production")) { - this.dep.trigger({ - target: this, - type: "set", - key: "value", - newValue, - oldValue - }); - } else { - this.dep.trigger(); - } - } - } -} -function triggerRef(ref2) { - if (ref2.dep) { - if (!!(process.env.NODE_ENV !== "production")) { - ref2.dep.trigger({ - target: ref2, - type: "set", - key: "value", - newValue: ref2._value - }); - } else { - ref2.dep.trigger(); - } - } -} -function unref(ref2) { - return isRef(ref2) ? ref2.value : ref2; -} -function toValue(source) { - return isFunction(source) ? source() : unref(source); -} -const shallowUnwrapHandlers = { - get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -class CustomRefImpl { - constructor(factory) { - this["__v_isRef"] = true; - this._value = void 0; - const dep = this.dep = new Dep(); - const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); - this._get = get; - this._set = set; - } - get value() { - return this._value = this._get(); - } - set value(newVal) { - this._set(newVal); - } -} -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - if (!!(process.env.NODE_ENV !== "production") && !isProxy(object)) { - warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = propertyToRef(object, key); - } - return ret; -} -class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this["__v_isRef"] = true; - this._value = void 0; - } - get value() { - const val = this._object[this._key]; - return this._value = val === void 0 ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - get dep() { - return getDepFromReactive(toRaw(this._object), this._key); - } -} -class GetterRefImpl { - constructor(_getter) { - this._getter = _getter; - this["__v_isRef"] = true; - this["__v_isReadonly"] = true; - this._value = void 0; - } - get value() { - return this._value = this._getter(); - } -} -function toRef(source, key, defaultValue) { - if (isRef(source)) { - return source; - } else if (isFunction(source)) { - return new GetterRefImpl(source); - } else if (isObject(source) && arguments.length > 1) { - return propertyToRef(source, key, defaultValue); - } else { - return ref(source); - } -} -function propertyToRef(source, key, defaultValue) { - const val = source[key]; - return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); -} - -class ComputedRefImpl { - constructor(fn, setter, isSSR) { - this.fn = fn; - this.setter = setter; - /** - * @internal - */ - this._value = void 0; - /** - * @internal - */ - this.dep = new Dep(this); - /** - * @internal - */ - this.__v_isRef = true; - // TODO isolatedDeclarations "__v_isReadonly" - // A computed is also a subscriber that tracks other deps - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 16; - /** - * @internal - */ - this.globalVersion = globalVersion - 1; - /** - * @internal - */ - this.next = void 0; - // for backwards compat - this.effect = this; - this["__v_isReadonly"] = !setter; - this.isSSR = isSSR; - } - /** - * @internal - */ - notify() { - this.flags |= 16; - if (!(this.flags & 8) && // avoid infinite self recursion - activeSub !== this) { - batch(this, true); - return true; - } else if (!!(process.env.NODE_ENV !== "production")) ; - } - get value() { - const link = !!(process.env.NODE_ENV !== "production") ? this.dep.track({ - target: this, - type: "get", - key: "value" - }) : this.dep.track(); - refreshComputed(this); - if (link) { - link.version = this.dep.version; - } - return this._value; - } - set value(newValue) { - if (this.setter) { - this.setter(newValue); - } else if (!!(process.env.NODE_ENV !== "production")) { - warn("Write operation failed: computed value is readonly"); - } - } -} -function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - if (isFunction(getterOrOptions)) { - getter = getterOrOptions; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, isSSR); - if (!!(process.env.NODE_ENV !== "production") && debugOptions && !isSSR) { - cRef.onTrack = debugOptions.onTrack; - cRef.onTrigger = debugOptions.onTrigger; - } - return cRef; -} - -const TrackOpTypes = { - "GET": "get", - "HAS": "has", - "ITERATE": "iterate" -}; -const TriggerOpTypes = { - "SET": "set", - "ADD": "add", - "DELETE": "delete", - "CLEAR": "clear" -}; -const ReactiveFlags = { - "SKIP": "__v_skip", - "IS_REACTIVE": "__v_isReactive", - "IS_READONLY": "__v_isReadonly", - "IS_SHALLOW": "__v_isShallow", - "RAW": "__v_raw", - "IS_REF": "__v_isRef" -}; - -const WatchErrorCodes = { - "WATCH_GETTER": 2, - "2": "WATCH_GETTER", - "WATCH_CALLBACK": 3, - "3": "WATCH_CALLBACK", - "WATCH_CLEANUP": 4, - "4": "WATCH_CLEANUP" -}; -const INITIAL_WATCHER_VALUE = {}; -const cleanupMap = /* @__PURE__ */ new WeakMap(); -let activeWatcher = void 0; -function getCurrentWatcher() { - return activeWatcher; -} -function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { - if (owner) { - let cleanups = cleanupMap.get(owner); - if (!cleanups) cleanupMap.set(owner, cleanups = []); - cleanups.push(cleanupFn); - } else if (!!(process.env.NODE_ENV !== "production") && !failSilently) { - warn( - `onWatcherCleanup() was called when there was no active watcher to associate with.` - ); - } -} -function watch(source, cb, options = EMPTY_OBJ) { - const { immediate, deep, once, scheduler, augmentJob, call } = options; - const warnInvalidSource = (s) => { - (options.onWarn || warn)( - `Invalid watch source: `, - s, - `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` - ); - }; - const reactiveGetter = (source2) => { - if (deep) return source2; - if (isShallow(source2) || deep === false || deep === 0) - return traverse(source2, 1); - return traverse(source2); - }; - let effect; - let getter; - let cleanup; - let boundCleanup; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); - } else if (isReactive(source)) { - getter = () => reactiveGetter(source); - forceTrigger = true; - } else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); - getter = () => source.map((s) => { - if (isRef(s)) { - return s.value; - } else if (isReactive(s)) { - return reactiveGetter(s); - } else if (isFunction(s)) { - return call ? call(s, 2) : s(); - } else { - !!(process.env.NODE_ENV !== "production") && warnInvalidSource(s); - } - }); - } else if (isFunction(source)) { - if (cb) { - getter = call ? () => call(source, 2) : source; - } else { - getter = () => { - if (cleanup) { - pauseTracking(); - try { - cleanup(); - } finally { - resetTracking(); - } - } - const currentEffect = activeWatcher; - activeWatcher = effect; - try { - return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); - } finally { - activeWatcher = currentEffect; - } - }; - } - } else { - getter = NOOP; - !!(process.env.NODE_ENV !== "production") && warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - const depth = deep === true ? Infinity : deep; - getter = () => traverse(baseGetter(), depth); - } - const scope = getCurrentScope(); - const watchHandle = () => { - effect.stop(); - if (scope && scope.active) { - remove(scope.effects, effect); - } - }; - if (once && cb) { - const _cb = cb; - cb = (...args) => { - _cb(...args); - watchHandle(); - }; - } - let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; - const job = (immediateFirstRun) => { - if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { - return; - } - if (cb) { - const newValue = effect.run(); - if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { - if (cleanup) { - cleanup(); - } - const currentWatcher = activeWatcher; - activeWatcher = effect; - try { - const args = [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, - boundCleanup - ]; - call ? call(cb, 3, args) : ( - // @ts-expect-error - cb(...args) - ); - oldValue = newValue; - } finally { - activeWatcher = currentWatcher; - } - } - } else { - effect.run(); - } - }; - if (augmentJob) { - augmentJob(job); - } - effect = new ReactiveEffect(getter); - effect.scheduler = scheduler ? () => scheduler(job, false) : job; - boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); - cleanup = effect.onStop = () => { - const cleanups = cleanupMap.get(effect); - if (cleanups) { - if (call) { - call(cleanups, 4); - } else { - for (const cleanup2 of cleanups) cleanup2(); - } - cleanupMap.delete(effect); - } - }; - if (!!(process.env.NODE_ENV !== "production")) { - effect.onTrack = options.onTrack; - effect.onTrigger = options.onTrigger; - } - if (cb) { - if (immediate) { - job(true); - } else { - oldValue = effect.run(); - } - } else if (scheduler) { - scheduler(job.bind(null, true), true); - } else { - effect.run(); - } - watchHandle.pause = effect.pause.bind(effect); - watchHandle.resume = effect.resume.bind(effect); - watchHandle.stop = watchHandle; - return watchHandle; -} -function traverse(value, depth = Infinity, seen) { - if (depth <= 0 || !isObject(value) || value["__v_skip"]) { - return value; - } - seen = seen || /* @__PURE__ */ new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - depth--; - if (isRef(value)) { - traverse(value.value, depth, seen); - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], depth, seen); - } - } else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, depth, seen); - }); - } else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], depth, seen); - } - for (const key of Object.getOwnPropertySymbols(value)) { - if (Object.prototype.propertyIsEnumerable.call(value, key)) { - traverse(value[key], depth, seen); - } - } - } - return value; -} - -export { ARRAY_ITERATE_KEY, EffectFlags, EffectScope, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, WatchErrorCodes, computed, customRef, effect, effectScope, enableTracking, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onEffectCleanup, onScopeDispose, onWatcherCleanup, pauseTracking, proxyRefs, reactive, reactiveReadArray, readonly, ref, resetTracking, shallowReactive, shallowReadArray, shallowReadonly, shallowRef, stop, toRaw, toReactive, toReadonly, toRef, toRefs, toValue, track, traverse, trigger, triggerRef, unref, watch }; diff --git a/node_modules/@vue/reactivity/dist/reactivity.global.js b/node_modules/@vue/reactivity/dist/reactivity.global.js deleted file mode 100644 index c6d17c1..0000000 --- a/node_modules/@vue/reactivity/dist/reactivity.global.js +++ /dev/null @@ -1,1994 +0,0 @@ -/** -* @vue/reactivity v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -var VueReactivity = (function (exports) { - 'use strict'; - - /*! #__NO_SIDE_EFFECTS__ */ - // @__NO_SIDE_EFFECTS__ - function makeMap(str) { - const map = /* @__PURE__ */ Object.create(null); - for (const key of str.split(",")) map[key] = 1; - return (val) => val in map; - } - - const EMPTY_OBJ = Object.freeze({}) ; - const NOOP = () => { - }; - const extend = Object.assign; - const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } - }; - const hasOwnProperty$1 = Object.prototype.hasOwnProperty; - const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); - const isArray = Array.isArray; - const isMap = (val) => toTypeString(val) === "[object Map]"; - const isSet = (val) => toTypeString(val) === "[object Set]"; - const isFunction = (val) => typeof val === "function"; - const isString = (val) => typeof val === "string"; - const isSymbol = (val) => typeof val === "symbol"; - const isObject = (val) => val !== null && typeof val === "object"; - const objectToString = Object.prototype.toString; - const toTypeString = (value) => objectToString.call(value); - const toRawType = (value) => { - return toTypeString(value).slice(8, -1); - }; - const isPlainObject = (val) => toTypeString(val) === "[object Object]"; - const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; - const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; - }; - const capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); - }); - const hasChanged = (value, oldValue) => !Object.is(value, oldValue); - const def = (obj, key, value, writable = false) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - writable, - value - }); - }; - - function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); - } - - let activeEffectScope; - class EffectScope { - constructor(detached = false) { - this.detached = detached; - /** - * @internal - */ - this._active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - this._isPaused = false; - this.parent = activeEffectScope; - if (!detached && activeEffectScope) { - this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( - this - ) - 1; - } - } - get active() { - return this._active; - } - pause() { - if (this._active) { - this._isPaused = true; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].pause(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].pause(); - } - } - } - /** - * Resumes the effect scope, including all child scopes and effects. - */ - resume() { - if (this._active) { - if (this._isPaused) { - this._isPaused = false; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].resume(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].resume(); - } - } - } - } - run(fn) { - if (this._active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } finally { - activeEffectScope = currentEffectScope; - } - } else { - warn(`cannot run an inactive effect scope.`); - } - } - /** - * This should only be called on non-detached scopes - * @internal - */ - on() { - activeEffectScope = this; - } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this._active) { - this._active = false; - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - this.effects.length = 0; - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - this.cleanups.length = 0; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - this.scopes.length = 0; - } - if (!this.detached && this.parent && !fromParent) { - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.parent = void 0; - } - } - } - function effectScope(detached) { - return new EffectScope(detached); - } - function getCurrentScope() { - return activeEffectScope; - } - function onScopeDispose(fn, failSilently = false) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } else if (!failSilently) { - warn( - `onScopeDispose() is called when there is no active effect scope to be associated with.` - ); - } - } - - let activeSub; - const EffectFlags = { - "ACTIVE": 1, - "1": "ACTIVE", - "RUNNING": 2, - "2": "RUNNING", - "TRACKING": 4, - "4": "TRACKING", - "NOTIFIED": 8, - "8": "NOTIFIED", - "DIRTY": 16, - "16": "DIRTY", - "ALLOW_RECURSE": 32, - "32": "ALLOW_RECURSE", - "PAUSED": 64, - "64": "PAUSED" - }; - const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); - class ReactiveEffect { - constructor(fn) { - this.fn = fn; - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 1 | 4; - /** - * @internal - */ - this.next = void 0; - /** - * @internal - */ - this.cleanup = void 0; - this.scheduler = void 0; - if (activeEffectScope && activeEffectScope.active) { - activeEffectScope.effects.push(this); - } - } - pause() { - this.flags |= 64; - } - resume() { - if (this.flags & 64) { - this.flags &= ~64; - if (pausedQueueEffects.has(this)) { - pausedQueueEffects.delete(this); - this.trigger(); - } - } - } - /** - * @internal - */ - notify() { - if (this.flags & 2 && !(this.flags & 32)) { - return; - } - if (!(this.flags & 8)) { - batch(this); - } - } - run() { - if (!(this.flags & 1)) { - return this.fn(); - } - this.flags |= 2; - cleanupEffect(this); - prepareDeps(this); - const prevEffect = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = this; - shouldTrack = true; - try { - return this.fn(); - } finally { - if (activeSub !== this) { - warn( - "Active effect was not restored correctly - this is likely a Vue internal bug." - ); - } - cleanupDeps(this); - activeSub = prevEffect; - shouldTrack = prevShouldTrack; - this.flags &= ~2; - } - } - stop() { - if (this.flags & 1) { - for (let link = this.deps; link; link = link.nextDep) { - removeSub(link); - } - this.deps = this.depsTail = void 0; - cleanupEffect(this); - this.onStop && this.onStop(); - this.flags &= ~1; - } - } - trigger() { - if (this.flags & 64) { - pausedQueueEffects.add(this); - } else if (this.scheduler) { - this.scheduler(); - } else { - this.runIfDirty(); - } - } - /** - * @internal - */ - runIfDirty() { - if (isDirty(this)) { - this.run(); - } - } - get dirty() { - return isDirty(this); - } - } - let batchDepth = 0; - let batchedSub; - let batchedComputed; - function batch(sub, isComputed = false) { - sub.flags |= 8; - if (isComputed) { - sub.next = batchedComputed; - batchedComputed = sub; - return; - } - sub.next = batchedSub; - batchedSub = sub; - } - function startBatch() { - batchDepth++; - } - function endBatch() { - if (--batchDepth > 0) { - return; - } - if (batchedComputed) { - let e = batchedComputed; - batchedComputed = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - e = next; - } - } - let error; - while (batchedSub) { - let e = batchedSub; - batchedSub = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - if (e.flags & 1) { - try { - ; - e.trigger(); - } catch (err) { - if (!error) error = err; - } - } - e = next; - } - } - if (error) throw error; - } - function prepareDeps(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - link.version = -1; - link.prevActiveLink = link.dep.activeLink; - link.dep.activeLink = link; - } - } - function cleanupDeps(sub) { - let head; - let tail = sub.depsTail; - let link = tail; - while (link) { - const prev = link.prevDep; - if (link.version === -1) { - if (link === tail) tail = prev; - removeSub(link); - removeDep(link); - } else { - head = link; - } - link.dep.activeLink = link.prevActiveLink; - link.prevActiveLink = void 0; - link = prev; - } - sub.deps = head; - sub.depsTail = tail; - } - function isDirty(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { - return true; - } - } - if (sub._dirty) { - return true; - } - return false; - } - function refreshComputed(computed) { - if (computed.flags & 4 && !(computed.flags & 16)) { - return; - } - computed.flags &= ~16; - if (computed.globalVersion === globalVersion) { - return; - } - computed.globalVersion = globalVersion; - const dep = computed.dep; - computed.flags |= 2; - if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { - computed.flags &= ~2; - return; - } - const prevSub = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = computed; - shouldTrack = true; - try { - prepareDeps(computed); - const value = computed.fn(computed._value); - if (dep.version === 0 || hasChanged(value, computed._value)) { - computed._value = value; - dep.version++; - } - } catch (err) { - dep.version++; - throw err; - } finally { - activeSub = prevSub; - shouldTrack = prevShouldTrack; - cleanupDeps(computed); - computed.flags &= ~2; - } - } - function removeSub(link, soft = false) { - const { dep, prevSub, nextSub } = link; - if (prevSub) { - prevSub.nextSub = nextSub; - link.prevSub = void 0; - } - if (nextSub) { - nextSub.prevSub = prevSub; - link.nextSub = void 0; - } - if (dep.subsHead === link) { - dep.subsHead = nextSub; - } - if (dep.subs === link) { - dep.subs = prevSub; - if (!prevSub && dep.computed) { - dep.computed.flags &= ~4; - for (let l = dep.computed.deps; l; l = l.nextDep) { - removeSub(l, true); - } - } - } - if (!soft && !--dep.sc && dep.map) { - dep.map.delete(dep.key); - } - } - function removeDep(link) { - const { prevDep, nextDep } = link; - if (prevDep) { - prevDep.nextDep = nextDep; - link.prevDep = void 0; - } - if (nextDep) { - nextDep.prevDep = prevDep; - link.nextDep = void 0; - } - } - function effect(fn, options) { - if (fn.effect instanceof ReactiveEffect) { - fn = fn.effect.fn; - } - const e = new ReactiveEffect(fn); - if (options) { - extend(e, options); - } - try { - e.run(); - } catch (err) { - e.stop(); - throw err; - } - const runner = e.run.bind(e); - runner.effect = e; - return runner; - } - function stop(runner) { - runner.effect.stop(); - } - let shouldTrack = true; - const trackStack = []; - function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; - } - function enableTracking() { - trackStack.push(shouldTrack); - shouldTrack = true; - } - function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === void 0 ? true : last; - } - function onEffectCleanup(fn, failSilently = false) { - if (activeSub instanceof ReactiveEffect) { - activeSub.cleanup = fn; - } else if (!failSilently) { - warn( - `onEffectCleanup() was called when there was no active effect to associate with.` - ); - } - } - function cleanupEffect(e) { - const { cleanup } = e; - e.cleanup = void 0; - if (cleanup) { - const prevSub = activeSub; - activeSub = void 0; - try { - cleanup(); - } finally { - activeSub = prevSub; - } - } - } - - let globalVersion = 0; - class Link { - constructor(sub, dep) { - this.sub = sub; - this.dep = dep; - this.version = dep.version; - this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; - } - } - class Dep { - constructor(computed) { - this.computed = computed; - this.version = 0; - /** - * Link between this dep and the current active effect - */ - this.activeLink = void 0; - /** - * Doubly linked list representing the subscribing effects (tail) - */ - this.subs = void 0; - /** - * For object property deps cleanup - */ - this.map = void 0; - this.key = void 0; - /** - * Subscriber counter - */ - this.sc = 0; - { - this.subsHead = void 0; - } - } - track(debugInfo) { - if (!activeSub || !shouldTrack || activeSub === this.computed) { - return; - } - let link = this.activeLink; - if (link === void 0 || link.sub !== activeSub) { - link = this.activeLink = new Link(activeSub, this); - if (!activeSub.deps) { - activeSub.deps = activeSub.depsTail = link; - } else { - link.prevDep = activeSub.depsTail; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - } - addSub(link); - } else if (link.version === -1) { - link.version = this.version; - if (link.nextDep) { - const next = link.nextDep; - next.prevDep = link.prevDep; - if (link.prevDep) { - link.prevDep.nextDep = next; - } - link.prevDep = activeSub.depsTail; - link.nextDep = void 0; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - if (activeSub.deps === link) { - activeSub.deps = next; - } - } - } - if (activeSub.onTrack) { - activeSub.onTrack( - extend( - { - effect: activeSub - }, - debugInfo - ) - ); - } - return link; - } - trigger(debugInfo) { - this.version++; - globalVersion++; - this.notify(debugInfo); - } - notify(debugInfo) { - startBatch(); - try { - if (true) { - for (let head = this.subsHead; head; head = head.nextSub) { - if (head.sub.onTrigger && !(head.sub.flags & 8)) { - head.sub.onTrigger( - extend( - { - effect: head.sub - }, - debugInfo - ) - ); - } - } - } - for (let link = this.subs; link; link = link.prevSub) { - if (link.sub.notify()) { - ; - link.sub.dep.notify(); - } - } - } finally { - endBatch(); - } - } - } - function addSub(link) { - link.dep.sc++; - if (link.sub.flags & 4) { - const computed = link.dep.computed; - if (computed && !link.dep.subs) { - computed.flags |= 4 | 16; - for (let l = computed.deps; l; l = l.nextDep) { - addSub(l); - } - } - const currentTail = link.dep.subs; - if (currentTail !== link) { - link.prevSub = currentTail; - if (currentTail) currentTail.nextSub = link; - } - if (link.dep.subsHead === void 0) { - link.dep.subsHead = link; - } - link.dep.subs = link; - } - } - const targetMap = /* @__PURE__ */ new WeakMap(); - const ITERATE_KEY = Symbol( - "Object iterate" - ); - const MAP_KEY_ITERATE_KEY = Symbol( - "Map keys iterate" - ); - const ARRAY_ITERATE_KEY = Symbol( - "Array iterate" - ); - function track(target, type, key) { - if (shouldTrack && activeSub) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = new Dep()); - dep.map = depsMap; - dep.key = key; - } - { - dep.track({ - target, - type, - key - }); - } - } - } - function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - globalVersion++; - return; - } - const run = (dep) => { - if (dep) { - { - dep.trigger({ - target, - type, - key, - newValue, - oldValue, - oldTarget - }); - } - } - }; - startBatch(); - if (type === "clear") { - depsMap.forEach(run); - } else { - const targetIsArray = isArray(target); - const isArrayIndex = targetIsArray && isIntegerKey(key); - if (targetIsArray && key === "length") { - const newLength = Number(newValue); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { - run(dep); - } - }); - } else { - if (key !== void 0 || depsMap.has(void 0)) { - run(depsMap.get(key)); - } - if (isArrayIndex) { - run(depsMap.get(ARRAY_ITERATE_KEY)); - } - switch (type) { - case "add": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isArrayIndex) { - run(depsMap.get("length")); - } - break; - case "delete": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (isMap(target)) { - run(depsMap.get(ITERATE_KEY)); - } - break; - } - } - } - endBatch(); - } - function getDepFromReactive(object, key) { - const depMap = targetMap.get(object); - return depMap && depMap.get(key); - } - - function reactiveReadArray(array) { - const raw = toRaw(array); - if (raw === array) return raw; - track(raw, "iterate", ARRAY_ITERATE_KEY); - return isShallow(array) ? raw : raw.map(toReactive); - } - function shallowReadArray(arr) { - track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); - return arr; - } - const arrayInstrumentations = { - __proto__: null, - [Symbol.iterator]() { - return iterator(this, Symbol.iterator, toReactive); - }, - concat(...args) { - return reactiveReadArray(this).concat( - ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) - ); - }, - entries() { - return iterator(this, "entries", (value) => { - value[1] = toReactive(value[1]); - return value; - }); - }, - every(fn, thisArg) { - return apply(this, "every", fn, thisArg, void 0, arguments); - }, - filter(fn, thisArg) { - return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); - }, - find(fn, thisArg) { - return apply(this, "find", fn, thisArg, toReactive, arguments); - }, - findIndex(fn, thisArg) { - return apply(this, "findIndex", fn, thisArg, void 0, arguments); - }, - findLast(fn, thisArg) { - return apply(this, "findLast", fn, thisArg, toReactive, arguments); - }, - findLastIndex(fn, thisArg) { - return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); - }, - // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement - forEach(fn, thisArg) { - return apply(this, "forEach", fn, thisArg, void 0, arguments); - }, - includes(...args) { - return searchProxy(this, "includes", args); - }, - indexOf(...args) { - return searchProxy(this, "indexOf", args); - }, - join(separator) { - return reactiveReadArray(this).join(separator); - }, - // keys() iterator only reads `length`, no optimisation required - lastIndexOf(...args) { - return searchProxy(this, "lastIndexOf", args); - }, - map(fn, thisArg) { - return apply(this, "map", fn, thisArg, void 0, arguments); - }, - pop() { - return noTracking(this, "pop"); - }, - push(...args) { - return noTracking(this, "push", args); - }, - reduce(fn, ...args) { - return reduce(this, "reduce", fn, args); - }, - reduceRight(fn, ...args) { - return reduce(this, "reduceRight", fn, args); - }, - shift() { - return noTracking(this, "shift"); - }, - // slice could use ARRAY_ITERATE but also seems to beg for range tracking - some(fn, thisArg) { - return apply(this, "some", fn, thisArg, void 0, arguments); - }, - splice(...args) { - return noTracking(this, "splice", args); - }, - toReversed() { - return reactiveReadArray(this).toReversed(); - }, - toSorted(comparer) { - return reactiveReadArray(this).toSorted(comparer); - }, - toSpliced(...args) { - return reactiveReadArray(this).toSpliced(...args); - }, - unshift(...args) { - return noTracking(this, "unshift", args); - }, - values() { - return iterator(this, "values", toReactive); - } - }; - function iterator(self, method, wrapValue) { - const arr = shallowReadArray(self); - const iter = arr[method](); - if (arr !== self && !isShallow(self)) { - iter._next = iter.next; - iter.next = () => { - const result = iter._next(); - if (result.value) { - result.value = wrapValue(result.value); - } - return result; - }; - } - return iter; - } - const arrayProto = Array.prototype; - function apply(self, method, fn, thisArg, wrappedRetFn, args) { - const arr = shallowReadArray(self); - const needsWrap = arr !== self && !isShallow(self); - const methodFn = arr[method]; - if (methodFn !== arrayProto[method]) { - const result2 = methodFn.apply(self, args); - return needsWrap ? toReactive(result2) : result2; - } - let wrappedFn = fn; - if (arr !== self) { - if (needsWrap) { - wrappedFn = function(item, index) { - return fn.call(this, toReactive(item), index, self); - }; - } else if (fn.length > 2) { - wrappedFn = function(item, index) { - return fn.call(this, item, index, self); - }; - } - } - const result = methodFn.call(arr, wrappedFn, thisArg); - return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; - } - function reduce(self, method, fn, args) { - const arr = shallowReadArray(self); - let wrappedFn = fn; - if (arr !== self) { - if (!isShallow(self)) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, toReactive(item), index, self); - }; - } else if (fn.length > 3) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, item, index, self); - }; - } - } - return arr[method](wrappedFn, ...args); - } - function searchProxy(self, method, args) { - const arr = toRaw(self); - track(arr, "iterate", ARRAY_ITERATE_KEY); - const res = arr[method](...args); - if ((res === -1 || res === false) && isProxy(args[0])) { - args[0] = toRaw(args[0]); - return arr[method](...args); - } - return res; - } - function noTracking(self, method, args = []) { - pauseTracking(); - startBatch(); - const res = toRaw(self)[method].apply(self, args); - endBatch(); - resetTracking(); - return res; - } - - const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); - const builtInSymbols = new Set( - /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) - ); - function hasOwnProperty(key) { - if (!isSymbol(key)) key = String(key); - const obj = toRaw(this); - track(obj, "has", key); - return obj.hasOwnProperty(key); - } - class BaseReactiveHandler { - constructor(_isReadonly = false, _isShallow = false) { - this._isReadonly = _isReadonly; - this._isShallow = _isShallow; - } - get(target, key, receiver) { - if (key === "__v_skip") return target["__v_skip"]; - const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_isShallow") { - return isShallow2; - } else if (key === "__v_raw") { - if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype - // this means the receiver is a user proxy of the reactive proxy - Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { - return target; - } - return; - } - const targetIsArray = isArray(target); - if (!isReadonly2) { - let fn; - if (targetIsArray && (fn = arrayInstrumentations[key])) { - return fn; - } - if (key === "hasOwnProperty") { - return hasOwnProperty; - } - } - const res = Reflect.get( - target, - key, - // if this is a proxy wrapping a ref, return methods using the raw ref - // as receiver so that we don't have to call `toRaw` on the ref in all - // its class methods - isRef(target) ? target : receiver - ); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly2) { - track(target, "get", key); - } - if (isShallow2) { - return res; - } - if (isRef(res)) { - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - return isReadonly2 ? readonly(res) : reactive(res); - } - return res; - } - } - class MutableReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(false, isShallow2); - } - set(target, key, value, receiver) { - let oldValue = target[key]; - if (!this._isShallow) { - const isOldValueReadonly = isReadonly(oldValue); - if (!isShallow(value) && !isReadonly(value)) { - oldValue = toRaw(oldValue); - value = toRaw(value); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - if (isOldValueReadonly) { - return false; - } else { - oldValue.value = value; - return true; - } - } - } - const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); - const result = Reflect.set( - target, - key, - value, - isRef(target) ? target : receiver - ); - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - } - return result; - } - deleteProperty(target, key) { - const hadKey = hasOwn(target, key); - const oldValue = target[key]; - const result = Reflect.deleteProperty(target, key); - if (result && hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - } - has(target, key) { - const result = Reflect.has(target, key); - if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has", key); - } - return result; - } - ownKeys(target) { - track( - target, - "iterate", - isArray(target) ? "length" : ITERATE_KEY - ); - return Reflect.ownKeys(target); - } - } - class ReadonlyReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(true, isShallow2); - } - set(target, key) { - { - warn( - `Set operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } - deleteProperty(target, key) { - { - warn( - `Delete operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } - } - const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); - const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); - const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); - const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); - - const toShallow = (value) => value; - const getProto = (v) => Reflect.getPrototypeOf(v); - function createIterableMethod(method, isReadonly2, isShallow2) { - return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; - const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; - !isReadonly2 && track( - rawTarget, - "iterate", - isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY - ); - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done ? { value, done } : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } - }; - }; - } - function createReadonlyMethod(type) { - return function(...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - warn( - `${capitalize(type)} operation ${key}failed: target is readonly.`, - toRaw(this) - ); - } - return type === "delete" ? false : type === "clear" ? void 0 : this; - }; - } - function createInstrumentations(readonly, shallow) { - const instrumentations = { - get(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "get", key); - } - track(rawTarget, "get", rawKey); - } - const { has } = getProto(rawTarget); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } else if (target !== rawTarget) { - target.get(key); - } - }, - get size() { - const target = this["__v_raw"]; - !readonly && track(toRaw(target), "iterate", ITERATE_KEY); - return Reflect.get(target, "size", target); - }, - has(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "has", key); - } - track(rawTarget, "has", rawKey); - } - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); - }, - forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - !readonly && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value, key) => { - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - } - }; - extend( - instrumentations, - readonly ? { - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear") - } : { - add(value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add", value, value); - } - return this; - }, - set(key, value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - return this; - }, - delete(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : void 0; - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - }, - clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; - const result = target.clear(); - if (hadItems) { - trigger( - target, - "clear", - void 0, - void 0, - oldTarget - ); - } - return result; - } - } - ); - const iteratorMethods = [ - "keys", - "values", - "entries", - Symbol.iterator - ]; - iteratorMethods.forEach((method) => { - instrumentations[method] = createIterableMethod(method, readonly, shallow); - }); - return instrumentations; - } - function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = createInstrumentations(isReadonly2, shallow); - return (target, key, receiver) => { - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_raw") { - return target; - } - return Reflect.get( - hasOwn(instrumentations, key) && key in target ? instrumentations : target, - key, - receiver - ); - }; - } - const mutableCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, false) - }; - const shallowCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, true) - }; - const readonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, false) - }; - const shallowReadonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, true) - }; - function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - warn( - `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` - ); - } - } - - const reactiveMap = /* @__PURE__ */ new WeakMap(); - const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); - const readonlyMap = /* @__PURE__ */ new WeakMap(); - const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); - function targetTypeMap(rawType) { - switch (rawType) { - case "Object": - case "Array": - return 1 /* COMMON */; - case "Map": - case "Set": - case "WeakMap": - case "WeakSet": - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } - } - function getTargetType(value) { - return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); - } - function reactive(target) { - if (isReadonly(target)) { - return target; - } - return createReactiveObject( - target, - false, - mutableHandlers, - mutableCollectionHandlers, - reactiveMap - ); - } - function shallowReactive(target) { - return createReactiveObject( - target, - false, - shallowReactiveHandlers, - shallowCollectionHandlers, - shallowReactiveMap - ); - } - function readonly(target) { - return createReactiveObject( - target, - true, - readonlyHandlers, - readonlyCollectionHandlers, - readonlyMap - ); - } - function shallowReadonly(target) { - return createReactiveObject( - target, - true, - shallowReadonlyHandlers, - shallowReadonlyCollectionHandlers, - shallowReadonlyMap - ); - } - function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - { - warn( - `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( - target - )}` - ); - } - return target; - } - if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { - return target; - } - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy( - target, - targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers - ); - proxyMap.set(target, proxy); - return proxy; - } - function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw"]); - } - return !!(value && value["__v_isReactive"]); - } - function isReadonly(value) { - return !!(value && value["__v_isReadonly"]); - } - function isShallow(value) { - return !!(value && value["__v_isShallow"]); - } - function isProxy(value) { - return value ? !!value["__v_raw"] : false; - } - function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; - } - function markRaw(value) { - if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { - def(value, "__v_skip", true); - } - return value; - } - const toReactive = (value) => isObject(value) ? reactive(value) : value; - const toReadonly = (value) => isObject(value) ? readonly(value) : value; - - function isRef(r) { - return r ? r["__v_isRef"] === true : false; - } - function ref(value) { - return createRef(value, false); - } - function shallowRef(value) { - return createRef(value, true); - } - function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); - } - class RefImpl { - constructor(value, isShallow2) { - this.dep = new Dep(); - this["__v_isRef"] = true; - this["__v_isShallow"] = false; - this._rawValue = isShallow2 ? value : toRaw(value); - this._value = isShallow2 ? value : toReactive(value); - this["__v_isShallow"] = isShallow2; - } - get value() { - { - this.dep.track({ - target: this, - type: "get", - key: "value" - }); - } - return this._value; - } - set value(newValue) { - const oldValue = this._rawValue; - const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); - newValue = useDirectValue ? newValue : toRaw(newValue); - if (hasChanged(newValue, oldValue)) { - this._rawValue = newValue; - this._value = useDirectValue ? newValue : toReactive(newValue); - { - this.dep.trigger({ - target: this, - type: "set", - key: "value", - newValue, - oldValue - }); - } - } - } - } - function triggerRef(ref2) { - if (ref2.dep) { - { - ref2.dep.trigger({ - target: ref2, - type: "set", - key: "value", - newValue: ref2._value - }); - } - } - } - function unref(ref2) { - return isRef(ref2) ? ref2.value : ref2; - } - function toValue(source) { - return isFunction(source) ? source() : unref(source); - } - const shallowUnwrapHandlers = { - get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } else { - return Reflect.set(target, key, value, receiver); - } - } - }; - function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); - } - class CustomRefImpl { - constructor(factory) { - this["__v_isRef"] = true; - this._value = void 0; - const dep = this.dep = new Dep(); - const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); - this._get = get; - this._set = set; - } - get value() { - return this._value = this._get(); - } - set value(newVal) { - this._set(newVal); - } - } - function customRef(factory) { - return new CustomRefImpl(factory); - } - function toRefs(object) { - if (!isProxy(object)) { - warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = propertyToRef(object, key); - } - return ret; - } - class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this["__v_isRef"] = true; - this._value = void 0; - } - get value() { - const val = this._object[this._key]; - return this._value = val === void 0 ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - get dep() { - return getDepFromReactive(toRaw(this._object), this._key); - } - } - class GetterRefImpl { - constructor(_getter) { - this._getter = _getter; - this["__v_isRef"] = true; - this["__v_isReadonly"] = true; - this._value = void 0; - } - get value() { - return this._value = this._getter(); - } - } - function toRef(source, key, defaultValue) { - if (isRef(source)) { - return source; - } else if (isFunction(source)) { - return new GetterRefImpl(source); - } else if (isObject(source) && arguments.length > 1) { - return propertyToRef(source, key, defaultValue); - } else { - return ref(source); - } - } - function propertyToRef(source, key, defaultValue) { - const val = source[key]; - return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); - } - - class ComputedRefImpl { - constructor(fn, setter, isSSR) { - this.fn = fn; - this.setter = setter; - /** - * @internal - */ - this._value = void 0; - /** - * @internal - */ - this.dep = new Dep(this); - /** - * @internal - */ - this.__v_isRef = true; - // TODO isolatedDeclarations "__v_isReadonly" - // A computed is also a subscriber that tracks other deps - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 16; - /** - * @internal - */ - this.globalVersion = globalVersion - 1; - /** - * @internal - */ - this.next = void 0; - // for backwards compat - this.effect = this; - this["__v_isReadonly"] = !setter; - this.isSSR = isSSR; - } - /** - * @internal - */ - notify() { - this.flags |= 16; - if (!(this.flags & 8) && // avoid infinite self recursion - activeSub !== this) { - batch(this, true); - return true; - } - } - get value() { - const link = this.dep.track({ - target: this, - type: "get", - key: "value" - }) ; - refreshComputed(this); - if (link) { - link.version = this.dep.version; - } - return this._value; - } - set value(newValue) { - if (this.setter) { - this.setter(newValue); - } else { - warn("Write operation failed: computed value is readonly"); - } - } - } - function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - if (isFunction(getterOrOptions)) { - getter = getterOrOptions; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, isSSR); - if (debugOptions && !isSSR) { - cRef.onTrack = debugOptions.onTrack; - cRef.onTrigger = debugOptions.onTrigger; - } - return cRef; - } - - const TrackOpTypes = { - "GET": "get", - "HAS": "has", - "ITERATE": "iterate" - }; - const TriggerOpTypes = { - "SET": "set", - "ADD": "add", - "DELETE": "delete", - "CLEAR": "clear" - }; - const ReactiveFlags = { - "SKIP": "__v_skip", - "IS_REACTIVE": "__v_isReactive", - "IS_READONLY": "__v_isReadonly", - "IS_SHALLOW": "__v_isShallow", - "RAW": "__v_raw", - "IS_REF": "__v_isRef" - }; - - const WatchErrorCodes = { - "WATCH_GETTER": 2, - "2": "WATCH_GETTER", - "WATCH_CALLBACK": 3, - "3": "WATCH_CALLBACK", - "WATCH_CLEANUP": 4, - "4": "WATCH_CLEANUP" - }; - const INITIAL_WATCHER_VALUE = {}; - const cleanupMap = /* @__PURE__ */ new WeakMap(); - let activeWatcher = void 0; - function getCurrentWatcher() { - return activeWatcher; - } - function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { - if (owner) { - let cleanups = cleanupMap.get(owner); - if (!cleanups) cleanupMap.set(owner, cleanups = []); - cleanups.push(cleanupFn); - } else if (!failSilently) { - warn( - `onWatcherCleanup() was called when there was no active watcher to associate with.` - ); - } - } - function watch(source, cb, options = EMPTY_OBJ) { - const { immediate, deep, once, scheduler, augmentJob, call } = options; - const warnInvalidSource = (s) => { - (options.onWarn || warn)( - `Invalid watch source: `, - s, - `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` - ); - }; - const reactiveGetter = (source2) => { - if (deep) return source2; - if (isShallow(source2) || deep === false || deep === 0) - return traverse(source2, 1); - return traverse(source2); - }; - let effect; - let getter; - let cleanup; - let boundCleanup; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); - } else if (isReactive(source)) { - getter = () => reactiveGetter(source); - forceTrigger = true; - } else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); - getter = () => source.map((s) => { - if (isRef(s)) { - return s.value; - } else if (isReactive(s)) { - return reactiveGetter(s); - } else if (isFunction(s)) { - return call ? call(s, 2) : s(); - } else { - warnInvalidSource(s); - } - }); - } else if (isFunction(source)) { - if (cb) { - getter = call ? () => call(source, 2) : source; - } else { - getter = () => { - if (cleanup) { - pauseTracking(); - try { - cleanup(); - } finally { - resetTracking(); - } - } - const currentEffect = activeWatcher; - activeWatcher = effect; - try { - return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); - } finally { - activeWatcher = currentEffect; - } - }; - } - } else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - const depth = deep === true ? Infinity : deep; - getter = () => traverse(baseGetter(), depth); - } - const scope = getCurrentScope(); - const watchHandle = () => { - effect.stop(); - if (scope && scope.active) { - remove(scope.effects, effect); - } - }; - if (once && cb) { - const _cb = cb; - cb = (...args) => { - _cb(...args); - watchHandle(); - }; - } - let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; - const job = (immediateFirstRun) => { - if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { - return; - } - if (cb) { - const newValue = effect.run(); - if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { - if (cleanup) { - cleanup(); - } - const currentWatcher = activeWatcher; - activeWatcher = effect; - try { - const args = [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, - boundCleanup - ]; - call ? call(cb, 3, args) : ( - // @ts-expect-error - cb(...args) - ); - oldValue = newValue; - } finally { - activeWatcher = currentWatcher; - } - } - } else { - effect.run(); - } - }; - if (augmentJob) { - augmentJob(job); - } - effect = new ReactiveEffect(getter); - effect.scheduler = scheduler ? () => scheduler(job, false) : job; - boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); - cleanup = effect.onStop = () => { - const cleanups = cleanupMap.get(effect); - if (cleanups) { - if (call) { - call(cleanups, 4); - } else { - for (const cleanup2 of cleanups) cleanup2(); - } - cleanupMap.delete(effect); - } - }; - { - effect.onTrack = options.onTrack; - effect.onTrigger = options.onTrigger; - } - if (cb) { - if (immediate) { - job(true); - } else { - oldValue = effect.run(); - } - } else if (scheduler) { - scheduler(job.bind(null, true), true); - } else { - effect.run(); - } - watchHandle.pause = effect.pause.bind(effect); - watchHandle.resume = effect.resume.bind(effect); - watchHandle.stop = watchHandle; - return watchHandle; - } - function traverse(value, depth = Infinity, seen) { - if (depth <= 0 || !isObject(value) || value["__v_skip"]) { - return value; - } - seen = seen || /* @__PURE__ */ new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - depth--; - if (isRef(value)) { - traverse(value.value, depth, seen); - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], depth, seen); - } - } else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, depth, seen); - }); - } else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], depth, seen); - } - for (const key of Object.getOwnPropertySymbols(value)) { - if (Object.prototype.propertyIsEnumerable.call(value, key)) { - traverse(value[key], depth, seen); - } - } - } - return value; - } - - exports.ARRAY_ITERATE_KEY = ARRAY_ITERATE_KEY; - exports.EffectFlags = EffectFlags; - exports.EffectScope = EffectScope; - exports.ITERATE_KEY = ITERATE_KEY; - exports.MAP_KEY_ITERATE_KEY = MAP_KEY_ITERATE_KEY; - exports.ReactiveEffect = ReactiveEffect; - exports.ReactiveFlags = ReactiveFlags; - exports.TrackOpTypes = TrackOpTypes; - exports.TriggerOpTypes = TriggerOpTypes; - exports.WatchErrorCodes = WatchErrorCodes; - exports.computed = computed; - exports.customRef = customRef; - exports.effect = effect; - exports.effectScope = effectScope; - exports.enableTracking = enableTracking; - exports.getCurrentScope = getCurrentScope; - exports.getCurrentWatcher = getCurrentWatcher; - exports.isProxy = isProxy; - exports.isReactive = isReactive; - exports.isReadonly = isReadonly; - exports.isRef = isRef; - exports.isShallow = isShallow; - exports.markRaw = markRaw; - exports.onEffectCleanup = onEffectCleanup; - exports.onScopeDispose = onScopeDispose; - exports.onWatcherCleanup = onWatcherCleanup; - exports.pauseTracking = pauseTracking; - exports.proxyRefs = proxyRefs; - exports.reactive = reactive; - exports.reactiveReadArray = reactiveReadArray; - exports.readonly = readonly; - exports.ref = ref; - exports.resetTracking = resetTracking; - exports.shallowReactive = shallowReactive; - exports.shallowReadArray = shallowReadArray; - exports.shallowReadonly = shallowReadonly; - exports.shallowRef = shallowRef; - exports.stop = stop; - exports.toRaw = toRaw; - exports.toReactive = toReactive; - exports.toReadonly = toReadonly; - exports.toRef = toRef; - exports.toRefs = toRefs; - exports.toValue = toValue; - exports.track = track; - exports.traverse = traverse; - exports.trigger = trigger; - exports.triggerRef = triggerRef; - exports.unref = unref; - exports.watch = watch; - - return exports; - -})({}); diff --git a/node_modules/@vue/reactivity/dist/reactivity.global.prod.js b/node_modules/@vue/reactivity/dist/reactivity.global.prod.js deleted file mode 100644 index 798e26f..0000000 --- a/node_modules/@vue/reactivity/dist/reactivity.global.prod.js +++ /dev/null @@ -1,5 +0,0 @@ -/** -* @vue/reactivity v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/var VueReactivity=function(e){"use strict";let t,i,s,r,n;let l={},a=()=>{},o=Object.assign,u=(e,t)=>{let i=e.indexOf(t);i>-1&&e.splice(i,1)},c=Object.prototype.hasOwnProperty,h=(e,t)=>c.call(e,t),f=Array.isArray,p=e=>"[object Map]"===b(e),d=e=>"[object Set]"===b(e),_=e=>"function"==typeof e,v=e=>"string"==typeof e,g=e=>"symbol"==typeof e,y=e=>null!==e&&"object"==typeof e,R=Object.prototype.toString,b=e=>R.call(e),w=e=>b(e).slice(8,-1),S=e=>"[object Object]"===b(e),E=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,x=(e,t)=>!Object.is(e,t),m=(e,t,i,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:i})};class T{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=t,!e&&t&&(this.index=(t.scopes||(t.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let i=t;try{return t=this,e()}finally{t=i}}}on(){t=this}off(){t=this.parent}stop(e){if(this._active){let t,i;for(t=0,this._active=!1,i=this.effects.length;t<i;t++)this.effects[t].stop();for(t=0,this.effects.length=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}let k=new WeakSet;class A{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,t&&t.active&&t.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,k.has(this)&&(k.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||O(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,H(this),L(this);let e=i,t=N;i=this,N=!0;try{return this.fn()}finally{j(this),i=e,N=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)W(e);this.deps=this.depsTail=void 0,H(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?k.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){C(this)&&this.run()}get dirty(){return C(this)}}let D=0;function O(e,t=!1){if(e.flags|=8,t){e.next=r,r=e;return}e.next=s,s=e}function I(){let e;if(!(--D>0)){if(r){let e=r;for(r=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;s;){let t=s;for(s=void 0;t;){let i=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=i}}if(e)throw e}}function L(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function j(e){let t;let i=e.depsTail,s=i;for(;s;){let e=s.prevDep;-1===s.version?(s===i&&(i=e),W(s),function(e){let{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=e}e.deps=t,e.depsTail=i}function C(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(P(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function P(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===U))return;e.globalVersion=U;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!C(e)){e.flags&=-3;return}let s=i,r=N;i=e,N=!0;try{L(e);let i=e.fn(e._value);(0===t.version||x(i,e._value))&&(e._value=i,t.version++)}catch(e){throw t.version++,e}finally{i=s,N=r,j(e),e.flags&=-3}}function W(e,t=!1){let{dep:i,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),i.subs===e&&(i.subs=s,!s&&i.computed)){i.computed.flags&=-5;for(let e=i.computed.deps;e;e=e.nextDep)W(e,!0)}t||--i.sc||!i.map||i.map.delete(i.key)}let N=!0,V=[];function K(){V.push(N),N=!1}function M(){let e=V.pop();N=void 0===e||e}function H(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=i;i=void 0;try{t()}finally{i=e}}}let U=0;class Y{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class G{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!i||!N||i===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==i)t=this.activeLink=new Y(i,this),i.deps?(t.prevDep=i.depsTail,i.depsTail.nextDep=t,i.depsTail=t):i.deps=i.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let i=t.dep.computed;if(i&&!t.dep.subs){i.flags|=20;for(let t=i.deps;t;t=t.nextDep)e(t)}let s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=i.depsTail,t.nextDep=void 0,i.depsTail.nextDep=t,i.depsTail=t,i.deps===t&&(i.deps=e)}return t}trigger(e){this.version++,U++,this.notify(e)}notify(e){D++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{I()}}}let F=new WeakMap,z=Symbol(""),B=Symbol(""),q=Symbol("");function J(e,t,s){if(N&&i){let t=F.get(e);t||F.set(e,t=new Map);let i=t.get(s);i||(t.set(s,i=new G),i.map=t,i.key=s),i.track()}}function Q(e,t,i,s,r,n){let l=F.get(e);if(!l){U++;return}let a=e=>{e&&e.trigger()};if(D++,"clear"===t)l.forEach(a);else{let r=f(e),n=r&&E(i);if(r&&"length"===i){let e=Number(s);l.forEach((t,i)=>{("length"===i||i===q||!g(i)&&i>=e)&&a(t)})}else switch((void 0!==i||l.has(void 0))&&a(l.get(i)),n&&a(l.get(q)),t){case"add":r?n&&a(l.get("length")):(a(l.get(z)),p(e)&&a(l.get(B)));break;case"delete":!r&&(a(l.get(z)),p(e)&&a(l.get(B)));break;case"set":p(e)&&a(l.get(z))}}I()}function X(e){let t=eP(e);return t===e?t:(J(t,"iterate",q),ej(e)?t:t.map(eW))}function Z(e){return J(e=eP(e),"iterate",q),e}let $={__proto__:null,[Symbol.iterator](){return ee(this,Symbol.iterator,eW)},concat(...e){return X(this).concat(...e.map(e=>f(e)?X(e):e))},entries(){return ee(this,"entries",e=>(e[1]=eW(e[1]),e))},every(e,t){return ei(this,"every",e,t,void 0,arguments)},filter(e,t){return ei(this,"filter",e,t,e=>e.map(eW),arguments)},find(e,t){return ei(this,"find",e,t,eW,arguments)},findIndex(e,t){return ei(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ei(this,"findLast",e,t,eW,arguments)},findLastIndex(e,t){return ei(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ei(this,"forEach",e,t,void 0,arguments)},includes(...e){return er(this,"includes",e)},indexOf(...e){return er(this,"indexOf",e)},join(e){return X(this).join(e)},lastIndexOf(...e){return er(this,"lastIndexOf",e)},map(e,t){return ei(this,"map",e,t,void 0,arguments)},pop(){return en(this,"pop")},push(...e){return en(this,"push",e)},reduce(e,...t){return es(this,"reduce",e,t)},reduceRight(e,...t){return es(this,"reduceRight",e,t)},shift(){return en(this,"shift")},some(e,t){return ei(this,"some",e,t,void 0,arguments)},splice(...e){return en(this,"splice",e)},toReversed(){return X(this).toReversed()},toSorted(e){return X(this).toSorted(e)},toSpliced(...e){return X(this).toSpliced(...e)},unshift(...e){return en(this,"unshift",e)},values(){return ee(this,"values",eW)}};function ee(e,t,i){let s=Z(e),r=s[t]();return s===e||ej(e)||(r._next=r.next,r.next=()=>{let e=r._next();return e.value&&(e.value=i(e.value)),e}),r}let et=Array.prototype;function ei(e,t,i,s,r,n){let l=Z(e),a=l!==e&&!ej(e),o=l[t];if(o!==et[t]){let t=o.apply(e,n);return a?eW(t):t}let u=i;l!==e&&(a?u=function(t,s){return i.call(this,eW(t),s,e)}:i.length>2&&(u=function(t,s){return i.call(this,t,s,e)}));let c=o.call(l,u,s);return a&&r?r(c):c}function es(e,t,i,s){let r=Z(e),n=i;return r!==e&&(ej(e)?i.length>3&&(n=function(t,s,r){return i.call(this,t,s,r,e)}):n=function(t,s,r){return i.call(this,t,eW(s),r,e)}),r[t](n,...s)}function er(e,t,i){let s=eP(e);J(s,"iterate",q);let r=s[t](...i);return(-1===r||!1===r)&&eC(i[0])?(i[0]=eP(i[0]),s[t](...i)):r}function en(e,t,i=[]){K(),D++;let s=eP(e)[t].apply(e,i);return I(),M(),s}let el=function(e){let t=Object.create(null);for(let i of e.split(","))t[i]=1;return e=>e in t}("__proto__,__v_isRef,__isVue"),ea=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(g));function eo(e){g(e)||(e=String(e));let t=eP(this);return J(t,"has",e),t.hasOwnProperty(e)}class eu{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if("__v_skip"===t)return e.__v_skip;let s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return i===(s?r?ek:eT:r?em:ex).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;let n=f(e);if(!s){let e;if(n&&(e=$[t]))return e;if("hasOwnProperty"===t)return eo}let l=Reflect.get(e,t,eV(e)?e:i);return(g(t)?ea.has(t):el(t))?l:(s||J(e,"get",t),r)?l:eV(l)?n&&E(t)?l:l.value:y(l)?s?eD(l):eA(l):l}}class ec extends eu{constructor(e=!1){super(!1,e)}set(e,t,i,s){let r=e[t];if(!this._isShallow){let t=eL(r);if(ej(i)||eL(i)||(r=eP(r),i=eP(i)),!f(e)&&eV(r)&&!eV(i))return!t&&(r.value=i,!0)}let n=f(e)&&E(t)?Number(t)<e.length:h(e,t),l=Reflect.set(e,t,i,eV(e)?e:s);return e===eP(s)&&(n?x(i,r)&&Q(e,"set",t,i):Q(e,"add",t,i)),l}deleteProperty(e,t){let i=h(e,t);e[t];let s=Reflect.deleteProperty(e,t);return s&&i&&Q(e,"delete",t,void 0),s}has(e,t){let i=Reflect.has(e,t);return g(t)&&ea.has(t)||J(e,"has",t),i}ownKeys(e){return J(e,"iterate",f(e)?"length":z),Reflect.ownKeys(e)}}class eh extends eu{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let ef=new ec,ep=new eh,ed=new ec(!0),e_=new eh(!0),ev=e=>e,eg=e=>Reflect.getPrototypeOf(e);function ey(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function eR(e,t){let i=function(e,t){let i={get(i){let s=this.__v_raw,r=eP(s),n=eP(i);e||(x(i,n)&&J(r,"get",i),J(r,"get",n));let{has:l}=eg(r),a=t?ev:e?eN:eW;return l.call(r,i)?a(s.get(i)):l.call(r,n)?a(s.get(n)):void(s!==r&&s.get(i))},get size(){let t=this.__v_raw;return e||J(eP(t),"iterate",z),Reflect.get(t,"size",t)},has(t){let i=this.__v_raw,s=eP(i),r=eP(t);return e||(x(t,r)&&J(s,"has",t),J(s,"has",r)),t===r?i.has(t):i.has(t)||i.has(r)},forEach(i,s){let r=this,n=r.__v_raw,l=eP(n),a=t?ev:e?eN:eW;return e||J(l,"iterate",z),n.forEach((e,t)=>i.call(s,a(e),a(t),r))}};return o(i,e?{add:ey("add"),set:ey("set"),delete:ey("delete"),clear:ey("clear")}:{add(e){t||ej(e)||eL(e)||(e=eP(e));let i=eP(this);return eg(i).has.call(i,e)||(i.add(e),Q(i,"add",e,e)),this},set(e,i){t||ej(i)||eL(i)||(i=eP(i));let s=eP(this),{has:r,get:n}=eg(s),l=r.call(s,e);l||(e=eP(e),l=r.call(s,e));let a=n.call(s,e);return s.set(e,i),l?x(i,a)&&Q(s,"set",e,i):Q(s,"add",e,i),this},delete(e){let t=eP(this),{has:i,get:s}=eg(t),r=i.call(t,e);r||(e=eP(e),r=i.call(t,e)),s&&s.call(t,e);let n=t.delete(e);return r&&Q(t,"delete",e,void 0),n},clear(){let e=eP(this),t=0!==e.size,i=e.clear();return t&&Q(e,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{i[s]=function(...i){let r=this.__v_raw,n=eP(r),l=p(n),a="entries"===s||s===Symbol.iterator&&l,o=r[s](...i),u=t?ev:e?eN:eW;return e||J(n,"iterate","keys"===s&&l?B:z),{next(){let{value:e,done:t}=o.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}),i}(e,t);return(t,s,r)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(h(i,s)&&s in t?i:t,s,r)}let eb={get:eR(!1,!1)},ew={get:eR(!1,!0)},eS={get:eR(!0,!1)},eE={get:eR(!0,!0)},ex=new WeakMap,em=new WeakMap,eT=new WeakMap,ek=new WeakMap;function eA(e){return eL(e)?e:eO(e,!1,ef,eb,ex)}function eD(e){return eO(e,!0,ep,eS,eT)}function eO(e,t,i,s,r){if(!y(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let n=r.get(e);if(n)return n;let l=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(w(e));if(0===l)return e;let a=new Proxy(e,2===l?s:i);return r.set(e,a),a}function eI(e){return eL(e)?eI(e.__v_raw):!!(e&&e.__v_isReactive)}function eL(e){return!!(e&&e.__v_isReadonly)}function ej(e){return!!(e&&e.__v_isShallow)}function eC(e){return!!e&&!!e.__v_raw}function eP(e){let t=e&&e.__v_raw;return t?eP(t):e}let eW=e=>y(e)?eA(e):e,eN=e=>y(e)?eD(e):e;function eV(e){return!!e&&!0===e.__v_isRef}function eK(e){return eM(e,!1)}function eM(e,t){return eV(e)?e:new eH(e,t)}class eH{constructor(e,t){this.dep=new G,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:eP(e),this._value=t?e:eW(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,i=this.__v_isShallow||ej(e)||eL(e);x(e=i?e:eP(e),t)&&(this._rawValue=e,this._value=i?e:eW(e),this.dep.trigger())}}function eU(e){return eV(e)?e.value:e}let eY={get:(e,t,i)=>"__v_raw"===t?e:eU(Reflect.get(e,t,i)),set:(e,t,i,s)=>{let r=e[t];return eV(r)&&!eV(i)?(r.value=i,!0):Reflect.set(e,t,i,s)}};class eG{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new G,{get:i,set:s}=e(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}class eF{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let i=F.get(e);return i&&i.get(t)}(eP(this._object),this._key)}}class ez{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function eB(e,t,i){let s=e[t];return eV(s)?s:new eF(e,t,i)}class eq{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new G(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=U-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(8&this.flags)&&i!==this)return O(this,!0),!0}get value(){let e=this.dep.track();return P(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let eJ={},eQ=new WeakMap;function eX(e,t=!1,i=n){if(i){let t=eQ.get(i);t||eQ.set(i,t=[]),t.push(e)}}function eZ(e,t=1/0,i){if(t<=0||!y(e)||e.__v_skip||(i=i||new Set).has(e))return e;if(i.add(e),t--,eV(e))eZ(e.value,t,i);else if(f(e))for(let s=0;s<e.length;s++)eZ(e[s],t,i);else if(d(e)||p(e))e.forEach(e=>{eZ(e,t,i)});else if(S(e)){for(let s in e)eZ(e[s],t,i);for(let s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&eZ(e[s],t,i)}return e}return e.ARRAY_ITERATE_KEY=q,e.EffectFlags={ACTIVE:1,1:"ACTIVE",RUNNING:2,2:"RUNNING",TRACKING:4,4:"TRACKING",NOTIFIED:8,8:"NOTIFIED",DIRTY:16,16:"DIRTY",ALLOW_RECURSE:32,32:"ALLOW_RECURSE",PAUSED:64,64:"PAUSED"},e.EffectScope=T,e.ITERATE_KEY=z,e.MAP_KEY_ITERATE_KEY=B,e.ReactiveEffect=A,e.ReactiveFlags={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.WatchErrorCodes={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},e.computed=function(e,t,i=!1){let s,r;return _(e)?s=e:(s=e.get,r=e.set),new eq(s,r,i)},e.customRef=function(e){return new eG(e)},e.effect=function(e,t){e.effect instanceof A&&(e=e.effect.fn);let i=new A(e);t&&o(i,t);try{i.run()}catch(e){throw i.stop(),e}let s=i.run.bind(i);return s.effect=i,s},e.effectScope=function(e){return new T(e)},e.enableTracking=function(){V.push(N),N=!0},e.getCurrentScope=function(){return t},e.getCurrentWatcher=function(){return n},e.isProxy=eC,e.isReactive=eI,e.isReadonly=eL,e.isRef=eV,e.isShallow=ej,e.markRaw=function(e){return!h(e,"__v_skip")&&Object.isExtensible(e)&&m(e,"__v_skip",!0),e},e.onEffectCleanup=function(e,t=!1){i instanceof A&&(i.cleanup=e)},e.onScopeDispose=function(e,i=!1){t&&t.cleanups.push(e)},e.onWatcherCleanup=eX,e.pauseTracking=K,e.proxyRefs=function(e){return eI(e)?e:new Proxy(e,eY)},e.reactive=eA,e.reactiveReadArray=X,e.readonly=eD,e.ref=eK,e.resetTracking=M,e.shallowReactive=function(e){return eO(e,!1,ed,ew,em)},e.shallowReadArray=Z,e.shallowReadonly=function(e){return eO(e,!0,e_,eE,ek)},e.shallowRef=function(e){return eM(e,!0)},e.stop=function(e){e.effect.stop()},e.toRaw=eP,e.toReactive=eW,e.toReadonly=eN,e.toRef=function(e,t,i){return eV(e)?e:_(e)?new ez(e):y(e)&&arguments.length>1?eB(e,t,i):eK(e)},e.toRefs=function(e){let t=f(e)?Array(e.length):{};for(let i in e)t[i]=eB(e,i);return t},e.toValue=function(e){return _(e)?e():eU(e)},e.track=J,e.traverse=eZ,e.trigger=Q,e.triggerRef=function(e){e.dep&&e.dep.trigger()},e.unref=eU,e.watch=function(e,i,s=l){let r,o,c,h;let{immediate:p,deep:d,once:v,scheduler:g,augmentJob:y,call:R}=s,b=e=>d?e:ej(e)||!1===d||0===d?eZ(e,1):eZ(e),w=!1,S=!1;if(eV(e)?(o=()=>e.value,w=ej(e)):eI(e)?(o=()=>b(e),w=!0):f(e)?(S=!0,w=e.some(e=>eI(e)||ej(e)),o=()=>e.map(e=>eV(e)?e.value:eI(e)?b(e):_(e)?R?R(e,2):e():void 0)):o=_(e)?i?R?()=>R(e,2):e:()=>{if(c){K();try{c()}finally{M()}}let t=n;n=r;try{return R?R(e,3,[h]):e(h)}finally{n=t}}:a,i&&d){let e=o,t=!0===d?1/0:d;o=()=>eZ(e(),t)}let E=t,m=()=>{r.stop(),E&&E.active&&u(E.effects,r)};if(v&&i){let e=i;i=(...t)=>{e(...t),m()}}let T=S?Array(e.length).fill(eJ):eJ,k=e=>{if(1&r.flags&&(r.dirty||e)){if(i){let e=r.run();if(d||w||(S?e.some((e,t)=>x(e,T[t])):x(e,T))){c&&c();let t=n;n=r;try{let t=[e,T===eJ?void 0:S&&T[0]===eJ?[]:T,h];R?R(i,3,t):i(...t),T=e}finally{n=t}}}else r.run()}};return y&&y(k),(r=new A(o)).scheduler=g?()=>g(k,!1):k,h=e=>eX(e,!1,r),c=r.onStop=()=>{let e=eQ.get(r);if(e){if(R)R(e,4);else for(let t of e)t();eQ.delete(r)}},i?p?k(!0):T=r.run():g?g(k.bind(null,!0),!0):r.run(),m.pause=r.pause.bind(r),m.resume=r.resume.bind(r),m.stop=m,m},e}({}); diff --git a/node_modules/@vue/reactivity/index.js b/node_modules/@vue/reactivity/index.js deleted file mode 100644 index 04a8ba5..0000000 --- a/node_modules/@vue/reactivity/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/reactivity.cjs.prod.js') -} else { - module.exports = require('./dist/reactivity.cjs.js') -} diff --git a/node_modules/@vue/reactivity/package.json b/node_modules/@vue/reactivity/package.json deleted file mode 100644 index 6778f1c..0000000 --- a/node_modules/@vue/reactivity/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "@vue/reactivity", - "version": "3.5.13", - "description": "@vue/reactivity", - "main": "index.js", - "module": "dist/reactivity.esm-bundler.js", - "types": "dist/reactivity.d.ts", - "unpkg": "dist/reactivity.global.js", - "jsdelivr": "dist/reactivity.global.js", - "files": [ - "index.js", - "dist" - ], - "exports": { - ".": { - "types": "./dist/reactivity.d.ts", - "node": { - "production": "./dist/reactivity.cjs.prod.js", - "development": "./dist/reactivity.cjs.js", - "default": "./index.js" - }, - "module": "./dist/reactivity.esm-bundler.js", - "import": "./dist/reactivity.esm-bundler.js", - "require": "./index.js" - }, - "./*": "./*" - }, - "sideEffects": false, - "repository": { - "type": "git", - "url": "git+https://github.com/vuejs/core.git", - "directory": "packages/reactivity" - }, - "buildOptions": { - "name": "VueReactivity", - "formats": [ - "esm-bundler", - "esm-browser", - "cjs", - "global" - ] - }, - "keywords": [ - "vue" - ], - "author": "Evan You", - "license": "MIT", - "bugs": { - "url": "https://github.com/vuejs/core/issues" - }, - "homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme", - "dependencies": { - "@vue/shared": "3.5.13" - } -} \ No newline at end of file diff --git a/node_modules/@vue/runtime-core/LICENSE b/node_modules/@vue/runtime-core/LICENSE deleted file mode 100644 index 15f1f7e..0000000 --- a/node_modules/@vue/runtime-core/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018-present, Yuxi (Evan) You - -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/node_modules/@vue/runtime-core/README.md b/node_modules/@vue/runtime-core/README.md deleted file mode 100644 index 452ef52..0000000 --- a/node_modules/@vue/runtime-core/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# @vue/runtime-core - -> This package is published only for typing and building custom renderers. It is NOT meant to be used in applications. - -For full exposed APIs, see `src/index.ts`. - -## Building a Custom Renderer - -```ts -import { createRenderer } from '@vue/runtime-core' - -const { render, createApp } = createRenderer({ - patchProp, - insert, - remove, - createElement, - // ... -}) - -// `render` is the low-level API -// `createApp` returns an app instance with configurable context shared -// by the entire app tree. -export { render, createApp } - -export * from '@vue/runtime-core' -``` - -See `@vue/runtime-dom` for how a DOM-targeting renderer is implemented. diff --git a/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js b/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js deleted file mode 100644 index 4307f03..0000000 --- a/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js +++ /dev/null @@ -1,8493 +0,0 @@ -/** -* @vue/runtime-core v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var reactivity = require('@vue/reactivity'); -var shared = require('@vue/shared'); - -const stack = []; -function pushWarningContext(vnode) { - stack.push(vnode); -} -function popWarningContext() { - stack.pop(); -} -let isWarning = false; -function warn$1(msg, ...args) { - if (isWarning) return; - isWarning = true; - reactivity.pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling( - appWarnHandler, - instance, - 11, - [ - // eslint-disable-next-line no-restricted-syntax - msg + args.map((a) => { - var _a, _b; - return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); - }).join(""), - instance && instance.proxy, - trace.map( - ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` - ).join("\n"), - trace - ] - ); - } else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - if (trace.length && // avoid spamming console during tests - true) { - warnArgs.push(` -`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - reactivity.resetTracking(); - isWarning = false; -} -function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; - } - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; -} -function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...i === 0 ? [] : [` -`], ...formatTraceEntry(entry)); - }); - return logs; -} -function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName( - vnode.component, - vnode.type, - isRoot - )}`; - const close = `>` + postfix; - return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; -} -function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach((key) => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; -} -function formatProp(key, value, raw) { - if (shared.isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } else if (typeof value === "number" || typeof value === "boolean" || value == null) { - return raw ? value : [`${key}=${value}`]; - } else if (reactivity.isRef(value)) { - value = formatProp(key, reactivity.toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } else if (shared.isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } else { - value = reactivity.toRaw(value); - return raw ? value : [`${key}=`, value]; - } -} -function assertNumber(val, type) { - if (val === void 0) { - return; - } else if (typeof val !== "number") { - warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); - } else if (isNaN(val)) { - warn$1(`${type} is NaN - the duration expression might be incorrect.`); - } -} - -const ErrorCodes = { - "SETUP_FUNCTION": 0, - "0": "SETUP_FUNCTION", - "RENDER_FUNCTION": 1, - "1": "RENDER_FUNCTION", - "NATIVE_EVENT_HANDLER": 5, - "5": "NATIVE_EVENT_HANDLER", - "COMPONENT_EVENT_HANDLER": 6, - "6": "COMPONENT_EVENT_HANDLER", - "VNODE_HOOK": 7, - "7": "VNODE_HOOK", - "DIRECTIVE_HOOK": 8, - "8": "DIRECTIVE_HOOK", - "TRANSITION_HOOK": 9, - "9": "TRANSITION_HOOK", - "APP_ERROR_HANDLER": 10, - "10": "APP_ERROR_HANDLER", - "APP_WARN_HANDLER": 11, - "11": "APP_WARN_HANDLER", - "FUNCTION_REF": 12, - "12": "FUNCTION_REF", - "ASYNC_COMPONENT_LOADER": 13, - "13": "ASYNC_COMPONENT_LOADER", - "SCHEDULER": 14, - "14": "SCHEDULER", - "COMPONENT_UPDATE": 15, - "15": "COMPONENT_UPDATE", - "APP_UNMOUNT_CLEANUP": 16, - "16": "APP_UNMOUNT_CLEANUP" -}; -const ErrorTypeStrings$1 = { - ["sp"]: "serverPrefetch hook", - ["bc"]: "beforeCreate hook", - ["c"]: "created hook", - ["bm"]: "beforeMount hook", - ["m"]: "mounted hook", - ["bu"]: "beforeUpdate hook", - ["u"]: "updated", - ["bum"]: "beforeUnmount hook", - ["um"]: "unmounted hook", - ["a"]: "activated hook", - ["da"]: "deactivated hook", - ["ec"]: "errorCaptured hook", - ["rtc"]: "renderTracked hook", - ["rtg"]: "renderTriggered hook", - [0]: "setup function", - [1]: "render function", - [2]: "watcher getter", - [3]: "watcher callback", - [4]: "watcher cleanup function", - [5]: "native event handler", - [6]: "component event handler", - [7]: "vnode hook", - [8]: "directive hook", - [9]: "transition hook", - [10]: "app errorHandler", - [11]: "app warnHandler", - [12]: "ref function", - [13]: "async component loader", - [14]: "scheduler flush", - [15]: "component update", - [16]: "app unmount cleanup function" -}; -function callWithErrorHandling(fn, instance, type, args) { - try { - return args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance, type); - } -} -function callWithAsyncErrorHandling(fn, instance, type, args) { - if (shared.isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && shared.isPromise(res)) { - res.catch((err) => { - handleError(err, instance, type); - }); - } - return res; - } - if (shared.isArray(fn)) { - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; - } else { - warn$1( - `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` - ); - } -} -function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || shared.EMPTY_OBJ; - if (instance) { - let cur = instance.parent; - const exposedInstance = instance.proxy; - const errorInfo = ErrorTypeStrings$1[type] ; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - if (errorHandler) { - reactivity.pauseTracking(); - callWithErrorHandling(errorHandler, null, 10, [ - err, - exposedInstance, - errorInfo - ]); - reactivity.resetTracking(); - return; - } - } - logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); -} -function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { - { - const info = ErrorTypeStrings$1[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - if (throwInDev) { - throw err; - } else { - console.error(err); - } - } -} - -const queue = []; -let flushIndex = -1; -const pendingPostFlushCbs = []; -let activePostFlushCbs = null; -let postFlushIndex = 0; -const resolvedPromise = /* @__PURE__ */ Promise.resolve(); -let currentFlushPromise = null; -const RECURSION_LIMIT = 100; -function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; -} -function findInsertionIndex(id) { - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = start + end >>> 1; - const middleJob = queue[middle]; - const middleJobId = getId(middleJob); - if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { - start = middle + 1; - } else { - end = middle; - } - } - return start; -} -function queueJob(job) { - if (!(job.flags & 1)) { - const jobId = getId(job); - const lastJob = queue[queue.length - 1]; - if (!lastJob || // fast path when the job id is larger than the tail - !(job.flags & 2) && jobId >= getId(lastJob)) { - queue.push(job); - } else { - queue.splice(findInsertionIndex(jobId), 0, job); - } - job.flags |= 1; - queueFlush(); - } -} -function queueFlush() { - if (!currentFlushPromise) { - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function queuePostFlushCb(cb) { - if (!shared.isArray(cb)) { - if (activePostFlushCbs && cb.id === -1) { - activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); - } else if (!(cb.flags & 1)) { - pendingPostFlushCbs.push(cb); - cb.flags |= 1; - } - } else { - pendingPostFlushCbs.push(...cb); - } - queueFlush(); -} -function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { - { - seen = seen || /* @__PURE__ */ new Map(); - } - for (; i < queue.length; i++) { - const cb = queue[i]; - if (cb && cb.flags & 2) { - if (instance && cb.id !== instance.uid) { - continue; - } - if (checkRecursiveUpdates(seen, cb)) { - continue; - } - queue.splice(i, 1); - i--; - if (cb.flags & 4) { - cb.flags &= ~1; - } - cb(); - if (!(cb.flags & 4)) { - cb.flags &= ~1; - } - } - } -} -function flushPostFlushCbs(seen) { - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)].sort( - (a, b) => getId(a) - getId(b) - ); - pendingPostFlushCbs.length = 0; - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - { - seen = seen || /* @__PURE__ */ new Map(); - } - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - const cb = activePostFlushCbs[postFlushIndex]; - if (checkRecursiveUpdates(seen, cb)) { - continue; - } - if (cb.flags & 4) { - cb.flags &= ~1; - } - if (!(cb.flags & 8)) cb(); - cb.flags &= ~1; - } - activePostFlushCbs = null; - postFlushIndex = 0; - } -} -const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; -function flushJobs(seen) { - { - seen = seen || /* @__PURE__ */ new Map(); - } - const check = (job) => checkRecursiveUpdates(seen, job) ; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && !(job.flags & 8)) { - if (check(job)) { - continue; - } - if (job.flags & 4) { - job.flags &= ~1; - } - callWithErrorHandling( - job, - job.i, - job.i ? 15 : 14 - ); - if (!(job.flags & 4)) { - job.flags &= ~1; - } - } - } - } finally { - for (; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job) { - job.flags &= ~1; - } - } - flushIndex = -1; - queue.length = 0; - flushPostFlushCbs(seen); - currentFlushPromise = null; - if (queue.length || pendingPostFlushCbs.length) { - flushJobs(seen); - } - } -} -function checkRecursiveUpdates(seen, fn) { - const count = seen.get(fn) || 0; - if (count > RECURSION_LIMIT) { - const instance = fn.i; - const componentName = instance && getComponentName(instance.type); - handleError( - `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, - null, - 10 - ); - return true; - } - seen.set(fn, count + 1); - return false; -} - -let isHmrUpdating = false; -const hmrDirtyComponents = /* @__PURE__ */ new Map(); -{ - shared.getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; -} -const map = /* @__PURE__ */ new Map(); -function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); -} -function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); -} -function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: /* @__PURE__ */ new Set() - }); - return true; -} -function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; -} -function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; - } - record.initialDef.render = newRender; - [...record.instances].forEach((instance) => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); -} -function reload(id, newComp) { - const record = map.get(id); - if (!record) return; - newComp = normalizeClassComponent(newComp); - updateComponentDef(record.initialDef, newComp); - const instances = [...record.instances]; - for (let i = 0; i < instances.length; i++) { - const instance = instances[i]; - const oldComp = normalizeClassComponent(instance.type); - let dirtyInstances = hmrDirtyComponents.get(oldComp); - if (!dirtyInstances) { - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); - } - dirtyInstances.add(instance); - instance.appContext.propsCache.delete(instance.type); - instance.appContext.emitsCache.delete(instance.type); - instance.appContext.optionsCache.delete(instance.type); - if (instance.ceReload) { - dirtyInstances.add(instance); - instance.ceReload(newComp.styles); - dirtyInstances.delete(instance); - } else if (instance.parent) { - queueJob(() => { - isHmrUpdating = true; - instance.parent.update(); - isHmrUpdating = false; - dirtyInstances.delete(instance); - }); - } else if (instance.appContext.reload) { - instance.appContext.reload(); - } else if (typeof window !== "undefined") { - window.location.reload(); - } else { - console.warn( - "[HMR] Root or manually mounted instance modified. Full reload required." - ); - } - if (instance.root.ce && instance !== instance.root) { - instance.root.ce._removeChildStyle(oldComp); - } - } - queuePostFlushCb(() => { - hmrDirtyComponents.clear(); - }); -} -function updateComponentDef(oldComp, newComp) { - shared.extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== "__file" && !(key in newComp)) { - delete oldComp[key]; - } - } -} -function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } catch (e) { - console.error(e); - console.warn( - `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` - ); - } - }; -} - -let devtools$1; -let buffer = []; -let devtoolsNotInstalled = false; -function emit$1(event, ...args) { - if (devtools$1) { - devtools$1.emit(event, ...args); - } else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } -} -function setDevtoolsHook$1(hook, target) { - var _a, _b; - devtools$1 = hook; - if (devtools$1) { - devtools$1.enabled = true; - buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); - buffer = []; - } else if ( - // handle late devtools injection - only do this if we are in an actual - // browser environment to avoid the timer handle stalling test runner exit - // (#4815) - typeof window !== "undefined" && // some envs mock window but not fully - window.HTMLElement && // also exclude jsdom - // eslint-disable-next-line no-restricted-syntax - !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) - ) { - const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; - replay.push((newHook) => { - setDevtoolsHook$1(newHook, target); - }); - setTimeout(() => { - if (!devtools$1) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3e3); - } else { - devtoolsNotInstalled = true; - buffer = []; - } -} -function devtoolsInitApp(app, version) { - emit$1("app:init" /* APP_INIT */, app, version, { - Fragment, - Text, - Comment, - Static - }); -} -function devtoolsUnmountApp(app) { - emit$1("app:unmount" /* APP_UNMOUNT */, app); -} -const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); -const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); -const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( - "component:removed" /* COMPONENT_REMOVED */ -); -const devtoolsComponentRemoved = (component) => { - if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered - !devtools$1.cleanupBuffer(component)) { - _devtoolsComponentRemoved(component); - } -}; -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function createDevtoolsComponentHook(hook) { - return (component) => { - emit$1( - hook, - component.appContext.app, - component.uid, - component.parent ? component.parent.uid : void 0, - component - ); - }; -} -const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); -const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); -function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit$1(hook, component.appContext.app, component.uid, component, type, time); - }; -} -function devtoolsComponentEmit(component, event, params) { - emit$1( - "component:emit" /* COMPONENT_EMIT */, - component.appContext.app, - component, - event, - params - ); -} - -let currentRenderingInstance = null; -let currentScopeId = null; -function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = instance && instance.type.__scopeId || null; - return prev; -} -function pushScopeId(id) { - currentScopeId = id; -} -function popScopeId() { - currentScopeId = null; -} -const withScopeId = (_id) => withCtx; -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { - if (!ctx) return fn; - if (fn._n) { - return fn; - } - const renderFnWithContext = (...args) => { - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - let res; - try { - res = fn(...args); - } finally { - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - } - { - devtoolsComponentUpdated(ctx); - } - return res; - }; - renderFnWithContext._n = true; - renderFnWithContext._c = true; - renderFnWithContext._d = true; - return renderFnWithContext; -} - -function validateDirectiveName(name) { - if (shared.isBuiltInDirective(name)) { - warn$1("Do not use built-in directive ids as custom directive id: " + name); - } -} -function withDirectives(vnode, directives) { - if (currentRenderingInstance === null) { - warn$1(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getComponentPublicInstance(currentRenderingInstance); - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i]; - if (dir) { - if (shared.isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - reactivity.traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - reactivity.pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - reactivity.resetTracking(); - } - } -} - -const TeleportEndKey = Symbol("_vte"); -const isTeleport = (type) => type.__isTeleport; -const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); -const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); -const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; -const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; -const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (shared.isString(targetSelector)) { - if (!select) { - warn$1( - `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` - ); - return null; - } else { - const target = select(targetSelector); - if (!target && !isTeleportDisabled(props)) { - warn$1( - `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` - ); - } - return target; - } - } else { - if (!targetSelector && !isTeleportDisabled(props)) { - warn$1(`Invalid Teleport target: ${targetSelector}`); - } - return targetSelector; - } -}; -const TeleportImpl = { - name: "Teleport", - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { - const { - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - o: { insert, querySelector, createText, createComment } - } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - if (isHmrUpdating) { - optimized = false; - dynamicChildren = null; - } - if (n1 == null) { - const placeholder = n2.el = createComment("teleport start") ; - const mainAnchor = n2.anchor = createComment("teleport end") ; - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const mount = (container2, anchor2) => { - if (shapeFlag & 16) { - if (parentComponent && parentComponent.isCE) { - parentComponent.ce._teleportTarget = container2; - } - mountChildren( - children, - container2, - anchor2, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const mountToTarget = () => { - const target = n2.target = resolveTarget(n2.props, querySelector); - const targetAnchor = prepareAnchor(target, n2, createText, insert); - if (target) { - if (namespace !== "svg" && isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace !== "mathml" && isTargetMathML(target)) { - namespace = "mathml"; - } - if (!disabled) { - mount(target, targetAnchor); - updateCssVars(n2, false); - } - } else if (!disabled) { - warn$1( - "Invalid Teleport target on mount:", - target, - `(${typeof target})` - ); - } - }; - if (disabled) { - mount(container, mainAnchor); - updateCssVars(n2, true); - } - if (isTeleportDeferred(n2.props)) { - queuePostRenderEffect(() => { - mountToTarget(); - n2.el.__isMounted = true; - }, parentSuspense); - } else { - mountToTarget(); - } - } else { - if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { - queuePostRenderEffect(() => { - TeleportImpl.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - delete n1.el.__isMounted; - }, parentSuspense); - return; - } - n2.el = n1.el; - n2.targetStart = n1.targetStart; - const mainAnchor = n2.anchor = n1.anchor; - const target = n2.target = n1.target; - const targetAnchor = n2.targetAnchor = n1.targetAnchor; - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - if (namespace === "svg" || isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace === "mathml" || isTargetMathML(target)) { - namespace = "mathml"; - } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - currentContainer, - parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - traverseStaticChildren(n1, n2, true); - } else if (!optimized) { - patchChildren( - n1, - n2, - currentContainer, - currentAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - false - ); - } - if (disabled) { - if (!wasDisabled) { - moveTeleport( - n2, - container, - mainAnchor, - internals, - 1 - ); - } else { - if (n2.props && n1.props && n2.props.to !== n1.props.to) { - n2.props.to = n1.props.to; - } - } - } else { - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = n2.target = resolveTarget( - n2.props, - querySelector - ); - if (nextTarget) { - moveTeleport( - n2, - nextTarget, - null, - internals, - 0 - ); - } else { - warn$1( - "Invalid Teleport target on update:", - target, - `(${typeof target})` - ); - } - } else if (wasDisabled) { - moveTeleport( - n2, - target, - targetAnchor, - internals, - 1 - ); - } - } - updateCssVars(n2, disabled); - } - }, - remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { - shapeFlag, - children, - anchor, - targetStart, - targetAnchor, - target, - props - } = vnode; - if (target) { - hostRemove(targetStart); - hostRemove(targetAnchor); - } - doRemove && hostRemove(anchor); - if (shapeFlag & 16) { - const shouldRemove = doRemove || !isTeleportDisabled(props); - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount( - child, - parentComponent, - parentSuspense, - shouldRemove, - !!child.dynamicChildren - ); - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport -}; -function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { - if (moveType === 0) { - insert(vnode.targetAnchor, container, parentAnchor); - } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2; - if (isReorder) { - insert(el, container, parentAnchor); - } - if (!isReorder || isTeleportDisabled(props)) { - if (shapeFlag & 16) { - for (let i = 0; i < children.length; i++) { - move( - children[i], - container, - parentAnchor, - 2 - ); - } - } - } - if (isReorder) { - insert(anchor, container, parentAnchor); - } -} -function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { - o: { nextSibling, parentNode, querySelector, insert, createText } -}, hydrateChildren) { - const target = vnode.target = resolveTarget( - vnode.props, - querySelector - ); - if (target) { - const disabled = isTeleportDisabled(vnode.props); - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16) { - if (disabled) { - vnode.anchor = hydrateChildren( - nextSibling(node), - vnode, - parentNode(node), - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - vnode.targetStart = targetNode; - vnode.targetAnchor = targetNode && nextSibling(targetNode); - } else { - vnode.anchor = nextSibling(node); - let targetAnchor = targetNode; - while (targetAnchor) { - if (targetAnchor && targetAnchor.nodeType === 8) { - if (targetAnchor.data === "teleport start anchor") { - vnode.targetStart = targetAnchor; - } else if (targetAnchor.data === "teleport anchor") { - vnode.targetAnchor = targetAnchor; - target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - targetAnchor = nextSibling(targetAnchor); - } - if (!vnode.targetAnchor) { - prepareAnchor(target, vnode, createText, insert); - } - hydrateChildren( - targetNode && nextSibling(targetNode), - vnode, - target, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - } - updateCssVars(vnode, disabled); - } - return vnode.anchor && nextSibling(vnode.anchor); -} -const Teleport = TeleportImpl; -function updateCssVars(vnode, isDisabled) { - const ctx = vnode.ctx; - if (ctx && ctx.ut) { - let node, anchor; - if (isDisabled) { - node = vnode.el; - anchor = vnode.anchor; - } else { - node = vnode.targetStart; - anchor = vnode.targetAnchor; - } - while (node && node !== anchor) { - if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); - node = node.nextSibling; - } - ctx.ut(); - } -} -function prepareAnchor(target, vnode, createText, insert) { - const targetStart = vnode.targetStart = createText(""); - const targetAnchor = vnode.targetAnchor = createText(""); - targetStart[TeleportEndKey] = targetAnchor; - if (target) { - insert(targetStart, target); - insert(targetAnchor, target); - } - return targetAnchor; -} - -const leaveCbKey = Symbol("_leaveCb"); -const enterCbKey = Symbol("_enterCb"); -function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: /* @__PURE__ */ new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; -} -const TransitionHookValidator = [Function, Array]; -const BaseTransitionPropsValidators = { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator -}; -const recursiveGetSubtree = (instance) => { - const subTree = instance.subTree; - return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; -}; -const BaseTransitionImpl = { - name: `BaseTransition`, - props: BaseTransitionPropsValidators, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - const child = findNonCommentChild(children); - const rawProps = reactivity.toRaw(props); - const { mode } = rawProps; - if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { - warn$1(`invalid <transition> mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - const innerChild = getInnerChild$1(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - let enterHooks = resolveTransitionHooks( - innerChild, - rawProps, - state, - instance, - // #11061, ensure enterHooks is fresh after clone - (hooks) => enterHooks = hooks - ); - if (innerChild.type !== Comment) { - setTransitionHooks(innerChild, enterHooks); - } - let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); - if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { - let leavingHooks = resolveTransitionHooks( - oldInnerChild, - rawProps, - state, - instance - ); - setTransitionHooks(oldInnerChild, leavingHooks); - if (mode === "out-in" && innerChild.type !== Comment) { - state.isLeaving = true; - leavingHooks.afterLeave = () => { - state.isLeaving = false; - if (!(instance.job.flags & 8)) { - instance.update(); - } - delete leavingHooks.afterLeave; - oldInnerChild = void 0; - }; - return emptyPlaceholder(child); - } else if (mode === "in-out" && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType( - state, - oldInnerChild - ); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - el[leaveCbKey] = () => { - earlyRemove(); - el[leaveCbKey] = void 0; - delete enterHooks.delayedLeave; - oldInnerChild = void 0; - }; - enterHooks.delayedLeave = () => { - delayedLeave(); - delete enterHooks.delayedLeave; - oldInnerChild = void 0; - }; - }; - } else { - oldInnerChild = void 0; - } - } else if (oldInnerChild) { - oldInnerChild = void 0; - } - return child; - }; - } -}; -function findNonCommentChild(children) { - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - for (const c of children) { - if (c.type !== Comment) { - if (hasFound) { - warn$1( - "<transition> can only be used on a single element or component. Use <transition-group> for lists." - ); - break; - } - child = c; - hasFound = true; - } - } - } - return child; -} -const BaseTransition = BaseTransitionImpl; -function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = /* @__PURE__ */ Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; -} -function resolveTransitionHooks(vnode, props, state, instance, postClone) { - const { - appear, - mode, - persisted = false, - onBeforeEnter, - onEnter, - onAfterEnter, - onEnterCancelled, - onBeforeLeave, - onLeave, - onAfterLeave, - onLeaveCancelled, - onBeforeAppear, - onAppear, - onAfterAppear, - onAppearCancelled - } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && callWithAsyncErrorHandling( - hook, - instance, - 9, - args - ); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (shared.isArray(hook)) { - if (hook.every((hook2) => hook2.length <= 1)) done(); - } else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } else { - return; - } - } - if (el[leaveCbKey]) { - el[leaveCbKey]( - true - /* cancelled */ - ); - } - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { - leavingVNode.el[leaveCbKey](); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } else { - return; - } - } - let called = false; - const done = el[enterCbKey] = (cancelled) => { - if (called) return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el[enterCbKey] = void 0; - }; - if (hook) { - callAsyncHook(hook, [el, done]); - } else { - done(); - } - }, - leave(el, remove) { - const key2 = String(vnode.key); - if (el[enterCbKey]) { - el[enterCbKey]( - true - /* cancelled */ - ); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = el[leaveCbKey] = (cancelled) => { - if (called) return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } else { - callHook(onAfterLeave, [el]); - } - el[leaveCbKey] = void 0; - if (leavingVNodesCache[key2] === vnode) { - delete leavingVNodesCache[key2]; - } - }; - leavingVNodesCache[key2] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } else { - done(); - } - }, - clone(vnode2) { - const hooks2 = resolveTransitionHooks( - vnode2, - props, - state, - instance, - postClone - ); - if (postClone) postClone(hooks2); - return hooks2; - } - }; - return hooks; -} -function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; - } -} -function getInnerChild$1(vnode) { - if (!isKeepAlive(vnode)) { - if (isTeleport(vnode.type) && vnode.children) { - return findNonCommentChild(vnode.children); - } - return vnode; - } - if (vnode.component) { - return vnode.component.subTree; - } - const { shapeFlag, children } = vnode; - if (children) { - if (shapeFlag & 16) { - return children[0]; - } - if (shapeFlag & 32 && shared.isFunction(children.default)) { - return children.default(); - } - } -} -function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 && vnode.component) { - vnode.transition = hooks; - setTransitionHooks(vnode.component.subTree, hooks); - } else if (vnode.shapeFlag & 128) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } else { - vnode.transition = hooks; - } -} -function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); - if (child.type === Fragment) { - if (child.patchFlag & 128) keyedFragmentCount++; - ret = ret.concat( - getTransitionRawChildren(child.children, keepComment, key) - ); - } else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } - } - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2; - } - } - return ret; -} - -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineComponent(options, extraOptions) { - return shared.isFunction(options) ? ( - // #8236: extend call and options.name access are considered side-effects - // by Rollup, so we have to wrap it in a pure-annotated IIFE. - /* @__PURE__ */ (() => shared.extend({ name: options.name }, extraOptions, { setup: options }))() - ) : options; -} - -function useId() { - const i = getCurrentInstance(); - if (i) { - return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; - } else { - warn$1( - `useId() is called when there is no active component instance to be associated with.` - ); - } - return ""; -} -function markAsyncBoundary(instance) { - instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; -} - -const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); -function useTemplateRef(key) { - const i = getCurrentInstance(); - const r = reactivity.shallowRef(null); - if (i) { - const refs = i.refs === shared.EMPTY_OBJ ? i.refs = {} : i.refs; - let desc; - if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { - warn$1(`useTemplateRef('${key}') already exists.`); - } else { - Object.defineProperty(refs, key, { - enumerable: true, - get: () => r.value, - set: (val) => r.value = val - }); - } - } else { - warn$1( - `useTemplateRef() is called when there is no active component instance to be associated with.` - ); - } - const ret = reactivity.readonly(r) ; - { - knownTemplateRefs.add(ret); - } - return ret; -} - -function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (shared.isArray(rawRef)) { - rawRef.forEach( - (r, i) => setRef( - r, - oldRawRef && (shared.isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), - parentSuspense, - vnode, - isUnmount - ) - ); - return; - } - if (isAsyncWrapper(vnode) && !isUnmount) { - if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { - setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); - } - return; - } - const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if (!owner) { - warn$1( - `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` - ); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === shared.EMPTY_OBJ ? owner.refs = {} : owner.refs; - const setupState = owner.setupState; - const rawSetupState = reactivity.toRaw(setupState); - const canSetSetupRef = setupState === shared.EMPTY_OBJ ? () => false : (key) => { - { - if (shared.hasOwn(rawSetupState, key) && !reactivity.isRef(rawSetupState[key])) { - warn$1( - `Template ref "${key}" used on a non-ref value. It will not work in the production build.` - ); - } - if (knownTemplateRefs.has(rawSetupState[key])) { - return false; - } - } - return shared.hasOwn(rawSetupState, key); - }; - if (oldRef != null && oldRef !== ref) { - if (shared.isString(oldRef)) { - refs[oldRef] = null; - if (canSetSetupRef(oldRef)) { - setupState[oldRef] = null; - } - } else if (reactivity.isRef(oldRef)) { - oldRef.value = null; - } - } - if (shared.isFunction(ref)) { - callWithErrorHandling(ref, owner, 12, [value, refs]); - } else { - const _isString = shared.isString(ref); - const _isRef = reactivity.isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; - if (isUnmount) { - shared.isArray(existing) && shared.remove(existing, refValue); - } else { - if (!shared.isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (canSetSetupRef(ref)) { - setupState[ref] = refs[ref]; - } - } else { - ref.value = [refValue]; - if (rawRef.k) refs[rawRef.k] = ref.value; - } - } else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } else if (_isString) { - refs[ref] = value; - if (canSetSetupRef(ref)) { - setupState[ref] = value; - } - } else if (_isRef) { - ref.value = value; - if (rawRef.k) refs[rawRef.k] = value; - } else { - warn$1("Invalid template ref type:", ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } else { - doSet(); - } - } else { - warn$1("Invalid template ref type:", ref, `(${typeof ref})`); - } - } -} - -let hasLoggedMismatchError = false; -const logMismatchError = () => { - if (hasLoggedMismatchError) { - return; - } - console.error("Hydration completed but contains mismatches."); - hasLoggedMismatchError = true; -}; -const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; -const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); -const getContainerType = (container) => { - if (container.nodeType !== 1) return void 0; - if (isSVGContainer(container)) return "svg"; - if (isMathMLContainer(container)) return "mathml"; - return void 0; -}; -const isComment = (node) => node.nodeType === 8; -function createHydrationFunctions(rendererInternals) { - const { - mt: mountComponent, - p: patch, - o: { - patchProp, - createText, - nextSibling, - parentNode, - remove, - insert, - createComment - } - } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - warn$1( - `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` - ); - patch(null, vnode, container); - flushPostFlushCbs(); - container._vnode = vnode; - return; - } - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - container._vnode = vnode; - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - optimized = optimized || !!vnode.dynamicChildren; - const isFragmentStart = isComment(node) && node.data === "["; - const onMismatch = () => handleMismatch( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - isFragmentStart - ); - const { type, ref, shapeFlag, patchFlag } = vnode; - let domType = node.nodeType; - vnode.el = node; - { - shared.def(node, "__vnode", vnode, true); - shared.def(node, "__vueParentComponent", parentComponent, true); - } - if (patchFlag === -2) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3) { - if (vnode.children === "") { - insert(vnode.el = createText(""), parentNode(node), node); - nextNode = node; - } else { - nextNode = onMismatch(); - } - } else { - if (node.data !== vnode.children) { - warn$1( - `Hydration text mismatch in`, - node.parentNode, - ` - - rendered on server: ${JSON.stringify( - node.data - )} - - expected on client: ${JSON.stringify(vnode.children)}` - ); - logMismatchError(); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (isTemplateNode(node)) { - nextNode = nextSibling(node); - replaceNode( - vnode.el = node.content.firstChild, - node, - parentComponent - ); - } else if (domType !== 8 || isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = nextSibling(node); - } - break; - case Static: - if (isFragmentStart) { - node = nextSibling(node); - domType = node.nodeType; - } - if (domType === 1 || domType === 3) { - nextNode = node; - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return isFragmentStart ? nextSibling(nextNode) : nextNode; - } else { - onMismatch(); - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = hydrateFragment( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - break; - default: - if (shapeFlag & 1) { - if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { - nextNode = onMismatch(); - } else { - nextNode = hydrateElement( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - } else if (shapeFlag & 6) { - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - if (isFragmentStart) { - nextNode = locateClosingAnchor(node); - } else if (isComment(node) && node.data === "teleport start") { - nextNode = locateClosingAnchor(node, node.data, "teleport end"); - } else { - nextNode = nextSibling(node); - } - mountComponent( - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - optimized - ); - if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; - } else { - subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } else if (shapeFlag & 64) { - if (domType !== 8) { - nextNode = onMismatch(); - } else { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized, - rendererInternals, - hydrateChildren - ); - } - } else if (shapeFlag & 128) { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - getContainerType(parentNode(node)), - slotScopeIds, - optimized, - rendererInternals, - hydrateNode - ); - } else { - warn$1("Invalid HostVNode type:", type, `(${typeof type})`); - } - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; - const forcePatch = type === "input" || type === "option"; - { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - let needCallTransitionHooks = false; - if (isTemplateNode(el)) { - needCallTransitionHooks = needTransition( - null, - // no need check parentSuspense in hydration - transition - ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; - const content = el.content.firstChild; - if (needCallTransitionHooks) { - transition.beforeEnter(content); - } - replaceNode(content, el, parentComponent); - vnode.el = el = content; - } - if (shapeFlag & 16 && // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren( - el.firstChild, - vnode, - el, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - let hasWarned = false; - while (next) { - if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { - if (!hasWarned) { - warn$1( - `Hydration children mismatch on`, - el, - ` -Server rendered element contains more child nodes than client vdom.` - ); - hasWarned = true; - } - logMismatchError(); - } - const cur = next; - next = next.nextSibling; - remove(cur); - } - } else if (shapeFlag & 8) { - let clientText = vnode.children; - if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { - clientText = clientText.slice(1); - } - if (el.textContent !== clientText) { - if (!isMismatchAllowed(el, 0 /* TEXT */)) { - warn$1( - `Hydration text content mismatch on`, - el, - ` - - rendered on server: ${el.textContent} - - expected on client: ${vnode.children}` - ); - logMismatchError(); - } - el.textContent = vnode.children; - } - } - if (props) { - { - const isCustomElement = el.tagName.includes("-"); - for (const key in props) { - if (// #11189 skip if this node has directives that have created hooks - // as it could have mutated the DOM in any possible way - !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { - logMismatchError(); - } - if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers - key[0] === "." || isCustomElement) { - patchProp(el, key, null, props[key], void 0, parentComponent); - } - } - } - } - let vnodeHooks; - if (vnodeHooks = props && props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); - const isText = vnode.type === Text; - if (node) { - if (isText && !optimized) { - if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { - insert( - createText( - node.data.slice(vnode.children.length) - ), - container, - nextSibling(node) - ); - node.data = vnode.children; - } - } - node = hydrateNode( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } else if (isText && !vnode.children) { - insert(vnode.el = createText(""), container); - } else { - if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { - if (!hasWarned) { - warn$1( - `Hydration children mismatch on`, - container, - ` -Server rendered element contains fewer child nodes than client vdom.` - ); - hasWarned = true; - } - logMismatchError(); - } - patch( - null, - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren( - nextSibling(node), - vnode, - container, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - if (next && isComment(next) && next.data === "]") { - return nextSibling(vnode.anchor = next); - } else { - logMismatchError(); - insert(vnode.anchor = createComment(`]`), container, next); - return next; - } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { - if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { - warn$1( - `Hydration node mismatch: -- rendered on server:`, - node, - node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, - ` -- expected on client:`, - vnode.type - ); - logMismatchError(); - } - vnode.el = null; - if (isFragment) { - const end = locateClosingAnchor(node); - while (true) { - const next2 = nextSibling(node); - if (next2 && next2 !== end) { - remove(next2); - } else { - break; - } - } - } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch( - null, - vnode, - container, - next, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - if (parentComponent) { - parentComponent.vnode.el = vnode.el; - updateHOCHostEl(parentComponent, vnode.el); - } - return next; - }; - const locateClosingAnchor = (node, open = "[", close = "]") => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === open) match++; - if (node.data === close) { - if (match === 0) { - return nextSibling(node); - } else { - match--; - } - } - } - } - return node; - }; - const replaceNode = (newNode, oldNode, parentComponent) => { - const parentNode2 = oldNode.parentNode; - if (parentNode2) { - parentNode2.replaceChild(newNode, oldNode); - } - let parent = parentComponent; - while (parent) { - if (parent.vnode.el === oldNode) { - parent.vnode.el = parent.subTree.el = newNode; - } - parent = parent.parent; - } - }; - const isTemplateNode = (node) => { - return node.nodeType === 1 && node.tagName === "TEMPLATE"; - }; - return [hydrate, hydrateNode]; -} -function propHasMismatch(el, key, clientValue, vnode, instance) { - let mismatchType; - let mismatchKey; - let actual; - let expected; - if (key === "class") { - actual = el.getAttribute("class"); - expected = shared.normalizeClass(clientValue); - if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { - mismatchType = 2 /* CLASS */; - mismatchKey = `class`; - } - } else if (key === "style") { - actual = el.getAttribute("style") || ""; - expected = shared.isString(clientValue) ? clientValue : shared.stringifyStyle(shared.normalizeStyle(clientValue)); - const actualMap = toStyleMap(actual); - const expectedMap = toStyleMap(expected); - if (vnode.dirs) { - for (const { dir, value } of vnode.dirs) { - if (dir.name === "show" && !value) { - expectedMap.set("display", "none"); - } - } - } - if (instance) { - resolveCssVars(instance, vnode, expectedMap); - } - if (!isMapEqual(actualMap, expectedMap)) { - mismatchType = 3 /* STYLE */; - mismatchKey = "style"; - } - } else if (el instanceof SVGElement && shared.isKnownSvgAttr(key) || el instanceof HTMLElement && (shared.isBooleanAttr(key) || shared.isKnownHtmlAttr(key))) { - if (shared.isBooleanAttr(key)) { - actual = el.hasAttribute(key); - expected = shared.includeBooleanAttr(clientValue); - } else if (clientValue == null) { - actual = el.hasAttribute(key); - expected = false; - } else { - if (el.hasAttribute(key)) { - actual = el.getAttribute(key); - } else if (key === "value" && el.tagName === "TEXTAREA") { - actual = el.value; - } else { - actual = false; - } - expected = shared.isRenderableAttrValue(clientValue) ? String(clientValue) : false; - } - if (actual !== expected) { - mismatchType = 4 /* ATTRIBUTE */; - mismatchKey = key; - } - } - if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { - const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; - const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; - const postSegment = ` - - rendered on server: ${format(actual)} - - expected on client: ${format(expected)} - Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. - You should fix the source of the mismatch.`; - { - warn$1(preSegment, el, postSegment); - } - return true; - } - return false; -} -function toClassSet(str) { - return new Set(str.trim().split(/\s+/)); -} -function isSetEqual(a, b) { - if (a.size !== b.size) { - return false; - } - for (const s of a) { - if (!b.has(s)) { - return false; - } - } - return true; -} -function toStyleMap(str) { - const styleMap = /* @__PURE__ */ new Map(); - for (const item of str.split(";")) { - let [key, value] = item.split(":"); - key = key.trim(); - value = value && value.trim(); - if (key && value) { - styleMap.set(key, value); - } - } - return styleMap; -} -function isMapEqual(a, b) { - if (a.size !== b.size) { - return false; - } - for (const [key, value] of a) { - if (value !== b.get(key)) { - return false; - } - } - return true; -} -function resolveCssVars(instance, vnode, expectedMap) { - const root = instance.subTree; - if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { - const cssVars = instance.getCssVars(); - for (const key in cssVars) { - expectedMap.set( - `--${shared.getEscapedCssVarName(key, false)}`, - String(cssVars[key]) - ); - } - } - if (vnode === root && instance.parent) { - resolveCssVars(instance.parent, instance.vnode, expectedMap); - } -} -const allowMismatchAttr = "data-allow-mismatch"; -const MismatchTypeString = { - [0 /* TEXT */]: "text", - [1 /* CHILDREN */]: "children", - [2 /* CLASS */]: "class", - [3 /* STYLE */]: "style", - [4 /* ATTRIBUTE */]: "attribute" -}; -function isMismatchAllowed(el, allowedType) { - if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { - while (el && !el.hasAttribute(allowMismatchAttr)) { - el = el.parentElement; - } - } - const allowedAttr = el && el.getAttribute(allowMismatchAttr); - if (allowedAttr == null) { - return false; - } else if (allowedAttr === "") { - return true; - } else { - const list = allowedAttr.split(","); - if (allowedType === 0 /* TEXT */ && list.includes("children")) { - return true; - } - return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); - } -} - -const requestIdleCallback = shared.getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); -const cancelIdleCallback = shared.getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); -const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { - const id = requestIdleCallback(hydrate, { timeout }); - return () => cancelIdleCallback(id); -}; -function elementIsVisibleInViewport(el) { - const { top, left, bottom, right } = el.getBoundingClientRect(); - const { innerHeight, innerWidth } = window; - return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); -} -const hydrateOnVisible = (opts) => (hydrate, forEach) => { - const ob = new IntersectionObserver((entries) => { - for (const e of entries) { - if (!e.isIntersecting) continue; - ob.disconnect(); - hydrate(); - break; - } - }, opts); - forEach((el) => { - if (!(el instanceof Element)) return; - if (elementIsVisibleInViewport(el)) { - hydrate(); - ob.disconnect(); - return false; - } - ob.observe(el); - }); - return () => ob.disconnect(); -}; -const hydrateOnMediaQuery = (query) => (hydrate) => { - if (query) { - const mql = matchMedia(query); - if (mql.matches) { - hydrate(); - } else { - mql.addEventListener("change", hydrate, { once: true }); - return () => mql.removeEventListener("change", hydrate); - } - } -}; -const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { - if (shared.isString(interactions)) interactions = [interactions]; - let hasHydrated = false; - const doHydrate = (e) => { - if (!hasHydrated) { - hasHydrated = true; - teardown(); - hydrate(); - e.target.dispatchEvent(new e.constructor(e.type, e)); - } - }; - const teardown = () => { - forEach((el) => { - for (const i of interactions) { - el.removeEventListener(i, doHydrate); - } - }); - }; - forEach((el) => { - for (const i of interactions) { - el.addEventListener(i, doHydrate, { once: true }); - } - }); - return teardown; -}; -function forEachElement(node, cb) { - if (isComment(node) && node.data === "[") { - let depth = 1; - let next = node.nextSibling; - while (next) { - if (next.nodeType === 1) { - const result = cb(next); - if (result === false) { - break; - } - } else if (isComment(next)) { - if (next.data === "]") { - if (--depth === 0) break; - } else if (next.data === "[") { - depth++; - } - } - next = next.nextSibling; - } - } else { - cb(node); - } -} - -const isAsyncWrapper = (i) => !!i.type.__asyncLoader; -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineAsyncComponent(source) { - if (shared.isFunction(source)) { - source = { loader: source }; - } - const { - loader, - loadingComponent, - errorComponent, - delay = 200, - hydrate: hydrateStrategy, - timeout, - // undefined = never times out - suspensible = true, - onError: userOnError - } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; - pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } else { - throw err; - } - }).then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!comp) { - warn$1( - `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` - ); - } - if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { - comp = comp.default; - } - if (comp && !shared.isObject(comp) && !shared.isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - })); - }; - return defineComponent({ - name: "AsyncComponentWrapper", - __asyncLoader: load, - __asyncHydrate(el, instance, hydrate) { - const doHydrate = hydrateStrategy ? () => { - const teardown = hydrateStrategy( - hydrate, - (cb) => forEachElement(el, cb) - ); - if (teardown) { - (instance.bum || (instance.bum = [])).push(teardown); - } - } : hydrate; - if (resolvedComp) { - doHydrate(); - } else { - load().then(() => !instance.isUnmounted && doHydrate()); - } - }, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - markAsyncBoundary(instance); - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError( - err, - instance, - 13, - !errorComponent - ); - }; - if (suspensible && instance.suspense || isInSSRComponentSetup) { - return load().then((comp) => { - return () => createInnerComp(comp, instance); - }).catch((err) => { - onError(err); - return () => errorComponent ? createVNode(errorComponent, { - error: err - }) : null; - }); - } - const loaded = reactivity.ref(false); - const error = reactivity.ref(); - const delayed = reactivity.ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error( - `Async component timed out after ${timeout}ms.` - ); - onError(err); - error.value = err; - } - }, timeout); - } - load().then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - instance.parent.update(); - } - }).catch((err) => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; - } - }); -} -function createInnerComp(comp, parent) { - const { ref: ref2, props, children, ce } = parent.vnode; - const vnode = createVNode(comp, props, children); - vnode.ref = ref2; - vnode.ce = ce; - delete parent.vnode.ce; - return vnode; -} - -const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; -const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const sharedContext = instance.ctx; - if (!sharedContext.renderer) { - return () => { - const children = slots.default && slots.default(); - return children && children.length === 1 ? children[0] : children; - }; - } - const cache = /* @__PURE__ */ new Map(); - const keys = /* @__PURE__ */ new Set(); - let current = null; - { - instance.__v_cache = cache; - } - const parentSuspense = instance.suspense; - const { - renderer: { - p: patch, - m: move, - um: _unmount, - o: { createElement } - } - } = sharedContext; - const storageContainer = createElement("div"); - sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { - const instance2 = vnode.component; - move(vnode, container, anchor, 0, parentSuspense); - patch( - instance2.vnode, - vnode, - container, - anchor, - instance2, - parentSuspense, - namespace, - vnode.slotScopeIds, - optimized - ); - queuePostRenderEffect(() => { - instance2.isDeactivated = false; - if (instance2.a) { - shared.invokeArrayFns(instance2.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - }, parentSuspense); - { - devtoolsComponentAdded(instance2); - } - }; - sharedContext.deactivate = (vnode) => { - const instance2 = vnode.component; - invalidateMount(instance2.m); - invalidateMount(instance2.a); - move(vnode, storageContainer, null, 1, parentSuspense); - queuePostRenderEffect(() => { - if (instance2.da) { - shared.invokeArrayFns(instance2.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - instance2.isDeactivated = true; - }, parentSuspense); - { - devtoolsComponentAdded(instance2); - } - }; - function unmount(vnode) { - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && !filter(name)) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (cached && (!current || !isSameVNodeType(cached, current))) { - unmount(cached); - } else if (current) { - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - watch( - () => [props.include, props.exclude], - ([include, exclude]) => { - include && pruneCache((name) => matches(include, name)); - exclude && pruneCache((name) => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: "post", deep: true } - ); - let pendingCacheKey = null; - const cacheSubtree = () => { - if (pendingCacheKey != null) { - if (isSuspense(instance.subTree.type)) { - queuePostRenderEffect(() => { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - }, instance.subTree.suspense); - } else { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach((cached) => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type && cached.key === vnode.key) { - resetShapeFlag(vnode); - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return current = null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - { - warn$1(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - if (vnode.type === Comment) { - current = null; - return vnode; - } - const comp = vnode.type; - const name = getComponentName( - isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp - ); - const { include, exclude, max } = props; - if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { - vnode.shapeFlag &= ~256; - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128) { - rawVNode.ssContent = vnode; - } - } - pendingCacheKey = key; - if (cachedVNode) { - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - setTransitionHooks(vnode, vnode.transition); - } - vnode.shapeFlag |= 512; - keys.delete(key); - keys.add(key); - } else { - keys.add(key); - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - vnode.shapeFlag |= 256; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; - } -}; -const KeepAlive = KeepAliveImpl; -function matches(pattern, name) { - if (shared.isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } else if (shared.isString(pattern)) { - return pattern.split(",").includes(name); - } else if (shared.isRegExp(pattern)) { - pattern.lastIndex = 0; - return pattern.test(name); - } - return false; -} -function onActivated(hook, target) { - registerKeepAliveHook(hook, "a", target); -} -function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da", target); -} -function registerKeepAliveHook(hook, type, target = currentInstance) { - const wrappedHook = hook.__wdc || (hook.__wdc = () => { - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } - } -} -function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - const injected = injectHook( - type, - hook, - keepAliveRoot, - true - /* prepend */ - ); - onUnmounted(() => { - shared.remove(keepAliveRoot[type], injected); - }, target); -} -function resetShapeFlag(vnode) { - vnode.shapeFlag &= ~256; - vnode.shapeFlag &= ~512; -} -function getInnerChild(vnode) { - return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; -} - -function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - const wrappedHook = hook.__weh || (hook.__weh = (...args) => { - reactivity.pauseTracking(); - const reset = setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - reset(); - reactivity.resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } else { - hooks.push(wrappedHook); - } - return wrappedHook; - } else { - const apiName = shared.toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); - warn$1( - `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) - ); - } -} -const createHook = (lifecycle) => (hook, target = currentInstance) => { - if (!isInSSRComponentSetup || lifecycle === "sp") { - injectHook(lifecycle, (...args) => hook(...args), target); - } -}; -const onBeforeMount = createHook("bm"); -const onMounted = createHook("m"); -const onBeforeUpdate = createHook( - "bu" -); -const onUpdated = createHook("u"); -const onBeforeUnmount = createHook( - "bum" -); -const onUnmounted = createHook("um"); -const onServerPrefetch = createHook( - "sp" -); -const onRenderTriggered = createHook("rtg"); -const onRenderTracked = createHook("rtc"); -function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec", hook, target); -} - -const COMPONENTS = "components"; -const DIRECTIVES = "directives"; -function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; -} -const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); -function resolveDynamicComponent(component) { - if (shared.isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } else { - return component || NULL_DYNAMIC_COMPONENT; - } -} -function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); -} -function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - if (type === COMPONENTS) { - const selfName = getComponentName( - Component, - false - ); - if (selfName && (selfName === name || selfName === shared.camelize(name) || selfName === shared.capitalize(shared.camelize(name)))) { - return Component; - } - } - const res = ( - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || // global registration - resolve(instance.appContext[type], name) - ); - if (!res && maybeSelfReference) { - return Component; - } - if (warnMissing && !res) { - const extra = type === COMPONENTS ? ` -If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; - warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } else { - warn$1( - `resolve${shared.capitalize(type.slice(0, -1))} can only be used in render() or setup().` - ); - } -} -function resolve(registry, name) { - return registry && (registry[name] || registry[shared.camelize(name)] || registry[shared.capitalize(shared.camelize(name))]); -} - -function renderList(source, renderItem, cache, index) { - let ret; - const cached = cache && cache[index]; - const sourceIsArray = shared.isArray(source); - if (sourceIsArray || shared.isString(source)) { - const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source); - let needsWrap = false; - if (sourceIsReactiveArray) { - needsWrap = !reactivity.isShallow(source); - source = reactivity.shallowReadArray(source); - } - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem( - needsWrap ? reactivity.toReactive(source[i]) : source[i], - i, - void 0, - cached && cached[i] - ); - } - } else if (typeof source === "number") { - if (!Number.isInteger(source)) { - warn$1(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); - } - } else if (shared.isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from( - source, - (item, i) => renderItem(item, i, void 0, cached && cached[i]) - ); - } else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } - } else { - ret = []; - } - if (cache) { - cache[index] = ret; - } - return ret; -} - -function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - if (shared.isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } else if (slot) { - slots[slot.name] = slot.key ? (...args) => { - const res = slot.fn(...args); - if (res) res.key = slot.key; - return res; - } : slot.fn; - } - } - return slots; -} - -function renderSlot(slots, name, props = {}, fallback, noSlotted) { - if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { - if (name !== "default") props.name = name; - return openBlock(), createBlock( - Fragment, - null, - [createVNode("slot", props, fallback && fallback())], - 64 - ); - } - let slot = slots[name]; - if (slot && slot.length > 1) { - warn$1( - `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` - ); - slot = () => []; - } - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch - // key attached in the `createSlots` helper, respect that - validSlotContent && validSlotContent.key; - const rendered = createBlock( - Fragment, - { - key: (slotKey && !shared.isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content - (!validSlotContent && fallback ? "_fb" : "") - }, - validSlotContent || (fallback ? fallback() : []), - validSlotContent && slots._ === 1 ? 64 : -2 - ); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + "-s"]; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; -} -function ensureValidVNode(vnodes) { - return vnodes.some((child) => { - if (!isVNode(child)) return true; - if (child.type === Comment) return false; - if (child.type === Fragment && !ensureValidVNode(child.children)) - return false; - return true; - }) ? vnodes : null; -} - -function toHandlers(obj, preserveCaseIfNecessary) { - const ret = {}; - if (!shared.isObject(obj)) { - warn$1(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : shared.toHandlerKey(key)] = obj[key]; - } - return ret; -} - -const getPublicInstance = (i) => { - if (!i) return null; - if (isStatefulComponent(i)) return getComponentPublicInstance(i); - return getPublicInstance(i.parent); -}; -const publicPropertiesMap = ( - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - /* @__PURE__ */ shared.extend(/* @__PURE__ */ Object.create(null), { - $: (i) => i, - $el: (i) => i.vnode.el, - $data: (i) => i.data, - $props: (i) => reactivity.shallowReadonly(i.props) , - $attrs: (i) => reactivity.shallowReadonly(i.attrs) , - $slots: (i) => reactivity.shallowReadonly(i.slots) , - $refs: (i) => reactivity.shallowReadonly(i.refs) , - $parent: (i) => getPublicInstance(i.parent), - $root: (i) => getPublicInstance(i.root), - $host: (i) => i.ce, - $emit: (i) => i.emit, - $options: (i) => resolveMergedOptions(i) , - $forceUpdate: (i) => i.f || (i.f = () => { - queueJob(i.update); - }), - $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: (i) => instanceWatch.bind(i) - }) -); -const isReservedPrefix = (key) => key === "_" || key === "$"; -const hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key); -const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - if (key === "__v_skip") { - return true; - } - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - if (key === "__isVue") { - return true; - } - let normalizedProps; - if (key[0] !== "$") { - const n = accessCache[key]; - if (n !== void 0) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - } - } else if (hasSetupBinding(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && shared.hasOwn(normalizedProps, key) - ) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } else if (shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - if (publicGetter) { - if (key === "$attrs") { - reactivity.track(instance.attrs, "get", ""); - markAttrsAccessed(); - } else if (key === "$slots") { - reactivity.track(instance, "get", key); - } - return publicGetter(instance); - } else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && (cssModule = cssModule[key]) - ) { - return cssModule; - } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } else if ( - // global properties - globalProperties = appContext.config.globalProperties, shared.hasOwn(globalProperties, key) - ) { - { - return globalProperties[key]; - } - } else if (currentRenderingInstance && (!shared.isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf("__v") !== 0)) { - if (data !== shared.EMPTY_OBJ && isReservedPrefix(key[0]) && shared.hasOwn(data, key)) { - warn$1( - `Property ${JSON.stringify( - key - )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` - ); - } else if (instance === currentRenderingInstance) { - warn$1( - `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` - ); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (hasSetupBinding(setupState, key)) { - setupState[key] = value; - return true; - } else if (setupState.__isScriptSetup && shared.hasOwn(setupState, key)) { - warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); - return false; - } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { - data[key] = value; - return true; - } else if (shared.hasOwn(instance.props, key)) { - warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); - return false; - } - if (key[0] === "$" && key.slice(1) in instance) { - warn$1( - `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` - ); - return false; - } else { - if (key in instance.appContext.config.globalProperties) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - value - }); - } else { - ctx[key] = value; - } - } - return true; - }, - has({ - _: { data, setupState, accessCache, ctx, appContext, propsOptions } - }, key) { - let normalizedProps; - return !!accessCache[key] || data !== shared.EMPTY_OBJ && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key) || shared.hasOwn(ctx, key) || shared.hasOwn(publicPropertiesMap, key) || shared.hasOwn(appContext.config.globalProperties, key); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - target._.accessCache[key] = 0; - } else if (shared.hasOwn(descriptor, "value")) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); - } -}; -{ - PublicInstanceProxyHandlers.ownKeys = (target) => { - warn$1( - `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` - ); - return Reflect.ownKeys(target); - }; -} -const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ shared.extend({}, PublicInstanceProxyHandlers, { - get(target, key) { - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); - }, - has(_, key) { - const has = key[0] !== "_" && !shared.isGloballyAllowed(key); - if (!has && PublicInstanceProxyHandlers.has(_, key)) { - warn$1( - `Property ${JSON.stringify( - key - )} should not start with _ which is a reserved prefix for Vue internals.` - ); - } - return has; - } -}); -function createDevRenderContext(instance) { - const target = {}; - Object.defineProperty(target, `_`, { - configurable: true, - enumerable: false, - get: () => instance - }); - Object.keys(publicPropertiesMap).forEach((key) => { - Object.defineProperty(target, key, { - configurable: true, - enumerable: false, - get: () => publicPropertiesMap[key](instance), - // intercepted by the proxy so no need for implementation, - // but needed to prevent set errors - set: shared.NOOP - }); - }); - return target; -} -function exposePropsOnRenderContext(instance) { - const { - ctx, - propsOptions: [propsOptions] - } = instance; - if (propsOptions) { - Object.keys(propsOptions).forEach((key) => { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => instance.props[key], - set: shared.NOOP - }); - }); - } -} -function exposeSetupStateOnRenderContext(instance) { - const { ctx, setupState } = instance; - Object.keys(reactivity.toRaw(setupState)).forEach((key) => { - if (!setupState.__isScriptSetup) { - if (isReservedPrefix(key[0])) { - warn$1( - `setup() return property ${JSON.stringify( - key - )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` - ); - return; - } - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => setupState[key], - set: shared.NOOP - }); - } - }); -} - -const warnRuntimeUsage = (method) => warn$1( - `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` -); -function defineProps() { - { - warnRuntimeUsage(`defineProps`); - } - return null; -} -function defineEmits() { - { - warnRuntimeUsage(`defineEmits`); - } - return null; -} -function defineExpose(exposed) { - { - warnRuntimeUsage(`defineExpose`); - } -} -function defineOptions(options) { - { - warnRuntimeUsage(`defineOptions`); - } -} -function defineSlots() { - { - warnRuntimeUsage(`defineSlots`); - } - return null; -} -function defineModel() { - { - warnRuntimeUsage("defineModel"); - } -} -function withDefaults(props, defaults) { - { - warnRuntimeUsage(`withDefaults`); - } - return null; -} -function useSlots() { - return getContext().slots; -} -function useAttrs() { - return getContext().attrs; -} -function getContext() { - const i = getCurrentInstance(); - if (!i) { - warn$1(`useContext() called without active instance.`); - } - return i.setupContext || (i.setupContext = createSetupContext(i)); -} -function normalizePropsOrEmits(props) { - return shared.isArray(props) ? props.reduce( - (normalized, p) => (normalized[p] = null, normalized), - {} - ) : props; -} -function mergeDefaults(raw, defaults) { - const props = normalizePropsOrEmits(raw); - for (const key in defaults) { - if (key.startsWith("__skip")) continue; - let opt = props[key]; - if (opt) { - if (shared.isArray(opt) || shared.isFunction(opt)) { - opt = props[key] = { type: opt, default: defaults[key] }; - } else { - opt.default = defaults[key]; - } - } else if (opt === null) { - opt = props[key] = { default: defaults[key] }; - } else { - warn$1(`props default key "${key}" has no corresponding declaration.`); - } - if (opt && defaults[`__skip_${key}`]) { - opt.skipFactory = true; - } - } - return props; -} -function mergeModels(a, b) { - if (!a || !b) return a || b; - if (shared.isArray(a) && shared.isArray(b)) return a.concat(b); - return shared.extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); -} -function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; -} -function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - if (!ctx) { - warn$1( - `withAsyncContext called without active current instance. This is likely a bug.` - ); - } - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (shared.isPromise(awaitable)) { - awaitable = awaitable.catch((e) => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; -} - -function createDuplicateChecker() { - const cache = /* @__PURE__ */ Object.create(null); - return (type, key) => { - if (cache[key]) { - warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); - } else { - cache[key] = type; - } - }; -} -let shouldCacheAccess = true; -function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - shouldCacheAccess = false; - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc"); - } - const { - // state - data: dataOptions, - computed: computedOptions, - methods, - watch: watchOptions, - provide: provideOptions, - inject: injectOptions, - // lifecycle - created, - beforeMount, - mounted, - beforeUpdate, - updated, - activated, - deactivated, - beforeDestroy, - beforeUnmount, - destroyed, - unmounted, - render, - renderTracked, - renderTriggered, - errorCaptured, - serverPrefetch, - // public API - expose, - inheritAttrs, - // assets - components, - directives, - filters - } = options; - const checkDuplicateProperties = createDuplicateChecker() ; - { - const [propsOptions] = instance.propsOptions; - if (propsOptions) { - for (const key in propsOptions) { - checkDuplicateProperties("Props" /* PROPS */, key); - } - } - } - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (shared.isFunction(methodHandler)) { - { - Object.defineProperty(ctx, key, { - value: methodHandler.bind(publicThis), - configurable: true, - enumerable: true, - writable: true - }); - } - { - checkDuplicateProperties("Methods" /* METHODS */, key); - } - } else { - warn$1( - `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` - ); - } - } - } - if (dataOptions) { - if (!shared.isFunction(dataOptions)) { - warn$1( - `The data option must be a function. Plain object usage is no longer supported.` - ); - } - const data = dataOptions.call(publicThis, publicThis); - if (shared.isPromise(data)) { - warn$1( - `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` - ); - } - if (!shared.isObject(data)) { - warn$1(`data() should return an object.`); - } else { - instance.data = reactivity.reactive(data); - { - for (const key in data) { - checkDuplicateProperties("Data" /* DATA */, key); - if (!isReservedPrefix(key[0])) { - Object.defineProperty(ctx, key, { - configurable: true, - enumerable: true, - get: () => data[key], - set: shared.NOOP - }); - } - } - } - } - } - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = shared.isFunction(opt) ? opt.bind(publicThis, publicThis) : shared.isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : shared.NOOP; - if (get === shared.NOOP) { - warn$1(`Computed property "${key}" has no getter.`); - } - const set = !shared.isFunction(opt) && shared.isFunction(opt.set) ? opt.set.bind(publicThis) : () => { - warn$1( - `Write operation failed: computed property "${key}" is readonly.` - ); - } ; - const c = computed({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: (v) => c.value = v - }); - { - checkDuplicateProperties("Computed" /* COMPUTED */, key); - } - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = shared.isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; - Reflect.ownKeys(provides).forEach((key) => { - provide(key, provides[key]); - }); - } - if (created) { - callHook(created, instance, "c"); - } - function registerLifecycleHook(register, hook) { - if (shared.isArray(hook)) { - hook.forEach((_hook) => register(_hook.bind(publicThis))); - } else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (shared.isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach((key) => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: (val) => publicThis[key] = val - }); - }); - } else if (!instance.exposed) { - instance.exposed = {}; - } - } - if (render && instance.render === shared.NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - if (components) instance.components = components; - if (directives) instance.directives = directives; - if (serverPrefetch) { - markAsyncBoundary(instance); - } -} -function resolveInjections(injectOptions, ctx, checkDuplicateProperties = shared.NOOP) { - if (shared.isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (shared.isObject(opt)) { - if ("default" in opt) { - injected = inject( - opt.from || key, - opt.default, - true - ); - } else { - injected = inject(opt.from || key); - } - } else { - injected = inject(opt); - } - if (reactivity.isRef(injected)) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: (v) => injected.value = v - }); - } else { - ctx[key] = injected; - } - { - checkDuplicateProperties("Inject" /* INJECT */, key); - } - } -} -function callHook(hook, instance, type) { - callWithAsyncErrorHandling( - shared.isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), - instance, - type - ); -} -function createWatcher(raw, ctx, publicThis, key) { - let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; - if (shared.isString(raw)) { - const handler = ctx[raw]; - if (shared.isFunction(handler)) { - { - watch(getter, handler); - } - } else { - warn$1(`Invalid watch handler specified by key "${raw}"`, handler); - } - } else if (shared.isFunction(raw)) { - { - watch(getter, raw.bind(publicThis)); - } - } else if (shared.isObject(raw)) { - if (shared.isArray(raw)) { - raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); - } else { - const handler = shared.isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; - if (shared.isFunction(handler)) { - watch(getter, handler, raw); - } else { - warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); - } - } - } else { - warn$1(`Invalid watch option: "${key}"`, raw); - } -} -function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { - mixins: globalMixins, - optionsCache: cache, - config: { optionMergeStrategies } - } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; - } else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach( - (m) => mergeOptions(resolved, m, optionMergeStrategies, true) - ); - } - mergeOptions(resolved, base, optionMergeStrategies); - } - if (shared.isObject(base)) { - cache.set(base, resolved); - } - return resolved; -} -function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); - } - if (mixins) { - mixins.forEach( - (m) => mergeOptions(to, m, strats, true) - ); - } - for (const key in from) { - if (asMixin && key === "expose") { - warn$1( - `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` - ); - } else { - const strat = internalOptionMergeStrats[key] || strats && strats[key]; - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; -} -const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeEmitsOrPropsOptions, - emits: mergeEmitsOrPropsOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject -}; -function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (shared.extend)( - shared.isFunction(to) ? to.call(this, this) : to, - shared.isFunction(from) ? from.call(this, this) : from - ); - }; -} -function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); -} -function normalizeInject(raw) { - if (shared.isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; - } - return raw; -} -function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; -} -function mergeObjectOptions(to, from) { - return to ? shared.extend(/* @__PURE__ */ Object.create(null), to, from) : from; -} -function mergeEmitsOrPropsOptions(to, from) { - if (to) { - if (shared.isArray(to) && shared.isArray(from)) { - return [.../* @__PURE__ */ new Set([...to, ...from])]; - } - return shared.extend( - /* @__PURE__ */ Object.create(null), - normalizePropsOrEmits(to), - normalizePropsOrEmits(from != null ? from : {}) - ); - } else { - return from; - } -} -function mergeWatchOptions(to, from) { - if (!to) return from; - if (!from) return to; - const merged = shared.extend(/* @__PURE__ */ Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; -} - -function createAppContext() { - return { - app: null, - config: { - isNativeTag: shared.NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: void 0, - warnHandler: void 0, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: /* @__PURE__ */ Object.create(null), - optionsCache: /* @__PURE__ */ new WeakMap(), - propsCache: /* @__PURE__ */ new WeakMap(), - emitsCache: /* @__PURE__ */ new WeakMap() - }; -} -let uid$1 = 0; -function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!shared.isFunction(rootComponent)) { - rootComponent = shared.extend({}, rootComponent); - } - if (rootProps != null && !shared.isObject(rootProps)) { - warn$1(`root props passed to app.mount() must be an object.`); - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = /* @__PURE__ */ new WeakSet(); - const pluginCleanupFns = []; - let isMounted = false; - const app = context.app = { - _uid: uid$1++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - { - warn$1( - `app.config cannot be replaced. Modify individual options instead.` - ); - } - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) { - warn$1(`Plugin has already been applied to target app.`); - } else if (plugin && shared.isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } else if (shared.isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } else { - warn$1( - `A plugin must either be a function or an object with an "install" function.` - ); - } - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } else { - warn$1( - "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") - ); - } - } - return app; - }, - component(name, component) { - { - validateComponentName(name, context.config); - } - if (!component) { - return context.components[name]; - } - if (context.components[name]) { - warn$1(`Component "${name}" has already been registered in target app.`); - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - { - validateDirectiveName(name); - } - if (!directive) { - return context.directives[name]; - } - if (context.directives[name]) { - warn$1(`Directive "${name}" has already been registered in target app.`); - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, namespace) { - if (!isMounted) { - if (rootContainer.__vue_app__) { - warn$1( - `There is already an app instance mounted on the host container. - If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` - ); - } - const vnode = app._ceVNode || createVNode(rootComponent, rootProps); - vnode.appContext = context; - if (namespace === true) { - namespace = "svg"; - } else if (namespace === false) { - namespace = void 0; - } - { - context.reload = () => { - render( - cloneVNode(vnode), - rootContainer, - namespace - ); - }; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } else { - render(vnode, rootContainer, namespace); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - { - app._instance = vnode.component; - devtoolsInitApp(app, version); - } - return getComponentPublicInstance(vnode.component); - } else { - warn$1( - `App has already been mounted. -If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` - ); - } - }, - onUnmount(cleanupFn) { - if (typeof cleanupFn !== "function") { - warn$1( - `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` - ); - } - pluginCleanupFns.push(cleanupFn); - }, - unmount() { - if (isMounted) { - callWithAsyncErrorHandling( - pluginCleanupFns, - app._instance, - 16 - ); - render(null, app._container); - { - app._instance = null; - devtoolsUnmountApp(app); - } - delete app._container.__vue_app__; - } else { - warn$1(`Cannot unmount an app that is not mounted.`); - } - }, - provide(key, value) { - if (key in context.provides) { - warn$1( - `App already provides property with key "${String(key)}". It will be overwritten with the new value.` - ); - } - context.provides[key] = value; - return app; - }, - runWithContext(fn) { - const lastApp = currentApp; - currentApp = app; - try { - return fn(); - } finally { - currentApp = lastApp; - } - } - }; - return app; - }; -} -let currentApp = null; - -function provide(key, value) { - if (!currentInstance) { - { - warn$1(`provide() can only be used inside setup().`); - } - } else { - let provides = currentInstance.provides; - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - provides[key] = value; - } -} -function inject(key, defaultValue, treatDefaultAsFactory = false) { - const instance = currentInstance || currentRenderingInstance; - if (instance || currentApp) { - const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; - if (provides && key in provides) { - return provides[key]; - } else if (arguments.length > 1) { - return treatDefaultAsFactory && shared.isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; - } else { - warn$1(`injection "${String(key)}" not found.`); - } - } else { - warn$1(`inject() can only be used inside setup() or functional components.`); - } -} -function hasInjectionContext() { - return !!(currentInstance || currentRenderingInstance || currentApp); -} - -const internalObjectProto = {}; -const createInternalObject = () => Object.create(internalObjectProto); -const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; - -function initProps(instance, rawProps, isStateful, isSSR = false) { - const props = {}; - const attrs = createInternalObject(); - instance.propsDefaults = /* @__PURE__ */ Object.create(null); - setFullProps(instance, rawProps, props, attrs); - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = void 0; - } - } - { - validateProps(rawProps || {}, props, instance); - } - if (isStateful) { - instance.props = isSSR ? props : reactivity.shallowReactive(props); - } else { - if (!instance.type.props) { - instance.props = attrs; - } else { - instance.props = props; - } - } - instance.attrs = attrs; -} -function isInHmrContext(instance) { - while (instance) { - if (instance.type.__hmrId) return true; - instance = instance.parent; - } -} -function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { - props, - attrs, - vnode: { patchFlag } - } = instance; - const rawCurrentProps = reactivity.toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( - // always force full diff in dev - // - #1942 if hmr is enabled with sfc component - // - vite#872 non-sfc component used by sfc component - !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) - ) { - if (patchFlag & 8) { - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - const value = rawProps[key]; - if (options) { - if (shared.hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } else { - const camelizedKey = shared.camelize(key); - props[camelizedKey] = resolvePropValue( - options, - rawCurrentProps, - camelizedKey, - value, - instance, - false - ); - } - } else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - } else { - if (setFullProps(instance, rawProps, props, attrs)) { - hasAttrsChanged = true; - } - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || // for camelCase - !shared.hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = shared.hyphenate(key)) === key || !shared.hasOwn(rawProps, kebabKey))) { - if (options) { - if (rawPrevProps && // for camelCase - (rawPrevProps[key] !== void 0 || // for kebab-case - rawPrevProps[kebabKey] !== void 0)) { - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - void 0, - instance, - true - ); - } - } else { - delete props[key]; - } - } - } - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || !shared.hasOwn(rawProps, key) && true) { - delete attrs[key]; - hasAttrsChanged = true; - } - } - } - } - if (hasAttrsChanged) { - reactivity.trigger(instance.attrs, "set", ""); - } - { - validateProps(rawProps || {}, props, instance); - } -} -function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - if (shared.isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - let camelKey; - if (options && shared.hasOwn(options, camelKey = shared.camelize(key))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - if (needCastKeys) { - const rawCurrentProps = reactivity.toRaw(props); - const castValues = rawCastValues || shared.EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - castValues[key], - instance, - !shared.hasOwn(castValues, key) - ); - } - } - return hasAttrsChanged; -} -function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = shared.hasOwn(opt, "default"); - if (hasDefault && value === void 0) { - const defaultValue = opt.default; - if (opt.type !== Function && !opt.skipFactory && shared.isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } else { - const reset = setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call( - null, - props - ); - reset(); - } - } else { - value = defaultValue; - } - if (instance.ce) { - instance.ce._setProp(key, value); - } - } - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === shared.hyphenate(key))) { - value = true; - } - } - } - return value; -} -const mixinPropsCache = /* @__PURE__ */ new WeakMap(); -function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = asMixin ? mixinPropsCache : appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; - } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - let hasExtends = false; - if (!shared.isFunction(comp)) { - const extendProps = (raw2) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw2, appContext, true); - shared.extend(normalized, props); - if (keys) needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } - } - if (!raw && !hasExtends) { - if (shared.isObject(comp)) { - cache.set(comp, shared.EMPTY_ARR); - } - return shared.EMPTY_ARR; - } - if (shared.isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - if (!shared.isString(raw[i])) { - warn$1(`props must be strings when using array syntax.`, raw[i]); - } - const normalizedKey = shared.camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = shared.EMPTY_OBJ; - } - } - } else if (raw) { - if (!shared.isObject(raw)) { - warn$1(`invalid props options`, raw); - } - for (const key in raw) { - const normalizedKey = shared.camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt); - const propType = prop.type; - let shouldCast = false; - let shouldCastTrue = true; - if (shared.isArray(propType)) { - for (let index = 0; index < propType.length; ++index) { - const type = propType[index]; - const typeName = shared.isFunction(type) && type.name; - if (typeName === "Boolean") { - shouldCast = true; - break; - } else if (typeName === "String") { - shouldCastTrue = false; - } - } - } else { - shouldCast = shared.isFunction(propType) && propType.name === "Boolean"; - } - prop[0 /* shouldCast */] = shouldCast; - prop[1 /* shouldCastTrue */] = shouldCastTrue; - if (shouldCast || shared.hasOwn(prop, "default")) { - needCastKeys.push(normalizedKey); - } - } - } - } - const res = [normalized, needCastKeys]; - if (shared.isObject(comp)) { - cache.set(comp, res); - } - return res; -} -function validatePropName(key) { - if (key[0] !== "$" && !shared.isReservedProp(key)) { - return true; - } else { - warn$1(`Invalid prop name: "${key}" is a reserved property.`); - } - return false; -} -function getType(ctor) { - if (ctor === null) { - return "null"; - } - if (typeof ctor === "function") { - return ctor.name || ""; - } else if (typeof ctor === "object") { - const name = ctor.constructor && ctor.constructor.name; - return name || ""; - } - return ""; -} -function validateProps(rawProps, props, instance) { - const resolvedValues = reactivity.toRaw(props); - const options = instance.propsOptions[0]; - const camelizePropsKey = Object.keys(rawProps).map((key) => shared.camelize(key)); - for (const key in options) { - let opt = options[key]; - if (opt == null) continue; - validateProp( - key, - resolvedValues[key], - opt, - reactivity.shallowReadonly(resolvedValues) , - !camelizePropsKey.includes(key) - ); - } -} -function validateProp(name, value, prop, props, isAbsent) { - const { type, required, validator, skipCheck } = prop; - if (required && isAbsent) { - warn$1('Missing required prop: "' + name + '"'); - return; - } - if (value == null && !required) { - return; - } - if (type != null && type !== true && !skipCheck) { - let isValid = false; - const types = shared.isArray(type) ? type : [type]; - const expectedTypes = []; - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); - expectedTypes.push(expectedType || ""); - isValid = valid; - } - if (!isValid) { - warn$1(getInvalidTypeMessage(name, value, expectedTypes)); - return; - } - } - if (validator && !validator(value, props)) { - warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); - } -} -const isSimpleType = /* @__PURE__ */ shared.makeMap( - "String,Number,Boolean,Function,Symbol,BigInt" -); -function assertType(value, type) { - let valid; - const expectedType = getType(type); - if (expectedType === "null") { - valid = value === null; - } else if (isSimpleType(expectedType)) { - const t = typeof value; - valid = t === expectedType.toLowerCase(); - if (!valid && t === "object") { - valid = value instanceof type; - } - } else if (expectedType === "Object") { - valid = shared.isObject(value); - } else if (expectedType === "Array") { - valid = shared.isArray(value); - } else { - valid = value instanceof type; - } - return { - valid, - expectedType - }; -} -function getInvalidTypeMessage(name, value, expectedTypes) { - if (expectedTypes.length === 0) { - return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; - } - let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(shared.capitalize).join(" | ")}`; - const expectedType = expectedTypes[0]; - const receivedType = shared.toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); - if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; - } - message += `, got ${receivedType} `; - if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; - } - return message; -} -function styleValue(value, type) { - if (type === "String") { - return `"${value}"`; - } else if (type === "Number") { - return `${Number(value)}`; - } else { - return `${value}`; - } -} -function isExplicable(type) { - const explicitTypes = ["string", "number", "boolean"]; - return explicitTypes.some((elem) => type.toLowerCase() === elem); -} -function isBoolean(...args) { - return args.some((elem) => elem.toLowerCase() === "boolean"); -} - -const isInternalKey = (key) => key[0] === "_" || key === "$stable"; -const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; -const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - return rawSlot; - } - const normalized = withCtx((...args) => { - if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { - warn$1( - `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` - ); - } - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; -}; -const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) continue; - const value = rawSlots[key]; - if (shared.isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } else if (value != null) { - { - warn$1( - `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` - ); - } - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } - } -}; -const normalizeVNodeSlots = (instance, children) => { - if (!isKeepAlive(instance.vnode) && true) { - warn$1( - `Non-function value encountered for default slot. Prefer function slots for better performance.` - ); - } - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; -}; -const assignSlots = (slots, children, optimized) => { - for (const key in children) { - if (optimized || key !== "_") { - slots[key] = children[key]; - } - } -}; -const initSlots = (instance, children, optimized) => { - const slots = instance.slots = createInternalObject(); - if (instance.vnode.shapeFlag & 32) { - const type = children._; - if (type) { - assignSlots(slots, children, optimized); - if (optimized) { - shared.def(slots, "_", type, true); - } - } else { - normalizeObjectSlots(children, slots); - } - } else if (children) { - normalizeVNodeSlots(instance, children); - } -}; -const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = shared.EMPTY_OBJ; - if (vnode.shapeFlag & 32) { - const type = children._; - if (type) { - if (isHmrUpdating) { - assignSlots(slots, children, optimized); - reactivity.trigger(instance, "set", "$slots"); - } else if (optimized && type === 1) { - needDeletionCheck = false; - } else { - assignSlots(slots, children, optimized); - } - } else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; - } else if (children) { - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { - delete slots[key]; - } - } - } -}; - -let supported; -let perf; -function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - { - devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); - } -} -function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure( - `<${formatComponentName(instance, instance.type)}> ${type}`, - startTag, - endTag - ); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - { - devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); - } -} -function isSupported() { - if (supported !== void 0) { - return supported; - } - if (typeof window !== "undefined" && window.performance) { - supported = true; - perf = window.performance; - } else { - supported = false; - } - return supported; -} - -const queuePostRenderEffect = queueEffectWithSuspense ; -function createRenderer(options) { - return baseCreateRenderer(options); -} -function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); -} -function baseCreateRenderer(options, createHydrationFns) { - const target = shared.getGlobalThis(); - target.__VUE__ = true; - { - setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); - } - const { - insert: hostInsert, - remove: hostRemove, - patchProp: hostPatchProp, - createElement: hostCreateElement, - createText: hostCreateText, - createComment: hostCreateComment, - setText: hostSetText, - setElementText: hostSetElementText, - parentNode: hostParentNode, - nextSibling: hostNextSibling, - setScopeId: hostSetScopeId = shared.NOOP, - insertStaticContent: hostInsertStaticContent - } = options; - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, namespace); - } else { - patchStaticNode(n1, n2, container, namespace); - } - break; - case Fragment: - processFragment( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - break; - default: - if (shapeFlag & 1) { - processElement( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 6) { - processComponent( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 64) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else if (shapeFlag & 128) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else { - warn$1("Invalid VNode type:", type, `(${typeof type})`); - } - } - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateText(n2.children), - container, - anchor - ); - } else { - const el = n2.el = n1.el; - if (n2.children !== n1.children) { - hostSetText(el, n2.children); - } - } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateComment(n2.children || ""), - container, - anchor - ); - } else { - n2.el = n1.el; - } - }; - const mountStaticNode = (n2, container, anchor, namespace) => { - [n2.el, n2.anchor] = hostInsertStaticContent( - n2.children, - container, - anchor, - namespace, - n2.el, - n2.anchor - ); - }; - const patchStaticNode = (n1, n2, container, namespace) => { - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent( - n2.children, - container, - anchor, - namespace - ); - } else { - n2.el = n1.el; - n2.anchor = n1.anchor; - } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; - } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; - } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - if (n2.type === "svg") { - namespace = "svg"; - } else if (n2.type === "math") { - namespace = "mathml"; - } - if (n1 == null) { - mountElement( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - patchElement( - n1, - n2, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - let el; - let vnodeHook; - const { props, shapeFlag, transition, dirs } = vnode; - el = vnode.el = hostCreateElement( - vnode.type, - namespace, - props && props.is, - props - ); - if (shapeFlag & 8) { - hostSetElementText(el, vnode.children); - } else if (shapeFlag & 16) { - mountChildren( - vnode.children, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(vnode, namespace), - slotScopeIds, - optimized - ); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); - if (props) { - for (const key in props) { - if (key !== "value" && !shared.isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], namespace, parentComponent); - } - } - if ("value" in props) { - hostPatchProp(el, "value", null, props.value, namespace); - } - if (vnodeHook = props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - { - shared.def(el, "__vnode", vnode, true); - shared.def(el, "__vueParentComponent", parentComponent, true); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - const needCallTransitionHooks = needTransition(parentSuspense, transition); - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { - subTree = filterSingleRoot(subTree.children) || subTree; - } - if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { - const parentVNode = parentComponent.vnode; - setScopeId( - el, - parentVNode, - parentVNode.scopeId, - parentVNode.slotScopeIds, - parentComponent.parent - ); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); - patch( - null, - child, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const el = n2.el = n1.el; - { - el.__vnode = n2; - } - let { patchFlag, dynamicChildren, dirs } = n2; - patchFlag |= n1.patchFlag & 16; - const oldProps = n1.props || shared.EMPTY_OBJ; - const newProps = n2.props || shared.EMPTY_OBJ; - let vnodeHook; - parentComponent && toggleRecurse(parentComponent, false); - if (vnodeHook = newProps.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); - } - parentComponent && toggleRecurse(parentComponent, true); - if (isHmrUpdating) { - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { - hostSetElementText(el, ""); - } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - el, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds - ); - { - traverseStaticChildren(n1, n2); - } - } else if (!optimized) { - patchChildren( - n1, - n2, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds, - false - ); - } - if (patchFlag > 0) { - if (patchFlag & 16) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } else { - if (patchFlag & 2) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, "class", null, newProps.class, namespace); - } - } - if (patchFlag & 4) { - hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); - } - if (patchFlag & 8) { - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - if (next !== prev || key === "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - } - } - if (patchFlag & 1) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } else if (!optimized && dynamicChildren == null) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); - }, parentSuspense); - } - }; - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - const container = ( - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( - // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer - ) - ); - patch( - oldVNode, - newVNode, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - true - ); - } - }; - const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { - if (oldProps !== newProps) { - if (oldProps !== shared.EMPTY_OBJ) { - for (const key in oldProps) { - if (!shared.isReservedProp(key) && !(key in newProps)) { - hostPatchProp( - el, - key, - oldProps[key], - null, - namespace, - parentComponent - ); - } - } - } - for (const key in newProps) { - if (shared.isReservedProp(key)) continue; - const next = newProps[key]; - const prev = oldProps[key]; - if (next !== prev && key !== "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - if ("value" in newProps) { - hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); - const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if ( - // #5523 dev root fragment may inherit directives - isHmrUpdating || patchFlag & 2048 - ) { - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - mountChildren( - // #10007 - // such fragment like `<></>` will be compiled into - // a fragment which doesn't have a children. - // In this case fallback to an empty array - n2.children || [], - container, - fragmentEndAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - container, - parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - { - traverseStaticChildren(n1, n2); - } - } else { - patchChildren( - n1, - n2, - container, - fragmentEndAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512) { - parentComponent.ctx.activate( - n2, - container, - anchor, - namespace, - optimized - ); - } else { - mountComponent( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - optimized - ); - } - } else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { - const instance = (initialVNode.component = createComponentInstance( - initialVNode, - parentComponent, - parentSuspense - )); - if (instance.type.__hmrId) { - registerHMR(instance); - } - { - pushWarningContext(initialVNode); - startMeasure(instance, `mount`); - } - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - { - { - startMeasure(instance, `init`); - } - setupComponent(instance, false, optimized); - { - endMeasure(instance, `init`); - } - } - if (instance.asyncDep) { - if (isHmrUpdating) initialVNode.el = null; - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); - if (!initialVNode.el) { - const placeholder = instance.subTree = createVNode(Comment); - processCommentNode(null, placeholder, container, anchor); - } - } else { - setupRenderEffect( - instance, - initialVNode, - container, - anchor, - parentSuspense, - namespace, - optimized - ); - } - { - popWarningContext(); - endMeasure(instance, `mount`); - } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = n2.component = n1.component; - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && !instance.asyncResolved) { - { - pushWarningContext(n2); - } - updateComponentPreRender(instance, n2, optimized); - { - popWarningContext(); - } - return; - } else { - instance.next = n2; - instance.update(); - } - } else { - n2.el = n1.el; - instance.vnode = n2; - } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent, root, type } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - if (bm) { - shared.invokeArrayFns(bm); - } - if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - const hydrateSubTree = () => { - { - startMeasure(instance, `render`); - } - instance.subTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `hydrate`); - } - hydrateNode( - el, - instance.subTree, - instance, - parentSuspense, - null - ); - { - endMeasure(instance, `hydrate`); - } - }; - if (isAsyncWrapperVNode && type.__asyncHydrate) { - type.__asyncHydrate( - el, - instance, - hydrateSubTree - ); - } else { - hydrateSubTree(); - } - } else { - if (root.ce) { - root.ce._injectChildStyle(type); - } - { - startMeasure(instance, `render`); - } - const subTree = instance.subTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `patch`); - } - patch( - null, - subTree, - container, - anchor, - instance, - parentSuspense, - namespace - ); - { - endMeasure(instance, `patch`); - } - initialVNode.el = subTree.el; - } - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect( - () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), - parentSuspense - ); - } - if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - { - devtoolsComponentAdded(instance); - } - initialVNode = container = anchor = null; - } else { - let { next, bu, u, parent, vnode } = instance; - { - const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); - if (nonHydratedAsyncRoot) { - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - nonHydratedAsyncRoot.asyncDep.then(() => { - if (!instance.isUnmounted) { - componentUpdateFn(); - } - }); - return; - } - } - let originNext = next; - let vnodeHook; - { - pushWarningContext(next || instance.vnode); - } - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } else { - next = vnode; - } - if (bu) { - shared.invokeArrayFns(bu); - } - if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - { - startMeasure(instance, `render`); - } - const nextTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - const prevTree = instance.subTree; - instance.subTree = nextTree; - { - startMeasure(instance, `patch`); - } - patch( - prevTree, - nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), - instance, - parentSuspense, - namespace - ); - { - endMeasure(instance, `patch`); - } - next.el = nextTree.el; - if (originNext === null) { - updateHOCHostEl(instance, nextTree.el); - } - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - if (vnodeHook = next.props && next.props.onVnodeUpdated) { - queuePostRenderEffect( - () => invokeVNodeHook(vnodeHook, parent, next, vnode), - parentSuspense - ); - } - { - devtoolsComponentUpdated(instance); - } - { - popWarningContext(); - } - } - }; - instance.scope.on(); - const effect = instance.effect = new reactivity.ReactiveEffect(componentUpdateFn); - instance.scope.off(); - const update = instance.update = effect.run.bind(effect); - const job = instance.job = effect.runIfDirty.bind(effect); - job.i = instance; - job.id = instance.uid; - effect.scheduler = () => queueJob(job); - toggleRecurse(instance, true); - { - effect.onTrack = instance.rtc ? (e) => shared.invokeArrayFns(instance.rtc, e) : void 0; - effect.onTrigger = instance.rtg ? (e) => shared.invokeArrayFns(instance.rtg, e) : void 0; - } - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - reactivity.pauseTracking(); - flushPreFlushCbs(instance); - reactivity.resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - if (patchFlag > 0) { - if (patchFlag & 128) { - patchKeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - return; - } else if (patchFlag & 256) { - patchUnkeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - return; - } - } - if (shapeFlag & 8) { - if (prevShapeFlag & 16) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } - } else { - if (prevShapeFlag & 16) { - if (shapeFlag & 16) { - patchKeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } else { - if (prevShapeFlag & 8) { - hostSetElementText(container, ""); - } - if (shapeFlag & 16) { - mountChildren( - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - } - } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - c1 = c1 || shared.EMPTY_ARR; - c2 = c2 || shared.EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - patch( - c1[i], - nextChild, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - if (oldLength > newLength) { - unmountChildren( - c1, - parentComponent, - parentSuspense, - true, - false, - commonLength - ); - } else { - mountChildren( - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - commonLength - ); - } - }; - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; - let e2 = l2 - 1; - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - if (isSameVNodeType(n1, n2)) { - patch( - n1, - n2, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - break; - } - i++; - } - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); - if (isSameVNodeType(n1, n2)) { - patch( - n1, - n2, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - break; - } - e1--; - e2--; - } - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch( - null, - c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - i++; - } - } - } else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } else { - const s1 = i; - const s2 = i; - const keyToNewIndexMap = /* @__PURE__ */ new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - if (nextChild.key != null) { - if (keyToNewIndexMap.has(nextChild.key)) { - warn$1( - `Duplicate keys found during update:`, - JSON.stringify(nextChild.key), - `Make sure keys are unique.` - ); - } - keyToNewIndexMap.set(nextChild.key, i); - } - } - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - let maxNewIndexSoFar = 0; - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } else { - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === void 0) { - unmount(prevChild, parentComponent, parentSuspense, true); - } else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } else { - moved = true; - } - patch( - prevChild, - c2[newIndex], - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - patched++; - } - } - const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : shared.EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - patch( - null, - nextChild, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (moved) { - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2); - } else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; - if (needTransition2) { - if (moveType === 0) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } else { - const { leave, delayLeave, afterLeave } = transition; - const remove2 = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove2(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove2, performLeave); - } else { - performLeave(); - } - } - } else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { - type, - props, - ref, - children, - dynamicChildren, - shapeFlag, - patchFlag, - dirs, - cacheIndex - } = vnode; - if (patchFlag === -2) { - optimized = false; - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (cacheIndex != null) { - parentComponent.renderCache[cacheIndex] = void 0; - } - if (shapeFlag & 256) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } else { - if (shapeFlag & 128) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); - } - if (shapeFlag & 64) { - vnode.type.remove( - vnode, - parentComponent, - parentSuspense, - internals, - doRemove - ); - } else if (dynamicChildren && // #5154 - // when v-once is used inside a block, setBlockTracking(-1) marks the - // parent block with hasOnce: true - // so that it doesn't take the fast path during unmount - otherwise - // components nested in v-once are never unmounted. - !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { - unmountChildren( - dynamicChildren, - parentComponent, - parentSuspense, - false, - true - ); - } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); - }, parentSuspense); - } - }; - const remove = (vnode) => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { - vnode.children.forEach((child) => { - if (child.type === Comment) { - hostRemove(child.el); - } else { - remove(child); - } - }); - } else { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 && transition && !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } else { - performLeave(); - } - } else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - if (instance.type.__hmrId) { - unregisterHMR(instance); - } - const { bum, scope, job, subTree, um, m, a } = instance; - invalidateMount(m); - invalidateMount(a); - if (bum) { - shared.invokeArrayFns(bum); - } - scope.stop(); - if (job) { - job.flags |= 8; - unmount(subTree, instance, parentSuspense, doRemove); - } - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } - } - { - devtoolsComponentRemoved(instance); - } - }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } - }; - const getNextHostNode = (vnode) => { - if (vnode.shapeFlag & 6) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128) { - return vnode.suspense.next(); - } - const el = hostNextSibling(vnode.anchor || vnode.el); - const teleportEnd = el && el[TeleportEndKey]; - return teleportEnd ? hostNextSibling(teleportEnd) : el; - }; - let isFlushing = false; - const render = (vnode, container, namespace) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } else { - patch( - container._vnode || null, - vnode, - container, - null, - null, - null, - namespace - ); - } - container._vnode = vnode; - if (!isFlushing) { - isFlushing = true; - flushPreFlushCbs(); - flushPostFlushCbs(); - isFlushing = false; - } - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns( - internals - ); - } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) - }; -} -function resolveChildrenNamespace({ type, props }, currentNamespace) { - return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; -} -function toggleRecurse({ effect, job }, allowed) { - if (allowed) { - effect.flags |= 32; - job.flags |= 4; - } else { - effect.flags &= ~32; - job.flags &= ~4; - } -} -function needTransition(parentSuspense, transition) { - return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; -} -function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (shared.isArray(ch1) && shared.isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow && c2.patchFlag !== -2) - traverseStaticChildren(c1, c2); - } - if (c2.type === Text) { - c2.el = c1.el; - } - if (c2.type === Comment && !c2.el) { - c2.el = c1.el; - } - } - } -} -function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = u + v >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } - } - } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; - } - return result; -} -function locateNonHydratedAsyncRoot(instance) { - const subComponent = instance.subTree.component; - if (subComponent) { - if (subComponent.asyncDep && !subComponent.asyncResolved) { - return subComponent; - } else { - return locateNonHydratedAsyncRoot(subComponent); - } - } -} -function invalidateMount(hooks) { - if (hooks) { - for (let i = 0; i < hooks.length; i++) - hooks[i].flags |= 8; - } -} - -const ssrContextKey = Symbol.for("v-scx"); -const useSSRContext = () => { - { - const ctx = inject(ssrContextKey); - if (!ctx) { - warn$1( - `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` - ); - } - return ctx; - } -}; - -function watchEffect(effect, options) { - return doWatch(effect, null, options); -} -function watchPostEffect(effect, options) { - return doWatch( - effect, - null, - shared.extend({}, options, { flush: "post" }) - ); -} -function watchSyncEffect(effect, options) { - return doWatch( - effect, - null, - shared.extend({}, options, { flush: "sync" }) - ); -} -function watch(source, cb, options) { - if (!shared.isFunction(cb)) { - warn$1( - `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` - ); - } - return doWatch(source, cb, options); -} -function doWatch(source, cb, options = shared.EMPTY_OBJ) { - const { immediate, deep, flush, once } = options; - if (!cb) { - if (immediate !== void 0) { - warn$1( - `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - if (deep !== void 0) { - warn$1( - `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - if (once !== void 0) { - warn$1( - `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - } - const baseWatchOptions = shared.extend({}, options); - baseWatchOptions.onWarn = warn$1; - const runsImmediately = cb && immediate || !cb && flush !== "post"; - let ssrCleanup; - if (isInSSRComponentSetup) { - if (flush === "sync") { - const ctx = useSSRContext(); - ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); - } else if (!runsImmediately) { - const watchStopHandle = () => { - }; - watchStopHandle.stop = shared.NOOP; - watchStopHandle.resume = shared.NOOP; - watchStopHandle.pause = shared.NOOP; - return watchStopHandle; - } - } - const instance = currentInstance; - baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); - let isPre = false; - if (flush === "post") { - baseWatchOptions.scheduler = (job) => { - queuePostRenderEffect(job, instance && instance.suspense); - }; - } else if (flush !== "sync") { - isPre = true; - baseWatchOptions.scheduler = (job, isFirstRun) => { - if (isFirstRun) { - job(); - } else { - queueJob(job); - } - }; - } - baseWatchOptions.augmentJob = (job) => { - if (cb) { - job.flags |= 4; - } - if (isPre) { - job.flags |= 2; - if (instance) { - job.id = instance.uid; - job.i = instance; - } - } - }; - const watchHandle = reactivity.watch(source, cb, baseWatchOptions); - if (isInSSRComponentSetup) { - if (ssrCleanup) { - ssrCleanup.push(watchHandle); - } else if (runsImmediately) { - watchHandle(); - } - } - return watchHandle; -} -function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = shared.isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); - let cb; - if (shared.isFunction(value)) { - cb = value; - } else { - cb = value.handler; - options = value; - } - const reset = setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - reset(); - return res; -} -function createPathGetter(ctx, path) { - const segments = path.split("."); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; -} - -function useModel(props, name, options = shared.EMPTY_OBJ) { - const i = getCurrentInstance(); - if (!i) { - warn$1(`useModel() called without active instance.`); - return reactivity.ref(); - } - const camelizedName = shared.camelize(name); - if (!i.propsOptions[0][camelizedName]) { - warn$1(`useModel() called with prop "${name}" which is not declared.`); - return reactivity.ref(); - } - const hyphenatedName = shared.hyphenate(name); - const modifiers = getModelModifiers(props, camelizedName); - const res = reactivity.customRef((track, trigger) => { - let localValue; - let prevSetValue = shared.EMPTY_OBJ; - let prevEmittedValue; - watchSyncEffect(() => { - const propValue = props[camelizedName]; - if (shared.hasChanged(localValue, propValue)) { - localValue = propValue; - trigger(); - } - }); - return { - get() { - track(); - return options.get ? options.get(localValue) : localValue; - }, - set(value) { - const emittedValue = options.set ? options.set(value) : value; - if (!shared.hasChanged(emittedValue, localValue) && !(prevSetValue !== shared.EMPTY_OBJ && shared.hasChanged(value, prevSetValue))) { - return; - } - const rawProps = i.vnode.props; - if (!(rawProps && // check if parent has passed v-model - (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { - localValue = value; - trigger(); - } - i.emit(`update:${name}`, emittedValue); - if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) { - trigger(); - } - prevSetValue = value; - prevEmittedValue = emittedValue; - } - }; - }); - res[Symbol.iterator] = () => { - let i2 = 0; - return { - next() { - if (i2 < 2) { - return { value: i2++ ? modifiers || shared.EMPTY_OBJ : res, done: false }; - } else { - return { done: true }; - } - } - }; - }; - return res; -} -const getModelModifiers = (props, modelName) => { - return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${shared.camelize(modelName)}Modifiers`] || props[`${shared.hyphenate(modelName)}Modifiers`]; -}; - -function emit(instance, event, ...rawArgs) { - if (instance.isUnmounted) return; - const props = instance.vnode.props || shared.EMPTY_OBJ; - { - const { - emitsOptions, - propsOptions: [propsOptions] - } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && true) { - if (!propsOptions || !(shared.toHandlerKey(shared.camelize(event)) in propsOptions)) { - warn$1( - `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${shared.toHandlerKey(shared.camelize(event))}" prop.` - ); - } - } else { - const validator = emitsOptions[event]; - if (shared.isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn$1( - `Invalid event arguments: event validation failed for event "${event}".` - ); - } - } - } - } - } - let args = rawArgs; - const isModelListener = event.startsWith("update:"); - const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); - if (modifiers) { - if (modifiers.trim) { - args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a); - } - if (modifiers.number) { - args = rawArgs.map(shared.looseToNumber); - } - } - { - devtoolsComponentEmit(instance, event, args); - } - { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[shared.toHandlerKey(lowerCaseEvent)]) { - warn$1( - `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( - instance, - instance.type - )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${shared.hyphenate( - event - )}" instead of "${event}".` - ); - } - } - let handlerName; - let handler = props[handlerName = shared.toHandlerKey(event)] || // also try camelCase event handler (#2249) - props[handlerName = shared.toHandlerKey(shared.camelize(event))]; - if (!handler && isModelListener) { - handler = props[handlerName = shared.toHandlerKey(shared.hyphenate(event))]; - } - if (handler) { - callWithAsyncErrorHandling( - handler, - instance, - 6, - args - ); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling( - onceHandler, - instance, - 6, - args - ); - } -} -function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== void 0) { - return cached; - } - const raw = comp.emits; - let normalized = {}; - let hasExtends = false; - if (!shared.isFunction(comp)) { - const extendEmits = (raw2) => { - const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - shared.extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } - } - if (!raw && !hasExtends) { - if (shared.isObject(comp)) { - cache.set(comp, null); - } - return null; - } - if (shared.isArray(raw)) { - raw.forEach((key) => normalized[key] = null); - } else { - shared.extend(normalized, raw); - } - if (shared.isObject(comp)) { - cache.set(comp, normalized); - } - return normalized; -} -function isEmitListener(options, key) { - if (!options || !shared.isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ""); - return shared.hasOwn(options, key[0].toLowerCase() + key.slice(1)) || shared.hasOwn(options, shared.hyphenate(key)) || shared.hasOwn(options, key); -} - -let accessedAttrs = false; -function markAttrsAccessed() { - accessedAttrs = true; -} -function renderComponentRoot(instance) { - const { - type: Component, - vnode, - proxy, - withProxy, - propsOptions: [propsOptions], - slots, - attrs, - emit, - render, - renderCache, - props, - data, - setupState, - ctx, - inheritAttrs - } = instance; - const prev = setCurrentRenderingInstance(instance); - let result; - let fallthroughAttrs; - { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4) { - const proxyToUse = withProxy || proxy; - const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { - get(target, key, receiver) { - warn$1( - `Property '${String( - key - )}' was accessed via 'this'. Avoid using 'this' in templates.` - ); - return Reflect.get(target, key, receiver); - } - }) : proxyToUse; - result = normalizeVNode( - render.call( - thisProxy, - proxyToUse, - renderCache, - true ? reactivity.shallowReadonly(props) : props, - setupState, - data, - ctx - ) - ); - fallthroughAttrs = attrs; - } else { - const render2 = Component; - if (attrs === props) { - markAttrsAccessed(); - } - result = normalizeVNode( - render2.length > 1 ? render2( - true ? reactivity.shallowReadonly(props) : props, - true ? { - get attrs() { - markAttrsAccessed(); - return reactivity.shallowReadonly(attrs); - }, - slots, - emit - } : { attrs, slots, emit } - ) : render2( - true ? reactivity.shallowReadonly(props) : props, - null - ) - ); - fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); - } - } catch (err) { - blockStack.length = 0; - handleError(err, instance, 1); - result = createVNode(Comment); - } - let root = result; - let setRoot = void 0; - if (result.patchFlag > 0 && result.patchFlag & 2048) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 | 6)) { - if (propsOptions && keys.some(shared.isModelListener)) { - fallthroughAttrs = filterModelListeners( - fallthroughAttrs, - propsOptions - ); - } - root = cloneVNode(root, fallthroughAttrs, false, true); - } else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (shared.isOn(key)) { - if (!shared.isModelListener(key)) { - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1( - `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` - ); - } - if (eventAttrs.length) { - warn$1( - `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` - ); - } - } - } - } - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn$1( - `Runtime directive used on component with non-element root node. The directives will not function as intended.` - ); - } - root = cloneVNode(root, null, false, true); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; - } - if (vnode.transition) { - if (!isElementRoot(root)) { - warn$1( - `Component inside <Transition> renders non-element root node that cannot be animated.` - ); - } - setTransitionHooks(root, vnode.transition); - } - if (setRoot) { - setRoot(root); - } else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; -} -const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren, false); - if (!childRoot) { - return [vnode, void 0]; - } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { - return getChildRoot(childRoot); - } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; -}; -function filterSingleRoot(children, recurse = true) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - if (child.type !== Comment || child.children === "v-if") { - if (singleRoot) { - return; - } else { - singleRoot = child; - if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { - return filterSingleRoot(singleRoot.children); - } - } - } - } else { - return; - } - } - return singleRoot; -} -const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === "class" || key === "style" || shared.isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } - } - return res; -}; -const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!shared.isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } - } - return res; -}; -const isElementRoot = (vnode) => { - return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; -}; -function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - if ((prevChildren || nextChildren) && isHmrUpdating) { - return true; - } - if (nextVNode.dirs || nextVNode.transition) { - return true; - } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024) { - return true; - } - if (patchFlag & 16) { - if (!prevProps) { - return !!nextProps; - } - return hasPropsChanged(prevProps, nextProps, emits); - } else if (patchFlag & 8) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { - return true; - } - } - } - } else { - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); - } - return false; -} -function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; - } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; -} -function updateHOCHostEl({ vnode, parent }, el) { - while (parent) { - const root = parent.subTree; - if (root.suspense && root.suspense.activeBranch === vnode) { - root.el = vnode.el; - } - if (root === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; - } else { - break; - } - } -} - -const isSuspense = (type) => type.__isSuspense; -let suspenseId = 0; -const SuspenseImpl = { - name: "Suspense", - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - if (n1 == null) { - mountSuspense( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } else { - if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { - n2.suspense = n1.suspense; - n2.suspense.vnode = n2; - n2.el = n1.el; - return; - } - patchSuspense( - n1, - n2, - container, - anchor, - parentComponent, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } - }, - hydrate: hydrateSuspense, - normalize: normalizeSuspenseChildren -}; -const Suspense = SuspenseImpl ; -function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (shared.isFunction(eventListener)) { - eventListener(); - } -} -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - const { - p: patch, - o: { createElement } - } = rendererInternals; - const hiddenContainer = createElement("div"); - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - container, - hiddenContainer, - anchor, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - patch( - null, - suspense.pendingBranch = vnode.ssContent, - hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds - ); - if (suspense.deps > 0) { - triggerEvent(vnode, "onPending"); - triggerEvent(vnode, "onFallback"); - patch( - null, - vnode.ssFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds - ); - setActiveBranch(suspense, vnode.ssFallback); - } else { - suspense.resolve(false, true); - } -} -function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = n2.suspense = n1.suspense; - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - patch( - pendingBranch, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else if (isInFallback) { - if (!isHydrating) { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } - } else { - suspense.pendingId = suspenseId++; - if (isHydrating) { - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } else { - unmount(pendingBranch, parentComponent, suspense); - } - suspense.deps = 0; - suspense.effects.length = 0; - suspense.hiddenContainer = createElement("div"); - if (isInFallback) { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - suspense.resolve(true); - } else { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newBranch); - } else { - triggerEvent(n2, "onPending"); - suspense.pendingBranch = newBranch; - if (newBranch.shapeFlag & 512) { - suspense.pendingId = newBranch.component.suspenseId; - } else { - suspense.pendingId = suspenseId++; - } - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } else if (timeout === 0) { - suspense.fallback(newFallback); - } - } - } - } -} -let hasWarned = false; -function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - if (!hasWarned) { - hasWarned = true; - console[console.info ? "info" : "log"]( - `<Suspense> is an experimental feature and its API will likely change.` - ); - } - const { - p: patch, - m: move, - um: unmount, - n: next, - o: { parentNode, remove } - } = rendererInternals; - let parentSuspenseId; - const isSuspensible = isVNodeSuspensible(vnode); - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch) { - parentSuspenseId = parentSuspense.pendingId; - parentSuspense.deps++; - } - } - const timeout = vnode.props ? shared.toNumber(vnode.props.timeout) : void 0; - { - assertNumber(timeout, `Suspense timeout`); - } - const initialAnchor = anchor; - const suspense = { - vnode, - parent: parentSuspense, - parentComponent, - namespace, - container, - hiddenContainer, - deps: 0, - pendingId: suspenseId++, - timeout: typeof timeout === "number" ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: !isHydrating, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false, sync = false) { - { - if (!resume && !suspense.pendingBranch) { - throw new Error( - `suspense.resolve() is called without a pending branch.` - ); - } - if (suspense.isUnmounted) { - throw new Error( - `suspense.resolve() is called on an already unmounted suspense boundary.` - ); - } - } - const { - vnode: vnode2, - activeBranch, - pendingBranch, - pendingId, - effects, - parentComponent: parentComponent2, - container: container2 - } = suspense; - let delayEnter = false; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } else if (!resume) { - delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move( - pendingBranch, - container2, - anchor === initialAnchor ? next(activeBranch) : anchor, - 0 - ); - queuePostFlushCb(effects); - } - }; - } - if (activeBranch) { - if (parentNode(activeBranch.el) === container2) { - anchor = next(activeBranch); - } - unmount(activeBranch, parentComponent2, suspense, true); - } - if (!delayEnter) { - move(pendingBranch, container2, anchor, 0); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - if (!hasUnresolvedAncestor && !delayEnter) { - queuePostFlushCb(effects); - } - suspense.effects = []; - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0 && !sync) { - parentSuspense.resolve(); - } - } - } - triggerEvent(vnode2, "onResolve"); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; - triggerEvent(vnode2, "onFallback"); - const anchor2 = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - patch( - null, - fallbackVNode, - container2, - anchor2, - parentComponent2, - null, - // fallback tree will not have suspense context - namespace2, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - unmount( - activeBranch, - parentComponent2, - null, - // no suspense so unmount hooks fire now - true - // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container2, anchor2, type) { - suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); - suspense.container = container2; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect, optimized2) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance.asyncDep.catch((err) => { - handleError(err, instance, 0); - }).then((asyncSetupResult) => { - if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { - return; - } - instance.asyncResolved = true; - const { vnode: vnode2 } = instance; - { - pushWarningContext(vnode2); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - vnode2.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect( - instance, - vnode2, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), - suspense, - namespace, - optimized2 - ); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode2.el); - { - popWarningContext(); - } - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense2, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount( - suspense.activeBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - if (suspense.pendingBranch) { - unmount( - suspense.pendingBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - } - }; - return suspense; -} -function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - node.parentNode, - // eslint-disable-next-line no-restricted-globals - document.createElement("div"), - null, - namespace, - slotScopeIds, - optimized, - rendererInternals, - true - ); - const result = hydrateNode( - node, - suspense.pendingBranch = vnode.ssContent, - parentComponent, - suspense, - slotScopeIds, - optimized - ); - if (suspense.deps === 0) { - suspense.resolve(false, true); - } - return result; -} -function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32; - vnode.ssContent = normalizeSuspenseSlot( - isSlotChildren ? children.default : children - ); - vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); -} -function normalizeSuspenseSlot(s) { - let block; - if (shared.isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } - } - if (shared.isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { - warn$1(`<Suspense> slots expect a single root node.`); - } - s = singleChild; - } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter((c) => c !== s); - } - return s; -} -function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (shared.isArray(fn)) { - suspense.effects.push(...fn); - } else { - suspense.effects.push(fn); - } - } else { - queuePostFlushCb(fn); - } -} -function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - let el = branch.el; - while (!el && branch.component) { - branch = branch.component.subTree; - el = branch.el; - } - vnode.el = el; - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } -} -function isVNodeSuspensible(vnode) { - const suspensible = vnode.props && vnode.props.suspensible; - return suspensible != null && suspensible !== false; -} - -const Fragment = Symbol.for("v-fgt"); -const Text = Symbol.for("v-txt"); -const Comment = Symbol.for("v-cmt"); -const Static = Symbol.for("v-stc"); -const blockStack = []; -let currentBlock = null; -function openBlock(disableTracking = false) { - blockStack.push(currentBlock = disableTracking ? null : []); -} -function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; -} -let isBlockTreeEnabled = 1; -function setBlockTracking(value, inVOnce = false) { - isBlockTreeEnabled += value; - if (value < 0 && currentBlock && inVOnce) { - currentBlock.hasOnce = true; - } -} -function setupBlock(vnode) { - vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || shared.EMPTY_ARR : null; - closeBlock(); - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; -} -function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock( - createBaseVNode( - type, - props, - children, - patchFlag, - dynamicProps, - shapeFlag, - true - ) - ); -} -function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock( - createVNode( - type, - props, - children, - patchFlag, - dynamicProps, - true - ) - ); -} -function isVNode(value) { - return value ? value.__v_isVNode === true : false; -} -function isSameVNodeType(n1, n2) { - if (n2.shapeFlag & 6 && n1.component) { - const dirtyInstances = hmrDirtyComponents.get(n2.type); - if (dirtyInstances && dirtyInstances.has(n1.component)) { - n1.shapeFlag &= ~256; - n2.shapeFlag &= ~512; - return false; - } - } - return n1.type === n2.type && n1.key === n2.key; -} -let vnodeArgsTransformer; -function transformVNodeArgs(transformer) { - vnodeArgsTransformer = transformer; -} -const createVNodeWithArgsTransform = (...args) => { - return _createVNode( - ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args - ); -}; -const normalizeKey = ({ key }) => key != null ? key : null; -const normalizeRef = ({ - ref, - ref_key, - ref_for -}) => { - if (typeof ref === "number") { - ref = "" + ref; - } - return ref != null ? shared.isString(ref) || reactivity.isRef(ref) || shared.isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; -}; -function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetStart: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null, - ctx: currentRenderingInstance - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - if (shapeFlag & 128) { - type.normalize(vnode); - } - } else if (children) { - vnode.shapeFlag |= shared.isString(children) ? 8 : 16; - } - if (vnode.key !== vnode.key) { - warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); - } - if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself - !isBlockNode && // has current parent block - currentBlock && // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32) { - currentBlock.push(vnode); - } - return vnode; -} -const createVNode = createVNodeWithArgsTransform ; -function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - if (!type) { - warn$1(`Invalid vnode type when creating vnode: ${type}.`); - } - type = Comment; - } - if (isVNode(type)) { - const cloned = cloneVNode( - type, - props, - true - /* mergeRef: true */ - ); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } else { - currentBlock.push(cloned); - } - } - cloned.patchFlag = -2; - return cloned; - } - if (isClassComponent(type)) { - type = type.__vccOpts; - } - if (props) { - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !shared.isString(klass)) { - props.class = shared.normalizeClass(klass); - } - if (shared.isObject(style)) { - if (reactivity.isProxy(style) && !shared.isArray(style)) { - style = shared.extend({}, style); - } - props.style = shared.normalizeStyle(style); - } - } - const shapeFlag = shared.isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : shared.isObject(type) ? 4 : shared.isFunction(type) ? 2 : 0; - if (shapeFlag & 4 && reactivity.isProxy(type)) { - type = reactivity.toRaw(type); - warn$1( - `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, - ` -Component that was made reactive: `, - type - ); - } - return createBaseVNode( - type, - props, - children, - patchFlag, - dynamicProps, - shapeFlag, - isBlockNode, - true - ); -} -function guardReactiveProps(props) { - if (!props) return null; - return reactivity.isProxy(props) || isInternalObject(props) ? shared.extend({}, props) : props; -} -function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { - const { props, ref, patchFlag, children, transition } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref ? ( - // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref ? shared.isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) - ) : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: patchFlag === -1 && shared.isArray(children) ? children.map(deepCloneVNode) : children, - target: vnode.target, - targetStart: vnode.targetStart, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor, - ctx: vnode.ctx, - ce: vnode.ce - }; - if (transition && cloneTransition) { - setTransitionHooks( - cloned, - transition.clone(cloned) - ); - } - return cloned; -} -function deepCloneVNode(vnode) { - const cloned = cloneVNode(vnode); - if (shared.isArray(vnode.children)) { - cloned.children = vnode.children.map(deepCloneVNode); - } - return cloned; -} -function createTextVNode(text = " ", flag = 0) { - return createVNode(Text, null, text, flag); -} -function createStaticVNode(content, numberOfNodes) { - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; -} -function createCommentVNode(text = "", asBlock = false) { - return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); -} -function normalizeVNode(child) { - if (child == null || typeof child === "boolean") { - return createVNode(Comment); - } else if (shared.isArray(child)) { - return createVNode( - Fragment, - null, - // #3666, avoid reference pollution when reusing vnode - child.slice() - ); - } else if (isVNode(child)) { - return cloneIfMounted(child); - } else { - return createVNode(Text, null, String(child)); - } -} -function cloneIfMounted(child) { - return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); -} -function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } else if (shared.isArray(children)) { - type = 16; - } else if (typeof children === "object") { - if (shapeFlag & (1 | 64)) { - const slot = children.default; - if (slot) { - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } else { - type = 32; - const slotFlag = children._; - if (!slotFlag && !isInternalObject(children)) { - children._ctx = currentRenderingInstance; - } else if (slotFlag === 3 && currentRenderingInstance) { - if (currentRenderingInstance.slots._ === 1) { - children._ = 1; - } else { - children._ = 2; - vnode.patchFlag |= 1024; - } - } - } - } else if (shared.isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32; - } else { - children = String(children); - if (shapeFlag & 64) { - type = 16; - children = [createTextVNode(children)]; - } else { - type = 8; - } - } - vnode.children = children; - vnode.shapeFlag |= type; -} -function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === "class") { - if (ret.class !== toMerge.class) { - ret.class = shared.normalizeClass([ret.class, toMerge.class]); - } - } else if (key === "style") { - ret.style = shared.normalizeStyle([ret.style, toMerge.style]); - } else if (shared.isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && existing !== incoming && !(shared.isArray(existing) && existing.includes(incoming))) { - ret[key] = existing ? [].concat(existing, incoming) : incoming; - } - } else if (key !== "") { - ret[key] = toMerge[key]; - } - } - } - return ret; -} -function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7, [ - vnode, - prevVNode - ]); -} - -const emptyAppContext = createAppContext(); -let uid = 0; -function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid++, - vnode, - type, - parent, - appContext, - root: null, - // to be immediately set - next: null, - subTree: null, - // will be set synchronously right after creation - effect: null, - update: null, - // will be set synchronously right after creation - job: null, - scope: new reactivity.EffectScope( - true - /* detached */ - ), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - ids: parent ? parent.ids : ["", 0, 0], - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - // to be set immediately - emitted: null, - // props default value - propsDefaults: shared.EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: shared.EMPTY_OBJ, - data: shared.EMPTY_OBJ, - props: shared.EMPTY_OBJ, - attrs: shared.EMPTY_OBJ, - slots: shared.EMPTY_OBJ, - refs: shared.EMPTY_OBJ, - setupState: shared.EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - { - instance.ctx = createDevRenderContext(instance); - } - instance.root = parent ? parent.root : instance; - instance.emit = emit.bind(null, instance); - if (vnode.ce) { - vnode.ce(instance); - } - return instance; -} -let currentInstance = null; -const getCurrentInstance = () => currentInstance || currentRenderingInstance; -let internalSetCurrentInstance; -let setInSSRSetupState; -{ - const g = shared.getGlobalThis(); - const registerGlobalSetter = (key, setter) => { - let setters; - if (!(setters = g[key])) setters = g[key] = []; - setters.push(setter); - return (v) => { - if (setters.length > 1) setters.forEach((set) => set(v)); - else setters[0](v); - }; - }; - internalSetCurrentInstance = registerGlobalSetter( - `__VUE_INSTANCE_SETTERS__`, - (v) => currentInstance = v - ); - setInSSRSetupState = registerGlobalSetter( - `__VUE_SSR_SETTERS__`, - (v) => isInSSRComponentSetup = v - ); -} -const setCurrentInstance = (instance) => { - const prev = currentInstance; - internalSetCurrentInstance(instance); - instance.scope.on(); - return () => { - instance.scope.off(); - internalSetCurrentInstance(prev); - }; -}; -const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - internalSetCurrentInstance(null); -}; -const isBuiltInTag = /* @__PURE__ */ shared.makeMap("slot,component"); -function validateComponentName(name, { isNativeTag }) { - if (isBuiltInTag(name) || isNativeTag(name)) { - warn$1( - "Do not use built-in or reserved HTML elements as component id: " + name - ); - } -} -function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4; -} -let isInSSRComponentSetup = false; -function setupComponent(instance, isSSR = false, optimized = false) { - isSSR && setInSSRSetupState(isSSR); - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children, optimized); - const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; - isSSR && setInSSRSetupState(false); - return setupResult; -} -function setupStatefulComponent(instance, isSSR) { - var _a; - const Component = instance.type; - { - if (Component.name) { - validateComponentName(Component.name, instance.appContext.config); - } - if (Component.components) { - const names = Object.keys(Component.components); - for (let i = 0; i < names.length; i++) { - validateComponentName(names[i], instance.appContext.config); - } - } - if (Component.directives) { - const names = Object.keys(Component.directives); - for (let i = 0; i < names.length; i++) { - validateDirectiveName(names[i]); - } - } - if (Component.compilerOptions && isRuntimeOnly()) { - warn$1( - `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` - ); - } - } - instance.accessCache = /* @__PURE__ */ Object.create(null); - instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); - { - exposePropsOnRenderContext(instance); - } - const { setup } = Component; - if (setup) { - reactivity.pauseTracking(); - const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; - const reset = setCurrentInstance(instance); - const setupResult = callWithErrorHandling( - setup, - instance, - 0, - [ - reactivity.shallowReadonly(instance.props) , - setupContext - ] - ); - const isAsyncSetup = shared.isPromise(setupResult); - reactivity.resetTracking(); - reset(); - if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { - markAsyncBoundary(instance); - } - if (isAsyncSetup) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - return setupResult.then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }).catch((e) => { - handleError(e, instance, 0); - }); - } else { - instance.asyncDep = setupResult; - if (!instance.suspense) { - const name = (_a = Component.name) != null ? _a : "Anonymous"; - warn$1( - `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` - ); - } - } - } else { - handleSetupResult(instance, setupResult, isSSR); - } - } else { - finishComponentSetup(instance, isSSR); - } -} -function handleSetupResult(instance, setupResult, isSSR) { - if (shared.isFunction(setupResult)) { - if (instance.type.__ssrInlineRender) { - instance.ssrRender = setupResult; - } else { - instance.render = setupResult; - } - } else if (shared.isObject(setupResult)) { - if (isVNode(setupResult)) { - warn$1( - `setup() should not return VNodes directly - return a render function instead.` - ); - } - { - instance.devtoolsRawSetupState = setupResult; - } - instance.setupState = reactivity.proxyRefs(setupResult); - { - exposeSetupStateOnRenderContext(instance); - } - } else if (setupResult !== void 0) { - warn$1( - `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` - ); - } - finishComponentSetup(instance, isSSR); -} -let compile; -let installWithProxy; -function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = (i) => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; -} -const isRuntimeOnly = () => !compile; -function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - if (!instance.render) { - if (!isSSR && compile && !Component.render) { - const template = Component.template || resolveMergedOptions(instance).template; - if (template) { - { - startMeasure(instance, `compile`); - } - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = shared.extend( - shared.extend( - { - isCustomElement, - delimiters - }, - compilerOptions - ), - componentCompilerOptions - ); - Component.render = compile(template, finalCompilerOptions); - { - endMeasure(instance, `compile`); - } - } - } - instance.render = Component.render || shared.NOOP; - if (installWithProxy) { - installWithProxy(instance); - } - } - { - const reset = setCurrentInstance(instance); - reactivity.pauseTracking(); - try { - applyOptions(instance); - } finally { - reactivity.resetTracking(); - reset(); - } - } - if (!Component.render && instance.render === shared.NOOP && !isSSR) { - if (!compile && Component.template) { - warn$1( - `Component provided template option but runtime compilation is not supported in this build of Vue.` + (``) - ); - } else { - warn$1(`Component is missing template or render function: `, Component); - } - } -} -const attrsProxyHandlers = { - get(target, key) { - markAttrsAccessed(); - reactivity.track(target, "get", ""); - return target[key]; - }, - set() { - warn$1(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn$1(`setupContext.attrs is readonly.`); - return false; - } -} ; -function getSlotsProxy(instance) { - return new Proxy(instance.slots, { - get(target, key) { - reactivity.track(instance, "get", "$slots"); - return target[key]; - } - }); -} -function createSetupContext(instance) { - const expose = (exposed) => { - { - if (instance.exposed) { - warn$1(`expose() should be called only once per setup().`); - } - if (exposed != null) { - let exposedType = typeof exposed; - if (exposedType === "object") { - if (shared.isArray(exposed)) { - exposedType = "array"; - } else if (reactivity.isRef(exposed)) { - exposedType = "ref"; - } - } - if (exposedType !== "object") { - warn$1( - `expose() should be passed a plain object, received ${exposedType}.` - ); - } - } - } - instance.exposed = exposed || {}; - }; - { - let attrsProxy; - let slotsProxy; - return Object.freeze({ - get attrs() { - return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); - }, - get slots() { - return slotsProxy || (slotsProxy = getSlotsProxy(instance)); - }, - get emit() { - return (event, ...args) => instance.emit(event, ...args); - }, - expose - }); - } -} -function getComponentPublicInstance(instance) { - if (instance.exposed) { - return instance.exposeProxy || (instance.exposeProxy = new Proxy(reactivity.proxyRefs(reactivity.markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - }, - has(target, key) { - return key in target || key in publicPropertiesMap; - } - })); - } else { - return instance.proxy; - } -} -const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); -function getComponentName(Component, includeInferred = true) { - return shared.isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; -} -function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; - } - } - if (!name && instance && instance.parent) { - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = inferFromRegistry( - instance.components || instance.parent.type.components - ) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; -} -function isClassComponent(value) { - return shared.isFunction(value) && "__vccOpts" in value; -} - -const computed = (getterOrOptions, debugOptions) => { - const c = reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup); - { - const i = getCurrentInstance(); - if (i && i.appContext.config.warnRecursiveComputed) { - c._warnRecursive = true; - } - } - return c; -}; - -function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) { - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - return createVNode(type, propsOrChildren); - } else { - return createVNode(type, null, propsOrChildren); - } - } else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } -} - -function initCustomFormatter() { - if (typeof window === "undefined") { - return; - } - const vueStyle = { style: "color:#3ba776" }; - const numberStyle = { style: "color:#1677ff" }; - const stringStyle = { style: "color:#f5222d" }; - const keywordStyle = { style: "color:#eb2f96" }; - const formatter = { - __vue_custom_formatter: true, - header(obj) { - if (!shared.isObject(obj)) { - return null; - } - if (obj.__isVue) { - return ["div", vueStyle, `VueInstance`]; - } else if (reactivity.isRef(obj)) { - return [ - "div", - {}, - ["span", vueStyle, genRefFlag(obj)], - "<", - // avoid debugger accessing value affecting behavior - formatValue("_value" in obj ? obj._value : obj), - `>` - ]; - } else if (reactivity.isReactive(obj)) { - return [ - "div", - {}, - ["span", vueStyle, reactivity.isShallow(obj) ? "ShallowReactive" : "Reactive"], - "<", - formatValue(obj), - `>${reactivity.isReadonly(obj) ? ` (readonly)` : ``}` - ]; - } else if (reactivity.isReadonly(obj)) { - return [ - "div", - {}, - ["span", vueStyle, reactivity.isShallow(obj) ? "ShallowReadonly" : "Readonly"], - "<", - formatValue(obj), - ">" - ]; - } - return null; - }, - hasBody(obj) { - return obj && obj.__isVue; - }, - body(obj) { - if (obj && obj.__isVue) { - return [ - "div", - {}, - ...formatInstance(obj.$) - ]; - } - } - }; - function formatInstance(instance) { - const blocks = []; - if (instance.type.props && instance.props) { - blocks.push(createInstanceBlock("props", reactivity.toRaw(instance.props))); - } - if (instance.setupState !== shared.EMPTY_OBJ) { - blocks.push(createInstanceBlock("setup", instance.setupState)); - } - if (instance.data !== shared.EMPTY_OBJ) { - blocks.push(createInstanceBlock("data", reactivity.toRaw(instance.data))); - } - const computed = extractKeys(instance, "computed"); - if (computed) { - blocks.push(createInstanceBlock("computed", computed)); - } - const injected = extractKeys(instance, "inject"); - if (injected) { - blocks.push(createInstanceBlock("injected", injected)); - } - blocks.push([ - "div", - {}, - [ - "span", - { - style: keywordStyle.style + ";opacity:0.66" - }, - "$ (internal): " - ], - ["object", { object: instance }] - ]); - return blocks; - } - function createInstanceBlock(type, target) { - target = shared.extend({}, target); - if (!Object.keys(target).length) { - return ["span", {}]; - } - return [ - "div", - { style: "line-height:1.25em;margin-bottom:0.6em" }, - [ - "div", - { - style: "color:#476582" - }, - type - ], - [ - "div", - { - style: "padding-left:1.25em" - }, - ...Object.keys(target).map((key) => { - return [ - "div", - {}, - ["span", keywordStyle, key + ": "], - formatValue(target[key], false) - ]; - }) - ] - ]; - } - function formatValue(v, asRaw = true) { - if (typeof v === "number") { - return ["span", numberStyle, v]; - } else if (typeof v === "string") { - return ["span", stringStyle, JSON.stringify(v)]; - } else if (typeof v === "boolean") { - return ["span", keywordStyle, v]; - } else if (shared.isObject(v)) { - return ["object", { object: asRaw ? reactivity.toRaw(v) : v }]; - } else { - return ["span", stringStyle, String(v)]; - } - } - function extractKeys(instance, type) { - const Comp = instance.type; - if (shared.isFunction(Comp)) { - return; - } - const extracted = {}; - for (const key in instance.ctx) { - if (isKeyOfType(Comp, key, type)) { - extracted[key] = instance.ctx[key]; - } - } - return extracted; - } - function isKeyOfType(Comp, key, type) { - const opts = Comp[type]; - if (shared.isArray(opts) && opts.includes(key) || shared.isObject(opts) && key in opts) { - return true; - } - if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { - return true; - } - if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { - return true; - } - } - function genRefFlag(v) { - if (reactivity.isShallow(v)) { - return `ShallowRef`; - } - if (v.effect) { - return `ComputedRef`; - } - return `Ref`; - } - if (window.devtoolsFormatters) { - window.devtoolsFormatters.push(formatter); - } else { - window.devtoolsFormatters = [formatter]; - } -} - -function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - ret.memo = memo.slice(); - ret.cacheIndex = index; - return cache[index] = ret; -} -function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; - } - for (let i = 0; i < prev.length; i++) { - if (shared.hasChanged(prev[i], memo[i])) { - return false; - } - } - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; -} - -const version = "3.5.13"; -const warn = warn$1 ; -const ErrorTypeStrings = ErrorTypeStrings$1 ; -const devtools = devtools$1 ; -const setDevtoolsHook = setDevtoolsHook$1 ; -const _ssrUtils = { - createComponentInstance, - setupComponent, - renderComponentRoot, - setCurrentRenderingInstance, - isVNode: isVNode, - normalizeVNode, - getComponentPublicInstance, - ensureValidVNode, - pushWarningContext, - popWarningContext -}; -const ssrUtils = _ssrUtils ; -const resolveFilter = null; -const compatUtils = null; -const DeprecationTypes = null; - -exports.EffectScope = reactivity.EffectScope; -exports.ReactiveEffect = reactivity.ReactiveEffect; -exports.TrackOpTypes = reactivity.TrackOpTypes; -exports.TriggerOpTypes = reactivity.TriggerOpTypes; -exports.customRef = reactivity.customRef; -exports.effect = reactivity.effect; -exports.effectScope = reactivity.effectScope; -exports.getCurrentScope = reactivity.getCurrentScope; -exports.getCurrentWatcher = reactivity.getCurrentWatcher; -exports.isProxy = reactivity.isProxy; -exports.isReactive = reactivity.isReactive; -exports.isReadonly = reactivity.isReadonly; -exports.isRef = reactivity.isRef; -exports.isShallow = reactivity.isShallow; -exports.markRaw = reactivity.markRaw; -exports.onScopeDispose = reactivity.onScopeDispose; -exports.onWatcherCleanup = reactivity.onWatcherCleanup; -exports.proxyRefs = reactivity.proxyRefs; -exports.reactive = reactivity.reactive; -exports.readonly = reactivity.readonly; -exports.ref = reactivity.ref; -exports.shallowReactive = reactivity.shallowReactive; -exports.shallowReadonly = reactivity.shallowReadonly; -exports.shallowRef = reactivity.shallowRef; -exports.stop = reactivity.stop; -exports.toRaw = reactivity.toRaw; -exports.toRef = reactivity.toRef; -exports.toRefs = reactivity.toRefs; -exports.toValue = reactivity.toValue; -exports.triggerRef = reactivity.triggerRef; -exports.unref = reactivity.unref; -exports.camelize = shared.camelize; -exports.capitalize = shared.capitalize; -exports.normalizeClass = shared.normalizeClass; -exports.normalizeProps = shared.normalizeProps; -exports.normalizeStyle = shared.normalizeStyle; -exports.toDisplayString = shared.toDisplayString; -exports.toHandlerKey = shared.toHandlerKey; -exports.BaseTransition = BaseTransition; -exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators; -exports.Comment = Comment; -exports.DeprecationTypes = DeprecationTypes; -exports.ErrorCodes = ErrorCodes; -exports.ErrorTypeStrings = ErrorTypeStrings; -exports.Fragment = Fragment; -exports.KeepAlive = KeepAlive; -exports.Static = Static; -exports.Suspense = Suspense; -exports.Teleport = Teleport; -exports.Text = Text; -exports.assertNumber = assertNumber; -exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling; -exports.callWithErrorHandling = callWithErrorHandling; -exports.cloneVNode = cloneVNode; -exports.compatUtils = compatUtils; -exports.computed = computed; -exports.createBlock = createBlock; -exports.createCommentVNode = createCommentVNode; -exports.createElementBlock = createElementBlock; -exports.createElementVNode = createBaseVNode; -exports.createHydrationRenderer = createHydrationRenderer; -exports.createPropsRestProxy = createPropsRestProxy; -exports.createRenderer = createRenderer; -exports.createSlots = createSlots; -exports.createStaticVNode = createStaticVNode; -exports.createTextVNode = createTextVNode; -exports.createVNode = createVNode; -exports.defineAsyncComponent = defineAsyncComponent; -exports.defineComponent = defineComponent; -exports.defineEmits = defineEmits; -exports.defineExpose = defineExpose; -exports.defineModel = defineModel; -exports.defineOptions = defineOptions; -exports.defineProps = defineProps; -exports.defineSlots = defineSlots; -exports.devtools = devtools; -exports.getCurrentInstance = getCurrentInstance; -exports.getTransitionRawChildren = getTransitionRawChildren; -exports.guardReactiveProps = guardReactiveProps; -exports.h = h; -exports.handleError = handleError; -exports.hasInjectionContext = hasInjectionContext; -exports.hydrateOnIdle = hydrateOnIdle; -exports.hydrateOnInteraction = hydrateOnInteraction; -exports.hydrateOnMediaQuery = hydrateOnMediaQuery; -exports.hydrateOnVisible = hydrateOnVisible; -exports.initCustomFormatter = initCustomFormatter; -exports.inject = inject; -exports.isMemoSame = isMemoSame; -exports.isRuntimeOnly = isRuntimeOnly; -exports.isVNode = isVNode; -exports.mergeDefaults = mergeDefaults; -exports.mergeModels = mergeModels; -exports.mergeProps = mergeProps; -exports.nextTick = nextTick; -exports.onActivated = onActivated; -exports.onBeforeMount = onBeforeMount; -exports.onBeforeUnmount = onBeforeUnmount; -exports.onBeforeUpdate = onBeforeUpdate; -exports.onDeactivated = onDeactivated; -exports.onErrorCaptured = onErrorCaptured; -exports.onMounted = onMounted; -exports.onRenderTracked = onRenderTracked; -exports.onRenderTriggered = onRenderTriggered; -exports.onServerPrefetch = onServerPrefetch; -exports.onUnmounted = onUnmounted; -exports.onUpdated = onUpdated; -exports.openBlock = openBlock; -exports.popScopeId = popScopeId; -exports.provide = provide; -exports.pushScopeId = pushScopeId; -exports.queuePostFlushCb = queuePostFlushCb; -exports.registerRuntimeCompiler = registerRuntimeCompiler; -exports.renderList = renderList; -exports.renderSlot = renderSlot; -exports.resolveComponent = resolveComponent; -exports.resolveDirective = resolveDirective; -exports.resolveDynamicComponent = resolveDynamicComponent; -exports.resolveFilter = resolveFilter; -exports.resolveTransitionHooks = resolveTransitionHooks; -exports.setBlockTracking = setBlockTracking; -exports.setDevtoolsHook = setDevtoolsHook; -exports.setTransitionHooks = setTransitionHooks; -exports.ssrContextKey = ssrContextKey; -exports.ssrUtils = ssrUtils; -exports.toHandlers = toHandlers; -exports.transformVNodeArgs = transformVNodeArgs; -exports.useAttrs = useAttrs; -exports.useId = useId; -exports.useModel = useModel; -exports.useSSRContext = useSSRContext; -exports.useSlots = useSlots; -exports.useTemplateRef = useTemplateRef; -exports.useTransitionState = useTransitionState; -exports.version = version; -exports.warn = warn; -exports.watch = watch; -exports.watchEffect = watchEffect; -exports.watchPostEffect = watchPostEffect; -exports.watchSyncEffect = watchSyncEffect; -exports.withAsyncContext = withAsyncContext; -exports.withCtx = withCtx; -exports.withDefaults = withDefaults; -exports.withDirectives = withDirectives; -exports.withMemo = withMemo; -exports.withScopeId = withScopeId; diff --git a/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js b/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js deleted file mode 100644 index a2ed5e5..0000000 --- a/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +++ /dev/null @@ -1,6654 +0,0 @@ -/** -* @vue/runtime-core v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var reactivity = require('@vue/reactivity'); -var shared = require('@vue/shared'); - -function pushWarningContext(vnode) { -} -function popWarningContext() { -} -function assertNumber(val, type) { - return; -} - -const ErrorCodes = { - "SETUP_FUNCTION": 0, - "0": "SETUP_FUNCTION", - "RENDER_FUNCTION": 1, - "1": "RENDER_FUNCTION", - "NATIVE_EVENT_HANDLER": 5, - "5": "NATIVE_EVENT_HANDLER", - "COMPONENT_EVENT_HANDLER": 6, - "6": "COMPONENT_EVENT_HANDLER", - "VNODE_HOOK": 7, - "7": "VNODE_HOOK", - "DIRECTIVE_HOOK": 8, - "8": "DIRECTIVE_HOOK", - "TRANSITION_HOOK": 9, - "9": "TRANSITION_HOOK", - "APP_ERROR_HANDLER": 10, - "10": "APP_ERROR_HANDLER", - "APP_WARN_HANDLER": 11, - "11": "APP_WARN_HANDLER", - "FUNCTION_REF": 12, - "12": "FUNCTION_REF", - "ASYNC_COMPONENT_LOADER": 13, - "13": "ASYNC_COMPONENT_LOADER", - "SCHEDULER": 14, - "14": "SCHEDULER", - "COMPONENT_UPDATE": 15, - "15": "COMPONENT_UPDATE", - "APP_UNMOUNT_CLEANUP": 16, - "16": "APP_UNMOUNT_CLEANUP" -}; -const ErrorTypeStrings$1 = { - ["sp"]: "serverPrefetch hook", - ["bc"]: "beforeCreate hook", - ["c"]: "created hook", - ["bm"]: "beforeMount hook", - ["m"]: "mounted hook", - ["bu"]: "beforeUpdate hook", - ["u"]: "updated", - ["bum"]: "beforeUnmount hook", - ["um"]: "unmounted hook", - ["a"]: "activated hook", - ["da"]: "deactivated hook", - ["ec"]: "errorCaptured hook", - ["rtc"]: "renderTracked hook", - ["rtg"]: "renderTriggered hook", - [0]: "setup function", - [1]: "render function", - [2]: "watcher getter", - [3]: "watcher callback", - [4]: "watcher cleanup function", - [5]: "native event handler", - [6]: "component event handler", - [7]: "vnode hook", - [8]: "directive hook", - [9]: "transition hook", - [10]: "app errorHandler", - [11]: "app warnHandler", - [12]: "ref function", - [13]: "async component loader", - [14]: "scheduler flush", - [15]: "component update", - [16]: "app unmount cleanup function" -}; -function callWithErrorHandling(fn, instance, type, args) { - try { - return args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance, type); - } -} -function callWithAsyncErrorHandling(fn, instance, type, args) { - if (shared.isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && shared.isPromise(res)) { - res.catch((err) => { - handleError(err, instance, type); - }); - } - return res; - } - if (shared.isArray(fn)) { - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; - } -} -function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || shared.EMPTY_OBJ; - if (instance) { - let cur = instance.parent; - const exposedInstance = instance.proxy; - const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - if (errorHandler) { - reactivity.pauseTracking(); - callWithErrorHandling(errorHandler, null, 10, [ - err, - exposedInstance, - errorInfo - ]); - reactivity.resetTracking(); - return; - } - } - logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); -} -function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { - if (throwInProd) { - throw err; - } else { - console.error(err); - } -} - -const queue = []; -let flushIndex = -1; -const pendingPostFlushCbs = []; -let activePostFlushCbs = null; -let postFlushIndex = 0; -const resolvedPromise = /* @__PURE__ */ Promise.resolve(); -let currentFlushPromise = null; -function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; -} -function findInsertionIndex(id) { - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = start + end >>> 1; - const middleJob = queue[middle]; - const middleJobId = getId(middleJob); - if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { - start = middle + 1; - } else { - end = middle; - } - } - return start; -} -function queueJob(job) { - if (!(job.flags & 1)) { - const jobId = getId(job); - const lastJob = queue[queue.length - 1]; - if (!lastJob || // fast path when the job id is larger than the tail - !(job.flags & 2) && jobId >= getId(lastJob)) { - queue.push(job); - } else { - queue.splice(findInsertionIndex(jobId), 0, job); - } - job.flags |= 1; - queueFlush(); - } -} -function queueFlush() { - if (!currentFlushPromise) { - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function queuePostFlushCb(cb) { - if (!shared.isArray(cb)) { - if (activePostFlushCbs && cb.id === -1) { - activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); - } else if (!(cb.flags & 1)) { - pendingPostFlushCbs.push(cb); - cb.flags |= 1; - } - } else { - pendingPostFlushCbs.push(...cb); - } - queueFlush(); -} -function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { - for (; i < queue.length; i++) { - const cb = queue[i]; - if (cb && cb.flags & 2) { - if (instance && cb.id !== instance.uid) { - continue; - } - queue.splice(i, 1); - i--; - if (cb.flags & 4) { - cb.flags &= ~1; - } - cb(); - if (!(cb.flags & 4)) { - cb.flags &= ~1; - } - } - } -} -function flushPostFlushCbs(seen) { - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)].sort( - (a, b) => getId(a) - getId(b) - ); - pendingPostFlushCbs.length = 0; - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - const cb = activePostFlushCbs[postFlushIndex]; - if (cb.flags & 4) { - cb.flags &= ~1; - } - if (!(cb.flags & 8)) cb(); - cb.flags &= ~1; - } - activePostFlushCbs = null; - postFlushIndex = 0; - } -} -const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; -function flushJobs(seen) { - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && !(job.flags & 8)) { - if (false) ; - if (job.flags & 4) { - job.flags &= ~1; - } - callWithErrorHandling( - job, - job.i, - job.i ? 15 : 14 - ); - if (!(job.flags & 4)) { - job.flags &= ~1; - } - } - } - } finally { - for (; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job) { - job.flags &= ~1; - } - } - flushIndex = -1; - queue.length = 0; - flushPostFlushCbs(); - currentFlushPromise = null; - if (queue.length || pendingPostFlushCbs.length) { - flushJobs(); - } - } -} - -let currentRenderingInstance = null; -let currentScopeId = null; -function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = instance && instance.type.__scopeId || null; - return prev; -} -function pushScopeId(id) { - currentScopeId = id; -} -function popScopeId() { - currentScopeId = null; -} -const withScopeId = (_id) => withCtx; -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { - if (!ctx) return fn; - if (fn._n) { - return fn; - } - const renderFnWithContext = (...args) => { - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - let res; - try { - res = fn(...args); - } finally { - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - } - return res; - }; - renderFnWithContext._n = true; - renderFnWithContext._c = true; - renderFnWithContext._d = true; - return renderFnWithContext; -} - -function withDirectives(vnode, directives) { - if (currentRenderingInstance === null) { - return vnode; - } - const instance = getComponentPublicInstance(currentRenderingInstance); - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i]; - if (dir) { - if (shared.isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - reactivity.traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - reactivity.pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - reactivity.resetTracking(); - } - } -} - -const TeleportEndKey = Symbol("_vte"); -const isTeleport = (type) => type.__isTeleport; -const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); -const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); -const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; -const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; -const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (shared.isString(targetSelector)) { - if (!select) { - return null; - } else { - const target = select(targetSelector); - return target; - } - } else { - return targetSelector; - } -}; -const TeleportImpl = { - name: "Teleport", - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { - const { - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - o: { insert, querySelector, createText, createComment } - } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - if (n1 == null) { - const placeholder = n2.el = createText(""); - const mainAnchor = n2.anchor = createText(""); - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const mount = (container2, anchor2) => { - if (shapeFlag & 16) { - if (parentComponent && parentComponent.isCE) { - parentComponent.ce._teleportTarget = container2; - } - mountChildren( - children, - container2, - anchor2, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const mountToTarget = () => { - const target = n2.target = resolveTarget(n2.props, querySelector); - const targetAnchor = prepareAnchor(target, n2, createText, insert); - if (target) { - if (namespace !== "svg" && isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace !== "mathml" && isTargetMathML(target)) { - namespace = "mathml"; - } - if (!disabled) { - mount(target, targetAnchor); - updateCssVars(n2, false); - } - } - }; - if (disabled) { - mount(container, mainAnchor); - updateCssVars(n2, true); - } - if (isTeleportDeferred(n2.props)) { - queuePostRenderEffect(() => { - mountToTarget(); - n2.el.__isMounted = true; - }, parentSuspense); - } else { - mountToTarget(); - } - } else { - if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { - queuePostRenderEffect(() => { - TeleportImpl.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - delete n1.el.__isMounted; - }, parentSuspense); - return; - } - n2.el = n1.el; - n2.targetStart = n1.targetStart; - const mainAnchor = n2.anchor = n1.anchor; - const target = n2.target = n1.target; - const targetAnchor = n2.targetAnchor = n1.targetAnchor; - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - if (namespace === "svg" || isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace === "mathml" || isTargetMathML(target)) { - namespace = "mathml"; - } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - currentContainer, - parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - traverseStaticChildren(n1, n2, true); - } else if (!optimized) { - patchChildren( - n1, - n2, - currentContainer, - currentAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - false - ); - } - if (disabled) { - if (!wasDisabled) { - moveTeleport( - n2, - container, - mainAnchor, - internals, - 1 - ); - } else { - if (n2.props && n1.props && n2.props.to !== n1.props.to) { - n2.props.to = n1.props.to; - } - } - } else { - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = n2.target = resolveTarget( - n2.props, - querySelector - ); - if (nextTarget) { - moveTeleport( - n2, - nextTarget, - null, - internals, - 0 - ); - } - } else if (wasDisabled) { - moveTeleport( - n2, - target, - targetAnchor, - internals, - 1 - ); - } - } - updateCssVars(n2, disabled); - } - }, - remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { - shapeFlag, - children, - anchor, - targetStart, - targetAnchor, - target, - props - } = vnode; - if (target) { - hostRemove(targetStart); - hostRemove(targetAnchor); - } - doRemove && hostRemove(anchor); - if (shapeFlag & 16) { - const shouldRemove = doRemove || !isTeleportDisabled(props); - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount( - child, - parentComponent, - parentSuspense, - shouldRemove, - !!child.dynamicChildren - ); - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport -}; -function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { - if (moveType === 0) { - insert(vnode.targetAnchor, container, parentAnchor); - } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2; - if (isReorder) { - insert(el, container, parentAnchor); - } - if (!isReorder || isTeleportDisabled(props)) { - if (shapeFlag & 16) { - for (let i = 0; i < children.length; i++) { - move( - children[i], - container, - parentAnchor, - 2 - ); - } - } - } - if (isReorder) { - insert(anchor, container, parentAnchor); - } -} -function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { - o: { nextSibling, parentNode, querySelector, insert, createText } -}, hydrateChildren) { - const target = vnode.target = resolveTarget( - vnode.props, - querySelector - ); - if (target) { - const disabled = isTeleportDisabled(vnode.props); - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16) { - if (disabled) { - vnode.anchor = hydrateChildren( - nextSibling(node), - vnode, - parentNode(node), - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - vnode.targetStart = targetNode; - vnode.targetAnchor = targetNode && nextSibling(targetNode); - } else { - vnode.anchor = nextSibling(node); - let targetAnchor = targetNode; - while (targetAnchor) { - if (targetAnchor && targetAnchor.nodeType === 8) { - if (targetAnchor.data === "teleport start anchor") { - vnode.targetStart = targetAnchor; - } else if (targetAnchor.data === "teleport anchor") { - vnode.targetAnchor = targetAnchor; - target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - targetAnchor = nextSibling(targetAnchor); - } - if (!vnode.targetAnchor) { - prepareAnchor(target, vnode, createText, insert); - } - hydrateChildren( - targetNode && nextSibling(targetNode), - vnode, - target, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - } - updateCssVars(vnode, disabled); - } - return vnode.anchor && nextSibling(vnode.anchor); -} -const Teleport = TeleportImpl; -function updateCssVars(vnode, isDisabled) { - const ctx = vnode.ctx; - if (ctx && ctx.ut) { - let node, anchor; - if (isDisabled) { - node = vnode.el; - anchor = vnode.anchor; - } else { - node = vnode.targetStart; - anchor = vnode.targetAnchor; - } - while (node && node !== anchor) { - if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); - node = node.nextSibling; - } - ctx.ut(); - } -} -function prepareAnchor(target, vnode, createText, insert) { - const targetStart = vnode.targetStart = createText(""); - const targetAnchor = vnode.targetAnchor = createText(""); - targetStart[TeleportEndKey] = targetAnchor; - if (target) { - insert(targetStart, target); - insert(targetAnchor, target); - } - return targetAnchor; -} - -const leaveCbKey = Symbol("_leaveCb"); -const enterCbKey = Symbol("_enterCb"); -function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: /* @__PURE__ */ new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; -} -const TransitionHookValidator = [Function, Array]; -const BaseTransitionPropsValidators = { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator -}; -const recursiveGetSubtree = (instance) => { - const subTree = instance.subTree; - return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; -}; -const BaseTransitionImpl = { - name: `BaseTransition`, - props: BaseTransitionPropsValidators, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - const child = findNonCommentChild(children); - const rawProps = reactivity.toRaw(props); - const { mode } = rawProps; - if (state.isLeaving) { - return emptyPlaceholder(child); - } - const innerChild = getInnerChild$1(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - let enterHooks = resolveTransitionHooks( - innerChild, - rawProps, - state, - instance, - // #11061, ensure enterHooks is fresh after clone - (hooks) => enterHooks = hooks - ); - if (innerChild.type !== Comment) { - setTransitionHooks(innerChild, enterHooks); - } - let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); - if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { - let leavingHooks = resolveTransitionHooks( - oldInnerChild, - rawProps, - state, - instance - ); - setTransitionHooks(oldInnerChild, leavingHooks); - if (mode === "out-in" && innerChild.type !== Comment) { - state.isLeaving = true; - leavingHooks.afterLeave = () => { - state.isLeaving = false; - if (!(instance.job.flags & 8)) { - instance.update(); - } - delete leavingHooks.afterLeave; - oldInnerChild = void 0; - }; - return emptyPlaceholder(child); - } else if (mode === "in-out" && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType( - state, - oldInnerChild - ); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - el[leaveCbKey] = () => { - earlyRemove(); - el[leaveCbKey] = void 0; - delete enterHooks.delayedLeave; - oldInnerChild = void 0; - }; - enterHooks.delayedLeave = () => { - delayedLeave(); - delete enterHooks.delayedLeave; - oldInnerChild = void 0; - }; - }; - } else { - oldInnerChild = void 0; - } - } else if (oldInnerChild) { - oldInnerChild = void 0; - } - return child; - }; - } -}; -function findNonCommentChild(children) { - let child = children[0]; - if (children.length > 1) { - for (const c of children) { - if (c.type !== Comment) { - child = c; - break; - } - } - } - return child; -} -const BaseTransition = BaseTransitionImpl; -function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = /* @__PURE__ */ Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; -} -function resolveTransitionHooks(vnode, props, state, instance, postClone) { - const { - appear, - mode, - persisted = false, - onBeforeEnter, - onEnter, - onAfterEnter, - onEnterCancelled, - onBeforeLeave, - onLeave, - onAfterLeave, - onLeaveCancelled, - onBeforeAppear, - onAppear, - onAfterAppear, - onAppearCancelled - } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && callWithAsyncErrorHandling( - hook, - instance, - 9, - args - ); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (shared.isArray(hook)) { - if (hook.every((hook2) => hook2.length <= 1)) done(); - } else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } else { - return; - } - } - if (el[leaveCbKey]) { - el[leaveCbKey]( - true - /* cancelled */ - ); - } - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { - leavingVNode.el[leaveCbKey](); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } else { - return; - } - } - let called = false; - const done = el[enterCbKey] = (cancelled) => { - if (called) return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el[enterCbKey] = void 0; - }; - if (hook) { - callAsyncHook(hook, [el, done]); - } else { - done(); - } - }, - leave(el, remove) { - const key2 = String(vnode.key); - if (el[enterCbKey]) { - el[enterCbKey]( - true - /* cancelled */ - ); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = el[leaveCbKey] = (cancelled) => { - if (called) return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } else { - callHook(onAfterLeave, [el]); - } - el[leaveCbKey] = void 0; - if (leavingVNodesCache[key2] === vnode) { - delete leavingVNodesCache[key2]; - } - }; - leavingVNodesCache[key2] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } else { - done(); - } - }, - clone(vnode2) { - const hooks2 = resolveTransitionHooks( - vnode2, - props, - state, - instance, - postClone - ); - if (postClone) postClone(hooks2); - return hooks2; - } - }; - return hooks; -} -function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; - } -} -function getInnerChild$1(vnode) { - if (!isKeepAlive(vnode)) { - if (isTeleport(vnode.type) && vnode.children) { - return findNonCommentChild(vnode.children); - } - return vnode; - } - const { shapeFlag, children } = vnode; - if (children) { - if (shapeFlag & 16) { - return children[0]; - } - if (shapeFlag & 32 && shared.isFunction(children.default)) { - return children.default(); - } - } -} -function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 && vnode.component) { - vnode.transition = hooks; - setTransitionHooks(vnode.component.subTree, hooks); - } else if (vnode.shapeFlag & 128) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } else { - vnode.transition = hooks; - } -} -function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); - if (child.type === Fragment) { - if (child.patchFlag & 128) keyedFragmentCount++; - ret = ret.concat( - getTransitionRawChildren(child.children, keepComment, key) - ); - } else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } - } - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2; - } - } - return ret; -} - -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineComponent(options, extraOptions) { - return shared.isFunction(options) ? ( - // #8236: extend call and options.name access are considered side-effects - // by Rollup, so we have to wrap it in a pure-annotated IIFE. - /* @__PURE__ */ (() => shared.extend({ name: options.name }, extraOptions, { setup: options }))() - ) : options; -} - -function useId() { - const i = getCurrentInstance(); - if (i) { - return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; - } - return ""; -} -function markAsyncBoundary(instance) { - instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; -} - -function useTemplateRef(key) { - const i = getCurrentInstance(); - const r = reactivity.shallowRef(null); - if (i) { - const refs = i.refs === shared.EMPTY_OBJ ? i.refs = {} : i.refs; - { - Object.defineProperty(refs, key, { - enumerable: true, - get: () => r.value, - set: (val) => r.value = val - }); - } - } - const ret = r; - return ret; -} - -function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (shared.isArray(rawRef)) { - rawRef.forEach( - (r, i) => setRef( - r, - oldRawRef && (shared.isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), - parentSuspense, - vnode, - isUnmount - ) - ); - return; - } - if (isAsyncWrapper(vnode) && !isUnmount) { - if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { - setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); - } - return; - } - const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === shared.EMPTY_OBJ ? owner.refs = {} : owner.refs; - const setupState = owner.setupState; - const rawSetupState = reactivity.toRaw(setupState); - const canSetSetupRef = setupState === shared.EMPTY_OBJ ? () => false : (key) => { - return shared.hasOwn(rawSetupState, key); - }; - if (oldRef != null && oldRef !== ref) { - if (shared.isString(oldRef)) { - refs[oldRef] = null; - if (canSetSetupRef(oldRef)) { - setupState[oldRef] = null; - } - } else if (reactivity.isRef(oldRef)) { - oldRef.value = null; - } - } - if (shared.isFunction(ref)) { - callWithErrorHandling(ref, owner, 12, [value, refs]); - } else { - const _isString = shared.isString(ref); - const _isRef = reactivity.isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; - if (isUnmount) { - shared.isArray(existing) && shared.remove(existing, refValue); - } else { - if (!shared.isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (canSetSetupRef(ref)) { - setupState[ref] = refs[ref]; - } - } else { - ref.value = [refValue]; - if (rawRef.k) refs[rawRef.k] = ref.value; - } - } else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } else if (_isString) { - refs[ref] = value; - if (canSetSetupRef(ref)) { - setupState[ref] = value; - } - } else if (_isRef) { - ref.value = value; - if (rawRef.k) refs[rawRef.k] = value; - } else ; - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } else { - doSet(); - } - } - } -} - -let hasLoggedMismatchError = false; -const logMismatchError = () => { - if (hasLoggedMismatchError) { - return; - } - console.error("Hydration completed but contains mismatches."); - hasLoggedMismatchError = true; -}; -const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; -const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); -const getContainerType = (container) => { - if (container.nodeType !== 1) return void 0; - if (isSVGContainer(container)) return "svg"; - if (isMathMLContainer(container)) return "mathml"; - return void 0; -}; -const isComment = (node) => node.nodeType === 8; -function createHydrationFunctions(rendererInternals) { - const { - mt: mountComponent, - p: patch, - o: { - patchProp, - createText, - nextSibling, - parentNode, - remove, - insert, - createComment - } - } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - patch(null, vnode, container); - flushPostFlushCbs(); - container._vnode = vnode; - return; - } - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - container._vnode = vnode; - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - optimized = optimized || !!vnode.dynamicChildren; - const isFragmentStart = isComment(node) && node.data === "["; - const onMismatch = () => handleMismatch( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - isFragmentStart - ); - const { type, ref, shapeFlag, patchFlag } = vnode; - let domType = node.nodeType; - vnode.el = node; - if (patchFlag === -2) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3) { - if (vnode.children === "") { - insert(vnode.el = createText(""), parentNode(node), node); - nextNode = node; - } else { - nextNode = onMismatch(); - } - } else { - if (node.data !== vnode.children) { - logMismatchError(); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (isTemplateNode(node)) { - nextNode = nextSibling(node); - replaceNode( - vnode.el = node.content.firstChild, - node, - parentComponent - ); - } else if (domType !== 8 || isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = nextSibling(node); - } - break; - case Static: - if (isFragmentStart) { - node = nextSibling(node); - domType = node.nodeType; - } - if (domType === 1 || domType === 3) { - nextNode = node; - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return isFragmentStart ? nextSibling(nextNode) : nextNode; - } else { - onMismatch(); - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = hydrateFragment( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - break; - default: - if (shapeFlag & 1) { - if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { - nextNode = onMismatch(); - } else { - nextNode = hydrateElement( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - } else if (shapeFlag & 6) { - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - if (isFragmentStart) { - nextNode = locateClosingAnchor(node); - } else if (isComment(node) && node.data === "teleport start") { - nextNode = locateClosingAnchor(node, node.data, "teleport end"); - } else { - nextNode = nextSibling(node); - } - mountComponent( - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - optimized - ); - if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; - } else { - subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } else if (shapeFlag & 64) { - if (domType !== 8) { - nextNode = onMismatch(); - } else { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized, - rendererInternals, - hydrateChildren - ); - } - } else if (shapeFlag & 128) { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - getContainerType(parentNode(node)), - slotScopeIds, - optimized, - rendererInternals, - hydrateNode - ); - } else ; - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; - const forcePatch = type === "input" || type === "option"; - if (forcePatch || patchFlag !== -1) { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - let needCallTransitionHooks = false; - if (isTemplateNode(el)) { - needCallTransitionHooks = needTransition( - null, - // no need check parentSuspense in hydration - transition - ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; - const content = el.content.firstChild; - if (needCallTransitionHooks) { - transition.beforeEnter(content); - } - replaceNode(content, el, parentComponent); - vnode.el = el = content; - } - if (shapeFlag & 16 && // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren( - el.firstChild, - vnode, - el, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - while (next) { - if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { - logMismatchError(); - } - const cur = next; - next = next.nextSibling; - remove(cur); - } - } else if (shapeFlag & 8) { - let clientText = vnode.children; - if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { - clientText = clientText.slice(1); - } - if (el.textContent !== clientText) { - if (!isMismatchAllowed(el, 0 /* TEXT */)) { - logMismatchError(); - } - el.textContent = vnode.children; - } - } - if (props) { - if (forcePatch || !optimized || patchFlag & (16 | 32)) { - const isCustomElement = el.tagName.includes("-"); - for (const key in props) { - if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers - key[0] === "." || isCustomElement) { - patchProp(el, key, null, props[key], void 0, parentComponent); - } - } - } else if (props.onClick) { - patchProp( - el, - "onClick", - null, - props.onClick, - void 0, - parentComponent - ); - } else if (patchFlag & 4 && reactivity.isReactive(props.style)) { - for (const key in props.style) props.style[key]; - } - } - let vnodeHooks; - if (vnodeHooks = props && props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - for (let i = 0; i < l; i++) { - const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); - const isText = vnode.type === Text; - if (node) { - if (isText && !optimized) { - if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { - insert( - createText( - node.data.slice(vnode.children.length) - ), - container, - nextSibling(node) - ); - node.data = vnode.children; - } - } - node = hydrateNode( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } else if (isText && !vnode.children) { - insert(vnode.el = createText(""), container); - } else { - if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { - logMismatchError(); - } - patch( - null, - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren( - nextSibling(node), - vnode, - container, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - if (next && isComment(next) && next.data === "]") { - return nextSibling(vnode.anchor = next); - } else { - logMismatchError(); - insert(vnode.anchor = createComment(`]`), container, next); - return next; - } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { - if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { - logMismatchError(); - } - vnode.el = null; - if (isFragment) { - const end = locateClosingAnchor(node); - while (true) { - const next2 = nextSibling(node); - if (next2 && next2 !== end) { - remove(next2); - } else { - break; - } - } - } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch( - null, - vnode, - container, - next, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - if (parentComponent) { - parentComponent.vnode.el = vnode.el; - updateHOCHostEl(parentComponent, vnode.el); - } - return next; - }; - const locateClosingAnchor = (node, open = "[", close = "]") => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === open) match++; - if (node.data === close) { - if (match === 0) { - return nextSibling(node); - } else { - match--; - } - } - } - } - return node; - }; - const replaceNode = (newNode, oldNode, parentComponent) => { - const parentNode2 = oldNode.parentNode; - if (parentNode2) { - parentNode2.replaceChild(newNode, oldNode); - } - let parent = parentComponent; - while (parent) { - if (parent.vnode.el === oldNode) { - parent.vnode.el = parent.subTree.el = newNode; - } - parent = parent.parent; - } - }; - const isTemplateNode = (node) => { - return node.nodeType === 1 && node.tagName === "TEMPLATE"; - }; - return [hydrate, hydrateNode]; -} -const allowMismatchAttr = "data-allow-mismatch"; -const MismatchTypeString = { - [0 /* TEXT */]: "text", - [1 /* CHILDREN */]: "children", - [2 /* CLASS */]: "class", - [3 /* STYLE */]: "style", - [4 /* ATTRIBUTE */]: "attribute" -}; -function isMismatchAllowed(el, allowedType) { - if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { - while (el && !el.hasAttribute(allowMismatchAttr)) { - el = el.parentElement; - } - } - const allowedAttr = el && el.getAttribute(allowMismatchAttr); - if (allowedAttr == null) { - return false; - } else if (allowedAttr === "") { - return true; - } else { - const list = allowedAttr.split(","); - if (allowedType === 0 /* TEXT */ && list.includes("children")) { - return true; - } - return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); - } -} - -const requestIdleCallback = shared.getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); -const cancelIdleCallback = shared.getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); -const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { - const id = requestIdleCallback(hydrate, { timeout }); - return () => cancelIdleCallback(id); -}; -function elementIsVisibleInViewport(el) { - const { top, left, bottom, right } = el.getBoundingClientRect(); - const { innerHeight, innerWidth } = window; - return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); -} -const hydrateOnVisible = (opts) => (hydrate, forEach) => { - const ob = new IntersectionObserver((entries) => { - for (const e of entries) { - if (!e.isIntersecting) continue; - ob.disconnect(); - hydrate(); - break; - } - }, opts); - forEach((el) => { - if (!(el instanceof Element)) return; - if (elementIsVisibleInViewport(el)) { - hydrate(); - ob.disconnect(); - return false; - } - ob.observe(el); - }); - return () => ob.disconnect(); -}; -const hydrateOnMediaQuery = (query) => (hydrate) => { - if (query) { - const mql = matchMedia(query); - if (mql.matches) { - hydrate(); - } else { - mql.addEventListener("change", hydrate, { once: true }); - return () => mql.removeEventListener("change", hydrate); - } - } -}; -const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { - if (shared.isString(interactions)) interactions = [interactions]; - let hasHydrated = false; - const doHydrate = (e) => { - if (!hasHydrated) { - hasHydrated = true; - teardown(); - hydrate(); - e.target.dispatchEvent(new e.constructor(e.type, e)); - } - }; - const teardown = () => { - forEach((el) => { - for (const i of interactions) { - el.removeEventListener(i, doHydrate); - } - }); - }; - forEach((el) => { - for (const i of interactions) { - el.addEventListener(i, doHydrate, { once: true }); - } - }); - return teardown; -}; -function forEachElement(node, cb) { - if (isComment(node) && node.data === "[") { - let depth = 1; - let next = node.nextSibling; - while (next) { - if (next.nodeType === 1) { - const result = cb(next); - if (result === false) { - break; - } - } else if (isComment(next)) { - if (next.data === "]") { - if (--depth === 0) break; - } else if (next.data === "[") { - depth++; - } - } - next = next.nextSibling; - } - } else { - cb(node); - } -} - -const isAsyncWrapper = (i) => !!i.type.__asyncLoader; -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineAsyncComponent(source) { - if (shared.isFunction(source)) { - source = { loader: source }; - } - const { - loader, - loadingComponent, - errorComponent, - delay = 200, - hydrate: hydrateStrategy, - timeout, - // undefined = never times out - suspensible = true, - onError: userOnError - } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; - pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } else { - throw err; - } - }).then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { - comp = comp.default; - } - resolvedComp = comp; - return comp; - })); - }; - return defineComponent({ - name: "AsyncComponentWrapper", - __asyncLoader: load, - __asyncHydrate(el, instance, hydrate) { - const doHydrate = hydrateStrategy ? () => { - const teardown = hydrateStrategy( - hydrate, - (cb) => forEachElement(el, cb) - ); - if (teardown) { - (instance.bum || (instance.bum = [])).push(teardown); - } - } : hydrate; - if (resolvedComp) { - doHydrate(); - } else { - load().then(() => !instance.isUnmounted && doHydrate()); - } - }, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - markAsyncBoundary(instance); - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError( - err, - instance, - 13, - !errorComponent - ); - }; - if (suspensible && instance.suspense || isInSSRComponentSetup) { - return load().then((comp) => { - return () => createInnerComp(comp, instance); - }).catch((err) => { - onError(err); - return () => errorComponent ? createVNode(errorComponent, { - error: err - }) : null; - }); - } - const loaded = reactivity.ref(false); - const error = reactivity.ref(); - const delayed = reactivity.ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error( - `Async component timed out after ${timeout}ms.` - ); - onError(err); - error.value = err; - } - }, timeout); - } - load().then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - instance.parent.update(); - } - }).catch((err) => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; - } - }); -} -function createInnerComp(comp, parent) { - const { ref: ref2, props, children, ce } = parent.vnode; - const vnode = createVNode(comp, props, children); - vnode.ref = ref2; - vnode.ce = ce; - delete parent.vnode.ce; - return vnode; -} - -const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; -const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const sharedContext = instance.ctx; - if (!sharedContext.renderer) { - return () => { - const children = slots.default && slots.default(); - return children && children.length === 1 ? children[0] : children; - }; - } - const cache = /* @__PURE__ */ new Map(); - const keys = /* @__PURE__ */ new Set(); - let current = null; - const parentSuspense = instance.suspense; - const { - renderer: { - p: patch, - m: move, - um: _unmount, - o: { createElement } - } - } = sharedContext; - const storageContainer = createElement("div"); - sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { - const instance2 = vnode.component; - move(vnode, container, anchor, 0, parentSuspense); - patch( - instance2.vnode, - vnode, - container, - anchor, - instance2, - parentSuspense, - namespace, - vnode.slotScopeIds, - optimized - ); - queuePostRenderEffect(() => { - instance2.isDeactivated = false; - if (instance2.a) { - shared.invokeArrayFns(instance2.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - }, parentSuspense); - }; - sharedContext.deactivate = (vnode) => { - const instance2 = vnode.component; - invalidateMount(instance2.m); - invalidateMount(instance2.a); - move(vnode, storageContainer, null, 1, parentSuspense); - queuePostRenderEffect(() => { - if (instance2.da) { - shared.invokeArrayFns(instance2.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - instance2.isDeactivated = true; - }, parentSuspense); - }; - function unmount(vnode) { - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && !filter(name)) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (cached && (!current || !isSameVNodeType(cached, current))) { - unmount(cached); - } else if (current) { - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - watch( - () => [props.include, props.exclude], - ([include, exclude]) => { - include && pruneCache((name) => matches(include, name)); - exclude && pruneCache((name) => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: "post", deep: true } - ); - let pendingCacheKey = null; - const cacheSubtree = () => { - if (pendingCacheKey != null) { - if (isSuspense(instance.subTree.type)) { - queuePostRenderEffect(() => { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - }, instance.subTree.suspense); - } else { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach((cached) => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type && cached.key === vnode.key) { - resetShapeFlag(vnode); - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return current = null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - current = null; - return children; - } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - if (vnode.type === Comment) { - current = null; - return vnode; - } - const comp = vnode.type; - const name = getComponentName( - isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp - ); - const { include, exclude, max } = props; - if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { - vnode.shapeFlag &= ~256; - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128) { - rawVNode.ssContent = vnode; - } - } - pendingCacheKey = key; - if (cachedVNode) { - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - setTransitionHooks(vnode, vnode.transition); - } - vnode.shapeFlag |= 512; - keys.delete(key); - keys.add(key); - } else { - keys.add(key); - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - vnode.shapeFlag |= 256; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; - } -}; -const KeepAlive = KeepAliveImpl; -function matches(pattern, name) { - if (shared.isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } else if (shared.isString(pattern)) { - return pattern.split(",").includes(name); - } else if (shared.isRegExp(pattern)) { - pattern.lastIndex = 0; - return pattern.test(name); - } - return false; -} -function onActivated(hook, target) { - registerKeepAliveHook(hook, "a", target); -} -function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da", target); -} -function registerKeepAliveHook(hook, type, target = currentInstance) { - const wrappedHook = hook.__wdc || (hook.__wdc = () => { - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } - } -} -function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - const injected = injectHook( - type, - hook, - keepAliveRoot, - true - /* prepend */ - ); - onUnmounted(() => { - shared.remove(keepAliveRoot[type], injected); - }, target); -} -function resetShapeFlag(vnode) { - vnode.shapeFlag &= ~256; - vnode.shapeFlag &= ~512; -} -function getInnerChild(vnode) { - return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; -} - -function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - const wrappedHook = hook.__weh || (hook.__weh = (...args) => { - reactivity.pauseTracking(); - const reset = setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - reset(); - reactivity.resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } else { - hooks.push(wrappedHook); - } - return wrappedHook; - } -} -const createHook = (lifecycle) => (hook, target = currentInstance) => { - if (!isInSSRComponentSetup || lifecycle === "sp") { - injectHook(lifecycle, (...args) => hook(...args), target); - } -}; -const onBeforeMount = createHook("bm"); -const onMounted = createHook("m"); -const onBeforeUpdate = createHook( - "bu" -); -const onUpdated = createHook("u"); -const onBeforeUnmount = createHook( - "bum" -); -const onUnmounted = createHook("um"); -const onServerPrefetch = createHook( - "sp" -); -const onRenderTriggered = createHook("rtg"); -const onRenderTracked = createHook("rtc"); -function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec", hook, target); -} - -const COMPONENTS = "components"; -const DIRECTIVES = "directives"; -function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; -} -const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); -function resolveDynamicComponent(component) { - if (shared.isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } else { - return component || NULL_DYNAMIC_COMPONENT; - } -} -function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); -} -function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - if (type === COMPONENTS) { - const selfName = getComponentName( - Component, - false - ); - if (selfName && (selfName === name || selfName === shared.camelize(name) || selfName === shared.capitalize(shared.camelize(name)))) { - return Component; - } - } - const res = ( - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || // global registration - resolve(instance.appContext[type], name) - ); - if (!res && maybeSelfReference) { - return Component; - } - return res; - } -} -function resolve(registry, name) { - return registry && (registry[name] || registry[shared.camelize(name)] || registry[shared.capitalize(shared.camelize(name))]); -} - -function renderList(source, renderItem, cache, index) { - let ret; - const cached = cache && cache[index]; - const sourceIsArray = shared.isArray(source); - if (sourceIsArray || shared.isString(source)) { - const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source); - let needsWrap = false; - if (sourceIsReactiveArray) { - needsWrap = !reactivity.isShallow(source); - source = reactivity.shallowReadArray(source); - } - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem( - needsWrap ? reactivity.toReactive(source[i]) : source[i], - i, - void 0, - cached && cached[i] - ); - } - } else if (typeof source === "number") { - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); - } - } else if (shared.isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from( - source, - (item, i) => renderItem(item, i, void 0, cached && cached[i]) - ); - } else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } - } else { - ret = []; - } - if (cache) { - cache[index] = ret; - } - return ret; -} - -function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - if (shared.isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } else if (slot) { - slots[slot.name] = slot.key ? (...args) => { - const res = slot.fn(...args); - if (res) res.key = slot.key; - return res; - } : slot.fn; - } - } - return slots; -} - -function renderSlot(slots, name, props = {}, fallback, noSlotted) { - if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { - if (name !== "default") props.name = name; - return openBlock(), createBlock( - Fragment, - null, - [createVNode("slot", props, fallback && fallback())], - 64 - ); - } - let slot = slots[name]; - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch - // key attached in the `createSlots` helper, respect that - validSlotContent && validSlotContent.key; - const rendered = createBlock( - Fragment, - { - key: (slotKey && !shared.isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content - (!validSlotContent && fallback ? "_fb" : "") - }, - validSlotContent || (fallback ? fallback() : []), - validSlotContent && slots._ === 1 ? 64 : -2 - ); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + "-s"]; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; -} -function ensureValidVNode(vnodes) { - return vnodes.some((child) => { - if (!isVNode(child)) return true; - if (child.type === Comment) return false; - if (child.type === Fragment && !ensureValidVNode(child.children)) - return false; - return true; - }) ? vnodes : null; -} - -function toHandlers(obj, preserveCaseIfNecessary) { - const ret = {}; - for (const key in obj) { - ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : shared.toHandlerKey(key)] = obj[key]; - } - return ret; -} - -const getPublicInstance = (i) => { - if (!i) return null; - if (isStatefulComponent(i)) return getComponentPublicInstance(i); - return getPublicInstance(i.parent); -}; -const publicPropertiesMap = ( - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - /* @__PURE__ */ shared.extend(/* @__PURE__ */ Object.create(null), { - $: (i) => i, - $el: (i) => i.vnode.el, - $data: (i) => i.data, - $props: (i) => i.props, - $attrs: (i) => i.attrs, - $slots: (i) => i.slots, - $refs: (i) => i.refs, - $parent: (i) => getPublicInstance(i.parent), - $root: (i) => getPublicInstance(i.root), - $host: (i) => i.ce, - $emit: (i) => i.emit, - $options: (i) => resolveMergedOptions(i) , - $forceUpdate: (i) => i.f || (i.f = () => { - queueJob(i.update); - }), - $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: (i) => instanceWatch.bind(i) - }) -); -const hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key); -const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - if (key === "__v_skip") { - return true; - } - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - let normalizedProps; - if (key[0] !== "$") { - const n = accessCache[key]; - if (n !== void 0) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - } - } else if (hasSetupBinding(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && shared.hasOwn(normalizedProps, key) - ) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } else if (shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - if (publicGetter) { - if (key === "$attrs") { - reactivity.track(instance.attrs, "get", ""); - } - return publicGetter(instance); - } else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && (cssModule = cssModule[key]) - ) { - return cssModule; - } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } else if ( - // global properties - globalProperties = appContext.config.globalProperties, shared.hasOwn(globalProperties, key) - ) { - { - return globalProperties[key]; - } - } else ; - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (hasSetupBinding(setupState, key)) { - setupState[key] = value; - return true; - } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { - data[key] = value; - return true; - } else if (shared.hasOwn(instance.props, key)) { - return false; - } - if (key[0] === "$" && key.slice(1) in instance) { - return false; - } else { - { - ctx[key] = value; - } - } - return true; - }, - has({ - _: { data, setupState, accessCache, ctx, appContext, propsOptions } - }, key) { - let normalizedProps; - return !!accessCache[key] || data !== shared.EMPTY_OBJ && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key) || shared.hasOwn(ctx, key) || shared.hasOwn(publicPropertiesMap, key) || shared.hasOwn(appContext.config.globalProperties, key); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - target._.accessCache[key] = 0; - } else if (shared.hasOwn(descriptor, "value")) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); - } -}; -const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ shared.extend({}, PublicInstanceProxyHandlers, { - get(target, key) { - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); - }, - has(_, key) { - const has = key[0] !== "_" && !shared.isGloballyAllowed(key); - return has; - } -}); - -function defineProps() { - return null; -} -function defineEmits() { - return null; -} -function defineExpose(exposed) { -} -function defineOptions(options) { -} -function defineSlots() { - return null; -} -function defineModel() { -} -function withDefaults(props, defaults) { - return null; -} -function useSlots() { - return getContext().slots; -} -function useAttrs() { - return getContext().attrs; -} -function getContext() { - const i = getCurrentInstance(); - return i.setupContext || (i.setupContext = createSetupContext(i)); -} -function normalizePropsOrEmits(props) { - return shared.isArray(props) ? props.reduce( - (normalized, p) => (normalized[p] = null, normalized), - {} - ) : props; -} -function mergeDefaults(raw, defaults) { - const props = normalizePropsOrEmits(raw); - for (const key in defaults) { - if (key.startsWith("__skip")) continue; - let opt = props[key]; - if (opt) { - if (shared.isArray(opt) || shared.isFunction(opt)) { - opt = props[key] = { type: opt, default: defaults[key] }; - } else { - opt.default = defaults[key]; - } - } else if (opt === null) { - opt = props[key] = { default: defaults[key] }; - } else ; - if (opt && defaults[`__skip_${key}`]) { - opt.skipFactory = true; - } - } - return props; -} -function mergeModels(a, b) { - if (!a || !b) return a || b; - if (shared.isArray(a) && shared.isArray(b)) return a.concat(b); - return shared.extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); -} -function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; -} -function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (shared.isPromise(awaitable)) { - awaitable = awaitable.catch((e) => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; -} - -let shouldCacheAccess = true; -function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - shouldCacheAccess = false; - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc"); - } - const { - // state - data: dataOptions, - computed: computedOptions, - methods, - watch: watchOptions, - provide: provideOptions, - inject: injectOptions, - // lifecycle - created, - beforeMount, - mounted, - beforeUpdate, - updated, - activated, - deactivated, - beforeDestroy, - beforeUnmount, - destroyed, - unmounted, - render, - renderTracked, - renderTriggered, - errorCaptured, - serverPrefetch, - // public API - expose, - inheritAttrs, - // assets - components, - directives, - filters - } = options; - const checkDuplicateProperties = null; - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (shared.isFunction(methodHandler)) { - { - ctx[key] = methodHandler.bind(publicThis); - } - } - } - } - if (dataOptions) { - const data = dataOptions.call(publicThis, publicThis); - if (!shared.isObject(data)) ; else { - instance.data = reactivity.reactive(data); - } - } - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = shared.isFunction(opt) ? opt.bind(publicThis, publicThis) : shared.isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : shared.NOOP; - const set = !shared.isFunction(opt) && shared.isFunction(opt.set) ? opt.set.bind(publicThis) : shared.NOOP; - const c = computed({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: (v) => c.value = v - }); - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = shared.isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; - Reflect.ownKeys(provides).forEach((key) => { - provide(key, provides[key]); - }); - } - if (created) { - callHook(created, instance, "c"); - } - function registerLifecycleHook(register, hook) { - if (shared.isArray(hook)) { - hook.forEach((_hook) => register(_hook.bind(publicThis))); - } else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (shared.isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach((key) => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: (val) => publicThis[key] = val - }); - }); - } else if (!instance.exposed) { - instance.exposed = {}; - } - } - if (render && instance.render === shared.NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - if (components) instance.components = components; - if (directives) instance.directives = directives; - if (serverPrefetch) { - markAsyncBoundary(instance); - } -} -function resolveInjections(injectOptions, ctx, checkDuplicateProperties = shared.NOOP) { - if (shared.isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (shared.isObject(opt)) { - if ("default" in opt) { - injected = inject( - opt.from || key, - opt.default, - true - ); - } else { - injected = inject(opt.from || key); - } - } else { - injected = inject(opt); - } - if (reactivity.isRef(injected)) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: (v) => injected.value = v - }); - } else { - ctx[key] = injected; - } - } -} -function callHook(hook, instance, type) { - callWithAsyncErrorHandling( - shared.isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), - instance, - type - ); -} -function createWatcher(raw, ctx, publicThis, key) { - let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; - if (shared.isString(raw)) { - const handler = ctx[raw]; - if (shared.isFunction(handler)) { - { - watch(getter, handler); - } - } - } else if (shared.isFunction(raw)) { - { - watch(getter, raw.bind(publicThis)); - } - } else if (shared.isObject(raw)) { - if (shared.isArray(raw)) { - raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); - } else { - const handler = shared.isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; - if (shared.isFunction(handler)) { - watch(getter, handler, raw); - } - } - } else ; -} -function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { - mixins: globalMixins, - optionsCache: cache, - config: { optionMergeStrategies } - } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; - } else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach( - (m) => mergeOptions(resolved, m, optionMergeStrategies, true) - ); - } - mergeOptions(resolved, base, optionMergeStrategies); - } - if (shared.isObject(base)) { - cache.set(base, resolved); - } - return resolved; -} -function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); - } - if (mixins) { - mixins.forEach( - (m) => mergeOptions(to, m, strats, true) - ); - } - for (const key in from) { - if (asMixin && key === "expose") ; else { - const strat = internalOptionMergeStrats[key] || strats && strats[key]; - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; -} -const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeEmitsOrPropsOptions, - emits: mergeEmitsOrPropsOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject -}; -function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (shared.extend)( - shared.isFunction(to) ? to.call(this, this) : to, - shared.isFunction(from) ? from.call(this, this) : from - ); - }; -} -function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); -} -function normalizeInject(raw) { - if (shared.isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; - } - return raw; -} -function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; -} -function mergeObjectOptions(to, from) { - return to ? shared.extend(/* @__PURE__ */ Object.create(null), to, from) : from; -} -function mergeEmitsOrPropsOptions(to, from) { - if (to) { - if (shared.isArray(to) && shared.isArray(from)) { - return [.../* @__PURE__ */ new Set([...to, ...from])]; - } - return shared.extend( - /* @__PURE__ */ Object.create(null), - normalizePropsOrEmits(to), - normalizePropsOrEmits(from != null ? from : {}) - ); - } else { - return from; - } -} -function mergeWatchOptions(to, from) { - if (!to) return from; - if (!from) return to; - const merged = shared.extend(/* @__PURE__ */ Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; -} - -function createAppContext() { - return { - app: null, - config: { - isNativeTag: shared.NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: void 0, - warnHandler: void 0, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: /* @__PURE__ */ Object.create(null), - optionsCache: /* @__PURE__ */ new WeakMap(), - propsCache: /* @__PURE__ */ new WeakMap(), - emitsCache: /* @__PURE__ */ new WeakMap() - }; -} -let uid$1 = 0; -function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!shared.isFunction(rootComponent)) { - rootComponent = shared.extend({}, rootComponent); - } - if (rootProps != null && !shared.isObject(rootProps)) { - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = /* @__PURE__ */ new WeakSet(); - const pluginCleanupFns = []; - let isMounted = false; - const app = context.app = { - _uid: uid$1++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) ; else if (plugin && shared.isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } else if (shared.isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } else ; - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } - } - return app; - }, - component(name, component) { - if (!component) { - return context.components[name]; - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - if (!directive) { - return context.directives[name]; - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, namespace) { - if (!isMounted) { - const vnode = app._ceVNode || createVNode(rootComponent, rootProps); - vnode.appContext = context; - if (namespace === true) { - namespace = "svg"; - } else if (namespace === false) { - namespace = void 0; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } else { - render(vnode, rootContainer, namespace); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - return getComponentPublicInstance(vnode.component); - } - }, - onUnmount(cleanupFn) { - pluginCleanupFns.push(cleanupFn); - }, - unmount() { - if (isMounted) { - callWithAsyncErrorHandling( - pluginCleanupFns, - app._instance, - 16 - ); - render(null, app._container); - delete app._container.__vue_app__; - } - }, - provide(key, value) { - context.provides[key] = value; - return app; - }, - runWithContext(fn) { - const lastApp = currentApp; - currentApp = app; - try { - return fn(); - } finally { - currentApp = lastApp; - } - } - }; - return app; - }; -} -let currentApp = null; - -function provide(key, value) { - if (!currentInstance) ; else { - let provides = currentInstance.provides; - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - provides[key] = value; - } -} -function inject(key, defaultValue, treatDefaultAsFactory = false) { - const instance = currentInstance || currentRenderingInstance; - if (instance || currentApp) { - const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; - if (provides && key in provides) { - return provides[key]; - } else if (arguments.length > 1) { - return treatDefaultAsFactory && shared.isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; - } else ; - } -} -function hasInjectionContext() { - return !!(currentInstance || currentRenderingInstance || currentApp); -} - -const internalObjectProto = {}; -const createInternalObject = () => Object.create(internalObjectProto); -const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; - -function initProps(instance, rawProps, isStateful, isSSR = false) { - const props = {}; - const attrs = createInternalObject(); - instance.propsDefaults = /* @__PURE__ */ Object.create(null); - setFullProps(instance, rawProps, props, attrs); - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = void 0; - } - } - if (isStateful) { - instance.props = isSSR ? props : reactivity.shallowReactive(props); - } else { - if (!instance.type.props) { - instance.props = attrs; - } else { - instance.props = props; - } - } - instance.attrs = attrs; -} -function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { - props, - attrs, - vnode: { patchFlag } - } = instance; - const rawCurrentProps = reactivity.toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( - // always force full diff in dev - // - #1942 if hmr is enabled with sfc component - // - vite#872 non-sfc component used by sfc component - (optimized || patchFlag > 0) && !(patchFlag & 16) - ) { - if (patchFlag & 8) { - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - const value = rawProps[key]; - if (options) { - if (shared.hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } else { - const camelizedKey = shared.camelize(key); - props[camelizedKey] = resolvePropValue( - options, - rawCurrentProps, - camelizedKey, - value, - instance, - false - ); - } - } else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - } else { - if (setFullProps(instance, rawProps, props, attrs)) { - hasAttrsChanged = true; - } - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || // for camelCase - !shared.hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = shared.hyphenate(key)) === key || !shared.hasOwn(rawProps, kebabKey))) { - if (options) { - if (rawPrevProps && // for camelCase - (rawPrevProps[key] !== void 0 || // for kebab-case - rawPrevProps[kebabKey] !== void 0)) { - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - void 0, - instance, - true - ); - } - } else { - delete props[key]; - } - } - } - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || !shared.hasOwn(rawProps, key) && true) { - delete attrs[key]; - hasAttrsChanged = true; - } - } - } - } - if (hasAttrsChanged) { - reactivity.trigger(instance.attrs, "set", ""); - } -} -function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - if (shared.isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - let camelKey; - if (options && shared.hasOwn(options, camelKey = shared.camelize(key))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - if (needCastKeys) { - const rawCurrentProps = reactivity.toRaw(props); - const castValues = rawCastValues || shared.EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - castValues[key], - instance, - !shared.hasOwn(castValues, key) - ); - } - } - return hasAttrsChanged; -} -function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = shared.hasOwn(opt, "default"); - if (hasDefault && value === void 0) { - const defaultValue = opt.default; - if (opt.type !== Function && !opt.skipFactory && shared.isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } else { - const reset = setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call( - null, - props - ); - reset(); - } - } else { - value = defaultValue; - } - if (instance.ce) { - instance.ce._setProp(key, value); - } - } - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === shared.hyphenate(key))) { - value = true; - } - } - } - return value; -} -const mixinPropsCache = /* @__PURE__ */ new WeakMap(); -function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = asMixin ? mixinPropsCache : appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; - } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - let hasExtends = false; - if (!shared.isFunction(comp)) { - const extendProps = (raw2) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw2, appContext, true); - shared.extend(normalized, props); - if (keys) needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } - } - if (!raw && !hasExtends) { - if (shared.isObject(comp)) { - cache.set(comp, shared.EMPTY_ARR); - } - return shared.EMPTY_ARR; - } - if (shared.isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - const normalizedKey = shared.camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = shared.EMPTY_OBJ; - } - } - } else if (raw) { - for (const key in raw) { - const normalizedKey = shared.camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt); - const propType = prop.type; - let shouldCast = false; - let shouldCastTrue = true; - if (shared.isArray(propType)) { - for (let index = 0; index < propType.length; ++index) { - const type = propType[index]; - const typeName = shared.isFunction(type) && type.name; - if (typeName === "Boolean") { - shouldCast = true; - break; - } else if (typeName === "String") { - shouldCastTrue = false; - } - } - } else { - shouldCast = shared.isFunction(propType) && propType.name === "Boolean"; - } - prop[0 /* shouldCast */] = shouldCast; - prop[1 /* shouldCastTrue */] = shouldCastTrue; - if (shouldCast || shared.hasOwn(prop, "default")) { - needCastKeys.push(normalizedKey); - } - } - } - } - const res = [normalized, needCastKeys]; - if (shared.isObject(comp)) { - cache.set(comp, res); - } - return res; -} -function validatePropName(key) { - if (key[0] !== "$" && !shared.isReservedProp(key)) { - return true; - } - return false; -} - -const isInternalKey = (key) => key[0] === "_" || key === "$stable"; -const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; -const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - return rawSlot; - } - const normalized = withCtx((...args) => { - if (false) ; - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; -}; -const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) continue; - const value = rawSlots[key]; - if (shared.isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } else if (value != null) { - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } - } -}; -const normalizeVNodeSlots = (instance, children) => { - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; -}; -const assignSlots = (slots, children, optimized) => { - for (const key in children) { - if (optimized || key !== "_") { - slots[key] = children[key]; - } - } -}; -const initSlots = (instance, children, optimized) => { - const slots = instance.slots = createInternalObject(); - if (instance.vnode.shapeFlag & 32) { - const type = children._; - if (type) { - assignSlots(slots, children, optimized); - if (optimized) { - shared.def(slots, "_", type, true); - } - } else { - normalizeObjectSlots(children, slots); - } - } else if (children) { - normalizeVNodeSlots(instance, children); - } -}; -const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = shared.EMPTY_OBJ; - if (vnode.shapeFlag & 32) { - const type = children._; - if (type) { - if (optimized && type === 1) { - needDeletionCheck = false; - } else { - assignSlots(slots, children, optimized); - } - } else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; - } else if (children) { - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { - delete slots[key]; - } - } - } -}; - -const queuePostRenderEffect = queueEffectWithSuspense ; -function createRenderer(options) { - return baseCreateRenderer(options); -} -function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); -} -function baseCreateRenderer(options, createHydrationFns) { - const target = shared.getGlobalThis(); - target.__VUE__ = true; - const { - insert: hostInsert, - remove: hostRemove, - patchProp: hostPatchProp, - createElement: hostCreateElement, - createText: hostCreateText, - createComment: hostCreateComment, - setText: hostSetText, - setElementText: hostSetElementText, - parentNode: hostParentNode, - nextSibling: hostNextSibling, - setScopeId: hostSetScopeId = shared.NOOP, - insertStaticContent: hostInsertStaticContent - } = options; - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, namespace); - } - break; - case Fragment: - processFragment( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - break; - default: - if (shapeFlag & 1) { - processElement( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 6) { - processComponent( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 64) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else if (shapeFlag & 128) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else ; - } - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateText(n2.children), - container, - anchor - ); - } else { - const el = n2.el = n1.el; - if (n2.children !== n1.children) { - hostSetText(el, n2.children); - } - } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateComment(n2.children || ""), - container, - anchor - ); - } else { - n2.el = n1.el; - } - }; - const mountStaticNode = (n2, container, anchor, namespace) => { - [n2.el, n2.anchor] = hostInsertStaticContent( - n2.children, - container, - anchor, - namespace, - n2.el, - n2.anchor - ); - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; - } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; - } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - if (n2.type === "svg") { - namespace = "svg"; - } else if (n2.type === "math") { - namespace = "mathml"; - } - if (n1 == null) { - mountElement( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - patchElement( - n1, - n2, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - let el; - let vnodeHook; - const { props, shapeFlag, transition, dirs } = vnode; - el = vnode.el = hostCreateElement( - vnode.type, - namespace, - props && props.is, - props - ); - if (shapeFlag & 8) { - hostSetElementText(el, vnode.children); - } else if (shapeFlag & 16) { - mountChildren( - vnode.children, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(vnode, namespace), - slotScopeIds, - optimized - ); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); - if (props) { - for (const key in props) { - if (key !== "value" && !shared.isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], namespace, parentComponent); - } - } - if ("value" in props) { - hostPatchProp(el, "value", null, props.value, namespace); - } - if (vnodeHook = props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - const needCallTransitionHooks = needTransition(parentSuspense, transition); - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { - const parentVNode = parentComponent.vnode; - setScopeId( - el, - parentVNode, - parentVNode.scopeId, - parentVNode.slotScopeIds, - parentComponent.parent - ); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); - patch( - null, - child, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const el = n2.el = n1.el; - let { patchFlag, dynamicChildren, dirs } = n2; - patchFlag |= n1.patchFlag & 16; - const oldProps = n1.props || shared.EMPTY_OBJ; - const newProps = n2.props || shared.EMPTY_OBJ; - let vnodeHook; - parentComponent && toggleRecurse(parentComponent, false); - if (vnodeHook = newProps.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); - } - parentComponent && toggleRecurse(parentComponent, true); - if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { - hostSetElementText(el, ""); - } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - el, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds - ); - } else if (!optimized) { - patchChildren( - n1, - n2, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds, - false - ); - } - if (patchFlag > 0) { - if (patchFlag & 16) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } else { - if (patchFlag & 2) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, "class", null, newProps.class, namespace); - } - } - if (patchFlag & 4) { - hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); - } - if (patchFlag & 8) { - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - if (next !== prev || key === "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - } - } - if (patchFlag & 1) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } else if (!optimized && dynamicChildren == null) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); - }, parentSuspense); - } - }; - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - const container = ( - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( - // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer - ) - ); - patch( - oldVNode, - newVNode, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - true - ); - } - }; - const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { - if (oldProps !== newProps) { - if (oldProps !== shared.EMPTY_OBJ) { - for (const key in oldProps) { - if (!shared.isReservedProp(key) && !(key in newProps)) { - hostPatchProp( - el, - key, - oldProps[key], - null, - namespace, - parentComponent - ); - } - } - } - for (const key in newProps) { - if (shared.isReservedProp(key)) continue; - const next = newProps[key]; - const prev = oldProps[key]; - if (next !== prev && key !== "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - if ("value" in newProps) { - hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); - const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - mountChildren( - // #10007 - // such fragment like `<></>` will be compiled into - // a fragment which doesn't have a children. - // In this case fallback to an empty array - n2.children || [], - container, - fragmentEndAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - container, - parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - if ( - // #2080 if the stable fragment has a key, it's a <template v-for> that may - // get moved around. Make sure all root level vnodes inherit el. - // #2134 or if it's a component root, it may also get moved around - // as the component is being moved. - n2.key != null || parentComponent && n2 === parentComponent.subTree - ) { - traverseStaticChildren( - n1, - n2, - true - /* shallow */ - ); - } - } else { - patchChildren( - n1, - n2, - container, - fragmentEndAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512) { - parentComponent.ctx.activate( - n2, - container, - anchor, - namespace, - optimized - ); - } else { - mountComponent( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - optimized - ); - } - } else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { - const instance = (initialVNode.component = createComponentInstance( - initialVNode, - parentComponent, - parentSuspense - )); - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - { - setupComponent(instance, false, optimized); - } - if (instance.asyncDep) { - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); - if (!initialVNode.el) { - const placeholder = instance.subTree = createVNode(Comment); - processCommentNode(null, placeholder, container, anchor); - } - } else { - setupRenderEffect( - instance, - initialVNode, - container, - anchor, - parentSuspense, - namespace, - optimized - ); - } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = n2.component = n1.component; - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && !instance.asyncResolved) { - updateComponentPreRender(instance, n2, optimized); - return; - } else { - instance.next = n2; - instance.update(); - } - } else { - n2.el = n1.el; - instance.vnode = n2; - } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent, root, type } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - if (bm) { - shared.invokeArrayFns(bm); - } - if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - const hydrateSubTree = () => { - instance.subTree = renderComponentRoot(instance); - hydrateNode( - el, - instance.subTree, - instance, - parentSuspense, - null - ); - }; - if (isAsyncWrapperVNode && type.__asyncHydrate) { - type.__asyncHydrate( - el, - instance, - hydrateSubTree - ); - } else { - hydrateSubTree(); - } - } else { - if (root.ce) { - root.ce._injectChildStyle(type); - } - const subTree = instance.subTree = renderComponentRoot(instance); - patch( - null, - subTree, - container, - anchor, - instance, - parentSuspense, - namespace - ); - initialVNode.el = subTree.el; - } - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect( - () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), - parentSuspense - ); - } - if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - initialVNode = container = anchor = null; - } else { - let { next, bu, u, parent, vnode } = instance; - { - const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); - if (nonHydratedAsyncRoot) { - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - nonHydratedAsyncRoot.asyncDep.then(() => { - if (!instance.isUnmounted) { - componentUpdateFn(); - } - }); - return; - } - } - let originNext = next; - let vnodeHook; - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } else { - next = vnode; - } - if (bu) { - shared.invokeArrayFns(bu); - } - if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - const nextTree = renderComponentRoot(instance); - const prevTree = instance.subTree; - instance.subTree = nextTree; - patch( - prevTree, - nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), - instance, - parentSuspense, - namespace - ); - next.el = nextTree.el; - if (originNext === null) { - updateHOCHostEl(instance, nextTree.el); - } - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - if (vnodeHook = next.props && next.props.onVnodeUpdated) { - queuePostRenderEffect( - () => invokeVNodeHook(vnodeHook, parent, next, vnode), - parentSuspense - ); - } - } - }; - instance.scope.on(); - const effect = instance.effect = new reactivity.ReactiveEffect(componentUpdateFn); - instance.scope.off(); - const update = instance.update = effect.run.bind(effect); - const job = instance.job = effect.runIfDirty.bind(effect); - job.i = instance; - job.id = instance.uid; - effect.scheduler = () => queueJob(job); - toggleRecurse(instance, true); - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - reactivity.pauseTracking(); - flushPreFlushCbs(instance); - reactivity.resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - if (patchFlag > 0) { - if (patchFlag & 128) { - patchKeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - return; - } else if (patchFlag & 256) { - patchUnkeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - return; - } - } - if (shapeFlag & 8) { - if (prevShapeFlag & 16) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } - } else { - if (prevShapeFlag & 16) { - if (shapeFlag & 16) { - patchKeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } else { - if (prevShapeFlag & 8) { - hostSetElementText(container, ""); - } - if (shapeFlag & 16) { - mountChildren( - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - } - } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - c1 = c1 || shared.EMPTY_ARR; - c2 = c2 || shared.EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - patch( - c1[i], - nextChild, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - if (oldLength > newLength) { - unmountChildren( - c1, - parentComponent, - parentSuspense, - true, - false, - commonLength - ); - } else { - mountChildren( - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - commonLength - ); - } - }; - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; - let e2 = l2 - 1; - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - if (isSameVNodeType(n1, n2)) { - patch( - n1, - n2, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - break; - } - i++; - } - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); - if (isSameVNodeType(n1, n2)) { - patch( - n1, - n2, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - break; - } - e1--; - e2--; - } - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch( - null, - c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - i++; - } - } - } else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } else { - const s1 = i; - const s2 = i; - const keyToNewIndexMap = /* @__PURE__ */ new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - if (nextChild.key != null) { - keyToNewIndexMap.set(nextChild.key, i); - } - } - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - let maxNewIndexSoFar = 0; - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } else { - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === void 0) { - unmount(prevChild, parentComponent, parentSuspense, true); - } else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } else { - moved = true; - } - patch( - prevChild, - c2[newIndex], - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - patched++; - } - } - const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : shared.EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - patch( - null, - nextChild, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (moved) { - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2); - } else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; - if (needTransition2) { - if (moveType === 0) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } else { - const { leave, delayLeave, afterLeave } = transition; - const remove2 = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove2(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove2, performLeave); - } else { - performLeave(); - } - } - } else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { - type, - props, - ref, - children, - dynamicChildren, - shapeFlag, - patchFlag, - dirs, - cacheIndex - } = vnode; - if (patchFlag === -2) { - optimized = false; - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (cacheIndex != null) { - parentComponent.renderCache[cacheIndex] = void 0; - } - if (shapeFlag & 256) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } else { - if (shapeFlag & 128) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); - } - if (shapeFlag & 64) { - vnode.type.remove( - vnode, - parentComponent, - parentSuspense, - internals, - doRemove - ); - } else if (dynamicChildren && // #5154 - // when v-once is used inside a block, setBlockTracking(-1) marks the - // parent block with hasOnce: true - // so that it doesn't take the fast path during unmount - otherwise - // components nested in v-once are never unmounted. - !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { - unmountChildren( - dynamicChildren, - parentComponent, - parentSuspense, - false, - true - ); - } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); - }, parentSuspense); - } - }; - const remove = (vnode) => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 && transition && !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } else { - performLeave(); - } - } else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - const { bum, scope, job, subTree, um, m, a } = instance; - invalidateMount(m); - invalidateMount(a); - if (bum) { - shared.invokeArrayFns(bum); - } - scope.stop(); - if (job) { - job.flags |= 8; - unmount(subTree, instance, parentSuspense, doRemove); - } - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } - } - }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } - }; - const getNextHostNode = (vnode) => { - if (vnode.shapeFlag & 6) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128) { - return vnode.suspense.next(); - } - const el = hostNextSibling(vnode.anchor || vnode.el); - const teleportEnd = el && el[TeleportEndKey]; - return teleportEnd ? hostNextSibling(teleportEnd) : el; - }; - let isFlushing = false; - const render = (vnode, container, namespace) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } else { - patch( - container._vnode || null, - vnode, - container, - null, - null, - null, - namespace - ); - } - container._vnode = vnode; - if (!isFlushing) { - isFlushing = true; - flushPreFlushCbs(); - flushPostFlushCbs(); - isFlushing = false; - } - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns( - internals - ); - } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) - }; -} -function resolveChildrenNamespace({ type, props }, currentNamespace) { - return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; -} -function toggleRecurse({ effect, job }, allowed) { - if (allowed) { - effect.flags |= 32; - job.flags |= 4; - } else { - effect.flags &= ~32; - job.flags &= ~4; - } -} -function needTransition(parentSuspense, transition) { - return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; -} -function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (shared.isArray(ch1) && shared.isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow && c2.patchFlag !== -2) - traverseStaticChildren(c1, c2); - } - if (c2.type === Text) { - c2.el = c1.el; - } - } - } -} -function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = u + v >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } - } - } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; - } - return result; -} -function locateNonHydratedAsyncRoot(instance) { - const subComponent = instance.subTree.component; - if (subComponent) { - if (subComponent.asyncDep && !subComponent.asyncResolved) { - return subComponent; - } else { - return locateNonHydratedAsyncRoot(subComponent); - } - } -} -function invalidateMount(hooks) { - if (hooks) { - for (let i = 0; i < hooks.length; i++) - hooks[i].flags |= 8; - } -} - -const ssrContextKey = Symbol.for("v-scx"); -const useSSRContext = () => { - { - const ctx = inject(ssrContextKey); - return ctx; - } -}; - -function watchEffect(effect, options) { - return doWatch(effect, null, options); -} -function watchPostEffect(effect, options) { - return doWatch( - effect, - null, - { flush: "post" } - ); -} -function watchSyncEffect(effect, options) { - return doWatch( - effect, - null, - { flush: "sync" } - ); -} -function watch(source, cb, options) { - return doWatch(source, cb, options); -} -function doWatch(source, cb, options = shared.EMPTY_OBJ) { - const { immediate, deep, flush, once } = options; - const baseWatchOptions = shared.extend({}, options); - const runsImmediately = cb && immediate || !cb && flush !== "post"; - let ssrCleanup; - if (isInSSRComponentSetup) { - if (flush === "sync") { - const ctx = useSSRContext(); - ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); - } else if (!runsImmediately) { - const watchStopHandle = () => { - }; - watchStopHandle.stop = shared.NOOP; - watchStopHandle.resume = shared.NOOP; - watchStopHandle.pause = shared.NOOP; - return watchStopHandle; - } - } - const instance = currentInstance; - baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); - let isPre = false; - if (flush === "post") { - baseWatchOptions.scheduler = (job) => { - queuePostRenderEffect(job, instance && instance.suspense); - }; - } else if (flush !== "sync") { - isPre = true; - baseWatchOptions.scheduler = (job, isFirstRun) => { - if (isFirstRun) { - job(); - } else { - queueJob(job); - } - }; - } - baseWatchOptions.augmentJob = (job) => { - if (cb) { - job.flags |= 4; - } - if (isPre) { - job.flags |= 2; - if (instance) { - job.id = instance.uid; - job.i = instance; - } - } - }; - const watchHandle = reactivity.watch(source, cb, baseWatchOptions); - if (isInSSRComponentSetup) { - if (ssrCleanup) { - ssrCleanup.push(watchHandle); - } else if (runsImmediately) { - watchHandle(); - } - } - return watchHandle; -} -function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = shared.isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); - let cb; - if (shared.isFunction(value)) { - cb = value; - } else { - cb = value.handler; - options = value; - } - const reset = setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - reset(); - return res; -} -function createPathGetter(ctx, path) { - const segments = path.split("."); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; -} - -function useModel(props, name, options = shared.EMPTY_OBJ) { - const i = getCurrentInstance(); - const camelizedName = shared.camelize(name); - const hyphenatedName = shared.hyphenate(name); - const modifiers = getModelModifiers(props, camelizedName); - const res = reactivity.customRef((track, trigger) => { - let localValue; - let prevSetValue = shared.EMPTY_OBJ; - let prevEmittedValue; - watchSyncEffect(() => { - const propValue = props[camelizedName]; - if (shared.hasChanged(localValue, propValue)) { - localValue = propValue; - trigger(); - } - }); - return { - get() { - track(); - return options.get ? options.get(localValue) : localValue; - }, - set(value) { - const emittedValue = options.set ? options.set(value) : value; - if (!shared.hasChanged(emittedValue, localValue) && !(prevSetValue !== shared.EMPTY_OBJ && shared.hasChanged(value, prevSetValue))) { - return; - } - const rawProps = i.vnode.props; - if (!(rawProps && // check if parent has passed v-model - (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { - localValue = value; - trigger(); - } - i.emit(`update:${name}`, emittedValue); - if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) { - trigger(); - } - prevSetValue = value; - prevEmittedValue = emittedValue; - } - }; - }); - res[Symbol.iterator] = () => { - let i2 = 0; - return { - next() { - if (i2 < 2) { - return { value: i2++ ? modifiers || shared.EMPTY_OBJ : res, done: false }; - } else { - return { done: true }; - } - } - }; - }; - return res; -} -const getModelModifiers = (props, modelName) => { - return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${shared.camelize(modelName)}Modifiers`] || props[`${shared.hyphenate(modelName)}Modifiers`]; -}; - -function emit(instance, event, ...rawArgs) { - if (instance.isUnmounted) return; - const props = instance.vnode.props || shared.EMPTY_OBJ; - let args = rawArgs; - const isModelListener = event.startsWith("update:"); - const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); - if (modifiers) { - if (modifiers.trim) { - args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a); - } - if (modifiers.number) { - args = rawArgs.map(shared.looseToNumber); - } - } - let handlerName; - let handler = props[handlerName = shared.toHandlerKey(event)] || // also try camelCase event handler (#2249) - props[handlerName = shared.toHandlerKey(shared.camelize(event))]; - if (!handler && isModelListener) { - handler = props[handlerName = shared.toHandlerKey(shared.hyphenate(event))]; - } - if (handler) { - callWithAsyncErrorHandling( - handler, - instance, - 6, - args - ); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling( - onceHandler, - instance, - 6, - args - ); - } -} -function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== void 0) { - return cached; - } - const raw = comp.emits; - let normalized = {}; - let hasExtends = false; - if (!shared.isFunction(comp)) { - const extendEmits = (raw2) => { - const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - shared.extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } - } - if (!raw && !hasExtends) { - if (shared.isObject(comp)) { - cache.set(comp, null); - } - return null; - } - if (shared.isArray(raw)) { - raw.forEach((key) => normalized[key] = null); - } else { - shared.extend(normalized, raw); - } - if (shared.isObject(comp)) { - cache.set(comp, normalized); - } - return normalized; -} -function isEmitListener(options, key) { - if (!options || !shared.isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ""); - return shared.hasOwn(options, key[0].toLowerCase() + key.slice(1)) || shared.hasOwn(options, shared.hyphenate(key)) || shared.hasOwn(options, key); -} - -function markAttrsAccessed() { -} -function renderComponentRoot(instance) { - const { - type: Component, - vnode, - proxy, - withProxy, - propsOptions: [propsOptions], - slots, - attrs, - emit, - render, - renderCache, - props, - data, - setupState, - ctx, - inheritAttrs - } = instance; - const prev = setCurrentRenderingInstance(instance); - let result; - let fallthroughAttrs; - try { - if (vnode.shapeFlag & 4) { - const proxyToUse = withProxy || proxy; - const thisProxy = false ? new Proxy(proxyToUse, { - get(target, key, receiver) { - warn( - `Property '${String( - key - )}' was accessed via 'this'. Avoid using 'this' in templates.` - ); - return Reflect.get(target, key, receiver); - } - }) : proxyToUse; - result = normalizeVNode( - render.call( - thisProxy, - proxyToUse, - renderCache, - false ? shallowReadonly(props) : props, - setupState, - data, - ctx - ) - ); - fallthroughAttrs = attrs; - } else { - const render2 = Component; - if (false) ; - result = normalizeVNode( - render2.length > 1 ? render2( - false ? shallowReadonly(props) : props, - false ? { - get attrs() { - markAttrsAccessed(); - return shallowReadonly(attrs); - }, - slots, - emit - } : { attrs, slots, emit } - ) : render2( - false ? shallowReadonly(props) : props, - null - ) - ); - fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); - } - } catch (err) { - blockStack.length = 0; - handleError(err, instance, 1); - result = createVNode(Comment); - } - let root = result; - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 | 6)) { - if (propsOptions && keys.some(shared.isModelListener)) { - fallthroughAttrs = filterModelListeners( - fallthroughAttrs, - propsOptions - ); - } - root = cloneVNode(root, fallthroughAttrs, false, true); - } - } - } - if (vnode.dirs) { - root = cloneVNode(root, null, false, true); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; - } - if (vnode.transition) { - setTransitionHooks(root, vnode.transition); - } - { - result = root; - } - setCurrentRenderingInstance(prev); - return result; -} -function filterSingleRoot(children, recurse = true) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - if (child.type !== Comment || child.children === "v-if") { - if (singleRoot) { - return; - } else { - singleRoot = child; - } - } - } else { - return; - } - } - return singleRoot; -} -const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === "class" || key === "style" || shared.isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } - } - return res; -}; -const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!shared.isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } - } - return res; -}; -function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - if (nextVNode.dirs || nextVNode.transition) { - return true; - } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024) { - return true; - } - if (patchFlag & 16) { - if (!prevProps) { - return !!nextProps; - } - return hasPropsChanged(prevProps, nextProps, emits); - } else if (patchFlag & 8) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { - return true; - } - } - } - } else { - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); - } - return false; -} -function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; - } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; -} -function updateHOCHostEl({ vnode, parent }, el) { - while (parent) { - const root = parent.subTree; - if (root.suspense && root.suspense.activeBranch === vnode) { - root.el = vnode.el; - } - if (root === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; - } else { - break; - } - } -} - -const isSuspense = (type) => type.__isSuspense; -let suspenseId = 0; -const SuspenseImpl = { - name: "Suspense", - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - if (n1 == null) { - mountSuspense( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } else { - if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { - n2.suspense = n1.suspense; - n2.suspense.vnode = n2; - n2.el = n1.el; - return; - } - patchSuspense( - n1, - n2, - container, - anchor, - parentComponent, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } - }, - hydrate: hydrateSuspense, - normalize: normalizeSuspenseChildren -}; -const Suspense = SuspenseImpl ; -function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (shared.isFunction(eventListener)) { - eventListener(); - } -} -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - const { - p: patch, - o: { createElement } - } = rendererInternals; - const hiddenContainer = createElement("div"); - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - container, - hiddenContainer, - anchor, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - patch( - null, - suspense.pendingBranch = vnode.ssContent, - hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds - ); - if (suspense.deps > 0) { - triggerEvent(vnode, "onPending"); - triggerEvent(vnode, "onFallback"); - patch( - null, - vnode.ssFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds - ); - setActiveBranch(suspense, vnode.ssFallback); - } else { - suspense.resolve(false, true); - } -} -function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = n2.suspense = n1.suspense; - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - patch( - pendingBranch, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else if (isInFallback) { - if (!isHydrating) { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } - } else { - suspense.pendingId = suspenseId++; - if (isHydrating) { - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } else { - unmount(pendingBranch, parentComponent, suspense); - } - suspense.deps = 0; - suspense.effects.length = 0; - suspense.hiddenContainer = createElement("div"); - if (isInFallback) { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - suspense.resolve(true); - } else { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newBranch); - } else { - triggerEvent(n2, "onPending"); - suspense.pendingBranch = newBranch; - if (newBranch.shapeFlag & 512) { - suspense.pendingId = newBranch.component.suspenseId; - } else { - suspense.pendingId = suspenseId++; - } - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } else if (timeout === 0) { - suspense.fallback(newFallback); - } - } - } - } -} -function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - const { - p: patch, - m: move, - um: unmount, - n: next, - o: { parentNode, remove } - } = rendererInternals; - let parentSuspenseId; - const isSuspensible = isVNodeSuspensible(vnode); - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch) { - parentSuspenseId = parentSuspense.pendingId; - parentSuspense.deps++; - } - } - const timeout = vnode.props ? shared.toNumber(vnode.props.timeout) : void 0; - const initialAnchor = anchor; - const suspense = { - vnode, - parent: parentSuspense, - parentComponent, - namespace, - container, - hiddenContainer, - deps: 0, - pendingId: suspenseId++, - timeout: typeof timeout === "number" ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: !isHydrating, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false, sync = false) { - const { - vnode: vnode2, - activeBranch, - pendingBranch, - pendingId, - effects, - parentComponent: parentComponent2, - container: container2 - } = suspense; - let delayEnter = false; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } else if (!resume) { - delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move( - pendingBranch, - container2, - anchor === initialAnchor ? next(activeBranch) : anchor, - 0 - ); - queuePostFlushCb(effects); - } - }; - } - if (activeBranch) { - if (parentNode(activeBranch.el) === container2) { - anchor = next(activeBranch); - } - unmount(activeBranch, parentComponent2, suspense, true); - } - if (!delayEnter) { - move(pendingBranch, container2, anchor, 0); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - if (!hasUnresolvedAncestor && !delayEnter) { - queuePostFlushCb(effects); - } - suspense.effects = []; - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0 && !sync) { - parentSuspense.resolve(); - } - } - } - triggerEvent(vnode2, "onResolve"); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; - triggerEvent(vnode2, "onFallback"); - const anchor2 = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - patch( - null, - fallbackVNode, - container2, - anchor2, - parentComponent2, - null, - // fallback tree will not have suspense context - namespace2, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - unmount( - activeBranch, - parentComponent2, - null, - // no suspense so unmount hooks fire now - true - // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container2, anchor2, type) { - suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); - suspense.container = container2; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect, optimized2) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance.asyncDep.catch((err) => { - handleError(err, instance, 0); - }).then((asyncSetupResult) => { - if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { - return; - } - instance.asyncResolved = true; - const { vnode: vnode2 } = instance; - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - vnode2.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect( - instance, - vnode2, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), - suspense, - namespace, - optimized2 - ); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode2.el); - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense2, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount( - suspense.activeBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - if (suspense.pendingBranch) { - unmount( - suspense.pendingBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - } - }; - return suspense; -} -function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - node.parentNode, - // eslint-disable-next-line no-restricted-globals - document.createElement("div"), - null, - namespace, - slotScopeIds, - optimized, - rendererInternals, - true - ); - const result = hydrateNode( - node, - suspense.pendingBranch = vnode.ssContent, - parentComponent, - suspense, - slotScopeIds, - optimized - ); - if (suspense.deps === 0) { - suspense.resolve(false, true); - } - return result; -} -function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32; - vnode.ssContent = normalizeSuspenseSlot( - isSlotChildren ? children.default : children - ); - vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); -} -function normalizeSuspenseSlot(s) { - let block; - if (shared.isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } - } - if (shared.isArray(s)) { - const singleChild = filterSingleRoot(s); - s = singleChild; - } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter((c) => c !== s); - } - return s; -} -function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (shared.isArray(fn)) { - suspense.effects.push(...fn); - } else { - suspense.effects.push(fn); - } - } else { - queuePostFlushCb(fn); - } -} -function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - let el = branch.el; - while (!el && branch.component) { - branch = branch.component.subTree; - el = branch.el; - } - vnode.el = el; - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } -} -function isVNodeSuspensible(vnode) { - const suspensible = vnode.props && vnode.props.suspensible; - return suspensible != null && suspensible !== false; -} - -const Fragment = Symbol.for("v-fgt"); -const Text = Symbol.for("v-txt"); -const Comment = Symbol.for("v-cmt"); -const Static = Symbol.for("v-stc"); -const blockStack = []; -let currentBlock = null; -function openBlock(disableTracking = false) { - blockStack.push(currentBlock = disableTracking ? null : []); -} -function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; -} -let isBlockTreeEnabled = 1; -function setBlockTracking(value, inVOnce = false) { - isBlockTreeEnabled += value; - if (value < 0 && currentBlock && inVOnce) { - currentBlock.hasOnce = true; - } -} -function setupBlock(vnode) { - vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || shared.EMPTY_ARR : null; - closeBlock(); - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; -} -function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock( - createBaseVNode( - type, - props, - children, - patchFlag, - dynamicProps, - shapeFlag, - true - ) - ); -} -function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock( - createVNode( - type, - props, - children, - patchFlag, - dynamicProps, - true - ) - ); -} -function isVNode(value) { - return value ? value.__v_isVNode === true : false; -} -function isSameVNodeType(n1, n2) { - return n1.type === n2.type && n1.key === n2.key; -} -function transformVNodeArgs(transformer) { -} -const normalizeKey = ({ key }) => key != null ? key : null; -const normalizeRef = ({ - ref, - ref_key, - ref_for -}) => { - if (typeof ref === "number") { - ref = "" + ref; - } - return ref != null ? shared.isString(ref) || reactivity.isRef(ref) || shared.isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; -}; -function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetStart: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null, - ctx: currentRenderingInstance - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - if (shapeFlag & 128) { - type.normalize(vnode); - } - } else if (children) { - vnode.shapeFlag |= shared.isString(children) ? 8 : 16; - } - if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself - !isBlockNode && // has current parent block - currentBlock && // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32) { - currentBlock.push(vnode); - } - return vnode; -} -const createVNode = _createVNode; -function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - type = Comment; - } - if (isVNode(type)) { - const cloned = cloneVNode( - type, - props, - true - /* mergeRef: true */ - ); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } else { - currentBlock.push(cloned); - } - } - cloned.patchFlag = -2; - return cloned; - } - if (isClassComponent(type)) { - type = type.__vccOpts; - } - if (props) { - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !shared.isString(klass)) { - props.class = shared.normalizeClass(klass); - } - if (shared.isObject(style)) { - if (reactivity.isProxy(style) && !shared.isArray(style)) { - style = shared.extend({}, style); - } - props.style = shared.normalizeStyle(style); - } - } - const shapeFlag = shared.isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : shared.isObject(type) ? 4 : shared.isFunction(type) ? 2 : 0; - return createBaseVNode( - type, - props, - children, - patchFlag, - dynamicProps, - shapeFlag, - isBlockNode, - true - ); -} -function guardReactiveProps(props) { - if (!props) return null; - return reactivity.isProxy(props) || isInternalObject(props) ? shared.extend({}, props) : props; -} -function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { - const { props, ref, patchFlag, children, transition } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref ? ( - // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref ? shared.isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) - ) : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: children, - target: vnode.target, - targetStart: vnode.targetStart, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor, - ctx: vnode.ctx, - ce: vnode.ce - }; - if (transition && cloneTransition) { - setTransitionHooks( - cloned, - transition.clone(cloned) - ); - } - return cloned; -} -function createTextVNode(text = " ", flag = 0) { - return createVNode(Text, null, text, flag); -} -function createStaticVNode(content, numberOfNodes) { - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; -} -function createCommentVNode(text = "", asBlock = false) { - return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); -} -function normalizeVNode(child) { - if (child == null || typeof child === "boolean") { - return createVNode(Comment); - } else if (shared.isArray(child)) { - return createVNode( - Fragment, - null, - // #3666, avoid reference pollution when reusing vnode - child.slice() - ); - } else if (isVNode(child)) { - return cloneIfMounted(child); - } else { - return createVNode(Text, null, String(child)); - } -} -function cloneIfMounted(child) { - return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); -} -function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } else if (shared.isArray(children)) { - type = 16; - } else if (typeof children === "object") { - if (shapeFlag & (1 | 64)) { - const slot = children.default; - if (slot) { - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } else { - type = 32; - const slotFlag = children._; - if (!slotFlag && !isInternalObject(children)) { - children._ctx = currentRenderingInstance; - } else if (slotFlag === 3 && currentRenderingInstance) { - if (currentRenderingInstance.slots._ === 1) { - children._ = 1; - } else { - children._ = 2; - vnode.patchFlag |= 1024; - } - } - } - } else if (shared.isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32; - } else { - children = String(children); - if (shapeFlag & 64) { - type = 16; - children = [createTextVNode(children)]; - } else { - type = 8; - } - } - vnode.children = children; - vnode.shapeFlag |= type; -} -function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === "class") { - if (ret.class !== toMerge.class) { - ret.class = shared.normalizeClass([ret.class, toMerge.class]); - } - } else if (key === "style") { - ret.style = shared.normalizeStyle([ret.style, toMerge.style]); - } else if (shared.isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && existing !== incoming && !(shared.isArray(existing) && existing.includes(incoming))) { - ret[key] = existing ? [].concat(existing, incoming) : incoming; - } - } else if (key !== "") { - ret[key] = toMerge[key]; - } - } - } - return ret; -} -function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7, [ - vnode, - prevVNode - ]); -} - -const emptyAppContext = createAppContext(); -let uid = 0; -function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid++, - vnode, - type, - parent, - appContext, - root: null, - // to be immediately set - next: null, - subTree: null, - // will be set synchronously right after creation - effect: null, - update: null, - // will be set synchronously right after creation - job: null, - scope: new reactivity.EffectScope( - true - /* detached */ - ), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - ids: parent ? parent.ids : ["", 0, 0], - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - // to be set immediately - emitted: null, - // props default value - propsDefaults: shared.EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: shared.EMPTY_OBJ, - data: shared.EMPTY_OBJ, - props: shared.EMPTY_OBJ, - attrs: shared.EMPTY_OBJ, - slots: shared.EMPTY_OBJ, - refs: shared.EMPTY_OBJ, - setupState: shared.EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - { - instance.ctx = { _: instance }; - } - instance.root = parent ? parent.root : instance; - instance.emit = emit.bind(null, instance); - if (vnode.ce) { - vnode.ce(instance); - } - return instance; -} -let currentInstance = null; -const getCurrentInstance = () => currentInstance || currentRenderingInstance; -let internalSetCurrentInstance; -let setInSSRSetupState; -{ - const g = shared.getGlobalThis(); - const registerGlobalSetter = (key, setter) => { - let setters; - if (!(setters = g[key])) setters = g[key] = []; - setters.push(setter); - return (v) => { - if (setters.length > 1) setters.forEach((set) => set(v)); - else setters[0](v); - }; - }; - internalSetCurrentInstance = registerGlobalSetter( - `__VUE_INSTANCE_SETTERS__`, - (v) => currentInstance = v - ); - setInSSRSetupState = registerGlobalSetter( - `__VUE_SSR_SETTERS__`, - (v) => isInSSRComponentSetup = v - ); -} -const setCurrentInstance = (instance) => { - const prev = currentInstance; - internalSetCurrentInstance(instance); - instance.scope.on(); - return () => { - instance.scope.off(); - internalSetCurrentInstance(prev); - }; -}; -const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - internalSetCurrentInstance(null); -}; -function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4; -} -let isInSSRComponentSetup = false; -function setupComponent(instance, isSSR = false, optimized = false) { - isSSR && setInSSRSetupState(isSSR); - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children, optimized); - const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; - isSSR && setInSSRSetupState(false); - return setupResult; -} -function setupStatefulComponent(instance, isSSR) { - const Component = instance.type; - instance.accessCache = /* @__PURE__ */ Object.create(null); - instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); - const { setup } = Component; - if (setup) { - reactivity.pauseTracking(); - const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; - const reset = setCurrentInstance(instance); - const setupResult = callWithErrorHandling( - setup, - instance, - 0, - [ - instance.props, - setupContext - ] - ); - const isAsyncSetup = shared.isPromise(setupResult); - reactivity.resetTracking(); - reset(); - if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { - markAsyncBoundary(instance); - } - if (isAsyncSetup) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - return setupResult.then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }).catch((e) => { - handleError(e, instance, 0); - }); - } else { - instance.asyncDep = setupResult; - } - } else { - handleSetupResult(instance, setupResult, isSSR); - } - } else { - finishComponentSetup(instance, isSSR); - } -} -function handleSetupResult(instance, setupResult, isSSR) { - if (shared.isFunction(setupResult)) { - if (instance.type.__ssrInlineRender) { - instance.ssrRender = setupResult; - } else { - instance.render = setupResult; - } - } else if (shared.isObject(setupResult)) { - instance.setupState = reactivity.proxyRefs(setupResult); - } else ; - finishComponentSetup(instance, isSSR); -} -let compile; -let installWithProxy; -function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = (i) => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; -} -const isRuntimeOnly = () => !compile; -function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - if (!instance.render) { - if (!isSSR && compile && !Component.render) { - const template = Component.template || resolveMergedOptions(instance).template; - if (template) { - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = shared.extend( - shared.extend( - { - isCustomElement, - delimiters - }, - compilerOptions - ), - componentCompilerOptions - ); - Component.render = compile(template, finalCompilerOptions); - } - } - instance.render = Component.render || shared.NOOP; - if (installWithProxy) { - installWithProxy(instance); - } - } - { - const reset = setCurrentInstance(instance); - reactivity.pauseTracking(); - try { - applyOptions(instance); - } finally { - reactivity.resetTracking(); - reset(); - } - } -} -const attrsProxyHandlers = { - get(target, key) { - reactivity.track(target, "get", ""); - return target[key]; - } -}; -function createSetupContext(instance) { - const expose = (exposed) => { - instance.exposed = exposed || {}; - }; - { - return { - attrs: new Proxy(instance.attrs, attrsProxyHandlers), - slots: instance.slots, - emit: instance.emit, - expose - }; - } -} -function getComponentPublicInstance(instance) { - if (instance.exposed) { - return instance.exposeProxy || (instance.exposeProxy = new Proxy(reactivity.proxyRefs(reactivity.markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - }, - has(target, key) { - return key in target || key in publicPropertiesMap; - } - })); - } else { - return instance.proxy; - } -} -function getComponentName(Component, includeInferred = true) { - return shared.isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; -} -function isClassComponent(value) { - return shared.isFunction(value) && "__vccOpts" in value; -} - -const computed = (getterOrOptions, debugOptions) => { - const c = reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup); - return c; -}; - -function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) { - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - return createVNode(type, propsOrChildren); - } else { - return createVNode(type, null, propsOrChildren); - } - } else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } -} - -function initCustomFormatter() { - { - return; - } -} - -function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - ret.memo = memo.slice(); - ret.cacheIndex = index; - return cache[index] = ret; -} -function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; - } - for (let i = 0; i < prev.length; i++) { - if (shared.hasChanged(prev[i], memo[i])) { - return false; - } - } - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; -} - -const version = "3.5.13"; -const warn$1 = shared.NOOP; -const ErrorTypeStrings = ErrorTypeStrings$1 ; -const devtools = void 0; -const setDevtoolsHook = shared.NOOP; -const _ssrUtils = { - createComponentInstance, - setupComponent, - renderComponentRoot, - setCurrentRenderingInstance, - isVNode: isVNode, - normalizeVNode, - getComponentPublicInstance, - ensureValidVNode, - pushWarningContext, - popWarningContext -}; -const ssrUtils = _ssrUtils ; -const resolveFilter = null; -const compatUtils = null; -const DeprecationTypes = null; - -exports.EffectScope = reactivity.EffectScope; -exports.ReactiveEffect = reactivity.ReactiveEffect; -exports.TrackOpTypes = reactivity.TrackOpTypes; -exports.TriggerOpTypes = reactivity.TriggerOpTypes; -exports.customRef = reactivity.customRef; -exports.effect = reactivity.effect; -exports.effectScope = reactivity.effectScope; -exports.getCurrentScope = reactivity.getCurrentScope; -exports.getCurrentWatcher = reactivity.getCurrentWatcher; -exports.isProxy = reactivity.isProxy; -exports.isReactive = reactivity.isReactive; -exports.isReadonly = reactivity.isReadonly; -exports.isRef = reactivity.isRef; -exports.isShallow = reactivity.isShallow; -exports.markRaw = reactivity.markRaw; -exports.onScopeDispose = reactivity.onScopeDispose; -exports.onWatcherCleanup = reactivity.onWatcherCleanup; -exports.proxyRefs = reactivity.proxyRefs; -exports.reactive = reactivity.reactive; -exports.readonly = reactivity.readonly; -exports.ref = reactivity.ref; -exports.shallowReactive = reactivity.shallowReactive; -exports.shallowReadonly = reactivity.shallowReadonly; -exports.shallowRef = reactivity.shallowRef; -exports.stop = reactivity.stop; -exports.toRaw = reactivity.toRaw; -exports.toRef = reactivity.toRef; -exports.toRefs = reactivity.toRefs; -exports.toValue = reactivity.toValue; -exports.triggerRef = reactivity.triggerRef; -exports.unref = reactivity.unref; -exports.camelize = shared.camelize; -exports.capitalize = shared.capitalize; -exports.normalizeClass = shared.normalizeClass; -exports.normalizeProps = shared.normalizeProps; -exports.normalizeStyle = shared.normalizeStyle; -exports.toDisplayString = shared.toDisplayString; -exports.toHandlerKey = shared.toHandlerKey; -exports.BaseTransition = BaseTransition; -exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators; -exports.Comment = Comment; -exports.DeprecationTypes = DeprecationTypes; -exports.ErrorCodes = ErrorCodes; -exports.ErrorTypeStrings = ErrorTypeStrings; -exports.Fragment = Fragment; -exports.KeepAlive = KeepAlive; -exports.Static = Static; -exports.Suspense = Suspense; -exports.Teleport = Teleport; -exports.Text = Text; -exports.assertNumber = assertNumber; -exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling; -exports.callWithErrorHandling = callWithErrorHandling; -exports.cloneVNode = cloneVNode; -exports.compatUtils = compatUtils; -exports.computed = computed; -exports.createBlock = createBlock; -exports.createCommentVNode = createCommentVNode; -exports.createElementBlock = createElementBlock; -exports.createElementVNode = createBaseVNode; -exports.createHydrationRenderer = createHydrationRenderer; -exports.createPropsRestProxy = createPropsRestProxy; -exports.createRenderer = createRenderer; -exports.createSlots = createSlots; -exports.createStaticVNode = createStaticVNode; -exports.createTextVNode = createTextVNode; -exports.createVNode = createVNode; -exports.defineAsyncComponent = defineAsyncComponent; -exports.defineComponent = defineComponent; -exports.defineEmits = defineEmits; -exports.defineExpose = defineExpose; -exports.defineModel = defineModel; -exports.defineOptions = defineOptions; -exports.defineProps = defineProps; -exports.defineSlots = defineSlots; -exports.devtools = devtools; -exports.getCurrentInstance = getCurrentInstance; -exports.getTransitionRawChildren = getTransitionRawChildren; -exports.guardReactiveProps = guardReactiveProps; -exports.h = h; -exports.handleError = handleError; -exports.hasInjectionContext = hasInjectionContext; -exports.hydrateOnIdle = hydrateOnIdle; -exports.hydrateOnInteraction = hydrateOnInteraction; -exports.hydrateOnMediaQuery = hydrateOnMediaQuery; -exports.hydrateOnVisible = hydrateOnVisible; -exports.initCustomFormatter = initCustomFormatter; -exports.inject = inject; -exports.isMemoSame = isMemoSame; -exports.isRuntimeOnly = isRuntimeOnly; -exports.isVNode = isVNode; -exports.mergeDefaults = mergeDefaults; -exports.mergeModels = mergeModels; -exports.mergeProps = mergeProps; -exports.nextTick = nextTick; -exports.onActivated = onActivated; -exports.onBeforeMount = onBeforeMount; -exports.onBeforeUnmount = onBeforeUnmount; -exports.onBeforeUpdate = onBeforeUpdate; -exports.onDeactivated = onDeactivated; -exports.onErrorCaptured = onErrorCaptured; -exports.onMounted = onMounted; -exports.onRenderTracked = onRenderTracked; -exports.onRenderTriggered = onRenderTriggered; -exports.onServerPrefetch = onServerPrefetch; -exports.onUnmounted = onUnmounted; -exports.onUpdated = onUpdated; -exports.openBlock = openBlock; -exports.popScopeId = popScopeId; -exports.provide = provide; -exports.pushScopeId = pushScopeId; -exports.queuePostFlushCb = queuePostFlushCb; -exports.registerRuntimeCompiler = registerRuntimeCompiler; -exports.renderList = renderList; -exports.renderSlot = renderSlot; -exports.resolveComponent = resolveComponent; -exports.resolveDirective = resolveDirective; -exports.resolveDynamicComponent = resolveDynamicComponent; -exports.resolveFilter = resolveFilter; -exports.resolveTransitionHooks = resolveTransitionHooks; -exports.setBlockTracking = setBlockTracking; -exports.setDevtoolsHook = setDevtoolsHook; -exports.setTransitionHooks = setTransitionHooks; -exports.ssrContextKey = ssrContextKey; -exports.ssrUtils = ssrUtils; -exports.toHandlers = toHandlers; -exports.transformVNodeArgs = transformVNodeArgs; -exports.useAttrs = useAttrs; -exports.useId = useId; -exports.useModel = useModel; -exports.useSSRContext = useSSRContext; -exports.useSlots = useSlots; -exports.useTemplateRef = useTemplateRef; -exports.useTransitionState = useTransitionState; -exports.version = version; -exports.warn = warn$1; -exports.watch = watch; -exports.watchEffect = watchEffect; -exports.watchPostEffect = watchPostEffect; -exports.watchSyncEffect = watchSyncEffect; -exports.withAsyncContext = withAsyncContext; -exports.withCtx = withCtx; -exports.withDefaults = withDefaults; -exports.withDirectives = withDirectives; -exports.withMemo = withMemo; -exports.withScopeId = withScopeId; diff --git a/node_modules/@vue/runtime-core/dist/runtime-core.d.ts b/node_modules/@vue/runtime-core/dist/runtime-core.d.ts deleted file mode 100644 index dd923af..0000000 --- a/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +++ /dev/null @@ -1,1832 +0,0 @@ -import { computed as computed$1, Ref, OnCleanup, WatchStopHandle, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, WatchCallback, ReactiveEffect, DebuggerOptions, WatchEffect, WatchHandle, WatchSource, ReactiveMarker, ShallowRef, WatchErrorCodes, reactive } from '@vue/reactivity'; -export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, Raw, Reactive, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WatchCallback, WatchEffect, WatchHandle, WatchSource, WatchStopHandle, WritableComputedOptions, WritableComputedRef, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity'; -import { IfAny, Prettify, LooseRequired, UnionToIntersection, OverloadParameters, IsKeyValues } from '@vue/shared'; -export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared'; - -export declare const computed: typeof computed$1; - -export type Slot<T extends any = any> = (...args: IfAny<T, any[], [T] | (T extends undefined ? [] : never)>) => VNode[]; -type InternalSlots = { - [name: string]: Slot | undefined; -}; -export type Slots = Readonly<InternalSlots>; -declare const SlotSymbol: unique symbol; -export type SlotsType<T extends Record<string, any> = Record<string, any>> = { - [SlotSymbol]?: T; -}; -type StrictUnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<T> & T; -type UnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<Prettify<{ - [K in keyof T]: NonNullable<T[K]> extends (...args: any[]) => any ? T[K] : Slot<T[K]>; -}>>; -type RawSlots = { - [name: string]: unknown; - $stable?: boolean; -}; - -declare enum SchedulerJobFlags { - QUEUED = 1, - PRE = 2, - /** - * Indicates whether the effect is allowed to recursively trigger itself - * when managed by the scheduler. - * - * By default, a job cannot trigger itself because some built-in method calls, - * e.g. Array.prototype.push actually performs reads as well (#1740) which - * can lead to confusing infinite loops. - * The allowed cases are component update functions and watch callbacks. - * Component update functions may update child component props, which in turn - * trigger flush: "pre" watch callbacks that mutates state that the parent - * relies on (#1801). Watch callbacks doesn't track its dependencies so if it - * triggers itself again, it's likely intentional and it is the user's - * responsibility to perform recursive state mutation that eventually - * stabilizes (#1727). - */ - ALLOW_RECURSE = 4, - DISPOSED = 8 -} -interface SchedulerJob extends Function { - id?: number; - /** - * flags can technically be undefined, but it can still be used in bitwise - * operations just like 0. - */ - flags?: SchedulerJobFlags; - /** - * Attached by renderer.ts when setting up a component's render effect - * Used to obtain component information when reporting max recursive updates. - */ - i?: ComponentInternalInstance; -} -type SchedulerJobs = SchedulerJob | SchedulerJob[]; -export declare function nextTick<T = void, R = void>(this: T, fn?: (this: T) => R): Promise<Awaited<R>>; -export declare function queuePostFlushCb(cb: SchedulerJobs): void; - -export type ComponentPropsOptions<P = Data> = ComponentObjectPropsOptions<P> | string[]; -export type ComponentObjectPropsOptions<P = Data> = { - [K in keyof P]: Prop<P[K]> | null; -}; -export type Prop<T, D = T> = PropOptions<T, D> | PropType<T>; -type DefaultFactory<T> = (props: Data) => T | null | undefined; -interface PropOptions<T = any, D = T> { - type?: PropType<T> | true | null; - required?: boolean; - default?: D | DefaultFactory<D> | null | undefined | object; - validator?(value: unknown, props: Data): boolean; -} -export type PropType<T> = PropConstructor<T> | (PropConstructor<T> | null)[]; -type PropConstructor<T = any> = { - new (...args: any[]): T & {}; -} | { - (): T; -} | PropMethod<T>; -type PropMethod<T, TConstructor = any> = [T] extends [ - ((...args: any) => any) | undefined -] ? { - new (): TConstructor; - (): T; - readonly prototype: TConstructor; -} : never; -type RequiredKeys<T> = { - [K in keyof T]: T[K] extends { - required: true; - } | { - default: any; - } | BooleanConstructor | { - type: BooleanConstructor; - } ? T[K] extends { - default: undefined | (() => undefined); - } ? never : K : never; -}[keyof T]; -type OptionalKeys<T> = Exclude<keyof T, RequiredKeys<T>>; -type DefaultKeys<T> = { - [K in keyof T]: T[K] extends { - default: any; - } | BooleanConstructor | { - type: BooleanConstructor; - } ? T[K] extends { - type: BooleanConstructor; - required: true; - } ? never : K : never; -}[keyof T]; -type InferPropType<T, NullAsAny = true> = [T] extends [null] ? NullAsAny extends true ? any : null : [T] extends [{ - type: null | true; -}] ? any : [T] extends [ObjectConstructor | { - type: ObjectConstructor; -}] ? Record<string, any> : [T] extends [BooleanConstructor | { - type: BooleanConstructor; -}] ? boolean : [T] extends [DateConstructor | { - type: DateConstructor; -}] ? Date : [T] extends [(infer U)[] | { - type: (infer U)[]; -}] ? U extends DateConstructor ? Date | InferPropType<U, false> : InferPropType<U, false> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? IfAny<V, V, D> : V : V : T; -/** - * Extract prop types from a runtime props options object. - * The extracted types are **internal** - i.e. the resolved props received by - * the component. - * - Boolean props are always present - * - Props with default values are always present - * - * To extract accepted props from the parent, use {@link ExtractPublicPropTypes}. - */ -export type ExtractPropTypes<O> = { - [K in keyof Pick<O, RequiredKeys<O>>]: InferPropType<O[K]>; -} & { - [K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]>; -}; -type PublicRequiredKeys<T> = { - [K in keyof T]: T[K] extends { - required: true; - } ? K : never; -}[keyof T]; -type PublicOptionalKeys<T> = Exclude<keyof T, PublicRequiredKeys<T>>; -/** - * Extract prop types from a runtime props options object. - * The extracted types are **public** - i.e. the expected props that can be - * passed to component. - */ -export type ExtractPublicPropTypes<O> = { - [K in keyof Pick<O, PublicRequiredKeys<O>>]: InferPropType<O[K]>; -} & { - [K in keyof Pick<O, PublicOptionalKeys<O>>]?: InferPropType<O[K]>; -}; -export type ExtractDefaultPropTypes<O> = O extends object ? { - [K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]>; -} : {}; - -/** - * Vue `<script setup>` compiler macro for declaring component props. The - * expected argument is the same as the component `props` option. - * - * Example runtime declaration: - * ```js - * // using Array syntax - * const props = defineProps(['foo', 'bar']) - * // using Object syntax - * const props = defineProps({ - * foo: String, - * bar: { - * type: Number, - * required: true - * } - * }) - * ``` - * - * Equivalent type-based declaration: - * ```ts - * // will be compiled into equivalent runtime declarations - * const props = defineProps<{ - * foo?: string - * bar: number - * }>() - * ``` - * - * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits} - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - */ -export declare function defineProps<PropNames extends string = string>(props: PropNames[]): Prettify<Readonly<{ - [key in PropNames]?: any; -}>>; -export declare function defineProps<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions>(props: PP): Prettify<Readonly<ExtractPropTypes<PP>>>; -export declare function defineProps<TypeProps>(): DefineProps<LooseRequired<TypeProps>, BooleanKey<TypeProps>>; -export type DefineProps<T, BKeys extends keyof T> = Readonly<T> & { - readonly [K in BKeys]-?: boolean; -}; -type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? [T[K]] extends [boolean | undefined] ? K : never : never; -/** - * Vue `<script setup>` compiler macro for declaring a component's emitted - * events. The expected argument is the same as the component `emits` option. - * - * Example runtime declaration: - * ```js - * const emit = defineEmits(['change', 'update']) - * ``` - * - * Example type-based declaration: - * ```ts - * const emit = defineEmits<{ - * // <eventName>: <expected arguments> - * change: [] - * update: [value: number] // named tuple syntax - * }>() - * - * emit('change') - * emit('update', 1) - * ``` - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - * - * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits} - */ -export declare function defineEmits<EE extends string = string>(emitOptions: EE[]): EmitFn<EE[]>; -export declare function defineEmits<E extends EmitsOptions = EmitsOptions>(emitOptions: E): EmitFn<E>; -export declare function defineEmits<T extends ComponentTypeEmits>(): T extends (...args: any[]) => any ? T : ShortEmits<T>; -export type ComponentTypeEmits = ((...args: any[]) => any) | Record<string, any>; -type RecordToUnion<T extends Record<string, any>> = T[keyof T]; -type ShortEmits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{ - [K in keyof T]: (evt: K, ...args: T[K]) => void; -}>>; -/** - * Vue `<script setup>` compiler macro for declaring a component's exposed - * instance properties when it is accessed by a parent component via template - * refs. - * - * `<script setup>` components are closed by default - i.e. variables inside - * the `<script setup>` scope is not exposed to parent unless explicitly exposed - * via `defineExpose`. - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - * - * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineexpose} - */ -export declare function defineExpose<Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed): void; -/** - * Vue `<script setup>` compiler macro for declaring a component's additional - * options. This should be used only for options that cannot be expressed via - * Composition API - e.g. `inheritAttrs`. - * - * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineoptions} - */ -export declare function defineOptions<RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin>(options?: ComponentOptionsBase<{}, RawBindings, D, C, M, Mixin, Extends, {}> & { - /** - * props should be defined via defineProps(). - */ - props?: never; - /** - * emits should be defined via defineEmits(). - */ - emits?: never; - /** - * expose should be defined via defineExpose(). - */ - expose?: never; - /** - * slots should be defined via defineSlots(). - */ - slots?: never; -}): void; -export declare function defineSlots<S extends Record<string, any> = Record<string, any>>(): StrictUnwrapSlotsType<SlotsType<S>>; -export type ModelRef<T, M extends PropertyKey = string, G = T, S = T> = Ref<G, S> & [ - ModelRef<T, M, G, S>, - Record<M, true | undefined> -]; -type DefineModelOptions<T = any, G = T, S = T> = { - get?: (v: T) => G; - set?: (v: S) => any; -}; -/** - * Vue `<script setup>` compiler macro for declaring a - * two-way binding prop that can be consumed via `v-model` from the parent - * component. This will declare a prop with the same name and a corresponding - * `update:propName` event. - * - * If the first argument is a string, it will be used as the prop name; - * Otherwise the prop name will default to "modelValue". In both cases, you - * can also pass an additional object which will be used as the prop's options. - * - * The returned ref behaves differently depending on whether the parent - * provided the corresponding v-model props or not: - * - If yes, the returned ref's value will always be in sync with the parent - * prop. - * - If not, the returned ref will behave like a normal local ref. - * - * @example - * ```ts - * // default model (consumed via `v-model`) - * const modelValue = defineModel<string>() - * modelValue.value = "hello" - * - * // default model with options - * const modelValue = defineModel<string>({ required: true }) - * - * // with specified name (consumed via `v-model:count`) - * const count = defineModel<number>('count') - * count.value++ - * - * // with specified name and default value - * const count = defineModel<number>('count', { default: 0 }) - * ``` - */ -export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options: ({ - default: any; -} | { - required: true; -}) & PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T, M, G, S>; -export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options?: PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>; -export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options: ({ - default: any; -} | { - required: true; -}) & PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T, M, G, S>; -export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options?: PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>; -type NotUndefined<T> = T extends undefined ? never : T; -type MappedOmit<T, K extends keyof any> = { - [P in keyof T as P extends K ? never : P]: T[P]; -}; -type InferDefaults<T> = { - [K in keyof T]?: InferDefault<T, T[K]>; -}; -type NativeType = null | number | string | boolean | symbol | Function; -type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never); -type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = T extends unknown ? Readonly<MappedOmit<T, keyof Defaults>> & { - readonly [K in keyof Defaults as K extends keyof T ? K : never]-?: K extends keyof T ? Defaults[K] extends undefined ? IfAny<Defaults[K], NotUndefined<T[K]>, T[K]> : NotUndefined<T[K]> : never; -} & { - readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean; -} : never; -/** - * Vue `<script setup>` compiler macro for providing props default values when - * using type-based `defineProps` declaration. - * - * Example usage: - * ```ts - * withDefaults(defineProps<{ - * size?: number - * labels?: string[] - * }>(), { - * size: 3, - * labels: () => ['default label'] - * }) - * ``` - * - * This is only usable inside `<script setup>`, is compiled away in the output - * and should **not** be actually called at runtime. - * - * @see {@link https://vuejs.org/guide/typescript/composition-api.html#typing-component-props} - */ -export declare function withDefaults<T, BKeys extends keyof T, Defaults extends InferDefaults<T>>(props: DefineProps<T, BKeys>, defaults: Defaults): PropsWithDefaults<T, Defaults, BKeys>; -export declare function useSlots(): SetupContext['slots']; -export declare function useAttrs(): SetupContext['attrs']; - -export type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>; -export type EmitsOptions = ObjectEmitsOptions | string[]; -export type EmitsToProps<T extends EmitsOptions | ComponentTypeEmits> = T extends string[] ? { - [K in `on${Capitalize<T[number]>}`]?: (...args: any[]) => any; -} : T extends ObjectEmitsOptions ? { - [K in string & keyof T as `on${Capitalize<K>}`]?: (...args: T[K] extends (...args: infer P) => any ? P : T[K] extends null ? any[] : never) => any; -} : {}; -type TypeEmitsToOptions<T extends ComponentTypeEmits> = { - [K in keyof T & string]: T[K] extends [...args: infer Args] ? (...args: Args) => any : () => any; -} & (T extends (...args: any[]) => any ? ParametersToFns<OverloadParameters<T>> : {}); -type ParametersToFns<T extends any[]> = { - [K in T[0]]: IsStringLiteral<K> extends true ? (...args: T extends [e: infer E, ...args: infer P] ? K extends E ? P : never : never) => any : never; -}; -type IsStringLiteral<T> = T extends string ? string extends T ? false : true : false; -export type ShortEmitsToObject<E> = E extends Record<string, any[]> ? { - [K in keyof E]: (...args: E[K]) => any; -} : E; -export type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{ - [key in Event]: Options[key] extends (...args: infer Args) => any ? (event: key, ...args: Args) => void : Options[key] extends any[] ? (event: key, ...args: Options[key]) => void : (event: key, ...args: any[]) => void; -}[Event]>; - -/** -Runtime helper for applying directives to a vnode. Example usage: - -const comp = resolveComponent('comp') -const foo = resolveDirective('foo') -const bar = resolveDirective('bar') - -return withDirectives(h(comp), [ - [foo, this.x], - [bar, this.y] -]) -*/ - -export interface DirectiveBinding<Value = any, Modifiers extends string = string, Arg extends string = string> { - instance: ComponentPublicInstance | Record<string, any> | null; - value: Value; - oldValue: Value | null; - arg?: Arg; - modifiers: DirectiveModifiers<Modifiers>; - dir: ObjectDirective<any, Value>; -} -export type DirectiveHook<HostElement = any, Prev = VNode<any, HostElement> | null, Value = any, Modifiers extends string = string, Arg extends string = string> = (el: HostElement, binding: DirectiveBinding<Value, Modifiers, Arg>, vnode: VNode<any, HostElement>, prevVNode: Prev) => void; -type SSRDirectiveHook<Value = any, Modifiers extends string = string, Arg extends string = string> = (binding: DirectiveBinding<Value, Modifiers, Arg>, vnode: VNode) => Data | undefined; -export interface ObjectDirective<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string> { - created?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>; - beforeMount?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>; - mounted?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>; - beforeUpdate?: DirectiveHook<HostElement, VNode<any, HostElement>, Value, Modifiers, Arg>; - updated?: DirectiveHook<HostElement, VNode<any, HostElement>, Value, Modifiers, Arg>; - beforeUnmount?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>; - unmounted?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>; - getSSRProps?: SSRDirectiveHook<Value, Modifiers, Arg>; - deep?: boolean; -} -export type FunctionDirective<HostElement = any, V = any, Modifiers extends string = string, Arg extends string = string> = DirectiveHook<HostElement, any, V, Modifiers, Arg>; -export type Directive<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string> = ObjectDirective<HostElement, Value, Modifiers, Arg> | FunctionDirective<HostElement, Value, Modifiers, Arg>; -type DirectiveModifiers<K extends string = string> = Record<K, boolean>; -export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, string] | [Directive | undefined, any, string | undefined, DirectiveModifiers]>; -/** - * Adds directives to a VNode. - */ -export declare function withDirectives<T extends VNode>(vnode: T, directives: DirectiveArguments): T; - -/** - * Custom properties added to component instances in any way and can be accessed through `this` - * - * @example - * Here is an example of adding a property `$router` to every component instance: - * ```ts - * import { createApp } from 'vue' - * import { Router, createRouter } from 'vue-router' - * - * declare module 'vue' { - * interface ComponentCustomProperties { - * $router: Router - * } - * } - * - * // effectively adding the router to every component instance - * const app = createApp({}) - * const router = createRouter() - * app.config.globalProperties.$router = router - * - * const vm = app.mount('#app') - * // we can access the router from the instance - * vm.$router.push('/') - * ``` - */ -export interface ComponentCustomProperties { -} -type IsDefaultMixinComponent<T> = T extends ComponentOptionsMixin ? ComponentOptionsMixin extends T ? true : false : false; -type MixinToOptionTypes<T> = T extends ComponentOptionsBase<infer P, infer B, infer D, infer C, infer M, infer Mixin, infer Extends, any, any, infer Defaults, any, any, any, any, any, any, any> ? OptionTypesType<P & {}, B & {}, D & {}, C & {}, M & {}, Defaults & {}> & IntersectionMixin<Mixin> & IntersectionMixin<Extends> : never; -type ExtractMixin<T> = { - Mixin: MixinToOptionTypes<T>; -}[T extends ComponentOptionsMixin ? 'Mixin' : never]; -type IntersectionMixin<T> = IsDefaultMixinComponent<T> extends true ? OptionTypesType : UnionToIntersection<ExtractMixin<T>>; -type UnwrapMixinsType<T, Type extends OptionTypesKeys> = T extends OptionTypesType ? T[Type] : never; -type EnsureNonVoid<T> = T extends void ? {} : T; -type ComponentPublicInstanceConstructor<T extends ComponentPublicInstance<Props, RawBindings, D, C, M> = ComponentPublicInstance<any>, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = { - __isFragment?: never; - __isTeleport?: never; - __isSuspense?: never; - new (...args: any[]): T; -}; -/** - * @deprecated This is no longer used internally, but exported and relied on by - * existing library types generated by vue-tsc. - */ -export type CreateComponentPublicInstance<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, 'P'> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, 'B'> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, 'D'> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, 'C'> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, {}, string, S>, I, S>; -/** - * This is the same as `CreateComponentPublicInstance` but adds local components, - * global directives, exposed, and provide inference. - * It changes the arguments order so that we don't need to repeat mixin - * inference everywhere internally, but it has to be a new type to avoid - * breaking types that relies on previous arguments order (#10842) - */ -export type CreateComponentPublicInstanceWithMixins<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, TypeRefs extends Data = {}, TypeEl extends Element = any, Provide extends ComponentProvideOptions = ComponentProvideOptions, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, 'P'> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, 'B'> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, 'D'> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, 'C'> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, {}, string, S, LC, Directives, Exposed, Provide>, I, S, Exposed, TypeRefs, TypeEl>; -type ExposedKeys<T, Exposed extends string & keyof T> = '' extends Exposed ? T : Pick<T, Exposed>; -export type ComponentPublicInstance<P = {}, // props type extracted from props option -B = {}, // raw bindings returned from setup() -D = {}, // return from data() -C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = {}, PublicProps = {}, Defaults = {}, MakeDefaultsOptional extends boolean = false, Options = ComponentOptionsBase<any, any, any, any, any, any, any, any, any>, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, Exposed extends string = '', TypeRefs extends Data = {}, TypeEl extends Element = any> = { - $: ComponentInternalInstance; - $data: D; - $props: MakeDefaultsOptional extends true ? Partial<Defaults> & Omit<Prettify<P> & PublicProps, keyof Defaults> : Prettify<P> & PublicProps; - $attrs: Data; - $refs: Data & TypeRefs; - $slots: UnwrapSlotsType<S>; - $root: ComponentPublicInstance | null; - $parent: ComponentPublicInstance | null; - $host: Element | null; - $emit: EmitFn<E>; - $el: TypeEl; - $options: Options & MergedComponentOptionsOverride; - $forceUpdate: () => void; - $nextTick: typeof nextTick; - $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle; -} & ExposedKeys<IfAny<P, P, Readonly<Defaults> & Omit<P, keyof ShallowUnwrapRef<B> | keyof Defaults>> & ShallowUnwrapRef<B> & UnwrapNestedRefs<D> & ExtractComputedReturns<C> & M & ComponentCustomProperties & InjectToObject<I>, Exposed>; - -declare enum LifecycleHooks { - BEFORE_CREATE = "bc", - CREATED = "c", - BEFORE_MOUNT = "bm", - MOUNTED = "m", - BEFORE_UPDATE = "bu", - UPDATED = "u", - BEFORE_UNMOUNT = "bum", - UNMOUNTED = "um", - DEACTIVATED = "da", - ACTIVATED = "a", - RENDER_TRIGGERED = "rtg", - RENDER_TRACKED = "rtc", - ERROR_CAPTURED = "ec", - SERVER_PREFETCH = "sp" -} - -export interface SuspenseProps { - onResolve?: () => void; - onPending?: () => void; - onFallback?: () => void; - timeout?: string | number; - /** - * Allow suspense to be captured by parent suspense - * - * @default false - */ - suspensible?: boolean; -} -declare const SuspenseImpl: { - name: string; - __isSuspense: boolean; - process(n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals): void; - hydrate: typeof hydrateSuspense; - normalize: typeof normalizeSuspenseChildren; -}; -export declare const Suspense: { - __isSuspense: true; - new (): { - $props: VNodeProps & SuspenseProps; - $slots: { - default(): VNode[]; - fallback(): VNode[]; - }; - }; -}; -export interface SuspenseBoundary { - vnode: VNode<RendererNode, RendererElement, SuspenseProps>; - parent: SuspenseBoundary | null; - parentComponent: ComponentInternalInstance | null; - namespace: ElementNamespace; - container: RendererElement; - hiddenContainer: RendererElement; - activeBranch: VNode | null; - pendingBranch: VNode | null; - deps: number; - pendingId: number; - timeout: number; - isInFallback: boolean; - isHydrating: boolean; - isUnmounted: boolean; - effects: Function[]; - resolve(force?: boolean, sync?: boolean): void; - fallback(fallbackVNode: VNode): void; - move(container: RendererElement, anchor: RendererNode | null, type: MoveType): void; - next(): RendererNode | null; - registerDep(instance: ComponentInternalInstance, setupRenderEffect: SetupRenderEffectFn, optimized: boolean): void; - unmount(parentSuspense: SuspenseBoundary | null, doRemove?: boolean): void; -} -declare function hydrateSuspense(node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, hydrateNode: (node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null; -declare function normalizeSuspenseChildren(vnode: VNode): void; - -export type RootHydrateFunction = (vnode: VNode<Node, Element>, container: (Element | ShadowRoot) & { - _vnode?: VNode; -}) => void; - -type Hook<T = () => void> = T | T[]; -export interface BaseTransitionProps<HostElement = RendererElement> { - mode?: 'in-out' | 'out-in' | 'default'; - appear?: boolean; - persisted?: boolean; - onBeforeEnter?: Hook<(el: HostElement) => void>; - onEnter?: Hook<(el: HostElement, done: () => void) => void>; - onAfterEnter?: Hook<(el: HostElement) => void>; - onEnterCancelled?: Hook<(el: HostElement) => void>; - onBeforeLeave?: Hook<(el: HostElement) => void>; - onLeave?: Hook<(el: HostElement, done: () => void) => void>; - onAfterLeave?: Hook<(el: HostElement) => void>; - onLeaveCancelled?: Hook<(el: HostElement) => void>; - onBeforeAppear?: Hook<(el: HostElement) => void>; - onAppear?: Hook<(el: HostElement, done: () => void) => void>; - onAfterAppear?: Hook<(el: HostElement) => void>; - onAppearCancelled?: Hook<(el: HostElement) => void>; -} -export interface TransitionHooks<HostElement = RendererElement> { - mode: BaseTransitionProps['mode']; - persisted: boolean; - beforeEnter(el: HostElement): void; - enter(el: HostElement): void; - leave(el: HostElement, remove: () => void): void; - clone(vnode: VNode): TransitionHooks<HostElement>; - afterLeave?(): void; - delayLeave?(el: HostElement, earlyRemove: () => void, delayedLeave: () => void): void; - delayedLeave?(): void; -} -export interface TransitionState { - isMounted: boolean; - isLeaving: boolean; - isUnmounting: boolean; - leavingVNodes: Map<any, Record<string, VNode>>; -} -export declare function useTransitionState(): TransitionState; -export declare const BaseTransitionPropsValidators: Record<string, any>; -export declare const BaseTransition: { - new (): { - $props: BaseTransitionProps<any>; - $slots: { - default(): VNode[]; - }; - }; -}; -export declare function resolveTransitionHooks(vnode: VNode, props: BaseTransitionProps<any>, state: TransitionState, instance: ComponentInternalInstance, postClone?: (hooks: TransitionHooks) => void): TransitionHooks; -export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks): void; -export declare function getTransitionRawChildren(children: VNode[], keepComment?: boolean, parentKey?: VNode['key']): VNode[]; - -export interface Renderer<HostElement = RendererElement> { - render: RootRenderFunction<HostElement>; - createApp: CreateAppFunction<HostElement>; -} -export interface HydrationRenderer extends Renderer<Element | ShadowRoot> { - hydrate: RootHydrateFunction; -} -export type ElementNamespace = 'svg' | 'mathml' | undefined; -export type RootRenderFunction<HostElement = RendererElement> = (vnode: VNode | null, container: HostElement, namespace?: ElementNamespace) => void; -export interface RendererOptions<HostNode = RendererNode, HostElement = RendererElement> { - patchProp(el: HostElement, key: string, prevValue: any, nextValue: any, namespace?: ElementNamespace, parentComponent?: ComponentInternalInstance | null): void; - insert(el: HostNode, parent: HostElement, anchor?: HostNode | null): void; - remove(el: HostNode): void; - createElement(type: string, namespace?: ElementNamespace, isCustomizedBuiltIn?: string, vnodeProps?: (VNodeProps & { - [key: string]: any; - }) | null): HostElement; - createText(text: string): HostNode; - createComment(text: string): HostNode; - setText(node: HostNode, text: string): void; - setElementText(node: HostElement, text: string): void; - parentNode(node: HostNode): HostElement | null; - nextSibling(node: HostNode): HostNode | null; - querySelector?(selector: string): HostElement | null; - setScopeId?(el: HostElement, id: string): void; - cloneNode?(node: HostNode): HostNode; - insertStaticContent?(content: string, parent: HostElement, anchor: HostNode | null, namespace: ElementNamespace, start?: HostNode | null, end?: HostNode | null): [HostNode, HostNode]; -} -export interface RendererNode { - [key: string | symbol]: any; -} -export interface RendererElement extends RendererNode { -} -interface RendererInternals<HostNode = RendererNode, HostElement = RendererElement> { - p: PatchFn; - um: UnmountFn; - r: RemoveFn; - m: MoveFn; - mt: MountComponentFn; - mc: MountChildrenFn; - pc: PatchChildrenFn; - pbc: PatchBlockChildrenFn; - n: NextFn; - o: RendererOptions<HostNode, HostElement>; -} -type PatchFn = (n1: VNode | null, // null means this is a mount -n2: VNode, container: RendererElement, anchor?: RendererNode | null, parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary | null, namespace?: ElementNamespace, slotScopeIds?: string[] | null, optimized?: boolean) => void; -type MountChildrenFn = (children: VNodeArrayChildren, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, start?: number) => void; -type PatchChildrenFn = (n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean) => void; -type PatchBlockChildrenFn = (oldChildren: VNode[], newChildren: VNode[], fallbackContainer: RendererElement, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null) => void; -type MoveFn = (vnode: VNode, container: RendererElement, anchor: RendererNode | null, type: MoveType, parentSuspense?: SuspenseBoundary | null) => void; -type NextFn = (vnode: VNode) => RendererNode | null; -type UnmountFn = (vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean) => void; -type RemoveFn = (vnode: VNode) => void; -type MountComponentFn = (initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, optimized: boolean) => void; -type SetupRenderEffectFn = (instance: ComponentInternalInstance, initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, optimized: boolean) => void; -declare enum MoveType { - ENTER = 0, - LEAVE = 1, - REORDER = 2 -} -/** - * The createRenderer function accepts two generic arguments: - * HostNode and HostElement, corresponding to Node and Element types in the - * host environment. For example, for runtime-dom, HostNode would be the DOM - * `Node` interface and HostElement would be the DOM `Element` interface. - * - * Custom renderers can pass in the platform specific types like this: - * - * ``` js - * const { render, createApp } = createRenderer<Node, Element>({ - * patchProp, - * ...nodeOps - * }) - * ``` - */ -export declare function createRenderer<HostNode = RendererNode, HostElement = RendererElement>(options: RendererOptions<HostNode, HostElement>): Renderer<HostElement>; -export declare function createHydrationRenderer(options: RendererOptions<Node, Element>): HydrationRenderer; - -type MatchPattern = string | RegExp | (string | RegExp)[]; -export interface KeepAliveProps { - include?: MatchPattern; - exclude?: MatchPattern; - max?: number | string; -} -export declare const KeepAlive: { - __isKeepAlive: true; - new (): { - $props: VNodeProps & KeepAliveProps; - $slots: { - default(): VNode[]; - }; - }; -}; -export declare function onActivated(hook: Function, target?: ComponentInternalInstance | null): void; -export declare function onDeactivated(hook: Function, target?: ComponentInternalInstance | null): void; - -type CreateHook<T = any> = (hook: T, target?: ComponentInternalInstance | null) => void; -export declare const onBeforeMount: CreateHook; -export declare const onMounted: CreateHook; -export declare const onBeforeUpdate: CreateHook; -export declare const onUpdated: CreateHook; -export declare const onBeforeUnmount: CreateHook; -export declare const onUnmounted: CreateHook; -export declare const onServerPrefetch: CreateHook; -type DebuggerHook = (e: DebuggerEvent) => void; -export declare const onRenderTriggered: CreateHook<DebuggerHook>; -export declare const onRenderTracked: CreateHook<DebuggerHook>; -type ErrorCapturedHook<TError = unknown> = (err: TError, instance: ComponentPublicInstance | null, info: string) => boolean | void; -export declare function onErrorCaptured<TError = Error>(hook: ErrorCapturedHook<TError>, target?: ComponentInternalInstance | null): void; - -declare enum DeprecationTypes$1 { - GLOBAL_MOUNT = "GLOBAL_MOUNT", - GLOBAL_MOUNT_CONTAINER = "GLOBAL_MOUNT_CONTAINER", - GLOBAL_EXTEND = "GLOBAL_EXTEND", - GLOBAL_PROTOTYPE = "GLOBAL_PROTOTYPE", - GLOBAL_SET = "GLOBAL_SET", - GLOBAL_DELETE = "GLOBAL_DELETE", - GLOBAL_OBSERVABLE = "GLOBAL_OBSERVABLE", - GLOBAL_PRIVATE_UTIL = "GLOBAL_PRIVATE_UTIL", - CONFIG_SILENT = "CONFIG_SILENT", - CONFIG_DEVTOOLS = "CONFIG_DEVTOOLS", - CONFIG_KEY_CODES = "CONFIG_KEY_CODES", - CONFIG_PRODUCTION_TIP = "CONFIG_PRODUCTION_TIP", - CONFIG_IGNORED_ELEMENTS = "CONFIG_IGNORED_ELEMENTS", - CONFIG_WHITESPACE = "CONFIG_WHITESPACE", - CONFIG_OPTION_MERGE_STRATS = "CONFIG_OPTION_MERGE_STRATS", - INSTANCE_SET = "INSTANCE_SET", - INSTANCE_DELETE = "INSTANCE_DELETE", - INSTANCE_DESTROY = "INSTANCE_DESTROY", - INSTANCE_EVENT_EMITTER = "INSTANCE_EVENT_EMITTER", - INSTANCE_EVENT_HOOKS = "INSTANCE_EVENT_HOOKS", - INSTANCE_CHILDREN = "INSTANCE_CHILDREN", - INSTANCE_LISTENERS = "INSTANCE_LISTENERS", - INSTANCE_SCOPED_SLOTS = "INSTANCE_SCOPED_SLOTS", - INSTANCE_ATTRS_CLASS_STYLE = "INSTANCE_ATTRS_CLASS_STYLE", - OPTIONS_DATA_FN = "OPTIONS_DATA_FN", - OPTIONS_DATA_MERGE = "OPTIONS_DATA_MERGE", - OPTIONS_BEFORE_DESTROY = "OPTIONS_BEFORE_DESTROY", - OPTIONS_DESTROYED = "OPTIONS_DESTROYED", - WATCH_ARRAY = "WATCH_ARRAY", - PROPS_DEFAULT_THIS = "PROPS_DEFAULT_THIS", - V_ON_KEYCODE_MODIFIER = "V_ON_KEYCODE_MODIFIER", - CUSTOM_DIR = "CUSTOM_DIR", - ATTR_FALSE_VALUE = "ATTR_FALSE_VALUE", - ATTR_ENUMERATED_COERCION = "ATTR_ENUMERATED_COERCION", - TRANSITION_CLASSES = "TRANSITION_CLASSES", - TRANSITION_GROUP_ROOT = "TRANSITION_GROUP_ROOT", - COMPONENT_ASYNC = "COMPONENT_ASYNC", - COMPONENT_FUNCTIONAL = "COMPONENT_FUNCTIONAL", - COMPONENT_V_MODEL = "COMPONENT_V_MODEL", - RENDER_FUNCTION = "RENDER_FUNCTION", - FILTERS = "FILTERS", - PRIVATE_APIS = "PRIVATE_APIS" -} -type CompatConfig = Partial<Record<DeprecationTypes$1, boolean | 'suppress-warning'>> & { - MODE?: 2 | 3 | ((comp: Component | null) => 2 | 3); -}; -declare function configureCompat(config: CompatConfig): void; - -/** - * Interface for declaring custom options. - * - * @example - * ```ts - * declare module 'vue' { - * interface ComponentCustomOptions { - * beforeRouteUpdate?( - * to: Route, - * from: Route, - * next: () => void - * ): void - * } - * } - * ``` - */ -export interface ComponentCustomOptions { -} -export type RenderFunction = () => VNodeChild; -export interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, E extends EmitsOptions, EE extends string = string, Defaults = {}, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions> extends LegacyOptions<Props, D, C, M, Mixin, Extends, I, II, Provide>, ComponentInternalOptions, ComponentCustomOptions { - setup?: (this: void, props: LooseRequired<Props & Prettify<UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, 'P'>>>, ctx: SetupContext<E, S>) => Promise<RawBindings> | RawBindings | RenderFunction | void; - name?: string; - template?: string | object; - render?: Function; - components?: LC & Record<string, Component>; - directives?: Directives & Record<string, Directive>; - inheritAttrs?: boolean; - emits?: (E | EE[]) & ThisType<void>; - slots?: S; - expose?: Exposed[]; - serverPrefetch?(): void | Promise<any>; - compilerOptions?: RuntimeCompilerOptions; - call?: (this: unknown, ...args: unknown[]) => never; - __isFragment?: never; - __isTeleport?: never; - __isSuspense?: never; - __defaults?: Defaults; -} -/** - * Subset of compiler options that makes sense for the runtime. - */ -export interface RuntimeCompilerOptions { - isCustomElement?: (tag: string) => boolean; - whitespace?: 'preserve' | 'condense'; - comments?: boolean; - delimiters?: [string, string]; -} -export type ComponentOptions<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = any, M extends MethodOptions = any, Mixin extends ComponentOptionsMixin = any, Extends extends ComponentOptionsMixin = any, E extends EmitsOptions = any, EE extends string = string, Defaults = {}, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, I, II, S, LC, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<{}, RawBindings, D, C, M, Mixin, Extends, E, Readonly<Props>, Defaults, false, I, S, LC, Directives>>; -export type ComponentOptionsMixin = ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>; -export type ComputedOptions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>; -export interface MethodOptions { - [key: string]: Function; -} -type ExtractComputedReturns<T extends any> = { - [key in keyof T]: T[key] extends { - get: (...args: any[]) => infer TReturn; - } ? TReturn : T[key] extends (...args: any[]) => infer TReturn ? TReturn : never; -}; -type ObjectWatchOptionItem = { - handler: WatchCallback | string; -} & WatchOptions; -type WatchOptionItem = string | WatchCallback | ObjectWatchOptionItem; -type ComponentWatchOptionItem = WatchOptionItem | WatchOptionItem[]; -type ComponentWatchOptions = Record<string, ComponentWatchOptionItem>; -export type ComponentProvideOptions = ObjectProvideOptions | Function; -type ObjectProvideOptions = Record<string | symbol, unknown>; -export type ComponentInjectOptions = string[] | ObjectInjectOptions; -type ObjectInjectOptions = Record<string | symbol, string | symbol | { - from?: string | symbol; - default?: unknown; -}>; -type InjectToObject<T extends ComponentInjectOptions> = T extends string[] ? { - [K in T[number]]?: unknown; -} : T extends ObjectInjectOptions ? { - [K in keyof T]?: unknown; -} : never; -interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, I extends ComponentInjectOptions, II extends string, Provide extends ComponentProvideOptions = ComponentProvideOptions> { - compatConfig?: CompatConfig; - [key: string]: any; - data?: (this: CreateComponentPublicInstanceWithMixins<Props, {}, {}, {}, MethodOptions, Mixin, Extends>, vm: CreateComponentPublicInstanceWithMixins<Props, {}, {}, {}, MethodOptions, Mixin, Extends>) => D; - computed?: C; - methods?: M; - watch?: ComponentWatchOptions; - provide?: Provide; - inject?: I | II[]; - filters?: Record<string, Function>; - mixins?: Mixin[]; - extends?: Extends; - beforeCreate?(): void; - created?(): void; - beforeMount?(): void; - mounted?(): void; - beforeUpdate?(): void; - updated?(): void; - activated?(): void; - deactivated?(): void; - /** @deprecated use `beforeUnmount` instead */ - beforeDestroy?(): void; - beforeUnmount?(): void; - /** @deprecated use `unmounted` instead */ - destroyed?(): void; - unmounted?(): void; - renderTracked?: DebuggerHook; - renderTriggered?: DebuggerHook; - errorCaptured?: ErrorCapturedHook; - /** - * runtime compile only - * @deprecated use `compilerOptions.delimiters` instead. - */ - delimiters?: [string, string]; - /** - * #3468 - * - * type-only, used to assist Mixin's type inference, - * typescript will try to simplify the inferred `Mixin` type, - * with the `__differentiator`, typescript won't be able to combine different mixins, - * because the `__differentiator` will be different - */ - __differentiator?: keyof D | keyof C | keyof M; -} -type MergedHook<T = () => void> = T | T[]; -type MergedComponentOptionsOverride = { - beforeCreate?: MergedHook; - created?: MergedHook; - beforeMount?: MergedHook; - mounted?: MergedHook; - beforeUpdate?: MergedHook; - updated?: MergedHook; - activated?: MergedHook; - deactivated?: MergedHook; - /** @deprecated use `beforeUnmount` instead */ - beforeDestroy?: MergedHook; - beforeUnmount?: MergedHook; - /** @deprecated use `unmounted` instead */ - destroyed?: MergedHook; - unmounted?: MergedHook; - renderTracked?: MergedHook<DebuggerHook>; - renderTriggered?: MergedHook<DebuggerHook>; - errorCaptured?: MergedHook<ErrorCapturedHook>; -}; -type OptionTypesKeys = 'P' | 'B' | 'D' | 'C' | 'M' | 'Defaults'; -type OptionTypesType<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Defaults = {}> = { - P: P; - B: B; - D: D; - C: C; - M: M; - Defaults: Defaults; -}; -/** - * @deprecated - */ -export type ComponentOptionsWithoutProps<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, TE extends ComponentTypeEmits = {}, ResolvedEmits extends EmitsOptions = {} extends E ? TypeEmitsToOptions<TE> : E, PE = Props & EmitsToProps<ResolvedEmits>> = ComponentOptionsBase<PE, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II, S, LC, Directives, Exposed, Provide> & { - props?: never; - /** - * @private for language-tools use only - */ - __typeProps?: Props; - /** - * @private for language-tools use only - */ - __typeEmits?: TE; -} & ThisType<CreateComponentPublicInstanceWithMixins<PE, RawBindings, D, C, M, Mixin, Extends, ResolvedEmits, EE, {}, false, I, S, LC, Directives, Exposed>>; -/** - * @deprecated - */ -export type ComponentOptionsWithArrayProps<PropNames extends string = string, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Props = Prettify<Readonly<{ - [key in PropNames]?: any; -} & EmitsToProps<E>>>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II, S, LC, Directives, Exposed, Provide> & { - props: PropNames[]; -} & ThisType<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, {}, false, I, S, LC, Directives, Exposed>>; -/** - * @deprecated - */ -export type ComponentOptionsWithObjectProps<PropsOptions = ComponentObjectPropsOptions, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Props = Prettify<Readonly<ExtractPropTypes<PropsOptions>> & Readonly<EmitsToProps<E>>>, Defaults = ExtractDefaultPropTypes<PropsOptions>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, I, II, S, LC, Directives, Exposed, Provide> & { - props: PropsOptions & ThisType<void>; -} & ThisType<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, Defaults, false, I, S, LC, Directives>>; - -interface InjectionConstraint<T> { -} -export type InjectionKey<T> = symbol & InjectionConstraint<T>; -export declare function provide<T, K = InjectionKey<T> | string | number>(key: K, value: K extends InjectionKey<infer V> ? V : T): void; -export declare function inject<T>(key: InjectionKey<T> | string): T | undefined; -export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T, treatDefaultAsFactory?: false): T; -export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T | (() => T), treatDefaultAsFactory: true): T; -/** - * Returns true if `inject()` can be used without warning about being called in the wrong place (e.g. outside of - * setup()). This is used by libraries that want to use `inject()` internally without triggering a warning to the end - * user. One example is `useRoute()` in `vue-router`. - */ -export declare function hasInjectionContext(): boolean; - -export type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps; -type ResolveProps<PropsOrPropOptions, E extends EmitsOptions> = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & ({} extends E ? {} : EmitsToProps<E>); -export type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, PP = PublicProps, Props = ResolveProps<PropsOrPropOptions, E>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, MakeDefaultsOptional extends boolean = true, TypeRefs extends Record<string, unknown> = {}, TypeEl extends Element = any> = ComponentPublicInstanceConstructor<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, PP, Defaults, MakeDefaultsOptional, {}, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, TypeRefs, TypeEl>> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, {}, string, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, Provide> & PP; -export type DefineSetupFnComponent<P extends Record<string, any>, E extends EmitsOptions = {}, S extends SlotsType = SlotsType, Props = P & EmitsToProps<E>, PP = PublicProps> = new (props: Props & PP) => CreateComponentPublicInstanceWithMixins<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, E, PP, {}, false, {}, S>; -type ToResolvedProps<Props, Emits extends EmitsOptions> = Readonly<Props> & Readonly<EmitsToProps<Emits>>; -export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs'> & { - props?: (keyof Props)[]; - emits?: E | EE[]; - slots?: S; -}): DefineSetupFnComponent<Props, E, S>; -export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs'> & { - props?: ComponentObjectPropsOptions<Props>; - emits?: E | EE[]; - slots?: S; -}): DefineSetupFnComponent<Props, E, S>; -export declare function defineComponent<TypeProps, RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, TypeEmits extends ComponentTypeEmits = {}, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Data = {}, SetupBindings = {}, Computed extends ComputedOptions = {}, Methods extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, InjectOptions extends ComponentInjectOptions = {}, InjectKeys extends string = string, Slots extends SlotsType = {}, LocalComponents extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, ResolvedEmits extends EmitsOptions = {} extends RuntimeEmitsOptions ? TypeEmitsToOptions<TypeEmits> : RuntimeEmitsOptions, InferredProps = IsKeyValues<TypeProps> extends true ? TypeProps : string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { - [key in RuntimePropsKeys]?: any; -}, TypeRefs extends Record<string, unknown> = {}, TypeEl extends Element = any>(options: { - props?: (RuntimePropsOptions & ThisType<void>) | RuntimePropsKeys[]; - /** - * @private for language-tools use only - */ - __typeProps?: TypeProps; - /** - * @private for language-tools use only - */ - __typeEmits?: TypeEmits; - /** - * @private for language-tools use only - */ - __typeRefs?: TypeRefs; - /** - * @private for language-tools use only - */ - __typeEl?: TypeEl; -} & ComponentOptionsBase<ToResolvedProps<InferredProps, ResolvedEmits>, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, RuntimeEmitsKeys, {}, // Defaults -InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<ToResolvedProps<InferredProps, ResolvedEmits>, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, {}, {}, false, InjectOptions, Slots, LocalComponents, Directives, Exposed>>): DefineComponent<InferredProps, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, RuntimeEmitsKeys, PublicProps, ToResolvedProps<InferredProps, ResolvedEmits>, ExtractDefaultPropTypes<RuntimePropsOptions>, Slots, LocalComponents, Directives, Exposed, Provide, unknown extends TypeProps ? true : false, TypeRefs, TypeEl>; - -export interface App<HostElement = any> { - version: string; - config: AppConfig; - use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: Options): this; - use<Options>(plugin: Plugin<Options>, options: Options): this; - mixin(mixin: ComponentOptions): this; - component(name: string): Component | undefined; - component<T extends Component | DefineComponent>(name: string, component: T): this; - directive<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string>(name: string): Directive<HostElement, Value, Modifiers, Arg> | undefined; - directive<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string>(name: string, directive: Directive<HostElement, Value, Modifiers, Arg>): this; - mount(rootContainer: HostElement | string, - /** - * @internal - */ - isHydrate?: boolean, - /** - * @internal - */ - namespace?: boolean | ElementNamespace, - /** - * @internal - */ - vnode?: VNode): ComponentPublicInstance; - unmount(): void; - onUnmount(cb: () => void): void; - provide<T, K = InjectionKey<T> | string | number>(key: K, value: K extends InjectionKey<infer V> ? V : T): this; - /** - * Runs a function with the app as active instance. This allows using of `inject()` within the function to get access - * to variables provided via `app.provide()`. - * - * @param fn - function to run with the app as active instance - */ - runWithContext<T>(fn: () => T): T; - _uid: number; - _component: ConcreteComponent; - _props: Data | null; - _container: HostElement | null; - _context: AppContext; - _instance: ComponentInternalInstance | null; - /** - * v2 compat only - */ - filter?(name: string): Function | undefined; - filter?(name: string, filter: Function): this; -} -export type OptionMergeFunction = (to: unknown, from: unknown) => any; -export interface AppConfig { - readonly isNativeTag: (tag: string) => boolean; - performance: boolean; - optionMergeStrategies: Record<string, OptionMergeFunction>; - globalProperties: ComponentCustomProperties & Record<string, any>; - errorHandler?: (err: unknown, instance: ComponentPublicInstance | null, info: string) => void; - warnHandler?: (msg: string, instance: ComponentPublicInstance | null, trace: string) => void; - /** - * Options to pass to `@vue/compiler-dom`. - * Only supported in runtime compiler build. - */ - compilerOptions: RuntimeCompilerOptions; - /** - * @deprecated use config.compilerOptions.isCustomElement - */ - isCustomElement?: (tag: string) => boolean; - /** - * TODO document for 3.5 - * Enable warnings for computed getters that recursively trigger itself. - */ - warnRecursiveComputed?: boolean; - /** - * Whether to throw unhandled errors in production. - * Default is `false` to avoid crashing on any error (and only logs it) - * But in some cases, e.g. SSR, throwing might be more desirable. - */ - throwUnhandledErrorInProduction?: boolean; - /** - * Prefix for all useId() calls within this app - */ - idPrefix?: string; -} -export interface AppContext { - app: App; - config: AppConfig; - mixins: ComponentOptions[]; - components: Record<string, Component>; - directives: Record<string, Directive>; - provides: Record<string | symbol, any>; -} -type PluginInstallFunction<Options = any[]> = Options extends unknown[] ? (app: App, ...options: Options) => any : (app: App, options: Options) => any; -export type ObjectPlugin<Options = any[]> = { - install: PluginInstallFunction<Options>; -}; -export type FunctionPlugin<Options = any[]> = PluginInstallFunction<Options> & Partial<ObjectPlugin<Options>>; -export type Plugin<Options = any[]> = FunctionPlugin<Options> | ObjectPlugin<Options>; -export type CreateAppFunction<HostElement> = (rootComponent: Component, rootProps?: Data | null) => App<HostElement>; - -type TeleportVNode = VNode<RendererNode, RendererElement, TeleportProps>; -export interface TeleportProps { - to: string | RendererElement | null | undefined; - disabled?: boolean; - defer?: boolean; -} -declare const TeleportImpl: { - name: string; - __isTeleport: boolean; - process(n1: TeleportVNode | null, n2: TeleportVNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, internals: RendererInternals): void; - remove(vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, { um: unmount, o: { remove: hostRemove } }: RendererInternals, doRemove: boolean): void; - move: typeof moveTeleport; - hydrate: typeof hydrateTeleport; -}; -declare enum TeleportMoveTypes { - TARGET_CHANGE = 0, - TOGGLE = 1,// enable / disable - REORDER = 2 -} -declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, { o: { insert }, m: move }: RendererInternals, moveType?: TeleportMoveTypes): void; -declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector, insert, createText }, }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null; -export declare const Teleport: { - __isTeleport: true; - new (): { - $props: VNodeProps & TeleportProps; - $slots: { - default(): VNode[]; - }; - }; -}; - -/** - * @private - */ -export declare function resolveComponent(name: string, maybeSelfReference?: boolean): ConcreteComponent | string; -declare const NULL_DYNAMIC_COMPONENT: unique symbol; -/** - * @private - */ -export declare function resolveDynamicComponent(component: unknown): VNodeTypes; -/** - * @private - */ -export declare function resolveDirective(name: string): Directive | undefined; - -export declare const Fragment: { - __isFragment: true; - new (): { - $props: VNodeProps; - }; -}; -export declare const Text: unique symbol; -export declare const Comment: unique symbol; -export declare const Static: unique symbol; -export type VNodeTypes = string | VNode | Component | typeof Text | typeof Static | typeof Comment | typeof Fragment | typeof Teleport | typeof TeleportImpl | typeof Suspense | typeof SuspenseImpl; -export type VNodeRef = string | Ref | ((ref: Element | ComponentPublicInstance | null, refs: Record<string, any>) => void); -type VNodeNormalizedRefAtom = { - /** - * component instance - */ - i: ComponentInternalInstance; - /** - * Actual ref - */ - r: VNodeRef; - /** - * setup ref key - */ - k?: string; - /** - * refInFor marker - */ - f?: boolean; -}; -type VNodeNormalizedRef = VNodeNormalizedRefAtom | VNodeNormalizedRefAtom[]; -type VNodeMountHook = (vnode: VNode) => void; -type VNodeUpdateHook = (vnode: VNode, oldVNode: VNode) => void; -export type VNodeProps = { - key?: PropertyKey; - ref?: VNodeRef; - ref_for?: boolean; - ref_key?: string; - onVnodeBeforeMount?: VNodeMountHook | VNodeMountHook[]; - onVnodeMounted?: VNodeMountHook | VNodeMountHook[]; - onVnodeBeforeUpdate?: VNodeUpdateHook | VNodeUpdateHook[]; - onVnodeUpdated?: VNodeUpdateHook | VNodeUpdateHook[]; - onVnodeBeforeUnmount?: VNodeMountHook | VNodeMountHook[]; - onVnodeUnmounted?: VNodeMountHook | VNodeMountHook[]; -}; -type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void; -export type VNodeArrayChildren = Array<VNodeArrayChildren | VNodeChildAtom>; -export type VNodeChild = VNodeChildAtom | VNodeArrayChildren; -export type VNodeNormalizedChildren = string | VNodeArrayChildren | RawSlots | null; -export interface VNode<HostNode = RendererNode, HostElement = RendererElement, ExtraProps = { - [key: string]: any; -}> { - type: VNodeTypes; - props: (VNodeProps & ExtraProps) | null; - key: PropertyKey | null; - ref: VNodeNormalizedRef | null; - /** - * SFC only. This is assigned on vnode creation using currentScopeId - * which is set alongside currentRenderingInstance. - */ - scopeId: string | null; - children: VNodeNormalizedChildren; - component: ComponentInternalInstance | null; - dirs: DirectiveBinding[] | null; - transition: TransitionHooks<HostElement> | null; - el: HostNode | null; - anchor: HostNode | null; - target: HostElement | null; - targetStart: HostNode | null; - targetAnchor: HostNode | null; - suspense: SuspenseBoundary | null; - shapeFlag: number; - patchFlag: number; - appContext: AppContext | null; -} -/** - * Open a block. - * This must be called before `createBlock`. It cannot be part of `createBlock` - * because the children of the block are evaluated before `createBlock` itself - * is called. The generated code typically looks like this: - * - * ```js - * function render() { - * return (openBlock(),createBlock('div', null, [...])) - * } - * ``` - * disableTracking is true when creating a v-for fragment block, since a v-for - * fragment always diffs its children. - * - * @private - */ -export declare function openBlock(disableTracking?: boolean): void; -/** - * Block tracking sometimes needs to be disabled, for example during the - * creation of a tree that needs to be cached by v-once. The compiler generates - * code like this: - * - * ``` js - * _cache[1] || ( - * setBlockTracking(-1, true), - * _cache[1] = createVNode(...), - * setBlockTracking(1), - * _cache[1] - * ) - * ``` - * - * @private - */ -export declare function setBlockTracking(value: number, inVOnce?: boolean): void; -/** - * @private - */ -export declare function createElementBlock(type: string | typeof Fragment, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[], shapeFlag?: number): VNode; -/** - * Create a block root vnode. Takes the same exact arguments as `createVNode`. - * A block root keeps track of dynamic nodes within the block in the - * `dynamicChildren` array. - * - * @private - */ -export declare function createBlock(type: VNodeTypes | ClassComponent, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[]): VNode; -export declare function isVNode(value: any): value is VNode; -declare let vnodeArgsTransformer: ((args: Parameters<typeof _createVNode>, instance: ComponentInternalInstance | null) => Parameters<typeof _createVNode>) | undefined; -/** - * Internal API for registering an arguments transform for createVNode - * used for creating stubs in the test-utils - * It is *internal* but needs to be exposed for test-utils to pick up proper - * typings - */ -export declare function transformVNodeArgs(transformer?: typeof vnodeArgsTransformer): void; -export declare function createBaseVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, shapeFlag?: number, isBlockNode?: boolean, needFullChildrenNormalization?: boolean): VNode; - -export declare const createVNode: typeof _createVNode; -declare function _createVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, isBlockNode?: boolean): VNode; -export declare function guardReactiveProps(props: (Data & VNodeProps) | null): (Data & VNodeProps) | null; -export declare function cloneVNode<T, U>(vnode: VNode<T, U>, extraProps?: (Data & VNodeProps) | null, mergeRef?: boolean, cloneTransition?: boolean): VNode<T, U>; -/** - * @private - */ -export declare function createTextVNode(text?: string, flag?: number): VNode; -/** - * @private - */ -export declare function createStaticVNode(content: string, numberOfNodes: number): VNode; -/** - * @private - */ -export declare function createCommentVNode(text?: string, asBlock?: boolean): VNode; -export declare function mergeProps(...args: (Data & VNodeProps)[]): Data; - -type Data = Record<string, unknown>; -/** - * Public utility type for extracting the instance type of a component. - * Works with all valid component definition types. This is intended to replace - * the usage of `InstanceType<typeof Comp>` which only works for - * constructor-based component definition types. - * - * @example - * ```ts - * const MyComp = { ... } - * declare const instance: ComponentInstance<typeof MyComp> - * ``` - */ -export type ComponentInstance<T> = T extends { - new (): ComponentPublicInstance; -} ? InstanceType<T> : T extends FunctionalComponent<infer Props, infer Emits> ? ComponentPublicInstance<Props, {}, {}, {}, {}, ShortEmitsToObject<Emits>> : T extends Component<infer Props, infer RawBindings, infer D, infer C, infer M> ? ComponentPublicInstance<unknown extends Props ? {} : Props, unknown extends RawBindings ? {} : RawBindings, unknown extends D ? {} : D, C, M> : never; -/** - * For extending allowed non-declared props on components in TSX - */ -export interface ComponentCustomProps { -} -/** - * For globally defined Directives - * Here is an example of adding a directive `VTooltip` as global directive: - * - * @example - * ```ts - * import VTooltip from 'v-tooltip' - * - * declare module '@vue/runtime-core' { - * interface GlobalDirectives { - * VTooltip - * } - * } - * ``` - */ -export interface GlobalDirectives { -} -/** - * For globally defined Components - * Here is an example of adding a component `RouterView` as global component: - * - * @example - * ```ts - * import { RouterView } from 'vue-router' - * - * declare module '@vue/runtime-core' { - * interface GlobalComponents { - * RouterView - * } - * } - * ``` - */ -export interface GlobalComponents { - Teleport: DefineComponent<TeleportProps>; - Suspense: DefineComponent<SuspenseProps>; - KeepAlive: DefineComponent<KeepAliveProps>; - BaseTransition: DefineComponent<BaseTransitionProps>; -} -/** - * Default allowed non-declared props on component in TSX - */ -export interface AllowedComponentProps { - class?: unknown; - style?: unknown; -} -interface ComponentInternalOptions { - /** - * Compat build only, for bailing out of certain compatibility behavior - */ - __isBuiltIn?: boolean; - /** - * This one should be exposed so that devtools can make use of it - */ - __file?: string; - /** - * name inferred from filename - */ - __name?: string; -} -export interface FunctionalComponent<P = {}, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any, EE extends EmitsOptions = ShortEmitsToObject<E>> extends ComponentInternalOptions { - (props: P & EmitsToProps<EE>, ctx: Omit<SetupContext<EE, IfAny<S, {}, SlotsType<S>>>, 'expose'>): any; - props?: ComponentPropsOptions<P>; - emits?: EE | (keyof EE)[]; - slots?: IfAny<S, Slots, SlotsType<S>>; - inheritAttrs?: boolean; - displayName?: string; - compatConfig?: CompatConfig; -} -interface ClassComponent { - new (...args: any[]): ComponentPublicInstance<any, any, any, any, any>; - __vccOpts: ComponentOptions; -} -/** - * Concrete component type matches its actual value: it's either an options - * object, or a function. Use this where the code expects to work with actual - * values, e.g. checking if its a function or not. This is mostly for internal - * implementation code. - */ -export type ConcreteComponent<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ComponentOptions<Props, RawBindings, D, C, M> | FunctionalComponent<Props, E, S>; -/** - * A type used in public APIs where a component type is expected. - * The constructor type is an artificial type returned by defineComponent(). - */ -export type Component<Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ConcreteComponent<Props, RawBindings, D, C, M, E, S> | ComponentPublicInstanceConstructor<Props>; - -export type SetupContext<E = EmitsOptions, S extends SlotsType = {}> = E extends any ? { - attrs: Data; - slots: UnwrapSlotsType<S>; - emit: EmitFn<E>; - expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void; -} : never; -/** - * We expose a subset of properties on the internal instance as they are - * useful for advanced external libraries and tools. - */ -export interface ComponentInternalInstance { - uid: number; - type: ConcreteComponent; - parent: ComponentInternalInstance | null; - root: ComponentInternalInstance; - appContext: AppContext; - /** - * Vnode representing this component in its parent's vdom tree - */ - vnode: VNode; - /** - * Root vnode of this component's own vdom tree - */ - subTree: VNode; - /** - * Render effect instance - */ - effect: ReactiveEffect; - /** - * Force update render effect - */ - update: () => void; - /** - * Render effect job to be passed to scheduler (checks if dirty) - */ - job: SchedulerJob; - proxy: ComponentPublicInstance | null; - exposed: Record<string, any> | null; - exposeProxy: Record<string, any> | null; - data: Data; - props: Data; - attrs: Data; - slots: InternalSlots; - refs: Data; - emit: EmitFn; - isMounted: boolean; - isUnmounted: boolean; - isDeactivated: boolean; -} -export declare const getCurrentInstance: () => ComponentInternalInstance | null; -/** - * For runtime-dom to register the compiler. - * Note the exported method uses any to avoid d.ts relying on the compiler types. - */ -export declare function registerRuntimeCompiler(_compile: any): void; -export declare const isRuntimeOnly: () => boolean; -export interface ComponentCustomElementInterface { -} - -type MaybeUndefined<T, I> = I extends true ? T | undefined : T; -type MapSources<T, Immediate> = { - [K in keyof T]: T[K] extends WatchSource<infer V> ? MaybeUndefined<V, Immediate> : T[K] extends object ? MaybeUndefined<T[K], Immediate> : never; -}; -export interface WatchEffectOptions extends DebuggerOptions { - flush?: 'pre' | 'post' | 'sync'; -} -export interface WatchOptions<Immediate = boolean> extends WatchEffectOptions { - immediate?: Immediate; - deep?: boolean | number; - once?: boolean; -} -export declare function watchEffect(effect: WatchEffect, options?: WatchEffectOptions): WatchHandle; -export declare function watchPostEffect(effect: WatchEffect, options?: DebuggerOptions): WatchHandle; -export declare function watchSyncEffect(effect: WatchEffect, options?: DebuggerOptions): WatchHandle; -export type MultiWatchSources = (WatchSource<unknown> | object)[]; -export declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle; -export declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(sources: readonly [...T] | T, cb: [T] extends [ReactiveMarker] ? WatchCallback<T, MaybeUndefined<T, Immediate>> : WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle; -export declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle; -export declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle; - -/** - * A lazy hydration strategy for async components. - * @param hydrate - call this to perform the actual hydration. - * @param forEachElement - iterate through the root elements of the component's - * non-hydrated DOM, accounting for possible fragments. - * @returns a teardown function to be called if the async component is unmounted - * before it is hydrated. This can be used to e.g. remove DOM event - * listeners. - */ -export type HydrationStrategy = (hydrate: () => void, forEachElement: (cb: (el: Element) => any) => void) => (() => void) | void; -export type HydrationStrategyFactory<Options> = (options?: Options) => HydrationStrategy; -export declare const hydrateOnIdle: HydrationStrategyFactory<number>; -export declare const hydrateOnVisible: HydrationStrategyFactory<IntersectionObserverInit>; -export declare const hydrateOnMediaQuery: HydrationStrategyFactory<string>; -export declare const hydrateOnInteraction: HydrationStrategyFactory<keyof HTMLElementEventMap | Array<keyof HTMLElementEventMap>>; - -type AsyncComponentResolveResult<T = Component> = T | { - default: T; -}; -export type AsyncComponentLoader<T = any> = () => Promise<AsyncComponentResolveResult<T>>; -export interface AsyncComponentOptions<T = any> { - loader: AsyncComponentLoader<T>; - loadingComponent?: Component; - errorComponent?: Component; - delay?: number; - timeout?: number; - suspensible?: boolean; - hydrate?: HydrationStrategy; - onError?: (error: Error, retry: () => void, fail: () => void, attempts: number) => any; -} -/*! #__NO_SIDE_EFFECTS__ */ -export declare function defineAsyncComponent<T extends Component = { - new (): ComponentPublicInstance; -}>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T; - -export declare function useModel<M extends PropertyKey, T extends Record<string, any>, K extends keyof T, G = T[K], S = T[K]>(props: T, name: K, options?: DefineModelOptions<T[K], G, S>): ModelRef<T[K], M, G, S>; - -export declare function useTemplateRef<T = unknown, Keys extends string = string>(key: Keys): Readonly<ShallowRef<T | null>>; - -export declare function useId(): string; - -type RawProps = VNodeProps & { - __v_isVNode?: never; - [Symbol.iterator]?: never; -} & Record<string, any>; -type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any); -interface Constructor<P = any> { - __isFragment?: never; - __isTeleport?: never; - __isSuspense?: never; - new (...args: any[]): { - $props: P; - }; -} -type HTMLElementEventHandler = { - [K in keyof HTMLElementEventMap as `on${Capitalize<K>}`]?: (ev: HTMLElementEventMap[K]) => any; -}; -export declare function h<K extends keyof HTMLElementTagNameMap>(type: K, children?: RawChildren): VNode; -export declare function h<K extends keyof HTMLElementTagNameMap>(type: K, props?: (RawProps & HTMLElementEventHandler) | null, children?: RawChildren | RawSlots): VNode; -export declare function h(type: string, children?: RawChildren): VNode; -export declare function h(type: string, props?: RawProps | null, children?: RawChildren | RawSlots): VNode; -export declare function h(type: typeof Text | typeof Comment, children?: string | number | boolean): VNode; -export declare function h(type: typeof Text | typeof Comment, props?: null, children?: string | number | boolean): VNode; -export declare function h(type: typeof Fragment, children?: VNodeArrayChildren): VNode; -export declare function h(type: typeof Fragment, props?: RawProps | null, children?: VNodeArrayChildren): VNode; -export declare function h(type: typeof Teleport, props: RawProps & TeleportProps, children: RawChildren | RawSlots): VNode; -export declare function h(type: typeof Suspense, children?: RawChildren): VNode; -export declare function h(type: typeof Suspense, props?: (RawProps & SuspenseProps) | null, children?: RawChildren | RawSlots): VNode; -export declare function h<P, E extends EmitsOptions = {}, S extends Record<string, any> = any>(type: FunctionalComponent<P, any, S, any>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | IfAny<S, RawSlots, S>): VNode; -export declare function h(type: Component, children?: RawChildren): VNode; -export declare function h<P>(type: ConcreteComponent | string, children?: RawChildren): VNode; -export declare function h<P>(type: ConcreteComponent<P> | string, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren): VNode; -export declare function h<P>(type: Component<P>, props?: (RawProps & P) | null, children?: RawChildren | RawSlots): VNode; -export declare function h<P>(type: ComponentOptions<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; -export declare function h(type: Constructor, children?: RawChildren): VNode; -export declare function h<P>(type: Constructor<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; -export declare function h(type: DefineComponent, children?: RawChildren): VNode; -export declare function h<P>(type: DefineComponent<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; -export declare function h(type: string | Component, children?: RawChildren): VNode; -export declare function h<P>(type: string | Component<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; - -export declare const ssrContextKey: unique symbol; -export declare const useSSRContext: <T = Record<string, any>>() => T | undefined; - -declare function warn$1(msg: string, ...args: any[]): void; - -export declare enum ErrorCodes { - SETUP_FUNCTION = 0, - RENDER_FUNCTION = 1, - NATIVE_EVENT_HANDLER = 5, - COMPONENT_EVENT_HANDLER = 6, - VNODE_HOOK = 7, - DIRECTIVE_HOOK = 8, - TRANSITION_HOOK = 9, - APP_ERROR_HANDLER = 10, - APP_WARN_HANDLER = 11, - FUNCTION_REF = 12, - ASYNC_COMPONENT_LOADER = 13, - SCHEDULER = 14, - COMPONENT_UPDATE = 15, - APP_UNMOUNT_CLEANUP = 16 -} -type ErrorTypes = LifecycleHooks | ErrorCodes | WatchErrorCodes; -export declare function callWithErrorHandling(fn: Function, instance: ComponentInternalInstance | null | undefined, type: ErrorTypes, args?: unknown[]): any; -export declare function callWithAsyncErrorHandling(fn: Function | Function[], instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any; -export declare function handleError(err: unknown, instance: ComponentInternalInstance | null | undefined, type: ErrorTypes, throwInDev?: boolean): void; - -export declare function initCustomFormatter(): void; - -interface AppRecord { - id: number; - app: App; - version: string; - types: Record<string, string | Symbol>; -} -interface DevtoolsHook { - enabled?: boolean; - emit: (event: string, ...payload: any[]) => void; - on: (event: string, handler: Function) => void; - once: (event: string, handler: Function) => void; - off: (event: string, handler: Function) => void; - appRecords: AppRecord[]; - /** - * Added at https://github.com/vuejs/devtools/commit/f2ad51eea789006ab66942e5a27c0f0986a257f9 - * Returns whether the arg was buffered or not - */ - cleanupBuffer?: (matchArg: unknown) => boolean; -} -declare function setDevtoolsHook$1(hook: DevtoolsHook, target: any): void; - -type HMRComponent = ComponentOptions | ClassComponent; -export interface HMRRuntime { - createRecord: typeof createRecord; - rerender: typeof rerender; - reload: typeof reload; -} -declare function createRecord(id: string, initialDef: HMRComponent): boolean; -declare function rerender(id: string, newRender?: Function): void; -declare function reload(id: string, newComp: HMRComponent): void; - -/** - * Set scope id when creating hoisted vnodes. - * @private compiler helper - */ -export declare function pushScopeId(id: string | null): void; -/** - * Technically we no longer need this after 3.0.8 but we need to keep the same - * API for backwards compat w/ code generated by compilers. - * @private - */ -export declare function popScopeId(): void; -/** - * Only for backwards compat - * @private - */ -export declare const withScopeId: (_id: string) => typeof withCtx; -/** - * Wrap a slot function to memoize current rendering instance - * @private compiler helper - */ -export declare function withCtx(fn: Function, ctx?: ComponentInternalInstance | null, isNonScopedSlot?: boolean): Function; - -/** - * v-for string - * @private - */ -export declare function renderList(source: string, renderItem: (value: string, index: number) => VNodeChild): VNodeChild[]; -/** - * v-for number - */ -export declare function renderList(source: number, renderItem: (value: number, index: number) => VNodeChild): VNodeChild[]; -/** - * v-for array - */ -export declare function renderList<T>(source: T[], renderItem: (value: T, index: number) => VNodeChild): VNodeChild[]; -/** - * v-for iterable - */ -export declare function renderList<T>(source: Iterable<T>, renderItem: (value: T, index: number) => VNodeChild): VNodeChild[]; -/** - * v-for object - */ -export declare function renderList<T>(source: T, renderItem: <K extends keyof T>(value: T[K], key: string, index: number) => VNodeChild): VNodeChild[]; - -/** - * For prefixing keys in v-on="obj" with "on" - * @private - */ -export declare function toHandlers(obj: Record<string, any>, preserveCaseIfNecessary?: boolean): Record<string, any>; - -/** - * Compiler runtime helper for rendering `<slot/>` - * @private - */ -export declare function renderSlot(slots: Slots, name: string, props?: Data, fallback?: () => VNodeArrayChildren, noSlotted?: boolean): VNode; - -type SSRSlot = (...args: any[]) => VNode[] | undefined; -interface CompiledSlotDescriptor { - name: string; - fn: SSRSlot; - key?: string; -} -/** - * Compiler runtime helper for creating dynamic slots object - * @private - */ -export declare function createSlots(slots: Record<string, SSRSlot>, dynamicSlots: (CompiledSlotDescriptor | CompiledSlotDescriptor[] | undefined)[]): Record<string, SSRSlot>; - -export declare function withMemo(memo: any[], render: () => VNode<any, any>, cache: any[], index: number): VNode<any, any>; -export declare function isMemoSame(cached: VNode, memo: any[]): boolean; - -export type LegacyConfig = { - /** - * @deprecated `config.silent` option has been removed - */ - silent?: boolean; - /** - * @deprecated use __VUE_PROD_DEVTOOLS__ compile-time feature flag instead - * https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags - */ - devtools?: boolean; - /** - * @deprecated use `config.isCustomElement` instead - * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement - */ - ignoredElements?: (string | RegExp)[]; - /** - * @deprecated - * https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html - */ - keyCodes?: Record<string, number | number[]>; - /** - * @deprecated - * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed - */ - productionTip?: boolean; -}; - -type LegacyPublicInstance = ComponentPublicInstance & LegacyPublicProperties; -interface LegacyPublicProperties { - $set<T extends Record<keyof any, any>, K extends keyof T>(target: T, key: K, value: T[K]): void; - $delete<T extends Record<keyof any, any>, K extends keyof T>(target: T, key: K): void; - $mount(el?: string | Element): this; - $destroy(): void; - $scopedSlots: Slots; - $on(event: string | string[], fn: Function): this; - $once(event: string, fn: Function): this; - $off(event?: string | string[], fn?: Function): this; - $children: LegacyPublicProperties[]; - $listeners: Record<string, Function | Function[]>; -} - -/** - * @deprecated the default `Vue` export has been removed in Vue 3. The type for - * the default export is provided only for migration purposes. Please use - * named imports instead - e.g. `import { createApp } from 'vue'`. - */ -export type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & { - configureCompat: typeof configureCompat; - new (options?: ComponentOptions): LegacyPublicInstance; - version: string; - config: AppConfig & LegacyConfig; - nextTick: typeof nextTick; - use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: Options): CompatVue; - use<Options>(plugin: Plugin<Options>, options: Options): CompatVue; - mixin(mixin: ComponentOptions): CompatVue; - component(name: string): Component | undefined; - component(name: string, component: Component): CompatVue; - directive<T = any, V = any>(name: string): Directive<T, V> | undefined; - directive<T = any, V = any>(name: string, directive: Directive<T, V>): CompatVue; - compile(template: string): RenderFunction; - /** - * @deprecated Vue 3 no longer supports extending constructors. - */ - extend: (options?: ComponentOptions) => CompatVue; - /** - * @deprecated Vue 3 no longer needs set() for adding new properties. - */ - set(target: any, key: PropertyKey, value: any): void; - /** - * @deprecated Vue 3 no longer needs delete() for property deletions. - */ - delete(target: any, key: PropertyKey): void; - /** - * @deprecated use `reactive` instead. - */ - observable: typeof reactive; - /** - * @deprecated filters have been removed from Vue 3. - */ - filter(name: string, arg?: any): null; -}; - -export declare const version: string; - -export declare const warn: typeof warn$1; - -export declare const devtools: DevtoolsHook; -export declare const setDevtoolsHook: typeof setDevtoolsHook$1; - -declare module '@vue/reactivity' { - interface RefUnwrapBailTypes { - runtimeCoreBailTypes: VNode | { - $: ComponentInternalInstance; - }; - } -} - -export declare const DeprecationTypes: typeof DeprecationTypes$1; - -export { type WatchEffectOptions as WatchOptionsBase, createBaseVNode as createElementVNode, }; -// Note: this file is auto concatenated to the end of the bundled d.ts during -// build. - -declare module '@vue/runtime-core' { - export interface GlobalComponents { - Teleport: DefineComponent<TeleportProps> - Suspense: DefineComponent<SuspenseProps> - KeepAlive: DefineComponent<KeepAliveProps> - BaseTransition: DefineComponent<BaseTransitionProps> - } -} - -// Note: this file is auto concatenated to the end of the bundled d.ts during -// build. -type _defineProps = typeof defineProps -type _defineEmits = typeof defineEmits -type _defineExpose = typeof defineExpose -type _defineOptions = typeof defineOptions -type _defineSlots = typeof defineSlots -type _defineModel = typeof defineModel -type _withDefaults = typeof withDefaults - -declare global { - const defineProps: _defineProps - const defineEmits: _defineEmits - const defineExpose: _defineExpose - const defineOptions: _defineOptions - const defineSlots: _defineSlots - const defineModel: _defineModel - const withDefaults: _withDefaults -} diff --git a/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js b/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js deleted file mode 100644 index ec24dbd..0000000 --- a/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +++ /dev/null @@ -1,8419 +0,0 @@ -/** -* @vue/runtime-core v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, shallowReadArray, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity'; -export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity'; -import { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, capitalize, camelize, isSymbol, isGloballyAllowed, NO, hyphenate, EMPTY_ARR, toRawType, makeMap, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared'; -export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared'; - -const stack = []; -function pushWarningContext(vnode) { - stack.push(vnode); -} -function popWarningContext() { - stack.pop(); -} -let isWarning = false; -function warn$1(msg, ...args) { - if (isWarning) return; - isWarning = true; - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling( - appWarnHandler, - instance, - 11, - [ - // eslint-disable-next-line no-restricted-syntax - msg + args.map((a) => { - var _a, _b; - return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); - }).join(""), - instance && instance.proxy, - trace.map( - ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` - ).join("\n"), - trace - ] - ); - } else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - if (trace.length && // avoid spamming console during tests - true) { - warnArgs.push(` -`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); - isWarning = false; -} -function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; - } - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; -} -function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...i === 0 ? [] : [` -`], ...formatTraceEntry(entry)); - }); - return logs; -} -function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName( - vnode.component, - vnode.type, - isRoot - )}`; - const close = `>` + postfix; - return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; -} -function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach((key) => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; -} -function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } else if (typeof value === "number" || typeof value === "boolean" || value == null) { - return raw ? value : [`${key}=${value}`]; - } else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } -} -function assertNumber(val, type) { - if (!!!(process.env.NODE_ENV !== "production")) return; - if (val === void 0) { - return; - } else if (typeof val !== "number") { - warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); - } else if (isNaN(val)) { - warn$1(`${type} is NaN - the duration expression might be incorrect.`); - } -} - -const ErrorCodes = { - "SETUP_FUNCTION": 0, - "0": "SETUP_FUNCTION", - "RENDER_FUNCTION": 1, - "1": "RENDER_FUNCTION", - "NATIVE_EVENT_HANDLER": 5, - "5": "NATIVE_EVENT_HANDLER", - "COMPONENT_EVENT_HANDLER": 6, - "6": "COMPONENT_EVENT_HANDLER", - "VNODE_HOOK": 7, - "7": "VNODE_HOOK", - "DIRECTIVE_HOOK": 8, - "8": "DIRECTIVE_HOOK", - "TRANSITION_HOOK": 9, - "9": "TRANSITION_HOOK", - "APP_ERROR_HANDLER": 10, - "10": "APP_ERROR_HANDLER", - "APP_WARN_HANDLER": 11, - "11": "APP_WARN_HANDLER", - "FUNCTION_REF": 12, - "12": "FUNCTION_REF", - "ASYNC_COMPONENT_LOADER": 13, - "13": "ASYNC_COMPONENT_LOADER", - "SCHEDULER": 14, - "14": "SCHEDULER", - "COMPONENT_UPDATE": 15, - "15": "COMPONENT_UPDATE", - "APP_UNMOUNT_CLEANUP": 16, - "16": "APP_UNMOUNT_CLEANUP" -}; -const ErrorTypeStrings$1 = { - ["sp"]: "serverPrefetch hook", - ["bc"]: "beforeCreate hook", - ["c"]: "created hook", - ["bm"]: "beforeMount hook", - ["m"]: "mounted hook", - ["bu"]: "beforeUpdate hook", - ["u"]: "updated", - ["bum"]: "beforeUnmount hook", - ["um"]: "unmounted hook", - ["a"]: "activated hook", - ["da"]: "deactivated hook", - ["ec"]: "errorCaptured hook", - ["rtc"]: "renderTracked hook", - ["rtg"]: "renderTriggered hook", - [0]: "setup function", - [1]: "render function", - [2]: "watcher getter", - [3]: "watcher callback", - [4]: "watcher cleanup function", - [5]: "native event handler", - [6]: "component event handler", - [7]: "vnode hook", - [8]: "directive hook", - [9]: "transition hook", - [10]: "app errorHandler", - [11]: "app warnHandler", - [12]: "ref function", - [13]: "async component loader", - [14]: "scheduler flush", - [15]: "component update", - [16]: "app unmount cleanup function" -}; -function callWithErrorHandling(fn, instance, type, args) { - try { - return args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance, type); - } -} -function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch((err) => { - handleError(err, instance, type); - }); - } - return res; - } - if (isArray(fn)) { - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1( - `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` - ); - } -} -function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; - if (instance) { - let cur = instance.parent; - const exposedInstance = instance.proxy; - const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - if (errorHandler) { - pauseTracking(); - callWithErrorHandling(errorHandler, null, 10, [ - err, - exposedInstance, - errorInfo - ]); - resetTracking(); - return; - } - } - logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); -} -function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { - if (!!(process.env.NODE_ENV !== "production")) { - const info = ErrorTypeStrings$1[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - if (throwInDev) { - throw err; - } else { - console.error(err); - } - } else if (throwInProd) { - throw err; - } else { - console.error(err); - } -} - -const queue = []; -let flushIndex = -1; -const pendingPostFlushCbs = []; -let activePostFlushCbs = null; -let postFlushIndex = 0; -const resolvedPromise = /* @__PURE__ */ Promise.resolve(); -let currentFlushPromise = null; -const RECURSION_LIMIT = 100; -function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; -} -function findInsertionIndex(id) { - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = start + end >>> 1; - const middleJob = queue[middle]; - const middleJobId = getId(middleJob); - if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { - start = middle + 1; - } else { - end = middle; - } - } - return start; -} -function queueJob(job) { - if (!(job.flags & 1)) { - const jobId = getId(job); - const lastJob = queue[queue.length - 1]; - if (!lastJob || // fast path when the job id is larger than the tail - !(job.flags & 2) && jobId >= getId(lastJob)) { - queue.push(job); - } else { - queue.splice(findInsertionIndex(jobId), 0, job); - } - job.flags |= 1; - queueFlush(); - } -} -function queueFlush() { - if (!currentFlushPromise) { - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function queuePostFlushCb(cb) { - if (!isArray(cb)) { - if (activePostFlushCbs && cb.id === -1) { - activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); - } else if (!(cb.flags & 1)) { - pendingPostFlushCbs.push(cb); - cb.flags |= 1; - } - } else { - pendingPostFlushCbs.push(...cb); - } - queueFlush(); -} -function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { - if (!!(process.env.NODE_ENV !== "production")) { - seen = seen || /* @__PURE__ */ new Map(); - } - for (; i < queue.length; i++) { - const cb = queue[i]; - if (cb && cb.flags & 2) { - if (instance && cb.id !== instance.uid) { - continue; - } - if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) { - continue; - } - queue.splice(i, 1); - i--; - if (cb.flags & 4) { - cb.flags &= ~1; - } - cb(); - if (!(cb.flags & 4)) { - cb.flags &= ~1; - } - } - } -} -function flushPostFlushCbs(seen) { - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)].sort( - (a, b) => getId(a) - getId(b) - ); - pendingPostFlushCbs.length = 0; - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - if (!!(process.env.NODE_ENV !== "production")) { - seen = seen || /* @__PURE__ */ new Map(); - } - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - const cb = activePostFlushCbs[postFlushIndex]; - if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) { - continue; - } - if (cb.flags & 4) { - cb.flags &= ~1; - } - if (!(cb.flags & 8)) cb(); - cb.flags &= ~1; - } - activePostFlushCbs = null; - postFlushIndex = 0; - } -} -const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; -function flushJobs(seen) { - if (!!(process.env.NODE_ENV !== "production")) { - seen = seen || /* @__PURE__ */ new Map(); - } - const check = !!(process.env.NODE_ENV !== "production") ? (job) => checkRecursiveUpdates(seen, job) : NOOP; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && !(job.flags & 8)) { - if (!!(process.env.NODE_ENV !== "production") && check(job)) { - continue; - } - if (job.flags & 4) { - job.flags &= ~1; - } - callWithErrorHandling( - job, - job.i, - job.i ? 15 : 14 - ); - if (!(job.flags & 4)) { - job.flags &= ~1; - } - } - } - } finally { - for (; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job) { - job.flags &= ~1; - } - } - flushIndex = -1; - queue.length = 0; - flushPostFlushCbs(seen); - currentFlushPromise = null; - if (queue.length || pendingPostFlushCbs.length) { - flushJobs(seen); - } - } -} -function checkRecursiveUpdates(seen, fn) { - const count = seen.get(fn) || 0; - if (count > RECURSION_LIMIT) { - const instance = fn.i; - const componentName = instance && getComponentName(instance.type); - handleError( - `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, - null, - 10 - ); - return true; - } - seen.set(fn, count + 1); - return false; -} - -let isHmrUpdating = false; -const hmrDirtyComponents = /* @__PURE__ */ new Map(); -if (!!(process.env.NODE_ENV !== "production")) { - getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; -} -const map = /* @__PURE__ */ new Map(); -function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); -} -function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); -} -function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: /* @__PURE__ */ new Set() - }); - return true; -} -function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; -} -function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; - } - record.initialDef.render = newRender; - [...record.instances].forEach((instance) => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); -} -function reload(id, newComp) { - const record = map.get(id); - if (!record) return; - newComp = normalizeClassComponent(newComp); - updateComponentDef(record.initialDef, newComp); - const instances = [...record.instances]; - for (let i = 0; i < instances.length; i++) { - const instance = instances[i]; - const oldComp = normalizeClassComponent(instance.type); - let dirtyInstances = hmrDirtyComponents.get(oldComp); - if (!dirtyInstances) { - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); - } - dirtyInstances.add(instance); - instance.appContext.propsCache.delete(instance.type); - instance.appContext.emitsCache.delete(instance.type); - instance.appContext.optionsCache.delete(instance.type); - if (instance.ceReload) { - dirtyInstances.add(instance); - instance.ceReload(newComp.styles); - dirtyInstances.delete(instance); - } else if (instance.parent) { - queueJob(() => { - isHmrUpdating = true; - instance.parent.update(); - isHmrUpdating = false; - dirtyInstances.delete(instance); - }); - } else if (instance.appContext.reload) { - instance.appContext.reload(); - } else if (typeof window !== "undefined") { - window.location.reload(); - } else { - console.warn( - "[HMR] Root or manually mounted instance modified. Full reload required." - ); - } - if (instance.root.ce && instance !== instance.root) { - instance.root.ce._removeChildStyle(oldComp); - } - } - queuePostFlushCb(() => { - hmrDirtyComponents.clear(); - }); -} -function updateComponentDef(oldComp, newComp) { - extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== "__file" && !(key in newComp)) { - delete oldComp[key]; - } - } -} -function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } catch (e) { - console.error(e); - console.warn( - `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` - ); - } - }; -} - -let devtools$1; -let buffer = []; -let devtoolsNotInstalled = false; -function emit$1(event, ...args) { - if (devtools$1) { - devtools$1.emit(event, ...args); - } else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } -} -function setDevtoolsHook$1(hook, target) { - var _a, _b; - devtools$1 = hook; - if (devtools$1) { - devtools$1.enabled = true; - buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); - buffer = []; - } else if ( - // handle late devtools injection - only do this if we are in an actual - // browser environment to avoid the timer handle stalling test runner exit - // (#4815) - typeof window !== "undefined" && // some envs mock window but not fully - window.HTMLElement && // also exclude jsdom - // eslint-disable-next-line no-restricted-syntax - !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) - ) { - const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; - replay.push((newHook) => { - setDevtoolsHook$1(newHook, target); - }); - setTimeout(() => { - if (!devtools$1) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3e3); - } else { - devtoolsNotInstalled = true; - buffer = []; - } -} -function devtoolsInitApp(app, version) { - emit$1("app:init" /* APP_INIT */, app, version, { - Fragment, - Text, - Comment, - Static - }); -} -function devtoolsUnmountApp(app) { - emit$1("app:unmount" /* APP_UNMOUNT */, app); -} -const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); -const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); -const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( - "component:removed" /* COMPONENT_REMOVED */ -); -const devtoolsComponentRemoved = (component) => { - if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered - !devtools$1.cleanupBuffer(component)) { - _devtoolsComponentRemoved(component); - } -}; -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function createDevtoolsComponentHook(hook) { - return (component) => { - emit$1( - hook, - component.appContext.app, - component.uid, - component.parent ? component.parent.uid : void 0, - component - ); - }; -} -const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); -const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); -function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit$1(hook, component.appContext.app, component.uid, component, type, time); - }; -} -function devtoolsComponentEmit(component, event, params) { - emit$1( - "component:emit" /* COMPONENT_EMIT */, - component.appContext.app, - component, - event, - params - ); -} - -let currentRenderingInstance = null; -let currentScopeId = null; -function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = instance && instance.type.__scopeId || null; - return prev; -} -function pushScopeId(id) { - currentScopeId = id; -} -function popScopeId() { - currentScopeId = null; -} -const withScopeId = (_id) => withCtx; -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { - if (!ctx) return fn; - if (fn._n) { - return fn; - } - const renderFnWithContext = (...args) => { - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - let res; - try { - res = fn(...args); - } finally { - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - } - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - devtoolsComponentUpdated(ctx); - } - return res; - }; - renderFnWithContext._n = true; - renderFnWithContext._c = true; - renderFnWithContext._d = true; - return renderFnWithContext; -} - -function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn$1("Do not use built-in directive ids as custom directive id: " + name); - } -} -function withDirectives(vnode, directives) { - if (currentRenderingInstance === null) { - !!(process.env.NODE_ENV !== "production") && warn$1(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getComponentPublicInstance(currentRenderingInstance); - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (dir) { - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } -} - -const TeleportEndKey = Symbol("_vte"); -const isTeleport = (type) => type.__isTeleport; -const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); -const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); -const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; -const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; -const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (isString(targetSelector)) { - if (!select) { - !!(process.env.NODE_ENV !== "production") && warn$1( - `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` - ); - return null; - } else { - const target = select(targetSelector); - if (!!(process.env.NODE_ENV !== "production") && !target && !isTeleportDisabled(props)) { - warn$1( - `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` - ); - } - return target; - } - } else { - if (!!(process.env.NODE_ENV !== "production") && !targetSelector && !isTeleportDisabled(props)) { - warn$1(`Invalid Teleport target: ${targetSelector}`); - } - return targetSelector; - } -}; -const TeleportImpl = { - name: "Teleport", - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { - const { - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - o: { insert, querySelector, createText, createComment } - } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) { - optimized = false; - dynamicChildren = null; - } - if (n1 == null) { - const placeholder = n2.el = !!(process.env.NODE_ENV !== "production") ? createComment("teleport start") : createText(""); - const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== "production") ? createComment("teleport end") : createText(""); - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const mount = (container2, anchor2) => { - if (shapeFlag & 16) { - if (parentComponent && parentComponent.isCE) { - parentComponent.ce._teleportTarget = container2; - } - mountChildren( - children, - container2, - anchor2, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const mountToTarget = () => { - const target = n2.target = resolveTarget(n2.props, querySelector); - const targetAnchor = prepareAnchor(target, n2, createText, insert); - if (target) { - if (namespace !== "svg" && isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace !== "mathml" && isTargetMathML(target)) { - namespace = "mathml"; - } - if (!disabled) { - mount(target, targetAnchor); - updateCssVars(n2, false); - } - } else if (!!(process.env.NODE_ENV !== "production") && !disabled) { - warn$1( - "Invalid Teleport target on mount:", - target, - `(${typeof target})` - ); - } - }; - if (disabled) { - mount(container, mainAnchor); - updateCssVars(n2, true); - } - if (isTeleportDeferred(n2.props)) { - queuePostRenderEffect(() => { - mountToTarget(); - n2.el.__isMounted = true; - }, parentSuspense); - } else { - mountToTarget(); - } - } else { - if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { - queuePostRenderEffect(() => { - TeleportImpl.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - delete n1.el.__isMounted; - }, parentSuspense); - return; - } - n2.el = n1.el; - n2.targetStart = n1.targetStart; - const mainAnchor = n2.anchor = n1.anchor; - const target = n2.target = n1.target; - const targetAnchor = n2.targetAnchor = n1.targetAnchor; - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - if (namespace === "svg" || isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace === "mathml" || isTargetMathML(target)) { - namespace = "mathml"; - } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - currentContainer, - parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - traverseStaticChildren(n1, n2, true); - } else if (!optimized) { - patchChildren( - n1, - n2, - currentContainer, - currentAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - false - ); - } - if (disabled) { - if (!wasDisabled) { - moveTeleport( - n2, - container, - mainAnchor, - internals, - 1 - ); - } else { - if (n2.props && n1.props && n2.props.to !== n1.props.to) { - n2.props.to = n1.props.to; - } - } - } else { - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = n2.target = resolveTarget( - n2.props, - querySelector - ); - if (nextTarget) { - moveTeleport( - n2, - nextTarget, - null, - internals, - 0 - ); - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1( - "Invalid Teleport target on update:", - target, - `(${typeof target})` - ); - } - } else if (wasDisabled) { - moveTeleport( - n2, - target, - targetAnchor, - internals, - 1 - ); - } - } - updateCssVars(n2, disabled); - } - }, - remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { - shapeFlag, - children, - anchor, - targetStart, - targetAnchor, - target, - props - } = vnode; - if (target) { - hostRemove(targetStart); - hostRemove(targetAnchor); - } - doRemove && hostRemove(anchor); - if (shapeFlag & 16) { - const shouldRemove = doRemove || !isTeleportDisabled(props); - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount( - child, - parentComponent, - parentSuspense, - shouldRemove, - !!child.dynamicChildren - ); - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport -}; -function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { - if (moveType === 0) { - insert(vnode.targetAnchor, container, parentAnchor); - } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2; - if (isReorder) { - insert(el, container, parentAnchor); - } - if (!isReorder || isTeleportDisabled(props)) { - if (shapeFlag & 16) { - for (let i = 0; i < children.length; i++) { - move( - children[i], - container, - parentAnchor, - 2 - ); - } - } - } - if (isReorder) { - insert(anchor, container, parentAnchor); - } -} -function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { - o: { nextSibling, parentNode, querySelector, insert, createText } -}, hydrateChildren) { - const target = vnode.target = resolveTarget( - vnode.props, - querySelector - ); - if (target) { - const disabled = isTeleportDisabled(vnode.props); - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16) { - if (disabled) { - vnode.anchor = hydrateChildren( - nextSibling(node), - vnode, - parentNode(node), - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - vnode.targetStart = targetNode; - vnode.targetAnchor = targetNode && nextSibling(targetNode); - } else { - vnode.anchor = nextSibling(node); - let targetAnchor = targetNode; - while (targetAnchor) { - if (targetAnchor && targetAnchor.nodeType === 8) { - if (targetAnchor.data === "teleport start anchor") { - vnode.targetStart = targetAnchor; - } else if (targetAnchor.data === "teleport anchor") { - vnode.targetAnchor = targetAnchor; - target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - targetAnchor = nextSibling(targetAnchor); - } - if (!vnode.targetAnchor) { - prepareAnchor(target, vnode, createText, insert); - } - hydrateChildren( - targetNode && nextSibling(targetNode), - vnode, - target, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - } - updateCssVars(vnode, disabled); - } - return vnode.anchor && nextSibling(vnode.anchor); -} -const Teleport = TeleportImpl; -function updateCssVars(vnode, isDisabled) { - const ctx = vnode.ctx; - if (ctx && ctx.ut) { - let node, anchor; - if (isDisabled) { - node = vnode.el; - anchor = vnode.anchor; - } else { - node = vnode.targetStart; - anchor = vnode.targetAnchor; - } - while (node && node !== anchor) { - if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); - node = node.nextSibling; - } - ctx.ut(); - } -} -function prepareAnchor(target, vnode, createText, insert) { - const targetStart = vnode.targetStart = createText(""); - const targetAnchor = vnode.targetAnchor = createText(""); - targetStart[TeleportEndKey] = targetAnchor; - if (target) { - insert(targetStart, target); - insert(targetAnchor, target); - } - return targetAnchor; -} - -const leaveCbKey = Symbol("_leaveCb"); -const enterCbKey = Symbol("_enterCb"); -function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: /* @__PURE__ */ new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; -} -const TransitionHookValidator = [Function, Array]; -const BaseTransitionPropsValidators = { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator -}; -const recursiveGetSubtree = (instance) => { - const subTree = instance.subTree; - return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; -}; -const BaseTransitionImpl = { - name: `BaseTransition`, - props: BaseTransitionPropsValidators, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - const child = findNonCommentChild(children); - const rawProps = toRaw(props); - const { mode } = rawProps; - if (!!(process.env.NODE_ENV !== "production") && mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { - warn$1(`invalid <transition> mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - const innerChild = getInnerChild$1(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - let enterHooks = resolveTransitionHooks( - innerChild, - rawProps, - state, - instance, - // #11061, ensure enterHooks is fresh after clone - (hooks) => enterHooks = hooks - ); - if (innerChild.type !== Comment) { - setTransitionHooks(innerChild, enterHooks); - } - let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); - if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { - let leavingHooks = resolveTransitionHooks( - oldInnerChild, - rawProps, - state, - instance - ); - setTransitionHooks(oldInnerChild, leavingHooks); - if (mode === "out-in" && innerChild.type !== Comment) { - state.isLeaving = true; - leavingHooks.afterLeave = () => { - state.isLeaving = false; - if (!(instance.job.flags & 8)) { - instance.update(); - } - delete leavingHooks.afterLeave; - oldInnerChild = void 0; - }; - return emptyPlaceholder(child); - } else if (mode === "in-out" && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType( - state, - oldInnerChild - ); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - el[leaveCbKey] = () => { - earlyRemove(); - el[leaveCbKey] = void 0; - delete enterHooks.delayedLeave; - oldInnerChild = void 0; - }; - enterHooks.delayedLeave = () => { - delayedLeave(); - delete enterHooks.delayedLeave; - oldInnerChild = void 0; - }; - }; - } else { - oldInnerChild = void 0; - } - } else if (oldInnerChild) { - oldInnerChild = void 0; - } - return child; - }; - } -}; -function findNonCommentChild(children) { - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - for (const c of children) { - if (c.type !== Comment) { - if (!!(process.env.NODE_ENV !== "production") && hasFound) { - warn$1( - "<transition> can only be used on a single element or component. Use <transition-group> for lists." - ); - break; - } - child = c; - hasFound = true; - if (!!!(process.env.NODE_ENV !== "production")) break; - } - } - } - return child; -} -const BaseTransition = BaseTransitionImpl; -function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = /* @__PURE__ */ Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; -} -function resolveTransitionHooks(vnode, props, state, instance, postClone) { - const { - appear, - mode, - persisted = false, - onBeforeEnter, - onEnter, - onAfterEnter, - onEnterCancelled, - onBeforeLeave, - onLeave, - onAfterLeave, - onLeaveCancelled, - onBeforeAppear, - onAppear, - onAfterAppear, - onAppearCancelled - } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && callWithAsyncErrorHandling( - hook, - instance, - 9, - args - ); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (isArray(hook)) { - if (hook.every((hook2) => hook2.length <= 1)) done(); - } else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } else { - return; - } - } - if (el[leaveCbKey]) { - el[leaveCbKey]( - true - /* cancelled */ - ); - } - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { - leavingVNode.el[leaveCbKey](); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } else { - return; - } - } - let called = false; - const done = el[enterCbKey] = (cancelled) => { - if (called) return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el[enterCbKey] = void 0; - }; - if (hook) { - callAsyncHook(hook, [el, done]); - } else { - done(); - } - }, - leave(el, remove) { - const key2 = String(vnode.key); - if (el[enterCbKey]) { - el[enterCbKey]( - true - /* cancelled */ - ); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = el[leaveCbKey] = (cancelled) => { - if (called) return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } else { - callHook(onAfterLeave, [el]); - } - el[leaveCbKey] = void 0; - if (leavingVNodesCache[key2] === vnode) { - delete leavingVNodesCache[key2]; - } - }; - leavingVNodesCache[key2] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } else { - done(); - } - }, - clone(vnode2) { - const hooks2 = resolveTransitionHooks( - vnode2, - props, - state, - instance, - postClone - ); - if (postClone) postClone(hooks2); - return hooks2; - } - }; - return hooks; -} -function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; - } -} -function getInnerChild$1(vnode) { - if (!isKeepAlive(vnode)) { - if (isTeleport(vnode.type) && vnode.children) { - return findNonCommentChild(vnode.children); - } - return vnode; - } - if (!!(process.env.NODE_ENV !== "production") && vnode.component) { - return vnode.component.subTree; - } - const { shapeFlag, children } = vnode; - if (children) { - if (shapeFlag & 16) { - return children[0]; - } - if (shapeFlag & 32 && isFunction(children.default)) { - return children.default(); - } - } -} -function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 && vnode.component) { - vnode.transition = hooks; - setTransitionHooks(vnode.component.subTree, hooks); - } else if (vnode.shapeFlag & 128) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } else { - vnode.transition = hooks; - } -} -function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); - if (child.type === Fragment) { - if (child.patchFlag & 128) keyedFragmentCount++; - ret = ret.concat( - getTransitionRawChildren(child.children, keepComment, key) - ); - } else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } - } - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2; - } - } - return ret; -} - -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineComponent(options, extraOptions) { - return isFunction(options) ? ( - // #8236: extend call and options.name access are considered side-effects - // by Rollup, so we have to wrap it in a pure-annotated IIFE. - /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() - ) : options; -} - -function useId() { - const i = getCurrentInstance(); - if (i) { - return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1( - `useId() is called when there is no active component instance to be associated with.` - ); - } - return ""; -} -function markAsyncBoundary(instance) { - instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; -} - -const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); -function useTemplateRef(key) { - const i = getCurrentInstance(); - const r = shallowRef(null); - if (i) { - const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs; - let desc; - if (!!(process.env.NODE_ENV !== "production") && (desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { - warn$1(`useTemplateRef('${key}') already exists.`); - } else { - Object.defineProperty(refs, key, { - enumerable: true, - get: () => r.value, - set: (val) => r.value = val - }); - } - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1( - `useTemplateRef() is called when there is no active component instance to be associated with.` - ); - } - const ret = !!(process.env.NODE_ENV !== "production") ? readonly(r) : r; - if (!!(process.env.NODE_ENV !== "production")) { - knownTemplateRefs.add(ret); - } - return ret; -} - -function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray(rawRef)) { - rawRef.forEach( - (r, i) => setRef( - r, - oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), - parentSuspense, - vnode, - isUnmount - ) - ); - return; - } - if (isAsyncWrapper(vnode) && !isUnmount) { - if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { - setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); - } - return; - } - const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if (!!(process.env.NODE_ENV !== "production") && !owner) { - warn$1( - `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` - ); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; - const setupState = owner.setupState; - const rawSetupState = toRaw(setupState); - const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { - if (!!(process.env.NODE_ENV !== "production")) { - if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) { - warn$1( - `Template ref "${key}" used on a non-ref value. It will not work in the production build.` - ); - } - if (knownTemplateRefs.has(rawSetupState[key])) { - return false; - } - } - return hasOwn(rawSetupState, key); - }; - if (oldRef != null && oldRef !== ref) { - if (isString(oldRef)) { - refs[oldRef] = null; - if (canSetSetupRef(oldRef)) { - setupState[oldRef] = null; - } - } else if (isRef(oldRef)) { - oldRef.value = null; - } - } - if (isFunction(ref)) { - callWithErrorHandling(ref, owner, 12, [value, refs]); - } else { - const _isString = isString(ref); - const _isRef = isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; - if (isUnmount) { - isArray(existing) && remove(existing, refValue); - } else { - if (!isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (canSetSetupRef(ref)) { - setupState[ref] = refs[ref]; - } - } else { - ref.value = [refValue]; - if (rawRef.k) refs[rawRef.k] = ref.value; - } - } else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } else if (_isString) { - refs[ref] = value; - if (canSetSetupRef(ref)) { - setupState[ref] = value; - } - } else if (_isRef) { - ref.value = value; - if (rawRef.k) refs[rawRef.k] = value; - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1("Invalid template ref type:", ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } else { - doSet(); - } - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1("Invalid template ref type:", ref, `(${typeof ref})`); - } - } -} - -let hasLoggedMismatchError = false; -const logMismatchError = () => { - if (hasLoggedMismatchError) { - return; - } - console.error("Hydration completed but contains mismatches."); - hasLoggedMismatchError = true; -}; -const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; -const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); -const getContainerType = (container) => { - if (container.nodeType !== 1) return void 0; - if (isSVGContainer(container)) return "svg"; - if (isMathMLContainer(container)) return "mathml"; - return void 0; -}; -const isComment = (node) => node.nodeType === 8; -function createHydrationFunctions(rendererInternals) { - const { - mt: mountComponent, - p: patch, - o: { - patchProp, - createText, - nextSibling, - parentNode, - remove, - insert, - createComment - } - } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1( - `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` - ); - patch(null, vnode, container); - flushPostFlushCbs(); - container._vnode = vnode; - return; - } - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - container._vnode = vnode; - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - optimized = optimized || !!vnode.dynamicChildren; - const isFragmentStart = isComment(node) && node.data === "["; - const onMismatch = () => handleMismatch( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - isFragmentStart - ); - const { type, ref, shapeFlag, patchFlag } = vnode; - let domType = node.nodeType; - vnode.el = node; - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - def(node, "__vnode", vnode, true); - def(node, "__vueParentComponent", parentComponent, true); - } - if (patchFlag === -2) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3) { - if (vnode.children === "") { - insert(vnode.el = createText(""), parentNode(node), node); - nextNode = node; - } else { - nextNode = onMismatch(); - } - } else { - if (node.data !== vnode.children) { - (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1( - `Hydration text mismatch in`, - node.parentNode, - ` - - rendered on server: ${JSON.stringify( - node.data - )} - - expected on client: ${JSON.stringify(vnode.children)}` - ); - logMismatchError(); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (isTemplateNode(node)) { - nextNode = nextSibling(node); - replaceNode( - vnode.el = node.content.firstChild, - node, - parentComponent - ); - } else if (domType !== 8 || isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = nextSibling(node); - } - break; - case Static: - if (isFragmentStart) { - node = nextSibling(node); - domType = node.nodeType; - } - if (domType === 1 || domType === 3) { - nextNode = node; - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return isFragmentStart ? nextSibling(nextNode) : nextNode; - } else { - onMismatch(); - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = hydrateFragment( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - break; - default: - if (shapeFlag & 1) { - if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { - nextNode = onMismatch(); - } else { - nextNode = hydrateElement( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - } else if (shapeFlag & 6) { - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - if (isFragmentStart) { - nextNode = locateClosingAnchor(node); - } else if (isComment(node) && node.data === "teleport start") { - nextNode = locateClosingAnchor(node, node.data, "teleport end"); - } else { - nextNode = nextSibling(node); - } - mountComponent( - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - optimized - ); - if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; - } else { - subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } else if (shapeFlag & 64) { - if (domType !== 8) { - nextNode = onMismatch(); - } else { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized, - rendererInternals, - hydrateChildren - ); - } - } else if (shapeFlag & 128) { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - getContainerType(parentNode(node)), - slotScopeIds, - optimized, - rendererInternals, - hydrateNode - ); - } else if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) { - warn$1("Invalid HostVNode type:", type, `(${typeof type})`); - } - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; - const forcePatch = type === "input" || type === "option"; - if (!!(process.env.NODE_ENV !== "production") || forcePatch || patchFlag !== -1) { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - let needCallTransitionHooks = false; - if (isTemplateNode(el)) { - needCallTransitionHooks = needTransition( - null, - // no need check parentSuspense in hydration - transition - ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; - const content = el.content.firstChild; - if (needCallTransitionHooks) { - transition.beforeEnter(content); - } - replaceNode(content, el, parentComponent); - vnode.el = el = content; - } - if (shapeFlag & 16 && // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren( - el.firstChild, - vnode, - el, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - let hasWarned = false; - while (next) { - if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { - if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) { - warn$1( - `Hydration children mismatch on`, - el, - ` -Server rendered element contains more child nodes than client vdom.` - ); - hasWarned = true; - } - logMismatchError(); - } - const cur = next; - next = next.nextSibling; - remove(cur); - } - } else if (shapeFlag & 8) { - let clientText = vnode.children; - if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { - clientText = clientText.slice(1); - } - if (el.textContent !== clientText) { - if (!isMismatchAllowed(el, 0 /* TEXT */)) { - (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1( - `Hydration text content mismatch on`, - el, - ` - - rendered on server: ${el.textContent} - - expected on client: ${vnode.children}` - ); - logMismatchError(); - } - el.textContent = vnode.children; - } - } - if (props) { - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) { - const isCustomElement = el.tagName.includes("-"); - for (const key in props) { - if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks - // as it could have mutated the DOM in any possible way - !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { - logMismatchError(); - } - if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers - key[0] === "." || isCustomElement) { - patchProp(el, key, null, props[key], void 0, parentComponent); - } - } - } else if (props.onClick) { - patchProp( - el, - "onClick", - null, - props.onClick, - void 0, - parentComponent - ); - } else if (patchFlag & 4 && isReactive(props.style)) { - for (const key in props.style) props.style[key]; - } - } - let vnodeHooks; - if (vnodeHooks = props && props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); - const isText = vnode.type === Text; - if (node) { - if (isText && !optimized) { - if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { - insert( - createText( - node.data.slice(vnode.children.length) - ), - container, - nextSibling(node) - ); - node.data = vnode.children; - } - } - node = hydrateNode( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } else if (isText && !vnode.children) { - insert(vnode.el = createText(""), container); - } else { - if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { - if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) { - warn$1( - `Hydration children mismatch on`, - container, - ` -Server rendered element contains fewer child nodes than client vdom.` - ); - hasWarned = true; - } - logMismatchError(); - } - patch( - null, - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren( - nextSibling(node), - vnode, - container, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - if (next && isComment(next) && next.data === "]") { - return nextSibling(vnode.anchor = next); - } else { - logMismatchError(); - insert(vnode.anchor = createComment(`]`), container, next); - return next; - } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { - if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { - (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1( - `Hydration node mismatch: -- rendered on server:`, - node, - node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, - ` -- expected on client:`, - vnode.type - ); - logMismatchError(); - } - vnode.el = null; - if (isFragment) { - const end = locateClosingAnchor(node); - while (true) { - const next2 = nextSibling(node); - if (next2 && next2 !== end) { - remove(next2); - } else { - break; - } - } - } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch( - null, - vnode, - container, - next, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - if (parentComponent) { - parentComponent.vnode.el = vnode.el; - updateHOCHostEl(parentComponent, vnode.el); - } - return next; - }; - const locateClosingAnchor = (node, open = "[", close = "]") => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === open) match++; - if (node.data === close) { - if (match === 0) { - return nextSibling(node); - } else { - match--; - } - } - } - } - return node; - }; - const replaceNode = (newNode, oldNode, parentComponent) => { - const parentNode2 = oldNode.parentNode; - if (parentNode2) { - parentNode2.replaceChild(newNode, oldNode); - } - let parent = parentComponent; - while (parent) { - if (parent.vnode.el === oldNode) { - parent.vnode.el = parent.subTree.el = newNode; - } - parent = parent.parent; - } - }; - const isTemplateNode = (node) => { - return node.nodeType === 1 && node.tagName === "TEMPLATE"; - }; - return [hydrate, hydrateNode]; -} -function propHasMismatch(el, key, clientValue, vnode, instance) { - let mismatchType; - let mismatchKey; - let actual; - let expected; - if (key === "class") { - actual = el.getAttribute("class"); - expected = normalizeClass(clientValue); - if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { - mismatchType = 2 /* CLASS */; - mismatchKey = `class`; - } - } else if (key === "style") { - actual = el.getAttribute("style") || ""; - expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); - const actualMap = toStyleMap(actual); - const expectedMap = toStyleMap(expected); - if (vnode.dirs) { - for (const { dir, value } of vnode.dirs) { - if (dir.name === "show" && !value) { - expectedMap.set("display", "none"); - } - } - } - if (instance) { - resolveCssVars(instance, vnode, expectedMap); - } - if (!isMapEqual(actualMap, expectedMap)) { - mismatchType = 3 /* STYLE */; - mismatchKey = "style"; - } - } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { - if (isBooleanAttr(key)) { - actual = el.hasAttribute(key); - expected = includeBooleanAttr(clientValue); - } else if (clientValue == null) { - actual = el.hasAttribute(key); - expected = false; - } else { - if (el.hasAttribute(key)) { - actual = el.getAttribute(key); - } else if (key === "value" && el.tagName === "TEXTAREA") { - actual = el.value; - } else { - actual = false; - } - expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; - } - if (actual !== expected) { - mismatchType = 4 /* ATTRIBUTE */; - mismatchKey = key; - } - } - if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { - const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; - const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; - const postSegment = ` - - rendered on server: ${format(actual)} - - expected on client: ${format(expected)} - Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. - You should fix the source of the mismatch.`; - { - warn$1(preSegment, el, postSegment); - } - return true; - } - return false; -} -function toClassSet(str) { - return new Set(str.trim().split(/\s+/)); -} -function isSetEqual(a, b) { - if (a.size !== b.size) { - return false; - } - for (const s of a) { - if (!b.has(s)) { - return false; - } - } - return true; -} -function toStyleMap(str) { - const styleMap = /* @__PURE__ */ new Map(); - for (const item of str.split(";")) { - let [key, value] = item.split(":"); - key = key.trim(); - value = value && value.trim(); - if (key && value) { - styleMap.set(key, value); - } - } - return styleMap; -} -function isMapEqual(a, b) { - if (a.size !== b.size) { - return false; - } - for (const [key, value] of a) { - if (value !== b.get(key)) { - return false; - } - } - return true; -} -function resolveCssVars(instance, vnode, expectedMap) { - const root = instance.subTree; - if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { - const cssVars = instance.getCssVars(); - for (const key in cssVars) { - expectedMap.set( - `--${getEscapedCssVarName(key, false)}`, - String(cssVars[key]) - ); - } - } - if (vnode === root && instance.parent) { - resolveCssVars(instance.parent, instance.vnode, expectedMap); - } -} -const allowMismatchAttr = "data-allow-mismatch"; -const MismatchTypeString = { - [0 /* TEXT */]: "text", - [1 /* CHILDREN */]: "children", - [2 /* CLASS */]: "class", - [3 /* STYLE */]: "style", - [4 /* ATTRIBUTE */]: "attribute" -}; -function isMismatchAllowed(el, allowedType) { - if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { - while (el && !el.hasAttribute(allowMismatchAttr)) { - el = el.parentElement; - } - } - const allowedAttr = el && el.getAttribute(allowMismatchAttr); - if (allowedAttr == null) { - return false; - } else if (allowedAttr === "") { - return true; - } else { - const list = allowedAttr.split(","); - if (allowedType === 0 /* TEXT */ && list.includes("children")) { - return true; - } - return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); - } -} - -const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); -const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); -const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { - const id = requestIdleCallback(hydrate, { timeout }); - return () => cancelIdleCallback(id); -}; -function elementIsVisibleInViewport(el) { - const { top, left, bottom, right } = el.getBoundingClientRect(); - const { innerHeight, innerWidth } = window; - return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); -} -const hydrateOnVisible = (opts) => (hydrate, forEach) => { - const ob = new IntersectionObserver((entries) => { - for (const e of entries) { - if (!e.isIntersecting) continue; - ob.disconnect(); - hydrate(); - break; - } - }, opts); - forEach((el) => { - if (!(el instanceof Element)) return; - if (elementIsVisibleInViewport(el)) { - hydrate(); - ob.disconnect(); - return false; - } - ob.observe(el); - }); - return () => ob.disconnect(); -}; -const hydrateOnMediaQuery = (query) => (hydrate) => { - if (query) { - const mql = matchMedia(query); - if (mql.matches) { - hydrate(); - } else { - mql.addEventListener("change", hydrate, { once: true }); - return () => mql.removeEventListener("change", hydrate); - } - } -}; -const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { - if (isString(interactions)) interactions = [interactions]; - let hasHydrated = false; - const doHydrate = (e) => { - if (!hasHydrated) { - hasHydrated = true; - teardown(); - hydrate(); - e.target.dispatchEvent(new e.constructor(e.type, e)); - } - }; - const teardown = () => { - forEach((el) => { - for (const i of interactions) { - el.removeEventListener(i, doHydrate); - } - }); - }; - forEach((el) => { - for (const i of interactions) { - el.addEventListener(i, doHydrate, { once: true }); - } - }); - return teardown; -}; -function forEachElement(node, cb) { - if (isComment(node) && node.data === "[") { - let depth = 1; - let next = node.nextSibling; - while (next) { - if (next.nodeType === 1) { - const result = cb(next); - if (result === false) { - break; - } - } else if (isComment(next)) { - if (next.data === "]") { - if (--depth === 0) break; - } else if (next.data === "[") { - depth++; - } - } - next = next.nextSibling; - } - } else { - cb(node); - } -} - -const isAsyncWrapper = (i) => !!i.type.__asyncLoader; -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; - } - const { - loader, - loadingComponent, - errorComponent, - delay = 200, - hydrate: hydrateStrategy, - timeout, - // undefined = never times out - suspensible = true, - onError: userOnError - } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; - pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } else { - throw err; - } - }).then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!!(process.env.NODE_ENV !== "production") && !comp) { - warn$1( - `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` - ); - } - if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { - comp = comp.default; - } - if (!!(process.env.NODE_ENV !== "production") && comp && !isObject(comp) && !isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - })); - }; - return defineComponent({ - name: "AsyncComponentWrapper", - __asyncLoader: load, - __asyncHydrate(el, instance, hydrate) { - const doHydrate = hydrateStrategy ? () => { - const teardown = hydrateStrategy( - hydrate, - (cb) => forEachElement(el, cb) - ); - if (teardown) { - (instance.bum || (instance.bum = [])).push(teardown); - } - } : hydrate; - if (resolvedComp) { - doHydrate(); - } else { - load().then(() => !instance.isUnmounted && doHydrate()); - } - }, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - markAsyncBoundary(instance); - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError( - err, - instance, - 13, - !errorComponent - ); - }; - if (suspensible && instance.suspense || isInSSRComponentSetup) { - return load().then((comp) => { - return () => createInnerComp(comp, instance); - }).catch((err) => { - onError(err); - return () => errorComponent ? createVNode(errorComponent, { - error: err - }) : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error( - `Async component timed out after ${timeout}ms.` - ); - onError(err); - error.value = err; - } - }, timeout); - } - load().then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - instance.parent.update(); - } - }).catch((err) => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; - } - }); -} -function createInnerComp(comp, parent) { - const { ref: ref2, props, children, ce } = parent.vnode; - const vnode = createVNode(comp, props, children); - vnode.ref = ref2; - vnode.ce = ce; - delete parent.vnode.ce; - return vnode; -} - -const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; -const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const sharedContext = instance.ctx; - if (!sharedContext.renderer) { - return () => { - const children = slots.default && slots.default(); - return children && children.length === 1 ? children[0] : children; - }; - } - const cache = /* @__PURE__ */ new Map(); - const keys = /* @__PURE__ */ new Set(); - let current = null; - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - instance.__v_cache = cache; - } - const parentSuspense = instance.suspense; - const { - renderer: { - p: patch, - m: move, - um: _unmount, - o: { createElement } - } - } = sharedContext; - const storageContainer = createElement("div"); - sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { - const instance2 = vnode.component; - move(vnode, container, anchor, 0, parentSuspense); - patch( - instance2.vnode, - vnode, - container, - anchor, - instance2, - parentSuspense, - namespace, - vnode.slotScopeIds, - optimized - ); - queuePostRenderEffect(() => { - instance2.isDeactivated = false; - if (instance2.a) { - invokeArrayFns(instance2.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - }, parentSuspense); - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - devtoolsComponentAdded(instance2); - } - }; - sharedContext.deactivate = (vnode) => { - const instance2 = vnode.component; - invalidateMount(instance2.m); - invalidateMount(instance2.a); - move(vnode, storageContainer, null, 1, parentSuspense); - queuePostRenderEffect(() => { - if (instance2.da) { - invokeArrayFns(instance2.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - instance2.isDeactivated = true; - }, parentSuspense); - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - devtoolsComponentAdded(instance2); - } - }; - function unmount(vnode) { - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && !filter(name)) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (cached && (!current || !isSameVNodeType(cached, current))) { - unmount(cached); - } else if (current) { - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - watch( - () => [props.include, props.exclude], - ([include, exclude]) => { - include && pruneCache((name) => matches(include, name)); - exclude && pruneCache((name) => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: "post", deep: true } - ); - let pendingCacheKey = null; - const cacheSubtree = () => { - if (pendingCacheKey != null) { - if (isSuspense(instance.subTree.type)) { - queuePostRenderEffect(() => { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - }, instance.subTree.suspense); - } else { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach((cached) => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type && cached.key === vnode.key) { - resetShapeFlag(vnode); - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return current = null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - if (!!(process.env.NODE_ENV !== "production")) { - warn$1(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - if (vnode.type === Comment) { - current = null; - return vnode; - } - const comp = vnode.type; - const name = getComponentName( - isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp - ); - const { include, exclude, max } = props; - if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { - vnode.shapeFlag &= ~256; - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128) { - rawVNode.ssContent = vnode; - } - } - pendingCacheKey = key; - if (cachedVNode) { - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - setTransitionHooks(vnode, vnode.transition); - } - vnode.shapeFlag |= 512; - keys.delete(key); - keys.add(key); - } else { - keys.add(key); - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - vnode.shapeFlag |= 256; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; - } -}; -const KeepAlive = KeepAliveImpl; -function matches(pattern, name) { - if (isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } else if (isString(pattern)) { - return pattern.split(",").includes(name); - } else if (isRegExp(pattern)) { - pattern.lastIndex = 0; - return pattern.test(name); - } - return false; -} -function onActivated(hook, target) { - registerKeepAliveHook(hook, "a", target); -} -function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da", target); -} -function registerKeepAliveHook(hook, type, target = currentInstance) { - const wrappedHook = hook.__wdc || (hook.__wdc = () => { - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } - } -} -function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - const injected = injectHook( - type, - hook, - keepAliveRoot, - true - /* prepend */ - ); - onUnmounted(() => { - remove(keepAliveRoot[type], injected); - }, target); -} -function resetShapeFlag(vnode) { - vnode.shapeFlag &= ~256; - vnode.shapeFlag &= ~512; -} -function getInnerChild(vnode) { - return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; -} - -function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - const wrappedHook = hook.__weh || (hook.__weh = (...args) => { - pauseTracking(); - const reset = setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - reset(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } else { - hooks.push(wrappedHook); - } - return wrappedHook; - } else if (!!(process.env.NODE_ENV !== "production")) { - const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); - warn$1( - `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) - ); - } -} -const createHook = (lifecycle) => (hook, target = currentInstance) => { - if (!isInSSRComponentSetup || lifecycle === "sp") { - injectHook(lifecycle, (...args) => hook(...args), target); - } -}; -const onBeforeMount = createHook("bm"); -const onMounted = createHook("m"); -const onBeforeUpdate = createHook( - "bu" -); -const onUpdated = createHook("u"); -const onBeforeUnmount = createHook( - "bum" -); -const onUnmounted = createHook("um"); -const onServerPrefetch = createHook( - "sp" -); -const onRenderTriggered = createHook("rtg"); -const onRenderTracked = createHook("rtc"); -function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec", hook, target); -} - -const COMPONENTS = "components"; -const DIRECTIVES = "directives"; -function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; -} -const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); -function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } else { - return component || NULL_DYNAMIC_COMPONENT; - } -} -function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); -} -function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - if (type === COMPONENTS) { - const selfName = getComponentName( - Component, - false - ); - if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = ( - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || // global registration - resolve(instance.appContext[type], name) - ); - if (!res && maybeSelfReference) { - return Component; - } - if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) { - const extra = type === COMPONENTS ? ` -If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; - warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1( - `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` - ); - } -} -function resolve(registry, name) { - return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); -} - -function renderList(source, renderItem, cache, index) { - let ret; - const cached = cache && cache[index]; - const sourceIsArray = isArray(source); - if (sourceIsArray || isString(source)) { - const sourceIsReactiveArray = sourceIsArray && isReactive(source); - let needsWrap = false; - if (sourceIsReactiveArray) { - needsWrap = !isShallow(source); - source = shallowReadArray(source); - } - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem( - needsWrap ? toReactive(source[i]) : source[i], - i, - void 0, - cached && cached[i] - ); - } - } else if (typeof source === "number") { - if (!!(process.env.NODE_ENV !== "production") && !Number.isInteger(source)) { - warn$1(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); - } - } else if (isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from( - source, - (item, i) => renderItem(item, i, void 0, cached && cached[i]) - ); - } else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } - } else { - ret = []; - } - if (cache) { - cache[index] = ret; - } - return ret; -} - -function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - if (isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } else if (slot) { - slots[slot.name] = slot.key ? (...args) => { - const res = slot.fn(...args); - if (res) res.key = slot.key; - return res; - } : slot.fn; - } - } - return slots; -} - -function renderSlot(slots, name, props = {}, fallback, noSlotted) { - if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { - if (name !== "default") props.name = name; - return openBlock(), createBlock( - Fragment, - null, - [createVNode("slot", props, fallback && fallback())], - 64 - ); - } - let slot = slots[name]; - if (!!(process.env.NODE_ENV !== "production") && slot && slot.length > 1) { - warn$1( - `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` - ); - slot = () => []; - } - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch - // key attached in the `createSlots` helper, respect that - validSlotContent && validSlotContent.key; - const rendered = createBlock( - Fragment, - { - key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content - (!validSlotContent && fallback ? "_fb" : "") - }, - validSlotContent || (fallback ? fallback() : []), - validSlotContent && slots._ === 1 ? 64 : -2 - ); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + "-s"]; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; -} -function ensureValidVNode(vnodes) { - return vnodes.some((child) => { - if (!isVNode(child)) return true; - if (child.type === Comment) return false; - if (child.type === Fragment && !ensureValidVNode(child.children)) - return false; - return true; - }) ? vnodes : null; -} - -function toHandlers(obj, preserveCaseIfNecessary) { - const ret = {}; - if (!!(process.env.NODE_ENV !== "production") && !isObject(obj)) { - warn$1(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; - } - return ret; -} - -const getPublicInstance = (i) => { - if (!i) return null; - if (isStatefulComponent(i)) return getComponentPublicInstance(i); - return getPublicInstance(i.parent); -}; -const publicPropertiesMap = ( - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { - $: (i) => i, - $el: (i) => i.vnode.el, - $data: (i) => i.data, - $props: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.props) : i.props, - $attrs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.attrs) : i.attrs, - $slots: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.slots) : i.slots, - $refs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.refs) : i.refs, - $parent: (i) => getPublicInstance(i.parent), - $root: (i) => getPublicInstance(i.root), - $host: (i) => i.ce, - $emit: (i) => i.emit, - $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type, - $forceUpdate: (i) => i.f || (i.f = () => { - queueJob(i.update); - }), - $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP - }) -); -const isReservedPrefix = (key) => key === "_" || key === "$"; -const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); -const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - if (key === "__v_skip") { - return true; - } - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - if (!!(process.env.NODE_ENV !== "production") && key === "__isVue") { - return true; - } - let normalizedProps; - if (key[0] !== "$") { - const n = accessCache[key]; - if (n !== void 0) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - } - } else if (hasSetupBinding(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) - ) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - if (publicGetter) { - if (key === "$attrs") { - track(instance.attrs, "get", ""); - !!(process.env.NODE_ENV !== "production") && markAttrsAccessed(); - } else if (!!(process.env.NODE_ENV !== "production") && key === "$slots") { - track(instance, "get", key); - } - return publicGetter(instance); - } else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && (cssModule = cssModule[key]) - ) { - return cssModule; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } else if ( - // global properties - globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) - ) { - { - return globalProperties[key]; - } - } else if (!!(process.env.NODE_ENV !== "production") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf("__v") !== 0)) { - if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { - warn$1( - `Property ${JSON.stringify( - key - )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` - ); - } else if (instance === currentRenderingInstance) { - warn$1( - `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` - ); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (hasSetupBinding(setupState, key)) { - setupState[key] = value; - return true; - } else if (!!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup && hasOwn(setupState, key)) { - warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); - return false; - } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - data[key] = value; - return true; - } else if (hasOwn(instance.props, key)) { - !!(process.env.NODE_ENV !== "production") && warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); - return false; - } - if (key[0] === "$" && key.slice(1) in instance) { - !!(process.env.NODE_ENV !== "production") && warn$1( - `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` - ); - return false; - } else { - if (!!(process.env.NODE_ENV !== "production") && key in instance.appContext.config.globalProperties) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - value - }); - } else { - ctx[key] = value; - } - } - return true; - }, - has({ - _: { data, setupState, accessCache, ctx, appContext, propsOptions } - }, key) { - let normalizedProps; - return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - target._.accessCache[key] = 0; - } else if (hasOwn(descriptor, "value")) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); - } -}; -if (!!(process.env.NODE_ENV !== "production") && true) { - PublicInstanceProxyHandlers.ownKeys = (target) => { - warn$1( - `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` - ); - return Reflect.ownKeys(target); - }; -} -const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, { - get(target, key) { - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); - }, - has(_, key) { - const has = key[0] !== "_" && !isGloballyAllowed(key); - if (!!(process.env.NODE_ENV !== "production") && !has && PublicInstanceProxyHandlers.has(_, key)) { - warn$1( - `Property ${JSON.stringify( - key - )} should not start with _ which is a reserved prefix for Vue internals.` - ); - } - return has; - } -}); -function createDevRenderContext(instance) { - const target = {}; - Object.defineProperty(target, `_`, { - configurable: true, - enumerable: false, - get: () => instance - }); - Object.keys(publicPropertiesMap).forEach((key) => { - Object.defineProperty(target, key, { - configurable: true, - enumerable: false, - get: () => publicPropertiesMap[key](instance), - // intercepted by the proxy so no need for implementation, - // but needed to prevent set errors - set: NOOP - }); - }); - return target; -} -function exposePropsOnRenderContext(instance) { - const { - ctx, - propsOptions: [propsOptions] - } = instance; - if (propsOptions) { - Object.keys(propsOptions).forEach((key) => { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => instance.props[key], - set: NOOP - }); - }); - } -} -function exposeSetupStateOnRenderContext(instance) { - const { ctx, setupState } = instance; - Object.keys(toRaw(setupState)).forEach((key) => { - if (!setupState.__isScriptSetup) { - if (isReservedPrefix(key[0])) { - warn$1( - `setup() return property ${JSON.stringify( - key - )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` - ); - return; - } - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => setupState[key], - set: NOOP - }); - } - }); -} - -const warnRuntimeUsage = (method) => warn$1( - `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` -); -function defineProps() { - if (!!(process.env.NODE_ENV !== "production")) { - warnRuntimeUsage(`defineProps`); - } - return null; -} -function defineEmits() { - if (!!(process.env.NODE_ENV !== "production")) { - warnRuntimeUsage(`defineEmits`); - } - return null; -} -function defineExpose(exposed) { - if (!!(process.env.NODE_ENV !== "production")) { - warnRuntimeUsage(`defineExpose`); - } -} -function defineOptions(options) { - if (!!(process.env.NODE_ENV !== "production")) { - warnRuntimeUsage(`defineOptions`); - } -} -function defineSlots() { - if (!!(process.env.NODE_ENV !== "production")) { - warnRuntimeUsage(`defineSlots`); - } - return null; -} -function defineModel() { - if (!!(process.env.NODE_ENV !== "production")) { - warnRuntimeUsage("defineModel"); - } -} -function withDefaults(props, defaults) { - if (!!(process.env.NODE_ENV !== "production")) { - warnRuntimeUsage(`withDefaults`); - } - return null; -} -function useSlots() { - return getContext().slots; -} -function useAttrs() { - return getContext().attrs; -} -function getContext() { - const i = getCurrentInstance(); - if (!!(process.env.NODE_ENV !== "production") && !i) { - warn$1(`useContext() called without active instance.`); - } - return i.setupContext || (i.setupContext = createSetupContext(i)); -} -function normalizePropsOrEmits(props) { - return isArray(props) ? props.reduce( - (normalized, p) => (normalized[p] = null, normalized), - {} - ) : props; -} -function mergeDefaults(raw, defaults) { - const props = normalizePropsOrEmits(raw); - for (const key in defaults) { - if (key.startsWith("__skip")) continue; - let opt = props[key]; - if (opt) { - if (isArray(opt) || isFunction(opt)) { - opt = props[key] = { type: opt, default: defaults[key] }; - } else { - opt.default = defaults[key]; - } - } else if (opt === null) { - opt = props[key] = { default: defaults[key] }; - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1(`props default key "${key}" has no corresponding declaration.`); - } - if (opt && defaults[`__skip_${key}`]) { - opt.skipFactory = true; - } - } - return props; -} -function mergeModels(a, b) { - if (!a || !b) return a || b; - if (isArray(a) && isArray(b)) return a.concat(b); - return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); -} -function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; -} -function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - if (!!(process.env.NODE_ENV !== "production") && !ctx) { - warn$1( - `withAsyncContext called without active current instance. This is likely a bug.` - ); - } - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (isPromise(awaitable)) { - awaitable = awaitable.catch((e) => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; -} - -function createDuplicateChecker() { - const cache = /* @__PURE__ */ Object.create(null); - return (type, key) => { - if (cache[key]) { - warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); - } else { - cache[key] = type; - } - }; -} -let shouldCacheAccess = true; -function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - shouldCacheAccess = false; - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc"); - } - const { - // state - data: dataOptions, - computed: computedOptions, - methods, - watch: watchOptions, - provide: provideOptions, - inject: injectOptions, - // lifecycle - created, - beforeMount, - mounted, - beforeUpdate, - updated, - activated, - deactivated, - beforeDestroy, - beforeUnmount, - destroyed, - unmounted, - render, - renderTracked, - renderTriggered, - errorCaptured, - serverPrefetch, - // public API - expose, - inheritAttrs, - // assets - components, - directives, - filters - } = options; - const checkDuplicateProperties = !!(process.env.NODE_ENV !== "production") ? createDuplicateChecker() : null; - if (!!(process.env.NODE_ENV !== "production")) { - const [propsOptions] = instance.propsOptions; - if (propsOptions) { - for (const key in propsOptions) { - checkDuplicateProperties("Props" /* PROPS */, key); - } - } - } - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (isFunction(methodHandler)) { - if (!!(process.env.NODE_ENV !== "production")) { - Object.defineProperty(ctx, key, { - value: methodHandler.bind(publicThis), - configurable: true, - enumerable: true, - writable: true - }); - } else { - ctx[key] = methodHandler.bind(publicThis); - } - if (!!(process.env.NODE_ENV !== "production")) { - checkDuplicateProperties("Methods" /* METHODS */, key); - } - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1( - `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` - ); - } - } - } - if (dataOptions) { - if (!!(process.env.NODE_ENV !== "production") && !isFunction(dataOptions)) { - warn$1( - `The data option must be a function. Plain object usage is no longer supported.` - ); - } - const data = dataOptions.call(publicThis, publicThis); - if (!!(process.env.NODE_ENV !== "production") && isPromise(data)) { - warn$1( - `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` - ); - } - if (!isObject(data)) { - !!(process.env.NODE_ENV !== "production") && warn$1(`data() should return an object.`); - } else { - instance.data = reactive(data); - if (!!(process.env.NODE_ENV !== "production")) { - for (const key in data) { - checkDuplicateProperties("Data" /* DATA */, key); - if (!isReservedPrefix(key[0])) { - Object.defineProperty(ctx, key, { - configurable: true, - enumerable: true, - get: () => data[key], - set: NOOP - }); - } - } - } - } - } - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; - if (!!(process.env.NODE_ENV !== "production") && get === NOOP) { - warn$1(`Computed property "${key}" has no getter.`); - } - const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => { - warn$1( - `Write operation failed: computed property "${key}" is readonly.` - ); - } : NOOP; - const c = computed({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: (v) => c.value = v - }); - if (!!(process.env.NODE_ENV !== "production")) { - checkDuplicateProperties("Computed" /* COMPUTED */, key); - } - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; - Reflect.ownKeys(provides).forEach((key) => { - provide(key, provides[key]); - }); - } - if (created) { - callHook(created, instance, "c"); - } - function registerLifecycleHook(register, hook) { - if (isArray(hook)) { - hook.forEach((_hook) => register(_hook.bind(publicThis))); - } else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach((key) => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: (val) => publicThis[key] = val - }); - }); - } else if (!instance.exposed) { - instance.exposed = {}; - } - } - if (render && instance.render === NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - if (components) instance.components = components; - if (directives) instance.directives = directives; - if (serverPrefetch) { - markAsyncBoundary(instance); - } -} -function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { - if (isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (isObject(opt)) { - if ("default" in opt) { - injected = inject( - opt.from || key, - opt.default, - true - ); - } else { - injected = inject(opt.from || key); - } - } else { - injected = inject(opt); - } - if (isRef(injected)) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: (v) => injected.value = v - }); - } else { - ctx[key] = injected; - } - if (!!(process.env.NODE_ENV !== "production")) { - checkDuplicateProperties("Inject" /* INJECT */, key); - } - } -} -function callHook(hook, instance, type) { - callWithAsyncErrorHandling( - isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), - instance, - type - ); -} -function createWatcher(raw, ctx, publicThis, key) { - let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; - if (isString(raw)) { - const handler = ctx[raw]; - if (isFunction(handler)) { - { - watch(getter, handler); - } - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1(`Invalid watch handler specified by key "${raw}"`, handler); - } - } else if (isFunction(raw)) { - { - watch(getter, raw.bind(publicThis)); - } - } else if (isObject(raw)) { - if (isArray(raw)) { - raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); - } else { - const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; - if (isFunction(handler)) { - watch(getter, handler, raw); - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); - } - } - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1(`Invalid watch option: "${key}"`, raw); - } -} -function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { - mixins: globalMixins, - optionsCache: cache, - config: { optionMergeStrategies } - } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; - } else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach( - (m) => mergeOptions(resolved, m, optionMergeStrategies, true) - ); - } - mergeOptions(resolved, base, optionMergeStrategies); - } - if (isObject(base)) { - cache.set(base, resolved); - } - return resolved; -} -function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); - } - if (mixins) { - mixins.forEach( - (m) => mergeOptions(to, m, strats, true) - ); - } - for (const key in from) { - if (asMixin && key === "expose") { - !!(process.env.NODE_ENV !== "production") && warn$1( - `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` - ); - } else { - const strat = internalOptionMergeStrats[key] || strats && strats[key]; - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; -} -const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeEmitsOrPropsOptions, - emits: mergeEmitsOrPropsOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject -}; -function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (extend)( - isFunction(to) ? to.call(this, this) : to, - isFunction(from) ? from.call(this, this) : from - ); - }; -} -function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); -} -function normalizeInject(raw) { - if (isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; - } - return raw; -} -function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; -} -function mergeObjectOptions(to, from) { - return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; -} -function mergeEmitsOrPropsOptions(to, from) { - if (to) { - if (isArray(to) && isArray(from)) { - return [.../* @__PURE__ */ new Set([...to, ...from])]; - } - return extend( - /* @__PURE__ */ Object.create(null), - normalizePropsOrEmits(to), - normalizePropsOrEmits(from != null ? from : {}) - ); - } else { - return from; - } -} -function mergeWatchOptions(to, from) { - if (!to) return from; - if (!from) return to; - const merged = extend(/* @__PURE__ */ Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; -} - -function createAppContext() { - return { - app: null, - config: { - isNativeTag: NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: void 0, - warnHandler: void 0, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: /* @__PURE__ */ Object.create(null), - optionsCache: /* @__PURE__ */ new WeakMap(), - propsCache: /* @__PURE__ */ new WeakMap(), - emitsCache: /* @__PURE__ */ new WeakMap() - }; -} -let uid$1 = 0; -function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!isFunction(rootComponent)) { - rootComponent = extend({}, rootComponent); - } - if (rootProps != null && !isObject(rootProps)) { - !!(process.env.NODE_ENV !== "production") && warn$1(`root props passed to app.mount() must be an object.`); - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = /* @__PURE__ */ new WeakSet(); - const pluginCleanupFns = []; - let isMounted = false; - const app = context.app = { - _uid: uid$1++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - if (!!(process.env.NODE_ENV !== "production")) { - warn$1( - `app.config cannot be replaced. Modify individual options instead.` - ); - } - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) { - !!(process.env.NODE_ENV !== "production") && warn$1(`Plugin has already been applied to target app.`); - } else if (plugin && isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } else if (isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1( - `A plugin must either be a function or an object with an "install" function.` - ); - } - return app; - }, - mixin(mixin) { - if (__VUE_OPTIONS_API__) { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1( - "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") - ); - } - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1("Mixins are only available in builds supporting Options API"); - } - return app; - }, - component(name, component) { - if (!!(process.env.NODE_ENV !== "production")) { - validateComponentName(name, context.config); - } - if (!component) { - return context.components[name]; - } - if (!!(process.env.NODE_ENV !== "production") && context.components[name]) { - warn$1(`Component "${name}" has already been registered in target app.`); - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - if (!!(process.env.NODE_ENV !== "production")) { - validateDirectiveName(name); - } - if (!directive) { - return context.directives[name]; - } - if (!!(process.env.NODE_ENV !== "production") && context.directives[name]) { - warn$1(`Directive "${name}" has already been registered in target app.`); - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, namespace) { - if (!isMounted) { - if (!!(process.env.NODE_ENV !== "production") && rootContainer.__vue_app__) { - warn$1( - `There is already an app instance mounted on the host container. - If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` - ); - } - const vnode = app._ceVNode || createVNode(rootComponent, rootProps); - vnode.appContext = context; - if (namespace === true) { - namespace = "svg"; - } else if (namespace === false) { - namespace = void 0; - } - if (!!(process.env.NODE_ENV !== "production")) { - context.reload = () => { - render( - cloneVNode(vnode), - rootContainer, - namespace - ); - }; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } else { - render(vnode, rootContainer, namespace); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - app._instance = vnode.component; - devtoolsInitApp(app, version); - } - return getComponentPublicInstance(vnode.component); - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1( - `App has already been mounted. -If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` - ); - } - }, - onUnmount(cleanupFn) { - if (!!(process.env.NODE_ENV !== "production") && typeof cleanupFn !== "function") { - warn$1( - `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` - ); - } - pluginCleanupFns.push(cleanupFn); - }, - unmount() { - if (isMounted) { - callWithAsyncErrorHandling( - pluginCleanupFns, - app._instance, - 16 - ); - render(null, app._container); - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - app._instance = null; - devtoolsUnmountApp(app); - } - delete app._container.__vue_app__; - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1(`Cannot unmount an app that is not mounted.`); - } - }, - provide(key, value) { - if (!!(process.env.NODE_ENV !== "production") && key in context.provides) { - warn$1( - `App already provides property with key "${String(key)}". It will be overwritten with the new value.` - ); - } - context.provides[key] = value; - return app; - }, - runWithContext(fn) { - const lastApp = currentApp; - currentApp = app; - try { - return fn(); - } finally { - currentApp = lastApp; - } - } - }; - return app; - }; -} -let currentApp = null; - -function provide(key, value) { - if (!currentInstance) { - if (!!(process.env.NODE_ENV !== "production")) { - warn$1(`provide() can only be used inside setup().`); - } - } else { - let provides = currentInstance.provides; - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - provides[key] = value; - } -} -function inject(key, defaultValue, treatDefaultAsFactory = false) { - const instance = currentInstance || currentRenderingInstance; - if (instance || currentApp) { - const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; - if (provides && key in provides) { - return provides[key]; - } else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1(`injection "${String(key)}" not found.`); - } - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1(`inject() can only be used inside setup() or functional components.`); - } -} -function hasInjectionContext() { - return !!(currentInstance || currentRenderingInstance || currentApp); -} - -const internalObjectProto = {}; -const createInternalObject = () => Object.create(internalObjectProto); -const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; - -function initProps(instance, rawProps, isStateful, isSSR = false) { - const props = {}; - const attrs = createInternalObject(); - instance.propsDefaults = /* @__PURE__ */ Object.create(null); - setFullProps(instance, rawProps, props, attrs); - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = void 0; - } - } - if (!!(process.env.NODE_ENV !== "production")) { - validateProps(rawProps || {}, props, instance); - } - if (isStateful) { - instance.props = isSSR ? props : shallowReactive(props); - } else { - if (!instance.type.props) { - instance.props = attrs; - } else { - instance.props = props; - } - } - instance.attrs = attrs; -} -function isInHmrContext(instance) { - while (instance) { - if (instance.type.__hmrId) return true; - instance = instance.parent; - } -} -function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { - props, - attrs, - vnode: { patchFlag } - } = instance; - const rawCurrentProps = toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( - // always force full diff in dev - // - #1942 if hmr is enabled with sfc component - // - vite#872 non-sfc component used by sfc component - !(!!(process.env.NODE_ENV !== "production") && isInHmrContext(instance)) && (optimized || patchFlag > 0) && !(patchFlag & 16) - ) { - if (patchFlag & 8) { - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - const value = rawProps[key]; - if (options) { - if (hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } else { - const camelizedKey = camelize(key); - props[camelizedKey] = resolvePropValue( - options, - rawCurrentProps, - camelizedKey, - value, - instance, - false - ); - } - } else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - } else { - if (setFullProps(instance, rawProps, props, attrs)) { - hasAttrsChanged = true; - } - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || // for camelCase - !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { - if (options) { - if (rawPrevProps && // for camelCase - (rawPrevProps[key] !== void 0 || // for kebab-case - rawPrevProps[kebabKey] !== void 0)) { - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - void 0, - instance, - true - ); - } - } else { - delete props[key]; - } - } - } - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || !hasOwn(rawProps, key) && true) { - delete attrs[key]; - hasAttrsChanged = true; - } - } - } - } - if (hasAttrsChanged) { - trigger(instance.attrs, "set", ""); - } - if (!!(process.env.NODE_ENV !== "production")) { - validateProps(rawProps || {}, props, instance); - } -} -function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - if (isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - let camelKey; - if (options && hasOwn(options, camelKey = camelize(key))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - if (needCastKeys) { - const rawCurrentProps = toRaw(props); - const castValues = rawCastValues || EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - castValues[key], - instance, - !hasOwn(castValues, key) - ); - } - } - return hasAttrsChanged; -} -function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = hasOwn(opt, "default"); - if (hasDefault && value === void 0) { - const defaultValue = opt.default; - if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } else { - const reset = setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call( - null, - props - ); - reset(); - } - } else { - value = defaultValue; - } - if (instance.ce) { - instance.ce._setProp(key, value); - } - } - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { - value = true; - } - } - } - return value; -} -const mixinPropsCache = /* @__PURE__ */ new WeakMap(); -function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = __VUE_OPTIONS_API__ && asMixin ? mixinPropsCache : appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; - } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - let hasExtends = false; - if (__VUE_OPTIONS_API__ && !isFunction(comp)) { - const extendProps = (raw2) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw2, appContext, true); - extend(normalized, props); - if (keys) needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } - } - if (!raw && !hasExtends) { - if (isObject(comp)) { - cache.set(comp, EMPTY_ARR); - } - return EMPTY_ARR; - } - if (isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - if (!!(process.env.NODE_ENV !== "production") && !isString(raw[i])) { - warn$1(`props must be strings when using array syntax.`, raw[i]); - } - const normalizedKey = camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = EMPTY_OBJ; - } - } - } else if (raw) { - if (!!(process.env.NODE_ENV !== "production") && !isObject(raw)) { - warn$1(`invalid props options`, raw); - } - for (const key in raw) { - const normalizedKey = camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); - const propType = prop.type; - let shouldCast = false; - let shouldCastTrue = true; - if (isArray(propType)) { - for (let index = 0; index < propType.length; ++index) { - const type = propType[index]; - const typeName = isFunction(type) && type.name; - if (typeName === "Boolean") { - shouldCast = true; - break; - } else if (typeName === "String") { - shouldCastTrue = false; - } - } - } else { - shouldCast = isFunction(propType) && propType.name === "Boolean"; - } - prop[0 /* shouldCast */] = shouldCast; - prop[1 /* shouldCastTrue */] = shouldCastTrue; - if (shouldCast || hasOwn(prop, "default")) { - needCastKeys.push(normalizedKey); - } - } - } - } - const res = [normalized, needCastKeys]; - if (isObject(comp)) { - cache.set(comp, res); - } - return res; -} -function validatePropName(key) { - if (key[0] !== "$" && !isReservedProp(key)) { - return true; - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1(`Invalid prop name: "${key}" is a reserved property.`); - } - return false; -} -function getType(ctor) { - if (ctor === null) { - return "null"; - } - if (typeof ctor === "function") { - return ctor.name || ""; - } else if (typeof ctor === "object") { - const name = ctor.constructor && ctor.constructor.name; - return name || ""; - } - return ""; -} -function validateProps(rawProps, props, instance) { - const resolvedValues = toRaw(props); - const options = instance.propsOptions[0]; - const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key)); - for (const key in options) { - let opt = options[key]; - if (opt == null) continue; - validateProp( - key, - resolvedValues[key], - opt, - !!(process.env.NODE_ENV !== "production") ? shallowReadonly(resolvedValues) : resolvedValues, - !camelizePropsKey.includes(key) - ); - } -} -function validateProp(name, value, prop, props, isAbsent) { - const { type, required, validator, skipCheck } = prop; - if (required && isAbsent) { - warn$1('Missing required prop: "' + name + '"'); - return; - } - if (value == null && !required) { - return; - } - if (type != null && type !== true && !skipCheck) { - let isValid = false; - const types = isArray(type) ? type : [type]; - const expectedTypes = []; - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); - expectedTypes.push(expectedType || ""); - isValid = valid; - } - if (!isValid) { - warn$1(getInvalidTypeMessage(name, value, expectedTypes)); - return; - } - } - if (validator && !validator(value, props)) { - warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); - } -} -const isSimpleType = /* @__PURE__ */ makeMap( - "String,Number,Boolean,Function,Symbol,BigInt" -); -function assertType(value, type) { - let valid; - const expectedType = getType(type); - if (expectedType === "null") { - valid = value === null; - } else if (isSimpleType(expectedType)) { - const t = typeof value; - valid = t === expectedType.toLowerCase(); - if (!valid && t === "object") { - valid = value instanceof type; - } - } else if (expectedType === "Object") { - valid = isObject(value); - } else if (expectedType === "Array") { - valid = isArray(value); - } else { - valid = value instanceof type; - } - return { - valid, - expectedType - }; -} -function getInvalidTypeMessage(name, value, expectedTypes) { - if (expectedTypes.length === 0) { - return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; - } - let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; - const expectedType = expectedTypes[0]; - const receivedType = toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); - if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; - } - message += `, got ${receivedType} `; - if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; - } - return message; -} -function styleValue(value, type) { - if (type === "String") { - return `"${value}"`; - } else if (type === "Number") { - return `${Number(value)}`; - } else { - return `${value}`; - } -} -function isExplicable(type) { - const explicitTypes = ["string", "number", "boolean"]; - return explicitTypes.some((elem) => type.toLowerCase() === elem); -} -function isBoolean(...args) { - return args.some((elem) => elem.toLowerCase() === "boolean"); -} - -const isInternalKey = (key) => key[0] === "_" || key === "$stable"; -const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; -const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - return rawSlot; - } - const normalized = withCtx((...args) => { - if (!!(process.env.NODE_ENV !== "production") && currentInstance && (!ctx || ctx.root === currentInstance.root)) { - warn$1( - `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` - ); - } - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; -}; -const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) continue; - const value = rawSlots[key]; - if (isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } else if (value != null) { - if (!!(process.env.NODE_ENV !== "production") && true) { - warn$1( - `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` - ); - } - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } - } -}; -const normalizeVNodeSlots = (instance, children) => { - if (!!(process.env.NODE_ENV !== "production") && !isKeepAlive(instance.vnode) && true) { - warn$1( - `Non-function value encountered for default slot. Prefer function slots for better performance.` - ); - } - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; -}; -const assignSlots = (slots, children, optimized) => { - for (const key in children) { - if (optimized || key !== "_") { - slots[key] = children[key]; - } - } -}; -const initSlots = (instance, children, optimized) => { - const slots = instance.slots = createInternalObject(); - if (instance.vnode.shapeFlag & 32) { - const type = children._; - if (type) { - assignSlots(slots, children, optimized); - if (optimized) { - def(slots, "_", type, true); - } - } else { - normalizeObjectSlots(children, slots); - } - } else if (children) { - normalizeVNodeSlots(instance, children); - } -}; -const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = EMPTY_OBJ; - if (vnode.shapeFlag & 32) { - const type = children._; - if (type) { - if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) { - assignSlots(slots, children, optimized); - trigger(instance, "set", "$slots"); - } else if (optimized && type === 1) { - needDeletionCheck = false; - } else { - assignSlots(slots, children, optimized); - } - } else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; - } else if (children) { - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { - delete slots[key]; - } - } - } -}; - -let supported; -let perf; -function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); - } -} -function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure( - `<${formatComponentName(instance, instance.type)}> ${type}`, - startTag, - endTag - ); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); - } -} -function isSupported() { - if (supported !== void 0) { - return supported; - } - if (typeof window !== "undefined" && window.performance) { - supported = true; - perf = window.performance; - } else { - supported = false; - } - return supported; -} - -function initFeatureFlags() { - const needWarn = []; - if (typeof __VUE_OPTIONS_API__ !== "boolean") { - !!(process.env.NODE_ENV !== "production") && needWarn.push(`__VUE_OPTIONS_API__`); - getGlobalThis().__VUE_OPTIONS_API__ = true; - } - if (typeof __VUE_PROD_DEVTOOLS__ !== "boolean") { - !!(process.env.NODE_ENV !== "production") && needWarn.push(`__VUE_PROD_DEVTOOLS__`); - getGlobalThis().__VUE_PROD_DEVTOOLS__ = false; - } - if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== "boolean") { - !!(process.env.NODE_ENV !== "production") && needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`); - getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false; - } - if (!!(process.env.NODE_ENV !== "production") && needWarn.length) { - const multi = needWarn.length > 1; - console.warn( - `Feature flag${multi ? `s` : ``} ${needWarn.join(", ")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle. - -For more details, see https://link.vuejs.org/feature-flags.` - ); - } -} - -const queuePostRenderEffect = queueEffectWithSuspense ; -function createRenderer(options) { - return baseCreateRenderer(options); -} -function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); -} -function baseCreateRenderer(options, createHydrationFns) { - { - initFeatureFlags(); - } - const target = getGlobalThis(); - target.__VUE__ = true; - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); - } - const { - insert: hostInsert, - remove: hostRemove, - patchProp: hostPatchProp, - createElement: hostCreateElement, - createText: hostCreateText, - createComment: hostCreateComment, - setText: hostSetText, - setElementText: hostSetElementText, - parentNode: hostParentNode, - nextSibling: hostNextSibling, - setScopeId: hostSetScopeId = NOOP, - insertStaticContent: hostInsertStaticContent - } = options; - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!(process.env.NODE_ENV !== "production") && isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, namespace); - } else if (!!(process.env.NODE_ENV !== "production")) { - patchStaticNode(n1, n2, container, namespace); - } - break; - case Fragment: - processFragment( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - break; - default: - if (shapeFlag & 1) { - processElement( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 6) { - processComponent( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 64) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else if (shapeFlag & 128) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else if (!!(process.env.NODE_ENV !== "production")) { - warn$1("Invalid VNode type:", type, `(${typeof type})`); - } - } - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateText(n2.children), - container, - anchor - ); - } else { - const el = n2.el = n1.el; - if (n2.children !== n1.children) { - hostSetText(el, n2.children); - } - } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateComment(n2.children || ""), - container, - anchor - ); - } else { - n2.el = n1.el; - } - }; - const mountStaticNode = (n2, container, anchor, namespace) => { - [n2.el, n2.anchor] = hostInsertStaticContent( - n2.children, - container, - anchor, - namespace, - n2.el, - n2.anchor - ); - }; - const patchStaticNode = (n1, n2, container, namespace) => { - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent( - n2.children, - container, - anchor, - namespace - ); - } else { - n2.el = n1.el; - n2.anchor = n1.anchor; - } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; - } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; - } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - if (n2.type === "svg") { - namespace = "svg"; - } else if (n2.type === "math") { - namespace = "mathml"; - } - if (n1 == null) { - mountElement( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - patchElement( - n1, - n2, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - let el; - let vnodeHook; - const { props, shapeFlag, transition, dirs } = vnode; - el = vnode.el = hostCreateElement( - vnode.type, - namespace, - props && props.is, - props - ); - if (shapeFlag & 8) { - hostSetElementText(el, vnode.children); - } else if (shapeFlag & 16) { - mountChildren( - vnode.children, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(vnode, namespace), - slotScopeIds, - optimized - ); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); - if (props) { - for (const key in props) { - if (key !== "value" && !isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], namespace, parentComponent); - } - } - if ("value" in props) { - hostPatchProp(el, "value", null, props.value, namespace); - } - if (vnodeHook = props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - def(el, "__vnode", vnode, true); - def(el, "__vueParentComponent", parentComponent, true); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - const needCallTransitionHooks = needTransition(parentSuspense, transition); - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (!!(process.env.NODE_ENV !== "production") && subTree.patchFlag > 0 && subTree.patchFlag & 2048) { - subTree = filterSingleRoot(subTree.children) || subTree; - } - if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { - const parentVNode = parentComponent.vnode; - setScopeId( - el, - parentVNode, - parentVNode.scopeId, - parentVNode.slotScopeIds, - parentComponent.parent - ); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); - patch( - null, - child, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const el = n2.el = n1.el; - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - el.__vnode = n2; - } - let { patchFlag, dynamicChildren, dirs } = n2; - patchFlag |= n1.patchFlag & 16; - const oldProps = n1.props || EMPTY_OBJ; - const newProps = n2.props || EMPTY_OBJ; - let vnodeHook; - parentComponent && toggleRecurse(parentComponent, false); - if (vnodeHook = newProps.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); - } - parentComponent && toggleRecurse(parentComponent, true); - if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) { - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { - hostSetElementText(el, ""); - } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - el, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds - ); - if (!!(process.env.NODE_ENV !== "production")) { - traverseStaticChildren(n1, n2); - } - } else if (!optimized) { - patchChildren( - n1, - n2, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds, - false - ); - } - if (patchFlag > 0) { - if (patchFlag & 16) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } else { - if (patchFlag & 2) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, "class", null, newProps.class, namespace); - } - } - if (patchFlag & 4) { - hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); - } - if (patchFlag & 8) { - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - if (next !== prev || key === "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - } - } - if (patchFlag & 1) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } else if (!optimized && dynamicChildren == null) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); - }, parentSuspense); - } - }; - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - const container = ( - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( - // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer - ) - ); - patch( - oldVNode, - newVNode, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - true - ); - } - }; - const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { - if (oldProps !== newProps) { - if (oldProps !== EMPTY_OBJ) { - for (const key in oldProps) { - if (!isReservedProp(key) && !(key in newProps)) { - hostPatchProp( - el, - key, - oldProps[key], - null, - namespace, - parentComponent - ); - } - } - } - for (const key in newProps) { - if (isReservedProp(key)) continue; - const next = newProps[key]; - const prev = oldProps[key]; - if (next !== prev && key !== "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - if ("value" in newProps) { - hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); - const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if (!!(process.env.NODE_ENV !== "production") && // #5523 dev root fragment may inherit directives - (isHmrUpdating || patchFlag & 2048)) { - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - mountChildren( - // #10007 - // such fragment like `<></>` will be compiled into - // a fragment which doesn't have a children. - // In this case fallback to an empty array - n2.children || [], - container, - fragmentEndAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - container, - parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - if (!!(process.env.NODE_ENV !== "production")) { - traverseStaticChildren(n1, n2); - } else if ( - // #2080 if the stable fragment has a key, it's a <template v-for> that may - // get moved around. Make sure all root level vnodes inherit el. - // #2134 or if it's a component root, it may also get moved around - // as the component is being moved. - n2.key != null || parentComponent && n2 === parentComponent.subTree - ) { - traverseStaticChildren( - n1, - n2, - true - /* shallow */ - ); - } - } else { - patchChildren( - n1, - n2, - container, - fragmentEndAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512) { - parentComponent.ctx.activate( - n2, - container, - anchor, - namespace, - optimized - ); - } else { - mountComponent( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - optimized - ); - } - } else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { - const instance = (initialVNode.component = createComponentInstance( - initialVNode, - parentComponent, - parentSuspense - )); - if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) { - registerHMR(instance); - } - if (!!(process.env.NODE_ENV !== "production")) { - pushWarningContext(initialVNode); - startMeasure(instance, `mount`); - } - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - { - if (!!(process.env.NODE_ENV !== "production")) { - startMeasure(instance, `init`); - } - setupComponent(instance, false, optimized); - if (!!(process.env.NODE_ENV !== "production")) { - endMeasure(instance, `init`); - } - } - if (instance.asyncDep) { - if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null; - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); - if (!initialVNode.el) { - const placeholder = instance.subTree = createVNode(Comment); - processCommentNode(null, placeholder, container, anchor); - } - } else { - setupRenderEffect( - instance, - initialVNode, - container, - anchor, - parentSuspense, - namespace, - optimized - ); - } - if (!!(process.env.NODE_ENV !== "production")) { - popWarningContext(); - endMeasure(instance, `mount`); - } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = n2.component = n1.component; - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && !instance.asyncResolved) { - if (!!(process.env.NODE_ENV !== "production")) { - pushWarningContext(n2); - } - updateComponentPreRender(instance, n2, optimized); - if (!!(process.env.NODE_ENV !== "production")) { - popWarningContext(); - } - return; - } else { - instance.next = n2; - instance.update(); - } - } else { - n2.el = n1.el; - instance.vnode = n2; - } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent, root, type } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - if (bm) { - invokeArrayFns(bm); - } - if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - const hydrateSubTree = () => { - if (!!(process.env.NODE_ENV !== "production")) { - startMeasure(instance, `render`); - } - instance.subTree = renderComponentRoot(instance); - if (!!(process.env.NODE_ENV !== "production")) { - endMeasure(instance, `render`); - } - if (!!(process.env.NODE_ENV !== "production")) { - startMeasure(instance, `hydrate`); - } - hydrateNode( - el, - instance.subTree, - instance, - parentSuspense, - null - ); - if (!!(process.env.NODE_ENV !== "production")) { - endMeasure(instance, `hydrate`); - } - }; - if (isAsyncWrapperVNode && type.__asyncHydrate) { - type.__asyncHydrate( - el, - instance, - hydrateSubTree - ); - } else { - hydrateSubTree(); - } - } else { - if (root.ce) { - root.ce._injectChildStyle(type); - } - if (!!(process.env.NODE_ENV !== "production")) { - startMeasure(instance, `render`); - } - const subTree = instance.subTree = renderComponentRoot(instance); - if (!!(process.env.NODE_ENV !== "production")) { - endMeasure(instance, `render`); - } - if (!!(process.env.NODE_ENV !== "production")) { - startMeasure(instance, `patch`); - } - patch( - null, - subTree, - container, - anchor, - instance, - parentSuspense, - namespace - ); - if (!!(process.env.NODE_ENV !== "production")) { - endMeasure(instance, `patch`); - } - initialVNode.el = subTree.el; - } - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect( - () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), - parentSuspense - ); - } - if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - devtoolsComponentAdded(instance); - } - initialVNode = container = anchor = null; - } else { - let { next, bu, u, parent, vnode } = instance; - { - const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); - if (nonHydratedAsyncRoot) { - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - nonHydratedAsyncRoot.asyncDep.then(() => { - if (!instance.isUnmounted) { - componentUpdateFn(); - } - }); - return; - } - } - let originNext = next; - let vnodeHook; - if (!!(process.env.NODE_ENV !== "production")) { - pushWarningContext(next || instance.vnode); - } - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } else { - next = vnode; - } - if (bu) { - invokeArrayFns(bu); - } - if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - if (!!(process.env.NODE_ENV !== "production")) { - startMeasure(instance, `render`); - } - const nextTree = renderComponentRoot(instance); - if (!!(process.env.NODE_ENV !== "production")) { - endMeasure(instance, `render`); - } - const prevTree = instance.subTree; - instance.subTree = nextTree; - if (!!(process.env.NODE_ENV !== "production")) { - startMeasure(instance, `patch`); - } - patch( - prevTree, - nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), - instance, - parentSuspense, - namespace - ); - if (!!(process.env.NODE_ENV !== "production")) { - endMeasure(instance, `patch`); - } - next.el = nextTree.el; - if (originNext === null) { - updateHOCHostEl(instance, nextTree.el); - } - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - if (vnodeHook = next.props && next.props.onVnodeUpdated) { - queuePostRenderEffect( - () => invokeVNodeHook(vnodeHook, parent, next, vnode), - parentSuspense - ); - } - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - devtoolsComponentUpdated(instance); - } - if (!!(process.env.NODE_ENV !== "production")) { - popWarningContext(); - } - } - }; - instance.scope.on(); - const effect = instance.effect = new ReactiveEffect(componentUpdateFn); - instance.scope.off(); - const update = instance.update = effect.run.bind(effect); - const job = instance.job = effect.runIfDirty.bind(effect); - job.i = instance; - job.id = instance.uid; - effect.scheduler = () => queueJob(job); - toggleRecurse(instance, true); - if (!!(process.env.NODE_ENV !== "production")) { - effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; - effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; - } - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - pauseTracking(); - flushPreFlushCbs(instance); - resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - if (patchFlag > 0) { - if (patchFlag & 128) { - patchKeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - return; - } else if (patchFlag & 256) { - patchUnkeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - return; - } - } - if (shapeFlag & 8) { - if (prevShapeFlag & 16) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } - } else { - if (prevShapeFlag & 16) { - if (shapeFlag & 16) { - patchKeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } else { - if (prevShapeFlag & 8) { - hostSetElementText(container, ""); - } - if (shapeFlag & 16) { - mountChildren( - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - } - } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - c1 = c1 || EMPTY_ARR; - c2 = c2 || EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - patch( - c1[i], - nextChild, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - if (oldLength > newLength) { - unmountChildren( - c1, - parentComponent, - parentSuspense, - true, - false, - commonLength - ); - } else { - mountChildren( - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - commonLength - ); - } - }; - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; - let e2 = l2 - 1; - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - if (isSameVNodeType(n1, n2)) { - patch( - n1, - n2, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - break; - } - i++; - } - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); - if (isSameVNodeType(n1, n2)) { - patch( - n1, - n2, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - break; - } - e1--; - e2--; - } - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch( - null, - c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - i++; - } - } - } else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } else { - const s1 = i; - const s2 = i; - const keyToNewIndexMap = /* @__PURE__ */ new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - if (nextChild.key != null) { - if (!!(process.env.NODE_ENV !== "production") && keyToNewIndexMap.has(nextChild.key)) { - warn$1( - `Duplicate keys found during update:`, - JSON.stringify(nextChild.key), - `Make sure keys are unique.` - ); - } - keyToNewIndexMap.set(nextChild.key, i); - } - } - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - let maxNewIndexSoFar = 0; - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } else { - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === void 0) { - unmount(prevChild, parentComponent, parentSuspense, true); - } else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } else { - moved = true; - } - patch( - prevChild, - c2[newIndex], - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - patched++; - } - } - const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - patch( - null, - nextChild, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (moved) { - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2); - } else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; - if (needTransition2) { - if (moveType === 0) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } else { - const { leave, delayLeave, afterLeave } = transition; - const remove2 = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove2(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove2, performLeave); - } else { - performLeave(); - } - } - } else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { - type, - props, - ref, - children, - dynamicChildren, - shapeFlag, - patchFlag, - dirs, - cacheIndex - } = vnode; - if (patchFlag === -2) { - optimized = false; - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (cacheIndex != null) { - parentComponent.renderCache[cacheIndex] = void 0; - } - if (shapeFlag & 256) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } else { - if (shapeFlag & 128) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); - } - if (shapeFlag & 64) { - vnode.type.remove( - vnode, - parentComponent, - parentSuspense, - internals, - doRemove - ); - } else if (dynamicChildren && // #5154 - // when v-once is used inside a block, setBlockTracking(-1) marks the - // parent block with hasOnce: true - // so that it doesn't take the fast path during unmount - otherwise - // components nested in v-once are never unmounted. - !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { - unmountChildren( - dynamicChildren, - parentComponent, - parentSuspense, - false, - true - ); - } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); - }, parentSuspense); - } - }; - const remove = (vnode) => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - if (!!(process.env.NODE_ENV !== "production") && vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { - vnode.children.forEach((child) => { - if (child.type === Comment) { - hostRemove(child.el); - } else { - remove(child); - } - }); - } else { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 && transition && !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } else { - performLeave(); - } - } else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) { - unregisterHMR(instance); - } - const { bum, scope, job, subTree, um, m, a } = instance; - invalidateMount(m); - invalidateMount(a); - if (bum) { - invokeArrayFns(bum); - } - scope.stop(); - if (job) { - job.flags |= 8; - unmount(subTree, instance, parentSuspense, doRemove); - } - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } - } - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - devtoolsComponentRemoved(instance); - } - }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } - }; - const getNextHostNode = (vnode) => { - if (vnode.shapeFlag & 6) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128) { - return vnode.suspense.next(); - } - const el = hostNextSibling(vnode.anchor || vnode.el); - const teleportEnd = el && el[TeleportEndKey]; - return teleportEnd ? hostNextSibling(teleportEnd) : el; - }; - let isFlushing = false; - const render = (vnode, container, namespace) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } else { - patch( - container._vnode || null, - vnode, - container, - null, - null, - null, - namespace - ); - } - container._vnode = vnode; - if (!isFlushing) { - isFlushing = true; - flushPreFlushCbs(); - flushPostFlushCbs(); - isFlushing = false; - } - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns( - internals - ); - } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) - }; -} -function resolveChildrenNamespace({ type, props }, currentNamespace) { - return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; -} -function toggleRecurse({ effect, job }, allowed) { - if (allowed) { - effect.flags |= 32; - job.flags |= 4; - } else { - effect.flags &= ~32; - job.flags &= ~4; - } -} -function needTransition(parentSuspense, transition) { - return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; -} -function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (isArray(ch1) && isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow && c2.patchFlag !== -2) - traverseStaticChildren(c1, c2); - } - if (c2.type === Text) { - c2.el = c1.el; - } - if (!!(process.env.NODE_ENV !== "production") && c2.type === Comment && !c2.el) { - c2.el = c1.el; - } - } - } -} -function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = u + v >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } - } - } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; - } - return result; -} -function locateNonHydratedAsyncRoot(instance) { - const subComponent = instance.subTree.component; - if (subComponent) { - if (subComponent.asyncDep && !subComponent.asyncResolved) { - return subComponent; - } else { - return locateNonHydratedAsyncRoot(subComponent); - } - } -} -function invalidateMount(hooks) { - if (hooks) { - for (let i = 0; i < hooks.length; i++) - hooks[i].flags |= 8; - } -} - -const ssrContextKey = Symbol.for("v-scx"); -const useSSRContext = () => { - { - const ctx = inject(ssrContextKey); - if (!ctx) { - !!(process.env.NODE_ENV !== "production") && warn$1( - `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` - ); - } - return ctx; - } -}; - -function watchEffect(effect, options) { - return doWatch(effect, null, options); -} -function watchPostEffect(effect, options) { - return doWatch( - effect, - null, - !!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "post" }) : { flush: "post" } - ); -} -function watchSyncEffect(effect, options) { - return doWatch( - effect, - null, - !!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "sync" }) : { flush: "sync" } - ); -} -function watch(source, cb, options) { - if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) { - warn$1( - `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` - ); - } - return doWatch(source, cb, options); -} -function doWatch(source, cb, options = EMPTY_OBJ) { - const { immediate, deep, flush, once } = options; - if (!!(process.env.NODE_ENV !== "production") && !cb) { - if (immediate !== void 0) { - warn$1( - `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - if (deep !== void 0) { - warn$1( - `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - if (once !== void 0) { - warn$1( - `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - } - const baseWatchOptions = extend({}, options); - if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1; - const runsImmediately = cb && immediate || !cb && flush !== "post"; - let ssrCleanup; - if (isInSSRComponentSetup) { - if (flush === "sync") { - const ctx = useSSRContext(); - ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); - } else if (!runsImmediately) { - const watchStopHandle = () => { - }; - watchStopHandle.stop = NOOP; - watchStopHandle.resume = NOOP; - watchStopHandle.pause = NOOP; - return watchStopHandle; - } - } - const instance = currentInstance; - baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); - let isPre = false; - if (flush === "post") { - baseWatchOptions.scheduler = (job) => { - queuePostRenderEffect(job, instance && instance.suspense); - }; - } else if (flush !== "sync") { - isPre = true; - baseWatchOptions.scheduler = (job, isFirstRun) => { - if (isFirstRun) { - job(); - } else { - queueJob(job); - } - }; - } - baseWatchOptions.augmentJob = (job) => { - if (cb) { - job.flags |= 4; - } - if (isPre) { - job.flags |= 2; - if (instance) { - job.id = instance.uid; - job.i = instance; - } - } - }; - const watchHandle = watch$1(source, cb, baseWatchOptions); - if (isInSSRComponentSetup) { - if (ssrCleanup) { - ssrCleanup.push(watchHandle); - } else if (runsImmediately) { - watchHandle(); - } - } - return watchHandle; -} -function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } else { - cb = value.handler; - options = value; - } - const reset = setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - reset(); - return res; -} -function createPathGetter(ctx, path) { - const segments = path.split("."); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; -} - -function useModel(props, name, options = EMPTY_OBJ) { - const i = getCurrentInstance(); - if (!!(process.env.NODE_ENV !== "production") && !i) { - warn$1(`useModel() called without active instance.`); - return ref(); - } - const camelizedName = camelize(name); - if (!!(process.env.NODE_ENV !== "production") && !i.propsOptions[0][camelizedName]) { - warn$1(`useModel() called with prop "${name}" which is not declared.`); - return ref(); - } - const hyphenatedName = hyphenate(name); - const modifiers = getModelModifiers(props, camelizedName); - const res = customRef((track, trigger) => { - let localValue; - let prevSetValue = EMPTY_OBJ; - let prevEmittedValue; - watchSyncEffect(() => { - const propValue = props[camelizedName]; - if (hasChanged(localValue, propValue)) { - localValue = propValue; - trigger(); - } - }); - return { - get() { - track(); - return options.get ? options.get(localValue) : localValue; - }, - set(value) { - const emittedValue = options.set ? options.set(value) : value; - if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) { - return; - } - const rawProps = i.vnode.props; - if (!(rawProps && // check if parent has passed v-model - (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { - localValue = value; - trigger(); - } - i.emit(`update:${name}`, emittedValue); - if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) { - trigger(); - } - prevSetValue = value; - prevEmittedValue = emittedValue; - } - }; - }); - res[Symbol.iterator] = () => { - let i2 = 0; - return { - next() { - if (i2 < 2) { - return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false }; - } else { - return { done: true }; - } - } - }; - }; - return res; -} -const getModelModifiers = (props, modelName) => { - return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; -}; - -function emit(instance, event, ...rawArgs) { - if (instance.isUnmounted) return; - const props = instance.vnode.props || EMPTY_OBJ; - if (!!(process.env.NODE_ENV !== "production")) { - const { - emitsOptions, - propsOptions: [propsOptions] - } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && true) { - if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) { - warn$1( - `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.` - ); - } - } else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn$1( - `Invalid event arguments: event validation failed for event "${event}".` - ); - } - } - } - } - } - let args = rawArgs; - const isModelListener = event.startsWith("update:"); - const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); - if (modifiers) { - if (modifiers.trim) { - args = rawArgs.map((a) => isString(a) ? a.trim() : a); - } - if (modifiers.number) { - args = rawArgs.map(looseToNumber); - } - } - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - devtoolsComponentEmit(instance, event, args); - } - if (!!(process.env.NODE_ENV !== "production")) { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1( - `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( - instance, - instance.type - )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( - event - )}" instead of "${event}".` - ); - } - } - let handlerName; - let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) - props[handlerName = toHandlerKey(camelize(event))]; - if (!handler && isModelListener) { - handler = props[handlerName = toHandlerKey(hyphenate(event))]; - } - if (handler) { - callWithAsyncErrorHandling( - handler, - instance, - 6, - args - ); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling( - onceHandler, - instance, - 6, - args - ); - } -} -function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== void 0) { - return cached; - } - const raw = comp.emits; - let normalized = {}; - let hasExtends = false; - if (__VUE_OPTIONS_API__ && !isFunction(comp)) { - const extendEmits = (raw2) => { - const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } - } - if (!raw && !hasExtends) { - if (isObject(comp)) { - cache.set(comp, null); - } - return null; - } - if (isArray(raw)) { - raw.forEach((key) => normalized[key] = null); - } else { - extend(normalized, raw); - } - if (isObject(comp)) { - cache.set(comp, normalized); - } - return normalized; -} -function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ""); - return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); -} - -let accessedAttrs = false; -function markAttrsAccessed() { - accessedAttrs = true; -} -function renderComponentRoot(instance) { - const { - type: Component, - vnode, - proxy, - withProxy, - propsOptions: [propsOptions], - slots, - attrs, - emit, - render, - renderCache, - props, - data, - setupState, - ctx, - inheritAttrs - } = instance; - const prev = setCurrentRenderingInstance(instance); - let result; - let fallthroughAttrs; - if (!!(process.env.NODE_ENV !== "production")) { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4) { - const proxyToUse = withProxy || proxy; - const thisProxy = !!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup ? new Proxy(proxyToUse, { - get(target, key, receiver) { - warn$1( - `Property '${String( - key - )}' was accessed via 'this'. Avoid using 'this' in templates.` - ); - return Reflect.get(target, key, receiver); - } - }) : proxyToUse; - result = normalizeVNode( - render.call( - thisProxy, - proxyToUse, - renderCache, - !!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, - setupState, - data, - ctx - ) - ); - fallthroughAttrs = attrs; - } else { - const render2 = Component; - if (!!(process.env.NODE_ENV !== "production") && attrs === props) { - markAttrsAccessed(); - } - result = normalizeVNode( - render2.length > 1 ? render2( - !!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, - !!(process.env.NODE_ENV !== "production") ? { - get attrs() { - markAttrsAccessed(); - return shallowReadonly(attrs); - }, - slots, - emit - } : { attrs, slots, emit } - ) : render2( - !!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, - null - ) - ); - fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); - } - } catch (err) { - blockStack.length = 0; - handleError(err, instance, 1); - result = createVNode(Comment); - } - let root = result; - let setRoot = void 0; - if (!!(process.env.NODE_ENV !== "production") && result.patchFlag > 0 && result.patchFlag & 2048) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 | 6)) { - if (propsOptions && keys.some(isModelListener)) { - fallthroughAttrs = filterModelListeners( - fallthroughAttrs, - propsOptions - ); - } - root = cloneVNode(root, fallthroughAttrs, false, true); - } else if (!!(process.env.NODE_ENV !== "production") && !accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - if (!isModelListener(key)) { - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1( - `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` - ); - } - if (eventAttrs.length) { - warn$1( - `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` - ); - } - } - } - } - if (vnode.dirs) { - if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) { - warn$1( - `Runtime directive used on component with non-element root node. The directives will not function as intended.` - ); - } - root = cloneVNode(root, null, false, true); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; - } - if (vnode.transition) { - if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) { - warn$1( - `Component inside <Transition> renders non-element root node that cannot be animated.` - ); - } - setTransitionHooks(root, vnode.transition); - } - if (!!(process.env.NODE_ENV !== "production") && setRoot) { - setRoot(root); - } else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; -} -const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren, false); - if (!childRoot) { - return [vnode, void 0]; - } else if (!!(process.env.NODE_ENV !== "production") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { - return getChildRoot(childRoot); - } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; -}; -function filterSingleRoot(children, recurse = true) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - if (child.type !== Comment || child.children === "v-if") { - if (singleRoot) { - return; - } else { - singleRoot = child; - if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { - return filterSingleRoot(singleRoot.children); - } - } - } - } else { - return; - } - } - return singleRoot; -} -const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === "class" || key === "style" || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } - } - return res; -}; -const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } - } - return res; -}; -const isElementRoot = (vnode) => { - return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; -}; -function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - if (!!(process.env.NODE_ENV !== "production") && (prevChildren || nextChildren) && isHmrUpdating) { - return true; - } - if (nextVNode.dirs || nextVNode.transition) { - return true; - } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024) { - return true; - } - if (patchFlag & 16) { - if (!prevProps) { - return !!nextProps; - } - return hasPropsChanged(prevProps, nextProps, emits); - } else if (patchFlag & 8) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { - return true; - } - } - } - } else { - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); - } - return false; -} -function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; - } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; -} -function updateHOCHostEl({ vnode, parent }, el) { - while (parent) { - const root = parent.subTree; - if (root.suspense && root.suspense.activeBranch === vnode) { - root.el = vnode.el; - } - if (root === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; - } else { - break; - } - } -} - -const isSuspense = (type) => type.__isSuspense; -let suspenseId = 0; -const SuspenseImpl = { - name: "Suspense", - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - if (n1 == null) { - mountSuspense( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } else { - if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { - n2.suspense = n1.suspense; - n2.suspense.vnode = n2; - n2.el = n1.el; - return; - } - patchSuspense( - n1, - n2, - container, - anchor, - parentComponent, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } - }, - hydrate: hydrateSuspense, - normalize: normalizeSuspenseChildren -}; -const Suspense = SuspenseImpl ; -function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); - } -} -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - const { - p: patch, - o: { createElement } - } = rendererInternals; - const hiddenContainer = createElement("div"); - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - container, - hiddenContainer, - anchor, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - patch( - null, - suspense.pendingBranch = vnode.ssContent, - hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds - ); - if (suspense.deps > 0) { - triggerEvent(vnode, "onPending"); - triggerEvent(vnode, "onFallback"); - patch( - null, - vnode.ssFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds - ); - setActiveBranch(suspense, vnode.ssFallback); - } else { - suspense.resolve(false, true); - } -} -function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = n2.suspense = n1.suspense; - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - patch( - pendingBranch, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else if (isInFallback) { - if (!isHydrating) { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } - } else { - suspense.pendingId = suspenseId++; - if (isHydrating) { - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } else { - unmount(pendingBranch, parentComponent, suspense); - } - suspense.deps = 0; - suspense.effects.length = 0; - suspense.hiddenContainer = createElement("div"); - if (isInFallback) { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - suspense.resolve(true); - } else { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newBranch); - } else { - triggerEvent(n2, "onPending"); - suspense.pendingBranch = newBranch; - if (newBranch.shapeFlag & 512) { - suspense.pendingId = newBranch.component.suspenseId; - } else { - suspense.pendingId = suspenseId++; - } - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } else if (timeout === 0) { - suspense.fallback(newFallback); - } - } - } - } -} -let hasWarned = false; -function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - if (!!(process.env.NODE_ENV !== "production") && true && !hasWarned) { - hasWarned = true; - console[console.info ? "info" : "log"]( - `<Suspense> is an experimental feature and its API will likely change.` - ); - } - const { - p: patch, - m: move, - um: unmount, - n: next, - o: { parentNode, remove } - } = rendererInternals; - let parentSuspenseId; - const isSuspensible = isVNodeSuspensible(vnode); - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch) { - parentSuspenseId = parentSuspense.pendingId; - parentSuspense.deps++; - } - } - const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; - if (!!(process.env.NODE_ENV !== "production")) { - assertNumber(timeout, `Suspense timeout`); - } - const initialAnchor = anchor; - const suspense = { - vnode, - parent: parentSuspense, - parentComponent, - namespace, - container, - hiddenContainer, - deps: 0, - pendingId: suspenseId++, - timeout: typeof timeout === "number" ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: !isHydrating, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false, sync = false) { - if (!!(process.env.NODE_ENV !== "production")) { - if (!resume && !suspense.pendingBranch) { - throw new Error( - `suspense.resolve() is called without a pending branch.` - ); - } - if (suspense.isUnmounted) { - throw new Error( - `suspense.resolve() is called on an already unmounted suspense boundary.` - ); - } - } - const { - vnode: vnode2, - activeBranch, - pendingBranch, - pendingId, - effects, - parentComponent: parentComponent2, - container: container2 - } = suspense; - let delayEnter = false; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } else if (!resume) { - delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move( - pendingBranch, - container2, - anchor === initialAnchor ? next(activeBranch) : anchor, - 0 - ); - queuePostFlushCb(effects); - } - }; - } - if (activeBranch) { - if (parentNode(activeBranch.el) === container2) { - anchor = next(activeBranch); - } - unmount(activeBranch, parentComponent2, suspense, true); - } - if (!delayEnter) { - move(pendingBranch, container2, anchor, 0); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - if (!hasUnresolvedAncestor && !delayEnter) { - queuePostFlushCb(effects); - } - suspense.effects = []; - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0 && !sync) { - parentSuspense.resolve(); - } - } - } - triggerEvent(vnode2, "onResolve"); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; - triggerEvent(vnode2, "onFallback"); - const anchor2 = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - patch( - null, - fallbackVNode, - container2, - anchor2, - parentComponent2, - null, - // fallback tree will not have suspense context - namespace2, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - unmount( - activeBranch, - parentComponent2, - null, - // no suspense so unmount hooks fire now - true - // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container2, anchor2, type) { - suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); - suspense.container = container2; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect, optimized2) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance.asyncDep.catch((err) => { - handleError(err, instance, 0); - }).then((asyncSetupResult) => { - if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { - return; - } - instance.asyncResolved = true; - const { vnode: vnode2 } = instance; - if (!!(process.env.NODE_ENV !== "production")) { - pushWarningContext(vnode2); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - vnode2.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect( - instance, - vnode2, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), - suspense, - namespace, - optimized2 - ); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode2.el); - if (!!(process.env.NODE_ENV !== "production")) { - popWarningContext(); - } - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense2, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount( - suspense.activeBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - if (suspense.pendingBranch) { - unmount( - suspense.pendingBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - } - }; - return suspense; -} -function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - node.parentNode, - // eslint-disable-next-line no-restricted-globals - document.createElement("div"), - null, - namespace, - slotScopeIds, - optimized, - rendererInternals, - true - ); - const result = hydrateNode( - node, - suspense.pendingBranch = vnode.ssContent, - parentComponent, - suspense, - slotScopeIds, - optimized - ); - if (suspense.deps === 0) { - suspense.resolve(false, true); - } - return result; -} -function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32; - vnode.ssContent = normalizeSuspenseSlot( - isSlotChildren ? children.default : children - ); - vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); -} -function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } - } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!!(process.env.NODE_ENV !== "production") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { - warn$1(`<Suspense> slots expect a single root node.`); - } - s = singleChild; - } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter((c) => c !== s); - } - return s; -} -function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } else { - suspense.effects.push(fn); - } - } else { - queuePostFlushCb(fn); - } -} -function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - let el = branch.el; - while (!el && branch.component) { - branch = branch.component.subTree; - el = branch.el; - } - vnode.el = el; - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } -} -function isVNodeSuspensible(vnode) { - const suspensible = vnode.props && vnode.props.suspensible; - return suspensible != null && suspensible !== false; -} - -const Fragment = Symbol.for("v-fgt"); -const Text = Symbol.for("v-txt"); -const Comment = Symbol.for("v-cmt"); -const Static = Symbol.for("v-stc"); -const blockStack = []; -let currentBlock = null; -function openBlock(disableTracking = false) { - blockStack.push(currentBlock = disableTracking ? null : []); -} -function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; -} -let isBlockTreeEnabled = 1; -function setBlockTracking(value, inVOnce = false) { - isBlockTreeEnabled += value; - if (value < 0 && currentBlock && inVOnce) { - currentBlock.hasOnce = true; - } -} -function setupBlock(vnode) { - vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; - closeBlock(); - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; -} -function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock( - createBaseVNode( - type, - props, - children, - patchFlag, - dynamicProps, - shapeFlag, - true - ) - ); -} -function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock( - createVNode( - type, - props, - children, - patchFlag, - dynamicProps, - true - ) - ); -} -function isVNode(value) { - return value ? value.__v_isVNode === true : false; -} -function isSameVNodeType(n1, n2) { - if (!!(process.env.NODE_ENV !== "production") && n2.shapeFlag & 6 && n1.component) { - const dirtyInstances = hmrDirtyComponents.get(n2.type); - if (dirtyInstances && dirtyInstances.has(n1.component)) { - n1.shapeFlag &= ~256; - n2.shapeFlag &= ~512; - return false; - } - } - return n1.type === n2.type && n1.key === n2.key; -} -let vnodeArgsTransformer; -function transformVNodeArgs(transformer) { - vnodeArgsTransformer = transformer; -} -const createVNodeWithArgsTransform = (...args) => { - return _createVNode( - ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args - ); -}; -const normalizeKey = ({ key }) => key != null ? key : null; -const normalizeRef = ({ - ref, - ref_key, - ref_for -}) => { - if (typeof ref === "number") { - ref = "" + ref; - } - return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; -}; -function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetStart: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null, - ctx: currentRenderingInstance - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - if (shapeFlag & 128) { - type.normalize(vnode); - } - } else if (children) { - vnode.shapeFlag |= isString(children) ? 8 : 16; - } - if (!!(process.env.NODE_ENV !== "production") && vnode.key !== vnode.key) { - warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); - } - if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself - !isBlockNode && // has current parent block - currentBlock && // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32) { - currentBlock.push(vnode); - } - return vnode; -} -const createVNode = !!(process.env.NODE_ENV !== "production") ? createVNodeWithArgsTransform : _createVNode; -function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - if (!!(process.env.NODE_ENV !== "production") && !type) { - warn$1(`Invalid vnode type when creating vnode: ${type}.`); - } - type = Comment; - } - if (isVNode(type)) { - const cloned = cloneVNode( - type, - props, - true - /* mergeRef: true */ - ); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } else { - currentBlock.push(cloned); - } - } - cloned.patchFlag = -2; - return cloned; - } - if (isClassComponent(type)) { - type = type.__vccOpts; - } - if (props) { - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (isObject(style)) { - if (isProxy(style) && !isArray(style)) { - style = extend({}, style); - } - props.style = normalizeStyle(style); - } - } - const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; - if (!!(process.env.NODE_ENV !== "production") && shapeFlag & 4 && isProxy(type)) { - type = toRaw(type); - warn$1( - `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, - ` -Component that was made reactive: `, - type - ); - } - return createBaseVNode( - type, - props, - children, - patchFlag, - dynamicProps, - shapeFlag, - isBlockNode, - true - ); -} -function guardReactiveProps(props) { - if (!props) return null; - return isProxy(props) || isInternalObject(props) ? extend({}, props) : props; -} -function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { - const { props, ref, patchFlag, children, transition } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref ? ( - // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) - ) : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: !!(process.env.NODE_ENV !== "production") && patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, - target: vnode.target, - targetStart: vnode.targetStart, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor, - ctx: vnode.ctx, - ce: vnode.ce - }; - if (transition && cloneTransition) { - setTransitionHooks( - cloned, - transition.clone(cloned) - ); - } - return cloned; -} -function deepCloneVNode(vnode) { - const cloned = cloneVNode(vnode); - if (isArray(vnode.children)) { - cloned.children = vnode.children.map(deepCloneVNode); - } - return cloned; -} -function createTextVNode(text = " ", flag = 0) { - return createVNode(Text, null, text, flag); -} -function createStaticVNode(content, numberOfNodes) { - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; -} -function createCommentVNode(text = "", asBlock = false) { - return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); -} -function normalizeVNode(child) { - if (child == null || typeof child === "boolean") { - return createVNode(Comment); - } else if (isArray(child)) { - return createVNode( - Fragment, - null, - // #3666, avoid reference pollution when reusing vnode - child.slice() - ); - } else if (isVNode(child)) { - return cloneIfMounted(child); - } else { - return createVNode(Text, null, String(child)); - } -} -function cloneIfMounted(child) { - return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); -} -function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } else if (isArray(children)) { - type = 16; - } else if (typeof children === "object") { - if (shapeFlag & (1 | 64)) { - const slot = children.default; - if (slot) { - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } else { - type = 32; - const slotFlag = children._; - if (!slotFlag && !isInternalObject(children)) { - children._ctx = currentRenderingInstance; - } else if (slotFlag === 3 && currentRenderingInstance) { - if (currentRenderingInstance.slots._ === 1) { - children._ = 1; - } else { - children._ = 2; - vnode.patchFlag |= 1024; - } - } - } - } else if (isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32; - } else { - children = String(children); - if (shapeFlag & 64) { - type = 16; - children = [createTextVNode(children)]; - } else { - type = 8; - } - } - vnode.children = children; - vnode.shapeFlag |= type; -} -function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === "class") { - if (ret.class !== toMerge.class) { - ret.class = normalizeClass([ret.class, toMerge.class]); - } - } else if (key === "style") { - ret.style = normalizeStyle([ret.style, toMerge.style]); - } else if (isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { - ret[key] = existing ? [].concat(existing, incoming) : incoming; - } - } else if (key !== "") { - ret[key] = toMerge[key]; - } - } - } - return ret; -} -function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7, [ - vnode, - prevVNode - ]); -} - -const emptyAppContext = createAppContext(); -let uid = 0; -function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid++, - vnode, - type, - parent, - appContext, - root: null, - // to be immediately set - next: null, - subTree: null, - // will be set synchronously right after creation - effect: null, - update: null, - // will be set synchronously right after creation - job: null, - scope: new EffectScope( - true - /* detached */ - ), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - ids: parent ? parent.ids : ["", 0, 0], - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - // to be set immediately - emitted: null, - // props default value - propsDefaults: EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: EMPTY_OBJ, - data: EMPTY_OBJ, - props: EMPTY_OBJ, - attrs: EMPTY_OBJ, - slots: EMPTY_OBJ, - refs: EMPTY_OBJ, - setupState: EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - if (!!(process.env.NODE_ENV !== "production")) { - instance.ctx = createDevRenderContext(instance); - } else { - instance.ctx = { _: instance }; - } - instance.root = parent ? parent.root : instance; - instance.emit = emit.bind(null, instance); - if (vnode.ce) { - vnode.ce(instance); - } - return instance; -} -let currentInstance = null; -const getCurrentInstance = () => currentInstance || currentRenderingInstance; -let internalSetCurrentInstance; -let setInSSRSetupState; -{ - const g = getGlobalThis(); - const registerGlobalSetter = (key, setter) => { - let setters; - if (!(setters = g[key])) setters = g[key] = []; - setters.push(setter); - return (v) => { - if (setters.length > 1) setters.forEach((set) => set(v)); - else setters[0](v); - }; - }; - internalSetCurrentInstance = registerGlobalSetter( - `__VUE_INSTANCE_SETTERS__`, - (v) => currentInstance = v - ); - setInSSRSetupState = registerGlobalSetter( - `__VUE_SSR_SETTERS__`, - (v) => isInSSRComponentSetup = v - ); -} -const setCurrentInstance = (instance) => { - const prev = currentInstance; - internalSetCurrentInstance(instance); - instance.scope.on(); - return () => { - instance.scope.off(); - internalSetCurrentInstance(prev); - }; -}; -const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - internalSetCurrentInstance(null); -}; -const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); -function validateComponentName(name, { isNativeTag }) { - if (isBuiltInTag(name) || isNativeTag(name)) { - warn$1( - "Do not use built-in or reserved HTML elements as component id: " + name - ); - } -} -function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4; -} -let isInSSRComponentSetup = false; -function setupComponent(instance, isSSR = false, optimized = false) { - isSSR && setInSSRSetupState(isSSR); - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children, optimized); - const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; - isSSR && setInSSRSetupState(false); - return setupResult; -} -function setupStatefulComponent(instance, isSSR) { - var _a; - const Component = instance.type; - if (!!(process.env.NODE_ENV !== "production")) { - if (Component.name) { - validateComponentName(Component.name, instance.appContext.config); - } - if (Component.components) { - const names = Object.keys(Component.components); - for (let i = 0; i < names.length; i++) { - validateComponentName(names[i], instance.appContext.config); - } - } - if (Component.directives) { - const names = Object.keys(Component.directives); - for (let i = 0; i < names.length; i++) { - validateDirectiveName(names[i]); - } - } - if (Component.compilerOptions && isRuntimeOnly()) { - warn$1( - `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` - ); - } - } - instance.accessCache = /* @__PURE__ */ Object.create(null); - instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); - if (!!(process.env.NODE_ENV !== "production")) { - exposePropsOnRenderContext(instance); - } - const { setup } = Component; - if (setup) { - pauseTracking(); - const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; - const reset = setCurrentInstance(instance); - const setupResult = callWithErrorHandling( - setup, - instance, - 0, - [ - !!(process.env.NODE_ENV !== "production") ? shallowReadonly(instance.props) : instance.props, - setupContext - ] - ); - const isAsyncSetup = isPromise(setupResult); - resetTracking(); - reset(); - if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { - markAsyncBoundary(instance); - } - if (isAsyncSetup) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - return setupResult.then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }).catch((e) => { - handleError(e, instance, 0); - }); - } else { - instance.asyncDep = setupResult; - if (!!(process.env.NODE_ENV !== "production") && !instance.suspense) { - const name = (_a = Component.name) != null ? _a : "Anonymous"; - warn$1( - `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` - ); - } - } - } else { - handleSetupResult(instance, setupResult, isSSR); - } - } else { - finishComponentSetup(instance, isSSR); - } -} -function handleSetupResult(instance, setupResult, isSSR) { - if (isFunction(setupResult)) { - if (instance.type.__ssrInlineRender) { - instance.ssrRender = setupResult; - } else { - instance.render = setupResult; - } - } else if (isObject(setupResult)) { - if (!!(process.env.NODE_ENV !== "production") && isVNode(setupResult)) { - warn$1( - `setup() should not return VNodes directly - return a render function instead.` - ); - } - if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { - instance.devtoolsRawSetupState = setupResult; - } - instance.setupState = proxyRefs(setupResult); - if (!!(process.env.NODE_ENV !== "production")) { - exposeSetupStateOnRenderContext(instance); - } - } else if (!!(process.env.NODE_ENV !== "production") && setupResult !== void 0) { - warn$1( - `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` - ); - } - finishComponentSetup(instance, isSSR); -} -let compile; -let installWithProxy; -function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = (i) => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; -} -const isRuntimeOnly = () => !compile; -function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - if (!instance.render) { - if (!isSSR && compile && !Component.render) { - const template = Component.template || __VUE_OPTIONS_API__ && resolveMergedOptions(instance).template; - if (template) { - if (!!(process.env.NODE_ENV !== "production")) { - startMeasure(instance, `compile`); - } - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = extend( - extend( - { - isCustomElement, - delimiters - }, - compilerOptions - ), - componentCompilerOptions - ); - Component.render = compile(template, finalCompilerOptions); - if (!!(process.env.NODE_ENV !== "production")) { - endMeasure(instance, `compile`); - } - } - } - instance.render = Component.render || NOOP; - if (installWithProxy) { - installWithProxy(instance); - } - } - if (__VUE_OPTIONS_API__ && true) { - const reset = setCurrentInstance(instance); - pauseTracking(); - try { - applyOptions(instance); - } finally { - resetTracking(); - reset(); - } - } - if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) { - if (!compile && Component.template) { - warn$1( - `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` ) - ); - } else { - warn$1(`Component is missing template or render function: `, Component); - } - } -} -const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? { - get(target, key) { - markAttrsAccessed(); - track(target, "get", ""); - return target[key]; - }, - set() { - warn$1(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn$1(`setupContext.attrs is readonly.`); - return false; - } -} : { - get(target, key) { - track(target, "get", ""); - return target[key]; - } -}; -function getSlotsProxy(instance) { - return new Proxy(instance.slots, { - get(target, key) { - track(instance, "get", "$slots"); - return target[key]; - } - }); -} -function createSetupContext(instance) { - const expose = (exposed) => { - if (!!(process.env.NODE_ENV !== "production")) { - if (instance.exposed) { - warn$1(`expose() should be called only once per setup().`); - } - if (exposed != null) { - let exposedType = typeof exposed; - if (exposedType === "object") { - if (isArray(exposed)) { - exposedType = "array"; - } else if (isRef(exposed)) { - exposedType = "ref"; - } - } - if (exposedType !== "object") { - warn$1( - `expose() should be passed a plain object, received ${exposedType}.` - ); - } - } - } - instance.exposed = exposed || {}; - }; - if (!!(process.env.NODE_ENV !== "production")) { - let attrsProxy; - let slotsProxy; - return Object.freeze({ - get attrs() { - return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); - }, - get slots() { - return slotsProxy || (slotsProxy = getSlotsProxy(instance)); - }, - get emit() { - return (event, ...args) => instance.emit(event, ...args); - }, - expose - }); - } else { - return { - attrs: new Proxy(instance.attrs, attrsProxyHandlers), - slots: instance.slots, - emit: instance.emit, - expose - }; - } -} -function getComponentPublicInstance(instance) { - if (instance.exposed) { - return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - }, - has(target, key) { - return key in target || key in publicPropertiesMap; - } - })); - } else { - return instance.proxy; - } -} -const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); -function getComponentName(Component, includeInferred = true) { - return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; -} -function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; - } - } - if (!name && instance && instance.parent) { - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = inferFromRegistry( - instance.components || instance.parent.type.components - ) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; -} -function isClassComponent(value) { - return isFunction(value) && "__vccOpts" in value; -} - -const computed = (getterOrOptions, debugOptions) => { - const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); - if (!!(process.env.NODE_ENV !== "production")) { - const i = getCurrentInstance(); - if (i && i.appContext.config.warnRecursiveComputed) { - c._warnRecursive = true; - } - } - return c; -}; - -function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - return createVNode(type, propsOrChildren); - } else { - return createVNode(type, null, propsOrChildren); - } - } else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } -} - -function initCustomFormatter() { - if (!!!(process.env.NODE_ENV !== "production") || typeof window === "undefined") { - return; - } - const vueStyle = { style: "color:#3ba776" }; - const numberStyle = { style: "color:#1677ff" }; - const stringStyle = { style: "color:#f5222d" }; - const keywordStyle = { style: "color:#eb2f96" }; - const formatter = { - __vue_custom_formatter: true, - header(obj) { - if (!isObject(obj)) { - return null; - } - if (obj.__isVue) { - return ["div", vueStyle, `VueInstance`]; - } else if (isRef(obj)) { - return [ - "div", - {}, - ["span", vueStyle, genRefFlag(obj)], - "<", - // avoid debugger accessing value affecting behavior - formatValue("_value" in obj ? obj._value : obj), - `>` - ]; - } else if (isReactive(obj)) { - return [ - "div", - {}, - ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], - "<", - formatValue(obj), - `>${isReadonly(obj) ? ` (readonly)` : ``}` - ]; - } else if (isReadonly(obj)) { - return [ - "div", - {}, - ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], - "<", - formatValue(obj), - ">" - ]; - } - return null; - }, - hasBody(obj) { - return obj && obj.__isVue; - }, - body(obj) { - if (obj && obj.__isVue) { - return [ - "div", - {}, - ...formatInstance(obj.$) - ]; - } - } - }; - function formatInstance(instance) { - const blocks = []; - if (instance.type.props && instance.props) { - blocks.push(createInstanceBlock("props", toRaw(instance.props))); - } - if (instance.setupState !== EMPTY_OBJ) { - blocks.push(createInstanceBlock("setup", instance.setupState)); - } - if (instance.data !== EMPTY_OBJ) { - blocks.push(createInstanceBlock("data", toRaw(instance.data))); - } - const computed = extractKeys(instance, "computed"); - if (computed) { - blocks.push(createInstanceBlock("computed", computed)); - } - const injected = extractKeys(instance, "inject"); - if (injected) { - blocks.push(createInstanceBlock("injected", injected)); - } - blocks.push([ - "div", - {}, - [ - "span", - { - style: keywordStyle.style + ";opacity:0.66" - }, - "$ (internal): " - ], - ["object", { object: instance }] - ]); - return blocks; - } - function createInstanceBlock(type, target) { - target = extend({}, target); - if (!Object.keys(target).length) { - return ["span", {}]; - } - return [ - "div", - { style: "line-height:1.25em;margin-bottom:0.6em" }, - [ - "div", - { - style: "color:#476582" - }, - type - ], - [ - "div", - { - style: "padding-left:1.25em" - }, - ...Object.keys(target).map((key) => { - return [ - "div", - {}, - ["span", keywordStyle, key + ": "], - formatValue(target[key], false) - ]; - }) - ] - ]; - } - function formatValue(v, asRaw = true) { - if (typeof v === "number") { - return ["span", numberStyle, v]; - } else if (typeof v === "string") { - return ["span", stringStyle, JSON.stringify(v)]; - } else if (typeof v === "boolean") { - return ["span", keywordStyle, v]; - } else if (isObject(v)) { - return ["object", { object: asRaw ? toRaw(v) : v }]; - } else { - return ["span", stringStyle, String(v)]; - } - } - function extractKeys(instance, type) { - const Comp = instance.type; - if (isFunction(Comp)) { - return; - } - const extracted = {}; - for (const key in instance.ctx) { - if (isKeyOfType(Comp, key, type)) { - extracted[key] = instance.ctx[key]; - } - } - return extracted; - } - function isKeyOfType(Comp, key, type) { - const opts = Comp[type]; - if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { - return true; - } - if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { - return true; - } - if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { - return true; - } - } - function genRefFlag(v) { - if (isShallow(v)) { - return `ShallowRef`; - } - if (v.effect) { - return `ComputedRef`; - } - return `Ref`; - } - if (window.devtoolsFormatters) { - window.devtoolsFormatters.push(formatter); - } else { - window.devtoolsFormatters = [formatter]; - } -} - -function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - ret.memo = memo.slice(); - ret.cacheIndex = index; - return cache[index] = ret; -} -function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; - } - for (let i = 0; i < prev.length; i++) { - if (hasChanged(prev[i], memo[i])) { - return false; - } - } - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; -} - -const version = "3.5.13"; -const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP; -const ErrorTypeStrings = ErrorTypeStrings$1 ; -const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0; -const setDevtoolsHook = !!(process.env.NODE_ENV !== "production") || true ? setDevtoolsHook$1 : NOOP; -const _ssrUtils = { - createComponentInstance, - setupComponent, - renderComponentRoot, - setCurrentRenderingInstance, - isVNode: isVNode, - normalizeVNode, - getComponentPublicInstance, - ensureValidVNode, - pushWarningContext, - popWarningContext -}; -const ssrUtils = _ssrUtils ; -const resolveFilter = null; -const compatUtils = null; -const DeprecationTypes = null; - -export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, Static, Suspense, Teleport, Text, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, inject, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeModels, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, ssrUtils, toHandlers, transformVNodeArgs, useAttrs, useId, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId }; diff --git a/node_modules/@vue/runtime-core/index.js b/node_modules/@vue/runtime-core/index.js deleted file mode 100644 index 50c4882..0000000 --- a/node_modules/@vue/runtime-core/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/runtime-core.cjs.prod.js') -} else { - module.exports = require('./dist/runtime-core.cjs.js') -} diff --git a/node_modules/@vue/runtime-core/package.json b/node_modules/@vue/runtime-core/package.json deleted file mode 100644 index aefa10c..0000000 --- a/node_modules/@vue/runtime-core/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "@vue/runtime-core", - "version": "3.5.13", - "description": "@vue/runtime-core", - "main": "index.js", - "module": "dist/runtime-core.esm-bundler.js", - "types": "dist/runtime-core.d.ts", - "files": [ - "index.js", - "dist" - ], - "exports": { - ".": { - "types": "./dist/runtime-core.d.ts", - "node": { - "production": "./dist/runtime-core.cjs.prod.js", - "development": "./dist/runtime-core.cjs.js", - "default": "./index.js" - }, - "module": "./dist/runtime-core.esm-bundler.js", - "import": "./dist/runtime-core.esm-bundler.js", - "require": "./index.js" - }, - "./*": "./*" - }, - "buildOptions": { - "name": "VueRuntimeCore", - "formats": [ - "esm-bundler", - "cjs" - ] - }, - "sideEffects": false, - "repository": { - "type": "git", - "url": "git+https://github.com/vuejs/core.git", - "directory": "packages/runtime-core" - }, - "keywords": [ - "vue" - ], - "author": "Evan You", - "license": "MIT", - "bugs": { - "url": "https://github.com/vuejs/core/issues" - }, - "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme", - "dependencies": { - "@vue/shared": "3.5.13", - "@vue/reactivity": "3.5.13" - } -} \ No newline at end of file diff --git a/node_modules/@vue/runtime-dom/LICENSE b/node_modules/@vue/runtime-dom/LICENSE deleted file mode 100644 index 15f1f7e..0000000 --- a/node_modules/@vue/runtime-dom/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018-present, Yuxi (Evan) You - -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/node_modules/@vue/runtime-dom/README.md b/node_modules/@vue/runtime-dom/README.md deleted file mode 100644 index 11c373f..0000000 --- a/node_modules/@vue/runtime-dom/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# @vue/runtime-dom - -```js -import { h, createApp } from '@vue/runtime-dom' - -const RootComponent = { - render() { - return h('div', 'hello world') - }, -} - -createApp(RootComponent).mount('#app') -``` diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js deleted file mode 100644 index f18e009..0000000 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js +++ /dev/null @@ -1,1820 +0,0 @@ -/** -* @vue/runtime-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var runtimeCore = require('@vue/runtime-core'); -var shared = require('@vue/shared'); - -let policy = void 0; -const tt = typeof window !== "undefined" && window.trustedTypes; -if (tt) { - try { - policy = /* @__PURE__ */ tt.createPolicy("vue", { - createHTML: (val) => val - }); - } catch (e) { - runtimeCore.warn(`Error creating trusted types policy: ${e}`); - } -} -const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; -const svgNS = "http://www.w3.org/2000/svg"; -const mathmlNS = "http://www.w3.org/1998/Math/MathML"; -const doc = typeof document !== "undefined" ? document : null; -const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); -const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: (child) => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, namespace, is, props) => { - const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); - if (tag === "select" && props && props.multiple != null) { - el.setAttribute("multiple", props.multiple); - } - return el; - }, - createText: (text) => doc.createTextNode(text), - createComment: (text) => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: (node) => node.parentNode, - nextSibling: (node) => node.nextSibling, - querySelector: (selector) => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ""); - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, namespace, start, end) { - const before = anchor ? anchor.previousSibling : parent.lastChild; - if (start && (start === end || start.nextSibling)) { - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) break; - } - } else { - templateContainer.innerHTML = unsafeToTrustedHTML( - namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content - ); - const template = templateContainer.content; - if (namespace === "svg" || namespace === "mathml") { - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; - } -}; - -const TRANSITION = "transition"; -const ANIMATION = "animation"; -const vtcKey = Symbol("_vtc"); -const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String -}; -const TransitionPropsValidators = /* @__PURE__ */ shared.extend( - {}, - runtimeCore.BaseTransitionPropsValidators, - DOMTransitionPropsValidators -); -const decorate$1 = (t) => { - t.displayName = "Transition"; - t.props = TransitionPropsValidators; - return t; -}; -const Transition = /* @__PURE__ */ decorate$1( - (props, { slots }) => runtimeCore.h(runtimeCore.BaseTransition, resolveTransitionProps(props), slots) -); -const callHook = (hook, args = []) => { - if (shared.isArray(hook)) { - hook.forEach((h2) => h2(...args)); - } else if (hook) { - hook(...args); - } -}; -const hasExplicitCallback = (hook) => { - return hook ? shared.isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; -}; -function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; - } - } - if (rawProps.css === false) { - return baseProps; - } - const { - name = "v", - type, - duration, - enterFromClass = `${name}-enter-from`, - enterActiveClass = `${name}-enter-active`, - enterToClass = `${name}-enter-to`, - appearFromClass = enterFromClass, - appearActiveClass = enterActiveClass, - appearToClass = enterToClass, - leaveFromClass = `${name}-leave-from`, - leaveActiveClass = `${name}-leave-active`, - leaveToClass = `${name}-leave-to` - } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { - onBeforeEnter, - onEnter, - onEnterCancelled, - onLeave, - onLeaveCancelled, - onBeforeAppear = onBeforeEnter, - onAppear = onEnter, - onAppearCancelled = onEnterCancelled - } = baseProps; - const finishEnter = (el, isAppear, done, isCancelled) => { - el._enterCancelled = isCancelled; - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); - }; - const finishLeave = (el, done) => { - el._isLeaving = false; - removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return shared.extend(baseProps, { - onBeforeEnter(el) { - callHook(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - if (!el._enterCancelled) { - forceReflow(); - addTransitionClass(el, leaveActiveClass); - } else { - addTransitionClass(el, leaveActiveClass); - forceReflow(); - } - nextFrame(() => { - if (!el._isLeaving) { - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false, void 0, true); - callHook(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true, void 0, true); - callHook(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook(onLeaveCancelled, [el]); - } - }); -} -function normalizeDuration(duration) { - if (duration == null) { - return null; - } else if (shared.isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } else { - const n = NumberOf(duration); - return [n, n]; - } -} -function NumberOf(val) { - const res = shared.toNumber(val); - { - runtimeCore.assertNumber(res, "<transition> explicit duration"); - } - return res; -} -function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); - (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); -} -function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); - const _vtc = el[vtcKey]; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el[vtcKey] = void 0; - } - } -} -function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); -} -let endId = 0; -function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = el._endId = ++endId; - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout != null) { - return setTimeout(resolveIfNotStale, explicitTimeout); - } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); - } - const endEvent = type + "end"; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); -} -function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - const getStyleProperties = (key) => (styles[key] || "").split(", "); - const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); - const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(`${ANIMATION}Delay`); - const animationDurations = getStyleProperties(`${ANIMATION}Duration`); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } - } else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } - } else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; - propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; - } - const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( - getStyleProperties(`${TRANSITION}Property`).toString() - ); - return { - type, - timeout, - propCount, - hasTransform - }; -} -function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); -} -function toMs(s) { - if (s === "auto") return 0; - return Number(s.slice(0, -1).replace(",", ".")) * 1e3; -} -function forceReflow() { - return document.body.offsetHeight; -} - -function patchClass(el, value, isSVG) { - const transitionClasses = el[vtcKey]; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); - } - if (value == null) { - el.removeAttribute("class"); - } else if (isSVG) { - el.setAttribute("class", value); - } else { - el.className = value; - } -} - -const vShowOriginalDisplay = Symbol("_vod"); -const vShowHidden = Symbol("_vsh"); -const vShow = { - beforeMount(el, { value }, { transition }) { - el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); - } -}; -{ - vShow.name = "show"; -} -function setDisplay(el, value) { - el.style.display = value ? el[vShowOriginalDisplay] : "none"; - el[vShowHidden] = !value; -} -function initVShowForSSR() { - vShow.getSSRProps = ({ value }) => { - if (!value) { - return { style: { display: "none" } }; - } - }; -} - -const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); -function useCssVars(getter) { - return; -} - -const displayRE = /(^|;)\s*display\s*:/; -function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = shared.isString(next); - let hasControlledDisplay = false; - if (next && !isCssString) { - if (prev) { - if (!shared.isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ""); - } - } - } else { - for (const prevStyle of prev.split(";")) { - const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); - if (next[key] == null) { - setStyle(style, key, ""); - } - } - } - } - for (const key in next) { - if (key === "display") { - hasControlledDisplay = true; - } - setStyle(style, key, next[key]); - } - } else { - if (isCssString) { - if (prev !== next) { - const cssVarText = style[CSS_VAR_TEXT]; - if (cssVarText) { - next += ";" + cssVarText; - } - style.cssText = next; - hasControlledDisplay = displayRE.test(next); - } - } else if (prev) { - el.removeAttribute("style"); - } - } - if (vShowOriginalDisplay in el) { - el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; - if (el[vShowHidden]) { - style.display = "none"; - } - } -} -const semicolonRE = /[^\\];\s*$/; -const importantRE = /\s*!important$/; -function setStyle(style, name, val) { - if (shared.isArray(val)) { - val.forEach((v) => setStyle(style, name, v)); - } else { - if (val == null) val = ""; - { - if (semicolonRE.test(val)) { - runtimeCore.warn( - `Unexpected semicolon at the end of '${name}' style value: '${val}'` - ); - } - } - if (name.startsWith("--")) { - style.setProperty(name, val); - } else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - style.setProperty( - shared.hyphenate(prefixed), - val.replace(importantRE, ""), - "important" - ); - } else { - style[prefixed] = val; - } - } - } -} -const prefixes = ["Webkit", "Moz", "ms"]; -const prefixCache = {}; -function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = runtimeCore.camelize(rawName); - if (name !== "filter" && name in style) { - return prefixCache[rawName] = name; - } - name = shared.capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return prefixCache[rawName] = prefixed; - } - } - return rawName; -} - -const xlinkNS = "http://www.w3.org/1999/xlink"; -function patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecialBooleanAttr(key)) { - if (isSVG && key.startsWith("xlink:")) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } else { - el.setAttributeNS(xlinkNS, key, value); - } - } else { - if (value == null || isBoolean && !shared.includeBooleanAttr(value)) { - el.removeAttribute(key); - } else { - el.setAttribute( - key, - isBoolean ? "" : shared.isSymbol(value) ? String(value) : value - ); - } - } -} - -function patchDOMProp(el, key, value, parentComponent, attrName) { - if (key === "innerHTML" || key === "textContent") { - if (value != null) { - el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; - } - return; - } - const tag = el.tagName; - if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally - !tag.includes("-")) { - const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; - const newValue = value == null ? ( - // #11647: value should be set as empty string for null and undefined, - // but <input type="checkbox"> should be set as 'on'. - el.type === "checkbox" ? "on" : "" - ) : String(value); - if (oldValue !== newValue || !("_value" in el)) { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - el._value = value; - return; - } - let needRemove = false; - if (value === "" || value == null) { - const type = typeof el[key]; - if (type === "boolean") { - value = shared.includeBooleanAttr(value); - } else if (value == null && type === "string") { - value = ""; - needRemove = true; - } else if (type === "number") { - value = 0; - needRemove = true; - } - } - try { - el[key] = value; - } catch (e) { - if (!needRemove) { - runtimeCore.warn( - `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, - e - ); - } - } - needRemove && el.removeAttribute(attrName || key); -} - -function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); -} -function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); -} -const veiKey = Symbol("_vei"); -function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - const invokers = el[veiKey] || (el[veiKey] = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - existingInvoker.value = sanitizeEventValue(nextValue, rawName) ; - } else { - const [name, options] = parseName(rawName); - if (nextValue) { - const invoker = invokers[rawName] = createInvoker( - sanitizeEventValue(nextValue, rawName) , - instance - ); - addEventListener(el, name, invoker, options); - } else if (existingInvoker) { - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = void 0; - } - } -} -const optionsModifierRE = /(?:Once|Passive|Capture)$/; -function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while (m = name.match(optionsModifierRE)) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - const event = name[2] === ":" ? name.slice(3) : shared.hyphenate(name.slice(2)); - return [event, options]; -} -let cachedNow = 0; -const p = /* @__PURE__ */ Promise.resolve(); -const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); -function createInvoker(initialValue, instance) { - const invoker = (e) => { - if (!e._vts) { - e._vts = Date.now(); - } else if (e._vts <= invoker.attached) { - return; - } - runtimeCore.callWithAsyncErrorHandling( - patchStopImmediatePropagation(e, invoker.value), - instance, - 5, - [e] - ); - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; -} -function sanitizeEventValue(value, propName) { - if (shared.isFunction(value) || shared.isArray(value)) { - return value; - } - runtimeCore.warn( - `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? -Expected function or array of functions, received type ${typeof value}.` - ); - return shared.NOOP; -} -function patchStopImmediatePropagation(e, value) { - if (shared.isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map( - (fn) => (e2) => !e2._stopped && fn && fn(e2) - ); - } else { - return value; - } -} - -const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter -key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; -const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { - const isSVG = namespace === "svg"; - if (key === "class") { - patchClass(el, nextValue, isSVG); - } else if (key === "style") { - patchStyle(el, prevValue, nextValue); - } else if (shared.isOn(key)) { - if (!shared.isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue); - if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { - patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); - } - } else if ( - // #11081 force set props for possible async custom element - el._isVueCE && (/[A-Z]/.test(key) || !shared.isString(nextValue)) - ) { - patchDOMProp(el, shared.camelize(key), nextValue, parentComponent, key); - } else { - if (key === "true-value") { - el._trueValue = nextValue; - } else if (key === "false-value") { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } -}; -function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - if (key === "innerHTML" || key === "textContent") { - return true; - } - if (key in el && isNativeOn(key) && shared.isFunction(value)) { - return true; - } - return false; - } - if (key === "spellcheck" || key === "draggable" || key === "translate") { - return false; - } - if (key === "form") { - return false; - } - if (key === "list" && el.tagName === "INPUT") { - return false; - } - if (key === "type" && el.tagName === "TEXTAREA") { - return false; - } - if (key === "width" || key === "height") { - const tag = el.tagName; - if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { - return false; - } - } - if (isNativeOn(key) && shared.isString(value)) { - return false; - } - return key in el; -} - -const REMOVAL = {}; -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineCustomElement(options, extraOptions, _createApp) { - const Comp = runtimeCore.defineComponent(options, extraOptions); - if (shared.isPlainObject(Comp)) shared.extend(Comp, extraOptions); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, _createApp); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; -} -/*! #__NO_SIDE_EFFECTS__ */ -const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { - return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); -}; -const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { -}; -class VueElement extends BaseClass { - constructor(_def, _props = {}, _createApp = createApp) { - super(); - this._def = _def; - this._props = _props; - this._createApp = _createApp; - this._isVueCE = true; - /** - * @internal - */ - this._instance = null; - /** - * @internal - */ - this._app = null; - /** - * @internal - */ - this._nonce = this._def.nonce; - this._connected = false; - this._resolved = false; - this._numberProps = null; - this._styleChildren = /* @__PURE__ */ new WeakSet(); - this._ob = null; - if (this.shadowRoot && _createApp !== createApp) { - this._root = this.shadowRoot; - } else { - if (this.shadowRoot) { - runtimeCore.warn( - `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` - ); - } - if (_def.shadowRoot !== false) { - this.attachShadow({ mode: "open" }); - this._root = this.shadowRoot; - } else { - this._root = this; - } - } - if (!this._def.__asyncLoader) { - this._resolveProps(this._def); - } - } - connectedCallback() { - if (!this.isConnected) return; - if (!this.shadowRoot) { - this._parseSlots(); - } - this._connected = true; - let parent = this; - while (parent = parent && (parent.parentNode || parent.host)) { - if (parent instanceof VueElement) { - this._parent = parent; - break; - } - } - if (!this._instance) { - if (this._resolved) { - this._setParent(); - this._update(); - } else { - if (parent && parent._pendingResolve) { - this._pendingResolve = parent._pendingResolve.then(() => { - this._pendingResolve = void 0; - this._resolveDef(); - }); - } else { - this._resolveDef(); - } - } - } - } - _setParent(parent = this._parent) { - if (parent) { - this._instance.parent = parent._instance; - this._instance.provides = parent._instance.provides; - } - } - disconnectedCallback() { - this._connected = false; - runtimeCore.nextTick(() => { - if (!this._connected) { - if (this._ob) { - this._ob.disconnect(); - this._ob = null; - } - this._app && this._app.unmount(); - if (this._instance) this._instance.ce = void 0; - this._app = this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._pendingResolve) { - return; - } - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - this._ob = new MutationObserver((mutations) => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }); - this._ob.observe(this, { attributes: true }); - const resolve = (def, isAsync = false) => { - this._resolved = true; - this._pendingResolve = void 0; - const { props, styles } = def; - let numberProps; - if (props && !shared.isArray(props)) { - for (const key in props) { - const opt = props[key]; - if (opt === Number || opt && opt.type === Number) { - if (key in this._props) { - this._props[key] = shared.toNumber(this._props[key]); - } - (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[shared.camelize(key)] = true; - } - } - } - this._numberProps = numberProps; - if (isAsync) { - this._resolveProps(def); - } - if (this.shadowRoot) { - this._applyStyles(styles); - } else if (styles) { - runtimeCore.warn( - "Custom element style injection is not supported when using shadowRoot: false" - ); - } - this._mount(def); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - this._pendingResolve = asyncDef().then( - (def) => resolve(this._def = def, true) - ); - } else { - resolve(this._def); - } - } - _mount(def) { - if (!def.name) { - def.name = "VueElement"; - } - this._app = this._createApp(def); - if (def.configureApp) { - def.configureApp(this._app); - } - this._app._ceVNode = this._createVNode(); - this._app.mount(this._root); - const exposed = this._instance && this._instance.exposed; - if (!exposed) return; - for (const key in exposed) { - if (!shared.hasOwn(this, key)) { - Object.defineProperty(this, key, { - // unwrap ref to be consistent with public instance behavior - get: () => runtimeCore.unref(exposed[key]) - }); - } else { - runtimeCore.warn(`Exposed property "${key}" already exists on custom element.`); - } - } - } - _resolveProps(def) { - const { props } = def; - const declaredPropKeys = shared.isArray(props) ? props : Object.keys(props || {}); - for (const key of Object.keys(this)) { - if (key[0] !== "_" && declaredPropKeys.includes(key)) { - this._setProp(key, this[key]); - } - } - for (const key of declaredPropKeys.map(shared.camelize)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val, true, true); - } - }); - } - } - _setAttr(key) { - if (key.startsWith("data-v-")) return; - const has = this.hasAttribute(key); - let value = has ? this.getAttribute(key) : REMOVAL; - const camelKey = shared.camelize(key); - if (has && this._numberProps && this._numberProps[camelKey]) { - value = shared.toNumber(value); - } - this._setProp(camelKey, value, false, true); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = false) { - if (val !== this._props[key]) { - if (val === REMOVAL) { - delete this._props[key]; - } else { - this._props[key] = val; - if (key === "key" && this._app) { - this._app._ceVNode.key = val; - } - } - if (shouldUpdate && this._instance) { - this._update(); - } - if (shouldReflect) { - const ob = this._ob; - ob && ob.disconnect(); - if (val === true) { - this.setAttribute(shared.hyphenate(key), ""); - } else if (typeof val === "string" || typeof val === "number") { - this.setAttribute(shared.hyphenate(key), val + ""); - } else if (!val) { - this.removeAttribute(shared.hyphenate(key)); - } - ob && ob.observe(this, { attributes: true }); - } - } - } - _update() { - render(this._createVNode(), this._root); - } - _createVNode() { - const baseProps = {}; - if (!this.shadowRoot) { - baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); - } - const vnode = runtimeCore.createVNode(this._def, shared.extend(baseProps, this._props)); - if (!this._instance) { - vnode.ce = (instance) => { - this._instance = instance; - instance.ce = this; - instance.isCE = true; - { - instance.ceReload = (newStyles) => { - if (this._styles) { - this._styles.forEach((s) => this._root.removeChild(s)); - this._styles.length = 0; - } - this._applyStyles(newStyles); - this._instance = null; - this._update(); - }; - } - const dispatch = (event, args) => { - this.dispatchEvent( - new CustomEvent( - event, - shared.isPlainObject(args[0]) ? shared.extend({ detail: args }, args[0]) : { detail: args } - ) - ); - }; - instance.emit = (event, ...args) => { - dispatch(event, args); - if (shared.hyphenate(event) !== event) { - dispatch(shared.hyphenate(event), args); - } - }; - this._setParent(); - }; - } - return vnode; - } - _applyStyles(styles, owner) { - if (!styles) return; - if (owner) { - if (owner === this._def || this._styleChildren.has(owner)) { - return; - } - this._styleChildren.add(owner); - } - const nonce = this._nonce; - for (let i = styles.length - 1; i >= 0; i--) { - const s = document.createElement("style"); - if (nonce) s.setAttribute("nonce", nonce); - s.textContent = styles[i]; - this.shadowRoot.prepend(s); - { - if (owner) { - if (owner.__hmrId) { - if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map(); - let entry = this._childStyles.get(owner.__hmrId); - if (!entry) { - this._childStyles.set(owner.__hmrId, entry = []); - } - entry.push(s); - } - } else { - (this._styles || (this._styles = [])).push(s); - } - } - } - } - /** - * Only called when shadowRoot is false - */ - _parseSlots() { - const slots = this._slots = {}; - let n; - while (n = this.firstChild) { - const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; - (slots[slotName] || (slots[slotName] = [])).push(n); - this.removeChild(n); - } - } - /** - * Only called when shadowRoot is false - */ - _renderSlots() { - const outlets = (this._teleportTarget || this).querySelectorAll("slot"); - const scopeId = this._instance.type.__scopeId; - for (let i = 0; i < outlets.length; i++) { - const o = outlets[i]; - const slotName = o.getAttribute("name") || "default"; - const content = this._slots[slotName]; - const parent = o.parentNode; - if (content) { - for (const n of content) { - if (scopeId && n.nodeType === 1) { - const id = scopeId + "-s"; - const walker = document.createTreeWalker(n, 1); - n.setAttribute(id, ""); - let child; - while (child = walker.nextNode()) { - child.setAttribute(id, ""); - } - } - parent.insertBefore(n, o); - } - } else { - while (o.firstChild) parent.insertBefore(o.firstChild, o); - } - parent.removeChild(o); - } - } - /** - * @internal - */ - _injectChildStyle(comp) { - this._applyStyles(comp.styles, comp); - } - /** - * @internal - */ - _removeChildStyle(comp) { - { - this._styleChildren.delete(comp); - if (this._childStyles && comp.__hmrId) { - const oldStyles = this._childStyles.get(comp.__hmrId); - if (oldStyles) { - oldStyles.forEach((s) => this._root.removeChild(s)); - oldStyles.length = 0; - } - } - } - } -} -function useHost(caller) { - const instance = runtimeCore.getCurrentInstance(); - const el = instance && instance.ce; - if (el) { - return el; - } else { - if (!instance) { - runtimeCore.warn( - `${caller || "useHost"} called without an active component instance.` - ); - } else { - runtimeCore.warn( - `${caller || "useHost"} can only be used in components defined via defineCustomElement.` - ); - } - } - return null; -} -function useShadowRoot() { - const el = useHost("useShadowRoot") ; - return el && el.shadowRoot; -} - -function useCssModule(name = "$style") { - { - const instance = runtimeCore.getCurrentInstance(); - if (!instance) { - runtimeCore.warn(`useCssModule must be called inside setup()`); - return shared.EMPTY_OBJ; - } - const modules = instance.type.__cssModules; - if (!modules) { - runtimeCore.warn(`Current instance does not have CSS modules injected.`); - return shared.EMPTY_OBJ; - } - const mod = modules[name]; - if (!mod) { - runtimeCore.warn(`Current instance does not have CSS module named "${name}".`); - return shared.EMPTY_OBJ; - } - return mod; - } -} - -const positionMap = /* @__PURE__ */ new WeakMap(); -const newPositionMap = /* @__PURE__ */ new WeakMap(); -const moveCbKey = Symbol("_moveCb"); -const enterCbKey = Symbol("_enterCb"); -const decorate = (t) => { - delete t.props.mode; - return t; -}; -const TransitionGroupImpl = /* @__PURE__ */ decorate({ - name: "TransitionGroup", - props: /* @__PURE__ */ shared.extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = runtimeCore.getCurrentInstance(); - const state = runtimeCore.useTransitionState(); - let prevChildren; - let children; - runtimeCore.onUpdated(() => { - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || "v"}-move`; - if (!hasCSSTransform( - prevChildren[0].el, - instance.vnode.el, - moveClass - )) { - return; - } - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - forceReflow(); - movedChildren.forEach((c) => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ""; - const cb = el[moveCbKey] = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener("transitionend", cb); - el[moveCbKey] = null; - removeTransitionClass(el, moveClass); - } - }; - el.addEventListener("transitionend", cb); - }); - }); - return () => { - const rawProps = runtimeCore.toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || runtimeCore.Fragment; - prevChildren = []; - if (children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.el && child.el instanceof Element) { - prevChildren.push(child); - runtimeCore.setTransitionHooks( - child, - runtimeCore.resolveTransitionHooks( - child, - cssTransitionProps, - state, - instance - ) - ); - positionMap.set( - child, - child.el.getBoundingClientRect() - ); - } - } - } - children = slots.default ? runtimeCore.getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - runtimeCore.setTransitionHooks( - child, - runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance) - ); - } else if (child.type !== runtimeCore.Text) { - runtimeCore.warn(`<TransitionGroup> children must be keyed.`); - } - } - return runtimeCore.createVNode(tag, null, children); - }; - } -}); -const TransitionGroup = TransitionGroupImpl; -function callPendingCbs(c) { - const el = c.el; - if (el[moveCbKey]) { - el[moveCbKey](); - } - if (el[enterCbKey]) { - el[enterCbKey](); - } -} -function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); -} -function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = "0s"; - return c; - } -} -function hasCSSTransform(el, root, moveClass) { - const clone = el.cloneNode(); - const _vtc = el[vtcKey]; - if (_vtc) { - _vtc.forEach((cls) => { - cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); - clone.style.display = "none"; - const container = root.nodeType === 1 ? root : root.parentNode; - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; -} - -const getModelAssigner = (vnode) => { - const fn = vnode.props["onUpdate:modelValue"] || false; - return shared.isArray(fn) ? (value) => shared.invokeArrayFns(fn, value) : fn; -}; -function onCompositionStart(e) { - e.target.composing = true; -} -function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event("input")); - } -} -const assignKey = Symbol("_assign"); -const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el[assignKey] = getModelAssigner(vnode); - const castToNumber = number || vnode.props && vnode.props.type === "number"; - addEventListener(el, lazy ? "change" : "input", (e) => { - if (e.target.composing) return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = shared.looseToNumber(domValue); - } - el[assignKey](domValue); - }); - if (trim) { - addEventListener(el, "change", () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, "compositionstart", onCompositionStart); - addEventListener(el, "compositionend", onCompositionEnd); - addEventListener(el, "change", onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? "" : value; - }, - beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { - el[assignKey] = getModelAssigner(vnode); - if (el.composing) return; - const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? shared.looseToNumber(el.value) : el.value; - const newValue = value == null ? "" : value; - if (elValue === newValue) { - return; - } - if (document.activeElement === el && el.type !== "range") { - if (lazy && value === oldValue) { - return; - } - if (trim && el.value.trim() === newValue) { - return; - } - } - el.value = newValue; - } -}; -const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el[assignKey] = getModelAssigner(vnode); - addEventListener(el, "change", () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el[assignKey]; - if (shared.isArray(modelValue)) { - const index = shared.looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } else if (shared.isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } else { - cloned.delete(elementValue); - } - assign(cloned); - } else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el[assignKey] = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } -}; -function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - let checked; - if (shared.isArray(value)) { - checked = shared.looseIndexOf(value, vnode.props.value) > -1; - } else if (shared.isSet(value)) { - checked = value.has(vnode.props.value); - } else { - if (value === oldValue) return; - checked = shared.looseEqual(value, getCheckboxValue(el, true)); - } - if (el.checked !== checked) { - el.checked = checked; - } -} -const vModelRadio = { - created(el, { value }, vnode) { - el.checked = shared.looseEqual(value, vnode.props.value); - el[assignKey] = getModelAssigner(vnode); - addEventListener(el, "change", () => { - el[assignKey](getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el[assignKey] = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = shared.looseEqual(value, vnode.props.value); - } - } -}; -const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = shared.isSet(value); - addEventListener(el, "change", () => { - const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( - (o) => number ? shared.looseToNumber(getValue(o)) : getValue(o) - ); - el[assignKey]( - el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] - ); - el._assigning = true; - runtimeCore.nextTick(() => { - el._assigning = false; - }); - }); - el[assignKey] = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el[assignKey] = getModelAssigner(vnode); - }, - updated(el, { value }) { - if (!el._assigning) { - setSelected(el, value); - } - } -}; -function setSelected(el, value) { - const isMultiple = el.multiple; - const isArrayValue = shared.isArray(value); - if (isMultiple && !isArrayValue && !shared.isSet(value)) { - runtimeCore.warn( - `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` - ); - return; - } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (isArrayValue) { - const optionType = typeof optionValue; - if (optionType === "string" || optionType === "number") { - option.selected = value.some((v) => String(v) === String(optionValue)); - } else { - option.selected = shared.looseIndexOf(value, optionValue) > -1; - } - } else { - option.selected = value.has(optionValue); - } - } else if (shared.looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) el.selectedIndex = i; - return; - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } -} -function getValue(el) { - return "_value" in el ? el._value : el.value; -} -function getCheckboxValue(el, checked) { - const key = checked ? "_trueValue" : "_falseValue"; - return key in el ? el[key] : checked; -} -const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, "created"); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, "mounted"); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, "updated"); - } -}; -function resolveDynamicModel(tagName, type) { - switch (tagName) { - case "SELECT": - return vModelSelect; - case "TEXTAREA": - return vModelText; - default: - switch (type) { - case "checkbox": - return vModelCheckbox; - case "radio": - return vModelRadio; - default: - return vModelText; - } - } -} -function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel( - el.tagName, - vnode.props && vnode.props.type - ); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); -} -function initVModelForSSR() { - vModelText.getSSRProps = ({ value }) => ({ value }); - vModelRadio.getSSRProps = ({ value }, vnode) => { - if (vnode.props && shared.looseEqual(vnode.props.value, value)) { - return { checked: true }; - } - }; - vModelCheckbox.getSSRProps = ({ value }, vnode) => { - if (shared.isArray(value)) { - if (vnode.props && shared.looseIndexOf(value, vnode.props.value) > -1) { - return { checked: true }; - } - } else if (shared.isSet(value)) { - if (vnode.props && value.has(vnode.props.value)) { - return { checked: true }; - } - } else if (value) { - return { checked: true }; - } - }; - vModelDynamic.getSSRProps = (binding, vnode) => { - if (typeof vnode.type !== "string") { - return; - } - const modelToUse = resolveDynamicModel( - // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase - vnode.type.toUpperCase(), - vnode.props && vnode.props.type - ); - if (modelToUse.getSSRProps) { - return modelToUse.getSSRProps(binding, vnode); - } - }; -} - -const systemModifiers = ["ctrl", "shift", "alt", "meta"]; -const modifierGuards = { - stop: (e) => e.stopPropagation(), - prevent: (e) => e.preventDefault(), - self: (e) => e.target !== e.currentTarget, - ctrl: (e) => !e.ctrlKey, - shift: (e) => !e.shiftKey, - alt: (e) => !e.altKey, - meta: (e) => !e.metaKey, - left: (e) => "button" in e && e.button !== 0, - middle: (e) => "button" in e && e.button !== 1, - right: (e) => "button" in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) -}; -const withModifiers = (fn, modifiers) => { - const cache = fn._withMods || (fn._withMods = {}); - const cacheKey = modifiers.join("."); - return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) return; - } - return fn(event, ...args); - }); -}; -const keyNames = { - esc: "escape", - space: " ", - up: "arrow-up", - left: "arrow-left", - right: "arrow-right", - down: "arrow-down", - delete: "backspace" -}; -const withKeys = (fn, modifiers) => { - const cache = fn._withKeys || (fn._withKeys = {}); - const cacheKey = modifiers.join("."); - return cache[cacheKey] || (cache[cacheKey] = (event) => { - if (!("key" in event)) { - return; - } - const eventKey = shared.hyphenate(event.key); - if (modifiers.some( - (k) => k === eventKey || keyNames[k] === eventKey - )) { - return fn(event); - } - }); -}; - -const rendererOptions = /* @__PURE__ */ shared.extend({ patchProp }, nodeOps); -let renderer; -let enabledHydration = false; -function ensureRenderer() { - return renderer || (renderer = runtimeCore.createRenderer(rendererOptions)); -} -function ensureHydrationRenderer() { - renderer = enabledHydration ? renderer : runtimeCore.createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; -} -const render = (...args) => { - ensureRenderer().render(...args); -}; -const hydrate = (...args) => { - ensureHydrationRenderer().hydrate(...args); -}; -const createApp = (...args) => { - const app = ensureRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); - } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) return; - const component = app._component; - if (!shared.isFunction(component) && !component.render && !component.template) { - component.template = container.innerHTML; - } - if (container.nodeType === 1) { - container.textContent = ""; - } - const proxy = mount(container, false, resolveRootNamespace(container)); - if (container instanceof Element) { - container.removeAttribute("v-cloak"); - container.setAttribute("data-v-app", ""); - } - return proxy; - }; - return app; -}; -const createSSRApp = (...args) => { - const app = ensureHydrationRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); - } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, resolveRootNamespace(container)); - } - }; - return app; -}; -function resolveRootNamespace(container) { - if (container instanceof SVGElement) { - return "svg"; - } - if (typeof MathMLElement === "function" && container instanceof MathMLElement) { - return "mathml"; - } -} -function injectNativeTagCheck(app) { - Object.defineProperty(app.config, "isNativeTag", { - value: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag) || shared.isMathMLTag(tag), - writable: false - }); -} -function injectCompilerOptionsCheck(app) { - if (runtimeCore.isRuntimeOnly()) { - const isCustomElement = app.config.isCustomElement; - Object.defineProperty(app.config, "isCustomElement", { - get() { - return isCustomElement; - }, - set() { - runtimeCore.warn( - `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` - ); - } - }); - const compilerOptions = app.config.compilerOptions; - const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. -- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. -- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader -- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; - Object.defineProperty(app.config, "compilerOptions", { - get() { - runtimeCore.warn(msg); - return compilerOptions; - }, - set() { - runtimeCore.warn(msg); - } - }); - } -} -function normalizeContainer(container) { - if (shared.isString(container)) { - const res = document.querySelector(container); - if (!res) { - runtimeCore.warn( - `Failed to mount app: mount target selector "${container}" returned null.` - ); - } - return res; - } - if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { - runtimeCore.warn( - `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` - ); - } - return container; -} -let ssrDirectiveInitialized = false; -const initDirectivesForSSR = () => { - if (!ssrDirectiveInitialized) { - ssrDirectiveInitialized = true; - initVModelForSSR(); - initVShowForSSR(); - } -} ; - -exports.Transition = Transition; -exports.TransitionGroup = TransitionGroup; -exports.VueElement = VueElement; -exports.createApp = createApp; -exports.createSSRApp = createSSRApp; -exports.defineCustomElement = defineCustomElement; -exports.defineSSRCustomElement = defineSSRCustomElement; -exports.hydrate = hydrate; -exports.initDirectivesForSSR = initDirectivesForSSR; -exports.render = render; -exports.useCssModule = useCssModule; -exports.useCssVars = useCssVars; -exports.useHost = useHost; -exports.useShadowRoot = useShadowRoot; -exports.vModelCheckbox = vModelCheckbox; -exports.vModelDynamic = vModelDynamic; -exports.vModelRadio = vModelRadio; -exports.vModelSelect = vModelSelect; -exports.vModelText = vModelText; -exports.vShow = vShow; -exports.withKeys = withKeys; -exports.withModifiers = withModifiers; -Object.keys(runtimeCore).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeCore[k]; -}); diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js deleted file mode 100644 index 9e46c11..0000000 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +++ /dev/null @@ -1,1669 +0,0 @@ -/** -* @vue/runtime-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var runtimeCore = require('@vue/runtime-core'); -var shared = require('@vue/shared'); - -let policy = void 0; -const tt = typeof window !== "undefined" && window.trustedTypes; -if (tt) { - try { - policy = /* @__PURE__ */ tt.createPolicy("vue", { - createHTML: (val) => val - }); - } catch (e) { - } -} -const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; -const svgNS = "http://www.w3.org/2000/svg"; -const mathmlNS = "http://www.w3.org/1998/Math/MathML"; -const doc = typeof document !== "undefined" ? document : null; -const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); -const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: (child) => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, namespace, is, props) => { - const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); - if (tag === "select" && props && props.multiple != null) { - el.setAttribute("multiple", props.multiple); - } - return el; - }, - createText: (text) => doc.createTextNode(text), - createComment: (text) => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: (node) => node.parentNode, - nextSibling: (node) => node.nextSibling, - querySelector: (selector) => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ""); - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, namespace, start, end) { - const before = anchor ? anchor.previousSibling : parent.lastChild; - if (start && (start === end || start.nextSibling)) { - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) break; - } - } else { - templateContainer.innerHTML = unsafeToTrustedHTML( - namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content - ); - const template = templateContainer.content; - if (namespace === "svg" || namespace === "mathml") { - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; - } -}; - -const TRANSITION = "transition"; -const ANIMATION = "animation"; -const vtcKey = Symbol("_vtc"); -const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String -}; -const TransitionPropsValidators = /* @__PURE__ */ shared.extend( - {}, - runtimeCore.BaseTransitionPropsValidators, - DOMTransitionPropsValidators -); -const decorate$1 = (t) => { - t.displayName = "Transition"; - t.props = TransitionPropsValidators; - return t; -}; -const Transition = /* @__PURE__ */ decorate$1( - (props, { slots }) => runtimeCore.h(runtimeCore.BaseTransition, resolveTransitionProps(props), slots) -); -const callHook = (hook, args = []) => { - if (shared.isArray(hook)) { - hook.forEach((h2) => h2(...args)); - } else if (hook) { - hook(...args); - } -}; -const hasExplicitCallback = (hook) => { - return hook ? shared.isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; -}; -function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; - } - } - if (rawProps.css === false) { - return baseProps; - } - const { - name = "v", - type, - duration, - enterFromClass = `${name}-enter-from`, - enterActiveClass = `${name}-enter-active`, - enterToClass = `${name}-enter-to`, - appearFromClass = enterFromClass, - appearActiveClass = enterActiveClass, - appearToClass = enterToClass, - leaveFromClass = `${name}-leave-from`, - leaveActiveClass = `${name}-leave-active`, - leaveToClass = `${name}-leave-to` - } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { - onBeforeEnter, - onEnter, - onEnterCancelled, - onLeave, - onLeaveCancelled, - onBeforeAppear = onBeforeEnter, - onAppear = onEnter, - onAppearCancelled = onEnterCancelled - } = baseProps; - const finishEnter = (el, isAppear, done, isCancelled) => { - el._enterCancelled = isCancelled; - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); - }; - const finishLeave = (el, done) => { - el._isLeaving = false; - removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return shared.extend(baseProps, { - onBeforeEnter(el) { - callHook(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - if (!el._enterCancelled) { - forceReflow(); - addTransitionClass(el, leaveActiveClass); - } else { - addTransitionClass(el, leaveActiveClass); - forceReflow(); - } - nextFrame(() => { - if (!el._isLeaving) { - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false, void 0, true); - callHook(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true, void 0, true); - callHook(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook(onLeaveCancelled, [el]); - } - }); -} -function normalizeDuration(duration) { - if (duration == null) { - return null; - } else if (shared.isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } else { - const n = NumberOf(duration); - return [n, n]; - } -} -function NumberOf(val) { - const res = shared.toNumber(val); - return res; -} -function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); - (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); -} -function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); - const _vtc = el[vtcKey]; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el[vtcKey] = void 0; - } - } -} -function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); -} -let endId = 0; -function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = el._endId = ++endId; - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout != null) { - return setTimeout(resolveIfNotStale, explicitTimeout); - } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); - } - const endEvent = type + "end"; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); -} -function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - const getStyleProperties = (key) => (styles[key] || "").split(", "); - const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); - const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(`${ANIMATION}Delay`); - const animationDurations = getStyleProperties(`${ANIMATION}Duration`); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } - } else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } - } else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; - propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; - } - const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( - getStyleProperties(`${TRANSITION}Property`).toString() - ); - return { - type, - timeout, - propCount, - hasTransform - }; -} -function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); -} -function toMs(s) { - if (s === "auto") return 0; - return Number(s.slice(0, -1).replace(",", ".")) * 1e3; -} -function forceReflow() { - return document.body.offsetHeight; -} - -function patchClass(el, value, isSVG) { - const transitionClasses = el[vtcKey]; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); - } - if (value == null) { - el.removeAttribute("class"); - } else if (isSVG) { - el.setAttribute("class", value); - } else { - el.className = value; - } -} - -const vShowOriginalDisplay = Symbol("_vod"); -const vShowHidden = Symbol("_vsh"); -const vShow = { - beforeMount(el, { value }, { transition }) { - el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); - } -}; -function setDisplay(el, value) { - el.style.display = value ? el[vShowOriginalDisplay] : "none"; - el[vShowHidden] = !value; -} -function initVShowForSSR() { - vShow.getSSRProps = ({ value }) => { - if (!value) { - return { style: { display: "none" } }; - } - }; -} - -const CSS_VAR_TEXT = Symbol(""); -function useCssVars(getter) { - return; -} - -const displayRE = /(^|;)\s*display\s*:/; -function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = shared.isString(next); - let hasControlledDisplay = false; - if (next && !isCssString) { - if (prev) { - if (!shared.isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ""); - } - } - } else { - for (const prevStyle of prev.split(";")) { - const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); - if (next[key] == null) { - setStyle(style, key, ""); - } - } - } - } - for (const key in next) { - if (key === "display") { - hasControlledDisplay = true; - } - setStyle(style, key, next[key]); - } - } else { - if (isCssString) { - if (prev !== next) { - const cssVarText = style[CSS_VAR_TEXT]; - if (cssVarText) { - next += ";" + cssVarText; - } - style.cssText = next; - hasControlledDisplay = displayRE.test(next); - } - } else if (prev) { - el.removeAttribute("style"); - } - } - if (vShowOriginalDisplay in el) { - el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; - if (el[vShowHidden]) { - style.display = "none"; - } - } -} -const importantRE = /\s*!important$/; -function setStyle(style, name, val) { - if (shared.isArray(val)) { - val.forEach((v) => setStyle(style, name, v)); - } else { - if (val == null) val = ""; - if (name.startsWith("--")) { - style.setProperty(name, val); - } else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - style.setProperty( - shared.hyphenate(prefixed), - val.replace(importantRE, ""), - "important" - ); - } else { - style[prefixed] = val; - } - } - } -} -const prefixes = ["Webkit", "Moz", "ms"]; -const prefixCache = {}; -function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = runtimeCore.camelize(rawName); - if (name !== "filter" && name in style) { - return prefixCache[rawName] = name; - } - name = shared.capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return prefixCache[rawName] = prefixed; - } - } - return rawName; -} - -const xlinkNS = "http://www.w3.org/1999/xlink"; -function patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecialBooleanAttr(key)) { - if (isSVG && key.startsWith("xlink:")) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } else { - el.setAttributeNS(xlinkNS, key, value); - } - } else { - if (value == null || isBoolean && !shared.includeBooleanAttr(value)) { - el.removeAttribute(key); - } else { - el.setAttribute( - key, - isBoolean ? "" : shared.isSymbol(value) ? String(value) : value - ); - } - } -} - -function patchDOMProp(el, key, value, parentComponent, attrName) { - if (key === "innerHTML" || key === "textContent") { - if (value != null) { - el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; - } - return; - } - const tag = el.tagName; - if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally - !tag.includes("-")) { - const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; - const newValue = value == null ? ( - // #11647: value should be set as empty string for null and undefined, - // but <input type="checkbox"> should be set as 'on'. - el.type === "checkbox" ? "on" : "" - ) : String(value); - if (oldValue !== newValue || !("_value" in el)) { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - el._value = value; - return; - } - let needRemove = false; - if (value === "" || value == null) { - const type = typeof el[key]; - if (type === "boolean") { - value = shared.includeBooleanAttr(value); - } else if (value == null && type === "string") { - value = ""; - needRemove = true; - } else if (type === "number") { - value = 0; - needRemove = true; - } - } - try { - el[key] = value; - } catch (e) { - } - needRemove && el.removeAttribute(attrName || key); -} - -function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); -} -function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); -} -const veiKey = Symbol("_vei"); -function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - const invokers = el[veiKey] || (el[veiKey] = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - existingInvoker.value = nextValue; - } else { - const [name, options] = parseName(rawName); - if (nextValue) { - const invoker = invokers[rawName] = createInvoker( - nextValue, - instance - ); - addEventListener(el, name, invoker, options); - } else if (existingInvoker) { - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = void 0; - } - } -} -const optionsModifierRE = /(?:Once|Passive|Capture)$/; -function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while (m = name.match(optionsModifierRE)) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - const event = name[2] === ":" ? name.slice(3) : shared.hyphenate(name.slice(2)); - return [event, options]; -} -let cachedNow = 0; -const p = /* @__PURE__ */ Promise.resolve(); -const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); -function createInvoker(initialValue, instance) { - const invoker = (e) => { - if (!e._vts) { - e._vts = Date.now(); - } else if (e._vts <= invoker.attached) { - return; - } - runtimeCore.callWithAsyncErrorHandling( - patchStopImmediatePropagation(e, invoker.value), - instance, - 5, - [e] - ); - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; -} -function patchStopImmediatePropagation(e, value) { - if (shared.isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map( - (fn) => (e2) => !e2._stopped && fn && fn(e2) - ); - } else { - return value; - } -} - -const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter -key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; -const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { - const isSVG = namespace === "svg"; - if (key === "class") { - patchClass(el, nextValue, isSVG); - } else if (key === "style") { - patchStyle(el, prevValue, nextValue); - } else if (shared.isOn(key)) { - if (!shared.isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue); - if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { - patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); - } - } else if ( - // #11081 force set props for possible async custom element - el._isVueCE && (/[A-Z]/.test(key) || !shared.isString(nextValue)) - ) { - patchDOMProp(el, shared.camelize(key), nextValue, parentComponent, key); - } else { - if (key === "true-value") { - el._trueValue = nextValue; - } else if (key === "false-value") { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } -}; -function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - if (key === "innerHTML" || key === "textContent") { - return true; - } - if (key in el && isNativeOn(key) && shared.isFunction(value)) { - return true; - } - return false; - } - if (key === "spellcheck" || key === "draggable" || key === "translate") { - return false; - } - if (key === "form") { - return false; - } - if (key === "list" && el.tagName === "INPUT") { - return false; - } - if (key === "type" && el.tagName === "TEXTAREA") { - return false; - } - if (key === "width" || key === "height") { - const tag = el.tagName; - if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { - return false; - } - } - if (isNativeOn(key) && shared.isString(value)) { - return false; - } - return key in el; -} - -const REMOVAL = {}; -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineCustomElement(options, extraOptions, _createApp) { - const Comp = runtimeCore.defineComponent(options, extraOptions); - if (shared.isPlainObject(Comp)) shared.extend(Comp, extraOptions); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, _createApp); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; -} -/*! #__NO_SIDE_EFFECTS__ */ -const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { - return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); -}; -const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { -}; -class VueElement extends BaseClass { - constructor(_def, _props = {}, _createApp = createApp) { - super(); - this._def = _def; - this._props = _props; - this._createApp = _createApp; - this._isVueCE = true; - /** - * @internal - */ - this._instance = null; - /** - * @internal - */ - this._app = null; - /** - * @internal - */ - this._nonce = this._def.nonce; - this._connected = false; - this._resolved = false; - this._numberProps = null; - this._styleChildren = /* @__PURE__ */ new WeakSet(); - this._ob = null; - if (this.shadowRoot && _createApp !== createApp) { - this._root = this.shadowRoot; - } else { - if (_def.shadowRoot !== false) { - this.attachShadow({ mode: "open" }); - this._root = this.shadowRoot; - } else { - this._root = this; - } - } - if (!this._def.__asyncLoader) { - this._resolveProps(this._def); - } - } - connectedCallback() { - if (!this.isConnected) return; - if (!this.shadowRoot) { - this._parseSlots(); - } - this._connected = true; - let parent = this; - while (parent = parent && (parent.parentNode || parent.host)) { - if (parent instanceof VueElement) { - this._parent = parent; - break; - } - } - if (!this._instance) { - if (this._resolved) { - this._setParent(); - this._update(); - } else { - if (parent && parent._pendingResolve) { - this._pendingResolve = parent._pendingResolve.then(() => { - this._pendingResolve = void 0; - this._resolveDef(); - }); - } else { - this._resolveDef(); - } - } - } - } - _setParent(parent = this._parent) { - if (parent) { - this._instance.parent = parent._instance; - this._instance.provides = parent._instance.provides; - } - } - disconnectedCallback() { - this._connected = false; - runtimeCore.nextTick(() => { - if (!this._connected) { - if (this._ob) { - this._ob.disconnect(); - this._ob = null; - } - this._app && this._app.unmount(); - if (this._instance) this._instance.ce = void 0; - this._app = this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._pendingResolve) { - return; - } - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - this._ob = new MutationObserver((mutations) => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }); - this._ob.observe(this, { attributes: true }); - const resolve = (def, isAsync = false) => { - this._resolved = true; - this._pendingResolve = void 0; - const { props, styles } = def; - let numberProps; - if (props && !shared.isArray(props)) { - for (const key in props) { - const opt = props[key]; - if (opt === Number || opt && opt.type === Number) { - if (key in this._props) { - this._props[key] = shared.toNumber(this._props[key]); - } - (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[shared.camelize(key)] = true; - } - } - } - this._numberProps = numberProps; - if (isAsync) { - this._resolveProps(def); - } - if (this.shadowRoot) { - this._applyStyles(styles); - } - this._mount(def); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - this._pendingResolve = asyncDef().then( - (def) => resolve(this._def = def, true) - ); - } else { - resolve(this._def); - } - } - _mount(def) { - this._app = this._createApp(def); - if (def.configureApp) { - def.configureApp(this._app); - } - this._app._ceVNode = this._createVNode(); - this._app.mount(this._root); - const exposed = this._instance && this._instance.exposed; - if (!exposed) return; - for (const key in exposed) { - if (!shared.hasOwn(this, key)) { - Object.defineProperty(this, key, { - // unwrap ref to be consistent with public instance behavior - get: () => runtimeCore.unref(exposed[key]) - }); - } - } - } - _resolveProps(def) { - const { props } = def; - const declaredPropKeys = shared.isArray(props) ? props : Object.keys(props || {}); - for (const key of Object.keys(this)) { - if (key[0] !== "_" && declaredPropKeys.includes(key)) { - this._setProp(key, this[key]); - } - } - for (const key of declaredPropKeys.map(shared.camelize)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val, true, true); - } - }); - } - } - _setAttr(key) { - if (key.startsWith("data-v-")) return; - const has = this.hasAttribute(key); - let value = has ? this.getAttribute(key) : REMOVAL; - const camelKey = shared.camelize(key); - if (has && this._numberProps && this._numberProps[camelKey]) { - value = shared.toNumber(value); - } - this._setProp(camelKey, value, false, true); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = false) { - if (val !== this._props[key]) { - if (val === REMOVAL) { - delete this._props[key]; - } else { - this._props[key] = val; - if (key === "key" && this._app) { - this._app._ceVNode.key = val; - } - } - if (shouldUpdate && this._instance) { - this._update(); - } - if (shouldReflect) { - const ob = this._ob; - ob && ob.disconnect(); - if (val === true) { - this.setAttribute(shared.hyphenate(key), ""); - } else if (typeof val === "string" || typeof val === "number") { - this.setAttribute(shared.hyphenate(key), val + ""); - } else if (!val) { - this.removeAttribute(shared.hyphenate(key)); - } - ob && ob.observe(this, { attributes: true }); - } - } - } - _update() { - render(this._createVNode(), this._root); - } - _createVNode() { - const baseProps = {}; - if (!this.shadowRoot) { - baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); - } - const vnode = runtimeCore.createVNode(this._def, shared.extend(baseProps, this._props)); - if (!this._instance) { - vnode.ce = (instance) => { - this._instance = instance; - instance.ce = this; - instance.isCE = true; - const dispatch = (event, args) => { - this.dispatchEvent( - new CustomEvent( - event, - shared.isPlainObject(args[0]) ? shared.extend({ detail: args }, args[0]) : { detail: args } - ) - ); - }; - instance.emit = (event, ...args) => { - dispatch(event, args); - if (shared.hyphenate(event) !== event) { - dispatch(shared.hyphenate(event), args); - } - }; - this._setParent(); - }; - } - return vnode; - } - _applyStyles(styles, owner) { - if (!styles) return; - if (owner) { - if (owner === this._def || this._styleChildren.has(owner)) { - return; - } - this._styleChildren.add(owner); - } - const nonce = this._nonce; - for (let i = styles.length - 1; i >= 0; i--) { - const s = document.createElement("style"); - if (nonce) s.setAttribute("nonce", nonce); - s.textContent = styles[i]; - this.shadowRoot.prepend(s); - } - } - /** - * Only called when shadowRoot is false - */ - _parseSlots() { - const slots = this._slots = {}; - let n; - while (n = this.firstChild) { - const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; - (slots[slotName] || (slots[slotName] = [])).push(n); - this.removeChild(n); - } - } - /** - * Only called when shadowRoot is false - */ - _renderSlots() { - const outlets = (this._teleportTarget || this).querySelectorAll("slot"); - const scopeId = this._instance.type.__scopeId; - for (let i = 0; i < outlets.length; i++) { - const o = outlets[i]; - const slotName = o.getAttribute("name") || "default"; - const content = this._slots[slotName]; - const parent = o.parentNode; - if (content) { - for (const n of content) { - if (scopeId && n.nodeType === 1) { - const id = scopeId + "-s"; - const walker = document.createTreeWalker(n, 1); - n.setAttribute(id, ""); - let child; - while (child = walker.nextNode()) { - child.setAttribute(id, ""); - } - } - parent.insertBefore(n, o); - } - } else { - while (o.firstChild) parent.insertBefore(o.firstChild, o); - } - parent.removeChild(o); - } - } - /** - * @internal - */ - _injectChildStyle(comp) { - this._applyStyles(comp.styles, comp); - } - /** - * @internal - */ - _removeChildStyle(comp) { - } -} -function useHost(caller) { - const instance = runtimeCore.getCurrentInstance(); - const el = instance && instance.ce; - if (el) { - return el; - } - return null; -} -function useShadowRoot() { - const el = useHost(); - return el && el.shadowRoot; -} - -function useCssModule(name = "$style") { - { - const instance = runtimeCore.getCurrentInstance(); - if (!instance) { - return shared.EMPTY_OBJ; - } - const modules = instance.type.__cssModules; - if (!modules) { - return shared.EMPTY_OBJ; - } - const mod = modules[name]; - if (!mod) { - return shared.EMPTY_OBJ; - } - return mod; - } -} - -const positionMap = /* @__PURE__ */ new WeakMap(); -const newPositionMap = /* @__PURE__ */ new WeakMap(); -const moveCbKey = Symbol("_moveCb"); -const enterCbKey = Symbol("_enterCb"); -const decorate = (t) => { - delete t.props.mode; - return t; -}; -const TransitionGroupImpl = /* @__PURE__ */ decorate({ - name: "TransitionGroup", - props: /* @__PURE__ */ shared.extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = runtimeCore.getCurrentInstance(); - const state = runtimeCore.useTransitionState(); - let prevChildren; - let children; - runtimeCore.onUpdated(() => { - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || "v"}-move`; - if (!hasCSSTransform( - prevChildren[0].el, - instance.vnode.el, - moveClass - )) { - return; - } - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - forceReflow(); - movedChildren.forEach((c) => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ""; - const cb = el[moveCbKey] = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener("transitionend", cb); - el[moveCbKey] = null; - removeTransitionClass(el, moveClass); - } - }; - el.addEventListener("transitionend", cb); - }); - }); - return () => { - const rawProps = runtimeCore.toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || runtimeCore.Fragment; - prevChildren = []; - if (children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.el && child.el instanceof Element) { - prevChildren.push(child); - runtimeCore.setTransitionHooks( - child, - runtimeCore.resolveTransitionHooks( - child, - cssTransitionProps, - state, - instance - ) - ); - positionMap.set( - child, - child.el.getBoundingClientRect() - ); - } - } - } - children = slots.default ? runtimeCore.getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - runtimeCore.setTransitionHooks( - child, - runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance) - ); - } - } - return runtimeCore.createVNode(tag, null, children); - }; - } -}); -const TransitionGroup = TransitionGroupImpl; -function callPendingCbs(c) { - const el = c.el; - if (el[moveCbKey]) { - el[moveCbKey](); - } - if (el[enterCbKey]) { - el[enterCbKey](); - } -} -function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); -} -function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = "0s"; - return c; - } -} -function hasCSSTransform(el, root, moveClass) { - const clone = el.cloneNode(); - const _vtc = el[vtcKey]; - if (_vtc) { - _vtc.forEach((cls) => { - cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); - clone.style.display = "none"; - const container = root.nodeType === 1 ? root : root.parentNode; - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; -} - -const getModelAssigner = (vnode) => { - const fn = vnode.props["onUpdate:modelValue"] || false; - return shared.isArray(fn) ? (value) => shared.invokeArrayFns(fn, value) : fn; -}; -function onCompositionStart(e) { - e.target.composing = true; -} -function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event("input")); - } -} -const assignKey = Symbol("_assign"); -const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el[assignKey] = getModelAssigner(vnode); - const castToNumber = number || vnode.props && vnode.props.type === "number"; - addEventListener(el, lazy ? "change" : "input", (e) => { - if (e.target.composing) return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = shared.looseToNumber(domValue); - } - el[assignKey](domValue); - }); - if (trim) { - addEventListener(el, "change", () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, "compositionstart", onCompositionStart); - addEventListener(el, "compositionend", onCompositionEnd); - addEventListener(el, "change", onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? "" : value; - }, - beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { - el[assignKey] = getModelAssigner(vnode); - if (el.composing) return; - const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? shared.looseToNumber(el.value) : el.value; - const newValue = value == null ? "" : value; - if (elValue === newValue) { - return; - } - if (document.activeElement === el && el.type !== "range") { - if (lazy && value === oldValue) { - return; - } - if (trim && el.value.trim() === newValue) { - return; - } - } - el.value = newValue; - } -}; -const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el[assignKey] = getModelAssigner(vnode); - addEventListener(el, "change", () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el[assignKey]; - if (shared.isArray(modelValue)) { - const index = shared.looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } else if (shared.isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } else { - cloned.delete(elementValue); - } - assign(cloned); - } else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el[assignKey] = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } -}; -function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - let checked; - if (shared.isArray(value)) { - checked = shared.looseIndexOf(value, vnode.props.value) > -1; - } else if (shared.isSet(value)) { - checked = value.has(vnode.props.value); - } else { - if (value === oldValue) return; - checked = shared.looseEqual(value, getCheckboxValue(el, true)); - } - if (el.checked !== checked) { - el.checked = checked; - } -} -const vModelRadio = { - created(el, { value }, vnode) { - el.checked = shared.looseEqual(value, vnode.props.value); - el[assignKey] = getModelAssigner(vnode); - addEventListener(el, "change", () => { - el[assignKey](getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el[assignKey] = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = shared.looseEqual(value, vnode.props.value); - } - } -}; -const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = shared.isSet(value); - addEventListener(el, "change", () => { - const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( - (o) => number ? shared.looseToNumber(getValue(o)) : getValue(o) - ); - el[assignKey]( - el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] - ); - el._assigning = true; - runtimeCore.nextTick(() => { - el._assigning = false; - }); - }); - el[assignKey] = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el[assignKey] = getModelAssigner(vnode); - }, - updated(el, { value }) { - if (!el._assigning) { - setSelected(el, value); - } - } -}; -function setSelected(el, value) { - const isMultiple = el.multiple; - const isArrayValue = shared.isArray(value); - if (isMultiple && !isArrayValue && !shared.isSet(value)) { - return; - } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (isArrayValue) { - const optionType = typeof optionValue; - if (optionType === "string" || optionType === "number") { - option.selected = value.some((v) => String(v) === String(optionValue)); - } else { - option.selected = shared.looseIndexOf(value, optionValue) > -1; - } - } else { - option.selected = value.has(optionValue); - } - } else if (shared.looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) el.selectedIndex = i; - return; - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } -} -function getValue(el) { - return "_value" in el ? el._value : el.value; -} -function getCheckboxValue(el, checked) { - const key = checked ? "_trueValue" : "_falseValue"; - return key in el ? el[key] : checked; -} -const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, "created"); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, "mounted"); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, "updated"); - } -}; -function resolveDynamicModel(tagName, type) { - switch (tagName) { - case "SELECT": - return vModelSelect; - case "TEXTAREA": - return vModelText; - default: - switch (type) { - case "checkbox": - return vModelCheckbox; - case "radio": - return vModelRadio; - default: - return vModelText; - } - } -} -function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel( - el.tagName, - vnode.props && vnode.props.type - ); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); -} -function initVModelForSSR() { - vModelText.getSSRProps = ({ value }) => ({ value }); - vModelRadio.getSSRProps = ({ value }, vnode) => { - if (vnode.props && shared.looseEqual(vnode.props.value, value)) { - return { checked: true }; - } - }; - vModelCheckbox.getSSRProps = ({ value }, vnode) => { - if (shared.isArray(value)) { - if (vnode.props && shared.looseIndexOf(value, vnode.props.value) > -1) { - return { checked: true }; - } - } else if (shared.isSet(value)) { - if (vnode.props && value.has(vnode.props.value)) { - return { checked: true }; - } - } else if (value) { - return { checked: true }; - } - }; - vModelDynamic.getSSRProps = (binding, vnode) => { - if (typeof vnode.type !== "string") { - return; - } - const modelToUse = resolveDynamicModel( - // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase - vnode.type.toUpperCase(), - vnode.props && vnode.props.type - ); - if (modelToUse.getSSRProps) { - return modelToUse.getSSRProps(binding, vnode); - } - }; -} - -const systemModifiers = ["ctrl", "shift", "alt", "meta"]; -const modifierGuards = { - stop: (e) => e.stopPropagation(), - prevent: (e) => e.preventDefault(), - self: (e) => e.target !== e.currentTarget, - ctrl: (e) => !e.ctrlKey, - shift: (e) => !e.shiftKey, - alt: (e) => !e.altKey, - meta: (e) => !e.metaKey, - left: (e) => "button" in e && e.button !== 0, - middle: (e) => "button" in e && e.button !== 1, - right: (e) => "button" in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) -}; -const withModifiers = (fn, modifiers) => { - const cache = fn._withMods || (fn._withMods = {}); - const cacheKey = modifiers.join("."); - return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) return; - } - return fn(event, ...args); - }); -}; -const keyNames = { - esc: "escape", - space: " ", - up: "arrow-up", - left: "arrow-left", - right: "arrow-right", - down: "arrow-down", - delete: "backspace" -}; -const withKeys = (fn, modifiers) => { - const cache = fn._withKeys || (fn._withKeys = {}); - const cacheKey = modifiers.join("."); - return cache[cacheKey] || (cache[cacheKey] = (event) => { - if (!("key" in event)) { - return; - } - const eventKey = shared.hyphenate(event.key); - if (modifiers.some( - (k) => k === eventKey || keyNames[k] === eventKey - )) { - return fn(event); - } - }); -}; - -const rendererOptions = /* @__PURE__ */ shared.extend({ patchProp }, nodeOps); -let renderer; -let enabledHydration = false; -function ensureRenderer() { - return renderer || (renderer = runtimeCore.createRenderer(rendererOptions)); -} -function ensureHydrationRenderer() { - renderer = enabledHydration ? renderer : runtimeCore.createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; -} -const render = (...args) => { - ensureRenderer().render(...args); -}; -const hydrate = (...args) => { - ensureHydrationRenderer().hydrate(...args); -}; -const createApp = (...args) => { - const app = ensureRenderer().createApp(...args); - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) return; - const component = app._component; - if (!shared.isFunction(component) && !component.render && !component.template) { - component.template = container.innerHTML; - } - if (container.nodeType === 1) { - container.textContent = ""; - } - const proxy = mount(container, false, resolveRootNamespace(container)); - if (container instanceof Element) { - container.removeAttribute("v-cloak"); - container.setAttribute("data-v-app", ""); - } - return proxy; - }; - return app; -}; -const createSSRApp = (...args) => { - const app = ensureHydrationRenderer().createApp(...args); - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, resolveRootNamespace(container)); - } - }; - return app; -}; -function resolveRootNamespace(container) { - if (container instanceof SVGElement) { - return "svg"; - } - if (typeof MathMLElement === "function" && container instanceof MathMLElement) { - return "mathml"; - } -} -function normalizeContainer(container) { - if (shared.isString(container)) { - const res = document.querySelector(container); - return res; - } - return container; -} -let ssrDirectiveInitialized = false; -const initDirectivesForSSR = () => { - if (!ssrDirectiveInitialized) { - ssrDirectiveInitialized = true; - initVModelForSSR(); - initVShowForSSR(); - } -} ; - -exports.Transition = Transition; -exports.TransitionGroup = TransitionGroup; -exports.VueElement = VueElement; -exports.createApp = createApp; -exports.createSSRApp = createSSRApp; -exports.defineCustomElement = defineCustomElement; -exports.defineSSRCustomElement = defineSSRCustomElement; -exports.hydrate = hydrate; -exports.initDirectivesForSSR = initDirectivesForSSR; -exports.render = render; -exports.useCssModule = useCssModule; -exports.useCssVars = useCssVars; -exports.useHost = useHost; -exports.useShadowRoot = useShadowRoot; -exports.vModelCheckbox = vModelCheckbox; -exports.vModelDynamic = vModelDynamic; -exports.vModelRadio = vModelRadio; -exports.vModelSelect = vModelSelect; -exports.vModelText = vModelText; -exports.vShow = vShow; -exports.withKeys = withKeys; -exports.withModifiers = withModifiers; -Object.keys(runtimeCore).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeCore[k]; -}); diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts b/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts deleted file mode 100644 index 72d2b8b..0000000 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +++ /dev/null @@ -1,1395 +0,0 @@ -import { BaseTransitionProps, FunctionalComponent, ObjectDirective, Directive, App, SetupContext, RenderFunction, ComponentOptions, ComponentObjectPropsOptions, EmitsOptions, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentInjectOptions, SlotsType, Component, ComponentProvideOptions, ExtractPropTypes, EmitsToProps, ComponentOptionsBase, CreateComponentPublicInstanceWithMixins, ComponentPublicInstance, DefineComponent, ComponentCustomElementInterface, CreateAppFunction, ConcreteComponent, VNodeRef, RootRenderFunction, RootHydrateFunction } from '@vue/runtime-core'; -export * from '@vue/runtime-core'; -import * as CSS from 'csstype'; - -declare const TRANSITION = "transition"; -declare const ANIMATION = "animation"; -type AnimationTypes = typeof TRANSITION | typeof ANIMATION; -export interface TransitionProps extends BaseTransitionProps<Element> { - name?: string; - type?: AnimationTypes; - css?: boolean; - duration?: number | { - enter: number; - leave: number; - }; - enterFromClass?: string; - enterActiveClass?: string; - enterToClass?: string; - appearFromClass?: string; - appearActiveClass?: string; - appearToClass?: string; - leaveFromClass?: string; - leaveActiveClass?: string; - leaveToClass?: string; -} -/** - * DOM Transition is a higher-order-component based on the platform-agnostic - * base Transition component, with DOM-specific logic. - */ -export declare const Transition: FunctionalComponent<TransitionProps>; - -export type TransitionGroupProps = Omit<TransitionProps, 'mode'> & { - tag?: string; - moveClass?: string; -}; -export declare const TransitionGroup: { - new (): { - $props: TransitionGroupProps; - }; -}; - -declare const vShowOriginalDisplay: unique symbol; -declare const vShowHidden: unique symbol; -interface VShowElement extends HTMLElement { - [vShowOriginalDisplay]: string; - [vShowHidden]: boolean; -} -export declare const vShow: ObjectDirective<VShowElement> & { - name?: 'show'; -}; - -declare const systemModifiers: readonly ["ctrl", "shift", "alt", "meta"]; -type SystemModifiers = (typeof systemModifiers)[number]; -type CompatModifiers = keyof typeof keyNames; -type VOnModifiers = SystemModifiers | ModifierGuards | CompatModifiers; -type ModifierGuards = 'shift' | 'ctrl' | 'alt' | 'meta' | 'left' | 'right' | 'stop' | 'prevent' | 'self' | 'middle' | 'exact'; -/** - * @private - */ -export declare const withModifiers: <T extends (event: Event, ...args: unknown[]) => any>(fn: T & { - _withMods?: { - [key: string]: T; - }; -}, modifiers: VOnModifiers[]) => T; -declare const keyNames: Record<'esc' | 'space' | 'up' | 'left' | 'right' | 'down' | 'delete', string>; -/** - * @private - */ -export declare const withKeys: <T extends (event: KeyboardEvent) => any>(fn: T & { - _withKeys?: { - [k: string]: T; - }; -}, modifiers: string[]) => T; -type VOnDirective = Directive<any, any, VOnModifiers>; - -type AssignerFn = (value: any) => void; -declare const assignKey: unique symbol; -type ModelDirective<T, Modifiers extends string = string> = ObjectDirective<T & { - [assignKey]: AssignerFn; - _assigning?: boolean; -}, any, Modifiers>; -export declare const vModelText: ModelDirective<HTMLInputElement | HTMLTextAreaElement, 'trim' | 'number' | 'lazy'>; -export declare const vModelCheckbox: ModelDirective<HTMLInputElement>; -export declare const vModelRadio: ModelDirective<HTMLInputElement>; -export declare const vModelSelect: ModelDirective<HTMLSelectElement, 'number'>; -export declare const vModelDynamic: ObjectDirective<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>; -type VModelDirective = typeof vModelText | typeof vModelCheckbox | typeof vModelSelect | typeof vModelRadio | typeof vModelDynamic; - -export type VueElementConstructor<P = {}> = { - new (initialProps?: Record<string, any>): VueElement & P; -}; -export interface CustomElementOptions { - styles?: string[]; - shadowRoot?: boolean; - nonce?: string; - configureApp?: (app: App) => void; -} -export declare function defineCustomElement<Props, RawBindings = object>(setup: (props: Props, ctx: SetupContext) => RawBindings | RenderFunction, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs' | 'emits'> & CustomElementOptions & { - props?: (keyof Props)[]; -}): VueElementConstructor<Props>; -export declare function defineCustomElement<Props, RawBindings = object>(setup: (props: Props, ctx: SetupContext) => RawBindings | RenderFunction, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs' | 'emits'> & CustomElementOptions & { - props?: ComponentObjectPropsOptions<Props>; -}): VueElementConstructor<Props>; -export declare function defineCustomElement<RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, PropsKeys extends string = string, RuntimeEmitsOptions extends EmitsOptions = {}, EmitsKeys extends string = string, Data = {}, SetupBindings = {}, Computed extends ComputedOptions = {}, Methods extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, InjectOptions extends ComponentInjectOptions = {}, InjectKeys extends string = string, Slots extends SlotsType = {}, LocalComponents extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, InferredProps = string extends PropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { - [key in PropsKeys]?: any; -}, ResolvedProps = InferredProps & EmitsToProps<RuntimeEmitsOptions>>(options: CustomElementOptions & { - props?: (RuntimePropsOptions & ThisType<void>) | PropsKeys[]; -} & ComponentOptionsBase<ResolvedProps, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, EmitsKeys, {}, // Defaults -InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<Readonly<ResolvedProps>, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, EmitsKeys, {}, false, InjectOptions, Slots, LocalComponents, Directives, Exposed>>, extraOptions?: CustomElementOptions): VueElementConstructor<ResolvedProps>; -export declare function defineCustomElement<T extends { - new (...args: any[]): ComponentPublicInstance<any>; -}>(options: T, extraOptions?: CustomElementOptions): VueElementConstructor<T extends DefineComponent<infer P, any, any, any> ? P : unknown>; -/*! #__NO_SIDE_EFFECTS__ */ -export declare const defineSSRCustomElement: typeof defineCustomElement; -declare const BaseClass: typeof HTMLElement; -type InnerComponentDef = ConcreteComponent & CustomElementOptions; -export declare class VueElement extends BaseClass implements ComponentCustomElementInterface { - /** - * Component def - note this may be an AsyncWrapper, and this._def will - * be overwritten by the inner component when resolved. - */ - private _def; - private _props; - private _createApp; - _isVueCE: boolean; - private _connected; - private _resolved; - private _numberProps; - private _styleChildren; - private _pendingResolve; - private _parent; - /** - * dev only - */ - private _styles?; - /** - * dev only - */ - private _childStyles?; - private _ob?; - private _slots?; - constructor( - /** - * Component def - note this may be an AsyncWrapper, and this._def will - * be overwritten by the inner component when resolved. - */ - _def: InnerComponentDef, _props?: Record<string, any>, _createApp?: CreateAppFunction<Element>); - connectedCallback(): void; - private _setParent; - disconnectedCallback(): void; - /** - * resolve inner component definition (handle possible async component) - */ - private _resolveDef; - private _mount; - private _resolveProps; - protected _setAttr(key: string): void; - private _update; - private _createVNode; - private _applyStyles; - /** - * Only called when shadowRoot is false - */ - private _parseSlots; - /** - * Only called when shadowRoot is false - */ - private _renderSlots; -} -export declare function useHost(caller?: string): VueElement | null; -/** - * Retrieve the shadowRoot of the current custom element. Only usable in setup() - * of a `defineCustomElement` component. - */ -export declare function useShadowRoot(): ShadowRoot | null; - -export declare function useCssModule(name?: string): Record<string, string>; - -/** - * Runtime helper for SFC's CSS variable injection feature. - * @private - */ -export declare function useCssVars(getter: (ctx: any) => Record<string, string>): void; - -export interface CSSProperties extends CSS.Properties<string | number>, CSS.PropertiesHyphen<string | number> { - /** - * The index signature was removed to enable closed typing for style - * using CSSType. You're able to use type assertion or module augmentation - * to add properties or an index signature of your own. - * - * For examples and more information, visit: - * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors - */ - [v: `--${string}`]: string | number | undefined; -} -type Booleanish = boolean | 'true' | 'false'; -type Numberish = number | string; -export interface AriaAttributes { - /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ - 'aria-activedescendant'?: string; - /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ - 'aria-atomic'?: Booleanish; - /** - * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be - * presented if they are made. - */ - 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'; - /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ - 'aria-busy'?: Booleanish; - /** - * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. - * @see aria-pressed @see aria-selected. - */ - 'aria-checked'?: Booleanish | 'mixed'; - /** - * Defines the total number of columns in a table, grid, or treegrid. - * @see aria-colindex. - */ - 'aria-colcount'?: Numberish; - /** - * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. - * @see aria-colcount @see aria-colspan. - */ - 'aria-colindex'?: Numberish; - /** - * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. - * @see aria-colindex @see aria-rowspan. - */ - 'aria-colspan'?: Numberish; - /** - * Identifies the element (or elements) whose contents or presence are controlled by the current element. - * @see aria-owns. - */ - 'aria-controls'?: string; - /** Indicates the element that represents the current item within a container or set of related elements. */ - 'aria-current'?: Booleanish | 'page' | 'step' | 'location' | 'date' | 'time'; - /** - * Identifies the element (or elements) that describes the object. - * @see aria-labelledby - */ - 'aria-describedby'?: string; - /** - * Identifies the element that provides a detailed, extended description for the object. - * @see aria-describedby. - */ - 'aria-details'?: string; - /** - * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. - * @see aria-hidden @see aria-readonly. - */ - 'aria-disabled'?: Booleanish; - /** - * Indicates what functions can be performed when a dragged object is released on the drop target. - * @deprecated in ARIA 1.1 - */ - 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup'; - /** - * Identifies the element that provides an error message for the object. - * @see aria-invalid @see aria-describedby. - */ - 'aria-errormessage'?: string; - /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ - 'aria-expanded'?: Booleanish; - /** - * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, - * allows assistive technology to override the general default of reading in document source order. - */ - 'aria-flowto'?: string; - /** - * Indicates an element's "grabbed" state in a drag-and-drop operation. - * @deprecated in ARIA 1.1 - */ - 'aria-grabbed'?: Booleanish; - /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ - 'aria-haspopup'?: Booleanish | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; - /** - * Indicates whether the element is exposed to an accessibility API. - * @see aria-disabled. - */ - 'aria-hidden'?: Booleanish; - /** - * Indicates the entered value does not conform to the format expected by the application. - * @see aria-errormessage. - */ - 'aria-invalid'?: Booleanish | 'grammar' | 'spelling'; - /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ - 'aria-keyshortcuts'?: string; - /** - * Defines a string value that labels the current element. - * @see aria-labelledby. - */ - 'aria-label'?: string; - /** - * Identifies the element (or elements) that labels the current element. - * @see aria-describedby. - */ - 'aria-labelledby'?: string; - /** Defines the hierarchical level of an element within a structure. */ - 'aria-level'?: Numberish; - /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ - 'aria-live'?: 'off' | 'assertive' | 'polite'; - /** Indicates whether an element is modal when displayed. */ - 'aria-modal'?: Booleanish; - /** Indicates whether a text box accepts multiple lines of input or only a single line. */ - 'aria-multiline'?: Booleanish; - /** Indicates that the user may select more than one item from the current selectable descendants. */ - 'aria-multiselectable'?: Booleanish; - /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ - 'aria-orientation'?: 'horizontal' | 'vertical'; - /** - * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship - * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. - * @see aria-controls. - */ - 'aria-owns'?: string; - /** - * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. - * A hint could be a sample value or a brief description of the expected format. - */ - 'aria-placeholder'?: string; - /** - * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - * @see aria-setsize. - */ - 'aria-posinset'?: Numberish; - /** - * Indicates the current "pressed" state of toggle buttons. - * @see aria-checked @see aria-selected. - */ - 'aria-pressed'?: Booleanish | 'mixed'; - /** - * Indicates that the element is not editable, but is otherwise operable. - * @see aria-disabled. - */ - 'aria-readonly'?: Booleanish; - /** - * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. - * @see aria-atomic. - */ - 'aria-relevant'?: 'additions' | 'additions removals' | 'additions text' | 'all' | 'removals' | 'removals additions' | 'removals text' | 'text' | 'text additions' | 'text removals'; - /** Indicates that user input is required on the element before a form may be submitted. */ - 'aria-required'?: Booleanish; - /** Defines a human-readable, author-localized description for the role of an element. */ - 'aria-roledescription'?: string; - /** - * Defines the total number of rows in a table, grid, or treegrid. - * @see aria-rowindex. - */ - 'aria-rowcount'?: Numberish; - /** - * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. - * @see aria-rowcount @see aria-rowspan. - */ - 'aria-rowindex'?: Numberish; - /** - * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. - * @see aria-rowindex @see aria-colspan. - */ - 'aria-rowspan'?: Numberish; - /** - * Indicates the current "selected" state of various widgets. - * @see aria-checked @see aria-pressed. - */ - 'aria-selected'?: Booleanish; - /** - * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - * @see aria-posinset. - */ - 'aria-setsize'?: Numberish; - /** Indicates if items in a table or grid are sorted in ascending or descending order. */ - 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'; - /** Defines the maximum allowed value for a range widget. */ - 'aria-valuemax'?: Numberish; - /** Defines the minimum allowed value for a range widget. */ - 'aria-valuemin'?: Numberish; - /** - * Defines the current value for a range widget. - * @see aria-valuetext. - */ - 'aria-valuenow'?: Numberish; - /** Defines the human readable text alternative of aria-valuenow for a range widget. */ - 'aria-valuetext'?: string; -} -export type StyleValue = false | null | undefined | string | CSSProperties | Array<StyleValue>; -export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> { - innerHTML?: string; - class?: any; - style?: StyleValue; - accesskey?: string; - contenteditable?: Booleanish | 'inherit' | 'plaintext-only'; - contextmenu?: string; - dir?: string; - draggable?: Booleanish; - hidden?: Booleanish | '' | 'hidden' | 'until-found'; - id?: string; - inert?: Booleanish; - lang?: string; - placeholder?: string; - spellcheck?: Booleanish; - tabindex?: Numberish; - title?: string; - translate?: 'yes' | 'no'; - radiogroup?: string; - role?: string; - about?: string; - datatype?: string; - inlist?: any; - prefix?: string; - property?: string; - resource?: string; - typeof?: string; - vocab?: string; - autocapitalize?: string; - autocorrect?: string; - autosave?: string; - color?: string; - itemprop?: string; - itemscope?: Booleanish; - itemtype?: string; - itemid?: string; - itemref?: string; - results?: Numberish; - security?: string; - unselectable?: 'on' | 'off'; - /** - * Hints at the type of data that might be entered by the user while editing the element or its contents - * @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute - */ - inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'; - /** - * Specify that a standard HTML element should behave like a defined custom built-in element - * @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is - */ - is?: string; -} -type HTMLAttributeReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url'; -export interface AnchorHTMLAttributes extends HTMLAttributes { - download?: any; - href?: string; - hreflang?: string; - media?: string; - ping?: string; - rel?: string; - target?: string; - type?: string; - referrerpolicy?: HTMLAttributeReferrerPolicy; -} -export interface AreaHTMLAttributes extends HTMLAttributes { - alt?: string; - coords?: string; - download?: any; - href?: string; - hreflang?: string; - media?: string; - referrerpolicy?: HTMLAttributeReferrerPolicy; - rel?: string; - shape?: string; - target?: string; -} -export interface AudioHTMLAttributes extends MediaHTMLAttributes { -} -export interface BaseHTMLAttributes extends HTMLAttributes { - href?: string; - target?: string; -} -export interface BlockquoteHTMLAttributes extends HTMLAttributes { - cite?: string; -} -export interface ButtonHTMLAttributes extends HTMLAttributes { - autofocus?: Booleanish; - disabled?: Booleanish; - form?: string; - formaction?: string; - formenctype?: string; - formmethod?: string; - formnovalidate?: Booleanish; - formtarget?: string; - name?: string; - type?: 'submit' | 'reset' | 'button'; - value?: string | ReadonlyArray<string> | number; -} -export interface CanvasHTMLAttributes extends HTMLAttributes { - height?: Numberish; - width?: Numberish; -} -export interface ColHTMLAttributes extends HTMLAttributes { - span?: Numberish; - width?: Numberish; -} -export interface ColgroupHTMLAttributes extends HTMLAttributes { - span?: Numberish; -} -export interface DataHTMLAttributes extends HTMLAttributes { - value?: string | ReadonlyArray<string> | number; -} -export interface DetailsHTMLAttributes extends HTMLAttributes { - name?: string; - open?: Booleanish; - onToggle?: (payload: ToggleEvent) => void; -} -export interface DelHTMLAttributes extends HTMLAttributes { - cite?: string; - datetime?: string; -} -export interface DialogHTMLAttributes extends HTMLAttributes { - open?: Booleanish; - onClose?: (payload: Event) => void; -} -export interface EmbedHTMLAttributes extends HTMLAttributes { - height?: Numberish; - src?: string; - type?: string; - width?: Numberish; -} -export interface FieldsetHTMLAttributes extends HTMLAttributes { - disabled?: Booleanish; - form?: string; - name?: string; -} -export interface FormHTMLAttributes extends HTMLAttributes { - acceptcharset?: string; - action?: string; - autocomplete?: string; - enctype?: string; - method?: string; - name?: string; - novalidate?: Booleanish; - target?: string; -} -export interface HtmlHTMLAttributes extends HTMLAttributes { - manifest?: string; -} -export interface IframeHTMLAttributes extends HTMLAttributes { - allow?: string; - allowfullscreen?: Booleanish; - allowtransparency?: Booleanish; - /** @deprecated */ - frameborder?: Numberish; - height?: Numberish; - loading?: 'eager' | 'lazy'; - /** @deprecated */ - marginheight?: Numberish; - /** @deprecated */ - marginwidth?: Numberish; - name?: string; - referrerpolicy?: HTMLAttributeReferrerPolicy; - sandbox?: string; - /** @deprecated */ - scrolling?: string; - seamless?: Booleanish; - src?: string; - srcdoc?: string; - width?: Numberish; -} -export interface ImgHTMLAttributes extends HTMLAttributes { - alt?: string; - crossorigin?: 'anonymous' | 'use-credentials' | ''; - decoding?: 'async' | 'auto' | 'sync'; - height?: Numberish; - loading?: 'eager' | 'lazy'; - referrerpolicy?: HTMLAttributeReferrerPolicy; - sizes?: string; - src?: string; - srcset?: string; - usemap?: string; - width?: Numberish; -} -export interface InsHTMLAttributes extends HTMLAttributes { - cite?: string; - datetime?: string; -} -export type InputTypeHTMLAttribute = 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' | (string & {}); -export interface InputHTMLAttributes extends HTMLAttributes { - accept?: string; - alt?: string; - autocomplete?: string; - autofocus?: Booleanish; - capture?: boolean | 'user' | 'environment'; - checked?: Booleanish | any[] | Set<any>; - crossorigin?: string; - disabled?: Booleanish; - enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'; - form?: string; - formaction?: string; - formenctype?: string; - formmethod?: string; - formnovalidate?: Booleanish; - formtarget?: string; - height?: Numberish; - indeterminate?: boolean; - list?: string; - max?: Numberish; - maxlength?: Numberish; - min?: Numberish; - minlength?: Numberish; - multiple?: Booleanish; - name?: string; - pattern?: string; - placeholder?: string; - readonly?: Booleanish; - required?: Booleanish; - size?: Numberish; - src?: string; - step?: Numberish; - type?: InputTypeHTMLAttribute; - value?: any; - width?: Numberish; -} -export interface KeygenHTMLAttributes extends HTMLAttributes { - autofocus?: Booleanish; - challenge?: string; - disabled?: Booleanish; - form?: string; - keytype?: string; - keyparams?: string; - name?: string; -} -export interface LabelHTMLAttributes extends HTMLAttributes { - for?: string; - form?: string; -} -export interface LiHTMLAttributes extends HTMLAttributes { - value?: string | ReadonlyArray<string> | number; -} -export interface LinkHTMLAttributes extends HTMLAttributes { - as?: string; - crossorigin?: string; - href?: string; - hreflang?: string; - integrity?: string; - media?: string; - referrerpolicy?: HTMLAttributeReferrerPolicy; - rel?: string; - sizes?: string; - type?: string; - charset?: string; -} -export interface MapHTMLAttributes extends HTMLAttributes { - name?: string; -} -export interface MenuHTMLAttributes extends HTMLAttributes { - type?: string; -} -export interface MediaHTMLAttributes extends HTMLAttributes { - autoplay?: Booleanish; - controls?: Booleanish; - controlslist?: string; - crossorigin?: string; - loop?: Booleanish; - mediagroup?: string; - muted?: Booleanish; - playsinline?: Booleanish; - preload?: string; - src?: string; -} -export interface MetaHTMLAttributes extends HTMLAttributes { - charset?: string; - content?: string; - httpequiv?: string; - name?: string; -} -export interface MeterHTMLAttributes extends HTMLAttributes { - form?: string; - high?: Numberish; - low?: Numberish; - max?: Numberish; - min?: Numberish; - optimum?: Numberish; - value?: string | ReadonlyArray<string> | number; -} -export interface QuoteHTMLAttributes extends HTMLAttributes { - cite?: string; -} -export interface ObjectHTMLAttributes extends HTMLAttributes { - classid?: string; - data?: string; - form?: string; - height?: Numberish; - name?: string; - type?: string; - usemap?: string; - width?: Numberish; - wmode?: string; -} -export interface OlHTMLAttributes extends HTMLAttributes { - reversed?: Booleanish; - start?: Numberish; - type?: '1' | 'a' | 'A' | 'i' | 'I'; -} -export interface OptgroupHTMLAttributes extends HTMLAttributes { - disabled?: Booleanish; - label?: string; -} -export interface OptionHTMLAttributes extends HTMLAttributes { - disabled?: Booleanish; - label?: string; - selected?: Booleanish; - value?: any; -} -export interface OutputHTMLAttributes extends HTMLAttributes { - for?: string; - form?: string; - name?: string; -} -export interface ParamHTMLAttributes extends HTMLAttributes { - name?: string; - value?: string | ReadonlyArray<string> | number; -} -export interface ProgressHTMLAttributes extends HTMLAttributes { - max?: Numberish; - value?: string | ReadonlyArray<string> | number; -} -export interface ScriptHTMLAttributes extends HTMLAttributes { - async?: Booleanish; - /** @deprecated */ - charset?: string; - crossorigin?: string; - defer?: Booleanish; - integrity?: string; - nomodule?: Booleanish; - referrerpolicy?: HTMLAttributeReferrerPolicy; - nonce?: string; - src?: string; - type?: string; -} -export interface SelectHTMLAttributes extends HTMLAttributes { - autocomplete?: string; - autofocus?: Booleanish; - disabled?: Booleanish; - form?: string; - multiple?: Booleanish; - name?: string; - required?: Booleanish; - size?: Numberish; - value?: any; -} -export interface SourceHTMLAttributes extends HTMLAttributes { - media?: string; - sizes?: string; - src?: string; - srcset?: string; - type?: string; -} -export interface StyleHTMLAttributes extends HTMLAttributes { - media?: string; - nonce?: string; - scoped?: Booleanish; - type?: string; -} -export interface TableHTMLAttributes extends HTMLAttributes { - cellpadding?: Numberish; - cellspacing?: Numberish; - summary?: string; - width?: Numberish; -} -export interface TextareaHTMLAttributes extends HTMLAttributes { - autocomplete?: string; - autofocus?: Booleanish; - cols?: Numberish; - dirname?: string; - disabled?: Booleanish; - form?: string; - maxlength?: Numberish; - minlength?: Numberish; - name?: string; - placeholder?: string; - readonly?: Booleanish; - required?: Booleanish; - rows?: Numberish; - value?: string | ReadonlyArray<string> | number | null; - wrap?: string; -} -export interface TdHTMLAttributes extends HTMLAttributes { - align?: 'left' | 'center' | 'right' | 'justify' | 'char'; - colspan?: Numberish; - headers?: string; - rowspan?: Numberish; - scope?: string; - abbr?: string; - height?: Numberish; - width?: Numberish; - valign?: 'top' | 'middle' | 'bottom' | 'baseline'; -} -export interface ThHTMLAttributes extends HTMLAttributes { - align?: 'left' | 'center' | 'right' | 'justify' | 'char'; - colspan?: Numberish; - headers?: string; - rowspan?: Numberish; - scope?: string; - abbr?: string; -} -export interface TimeHTMLAttributes extends HTMLAttributes { - datetime?: string; -} -export interface TrackHTMLAttributes extends HTMLAttributes { - default?: Booleanish; - kind?: string; - label?: string; - src?: string; - srclang?: string; -} -export interface VideoHTMLAttributes extends MediaHTMLAttributes { - height?: Numberish; - playsinline?: Booleanish; - poster?: string; - width?: Numberish; - disablePictureInPicture?: Booleanish; - disableRemotePlayback?: Booleanish; -} -export interface WebViewHTMLAttributes extends HTMLAttributes { - allowfullscreen?: Booleanish; - allowpopups?: Booleanish; - autoFocus?: Booleanish; - autosize?: Booleanish; - blinkfeatures?: string; - disableblinkfeatures?: string; - disableguestresize?: Booleanish; - disablewebsecurity?: Booleanish; - guestinstance?: string; - httpreferrer?: string; - nodeintegration?: Booleanish; - partition?: string; - plugins?: Booleanish; - preload?: string; - src?: string; - useragent?: string; - webpreferences?: string; -} -export interface SVGAttributes extends AriaAttributes, EventHandlers<Events> { - innerHTML?: string; - /** - * SVG Styling Attributes - * @see https://www.w3.org/TR/SVG/styling.html#ElementSpecificStyling - */ - class?: any; - style?: StyleValue; - color?: string; - height?: Numberish; - id?: string; - lang?: string; - max?: Numberish; - media?: string; - method?: string; - min?: Numberish; - name?: string; - target?: string; - type?: string; - width?: Numberish; - role?: string; - tabindex?: Numberish; - crossOrigin?: 'anonymous' | 'use-credentials' | ''; - 'accent-height'?: Numberish; - accumulate?: 'none' | 'sum'; - additive?: 'replace' | 'sum'; - 'alignment-baseline'?: 'auto' | 'baseline' | 'before-edge' | 'text-before-edge' | 'middle' | 'central' | 'after-edge' | 'text-after-edge' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'inherit'; - allowReorder?: 'no' | 'yes'; - alphabetic?: Numberish; - amplitude?: Numberish; - 'arabic-form'?: 'initial' | 'medial' | 'terminal' | 'isolated'; - ascent?: Numberish; - attributeName?: string; - attributeType?: string; - autoReverse?: Numberish; - azimuth?: Numberish; - baseFrequency?: Numberish; - 'baseline-shift'?: Numberish; - baseProfile?: Numberish; - bbox?: Numberish; - begin?: Numberish; - bias?: Numberish; - by?: Numberish; - calcMode?: Numberish; - 'cap-height'?: Numberish; - clip?: Numberish; - 'clip-path'?: string; - clipPathUnits?: Numberish; - 'clip-rule'?: Numberish; - 'color-interpolation'?: Numberish; - 'color-interpolation-filters'?: 'auto' | 'sRGB' | 'linearRGB' | 'inherit'; - 'color-profile'?: Numberish; - 'color-rendering'?: Numberish; - contentScriptType?: Numberish; - contentStyleType?: Numberish; - cursor?: Numberish; - cx?: Numberish; - cy?: Numberish; - d?: string; - decelerate?: Numberish; - descent?: Numberish; - diffuseConstant?: Numberish; - direction?: Numberish; - display?: Numberish; - divisor?: Numberish; - 'dominant-baseline'?: Numberish; - dur?: Numberish; - dx?: Numberish; - dy?: Numberish; - edgeMode?: Numberish; - elevation?: Numberish; - 'enable-background'?: Numberish; - end?: Numberish; - exponent?: Numberish; - externalResourcesRequired?: Numberish; - fill?: string; - 'fill-opacity'?: Numberish; - 'fill-rule'?: 'nonzero' | 'evenodd' | 'inherit'; - filter?: string; - filterRes?: Numberish; - filterUnits?: Numberish; - 'flood-color'?: Numberish; - 'flood-opacity'?: Numberish; - focusable?: Numberish; - 'font-family'?: string; - 'font-size'?: Numberish; - 'font-size-adjust'?: Numberish; - 'font-stretch'?: Numberish; - 'font-style'?: Numberish; - 'font-variant'?: Numberish; - 'font-weight'?: Numberish; - format?: Numberish; - from?: Numberish; - fx?: Numberish; - fy?: Numberish; - g1?: Numberish; - g2?: Numberish; - 'glyph-name'?: Numberish; - 'glyph-orientation-horizontal'?: Numberish; - 'glyph-orientation-vertical'?: Numberish; - glyphRef?: Numberish; - gradientTransform?: string; - gradientUnits?: string; - hanging?: Numberish; - 'horiz-adv-x'?: Numberish; - 'horiz-origin-x'?: Numberish; - href?: string; - ideographic?: Numberish; - 'image-rendering'?: Numberish; - in2?: Numberish; - in?: string; - intercept?: Numberish; - k1?: Numberish; - k2?: Numberish; - k3?: Numberish; - k4?: Numberish; - k?: Numberish; - kernelMatrix?: Numberish; - kernelUnitLength?: Numberish; - kerning?: Numberish; - keyPoints?: Numberish; - keySplines?: Numberish; - keyTimes?: Numberish; - lengthAdjust?: Numberish; - 'letter-spacing'?: Numberish; - 'lighting-color'?: Numberish; - limitingConeAngle?: Numberish; - local?: Numberish; - 'marker-end'?: string; - markerHeight?: Numberish; - 'marker-mid'?: string; - 'marker-start'?: string; - markerUnits?: Numberish; - markerWidth?: Numberish; - mask?: string; - maskContentUnits?: Numberish; - maskUnits?: Numberish; - mathematical?: Numberish; - mode?: Numberish; - numOctaves?: Numberish; - offset?: Numberish; - opacity?: Numberish; - operator?: Numberish; - order?: Numberish; - orient?: Numberish; - orientation?: Numberish; - origin?: Numberish; - overflow?: Numberish; - 'overline-position'?: Numberish; - 'overline-thickness'?: Numberish; - 'paint-order'?: Numberish; - 'panose-1'?: Numberish; - pathLength?: Numberish; - patternContentUnits?: string; - patternTransform?: Numberish; - patternUnits?: string; - 'pointer-events'?: Numberish; - points?: string; - pointsAtX?: Numberish; - pointsAtY?: Numberish; - pointsAtZ?: Numberish; - preserveAlpha?: Numberish; - preserveAspectRatio?: string; - primitiveUnits?: Numberish; - r?: Numberish; - radius?: Numberish; - refX?: Numberish; - refY?: Numberish; - renderingIntent?: Numberish; - repeatCount?: Numberish; - repeatDur?: Numberish; - requiredExtensions?: Numberish; - requiredFeatures?: Numberish; - restart?: Numberish; - result?: string; - rotate?: Numberish; - rx?: Numberish; - ry?: Numberish; - scale?: Numberish; - seed?: Numberish; - 'shape-rendering'?: Numberish; - slope?: Numberish; - spacing?: Numberish; - specularConstant?: Numberish; - specularExponent?: Numberish; - speed?: Numberish; - spreadMethod?: string; - startOffset?: Numberish; - stdDeviation?: Numberish; - stemh?: Numberish; - stemv?: Numberish; - stitchTiles?: Numberish; - 'stop-color'?: string; - 'stop-opacity'?: Numberish; - 'strikethrough-position'?: Numberish; - 'strikethrough-thickness'?: Numberish; - string?: Numberish; - stroke?: string; - 'stroke-dasharray'?: Numberish; - 'stroke-dashoffset'?: Numberish; - 'stroke-linecap'?: 'butt' | 'round' | 'square' | 'inherit'; - 'stroke-linejoin'?: 'miter' | 'round' | 'bevel' | 'inherit'; - 'stroke-miterlimit'?: Numberish; - 'stroke-opacity'?: Numberish; - 'stroke-width'?: Numberish; - surfaceScale?: Numberish; - systemLanguage?: Numberish; - tableValues?: Numberish; - targetX?: Numberish; - targetY?: Numberish; - 'text-anchor'?: string; - 'text-decoration'?: Numberish; - textLength?: Numberish; - 'text-rendering'?: Numberish; - to?: Numberish; - transform?: string; - u1?: Numberish; - u2?: Numberish; - 'underline-position'?: Numberish; - 'underline-thickness'?: Numberish; - unicode?: Numberish; - 'unicode-bidi'?: Numberish; - 'unicode-range'?: Numberish; - 'unitsPer-em'?: Numberish; - 'v-alphabetic'?: Numberish; - values?: string; - 'vector-effect'?: Numberish; - version?: string; - 'vert-adv-y'?: Numberish; - 'vert-origin-x'?: Numberish; - 'vert-origin-y'?: Numberish; - 'v-hanging'?: Numberish; - 'v-ideographic'?: Numberish; - viewBox?: string; - viewTarget?: Numberish; - visibility?: Numberish; - 'v-mathematical'?: Numberish; - widths?: Numberish; - 'word-spacing'?: Numberish; - 'writing-mode'?: Numberish; - x1?: Numberish; - x2?: Numberish; - x?: Numberish; - xChannelSelector?: string; - 'x-height'?: Numberish; - xlinkActuate?: string; - xlinkArcrole?: string; - xlinkHref?: string; - xlinkRole?: string; - xlinkShow?: string; - xlinkTitle?: string; - xlinkType?: string; - xmlns?: string; - xmlnsXlink?: string; - y1?: Numberish; - y2?: Numberish; - y?: Numberish; - yChannelSelector?: string; - z?: Numberish; - zoomAndPan?: string; -} -export interface IntrinsicElementAttributes { - a: AnchorHTMLAttributes; - abbr: HTMLAttributes; - address: HTMLAttributes; - area: AreaHTMLAttributes; - article: HTMLAttributes; - aside: HTMLAttributes; - audio: AudioHTMLAttributes; - b: HTMLAttributes; - base: BaseHTMLAttributes; - bdi: HTMLAttributes; - bdo: HTMLAttributes; - blockquote: BlockquoteHTMLAttributes; - body: HTMLAttributes; - br: HTMLAttributes; - button: ButtonHTMLAttributes; - canvas: CanvasHTMLAttributes; - caption: HTMLAttributes; - cite: HTMLAttributes; - code: HTMLAttributes; - col: ColHTMLAttributes; - colgroup: ColgroupHTMLAttributes; - data: DataHTMLAttributes; - datalist: HTMLAttributes; - dd: HTMLAttributes; - del: DelHTMLAttributes; - details: DetailsHTMLAttributes; - dfn: HTMLAttributes; - dialog: DialogHTMLAttributes; - div: HTMLAttributes; - dl: HTMLAttributes; - dt: HTMLAttributes; - em: HTMLAttributes; - embed: EmbedHTMLAttributes; - fieldset: FieldsetHTMLAttributes; - figcaption: HTMLAttributes; - figure: HTMLAttributes; - footer: HTMLAttributes; - form: FormHTMLAttributes; - h1: HTMLAttributes; - h2: HTMLAttributes; - h3: HTMLAttributes; - h4: HTMLAttributes; - h5: HTMLAttributes; - h6: HTMLAttributes; - head: HTMLAttributes; - header: HTMLAttributes; - hgroup: HTMLAttributes; - hr: HTMLAttributes; - html: HtmlHTMLAttributes; - i: HTMLAttributes; - iframe: IframeHTMLAttributes; - img: ImgHTMLAttributes; - input: InputHTMLAttributes; - ins: InsHTMLAttributes; - kbd: HTMLAttributes; - keygen: KeygenHTMLAttributes; - label: LabelHTMLAttributes; - legend: HTMLAttributes; - li: LiHTMLAttributes; - link: LinkHTMLAttributes; - main: HTMLAttributes; - map: MapHTMLAttributes; - mark: HTMLAttributes; - menu: MenuHTMLAttributes; - meta: MetaHTMLAttributes; - meter: MeterHTMLAttributes; - nav: HTMLAttributes; - noindex: HTMLAttributes; - noscript: HTMLAttributes; - object: ObjectHTMLAttributes; - ol: OlHTMLAttributes; - optgroup: OptgroupHTMLAttributes; - option: OptionHTMLAttributes; - output: OutputHTMLAttributes; - p: HTMLAttributes; - param: ParamHTMLAttributes; - picture: HTMLAttributes; - pre: HTMLAttributes; - progress: ProgressHTMLAttributes; - q: QuoteHTMLAttributes; - rp: HTMLAttributes; - rt: HTMLAttributes; - ruby: HTMLAttributes; - s: HTMLAttributes; - samp: HTMLAttributes; - script: ScriptHTMLAttributes; - section: HTMLAttributes; - select: SelectHTMLAttributes; - small: HTMLAttributes; - source: SourceHTMLAttributes; - span: HTMLAttributes; - strong: HTMLAttributes; - style: StyleHTMLAttributes; - sub: HTMLAttributes; - summary: HTMLAttributes; - sup: HTMLAttributes; - table: TableHTMLAttributes; - template: HTMLAttributes; - tbody: HTMLAttributes; - td: TdHTMLAttributes; - textarea: TextareaHTMLAttributes; - tfoot: HTMLAttributes; - th: ThHTMLAttributes; - thead: HTMLAttributes; - time: TimeHTMLAttributes; - title: HTMLAttributes; - tr: HTMLAttributes; - track: TrackHTMLAttributes; - u: HTMLAttributes; - ul: HTMLAttributes; - var: HTMLAttributes; - video: VideoHTMLAttributes; - wbr: HTMLAttributes; - webview: WebViewHTMLAttributes; - svg: SVGAttributes; - animate: SVGAttributes; - animateMotion: SVGAttributes; - animateTransform: SVGAttributes; - circle: SVGAttributes; - clipPath: SVGAttributes; - defs: SVGAttributes; - desc: SVGAttributes; - ellipse: SVGAttributes; - feBlend: SVGAttributes; - feColorMatrix: SVGAttributes; - feComponentTransfer: SVGAttributes; - feComposite: SVGAttributes; - feConvolveMatrix: SVGAttributes; - feDiffuseLighting: SVGAttributes; - feDisplacementMap: SVGAttributes; - feDistantLight: SVGAttributes; - feDropShadow: SVGAttributes; - feFlood: SVGAttributes; - feFuncA: SVGAttributes; - feFuncB: SVGAttributes; - feFuncG: SVGAttributes; - feFuncR: SVGAttributes; - feGaussianBlur: SVGAttributes; - feImage: SVGAttributes; - feMerge: SVGAttributes; - feMergeNode: SVGAttributes; - feMorphology: SVGAttributes; - feOffset: SVGAttributes; - fePointLight: SVGAttributes; - feSpecularLighting: SVGAttributes; - feSpotLight: SVGAttributes; - feTile: SVGAttributes; - feTurbulence: SVGAttributes; - filter: SVGAttributes; - foreignObject: SVGAttributes; - g: SVGAttributes; - image: SVGAttributes; - line: SVGAttributes; - linearGradient: SVGAttributes; - marker: SVGAttributes; - mask: SVGAttributes; - metadata: SVGAttributes; - mpath: SVGAttributes; - path: SVGAttributes; - pattern: SVGAttributes; - polygon: SVGAttributes; - polyline: SVGAttributes; - radialGradient: SVGAttributes; - rect: SVGAttributes; - stop: SVGAttributes; - switch: SVGAttributes; - symbol: SVGAttributes; - text: SVGAttributes; - textPath: SVGAttributes; - tspan: SVGAttributes; - use: SVGAttributes; - view: SVGAttributes; -} -export interface Events { - onCopy: ClipboardEvent; - onCut: ClipboardEvent; - onPaste: ClipboardEvent; - onCompositionend: CompositionEvent; - onCompositionstart: CompositionEvent; - onCompositionupdate: CompositionEvent; - onDrag: DragEvent; - onDragend: DragEvent; - onDragenter: DragEvent; - onDragexit: DragEvent; - onDragleave: DragEvent; - onDragover: DragEvent; - onDragstart: DragEvent; - onDrop: DragEvent; - onFocus: FocusEvent; - onFocusin: FocusEvent; - onFocusout: FocusEvent; - onBlur: FocusEvent; - onChange: Event; - onBeforeinput: Event; - onInput: Event; - onReset: Event; - onSubmit: Event; - onInvalid: Event; - onLoad: Event; - onError: Event; - onKeydown: KeyboardEvent; - onKeypress: KeyboardEvent; - onKeyup: KeyboardEvent; - onAuxclick: MouseEvent; - onClick: MouseEvent; - onContextmenu: MouseEvent; - onDblclick: MouseEvent; - onMousedown: MouseEvent; - onMouseenter: MouseEvent; - onMouseleave: MouseEvent; - onMousemove: MouseEvent; - onMouseout: MouseEvent; - onMouseover: MouseEvent; - onMouseup: MouseEvent; - onAbort: Event; - onCanplay: Event; - onCanplaythrough: Event; - onDurationchange: Event; - onEmptied: Event; - onEncrypted: Event; - onEnded: Event; - onLoadeddata: Event; - onLoadedmetadata: Event; - onLoadstart: Event; - onPause: Event; - onPlay: Event; - onPlaying: Event; - onProgress: Event; - onRatechange: Event; - onSeeked: Event; - onSeeking: Event; - onStalled: Event; - onSuspend: Event; - onTimeupdate: Event; - onVolumechange: Event; - onWaiting: Event; - onSelect: Event; - onScroll: Event; - onScrollend: Event; - onTouchcancel: TouchEvent; - onTouchend: TouchEvent; - onTouchmove: TouchEvent; - onTouchstart: TouchEvent; - onPointerdown: PointerEvent; - onPointermove: PointerEvent; - onPointerup: PointerEvent; - onPointercancel: PointerEvent; - onPointerenter: PointerEvent; - onPointerleave: PointerEvent; - onPointerover: PointerEvent; - onPointerout: PointerEvent; - onWheel: WheelEvent; - onAnimationstart: AnimationEvent; - onAnimationend: AnimationEvent; - onAnimationiteration: AnimationEvent; - onTransitionend: TransitionEvent; - onTransitionstart: TransitionEvent; -} -type EventHandlers<E> = { - [K in keyof E]?: E[K] extends (...args: any) => any ? E[K] : (payload: E[K]) => void; -}; - -export type ReservedProps = { - key?: PropertyKey; - ref?: VNodeRef; - ref_for?: boolean; - ref_key?: string; -}; -export type NativeElements = { - [K in keyof IntrinsicElementAttributes]: IntrinsicElementAttributes[K] & ReservedProps; -}; - -/** - * This is a stub implementation to prevent the need to use dom types. - * - * To enable proper types, add `"dom"` to `"lib"` in your `tsconfig.json`. - */ -type DomStub = {}; -type DomType<T> = typeof globalThis extends { - window: unknown; -} ? T : DomStub; -declare module '@vue/reactivity' { - interface RefUnwrapBailTypes { - runtimeDOMBailTypes: DomType<Node | Window>; - } -} -declare module '@vue/runtime-core' { - interface GlobalComponents { - Transition: DefineComponent<TransitionProps>; - TransitionGroup: DefineComponent<TransitionGroupProps>; - } - interface GlobalDirectives { - vShow: typeof vShow; - vOn: VOnDirective; - vBind: VModelDirective; - vIf: Directive<any, boolean>; - VOnce: Directive; - VSlot: Directive; - } -} -export declare const render: RootRenderFunction<Element | ShadowRoot>; -export declare const hydrate: RootHydrateFunction; -export declare const createApp: CreateAppFunction<Element>; -export declare const createSSRApp: CreateAppFunction<Element>; - diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js deleted file mode 100644 index 52f8775..0000000 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js +++ /dev/null @@ -1,12332 +0,0 @@ -/** -* @vue/runtime-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function makeMap(str) { - const map = /* @__PURE__ */ Object.create(null); - for (const key of str.split(",")) map[key] = 1; - return (val) => val in map; -} - -const EMPTY_OBJ = Object.freeze({}) ; -const EMPTY_ARR = Object.freeze([]) ; -const NOOP = () => { -}; -const NO = () => false; -const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter -(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); -const isModelListener = (key) => key.startsWith("onUpdate:"); -const extend = Object.assign; -const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } -}; -const hasOwnProperty$1 = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); -const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === "[object Map]"; -const isSet = (val) => toTypeString(val) === "[object Set]"; -const isDate = (val) => toTypeString(val) === "[object Date]"; -const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; -const isFunction = (val) => typeof val === "function"; -const isString = (val) => typeof val === "string"; -const isSymbol = (val) => typeof val === "symbol"; -const isObject = (val) => val !== null && typeof val === "object"; -const isPromise = (val) => { - return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); -}; -const objectToString = Object.prototype.toString; -const toTypeString = (value) => objectToString.call(value); -const toRawType = (value) => { - return toTypeString(value).slice(8, -1); -}; -const isPlainObject = (val) => toTypeString(val) === "[object Object]"; -const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; -const isReservedProp = /* @__PURE__ */ makeMap( - // the leading comma is intentional so empty string "" is also included - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" -); -const isBuiltInDirective = /* @__PURE__ */ makeMap( - "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" -); -const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -const camelizeRE = /-(\w)/g; -const camelize = cacheStringFunction( - (str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); - } -); -const hyphenateRE = /\B([A-Z])/g; -const hyphenate = cacheStringFunction( - (str) => str.replace(hyphenateRE, "-$1").toLowerCase() -); -const capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); -}); -const toHandlerKey = cacheStringFunction( - (str) => { - const s = str ? `on${capitalize(str)}` : ``; - return s; - } -); -const hasChanged = (value, oldValue) => !Object.is(value, oldValue); -const invokeArrayFns = (fns, ...arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](...arg); - } -}; -const def = (obj, key, value, writable = false) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - writable, - value - }); -}; -const looseToNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; -}; -const toNumber = (val) => { - const n = isString(val) ? Number(val) : NaN; - return isNaN(n) ? val : n; -}; -let _globalThis; -const getGlobalThis = () => { - return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); -}; - -const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; -const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); - -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } else if (isString(value) || isObject(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:([^]+)/; -const styleCommentRE = /\/\*[^]*?\*\//g; -function parseStringStyle(cssText) { - const ret = {}; - cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function stringifyStyle(styles) { - if (!styles) return ""; - if (isString(styles)) return styles; - let ret = ""; - for (const key in styles) { - const value = styles[key]; - if (isString(value) || typeof value === "number") { - const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); - ret += `${normalizedKey}:${value};`; - } - } - return ret; -} -function normalizeClass(value) { - let res = ""; - if (isString(value)) { - res = value; - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + " "; - } - } - } else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + " "; - } - } - } - return res.trim(); -} -function normalizeProps(props) { - if (!props) return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; -} - -const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; -const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; -const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; -const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); -const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); -const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); - -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); -const isBooleanAttr = /* @__PURE__ */ makeMap( - specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` -); -function includeBooleanAttr(value) { - return !!value || value === ""; -} -const isKnownHtmlAttr = /* @__PURE__ */ makeMap( - `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` -); -const isKnownSvgAttr = /* @__PURE__ */ makeMap( - `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` -); -function isRenderableAttrValue(value) { - if (value == null) { - return false; - } - const type = typeof value; - return type === "string" || type === "number" || type === "boolean"; -} - -const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; -function getEscapedCssVarName(key, doubleEscape) { - return key.replace( - cssVarNameEscapeSymbolsRE, - (s) => `\\${s}` - ); -} - -function looseCompareArrays(a, b) { - if (a.length !== b.length) return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex((item) => looseEqual(item, val)); -} - -const isRef$1 = (val) => { - return !!(val && val["__v_isRef"] === true); -}; -const toDisplayString = (val) => { - return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); -}; -const replacer = (_key, val) => { - if (isRef$1(val)) { - return replacer(_key, val.value); - } else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce( - (entries, [key, val2], i) => { - entries[stringifySymbol(key, i) + " =>"] = val2; - return entries; - }, - {} - ) - }; - } else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) - }; - } else if (isSymbol(val)) { - return stringifySymbol(val); - } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; -const stringifySymbol = (v, i = "") => { - var _a; - return ( - // Symbol.description in es2019+ so we need to cast here to pass - // the lib: es2016 check - isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v - ); -}; - -function warn$2(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); -} - -let activeEffectScope; -class EffectScope { - constructor(detached = false) { - this.detached = detached; - /** - * @internal - */ - this._active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - this._isPaused = false; - this.parent = activeEffectScope; - if (!detached && activeEffectScope) { - this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( - this - ) - 1; - } - } - get active() { - return this._active; - } - pause() { - if (this._active) { - this._isPaused = true; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].pause(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].pause(); - } - } - } - /** - * Resumes the effect scope, including all child scopes and effects. - */ - resume() { - if (this._active) { - if (this._isPaused) { - this._isPaused = false; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].resume(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].resume(); - } - } - } - } - run(fn) { - if (this._active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } finally { - activeEffectScope = currentEffectScope; - } - } else { - warn$2(`cannot run an inactive effect scope.`); - } - } - /** - * This should only be called on non-detached scopes - * @internal - */ - on() { - activeEffectScope = this; - } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this._active) { - this._active = false; - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - this.effects.length = 0; - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - this.cleanups.length = 0; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - this.scopes.length = 0; - } - if (!this.detached && this.parent && !fromParent) { - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.parent = void 0; - } - } -} -function effectScope(detached) { - return new EffectScope(detached); -} -function getCurrentScope() { - return activeEffectScope; -} -function onScopeDispose(fn, failSilently = false) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } else if (!failSilently) { - warn$2( - `onScopeDispose() is called when there is no active effect scope to be associated with.` - ); - } -} - -let activeSub; -const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); -class ReactiveEffect { - constructor(fn) { - this.fn = fn; - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 1 | 4; - /** - * @internal - */ - this.next = void 0; - /** - * @internal - */ - this.cleanup = void 0; - this.scheduler = void 0; - if (activeEffectScope && activeEffectScope.active) { - activeEffectScope.effects.push(this); - } - } - pause() { - this.flags |= 64; - } - resume() { - if (this.flags & 64) { - this.flags &= ~64; - if (pausedQueueEffects.has(this)) { - pausedQueueEffects.delete(this); - this.trigger(); - } - } - } - /** - * @internal - */ - notify() { - if (this.flags & 2 && !(this.flags & 32)) { - return; - } - if (!(this.flags & 8)) { - batch(this); - } - } - run() { - if (!(this.flags & 1)) { - return this.fn(); - } - this.flags |= 2; - cleanupEffect(this); - prepareDeps(this); - const prevEffect = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = this; - shouldTrack = true; - try { - return this.fn(); - } finally { - if (activeSub !== this) { - warn$2( - "Active effect was not restored correctly - this is likely a Vue internal bug." - ); - } - cleanupDeps(this); - activeSub = prevEffect; - shouldTrack = prevShouldTrack; - this.flags &= ~2; - } - } - stop() { - if (this.flags & 1) { - for (let link = this.deps; link; link = link.nextDep) { - removeSub(link); - } - this.deps = this.depsTail = void 0; - cleanupEffect(this); - this.onStop && this.onStop(); - this.flags &= ~1; - } - } - trigger() { - if (this.flags & 64) { - pausedQueueEffects.add(this); - } else if (this.scheduler) { - this.scheduler(); - } else { - this.runIfDirty(); - } - } - /** - * @internal - */ - runIfDirty() { - if (isDirty(this)) { - this.run(); - } - } - get dirty() { - return isDirty(this); - } -} -let batchDepth = 0; -let batchedSub; -let batchedComputed; -function batch(sub, isComputed = false) { - sub.flags |= 8; - if (isComputed) { - sub.next = batchedComputed; - batchedComputed = sub; - return; - } - sub.next = batchedSub; - batchedSub = sub; -} -function startBatch() { - batchDepth++; -} -function endBatch() { - if (--batchDepth > 0) { - return; - } - if (batchedComputed) { - let e = batchedComputed; - batchedComputed = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - e = next; - } - } - let error; - while (batchedSub) { - let e = batchedSub; - batchedSub = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - if (e.flags & 1) { - try { - ; - e.trigger(); - } catch (err) { - if (!error) error = err; - } - } - e = next; - } - } - if (error) throw error; -} -function prepareDeps(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - link.version = -1; - link.prevActiveLink = link.dep.activeLink; - link.dep.activeLink = link; - } -} -function cleanupDeps(sub) { - let head; - let tail = sub.depsTail; - let link = tail; - while (link) { - const prev = link.prevDep; - if (link.version === -1) { - if (link === tail) tail = prev; - removeSub(link); - removeDep(link); - } else { - head = link; - } - link.dep.activeLink = link.prevActiveLink; - link.prevActiveLink = void 0; - link = prev; - } - sub.deps = head; - sub.depsTail = tail; -} -function isDirty(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { - return true; - } - } - if (sub._dirty) { - return true; - } - return false; -} -function refreshComputed(computed) { - if (computed.flags & 4 && !(computed.flags & 16)) { - return; - } - computed.flags &= ~16; - if (computed.globalVersion === globalVersion) { - return; - } - computed.globalVersion = globalVersion; - const dep = computed.dep; - computed.flags |= 2; - if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { - computed.flags &= ~2; - return; - } - const prevSub = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = computed; - shouldTrack = true; - try { - prepareDeps(computed); - const value = computed.fn(computed._value); - if (dep.version === 0 || hasChanged(value, computed._value)) { - computed._value = value; - dep.version++; - } - } catch (err) { - dep.version++; - throw err; - } finally { - activeSub = prevSub; - shouldTrack = prevShouldTrack; - cleanupDeps(computed); - computed.flags &= ~2; - } -} -function removeSub(link, soft = false) { - const { dep, prevSub, nextSub } = link; - if (prevSub) { - prevSub.nextSub = nextSub; - link.prevSub = void 0; - } - if (nextSub) { - nextSub.prevSub = prevSub; - link.nextSub = void 0; - } - if (dep.subsHead === link) { - dep.subsHead = nextSub; - } - if (dep.subs === link) { - dep.subs = prevSub; - if (!prevSub && dep.computed) { - dep.computed.flags &= ~4; - for (let l = dep.computed.deps; l; l = l.nextDep) { - removeSub(l, true); - } - } - } - if (!soft && !--dep.sc && dep.map) { - dep.map.delete(dep.key); - } -} -function removeDep(link) { - const { prevDep, nextDep } = link; - if (prevDep) { - prevDep.nextDep = nextDep; - link.prevDep = void 0; - } - if (nextDep) { - nextDep.prevDep = prevDep; - link.nextDep = void 0; - } -} -function effect(fn, options) { - if (fn.effect instanceof ReactiveEffect) { - fn = fn.effect.fn; - } - const e = new ReactiveEffect(fn); - if (options) { - extend(e, options); - } - try { - e.run(); - } catch (err) { - e.stop(); - throw err; - } - const runner = e.run.bind(e); - runner.effect = e; - return runner; -} -function stop(runner) { - runner.effect.stop(); -} -let shouldTrack = true; -const trackStack = []; -function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; -} -function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === void 0 ? true : last; -} -function cleanupEffect(e) { - const { cleanup } = e; - e.cleanup = void 0; - if (cleanup) { - const prevSub = activeSub; - activeSub = void 0; - try { - cleanup(); - } finally { - activeSub = prevSub; - } - } -} - -let globalVersion = 0; -class Link { - constructor(sub, dep) { - this.sub = sub; - this.dep = dep; - this.version = dep.version; - this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; - } -} -class Dep { - constructor(computed) { - this.computed = computed; - this.version = 0; - /** - * Link between this dep and the current active effect - */ - this.activeLink = void 0; - /** - * Doubly linked list representing the subscribing effects (tail) - */ - this.subs = void 0; - /** - * For object property deps cleanup - */ - this.map = void 0; - this.key = void 0; - /** - * Subscriber counter - */ - this.sc = 0; - { - this.subsHead = void 0; - } - } - track(debugInfo) { - if (!activeSub || !shouldTrack || activeSub === this.computed) { - return; - } - let link = this.activeLink; - if (link === void 0 || link.sub !== activeSub) { - link = this.activeLink = new Link(activeSub, this); - if (!activeSub.deps) { - activeSub.deps = activeSub.depsTail = link; - } else { - link.prevDep = activeSub.depsTail; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - } - addSub(link); - } else if (link.version === -1) { - link.version = this.version; - if (link.nextDep) { - const next = link.nextDep; - next.prevDep = link.prevDep; - if (link.prevDep) { - link.prevDep.nextDep = next; - } - link.prevDep = activeSub.depsTail; - link.nextDep = void 0; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - if (activeSub.deps === link) { - activeSub.deps = next; - } - } - } - if (activeSub.onTrack) { - activeSub.onTrack( - extend( - { - effect: activeSub - }, - debugInfo - ) - ); - } - return link; - } - trigger(debugInfo) { - this.version++; - globalVersion++; - this.notify(debugInfo); - } - notify(debugInfo) { - startBatch(); - try { - if (true) { - for (let head = this.subsHead; head; head = head.nextSub) { - if (head.sub.onTrigger && !(head.sub.flags & 8)) { - head.sub.onTrigger( - extend( - { - effect: head.sub - }, - debugInfo - ) - ); - } - } - } - for (let link = this.subs; link; link = link.prevSub) { - if (link.sub.notify()) { - ; - link.sub.dep.notify(); - } - } - } finally { - endBatch(); - } - } -} -function addSub(link) { - link.dep.sc++; - if (link.sub.flags & 4) { - const computed = link.dep.computed; - if (computed && !link.dep.subs) { - computed.flags |= 4 | 16; - for (let l = computed.deps; l; l = l.nextDep) { - addSub(l); - } - } - const currentTail = link.dep.subs; - if (currentTail !== link) { - link.prevSub = currentTail; - if (currentTail) currentTail.nextSub = link; - } - if (link.dep.subsHead === void 0) { - link.dep.subsHead = link; - } - link.dep.subs = link; - } -} -const targetMap = /* @__PURE__ */ new WeakMap(); -const ITERATE_KEY = Symbol( - "Object iterate" -); -const MAP_KEY_ITERATE_KEY = Symbol( - "Map keys iterate" -); -const ARRAY_ITERATE_KEY = Symbol( - "Array iterate" -); -function track(target, type, key) { - if (shouldTrack && activeSub) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = new Dep()); - dep.map = depsMap; - dep.key = key; - } - { - dep.track({ - target, - type, - key - }); - } - } -} -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - globalVersion++; - return; - } - const run = (dep) => { - if (dep) { - { - dep.trigger({ - target, - type, - key, - newValue, - oldValue, - oldTarget - }); - } - } - }; - startBatch(); - if (type === "clear") { - depsMap.forEach(run); - } else { - const targetIsArray = isArray(target); - const isArrayIndex = targetIsArray && isIntegerKey(key); - if (targetIsArray && key === "length") { - const newLength = Number(newValue); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { - run(dep); - } - }); - } else { - if (key !== void 0 || depsMap.has(void 0)) { - run(depsMap.get(key)); - } - if (isArrayIndex) { - run(depsMap.get(ARRAY_ITERATE_KEY)); - } - switch (type) { - case "add": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isArrayIndex) { - run(depsMap.get("length")); - } - break; - case "delete": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (isMap(target)) { - run(depsMap.get(ITERATE_KEY)); - } - break; - } - } - } - endBatch(); -} -function getDepFromReactive(object, key) { - const depMap = targetMap.get(object); - return depMap && depMap.get(key); -} - -function reactiveReadArray(array) { - const raw = toRaw(array); - if (raw === array) return raw; - track(raw, "iterate", ARRAY_ITERATE_KEY); - return isShallow(array) ? raw : raw.map(toReactive); -} -function shallowReadArray(arr) { - track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); - return arr; -} -const arrayInstrumentations = { - __proto__: null, - [Symbol.iterator]() { - return iterator(this, Symbol.iterator, toReactive); - }, - concat(...args) { - return reactiveReadArray(this).concat( - ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) - ); - }, - entries() { - return iterator(this, "entries", (value) => { - value[1] = toReactive(value[1]); - return value; - }); - }, - every(fn, thisArg) { - return apply(this, "every", fn, thisArg, void 0, arguments); - }, - filter(fn, thisArg) { - return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); - }, - find(fn, thisArg) { - return apply(this, "find", fn, thisArg, toReactive, arguments); - }, - findIndex(fn, thisArg) { - return apply(this, "findIndex", fn, thisArg, void 0, arguments); - }, - findLast(fn, thisArg) { - return apply(this, "findLast", fn, thisArg, toReactive, arguments); - }, - findLastIndex(fn, thisArg) { - return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); - }, - // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement - forEach(fn, thisArg) { - return apply(this, "forEach", fn, thisArg, void 0, arguments); - }, - includes(...args) { - return searchProxy(this, "includes", args); - }, - indexOf(...args) { - return searchProxy(this, "indexOf", args); - }, - join(separator) { - return reactiveReadArray(this).join(separator); - }, - // keys() iterator only reads `length`, no optimisation required - lastIndexOf(...args) { - return searchProxy(this, "lastIndexOf", args); - }, - map(fn, thisArg) { - return apply(this, "map", fn, thisArg, void 0, arguments); - }, - pop() { - return noTracking(this, "pop"); - }, - push(...args) { - return noTracking(this, "push", args); - }, - reduce(fn, ...args) { - return reduce(this, "reduce", fn, args); - }, - reduceRight(fn, ...args) { - return reduce(this, "reduceRight", fn, args); - }, - shift() { - return noTracking(this, "shift"); - }, - // slice could use ARRAY_ITERATE but also seems to beg for range tracking - some(fn, thisArg) { - return apply(this, "some", fn, thisArg, void 0, arguments); - }, - splice(...args) { - return noTracking(this, "splice", args); - }, - toReversed() { - return reactiveReadArray(this).toReversed(); - }, - toSorted(comparer) { - return reactiveReadArray(this).toSorted(comparer); - }, - toSpliced(...args) { - return reactiveReadArray(this).toSpliced(...args); - }, - unshift(...args) { - return noTracking(this, "unshift", args); - }, - values() { - return iterator(this, "values", toReactive); - } -}; -function iterator(self, method, wrapValue) { - const arr = shallowReadArray(self); - const iter = arr[method](); - if (arr !== self && !isShallow(self)) { - iter._next = iter.next; - iter.next = () => { - const result = iter._next(); - if (result.value) { - result.value = wrapValue(result.value); - } - return result; - }; - } - return iter; -} -const arrayProto = Array.prototype; -function apply(self, method, fn, thisArg, wrappedRetFn, args) { - const arr = shallowReadArray(self); - const needsWrap = arr !== self && !isShallow(self); - const methodFn = arr[method]; - if (methodFn !== arrayProto[method]) { - const result2 = methodFn.apply(self, args); - return needsWrap ? toReactive(result2) : result2; - } - let wrappedFn = fn; - if (arr !== self) { - if (needsWrap) { - wrappedFn = function(item, index) { - return fn.call(this, toReactive(item), index, self); - }; - } else if (fn.length > 2) { - wrappedFn = function(item, index) { - return fn.call(this, item, index, self); - }; - } - } - const result = methodFn.call(arr, wrappedFn, thisArg); - return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; -} -function reduce(self, method, fn, args) { - const arr = shallowReadArray(self); - let wrappedFn = fn; - if (arr !== self) { - if (!isShallow(self)) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, toReactive(item), index, self); - }; - } else if (fn.length > 3) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, item, index, self); - }; - } - } - return arr[method](wrappedFn, ...args); -} -function searchProxy(self, method, args) { - const arr = toRaw(self); - track(arr, "iterate", ARRAY_ITERATE_KEY); - const res = arr[method](...args); - if ((res === -1 || res === false) && isProxy(args[0])) { - args[0] = toRaw(args[0]); - return arr[method](...args); - } - return res; -} -function noTracking(self, method, args = []) { - pauseTracking(); - startBatch(); - const res = toRaw(self)[method].apply(self, args); - endBatch(); - resetTracking(); - return res; -} - -const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); -const builtInSymbols = new Set( - /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) -); -function hasOwnProperty(key) { - if (!isSymbol(key)) key = String(key); - const obj = toRaw(this); - track(obj, "has", key); - return obj.hasOwnProperty(key); -} -class BaseReactiveHandler { - constructor(_isReadonly = false, _isShallow = false) { - this._isReadonly = _isReadonly; - this._isShallow = _isShallow; - } - get(target, key, receiver) { - if (key === "__v_skip") return target["__v_skip"]; - const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_isShallow") { - return isShallow2; - } else if (key === "__v_raw") { - if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype - // this means the receiver is a user proxy of the reactive proxy - Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { - return target; - } - return; - } - const targetIsArray = isArray(target); - if (!isReadonly2) { - let fn; - if (targetIsArray && (fn = arrayInstrumentations[key])) { - return fn; - } - if (key === "hasOwnProperty") { - return hasOwnProperty; - } - } - const res = Reflect.get( - target, - key, - // if this is a proxy wrapping a ref, return methods using the raw ref - // as receiver so that we don't have to call `toRaw` on the ref in all - // its class methods - isRef(target) ? target : receiver - ); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly2) { - track(target, "get", key); - } - if (isShallow2) { - return res; - } - if (isRef(res)) { - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - return isReadonly2 ? readonly(res) : reactive(res); - } - return res; - } -} -class MutableReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(false, isShallow2); - } - set(target, key, value, receiver) { - let oldValue = target[key]; - if (!this._isShallow) { - const isOldValueReadonly = isReadonly(oldValue); - if (!isShallow(value) && !isReadonly(value)) { - oldValue = toRaw(oldValue); - value = toRaw(value); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - if (isOldValueReadonly) { - return false; - } else { - oldValue.value = value; - return true; - } - } - } - const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); - const result = Reflect.set( - target, - key, - value, - isRef(target) ? target : receiver - ); - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - } - return result; - } - deleteProperty(target, key) { - const hadKey = hasOwn(target, key); - const oldValue = target[key]; - const result = Reflect.deleteProperty(target, key); - if (result && hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - } - has(target, key) { - const result = Reflect.has(target, key); - if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has", key); - } - return result; - } - ownKeys(target) { - track( - target, - "iterate", - isArray(target) ? "length" : ITERATE_KEY - ); - return Reflect.ownKeys(target); - } -} -class ReadonlyReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(true, isShallow2); - } - set(target, key) { - { - warn$2( - `Set operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } - deleteProperty(target, key) { - { - warn$2( - `Delete operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } -} -const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); -const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); -const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); -const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); - -const toShallow = (value) => value; -const getProto = (v) => Reflect.getPrototypeOf(v); -function createIterableMethod(method, isReadonly2, isShallow2) { - return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; - const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; - !isReadonly2 && track( - rawTarget, - "iterate", - isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY - ); - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done ? { value, done } : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } - }; - }; -} -function createReadonlyMethod(type) { - return function(...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - warn$2( - `${capitalize(type)} operation ${key}failed: target is readonly.`, - toRaw(this) - ); - } - return type === "delete" ? false : type === "clear" ? void 0 : this; - }; -} -function createInstrumentations(readonly, shallow) { - const instrumentations = { - get(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "get", key); - } - track(rawTarget, "get", rawKey); - } - const { has } = getProto(rawTarget); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } else if (target !== rawTarget) { - target.get(key); - } - }, - get size() { - const target = this["__v_raw"]; - !readonly && track(toRaw(target), "iterate", ITERATE_KEY); - return Reflect.get(target, "size", target); - }, - has(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "has", key); - } - track(rawTarget, "has", rawKey); - } - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); - }, - forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - !readonly && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value, key) => { - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - } - }; - extend( - instrumentations, - readonly ? { - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear") - } : { - add(value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add", value, value); - } - return this; - }, - set(key, value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - return this; - }, - delete(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : void 0; - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - }, - clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; - const result = target.clear(); - if (hadItems) { - trigger( - target, - "clear", - void 0, - void 0, - oldTarget - ); - } - return result; - } - } - ); - const iteratorMethods = [ - "keys", - "values", - "entries", - Symbol.iterator - ]; - iteratorMethods.forEach((method) => { - instrumentations[method] = createIterableMethod(method, readonly, shallow); - }); - return instrumentations; -} -function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = createInstrumentations(isReadonly2, shallow); - return (target, key, receiver) => { - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_raw") { - return target; - } - return Reflect.get( - hasOwn(instrumentations, key) && key in target ? instrumentations : target, - key, - receiver - ); - }; -} -const mutableCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, false) -}; -const shallowCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, true) -}; -const readonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, false) -}; -const shallowReadonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, true) -}; -function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - warn$2( - `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` - ); - } -} - -const reactiveMap = /* @__PURE__ */ new WeakMap(); -const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); -const readonlyMap = /* @__PURE__ */ new WeakMap(); -const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); -function targetTypeMap(rawType) { - switch (rawType) { - case "Object": - case "Array": - return 1 /* COMMON */; - case "Map": - case "Set": - case "WeakMap": - case "WeakSet": - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } -} -function getTargetType(value) { - return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); -} -function reactive(target) { - if (isReadonly(target)) { - return target; - } - return createReactiveObject( - target, - false, - mutableHandlers, - mutableCollectionHandlers, - reactiveMap - ); -} -function shallowReactive(target) { - return createReactiveObject( - target, - false, - shallowReactiveHandlers, - shallowCollectionHandlers, - shallowReactiveMap - ); -} -function readonly(target) { - return createReactiveObject( - target, - true, - readonlyHandlers, - readonlyCollectionHandlers, - readonlyMap - ); -} -function shallowReadonly(target) { - return createReactiveObject( - target, - true, - shallowReadonlyHandlers, - shallowReadonlyCollectionHandlers, - shallowReadonlyMap - ); -} -function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - { - warn$2( - `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( - target - )}` - ); - } - return target; - } - if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { - return target; - } - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy( - target, - targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers - ); - proxyMap.set(target, proxy); - return proxy; -} -function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw"]); - } - return !!(value && value["__v_isReactive"]); -} -function isReadonly(value) { - return !!(value && value["__v_isReadonly"]); -} -function isShallow(value) { - return !!(value && value["__v_isShallow"]); -} -function isProxy(value) { - return value ? !!value["__v_raw"] : false; -} -function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; -} -function markRaw(value) { - if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { - def(value, "__v_skip", true); - } - return value; -} -const toReactive = (value) => isObject(value) ? reactive(value) : value; -const toReadonly = (value) => isObject(value) ? readonly(value) : value; - -function isRef(r) { - return r ? r["__v_isRef"] === true : false; -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -class RefImpl { - constructor(value, isShallow2) { - this.dep = new Dep(); - this["__v_isRef"] = true; - this["__v_isShallow"] = false; - this._rawValue = isShallow2 ? value : toRaw(value); - this._value = isShallow2 ? value : toReactive(value); - this["__v_isShallow"] = isShallow2; - } - get value() { - { - this.dep.track({ - target: this, - type: "get", - key: "value" - }); - } - return this._value; - } - set value(newValue) { - const oldValue = this._rawValue; - const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); - newValue = useDirectValue ? newValue : toRaw(newValue); - if (hasChanged(newValue, oldValue)) { - this._rawValue = newValue; - this._value = useDirectValue ? newValue : toReactive(newValue); - { - this.dep.trigger({ - target: this, - type: "set", - key: "value", - newValue, - oldValue - }); - } - } - } -} -function triggerRef(ref2) { - if (ref2.dep) { - { - ref2.dep.trigger({ - target: ref2, - type: "set", - key: "value", - newValue: ref2._value - }); - } - } -} -function unref(ref2) { - return isRef(ref2) ? ref2.value : ref2; -} -function toValue(source) { - return isFunction(source) ? source() : unref(source); -} -const shallowUnwrapHandlers = { - get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -class CustomRefImpl { - constructor(factory) { - this["__v_isRef"] = true; - this._value = void 0; - const dep = this.dep = new Dep(); - const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); - this._get = get; - this._set = set; - } - get value() { - return this._value = this._get(); - } - set value(newVal) { - this._set(newVal); - } -} -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - if (!isProxy(object)) { - warn$2(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = propertyToRef(object, key); - } - return ret; -} -class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this["__v_isRef"] = true; - this._value = void 0; - } - get value() { - const val = this._object[this._key]; - return this._value = val === void 0 ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - get dep() { - return getDepFromReactive(toRaw(this._object), this._key); - } -} -class GetterRefImpl { - constructor(_getter) { - this._getter = _getter; - this["__v_isRef"] = true; - this["__v_isReadonly"] = true; - this._value = void 0; - } - get value() { - return this._value = this._getter(); - } -} -function toRef(source, key, defaultValue) { - if (isRef(source)) { - return source; - } else if (isFunction(source)) { - return new GetterRefImpl(source); - } else if (isObject(source) && arguments.length > 1) { - return propertyToRef(source, key, defaultValue); - } else { - return ref(source); - } -} -function propertyToRef(source, key, defaultValue) { - const val = source[key]; - return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); -} - -class ComputedRefImpl { - constructor(fn, setter, isSSR) { - this.fn = fn; - this.setter = setter; - /** - * @internal - */ - this._value = void 0; - /** - * @internal - */ - this.dep = new Dep(this); - /** - * @internal - */ - this.__v_isRef = true; - // TODO isolatedDeclarations "__v_isReadonly" - // A computed is also a subscriber that tracks other deps - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 16; - /** - * @internal - */ - this.globalVersion = globalVersion - 1; - /** - * @internal - */ - this.next = void 0; - // for backwards compat - this.effect = this; - this["__v_isReadonly"] = !setter; - this.isSSR = isSSR; - } - /** - * @internal - */ - notify() { - this.flags |= 16; - if (!(this.flags & 8) && // avoid infinite self recursion - activeSub !== this) { - batch(this, true); - return true; - } - } - get value() { - const link = this.dep.track({ - target: this, - type: "get", - key: "value" - }) ; - refreshComputed(this); - if (link) { - link.version = this.dep.version; - } - return this._value; - } - set value(newValue) { - if (this.setter) { - this.setter(newValue); - } else { - warn$2("Write operation failed: computed value is readonly"); - } - } -} -function computed$1(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - if (isFunction(getterOrOptions)) { - getter = getterOrOptions; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, isSSR); - if (debugOptions && !isSSR) { - cRef.onTrack = debugOptions.onTrack; - cRef.onTrigger = debugOptions.onTrigger; - } - return cRef; -} - -const TrackOpTypes = { - "GET": "get", - "HAS": "has", - "ITERATE": "iterate" -}; -const TriggerOpTypes = { - "SET": "set", - "ADD": "add", - "DELETE": "delete", - "CLEAR": "clear" -}; - -const INITIAL_WATCHER_VALUE = {}; -const cleanupMap = /* @__PURE__ */ new WeakMap(); -let activeWatcher = void 0; -function getCurrentWatcher() { - return activeWatcher; -} -function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { - if (owner) { - let cleanups = cleanupMap.get(owner); - if (!cleanups) cleanupMap.set(owner, cleanups = []); - cleanups.push(cleanupFn); - } else if (!failSilently) { - warn$2( - `onWatcherCleanup() was called when there was no active watcher to associate with.` - ); - } -} -function watch$1(source, cb, options = EMPTY_OBJ) { - const { immediate, deep, once, scheduler, augmentJob, call } = options; - const warnInvalidSource = (s) => { - (options.onWarn || warn$2)( - `Invalid watch source: `, - s, - `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` - ); - }; - const reactiveGetter = (source2) => { - if (deep) return source2; - if (isShallow(source2) || deep === false || deep === 0) - return traverse(source2, 1); - return traverse(source2); - }; - let effect; - let getter; - let cleanup; - let boundCleanup; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); - } else if (isReactive(source)) { - getter = () => reactiveGetter(source); - forceTrigger = true; - } else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); - getter = () => source.map((s) => { - if (isRef(s)) { - return s.value; - } else if (isReactive(s)) { - return reactiveGetter(s); - } else if (isFunction(s)) { - return call ? call(s, 2) : s(); - } else { - warnInvalidSource(s); - } - }); - } else if (isFunction(source)) { - if (cb) { - getter = call ? () => call(source, 2) : source; - } else { - getter = () => { - if (cleanup) { - pauseTracking(); - try { - cleanup(); - } finally { - resetTracking(); - } - } - const currentEffect = activeWatcher; - activeWatcher = effect; - try { - return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); - } finally { - activeWatcher = currentEffect; - } - }; - } - } else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - const depth = deep === true ? Infinity : deep; - getter = () => traverse(baseGetter(), depth); - } - const scope = getCurrentScope(); - const watchHandle = () => { - effect.stop(); - if (scope && scope.active) { - remove(scope.effects, effect); - } - }; - if (once && cb) { - const _cb = cb; - cb = (...args) => { - _cb(...args); - watchHandle(); - }; - } - let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; - const job = (immediateFirstRun) => { - if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { - return; - } - if (cb) { - const newValue = effect.run(); - if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { - if (cleanup) { - cleanup(); - } - const currentWatcher = activeWatcher; - activeWatcher = effect; - try { - const args = [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, - boundCleanup - ]; - call ? call(cb, 3, args) : ( - // @ts-expect-error - cb(...args) - ); - oldValue = newValue; - } finally { - activeWatcher = currentWatcher; - } - } - } else { - effect.run(); - } - }; - if (augmentJob) { - augmentJob(job); - } - effect = new ReactiveEffect(getter); - effect.scheduler = scheduler ? () => scheduler(job, false) : job; - boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); - cleanup = effect.onStop = () => { - const cleanups = cleanupMap.get(effect); - if (cleanups) { - if (call) { - call(cleanups, 4); - } else { - for (const cleanup2 of cleanups) cleanup2(); - } - cleanupMap.delete(effect); - } - }; - { - effect.onTrack = options.onTrack; - effect.onTrigger = options.onTrigger; - } - if (cb) { - if (immediate) { - job(true); - } else { - oldValue = effect.run(); - } - } else if (scheduler) { - scheduler(job.bind(null, true), true); - } else { - effect.run(); - } - watchHandle.pause = effect.pause.bind(effect); - watchHandle.resume = effect.resume.bind(effect); - watchHandle.stop = watchHandle; - return watchHandle; -} -function traverse(value, depth = Infinity, seen) { - if (depth <= 0 || !isObject(value) || value["__v_skip"]) { - return value; - } - seen = seen || /* @__PURE__ */ new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - depth--; - if (isRef(value)) { - traverse(value.value, depth, seen); - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], depth, seen); - } - } else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, depth, seen); - }); - } else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], depth, seen); - } - for (const key of Object.getOwnPropertySymbols(value)) { - if (Object.prototype.propertyIsEnumerable.call(value, key)) { - traverse(value[key], depth, seen); - } - } - } - return value; -} - -const stack = []; -function pushWarningContext(vnode) { - stack.push(vnode); -} -function popWarningContext() { - stack.pop(); -} -let isWarning = false; -function warn$1(msg, ...args) { - if (isWarning) return; - isWarning = true; - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling( - appWarnHandler, - instance, - 11, - [ - // eslint-disable-next-line no-restricted-syntax - msg + args.map((a) => { - var _a, _b; - return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); - }).join(""), - instance && instance.proxy, - trace.map( - ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` - ).join("\n"), - trace - ] - ); - } else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - if (trace.length && // avoid spamming console during tests - true) { - warnArgs.push(` -`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); - isWarning = false; -} -function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; - } - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; -} -function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...i === 0 ? [] : [` -`], ...formatTraceEntry(entry)); - }); - return logs; -} -function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName( - vnode.component, - vnode.type, - isRoot - )}`; - const close = `>` + postfix; - return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; -} -function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach((key) => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; -} -function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } else if (typeof value === "number" || typeof value === "boolean" || value == null) { - return raw ? value : [`${key}=${value}`]; - } else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } -} -function assertNumber(val, type) { - if (val === void 0) { - return; - } else if (typeof val !== "number") { - warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); - } else if (isNaN(val)) { - warn$1(`${type} is NaN - the duration expression might be incorrect.`); - } -} - -const ErrorCodes = { - "SETUP_FUNCTION": 0, - "0": "SETUP_FUNCTION", - "RENDER_FUNCTION": 1, - "1": "RENDER_FUNCTION", - "NATIVE_EVENT_HANDLER": 5, - "5": "NATIVE_EVENT_HANDLER", - "COMPONENT_EVENT_HANDLER": 6, - "6": "COMPONENT_EVENT_HANDLER", - "VNODE_HOOK": 7, - "7": "VNODE_HOOK", - "DIRECTIVE_HOOK": 8, - "8": "DIRECTIVE_HOOK", - "TRANSITION_HOOK": 9, - "9": "TRANSITION_HOOK", - "APP_ERROR_HANDLER": 10, - "10": "APP_ERROR_HANDLER", - "APP_WARN_HANDLER": 11, - "11": "APP_WARN_HANDLER", - "FUNCTION_REF": 12, - "12": "FUNCTION_REF", - "ASYNC_COMPONENT_LOADER": 13, - "13": "ASYNC_COMPONENT_LOADER", - "SCHEDULER": 14, - "14": "SCHEDULER", - "COMPONENT_UPDATE": 15, - "15": "COMPONENT_UPDATE", - "APP_UNMOUNT_CLEANUP": 16, - "16": "APP_UNMOUNT_CLEANUP" -}; -const ErrorTypeStrings$1 = { - ["sp"]: "serverPrefetch hook", - ["bc"]: "beforeCreate hook", - ["c"]: "created hook", - ["bm"]: "beforeMount hook", - ["m"]: "mounted hook", - ["bu"]: "beforeUpdate hook", - ["u"]: "updated", - ["bum"]: "beforeUnmount hook", - ["um"]: "unmounted hook", - ["a"]: "activated hook", - ["da"]: "deactivated hook", - ["ec"]: "errorCaptured hook", - ["rtc"]: "renderTracked hook", - ["rtg"]: "renderTriggered hook", - [0]: "setup function", - [1]: "render function", - [2]: "watcher getter", - [3]: "watcher callback", - [4]: "watcher cleanup function", - [5]: "native event handler", - [6]: "component event handler", - [7]: "vnode hook", - [8]: "directive hook", - [9]: "transition hook", - [10]: "app errorHandler", - [11]: "app warnHandler", - [12]: "ref function", - [13]: "async component loader", - [14]: "scheduler flush", - [15]: "component update", - [16]: "app unmount cleanup function" -}; -function callWithErrorHandling(fn, instance, type, args) { - try { - return args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance, type); - } -} -function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch((err) => { - handleError(err, instance, type); - }); - } - return res; - } - if (isArray(fn)) { - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; - } else { - warn$1( - `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` - ); - } -} -function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; - if (instance) { - let cur = instance.parent; - const exposedInstance = instance.proxy; - const errorInfo = ErrorTypeStrings$1[type] ; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - if (errorHandler) { - pauseTracking(); - callWithErrorHandling(errorHandler, null, 10, [ - err, - exposedInstance, - errorInfo - ]); - resetTracking(); - return; - } - } - logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); -} -function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { - { - const info = ErrorTypeStrings$1[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - if (throwInDev) { - throw err; - } else { - console.error(err); - } - } -} - -const queue = []; -let flushIndex = -1; -const pendingPostFlushCbs = []; -let activePostFlushCbs = null; -let postFlushIndex = 0; -const resolvedPromise = /* @__PURE__ */ Promise.resolve(); -let currentFlushPromise = null; -const RECURSION_LIMIT = 100; -function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; -} -function findInsertionIndex(id) { - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = start + end >>> 1; - const middleJob = queue[middle]; - const middleJobId = getId(middleJob); - if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { - start = middle + 1; - } else { - end = middle; - } - } - return start; -} -function queueJob(job) { - if (!(job.flags & 1)) { - const jobId = getId(job); - const lastJob = queue[queue.length - 1]; - if (!lastJob || // fast path when the job id is larger than the tail - !(job.flags & 2) && jobId >= getId(lastJob)) { - queue.push(job); - } else { - queue.splice(findInsertionIndex(jobId), 0, job); - } - job.flags |= 1; - queueFlush(); - } -} -function queueFlush() { - if (!currentFlushPromise) { - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function queuePostFlushCb(cb) { - if (!isArray(cb)) { - if (activePostFlushCbs && cb.id === -1) { - activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); - } else if (!(cb.flags & 1)) { - pendingPostFlushCbs.push(cb); - cb.flags |= 1; - } - } else { - pendingPostFlushCbs.push(...cb); - } - queueFlush(); -} -function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { - { - seen = seen || /* @__PURE__ */ new Map(); - } - for (; i < queue.length; i++) { - const cb = queue[i]; - if (cb && cb.flags & 2) { - if (instance && cb.id !== instance.uid) { - continue; - } - if (checkRecursiveUpdates(seen, cb)) { - continue; - } - queue.splice(i, 1); - i--; - if (cb.flags & 4) { - cb.flags &= ~1; - } - cb(); - if (!(cb.flags & 4)) { - cb.flags &= ~1; - } - } - } -} -function flushPostFlushCbs(seen) { - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)].sort( - (a, b) => getId(a) - getId(b) - ); - pendingPostFlushCbs.length = 0; - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - { - seen = seen || /* @__PURE__ */ new Map(); - } - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - const cb = activePostFlushCbs[postFlushIndex]; - if (checkRecursiveUpdates(seen, cb)) { - continue; - } - if (cb.flags & 4) { - cb.flags &= ~1; - } - if (!(cb.flags & 8)) cb(); - cb.flags &= ~1; - } - activePostFlushCbs = null; - postFlushIndex = 0; - } -} -const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; -function flushJobs(seen) { - { - seen = seen || /* @__PURE__ */ new Map(); - } - const check = (job) => checkRecursiveUpdates(seen, job) ; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && !(job.flags & 8)) { - if (check(job)) { - continue; - } - if (job.flags & 4) { - job.flags &= ~1; - } - callWithErrorHandling( - job, - job.i, - job.i ? 15 : 14 - ); - if (!(job.flags & 4)) { - job.flags &= ~1; - } - } - } - } finally { - for (; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job) { - job.flags &= ~1; - } - } - flushIndex = -1; - queue.length = 0; - flushPostFlushCbs(seen); - currentFlushPromise = null; - if (queue.length || pendingPostFlushCbs.length) { - flushJobs(seen); - } - } -} -function checkRecursiveUpdates(seen, fn) { - const count = seen.get(fn) || 0; - if (count > RECURSION_LIMIT) { - const instance = fn.i; - const componentName = instance && getComponentName(instance.type); - handleError( - `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, - null, - 10 - ); - return true; - } - seen.set(fn, count + 1); - return false; -} - -let isHmrUpdating = false; -const hmrDirtyComponents = /* @__PURE__ */ new Map(); -{ - getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; -} -const map = /* @__PURE__ */ new Map(); -function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); -} -function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); -} -function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: /* @__PURE__ */ new Set() - }); - return true; -} -function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; -} -function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; - } - record.initialDef.render = newRender; - [...record.instances].forEach((instance) => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); -} -function reload(id, newComp) { - const record = map.get(id); - if (!record) return; - newComp = normalizeClassComponent(newComp); - updateComponentDef(record.initialDef, newComp); - const instances = [...record.instances]; - for (let i = 0; i < instances.length; i++) { - const instance = instances[i]; - const oldComp = normalizeClassComponent(instance.type); - let dirtyInstances = hmrDirtyComponents.get(oldComp); - if (!dirtyInstances) { - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); - } - dirtyInstances.add(instance); - instance.appContext.propsCache.delete(instance.type); - instance.appContext.emitsCache.delete(instance.type); - instance.appContext.optionsCache.delete(instance.type); - if (instance.ceReload) { - dirtyInstances.add(instance); - instance.ceReload(newComp.styles); - dirtyInstances.delete(instance); - } else if (instance.parent) { - queueJob(() => { - isHmrUpdating = true; - instance.parent.update(); - isHmrUpdating = false; - dirtyInstances.delete(instance); - }); - } else if (instance.appContext.reload) { - instance.appContext.reload(); - } else if (typeof window !== "undefined") { - window.location.reload(); - } else { - console.warn( - "[HMR] Root or manually mounted instance modified. Full reload required." - ); - } - if (instance.root.ce && instance !== instance.root) { - instance.root.ce._removeChildStyle(oldComp); - } - } - queuePostFlushCb(() => { - hmrDirtyComponents.clear(); - }); -} -function updateComponentDef(oldComp, newComp) { - extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== "__file" && !(key in newComp)) { - delete oldComp[key]; - } - } -} -function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } catch (e) { - console.error(e); - console.warn( - `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` - ); - } - }; -} - -let devtools$1; -let buffer = []; -let devtoolsNotInstalled = false; -function emit$1(event, ...args) { - if (devtools$1) { - devtools$1.emit(event, ...args); - } else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } -} -function setDevtoolsHook$1(hook, target) { - var _a, _b; - devtools$1 = hook; - if (devtools$1) { - devtools$1.enabled = true; - buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); - buffer = []; - } else if ( - // handle late devtools injection - only do this if we are in an actual - // browser environment to avoid the timer handle stalling test runner exit - // (#4815) - typeof window !== "undefined" && // some envs mock window but not fully - window.HTMLElement && // also exclude jsdom - // eslint-disable-next-line no-restricted-syntax - !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) - ) { - const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; - replay.push((newHook) => { - setDevtoolsHook$1(newHook, target); - }); - setTimeout(() => { - if (!devtools$1) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3e3); - } else { - devtoolsNotInstalled = true; - buffer = []; - } -} -function devtoolsInitApp(app, version) { - emit$1("app:init" /* APP_INIT */, app, version, { - Fragment, - Text, - Comment, - Static - }); -} -function devtoolsUnmountApp(app) { - emit$1("app:unmount" /* APP_UNMOUNT */, app); -} -const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); -const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); -const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( - "component:removed" /* COMPONENT_REMOVED */ -); -const devtoolsComponentRemoved = (component) => { - if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered - !devtools$1.cleanupBuffer(component)) { - _devtoolsComponentRemoved(component); - } -}; -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function createDevtoolsComponentHook(hook) { - return (component) => { - emit$1( - hook, - component.appContext.app, - component.uid, - component.parent ? component.parent.uid : void 0, - component - ); - }; -} -const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); -const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); -function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit$1(hook, component.appContext.app, component.uid, component, type, time); - }; -} -function devtoolsComponentEmit(component, event, params) { - emit$1( - "component:emit" /* COMPONENT_EMIT */, - component.appContext.app, - component, - event, - params - ); -} - -let currentRenderingInstance = null; -let currentScopeId = null; -function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = instance && instance.type.__scopeId || null; - return prev; -} -function pushScopeId(id) { - currentScopeId = id; -} -function popScopeId() { - currentScopeId = null; -} -const withScopeId = (_id) => withCtx; -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { - if (!ctx) return fn; - if (fn._n) { - return fn; - } - const renderFnWithContext = (...args) => { - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - let res; - try { - res = fn(...args); - } finally { - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - } - { - devtoolsComponentUpdated(ctx); - } - return res; - }; - renderFnWithContext._n = true; - renderFnWithContext._c = true; - renderFnWithContext._d = true; - return renderFnWithContext; -} - -function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn$1("Do not use built-in directive ids as custom directive id: " + name); - } -} -function withDirectives(vnode, directives) { - if (currentRenderingInstance === null) { - warn$1(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getComponentPublicInstance(currentRenderingInstance); - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (dir) { - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } -} - -const TeleportEndKey = Symbol("_vte"); -const isTeleport = (type) => type.__isTeleport; -const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); -const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); -const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; -const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; -const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (isString(targetSelector)) { - if (!select) { - warn$1( - `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` - ); - return null; - } else { - const target = select(targetSelector); - if (!target && !isTeleportDisabled(props)) { - warn$1( - `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` - ); - } - return target; - } - } else { - if (!targetSelector && !isTeleportDisabled(props)) { - warn$1(`Invalid Teleport target: ${targetSelector}`); - } - return targetSelector; - } -}; -const TeleportImpl = { - name: "Teleport", - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { - const { - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - o: { insert, querySelector, createText, createComment } - } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - if (isHmrUpdating) { - optimized = false; - dynamicChildren = null; - } - if (n1 == null) { - const placeholder = n2.el = createComment("teleport start") ; - const mainAnchor = n2.anchor = createComment("teleport end") ; - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const mount = (container2, anchor2) => { - if (shapeFlag & 16) { - if (parentComponent && parentComponent.isCE) { - parentComponent.ce._teleportTarget = container2; - } - mountChildren( - children, - container2, - anchor2, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const mountToTarget = () => { - const target = n2.target = resolveTarget(n2.props, querySelector); - const targetAnchor = prepareAnchor(target, n2, createText, insert); - if (target) { - if (namespace !== "svg" && isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace !== "mathml" && isTargetMathML(target)) { - namespace = "mathml"; - } - if (!disabled) { - mount(target, targetAnchor); - updateCssVars(n2, false); - } - } else if (!disabled) { - warn$1( - "Invalid Teleport target on mount:", - target, - `(${typeof target})` - ); - } - }; - if (disabled) { - mount(container, mainAnchor); - updateCssVars(n2, true); - } - if (isTeleportDeferred(n2.props)) { - queuePostRenderEffect(() => { - mountToTarget(); - n2.el.__isMounted = true; - }, parentSuspense); - } else { - mountToTarget(); - } - } else { - if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { - queuePostRenderEffect(() => { - TeleportImpl.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - delete n1.el.__isMounted; - }, parentSuspense); - return; - } - n2.el = n1.el; - n2.targetStart = n1.targetStart; - const mainAnchor = n2.anchor = n1.anchor; - const target = n2.target = n1.target; - const targetAnchor = n2.targetAnchor = n1.targetAnchor; - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - if (namespace === "svg" || isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace === "mathml" || isTargetMathML(target)) { - namespace = "mathml"; - } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - currentContainer, - parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - traverseStaticChildren(n1, n2, true); - } else if (!optimized) { - patchChildren( - n1, - n2, - currentContainer, - currentAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - false - ); - } - if (disabled) { - if (!wasDisabled) { - moveTeleport( - n2, - container, - mainAnchor, - internals, - 1 - ); - } else { - if (n2.props && n1.props && n2.props.to !== n1.props.to) { - n2.props.to = n1.props.to; - } - } - } else { - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = n2.target = resolveTarget( - n2.props, - querySelector - ); - if (nextTarget) { - moveTeleport( - n2, - nextTarget, - null, - internals, - 0 - ); - } else { - warn$1( - "Invalid Teleport target on update:", - target, - `(${typeof target})` - ); - } - } else if (wasDisabled) { - moveTeleport( - n2, - target, - targetAnchor, - internals, - 1 - ); - } - } - updateCssVars(n2, disabled); - } - }, - remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { - shapeFlag, - children, - anchor, - targetStart, - targetAnchor, - target, - props - } = vnode; - if (target) { - hostRemove(targetStart); - hostRemove(targetAnchor); - } - doRemove && hostRemove(anchor); - if (shapeFlag & 16) { - const shouldRemove = doRemove || !isTeleportDisabled(props); - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount( - child, - parentComponent, - parentSuspense, - shouldRemove, - !!child.dynamicChildren - ); - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport -}; -function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { - if (moveType === 0) { - insert(vnode.targetAnchor, container, parentAnchor); - } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2; - if (isReorder) { - insert(el, container, parentAnchor); - } - if (!isReorder || isTeleportDisabled(props)) { - if (shapeFlag & 16) { - for (let i = 0; i < children.length; i++) { - move( - children[i], - container, - parentAnchor, - 2 - ); - } - } - } - if (isReorder) { - insert(anchor, container, parentAnchor); - } -} -function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { - o: { nextSibling, parentNode, querySelector, insert, createText } -}, hydrateChildren) { - const target = vnode.target = resolveTarget( - vnode.props, - querySelector - ); - if (target) { - const disabled = isTeleportDisabled(vnode.props); - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16) { - if (disabled) { - vnode.anchor = hydrateChildren( - nextSibling(node), - vnode, - parentNode(node), - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - vnode.targetStart = targetNode; - vnode.targetAnchor = targetNode && nextSibling(targetNode); - } else { - vnode.anchor = nextSibling(node); - let targetAnchor = targetNode; - while (targetAnchor) { - if (targetAnchor && targetAnchor.nodeType === 8) { - if (targetAnchor.data === "teleport start anchor") { - vnode.targetStart = targetAnchor; - } else if (targetAnchor.data === "teleport anchor") { - vnode.targetAnchor = targetAnchor; - target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - targetAnchor = nextSibling(targetAnchor); - } - if (!vnode.targetAnchor) { - prepareAnchor(target, vnode, createText, insert); - } - hydrateChildren( - targetNode && nextSibling(targetNode), - vnode, - target, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - } - updateCssVars(vnode, disabled); - } - return vnode.anchor && nextSibling(vnode.anchor); -} -const Teleport = TeleportImpl; -function updateCssVars(vnode, isDisabled) { - const ctx = vnode.ctx; - if (ctx && ctx.ut) { - let node, anchor; - if (isDisabled) { - node = vnode.el; - anchor = vnode.anchor; - } else { - node = vnode.targetStart; - anchor = vnode.targetAnchor; - } - while (node && node !== anchor) { - if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); - node = node.nextSibling; - } - ctx.ut(); - } -} -function prepareAnchor(target, vnode, createText, insert) { - const targetStart = vnode.targetStart = createText(""); - const targetAnchor = vnode.targetAnchor = createText(""); - targetStart[TeleportEndKey] = targetAnchor; - if (target) { - insert(targetStart, target); - insert(targetAnchor, target); - } - return targetAnchor; -} - -const leaveCbKey = Symbol("_leaveCb"); -const enterCbKey$1 = Symbol("_enterCb"); -function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: /* @__PURE__ */ new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; -} -const TransitionHookValidator = [Function, Array]; -const BaseTransitionPropsValidators = { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator -}; -const recursiveGetSubtree = (instance) => { - const subTree = instance.subTree; - return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; -}; -const BaseTransitionImpl = { - name: `BaseTransition`, - props: BaseTransitionPropsValidators, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - const child = findNonCommentChild(children); - const rawProps = toRaw(props); - const { mode } = rawProps; - if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { - warn$1(`invalid <transition> mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - const innerChild = getInnerChild$1(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - let enterHooks = resolveTransitionHooks( - innerChild, - rawProps, - state, - instance, - // #11061, ensure enterHooks is fresh after clone - (hooks) => enterHooks = hooks - ); - if (innerChild.type !== Comment) { - setTransitionHooks(innerChild, enterHooks); - } - let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); - if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { - let leavingHooks = resolveTransitionHooks( - oldInnerChild, - rawProps, - state, - instance - ); - setTransitionHooks(oldInnerChild, leavingHooks); - if (mode === "out-in" && innerChild.type !== Comment) { - state.isLeaving = true; - leavingHooks.afterLeave = () => { - state.isLeaving = false; - if (!(instance.job.flags & 8)) { - instance.update(); - } - delete leavingHooks.afterLeave; - oldInnerChild = void 0; - }; - return emptyPlaceholder(child); - } else if (mode === "in-out" && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType( - state, - oldInnerChild - ); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - el[leaveCbKey] = () => { - earlyRemove(); - el[leaveCbKey] = void 0; - delete enterHooks.delayedLeave; - oldInnerChild = void 0; - }; - enterHooks.delayedLeave = () => { - delayedLeave(); - delete enterHooks.delayedLeave; - oldInnerChild = void 0; - }; - }; - } else { - oldInnerChild = void 0; - } - } else if (oldInnerChild) { - oldInnerChild = void 0; - } - return child; - }; - } -}; -function findNonCommentChild(children) { - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - for (const c of children) { - if (c.type !== Comment) { - if (hasFound) { - warn$1( - "<transition> can only be used on a single element or component. Use <transition-group> for lists." - ); - break; - } - child = c; - hasFound = true; - } - } - } - return child; -} -const BaseTransition = BaseTransitionImpl; -function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = /* @__PURE__ */ Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; -} -function resolveTransitionHooks(vnode, props, state, instance, postClone) { - const { - appear, - mode, - persisted = false, - onBeforeEnter, - onEnter, - onAfterEnter, - onEnterCancelled, - onBeforeLeave, - onLeave, - onAfterLeave, - onLeaveCancelled, - onBeforeAppear, - onAppear, - onAfterAppear, - onAppearCancelled - } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && callWithAsyncErrorHandling( - hook, - instance, - 9, - args - ); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (isArray(hook)) { - if (hook.every((hook2) => hook2.length <= 1)) done(); - } else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } else { - return; - } - } - if (el[leaveCbKey]) { - el[leaveCbKey]( - true - /* cancelled */ - ); - } - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { - leavingVNode.el[leaveCbKey](); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } else { - return; - } - } - let called = false; - const done = el[enterCbKey$1] = (cancelled) => { - if (called) return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el[enterCbKey$1] = void 0; - }; - if (hook) { - callAsyncHook(hook, [el, done]); - } else { - done(); - } - }, - leave(el, remove) { - const key2 = String(vnode.key); - if (el[enterCbKey$1]) { - el[enterCbKey$1]( - true - /* cancelled */ - ); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = el[leaveCbKey] = (cancelled) => { - if (called) return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } else { - callHook(onAfterLeave, [el]); - } - el[leaveCbKey] = void 0; - if (leavingVNodesCache[key2] === vnode) { - delete leavingVNodesCache[key2]; - } - }; - leavingVNodesCache[key2] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } else { - done(); - } - }, - clone(vnode2) { - const hooks2 = resolveTransitionHooks( - vnode2, - props, - state, - instance, - postClone - ); - if (postClone) postClone(hooks2); - return hooks2; - } - }; - return hooks; -} -function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; - } -} -function getInnerChild$1(vnode) { - if (!isKeepAlive(vnode)) { - if (isTeleport(vnode.type) && vnode.children) { - return findNonCommentChild(vnode.children); - } - return vnode; - } - if (vnode.component) { - return vnode.component.subTree; - } - const { shapeFlag, children } = vnode; - if (children) { - if (shapeFlag & 16) { - return children[0]; - } - if (shapeFlag & 32 && isFunction(children.default)) { - return children.default(); - } - } -} -function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 && vnode.component) { - vnode.transition = hooks; - setTransitionHooks(vnode.component.subTree, hooks); - } else if (vnode.shapeFlag & 128) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } else { - vnode.transition = hooks; - } -} -function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); - if (child.type === Fragment) { - if (child.patchFlag & 128) keyedFragmentCount++; - ret = ret.concat( - getTransitionRawChildren(child.children, keepComment, key) - ); - } else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } - } - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2; - } - } - return ret; -} - -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineComponent(options, extraOptions) { - return isFunction(options) ? ( - // #8236: extend call and options.name access are considered side-effects - // by Rollup, so we have to wrap it in a pure-annotated IIFE. - /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() - ) : options; -} - -function useId() { - const i = getCurrentInstance(); - if (i) { - return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; - } else { - warn$1( - `useId() is called when there is no active component instance to be associated with.` - ); - } - return ""; -} -function markAsyncBoundary(instance) { - instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; -} - -const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); -function useTemplateRef(key) { - const i = getCurrentInstance(); - const r = shallowRef(null); - if (i) { - const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs; - let desc; - if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { - warn$1(`useTemplateRef('${key}') already exists.`); - } else { - Object.defineProperty(refs, key, { - enumerable: true, - get: () => r.value, - set: (val) => r.value = val - }); - } - } else { - warn$1( - `useTemplateRef() is called when there is no active component instance to be associated with.` - ); - } - const ret = readonly(r) ; - { - knownTemplateRefs.add(ret); - } - return ret; -} - -function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray(rawRef)) { - rawRef.forEach( - (r, i) => setRef( - r, - oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), - parentSuspense, - vnode, - isUnmount - ) - ); - return; - } - if (isAsyncWrapper(vnode) && !isUnmount) { - if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { - setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); - } - return; - } - const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if (!owner) { - warn$1( - `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` - ); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; - const setupState = owner.setupState; - const rawSetupState = toRaw(setupState); - const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { - { - if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) { - warn$1( - `Template ref "${key}" used on a non-ref value. It will not work in the production build.` - ); - } - if (knownTemplateRefs.has(rawSetupState[key])) { - return false; - } - } - return hasOwn(rawSetupState, key); - }; - if (oldRef != null && oldRef !== ref) { - if (isString(oldRef)) { - refs[oldRef] = null; - if (canSetSetupRef(oldRef)) { - setupState[oldRef] = null; - } - } else if (isRef(oldRef)) { - oldRef.value = null; - } - } - if (isFunction(ref)) { - callWithErrorHandling(ref, owner, 12, [value, refs]); - } else { - const _isString = isString(ref); - const _isRef = isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; - if (isUnmount) { - isArray(existing) && remove(existing, refValue); - } else { - if (!isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (canSetSetupRef(ref)) { - setupState[ref] = refs[ref]; - } - } else { - ref.value = [refValue]; - if (rawRef.k) refs[rawRef.k] = ref.value; - } - } else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } else if (_isString) { - refs[ref] = value; - if (canSetSetupRef(ref)) { - setupState[ref] = value; - } - } else if (_isRef) { - ref.value = value; - if (rawRef.k) refs[rawRef.k] = value; - } else { - warn$1("Invalid template ref type:", ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } else { - doSet(); - } - } else { - warn$1("Invalid template ref type:", ref, `(${typeof ref})`); - } - } -} - -let hasLoggedMismatchError = false; -const logMismatchError = () => { - if (hasLoggedMismatchError) { - return; - } - console.error("Hydration completed but contains mismatches."); - hasLoggedMismatchError = true; -}; -const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; -const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); -const getContainerType = (container) => { - if (container.nodeType !== 1) return void 0; - if (isSVGContainer(container)) return "svg"; - if (isMathMLContainer(container)) return "mathml"; - return void 0; -}; -const isComment = (node) => node.nodeType === 8; -function createHydrationFunctions(rendererInternals) { - const { - mt: mountComponent, - p: patch, - o: { - patchProp, - createText, - nextSibling, - parentNode, - remove, - insert, - createComment - } - } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - warn$1( - `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` - ); - patch(null, vnode, container); - flushPostFlushCbs(); - container._vnode = vnode; - return; - } - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - container._vnode = vnode; - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - optimized = optimized || !!vnode.dynamicChildren; - const isFragmentStart = isComment(node) && node.data === "["; - const onMismatch = () => handleMismatch( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - isFragmentStart - ); - const { type, ref, shapeFlag, patchFlag } = vnode; - let domType = node.nodeType; - vnode.el = node; - { - def(node, "__vnode", vnode, true); - def(node, "__vueParentComponent", parentComponent, true); - } - if (patchFlag === -2) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3) { - if (vnode.children === "") { - insert(vnode.el = createText(""), parentNode(node), node); - nextNode = node; - } else { - nextNode = onMismatch(); - } - } else { - if (node.data !== vnode.children) { - warn$1( - `Hydration text mismatch in`, - node.parentNode, - ` - - rendered on server: ${JSON.stringify( - node.data - )} - - expected on client: ${JSON.stringify(vnode.children)}` - ); - logMismatchError(); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (isTemplateNode(node)) { - nextNode = nextSibling(node); - replaceNode( - vnode.el = node.content.firstChild, - node, - parentComponent - ); - } else if (domType !== 8 || isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = nextSibling(node); - } - break; - case Static: - if (isFragmentStart) { - node = nextSibling(node); - domType = node.nodeType; - } - if (domType === 1 || domType === 3) { - nextNode = node; - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return isFragmentStart ? nextSibling(nextNode) : nextNode; - } else { - onMismatch(); - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = hydrateFragment( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - break; - default: - if (shapeFlag & 1) { - if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { - nextNode = onMismatch(); - } else { - nextNode = hydrateElement( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - } else if (shapeFlag & 6) { - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - if (isFragmentStart) { - nextNode = locateClosingAnchor(node); - } else if (isComment(node) && node.data === "teleport start") { - nextNode = locateClosingAnchor(node, node.data, "teleport end"); - } else { - nextNode = nextSibling(node); - } - mountComponent( - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - optimized - ); - if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; - } else { - subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } else if (shapeFlag & 64) { - if (domType !== 8) { - nextNode = onMismatch(); - } else { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized, - rendererInternals, - hydrateChildren - ); - } - } else if (shapeFlag & 128) { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - getContainerType(parentNode(node)), - slotScopeIds, - optimized, - rendererInternals, - hydrateNode - ); - } else { - warn$1("Invalid HostVNode type:", type, `(${typeof type})`); - } - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; - const forcePatch = type === "input" || type === "option"; - { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - let needCallTransitionHooks = false; - if (isTemplateNode(el)) { - needCallTransitionHooks = needTransition( - null, - // no need check parentSuspense in hydration - transition - ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; - const content = el.content.firstChild; - if (needCallTransitionHooks) { - transition.beforeEnter(content); - } - replaceNode(content, el, parentComponent); - vnode.el = el = content; - } - if (shapeFlag & 16 && // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren( - el.firstChild, - vnode, - el, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - let hasWarned = false; - while (next) { - if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { - if (!hasWarned) { - warn$1( - `Hydration children mismatch on`, - el, - ` -Server rendered element contains more child nodes than client vdom.` - ); - hasWarned = true; - } - logMismatchError(); - } - const cur = next; - next = next.nextSibling; - remove(cur); - } - } else if (shapeFlag & 8) { - let clientText = vnode.children; - if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { - clientText = clientText.slice(1); - } - if (el.textContent !== clientText) { - if (!isMismatchAllowed(el, 0 /* TEXT */)) { - warn$1( - `Hydration text content mismatch on`, - el, - ` - - rendered on server: ${el.textContent} - - expected on client: ${vnode.children}` - ); - logMismatchError(); - } - el.textContent = vnode.children; - } - } - if (props) { - { - const isCustomElement = el.tagName.includes("-"); - for (const key in props) { - if (// #11189 skip if this node has directives that have created hooks - // as it could have mutated the DOM in any possible way - !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { - logMismatchError(); - } - if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers - key[0] === "." || isCustomElement) { - patchProp(el, key, null, props[key], void 0, parentComponent); - } - } - } - } - let vnodeHooks; - if (vnodeHooks = props && props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); - const isText = vnode.type === Text; - if (node) { - if (isText && !optimized) { - if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { - insert( - createText( - node.data.slice(vnode.children.length) - ), - container, - nextSibling(node) - ); - node.data = vnode.children; - } - } - node = hydrateNode( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } else if (isText && !vnode.children) { - insert(vnode.el = createText(""), container); - } else { - if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { - if (!hasWarned) { - warn$1( - `Hydration children mismatch on`, - container, - ` -Server rendered element contains fewer child nodes than client vdom.` - ); - hasWarned = true; - } - logMismatchError(); - } - patch( - null, - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren( - nextSibling(node), - vnode, - container, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - if (next && isComment(next) && next.data === "]") { - return nextSibling(vnode.anchor = next); - } else { - logMismatchError(); - insert(vnode.anchor = createComment(`]`), container, next); - return next; - } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { - if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { - warn$1( - `Hydration node mismatch: -- rendered on server:`, - node, - node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, - ` -- expected on client:`, - vnode.type - ); - logMismatchError(); - } - vnode.el = null; - if (isFragment) { - const end = locateClosingAnchor(node); - while (true) { - const next2 = nextSibling(node); - if (next2 && next2 !== end) { - remove(next2); - } else { - break; - } - } - } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch( - null, - vnode, - container, - next, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - if (parentComponent) { - parentComponent.vnode.el = vnode.el; - updateHOCHostEl(parentComponent, vnode.el); - } - return next; - }; - const locateClosingAnchor = (node, open = "[", close = "]") => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === open) match++; - if (node.data === close) { - if (match === 0) { - return nextSibling(node); - } else { - match--; - } - } - } - } - return node; - }; - const replaceNode = (newNode, oldNode, parentComponent) => { - const parentNode2 = oldNode.parentNode; - if (parentNode2) { - parentNode2.replaceChild(newNode, oldNode); - } - let parent = parentComponent; - while (parent) { - if (parent.vnode.el === oldNode) { - parent.vnode.el = parent.subTree.el = newNode; - } - parent = parent.parent; - } - }; - const isTemplateNode = (node) => { - return node.nodeType === 1 && node.tagName === "TEMPLATE"; - }; - return [hydrate, hydrateNode]; -} -function propHasMismatch(el, key, clientValue, vnode, instance) { - let mismatchType; - let mismatchKey; - let actual; - let expected; - if (key === "class") { - actual = el.getAttribute("class"); - expected = normalizeClass(clientValue); - if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { - mismatchType = 2 /* CLASS */; - mismatchKey = `class`; - } - } else if (key === "style") { - actual = el.getAttribute("style") || ""; - expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); - const actualMap = toStyleMap(actual); - const expectedMap = toStyleMap(expected); - if (vnode.dirs) { - for (const { dir, value } of vnode.dirs) { - if (dir.name === "show" && !value) { - expectedMap.set("display", "none"); - } - } - } - if (instance) { - resolveCssVars(instance, vnode, expectedMap); - } - if (!isMapEqual(actualMap, expectedMap)) { - mismatchType = 3 /* STYLE */; - mismatchKey = "style"; - } - } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { - if (isBooleanAttr(key)) { - actual = el.hasAttribute(key); - expected = includeBooleanAttr(clientValue); - } else if (clientValue == null) { - actual = el.hasAttribute(key); - expected = false; - } else { - if (el.hasAttribute(key)) { - actual = el.getAttribute(key); - } else if (key === "value" && el.tagName === "TEXTAREA") { - actual = el.value; - } else { - actual = false; - } - expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; - } - if (actual !== expected) { - mismatchType = 4 /* ATTRIBUTE */; - mismatchKey = key; - } - } - if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { - const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; - const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; - const postSegment = ` - - rendered on server: ${format(actual)} - - expected on client: ${format(expected)} - Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. - You should fix the source of the mismatch.`; - { - warn$1(preSegment, el, postSegment); - } - return true; - } - return false; -} -function toClassSet(str) { - return new Set(str.trim().split(/\s+/)); -} -function isSetEqual(a, b) { - if (a.size !== b.size) { - return false; - } - for (const s of a) { - if (!b.has(s)) { - return false; - } - } - return true; -} -function toStyleMap(str) { - const styleMap = /* @__PURE__ */ new Map(); - for (const item of str.split(";")) { - let [key, value] = item.split(":"); - key = key.trim(); - value = value && value.trim(); - if (key && value) { - styleMap.set(key, value); - } - } - return styleMap; -} -function isMapEqual(a, b) { - if (a.size !== b.size) { - return false; - } - for (const [key, value] of a) { - if (value !== b.get(key)) { - return false; - } - } - return true; -} -function resolveCssVars(instance, vnode, expectedMap) { - const root = instance.subTree; - if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { - const cssVars = instance.getCssVars(); - for (const key in cssVars) { - expectedMap.set( - `--${getEscapedCssVarName(key)}`, - String(cssVars[key]) - ); - } - } - if (vnode === root && instance.parent) { - resolveCssVars(instance.parent, instance.vnode, expectedMap); - } -} -const allowMismatchAttr = "data-allow-mismatch"; -const MismatchTypeString = { - [0 /* TEXT */]: "text", - [1 /* CHILDREN */]: "children", - [2 /* CLASS */]: "class", - [3 /* STYLE */]: "style", - [4 /* ATTRIBUTE */]: "attribute" -}; -function isMismatchAllowed(el, allowedType) { - if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { - while (el && !el.hasAttribute(allowMismatchAttr)) { - el = el.parentElement; - } - } - const allowedAttr = el && el.getAttribute(allowMismatchAttr); - if (allowedAttr == null) { - return false; - } else if (allowedAttr === "") { - return true; - } else { - const list = allowedAttr.split(","); - if (allowedType === 0 /* TEXT */ && list.includes("children")) { - return true; - } - return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); - } -} - -const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); -const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); -const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { - const id = requestIdleCallback(hydrate, { timeout }); - return () => cancelIdleCallback(id); -}; -function elementIsVisibleInViewport(el) { - const { top, left, bottom, right } = el.getBoundingClientRect(); - const { innerHeight, innerWidth } = window; - return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); -} -const hydrateOnVisible = (opts) => (hydrate, forEach) => { - const ob = new IntersectionObserver((entries) => { - for (const e of entries) { - if (!e.isIntersecting) continue; - ob.disconnect(); - hydrate(); - break; - } - }, opts); - forEach((el) => { - if (!(el instanceof Element)) return; - if (elementIsVisibleInViewport(el)) { - hydrate(); - ob.disconnect(); - return false; - } - ob.observe(el); - }); - return () => ob.disconnect(); -}; -const hydrateOnMediaQuery = (query) => (hydrate) => { - if (query) { - const mql = matchMedia(query); - if (mql.matches) { - hydrate(); - } else { - mql.addEventListener("change", hydrate, { once: true }); - return () => mql.removeEventListener("change", hydrate); - } - } -}; -const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { - if (isString(interactions)) interactions = [interactions]; - let hasHydrated = false; - const doHydrate = (e) => { - if (!hasHydrated) { - hasHydrated = true; - teardown(); - hydrate(); - e.target.dispatchEvent(new e.constructor(e.type, e)); - } - }; - const teardown = () => { - forEach((el) => { - for (const i of interactions) { - el.removeEventListener(i, doHydrate); - } - }); - }; - forEach((el) => { - for (const i of interactions) { - el.addEventListener(i, doHydrate, { once: true }); - } - }); - return teardown; -}; -function forEachElement(node, cb) { - if (isComment(node) && node.data === "[") { - let depth = 1; - let next = node.nextSibling; - while (next) { - if (next.nodeType === 1) { - const result = cb(next); - if (result === false) { - break; - } - } else if (isComment(next)) { - if (next.data === "]") { - if (--depth === 0) break; - } else if (next.data === "[") { - depth++; - } - } - next = next.nextSibling; - } - } else { - cb(node); - } -} - -const isAsyncWrapper = (i) => !!i.type.__asyncLoader; -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; - } - const { - loader, - loadingComponent, - errorComponent, - delay = 200, - hydrate: hydrateStrategy, - timeout, - // undefined = never times out - suspensible = true, - onError: userOnError - } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; - pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } else { - throw err; - } - }).then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!comp) { - warn$1( - `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` - ); - } - if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { - comp = comp.default; - } - if (comp && !isObject(comp) && !isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - })); - }; - return defineComponent({ - name: "AsyncComponentWrapper", - __asyncLoader: load, - __asyncHydrate(el, instance, hydrate) { - const doHydrate = hydrateStrategy ? () => { - const teardown = hydrateStrategy( - hydrate, - (cb) => forEachElement(el, cb) - ); - if (teardown) { - (instance.bum || (instance.bum = [])).push(teardown); - } - } : hydrate; - if (resolvedComp) { - doHydrate(); - } else { - load().then(() => !instance.isUnmounted && doHydrate()); - } - }, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - markAsyncBoundary(instance); - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError( - err, - instance, - 13, - !errorComponent - ); - }; - if (suspensible && instance.suspense || isInSSRComponentSetup) { - return load().then((comp) => { - return () => createInnerComp(comp, instance); - }).catch((err) => { - onError(err); - return () => errorComponent ? createVNode(errorComponent, { - error: err - }) : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error( - `Async component timed out after ${timeout}ms.` - ); - onError(err); - error.value = err; - } - }, timeout); - } - load().then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - instance.parent.update(); - } - }).catch((err) => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; - } - }); -} -function createInnerComp(comp, parent) { - const { ref: ref2, props, children, ce } = parent.vnode; - const vnode = createVNode(comp, props, children); - vnode.ref = ref2; - vnode.ce = ce; - delete parent.vnode.ce; - return vnode; -} - -const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; -const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const sharedContext = instance.ctx; - if (!sharedContext.renderer) { - return () => { - const children = slots.default && slots.default(); - return children && children.length === 1 ? children[0] : children; - }; - } - const cache = /* @__PURE__ */ new Map(); - const keys = /* @__PURE__ */ new Set(); - let current = null; - { - instance.__v_cache = cache; - } - const parentSuspense = instance.suspense; - const { - renderer: { - p: patch, - m: move, - um: _unmount, - o: { createElement } - } - } = sharedContext; - const storageContainer = createElement("div"); - sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { - const instance2 = vnode.component; - move(vnode, container, anchor, 0, parentSuspense); - patch( - instance2.vnode, - vnode, - container, - anchor, - instance2, - parentSuspense, - namespace, - vnode.slotScopeIds, - optimized - ); - queuePostRenderEffect(() => { - instance2.isDeactivated = false; - if (instance2.a) { - invokeArrayFns(instance2.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - }, parentSuspense); - { - devtoolsComponentAdded(instance2); - } - }; - sharedContext.deactivate = (vnode) => { - const instance2 = vnode.component; - invalidateMount(instance2.m); - invalidateMount(instance2.a); - move(vnode, storageContainer, null, 1, parentSuspense); - queuePostRenderEffect(() => { - if (instance2.da) { - invokeArrayFns(instance2.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - instance2.isDeactivated = true; - }, parentSuspense); - { - devtoolsComponentAdded(instance2); - } - }; - function unmount(vnode) { - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && !filter(name)) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (cached && (!current || !isSameVNodeType(cached, current))) { - unmount(cached); - } else if (current) { - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - watch( - () => [props.include, props.exclude], - ([include, exclude]) => { - include && pruneCache((name) => matches(include, name)); - exclude && pruneCache((name) => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: "post", deep: true } - ); - let pendingCacheKey = null; - const cacheSubtree = () => { - if (pendingCacheKey != null) { - if (isSuspense(instance.subTree.type)) { - queuePostRenderEffect(() => { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - }, instance.subTree.suspense); - } else { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach((cached) => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type && cached.key === vnode.key) { - resetShapeFlag(vnode); - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return current = null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - { - warn$1(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - if (vnode.type === Comment) { - current = null; - return vnode; - } - const comp = vnode.type; - const name = getComponentName( - isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp - ); - const { include, exclude, max } = props; - if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { - vnode.shapeFlag &= ~256; - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128) { - rawVNode.ssContent = vnode; - } - } - pendingCacheKey = key; - if (cachedVNode) { - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - setTransitionHooks(vnode, vnode.transition); - } - vnode.shapeFlag |= 512; - keys.delete(key); - keys.add(key); - } else { - keys.add(key); - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - vnode.shapeFlag |= 256; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; - } -}; -const KeepAlive = KeepAliveImpl; -function matches(pattern, name) { - if (isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } else if (isString(pattern)) { - return pattern.split(",").includes(name); - } else if (isRegExp(pattern)) { - pattern.lastIndex = 0; - return pattern.test(name); - } - return false; -} -function onActivated(hook, target) { - registerKeepAliveHook(hook, "a", target); -} -function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da", target); -} -function registerKeepAliveHook(hook, type, target = currentInstance) { - const wrappedHook = hook.__wdc || (hook.__wdc = () => { - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } - } -} -function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - const injected = injectHook( - type, - hook, - keepAliveRoot, - true - /* prepend */ - ); - onUnmounted(() => { - remove(keepAliveRoot[type], injected); - }, target); -} -function resetShapeFlag(vnode) { - vnode.shapeFlag &= ~256; - vnode.shapeFlag &= ~512; -} -function getInnerChild(vnode) { - return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; -} - -function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - const wrappedHook = hook.__weh || (hook.__weh = (...args) => { - pauseTracking(); - const reset = setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - reset(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } else { - hooks.push(wrappedHook); - } - return wrappedHook; - } else { - const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); - warn$1( - `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) - ); - } -} -const createHook = (lifecycle) => (hook, target = currentInstance) => { - if (!isInSSRComponentSetup || lifecycle === "sp") { - injectHook(lifecycle, (...args) => hook(...args), target); - } -}; -const onBeforeMount = createHook("bm"); -const onMounted = createHook("m"); -const onBeforeUpdate = createHook( - "bu" -); -const onUpdated = createHook("u"); -const onBeforeUnmount = createHook( - "bum" -); -const onUnmounted = createHook("um"); -const onServerPrefetch = createHook( - "sp" -); -const onRenderTriggered = createHook("rtg"); -const onRenderTracked = createHook("rtc"); -function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec", hook, target); -} - -const COMPONENTS = "components"; -const DIRECTIVES = "directives"; -function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; -} -const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); -function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } else { - return component || NULL_DYNAMIC_COMPONENT; - } -} -function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); -} -function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - if (type === COMPONENTS) { - const selfName = getComponentName( - Component, - false - ); - if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = ( - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || // global registration - resolve(instance.appContext[type], name) - ); - if (!res && maybeSelfReference) { - return Component; - } - if (warnMissing && !res) { - const extra = type === COMPONENTS ? ` -If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; - warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } else { - warn$1( - `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` - ); - } -} -function resolve(registry, name) { - return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); -} - -function renderList(source, renderItem, cache, index) { - let ret; - const cached = cache && cache[index]; - const sourceIsArray = isArray(source); - if (sourceIsArray || isString(source)) { - const sourceIsReactiveArray = sourceIsArray && isReactive(source); - let needsWrap = false; - if (sourceIsReactiveArray) { - needsWrap = !isShallow(source); - source = shallowReadArray(source); - } - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem( - needsWrap ? toReactive(source[i]) : source[i], - i, - void 0, - cached && cached[i] - ); - } - } else if (typeof source === "number") { - if (!Number.isInteger(source)) { - warn$1(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); - } - } else if (isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from( - source, - (item, i) => renderItem(item, i, void 0, cached && cached[i]) - ); - } else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } - } else { - ret = []; - } - if (cache) { - cache[index] = ret; - } - return ret; -} - -function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - if (isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } else if (slot) { - slots[slot.name] = slot.key ? (...args) => { - const res = slot.fn(...args); - if (res) res.key = slot.key; - return res; - } : slot.fn; - } - } - return slots; -} - -function renderSlot(slots, name, props = {}, fallback, noSlotted) { - if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { - if (name !== "default") props.name = name; - return openBlock(), createBlock( - Fragment, - null, - [createVNode("slot", props, fallback && fallback())], - 64 - ); - } - let slot = slots[name]; - if (slot && slot.length > 1) { - warn$1( - `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` - ); - slot = () => []; - } - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch - // key attached in the `createSlots` helper, respect that - validSlotContent && validSlotContent.key; - const rendered = createBlock( - Fragment, - { - key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content - (!validSlotContent && fallback ? "_fb" : "") - }, - validSlotContent || (fallback ? fallback() : []), - validSlotContent && slots._ === 1 ? 64 : -2 - ); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + "-s"]; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; -} -function ensureValidVNode(vnodes) { - return vnodes.some((child) => { - if (!isVNode(child)) return true; - if (child.type === Comment) return false; - if (child.type === Fragment && !ensureValidVNode(child.children)) - return false; - return true; - }) ? vnodes : null; -} - -function toHandlers(obj, preserveCaseIfNecessary) { - const ret = {}; - if (!isObject(obj)) { - warn$1(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; - } - return ret; -} - -const getPublicInstance = (i) => { - if (!i) return null; - if (isStatefulComponent(i)) return getComponentPublicInstance(i); - return getPublicInstance(i.parent); -}; -const publicPropertiesMap = ( - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { - $: (i) => i, - $el: (i) => i.vnode.el, - $data: (i) => i.data, - $props: (i) => shallowReadonly(i.props) , - $attrs: (i) => shallowReadonly(i.attrs) , - $slots: (i) => shallowReadonly(i.slots) , - $refs: (i) => shallowReadonly(i.refs) , - $parent: (i) => getPublicInstance(i.parent), - $root: (i) => getPublicInstance(i.root), - $host: (i) => i.ce, - $emit: (i) => i.emit, - $options: (i) => resolveMergedOptions(i) , - $forceUpdate: (i) => i.f || (i.f = () => { - queueJob(i.update); - }), - $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: (i) => instanceWatch.bind(i) - }) -); -const isReservedPrefix = (key) => key === "_" || key === "$"; -const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); -const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - if (key === "__v_skip") { - return true; - } - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - if (key === "__isVue") { - return true; - } - let normalizedProps; - if (key[0] !== "$") { - const n = accessCache[key]; - if (n !== void 0) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - } - } else if (hasSetupBinding(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) - ) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } else if (shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - if (publicGetter) { - if (key === "$attrs") { - track(instance.attrs, "get", ""); - markAttrsAccessed(); - } else if (key === "$slots") { - track(instance, "get", key); - } - return publicGetter(instance); - } else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && (cssModule = cssModule[key]) - ) { - return cssModule; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } else if ( - // global properties - globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) - ) { - { - return globalProperties[key]; - } - } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf("__v") !== 0)) { - if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { - warn$1( - `Property ${JSON.stringify( - key - )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` - ); - } else if (instance === currentRenderingInstance) { - warn$1( - `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` - ); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (hasSetupBinding(setupState, key)) { - setupState[key] = value; - return true; - } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { - warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); - return false; - } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - data[key] = value; - return true; - } else if (hasOwn(instance.props, key)) { - warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); - return false; - } - if (key[0] === "$" && key.slice(1) in instance) { - warn$1( - `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` - ); - return false; - } else { - if (key in instance.appContext.config.globalProperties) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - value - }); - } else { - ctx[key] = value; - } - } - return true; - }, - has({ - _: { data, setupState, accessCache, ctx, appContext, propsOptions } - }, key) { - let normalizedProps; - return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - target._.accessCache[key] = 0; - } else if (hasOwn(descriptor, "value")) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); - } -}; -{ - PublicInstanceProxyHandlers.ownKeys = (target) => { - warn$1( - `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` - ); - return Reflect.ownKeys(target); - }; -} -const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, { - get(target, key) { - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); - }, - has(_, key) { - const has = key[0] !== "_" && !isGloballyAllowed(key); - if (!has && PublicInstanceProxyHandlers.has(_, key)) { - warn$1( - `Property ${JSON.stringify( - key - )} should not start with _ which is a reserved prefix for Vue internals.` - ); - } - return has; - } -}); -function createDevRenderContext(instance) { - const target = {}; - Object.defineProperty(target, `_`, { - configurable: true, - enumerable: false, - get: () => instance - }); - Object.keys(publicPropertiesMap).forEach((key) => { - Object.defineProperty(target, key, { - configurable: true, - enumerable: false, - get: () => publicPropertiesMap[key](instance), - // intercepted by the proxy so no need for implementation, - // but needed to prevent set errors - set: NOOP - }); - }); - return target; -} -function exposePropsOnRenderContext(instance) { - const { - ctx, - propsOptions: [propsOptions] - } = instance; - if (propsOptions) { - Object.keys(propsOptions).forEach((key) => { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => instance.props[key], - set: NOOP - }); - }); - } -} -function exposeSetupStateOnRenderContext(instance) { - const { ctx, setupState } = instance; - Object.keys(toRaw(setupState)).forEach((key) => { - if (!setupState.__isScriptSetup) { - if (isReservedPrefix(key[0])) { - warn$1( - `setup() return property ${JSON.stringify( - key - )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` - ); - return; - } - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => setupState[key], - set: NOOP - }); - } - }); -} - -const warnRuntimeUsage = (method) => warn$1( - `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` -); -function defineProps() { - { - warnRuntimeUsage(`defineProps`); - } - return null; -} -function defineEmits() { - { - warnRuntimeUsage(`defineEmits`); - } - return null; -} -function defineExpose(exposed) { - { - warnRuntimeUsage(`defineExpose`); - } -} -function defineOptions(options) { - { - warnRuntimeUsage(`defineOptions`); - } -} -function defineSlots() { - { - warnRuntimeUsage(`defineSlots`); - } - return null; -} -function defineModel() { - { - warnRuntimeUsage("defineModel"); - } -} -function withDefaults(props, defaults) { - { - warnRuntimeUsage(`withDefaults`); - } - return null; -} -function useSlots() { - return getContext().slots; -} -function useAttrs() { - return getContext().attrs; -} -function getContext() { - const i = getCurrentInstance(); - if (!i) { - warn$1(`useContext() called without active instance.`); - } - return i.setupContext || (i.setupContext = createSetupContext(i)); -} -function normalizePropsOrEmits(props) { - return isArray(props) ? props.reduce( - (normalized, p) => (normalized[p] = null, normalized), - {} - ) : props; -} -function mergeDefaults(raw, defaults) { - const props = normalizePropsOrEmits(raw); - for (const key in defaults) { - if (key.startsWith("__skip")) continue; - let opt = props[key]; - if (opt) { - if (isArray(opt) || isFunction(opt)) { - opt = props[key] = { type: opt, default: defaults[key] }; - } else { - opt.default = defaults[key]; - } - } else if (opt === null) { - opt = props[key] = { default: defaults[key] }; - } else { - warn$1(`props default key "${key}" has no corresponding declaration.`); - } - if (opt && defaults[`__skip_${key}`]) { - opt.skipFactory = true; - } - } - return props; -} -function mergeModels(a, b) { - if (!a || !b) return a || b; - if (isArray(a) && isArray(b)) return a.concat(b); - return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); -} -function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; -} -function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - if (!ctx) { - warn$1( - `withAsyncContext called without active current instance. This is likely a bug.` - ); - } - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (isPromise(awaitable)) { - awaitable = awaitable.catch((e) => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; -} - -function createDuplicateChecker() { - const cache = /* @__PURE__ */ Object.create(null); - return (type, key) => { - if (cache[key]) { - warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); - } else { - cache[key] = type; - } - }; -} -let shouldCacheAccess = true; -function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - shouldCacheAccess = false; - if (options.beforeCreate) { - callHook$1(options.beforeCreate, instance, "bc"); - } - const { - // state - data: dataOptions, - computed: computedOptions, - methods, - watch: watchOptions, - provide: provideOptions, - inject: injectOptions, - // lifecycle - created, - beforeMount, - mounted, - beforeUpdate, - updated, - activated, - deactivated, - beforeDestroy, - beforeUnmount, - destroyed, - unmounted, - render, - renderTracked, - renderTriggered, - errorCaptured, - serverPrefetch, - // public API - expose, - inheritAttrs, - // assets - components, - directives, - filters - } = options; - const checkDuplicateProperties = createDuplicateChecker() ; - { - const [propsOptions] = instance.propsOptions; - if (propsOptions) { - for (const key in propsOptions) { - checkDuplicateProperties("Props" /* PROPS */, key); - } - } - } - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (isFunction(methodHandler)) { - { - Object.defineProperty(ctx, key, { - value: methodHandler.bind(publicThis), - configurable: true, - enumerable: true, - writable: true - }); - } - { - checkDuplicateProperties("Methods" /* METHODS */, key); - } - } else { - warn$1( - `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` - ); - } - } - } - if (dataOptions) { - if (!isFunction(dataOptions)) { - warn$1( - `The data option must be a function. Plain object usage is no longer supported.` - ); - } - const data = dataOptions.call(publicThis, publicThis); - if (isPromise(data)) { - warn$1( - `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` - ); - } - if (!isObject(data)) { - warn$1(`data() should return an object.`); - } else { - instance.data = reactive(data); - { - for (const key in data) { - checkDuplicateProperties("Data" /* DATA */, key); - if (!isReservedPrefix(key[0])) { - Object.defineProperty(ctx, key, { - configurable: true, - enumerable: true, - get: () => data[key], - set: NOOP - }); - } - } - } - } - } - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; - if (get === NOOP) { - warn$1(`Computed property "${key}" has no getter.`); - } - const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { - warn$1( - `Write operation failed: computed property "${key}" is readonly.` - ); - } ; - const c = computed({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: (v) => c.value = v - }); - { - checkDuplicateProperties("Computed" /* COMPUTED */, key); - } - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; - Reflect.ownKeys(provides).forEach((key) => { - provide(key, provides[key]); - }); - } - if (created) { - callHook$1(created, instance, "c"); - } - function registerLifecycleHook(register, hook) { - if (isArray(hook)) { - hook.forEach((_hook) => register(_hook.bind(publicThis))); - } else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach((key) => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: (val) => publicThis[key] = val - }); - }); - } else if (!instance.exposed) { - instance.exposed = {}; - } - } - if (render && instance.render === NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - if (components) instance.components = components; - if (directives) instance.directives = directives; - if (serverPrefetch) { - markAsyncBoundary(instance); - } -} -function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { - if (isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (isObject(opt)) { - if ("default" in opt) { - injected = inject( - opt.from || key, - opt.default, - true - ); - } else { - injected = inject(opt.from || key); - } - } else { - injected = inject(opt); - } - if (isRef(injected)) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: (v) => injected.value = v - }); - } else { - ctx[key] = injected; - } - { - checkDuplicateProperties("Inject" /* INJECT */, key); - } - } -} -function callHook$1(hook, instance, type) { - callWithAsyncErrorHandling( - isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), - instance, - type - ); -} -function createWatcher(raw, ctx, publicThis, key) { - let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; - if (isString(raw)) { - const handler = ctx[raw]; - if (isFunction(handler)) { - { - watch(getter, handler); - } - } else { - warn$1(`Invalid watch handler specified by key "${raw}"`, handler); - } - } else if (isFunction(raw)) { - { - watch(getter, raw.bind(publicThis)); - } - } else if (isObject(raw)) { - if (isArray(raw)) { - raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); - } else { - const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; - if (isFunction(handler)) { - watch(getter, handler, raw); - } else { - warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); - } - } - } else { - warn$1(`Invalid watch option: "${key}"`, raw); - } -} -function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { - mixins: globalMixins, - optionsCache: cache, - config: { optionMergeStrategies } - } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; - } else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach( - (m) => mergeOptions(resolved, m, optionMergeStrategies, true) - ); - } - mergeOptions(resolved, base, optionMergeStrategies); - } - if (isObject(base)) { - cache.set(base, resolved); - } - return resolved; -} -function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); - } - if (mixins) { - mixins.forEach( - (m) => mergeOptions(to, m, strats, true) - ); - } - for (const key in from) { - if (asMixin && key === "expose") { - warn$1( - `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` - ); - } else { - const strat = internalOptionMergeStrats[key] || strats && strats[key]; - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; -} -const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeEmitsOrPropsOptions, - emits: mergeEmitsOrPropsOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject -}; -function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (extend)( - isFunction(to) ? to.call(this, this) : to, - isFunction(from) ? from.call(this, this) : from - ); - }; -} -function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); -} -function normalizeInject(raw) { - if (isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; - } - return raw; -} -function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; -} -function mergeObjectOptions(to, from) { - return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; -} -function mergeEmitsOrPropsOptions(to, from) { - if (to) { - if (isArray(to) && isArray(from)) { - return [.../* @__PURE__ */ new Set([...to, ...from])]; - } - return extend( - /* @__PURE__ */ Object.create(null), - normalizePropsOrEmits(to), - normalizePropsOrEmits(from != null ? from : {}) - ); - } else { - return from; - } -} -function mergeWatchOptions(to, from) { - if (!to) return from; - if (!from) return to; - const merged = extend(/* @__PURE__ */ Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; -} - -function createAppContext() { - return { - app: null, - config: { - isNativeTag: NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: void 0, - warnHandler: void 0, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: /* @__PURE__ */ Object.create(null), - optionsCache: /* @__PURE__ */ new WeakMap(), - propsCache: /* @__PURE__ */ new WeakMap(), - emitsCache: /* @__PURE__ */ new WeakMap() - }; -} -let uid$1 = 0; -function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!isFunction(rootComponent)) { - rootComponent = extend({}, rootComponent); - } - if (rootProps != null && !isObject(rootProps)) { - warn$1(`root props passed to app.mount() must be an object.`); - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = /* @__PURE__ */ new WeakSet(); - const pluginCleanupFns = []; - let isMounted = false; - const app = context.app = { - _uid: uid$1++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - { - warn$1( - `app.config cannot be replaced. Modify individual options instead.` - ); - } - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) { - warn$1(`Plugin has already been applied to target app.`); - } else if (plugin && isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } else if (isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } else { - warn$1( - `A plugin must either be a function or an object with an "install" function.` - ); - } - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } else { - warn$1( - "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") - ); - } - } - return app; - }, - component(name, component) { - { - validateComponentName(name, context.config); - } - if (!component) { - return context.components[name]; - } - if (context.components[name]) { - warn$1(`Component "${name}" has already been registered in target app.`); - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - { - validateDirectiveName(name); - } - if (!directive) { - return context.directives[name]; - } - if (context.directives[name]) { - warn$1(`Directive "${name}" has already been registered in target app.`); - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, namespace) { - if (!isMounted) { - if (rootContainer.__vue_app__) { - warn$1( - `There is already an app instance mounted on the host container. - If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` - ); - } - const vnode = app._ceVNode || createVNode(rootComponent, rootProps); - vnode.appContext = context; - if (namespace === true) { - namespace = "svg"; - } else if (namespace === false) { - namespace = void 0; - } - { - context.reload = () => { - render( - cloneVNode(vnode), - rootContainer, - namespace - ); - }; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } else { - render(vnode, rootContainer, namespace); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - { - app._instance = vnode.component; - devtoolsInitApp(app, version); - } - return getComponentPublicInstance(vnode.component); - } else { - warn$1( - `App has already been mounted. -If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` - ); - } - }, - onUnmount(cleanupFn) { - if (typeof cleanupFn !== "function") { - warn$1( - `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` - ); - } - pluginCleanupFns.push(cleanupFn); - }, - unmount() { - if (isMounted) { - callWithAsyncErrorHandling( - pluginCleanupFns, - app._instance, - 16 - ); - render(null, app._container); - { - app._instance = null; - devtoolsUnmountApp(app); - } - delete app._container.__vue_app__; - } else { - warn$1(`Cannot unmount an app that is not mounted.`); - } - }, - provide(key, value) { - if (key in context.provides) { - warn$1( - `App already provides property with key "${String(key)}". It will be overwritten with the new value.` - ); - } - context.provides[key] = value; - return app; - }, - runWithContext(fn) { - const lastApp = currentApp; - currentApp = app; - try { - return fn(); - } finally { - currentApp = lastApp; - } - } - }; - return app; - }; -} -let currentApp = null; - -function provide(key, value) { - if (!currentInstance) { - { - warn$1(`provide() can only be used inside setup().`); - } - } else { - let provides = currentInstance.provides; - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - provides[key] = value; - } -} -function inject(key, defaultValue, treatDefaultAsFactory = false) { - const instance = currentInstance || currentRenderingInstance; - if (instance || currentApp) { - const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; - if (provides && key in provides) { - return provides[key]; - } else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; - } else { - warn$1(`injection "${String(key)}" not found.`); - } - } else { - warn$1(`inject() can only be used inside setup() or functional components.`); - } -} -function hasInjectionContext() { - return !!(currentInstance || currentRenderingInstance || currentApp); -} - -const internalObjectProto = {}; -const createInternalObject = () => Object.create(internalObjectProto); -const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; - -function initProps(instance, rawProps, isStateful, isSSR = false) { - const props = {}; - const attrs = createInternalObject(); - instance.propsDefaults = /* @__PURE__ */ Object.create(null); - setFullProps(instance, rawProps, props, attrs); - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = void 0; - } - } - { - validateProps(rawProps || {}, props, instance); - } - if (isStateful) { - instance.props = isSSR ? props : shallowReactive(props); - } else { - if (!instance.type.props) { - instance.props = attrs; - } else { - instance.props = props; - } - } - instance.attrs = attrs; -} -function isInHmrContext(instance) { - while (instance) { - if (instance.type.__hmrId) return true; - instance = instance.parent; - } -} -function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { - props, - attrs, - vnode: { patchFlag } - } = instance; - const rawCurrentProps = toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( - // always force full diff in dev - // - #1942 if hmr is enabled with sfc component - // - vite#872 non-sfc component used by sfc component - !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) - ) { - if (patchFlag & 8) { - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - const value = rawProps[key]; - if (options) { - if (hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } else { - const camelizedKey = camelize(key); - props[camelizedKey] = resolvePropValue( - options, - rawCurrentProps, - camelizedKey, - value, - instance, - false - ); - } - } else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - } else { - if (setFullProps(instance, rawProps, props, attrs)) { - hasAttrsChanged = true; - } - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || // for camelCase - !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { - if (options) { - if (rawPrevProps && // for camelCase - (rawPrevProps[key] !== void 0 || // for kebab-case - rawPrevProps[kebabKey] !== void 0)) { - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - void 0, - instance, - true - ); - } - } else { - delete props[key]; - } - } - } - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || !hasOwn(rawProps, key) && true) { - delete attrs[key]; - hasAttrsChanged = true; - } - } - } - } - if (hasAttrsChanged) { - trigger(instance.attrs, "set", ""); - } - { - validateProps(rawProps || {}, props, instance); - } -} -function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - if (isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - let camelKey; - if (options && hasOwn(options, camelKey = camelize(key))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - if (needCastKeys) { - const rawCurrentProps = toRaw(props); - const castValues = rawCastValues || EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - castValues[key], - instance, - !hasOwn(castValues, key) - ); - } - } - return hasAttrsChanged; -} -function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = hasOwn(opt, "default"); - if (hasDefault && value === void 0) { - const defaultValue = opt.default; - if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } else { - const reset = setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call( - null, - props - ); - reset(); - } - } else { - value = defaultValue; - } - if (instance.ce) { - instance.ce._setProp(key, value); - } - } - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { - value = true; - } - } - } - return value; -} -const mixinPropsCache = /* @__PURE__ */ new WeakMap(); -function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = asMixin ? mixinPropsCache : appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; - } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - let hasExtends = false; - if (!isFunction(comp)) { - const extendProps = (raw2) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw2, appContext, true); - extend(normalized, props); - if (keys) needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } - } - if (!raw && !hasExtends) { - if (isObject(comp)) { - cache.set(comp, EMPTY_ARR); - } - return EMPTY_ARR; - } - if (isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - if (!isString(raw[i])) { - warn$1(`props must be strings when using array syntax.`, raw[i]); - } - const normalizedKey = camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = EMPTY_OBJ; - } - } - } else if (raw) { - if (!isObject(raw)) { - warn$1(`invalid props options`, raw); - } - for (const key in raw) { - const normalizedKey = camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); - const propType = prop.type; - let shouldCast = false; - let shouldCastTrue = true; - if (isArray(propType)) { - for (let index = 0; index < propType.length; ++index) { - const type = propType[index]; - const typeName = isFunction(type) && type.name; - if (typeName === "Boolean") { - shouldCast = true; - break; - } else if (typeName === "String") { - shouldCastTrue = false; - } - } - } else { - shouldCast = isFunction(propType) && propType.name === "Boolean"; - } - prop[0 /* shouldCast */] = shouldCast; - prop[1 /* shouldCastTrue */] = shouldCastTrue; - if (shouldCast || hasOwn(prop, "default")) { - needCastKeys.push(normalizedKey); - } - } - } - } - const res = [normalized, needCastKeys]; - if (isObject(comp)) { - cache.set(comp, res); - } - return res; -} -function validatePropName(key) { - if (key[0] !== "$" && !isReservedProp(key)) { - return true; - } else { - warn$1(`Invalid prop name: "${key}" is a reserved property.`); - } - return false; -} -function getType(ctor) { - if (ctor === null) { - return "null"; - } - if (typeof ctor === "function") { - return ctor.name || ""; - } else if (typeof ctor === "object") { - const name = ctor.constructor && ctor.constructor.name; - return name || ""; - } - return ""; -} -function validateProps(rawProps, props, instance) { - const resolvedValues = toRaw(props); - const options = instance.propsOptions[0]; - const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key)); - for (const key in options) { - let opt = options[key]; - if (opt == null) continue; - validateProp( - key, - resolvedValues[key], - opt, - shallowReadonly(resolvedValues) , - !camelizePropsKey.includes(key) - ); - } -} -function validateProp(name, value, prop, props, isAbsent) { - const { type, required, validator, skipCheck } = prop; - if (required && isAbsent) { - warn$1('Missing required prop: "' + name + '"'); - return; - } - if (value == null && !required) { - return; - } - if (type != null && type !== true && !skipCheck) { - let isValid = false; - const types = isArray(type) ? type : [type]; - const expectedTypes = []; - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); - expectedTypes.push(expectedType || ""); - isValid = valid; - } - if (!isValid) { - warn$1(getInvalidTypeMessage(name, value, expectedTypes)); - return; - } - } - if (validator && !validator(value, props)) { - warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); - } -} -const isSimpleType = /* @__PURE__ */ makeMap( - "String,Number,Boolean,Function,Symbol,BigInt" -); -function assertType(value, type) { - let valid; - const expectedType = getType(type); - if (expectedType === "null") { - valid = value === null; - } else if (isSimpleType(expectedType)) { - const t = typeof value; - valid = t === expectedType.toLowerCase(); - if (!valid && t === "object") { - valid = value instanceof type; - } - } else if (expectedType === "Object") { - valid = isObject(value); - } else if (expectedType === "Array") { - valid = isArray(value); - } else { - valid = value instanceof type; - } - return { - valid, - expectedType - }; -} -function getInvalidTypeMessage(name, value, expectedTypes) { - if (expectedTypes.length === 0) { - return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; - } - let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; - const expectedType = expectedTypes[0]; - const receivedType = toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); - if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; - } - message += `, got ${receivedType} `; - if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; - } - return message; -} -function styleValue(value, type) { - if (type === "String") { - return `"${value}"`; - } else if (type === "Number") { - return `${Number(value)}`; - } else { - return `${value}`; - } -} -function isExplicable(type) { - const explicitTypes = ["string", "number", "boolean"]; - return explicitTypes.some((elem) => type.toLowerCase() === elem); -} -function isBoolean(...args) { - return args.some((elem) => elem.toLowerCase() === "boolean"); -} - -const isInternalKey = (key) => key[0] === "_" || key === "$stable"; -const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; -const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - return rawSlot; - } - const normalized = withCtx((...args) => { - if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { - warn$1( - `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` - ); - } - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; -}; -const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) continue; - const value = rawSlots[key]; - if (isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } else if (value != null) { - { - warn$1( - `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` - ); - } - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } - } -}; -const normalizeVNodeSlots = (instance, children) => { - if (!isKeepAlive(instance.vnode) && true) { - warn$1( - `Non-function value encountered for default slot. Prefer function slots for better performance.` - ); - } - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; -}; -const assignSlots = (slots, children, optimized) => { - for (const key in children) { - if (optimized || key !== "_") { - slots[key] = children[key]; - } - } -}; -const initSlots = (instance, children, optimized) => { - const slots = instance.slots = createInternalObject(); - if (instance.vnode.shapeFlag & 32) { - const type = children._; - if (type) { - assignSlots(slots, children, optimized); - if (optimized) { - def(slots, "_", type, true); - } - } else { - normalizeObjectSlots(children, slots); - } - } else if (children) { - normalizeVNodeSlots(instance, children); - } -}; -const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = EMPTY_OBJ; - if (vnode.shapeFlag & 32) { - const type = children._; - if (type) { - if (isHmrUpdating) { - assignSlots(slots, children, optimized); - trigger(instance, "set", "$slots"); - } else if (optimized && type === 1) { - needDeletionCheck = false; - } else { - assignSlots(slots, children, optimized); - } - } else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; - } else if (children) { - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { - delete slots[key]; - } - } - } -}; - -let supported; -let perf; -function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - { - devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); - } -} -function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure( - `<${formatComponentName(instance, instance.type)}> ${type}`, - startTag, - endTag - ); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - { - devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); - } -} -function isSupported() { - if (supported !== void 0) { - return supported; - } - if (typeof window !== "undefined" && window.performance) { - supported = true; - perf = window.performance; - } else { - supported = false; - } - return supported; -} - -const queuePostRenderEffect = queueEffectWithSuspense ; -function createRenderer(options) { - return baseCreateRenderer(options); -} -function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); -} -function baseCreateRenderer(options, createHydrationFns) { - const target = getGlobalThis(); - target.__VUE__ = true; - { - setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); - } - const { - insert: hostInsert, - remove: hostRemove, - patchProp: hostPatchProp, - createElement: hostCreateElement, - createText: hostCreateText, - createComment: hostCreateComment, - setText: hostSetText, - setElementText: hostSetElementText, - parentNode: hostParentNode, - nextSibling: hostNextSibling, - setScopeId: hostSetScopeId = NOOP, - insertStaticContent: hostInsertStaticContent - } = options; - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, namespace); - } else { - patchStaticNode(n1, n2, container, namespace); - } - break; - case Fragment: - processFragment( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - break; - default: - if (shapeFlag & 1) { - processElement( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 6) { - processComponent( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 64) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else if (shapeFlag & 128) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else { - warn$1("Invalid VNode type:", type, `(${typeof type})`); - } - } - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateText(n2.children), - container, - anchor - ); - } else { - const el = n2.el = n1.el; - if (n2.children !== n1.children) { - hostSetText(el, n2.children); - } - } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateComment(n2.children || ""), - container, - anchor - ); - } else { - n2.el = n1.el; - } - }; - const mountStaticNode = (n2, container, anchor, namespace) => { - [n2.el, n2.anchor] = hostInsertStaticContent( - n2.children, - container, - anchor, - namespace, - n2.el, - n2.anchor - ); - }; - const patchStaticNode = (n1, n2, container, namespace) => { - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent( - n2.children, - container, - anchor, - namespace - ); - } else { - n2.el = n1.el; - n2.anchor = n1.anchor; - } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; - } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; - } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - if (n2.type === "svg") { - namespace = "svg"; - } else if (n2.type === "math") { - namespace = "mathml"; - } - if (n1 == null) { - mountElement( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - patchElement( - n1, - n2, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - let el; - let vnodeHook; - const { props, shapeFlag, transition, dirs } = vnode; - el = vnode.el = hostCreateElement( - vnode.type, - namespace, - props && props.is, - props - ); - if (shapeFlag & 8) { - hostSetElementText(el, vnode.children); - } else if (shapeFlag & 16) { - mountChildren( - vnode.children, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(vnode, namespace), - slotScopeIds, - optimized - ); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); - if (props) { - for (const key in props) { - if (key !== "value" && !isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], namespace, parentComponent); - } - } - if ("value" in props) { - hostPatchProp(el, "value", null, props.value, namespace); - } - if (vnodeHook = props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - { - def(el, "__vnode", vnode, true); - def(el, "__vueParentComponent", parentComponent, true); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - const needCallTransitionHooks = needTransition(parentSuspense, transition); - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { - subTree = filterSingleRoot(subTree.children) || subTree; - } - if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { - const parentVNode = parentComponent.vnode; - setScopeId( - el, - parentVNode, - parentVNode.scopeId, - parentVNode.slotScopeIds, - parentComponent.parent - ); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); - patch( - null, - child, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const el = n2.el = n1.el; - { - el.__vnode = n2; - } - let { patchFlag, dynamicChildren, dirs } = n2; - patchFlag |= n1.patchFlag & 16; - const oldProps = n1.props || EMPTY_OBJ; - const newProps = n2.props || EMPTY_OBJ; - let vnodeHook; - parentComponent && toggleRecurse(parentComponent, false); - if (vnodeHook = newProps.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); - } - parentComponent && toggleRecurse(parentComponent, true); - if (isHmrUpdating) { - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { - hostSetElementText(el, ""); - } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - el, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds - ); - { - traverseStaticChildren(n1, n2); - } - } else if (!optimized) { - patchChildren( - n1, - n2, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds, - false - ); - } - if (patchFlag > 0) { - if (patchFlag & 16) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } else { - if (patchFlag & 2) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, "class", null, newProps.class, namespace); - } - } - if (patchFlag & 4) { - hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); - } - if (patchFlag & 8) { - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - if (next !== prev || key === "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - } - } - if (patchFlag & 1) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } else if (!optimized && dynamicChildren == null) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); - }, parentSuspense); - } - }; - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - const container = ( - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( - // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer - ) - ); - patch( - oldVNode, - newVNode, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - true - ); - } - }; - const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { - if (oldProps !== newProps) { - if (oldProps !== EMPTY_OBJ) { - for (const key in oldProps) { - if (!isReservedProp(key) && !(key in newProps)) { - hostPatchProp( - el, - key, - oldProps[key], - null, - namespace, - parentComponent - ); - } - } - } - for (const key in newProps) { - if (isReservedProp(key)) continue; - const next = newProps[key]; - const prev = oldProps[key]; - if (next !== prev && key !== "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - if ("value" in newProps) { - hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); - const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if ( - // #5523 dev root fragment may inherit directives - isHmrUpdating || patchFlag & 2048 - ) { - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - mountChildren( - // #10007 - // such fragment like `<></>` will be compiled into - // a fragment which doesn't have a children. - // In this case fallback to an empty array - n2.children || [], - container, - fragmentEndAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - container, - parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - { - traverseStaticChildren(n1, n2); - } - } else { - patchChildren( - n1, - n2, - container, - fragmentEndAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512) { - parentComponent.ctx.activate( - n2, - container, - anchor, - namespace, - optimized - ); - } else { - mountComponent( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - optimized - ); - } - } else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { - const instance = (initialVNode.component = createComponentInstance( - initialVNode, - parentComponent, - parentSuspense - )); - if (instance.type.__hmrId) { - registerHMR(instance); - } - { - pushWarningContext(initialVNode); - startMeasure(instance, `mount`); - } - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - { - { - startMeasure(instance, `init`); - } - setupComponent(instance, false, optimized); - { - endMeasure(instance, `init`); - } - } - if (instance.asyncDep) { - if (isHmrUpdating) initialVNode.el = null; - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); - if (!initialVNode.el) { - const placeholder = instance.subTree = createVNode(Comment); - processCommentNode(null, placeholder, container, anchor); - } - } else { - setupRenderEffect( - instance, - initialVNode, - container, - anchor, - parentSuspense, - namespace, - optimized - ); - } - { - popWarningContext(); - endMeasure(instance, `mount`); - } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = n2.component = n1.component; - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && !instance.asyncResolved) { - { - pushWarningContext(n2); - } - updateComponentPreRender(instance, n2, optimized); - { - popWarningContext(); - } - return; - } else { - instance.next = n2; - instance.update(); - } - } else { - n2.el = n1.el; - instance.vnode = n2; - } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent, root, type } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - if (bm) { - invokeArrayFns(bm); - } - if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - const hydrateSubTree = () => { - { - startMeasure(instance, `render`); - } - instance.subTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `hydrate`); - } - hydrateNode( - el, - instance.subTree, - instance, - parentSuspense, - null - ); - { - endMeasure(instance, `hydrate`); - } - }; - if (isAsyncWrapperVNode && type.__asyncHydrate) { - type.__asyncHydrate( - el, - instance, - hydrateSubTree - ); - } else { - hydrateSubTree(); - } - } else { - if (root.ce) { - root.ce._injectChildStyle(type); - } - { - startMeasure(instance, `render`); - } - const subTree = instance.subTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `patch`); - } - patch( - null, - subTree, - container, - anchor, - instance, - parentSuspense, - namespace - ); - { - endMeasure(instance, `patch`); - } - initialVNode.el = subTree.el; - } - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect( - () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), - parentSuspense - ); - } - if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - { - devtoolsComponentAdded(instance); - } - initialVNode = container = anchor = null; - } else { - let { next, bu, u, parent, vnode } = instance; - { - const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); - if (nonHydratedAsyncRoot) { - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - nonHydratedAsyncRoot.asyncDep.then(() => { - if (!instance.isUnmounted) { - componentUpdateFn(); - } - }); - return; - } - } - let originNext = next; - let vnodeHook; - { - pushWarningContext(next || instance.vnode); - } - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } else { - next = vnode; - } - if (bu) { - invokeArrayFns(bu); - } - if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - { - startMeasure(instance, `render`); - } - const nextTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - const prevTree = instance.subTree; - instance.subTree = nextTree; - { - startMeasure(instance, `patch`); - } - patch( - prevTree, - nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), - instance, - parentSuspense, - namespace - ); - { - endMeasure(instance, `patch`); - } - next.el = nextTree.el; - if (originNext === null) { - updateHOCHostEl(instance, nextTree.el); - } - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - if (vnodeHook = next.props && next.props.onVnodeUpdated) { - queuePostRenderEffect( - () => invokeVNodeHook(vnodeHook, parent, next, vnode), - parentSuspense - ); - } - { - devtoolsComponentUpdated(instance); - } - { - popWarningContext(); - } - } - }; - instance.scope.on(); - const effect = instance.effect = new ReactiveEffect(componentUpdateFn); - instance.scope.off(); - const update = instance.update = effect.run.bind(effect); - const job = instance.job = effect.runIfDirty.bind(effect); - job.i = instance; - job.id = instance.uid; - effect.scheduler = () => queueJob(job); - toggleRecurse(instance, true); - { - effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; - effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; - } - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - pauseTracking(); - flushPreFlushCbs(instance); - resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - if (patchFlag > 0) { - if (patchFlag & 128) { - patchKeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - return; - } else if (patchFlag & 256) { - patchUnkeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - return; - } - } - if (shapeFlag & 8) { - if (prevShapeFlag & 16) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } - } else { - if (prevShapeFlag & 16) { - if (shapeFlag & 16) { - patchKeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } else { - if (prevShapeFlag & 8) { - hostSetElementText(container, ""); - } - if (shapeFlag & 16) { - mountChildren( - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - } - } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - c1 = c1 || EMPTY_ARR; - c2 = c2 || EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - patch( - c1[i], - nextChild, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - if (oldLength > newLength) { - unmountChildren( - c1, - parentComponent, - parentSuspense, - true, - false, - commonLength - ); - } else { - mountChildren( - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - commonLength - ); - } - }; - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; - let e2 = l2 - 1; - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - if (isSameVNodeType(n1, n2)) { - patch( - n1, - n2, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - break; - } - i++; - } - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); - if (isSameVNodeType(n1, n2)) { - patch( - n1, - n2, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - break; - } - e1--; - e2--; - } - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch( - null, - c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - i++; - } - } - } else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } else { - const s1 = i; - const s2 = i; - const keyToNewIndexMap = /* @__PURE__ */ new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - if (nextChild.key != null) { - if (keyToNewIndexMap.has(nextChild.key)) { - warn$1( - `Duplicate keys found during update:`, - JSON.stringify(nextChild.key), - `Make sure keys are unique.` - ); - } - keyToNewIndexMap.set(nextChild.key, i); - } - } - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - let maxNewIndexSoFar = 0; - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } else { - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === void 0) { - unmount(prevChild, parentComponent, parentSuspense, true); - } else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } else { - moved = true; - } - patch( - prevChild, - c2[newIndex], - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - patched++; - } - } - const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - patch( - null, - nextChild, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (moved) { - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2); - } else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; - if (needTransition2) { - if (moveType === 0) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } else { - const { leave, delayLeave, afterLeave } = transition; - const remove2 = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove2(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove2, performLeave); - } else { - performLeave(); - } - } - } else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { - type, - props, - ref, - children, - dynamicChildren, - shapeFlag, - patchFlag, - dirs, - cacheIndex - } = vnode; - if (patchFlag === -2) { - optimized = false; - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (cacheIndex != null) { - parentComponent.renderCache[cacheIndex] = void 0; - } - if (shapeFlag & 256) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } else { - if (shapeFlag & 128) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); - } - if (shapeFlag & 64) { - vnode.type.remove( - vnode, - parentComponent, - parentSuspense, - internals, - doRemove - ); - } else if (dynamicChildren && // #5154 - // when v-once is used inside a block, setBlockTracking(-1) marks the - // parent block with hasOnce: true - // so that it doesn't take the fast path during unmount - otherwise - // components nested in v-once are never unmounted. - !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { - unmountChildren( - dynamicChildren, - parentComponent, - parentSuspense, - false, - true - ); - } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); - }, parentSuspense); - } - }; - const remove = (vnode) => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { - vnode.children.forEach((child) => { - if (child.type === Comment) { - hostRemove(child.el); - } else { - remove(child); - } - }); - } else { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 && transition && !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } else { - performLeave(); - } - } else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - if (instance.type.__hmrId) { - unregisterHMR(instance); - } - const { bum, scope, job, subTree, um, m, a } = instance; - invalidateMount(m); - invalidateMount(a); - if (bum) { - invokeArrayFns(bum); - } - scope.stop(); - if (job) { - job.flags |= 8; - unmount(subTree, instance, parentSuspense, doRemove); - } - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } - } - { - devtoolsComponentRemoved(instance); - } - }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } - }; - const getNextHostNode = (vnode) => { - if (vnode.shapeFlag & 6) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128) { - return vnode.suspense.next(); - } - const el = hostNextSibling(vnode.anchor || vnode.el); - const teleportEnd = el && el[TeleportEndKey]; - return teleportEnd ? hostNextSibling(teleportEnd) : el; - }; - let isFlushing = false; - const render = (vnode, container, namespace) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } else { - patch( - container._vnode || null, - vnode, - container, - null, - null, - null, - namespace - ); - } - container._vnode = vnode; - if (!isFlushing) { - isFlushing = true; - flushPreFlushCbs(); - flushPostFlushCbs(); - isFlushing = false; - } - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns( - internals - ); - } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) - }; -} -function resolveChildrenNamespace({ type, props }, currentNamespace) { - return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; -} -function toggleRecurse({ effect, job }, allowed) { - if (allowed) { - effect.flags |= 32; - job.flags |= 4; - } else { - effect.flags &= ~32; - job.flags &= ~4; - } -} -function needTransition(parentSuspense, transition) { - return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; -} -function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (isArray(ch1) && isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow && c2.patchFlag !== -2) - traverseStaticChildren(c1, c2); - } - if (c2.type === Text) { - c2.el = c1.el; - } - if (c2.type === Comment && !c2.el) { - c2.el = c1.el; - } - } - } -} -function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = u + v >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } - } - } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; - } - return result; -} -function locateNonHydratedAsyncRoot(instance) { - const subComponent = instance.subTree.component; - if (subComponent) { - if (subComponent.asyncDep && !subComponent.asyncResolved) { - return subComponent; - } else { - return locateNonHydratedAsyncRoot(subComponent); - } - } -} -function invalidateMount(hooks) { - if (hooks) { - for (let i = 0; i < hooks.length; i++) - hooks[i].flags |= 8; - } -} - -const ssrContextKey = Symbol.for("v-scx"); -const useSSRContext = () => { - { - const ctx = inject(ssrContextKey); - if (!ctx) { - warn$1( - `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` - ); - } - return ctx; - } -}; - -function watchEffect(effect, options) { - return doWatch(effect, null, options); -} -function watchPostEffect(effect, options) { - return doWatch( - effect, - null, - extend({}, options, { flush: "post" }) - ); -} -function watchSyncEffect(effect, options) { - return doWatch( - effect, - null, - extend({}, options, { flush: "sync" }) - ); -} -function watch(source, cb, options) { - if (!isFunction(cb)) { - warn$1( - `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` - ); - } - return doWatch(source, cb, options); -} -function doWatch(source, cb, options = EMPTY_OBJ) { - const { immediate, deep, flush, once } = options; - if (!cb) { - if (immediate !== void 0) { - warn$1( - `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - if (deep !== void 0) { - warn$1( - `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - if (once !== void 0) { - warn$1( - `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - } - const baseWatchOptions = extend({}, options); - baseWatchOptions.onWarn = warn$1; - const runsImmediately = cb && immediate || !cb && flush !== "post"; - let ssrCleanup; - if (isInSSRComponentSetup) { - if (flush === "sync") { - const ctx = useSSRContext(); - ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); - } else if (!runsImmediately) { - const watchStopHandle = () => { - }; - watchStopHandle.stop = NOOP; - watchStopHandle.resume = NOOP; - watchStopHandle.pause = NOOP; - return watchStopHandle; - } - } - const instance = currentInstance; - baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); - let isPre = false; - if (flush === "post") { - baseWatchOptions.scheduler = (job) => { - queuePostRenderEffect(job, instance && instance.suspense); - }; - } else if (flush !== "sync") { - isPre = true; - baseWatchOptions.scheduler = (job, isFirstRun) => { - if (isFirstRun) { - job(); - } else { - queueJob(job); - } - }; - } - baseWatchOptions.augmentJob = (job) => { - if (cb) { - job.flags |= 4; - } - if (isPre) { - job.flags |= 2; - if (instance) { - job.id = instance.uid; - job.i = instance; - } - } - }; - const watchHandle = watch$1(source, cb, baseWatchOptions); - if (isInSSRComponentSetup) { - if (ssrCleanup) { - ssrCleanup.push(watchHandle); - } else if (runsImmediately) { - watchHandle(); - } - } - return watchHandle; -} -function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } else { - cb = value.handler; - options = value; - } - const reset = setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - reset(); - return res; -} -function createPathGetter(ctx, path) { - const segments = path.split("."); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; -} - -function useModel(props, name, options = EMPTY_OBJ) { - const i = getCurrentInstance(); - if (!i) { - warn$1(`useModel() called without active instance.`); - return ref(); - } - const camelizedName = camelize(name); - if (!i.propsOptions[0][camelizedName]) { - warn$1(`useModel() called with prop "${name}" which is not declared.`); - return ref(); - } - const hyphenatedName = hyphenate(name); - const modifiers = getModelModifiers(props, camelizedName); - const res = customRef((track, trigger) => { - let localValue; - let prevSetValue = EMPTY_OBJ; - let prevEmittedValue; - watchSyncEffect(() => { - const propValue = props[camelizedName]; - if (hasChanged(localValue, propValue)) { - localValue = propValue; - trigger(); - } - }); - return { - get() { - track(); - return options.get ? options.get(localValue) : localValue; - }, - set(value) { - const emittedValue = options.set ? options.set(value) : value; - if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) { - return; - } - const rawProps = i.vnode.props; - if (!(rawProps && // check if parent has passed v-model - (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { - localValue = value; - trigger(); - } - i.emit(`update:${name}`, emittedValue); - if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) { - trigger(); - } - prevSetValue = value; - prevEmittedValue = emittedValue; - } - }; - }); - res[Symbol.iterator] = () => { - let i2 = 0; - return { - next() { - if (i2 < 2) { - return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false }; - } else { - return { done: true }; - } - } - }; - }; - return res; -} -const getModelModifiers = (props, modelName) => { - return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; -}; - -function emit(instance, event, ...rawArgs) { - if (instance.isUnmounted) return; - const props = instance.vnode.props || EMPTY_OBJ; - { - const { - emitsOptions, - propsOptions: [propsOptions] - } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && true) { - if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) { - warn$1( - `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.` - ); - } - } else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn$1( - `Invalid event arguments: event validation failed for event "${event}".` - ); - } - } - } - } - } - let args = rawArgs; - const isModelListener = event.startsWith("update:"); - const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); - if (modifiers) { - if (modifiers.trim) { - args = rawArgs.map((a) => isString(a) ? a.trim() : a); - } - if (modifiers.number) { - args = rawArgs.map(looseToNumber); - } - } - { - devtoolsComponentEmit(instance, event, args); - } - { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1( - `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( - instance, - instance.type - )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( - event - )}" instead of "${event}".` - ); - } - } - let handlerName; - let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) - props[handlerName = toHandlerKey(camelize(event))]; - if (!handler && isModelListener) { - handler = props[handlerName = toHandlerKey(hyphenate(event))]; - } - if (handler) { - callWithAsyncErrorHandling( - handler, - instance, - 6, - args - ); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling( - onceHandler, - instance, - 6, - args - ); - } -} -function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== void 0) { - return cached; - } - const raw = comp.emits; - let normalized = {}; - let hasExtends = false; - if (!isFunction(comp)) { - const extendEmits = (raw2) => { - const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } - } - if (!raw && !hasExtends) { - if (isObject(comp)) { - cache.set(comp, null); - } - return null; - } - if (isArray(raw)) { - raw.forEach((key) => normalized[key] = null); - } else { - extend(normalized, raw); - } - if (isObject(comp)) { - cache.set(comp, normalized); - } - return normalized; -} -function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ""); - return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); -} - -let accessedAttrs = false; -function markAttrsAccessed() { - accessedAttrs = true; -} -function renderComponentRoot(instance) { - const { - type: Component, - vnode, - proxy, - withProxy, - propsOptions: [propsOptions], - slots, - attrs, - emit, - render, - renderCache, - props, - data, - setupState, - ctx, - inheritAttrs - } = instance; - const prev = setCurrentRenderingInstance(instance); - let result; - let fallthroughAttrs; - { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4) { - const proxyToUse = withProxy || proxy; - const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { - get(target, key, receiver) { - warn$1( - `Property '${String( - key - )}' was accessed via 'this'. Avoid using 'this' in templates.` - ); - return Reflect.get(target, key, receiver); - } - }) : proxyToUse; - result = normalizeVNode( - render.call( - thisProxy, - proxyToUse, - renderCache, - true ? shallowReadonly(props) : props, - setupState, - data, - ctx - ) - ); - fallthroughAttrs = attrs; - } else { - const render2 = Component; - if (attrs === props) { - markAttrsAccessed(); - } - result = normalizeVNode( - render2.length > 1 ? render2( - true ? shallowReadonly(props) : props, - true ? { - get attrs() { - markAttrsAccessed(); - return shallowReadonly(attrs); - }, - slots, - emit - } : { attrs, slots, emit } - ) : render2( - true ? shallowReadonly(props) : props, - null - ) - ); - fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); - } - } catch (err) { - blockStack.length = 0; - handleError(err, instance, 1); - result = createVNode(Comment); - } - let root = result; - let setRoot = void 0; - if (result.patchFlag > 0 && result.patchFlag & 2048) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 | 6)) { - if (propsOptions && keys.some(isModelListener)) { - fallthroughAttrs = filterModelListeners( - fallthroughAttrs, - propsOptions - ); - } - root = cloneVNode(root, fallthroughAttrs, false, true); - } else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - if (!isModelListener(key)) { - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1( - `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` - ); - } - if (eventAttrs.length) { - warn$1( - `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` - ); - } - } - } - } - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn$1( - `Runtime directive used on component with non-element root node. The directives will not function as intended.` - ); - } - root = cloneVNode(root, null, false, true); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; - } - if (vnode.transition) { - if (!isElementRoot(root)) { - warn$1( - `Component inside <Transition> renders non-element root node that cannot be animated.` - ); - } - setTransitionHooks(root, vnode.transition); - } - if (setRoot) { - setRoot(root); - } else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; -} -const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren, false); - if (!childRoot) { - return [vnode, void 0]; - } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { - return getChildRoot(childRoot); - } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; -}; -function filterSingleRoot(children, recurse = true) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - if (child.type !== Comment || child.children === "v-if") { - if (singleRoot) { - return; - } else { - singleRoot = child; - if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { - return filterSingleRoot(singleRoot.children); - } - } - } - } else { - return; - } - } - return singleRoot; -} -const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === "class" || key === "style" || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } - } - return res; -}; -const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } - } - return res; -}; -const isElementRoot = (vnode) => { - return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; -}; -function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - if ((prevChildren || nextChildren) && isHmrUpdating) { - return true; - } - if (nextVNode.dirs || nextVNode.transition) { - return true; - } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024) { - return true; - } - if (patchFlag & 16) { - if (!prevProps) { - return !!nextProps; - } - return hasPropsChanged(prevProps, nextProps, emits); - } else if (patchFlag & 8) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { - return true; - } - } - } - } else { - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); - } - return false; -} -function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; - } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; -} -function updateHOCHostEl({ vnode, parent }, el) { - while (parent) { - const root = parent.subTree; - if (root.suspense && root.suspense.activeBranch === vnode) { - root.el = vnode.el; - } - if (root === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; - } else { - break; - } - } -} - -const isSuspense = (type) => type.__isSuspense; -let suspenseId = 0; -const SuspenseImpl = { - name: "Suspense", - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - if (n1 == null) { - mountSuspense( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } else { - if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { - n2.suspense = n1.suspense; - n2.suspense.vnode = n2; - n2.el = n1.el; - return; - } - patchSuspense( - n1, - n2, - container, - anchor, - parentComponent, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } - }, - hydrate: hydrateSuspense, - normalize: normalizeSuspenseChildren -}; -const Suspense = SuspenseImpl ; -function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); - } -} -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - const { - p: patch, - o: { createElement } - } = rendererInternals; - const hiddenContainer = createElement("div"); - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - container, - hiddenContainer, - anchor, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - patch( - null, - suspense.pendingBranch = vnode.ssContent, - hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds - ); - if (suspense.deps > 0) { - triggerEvent(vnode, "onPending"); - triggerEvent(vnode, "onFallback"); - patch( - null, - vnode.ssFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds - ); - setActiveBranch(suspense, vnode.ssFallback); - } else { - suspense.resolve(false, true); - } -} -function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = n2.suspense = n1.suspense; - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - patch( - pendingBranch, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else if (isInFallback) { - if (!isHydrating) { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } - } else { - suspense.pendingId = suspenseId++; - if (isHydrating) { - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } else { - unmount(pendingBranch, parentComponent, suspense); - } - suspense.deps = 0; - suspense.effects.length = 0; - suspense.hiddenContainer = createElement("div"); - if (isInFallback) { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - suspense.resolve(true); - } else { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newBranch); - } else { - triggerEvent(n2, "onPending"); - suspense.pendingBranch = newBranch; - if (newBranch.shapeFlag & 512) { - suspense.pendingId = newBranch.component.suspenseId; - } else { - suspense.pendingId = suspenseId++; - } - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } else if (timeout === 0) { - suspense.fallback(newFallback); - } - } - } - } -} -let hasWarned = false; -function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - if (!hasWarned) { - hasWarned = true; - console[console.info ? "info" : "log"]( - `<Suspense> is an experimental feature and its API will likely change.` - ); - } - const { - p: patch, - m: move, - um: unmount, - n: next, - o: { parentNode, remove } - } = rendererInternals; - let parentSuspenseId; - const isSuspensible = isVNodeSuspensible(vnode); - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch) { - parentSuspenseId = parentSuspense.pendingId; - parentSuspense.deps++; - } - } - const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; - { - assertNumber(timeout, `Suspense timeout`); - } - const initialAnchor = anchor; - const suspense = { - vnode, - parent: parentSuspense, - parentComponent, - namespace, - container, - hiddenContainer, - deps: 0, - pendingId: suspenseId++, - timeout: typeof timeout === "number" ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: !isHydrating, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false, sync = false) { - { - if (!resume && !suspense.pendingBranch) { - throw new Error( - `suspense.resolve() is called without a pending branch.` - ); - } - if (suspense.isUnmounted) { - throw new Error( - `suspense.resolve() is called on an already unmounted suspense boundary.` - ); - } - } - const { - vnode: vnode2, - activeBranch, - pendingBranch, - pendingId, - effects, - parentComponent: parentComponent2, - container: container2 - } = suspense; - let delayEnter = false; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } else if (!resume) { - delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move( - pendingBranch, - container2, - anchor === initialAnchor ? next(activeBranch) : anchor, - 0 - ); - queuePostFlushCb(effects); - } - }; - } - if (activeBranch) { - if (parentNode(activeBranch.el) === container2) { - anchor = next(activeBranch); - } - unmount(activeBranch, parentComponent2, suspense, true); - } - if (!delayEnter) { - move(pendingBranch, container2, anchor, 0); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - if (!hasUnresolvedAncestor && !delayEnter) { - queuePostFlushCb(effects); - } - suspense.effects = []; - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0 && !sync) { - parentSuspense.resolve(); - } - } - } - triggerEvent(vnode2, "onResolve"); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; - triggerEvent(vnode2, "onFallback"); - const anchor2 = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - patch( - null, - fallbackVNode, - container2, - anchor2, - parentComponent2, - null, - // fallback tree will not have suspense context - namespace2, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - unmount( - activeBranch, - parentComponent2, - null, - // no suspense so unmount hooks fire now - true - // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container2, anchor2, type) { - suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); - suspense.container = container2; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect, optimized2) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance.asyncDep.catch((err) => { - handleError(err, instance, 0); - }).then((asyncSetupResult) => { - if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { - return; - } - instance.asyncResolved = true; - const { vnode: vnode2 } = instance; - { - pushWarningContext(vnode2); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - vnode2.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect( - instance, - vnode2, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), - suspense, - namespace, - optimized2 - ); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode2.el); - { - popWarningContext(); - } - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense2, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount( - suspense.activeBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - if (suspense.pendingBranch) { - unmount( - suspense.pendingBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - } - }; - return suspense; -} -function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - node.parentNode, - // eslint-disable-next-line no-restricted-globals - document.createElement("div"), - null, - namespace, - slotScopeIds, - optimized, - rendererInternals, - true - ); - const result = hydrateNode( - node, - suspense.pendingBranch = vnode.ssContent, - parentComponent, - suspense, - slotScopeIds, - optimized - ); - if (suspense.deps === 0) { - suspense.resolve(false, true); - } - return result; -} -function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32; - vnode.ssContent = normalizeSuspenseSlot( - isSlotChildren ? children.default : children - ); - vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); -} -function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } - } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { - warn$1(`<Suspense> slots expect a single root node.`); - } - s = singleChild; - } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter((c) => c !== s); - } - return s; -} -function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } else { - suspense.effects.push(fn); - } - } else { - queuePostFlushCb(fn); - } -} -function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - let el = branch.el; - while (!el && branch.component) { - branch = branch.component.subTree; - el = branch.el; - } - vnode.el = el; - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } -} -function isVNodeSuspensible(vnode) { - const suspensible = vnode.props && vnode.props.suspensible; - return suspensible != null && suspensible !== false; -} - -const Fragment = Symbol.for("v-fgt"); -const Text = Symbol.for("v-txt"); -const Comment = Symbol.for("v-cmt"); -const Static = Symbol.for("v-stc"); -const blockStack = []; -let currentBlock = null; -function openBlock(disableTracking = false) { - blockStack.push(currentBlock = disableTracking ? null : []); -} -function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; -} -let isBlockTreeEnabled = 1; -function setBlockTracking(value, inVOnce = false) { - isBlockTreeEnabled += value; - if (value < 0 && currentBlock && inVOnce) { - currentBlock.hasOnce = true; - } -} -function setupBlock(vnode) { - vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; - closeBlock(); - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; -} -function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock( - createBaseVNode( - type, - props, - children, - patchFlag, - dynamicProps, - shapeFlag, - true - ) - ); -} -function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock( - createVNode( - type, - props, - children, - patchFlag, - dynamicProps, - true - ) - ); -} -function isVNode(value) { - return value ? value.__v_isVNode === true : false; -} -function isSameVNodeType(n1, n2) { - if (n2.shapeFlag & 6 && n1.component) { - const dirtyInstances = hmrDirtyComponents.get(n2.type); - if (dirtyInstances && dirtyInstances.has(n1.component)) { - n1.shapeFlag &= ~256; - n2.shapeFlag &= ~512; - return false; - } - } - return n1.type === n2.type && n1.key === n2.key; -} -let vnodeArgsTransformer; -function transformVNodeArgs(transformer) { - vnodeArgsTransformer = transformer; -} -const createVNodeWithArgsTransform = (...args) => { - return _createVNode( - ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args - ); -}; -const normalizeKey = ({ key }) => key != null ? key : null; -const normalizeRef = ({ - ref, - ref_key, - ref_for -}) => { - if (typeof ref === "number") { - ref = "" + ref; - } - return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; -}; -function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetStart: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null, - ctx: currentRenderingInstance - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - if (shapeFlag & 128) { - type.normalize(vnode); - } - } else if (children) { - vnode.shapeFlag |= isString(children) ? 8 : 16; - } - if (vnode.key !== vnode.key) { - warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); - } - if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself - !isBlockNode && // has current parent block - currentBlock && // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32) { - currentBlock.push(vnode); - } - return vnode; -} -const createVNode = createVNodeWithArgsTransform ; -function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - if (!type) { - warn$1(`Invalid vnode type when creating vnode: ${type}.`); - } - type = Comment; - } - if (isVNode(type)) { - const cloned = cloneVNode( - type, - props, - true - /* mergeRef: true */ - ); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } else { - currentBlock.push(cloned); - } - } - cloned.patchFlag = -2; - return cloned; - } - if (isClassComponent(type)) { - type = type.__vccOpts; - } - if (props) { - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (isObject(style)) { - if (isProxy(style) && !isArray(style)) { - style = extend({}, style); - } - props.style = normalizeStyle(style); - } - } - const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; - if (shapeFlag & 4 && isProxy(type)) { - type = toRaw(type); - warn$1( - `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, - ` -Component that was made reactive: `, - type - ); - } - return createBaseVNode( - type, - props, - children, - patchFlag, - dynamicProps, - shapeFlag, - isBlockNode, - true - ); -} -function guardReactiveProps(props) { - if (!props) return null; - return isProxy(props) || isInternalObject(props) ? extend({}, props) : props; -} -function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { - const { props, ref, patchFlag, children, transition } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref ? ( - // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) - ) : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, - target: vnode.target, - targetStart: vnode.targetStart, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor, - ctx: vnode.ctx, - ce: vnode.ce - }; - if (transition && cloneTransition) { - setTransitionHooks( - cloned, - transition.clone(cloned) - ); - } - return cloned; -} -function deepCloneVNode(vnode) { - const cloned = cloneVNode(vnode); - if (isArray(vnode.children)) { - cloned.children = vnode.children.map(deepCloneVNode); - } - return cloned; -} -function createTextVNode(text = " ", flag = 0) { - return createVNode(Text, null, text, flag); -} -function createStaticVNode(content, numberOfNodes) { - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; -} -function createCommentVNode(text = "", asBlock = false) { - return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); -} -function normalizeVNode(child) { - if (child == null || typeof child === "boolean") { - return createVNode(Comment); - } else if (isArray(child)) { - return createVNode( - Fragment, - null, - // #3666, avoid reference pollution when reusing vnode - child.slice() - ); - } else if (isVNode(child)) { - return cloneIfMounted(child); - } else { - return createVNode(Text, null, String(child)); - } -} -function cloneIfMounted(child) { - return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); -} -function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } else if (isArray(children)) { - type = 16; - } else if (typeof children === "object") { - if (shapeFlag & (1 | 64)) { - const slot = children.default; - if (slot) { - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } else { - type = 32; - const slotFlag = children._; - if (!slotFlag && !isInternalObject(children)) { - children._ctx = currentRenderingInstance; - } else if (slotFlag === 3 && currentRenderingInstance) { - if (currentRenderingInstance.slots._ === 1) { - children._ = 1; - } else { - children._ = 2; - vnode.patchFlag |= 1024; - } - } - } - } else if (isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32; - } else { - children = String(children); - if (shapeFlag & 64) { - type = 16; - children = [createTextVNode(children)]; - } else { - type = 8; - } - } - vnode.children = children; - vnode.shapeFlag |= type; -} -function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === "class") { - if (ret.class !== toMerge.class) { - ret.class = normalizeClass([ret.class, toMerge.class]); - } - } else if (key === "style") { - ret.style = normalizeStyle([ret.style, toMerge.style]); - } else if (isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { - ret[key] = existing ? [].concat(existing, incoming) : incoming; - } - } else if (key !== "") { - ret[key] = toMerge[key]; - } - } - } - return ret; -} -function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7, [ - vnode, - prevVNode - ]); -} - -const emptyAppContext = createAppContext(); -let uid = 0; -function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid++, - vnode, - type, - parent, - appContext, - root: null, - // to be immediately set - next: null, - subTree: null, - // will be set synchronously right after creation - effect: null, - update: null, - // will be set synchronously right after creation - job: null, - scope: new EffectScope( - true - /* detached */ - ), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - ids: parent ? parent.ids : ["", 0, 0], - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - // to be set immediately - emitted: null, - // props default value - propsDefaults: EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: EMPTY_OBJ, - data: EMPTY_OBJ, - props: EMPTY_OBJ, - attrs: EMPTY_OBJ, - slots: EMPTY_OBJ, - refs: EMPTY_OBJ, - setupState: EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - { - instance.ctx = createDevRenderContext(instance); - } - instance.root = parent ? parent.root : instance; - instance.emit = emit.bind(null, instance); - if (vnode.ce) { - vnode.ce(instance); - } - return instance; -} -let currentInstance = null; -const getCurrentInstance = () => currentInstance || currentRenderingInstance; -let internalSetCurrentInstance; -let setInSSRSetupState; -{ - const g = getGlobalThis(); - const registerGlobalSetter = (key, setter) => { - let setters; - if (!(setters = g[key])) setters = g[key] = []; - setters.push(setter); - return (v) => { - if (setters.length > 1) setters.forEach((set) => set(v)); - else setters[0](v); - }; - }; - internalSetCurrentInstance = registerGlobalSetter( - `__VUE_INSTANCE_SETTERS__`, - (v) => currentInstance = v - ); - setInSSRSetupState = registerGlobalSetter( - `__VUE_SSR_SETTERS__`, - (v) => isInSSRComponentSetup = v - ); -} -const setCurrentInstance = (instance) => { - const prev = currentInstance; - internalSetCurrentInstance(instance); - instance.scope.on(); - return () => { - instance.scope.off(); - internalSetCurrentInstance(prev); - }; -}; -const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - internalSetCurrentInstance(null); -}; -const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); -function validateComponentName(name, { isNativeTag }) { - if (isBuiltInTag(name) || isNativeTag(name)) { - warn$1( - "Do not use built-in or reserved HTML elements as component id: " + name - ); - } -} -function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4; -} -let isInSSRComponentSetup = false; -function setupComponent(instance, isSSR = false, optimized = false) { - isSSR && setInSSRSetupState(isSSR); - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children, optimized); - const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; - isSSR && setInSSRSetupState(false); - return setupResult; -} -function setupStatefulComponent(instance, isSSR) { - var _a; - const Component = instance.type; - { - if (Component.name) { - validateComponentName(Component.name, instance.appContext.config); - } - if (Component.components) { - const names = Object.keys(Component.components); - for (let i = 0; i < names.length; i++) { - validateComponentName(names[i], instance.appContext.config); - } - } - if (Component.directives) { - const names = Object.keys(Component.directives); - for (let i = 0; i < names.length; i++) { - validateDirectiveName(names[i]); - } - } - if (Component.compilerOptions && isRuntimeOnly()) { - warn$1( - `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` - ); - } - } - instance.accessCache = /* @__PURE__ */ Object.create(null); - instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); - { - exposePropsOnRenderContext(instance); - } - const { setup } = Component; - if (setup) { - pauseTracking(); - const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; - const reset = setCurrentInstance(instance); - const setupResult = callWithErrorHandling( - setup, - instance, - 0, - [ - shallowReadonly(instance.props) , - setupContext - ] - ); - const isAsyncSetup = isPromise(setupResult); - resetTracking(); - reset(); - if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { - markAsyncBoundary(instance); - } - if (isAsyncSetup) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - return setupResult.then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }).catch((e) => { - handleError(e, instance, 0); - }); - } else { - instance.asyncDep = setupResult; - if (!instance.suspense) { - const name = (_a = Component.name) != null ? _a : "Anonymous"; - warn$1( - `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` - ); - } - } - } else { - handleSetupResult(instance, setupResult, isSSR); - } - } else { - finishComponentSetup(instance, isSSR); - } -} -function handleSetupResult(instance, setupResult, isSSR) { - if (isFunction(setupResult)) { - if (instance.type.__ssrInlineRender) { - instance.ssrRender = setupResult; - } else { - instance.render = setupResult; - } - } else if (isObject(setupResult)) { - if (isVNode(setupResult)) { - warn$1( - `setup() should not return VNodes directly - return a render function instead.` - ); - } - { - instance.devtoolsRawSetupState = setupResult; - } - instance.setupState = proxyRefs(setupResult); - { - exposeSetupStateOnRenderContext(instance); - } - } else if (setupResult !== void 0) { - warn$1( - `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` - ); - } - finishComponentSetup(instance, isSSR); -} -let compile; -let installWithProxy; -function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = (i) => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; -} -const isRuntimeOnly = () => !compile; -function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - if (!instance.render) { - if (!isSSR && compile && !Component.render) { - const template = Component.template || resolveMergedOptions(instance).template; - if (template) { - { - startMeasure(instance, `compile`); - } - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = extend( - extend( - { - isCustomElement, - delimiters - }, - compilerOptions - ), - componentCompilerOptions - ); - Component.render = compile(template, finalCompilerOptions); - { - endMeasure(instance, `compile`); - } - } - } - instance.render = Component.render || NOOP; - if (installWithProxy) { - installWithProxy(instance); - } - } - { - const reset = setCurrentInstance(instance); - pauseTracking(); - try { - applyOptions(instance); - } finally { - resetTracking(); - reset(); - } - } - if (!Component.render && instance.render === NOOP && !isSSR) { - if (!compile && Component.template) { - warn$1( - `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` ) - ); - } else { - warn$1(`Component is missing template or render function: `, Component); - } - } -} -const attrsProxyHandlers = { - get(target, key) { - markAttrsAccessed(); - track(target, "get", ""); - return target[key]; - }, - set() { - warn$1(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn$1(`setupContext.attrs is readonly.`); - return false; - } -} ; -function getSlotsProxy(instance) { - return new Proxy(instance.slots, { - get(target, key) { - track(instance, "get", "$slots"); - return target[key]; - } - }); -} -function createSetupContext(instance) { - const expose = (exposed) => { - { - if (instance.exposed) { - warn$1(`expose() should be called only once per setup().`); - } - if (exposed != null) { - let exposedType = typeof exposed; - if (exposedType === "object") { - if (isArray(exposed)) { - exposedType = "array"; - } else if (isRef(exposed)) { - exposedType = "ref"; - } - } - if (exposedType !== "object") { - warn$1( - `expose() should be passed a plain object, received ${exposedType}.` - ); - } - } - } - instance.exposed = exposed || {}; - }; - { - let attrsProxy; - let slotsProxy; - return Object.freeze({ - get attrs() { - return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); - }, - get slots() { - return slotsProxy || (slotsProxy = getSlotsProxy(instance)); - }, - get emit() { - return (event, ...args) => instance.emit(event, ...args); - }, - expose - }); - } -} -function getComponentPublicInstance(instance) { - if (instance.exposed) { - return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - }, - has(target, key) { - return key in target || key in publicPropertiesMap; - } - })); - } else { - return instance.proxy; - } -} -const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); -function getComponentName(Component, includeInferred = true) { - return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; -} -function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; - } - } - if (!name && instance && instance.parent) { - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = inferFromRegistry( - instance.components || instance.parent.type.components - ) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; -} -function isClassComponent(value) { - return isFunction(value) && "__vccOpts" in value; -} - -const computed = (getterOrOptions, debugOptions) => { - const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); - { - const i = getCurrentInstance(); - if (i && i.appContext.config.warnRecursiveComputed) { - c._warnRecursive = true; - } - } - return c; -}; - -function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - return createVNode(type, propsOrChildren); - } else { - return createVNode(type, null, propsOrChildren); - } - } else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } -} - -function initCustomFormatter() { - if (typeof window === "undefined") { - return; - } - const vueStyle = { style: "color:#3ba776" }; - const numberStyle = { style: "color:#1677ff" }; - const stringStyle = { style: "color:#f5222d" }; - const keywordStyle = { style: "color:#eb2f96" }; - const formatter = { - __vue_custom_formatter: true, - header(obj) { - if (!isObject(obj)) { - return null; - } - if (obj.__isVue) { - return ["div", vueStyle, `VueInstance`]; - } else if (isRef(obj)) { - return [ - "div", - {}, - ["span", vueStyle, genRefFlag(obj)], - "<", - // avoid debugger accessing value affecting behavior - formatValue("_value" in obj ? obj._value : obj), - `>` - ]; - } else if (isReactive(obj)) { - return [ - "div", - {}, - ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], - "<", - formatValue(obj), - `>${isReadonly(obj) ? ` (readonly)` : ``}` - ]; - } else if (isReadonly(obj)) { - return [ - "div", - {}, - ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], - "<", - formatValue(obj), - ">" - ]; - } - return null; - }, - hasBody(obj) { - return obj && obj.__isVue; - }, - body(obj) { - if (obj && obj.__isVue) { - return [ - "div", - {}, - ...formatInstance(obj.$) - ]; - } - } - }; - function formatInstance(instance) { - const blocks = []; - if (instance.type.props && instance.props) { - blocks.push(createInstanceBlock("props", toRaw(instance.props))); - } - if (instance.setupState !== EMPTY_OBJ) { - blocks.push(createInstanceBlock("setup", instance.setupState)); - } - if (instance.data !== EMPTY_OBJ) { - blocks.push(createInstanceBlock("data", toRaw(instance.data))); - } - const computed = extractKeys(instance, "computed"); - if (computed) { - blocks.push(createInstanceBlock("computed", computed)); - } - const injected = extractKeys(instance, "inject"); - if (injected) { - blocks.push(createInstanceBlock("injected", injected)); - } - blocks.push([ - "div", - {}, - [ - "span", - { - style: keywordStyle.style + ";opacity:0.66" - }, - "$ (internal): " - ], - ["object", { object: instance }] - ]); - return blocks; - } - function createInstanceBlock(type, target) { - target = extend({}, target); - if (!Object.keys(target).length) { - return ["span", {}]; - } - return [ - "div", - { style: "line-height:1.25em;margin-bottom:0.6em" }, - [ - "div", - { - style: "color:#476582" - }, - type - ], - [ - "div", - { - style: "padding-left:1.25em" - }, - ...Object.keys(target).map((key) => { - return [ - "div", - {}, - ["span", keywordStyle, key + ": "], - formatValue(target[key], false) - ]; - }) - ] - ]; - } - function formatValue(v, asRaw = true) { - if (typeof v === "number") { - return ["span", numberStyle, v]; - } else if (typeof v === "string") { - return ["span", stringStyle, JSON.stringify(v)]; - } else if (typeof v === "boolean") { - return ["span", keywordStyle, v]; - } else if (isObject(v)) { - return ["object", { object: asRaw ? toRaw(v) : v }]; - } else { - return ["span", stringStyle, String(v)]; - } - } - function extractKeys(instance, type) { - const Comp = instance.type; - if (isFunction(Comp)) { - return; - } - const extracted = {}; - for (const key in instance.ctx) { - if (isKeyOfType(Comp, key, type)) { - extracted[key] = instance.ctx[key]; - } - } - return extracted; - } - function isKeyOfType(Comp, key, type) { - const opts = Comp[type]; - if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { - return true; - } - if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { - return true; - } - if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { - return true; - } - } - function genRefFlag(v) { - if (isShallow(v)) { - return `ShallowRef`; - } - if (v.effect) { - return `ComputedRef`; - } - return `Ref`; - } - if (window.devtoolsFormatters) { - window.devtoolsFormatters.push(formatter); - } else { - window.devtoolsFormatters = [formatter]; - } -} - -function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - ret.memo = memo.slice(); - ret.cacheIndex = index; - return cache[index] = ret; -} -function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; - } - for (let i = 0; i < prev.length; i++) { - if (hasChanged(prev[i], memo[i])) { - return false; - } - } - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; -} - -const version = "3.5.13"; -const warn = warn$1 ; -const ErrorTypeStrings = ErrorTypeStrings$1 ; -const devtools = devtools$1 ; -const setDevtoolsHook = setDevtoolsHook$1 ; -const _ssrUtils = { - createComponentInstance, - setupComponent, - renderComponentRoot, - setCurrentRenderingInstance, - isVNode: isVNode, - normalizeVNode, - getComponentPublicInstance, - ensureValidVNode, - pushWarningContext, - popWarningContext -}; -const ssrUtils = _ssrUtils ; -const resolveFilter = null; -const compatUtils = null; -const DeprecationTypes = null; - -let policy = void 0; -const tt = typeof window !== "undefined" && window.trustedTypes; -if (tt) { - try { - policy = /* @__PURE__ */ tt.createPolicy("vue", { - createHTML: (val) => val - }); - } catch (e) { - warn(`Error creating trusted types policy: ${e}`); - } -} -const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; -const svgNS = "http://www.w3.org/2000/svg"; -const mathmlNS = "http://www.w3.org/1998/Math/MathML"; -const doc = typeof document !== "undefined" ? document : null; -const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); -const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: (child) => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, namespace, is, props) => { - const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); - if (tag === "select" && props && props.multiple != null) { - el.setAttribute("multiple", props.multiple); - } - return el; - }, - createText: (text) => doc.createTextNode(text), - createComment: (text) => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: (node) => node.parentNode, - nextSibling: (node) => node.nextSibling, - querySelector: (selector) => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ""); - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, namespace, start, end) { - const before = anchor ? anchor.previousSibling : parent.lastChild; - if (start && (start === end || start.nextSibling)) { - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) break; - } - } else { - templateContainer.innerHTML = unsafeToTrustedHTML( - namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content - ); - const template = templateContainer.content; - if (namespace === "svg" || namespace === "mathml") { - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; - } -}; - -const TRANSITION = "transition"; -const ANIMATION = "animation"; -const vtcKey = Symbol("_vtc"); -const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String -}; -const TransitionPropsValidators = /* @__PURE__ */ extend( - {}, - BaseTransitionPropsValidators, - DOMTransitionPropsValidators -); -const decorate$1 = (t) => { - t.displayName = "Transition"; - t.props = TransitionPropsValidators; - return t; -}; -const Transition = /* @__PURE__ */ decorate$1( - (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots) -); -const callHook = (hook, args = []) => { - if (isArray(hook)) { - hook.forEach((h2) => h2(...args)); - } else if (hook) { - hook(...args); - } -}; -const hasExplicitCallback = (hook) => { - return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; -}; -function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; - } - } - if (rawProps.css === false) { - return baseProps; - } - const { - name = "v", - type, - duration, - enterFromClass = `${name}-enter-from`, - enterActiveClass = `${name}-enter-active`, - enterToClass = `${name}-enter-to`, - appearFromClass = enterFromClass, - appearActiveClass = enterActiveClass, - appearToClass = enterToClass, - leaveFromClass = `${name}-leave-from`, - leaveActiveClass = `${name}-leave-active`, - leaveToClass = `${name}-leave-to` - } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { - onBeforeEnter, - onEnter, - onEnterCancelled, - onLeave, - onLeaveCancelled, - onBeforeAppear = onBeforeEnter, - onAppear = onEnter, - onAppearCancelled = onEnterCancelled - } = baseProps; - const finishEnter = (el, isAppear, done, isCancelled) => { - el._enterCancelled = isCancelled; - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); - }; - const finishLeave = (el, done) => { - el._isLeaving = false; - removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return extend(baseProps, { - onBeforeEnter(el) { - callHook(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - if (!el._enterCancelled) { - forceReflow(); - addTransitionClass(el, leaveActiveClass); - } else { - addTransitionClass(el, leaveActiveClass); - forceReflow(); - } - nextFrame(() => { - if (!el._isLeaving) { - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false, void 0, true); - callHook(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true, void 0, true); - callHook(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook(onLeaveCancelled, [el]); - } - }); -} -function normalizeDuration(duration) { - if (duration == null) { - return null; - } else if (isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } else { - const n = NumberOf(duration); - return [n, n]; - } -} -function NumberOf(val) { - const res = toNumber(val); - { - assertNumber(res, "<transition> explicit duration"); - } - return res; -} -function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); - (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); -} -function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); - const _vtc = el[vtcKey]; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el[vtcKey] = void 0; - } - } -} -function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); -} -let endId = 0; -function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = el._endId = ++endId; - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout != null) { - return setTimeout(resolveIfNotStale, explicitTimeout); - } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); - } - const endEvent = type + "end"; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); -} -function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - const getStyleProperties = (key) => (styles[key] || "").split(", "); - const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); - const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(`${ANIMATION}Delay`); - const animationDurations = getStyleProperties(`${ANIMATION}Duration`); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } - } else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } - } else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; - propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; - } - const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( - getStyleProperties(`${TRANSITION}Property`).toString() - ); - return { - type, - timeout, - propCount, - hasTransform - }; -} -function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); -} -function toMs(s) { - if (s === "auto") return 0; - return Number(s.slice(0, -1).replace(",", ".")) * 1e3; -} -function forceReflow() { - return document.body.offsetHeight; -} - -function patchClass(el, value, isSVG) { - const transitionClasses = el[vtcKey]; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); - } - if (value == null) { - el.removeAttribute("class"); - } else if (isSVG) { - el.setAttribute("class", value); - } else { - el.className = value; - } -} - -const vShowOriginalDisplay = Symbol("_vod"); -const vShowHidden = Symbol("_vsh"); -const vShow = { - beforeMount(el, { value }, { transition }) { - el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); - } -}; -{ - vShow.name = "show"; -} -function setDisplay(el, value) { - el.style.display = value ? el[vShowOriginalDisplay] : "none"; - el[vShowHidden] = !value; -} -function initVShowForSSR() { - vShow.getSSRProps = ({ value }) => { - if (!value) { - return { style: { display: "none" } }; - } - }; -} - -const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); -function useCssVars(getter) { - const instance = getCurrentInstance(); - if (!instance) { - warn(`useCssVars is called without current active component instance.`); - return; - } - const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { - Array.from( - document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) - ).forEach((node) => setVarsOnNode(node, vars)); - }; - { - instance.getCssVars = () => getter(instance.proxy); - } - const setVars = () => { - const vars = getter(instance.proxy); - if (instance.ce) { - setVarsOnNode(instance.ce, vars); - } else { - setVarsOnVNode(instance.subTree, vars); - } - updateTeleports(vars); - }; - onBeforeUpdate(() => { - queuePostFlushCb(setVars); - }); - onMounted(() => { - watch(setVars, NOOP, { flush: "post" }); - const ob = new MutationObserver(setVars); - ob.observe(instance.subTree.el.parentNode, { childList: true }); - onUnmounted(() => ob.disconnect()); - }); -} -function setVarsOnVNode(vnode, vars) { - if (vnode.shapeFlag & 128) { - const suspense = vnode.suspense; - vnode = suspense.activeBranch; - if (suspense.pendingBranch && !suspense.isHydrating) { - suspense.effects.push(() => { - setVarsOnVNode(suspense.activeBranch, vars); - }); - } - } - while (vnode.component) { - vnode = vnode.component.subTree; - } - if (vnode.shapeFlag & 1 && vnode.el) { - setVarsOnNode(vnode.el, vars); - } else if (vnode.type === Fragment) { - vnode.children.forEach((c) => setVarsOnVNode(c, vars)); - } else if (vnode.type === Static) { - let { el, anchor } = vnode; - while (el) { - setVarsOnNode(el, vars); - if (el === anchor) break; - el = el.nextSibling; - } - } -} -function setVarsOnNode(el, vars) { - if (el.nodeType === 1) { - const style = el.style; - let cssText = ""; - for (const key in vars) { - style.setProperty(`--${key}`, vars[key]); - cssText += `--${key}: ${vars[key]};`; - } - style[CSS_VAR_TEXT] = cssText; - } -} - -const displayRE = /(^|;)\s*display\s*:/; -function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = isString(next); - let hasControlledDisplay = false; - if (next && !isCssString) { - if (prev) { - if (!isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ""); - } - } - } else { - for (const prevStyle of prev.split(";")) { - const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); - if (next[key] == null) { - setStyle(style, key, ""); - } - } - } - } - for (const key in next) { - if (key === "display") { - hasControlledDisplay = true; - } - setStyle(style, key, next[key]); - } - } else { - if (isCssString) { - if (prev !== next) { - const cssVarText = style[CSS_VAR_TEXT]; - if (cssVarText) { - next += ";" + cssVarText; - } - style.cssText = next; - hasControlledDisplay = displayRE.test(next); - } - } else if (prev) { - el.removeAttribute("style"); - } - } - if (vShowOriginalDisplay in el) { - el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; - if (el[vShowHidden]) { - style.display = "none"; - } - } -} -const semicolonRE = /[^\\];\s*$/; -const importantRE = /\s*!important$/; -function setStyle(style, name, val) { - if (isArray(val)) { - val.forEach((v) => setStyle(style, name, v)); - } else { - if (val == null) val = ""; - { - if (semicolonRE.test(val)) { - warn( - `Unexpected semicolon at the end of '${name}' style value: '${val}'` - ); - } - } - if (name.startsWith("--")) { - style.setProperty(name, val); - } else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - style.setProperty( - hyphenate(prefixed), - val.replace(importantRE, ""), - "important" - ); - } else { - style[prefixed] = val; - } - } - } -} -const prefixes = ["Webkit", "Moz", "ms"]; -const prefixCache = {}; -function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = camelize(rawName); - if (name !== "filter" && name in style) { - return prefixCache[rawName] = name; - } - name = capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return prefixCache[rawName] = prefixed; - } - } - return rawName; -} - -const xlinkNS = "http://www.w3.org/1999/xlink"; -function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) { - if (isSVG && key.startsWith("xlink:")) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } else { - el.setAttributeNS(xlinkNS, key, value); - } - } else { - if (value == null || isBoolean && !includeBooleanAttr(value)) { - el.removeAttribute(key); - } else { - el.setAttribute( - key, - isBoolean ? "" : isSymbol(value) ? String(value) : value - ); - } - } -} - -function patchDOMProp(el, key, value, parentComponent, attrName) { - if (key === "innerHTML" || key === "textContent") { - if (value != null) { - el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; - } - return; - } - const tag = el.tagName; - if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally - !tag.includes("-")) { - const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; - const newValue = value == null ? ( - // #11647: value should be set as empty string for null and undefined, - // but <input type="checkbox"> should be set as 'on'. - el.type === "checkbox" ? "on" : "" - ) : String(value); - if (oldValue !== newValue || !("_value" in el)) { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - el._value = value; - return; - } - let needRemove = false; - if (value === "" || value == null) { - const type = typeof el[key]; - if (type === "boolean") { - value = includeBooleanAttr(value); - } else if (value == null && type === "string") { - value = ""; - needRemove = true; - } else if (type === "number") { - value = 0; - needRemove = true; - } - } - try { - el[key] = value; - } catch (e) { - if (!needRemove) { - warn( - `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, - e - ); - } - } - needRemove && el.removeAttribute(attrName || key); -} - -function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); -} -function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); -} -const veiKey = Symbol("_vei"); -function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - const invokers = el[veiKey] || (el[veiKey] = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - existingInvoker.value = sanitizeEventValue(nextValue, rawName) ; - } else { - const [name, options] = parseName(rawName); - if (nextValue) { - const invoker = invokers[rawName] = createInvoker( - sanitizeEventValue(nextValue, rawName) , - instance - ); - addEventListener(el, name, invoker, options); - } else if (existingInvoker) { - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = void 0; - } - } -} -const optionsModifierRE = /(?:Once|Passive|Capture)$/; -function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while (m = name.match(optionsModifierRE)) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); - return [event, options]; -} -let cachedNow = 0; -const p = /* @__PURE__ */ Promise.resolve(); -const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); -function createInvoker(initialValue, instance) { - const invoker = (e) => { - if (!e._vts) { - e._vts = Date.now(); - } else if (e._vts <= invoker.attached) { - return; - } - callWithAsyncErrorHandling( - patchStopImmediatePropagation(e, invoker.value), - instance, - 5, - [e] - ); - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; -} -function sanitizeEventValue(value, propName) { - if (isFunction(value) || isArray(value)) { - return value; - } - warn( - `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? -Expected function or array of functions, received type ${typeof value}.` - ); - return NOOP; -} -function patchStopImmediatePropagation(e, value) { - if (isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map( - (fn) => (e2) => !e2._stopped && fn && fn(e2) - ); - } else { - return value; - } -} - -const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter -key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; -const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { - const isSVG = namespace === "svg"; - if (key === "class") { - patchClass(el, nextValue, isSVG); - } else if (key === "style") { - patchStyle(el, prevValue, nextValue); - } else if (isOn(key)) { - if (!isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue); - if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { - patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); - } - } else if ( - // #11081 force set props for possible async custom element - el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) - ) { - patchDOMProp(el, camelize(key), nextValue, parentComponent, key); - } else { - if (key === "true-value") { - el._trueValue = nextValue; - } else if (key === "false-value") { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } -}; -function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - if (key === "innerHTML" || key === "textContent") { - return true; - } - if (key in el && isNativeOn(key) && isFunction(value)) { - return true; - } - return false; - } - if (key === "spellcheck" || key === "draggable" || key === "translate") { - return false; - } - if (key === "form") { - return false; - } - if (key === "list" && el.tagName === "INPUT") { - return false; - } - if (key === "type" && el.tagName === "TEXTAREA") { - return false; - } - if (key === "width" || key === "height") { - const tag = el.tagName; - if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { - return false; - } - } - if (isNativeOn(key) && isString(value)) { - return false; - } - return key in el; -} - -const REMOVAL = {}; -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineCustomElement(options, extraOptions, _createApp) { - const Comp = defineComponent(options, extraOptions); - if (isPlainObject(Comp)) extend(Comp, extraOptions); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, _createApp); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; -} -/*! #__NO_SIDE_EFFECTS__ */ -const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { - return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); -}; -const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { -}; -class VueElement extends BaseClass { - constructor(_def, _props = {}, _createApp = createApp) { - super(); - this._def = _def; - this._props = _props; - this._createApp = _createApp; - this._isVueCE = true; - /** - * @internal - */ - this._instance = null; - /** - * @internal - */ - this._app = null; - /** - * @internal - */ - this._nonce = this._def.nonce; - this._connected = false; - this._resolved = false; - this._numberProps = null; - this._styleChildren = /* @__PURE__ */ new WeakSet(); - this._ob = null; - if (this.shadowRoot && _createApp !== createApp) { - this._root = this.shadowRoot; - } else { - if (this.shadowRoot) { - warn( - `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` - ); - } - if (_def.shadowRoot !== false) { - this.attachShadow({ mode: "open" }); - this._root = this.shadowRoot; - } else { - this._root = this; - } - } - if (!this._def.__asyncLoader) { - this._resolveProps(this._def); - } - } - connectedCallback() { - if (!this.isConnected) return; - if (!this.shadowRoot) { - this._parseSlots(); - } - this._connected = true; - let parent = this; - while (parent = parent && (parent.parentNode || parent.host)) { - if (parent instanceof VueElement) { - this._parent = parent; - break; - } - } - if (!this._instance) { - if (this._resolved) { - this._setParent(); - this._update(); - } else { - if (parent && parent._pendingResolve) { - this._pendingResolve = parent._pendingResolve.then(() => { - this._pendingResolve = void 0; - this._resolveDef(); - }); - } else { - this._resolveDef(); - } - } - } - } - _setParent(parent = this._parent) { - if (parent) { - this._instance.parent = parent._instance; - this._instance.provides = parent._instance.provides; - } - } - disconnectedCallback() { - this._connected = false; - nextTick(() => { - if (!this._connected) { - if (this._ob) { - this._ob.disconnect(); - this._ob = null; - } - this._app && this._app.unmount(); - if (this._instance) this._instance.ce = void 0; - this._app = this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._pendingResolve) { - return; - } - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - this._ob = new MutationObserver((mutations) => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }); - this._ob.observe(this, { attributes: true }); - const resolve = (def, isAsync = false) => { - this._resolved = true; - this._pendingResolve = void 0; - const { props, styles } = def; - let numberProps; - if (props && !isArray(props)) { - for (const key in props) { - const opt = props[key]; - if (opt === Number || opt && opt.type === Number) { - if (key in this._props) { - this._props[key] = toNumber(this._props[key]); - } - (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; - } - } - } - this._numberProps = numberProps; - if (isAsync) { - this._resolveProps(def); - } - if (this.shadowRoot) { - this._applyStyles(styles); - } else if (styles) { - warn( - "Custom element style injection is not supported when using shadowRoot: false" - ); - } - this._mount(def); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - this._pendingResolve = asyncDef().then( - (def) => resolve(this._def = def, true) - ); - } else { - resolve(this._def); - } - } - _mount(def) { - if (!def.name) { - def.name = "VueElement"; - } - this._app = this._createApp(def); - if (def.configureApp) { - def.configureApp(this._app); - } - this._app._ceVNode = this._createVNode(); - this._app.mount(this._root); - const exposed = this._instance && this._instance.exposed; - if (!exposed) return; - for (const key in exposed) { - if (!hasOwn(this, key)) { - Object.defineProperty(this, key, { - // unwrap ref to be consistent with public instance behavior - get: () => unref(exposed[key]) - }); - } else { - warn(`Exposed property "${key}" already exists on custom element.`); - } - } - } - _resolveProps(def) { - const { props } = def; - const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); - for (const key of Object.keys(this)) { - if (key[0] !== "_" && declaredPropKeys.includes(key)) { - this._setProp(key, this[key]); - } - } - for (const key of declaredPropKeys.map(camelize)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val, true, true); - } - }); - } - } - _setAttr(key) { - if (key.startsWith("data-v-")) return; - const has = this.hasAttribute(key); - let value = has ? this.getAttribute(key) : REMOVAL; - const camelKey = camelize(key); - if (has && this._numberProps && this._numberProps[camelKey]) { - value = toNumber(value); - } - this._setProp(camelKey, value, false, true); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = false) { - if (val !== this._props[key]) { - if (val === REMOVAL) { - delete this._props[key]; - } else { - this._props[key] = val; - if (key === "key" && this._app) { - this._app._ceVNode.key = val; - } - } - if (shouldUpdate && this._instance) { - this._update(); - } - if (shouldReflect) { - const ob = this._ob; - ob && ob.disconnect(); - if (val === true) { - this.setAttribute(hyphenate(key), ""); - } else if (typeof val === "string" || typeof val === "number") { - this.setAttribute(hyphenate(key), val + ""); - } else if (!val) { - this.removeAttribute(hyphenate(key)); - } - ob && ob.observe(this, { attributes: true }); - } - } - } - _update() { - render(this._createVNode(), this._root); - } - _createVNode() { - const baseProps = {}; - if (!this.shadowRoot) { - baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); - } - const vnode = createVNode(this._def, extend(baseProps, this._props)); - if (!this._instance) { - vnode.ce = (instance) => { - this._instance = instance; - instance.ce = this; - instance.isCE = true; - { - instance.ceReload = (newStyles) => { - if (this._styles) { - this._styles.forEach((s) => this._root.removeChild(s)); - this._styles.length = 0; - } - this._applyStyles(newStyles); - this._instance = null; - this._update(); - }; - } - const dispatch = (event, args) => { - this.dispatchEvent( - new CustomEvent( - event, - isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args } - ) - ); - }; - instance.emit = (event, ...args) => { - dispatch(event, args); - if (hyphenate(event) !== event) { - dispatch(hyphenate(event), args); - } - }; - this._setParent(); - }; - } - return vnode; - } - _applyStyles(styles, owner) { - if (!styles) return; - if (owner) { - if (owner === this._def || this._styleChildren.has(owner)) { - return; - } - this._styleChildren.add(owner); - } - const nonce = this._nonce; - for (let i = styles.length - 1; i >= 0; i--) { - const s = document.createElement("style"); - if (nonce) s.setAttribute("nonce", nonce); - s.textContent = styles[i]; - this.shadowRoot.prepend(s); - { - if (owner) { - if (owner.__hmrId) { - if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map(); - let entry = this._childStyles.get(owner.__hmrId); - if (!entry) { - this._childStyles.set(owner.__hmrId, entry = []); - } - entry.push(s); - } - } else { - (this._styles || (this._styles = [])).push(s); - } - } - } - } - /** - * Only called when shadowRoot is false - */ - _parseSlots() { - const slots = this._slots = {}; - let n; - while (n = this.firstChild) { - const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; - (slots[slotName] || (slots[slotName] = [])).push(n); - this.removeChild(n); - } - } - /** - * Only called when shadowRoot is false - */ - _renderSlots() { - const outlets = (this._teleportTarget || this).querySelectorAll("slot"); - const scopeId = this._instance.type.__scopeId; - for (let i = 0; i < outlets.length; i++) { - const o = outlets[i]; - const slotName = o.getAttribute("name") || "default"; - const content = this._slots[slotName]; - const parent = o.parentNode; - if (content) { - for (const n of content) { - if (scopeId && n.nodeType === 1) { - const id = scopeId + "-s"; - const walker = document.createTreeWalker(n, 1); - n.setAttribute(id, ""); - let child; - while (child = walker.nextNode()) { - child.setAttribute(id, ""); - } - } - parent.insertBefore(n, o); - } - } else { - while (o.firstChild) parent.insertBefore(o.firstChild, o); - } - parent.removeChild(o); - } - } - /** - * @internal - */ - _injectChildStyle(comp) { - this._applyStyles(comp.styles, comp); - } - /** - * @internal - */ - _removeChildStyle(comp) { - { - this._styleChildren.delete(comp); - if (this._childStyles && comp.__hmrId) { - const oldStyles = this._childStyles.get(comp.__hmrId); - if (oldStyles) { - oldStyles.forEach((s) => this._root.removeChild(s)); - oldStyles.length = 0; - } - } - } - } -} -function useHost(caller) { - const instance = getCurrentInstance(); - const el = instance && instance.ce; - if (el) { - return el; - } else { - if (!instance) { - warn( - `${caller || "useHost"} called without an active component instance.` - ); - } else { - warn( - `${caller || "useHost"} can only be used in components defined via defineCustomElement.` - ); - } - } - return null; -} -function useShadowRoot() { - const el = useHost("useShadowRoot") ; - return el && el.shadowRoot; -} - -function useCssModule(name = "$style") { - { - const instance = getCurrentInstance(); - if (!instance) { - warn(`useCssModule must be called inside setup()`); - return EMPTY_OBJ; - } - const modules = instance.type.__cssModules; - if (!modules) { - warn(`Current instance does not have CSS modules injected.`); - return EMPTY_OBJ; - } - const mod = modules[name]; - if (!mod) { - warn(`Current instance does not have CSS module named "${name}".`); - return EMPTY_OBJ; - } - return mod; - } -} - -const positionMap = /* @__PURE__ */ new WeakMap(); -const newPositionMap = /* @__PURE__ */ new WeakMap(); -const moveCbKey = Symbol("_moveCb"); -const enterCbKey = Symbol("_enterCb"); -const decorate = (t) => { - delete t.props.mode; - return t; -}; -const TransitionGroupImpl = /* @__PURE__ */ decorate({ - name: "TransitionGroup", - props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevChildren; - let children; - onUpdated(() => { - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || "v"}-move`; - if (!hasCSSTransform( - prevChildren[0].el, - instance.vnode.el, - moveClass - )) { - return; - } - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - forceReflow(); - movedChildren.forEach((c) => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ""; - const cb = el[moveCbKey] = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener("transitionend", cb); - el[moveCbKey] = null; - removeTransitionClass(el, moveClass); - } - }; - el.addEventListener("transitionend", cb); - }); - }); - return () => { - const rawProps = toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || Fragment; - prevChildren = []; - if (children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.el && child.el instanceof Element) { - prevChildren.push(child); - setTransitionHooks( - child, - resolveTransitionHooks( - child, - cssTransitionProps, - state, - instance - ) - ); - positionMap.set( - child, - child.el.getBoundingClientRect() - ); - } - } - } - children = slots.default ? getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - setTransitionHooks( - child, - resolveTransitionHooks(child, cssTransitionProps, state, instance) - ); - } else if (child.type !== Text) { - warn(`<TransitionGroup> children must be keyed.`); - } - } - return createVNode(tag, null, children); - }; - } -}); -const TransitionGroup = TransitionGroupImpl; -function callPendingCbs(c) { - const el = c.el; - if (el[moveCbKey]) { - el[moveCbKey](); - } - if (el[enterCbKey]) { - el[enterCbKey](); - } -} -function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); -} -function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = "0s"; - return c; - } -} -function hasCSSTransform(el, root, moveClass) { - const clone = el.cloneNode(); - const _vtc = el[vtcKey]; - if (_vtc) { - _vtc.forEach((cls) => { - cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); - clone.style.display = "none"; - const container = root.nodeType === 1 ? root : root.parentNode; - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; -} - -const getModelAssigner = (vnode) => { - const fn = vnode.props["onUpdate:modelValue"] || false; - return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; -}; -function onCompositionStart(e) { - e.target.composing = true; -} -function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event("input")); - } -} -const assignKey = Symbol("_assign"); -const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el[assignKey] = getModelAssigner(vnode); - const castToNumber = number || vnode.props && vnode.props.type === "number"; - addEventListener(el, lazy ? "change" : "input", (e) => { - if (e.target.composing) return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = looseToNumber(domValue); - } - el[assignKey](domValue); - }); - if (trim) { - addEventListener(el, "change", () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, "compositionstart", onCompositionStart); - addEventListener(el, "compositionend", onCompositionEnd); - addEventListener(el, "change", onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? "" : value; - }, - beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { - el[assignKey] = getModelAssigner(vnode); - if (el.composing) return; - const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; - const newValue = value == null ? "" : value; - if (elValue === newValue) { - return; - } - if (document.activeElement === el && el.type !== "range") { - if (lazy && value === oldValue) { - return; - } - if (trim && el.value.trim() === newValue) { - return; - } - } - el.value = newValue; - } -}; -const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el[assignKey] = getModelAssigner(vnode); - addEventListener(el, "change", () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el[assignKey]; - if (isArray(modelValue)) { - const index = looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } else if (isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } else { - cloned.delete(elementValue); - } - assign(cloned); - } else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el[assignKey] = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } -}; -function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - let checked; - if (isArray(value)) { - checked = looseIndexOf(value, vnode.props.value) > -1; - } else if (isSet(value)) { - checked = value.has(vnode.props.value); - } else { - if (value === oldValue) return; - checked = looseEqual(value, getCheckboxValue(el, true)); - } - if (el.checked !== checked) { - el.checked = checked; - } -} -const vModelRadio = { - created(el, { value }, vnode) { - el.checked = looseEqual(value, vnode.props.value); - el[assignKey] = getModelAssigner(vnode); - addEventListener(el, "change", () => { - el[assignKey](getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el[assignKey] = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = looseEqual(value, vnode.props.value); - } - } -}; -const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = isSet(value); - addEventListener(el, "change", () => { - const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( - (o) => number ? looseToNumber(getValue(o)) : getValue(o) - ); - el[assignKey]( - el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] - ); - el._assigning = true; - nextTick(() => { - el._assigning = false; - }); - }); - el[assignKey] = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el[assignKey] = getModelAssigner(vnode); - }, - updated(el, { value }) { - if (!el._assigning) { - setSelected(el, value); - } - } -}; -function setSelected(el, value) { - const isMultiple = el.multiple; - const isArrayValue = isArray(value); - if (isMultiple && !isArrayValue && !isSet(value)) { - warn( - `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` - ); - return; - } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (isArrayValue) { - const optionType = typeof optionValue; - if (optionType === "string" || optionType === "number") { - option.selected = value.some((v) => String(v) === String(optionValue)); - } else { - option.selected = looseIndexOf(value, optionValue) > -1; - } - } else { - option.selected = value.has(optionValue); - } - } else if (looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) el.selectedIndex = i; - return; - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } -} -function getValue(el) { - return "_value" in el ? el._value : el.value; -} -function getCheckboxValue(el, checked) { - const key = checked ? "_trueValue" : "_falseValue"; - return key in el ? el[key] : checked; -} -const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, "created"); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, "mounted"); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, "updated"); - } -}; -function resolveDynamicModel(tagName, type) { - switch (tagName) { - case "SELECT": - return vModelSelect; - case "TEXTAREA": - return vModelText; - default: - switch (type) { - case "checkbox": - return vModelCheckbox; - case "radio": - return vModelRadio; - default: - return vModelText; - } - } -} -function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel( - el.tagName, - vnode.props && vnode.props.type - ); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); -} -function initVModelForSSR() { - vModelText.getSSRProps = ({ value }) => ({ value }); - vModelRadio.getSSRProps = ({ value }, vnode) => { - if (vnode.props && looseEqual(vnode.props.value, value)) { - return { checked: true }; - } - }; - vModelCheckbox.getSSRProps = ({ value }, vnode) => { - if (isArray(value)) { - if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) { - return { checked: true }; - } - } else if (isSet(value)) { - if (vnode.props && value.has(vnode.props.value)) { - return { checked: true }; - } - } else if (value) { - return { checked: true }; - } - }; - vModelDynamic.getSSRProps = (binding, vnode) => { - if (typeof vnode.type !== "string") { - return; - } - const modelToUse = resolveDynamicModel( - // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase - vnode.type.toUpperCase(), - vnode.props && vnode.props.type - ); - if (modelToUse.getSSRProps) { - return modelToUse.getSSRProps(binding, vnode); - } - }; -} - -const systemModifiers = ["ctrl", "shift", "alt", "meta"]; -const modifierGuards = { - stop: (e) => e.stopPropagation(), - prevent: (e) => e.preventDefault(), - self: (e) => e.target !== e.currentTarget, - ctrl: (e) => !e.ctrlKey, - shift: (e) => !e.shiftKey, - alt: (e) => !e.altKey, - meta: (e) => !e.metaKey, - left: (e) => "button" in e && e.button !== 0, - middle: (e) => "button" in e && e.button !== 1, - right: (e) => "button" in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) -}; -const withModifiers = (fn, modifiers) => { - const cache = fn._withMods || (fn._withMods = {}); - const cacheKey = modifiers.join("."); - return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) return; - } - return fn(event, ...args); - }); -}; -const keyNames = { - esc: "escape", - space: " ", - up: "arrow-up", - left: "arrow-left", - right: "arrow-right", - down: "arrow-down", - delete: "backspace" -}; -const withKeys = (fn, modifiers) => { - const cache = fn._withKeys || (fn._withKeys = {}); - const cacheKey = modifiers.join("."); - return cache[cacheKey] || (cache[cacheKey] = (event) => { - if (!("key" in event)) { - return; - } - const eventKey = hyphenate(event.key); - if (modifiers.some( - (k) => k === eventKey || keyNames[k] === eventKey - )) { - return fn(event); - } - }); -}; - -const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); -let renderer; -let enabledHydration = false; -function ensureRenderer() { - return renderer || (renderer = createRenderer(rendererOptions)); -} -function ensureHydrationRenderer() { - renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; -} -const render = (...args) => { - ensureRenderer().render(...args); -}; -const hydrate = (...args) => { - ensureHydrationRenderer().hydrate(...args); -}; -const createApp = (...args) => { - const app = ensureRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); - } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) return; - const component = app._component; - if (!isFunction(component) && !component.render && !component.template) { - component.template = container.innerHTML; - } - if (container.nodeType === 1) { - container.textContent = ""; - } - const proxy = mount(container, false, resolveRootNamespace(container)); - if (container instanceof Element) { - container.removeAttribute("v-cloak"); - container.setAttribute("data-v-app", ""); - } - return proxy; - }; - return app; -}; -const createSSRApp = (...args) => { - const app = ensureHydrationRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); - } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, resolveRootNamespace(container)); - } - }; - return app; -}; -function resolveRootNamespace(container) { - if (container instanceof SVGElement) { - return "svg"; - } - if (typeof MathMLElement === "function" && container instanceof MathMLElement) { - return "mathml"; - } -} -function injectNativeTagCheck(app) { - Object.defineProperty(app.config, "isNativeTag", { - value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), - writable: false - }); -} -function injectCompilerOptionsCheck(app) { - if (isRuntimeOnly()) { - const isCustomElement = app.config.isCustomElement; - Object.defineProperty(app.config, "isCustomElement", { - get() { - return isCustomElement; - }, - set() { - warn( - `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` - ); - } - }); - const compilerOptions = app.config.compilerOptions; - const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. -- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. -- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader -- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; - Object.defineProperty(app.config, "compilerOptions", { - get() { - warn(msg); - return compilerOptions; - }, - set() { - warn(msg); - } - }); - } -} -function normalizeContainer(container) { - if (isString(container)) { - const res = document.querySelector(container); - if (!res) { - warn( - `Failed to mount app: mount target selector "${container}" returned null.` - ); - } - return res; - } - if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { - warn( - `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` - ); - } - return container; -} -let ssrDirectiveInitialized = false; -const initDirectivesForSSR = () => { - if (!ssrDirectiveInitialized) { - ssrDirectiveInitialized = true; - initVModelForSSR(); - initVShowForSSR(); - } -} ; - -export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId }; diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js deleted file mode 100644 index 9bf603c..0000000 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js +++ /dev/null @@ -1,5 +0,0 @@ -/** -* @vue/runtime-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/var e,t;let n,l,r,i,s,o,a,u,c,f,p,d;function h(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let g={},m=[],_=()=>{},y=()=>!1,b=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),S=e=>e.startsWith("onUpdate:"),C=Object.assign,x=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},E=Object.prototype.hasOwnProperty,w=(e,t)=>E.call(e,t),k=Array.isArray,T=e=>"[object Map]"===F(e),A=e=>"[object Set]"===F(e),R=e=>"[object Date]"===F(e),N=e=>"[object RegExp]"===F(e),O=e=>"function"==typeof e,P=e=>"string"==typeof e,M=e=>"symbol"==typeof e,I=e=>null!==e&&"object"==typeof e,L=e=>(I(e)||O(e))&&O(e.then)&&O(e.catch),D=Object.prototype.toString,F=e=>D.call(e),V=e=>F(e).slice(8,-1),U=e=>"[object Object]"===F(e),j=e=>P(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,B=h(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},H=/-(\w)/g,W=$(e=>e.replace(H,(e,t)=>t?t.toUpperCase():"")),K=/\B([A-Z])/g,z=$(e=>e.replace(K,"-$1").toLowerCase()),q=$(e=>e.charAt(0).toUpperCase()+e.slice(1)),G=$(e=>e?`on${q(e)}`:""),J=(e,t)=>!Object.is(e,t),X=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Z=(e,t,n,l=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:l,value:n})},Y=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Q=e=>{let t=P(e)?Number(e):NaN;return isNaN(t)?e:t},ee=()=>n||(n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),et=h("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function en(e){if(k(e)){let t={};for(let n=0;n<e.length;n++){let l=e[n],r=P(l)?function(e){let t={};return e.replace(ei,"").split(el).forEach(e=>{if(e){let n=e.split(er);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}(l):en(l);if(r)for(let e in r)t[e]=r[e]}return t}if(P(e)||I(e))return e}let el=/;(?![^(]*\))/g,er=/:([^]+)/,ei=/\/\*[^]*?\*\//g;function es(e){let t="";if(P(e))t=e;else if(k(e))for(let n=0;n<e.length;n++){let l=es(e[n]);l&&(t+=l+" ")}else if(I(e))for(let n in e)e[n]&&(t+=n+" ");return t.trim()}function eo(e){if(!e)return null;let{class:t,style:n}=e;return t&&!P(t)&&(e.class=es(t)),n&&(e.style=en(n)),e}let ea=h("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function eu(e,t){if(e===t)return!0;let n=R(e),l=R(t);if(n||l)return!!n&&!!l&&e.getTime()===t.getTime();if(n=M(e),l=M(t),n||l)return e===t;if(n=k(e),l=k(t),n||l)return!!n&&!!l&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let l=0;n&&l<e.length;l++)n=eu(e[l],t[l]);return n}(e,t);if(n=I(e),l=I(t),n||l){if(!n||!l||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let l=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(l&&!r||!l&&r||!eu(e[n],t[n]))return!1}}return String(e)===String(t)}function ec(e,t){return e.findIndex(e=>eu(e,t))}let ef=e=>!!(e&&!0===e.__v_isRef),ep=e=>P(e)?e:null==e?"":k(e)||I(e)&&(e.toString===D||!O(e.toString))?ef(e)?ep(e.value):JSON.stringify(e,ed,2):String(e),ed=(e,t)=>ef(t)?ed(e,t.value):T(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],l)=>(e[eh(t,l)+" =>"]=n,e),{})}:A(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>eh(e))}:M(t)?eh(t):!I(t)||k(t)||U(t)?t:String(t),eh=(e,t="")=>{var n;return M(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class eg{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=l,!e&&l&&(this.index=(l.scopes||(l.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=l;try{return l=this,e()}finally{l=t}}}on(){l=this}off(){l=this.parent}stop(e){if(this._active){let t,n;for(t=0,this._active=!1,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,this.effects.length=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}function ev(e){return new eg(e)}function em(){return l}function e_(e,t=!1){l&&l.cleanups.push(e)}let ey=new WeakSet;class eb{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,l&&l.active&&l.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,ey.has(this)&&(ey.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||eC(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,eL(this),eE(this);let e=r,t=eO;r=this,eO=!0;try{return this.fn()}finally{ew(this),r=e,eO=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)eA(e);this.deps=this.depsTail=void 0,eL(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?ey.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ek(this)&&this.run()}get dirty(){return ek(this)}}let eS=0;function eC(e,t=!1){if(e.flags|=8,t){e.next=s,s=e;return}e.next=i,i=e}function ex(){let e;if(!(--eS>0)){if(s){let e=s;for(s=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;i;){let t=i;for(i=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eE(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ew(e){let t;let n=e.depsTail,l=n;for(;l;){let e=l.prevDep;-1===l.version?(l===n&&(n=e),eA(l),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(l)):t=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=e}e.deps=t,e.depsTail=n}function ek(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(eT(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function eT(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eD))return;e.globalVersion=eD;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ek(e)){e.flags&=-3;return}let n=r,l=eO;r=e,eO=!0;try{eE(e);let n=e.fn(e._value);(0===t.version||J(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{r=n,eO=l,ew(e),e.flags&=-3}}function eA(e,t=!1){let{dep:n,prevSub:l,nextSub:r}=e;if(l&&(l.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=l,e.nextSub=void 0),n.subs===e&&(n.subs=l,!l&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)eA(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function eR(e,t){e.effect instanceof eb&&(e=e.effect.fn);let n=new eb(e);t&&C(n,t);try{n.run()}catch(e){throw n.stop(),e}let l=n.run.bind(n);return l.effect=n,l}function eN(e){e.effect.stop()}let eO=!0,eP=[];function eM(){eP.push(eO),eO=!1}function eI(){let e=eP.pop();eO=void 0===e||e}function eL(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=r;r=void 0;try{t()}finally{r=e}}}let eD=0;class eF{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eV{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!r||!eO||r===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==r)t=this.activeLink=new eF(r,this),r.deps?(t.prevDep=r.depsTail,r.depsTail.nextDep=t,r.depsTail=t):r.deps=r.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let l=t.dep.subs;l!==t&&(t.prevSub=l,l&&(l.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=r.depsTail,t.nextDep=void 0,r.depsTail.nextDep=t,r.depsTail=t,r.deps===t&&(r.deps=e)}return t}trigger(e){this.version++,eD++,this.notify(e)}notify(e){eS++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{ex()}}}let eU=new WeakMap,ej=Symbol(""),eB=Symbol(""),e$=Symbol("");function eH(e,t,n){if(eO&&r){let t=eU.get(e);t||eU.set(e,t=new Map);let l=t.get(n);l||(t.set(n,l=new eV),l.map=t,l.key=n),l.track()}}function eW(e,t,n,l,r,i){let s=eU.get(e);if(!s){eD++;return}let o=e=>{e&&e.trigger()};if(eS++,"clear"===t)s.forEach(o);else{let r=k(e),i=r&&j(n);if(r&&"length"===n){let e=Number(l);s.forEach((t,n)=>{("length"===n||n===e$||!M(n)&&n>=e)&&o(t)})}else switch((void 0!==n||s.has(void 0))&&o(s.get(n)),i&&o(s.get(e$)),t){case"add":r?i&&o(s.get("length")):(o(s.get(ej)),T(e)&&o(s.get(eB)));break;case"delete":!r&&(o(s.get(ej)),T(e)&&o(s.get(eB)));break;case"set":T(e)&&o(s.get(ej))}}ex()}function eK(e){let t=tS(e);return t===e?t:(eH(t,"iterate",e$),ty(e)?t:t.map(tx))}function ez(e){return eH(e=tS(e),"iterate",e$),e}let eq={__proto__:null,[Symbol.iterator](){return eG(this,Symbol.iterator,tx)},concat(...e){return eK(this).concat(...e.map(e=>k(e)?eK(e):e))},entries(){return eG(this,"entries",e=>(e[1]=tx(e[1]),e))},every(e,t){return eX(this,"every",e,t,void 0,arguments)},filter(e,t){return eX(this,"filter",e,t,e=>e.map(tx),arguments)},find(e,t){return eX(this,"find",e,t,tx,arguments)},findIndex(e,t){return eX(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eX(this,"findLast",e,t,tx,arguments)},findLastIndex(e,t){return eX(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eX(this,"forEach",e,t,void 0,arguments)},includes(...e){return eY(this,"includes",e)},indexOf(...e){return eY(this,"indexOf",e)},join(e){return eK(this).join(e)},lastIndexOf(...e){return eY(this,"lastIndexOf",e)},map(e,t){return eX(this,"map",e,t,void 0,arguments)},pop(){return eQ(this,"pop")},push(...e){return eQ(this,"push",e)},reduce(e,...t){return eZ(this,"reduce",e,t)},reduceRight(e,...t){return eZ(this,"reduceRight",e,t)},shift(){return eQ(this,"shift")},some(e,t){return eX(this,"some",e,t,void 0,arguments)},splice(...e){return eQ(this,"splice",e)},toReversed(){return eK(this).toReversed()},toSorted(e){return eK(this).toSorted(e)},toSpliced(...e){return eK(this).toSpliced(...e)},unshift(...e){return eQ(this,"unshift",e)},values(){return eG(this,"values",tx)}};function eG(e,t,n){let l=ez(e),r=l[t]();return l===e||ty(e)||(r._next=r.next,r.next=()=>{let e=r._next();return e.value&&(e.value=n(e.value)),e}),r}let eJ=Array.prototype;function eX(e,t,n,l,r,i){let s=ez(e),o=s!==e&&!ty(e),a=s[t];if(a!==eJ[t]){let t=a.apply(e,i);return o?tx(t):t}let u=n;s!==e&&(o?u=function(t,l){return n.call(this,tx(t),l,e)}:n.length>2&&(u=function(t,l){return n.call(this,t,l,e)}));let c=a.call(s,u,l);return o&&r?r(c):c}function eZ(e,t,n,l){let r=ez(e),i=n;return r!==e&&(ty(e)?n.length>3&&(i=function(t,l,r){return n.call(this,t,l,r,e)}):i=function(t,l,r){return n.call(this,t,tx(l),r,e)}),r[t](i,...l)}function eY(e,t,n){let l=tS(e);eH(l,"iterate",e$);let r=l[t](...n);return(-1===r||!1===r)&&tb(n[0])?(n[0]=tS(n[0]),l[t](...n)):r}function eQ(e,t,n=[]){eM(),eS++;let l=tS(e)[t].apply(e,n);return ex(),eI(),l}let e0=h("__proto__,__v_isRef,__isVue"),e1=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(M));function e2(e){M(e)||(e=String(e));let t=tS(this);return eH(t,"has",e),t.hasOwnProperty(e)}class e6{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;let l=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!l;if("__v_isReadonly"===t)return l;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(l?r?tf:tc:r?tu:ta).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let i=k(e);if(!l){let e;if(i&&(e=eq[t]))return e;if("hasOwnProperty"===t)return e2}let s=Reflect.get(e,t,tw(e)?e:n);return(M(t)?e1.has(t):e0(t))?s:(l||eH(e,"get",t),r)?s:tw(s)?i&&j(t)?s:s.value:I(s)?l?th(s):tp(s):s}}class e4 extends e6{constructor(e=!1){super(!1,e)}set(e,t,n,l){let r=e[t];if(!this._isShallow){let t=t_(r);if(ty(n)||t_(n)||(r=tS(r),n=tS(n)),!k(e)&&tw(r)&&!tw(n))return!t&&(r.value=n,!0)}let i=k(e)&&j(t)?Number(t)<e.length:w(e,t),s=Reflect.set(e,t,n,tw(e)?e:l);return e===tS(l)&&(i?J(n,r)&&eW(e,"set",t,n):eW(e,"add",t,n)),s}deleteProperty(e,t){let n=w(e,t);e[t];let l=Reflect.deleteProperty(e,t);return l&&n&&eW(e,"delete",t,void 0),l}has(e,t){let n=Reflect.has(e,t);return M(t)&&e1.has(t)||eH(e,"has",t),n}ownKeys(e){return eH(e,"iterate",k(e)?"length":ej),Reflect.ownKeys(e)}}class e8 extends e6{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let e3=new e4,e5=new e8,e9=new e4(!0),e7=new e8(!0),te=e=>e,tt=e=>Reflect.getPrototypeOf(e);function tn(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function tl(e,t){let n=function(e,t){let n={get(n){let l=this.__v_raw,r=tS(l),i=tS(n);e||(J(n,i)&&eH(r,"get",n),eH(r,"get",i));let{has:s}=tt(r),o=t?te:e?tE:tx;return s.call(r,n)?o(l.get(n)):s.call(r,i)?o(l.get(i)):void(l!==r&&l.get(n))},get size(){let t=this.__v_raw;return e||eH(tS(t),"iterate",ej),Reflect.get(t,"size",t)},has(t){let n=this.__v_raw,l=tS(n),r=tS(t);return e||(J(t,r)&&eH(l,"has",t),eH(l,"has",r)),t===r?n.has(t):n.has(t)||n.has(r)},forEach(n,l){let r=this,i=r.__v_raw,s=tS(i),o=t?te:e?tE:tx;return e||eH(s,"iterate",ej),i.forEach((e,t)=>n.call(l,o(e),o(t),r))}};return C(n,e?{add:tn("add"),set:tn("set"),delete:tn("delete"),clear:tn("clear")}:{add(e){t||ty(e)||t_(e)||(e=tS(e));let n=tS(this);return tt(n).has.call(n,e)||(n.add(e),eW(n,"add",e,e)),this},set(e,n){t||ty(n)||t_(n)||(n=tS(n));let l=tS(this),{has:r,get:i}=tt(l),s=r.call(l,e);s||(e=tS(e),s=r.call(l,e));let o=i.call(l,e);return l.set(e,n),s?J(n,o)&&eW(l,"set",e,n):eW(l,"add",e,n),this},delete(e){let t=tS(this),{has:n,get:l}=tt(t),r=n.call(t,e);r||(e=tS(e),r=n.call(t,e)),l&&l.call(t,e);let i=t.delete(e);return r&&eW(t,"delete",e,void 0),i},clear(){let e=tS(this),t=0!==e.size,n=e.clear();return t&&eW(e,"clear",void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach(l=>{n[l]=function(...n){let r=this.__v_raw,i=tS(r),s=T(i),o="entries"===l||l===Symbol.iterator&&s,a=r[l](...n),u=t?te:e?tE:tx;return e||eH(i,"iterate","keys"===l&&s?eB:ej),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}),n}(e,t);return(t,l,r)=>"__v_isReactive"===l?!e:"__v_isReadonly"===l?e:"__v_raw"===l?t:Reflect.get(w(n,l)&&l in t?n:t,l,r)}let tr={get:tl(!1,!1)},ti={get:tl(!1,!0)},ts={get:tl(!0,!1)},to={get:tl(!0,!0)},ta=new WeakMap,tu=new WeakMap,tc=new WeakMap,tf=new WeakMap;function tp(e){return t_(e)?e:tv(e,!1,e3,tr,ta)}function td(e){return tv(e,!1,e9,ti,tu)}function th(e){return tv(e,!0,e5,ts,tc)}function tg(e){return tv(e,!0,e7,to,tf)}function tv(e,t,n,l,r){if(!I(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let i=r.get(e);if(i)return i;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(V(e));if(0===s)return e;let o=new Proxy(e,2===s?l:n);return r.set(e,o),o}function tm(e){return t_(e)?tm(e.__v_raw):!!(e&&e.__v_isReactive)}function t_(e){return!!(e&&e.__v_isReadonly)}function ty(e){return!!(e&&e.__v_isShallow)}function tb(e){return!!e&&!!e.__v_raw}function tS(e){let t=e&&e.__v_raw;return t?tS(t):e}function tC(e){return!w(e,"__v_skip")&&Object.isExtensible(e)&&Z(e,"__v_skip",!0),e}let tx=e=>I(e)?tp(e):e,tE=e=>I(e)?th(e):e;function tw(e){return!!e&&!0===e.__v_isRef}function tk(e){return tA(e,!1)}function tT(e){return tA(e,!0)}function tA(e,t){return tw(e)?e:new tR(e,t)}class tR{constructor(e,t){this.dep=new eV,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:tS(e),this._value=t?e:tx(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||ty(e)||t_(e);J(e=n?e:tS(e),t)&&(this._rawValue=e,this._value=n?e:tx(e),this.dep.trigger())}}function tN(e){e.dep&&e.dep.trigger()}function tO(e){return tw(e)?e.value:e}function tP(e){return O(e)?e():tO(e)}let tM={get:(e,t,n)=>"__v_raw"===t?e:tO(Reflect.get(e,t,n)),set:(e,t,n,l)=>{let r=e[t];return tw(r)&&!tw(n)?(r.value=n,!0):Reflect.set(e,t,n,l)}};function tI(e){return tm(e)?e:new Proxy(e,tM)}class tL{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new eV,{get:n,set:l}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=l}get value(){return this._value=this._get()}set value(e){this._set(e)}}function tD(e){return new tL(e)}function tF(e){let t=k(e)?Array(e.length):{};for(let n in e)t[n]=tB(e,n);return t}class tV{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let n=eU.get(e);return n&&n.get(t)}(tS(this._object),this._key)}}class tU{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tj(e,t,n){return tw(e)?e:O(e)?new tU(e):I(e)&&arguments.length>1?tB(e,t,n):tk(e)}function tB(e,t,n){let l=e[t];return tw(l)?l:new tV(e,t,n)}class t${constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eV(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eD-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&r!==this)return eC(this,!0),!0}get value(){let e=this.dep.track();return eT(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let tH={GET:"get",HAS:"has",ITERATE:"iterate"},tW={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},tK={},tz=new WeakMap;function tq(){return p}function tG(e,t=!1,n=p){if(n){let t=tz.get(n);t||tz.set(n,t=[]),t.push(e)}}function tJ(e,t=1/0,n){if(t<=0||!I(e)||e.__v_skip||(n=n||new Set).has(e))return e;if(n.add(e),t--,tw(e))tJ(e.value,t,n);else if(k(e))for(let l=0;l<e.length;l++)tJ(e[l],t,n);else if(A(e)||T(e))e.forEach(e=>{tJ(e,t,n)});else if(U(e)){for(let l in e)tJ(e[l],t,n);for(let l of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,l)&&tJ(e[l],t,n)}return e}function tX(e,t){}let tZ={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"};function tY(e,t,n,l){try{return l?e(...l):e()}catch(e){t0(e,t,n)}}function tQ(e,t,n,l){if(O(e)){let r=tY(e,t,n,l);return r&&L(r)&&r.catch(e=>{t0(e,t,n)}),r}if(k(e)){let r=[];for(let i=0;i<e.length;i++)r.push(tQ(e[i],t,n,l));return r}}function t0(e,t,n,l=!0){t&&t.vnode;let{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||g;if(t){let l=t.parent,i=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){let t=l.ec;if(t){for(let n=0;n<t.length;n++)if(!1===t[n](e,i,s))return}l=l.parent}if(r){eM(),tY(r,null,10,[e,i,s]),eI();return}}!function(e,t,n,l=!0,r=!1){if(r)throw e;console.error(e)}(e,0,0,l,i)}let t1=[],t2=-1,t6=[],t4=null,t8=0,t3=Promise.resolve(),t5=null;function t9(e){let t=t5||t3;return e?t.then(this?e.bind(this):e):t}function t7(e){if(!(1&e.flags)){let t=nr(e),n=t1[t1.length-1];!n||!(2&e.flags)&&t>=nr(n)?t1.push(e):t1.splice(function(e){let t=t2+1,n=t1.length;for(;t<n;){let l=t+n>>>1,r=t1[l],i=nr(r);i<e||i===e&&2&r.flags?t=l+1:n=l}return t}(t),0,e),e.flags|=1,ne()}}function ne(){t5||(t5=t3.then(function e(t){try{for(t2=0;t2<t1.length;t2++){let e=t1[t2];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),tY(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;t2<t1.length;t2++){let e=t1[t2];e&&(e.flags&=-2)}t2=-1,t1.length=0,nl(),t5=null,(t1.length||t6.length)&&e()}}))}function nt(e){k(e)?t6.push(...e):t4&&-1===e.id?t4.splice(t8+1,0,e):1&e.flags||(t6.push(e),e.flags|=1),ne()}function nn(e,t,n=t2+1){for(;n<t1.length;n++){let t=t1[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;t1.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function nl(e){if(t6.length){let e=[...new Set(t6)].sort((e,t)=>nr(e)-nr(t));if(t6.length=0,t4){t4.push(...e);return}for(t8=0,t4=e;t8<t4.length;t8++){let e=t4[t8];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}t4=null,t8=0}}let nr=e=>null==e.id?2&e.flags?-1:1/0:e.id,ni=null,ns=null;function no(e){let t=ni;return ni=e,ns=e&&e.type.__scopeId||null,t}function na(e){ns=e}function nu(){ns=null}let nc=e=>nf;function nf(e,t=ni,n){if(!t||e._n)return e;let l=(...n)=>{let r;l._d&&r7(-1);let i=no(t);try{r=e(...n)}finally{no(i),l._d&&r7(1)}return r};return l._n=!0,l._c=!0,l._d=!0,l}function np(e,t){if(null===ni)return e;let n=iV(ni),l=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[r,i,s,o=g]=t[e];r&&(O(r)&&(r={mounted:r,updated:r}),r.deep&&tJ(i),l.push({dir:r,instance:n,value:i,oldValue:void 0,arg:s,modifiers:o}))}return e}function nd(e,t,n,l){let r=e.dirs,i=t&&t.dirs;for(let s=0;s<r.length;s++){let o=r[s];i&&(o.oldValue=i[s].value);let a=o.dir[l];a&&(eM(),tQ(a,n,8,[e.el,o,e,t]),eI())}}let nh=Symbol("_vte"),ng=e=>e.__isTeleport,nv=e=>e&&(e.disabled||""===e.disabled),nm=e=>e&&(e.defer||""===e.defer),n_=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,ny=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,nb=(e,t)=>{let n=e&&e.to;return P(n)?t?t(n):null:n},nS={name:"Teleport",__isTeleport:!0,process(e,t,n,l,r,i,s,o,a,u){let{mc:c,pc:f,pbc:p,o:{insert:d,querySelector:h,createText:g,createComment:m}}=u,_=nv(t.props),{shapeFlag:y,children:b,dynamicChildren:S}=t;if(null==e){let e=t.el=g(""),u=t.anchor=g("");d(e,n,l),d(u,n,l);let f=(e,t)=>{16&y&&(r&&r.isCE&&(r.ce._teleportTarget=e),c(b,e,t,r,i,s,o,a))},p=()=>{let e=t.target=nb(t.props,h),n=nw(e,t,g,d);e&&("svg"!==s&&n_(e)?s="svg":"mathml"!==s&&ny(e)&&(s="mathml"),_||(f(e,n),nE(t,!1)))};_&&(f(n,u),nE(t,!0)),nm(t.props)?ry(()=>{p(),t.el.__isMounted=!0},i):p()}else{if(nm(t.props)&&!e.el.__isMounted){ry(()=>{nS.process(e,t,n,l,r,i,s,o,a,u),delete e.el.__isMounted},i);return}t.el=e.el,t.targetStart=e.targetStart;let c=t.anchor=e.anchor,d=t.target=e.target,g=t.targetAnchor=e.targetAnchor,m=nv(e.props),y=m?n:d;if("svg"===s||n_(d)?s="svg":("mathml"===s||ny(d))&&(s="mathml"),S?(p(e.dynamicChildren,S,y,r,i,s,o),rk(e,t,!0)):a||f(e,t,y,m?c:g,r,i,s,o,!1),_)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):nC(t,n,c,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=nb(t.props,h);e&&nC(t,e,null,u,0)}else m&&nC(t,d,g,u,1);nE(t,_)}},remove(e,t,n,{um:l,o:{remove:r}},i){let{shapeFlag:s,children:o,anchor:a,targetStart:u,targetAnchor:c,target:f,props:p}=e;if(f&&(r(u),r(c)),i&&r(a),16&s){let e=i||!nv(p);for(let r=0;r<o.length;r++){let i=o[r];l(i,t,n,e,!!i.dynamicChildren)}}},move:nC,hydrate:function(e,t,n,l,r,i,{o:{nextSibling:s,parentNode:o,querySelector:a,insert:u,createText:c}},f){let p=t.target=nb(t.props,a);if(p){let a=nv(t.props),d=p._lpa||p.firstChild;if(16&t.shapeFlag){if(a)t.anchor=f(s(e),t,o(e),n,l,r,i),t.targetStart=d,t.targetAnchor=d&&s(d);else{t.anchor=s(e);let o=d;for(;o;){if(o&&8===o.nodeType){if("teleport start anchor"===o.data)t.targetStart=o;else if("teleport anchor"===o.data){t.targetAnchor=o,p._lpa=t.targetAnchor&&s(t.targetAnchor);break}}o=s(o)}t.targetAnchor||nw(p,t,c,u),f(d&&s(d),t,p,n,l,r,i)}}nE(t,a)}return t.anchor&&s(t.anchor)}};function nC(e,t,n,{o:{insert:l},m:r},i=2){0===i&&l(e.targetAnchor,t,n);let{el:s,anchor:o,shapeFlag:a,children:u,props:c}=e,f=2===i;if(f&&l(s,t,n),(!f||nv(c))&&16&a)for(let e=0;e<u.length;e++)r(u[e],t,n,2);f&&l(o,t,n)}let nx=nS;function nE(e,t){let n=e.ctx;if(n&&n.ut){let l,r;for(t?(l=e.el,r=e.anchor):(l=e.targetStart,r=e.targetAnchor);l&&l!==r;)1===l.nodeType&&l.setAttribute("data-v-owner",n.uid),l=l.nextSibling;n.ut()}}function nw(e,t,n,l){let r=t.targetStart=n(""),i=t.targetAnchor=n("");return r[nh]=i,e&&(l(r,e),l(i,e)),i}let nk=Symbol("_leaveCb"),nT=Symbol("_enterCb");function nA(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return lf(()=>{e.isMounted=!0}),lh(()=>{e.isUnmounting=!0}),e}let nR=[Function,Array],nN={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nR,onEnter:nR,onAfterEnter:nR,onEnterCancelled:nR,onBeforeLeave:nR,onLeave:nR,onAfterLeave:nR,onLeaveCancelled:nR,onBeforeAppear:nR,onAppear:nR,onAfterAppear:nR,onAppearCancelled:nR},nO=e=>{let t=e.subTree;return t.component?nO(t.component):t};function nP(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==r2){t=n;break}}return t}let nM={name:"BaseTransition",props:nN,setup(e,{slots:t}){let n=ik(),l=nA();return()=>{let r=t.default&&nU(t.default(),!0);if(!r||!r.length)return;let i=nP(r),s=tS(e),{mode:o}=s;if(l.isLeaving)return nD(i);let a=nF(i);if(!a)return nD(i);let u=nL(a,s,l,n,e=>u=e);a.type!==r2&&nV(a,u);let c=n.subTree&&nF(n.subTree);if(c&&c.type!==r2&&!ii(a,c)&&nO(n).type!==r2){let e=nL(c,s,l,n);if(nV(c,e),"out-in"===o&&a.type!==r2)return l.isLeaving=!0,e.afterLeave=()=>{l.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave,c=void 0},nD(i);"in-out"===o&&a.type!==r2?e.delayLeave=(e,t,n)=>{nI(l,c)[String(c.key)]=c,e[nk]=()=>{t(),e[nk]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{n(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function nI(e,t){let{leavingVNodes:n}=e,l=n.get(t.type);return l||(l=Object.create(null),n.set(t.type,l)),l}function nL(e,t,n,l,r){let{appear:i,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:p,onLeave:d,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:m,onAppear:_,onAfterAppear:y,onAppearCancelled:b}=t,S=String(e.key),C=nI(n,e),x=(e,t)=>{e&&tQ(e,l,9,t)},E=(e,t)=>{let n=t[1];x(e,t),k(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},w={mode:s,persisted:o,beforeEnter(t){let l=a;if(!n.isMounted){if(!i)return;l=m||a}t[nk]&&t[nk](!0);let r=C[S];r&&ii(e,r)&&r.el[nk]&&r.el[nk](),x(l,[t])},enter(e){let t=u,l=c,r=f;if(!n.isMounted){if(!i)return;t=_||u,l=y||c,r=b||f}let s=!1,o=e[nT]=t=>{s||(s=!0,t?x(r,[e]):x(l,[e]),w.delayedLeave&&w.delayedLeave(),e[nT]=void 0)};t?E(t,[e,o]):o()},leave(t,l){let r=String(e.key);if(t[nT]&&t[nT](!0),n.isUnmounting)return l();x(p,[t]);let i=!1,s=t[nk]=n=>{i||(i=!0,l(),n?x(g,[t]):x(h,[t]),t[nk]=void 0,C[r]!==e||delete C[r])};C[r]=e,d?E(d,[t,s]):s()},clone(e){let i=nL(e,t,n,l,r);return r&&r(i),i}};return w}function nD(e){if(le(e))return(e=id(e)).children=null,e}function nF(e){if(!le(e))return ng(e.type)&&e.children?nP(e.children):e;let{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&O(n.default))return n.default()}}function nV(e,t){6&e.shapeFlag&&e.component?(e.transition=t,nV(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function nU(e,t=!1,n){let l=[],r=0;for(let i=0;i<e.length;i++){let s=e[i],o=null==n?s.key:String(n)+String(null!=s.key?s.key:i);s.type===r0?(128&s.patchFlag&&r++,l=l.concat(nU(s.children,t,o))):(t||s.type!==r2)&&l.push(null!=o?id(s,{key:o}):s)}if(r>1)for(let e=0;e<l.length;e++)l[e].patchFlag=-2;return l}function nj(e,t){return O(e)?C({name:e.name},t,{setup:e}):e}function nB(){let e=ik();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function n$(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function nH(e){let t=ik(),n=tT(null);return t&&Object.defineProperty(t.refs===g?t.refs={}:t.refs,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e}),n}function nW(e,t,n,l,r=!1){if(k(e)){e.forEach((e,i)=>nW(e,t&&(k(t)?t[i]:t),n,l,r));return}if(n5(l)&&!r){512&l.shapeFlag&&l.type.__asyncResolved&&l.component.subTree.component&&nW(e,t,n,l.component.subTree);return}let i=4&l.shapeFlag?iV(l.component):l.el,s=r?null:i,{i:o,r:a}=e,u=t&&t.r,c=o.refs===g?o.refs={}:o.refs,f=o.setupState,p=tS(f),d=f===g?()=>!1:e=>w(p,e);if(null!=u&&u!==a&&(P(u)?(c[u]=null,d(u)&&(f[u]=null)):tw(u)&&(u.value=null)),O(a))tY(a,o,12,[s,c]);else{let t=P(a),l=tw(a);if(t||l){let o=()=>{if(e.f){let n=t?d(a)?f[a]:c[a]:a.value;r?k(n)&&x(n,i):k(n)?n.includes(i)||n.push(i):t?(c[a]=[i],d(a)&&(f[a]=c[a])):(a.value=[i],e.k&&(c[e.k]=a.value))}else t?(c[a]=s,d(a)&&(f[a]=s)):l&&(a.value=s,e.k&&(c[e.k]=s))};s?(o.id=-1,ry(o,n)):o()}}}let nK=!1,nz=()=>{nK||(console.error("Hydration completed but contains mismatches."),nK=!0)},nq=e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName,nG=e=>e.namespaceURI.includes("MathML"),nJ=e=>{if(1===e.nodeType){if(nq(e))return"svg";if(nG(e))return"mathml"}},nX=e=>8===e.nodeType;function nZ(e){let{mt:t,p:n,o:{patchProp:l,createText:r,nextSibling:i,parentNode:s,remove:o,insert:a,createComment:u}}=e,c=(n,l,o,u,y,b=!1)=>{b=b||!!l.dynamicChildren;let S=nX(n)&&"["===n.data,C=()=>h(n,l,o,u,y,S),{type:x,ref:E,shapeFlag:w,patchFlag:k}=l,T=n.nodeType;l.el=n,-2===k&&(b=!1,l.dynamicChildren=null);let A=null;switch(x){case r1:3!==T?""===l.children?(a(l.el=r(""),s(n),n),A=n):A=C():(n.data!==l.children&&(nz(),n.data=l.children),A=i(n));break;case r2:_(n)?(A=i(n),m(l.el=n.content.firstChild,n,o)):A=8!==T||S?C():i(n);break;case r6:if(S&&(T=(n=i(n)).nodeType),1===T||3===T){A=n;let e=!l.children.length;for(let t=0;t<l.staticCount;t++)e&&(l.children+=1===A.nodeType?A.outerHTML:A.data),t===l.staticCount-1&&(l.anchor=A),A=i(A);return S?i(A):A}C();break;case r0:A=S?d(n,l,o,u,y,b):C();break;default:if(1&w)A=1===T&&l.type.toLowerCase()===n.tagName.toLowerCase()||_(n)?f(n,l,o,u,y,b):C();else if(6&w){l.slotScopeIds=y;let e=s(n);if(A=S?g(n):nX(n)&&"teleport start"===n.data?g(n,n.data,"teleport end"):i(n),t(l,e,null,o,u,nJ(e),b),n5(l)&&!l.type.__asyncResolved){let t;S?(t=ic(r0)).anchor=A?A.previousSibling:e.lastChild:t=3===n.nodeType?ih(""):ic("div"),t.el=n,l.component.subTree=t}}else 64&w?A=8!==T?C():l.type.hydrate(n,l,o,u,y,b,e,p):128&w&&(A=l.type.hydrate(n,l,o,u,nJ(s(n)),y,b,e,c))}return null!=E&&nW(E,null,u,l),A},f=(e,t,n,r,i,s)=>{s=s||!!t.dynamicChildren;let{type:a,props:u,patchFlag:c,shapeFlag:f,dirs:d,transition:h}=t,g="input"===a||"option"===a;if(g||-1!==c){let a;d&&nd(t,null,n,"created");let y=!1;if(_(e)){y=rw(null,h)&&n&&n.vnode.props&&n.vnode.props.appear;let l=e.content.firstChild;y&&h.beforeEnter(l),m(l,e,n),t.el=e=l}if(16&f&&!(u&&(u.innerHTML||u.textContent))){let l=p(e.firstChild,t,e,n,r,i,s);for(;l;){n0(e,1)||nz();let t=l;l=l.nextSibling,o(t)}}else if(8&f){let n=t.children;"\n"===n[0]&&("PRE"===e.tagName||"TEXTAREA"===e.tagName)&&(n=n.slice(1)),e.textContent!==n&&(n0(e,0)||nz(),e.textContent=t.children)}if(u){if(g||!s||48&c){let t=e.tagName.includes("-");for(let r in u)(g&&(r.endsWith("value")||"indeterminate"===r)||b(r)&&!B(r)||"."===r[0]||t)&&l(e,r,null,u[r],void 0,n)}else if(u.onClick)l(e,"onClick",null,u.onClick,void 0,n);else if(4&c&&tm(u.style))for(let e in u.style)u.style[e]}(a=u&&u.onVnodeBeforeMount)&&iS(a,n,t),d&&nd(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||d||y)&&rY(()=>{a&&iS(a,n,t),y&&h.enter(e),d&&nd(t,null,n,"mounted")},r)}return e.nextSibling},p=(e,t,l,s,o,u,f)=>{f=f||!!t.dynamicChildren;let p=t.children,d=p.length;for(let t=0;t<d;t++){let h=f?p[t]:p[t]=im(p[t]),g=h.type===r1;e?(g&&!f&&t+1<d&&im(p[t+1]).type===r1&&(a(r(e.data.slice(h.children.length)),l,i(e)),e.data=h.children),e=c(e,h,s,o,u,f)):g&&!h.children?a(h.el=r(""),l):(n0(l,1)||nz(),n(null,h,l,null,s,o,nJ(l),u))}return e},d=(e,t,n,l,r,o)=>{let{slotScopeIds:c}=t;c&&(r=r?r.concat(c):c);let f=s(e),d=p(i(e),t,f,n,l,r,o);return d&&nX(d)&&"]"===d.data?i(t.anchor=d):(nz(),a(t.anchor=u("]"),f,d),d)},h=(e,t,l,r,a,u)=>{if(n0(e.parentElement,1)||nz(),t.el=null,u){let t=g(e);for(;;){let n=i(e);if(n&&n!==t)o(n);else break}}let c=i(e),f=s(e);return o(e),n(null,t,f,c,l,r,nJ(f),a),l&&(l.vnode.el=t.el,rK(l,t.el)),c},g=(e,t="[",n="]")=>{let l=0;for(;e;)if((e=i(e))&&nX(e)&&(e.data===t&&l++,e.data===n)){if(0===l)return i(e);l--}return e},m=(e,t,n)=>{let l=t.parentNode;l&&l.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},_=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),nl(),t._vnode=e;return}c(t.firstChild,e,null,null,null),nl(),t._vnode=e},c]}let nY="data-allow-mismatch",nQ={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function n0(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(nY);)e=e.parentElement;let n=e&&e.getAttribute(nY);if(null==n)return!1;if(""===n)return!0;{let e=n.split(",");return!!(0===t&&e.includes("children"))||n.split(",").includes(nQ[t])}}let n1=ee().requestIdleCallback||(e=>setTimeout(e,1)),n2=ee().cancelIdleCallback||(e=>clearTimeout(e)),n6=(e=1e4)=>t=>{let n=n1(t,{timeout:e});return()=>n2(n)},n4=e=>(t,n)=>{let l=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){l.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(function(e){let{top:t,left:n,bottom:l,right:r}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:s}=window;return(t>0&&t<i||l>0&&l<i)&&(n>0&&n<s||r>0&&r<s)}(e))return t(),l.disconnect(),!1;l.observe(e)}}),()=>l.disconnect()},n8=e=>t=>{if(e){let n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},n3=(e=[])=>(t,n)=>{P(e)&&(e=[e]);let l=!1,r=e=>{l||(l=!0,i(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},i=()=>{n(t=>{for(let n of e)t.removeEventListener(n,r)})};return n(t=>{for(let n of e)t.addEventListener(n,r,{once:!0})}),i},n5=e=>!!e.type.__asyncLoader;function n9(e){let t;O(e)&&(e={loader:e});let{loader:n,loadingComponent:l,errorComponent:r,delay:i=200,hydrate:s,timeout:o,suspensible:a=!0,onError:u}=e,c=null,f=0,p=()=>(f++,c=null,d()),d=()=>{let e;return c||(e=c=n().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),u)return new Promise((t,n)=>{u(e,()=>t(p()),()=>n(e),f+1)});throw e}).then(n=>e!==c&&c?c:(n&&(n.__esModule||"Module"===n[Symbol.toStringTag])&&(n=n.default),t=n,n)))};return nj({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(e,n,l){let r=s?()=>{let t=s(l,t=>(function(e,t){if(nX(e)&&"["===e.data){let n=1,l=e.nextSibling;for(;l;){if(1===l.nodeType){if(!1===t(l))break}else if(nX(l)){if("]"===l.data){if(0==--n)break}else"["===l.data&&n++}l=l.nextSibling}}else t(e)})(e,t));t&&(n.bum||(n.bum=[])).push(t)}:l;t?r():d().then(()=>!n.isUnmounted&&r())},get __asyncResolved(){return t},setup(){let e=iw;if(n$(e),t)return()=>n7(t,e);let n=t=>{c=null,t0(t,e,13,!r)};if(a&&e.suspense||iN)return d().then(t=>()=>n7(t,e)).catch(e=>(n(e),()=>r?ic(r,{error:e}):null));let s=tk(!1),u=tk(),f=tk(!!i);return i&&setTimeout(()=>{f.value=!1},i),null!=o&&setTimeout(()=>{if(!s.value&&!u.value){let e=Error(`Async component timed out after ${o}ms.`);n(e),u.value=e}},o),d().then(()=>{s.value=!0,e.parent&&le(e.parent.vnode)&&e.parent.update()}).catch(e=>{n(e),u.value=e}),()=>s.value&&t?n7(t,e):u.value&&r?ic(r,{error:u.value}):l&&!f.value?ic(l):void 0}})}function n7(e,t){let{ref:n,props:l,children:r,ce:i}=t.vnode,s=ic(e,l,r);return s.ref=n,s.ce=i,delete t.vnode.ce,s}let le=e=>e.type.__isKeepAlive,lt={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=ik(),l=n.ctx;if(!l.renderer)return()=>{let e=t.default&&t.default();return e&&1===e.length?e[0]:e};let r=new Map,i=new Set,s=null,o=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:f}}}=l,p=f("div");function d(e){ls(e),c(e,n,o,!0)}function h(e){r.forEach((t,n)=>{let l=iU(t.type);l&&!e(l)&&g(n)})}function g(e){let t=r.get(e);!t||s&&ii(t,s)?s&&ls(s):d(t),r.delete(e),i.delete(e)}l.activate=(e,t,n,l,r)=>{let i=e.component;u(e,t,n,0,o),a(i.vnode,e,t,n,i,o,l,e.slotScopeIds,r),ry(()=>{i.isDeactivated=!1,i.a&&X(i.a);let t=e.props&&e.props.onVnodeMounted;t&&iS(t,i.parent,e)},o)},l.deactivate=e=>{let t=e.component;rT(t.m),rT(t.a),u(e,p,null,1,o),ry(()=>{t.da&&X(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&iS(n,t.parent,e),t.isDeactivated=!0},o)},rM(()=>[e.include,e.exclude],([e,t])=>{e&&h(t=>ln(e,t)),t&&h(e=>!ln(t,e))},{flush:"post",deep:!0});let m=null,_=()=>{null!=m&&(rz(n.subTree.type)?ry(()=>{r.set(m,lo(n.subTree))},n.subTree.suspense):r.set(m,lo(n.subTree)))};return lf(_),ld(_),lh(()=>{r.forEach(e=>{let{subTree:t,suspense:l}=n,r=lo(t);if(e.type===r.type&&e.key===r.key){ls(r);let e=r.component.da;e&&ry(e,l);return}d(e)})}),()=>{if(m=null,!t.default)return s=null;let n=t.default(),l=n[0];if(n.length>1)return s=null,n;if(!ir(l)||!(4&l.shapeFlag)&&!(128&l.shapeFlag))return s=null,l;let o=lo(l);if(o.type===r2)return s=null,o;let a=o.type,u=iU(n5(o)?o.type.__asyncResolved||{}:a),{include:c,exclude:f,max:p}=e;if(c&&(!u||!ln(c,u))||f&&u&&ln(f,u))return o.shapeFlag&=-257,s=o,l;let d=null==o.key?a:o.key,h=r.get(d);return o.el&&(o=id(o),128&l.shapeFlag&&(l.ssContent=o)),m=d,h?(o.el=h.el,o.component=h.component,o.transition&&nV(o,o.transition),o.shapeFlag|=512,i.delete(d),i.add(d)):(i.add(d),p&&i.size>parseInt(p,10)&&g(i.values().next().value)),o.shapeFlag|=256,s=o,rz(l.type)?l:o}}};function ln(e,t){return k(e)?e.some(e=>ln(e,t)):P(e)?e.split(",").includes(t):!!N(e)&&(e.lastIndex=0,e.test(t))}function ll(e,t){li(e,"a",t)}function lr(e,t){li(e,"da",t)}function li(e,t,n=iw){let l=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(la(t,l,n),n){let e=n.parent;for(;e&&e.parent;)le(e.parent.vnode)&&function(e,t,n,l){let r=la(t,e,l,!0);lg(()=>{x(l[t],r)},n)}(l,t,n,e),e=e.parent}}function ls(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function lo(e){return 128&e.shapeFlag?e.ssContent:e}function la(e,t,n=iw,l=!1){if(n){let r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{eM();let r=iT(n),i=tQ(t,n,e,l);return r(),eI(),i});return l?r.unshift(i):r.push(i),i}}let lu=e=>(t,n=iw)=>{iN&&"sp"!==e||la(e,(...e)=>t(...e),n)},lc=lu("bm"),lf=lu("m"),lp=lu("bu"),ld=lu("u"),lh=lu("bum"),lg=lu("um"),lv=lu("sp"),lm=lu("rtg"),l_=lu("rtc");function ly(e,t=iw){la("ec",e,t)}let lb="components";function lS(e,t){return lw(lb,e,!0,t)||e}let lC=Symbol.for("v-ndc");function lx(e){return P(e)?lw(lb,e,!1)||e:e||lC}function lE(e){return lw("directives",e)}function lw(e,t,n=!0,l=!1){let r=ni||iw;if(r){let n=r.type;if(e===lb){let e=iU(n,!1);if(e&&(e===t||e===W(t)||e===q(W(t))))return n}let i=lk(r[e]||n[e],t)||lk(r.appContext[e],t);return!i&&l?n:i}}function lk(e,t){return e&&(e[t]||e[W(t)]||e[q(W(t))])}function lT(e,t,n,l){let r;let i=n&&n[l],s=k(e);if(s||P(e)){let n=s&&tm(e),l=!1;n&&(l=!ty(e),e=ez(e)),r=Array(e.length);for(let n=0,s=e.length;n<s;n++)r[n]=t(l?tx(e[n]):e[n],n,void 0,i&&i[n])}else if("number"==typeof e){r=Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,i&&i[n])}else if(I(e)){if(e[Symbol.iterator])r=Array.from(e,(e,n)=>t(e,n,void 0,i&&i[n]));else{let n=Object.keys(e);r=Array(n.length);for(let l=0,s=n.length;l<s;l++){let s=n[l];r[l]=t(e[s],s,l,i&&i[l])}}}else r=[];return n&&(n[l]=r),r}function lA(e,t){for(let n=0;n<t.length;n++){let l=t[n];if(k(l))for(let t=0;t<l.length;t++)e[l[t].name]=l[t].fn;else l&&(e[l.name]=l.key?(...e)=>{let t=l.fn(...e);return t&&(t.key=l.key),t}:l.fn)}return e}function lR(e,t,n={},l,r){if(ni.ce||ni.parent&&n5(ni.parent)&&ni.parent.ce)return"default"!==t&&(n.name=t),r3(),il(r0,null,[ic("slot",n,l&&l())],64);let i=e[t];i&&i._c&&(i._d=!1),r3();let s=i&&lN(i(n)),o=n.key||s&&s.key,a=il(r0,{key:(o&&!M(o)?o:`_${t}`)+(!s&&l?"_fb":"")},s||(l?l():[]),s&&1===e._?64:-2);return!r&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function lN(e){return e.some(e=>!ir(e)||!!(e.type!==r2&&(e.type!==r0||lN(e.children))))?e:null}function lO(e,t){let n={};for(let l in e)n[t&&/[A-Z]/.test(l)?`on:${l}`:G(l)]=e[l];return n}let lP=e=>e?iR(e)?iV(e):lP(e.parent):null,lM=C(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>lP(e.parent),$root:e=>lP(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>l0(e),$forceUpdate:e=>e.f||(e.f=()=>{t7(e.update)}),$nextTick:e=>e.n||(e.n=t9.bind(e.proxy)),$watch:e=>rL.bind(e)}),lI=(e,t)=>e!==g&&!e.__isScriptSetup&&w(e,t),lL={get({_:e},t){let n,l,r;if("__v_skip"===t)return!0;let{ctx:i,setupState:s,data:o,props:a,accessCache:u,type:c,appContext:f}=e;if("$"!==t[0]){let l=u[t];if(void 0!==l)switch(l){case 1:return s[t];case 2:return o[t];case 4:return i[t];case 3:return a[t]}else{if(lI(s,t))return u[t]=1,s[t];if(o!==g&&w(o,t))return u[t]=2,o[t];if((n=e.propsOptions[0])&&w(n,t))return u[t]=3,a[t];if(i!==g&&w(i,t))return u[t]=4,i[t];lY&&(u[t]=0)}}let p=lM[t];return p?("$attrs"===t&&eH(e.attrs,"get",""),p(e)):(l=c.__cssModules)&&(l=l[t])?l:i!==g&&w(i,t)?(u[t]=4,i[t]):w(r=f.config.globalProperties,t)?r[t]:void 0},set({_:e},t,n){let{data:l,setupState:r,ctx:i}=e;return lI(r,t)?(r[t]=n,!0):l!==g&&w(l,t)?(l[t]=n,!0):!w(e.props,t)&&!("$"===t[0]&&t.slice(1)in e)&&(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:l,appContext:r,propsOptions:i}},s){let o;return!!n[s]||e!==g&&w(e,s)||lI(t,s)||(o=i[0])&&w(o,s)||w(l,s)||w(lM,s)||w(r.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:w(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},lD=C({},lL,{get(e,t){if(t!==Symbol.unscopables)return lL.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!et(t)});function lF(){return null}function lV(){return null}function lU(e){}function lj(e){}function lB(){return null}function l$(){}function lH(e,t){return null}function lW(){return lz().slots}function lK(){return lz().attrs}function lz(){let e=ik();return e.setupContext||(e.setupContext=iF(e))}function lq(e){return k(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function lG(e,t){let n=lq(e);for(let e in t){if(e.startsWith("__skip"))continue;let l=n[e];l?k(l)||O(l)?l=n[e]={type:l,default:t[e]}:l.default=t[e]:null===l&&(l=n[e]={default:t[e]}),l&&t[`__skip_${e}`]&&(l.skipFactory=!0)}return n}function lJ(e,t){return e&&t?k(e)&&k(t)?e.concat(t):C({},lq(e),lq(t)):e||t}function lX(e,t){let n={};for(let l in e)t.includes(l)||Object.defineProperty(n,l,{enumerable:!0,get:()=>e[l]});return n}function lZ(e){let t=ik(),n=e();return iA(),L(n)&&(n=n.catch(e=>{throw iT(t),e})),[n,()=>iT(t)]}let lY=!0;function lQ(e,t,n){tQ(k(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function l0(e){let t;let n=e.type,{mixins:l,extends:r}=n,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:i.length||l||r?(t={},i.length&&i.forEach(e=>l1(t,e,o,!0)),l1(t,n,o)):t=n,I(n)&&s.set(n,t),t}function l1(e,t,n,l=!1){let{mixins:r,extends:i}=t;for(let s in i&&l1(e,i,n,!0),r&&r.forEach(t=>l1(e,t,n,!0)),t)if(l&&"expose"===s);else{let l=l2[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}let l2={data:l6,props:l5,emits:l5,methods:l3,computed:l3,beforeCreate:l8,created:l8,beforeMount:l8,mounted:l8,beforeUpdate:l8,updated:l8,beforeDestroy:l8,beforeUnmount:l8,destroyed:l8,unmounted:l8,activated:l8,deactivated:l8,errorCaptured:l8,serverPrefetch:l8,components:l3,directives:l3,watch:function(e,t){if(!e)return t;if(!t)return e;let n=C(Object.create(null),e);for(let l in t)n[l]=l8(e[l],t[l]);return n},provide:l6,inject:function(e,t){return l3(l4(e),l4(t))}};function l6(e,t){return t?e?function(){return C(O(e)?e.call(this,this):e,O(t)?t.call(this,this):t)}:t:e}function l4(e){if(k(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function l8(e,t){return e?[...new Set([].concat(e,t))]:t}function l3(e,t){return e?C(Object.create(null),e,t):t}function l5(e,t){return e?k(e)&&k(t)?[...new Set([...e,...t])]:C(Object.create(null),lq(e),lq(null!=t?t:{})):t}function l9(){return{app:null,config:{isNativeTag:y,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let l7=0,re=null;function rt(e,t){if(iw){let n=iw.provides,l=iw.parent&&iw.parent.provides;l===n&&(n=iw.provides=Object.create(l)),n[e]=t}}function rn(e,t,n=!1){let l=iw||ni;if(l||re){let r=re?re._context.provides:l?null==l.parent?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&O(t)?t.call(l&&l.proxy):t}}function rl(){return!!(iw||ni||re)}let rr={},ri=()=>Object.create(rr),rs=e=>Object.getPrototypeOf(e)===rr;function ro(e,t,n,l){let r;let[i,s]=e.propsOptions,o=!1;if(t)for(let a in t){let u;if(B(a))continue;let c=t[a];i&&w(i,u=W(a))?s&&s.includes(u)?(r||(r={}))[u]=c:n[u]=c:rj(e.emitsOptions,a)||a in l&&c===l[a]||(l[a]=c,o=!0)}if(s){let t=tS(n),l=r||g;for(let r=0;r<s.length;r++){let o=s[r];n[o]=ra(i,t,o,l[o],e,!w(l,o))}}return o}function ra(e,t,n,l,r,i){let s=e[n];if(null!=s){let e=w(s,"default");if(e&&void 0===l){let e=s.default;if(s.type!==Function&&!s.skipFactory&&O(e)){let{propsDefaults:i}=r;if(n in i)l=i[n];else{let s=iT(r);l=i[n]=e.call(null,t),s()}}else l=e;r.ce&&r.ce._setProp(n,l)}s[0]&&(i&&!e?l=!1:s[1]&&(""===l||l===z(n))&&(l=!0))}return l}let ru=new WeakMap;function rc(e){return!("$"===e[0]||B(e))}let rf=e=>"_"===e[0]||"$stable"===e,rp=e=>k(e)?e.map(im):[im(e)],rd=(e,t,n)=>{if(t._n)return t;let l=nf((...e)=>rp(t(...e)),n);return l._c=!1,l},rh=(e,t,n)=>{let l=e._ctx;for(let n in e){if(rf(n))continue;let r=e[n];if(O(r))t[n]=rd(n,r,l);else if(null!=r){let e=rp(r);t[n]=()=>e}}},rg=(e,t)=>{let n=rp(t);e.slots.default=()=>n},rv=(e,t,n)=>{for(let l in t)(n||"_"!==l)&&(e[l]=t[l])},rm=(e,t,n)=>{let l=e.slots=ri();if(32&e.vnode.shapeFlag){let e=t._;e?(rv(l,t,n),n&&Z(l,"_",e,!0)):rh(t,l)}else t&&rg(e,t)},r_=(e,t,n)=>{let{vnode:l,slots:r}=e,i=!0,s=g;if(32&l.shapeFlag){let e=t._;e?n&&1===e?i=!1:rv(r,t,n):(i=!t.$stable,rh(t,r)),s=t}else t&&(rg(e,t),s={default:1});if(i)for(let e in r)rf(e)||null!=s[e]||delete r[e]},ry=rY;function rb(e){return rC(e)}function rS(e){return rC(e,nZ)}function rC(e,t){var n;let l,r;ee().__VUE__=!0;let{insert:i,remove:s,patchProp:o,createElement:a,createText:u,createComment:c,setText:f,setElementText:p,parentNode:d,nextSibling:h,setScopeId:y=_,insertStaticContent:b}=e,S=(e,t,n,l=null,r=null,i=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!ii(e,t)&&(l=er(e),Y(e,r,i,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:u,ref:c,shapeFlag:f}=t;switch(u){case r1:x(e,t,n,l);break;case r2:E(e,t,n,l);break;case r6:null==e&&k(t,n,l,s);break;case r0:V(e,t,n,l,r,i,s,o,a);break;default:1&f?R(e,t,n,l,r,i,s,o,a):6&f?U(e,t,n,l,r,i,s,o,a):64&f?u.process(e,t,n,l,r,i,s,o,a,eo):128&f&&u.process(e,t,n,l,r,i,s,o,a,eo)}null!=c&&r&&nW(c,e&&e.ref,i,t||e,!t)},x=(e,t,n,l)=>{if(null==e)i(t.el=u(t.children),n,l);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},E=(e,t,n,l)=>{null==e?i(t.el=c(t.children||""),n,l):t.el=e.el},k=(e,t,n,l)=>{[e.el,e.anchor]=b(e.children,t,n,l,e.el,e.anchor)},T=({el:e,anchor:t},n,l)=>{let r;for(;e&&e!==t;)r=h(e),i(e,n,l),e=r;i(t,n,l)},A=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},R=(e,t,n,l,r,i,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?N(t,n,l,r,i,s,o,a):L(e,t,r,i,s,o,a)},N=(e,t,n,l,r,s,u,c)=>{let f,d;let{props:h,shapeFlag:g,transition:m,dirs:_}=e;if(f=e.el=a(e.type,s,h&&h.is,h),8&g?p(f,e.children):16&g&&M(e.children,f,null,l,r,rx(e,s),u,c),_&&nd(e,null,l,"created"),P(f,e,e.scopeId,u,l),h){for(let e in h)"value"===e||B(e)||o(f,e,null,h[e],s,l);"value"in h&&o(f,"value",null,h.value,s),(d=h.onVnodeBeforeMount)&&iS(d,l,e)}_&&nd(e,null,l,"beforeMount");let y=rw(r,m);y&&m.beforeEnter(f),i(f,t,n),((d=h&&h.onVnodeMounted)||y||_)&&ry(()=>{d&&iS(d,l,e),y&&m.enter(f),_&&nd(e,null,l,"mounted")},r)},P=(e,t,n,l,r)=>{if(n&&y(e,n),l)for(let t=0;t<l.length;t++)y(e,l[t]);if(r){let n=r.subTree;if(t===n||rz(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=r.vnode;P(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},M=(e,t,n,l,r,i,s,o,a=0)=>{for(let u=a;u<e.length;u++)S(null,e[u]=o?i_(e[u]):im(e[u]),t,n,l,r,i,s,o)},L=(e,t,n,l,r,i,s)=>{let a;let u=t.el=e.el,{patchFlag:c,dynamicChildren:f,dirs:d}=t;c|=16&e.patchFlag;let h=e.props||g,m=t.props||g;if(n&&rE(n,!1),(a=m.onVnodeBeforeUpdate)&&iS(a,n,t,e),d&&nd(t,e,n,"beforeUpdate"),n&&rE(n,!0),(h.innerHTML&&null==m.innerHTML||h.textContent&&null==m.textContent)&&p(u,""),f?D(e.dynamicChildren,f,u,n,l,rx(t,r),i):s||q(e,t,u,null,n,l,rx(t,r),i,!1),c>0){if(16&c)F(u,h,m,n,r);else if(2&c&&h.class!==m.class&&o(u,"class",null,m.class,r),4&c&&o(u,"style",h.style,m.style,r),8&c){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let l=e[t],i=h[l],s=m[l];(s!==i||"value"===l)&&o(u,l,i,s,r,n)}}1&c&&e.children!==t.children&&p(u,t.children)}else s||null!=f||F(u,h,m,n,r);((a=m.onVnodeUpdated)||d)&&ry(()=>{a&&iS(a,n,t,e),d&&nd(t,e,n,"updated")},l)},D=(e,t,n,l,r,i,s)=>{for(let o=0;o<t.length;o++){let a=e[o],u=t[o],c=a.el&&(a.type===r0||!ii(a,u)||70&a.shapeFlag)?d(a.el):n;S(a,u,c,null,l,r,i,s,!0)}},F=(e,t,n,l,r)=>{if(t!==n){if(t!==g)for(let i in t)B(i)||i in n||o(e,i,t[i],null,r,l);for(let i in n){if(B(i))continue;let s=n[i],a=t[i];s!==a&&"value"!==i&&o(e,i,a,s,r,l)}"value"in n&&o(e,"value",t.value,n.value,r)}},V=(e,t,n,l,r,s,o,a,c)=>{let f=t.el=e?e.el:u(""),p=t.anchor=e?e.anchor:u(""),{patchFlag:d,dynamicChildren:h,slotScopeIds:g}=t;g&&(a=a?a.concat(g):g),null==e?(i(f,n,l),i(p,n,l),M(t.children||[],n,p,r,s,o,a,c)):d>0&&64&d&&h&&e.dynamicChildren?(D(e.dynamicChildren,h,n,r,s,o,a),(null!=t.key||r&&t===r.subTree)&&rk(e,t,!0)):q(e,t,n,p,r,s,o,a,c)},U=(e,t,n,l,r,i,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?r.ctx.activate(t,n,l,s,a):j(t,n,l,r,i,s,a):$(e,t,a)},j=(e,t,n,l,r,i,s)=>{let o=e.component=iE(e,l,r);le(e)&&(o.ctx.renderer=eo),iO(o,!1,s),o.asyncDep?(r&&r.registerDep(o,H,s),e.el||E(null,o.subTree=ic(r2),t,n)):H(o,e,t,n,r,i,s)},$=(e,t,n)=>{let l=t.component=e.component;if(function(e,t,n){let{props:l,children:r,component:i}=e,{props:s,children:o,patchFlag:a}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!r||!!o)&&(!o||!o.$stable)||l!==s&&(l?!s||rW(l,s,u):!!s);if(1024&a)return!0;if(16&a)return l?rW(l,s,u):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(s[n]!==l[n]&&!rj(u,n))return!0}}return!1}(e,t,n)){if(l.asyncDep&&!l.asyncResolved){K(l,t,n);return}l.next=t,l.update()}else t.el=e.el,l.vnode=t},H=(e,t,n,l,i,s,o)=>{let a=()=>{if(e.isMounted){let t,{next:n,bu:l,u:r,parent:u,vnode:c}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=c.el,K(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let f=n;rE(e,!1),n?(n.el=c.el,K(e,n,o)):n=c,l&&X(l),(t=n.props&&n.props.onVnodeBeforeUpdate)&&iS(t,u,n,c),rE(e,!0);let p=rB(e),h=e.subTree;e.subTree=p,S(h,p,d(h.el),er(h),e,i,s),n.el=p.el,null===f&&rK(e,p.el),r&&ry(r,i),(t=n.props&&n.props.onVnodeUpdated)&&ry(()=>iS(t,u,n,c),i)}else{let o;let{el:a,props:u}=t,{bm:c,m:f,parent:p,root:d,type:h}=e,g=n5(t);if(rE(e,!1),c&&X(c),!g&&(o=u&&u.onVnodeBeforeMount)&&iS(o,p,t),rE(e,!0),a&&r){let t=()=>{e.subTree=rB(e),r(a,e.subTree,e,i,null)};g&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{d.ce&&d.ce._injectChildStyle(h);let r=e.subTree=rB(e);S(null,r,n,l,e,i,s),t.el=r.el}if(f&&ry(f,i),!g&&(o=u&&u.onVnodeMounted)){let e=t;ry(()=>iS(o,p,e),i)}(256&t.shapeFlag||p&&n5(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&ry(e.a,i),e.isMounted=!0,t=n=l=null}};e.scope.on();let u=e.effect=new eb(a);e.scope.off();let c=e.update=u.run.bind(u),f=e.job=u.runIfDirty.bind(u);f.i=e,f.id=e.uid,u.scheduler=()=>t7(f),rE(e,!0),c()},K=(e,t,n)=>{t.component=e;let l=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,l){let{props:r,attrs:i,vnode:{patchFlag:s}}=e,o=tS(r),[a]=e.propsOptions,u=!1;if((l||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let l=0;l<n.length;l++){let s=n[l];if(rj(e.emitsOptions,s))continue;let c=t[s];if(a){if(w(i,s))c!==i[s]&&(i[s]=c,u=!0);else{let t=W(s);r[t]=ra(a,o,t,c,e,!1)}}else c!==i[s]&&(i[s]=c,u=!0)}}}else{let l;for(let s in ro(e,t,r,i)&&(u=!0),o)t&&(w(t,s)||(l=z(s))!==s&&w(t,l))||(a?n&&(void 0!==n[s]||void 0!==n[l])&&(r[s]=ra(a,o,s,void 0,e,!0)):delete r[s]);if(i!==o)for(let e in i)t&&w(t,e)||(delete i[e],u=!0)}u&&eW(e.attrs,"set","")}(e,t.props,l,n),r_(e,t.children,n),eM(),nn(e),eI()},q=(e,t,n,l,r,i,s,o,a=!1)=>{let u=e&&e.children,c=e?e.shapeFlag:0,f=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d){J(u,f,n,l,r,i,s,o,a);return}if(256&d){G(u,f,n,l,r,i,s,o,a);return}}8&h?(16&c&&el(u,r,i),f!==u&&p(n,f)):16&c?16&h?J(u,f,n,l,r,i,s,o,a):el(u,r,i,!0):(8&c&&p(n,""),16&h&&M(f,n,l,r,i,s,o,a))},G=(e,t,n,l,r,i,s,o,a)=>{let u;e=e||m,t=t||m;let c=e.length,f=t.length,p=Math.min(c,f);for(u=0;u<p;u++){let l=t[u]=a?i_(t[u]):im(t[u]);S(e[u],l,n,null,r,i,s,o,a)}c>f?el(e,r,i,!0,!1,p):M(t,n,l,r,i,s,o,a,p)},J=(e,t,n,l,r,i,s,o,a)=>{let u=0,c=t.length,f=e.length-1,p=c-1;for(;u<=f&&u<=p;){let l=e[u],c=t[u]=a?i_(t[u]):im(t[u]);if(ii(l,c))S(l,c,n,null,r,i,s,o,a);else break;u++}for(;u<=f&&u<=p;){let l=e[f],u=t[p]=a?i_(t[p]):im(t[p]);if(ii(l,u))S(l,u,n,null,r,i,s,o,a);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,f=e<c?t[e].el:l;for(;u<=p;)S(null,t[u]=a?i_(t[u]):im(t[u]),n,f,r,i,s,o,a),u++}}else if(u>p)for(;u<=f;)Y(e[u],r,i,!0),u++;else{let d;let h=u,g=u,_=new Map;for(u=g;u<=p;u++){let e=t[u]=a?i_(t[u]):im(t[u]);null!=e.key&&_.set(e.key,u)}let y=0,b=p-g+1,C=!1,x=0,E=Array(b);for(u=0;u<b;u++)E[u]=0;for(u=h;u<=f;u++){let l;let c=e[u];if(y>=b){Y(c,r,i,!0);continue}if(null!=c.key)l=_.get(c.key);else for(d=g;d<=p;d++)if(0===E[d-g]&&ii(c,t[d])){l=d;break}void 0===l?Y(c,r,i,!0):(E[l-g]=u+1,l>=x?x=l:C=!0,S(c,t[l],n,null,r,i,s,o,a),y++)}let w=C?function(e){let t,n,l,r,i;let s=e.slice(),o=[0],a=e.length;for(t=0;t<a;t++){let a=e[t];if(0!==a){if(e[n=o[o.length-1]]<a){s[t]=n,o.push(t);continue}for(l=0,r=o.length-1;l<r;)e[o[i=l+r>>1]]<a?l=i+1:r=i;a<e[o[l]]&&(l>0&&(s[t]=o[l-1]),o[l]=t)}}for(l=o.length,r=o[l-1];l-- >0;)o[l]=r,r=s[r];return o}(E):m;for(d=w.length-1,u=b-1;u>=0;u--){let e=g+u,f=t[e],p=e+1<c?t[e+1].el:l;0===E[u]?S(null,f,n,p,r,i,s,o,a):C&&(d<0||u!==w[d]?Z(f,n,p,2):d--)}}},Z=(e,t,n,l,r=null)=>{let{el:s,type:o,transition:a,children:u,shapeFlag:c}=e;if(6&c){Z(e.component.subTree,t,n,l);return}if(128&c){e.suspense.move(t,n,l);return}if(64&c){o.move(e,t,n,eo);return}if(o===r0){i(s,t,n);for(let e=0;e<u.length;e++)Z(u[e],t,n,l);i(e.anchor,t,n);return}if(o===r6){T(e,t,n);return}if(2!==l&&1&c&&a){if(0===l)a.beforeEnter(s),i(s,t,n),ry(()=>a.enter(s),r);else{let{leave:e,delayLeave:l,afterLeave:r}=a,o=()=>i(s,t,n),u=()=>{e(s,()=>{o(),r&&r()})};l?l(s,o,u):u()}}else i(s,t,n)},Y=(e,t,n,l=!1,r=!1)=>{let i;let{type:s,props:o,ref:a,children:u,dynamicChildren:c,shapeFlag:f,patchFlag:p,dirs:d,cacheIndex:h}=e;if(-2===p&&(r=!1),null!=a&&nW(a,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&f){t.ctx.deactivate(e);return}let g=1&f&&d,m=!n5(e);if(m&&(i=o&&o.onVnodeBeforeUnmount)&&iS(i,t,e),6&f)en(e.component,n,l);else{if(128&f){e.suspense.unmount(n,l);return}g&&nd(e,null,t,"beforeUnmount"),64&f?e.type.remove(e,t,n,eo,l):c&&!c.hasOnce&&(s!==r0||p>0&&64&p)?el(c,t,n,!1,!0):(s===r0&&384&p||!r&&16&f)&&el(u,t,n),l&&Q(e)}(m&&(i=o&&o.onVnodeUnmounted)||g)&&ry(()=>{i&&iS(i,t,e),g&&nd(e,null,t,"unmounted")},n)},Q=e=>{let{type:t,el:n,anchor:l,transition:r}=e;if(t===r0){et(n,l);return}if(t===r6){A(e);return}let i=()=>{s(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){let{leave:t,delayLeave:l}=r,s=()=>t(n,i);l?l(e.el,i,s):s()}else i()},et=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},en=(e,t,n)=>{let{bum:l,scope:r,job:i,subTree:s,um:o,m:a,a:u}=e;rT(a),rT(u),l&&X(l),r.stop(),i&&(i.flags|=8,Y(s,e,t,n)),o&&ry(o,t),ry(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},el=(e,t,n,l=!1,r=!1,i=0)=>{for(let s=i;s<e.length;s++)Y(e[s],t,n,l,r)},er=e=>{if(6&e.shapeFlag)return er(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[nh];return n?h(n):t},ei=!1,es=(e,t,n)=>{null==e?t._vnode&&Y(t._vnode,null,null,!0):S(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ei||(ei=!0,nn(),nl(),ei=!1)},eo={p:S,um:Y,m:Z,r:Q,mt:j,mc:M,pc:q,pbc:D,n:er,o:e};return t&&([l,r]=t(eo)),{render:es,hydrate:l,createApp:(n=l,function(e,t=null){O(e)||(e=C({},e)),null==t||I(t)||(t=null);let l=l9(),r=new WeakSet,i=[],s=!1,o=l.app={_uid:l7++,_component:e,_props:t,_container:null,_context:l,_instance:null,version:iK,get config(){return l.config},set config(v){},use:(e,...t)=>(r.has(e)||(e&&O(e.install)?(r.add(e),e.install(o,...t)):O(e)&&(r.add(e),e(o,...t))),o),mixin:e=>(l.mixins.includes(e)||l.mixins.push(e),o),component:(e,t)=>t?(l.components[e]=t,o):l.components[e],directive:(e,t)=>t?(l.directives[e]=t,o):l.directives[e],mount(r,i,a){if(!s){let u=o._ceVNode||ic(e,t);return u.appContext=l,!0===a?a="svg":!1===a&&(a=void 0),i&&n?n(u,r):es(u,r,a),s=!0,o._container=r,r.__vue_app__=o,iV(u.component)}},onUnmount(e){i.push(e)},unmount(){s&&(tQ(i,o._instance,16),es(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(l.provides[e]=t,o),runWithContext(e){let t=re;re=o;try{return e()}finally{re=t}}};return o})}}function rx({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function rE({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function rw(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function rk(e,t,n=!1){let l=e.children,r=t.children;if(k(l)&&k(r))for(let e=0;e<l.length;e++){let t=l[e],i=r[e];!(1&i.shapeFlag)||i.dynamicChildren||((i.patchFlag<=0||32===i.patchFlag)&&((i=r[e]=i_(r[e])).el=t.el),n||-2===i.patchFlag||rk(t,i)),i.type===r1&&(i.el=t.el)}}function rT(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}let rA=Symbol.for("v-scx"),rR=()=>rn(rA);function rN(e,t){return rI(e,null,t)}function rO(e,t){return rI(e,null,{flush:"post"})}function rP(e,t){return rI(e,null,{flush:"sync"})}function rM(e,t,n){return rI(e,t,n)}function rI(e,t,n=g){let l;let{immediate:r,deep:i,flush:s,once:o}=n,a=C({},n),u=t&&r||!t&&"post"!==s;if(iN){if("sync"===s){let e=rR();l=e.__watcherHandles||(e.__watcherHandles=[])}else if(!u){let e=()=>{};return e.stop=_,e.resume=_,e.pause=_,e}}let c=iw;a.call=(e,t,n)=>tQ(e,c,t,n);let f=!1;"post"===s?a.scheduler=e=>{ry(e,c&&c.suspense)}:"sync"!==s&&(f=!0,a.scheduler=(e,t)=>{t?e():t7(e)}),a.augmentJob=e=>{t&&(e.flags|=4),f&&(e.flags|=2,c&&(e.id=c.uid,e.i=c))};let d=function(e,t,n=g){let l,r,i,s;let{immediate:o,deep:a,once:u,scheduler:c,augmentJob:f,call:d}=n,h=e=>a?e:ty(e)||!1===a||0===a?tJ(e,1):tJ(e),m=!1,y=!1;if(tw(e)?(r=()=>e.value,m=ty(e)):tm(e)?(r=()=>h(e),m=!0):k(e)?(y=!0,m=e.some(e=>tm(e)||ty(e)),r=()=>e.map(e=>tw(e)?e.value:tm(e)?h(e):O(e)?d?d(e,2):e():void 0)):r=O(e)?t?d?()=>d(e,2):e:()=>{if(i){eM();try{i()}finally{eI()}}let t=p;p=l;try{return d?d(e,3,[s]):e(s)}finally{p=t}}:_,t&&a){let e=r,t=!0===a?1/0:a;r=()=>tJ(e(),t)}let b=em(),S=()=>{l.stop(),b&&b.active&&x(b.effects,l)};if(u&&t){let e=t;t=(...t)=>{e(...t),S()}}let C=y?Array(e.length).fill(tK):tK,E=e=>{if(1&l.flags&&(l.dirty||e)){if(t){let e=l.run();if(a||m||(y?e.some((e,t)=>J(e,C[t])):J(e,C))){i&&i();let n=p;p=l;try{let n=[e,C===tK?void 0:y&&C[0]===tK?[]:C,s];d?d(t,3,n):t(...n),C=e}finally{p=n}}}else l.run()}};return f&&f(E),(l=new eb(r)).scheduler=c?()=>c(E,!1):E,s=e=>tG(e,!1,l),i=l.onStop=()=>{let e=tz.get(l);if(e){if(d)d(e,4);else for(let t of e)t();tz.delete(l)}},t?o?E(!0):C=l.run():c?c(E.bind(null,!0),!0):l.run(),S.pause=l.pause.bind(l),S.resume=l.resume.bind(l),S.stop=S,S}(e,t,a);return iN&&(l?l.push(d):u&&d()),d}function rL(e,t,n){let l;let r=this.proxy,i=P(e)?e.includes(".")?rD(r,e):()=>r[e]:e.bind(r,r);O(t)?l=t:(l=t.handler,n=t);let s=iT(this),o=rI(i,l.bind(r),n);return s(),o}function rD(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function rF(e,t,n=g){let l=ik(),r=W(t),i=z(t),s=rV(e,r),o=tD((s,o)=>{let a,u;let c=g;return rP(()=>{let t=e[r];J(a,t)&&(a=t,o())}),{get:()=>(s(),n.get?n.get(a):a),set(e){let s=n.set?n.set(e):e;if(!J(s,a)&&!(c!==g&&J(e,c)))return;let f=l.vnode.props;f&&(t in f||r in f||i in f)&&(`onUpdate:${t}`in f||`onUpdate:${r}`in f||`onUpdate:${i}`in f)||(a=e,o()),l.emit(`update:${t}`,s),J(e,s)&&J(e,c)&&!J(s,u)&&o(),c=e,u=s}}});return o[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?s||g:o,done:!1}:{done:!0}}},o}let rV=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${W(t)}Modifiers`]||e[`${z(t)}Modifiers`];function rU(e,t,...n){let l;if(e.isUnmounted)return;let r=e.vnode.props||g,i=n,s=t.startsWith("update:"),o=s&&rV(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>P(e)?e.trim():e)),o.number&&(i=n.map(Y)));let a=r[l=G(t)]||r[l=G(W(t))];!a&&s&&(a=r[l=G(z(t))]),a&&tQ(a,e,6,i);let u=r[l+"Once"];if(u){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,tQ(u,e,6,i)}}function rj(e,t){return!!(e&&b(t))&&(w(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||w(e,z(t))||w(e,t))}function rB(e){let t,n;let{type:l,vnode:r,proxy:i,withProxy:s,propsOptions:[o],slots:a,attrs:u,emit:c,render:f,renderCache:p,props:d,data:h,setupState:g,ctx:m,inheritAttrs:_}=e,y=no(e);try{if(4&r.shapeFlag){let e=s||i;t=im(f.call(e,e,p,d,g,h,m)),n=u}else t=im(l.length>1?l(d,{attrs:u,slots:a,emit:c}):l(d,null)),n=l.props?u:r$(u)}catch(n){r4.length=0,t0(n,e,1),t=ic(r2)}let b=t;if(n&&!1!==_){let e=Object.keys(n),{shapeFlag:t}=b;e.length&&7&t&&(o&&e.some(S)&&(n=rH(n,o)),b=id(b,n,!1,!0))}return r.dirs&&((b=id(b,null,!1,!0)).dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&nV(b,r.transition),t=b,no(y),t}let r$=e=>{let t;for(let n in e)("class"===n||"style"===n||b(n))&&((t||(t={}))[n]=e[n]);return t},rH=(e,t)=>{let n={};for(let l in e)S(l)&&l.slice(9)in t||(n[l]=e[l]);return n};function rW(e,t,n){let l=Object.keys(t);if(l.length!==Object.keys(e).length)return!0;for(let r=0;r<l.length;r++){let i=l[r];if(t[i]!==e[i]&&!rj(n,i))return!0}return!1}function rK({vnode:e,parent:t},n){for(;t;){let l=t.subTree;if(l.suspense&&l.suspense.activeBranch===e&&(l.el=e.el),l===e)(e=t.vnode).el=n,t=t.parent;else break}}let rz=e=>e.__isSuspense,rq=0,rG={name:"Suspense",__isSuspense:!0,process(e,t,n,l,r,i,s,o,a,u){if(null==e)!function(e,t,n,l,r,i,s,o,a){let{p:u,o:{createElement:c}}=a,f=c("div"),p=e.suspense=rX(e,r,l,t,f,n,i,s,o,a);u(null,p.pendingBranch=e.ssContent,f,null,l,p,i,s),p.deps>0?(rJ(e,"onPending"),rJ(e,"onFallback"),u(null,e.ssFallback,t,n,l,null,i,s),rQ(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,l,r,i,s,o,a,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}!function(e,t,n,l,r,i,s,o,{p:a,um:u,o:{createElement:c}}){let f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;let p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:g,isInFallback:m,isHydrating:_}=f;if(g)f.pendingBranch=p,ii(p,g)?(a(g,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0?f.resolve():m&&!_&&(a(h,d,n,l,r,null,i,s,o),rQ(f,d))):(f.pendingId=rq++,_?(f.isHydrating=!1,f.activeBranch=g):u(g,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),m?(a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0?f.resolve():(a(h,d,n,l,r,null,i,s,o),rQ(f,d))):h&&ii(p,h)?(a(h,p,n,l,r,f,i,s,o),f.resolve(!0)):(a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0&&f.resolve()));else if(h&&ii(p,h))a(h,p,n,l,r,f,i,s,o),rQ(f,p);else if(rJ(t,"onPending"),f.pendingBranch=p,512&p.shapeFlag?f.pendingId=p.component.suspenseId:f.pendingId=rq++,a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0)f.resolve();else{let{timeout:e,pendingId:t}=f;e>0?setTimeout(()=>{f.pendingId===t&&f.fallback(d)},e):0===e&&f.fallback(d)}}(e,t,n,l,r,s,o,a,u)}},hydrate:function(e,t,n,l,r,i,s,o,a){let u=t.suspense=rX(t,l,n,e.parentNode,document.createElement("div"),null,r,i,s,o,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,i,s);return 0===u.deps&&u.resolve(!1,!0),c},normalize:function(e){let{shapeFlag:t,children:n}=e,l=32&t;e.ssContent=rZ(l?n.default:n),e.ssFallback=l?rZ(n.fallback):ic(r2)}};function rJ(e,t){let n=e.props&&e.props[t];O(n)&&n()}function rX(e,t,n,l,r,i,s,o,a,u,c=!1){let f;let{p:p,m:d,um:h,n:g,o:{parentNode:m,remove:_}}=u,y=function(e){let t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);y&&t&&t.pendingBranch&&(f=t.pendingId,t.deps++);let b=e.props?Q(e.props.timeout):void 0,S=i,C={vnode:e,parent:t,parentComponent:n,namespace:s,container:l,hiddenContainer:r,deps:0,pendingId:rq++,timeout:"number"==typeof b?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:l,activeBranch:r,pendingBranch:s,pendingId:o,effects:a,parentComponent:u,container:c}=C,p=!1;C.isHydrating?C.isHydrating=!1:e||((p=r&&s.transition&&"out-in"===s.transition.mode)&&(r.transition.afterLeave=()=>{o===C.pendingId&&(d(s,c,i===S?g(r):i,0),nt(a))}),r&&(m(r.el)===c&&(i=g(r)),h(r,u,C,!0)),p||d(s,c,i,0)),rQ(C,s),C.pendingBranch=null,C.isInFallback=!1;let _=C.parent,b=!1;for(;_;){if(_.pendingBranch){_.effects.push(...a),b=!0;break}_=_.parent}b||p||nt(a),C.effects=[],y&&t&&t.pendingBranch&&f===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),rJ(l,"onResolve")},fallback(e){if(!C.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:l,container:r,namespace:i}=C;rJ(t,"onFallback");let s=g(n),u=()=>{C.isInFallback&&(p(null,e,r,s,l,null,i,o,a),rQ(C,e))},c=e.transition&&"out-in"===e.transition.mode;c&&(n.transition.afterLeave=u),C.isInFallback=!0,h(n,l,null,!0),c||u()},move(e,t,n){C.activeBranch&&d(C.activeBranch,e,t,n),C.container=e},next:()=>C.activeBranch&&g(C.activeBranch),registerDep(e,t,n){let l=!!C.pendingBranch;l&&C.deps++;let r=e.vnode.el;e.asyncDep.catch(t=>{t0(t,e,0)}).then(i=>{if(e.isUnmounted||C.isUnmounted||C.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:o}=e;iP(e,i,!1),r&&(o.el=r);let a=!r&&e.subTree.el;t(e,o,m(r||e.subTree.el),r?null:g(e.subTree),C,s,n),a&&_(a),rK(e,o.el),l&&0==--C.deps&&C.resolve()})},unmount(e,t){C.isUnmounted=!0,C.activeBranch&&h(C.activeBranch,n,e,t),C.pendingBranch&&h(C.pendingBranch,n,e,t)}};return C}function rZ(e){let t;if(O(e)){let n=r9&&e._c;n&&(e._d=!1,r3()),e=e(),n&&(e._d=!0,t=r8,r5())}return k(e)&&(e=function(e,t=!0){let n;for(let t=0;t<e.length;t++){let l=e[t];if(!ir(l))return;if(l.type!==r2||"v-if"===l.children){if(n)return;n=l}}return n}(e)),e=im(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function rY(e,t){t&&t.pendingBranch?k(e)?t.effects.push(...e):t.effects.push(e):nt(e)}function rQ(e,t){e.activeBranch=t;let{vnode:n,parentComponent:l}=e,r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,l&&l.subTree===n&&(l.vnode.el=r,rK(l,r))}let r0=Symbol.for("v-fgt"),r1=Symbol.for("v-txt"),r2=Symbol.for("v-cmt"),r6=Symbol.for("v-stc"),r4=[],r8=null;function r3(e=!1){r4.push(r8=e?null:[])}function r5(){r4.pop(),r8=r4[r4.length-1]||null}let r9=1;function r7(e,t=!1){r9+=e,e<0&&r8&&t&&(r8.hasOnce=!0)}function ie(e){return e.dynamicChildren=r9>0?r8||m:null,r5(),r9>0&&r8&&r8.push(e),e}function it(e,t,n,l,r,i){return ie(iu(e,t,n,l,r,i,!0))}function il(e,t,n,l,r){return ie(ic(e,t,n,l,r,!0))}function ir(e){return!!e&&!0===e.__v_isVNode}function ii(e,t){return e.type===t.type&&e.key===t.key}function is(e){}let io=({key:e})=>null!=e?e:null,ia=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?P(e)||tw(e)||O(e)?{i:ni,r:e,k:t,f:!!n}:e:null);function iu(e,t=null,n=null,l=0,r=null,i=e===r0?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&io(t),ref:t&&ia(t),scopeId:ns,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:l,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ni};return o?(iy(a,n),128&i&&e.normalize(a)):n&&(a.shapeFlag|=P(n)?8:16),r9>0&&!s&&r8&&(a.patchFlag>0||6&i)&&32!==a.patchFlag&&r8.push(a),a}let ic=function(e,t=null,n=null,l=0,r=null,i=!1){var s;if(e&&e!==lC||(e=r2),ir(e)){let l=id(e,t,!0);return n&&iy(l,n),r9>0&&!i&&r8&&(6&l.shapeFlag?r8[r8.indexOf(e)]=l:r8.push(l)),l.patchFlag=-2,l}if(O(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=ip(t);e&&!P(e)&&(t.class=es(e)),I(n)&&(tb(n)&&!k(n)&&(n=C({},n)),t.style=en(n))}let o=P(e)?1:rz(e)?128:ng(e)?64:I(e)?4:O(e)?2:0;return iu(e,t,n,l,r,o,i,!0)};function ip(e){return e?tb(e)||rs(e)?C({},e):e:null}function id(e,t,n=!1,l=!1){let{props:r,ref:i,patchFlag:s,children:o,transition:a}=e,u=t?ib(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&io(u),ref:t&&t.ref?n&&i?k(i)?i.concat(ia(t)):[i,ia(t)]:ia(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==r0?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&id(e.ssContent),ssFallback:e.ssFallback&&id(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&l&&nV(c,a.clone(c)),c}function ih(e=" ",t=0){return ic(r1,null,e,t)}function ig(e,t){let n=ic(r6,null,e);return n.staticCount=t,n}function iv(e="",t=!1){return t?(r3(),il(r2,null,e)):ic(r2,null,e)}function im(e){return null==e||"boolean"==typeof e?ic(r2):k(e)?ic(r0,null,e.slice()):ir(e)?i_(e):ic(r1,null,String(e))}function i_(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:id(e)}function iy(e,t){let n=0,{shapeFlag:l}=e;if(null==t)t=null;else if(k(t))n=16;else if("object"==typeof t){if(65&l){let n=t.default;n&&(n._c&&(n._d=!1),iy(e,n()),n._c&&(n._d=!0));return}{n=32;let l=t._;l||rs(t)?3===l&&ni&&(1===ni.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=ni}}else O(t)?(t={default:t,_ctx:ni},n=32):(t=String(t),64&l?(n=16,t=[ih(t)]):n=8);e.children=t,e.shapeFlag|=n}function ib(...e){let t={};for(let n=0;n<e.length;n++){let l=e[n];for(let e in l)if("class"===e)t.class!==l.class&&(t.class=es([t.class,l.class]));else if("style"===e)t.style=en([t.style,l.style]);else if(b(e)){let n=t[e],r=l[e];r&&n!==r&&!(k(n)&&n.includes(r))&&(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=l[e])}return t}function iS(e,t,n,l=null){tQ(e,t,7,[n,l])}let iC=l9(),ix=0;function iE(e,t,n){let l=e.type,r=(t?t.appContext:e.appContext)||iC,i={uid:ix++,vnode:e,type:l,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new eg(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:function e(t,n,l=!1){let r=l?ru:n.propsCache,i=r.get(t);if(i)return i;let s=t.props,o={},a=[],u=!1;if(!O(t)){let r=t=>{u=!0;let[l,r]=e(t,n,!0);C(o,l),r&&a.push(...r)};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}if(!s&&!u)return I(t)&&r.set(t,m),m;if(k(s))for(let e=0;e<s.length;e++){let t=W(s[e]);rc(t)&&(o[t]=g)}else if(s)for(let e in s){let t=W(e);if(rc(t)){let n=s[e],l=o[t]=k(n)||O(n)?{type:n}:C({},n),r=l.type,i=!1,u=!0;if(k(r))for(let e=0;e<r.length;++e){let t=r[e],n=O(t)&&t.name;if("Boolean"===n){i=!0;break}"String"===n&&(u=!1)}else i=O(r)&&"Boolean"===r.name;l[0]=i,l[1]=u,(i||w(l,"default"))&&a.push(t)}}let c=[o,a];return I(t)&&r.set(t,c),c}(l,r),emitsOptions:function e(t,n,l=!1){let r=n.emitsCache,i=r.get(t);if(void 0!==i)return i;let s=t.emits,o={},a=!1;if(!O(t)){let r=t=>{let l=e(t,n,!0);l&&(a=!0,C(o,l))};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}return s||a?(k(s)?s.forEach(e=>o[e]=null):C(o,s),I(t)&&r.set(t,o),o):(I(t)&&r.set(t,null),null)}(l,r),emit:null,emitted:null,propsDefaults:g,inheritAttrs:l.inheritAttrs,ctx:g,data:g,props:g,attrs:g,slots:g,refs:g,setupState:g,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=rU.bind(null,i),e.ce&&e.ce(i),i}let iw=null,ik=()=>iw||ni;{let e=ee(),t=(t,n)=>{let l;return(l=e[t])||(l=e[t]=[]),l.push(n),e=>{l.length>1?l.forEach(t=>t(e)):l[0](e)}};o=t("__VUE_INSTANCE_SETTERS__",e=>iw=e),a=t("__VUE_SSR_SETTERS__",e=>iN=e)}let iT=e=>{let t=iw;return o(e),e.scope.on(),()=>{e.scope.off(),o(t)}},iA=()=>{iw&&iw.scope.off(),o(null)};function iR(e){return 4&e.vnode.shapeFlag}let iN=!1;function iO(e,t=!1,n=!1){t&&a(t);let{props:l,children:r}=e.vnode,i=iR(e);!function(e,t,n,l=!1){let r={},i=ri();for(let n in e.propsDefaults=Object.create(null),ro(e,t,r,i),e.propsOptions[0])n in r||(r[n]=void 0);n?e.props=l?r:td(r):e.type.props?e.props=r:e.props=i,e.attrs=i}(e,l,i,t),rm(e,r,n);let s=i?function(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lL);let{setup:l}=n;if(l){eM();let n=e.setupContext=l.length>1?iF(e):null,r=iT(e),i=tY(l,e,0,[e.props,n]),s=L(i);if(eI(),r(),(s||e.sp)&&!n5(e)&&n$(e),s){if(i.then(iA,iA),t)return i.then(n=>{iP(e,n,t)}).catch(t=>{t0(t,e,0)});e.asyncDep=i}else iP(e,i,t)}else iL(e,t)}(e,t):void 0;return t&&a(!1),s}function iP(e,t,n){O(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:I(t)&&(e.setupState=tI(t)),iL(e,n)}function iM(e){u=e,c=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,lD))}}let iI=()=>!u;function iL(e,t,n){let l=e.type;if(!e.render){if(!t&&u&&!l.render){let t=l.template||l0(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:i,compilerOptions:s}=l,o=C(C({isCustomElement:n,delimiters:i},r),s);l.render=u(t,o)}}e.render=l.render||_,c&&c(e)}{let t=iT(e);eM();try{!function(e){let t=l0(e),n=e.proxy,l=e.ctx;lY=!1,t.beforeCreate&&lQ(t.beforeCreate,e,"bc");let{data:r,computed:i,methods:s,watch:o,provide:a,inject:u,created:c,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:g,deactivated:m,beforeDestroy:y,beforeUnmount:b,destroyed:S,unmounted:C,render:x,renderTracked:E,renderTriggered:w,errorCaptured:T,serverPrefetch:A,expose:R,inheritAttrs:N,components:M,directives:L,filters:D}=t;if(u&&function(e,t,n=_){for(let n in k(e)&&(e=l4(e)),e){let l;let r=e[n];tw(l=I(r)?"default"in r?rn(r.from||n,r.default,!0):rn(r.from||n):rn(r))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e}):t[n]=l}}(u,l,null),s)for(let e in s){let t=s[e];O(t)&&(l[e]=t.bind(n))}if(r){let t=r.call(n,n);I(t)&&(e.data=tp(t))}if(lY=!0,i)for(let e in i){let t=i[e],r=O(t)?t.bind(n,n):O(t.get)?t.get.bind(n,n):_,s=ij({get:r,set:!O(t)&&O(t.set)?t.set.bind(n):_});Object.defineProperty(l,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,l,r){let i=r.includes(".")?rD(l,r):()=>l[r];if(P(t)){let e=n[t];O(e)&&rM(i,e)}else if(O(t))rM(i,t.bind(l));else if(I(t)){if(k(t))t.forEach(t=>e(t,n,l,r));else{let e=O(t.handler)?t.handler.bind(l):n[t.handler];O(e)&&rM(i,e,t)}}}(o[e],l,n,e);if(a){let e=O(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{rt(t,e[t])})}function F(e,t){k(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(c&&lQ(c,e,"c"),F(lc,f),F(lf,p),F(lp,d),F(ld,h),F(ll,g),F(lr,m),F(ly,T),F(l_,E),F(lm,w),F(lh,b),F(lg,C),F(lv,A),k(R)){if(R.length){let t=e.exposed||(e.exposed={});R.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}x&&e.render===_&&(e.render=x),null!=N&&(e.inheritAttrs=N),M&&(e.components=M),L&&(e.directives=L),A&&n$(e)}(e)}finally{eI(),t()}}}let iD={get:(e,t)=>(eH(e,"get",""),e[t])};function iF(e){return{attrs:new Proxy(e.attrs,iD),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function iV(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tI(tC(e.exposed)),{get:(t,n)=>n in t?t[n]:n in lM?lM[n](e):void 0,has:(e,t)=>t in e||t in lM})):e.proxy}function iU(e,t=!0){return O(e)?e.displayName||e.name:e.name||t&&e.__name}let ij=(e,t)=>(function(e,t,n=!1){let l,r;return O(e)?l=e:(l=e.get,r=e.set),new t$(l,r,n)})(e,0,iN);function iB(e,t,n){let l=arguments.length;return 2!==l?(l>3?n=Array.prototype.slice.call(arguments,2):3===l&&ir(n)&&(n=[n]),ic(e,t,n)):!I(t)||k(t)?ic(e,null,t):ir(t)?ic(e,null,[t]):ic(e,t)}function i$(){}function iH(e,t,n,l){let r=n[l];if(r&&iW(r,e))return r;let i=t();return i.memo=e.slice(),i.cacheIndex=l,n[l]=i}function iW(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e<n.length;e++)if(J(n[e],t[e]))return!1;return r9>0&&r8&&r8.push(e),!0}let iK="3.5.13",iz=_,iq=null,iG=void 0,iJ=_,iX={createComponentInstance:iE,setupComponent:iO,renderComponentRoot:rB,setCurrentRenderingInstance:no,isVNode:ir,normalizeVNode:im,getComponentPublicInstance:iV,ensureValidVNode:lN,pushWarningContext:function(e){},popWarningContext:function(){}},iZ=null,iY=null,iQ=null,i0="undefined"!=typeof window&&window.trustedTypes;if(i0)try{d=i0.createPolicy("vue",{createHTML:e=>e})}catch(e){}let i1=d?e=>d.createHTML(e):e=>e,i2="undefined"!=typeof document?document:null,i6=i2&&i2.createElement("template"),i4="transition",i8="animation",i3=Symbol("_vtc"),i5={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},i9=C({},nN,i5),i7=((e=(e,{slots:t})=>iB(nM,sn(e),t)).displayName="Transition",e.props=i9,e),se=(e,t=[])=>{k(e)?e.forEach(e=>e(...t)):e&&e(...t)},st=e=>!!e&&(k(e)?e.some(e=>e.length>1):e.length>1);function sn(e){let t={};for(let n in e)n in i5||(t[n]=e[n]);if(!1===e.css)return t;let{name:n="v",type:l,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:a=i,appearActiveClass:u=s,appearToClass:c=o,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(I(e))return[Q(e.enter),Q(e.leave)];{let t=Q(e);return[t,t]}}(r),g=h&&h[0],m=h&&h[1],{onBeforeEnter:_,onEnter:y,onEnterCancelled:b,onLeave:S,onLeaveCancelled:x,onBeforeAppear:E=_,onAppear:w=y,onAppearCancelled:k=b}=t,T=(e,t,n,l)=>{e._enterCancelled=l,sr(e,t?c:o),sr(e,t?u:s),n&&n()},A=(e,t)=>{e._isLeaving=!1,sr(e,f),sr(e,d),sr(e,p),t&&t()},R=e=>(t,n)=>{let r=e?w:y,s=()=>T(t,e,n);se(r,[t,s]),si(()=>{sr(t,e?a:i),sl(t,e?c:o),st(r)||so(t,l,g,s)})};return C(t,{onBeforeEnter(e){se(_,[e]),sl(e,i),sl(e,s)},onBeforeAppear(e){se(E,[e]),sl(e,a),sl(e,u)},onEnter:R(!1),onAppear:R(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>A(e,t);sl(e,f),e._enterCancelled?(sl(e,p),sf()):(sf(),sl(e,p)),si(()=>{e._isLeaving&&(sr(e,f),sl(e,d),st(S)||so(e,l,m,n))}),se(S,[e,n])},onEnterCancelled(e){T(e,!1,void 0,!0),se(b,[e])},onAppearCancelled(e){T(e,!0,void 0,!0),se(k,[e])},onLeaveCancelled(e){A(e),se(x,[e])}})}function sl(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[i3]||(e[i3]=new Set)).add(t)}function sr(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[i3];n&&(n.delete(t),n.size||(e[i3]=void 0))}function si(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ss=0;function so(e,t,n,l){let r=e._endId=++ss,i=()=>{r===e._endId&&l()};if(null!=n)return setTimeout(i,n);let{type:s,timeout:o,propCount:a}=sa(e,t);if(!s)return l();let u=s+"end",c=0,f=()=>{e.removeEventListener(u,p),i()},p=t=>{t.target===e&&++c>=a&&f()};setTimeout(()=>{c<a&&f()},o+1),e.addEventListener(u,p)}function sa(e,t){let n=window.getComputedStyle(e),l=e=>(n[e]||"").split(", "),r=l(`${i4}Delay`),i=l(`${i4}Duration`),s=su(r,i),o=l(`${i8}Delay`),a=l(`${i8}Duration`),u=su(o,a),c=null,f=0,p=0;t===i4?s>0&&(c=i4,f=s,p=i.length):t===i8?u>0&&(c=i8,f=u,p=a.length):p=(c=(f=Math.max(s,u))>0?s>u?i4:i8:null)?c===i4?i.length:a.length:0;let d=c===i4&&/\b(transform|all)(,|$)/.test(l(`${i4}Property`).toString());return{type:c,timeout:f,propCount:p,hasTransform:d}}function su(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>sc(t)+sc(e[n])))}function sc(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function sf(){return document.body.offsetHeight}let sp=Symbol("_vod"),sd=Symbol("_vsh"),sh={beforeMount(e,{value:t},{transition:n}){e[sp]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):sg(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:l}){!t!=!n&&(l?t?(l.beforeEnter(e),sg(e,!0),l.enter(e)):l.leave(e,()=>{sg(e,!1)}):sg(e,t))},beforeUnmount(e,{value:t}){sg(e,t)}};function sg(e,t){e.style.display=t?e[sp]:"none",e[sd]=!t}let sv=Symbol("");function sm(e){let t=ik();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>s_(e,n))},l=()=>{let l=e(t.proxy);t.ce?s_(t.ce,l):function e(t,n){if(128&t.shapeFlag){let l=t.suspense;t=l.activeBranch,l.pendingBranch&&!l.isHydrating&&l.effects.push(()=>{e(l.activeBranch,n)})}for(;t.component;)t=t.component.subTree;if(1&t.shapeFlag&&t.el)s_(t.el,n);else if(t.type===r0)t.children.forEach(t=>e(t,n));else if(t.type===r6){let{el:e,anchor:l}=t;for(;e&&(s_(e,n),e!==l);)e=e.nextSibling}}(t.subTree,l),n(l)};lp(()=>{nt(l)}),lf(()=>{rM(l,_,{flush:"post"});let e=new MutationObserver(l);e.observe(t.subTree.el.parentNode,{childList:!0}),lg(()=>e.disconnect())})}function s_(e,t){if(1===e.nodeType){let n=e.style,l="";for(let e in t)n.setProperty(`--${e}`,t[e]),l+=`--${e}: ${t[e]};`;n[sv]=l}}let sy=/(^|;)\s*display\s*:/,sb=/\s*!important$/;function sS(e,t,n){if(k(n))n.forEach(n=>sS(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let l=function(e,t){let n=sx[t];if(n)return n;let l=W(t);if("filter"!==l&&l in e)return sx[t]=l;l=q(l);for(let n=0;n<sC.length;n++){let r=sC[n]+l;if(r in e)return sx[t]=r}return t}(e,t);sb.test(n)?e.setProperty(z(l),n.replace(sb,""),"important"):e[l]=n}}let sC=["Webkit","Moz","ms"],sx={},sE="http://www.w3.org/1999/xlink";function sw(e,t,n,l,r,i=ea(t)){l&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(sE,t.slice(6,t.length)):e.setAttributeNS(sE,t,n):null==n||i&&!(n||""===n)?e.removeAttribute(t):e.setAttribute(t,i?"":M(n)?String(n):n)}function sk(e,t,n,l,r){if("innerHTML"===t||"textContent"===t){null!=n&&(e[t]="innerHTML"===t?i1(n):n);return}let i=e.tagName;if("value"===t&&"PROGRESS"!==i&&!i.includes("-")){let l="OPTION"===i?e.getAttribute("value")||"":e.value,r=null==n?"checkbox"===e.type?"on":"":String(n);l===r&&"_value"in e||(e.value=r),null==n&&e.removeAttribute(t),e._value=n;return}let s=!1;if(""===n||null==n){let l=typeof e[t];if("boolean"===l){var o;n=!!(o=n)||""===o}else null==n&&"string"===l?(n="",s=!0):"number"===l&&(n=0,s=!0)}try{e[t]=n}catch(e){}s&&e.removeAttribute(r||t)}function sT(e,t,n,l){e.addEventListener(t,n,l)}let sA=Symbol("_vei"),sR=/(?:Once|Passive|Capture)$/,sN=0,sO=Promise.resolve(),sP=()=>sN||(sO.then(()=>sN=0),sN=Date.now()),sM=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2),sI={};function sL(e,t,n){let l=nj(e,t);U(l)&&C(l,t);class r extends sV{constructor(e){super(l,e,n)}}return r.def=l,r}let sD=(e,t)=>sL(e,t,op),sF="undefined"!=typeof HTMLElement?HTMLElement:class{};class sV extends sF{constructor(e,t={},n=of){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==of?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof sV){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,t9(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(e=>{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{let n;this._resolved=!0,this._pendingResolve=void 0;let{props:l,styles:r}=e;if(l&&!k(l))for(let e in l){let t=l[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=Q(this._props[e])),(n||(n=Object.create(null)))[W(e)]=!0)}this._numberProps=n,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)w(this,e)||Object.defineProperty(this,e,{get:()=>tO(t[e])})}_resolveProps(e){let{props:t}=e,n=k(t)?t:Object.keys(t||{});for(let e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(W))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):sI,l=W(e);t&&this._numberProps&&this._numberProps[l]&&(n=Q(n)),this._setProp(l,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,l=!1){if(t!==this._props[e]&&(t===sI?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),l&&this._instance&&this._update(),n)){let n=this._ob;n&&n.disconnect(),!0===t?this.setAttribute(z(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(z(e),t+""):t||this.removeAttribute(z(e)),n&&n.observe(this,{attributes:!0})}}_update(){ou(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=ic(this._def,C(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,U(t[0])?C({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),z(e)!==e&&t(z(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let l=document.createElement("style");n&&l.setAttribute("nonce",n),l.textContent=e[t],this.shadowRoot.prepend(l)}}_parseSlots(){let e;let t=this._slots={};for(;e=this.firstChild;){let n=1===e.nodeType&&e.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(e),this.removeChild(e)}}_renderSlots(){let e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let l=e[n],r=l.getAttribute("name")||"default",i=this._slots[r],s=l.parentNode;if(i)for(let e of i){if(t&&1===e.nodeType){let n;let l=t+"-s",r=document.createTreeWalker(e,1);for(e.setAttribute(l,"");n=r.nextNode();)n.setAttribute(l,"")}s.insertBefore(e,l)}else for(;l.firstChild;)s.insertBefore(l.firstChild,l);s.removeChild(l)}}_injectChildStyle(e){this._applyStyles(e.styles,e)}_removeChildStyle(e){}}function sU(e){let t=ik();return t&&t.ce||null}function sj(){let e=sU();return e&&e.shadowRoot}function sB(e="$style"){{let t=ik();if(!t)return g;let n=t.type.__cssModules;return n&&n[e]||g}}let s$=new WeakMap,sH=new WeakMap,sW=Symbol("_moveCb"),sK=Symbol("_enterCb"),sz=(t={name:"TransitionGroup",props:C({},i9,{tag:String,moveClass:String}),setup(e,{slots:t}){let n,l;let r=ik(),i=nA();return ld(()=>{if(!n.length)return;let t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){let l=e.cloneNode(),r=e[i3];r&&r.forEach(e=>{e.split(/\s+/).forEach(e=>e&&l.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&l.classList.add(e)),l.style.display="none";let i=1===t.nodeType?t:t.parentNode;i.appendChild(l);let{hasTransform:s}=sa(l);return i.removeChild(l),s}(n[0].el,r.vnode.el,t))return;n.forEach(sq),n.forEach(sG);let l=n.filter(sJ);sf(),l.forEach(e=>{let n=e.el,l=n.style;sl(n,t),l.transform=l.webkitTransform=l.transitionDuration="";let r=n[sW]=e=>{(!e||e.target===n)&&(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener("transitionend",r),n[sW]=null,sr(n,t))};n.addEventListener("transitionend",r)})}),()=>{let s=tS(e),o=sn(s),a=s.tag||r0;if(n=[],l)for(let e=0;e<l.length;e++){let t=l[e];t.el&&t.el instanceof Element&&(n.push(t),nV(t,nL(t,o,i,r)),s$.set(t,t.el.getBoundingClientRect()))}l=t.default?nU(t.default()):[];for(let e=0;e<l.length;e++){let t=l[e];null!=t.key&&nV(t,nL(t,o,i,r))}return ic(a,null,l)}}},delete t.props.mode,t);function sq(e){let t=e.el;t[sW]&&t[sW](),t[sK]&&t[sK]()}function sG(e){sH.set(e,e.el.getBoundingClientRect())}function sJ(e){let t=s$.get(e),n=sH.get(e),l=t.left-n.left,r=t.top-n.top;if(l||r){let t=e.el.style;return t.transform=t.webkitTransform=`translate(${l}px,${r}px)`,t.transitionDuration="0s",e}}let sX=e=>{let t=e.props["onUpdate:modelValue"]||!1;return k(t)?e=>X(t,e):t};function sZ(e){e.target.composing=!0}function sY(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let sQ=Symbol("_assign"),s0={created(e,{modifiers:{lazy:t,trim:n,number:l}},r){e[sQ]=sX(r);let i=l||r.props&&"number"===r.props.type;sT(e,t?"change":"input",t=>{if(t.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=Y(l)),e[sQ](l)}),n&&sT(e,"change",()=>{e.value=e.value.trim()}),t||(sT(e,"compositionstart",sZ),sT(e,"compositionend",sY),sT(e,"change",sY))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:l,trim:r,number:i}},s){if(e[sQ]=sX(s),e.composing)return;let o=(i||"number"===e.type)&&!/^0\d/.test(e.value)?Y(e.value):e.value,a=null==t?"":t;o===a||document.activeElement===e&&"range"!==e.type&&(l&&t===n||r&&e.value.trim()===a)||(e.value=a)}},s1={deep:!0,created(e,t,n){e[sQ]=sX(n),sT(e,"change",()=>{let t=e._modelValue,n=s3(e),l=e.checked,r=e[sQ];if(k(t)){let e=ec(t,n),i=-1!==e;if(l&&!i)r(t.concat(n));else if(!l&&i){let n=[...t];n.splice(e,1),r(n)}}else if(A(t)){let e=new Set(t);l?e.add(n):e.delete(n),r(e)}else r(s5(e,l))})},mounted:s2,beforeUpdate(e,t,n){e[sQ]=sX(n),s2(e,t,n)}};function s2(e,{value:t,oldValue:n},l){let r;if(e._modelValue=t,k(t))r=ec(t,l.props.value)>-1;else if(A(t))r=t.has(l.props.value);else{if(t===n)return;r=eu(t,s5(e,!0))}e.checked!==r&&(e.checked=r)}let s6={created(e,{value:t},n){e.checked=eu(t,n.props.value),e[sQ]=sX(n),sT(e,"change",()=>{e[sQ](s3(e))})},beforeUpdate(e,{value:t,oldValue:n},l){e[sQ]=sX(l),t!==n&&(e.checked=eu(t,l.props.value))}},s4={deep:!0,created(e,{value:t,modifiers:{number:n}},l){let r=A(t);sT(e,"change",()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Y(s3(e)):s3(e));e[sQ](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,t9(()=>{e._assigning=!1})}),e[sQ]=sX(l)},mounted(e,{value:t}){s8(e,t)},beforeUpdate(e,t,n){e[sQ]=sX(n)},updated(e,{value:t}){e._assigning||s8(e,t)}};function s8(e,t){let n=e.multiple,l=k(t);if(!n||l||A(t)){for(let r=0,i=e.options.length;r<i;r++){let i=e.options[r],s=s3(i);if(n){if(l){let e=typeof s;"string"===e||"number"===e?i.selected=t.some(e=>String(e)===String(s)):i.selected=ec(t,s)>-1}else i.selected=t.has(s)}else if(eu(s3(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function s3(e){return"_value"in e?e._value:e.value}function s5(e,t){let n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}let s9={created(e,t,n){oe(e,t,n,null,"created")},mounted(e,t,n){oe(e,t,n,null,"mounted")},beforeUpdate(e,t,n,l){oe(e,t,n,l,"beforeUpdate")},updated(e,t,n,l){oe(e,t,n,l,"updated")}};function s7(e,t){switch(e){case"SELECT":return s4;case"TEXTAREA":return s0;default:switch(t){case"checkbox":return s1;case"radio":return s6;default:return s0}}}function oe(e,t,n,l,r){let i=s7(e.tagName,n.props&&n.props.type)[r];i&&i(e,t,n,l)}let ot=["ctrl","shift","alt","meta"],on={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>ot.some(n=>e[`${n}Key`]&&!t.includes(n))},ol=(e,t)=>{let n=e._withMods||(e._withMods={}),l=t.join(".");return n[l]||(n[l]=(n,...l)=>{for(let e=0;e<t.length;e++){let l=on[t[e]];if(l&&l(n,t))return}return e(n,...l)})},or={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},oi=(e,t)=>{let n=e._withKeys||(e._withKeys={}),l=t.join(".");return n[l]||(n[l]=n=>{if(!("key"in n))return;let l=z(n.key);if(t.some(e=>e===l||or[e]===l))return e(n)})},os=C({patchProp:(e,t,n,l,r,i)=>{let s="svg"===r;"class"===t?function(e,t,n){let l=e[i3];l&&(t=(t?[t,...l]:[...l]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,l,s):"style"===t?function(e,t,n){let l=e.style,r=P(n),i=!1;if(n&&!r){if(t){if(P(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&sS(l,t,"")}else for(let e in t)null==n[e]&&sS(l,e,"")}for(let e in n)"display"===e&&(i=!0),sS(l,e,n[e])}else if(r){if(t!==n){let e=l[sv];e&&(n+=";"+e),l.cssText=n,i=sy.test(n)}}else t&&e.removeAttribute("style");sp in e&&(e[sp]=i?l.display:"",e[sd]&&(l.display="none"))}(e,n,l):b(t)?S(t)||function(e,t,n,l,r=null){let i=e[sA]||(e[sA]={}),s=i[t];if(l&&s)s.value=l;else{let[n,o]=function(e){let t;if(sR.test(e)){let n;for(t={};n=e.match(sR);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):z(e.slice(2)),t]}(t);l?sT(e,n,i[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();tQ(function(e,t){if(!k(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=sP(),n}(l,r),o):s&&(!function(e,t,n,l){e.removeEventListener(t,n,l)}(e,n,s,o),i[t]=void 0)}}(e,t,0,l,i):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,l){if(l)return!!("innerHTML"===t||"textContent"===t||t in e&&sM(t)&&O(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(sM(t)&&P(n))&&t in e}(e,t,l,s))?e._isVueCE&&(/[A-Z]/.test(t)||!P(l))?sk(e,W(t),l,i,t):("true-value"===t?e._trueValue=l:"false-value"===t&&(e._falseValue=l),sw(e,t,l,s)):(sk(e,t,l),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||sw(e,t,l,s,i,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,l)=>{let r="svg"===t?i2.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?i2.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?i2.createElement(e,{is:n}):i2.createElement(e);return"select"===e&&l&&null!=l.multiple&&r.setAttribute("multiple",l.multiple),r},createText:e=>i2.createTextNode(e),createComment:e=>i2.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>i2.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,l,r,i){let s=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==i&&(r=r.nextSibling););else{i6.innerHTML=i1("svg"===l?`<svg>${e}</svg>`:"mathml"===l?`<math>${e}</math>`:e);let r=i6.content;if("svg"===l||"mathml"===l){let e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),oo=!1;function oa(){return f=oo?f:rS(os),oo=!0,f}let ou=(...e)=>{(f||(f=rb(os))).render(...e)},oc=(...e)=>{oa().hydrate(...e)},of=(...e)=>{let t=(f||(f=rb(os))).createApp(...e),{mount:n}=t;return t.mount=e=>{let l=oh(e);if(!l)return;let r=t._component;O(r)||r.render||r.template||(r.template=l.innerHTML),1===l.nodeType&&(l.textContent="");let i=n(l,!1,od(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),i},t},op=(...e)=>{let t=oa().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=oh(e);if(t)return n(t,!0,od(t))},t};function od(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function oh(e){return P(e)?document.querySelector(e):e}let og=!1,ov=()=>{og||(og=!0,s0.getSSRProps=({value:e})=>({value:e}),s6.getSSRProps=({value:e},t)=>{if(t.props&&eu(t.props.value,e))return{checked:!0}},s1.getSSRProps=({value:e},t)=>{if(k(e)){if(t.props&&ec(e,t.props.value)>-1)return{checked:!0}}else if(A(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},s9.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;let n=s7(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)},sh.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})};export{nM as BaseTransition,nN as BaseTransitionPropsValidators,r2 as Comment,iQ as DeprecationTypes,eg as EffectScope,tZ as ErrorCodes,iq as ErrorTypeStrings,r0 as Fragment,lt as KeepAlive,eb as ReactiveEffect,r6 as Static,rG as Suspense,nx as Teleport,r1 as Text,tH as TrackOpTypes,i7 as Transition,sz as TransitionGroup,tW as TriggerOpTypes,sV as VueElement,tX as assertNumber,tQ as callWithAsyncErrorHandling,tY as callWithErrorHandling,W as camelize,q as capitalize,id as cloneVNode,iY as compatUtils,ij as computed,of as createApp,il as createBlock,iv as createCommentVNode,it as createElementBlock,iu as createElementVNode,rS as createHydrationRenderer,lX as createPropsRestProxy,rb as createRenderer,op as createSSRApp,lA as createSlots,ig as createStaticVNode,ih as createTextVNode,ic as createVNode,tD as customRef,n9 as defineAsyncComponent,nj as defineComponent,sL as defineCustomElement,lV as defineEmits,lU as defineExpose,l$ as defineModel,lj as defineOptions,lF as defineProps,sD as defineSSRCustomElement,lB as defineSlots,iG as devtools,eR as effect,ev as effectScope,ik as getCurrentInstance,em as getCurrentScope,tq as getCurrentWatcher,nU as getTransitionRawChildren,ip as guardReactiveProps,iB as h,t0 as handleError,rl as hasInjectionContext,oc as hydrate,n6 as hydrateOnIdle,n3 as hydrateOnInteraction,n8 as hydrateOnMediaQuery,n4 as hydrateOnVisible,i$ as initCustomFormatter,ov as initDirectivesForSSR,rn as inject,iW as isMemoSame,tb as isProxy,tm as isReactive,t_ as isReadonly,tw as isRef,iI as isRuntimeOnly,ty as isShallow,ir as isVNode,tC as markRaw,lG as mergeDefaults,lJ as mergeModels,ib as mergeProps,t9 as nextTick,es as normalizeClass,eo as normalizeProps,en as normalizeStyle,ll as onActivated,lc as onBeforeMount,lh as onBeforeUnmount,lp as onBeforeUpdate,lr as onDeactivated,ly as onErrorCaptured,lf as onMounted,l_ as onRenderTracked,lm as onRenderTriggered,e_ as onScopeDispose,lv as onServerPrefetch,lg as onUnmounted,ld as onUpdated,tG as onWatcherCleanup,r3 as openBlock,nu as popScopeId,rt as provide,tI as proxyRefs,na as pushScopeId,nt as queuePostFlushCb,tp as reactive,th as readonly,tk as ref,iM as registerRuntimeCompiler,ou as render,lT as renderList,lR as renderSlot,lS as resolveComponent,lE as resolveDirective,lx as resolveDynamicComponent,iZ as resolveFilter,nL as resolveTransitionHooks,r7 as setBlockTracking,iJ as setDevtoolsHook,nV as setTransitionHooks,td as shallowReactive,tg as shallowReadonly,tT as shallowRef,rA as ssrContextKey,iX as ssrUtils,eN as stop,ep as toDisplayString,G as toHandlerKey,lO as toHandlers,tS as toRaw,tj as toRef,tF as toRefs,tP as toValue,is as transformVNodeArgs,tN as triggerRef,tO as unref,lK as useAttrs,sB as useCssModule,sm as useCssVars,sU as useHost,nB as useId,rF as useModel,rR as useSSRContext,sj as useShadowRoot,lW as useSlots,nH as useTemplateRef,nA as useTransitionState,s1 as vModelCheckbox,s9 as vModelDynamic,s6 as vModelRadio,s4 as vModelSelect,s0 as vModelText,sh as vShow,iK as version,iz as warn,rM as watch,rN as watchEffect,rO as watchPostEffect,rP as watchSyncEffect,lZ as withAsyncContext,nf as withCtx,lH as withDefaults,np as withDirectives,oi as withKeys,iH as withMemo,ol as withModifiers,nc as withScopeId}; diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js deleted file mode 100644 index ffdd0b2..0000000 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +++ /dev/null @@ -1,1860 +0,0 @@ -/** -* @vue/runtime-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -import { warn, h, BaseTransition, assertNumber, BaseTransitionPropsValidators, getCurrentInstance, onBeforeUpdate, queuePostFlushCb, onMounted, watch, onUnmounted, Fragment, Static, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, unref, createVNode, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, Text, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@vue/runtime-core'; -export * from '@vue/runtime-core'; -import { extend, isObject, toNumber, isArray, NOOP, isString, hyphenate, capitalize, includeBooleanAttr, isSymbol, isSpecialBooleanAttr, isFunction, isOn, isModelListener, camelize as camelize$1, isPlainObject, hasOwn, EMPTY_OBJ, looseToNumber, looseIndexOf, isSet, looseEqual, invokeArrayFns, isHTMLTag, isSVGTag, isMathMLTag } from '@vue/shared'; - -let policy = void 0; -const tt = typeof window !== "undefined" && window.trustedTypes; -if (tt) { - try { - policy = /* @__PURE__ */ tt.createPolicy("vue", { - createHTML: (val) => val - }); - } catch (e) { - !!(process.env.NODE_ENV !== "production") && warn(`Error creating trusted types policy: ${e}`); - } -} -const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; -const svgNS = "http://www.w3.org/2000/svg"; -const mathmlNS = "http://www.w3.org/1998/Math/MathML"; -const doc = typeof document !== "undefined" ? document : null; -const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); -const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: (child) => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, namespace, is, props) => { - const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); - if (tag === "select" && props && props.multiple != null) { - el.setAttribute("multiple", props.multiple); - } - return el; - }, - createText: (text) => doc.createTextNode(text), - createComment: (text) => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: (node) => node.parentNode, - nextSibling: (node) => node.nextSibling, - querySelector: (selector) => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ""); - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, namespace, start, end) { - const before = anchor ? anchor.previousSibling : parent.lastChild; - if (start && (start === end || start.nextSibling)) { - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) break; - } - } else { - templateContainer.innerHTML = unsafeToTrustedHTML( - namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content - ); - const template = templateContainer.content; - if (namespace === "svg" || namespace === "mathml") { - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; - } -}; - -const TRANSITION = "transition"; -const ANIMATION = "animation"; -const vtcKey = Symbol("_vtc"); -const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String -}; -const TransitionPropsValidators = /* @__PURE__ */ extend( - {}, - BaseTransitionPropsValidators, - DOMTransitionPropsValidators -); -const decorate$1 = (t) => { - t.displayName = "Transition"; - t.props = TransitionPropsValidators; - return t; -}; -const Transition = /* @__PURE__ */ decorate$1( - (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots) -); -const callHook = (hook, args = []) => { - if (isArray(hook)) { - hook.forEach((h2) => h2(...args)); - } else if (hook) { - hook(...args); - } -}; -const hasExplicitCallback = (hook) => { - return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; -}; -function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; - } - } - if (rawProps.css === false) { - return baseProps; - } - const { - name = "v", - type, - duration, - enterFromClass = `${name}-enter-from`, - enterActiveClass = `${name}-enter-active`, - enterToClass = `${name}-enter-to`, - appearFromClass = enterFromClass, - appearActiveClass = enterActiveClass, - appearToClass = enterToClass, - leaveFromClass = `${name}-leave-from`, - leaveActiveClass = `${name}-leave-active`, - leaveToClass = `${name}-leave-to` - } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { - onBeforeEnter, - onEnter, - onEnterCancelled, - onLeave, - onLeaveCancelled, - onBeforeAppear = onBeforeEnter, - onAppear = onEnter, - onAppearCancelled = onEnterCancelled - } = baseProps; - const finishEnter = (el, isAppear, done, isCancelled) => { - el._enterCancelled = isCancelled; - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); - }; - const finishLeave = (el, done) => { - el._isLeaving = false; - removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return extend(baseProps, { - onBeforeEnter(el) { - callHook(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - if (!el._enterCancelled) { - forceReflow(); - addTransitionClass(el, leaveActiveClass); - } else { - addTransitionClass(el, leaveActiveClass); - forceReflow(); - } - nextFrame(() => { - if (!el._isLeaving) { - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false, void 0, true); - callHook(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true, void 0, true); - callHook(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook(onLeaveCancelled, [el]); - } - }); -} -function normalizeDuration(duration) { - if (duration == null) { - return null; - } else if (isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } else { - const n = NumberOf(duration); - return [n, n]; - } -} -function NumberOf(val) { - const res = toNumber(val); - if (!!(process.env.NODE_ENV !== "production")) { - assertNumber(res, "<transition> explicit duration"); - } - return res; -} -function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); - (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); -} -function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); - const _vtc = el[vtcKey]; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el[vtcKey] = void 0; - } - } -} -function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); -} -let endId = 0; -function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = el._endId = ++endId; - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout != null) { - return setTimeout(resolveIfNotStale, explicitTimeout); - } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); - } - const endEvent = type + "end"; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); -} -function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - const getStyleProperties = (key) => (styles[key] || "").split(", "); - const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); - const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(`${ANIMATION}Delay`); - const animationDurations = getStyleProperties(`${ANIMATION}Duration`); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } - } else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } - } else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; - propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; - } - const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( - getStyleProperties(`${TRANSITION}Property`).toString() - ); - return { - type, - timeout, - propCount, - hasTransform - }; -} -function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); -} -function toMs(s) { - if (s === "auto") return 0; - return Number(s.slice(0, -1).replace(",", ".")) * 1e3; -} -function forceReflow() { - return document.body.offsetHeight; -} - -function patchClass(el, value, isSVG) { - const transitionClasses = el[vtcKey]; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); - } - if (value == null) { - el.removeAttribute("class"); - } else if (isSVG) { - el.setAttribute("class", value); - } else { - el.className = value; - } -} - -const vShowOriginalDisplay = Symbol("_vod"); -const vShowHidden = Symbol("_vsh"); -const vShow = { - beforeMount(el, { value }, { transition }) { - el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); - } -}; -if (!!(process.env.NODE_ENV !== "production")) { - vShow.name = "show"; -} -function setDisplay(el, value) { - el.style.display = value ? el[vShowOriginalDisplay] : "none"; - el[vShowHidden] = !value; -} -function initVShowForSSR() { - vShow.getSSRProps = ({ value }) => { - if (!value) { - return { style: { display: "none" } }; - } - }; -} - -const CSS_VAR_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? "CSS_VAR_TEXT" : ""); -function useCssVars(getter) { - const instance = getCurrentInstance(); - if (!instance) { - !!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`); - return; - } - const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { - Array.from( - document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) - ).forEach((node) => setVarsOnNode(node, vars)); - }; - if (!!(process.env.NODE_ENV !== "production")) { - instance.getCssVars = () => getter(instance.proxy); - } - const setVars = () => { - const vars = getter(instance.proxy); - if (instance.ce) { - setVarsOnNode(instance.ce, vars); - } else { - setVarsOnVNode(instance.subTree, vars); - } - updateTeleports(vars); - }; - onBeforeUpdate(() => { - queuePostFlushCb(setVars); - }); - onMounted(() => { - watch(setVars, NOOP, { flush: "post" }); - const ob = new MutationObserver(setVars); - ob.observe(instance.subTree.el.parentNode, { childList: true }); - onUnmounted(() => ob.disconnect()); - }); -} -function setVarsOnVNode(vnode, vars) { - if (vnode.shapeFlag & 128) { - const suspense = vnode.suspense; - vnode = suspense.activeBranch; - if (suspense.pendingBranch && !suspense.isHydrating) { - suspense.effects.push(() => { - setVarsOnVNode(suspense.activeBranch, vars); - }); - } - } - while (vnode.component) { - vnode = vnode.component.subTree; - } - if (vnode.shapeFlag & 1 && vnode.el) { - setVarsOnNode(vnode.el, vars); - } else if (vnode.type === Fragment) { - vnode.children.forEach((c) => setVarsOnVNode(c, vars)); - } else if (vnode.type === Static) { - let { el, anchor } = vnode; - while (el) { - setVarsOnNode(el, vars); - if (el === anchor) break; - el = el.nextSibling; - } - } -} -function setVarsOnNode(el, vars) { - if (el.nodeType === 1) { - const style = el.style; - let cssText = ""; - for (const key in vars) { - style.setProperty(`--${key}`, vars[key]); - cssText += `--${key}: ${vars[key]};`; - } - style[CSS_VAR_TEXT] = cssText; - } -} - -const displayRE = /(^|;)\s*display\s*:/; -function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = isString(next); - let hasControlledDisplay = false; - if (next && !isCssString) { - if (prev) { - if (!isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ""); - } - } - } else { - for (const prevStyle of prev.split(";")) { - const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); - if (next[key] == null) { - setStyle(style, key, ""); - } - } - } - } - for (const key in next) { - if (key === "display") { - hasControlledDisplay = true; - } - setStyle(style, key, next[key]); - } - } else { - if (isCssString) { - if (prev !== next) { - const cssVarText = style[CSS_VAR_TEXT]; - if (cssVarText) { - next += ";" + cssVarText; - } - style.cssText = next; - hasControlledDisplay = displayRE.test(next); - } - } else if (prev) { - el.removeAttribute("style"); - } - } - if (vShowOriginalDisplay in el) { - el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; - if (el[vShowHidden]) { - style.display = "none"; - } - } -} -const semicolonRE = /[^\\];\s*$/; -const importantRE = /\s*!important$/; -function setStyle(style, name, val) { - if (isArray(val)) { - val.forEach((v) => setStyle(style, name, v)); - } else { - if (val == null) val = ""; - if (!!(process.env.NODE_ENV !== "production")) { - if (semicolonRE.test(val)) { - warn( - `Unexpected semicolon at the end of '${name}' style value: '${val}'` - ); - } - } - if (name.startsWith("--")) { - style.setProperty(name, val); - } else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - style.setProperty( - hyphenate(prefixed), - val.replace(importantRE, ""), - "important" - ); - } else { - style[prefixed] = val; - } - } - } -} -const prefixes = ["Webkit", "Moz", "ms"]; -const prefixCache = {}; -function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = camelize(rawName); - if (name !== "filter" && name in style) { - return prefixCache[rawName] = name; - } - name = capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return prefixCache[rawName] = prefixed; - } - } - return rawName; -} - -const xlinkNS = "http://www.w3.org/1999/xlink"; -function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) { - if (isSVG && key.startsWith("xlink:")) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } else { - el.setAttributeNS(xlinkNS, key, value); - } - } else { - if (value == null || isBoolean && !includeBooleanAttr(value)) { - el.removeAttribute(key); - } else { - el.setAttribute( - key, - isBoolean ? "" : isSymbol(value) ? String(value) : value - ); - } - } -} - -function patchDOMProp(el, key, value, parentComponent, attrName) { - if (key === "innerHTML" || key === "textContent") { - if (value != null) { - el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; - } - return; - } - const tag = el.tagName; - if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally - !tag.includes("-")) { - const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; - const newValue = value == null ? ( - // #11647: value should be set as empty string for null and undefined, - // but <input type="checkbox"> should be set as 'on'. - el.type === "checkbox" ? "on" : "" - ) : String(value); - if (oldValue !== newValue || !("_value" in el)) { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - el._value = value; - return; - } - let needRemove = false; - if (value === "" || value == null) { - const type = typeof el[key]; - if (type === "boolean") { - value = includeBooleanAttr(value); - } else if (value == null && type === "string") { - value = ""; - needRemove = true; - } else if (type === "number") { - value = 0; - needRemove = true; - } - } - try { - el[key] = value; - } catch (e) { - if (!!(process.env.NODE_ENV !== "production") && !needRemove) { - warn( - `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, - e - ); - } - } - needRemove && el.removeAttribute(attrName || key); -} - -function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); -} -function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); -} -const veiKey = Symbol("_vei"); -function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - const invokers = el[veiKey] || (el[veiKey] = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - existingInvoker.value = !!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue; - } else { - const [name, options] = parseName(rawName); - if (nextValue) { - const invoker = invokers[rawName] = createInvoker( - !!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue, - instance - ); - addEventListener(el, name, invoker, options); - } else if (existingInvoker) { - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = void 0; - } - } -} -const optionsModifierRE = /(?:Once|Passive|Capture)$/; -function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while (m = name.match(optionsModifierRE)) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); - return [event, options]; -} -let cachedNow = 0; -const p = /* @__PURE__ */ Promise.resolve(); -const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); -function createInvoker(initialValue, instance) { - const invoker = (e) => { - if (!e._vts) { - e._vts = Date.now(); - } else if (e._vts <= invoker.attached) { - return; - } - callWithAsyncErrorHandling( - patchStopImmediatePropagation(e, invoker.value), - instance, - 5, - [e] - ); - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; -} -function sanitizeEventValue(value, propName) { - if (isFunction(value) || isArray(value)) { - return value; - } - warn( - `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? -Expected function or array of functions, received type ${typeof value}.` - ); - return NOOP; -} -function patchStopImmediatePropagation(e, value) { - if (isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map( - (fn) => (e2) => !e2._stopped && fn && fn(e2) - ); - } else { - return value; - } -} - -const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter -key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; -const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { - const isSVG = namespace === "svg"; - if (key === "class") { - patchClass(el, nextValue, isSVG); - } else if (key === "style") { - patchStyle(el, prevValue, nextValue); - } else if (isOn(key)) { - if (!isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue); - if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { - patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); - } - } else if ( - // #11081 force set props for possible async custom element - el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) - ) { - patchDOMProp(el, camelize$1(key), nextValue, parentComponent, key); - } else { - if (key === "true-value") { - el._trueValue = nextValue; - } else if (key === "false-value") { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } -}; -function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - if (key === "innerHTML" || key === "textContent") { - return true; - } - if (key in el && isNativeOn(key) && isFunction(value)) { - return true; - } - return false; - } - if (key === "spellcheck" || key === "draggable" || key === "translate") { - return false; - } - if (key === "form") { - return false; - } - if (key === "list" && el.tagName === "INPUT") { - return false; - } - if (key === "type" && el.tagName === "TEXTAREA") { - return false; - } - if (key === "width" || key === "height") { - const tag = el.tagName; - if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { - return false; - } - } - if (isNativeOn(key) && isString(value)) { - return false; - } - return key in el; -} - -const REMOVAL = {}; -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineCustomElement(options, extraOptions, _createApp) { - const Comp = defineComponent(options, extraOptions); - if (isPlainObject(Comp)) extend(Comp, extraOptions); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, _createApp); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; -} -/*! #__NO_SIDE_EFFECTS__ */ -const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { - return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); -}; -const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { -}; -class VueElement extends BaseClass { - constructor(_def, _props = {}, _createApp = createApp) { - super(); - this._def = _def; - this._props = _props; - this._createApp = _createApp; - this._isVueCE = true; - /** - * @internal - */ - this._instance = null; - /** - * @internal - */ - this._app = null; - /** - * @internal - */ - this._nonce = this._def.nonce; - this._connected = false; - this._resolved = false; - this._numberProps = null; - this._styleChildren = /* @__PURE__ */ new WeakSet(); - this._ob = null; - if (this.shadowRoot && _createApp !== createApp) { - this._root = this.shadowRoot; - } else { - if (!!(process.env.NODE_ENV !== "production") && this.shadowRoot) { - warn( - `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` - ); - } - if (_def.shadowRoot !== false) { - this.attachShadow({ mode: "open" }); - this._root = this.shadowRoot; - } else { - this._root = this; - } - } - if (!this._def.__asyncLoader) { - this._resolveProps(this._def); - } - } - connectedCallback() { - if (!this.isConnected) return; - if (!this.shadowRoot) { - this._parseSlots(); - } - this._connected = true; - let parent = this; - while (parent = parent && (parent.parentNode || parent.host)) { - if (parent instanceof VueElement) { - this._parent = parent; - break; - } - } - if (!this._instance) { - if (this._resolved) { - this._setParent(); - this._update(); - } else { - if (parent && parent._pendingResolve) { - this._pendingResolve = parent._pendingResolve.then(() => { - this._pendingResolve = void 0; - this._resolveDef(); - }); - } else { - this._resolveDef(); - } - } - } - } - _setParent(parent = this._parent) { - if (parent) { - this._instance.parent = parent._instance; - this._instance.provides = parent._instance.provides; - } - } - disconnectedCallback() { - this._connected = false; - nextTick(() => { - if (!this._connected) { - if (this._ob) { - this._ob.disconnect(); - this._ob = null; - } - this._app && this._app.unmount(); - if (this._instance) this._instance.ce = void 0; - this._app = this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._pendingResolve) { - return; - } - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - this._ob = new MutationObserver((mutations) => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }); - this._ob.observe(this, { attributes: true }); - const resolve = (def, isAsync = false) => { - this._resolved = true; - this._pendingResolve = void 0; - const { props, styles } = def; - let numberProps; - if (props && !isArray(props)) { - for (const key in props) { - const opt = props[key]; - if (opt === Number || opt && opt.type === Number) { - if (key in this._props) { - this._props[key] = toNumber(this._props[key]); - } - (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize$1(key)] = true; - } - } - } - this._numberProps = numberProps; - if (isAsync) { - this._resolveProps(def); - } - if (this.shadowRoot) { - this._applyStyles(styles); - } else if (!!(process.env.NODE_ENV !== "production") && styles) { - warn( - "Custom element style injection is not supported when using shadowRoot: false" - ); - } - this._mount(def); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - this._pendingResolve = asyncDef().then( - (def) => resolve(this._def = def, true) - ); - } else { - resolve(this._def); - } - } - _mount(def) { - if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) && !def.name) { - def.name = "VueElement"; - } - this._app = this._createApp(def); - if (def.configureApp) { - def.configureApp(this._app); - } - this._app._ceVNode = this._createVNode(); - this._app.mount(this._root); - const exposed = this._instance && this._instance.exposed; - if (!exposed) return; - for (const key in exposed) { - if (!hasOwn(this, key)) { - Object.defineProperty(this, key, { - // unwrap ref to be consistent with public instance behavior - get: () => unref(exposed[key]) - }); - } else if (!!(process.env.NODE_ENV !== "production")) { - warn(`Exposed property "${key}" already exists on custom element.`); - } - } - } - _resolveProps(def) { - const { props } = def; - const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); - for (const key of Object.keys(this)) { - if (key[0] !== "_" && declaredPropKeys.includes(key)) { - this._setProp(key, this[key]); - } - } - for (const key of declaredPropKeys.map(camelize$1)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val, true, true); - } - }); - } - } - _setAttr(key) { - if (key.startsWith("data-v-")) return; - const has = this.hasAttribute(key); - let value = has ? this.getAttribute(key) : REMOVAL; - const camelKey = camelize$1(key); - if (has && this._numberProps && this._numberProps[camelKey]) { - value = toNumber(value); - } - this._setProp(camelKey, value, false, true); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = false) { - if (val !== this._props[key]) { - if (val === REMOVAL) { - delete this._props[key]; - } else { - this._props[key] = val; - if (key === "key" && this._app) { - this._app._ceVNode.key = val; - } - } - if (shouldUpdate && this._instance) { - this._update(); - } - if (shouldReflect) { - const ob = this._ob; - ob && ob.disconnect(); - if (val === true) { - this.setAttribute(hyphenate(key), ""); - } else if (typeof val === "string" || typeof val === "number") { - this.setAttribute(hyphenate(key), val + ""); - } else if (!val) { - this.removeAttribute(hyphenate(key)); - } - ob && ob.observe(this, { attributes: true }); - } - } - } - _update() { - render(this._createVNode(), this._root); - } - _createVNode() { - const baseProps = {}; - if (!this.shadowRoot) { - baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); - } - const vnode = createVNode(this._def, extend(baseProps, this._props)); - if (!this._instance) { - vnode.ce = (instance) => { - this._instance = instance; - instance.ce = this; - instance.isCE = true; - if (!!(process.env.NODE_ENV !== "production")) { - instance.ceReload = (newStyles) => { - if (this._styles) { - this._styles.forEach((s) => this._root.removeChild(s)); - this._styles.length = 0; - } - this._applyStyles(newStyles); - this._instance = null; - this._update(); - }; - } - const dispatch = (event, args) => { - this.dispatchEvent( - new CustomEvent( - event, - isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args } - ) - ); - }; - instance.emit = (event, ...args) => { - dispatch(event, args); - if (hyphenate(event) !== event) { - dispatch(hyphenate(event), args); - } - }; - this._setParent(); - }; - } - return vnode; - } - _applyStyles(styles, owner) { - if (!styles) return; - if (owner) { - if (owner === this._def || this._styleChildren.has(owner)) { - return; - } - this._styleChildren.add(owner); - } - const nonce = this._nonce; - for (let i = styles.length - 1; i >= 0; i--) { - const s = document.createElement("style"); - if (nonce) s.setAttribute("nonce", nonce); - s.textContent = styles[i]; - this.shadowRoot.prepend(s); - if (!!(process.env.NODE_ENV !== "production")) { - if (owner) { - if (owner.__hmrId) { - if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map(); - let entry = this._childStyles.get(owner.__hmrId); - if (!entry) { - this._childStyles.set(owner.__hmrId, entry = []); - } - entry.push(s); - } - } else { - (this._styles || (this._styles = [])).push(s); - } - } - } - } - /** - * Only called when shadowRoot is false - */ - _parseSlots() { - const slots = this._slots = {}; - let n; - while (n = this.firstChild) { - const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; - (slots[slotName] || (slots[slotName] = [])).push(n); - this.removeChild(n); - } - } - /** - * Only called when shadowRoot is false - */ - _renderSlots() { - const outlets = (this._teleportTarget || this).querySelectorAll("slot"); - const scopeId = this._instance.type.__scopeId; - for (let i = 0; i < outlets.length; i++) { - const o = outlets[i]; - const slotName = o.getAttribute("name") || "default"; - const content = this._slots[slotName]; - const parent = o.parentNode; - if (content) { - for (const n of content) { - if (scopeId && n.nodeType === 1) { - const id = scopeId + "-s"; - const walker = document.createTreeWalker(n, 1); - n.setAttribute(id, ""); - let child; - while (child = walker.nextNode()) { - child.setAttribute(id, ""); - } - } - parent.insertBefore(n, o); - } - } else { - while (o.firstChild) parent.insertBefore(o.firstChild, o); - } - parent.removeChild(o); - } - } - /** - * @internal - */ - _injectChildStyle(comp) { - this._applyStyles(comp.styles, comp); - } - /** - * @internal - */ - _removeChildStyle(comp) { - if (!!(process.env.NODE_ENV !== "production")) { - this._styleChildren.delete(comp); - if (this._childStyles && comp.__hmrId) { - const oldStyles = this._childStyles.get(comp.__hmrId); - if (oldStyles) { - oldStyles.forEach((s) => this._root.removeChild(s)); - oldStyles.length = 0; - } - } - } - } -} -function useHost(caller) { - const instance = getCurrentInstance(); - const el = instance && instance.ce; - if (el) { - return el; - } else if (!!(process.env.NODE_ENV !== "production")) { - if (!instance) { - warn( - `${caller || "useHost"} called without an active component instance.` - ); - } else { - warn( - `${caller || "useHost"} can only be used in components defined via defineCustomElement.` - ); - } - } - return null; -} -function useShadowRoot() { - const el = !!(process.env.NODE_ENV !== "production") ? useHost("useShadowRoot") : useHost(); - return el && el.shadowRoot; -} - -function useCssModule(name = "$style") { - { - const instance = getCurrentInstance(); - if (!instance) { - !!(process.env.NODE_ENV !== "production") && warn(`useCssModule must be called inside setup()`); - return EMPTY_OBJ; - } - const modules = instance.type.__cssModules; - if (!modules) { - !!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS modules injected.`); - return EMPTY_OBJ; - } - const mod = modules[name]; - if (!mod) { - !!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS module named "${name}".`); - return EMPTY_OBJ; - } - return mod; - } -} - -const positionMap = /* @__PURE__ */ new WeakMap(); -const newPositionMap = /* @__PURE__ */ new WeakMap(); -const moveCbKey = Symbol("_moveCb"); -const enterCbKey = Symbol("_enterCb"); -const decorate = (t) => { - delete t.props.mode; - return t; -}; -const TransitionGroupImpl = /* @__PURE__ */ decorate({ - name: "TransitionGroup", - props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevChildren; - let children; - onUpdated(() => { - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || "v"}-move`; - if (!hasCSSTransform( - prevChildren[0].el, - instance.vnode.el, - moveClass - )) { - return; - } - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - forceReflow(); - movedChildren.forEach((c) => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ""; - const cb = el[moveCbKey] = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener("transitionend", cb); - el[moveCbKey] = null; - removeTransitionClass(el, moveClass); - } - }; - el.addEventListener("transitionend", cb); - }); - }); - return () => { - const rawProps = toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || Fragment; - prevChildren = []; - if (children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.el && child.el instanceof Element) { - prevChildren.push(child); - setTransitionHooks( - child, - resolveTransitionHooks( - child, - cssTransitionProps, - state, - instance - ) - ); - positionMap.set( - child, - child.el.getBoundingClientRect() - ); - } - } - } - children = slots.default ? getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - setTransitionHooks( - child, - resolveTransitionHooks(child, cssTransitionProps, state, instance) - ); - } else if (!!(process.env.NODE_ENV !== "production") && child.type !== Text) { - warn(`<TransitionGroup> children must be keyed.`); - } - } - return createVNode(tag, null, children); - }; - } -}); -const TransitionGroup = TransitionGroupImpl; -function callPendingCbs(c) { - const el = c.el; - if (el[moveCbKey]) { - el[moveCbKey](); - } - if (el[enterCbKey]) { - el[enterCbKey](); - } -} -function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); -} -function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = "0s"; - return c; - } -} -function hasCSSTransform(el, root, moveClass) { - const clone = el.cloneNode(); - const _vtc = el[vtcKey]; - if (_vtc) { - _vtc.forEach((cls) => { - cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); - clone.style.display = "none"; - const container = root.nodeType === 1 ? root : root.parentNode; - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; -} - -const getModelAssigner = (vnode) => { - const fn = vnode.props["onUpdate:modelValue"] || false; - return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; -}; -function onCompositionStart(e) { - e.target.composing = true; -} -function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event("input")); - } -} -const assignKey = Symbol("_assign"); -const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el[assignKey] = getModelAssigner(vnode); - const castToNumber = number || vnode.props && vnode.props.type === "number"; - addEventListener(el, lazy ? "change" : "input", (e) => { - if (e.target.composing) return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = looseToNumber(domValue); - } - el[assignKey](domValue); - }); - if (trim) { - addEventListener(el, "change", () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, "compositionstart", onCompositionStart); - addEventListener(el, "compositionend", onCompositionEnd); - addEventListener(el, "change", onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? "" : value; - }, - beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { - el[assignKey] = getModelAssigner(vnode); - if (el.composing) return; - const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; - const newValue = value == null ? "" : value; - if (elValue === newValue) { - return; - } - if (document.activeElement === el && el.type !== "range") { - if (lazy && value === oldValue) { - return; - } - if (trim && el.value.trim() === newValue) { - return; - } - } - el.value = newValue; - } -}; -const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el[assignKey] = getModelAssigner(vnode); - addEventListener(el, "change", () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el[assignKey]; - if (isArray(modelValue)) { - const index = looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } else if (isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } else { - cloned.delete(elementValue); - } - assign(cloned); - } else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el[assignKey] = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } -}; -function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - let checked; - if (isArray(value)) { - checked = looseIndexOf(value, vnode.props.value) > -1; - } else if (isSet(value)) { - checked = value.has(vnode.props.value); - } else { - if (value === oldValue) return; - checked = looseEqual(value, getCheckboxValue(el, true)); - } - if (el.checked !== checked) { - el.checked = checked; - } -} -const vModelRadio = { - created(el, { value }, vnode) { - el.checked = looseEqual(value, vnode.props.value); - el[assignKey] = getModelAssigner(vnode); - addEventListener(el, "change", () => { - el[assignKey](getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el[assignKey] = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = looseEqual(value, vnode.props.value); - } - } -}; -const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = isSet(value); - addEventListener(el, "change", () => { - const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( - (o) => number ? looseToNumber(getValue(o)) : getValue(o) - ); - el[assignKey]( - el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] - ); - el._assigning = true; - nextTick(() => { - el._assigning = false; - }); - }); - el[assignKey] = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el[assignKey] = getModelAssigner(vnode); - }, - updated(el, { value }) { - if (!el._assigning) { - setSelected(el, value); - } - } -}; -function setSelected(el, value) { - const isMultiple = el.multiple; - const isArrayValue = isArray(value); - if (isMultiple && !isArrayValue && !isSet(value)) { - !!(process.env.NODE_ENV !== "production") && warn( - `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` - ); - return; - } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (isArrayValue) { - const optionType = typeof optionValue; - if (optionType === "string" || optionType === "number") { - option.selected = value.some((v) => String(v) === String(optionValue)); - } else { - option.selected = looseIndexOf(value, optionValue) > -1; - } - } else { - option.selected = value.has(optionValue); - } - } else if (looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) el.selectedIndex = i; - return; - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } -} -function getValue(el) { - return "_value" in el ? el._value : el.value; -} -function getCheckboxValue(el, checked) { - const key = checked ? "_trueValue" : "_falseValue"; - return key in el ? el[key] : checked; -} -const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, "created"); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, "mounted"); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, "updated"); - } -}; -function resolveDynamicModel(tagName, type) { - switch (tagName) { - case "SELECT": - return vModelSelect; - case "TEXTAREA": - return vModelText; - default: - switch (type) { - case "checkbox": - return vModelCheckbox; - case "radio": - return vModelRadio; - default: - return vModelText; - } - } -} -function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel( - el.tagName, - vnode.props && vnode.props.type - ); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); -} -function initVModelForSSR() { - vModelText.getSSRProps = ({ value }) => ({ value }); - vModelRadio.getSSRProps = ({ value }, vnode) => { - if (vnode.props && looseEqual(vnode.props.value, value)) { - return { checked: true }; - } - }; - vModelCheckbox.getSSRProps = ({ value }, vnode) => { - if (isArray(value)) { - if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) { - return { checked: true }; - } - } else if (isSet(value)) { - if (vnode.props && value.has(vnode.props.value)) { - return { checked: true }; - } - } else if (value) { - return { checked: true }; - } - }; - vModelDynamic.getSSRProps = (binding, vnode) => { - if (typeof vnode.type !== "string") { - return; - } - const modelToUse = resolveDynamicModel( - // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase - vnode.type.toUpperCase(), - vnode.props && vnode.props.type - ); - if (modelToUse.getSSRProps) { - return modelToUse.getSSRProps(binding, vnode); - } - }; -} - -const systemModifiers = ["ctrl", "shift", "alt", "meta"]; -const modifierGuards = { - stop: (e) => e.stopPropagation(), - prevent: (e) => e.preventDefault(), - self: (e) => e.target !== e.currentTarget, - ctrl: (e) => !e.ctrlKey, - shift: (e) => !e.shiftKey, - alt: (e) => !e.altKey, - meta: (e) => !e.metaKey, - left: (e) => "button" in e && e.button !== 0, - middle: (e) => "button" in e && e.button !== 1, - right: (e) => "button" in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) -}; -const withModifiers = (fn, modifiers) => { - const cache = fn._withMods || (fn._withMods = {}); - const cacheKey = modifiers.join("."); - return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) return; - } - return fn(event, ...args); - }); -}; -const keyNames = { - esc: "escape", - space: " ", - up: "arrow-up", - left: "arrow-left", - right: "arrow-right", - down: "arrow-down", - delete: "backspace" -}; -const withKeys = (fn, modifiers) => { - const cache = fn._withKeys || (fn._withKeys = {}); - const cacheKey = modifiers.join("."); - return cache[cacheKey] || (cache[cacheKey] = (event) => { - if (!("key" in event)) { - return; - } - const eventKey = hyphenate(event.key); - if (modifiers.some( - (k) => k === eventKey || keyNames[k] === eventKey - )) { - return fn(event); - } - }); -}; - -const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); -let renderer; -let enabledHydration = false; -function ensureRenderer() { - return renderer || (renderer = createRenderer(rendererOptions)); -} -function ensureHydrationRenderer() { - renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; -} -const render = (...args) => { - ensureRenderer().render(...args); -}; -const hydrate = (...args) => { - ensureHydrationRenderer().hydrate(...args); -}; -const createApp = (...args) => { - const app = ensureRenderer().createApp(...args); - if (!!(process.env.NODE_ENV !== "production")) { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); - } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) return; - const component = app._component; - if (!isFunction(component) && !component.render && !component.template) { - component.template = container.innerHTML; - } - if (container.nodeType === 1) { - container.textContent = ""; - } - const proxy = mount(container, false, resolveRootNamespace(container)); - if (container instanceof Element) { - container.removeAttribute("v-cloak"); - container.setAttribute("data-v-app", ""); - } - return proxy; - }; - return app; -}; -const createSSRApp = (...args) => { - const app = ensureHydrationRenderer().createApp(...args); - if (!!(process.env.NODE_ENV !== "production")) { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); - } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, resolveRootNamespace(container)); - } - }; - return app; -}; -function resolveRootNamespace(container) { - if (container instanceof SVGElement) { - return "svg"; - } - if (typeof MathMLElement === "function" && container instanceof MathMLElement) { - return "mathml"; - } -} -function injectNativeTagCheck(app) { - Object.defineProperty(app.config, "isNativeTag", { - value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), - writable: false - }); -} -function injectCompilerOptionsCheck(app) { - if (isRuntimeOnly()) { - const isCustomElement = app.config.isCustomElement; - Object.defineProperty(app.config, "isCustomElement", { - get() { - return isCustomElement; - }, - set() { - warn( - `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` - ); - } - }); - const compilerOptions = app.config.compilerOptions; - const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. -- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. -- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader -- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; - Object.defineProperty(app.config, "compilerOptions", { - get() { - warn(msg); - return compilerOptions; - }, - set() { - warn(msg); - } - }); - } -} -function normalizeContainer(container) { - if (isString(container)) { - const res = document.querySelector(container); - if (!!(process.env.NODE_ENV !== "production") && !res) { - warn( - `Failed to mount app: mount target selector "${container}" returned null.` - ); - } - return res; - } - if (!!(process.env.NODE_ENV !== "production") && window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { - warn( - `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` - ); - } - return container; -} -let ssrDirectiveInitialized = false; -const initDirectivesForSSR = () => { - if (!ssrDirectiveInitialized) { - ssrDirectiveInitialized = true; - initVModelForSSR(); - initVShowForSSR(); - } -} ; - -export { Transition, TransitionGroup, VueElement, createApp, createSSRApp, defineCustomElement, defineSSRCustomElement, hydrate, initDirectivesForSSR, render, useCssModule, useCssVars, useHost, useShadowRoot, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, withKeys, withModifiers }; diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.global.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.global.js deleted file mode 100644 index c54b5c7..0000000 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.global.js +++ /dev/null @@ -1,12383 +0,0 @@ -/** -* @vue/runtime-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -var VueRuntimeDOM = (function (exports) { - 'use strict'; - - /*! #__NO_SIDE_EFFECTS__ */ - // @__NO_SIDE_EFFECTS__ - function makeMap(str) { - const map = /* @__PURE__ */ Object.create(null); - for (const key of str.split(",")) map[key] = 1; - return (val) => val in map; - } - - const EMPTY_OBJ = Object.freeze({}) ; - const EMPTY_ARR = Object.freeze([]) ; - const NOOP = () => { - }; - const NO = () => false; - const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter - (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); - const isModelListener = (key) => key.startsWith("onUpdate:"); - const extend = Object.assign; - const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } - }; - const hasOwnProperty$1 = Object.prototype.hasOwnProperty; - const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); - const isArray = Array.isArray; - const isMap = (val) => toTypeString(val) === "[object Map]"; - const isSet = (val) => toTypeString(val) === "[object Set]"; - const isDate = (val) => toTypeString(val) === "[object Date]"; - const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; - const isFunction = (val) => typeof val === "function"; - const isString = (val) => typeof val === "string"; - const isSymbol = (val) => typeof val === "symbol"; - const isObject = (val) => val !== null && typeof val === "object"; - const isPromise = (val) => { - return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); - }; - const objectToString = Object.prototype.toString; - const toTypeString = (value) => objectToString.call(value); - const toRawType = (value) => { - return toTypeString(value).slice(8, -1); - }; - const isPlainObject = (val) => toTypeString(val) === "[object Object]"; - const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; - const isReservedProp = /* @__PURE__ */ makeMap( - // the leading comma is intentional so empty string "" is also included - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" - ); - const isBuiltInDirective = /* @__PURE__ */ makeMap( - "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" - ); - const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; - }; - const camelizeRE = /-(\w)/g; - const camelize = cacheStringFunction( - (str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); - } - ); - const hyphenateRE = /\B([A-Z])/g; - const hyphenate = cacheStringFunction( - (str) => str.replace(hyphenateRE, "-$1").toLowerCase() - ); - const capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); - }); - const toHandlerKey = cacheStringFunction( - (str) => { - const s = str ? `on${capitalize(str)}` : ``; - return s; - } - ); - const hasChanged = (value, oldValue) => !Object.is(value, oldValue); - const invokeArrayFns = (fns, ...arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](...arg); - } - }; - const def = (obj, key, value, writable = false) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - writable, - value - }); - }; - const looseToNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; - }; - const toNumber = (val) => { - const n = isString(val) ? Number(val) : NaN; - return isNaN(n) ? val : n; - }; - let _globalThis; - const getGlobalThis = () => { - return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); - }; - - const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; - const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); - - function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } else if (isString(value) || isObject(value)) { - return value; - } - } - const listDelimiterRE = /;(?![^(]*\))/g; - const propertyDelimiterRE = /:([^]+)/; - const styleCommentRE = /\/\*[^]*?\*\//g; - function parseStringStyle(cssText) { - const ret = {}; - cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; - } - function stringifyStyle(styles) { - if (!styles) return ""; - if (isString(styles)) return styles; - let ret = ""; - for (const key in styles) { - const value = styles[key]; - if (isString(value) || typeof value === "number") { - const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); - ret += `${normalizedKey}:${value};`; - } - } - return ret; - } - function normalizeClass(value) { - let res = ""; - if (isString(value)) { - res = value; - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + " "; - } - } - } else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + " "; - } - } - } - return res.trim(); - } - function normalizeProps(props) { - if (!props) return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; - } - - const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; - const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; - const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; - const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); - const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); - const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); - - const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; - const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); - const isBooleanAttr = /* @__PURE__ */ makeMap( - specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` - ); - function includeBooleanAttr(value) { - return !!value || value === ""; - } - const isKnownHtmlAttr = /* @__PURE__ */ makeMap( - `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` - ); - const isKnownSvgAttr = /* @__PURE__ */ makeMap( - `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` - ); - function isRenderableAttrValue(value) { - if (value == null) { - return false; - } - const type = typeof value; - return type === "string" || type === "number" || type === "boolean"; - } - - const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; - function getEscapedCssVarName(key, doubleEscape) { - return key.replace( - cssVarNameEscapeSymbolsRE, - (s) => `\\${s}` - ); - } - - function looseCompareArrays(a, b) { - if (a.length !== b.length) return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; - } - function looseEqual(a, b) { - if (a === b) return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); - } - function looseIndexOf(arr, val) { - return arr.findIndex((item) => looseEqual(item, val)); - } - - const isRef$1 = (val) => { - return !!(val && val["__v_isRef"] === true); - }; - const toDisplayString = (val) => { - return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); - }; - const replacer = (_key, val) => { - if (isRef$1(val)) { - return replacer(_key, val.value); - } else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce( - (entries, [key, val2], i) => { - entries[stringifySymbol(key, i) + " =>"] = val2; - return entries; - }, - {} - ) - }; - } else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) - }; - } else if (isSymbol(val)) { - return stringifySymbol(val); - } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; - }; - const stringifySymbol = (v, i = "") => { - var _a; - return ( - // Symbol.description in es2019+ so we need to cast here to pass - // the lib: es2016 check - isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v - ); - }; - - function warn$2(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); - } - - let activeEffectScope; - class EffectScope { - constructor(detached = false) { - this.detached = detached; - /** - * @internal - */ - this._active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - this._isPaused = false; - this.parent = activeEffectScope; - if (!detached && activeEffectScope) { - this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( - this - ) - 1; - } - } - get active() { - return this._active; - } - pause() { - if (this._active) { - this._isPaused = true; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].pause(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].pause(); - } - } - } - /** - * Resumes the effect scope, including all child scopes and effects. - */ - resume() { - if (this._active) { - if (this._isPaused) { - this._isPaused = false; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].resume(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].resume(); - } - } - } - } - run(fn) { - if (this._active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } finally { - activeEffectScope = currentEffectScope; - } - } else { - warn$2(`cannot run an inactive effect scope.`); - } - } - /** - * This should only be called on non-detached scopes - * @internal - */ - on() { - activeEffectScope = this; - } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this._active) { - this._active = false; - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - this.effects.length = 0; - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - this.cleanups.length = 0; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - this.scopes.length = 0; - } - if (!this.detached && this.parent && !fromParent) { - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.parent = void 0; - } - } - } - function effectScope(detached) { - return new EffectScope(detached); - } - function getCurrentScope() { - return activeEffectScope; - } - function onScopeDispose(fn, failSilently = false) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } else if (!failSilently) { - warn$2( - `onScopeDispose() is called when there is no active effect scope to be associated with.` - ); - } - } - - let activeSub; - const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); - class ReactiveEffect { - constructor(fn) { - this.fn = fn; - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 1 | 4; - /** - * @internal - */ - this.next = void 0; - /** - * @internal - */ - this.cleanup = void 0; - this.scheduler = void 0; - if (activeEffectScope && activeEffectScope.active) { - activeEffectScope.effects.push(this); - } - } - pause() { - this.flags |= 64; - } - resume() { - if (this.flags & 64) { - this.flags &= ~64; - if (pausedQueueEffects.has(this)) { - pausedQueueEffects.delete(this); - this.trigger(); - } - } - } - /** - * @internal - */ - notify() { - if (this.flags & 2 && !(this.flags & 32)) { - return; - } - if (!(this.flags & 8)) { - batch(this); - } - } - run() { - if (!(this.flags & 1)) { - return this.fn(); - } - this.flags |= 2; - cleanupEffect(this); - prepareDeps(this); - const prevEffect = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = this; - shouldTrack = true; - try { - return this.fn(); - } finally { - if (activeSub !== this) { - warn$2( - "Active effect was not restored correctly - this is likely a Vue internal bug." - ); - } - cleanupDeps(this); - activeSub = prevEffect; - shouldTrack = prevShouldTrack; - this.flags &= ~2; - } - } - stop() { - if (this.flags & 1) { - for (let link = this.deps; link; link = link.nextDep) { - removeSub(link); - } - this.deps = this.depsTail = void 0; - cleanupEffect(this); - this.onStop && this.onStop(); - this.flags &= ~1; - } - } - trigger() { - if (this.flags & 64) { - pausedQueueEffects.add(this); - } else if (this.scheduler) { - this.scheduler(); - } else { - this.runIfDirty(); - } - } - /** - * @internal - */ - runIfDirty() { - if (isDirty(this)) { - this.run(); - } - } - get dirty() { - return isDirty(this); - } - } - let batchDepth = 0; - let batchedSub; - let batchedComputed; - function batch(sub, isComputed = false) { - sub.flags |= 8; - if (isComputed) { - sub.next = batchedComputed; - batchedComputed = sub; - return; - } - sub.next = batchedSub; - batchedSub = sub; - } - function startBatch() { - batchDepth++; - } - function endBatch() { - if (--batchDepth > 0) { - return; - } - if (batchedComputed) { - let e = batchedComputed; - batchedComputed = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - e = next; - } - } - let error; - while (batchedSub) { - let e = batchedSub; - batchedSub = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - if (e.flags & 1) { - try { - ; - e.trigger(); - } catch (err) { - if (!error) error = err; - } - } - e = next; - } - } - if (error) throw error; - } - function prepareDeps(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - link.version = -1; - link.prevActiveLink = link.dep.activeLink; - link.dep.activeLink = link; - } - } - function cleanupDeps(sub) { - let head; - let tail = sub.depsTail; - let link = tail; - while (link) { - const prev = link.prevDep; - if (link.version === -1) { - if (link === tail) tail = prev; - removeSub(link); - removeDep(link); - } else { - head = link; - } - link.dep.activeLink = link.prevActiveLink; - link.prevActiveLink = void 0; - link = prev; - } - sub.deps = head; - sub.depsTail = tail; - } - function isDirty(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { - return true; - } - } - if (sub._dirty) { - return true; - } - return false; - } - function refreshComputed(computed) { - if (computed.flags & 4 && !(computed.flags & 16)) { - return; - } - computed.flags &= ~16; - if (computed.globalVersion === globalVersion) { - return; - } - computed.globalVersion = globalVersion; - const dep = computed.dep; - computed.flags |= 2; - if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { - computed.flags &= ~2; - return; - } - const prevSub = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = computed; - shouldTrack = true; - try { - prepareDeps(computed); - const value = computed.fn(computed._value); - if (dep.version === 0 || hasChanged(value, computed._value)) { - computed._value = value; - dep.version++; - } - } catch (err) { - dep.version++; - throw err; - } finally { - activeSub = prevSub; - shouldTrack = prevShouldTrack; - cleanupDeps(computed); - computed.flags &= ~2; - } - } - function removeSub(link, soft = false) { - const { dep, prevSub, nextSub } = link; - if (prevSub) { - prevSub.nextSub = nextSub; - link.prevSub = void 0; - } - if (nextSub) { - nextSub.prevSub = prevSub; - link.nextSub = void 0; - } - if (dep.subsHead === link) { - dep.subsHead = nextSub; - } - if (dep.subs === link) { - dep.subs = prevSub; - if (!prevSub && dep.computed) { - dep.computed.flags &= ~4; - for (let l = dep.computed.deps; l; l = l.nextDep) { - removeSub(l, true); - } - } - } - if (!soft && !--dep.sc && dep.map) { - dep.map.delete(dep.key); - } - } - function removeDep(link) { - const { prevDep, nextDep } = link; - if (prevDep) { - prevDep.nextDep = nextDep; - link.prevDep = void 0; - } - if (nextDep) { - nextDep.prevDep = prevDep; - link.nextDep = void 0; - } - } - function effect(fn, options) { - if (fn.effect instanceof ReactiveEffect) { - fn = fn.effect.fn; - } - const e = new ReactiveEffect(fn); - if (options) { - extend(e, options); - } - try { - e.run(); - } catch (err) { - e.stop(); - throw err; - } - const runner = e.run.bind(e); - runner.effect = e; - return runner; - } - function stop(runner) { - runner.effect.stop(); - } - let shouldTrack = true; - const trackStack = []; - function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; - } - function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === void 0 ? true : last; - } - function cleanupEffect(e) { - const { cleanup } = e; - e.cleanup = void 0; - if (cleanup) { - const prevSub = activeSub; - activeSub = void 0; - try { - cleanup(); - } finally { - activeSub = prevSub; - } - } - } - - let globalVersion = 0; - class Link { - constructor(sub, dep) { - this.sub = sub; - this.dep = dep; - this.version = dep.version; - this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; - } - } - class Dep { - constructor(computed) { - this.computed = computed; - this.version = 0; - /** - * Link between this dep and the current active effect - */ - this.activeLink = void 0; - /** - * Doubly linked list representing the subscribing effects (tail) - */ - this.subs = void 0; - /** - * For object property deps cleanup - */ - this.map = void 0; - this.key = void 0; - /** - * Subscriber counter - */ - this.sc = 0; - { - this.subsHead = void 0; - } - } - track(debugInfo) { - if (!activeSub || !shouldTrack || activeSub === this.computed) { - return; - } - let link = this.activeLink; - if (link === void 0 || link.sub !== activeSub) { - link = this.activeLink = new Link(activeSub, this); - if (!activeSub.deps) { - activeSub.deps = activeSub.depsTail = link; - } else { - link.prevDep = activeSub.depsTail; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - } - addSub(link); - } else if (link.version === -1) { - link.version = this.version; - if (link.nextDep) { - const next = link.nextDep; - next.prevDep = link.prevDep; - if (link.prevDep) { - link.prevDep.nextDep = next; - } - link.prevDep = activeSub.depsTail; - link.nextDep = void 0; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - if (activeSub.deps === link) { - activeSub.deps = next; - } - } - } - if (activeSub.onTrack) { - activeSub.onTrack( - extend( - { - effect: activeSub - }, - debugInfo - ) - ); - } - return link; - } - trigger(debugInfo) { - this.version++; - globalVersion++; - this.notify(debugInfo); - } - notify(debugInfo) { - startBatch(); - try { - if (true) { - for (let head = this.subsHead; head; head = head.nextSub) { - if (head.sub.onTrigger && !(head.sub.flags & 8)) { - head.sub.onTrigger( - extend( - { - effect: head.sub - }, - debugInfo - ) - ); - } - } - } - for (let link = this.subs; link; link = link.prevSub) { - if (link.sub.notify()) { - ; - link.sub.dep.notify(); - } - } - } finally { - endBatch(); - } - } - } - function addSub(link) { - link.dep.sc++; - if (link.sub.flags & 4) { - const computed = link.dep.computed; - if (computed && !link.dep.subs) { - computed.flags |= 4 | 16; - for (let l = computed.deps; l; l = l.nextDep) { - addSub(l); - } - } - const currentTail = link.dep.subs; - if (currentTail !== link) { - link.prevSub = currentTail; - if (currentTail) currentTail.nextSub = link; - } - if (link.dep.subsHead === void 0) { - link.dep.subsHead = link; - } - link.dep.subs = link; - } - } - const targetMap = /* @__PURE__ */ new WeakMap(); - const ITERATE_KEY = Symbol( - "Object iterate" - ); - const MAP_KEY_ITERATE_KEY = Symbol( - "Map keys iterate" - ); - const ARRAY_ITERATE_KEY = Symbol( - "Array iterate" - ); - function track(target, type, key) { - if (shouldTrack && activeSub) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = new Dep()); - dep.map = depsMap; - dep.key = key; - } - { - dep.track({ - target, - type, - key - }); - } - } - } - function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - globalVersion++; - return; - } - const run = (dep) => { - if (dep) { - { - dep.trigger({ - target, - type, - key, - newValue, - oldValue, - oldTarget - }); - } - } - }; - startBatch(); - if (type === "clear") { - depsMap.forEach(run); - } else { - const targetIsArray = isArray(target); - const isArrayIndex = targetIsArray && isIntegerKey(key); - if (targetIsArray && key === "length") { - const newLength = Number(newValue); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { - run(dep); - } - }); - } else { - if (key !== void 0 || depsMap.has(void 0)) { - run(depsMap.get(key)); - } - if (isArrayIndex) { - run(depsMap.get(ARRAY_ITERATE_KEY)); - } - switch (type) { - case "add": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isArrayIndex) { - run(depsMap.get("length")); - } - break; - case "delete": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (isMap(target)) { - run(depsMap.get(ITERATE_KEY)); - } - break; - } - } - } - endBatch(); - } - function getDepFromReactive(object, key) { - const depMap = targetMap.get(object); - return depMap && depMap.get(key); - } - - function reactiveReadArray(array) { - const raw = toRaw(array); - if (raw === array) return raw; - track(raw, "iterate", ARRAY_ITERATE_KEY); - return isShallow(array) ? raw : raw.map(toReactive); - } - function shallowReadArray(arr) { - track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); - return arr; - } - const arrayInstrumentations = { - __proto__: null, - [Symbol.iterator]() { - return iterator(this, Symbol.iterator, toReactive); - }, - concat(...args) { - return reactiveReadArray(this).concat( - ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) - ); - }, - entries() { - return iterator(this, "entries", (value) => { - value[1] = toReactive(value[1]); - return value; - }); - }, - every(fn, thisArg) { - return apply(this, "every", fn, thisArg, void 0, arguments); - }, - filter(fn, thisArg) { - return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); - }, - find(fn, thisArg) { - return apply(this, "find", fn, thisArg, toReactive, arguments); - }, - findIndex(fn, thisArg) { - return apply(this, "findIndex", fn, thisArg, void 0, arguments); - }, - findLast(fn, thisArg) { - return apply(this, "findLast", fn, thisArg, toReactive, arguments); - }, - findLastIndex(fn, thisArg) { - return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); - }, - // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement - forEach(fn, thisArg) { - return apply(this, "forEach", fn, thisArg, void 0, arguments); - }, - includes(...args) { - return searchProxy(this, "includes", args); - }, - indexOf(...args) { - return searchProxy(this, "indexOf", args); - }, - join(separator) { - return reactiveReadArray(this).join(separator); - }, - // keys() iterator only reads `length`, no optimisation required - lastIndexOf(...args) { - return searchProxy(this, "lastIndexOf", args); - }, - map(fn, thisArg) { - return apply(this, "map", fn, thisArg, void 0, arguments); - }, - pop() { - return noTracking(this, "pop"); - }, - push(...args) { - return noTracking(this, "push", args); - }, - reduce(fn, ...args) { - return reduce(this, "reduce", fn, args); - }, - reduceRight(fn, ...args) { - return reduce(this, "reduceRight", fn, args); - }, - shift() { - return noTracking(this, "shift"); - }, - // slice could use ARRAY_ITERATE but also seems to beg for range tracking - some(fn, thisArg) { - return apply(this, "some", fn, thisArg, void 0, arguments); - }, - splice(...args) { - return noTracking(this, "splice", args); - }, - toReversed() { - return reactiveReadArray(this).toReversed(); - }, - toSorted(comparer) { - return reactiveReadArray(this).toSorted(comparer); - }, - toSpliced(...args) { - return reactiveReadArray(this).toSpliced(...args); - }, - unshift(...args) { - return noTracking(this, "unshift", args); - }, - values() { - return iterator(this, "values", toReactive); - } - }; - function iterator(self, method, wrapValue) { - const arr = shallowReadArray(self); - const iter = arr[method](); - if (arr !== self && !isShallow(self)) { - iter._next = iter.next; - iter.next = () => { - const result = iter._next(); - if (result.value) { - result.value = wrapValue(result.value); - } - return result; - }; - } - return iter; - } - const arrayProto = Array.prototype; - function apply(self, method, fn, thisArg, wrappedRetFn, args) { - const arr = shallowReadArray(self); - const needsWrap = arr !== self && !isShallow(self); - const methodFn = arr[method]; - if (methodFn !== arrayProto[method]) { - const result2 = methodFn.apply(self, args); - return needsWrap ? toReactive(result2) : result2; - } - let wrappedFn = fn; - if (arr !== self) { - if (needsWrap) { - wrappedFn = function(item, index) { - return fn.call(this, toReactive(item), index, self); - }; - } else if (fn.length > 2) { - wrappedFn = function(item, index) { - return fn.call(this, item, index, self); - }; - } - } - const result = methodFn.call(arr, wrappedFn, thisArg); - return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; - } - function reduce(self, method, fn, args) { - const arr = shallowReadArray(self); - let wrappedFn = fn; - if (arr !== self) { - if (!isShallow(self)) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, toReactive(item), index, self); - }; - } else if (fn.length > 3) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, item, index, self); - }; - } - } - return arr[method](wrappedFn, ...args); - } - function searchProxy(self, method, args) { - const arr = toRaw(self); - track(arr, "iterate", ARRAY_ITERATE_KEY); - const res = arr[method](...args); - if ((res === -1 || res === false) && isProxy(args[0])) { - args[0] = toRaw(args[0]); - return arr[method](...args); - } - return res; - } - function noTracking(self, method, args = []) { - pauseTracking(); - startBatch(); - const res = toRaw(self)[method].apply(self, args); - endBatch(); - resetTracking(); - return res; - } - - const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); - const builtInSymbols = new Set( - /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) - ); - function hasOwnProperty(key) { - if (!isSymbol(key)) key = String(key); - const obj = toRaw(this); - track(obj, "has", key); - return obj.hasOwnProperty(key); - } - class BaseReactiveHandler { - constructor(_isReadonly = false, _isShallow = false) { - this._isReadonly = _isReadonly; - this._isShallow = _isShallow; - } - get(target, key, receiver) { - if (key === "__v_skip") return target["__v_skip"]; - const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_isShallow") { - return isShallow2; - } else if (key === "__v_raw") { - if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype - // this means the receiver is a user proxy of the reactive proxy - Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { - return target; - } - return; - } - const targetIsArray = isArray(target); - if (!isReadonly2) { - let fn; - if (targetIsArray && (fn = arrayInstrumentations[key])) { - return fn; - } - if (key === "hasOwnProperty") { - return hasOwnProperty; - } - } - const res = Reflect.get( - target, - key, - // if this is a proxy wrapping a ref, return methods using the raw ref - // as receiver so that we don't have to call `toRaw` on the ref in all - // its class methods - isRef(target) ? target : receiver - ); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly2) { - track(target, "get", key); - } - if (isShallow2) { - return res; - } - if (isRef(res)) { - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - return isReadonly2 ? readonly(res) : reactive(res); - } - return res; - } - } - class MutableReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(false, isShallow2); - } - set(target, key, value, receiver) { - let oldValue = target[key]; - if (!this._isShallow) { - const isOldValueReadonly = isReadonly(oldValue); - if (!isShallow(value) && !isReadonly(value)) { - oldValue = toRaw(oldValue); - value = toRaw(value); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - if (isOldValueReadonly) { - return false; - } else { - oldValue.value = value; - return true; - } - } - } - const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); - const result = Reflect.set( - target, - key, - value, - isRef(target) ? target : receiver - ); - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - } - return result; - } - deleteProperty(target, key) { - const hadKey = hasOwn(target, key); - const oldValue = target[key]; - const result = Reflect.deleteProperty(target, key); - if (result && hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - } - has(target, key) { - const result = Reflect.has(target, key); - if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has", key); - } - return result; - } - ownKeys(target) { - track( - target, - "iterate", - isArray(target) ? "length" : ITERATE_KEY - ); - return Reflect.ownKeys(target); - } - } - class ReadonlyReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(true, isShallow2); - } - set(target, key) { - { - warn$2( - `Set operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } - deleteProperty(target, key) { - { - warn$2( - `Delete operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } - } - const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); - const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); - const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); - const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); - - const toShallow = (value) => value; - const getProto = (v) => Reflect.getPrototypeOf(v); - function createIterableMethod(method, isReadonly2, isShallow2) { - return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; - const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; - !isReadonly2 && track( - rawTarget, - "iterate", - isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY - ); - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done ? { value, done } : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } - }; - }; - } - function createReadonlyMethod(type) { - return function(...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - warn$2( - `${capitalize(type)} operation ${key}failed: target is readonly.`, - toRaw(this) - ); - } - return type === "delete" ? false : type === "clear" ? void 0 : this; - }; - } - function createInstrumentations(readonly, shallow) { - const instrumentations = { - get(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "get", key); - } - track(rawTarget, "get", rawKey); - } - const { has } = getProto(rawTarget); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } else if (target !== rawTarget) { - target.get(key); - } - }, - get size() { - const target = this["__v_raw"]; - !readonly && track(toRaw(target), "iterate", ITERATE_KEY); - return Reflect.get(target, "size", target); - }, - has(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "has", key); - } - track(rawTarget, "has", rawKey); - } - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); - }, - forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - !readonly && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value, key) => { - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - } - }; - extend( - instrumentations, - readonly ? { - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear") - } : { - add(value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add", value, value); - } - return this; - }, - set(key, value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - return this; - }, - delete(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : void 0; - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - }, - clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; - const result = target.clear(); - if (hadItems) { - trigger( - target, - "clear", - void 0, - void 0, - oldTarget - ); - } - return result; - } - } - ); - const iteratorMethods = [ - "keys", - "values", - "entries", - Symbol.iterator - ]; - iteratorMethods.forEach((method) => { - instrumentations[method] = createIterableMethod(method, readonly, shallow); - }); - return instrumentations; - } - function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = createInstrumentations(isReadonly2, shallow); - return (target, key, receiver) => { - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_raw") { - return target; - } - return Reflect.get( - hasOwn(instrumentations, key) && key in target ? instrumentations : target, - key, - receiver - ); - }; - } - const mutableCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, false) - }; - const shallowCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, true) - }; - const readonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, false) - }; - const shallowReadonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, true) - }; - function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - warn$2( - `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` - ); - } - } - - const reactiveMap = /* @__PURE__ */ new WeakMap(); - const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); - const readonlyMap = /* @__PURE__ */ new WeakMap(); - const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); - function targetTypeMap(rawType) { - switch (rawType) { - case "Object": - case "Array": - return 1 /* COMMON */; - case "Map": - case "Set": - case "WeakMap": - case "WeakSet": - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } - } - function getTargetType(value) { - return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); - } - function reactive(target) { - if (isReadonly(target)) { - return target; - } - return createReactiveObject( - target, - false, - mutableHandlers, - mutableCollectionHandlers, - reactiveMap - ); - } - function shallowReactive(target) { - return createReactiveObject( - target, - false, - shallowReactiveHandlers, - shallowCollectionHandlers, - shallowReactiveMap - ); - } - function readonly(target) { - return createReactiveObject( - target, - true, - readonlyHandlers, - readonlyCollectionHandlers, - readonlyMap - ); - } - function shallowReadonly(target) { - return createReactiveObject( - target, - true, - shallowReadonlyHandlers, - shallowReadonlyCollectionHandlers, - shallowReadonlyMap - ); - } - function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - { - warn$2( - `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( - target - )}` - ); - } - return target; - } - if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { - return target; - } - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy( - target, - targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers - ); - proxyMap.set(target, proxy); - return proxy; - } - function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw"]); - } - return !!(value && value["__v_isReactive"]); - } - function isReadonly(value) { - return !!(value && value["__v_isReadonly"]); - } - function isShallow(value) { - return !!(value && value["__v_isShallow"]); - } - function isProxy(value) { - return value ? !!value["__v_raw"] : false; - } - function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; - } - function markRaw(value) { - if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { - def(value, "__v_skip", true); - } - return value; - } - const toReactive = (value) => isObject(value) ? reactive(value) : value; - const toReadonly = (value) => isObject(value) ? readonly(value) : value; - - function isRef(r) { - return r ? r["__v_isRef"] === true : false; - } - function ref(value) { - return createRef(value, false); - } - function shallowRef(value) { - return createRef(value, true); - } - function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); - } - class RefImpl { - constructor(value, isShallow2) { - this.dep = new Dep(); - this["__v_isRef"] = true; - this["__v_isShallow"] = false; - this._rawValue = isShallow2 ? value : toRaw(value); - this._value = isShallow2 ? value : toReactive(value); - this["__v_isShallow"] = isShallow2; - } - get value() { - { - this.dep.track({ - target: this, - type: "get", - key: "value" - }); - } - return this._value; - } - set value(newValue) { - const oldValue = this._rawValue; - const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); - newValue = useDirectValue ? newValue : toRaw(newValue); - if (hasChanged(newValue, oldValue)) { - this._rawValue = newValue; - this._value = useDirectValue ? newValue : toReactive(newValue); - { - this.dep.trigger({ - target: this, - type: "set", - key: "value", - newValue, - oldValue - }); - } - } - } - } - function triggerRef(ref2) { - if (ref2.dep) { - { - ref2.dep.trigger({ - target: ref2, - type: "set", - key: "value", - newValue: ref2._value - }); - } - } - } - function unref(ref2) { - return isRef(ref2) ? ref2.value : ref2; - } - function toValue(source) { - return isFunction(source) ? source() : unref(source); - } - const shallowUnwrapHandlers = { - get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } else { - return Reflect.set(target, key, value, receiver); - } - } - }; - function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); - } - class CustomRefImpl { - constructor(factory) { - this["__v_isRef"] = true; - this._value = void 0; - const dep = this.dep = new Dep(); - const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); - this._get = get; - this._set = set; - } - get value() { - return this._value = this._get(); - } - set value(newVal) { - this._set(newVal); - } - } - function customRef(factory) { - return new CustomRefImpl(factory); - } - function toRefs(object) { - if (!isProxy(object)) { - warn$2(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = propertyToRef(object, key); - } - return ret; - } - class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this["__v_isRef"] = true; - this._value = void 0; - } - get value() { - const val = this._object[this._key]; - return this._value = val === void 0 ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - get dep() { - return getDepFromReactive(toRaw(this._object), this._key); - } - } - class GetterRefImpl { - constructor(_getter) { - this._getter = _getter; - this["__v_isRef"] = true; - this["__v_isReadonly"] = true; - this._value = void 0; - } - get value() { - return this._value = this._getter(); - } - } - function toRef(source, key, defaultValue) { - if (isRef(source)) { - return source; - } else if (isFunction(source)) { - return new GetterRefImpl(source); - } else if (isObject(source) && arguments.length > 1) { - return propertyToRef(source, key, defaultValue); - } else { - return ref(source); - } - } - function propertyToRef(source, key, defaultValue) { - const val = source[key]; - return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); - } - - class ComputedRefImpl { - constructor(fn, setter, isSSR) { - this.fn = fn; - this.setter = setter; - /** - * @internal - */ - this._value = void 0; - /** - * @internal - */ - this.dep = new Dep(this); - /** - * @internal - */ - this.__v_isRef = true; - // TODO isolatedDeclarations "__v_isReadonly" - // A computed is also a subscriber that tracks other deps - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 16; - /** - * @internal - */ - this.globalVersion = globalVersion - 1; - /** - * @internal - */ - this.next = void 0; - // for backwards compat - this.effect = this; - this["__v_isReadonly"] = !setter; - this.isSSR = isSSR; - } - /** - * @internal - */ - notify() { - this.flags |= 16; - if (!(this.flags & 8) && // avoid infinite self recursion - activeSub !== this) { - batch(this, true); - return true; - } - } - get value() { - const link = this.dep.track({ - target: this, - type: "get", - key: "value" - }) ; - refreshComputed(this); - if (link) { - link.version = this.dep.version; - } - return this._value; - } - set value(newValue) { - if (this.setter) { - this.setter(newValue); - } else { - warn$2("Write operation failed: computed value is readonly"); - } - } - } - function computed$1(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - if (isFunction(getterOrOptions)) { - getter = getterOrOptions; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, isSSR); - if (debugOptions && !isSSR) { - cRef.onTrack = debugOptions.onTrack; - cRef.onTrigger = debugOptions.onTrigger; - } - return cRef; - } - - const TrackOpTypes = { - "GET": "get", - "HAS": "has", - "ITERATE": "iterate" - }; - const TriggerOpTypes = { - "SET": "set", - "ADD": "add", - "DELETE": "delete", - "CLEAR": "clear" - }; - - const INITIAL_WATCHER_VALUE = {}; - const cleanupMap = /* @__PURE__ */ new WeakMap(); - let activeWatcher = void 0; - function getCurrentWatcher() { - return activeWatcher; - } - function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { - if (owner) { - let cleanups = cleanupMap.get(owner); - if (!cleanups) cleanupMap.set(owner, cleanups = []); - cleanups.push(cleanupFn); - } else if (!failSilently) { - warn$2( - `onWatcherCleanup() was called when there was no active watcher to associate with.` - ); - } - } - function watch$1(source, cb, options = EMPTY_OBJ) { - const { immediate, deep, once, scheduler, augmentJob, call } = options; - const warnInvalidSource = (s) => { - (options.onWarn || warn$2)( - `Invalid watch source: `, - s, - `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` - ); - }; - const reactiveGetter = (source2) => { - if (deep) return source2; - if (isShallow(source2) || deep === false || deep === 0) - return traverse(source2, 1); - return traverse(source2); - }; - let effect; - let getter; - let cleanup; - let boundCleanup; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); - } else if (isReactive(source)) { - getter = () => reactiveGetter(source); - forceTrigger = true; - } else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); - getter = () => source.map((s) => { - if (isRef(s)) { - return s.value; - } else if (isReactive(s)) { - return reactiveGetter(s); - } else if (isFunction(s)) { - return call ? call(s, 2) : s(); - } else { - warnInvalidSource(s); - } - }); - } else if (isFunction(source)) { - if (cb) { - getter = call ? () => call(source, 2) : source; - } else { - getter = () => { - if (cleanup) { - pauseTracking(); - try { - cleanup(); - } finally { - resetTracking(); - } - } - const currentEffect = activeWatcher; - activeWatcher = effect; - try { - return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); - } finally { - activeWatcher = currentEffect; - } - }; - } - } else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - const depth = deep === true ? Infinity : deep; - getter = () => traverse(baseGetter(), depth); - } - const scope = getCurrentScope(); - const watchHandle = () => { - effect.stop(); - if (scope && scope.active) { - remove(scope.effects, effect); - } - }; - if (once && cb) { - const _cb = cb; - cb = (...args) => { - _cb(...args); - watchHandle(); - }; - } - let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; - const job = (immediateFirstRun) => { - if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { - return; - } - if (cb) { - const newValue = effect.run(); - if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { - if (cleanup) { - cleanup(); - } - const currentWatcher = activeWatcher; - activeWatcher = effect; - try { - const args = [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, - boundCleanup - ]; - call ? call(cb, 3, args) : ( - // @ts-expect-error - cb(...args) - ); - oldValue = newValue; - } finally { - activeWatcher = currentWatcher; - } - } - } else { - effect.run(); - } - }; - if (augmentJob) { - augmentJob(job); - } - effect = new ReactiveEffect(getter); - effect.scheduler = scheduler ? () => scheduler(job, false) : job; - boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); - cleanup = effect.onStop = () => { - const cleanups = cleanupMap.get(effect); - if (cleanups) { - if (call) { - call(cleanups, 4); - } else { - for (const cleanup2 of cleanups) cleanup2(); - } - cleanupMap.delete(effect); - } - }; - { - effect.onTrack = options.onTrack; - effect.onTrigger = options.onTrigger; - } - if (cb) { - if (immediate) { - job(true); - } else { - oldValue = effect.run(); - } - } else if (scheduler) { - scheduler(job.bind(null, true), true); - } else { - effect.run(); - } - watchHandle.pause = effect.pause.bind(effect); - watchHandle.resume = effect.resume.bind(effect); - watchHandle.stop = watchHandle; - return watchHandle; - } - function traverse(value, depth = Infinity, seen) { - if (depth <= 0 || !isObject(value) || value["__v_skip"]) { - return value; - } - seen = seen || /* @__PURE__ */ new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - depth--; - if (isRef(value)) { - traverse(value.value, depth, seen); - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], depth, seen); - } - } else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, depth, seen); - }); - } else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], depth, seen); - } - for (const key of Object.getOwnPropertySymbols(value)) { - if (Object.prototype.propertyIsEnumerable.call(value, key)) { - traverse(value[key], depth, seen); - } - } - } - return value; - } - - const stack = []; - function pushWarningContext(vnode) { - stack.push(vnode); - } - function popWarningContext() { - stack.pop(); - } - let isWarning = false; - function warn$1(msg, ...args) { - if (isWarning) return; - isWarning = true; - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling( - appWarnHandler, - instance, - 11, - [ - // eslint-disable-next-line no-restricted-syntax - msg + args.map((a) => { - var _a, _b; - return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); - }).join(""), - instance && instance.proxy, - trace.map( - ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` - ).join("\n"), - trace - ] - ); - } else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - if (trace.length && // avoid spamming console during tests - true) { - warnArgs.push(` -`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); - isWarning = false; - } - function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; - } - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; - } - function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...i === 0 ? [] : [` -`], ...formatTraceEntry(entry)); - }); - return logs; - } - function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName( - vnode.component, - vnode.type, - isRoot - )}`; - const close = `>` + postfix; - return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; - } - function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach((key) => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; - } - function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } else if (typeof value === "number" || typeof value === "boolean" || value == null) { - return raw ? value : [`${key}=${value}`]; - } else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } - } - function assertNumber(val, type) { - if (val === void 0) { - return; - } else if (typeof val !== "number") { - warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); - } else if (isNaN(val)) { - warn$1(`${type} is NaN - the duration expression might be incorrect.`); - } - } - - const ErrorCodes = { - "SETUP_FUNCTION": 0, - "0": "SETUP_FUNCTION", - "RENDER_FUNCTION": 1, - "1": "RENDER_FUNCTION", - "NATIVE_EVENT_HANDLER": 5, - "5": "NATIVE_EVENT_HANDLER", - "COMPONENT_EVENT_HANDLER": 6, - "6": "COMPONENT_EVENT_HANDLER", - "VNODE_HOOK": 7, - "7": "VNODE_HOOK", - "DIRECTIVE_HOOK": 8, - "8": "DIRECTIVE_HOOK", - "TRANSITION_HOOK": 9, - "9": "TRANSITION_HOOK", - "APP_ERROR_HANDLER": 10, - "10": "APP_ERROR_HANDLER", - "APP_WARN_HANDLER": 11, - "11": "APP_WARN_HANDLER", - "FUNCTION_REF": 12, - "12": "FUNCTION_REF", - "ASYNC_COMPONENT_LOADER": 13, - "13": "ASYNC_COMPONENT_LOADER", - "SCHEDULER": 14, - "14": "SCHEDULER", - "COMPONENT_UPDATE": 15, - "15": "COMPONENT_UPDATE", - "APP_UNMOUNT_CLEANUP": 16, - "16": "APP_UNMOUNT_CLEANUP" - }; - const ErrorTypeStrings$1 = { - ["sp"]: "serverPrefetch hook", - ["bc"]: "beforeCreate hook", - ["c"]: "created hook", - ["bm"]: "beforeMount hook", - ["m"]: "mounted hook", - ["bu"]: "beforeUpdate hook", - ["u"]: "updated", - ["bum"]: "beforeUnmount hook", - ["um"]: "unmounted hook", - ["a"]: "activated hook", - ["da"]: "deactivated hook", - ["ec"]: "errorCaptured hook", - ["rtc"]: "renderTracked hook", - ["rtg"]: "renderTriggered hook", - [0]: "setup function", - [1]: "render function", - [2]: "watcher getter", - [3]: "watcher callback", - [4]: "watcher cleanup function", - [5]: "native event handler", - [6]: "component event handler", - [7]: "vnode hook", - [8]: "directive hook", - [9]: "transition hook", - [10]: "app errorHandler", - [11]: "app warnHandler", - [12]: "ref function", - [13]: "async component loader", - [14]: "scheduler flush", - [15]: "component update", - [16]: "app unmount cleanup function" - }; - function callWithErrorHandling(fn, instance, type, args) { - try { - return args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance, type); - } - } - function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch((err) => { - handleError(err, instance, type); - }); - } - return res; - } - if (isArray(fn)) { - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; - } else { - warn$1( - `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` - ); - } - } - function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; - if (instance) { - let cur = instance.parent; - const exposedInstance = instance.proxy; - const errorInfo = ErrorTypeStrings$1[type] ; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - if (errorHandler) { - pauseTracking(); - callWithErrorHandling(errorHandler, null, 10, [ - err, - exposedInstance, - errorInfo - ]); - resetTracking(); - return; - } - } - logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); - } - function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { - { - const info = ErrorTypeStrings$1[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - if (throwInDev) { - throw err; - } else { - console.error(err); - } - } - } - - const queue = []; - let flushIndex = -1; - const pendingPostFlushCbs = []; - let activePostFlushCbs = null; - let postFlushIndex = 0; - const resolvedPromise = /* @__PURE__ */ Promise.resolve(); - let currentFlushPromise = null; - const RECURSION_LIMIT = 100; - function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; - } - function findInsertionIndex(id) { - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = start + end >>> 1; - const middleJob = queue[middle]; - const middleJobId = getId(middleJob); - if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { - start = middle + 1; - } else { - end = middle; - } - } - return start; - } - function queueJob(job) { - if (!(job.flags & 1)) { - const jobId = getId(job); - const lastJob = queue[queue.length - 1]; - if (!lastJob || // fast path when the job id is larger than the tail - !(job.flags & 2) && jobId >= getId(lastJob)) { - queue.push(job); - } else { - queue.splice(findInsertionIndex(jobId), 0, job); - } - job.flags |= 1; - queueFlush(); - } - } - function queueFlush() { - if (!currentFlushPromise) { - currentFlushPromise = resolvedPromise.then(flushJobs); - } - } - function queuePostFlushCb(cb) { - if (!isArray(cb)) { - if (activePostFlushCbs && cb.id === -1) { - activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); - } else if (!(cb.flags & 1)) { - pendingPostFlushCbs.push(cb); - cb.flags |= 1; - } - } else { - pendingPostFlushCbs.push(...cb); - } - queueFlush(); - } - function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { - { - seen = seen || /* @__PURE__ */ new Map(); - } - for (; i < queue.length; i++) { - const cb = queue[i]; - if (cb && cb.flags & 2) { - if (instance && cb.id !== instance.uid) { - continue; - } - if (checkRecursiveUpdates(seen, cb)) { - continue; - } - queue.splice(i, 1); - i--; - if (cb.flags & 4) { - cb.flags &= ~1; - } - cb(); - if (!(cb.flags & 4)) { - cb.flags &= ~1; - } - } - } - } - function flushPostFlushCbs(seen) { - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)].sort( - (a, b) => getId(a) - getId(b) - ); - pendingPostFlushCbs.length = 0; - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - { - seen = seen || /* @__PURE__ */ new Map(); - } - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - const cb = activePostFlushCbs[postFlushIndex]; - if (checkRecursiveUpdates(seen, cb)) { - continue; - } - if (cb.flags & 4) { - cb.flags &= ~1; - } - if (!(cb.flags & 8)) cb(); - cb.flags &= ~1; - } - activePostFlushCbs = null; - postFlushIndex = 0; - } - } - const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; - function flushJobs(seen) { - { - seen = seen || /* @__PURE__ */ new Map(); - } - const check = (job) => checkRecursiveUpdates(seen, job) ; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && !(job.flags & 8)) { - if (check(job)) { - continue; - } - if (job.flags & 4) { - job.flags &= ~1; - } - callWithErrorHandling( - job, - job.i, - job.i ? 15 : 14 - ); - if (!(job.flags & 4)) { - job.flags &= ~1; - } - } - } - } finally { - for (; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job) { - job.flags &= ~1; - } - } - flushIndex = -1; - queue.length = 0; - flushPostFlushCbs(seen); - currentFlushPromise = null; - if (queue.length || pendingPostFlushCbs.length) { - flushJobs(seen); - } - } - } - function checkRecursiveUpdates(seen, fn) { - const count = seen.get(fn) || 0; - if (count > RECURSION_LIMIT) { - const instance = fn.i; - const componentName = instance && getComponentName(instance.type); - handleError( - `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, - null, - 10 - ); - return true; - } - seen.set(fn, count + 1); - return false; - } - - let isHmrUpdating = false; - const hmrDirtyComponents = /* @__PURE__ */ new Map(); - { - getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; - } - const map = /* @__PURE__ */ new Map(); - function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); - } - function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); - } - function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: /* @__PURE__ */ new Set() - }); - return true; - } - function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; - } - function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; - } - record.initialDef.render = newRender; - [...record.instances].forEach((instance) => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); - } - function reload(id, newComp) { - const record = map.get(id); - if (!record) return; - newComp = normalizeClassComponent(newComp); - updateComponentDef(record.initialDef, newComp); - const instances = [...record.instances]; - for (let i = 0; i < instances.length; i++) { - const instance = instances[i]; - const oldComp = normalizeClassComponent(instance.type); - let dirtyInstances = hmrDirtyComponents.get(oldComp); - if (!dirtyInstances) { - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); - } - dirtyInstances.add(instance); - instance.appContext.propsCache.delete(instance.type); - instance.appContext.emitsCache.delete(instance.type); - instance.appContext.optionsCache.delete(instance.type); - if (instance.ceReload) { - dirtyInstances.add(instance); - instance.ceReload(newComp.styles); - dirtyInstances.delete(instance); - } else if (instance.parent) { - queueJob(() => { - isHmrUpdating = true; - instance.parent.update(); - isHmrUpdating = false; - dirtyInstances.delete(instance); - }); - } else if (instance.appContext.reload) { - instance.appContext.reload(); - } else if (typeof window !== "undefined") { - window.location.reload(); - } else { - console.warn( - "[HMR] Root or manually mounted instance modified. Full reload required." - ); - } - if (instance.root.ce && instance !== instance.root) { - instance.root.ce._removeChildStyle(oldComp); - } - } - queuePostFlushCb(() => { - hmrDirtyComponents.clear(); - }); - } - function updateComponentDef(oldComp, newComp) { - extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== "__file" && !(key in newComp)) { - delete oldComp[key]; - } - } - } - function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } catch (e) { - console.error(e); - console.warn( - `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` - ); - } - }; - } - - let devtools$1; - let buffer = []; - let devtoolsNotInstalled = false; - function emit$1(event, ...args) { - if (devtools$1) { - devtools$1.emit(event, ...args); - } else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } - } - function setDevtoolsHook$1(hook, target) { - var _a, _b; - devtools$1 = hook; - if (devtools$1) { - devtools$1.enabled = true; - buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); - buffer = []; - } else if ( - // handle late devtools injection - only do this if we are in an actual - // browser environment to avoid the timer handle stalling test runner exit - // (#4815) - typeof window !== "undefined" && // some envs mock window but not fully - window.HTMLElement && // also exclude jsdom - // eslint-disable-next-line no-restricted-syntax - !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) - ) { - const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; - replay.push((newHook) => { - setDevtoolsHook$1(newHook, target); - }); - setTimeout(() => { - if (!devtools$1) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3e3); - } else { - devtoolsNotInstalled = true; - buffer = []; - } - } - function devtoolsInitApp(app, version) { - emit$1("app:init" /* APP_INIT */, app, version, { - Fragment, - Text, - Comment, - Static - }); - } - function devtoolsUnmountApp(app) { - emit$1("app:unmount" /* APP_UNMOUNT */, app); - } - const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); - const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); - const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( - "component:removed" /* COMPONENT_REMOVED */ - ); - const devtoolsComponentRemoved = (component) => { - if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered - !devtools$1.cleanupBuffer(component)) { - _devtoolsComponentRemoved(component); - } - }; - /*! #__NO_SIDE_EFFECTS__ */ - // @__NO_SIDE_EFFECTS__ - function createDevtoolsComponentHook(hook) { - return (component) => { - emit$1( - hook, - component.appContext.app, - component.uid, - component.parent ? component.parent.uid : void 0, - component - ); - }; - } - const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); - const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); - function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit$1(hook, component.appContext.app, component.uid, component, type, time); - }; - } - function devtoolsComponentEmit(component, event, params) { - emit$1( - "component:emit" /* COMPONENT_EMIT */, - component.appContext.app, - component, - event, - params - ); - } - - let currentRenderingInstance = null; - let currentScopeId = null; - function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = instance && instance.type.__scopeId || null; - return prev; - } - function pushScopeId(id) { - currentScopeId = id; - } - function popScopeId() { - currentScopeId = null; - } - const withScopeId = (_id) => withCtx; - function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { - if (!ctx) return fn; - if (fn._n) { - return fn; - } - const renderFnWithContext = (...args) => { - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - let res; - try { - res = fn(...args); - } finally { - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - } - { - devtoolsComponentUpdated(ctx); - } - return res; - }; - renderFnWithContext._n = true; - renderFnWithContext._c = true; - renderFnWithContext._d = true; - return renderFnWithContext; - } - - function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn$1("Do not use built-in directive ids as custom directive id: " + name); - } - } - function withDirectives(vnode, directives) { - if (currentRenderingInstance === null) { - warn$1(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getComponentPublicInstance(currentRenderingInstance); - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (dir) { - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - } - return vnode; - } - function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } - } - - const TeleportEndKey = Symbol("_vte"); - const isTeleport = (type) => type.__isTeleport; - const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); - const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); - const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; - const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; - const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (isString(targetSelector)) { - if (!select) { - warn$1( - `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` - ); - return null; - } else { - const target = select(targetSelector); - if (!target && !isTeleportDisabled(props)) { - warn$1( - `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` - ); - } - return target; - } - } else { - if (!targetSelector && !isTeleportDisabled(props)) { - warn$1(`Invalid Teleport target: ${targetSelector}`); - } - return targetSelector; - } - }; - const TeleportImpl = { - name: "Teleport", - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { - const { - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - o: { insert, querySelector, createText, createComment } - } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - if (isHmrUpdating) { - optimized = false; - dynamicChildren = null; - } - if (n1 == null) { - const placeholder = n2.el = createComment("teleport start") ; - const mainAnchor = n2.anchor = createComment("teleport end") ; - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const mount = (container2, anchor2) => { - if (shapeFlag & 16) { - if (parentComponent && parentComponent.isCE) { - parentComponent.ce._teleportTarget = container2; - } - mountChildren( - children, - container2, - anchor2, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const mountToTarget = () => { - const target = n2.target = resolveTarget(n2.props, querySelector); - const targetAnchor = prepareAnchor(target, n2, createText, insert); - if (target) { - if (namespace !== "svg" && isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace !== "mathml" && isTargetMathML(target)) { - namespace = "mathml"; - } - if (!disabled) { - mount(target, targetAnchor); - updateCssVars(n2, false); - } - } else if (!disabled) { - warn$1( - "Invalid Teleport target on mount:", - target, - `(${typeof target})` - ); - } - }; - if (disabled) { - mount(container, mainAnchor); - updateCssVars(n2, true); - } - if (isTeleportDeferred(n2.props)) { - queuePostRenderEffect(() => { - mountToTarget(); - n2.el.__isMounted = true; - }, parentSuspense); - } else { - mountToTarget(); - } - } else { - if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { - queuePostRenderEffect(() => { - TeleportImpl.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - delete n1.el.__isMounted; - }, parentSuspense); - return; - } - n2.el = n1.el; - n2.targetStart = n1.targetStart; - const mainAnchor = n2.anchor = n1.anchor; - const target = n2.target = n1.target; - const targetAnchor = n2.targetAnchor = n1.targetAnchor; - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - if (namespace === "svg" || isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace === "mathml" || isTargetMathML(target)) { - namespace = "mathml"; - } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - currentContainer, - parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - traverseStaticChildren(n1, n2, true); - } else if (!optimized) { - patchChildren( - n1, - n2, - currentContainer, - currentAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - false - ); - } - if (disabled) { - if (!wasDisabled) { - moveTeleport( - n2, - container, - mainAnchor, - internals, - 1 - ); - } else { - if (n2.props && n1.props && n2.props.to !== n1.props.to) { - n2.props.to = n1.props.to; - } - } - } else { - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = n2.target = resolveTarget( - n2.props, - querySelector - ); - if (nextTarget) { - moveTeleport( - n2, - nextTarget, - null, - internals, - 0 - ); - } else { - warn$1( - "Invalid Teleport target on update:", - target, - `(${typeof target})` - ); - } - } else if (wasDisabled) { - moveTeleport( - n2, - target, - targetAnchor, - internals, - 1 - ); - } - } - updateCssVars(n2, disabled); - } - }, - remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { - shapeFlag, - children, - anchor, - targetStart, - targetAnchor, - target, - props - } = vnode; - if (target) { - hostRemove(targetStart); - hostRemove(targetAnchor); - } - doRemove && hostRemove(anchor); - if (shapeFlag & 16) { - const shouldRemove = doRemove || !isTeleportDisabled(props); - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount( - child, - parentComponent, - parentSuspense, - shouldRemove, - !!child.dynamicChildren - ); - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport - }; - function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { - if (moveType === 0) { - insert(vnode.targetAnchor, container, parentAnchor); - } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2; - if (isReorder) { - insert(el, container, parentAnchor); - } - if (!isReorder || isTeleportDisabled(props)) { - if (shapeFlag & 16) { - for (let i = 0; i < children.length; i++) { - move( - children[i], - container, - parentAnchor, - 2 - ); - } - } - } - if (isReorder) { - insert(anchor, container, parentAnchor); - } - } - function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { - o: { nextSibling, parentNode, querySelector, insert, createText } - }, hydrateChildren) { - const target = vnode.target = resolveTarget( - vnode.props, - querySelector - ); - if (target) { - const disabled = isTeleportDisabled(vnode.props); - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16) { - if (disabled) { - vnode.anchor = hydrateChildren( - nextSibling(node), - vnode, - parentNode(node), - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - vnode.targetStart = targetNode; - vnode.targetAnchor = targetNode && nextSibling(targetNode); - } else { - vnode.anchor = nextSibling(node); - let targetAnchor = targetNode; - while (targetAnchor) { - if (targetAnchor && targetAnchor.nodeType === 8) { - if (targetAnchor.data === "teleport start anchor") { - vnode.targetStart = targetAnchor; - } else if (targetAnchor.data === "teleport anchor") { - vnode.targetAnchor = targetAnchor; - target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - targetAnchor = nextSibling(targetAnchor); - } - if (!vnode.targetAnchor) { - prepareAnchor(target, vnode, createText, insert); - } - hydrateChildren( - targetNode && nextSibling(targetNode), - vnode, - target, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - } - updateCssVars(vnode, disabled); - } - return vnode.anchor && nextSibling(vnode.anchor); - } - const Teleport = TeleportImpl; - function updateCssVars(vnode, isDisabled) { - const ctx = vnode.ctx; - if (ctx && ctx.ut) { - let node, anchor; - if (isDisabled) { - node = vnode.el; - anchor = vnode.anchor; - } else { - node = vnode.targetStart; - anchor = vnode.targetAnchor; - } - while (node && node !== anchor) { - if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); - node = node.nextSibling; - } - ctx.ut(); - } - } - function prepareAnchor(target, vnode, createText, insert) { - const targetStart = vnode.targetStart = createText(""); - const targetAnchor = vnode.targetAnchor = createText(""); - targetStart[TeleportEndKey] = targetAnchor; - if (target) { - insert(targetStart, target); - insert(targetAnchor, target); - } - return targetAnchor; - } - - const leaveCbKey = Symbol("_leaveCb"); - const enterCbKey$1 = Symbol("_enterCb"); - function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: /* @__PURE__ */ new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; - } - const TransitionHookValidator = [Function, Array]; - const BaseTransitionPropsValidators = { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator - }; - const recursiveGetSubtree = (instance) => { - const subTree = instance.subTree; - return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; - }; - const BaseTransitionImpl = { - name: `BaseTransition`, - props: BaseTransitionPropsValidators, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - const child = findNonCommentChild(children); - const rawProps = toRaw(props); - const { mode } = rawProps; - if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { - warn$1(`invalid <transition> mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - const innerChild = getInnerChild$1(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - let enterHooks = resolveTransitionHooks( - innerChild, - rawProps, - state, - instance, - // #11061, ensure enterHooks is fresh after clone - (hooks) => enterHooks = hooks - ); - if (innerChild.type !== Comment) { - setTransitionHooks(innerChild, enterHooks); - } - let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); - if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { - let leavingHooks = resolveTransitionHooks( - oldInnerChild, - rawProps, - state, - instance - ); - setTransitionHooks(oldInnerChild, leavingHooks); - if (mode === "out-in" && innerChild.type !== Comment) { - state.isLeaving = true; - leavingHooks.afterLeave = () => { - state.isLeaving = false; - if (!(instance.job.flags & 8)) { - instance.update(); - } - delete leavingHooks.afterLeave; - oldInnerChild = void 0; - }; - return emptyPlaceholder(child); - } else if (mode === "in-out" && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType( - state, - oldInnerChild - ); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - el[leaveCbKey] = () => { - earlyRemove(); - el[leaveCbKey] = void 0; - delete enterHooks.delayedLeave; - oldInnerChild = void 0; - }; - enterHooks.delayedLeave = () => { - delayedLeave(); - delete enterHooks.delayedLeave; - oldInnerChild = void 0; - }; - }; - } else { - oldInnerChild = void 0; - } - } else if (oldInnerChild) { - oldInnerChild = void 0; - } - return child; - }; - } - }; - function findNonCommentChild(children) { - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - for (const c of children) { - if (c.type !== Comment) { - if (hasFound) { - warn$1( - "<transition> can only be used on a single element or component. Use <transition-group> for lists." - ); - break; - } - child = c; - hasFound = true; - } - } - } - return child; - } - const BaseTransition = BaseTransitionImpl; - function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = /* @__PURE__ */ Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; - } - function resolveTransitionHooks(vnode, props, state, instance, postClone) { - const { - appear, - mode, - persisted = false, - onBeforeEnter, - onEnter, - onAfterEnter, - onEnterCancelled, - onBeforeLeave, - onLeave, - onAfterLeave, - onLeaveCancelled, - onBeforeAppear, - onAppear, - onAfterAppear, - onAppearCancelled - } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && callWithAsyncErrorHandling( - hook, - instance, - 9, - args - ); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (isArray(hook)) { - if (hook.every((hook2) => hook2.length <= 1)) done(); - } else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } else { - return; - } - } - if (el[leaveCbKey]) { - el[leaveCbKey]( - true - /* cancelled */ - ); - } - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { - leavingVNode.el[leaveCbKey](); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } else { - return; - } - } - let called = false; - const done = el[enterCbKey$1] = (cancelled) => { - if (called) return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el[enterCbKey$1] = void 0; - }; - if (hook) { - callAsyncHook(hook, [el, done]); - } else { - done(); - } - }, - leave(el, remove) { - const key2 = String(vnode.key); - if (el[enterCbKey$1]) { - el[enterCbKey$1]( - true - /* cancelled */ - ); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = el[leaveCbKey] = (cancelled) => { - if (called) return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } else { - callHook(onAfterLeave, [el]); - } - el[leaveCbKey] = void 0; - if (leavingVNodesCache[key2] === vnode) { - delete leavingVNodesCache[key2]; - } - }; - leavingVNodesCache[key2] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } else { - done(); - } - }, - clone(vnode2) { - const hooks2 = resolveTransitionHooks( - vnode2, - props, - state, - instance, - postClone - ); - if (postClone) postClone(hooks2); - return hooks2; - } - }; - return hooks; - } - function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; - } - } - function getInnerChild$1(vnode) { - if (!isKeepAlive(vnode)) { - if (isTeleport(vnode.type) && vnode.children) { - return findNonCommentChild(vnode.children); - } - return vnode; - } - if (vnode.component) { - return vnode.component.subTree; - } - const { shapeFlag, children } = vnode; - if (children) { - if (shapeFlag & 16) { - return children[0]; - } - if (shapeFlag & 32 && isFunction(children.default)) { - return children.default(); - } - } - } - function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 && vnode.component) { - vnode.transition = hooks; - setTransitionHooks(vnode.component.subTree, hooks); - } else if (vnode.shapeFlag & 128) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } else { - vnode.transition = hooks; - } - } - function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); - if (child.type === Fragment) { - if (child.patchFlag & 128) keyedFragmentCount++; - ret = ret.concat( - getTransitionRawChildren(child.children, keepComment, key) - ); - } else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } - } - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2; - } - } - return ret; - } - - /*! #__NO_SIDE_EFFECTS__ */ - // @__NO_SIDE_EFFECTS__ - function defineComponent(options, extraOptions) { - return isFunction(options) ? ( - // #8236: extend call and options.name access are considered side-effects - // by Rollup, so we have to wrap it in a pure-annotated IIFE. - /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() - ) : options; - } - - function useId() { - const i = getCurrentInstance(); - if (i) { - return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; - } else { - warn$1( - `useId() is called when there is no active component instance to be associated with.` - ); - } - return ""; - } - function markAsyncBoundary(instance) { - instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; - } - - const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); - function useTemplateRef(key) { - const i = getCurrentInstance(); - const r = shallowRef(null); - if (i) { - const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs; - let desc; - if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { - warn$1(`useTemplateRef('${key}') already exists.`); - } else { - Object.defineProperty(refs, key, { - enumerable: true, - get: () => r.value, - set: (val) => r.value = val - }); - } - } else { - warn$1( - `useTemplateRef() is called when there is no active component instance to be associated with.` - ); - } - const ret = readonly(r) ; - { - knownTemplateRefs.add(ret); - } - return ret; - } - - function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray(rawRef)) { - rawRef.forEach( - (r, i) => setRef( - r, - oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), - parentSuspense, - vnode, - isUnmount - ) - ); - return; - } - if (isAsyncWrapper(vnode) && !isUnmount) { - if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { - setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); - } - return; - } - const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if (!owner) { - warn$1( - `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` - ); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; - const setupState = owner.setupState; - const rawSetupState = toRaw(setupState); - const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { - { - if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) { - warn$1( - `Template ref "${key}" used on a non-ref value. It will not work in the production build.` - ); - } - if (knownTemplateRefs.has(rawSetupState[key])) { - return false; - } - } - return hasOwn(rawSetupState, key); - }; - if (oldRef != null && oldRef !== ref) { - if (isString(oldRef)) { - refs[oldRef] = null; - if (canSetSetupRef(oldRef)) { - setupState[oldRef] = null; - } - } else if (isRef(oldRef)) { - oldRef.value = null; - } - } - if (isFunction(ref)) { - callWithErrorHandling(ref, owner, 12, [value, refs]); - } else { - const _isString = isString(ref); - const _isRef = isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; - if (isUnmount) { - isArray(existing) && remove(existing, refValue); - } else { - if (!isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (canSetSetupRef(ref)) { - setupState[ref] = refs[ref]; - } - } else { - ref.value = [refValue]; - if (rawRef.k) refs[rawRef.k] = ref.value; - } - } else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } else if (_isString) { - refs[ref] = value; - if (canSetSetupRef(ref)) { - setupState[ref] = value; - } - } else if (_isRef) { - ref.value = value; - if (rawRef.k) refs[rawRef.k] = value; - } else { - warn$1("Invalid template ref type:", ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } else { - doSet(); - } - } else { - warn$1("Invalid template ref type:", ref, `(${typeof ref})`); - } - } - } - - let hasLoggedMismatchError = false; - const logMismatchError = () => { - if (hasLoggedMismatchError) { - return; - } - console.error("Hydration completed but contains mismatches."); - hasLoggedMismatchError = true; - }; - const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; - const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); - const getContainerType = (container) => { - if (container.nodeType !== 1) return void 0; - if (isSVGContainer(container)) return "svg"; - if (isMathMLContainer(container)) return "mathml"; - return void 0; - }; - const isComment = (node) => node.nodeType === 8; - function createHydrationFunctions(rendererInternals) { - const { - mt: mountComponent, - p: patch, - o: { - patchProp, - createText, - nextSibling, - parentNode, - remove, - insert, - createComment - } - } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - warn$1( - `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` - ); - patch(null, vnode, container); - flushPostFlushCbs(); - container._vnode = vnode; - return; - } - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - container._vnode = vnode; - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - optimized = optimized || !!vnode.dynamicChildren; - const isFragmentStart = isComment(node) && node.data === "["; - const onMismatch = () => handleMismatch( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - isFragmentStart - ); - const { type, ref, shapeFlag, patchFlag } = vnode; - let domType = node.nodeType; - vnode.el = node; - { - def(node, "__vnode", vnode, true); - def(node, "__vueParentComponent", parentComponent, true); - } - if (patchFlag === -2) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3) { - if (vnode.children === "") { - insert(vnode.el = createText(""), parentNode(node), node); - nextNode = node; - } else { - nextNode = onMismatch(); - } - } else { - if (node.data !== vnode.children) { - warn$1( - `Hydration text mismatch in`, - node.parentNode, - ` - - rendered on server: ${JSON.stringify( - node.data - )} - - expected on client: ${JSON.stringify(vnode.children)}` - ); - logMismatchError(); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (isTemplateNode(node)) { - nextNode = nextSibling(node); - replaceNode( - vnode.el = node.content.firstChild, - node, - parentComponent - ); - } else if (domType !== 8 || isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = nextSibling(node); - } - break; - case Static: - if (isFragmentStart) { - node = nextSibling(node); - domType = node.nodeType; - } - if (domType === 1 || domType === 3) { - nextNode = node; - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return isFragmentStart ? nextSibling(nextNode) : nextNode; - } else { - onMismatch(); - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = hydrateFragment( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - break; - default: - if (shapeFlag & 1) { - if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { - nextNode = onMismatch(); - } else { - nextNode = hydrateElement( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - } else if (shapeFlag & 6) { - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - if (isFragmentStart) { - nextNode = locateClosingAnchor(node); - } else if (isComment(node) && node.data === "teleport start") { - nextNode = locateClosingAnchor(node, node.data, "teleport end"); - } else { - nextNode = nextSibling(node); - } - mountComponent( - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - optimized - ); - if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; - } else { - subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } else if (shapeFlag & 64) { - if (domType !== 8) { - nextNode = onMismatch(); - } else { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized, - rendererInternals, - hydrateChildren - ); - } - } else if (shapeFlag & 128) { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - getContainerType(parentNode(node)), - slotScopeIds, - optimized, - rendererInternals, - hydrateNode - ); - } else { - warn$1("Invalid HostVNode type:", type, `(${typeof type})`); - } - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; - const forcePatch = type === "input" || type === "option"; - { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - let needCallTransitionHooks = false; - if (isTemplateNode(el)) { - needCallTransitionHooks = needTransition( - null, - // no need check parentSuspense in hydration - transition - ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; - const content = el.content.firstChild; - if (needCallTransitionHooks) { - transition.beforeEnter(content); - } - replaceNode(content, el, parentComponent); - vnode.el = el = content; - } - if (shapeFlag & 16 && // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren( - el.firstChild, - vnode, - el, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - let hasWarned = false; - while (next) { - if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { - if (!hasWarned) { - warn$1( - `Hydration children mismatch on`, - el, - ` -Server rendered element contains more child nodes than client vdom.` - ); - hasWarned = true; - } - logMismatchError(); - } - const cur = next; - next = next.nextSibling; - remove(cur); - } - } else if (shapeFlag & 8) { - let clientText = vnode.children; - if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { - clientText = clientText.slice(1); - } - if (el.textContent !== clientText) { - if (!isMismatchAllowed(el, 0 /* TEXT */)) { - warn$1( - `Hydration text content mismatch on`, - el, - ` - - rendered on server: ${el.textContent} - - expected on client: ${vnode.children}` - ); - logMismatchError(); - } - el.textContent = vnode.children; - } - } - if (props) { - { - const isCustomElement = el.tagName.includes("-"); - for (const key in props) { - if (// #11189 skip if this node has directives that have created hooks - // as it could have mutated the DOM in any possible way - !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { - logMismatchError(); - } - if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers - key[0] === "." || isCustomElement) { - patchProp(el, key, null, props[key], void 0, parentComponent); - } - } - } - } - let vnodeHooks; - if (vnodeHooks = props && props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); - const isText = vnode.type === Text; - if (node) { - if (isText && !optimized) { - if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { - insert( - createText( - node.data.slice(vnode.children.length) - ), - container, - nextSibling(node) - ); - node.data = vnode.children; - } - } - node = hydrateNode( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } else if (isText && !vnode.children) { - insert(vnode.el = createText(""), container); - } else { - if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { - if (!hasWarned) { - warn$1( - `Hydration children mismatch on`, - container, - ` -Server rendered element contains fewer child nodes than client vdom.` - ); - hasWarned = true; - } - logMismatchError(); - } - patch( - null, - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren( - nextSibling(node), - vnode, - container, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - if (next && isComment(next) && next.data === "]") { - return nextSibling(vnode.anchor = next); - } else { - logMismatchError(); - insert(vnode.anchor = createComment(`]`), container, next); - return next; - } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { - if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { - warn$1( - `Hydration node mismatch: -- rendered on server:`, - node, - node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, - ` -- expected on client:`, - vnode.type - ); - logMismatchError(); - } - vnode.el = null; - if (isFragment) { - const end = locateClosingAnchor(node); - while (true) { - const next2 = nextSibling(node); - if (next2 && next2 !== end) { - remove(next2); - } else { - break; - } - } - } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch( - null, - vnode, - container, - next, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - if (parentComponent) { - parentComponent.vnode.el = vnode.el; - updateHOCHostEl(parentComponent, vnode.el); - } - return next; - }; - const locateClosingAnchor = (node, open = "[", close = "]") => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === open) match++; - if (node.data === close) { - if (match === 0) { - return nextSibling(node); - } else { - match--; - } - } - } - } - return node; - }; - const replaceNode = (newNode, oldNode, parentComponent) => { - const parentNode2 = oldNode.parentNode; - if (parentNode2) { - parentNode2.replaceChild(newNode, oldNode); - } - let parent = parentComponent; - while (parent) { - if (parent.vnode.el === oldNode) { - parent.vnode.el = parent.subTree.el = newNode; - } - parent = parent.parent; - } - }; - const isTemplateNode = (node) => { - return node.nodeType === 1 && node.tagName === "TEMPLATE"; - }; - return [hydrate, hydrateNode]; - } - function propHasMismatch(el, key, clientValue, vnode, instance) { - let mismatchType; - let mismatchKey; - let actual; - let expected; - if (key === "class") { - actual = el.getAttribute("class"); - expected = normalizeClass(clientValue); - if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { - mismatchType = 2 /* CLASS */; - mismatchKey = `class`; - } - } else if (key === "style") { - actual = el.getAttribute("style") || ""; - expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); - const actualMap = toStyleMap(actual); - const expectedMap = toStyleMap(expected); - if (vnode.dirs) { - for (const { dir, value } of vnode.dirs) { - if (dir.name === "show" && !value) { - expectedMap.set("display", "none"); - } - } - } - if (instance) { - resolveCssVars(instance, vnode, expectedMap); - } - if (!isMapEqual(actualMap, expectedMap)) { - mismatchType = 3 /* STYLE */; - mismatchKey = "style"; - } - } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { - if (isBooleanAttr(key)) { - actual = el.hasAttribute(key); - expected = includeBooleanAttr(clientValue); - } else if (clientValue == null) { - actual = el.hasAttribute(key); - expected = false; - } else { - if (el.hasAttribute(key)) { - actual = el.getAttribute(key); - } else if (key === "value" && el.tagName === "TEXTAREA") { - actual = el.value; - } else { - actual = false; - } - expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; - } - if (actual !== expected) { - mismatchType = 4 /* ATTRIBUTE */; - mismatchKey = key; - } - } - if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { - const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; - const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; - const postSegment = ` - - rendered on server: ${format(actual)} - - expected on client: ${format(expected)} - Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. - You should fix the source of the mismatch.`; - { - warn$1(preSegment, el, postSegment); - } - return true; - } - return false; - } - function toClassSet(str) { - return new Set(str.trim().split(/\s+/)); - } - function isSetEqual(a, b) { - if (a.size !== b.size) { - return false; - } - for (const s of a) { - if (!b.has(s)) { - return false; - } - } - return true; - } - function toStyleMap(str) { - const styleMap = /* @__PURE__ */ new Map(); - for (const item of str.split(";")) { - let [key, value] = item.split(":"); - key = key.trim(); - value = value && value.trim(); - if (key && value) { - styleMap.set(key, value); - } - } - return styleMap; - } - function isMapEqual(a, b) { - if (a.size !== b.size) { - return false; - } - for (const [key, value] of a) { - if (value !== b.get(key)) { - return false; - } - } - return true; - } - function resolveCssVars(instance, vnode, expectedMap) { - const root = instance.subTree; - if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { - const cssVars = instance.getCssVars(); - for (const key in cssVars) { - expectedMap.set( - `--${getEscapedCssVarName(key)}`, - String(cssVars[key]) - ); - } - } - if (vnode === root && instance.parent) { - resolveCssVars(instance.parent, instance.vnode, expectedMap); - } - } - const allowMismatchAttr = "data-allow-mismatch"; - const MismatchTypeString = { - [0 /* TEXT */]: "text", - [1 /* CHILDREN */]: "children", - [2 /* CLASS */]: "class", - [3 /* STYLE */]: "style", - [4 /* ATTRIBUTE */]: "attribute" - }; - function isMismatchAllowed(el, allowedType) { - if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { - while (el && !el.hasAttribute(allowMismatchAttr)) { - el = el.parentElement; - } - } - const allowedAttr = el && el.getAttribute(allowMismatchAttr); - if (allowedAttr == null) { - return false; - } else if (allowedAttr === "") { - return true; - } else { - const list = allowedAttr.split(","); - if (allowedType === 0 /* TEXT */ && list.includes("children")) { - return true; - } - return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); - } - } - - const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); - const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); - const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { - const id = requestIdleCallback(hydrate, { timeout }); - return () => cancelIdleCallback(id); - }; - function elementIsVisibleInViewport(el) { - const { top, left, bottom, right } = el.getBoundingClientRect(); - const { innerHeight, innerWidth } = window; - return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); - } - const hydrateOnVisible = (opts) => (hydrate, forEach) => { - const ob = new IntersectionObserver((entries) => { - for (const e of entries) { - if (!e.isIntersecting) continue; - ob.disconnect(); - hydrate(); - break; - } - }, opts); - forEach((el) => { - if (!(el instanceof Element)) return; - if (elementIsVisibleInViewport(el)) { - hydrate(); - ob.disconnect(); - return false; - } - ob.observe(el); - }); - return () => ob.disconnect(); - }; - const hydrateOnMediaQuery = (query) => (hydrate) => { - if (query) { - const mql = matchMedia(query); - if (mql.matches) { - hydrate(); - } else { - mql.addEventListener("change", hydrate, { once: true }); - return () => mql.removeEventListener("change", hydrate); - } - } - }; - const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { - if (isString(interactions)) interactions = [interactions]; - let hasHydrated = false; - const doHydrate = (e) => { - if (!hasHydrated) { - hasHydrated = true; - teardown(); - hydrate(); - e.target.dispatchEvent(new e.constructor(e.type, e)); - } - }; - const teardown = () => { - forEach((el) => { - for (const i of interactions) { - el.removeEventListener(i, doHydrate); - } - }); - }; - forEach((el) => { - for (const i of interactions) { - el.addEventListener(i, doHydrate, { once: true }); - } - }); - return teardown; - }; - function forEachElement(node, cb) { - if (isComment(node) && node.data === "[") { - let depth = 1; - let next = node.nextSibling; - while (next) { - if (next.nodeType === 1) { - const result = cb(next); - if (result === false) { - break; - } - } else if (isComment(next)) { - if (next.data === "]") { - if (--depth === 0) break; - } else if (next.data === "[") { - depth++; - } - } - next = next.nextSibling; - } - } else { - cb(node); - } - } - - const isAsyncWrapper = (i) => !!i.type.__asyncLoader; - /*! #__NO_SIDE_EFFECTS__ */ - // @__NO_SIDE_EFFECTS__ - function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; - } - const { - loader, - loadingComponent, - errorComponent, - delay = 200, - hydrate: hydrateStrategy, - timeout, - // undefined = never times out - suspensible = true, - onError: userOnError - } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; - pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } else { - throw err; - } - }).then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!comp) { - warn$1( - `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` - ); - } - if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { - comp = comp.default; - } - if (comp && !isObject(comp) && !isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - })); - }; - return defineComponent({ - name: "AsyncComponentWrapper", - __asyncLoader: load, - __asyncHydrate(el, instance, hydrate) { - const doHydrate = hydrateStrategy ? () => { - const teardown = hydrateStrategy( - hydrate, - (cb) => forEachElement(el, cb) - ); - if (teardown) { - (instance.bum || (instance.bum = [])).push(teardown); - } - } : hydrate; - if (resolvedComp) { - doHydrate(); - } else { - load().then(() => !instance.isUnmounted && doHydrate()); - } - }, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - markAsyncBoundary(instance); - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError( - err, - instance, - 13, - !errorComponent - ); - }; - if (suspensible && instance.suspense || false) { - return load().then((comp) => { - return () => createInnerComp(comp, instance); - }).catch((err) => { - onError(err); - return () => errorComponent ? createVNode(errorComponent, { - error: err - }) : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error( - `Async component timed out after ${timeout}ms.` - ); - onError(err); - error.value = err; - } - }, timeout); - } - load().then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - instance.parent.update(); - } - }).catch((err) => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; - } - }); - } - function createInnerComp(comp, parent) { - const { ref: ref2, props, children, ce } = parent.vnode; - const vnode = createVNode(comp, props, children); - vnode.ref = ref2; - vnode.ce = ce; - delete parent.vnode.ce; - return vnode; - } - - const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; - const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const sharedContext = instance.ctx; - const cache = /* @__PURE__ */ new Map(); - const keys = /* @__PURE__ */ new Set(); - let current = null; - { - instance.__v_cache = cache; - } - const parentSuspense = instance.suspense; - const { - renderer: { - p: patch, - m: move, - um: _unmount, - o: { createElement } - } - } = sharedContext; - const storageContainer = createElement("div"); - sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { - const instance2 = vnode.component; - move(vnode, container, anchor, 0, parentSuspense); - patch( - instance2.vnode, - vnode, - container, - anchor, - instance2, - parentSuspense, - namespace, - vnode.slotScopeIds, - optimized - ); - queuePostRenderEffect(() => { - instance2.isDeactivated = false; - if (instance2.a) { - invokeArrayFns(instance2.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - }, parentSuspense); - { - devtoolsComponentAdded(instance2); - } - }; - sharedContext.deactivate = (vnode) => { - const instance2 = vnode.component; - invalidateMount(instance2.m); - invalidateMount(instance2.a); - move(vnode, storageContainer, null, 1, parentSuspense); - queuePostRenderEffect(() => { - if (instance2.da) { - invokeArrayFns(instance2.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - instance2.isDeactivated = true; - }, parentSuspense); - { - devtoolsComponentAdded(instance2); - } - }; - function unmount(vnode) { - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && !filter(name)) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (cached && (!current || !isSameVNodeType(cached, current))) { - unmount(cached); - } else if (current) { - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - watch( - () => [props.include, props.exclude], - ([include, exclude]) => { - include && pruneCache((name) => matches(include, name)); - exclude && pruneCache((name) => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: "post", deep: true } - ); - let pendingCacheKey = null; - const cacheSubtree = () => { - if (pendingCacheKey != null) { - if (isSuspense(instance.subTree.type)) { - queuePostRenderEffect(() => { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - }, instance.subTree.suspense); - } else { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach((cached) => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type && cached.key === vnode.key) { - resetShapeFlag(vnode); - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return current = null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - { - warn$1(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - if (vnode.type === Comment) { - current = null; - return vnode; - } - const comp = vnode.type; - const name = getComponentName( - isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp - ); - const { include, exclude, max } = props; - if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { - vnode.shapeFlag &= ~256; - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128) { - rawVNode.ssContent = vnode; - } - } - pendingCacheKey = key; - if (cachedVNode) { - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - setTransitionHooks(vnode, vnode.transition); - } - vnode.shapeFlag |= 512; - keys.delete(key); - keys.add(key); - } else { - keys.add(key); - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - vnode.shapeFlag |= 256; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; - } - }; - const KeepAlive = KeepAliveImpl; - function matches(pattern, name) { - if (isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } else if (isString(pattern)) { - return pattern.split(",").includes(name); - } else if (isRegExp(pattern)) { - pattern.lastIndex = 0; - return pattern.test(name); - } - return false; - } - function onActivated(hook, target) { - registerKeepAliveHook(hook, "a", target); - } - function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da", target); - } - function registerKeepAliveHook(hook, type, target = currentInstance) { - const wrappedHook = hook.__wdc || (hook.__wdc = () => { - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } - } - } - function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - const injected = injectHook( - type, - hook, - keepAliveRoot, - true - /* prepend */ - ); - onUnmounted(() => { - remove(keepAliveRoot[type], injected); - }, target); - } - function resetShapeFlag(vnode) { - vnode.shapeFlag &= ~256; - vnode.shapeFlag &= ~512; - } - function getInnerChild(vnode) { - return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; - } - - function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - const wrappedHook = hook.__weh || (hook.__weh = (...args) => { - pauseTracking(); - const reset = setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - reset(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } else { - hooks.push(wrappedHook); - } - return wrappedHook; - } else { - const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); - warn$1( - `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) - ); - } - } - const createHook = (lifecycle) => (hook, target = currentInstance) => { - if (!isInSSRComponentSetup || lifecycle === "sp") { - injectHook(lifecycle, (...args) => hook(...args), target); - } - }; - const onBeforeMount = createHook("bm"); - const onMounted = createHook("m"); - const onBeforeUpdate = createHook( - "bu" - ); - const onUpdated = createHook("u"); - const onBeforeUnmount = createHook( - "bum" - ); - const onUnmounted = createHook("um"); - const onServerPrefetch = createHook( - "sp" - ); - const onRenderTriggered = createHook("rtg"); - const onRenderTracked = createHook("rtc"); - function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec", hook, target); - } - - const COMPONENTS = "components"; - const DIRECTIVES = "directives"; - function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; - } - const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); - function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } else { - return component || NULL_DYNAMIC_COMPONENT; - } - } - function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); - } - function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - if (type === COMPONENTS) { - const selfName = getComponentName( - Component, - false - ); - if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = ( - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || // global registration - resolve(instance.appContext[type], name) - ); - if (!res && maybeSelfReference) { - return Component; - } - if (warnMissing && !res) { - const extra = type === COMPONENTS ? ` -If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; - warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } else { - warn$1( - `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` - ); - } - } - function resolve(registry, name) { - return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); - } - - function renderList(source, renderItem, cache, index) { - let ret; - const cached = cache && cache[index]; - const sourceIsArray = isArray(source); - if (sourceIsArray || isString(source)) { - const sourceIsReactiveArray = sourceIsArray && isReactive(source); - let needsWrap = false; - if (sourceIsReactiveArray) { - needsWrap = !isShallow(source); - source = shallowReadArray(source); - } - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem( - needsWrap ? toReactive(source[i]) : source[i], - i, - void 0, - cached && cached[i] - ); - } - } else if (typeof source === "number") { - if (!Number.isInteger(source)) { - warn$1(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); - } - } else if (isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from( - source, - (item, i) => renderItem(item, i, void 0, cached && cached[i]) - ); - } else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } - } else { - ret = []; - } - if (cache) { - cache[index] = ret; - } - return ret; - } - - function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - if (isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } else if (slot) { - slots[slot.name] = slot.key ? (...args) => { - const res = slot.fn(...args); - if (res) res.key = slot.key; - return res; - } : slot.fn; - } - } - return slots; - } - - function renderSlot(slots, name, props = {}, fallback, noSlotted) { - if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { - if (name !== "default") props.name = name; - return openBlock(), createBlock( - Fragment, - null, - [createVNode("slot", props, fallback && fallback())], - 64 - ); - } - let slot = slots[name]; - if (slot && slot.length > 1) { - warn$1( - `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` - ); - slot = () => []; - } - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch - // key attached in the `createSlots` helper, respect that - validSlotContent && validSlotContent.key; - const rendered = createBlock( - Fragment, - { - key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content - (!validSlotContent && fallback ? "_fb" : "") - }, - validSlotContent || (fallback ? fallback() : []), - validSlotContent && slots._ === 1 ? 64 : -2 - ); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + "-s"]; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; - } - function ensureValidVNode(vnodes) { - return vnodes.some((child) => { - if (!isVNode(child)) return true; - if (child.type === Comment) return false; - if (child.type === Fragment && !ensureValidVNode(child.children)) - return false; - return true; - }) ? vnodes : null; - } - - function toHandlers(obj, preserveCaseIfNecessary) { - const ret = {}; - if (!isObject(obj)) { - warn$1(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; - } - return ret; - } - - const getPublicInstance = (i) => { - if (!i) return null; - if (isStatefulComponent(i)) return getComponentPublicInstance(i); - return getPublicInstance(i.parent); - }; - const publicPropertiesMap = ( - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { - $: (i) => i, - $el: (i) => i.vnode.el, - $data: (i) => i.data, - $props: (i) => shallowReadonly(i.props) , - $attrs: (i) => shallowReadonly(i.attrs) , - $slots: (i) => shallowReadonly(i.slots) , - $refs: (i) => shallowReadonly(i.refs) , - $parent: (i) => getPublicInstance(i.parent), - $root: (i) => getPublicInstance(i.root), - $host: (i) => i.ce, - $emit: (i) => i.emit, - $options: (i) => resolveMergedOptions(i) , - $forceUpdate: (i) => i.f || (i.f = () => { - queueJob(i.update); - }), - $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: (i) => instanceWatch.bind(i) - }) - ); - const isReservedPrefix = (key) => key === "_" || key === "$"; - const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); - const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - if (key === "__v_skip") { - return true; - } - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - if (key === "__isVue") { - return true; - } - let normalizedProps; - if (key[0] !== "$") { - const n = accessCache[key]; - if (n !== void 0) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - } - } else if (hasSetupBinding(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) - ) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } else if (shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - if (publicGetter) { - if (key === "$attrs") { - track(instance.attrs, "get", ""); - markAttrsAccessed(); - } else if (key === "$slots") { - track(instance, "get", key); - } - return publicGetter(instance); - } else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && (cssModule = cssModule[key]) - ) { - return cssModule; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } else if ( - // global properties - globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) - ) { - { - return globalProperties[key]; - } - } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf("__v") !== 0)) { - if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { - warn$1( - `Property ${JSON.stringify( - key - )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` - ); - } else if (instance === currentRenderingInstance) { - warn$1( - `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` - ); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (hasSetupBinding(setupState, key)) { - setupState[key] = value; - return true; - } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { - warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); - return false; - } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - data[key] = value; - return true; - } else if (hasOwn(instance.props, key)) { - warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); - return false; - } - if (key[0] === "$" && key.slice(1) in instance) { - warn$1( - `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` - ); - return false; - } else { - if (key in instance.appContext.config.globalProperties) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - value - }); - } else { - ctx[key] = value; - } - } - return true; - }, - has({ - _: { data, setupState, accessCache, ctx, appContext, propsOptions } - }, key) { - let normalizedProps; - return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - target._.accessCache[key] = 0; - } else if (hasOwn(descriptor, "value")) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); - } - }; - { - PublicInstanceProxyHandlers.ownKeys = (target) => { - warn$1( - `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` - ); - return Reflect.ownKeys(target); - }; - } - const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, { - get(target, key) { - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); - }, - has(_, key) { - const has = key[0] !== "_" && !isGloballyAllowed(key); - if (!has && PublicInstanceProxyHandlers.has(_, key)) { - warn$1( - `Property ${JSON.stringify( - key - )} should not start with _ which is a reserved prefix for Vue internals.` - ); - } - return has; - } - }); - function createDevRenderContext(instance) { - const target = {}; - Object.defineProperty(target, `_`, { - configurable: true, - enumerable: false, - get: () => instance - }); - Object.keys(publicPropertiesMap).forEach((key) => { - Object.defineProperty(target, key, { - configurable: true, - enumerable: false, - get: () => publicPropertiesMap[key](instance), - // intercepted by the proxy so no need for implementation, - // but needed to prevent set errors - set: NOOP - }); - }); - return target; - } - function exposePropsOnRenderContext(instance) { - const { - ctx, - propsOptions: [propsOptions] - } = instance; - if (propsOptions) { - Object.keys(propsOptions).forEach((key) => { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => instance.props[key], - set: NOOP - }); - }); - } - } - function exposeSetupStateOnRenderContext(instance) { - const { ctx, setupState } = instance; - Object.keys(toRaw(setupState)).forEach((key) => { - if (!setupState.__isScriptSetup) { - if (isReservedPrefix(key[0])) { - warn$1( - `setup() return property ${JSON.stringify( - key - )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` - ); - return; - } - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => setupState[key], - set: NOOP - }); - } - }); - } - - const warnRuntimeUsage = (method) => warn$1( - `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` - ); - function defineProps() { - { - warnRuntimeUsage(`defineProps`); - } - return null; - } - function defineEmits() { - { - warnRuntimeUsage(`defineEmits`); - } - return null; - } - function defineExpose(exposed) { - { - warnRuntimeUsage(`defineExpose`); - } - } - function defineOptions(options) { - { - warnRuntimeUsage(`defineOptions`); - } - } - function defineSlots() { - { - warnRuntimeUsage(`defineSlots`); - } - return null; - } - function defineModel() { - { - warnRuntimeUsage("defineModel"); - } - } - function withDefaults(props, defaults) { - { - warnRuntimeUsage(`withDefaults`); - } - return null; - } - function useSlots() { - return getContext().slots; - } - function useAttrs() { - return getContext().attrs; - } - function getContext() { - const i = getCurrentInstance(); - if (!i) { - warn$1(`useContext() called without active instance.`); - } - return i.setupContext || (i.setupContext = createSetupContext(i)); - } - function normalizePropsOrEmits(props) { - return isArray(props) ? props.reduce( - (normalized, p) => (normalized[p] = null, normalized), - {} - ) : props; - } - function mergeDefaults(raw, defaults) { - const props = normalizePropsOrEmits(raw); - for (const key in defaults) { - if (key.startsWith("__skip")) continue; - let opt = props[key]; - if (opt) { - if (isArray(opt) || isFunction(opt)) { - opt = props[key] = { type: opt, default: defaults[key] }; - } else { - opt.default = defaults[key]; - } - } else if (opt === null) { - opt = props[key] = { default: defaults[key] }; - } else { - warn$1(`props default key "${key}" has no corresponding declaration.`); - } - if (opt && defaults[`__skip_${key}`]) { - opt.skipFactory = true; - } - } - return props; - } - function mergeModels(a, b) { - if (!a || !b) return a || b; - if (isArray(a) && isArray(b)) return a.concat(b); - return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); - } - function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; - } - function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - if (!ctx) { - warn$1( - `withAsyncContext called without active current instance. This is likely a bug.` - ); - } - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (isPromise(awaitable)) { - awaitable = awaitable.catch((e) => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; - } - - function createDuplicateChecker() { - const cache = /* @__PURE__ */ Object.create(null); - return (type, key) => { - if (cache[key]) { - warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); - } else { - cache[key] = type; - } - }; - } - let shouldCacheAccess = true; - function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - shouldCacheAccess = false; - if (options.beforeCreate) { - callHook$1(options.beforeCreate, instance, "bc"); - } - const { - // state - data: dataOptions, - computed: computedOptions, - methods, - watch: watchOptions, - provide: provideOptions, - inject: injectOptions, - // lifecycle - created, - beforeMount, - mounted, - beforeUpdate, - updated, - activated, - deactivated, - beforeDestroy, - beforeUnmount, - destroyed, - unmounted, - render, - renderTracked, - renderTriggered, - errorCaptured, - serverPrefetch, - // public API - expose, - inheritAttrs, - // assets - components, - directives, - filters - } = options; - const checkDuplicateProperties = createDuplicateChecker() ; - { - const [propsOptions] = instance.propsOptions; - if (propsOptions) { - for (const key in propsOptions) { - checkDuplicateProperties("Props" /* PROPS */, key); - } - } - } - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (isFunction(methodHandler)) { - { - Object.defineProperty(ctx, key, { - value: methodHandler.bind(publicThis), - configurable: true, - enumerable: true, - writable: true - }); - } - { - checkDuplicateProperties("Methods" /* METHODS */, key); - } - } else { - warn$1( - `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` - ); - } - } - } - if (dataOptions) { - if (!isFunction(dataOptions)) { - warn$1( - `The data option must be a function. Plain object usage is no longer supported.` - ); - } - const data = dataOptions.call(publicThis, publicThis); - if (isPromise(data)) { - warn$1( - `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` - ); - } - if (!isObject(data)) { - warn$1(`data() should return an object.`); - } else { - instance.data = reactive(data); - { - for (const key in data) { - checkDuplicateProperties("Data" /* DATA */, key); - if (!isReservedPrefix(key[0])) { - Object.defineProperty(ctx, key, { - configurable: true, - enumerable: true, - get: () => data[key], - set: NOOP - }); - } - } - } - } - } - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; - if (get === NOOP) { - warn$1(`Computed property "${key}" has no getter.`); - } - const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { - warn$1( - `Write operation failed: computed property "${key}" is readonly.` - ); - } ; - const c = computed({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: (v) => c.value = v - }); - { - checkDuplicateProperties("Computed" /* COMPUTED */, key); - } - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; - Reflect.ownKeys(provides).forEach((key) => { - provide(key, provides[key]); - }); - } - if (created) { - callHook$1(created, instance, "c"); - } - function registerLifecycleHook(register, hook) { - if (isArray(hook)) { - hook.forEach((_hook) => register(_hook.bind(publicThis))); - } else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach((key) => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: (val) => publicThis[key] = val - }); - }); - } else if (!instance.exposed) { - instance.exposed = {}; - } - } - if (render && instance.render === NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - if (components) instance.components = components; - if (directives) instance.directives = directives; - } - function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { - if (isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (isObject(opt)) { - if ("default" in opt) { - injected = inject( - opt.from || key, - opt.default, - true - ); - } else { - injected = inject(opt.from || key); - } - } else { - injected = inject(opt); - } - if (isRef(injected)) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: (v) => injected.value = v - }); - } else { - ctx[key] = injected; - } - { - checkDuplicateProperties("Inject" /* INJECT */, key); - } - } - } - function callHook$1(hook, instance, type) { - callWithAsyncErrorHandling( - isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), - instance, - type - ); - } - function createWatcher(raw, ctx, publicThis, key) { - let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; - if (isString(raw)) { - const handler = ctx[raw]; - if (isFunction(handler)) { - { - watch(getter, handler); - } - } else { - warn$1(`Invalid watch handler specified by key "${raw}"`, handler); - } - } else if (isFunction(raw)) { - { - watch(getter, raw.bind(publicThis)); - } - } else if (isObject(raw)) { - if (isArray(raw)) { - raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); - } else { - const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; - if (isFunction(handler)) { - watch(getter, handler, raw); - } else { - warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); - } - } - } else { - warn$1(`Invalid watch option: "${key}"`, raw); - } - } - function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { - mixins: globalMixins, - optionsCache: cache, - config: { optionMergeStrategies } - } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; - } else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach( - (m) => mergeOptions(resolved, m, optionMergeStrategies, true) - ); - } - mergeOptions(resolved, base, optionMergeStrategies); - } - if (isObject(base)) { - cache.set(base, resolved); - } - return resolved; - } - function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); - } - if (mixins) { - mixins.forEach( - (m) => mergeOptions(to, m, strats, true) - ); - } - for (const key in from) { - if (asMixin && key === "expose") { - warn$1( - `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` - ); - } else { - const strat = internalOptionMergeStrats[key] || strats && strats[key]; - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; - } - const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeEmitsOrPropsOptions, - emits: mergeEmitsOrPropsOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject - }; - function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (extend)( - isFunction(to) ? to.call(this, this) : to, - isFunction(from) ? from.call(this, this) : from - ); - }; - } - function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); - } - function normalizeInject(raw) { - if (isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; - } - return raw; - } - function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; - } - function mergeObjectOptions(to, from) { - return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; - } - function mergeEmitsOrPropsOptions(to, from) { - if (to) { - if (isArray(to) && isArray(from)) { - return [.../* @__PURE__ */ new Set([...to, ...from])]; - } - return extend( - /* @__PURE__ */ Object.create(null), - normalizePropsOrEmits(to), - normalizePropsOrEmits(from != null ? from : {}) - ); - } else { - return from; - } - } - function mergeWatchOptions(to, from) { - if (!to) return from; - if (!from) return to; - const merged = extend(/* @__PURE__ */ Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; - } - - function createAppContext() { - return { - app: null, - config: { - isNativeTag: NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: void 0, - warnHandler: void 0, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: /* @__PURE__ */ Object.create(null), - optionsCache: /* @__PURE__ */ new WeakMap(), - propsCache: /* @__PURE__ */ new WeakMap(), - emitsCache: /* @__PURE__ */ new WeakMap() - }; - } - let uid$1 = 0; - function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!isFunction(rootComponent)) { - rootComponent = extend({}, rootComponent); - } - if (rootProps != null && !isObject(rootProps)) { - warn$1(`root props passed to app.mount() must be an object.`); - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = /* @__PURE__ */ new WeakSet(); - const pluginCleanupFns = []; - let isMounted = false; - const app = context.app = { - _uid: uid$1++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - { - warn$1( - `app.config cannot be replaced. Modify individual options instead.` - ); - } - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) { - warn$1(`Plugin has already been applied to target app.`); - } else if (plugin && isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } else if (isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } else { - warn$1( - `A plugin must either be a function or an object with an "install" function.` - ); - } - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } else { - warn$1( - "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") - ); - } - } - return app; - }, - component(name, component) { - { - validateComponentName(name, context.config); - } - if (!component) { - return context.components[name]; - } - if (context.components[name]) { - warn$1(`Component "${name}" has already been registered in target app.`); - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - { - validateDirectiveName(name); - } - if (!directive) { - return context.directives[name]; - } - if (context.directives[name]) { - warn$1(`Directive "${name}" has already been registered in target app.`); - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, namespace) { - if (!isMounted) { - if (rootContainer.__vue_app__) { - warn$1( - `There is already an app instance mounted on the host container. - If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` - ); - } - const vnode = app._ceVNode || createVNode(rootComponent, rootProps); - vnode.appContext = context; - if (namespace === true) { - namespace = "svg"; - } else if (namespace === false) { - namespace = void 0; - } - { - context.reload = () => { - render( - cloneVNode(vnode), - rootContainer, - namespace - ); - }; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } else { - render(vnode, rootContainer, namespace); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - { - app._instance = vnode.component; - devtoolsInitApp(app, version); - } - return getComponentPublicInstance(vnode.component); - } else { - warn$1( - `App has already been mounted. -If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` - ); - } - }, - onUnmount(cleanupFn) { - if (typeof cleanupFn !== "function") { - warn$1( - `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` - ); - } - pluginCleanupFns.push(cleanupFn); - }, - unmount() { - if (isMounted) { - callWithAsyncErrorHandling( - pluginCleanupFns, - app._instance, - 16 - ); - render(null, app._container); - { - app._instance = null; - devtoolsUnmountApp(app); - } - delete app._container.__vue_app__; - } else { - warn$1(`Cannot unmount an app that is not mounted.`); - } - }, - provide(key, value) { - if (key in context.provides) { - warn$1( - `App already provides property with key "${String(key)}". It will be overwritten with the new value.` - ); - } - context.provides[key] = value; - return app; - }, - runWithContext(fn) { - const lastApp = currentApp; - currentApp = app; - try { - return fn(); - } finally { - currentApp = lastApp; - } - } - }; - return app; - }; - } - let currentApp = null; - - function provide(key, value) { - if (!currentInstance) { - { - warn$1(`provide() can only be used inside setup().`); - } - } else { - let provides = currentInstance.provides; - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - provides[key] = value; - } - } - function inject(key, defaultValue, treatDefaultAsFactory = false) { - const instance = currentInstance || currentRenderingInstance; - if (instance || currentApp) { - const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; - if (provides && key in provides) { - return provides[key]; - } else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; - } else { - warn$1(`injection "${String(key)}" not found.`); - } - } else { - warn$1(`inject() can only be used inside setup() or functional components.`); - } - } - function hasInjectionContext() { - return !!(currentInstance || currentRenderingInstance || currentApp); - } - - const internalObjectProto = {}; - const createInternalObject = () => Object.create(internalObjectProto); - const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; - - function initProps(instance, rawProps, isStateful, isSSR = false) { - const props = {}; - const attrs = createInternalObject(); - instance.propsDefaults = /* @__PURE__ */ Object.create(null); - setFullProps(instance, rawProps, props, attrs); - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = void 0; - } - } - { - validateProps(rawProps || {}, props, instance); - } - if (isStateful) { - instance.props = isSSR ? props : shallowReactive(props); - } else { - if (!instance.type.props) { - instance.props = attrs; - } else { - instance.props = props; - } - } - instance.attrs = attrs; - } - function isInHmrContext(instance) { - while (instance) { - if (instance.type.__hmrId) return true; - instance = instance.parent; - } - } - function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { - props, - attrs, - vnode: { patchFlag } - } = instance; - const rawCurrentProps = toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( - // always force full diff in dev - // - #1942 if hmr is enabled with sfc component - // - vite#872 non-sfc component used by sfc component - !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) - ) { - if (patchFlag & 8) { - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - const value = rawProps[key]; - if (options) { - if (hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } else { - const camelizedKey = camelize(key); - props[camelizedKey] = resolvePropValue( - options, - rawCurrentProps, - camelizedKey, - value, - instance, - false - ); - } - } else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - } else { - if (setFullProps(instance, rawProps, props, attrs)) { - hasAttrsChanged = true; - } - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || // for camelCase - !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { - if (options) { - if (rawPrevProps && // for camelCase - (rawPrevProps[key] !== void 0 || // for kebab-case - rawPrevProps[kebabKey] !== void 0)) { - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - void 0, - instance, - true - ); - } - } else { - delete props[key]; - } - } - } - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || !hasOwn(rawProps, key) && true) { - delete attrs[key]; - hasAttrsChanged = true; - } - } - } - } - if (hasAttrsChanged) { - trigger(instance.attrs, "set", ""); - } - { - validateProps(rawProps || {}, props, instance); - } - } - function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - if (isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - let camelKey; - if (options && hasOwn(options, camelKey = camelize(key))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - if (needCastKeys) { - const rawCurrentProps = toRaw(props); - const castValues = rawCastValues || EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - castValues[key], - instance, - !hasOwn(castValues, key) - ); - } - } - return hasAttrsChanged; - } - function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = hasOwn(opt, "default"); - if (hasDefault && value === void 0) { - const defaultValue = opt.default; - if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } else { - const reset = setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call( - null, - props - ); - reset(); - } - } else { - value = defaultValue; - } - if (instance.ce) { - instance.ce._setProp(key, value); - } - } - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { - value = true; - } - } - } - return value; - } - const mixinPropsCache = /* @__PURE__ */ new WeakMap(); - function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = asMixin ? mixinPropsCache : appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; - } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - let hasExtends = false; - if (!isFunction(comp)) { - const extendProps = (raw2) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw2, appContext, true); - extend(normalized, props); - if (keys) needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } - } - if (!raw && !hasExtends) { - if (isObject(comp)) { - cache.set(comp, EMPTY_ARR); - } - return EMPTY_ARR; - } - if (isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - if (!isString(raw[i])) { - warn$1(`props must be strings when using array syntax.`, raw[i]); - } - const normalizedKey = camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = EMPTY_OBJ; - } - } - } else if (raw) { - if (!isObject(raw)) { - warn$1(`invalid props options`, raw); - } - for (const key in raw) { - const normalizedKey = camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); - const propType = prop.type; - let shouldCast = false; - let shouldCastTrue = true; - if (isArray(propType)) { - for (let index = 0; index < propType.length; ++index) { - const type = propType[index]; - const typeName = isFunction(type) && type.name; - if (typeName === "Boolean") { - shouldCast = true; - break; - } else if (typeName === "String") { - shouldCastTrue = false; - } - } - } else { - shouldCast = isFunction(propType) && propType.name === "Boolean"; - } - prop[0 /* shouldCast */] = shouldCast; - prop[1 /* shouldCastTrue */] = shouldCastTrue; - if (shouldCast || hasOwn(prop, "default")) { - needCastKeys.push(normalizedKey); - } - } - } - } - const res = [normalized, needCastKeys]; - if (isObject(comp)) { - cache.set(comp, res); - } - return res; - } - function validatePropName(key) { - if (key[0] !== "$" && !isReservedProp(key)) { - return true; - } else { - warn$1(`Invalid prop name: "${key}" is a reserved property.`); - } - return false; - } - function getType(ctor) { - if (ctor === null) { - return "null"; - } - if (typeof ctor === "function") { - return ctor.name || ""; - } else if (typeof ctor === "object") { - const name = ctor.constructor && ctor.constructor.name; - return name || ""; - } - return ""; - } - function validateProps(rawProps, props, instance) { - const resolvedValues = toRaw(props); - const options = instance.propsOptions[0]; - const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key)); - for (const key in options) { - let opt = options[key]; - if (opt == null) continue; - validateProp( - key, - resolvedValues[key], - opt, - shallowReadonly(resolvedValues) , - !camelizePropsKey.includes(key) - ); - } - } - function validateProp(name, value, prop, props, isAbsent) { - const { type, required, validator, skipCheck } = prop; - if (required && isAbsent) { - warn$1('Missing required prop: "' + name + '"'); - return; - } - if (value == null && !required) { - return; - } - if (type != null && type !== true && !skipCheck) { - let isValid = false; - const types = isArray(type) ? type : [type]; - const expectedTypes = []; - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); - expectedTypes.push(expectedType || ""); - isValid = valid; - } - if (!isValid) { - warn$1(getInvalidTypeMessage(name, value, expectedTypes)); - return; - } - } - if (validator && !validator(value, props)) { - warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); - } - } - const isSimpleType = /* @__PURE__ */ makeMap( - "String,Number,Boolean,Function,Symbol,BigInt" - ); - function assertType(value, type) { - let valid; - const expectedType = getType(type); - if (expectedType === "null") { - valid = value === null; - } else if (isSimpleType(expectedType)) { - const t = typeof value; - valid = t === expectedType.toLowerCase(); - if (!valid && t === "object") { - valid = value instanceof type; - } - } else if (expectedType === "Object") { - valid = isObject(value); - } else if (expectedType === "Array") { - valid = isArray(value); - } else { - valid = value instanceof type; - } - return { - valid, - expectedType - }; - } - function getInvalidTypeMessage(name, value, expectedTypes) { - if (expectedTypes.length === 0) { - return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; - } - let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; - const expectedType = expectedTypes[0]; - const receivedType = toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); - if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; - } - message += `, got ${receivedType} `; - if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; - } - return message; - } - function styleValue(value, type) { - if (type === "String") { - return `"${value}"`; - } else if (type === "Number") { - return `${Number(value)}`; - } else { - return `${value}`; - } - } - function isExplicable(type) { - const explicitTypes = ["string", "number", "boolean"]; - return explicitTypes.some((elem) => type.toLowerCase() === elem); - } - function isBoolean(...args) { - return args.some((elem) => elem.toLowerCase() === "boolean"); - } - - const isInternalKey = (key) => key[0] === "_" || key === "$stable"; - const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; - const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - return rawSlot; - } - const normalized = withCtx((...args) => { - if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { - warn$1( - `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` - ); - } - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; - }; - const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) continue; - const value = rawSlots[key]; - if (isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } else if (value != null) { - { - warn$1( - `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` - ); - } - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } - } - }; - const normalizeVNodeSlots = (instance, children) => { - if (!isKeepAlive(instance.vnode) && true) { - warn$1( - `Non-function value encountered for default slot. Prefer function slots for better performance.` - ); - } - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; - }; - const assignSlots = (slots, children, optimized) => { - for (const key in children) { - if (optimized || key !== "_") { - slots[key] = children[key]; - } - } - }; - const initSlots = (instance, children, optimized) => { - const slots = instance.slots = createInternalObject(); - if (instance.vnode.shapeFlag & 32) { - const type = children._; - if (type) { - assignSlots(slots, children, optimized); - if (optimized) { - def(slots, "_", type, true); - } - } else { - normalizeObjectSlots(children, slots); - } - } else if (children) { - normalizeVNodeSlots(instance, children); - } - }; - const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = EMPTY_OBJ; - if (vnode.shapeFlag & 32) { - const type = children._; - if (type) { - if (isHmrUpdating) { - assignSlots(slots, children, optimized); - trigger(instance, "set", "$slots"); - } else if (optimized && type === 1) { - needDeletionCheck = false; - } else { - assignSlots(slots, children, optimized); - } - } else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; - } else if (children) { - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { - delete slots[key]; - } - } - } - }; - - let supported; - let perf; - function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - { - devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); - } - } - function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure( - `<${formatComponentName(instance, instance.type)}> ${type}`, - startTag, - endTag - ); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - { - devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); - } - } - function isSupported() { - if (supported !== void 0) { - return supported; - } - if (typeof window !== "undefined" && window.performance) { - supported = true; - perf = window.performance; - } else { - supported = false; - } - return supported; - } - - const queuePostRenderEffect = queueEffectWithSuspense ; - function createRenderer(options) { - return baseCreateRenderer(options); - } - function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); - } - function baseCreateRenderer(options, createHydrationFns) { - const target = getGlobalThis(); - target.__VUE__ = true; - { - setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); - } - const { - insert: hostInsert, - remove: hostRemove, - patchProp: hostPatchProp, - createElement: hostCreateElement, - createText: hostCreateText, - createComment: hostCreateComment, - setText: hostSetText, - setElementText: hostSetElementText, - parentNode: hostParentNode, - nextSibling: hostNextSibling, - setScopeId: hostSetScopeId = NOOP, - insertStaticContent: hostInsertStaticContent - } = options; - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, namespace); - } else { - patchStaticNode(n1, n2, container, namespace); - } - break; - case Fragment: - processFragment( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - break; - default: - if (shapeFlag & 1) { - processElement( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 6) { - processComponent( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 64) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else if (shapeFlag & 128) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else { - warn$1("Invalid VNode type:", type, `(${typeof type})`); - } - } - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateText(n2.children), - container, - anchor - ); - } else { - const el = n2.el = n1.el; - if (n2.children !== n1.children) { - hostSetText(el, n2.children); - } - } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateComment(n2.children || ""), - container, - anchor - ); - } else { - n2.el = n1.el; - } - }; - const mountStaticNode = (n2, container, anchor, namespace) => { - [n2.el, n2.anchor] = hostInsertStaticContent( - n2.children, - container, - anchor, - namespace, - n2.el, - n2.anchor - ); - }; - const patchStaticNode = (n1, n2, container, namespace) => { - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent( - n2.children, - container, - anchor, - namespace - ); - } else { - n2.el = n1.el; - n2.anchor = n1.anchor; - } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; - } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; - } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - if (n2.type === "svg") { - namespace = "svg"; - } else if (n2.type === "math") { - namespace = "mathml"; - } - if (n1 == null) { - mountElement( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - patchElement( - n1, - n2, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - let el; - let vnodeHook; - const { props, shapeFlag, transition, dirs } = vnode; - el = vnode.el = hostCreateElement( - vnode.type, - namespace, - props && props.is, - props - ); - if (shapeFlag & 8) { - hostSetElementText(el, vnode.children); - } else if (shapeFlag & 16) { - mountChildren( - vnode.children, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(vnode, namespace), - slotScopeIds, - optimized - ); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); - if (props) { - for (const key in props) { - if (key !== "value" && !isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], namespace, parentComponent); - } - } - if ("value" in props) { - hostPatchProp(el, "value", null, props.value, namespace); - } - if (vnodeHook = props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - { - def(el, "__vnode", vnode, true); - def(el, "__vueParentComponent", parentComponent, true); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - const needCallTransitionHooks = needTransition(parentSuspense, transition); - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { - subTree = filterSingleRoot(subTree.children) || subTree; - } - if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { - const parentVNode = parentComponent.vnode; - setScopeId( - el, - parentVNode, - parentVNode.scopeId, - parentVNode.slotScopeIds, - parentComponent.parent - ); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); - patch( - null, - child, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const el = n2.el = n1.el; - { - el.__vnode = n2; - } - let { patchFlag, dynamicChildren, dirs } = n2; - patchFlag |= n1.patchFlag & 16; - const oldProps = n1.props || EMPTY_OBJ; - const newProps = n2.props || EMPTY_OBJ; - let vnodeHook; - parentComponent && toggleRecurse(parentComponent, false); - if (vnodeHook = newProps.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); - } - parentComponent && toggleRecurse(parentComponent, true); - if (isHmrUpdating) { - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { - hostSetElementText(el, ""); - } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - el, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds - ); - { - traverseStaticChildren(n1, n2); - } - } else if (!optimized) { - patchChildren( - n1, - n2, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds, - false - ); - } - if (patchFlag > 0) { - if (patchFlag & 16) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } else { - if (patchFlag & 2) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, "class", null, newProps.class, namespace); - } - } - if (patchFlag & 4) { - hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); - } - if (patchFlag & 8) { - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - if (next !== prev || key === "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - } - } - if (patchFlag & 1) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } else if (!optimized && dynamicChildren == null) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); - }, parentSuspense); - } - }; - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - const container = ( - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( - // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer - ) - ); - patch( - oldVNode, - newVNode, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - true - ); - } - }; - const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { - if (oldProps !== newProps) { - if (oldProps !== EMPTY_OBJ) { - for (const key in oldProps) { - if (!isReservedProp(key) && !(key in newProps)) { - hostPatchProp( - el, - key, - oldProps[key], - null, - namespace, - parentComponent - ); - } - } - } - for (const key in newProps) { - if (isReservedProp(key)) continue; - const next = newProps[key]; - const prev = oldProps[key]; - if (next !== prev && key !== "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - if ("value" in newProps) { - hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); - const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if ( - // #5523 dev root fragment may inherit directives - isHmrUpdating || patchFlag & 2048 - ) { - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - mountChildren( - // #10007 - // such fragment like `<></>` will be compiled into - // a fragment which doesn't have a children. - // In this case fallback to an empty array - n2.children || [], - container, - fragmentEndAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - container, - parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - { - traverseStaticChildren(n1, n2); - } - } else { - patchChildren( - n1, - n2, - container, - fragmentEndAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512) { - parentComponent.ctx.activate( - n2, - container, - anchor, - namespace, - optimized - ); - } else { - mountComponent( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - optimized - ); - } - } else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { - const instance = (initialVNode.component = createComponentInstance( - initialVNode, - parentComponent, - parentSuspense - )); - if (instance.type.__hmrId) { - registerHMR(instance); - } - { - pushWarningContext(initialVNode); - startMeasure(instance, `mount`); - } - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - { - { - startMeasure(instance, `init`); - } - setupComponent(instance, false, optimized); - { - endMeasure(instance, `init`); - } - } - if (instance.asyncDep) { - if (isHmrUpdating) initialVNode.el = null; - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); - if (!initialVNode.el) { - const placeholder = instance.subTree = createVNode(Comment); - processCommentNode(null, placeholder, container, anchor); - } - } else { - setupRenderEffect( - instance, - initialVNode, - container, - anchor, - parentSuspense, - namespace, - optimized - ); - } - { - popWarningContext(); - endMeasure(instance, `mount`); - } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = n2.component = n1.component; - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && !instance.asyncResolved) { - { - pushWarningContext(n2); - } - updateComponentPreRender(instance, n2, optimized); - { - popWarningContext(); - } - return; - } else { - instance.next = n2; - instance.update(); - } - } else { - n2.el = n1.el; - instance.vnode = n2; - } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent, root, type } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - if (bm) { - invokeArrayFns(bm); - } - if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - const hydrateSubTree = () => { - { - startMeasure(instance, `render`); - } - instance.subTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `hydrate`); - } - hydrateNode( - el, - instance.subTree, - instance, - parentSuspense, - null - ); - { - endMeasure(instance, `hydrate`); - } - }; - if (isAsyncWrapperVNode && type.__asyncHydrate) { - type.__asyncHydrate( - el, - instance, - hydrateSubTree - ); - } else { - hydrateSubTree(); - } - } else { - if (root.ce) { - root.ce._injectChildStyle(type); - } - { - startMeasure(instance, `render`); - } - const subTree = instance.subTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `patch`); - } - patch( - null, - subTree, - container, - anchor, - instance, - parentSuspense, - namespace - ); - { - endMeasure(instance, `patch`); - } - initialVNode.el = subTree.el; - } - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect( - () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), - parentSuspense - ); - } - if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - { - devtoolsComponentAdded(instance); - } - initialVNode = container = anchor = null; - } else { - let { next, bu, u, parent, vnode } = instance; - { - const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); - if (nonHydratedAsyncRoot) { - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - nonHydratedAsyncRoot.asyncDep.then(() => { - if (!instance.isUnmounted) { - componentUpdateFn(); - } - }); - return; - } - } - let originNext = next; - let vnodeHook; - { - pushWarningContext(next || instance.vnode); - } - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } else { - next = vnode; - } - if (bu) { - invokeArrayFns(bu); - } - if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - { - startMeasure(instance, `render`); - } - const nextTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - const prevTree = instance.subTree; - instance.subTree = nextTree; - { - startMeasure(instance, `patch`); - } - patch( - prevTree, - nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), - instance, - parentSuspense, - namespace - ); - { - endMeasure(instance, `patch`); - } - next.el = nextTree.el; - if (originNext === null) { - updateHOCHostEl(instance, nextTree.el); - } - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - if (vnodeHook = next.props && next.props.onVnodeUpdated) { - queuePostRenderEffect( - () => invokeVNodeHook(vnodeHook, parent, next, vnode), - parentSuspense - ); - } - { - devtoolsComponentUpdated(instance); - } - { - popWarningContext(); - } - } - }; - instance.scope.on(); - const effect = instance.effect = new ReactiveEffect(componentUpdateFn); - instance.scope.off(); - const update = instance.update = effect.run.bind(effect); - const job = instance.job = effect.runIfDirty.bind(effect); - job.i = instance; - job.id = instance.uid; - effect.scheduler = () => queueJob(job); - toggleRecurse(instance, true); - { - effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; - effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; - } - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - pauseTracking(); - flushPreFlushCbs(instance); - resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - if (patchFlag > 0) { - if (patchFlag & 128) { - patchKeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - return; - } else if (patchFlag & 256) { - patchUnkeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - return; - } - } - if (shapeFlag & 8) { - if (prevShapeFlag & 16) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } - } else { - if (prevShapeFlag & 16) { - if (shapeFlag & 16) { - patchKeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } else { - if (prevShapeFlag & 8) { - hostSetElementText(container, ""); - } - if (shapeFlag & 16) { - mountChildren( - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - } - } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - c1 = c1 || EMPTY_ARR; - c2 = c2 || EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - patch( - c1[i], - nextChild, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - if (oldLength > newLength) { - unmountChildren( - c1, - parentComponent, - parentSuspense, - true, - false, - commonLength - ); - } else { - mountChildren( - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - commonLength - ); - } - }; - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; - let e2 = l2 - 1; - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - if (isSameVNodeType(n1, n2)) { - patch( - n1, - n2, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - break; - } - i++; - } - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); - if (isSameVNodeType(n1, n2)) { - patch( - n1, - n2, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - break; - } - e1--; - e2--; - } - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch( - null, - c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - i++; - } - } - } else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } else { - const s1 = i; - const s2 = i; - const keyToNewIndexMap = /* @__PURE__ */ new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - if (nextChild.key != null) { - if (keyToNewIndexMap.has(nextChild.key)) { - warn$1( - `Duplicate keys found during update:`, - JSON.stringify(nextChild.key), - `Make sure keys are unique.` - ); - } - keyToNewIndexMap.set(nextChild.key, i); - } - } - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - let maxNewIndexSoFar = 0; - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } else { - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === void 0) { - unmount(prevChild, parentComponent, parentSuspense, true); - } else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } else { - moved = true; - } - patch( - prevChild, - c2[newIndex], - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - patched++; - } - } - const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - patch( - null, - nextChild, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (moved) { - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2); - } else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; - if (needTransition2) { - if (moveType === 0) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } else { - const { leave, delayLeave, afterLeave } = transition; - const remove2 = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove2(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove2, performLeave); - } else { - performLeave(); - } - } - } else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { - type, - props, - ref, - children, - dynamicChildren, - shapeFlag, - patchFlag, - dirs, - cacheIndex - } = vnode; - if (patchFlag === -2) { - optimized = false; - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (cacheIndex != null) { - parentComponent.renderCache[cacheIndex] = void 0; - } - if (shapeFlag & 256) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } else { - if (shapeFlag & 128) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); - } - if (shapeFlag & 64) { - vnode.type.remove( - vnode, - parentComponent, - parentSuspense, - internals, - doRemove - ); - } else if (dynamicChildren && // #5154 - // when v-once is used inside a block, setBlockTracking(-1) marks the - // parent block with hasOnce: true - // so that it doesn't take the fast path during unmount - otherwise - // components nested in v-once are never unmounted. - !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { - unmountChildren( - dynamicChildren, - parentComponent, - parentSuspense, - false, - true - ); - } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); - }, parentSuspense); - } - }; - const remove = (vnode) => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { - vnode.children.forEach((child) => { - if (child.type === Comment) { - hostRemove(child.el); - } else { - remove(child); - } - }); - } else { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 && transition && !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } else { - performLeave(); - } - } else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - if (instance.type.__hmrId) { - unregisterHMR(instance); - } - const { bum, scope, job, subTree, um, m, a } = instance; - invalidateMount(m); - invalidateMount(a); - if (bum) { - invokeArrayFns(bum); - } - scope.stop(); - if (job) { - job.flags |= 8; - unmount(subTree, instance, parentSuspense, doRemove); - } - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } - } - { - devtoolsComponentRemoved(instance); - } - }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } - }; - const getNextHostNode = (vnode) => { - if (vnode.shapeFlag & 6) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128) { - return vnode.suspense.next(); - } - const el = hostNextSibling(vnode.anchor || vnode.el); - const teleportEnd = el && el[TeleportEndKey]; - return teleportEnd ? hostNextSibling(teleportEnd) : el; - }; - let isFlushing = false; - const render = (vnode, container, namespace) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } else { - patch( - container._vnode || null, - vnode, - container, - null, - null, - null, - namespace - ); - } - container._vnode = vnode; - if (!isFlushing) { - isFlushing = true; - flushPreFlushCbs(); - flushPostFlushCbs(); - isFlushing = false; - } - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns( - internals - ); - } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) - }; - } - function resolveChildrenNamespace({ type, props }, currentNamespace) { - return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; - } - function toggleRecurse({ effect, job }, allowed) { - if (allowed) { - effect.flags |= 32; - job.flags |= 4; - } else { - effect.flags &= ~32; - job.flags &= ~4; - } - } - function needTransition(parentSuspense, transition) { - return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; - } - function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (isArray(ch1) && isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow && c2.patchFlag !== -2) - traverseStaticChildren(c1, c2); - } - if (c2.type === Text) { - c2.el = c1.el; - } - if (c2.type === Comment && !c2.el) { - c2.el = c1.el; - } - } - } - } - function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = u + v >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } - } - } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; - } - return result; - } - function locateNonHydratedAsyncRoot(instance) { - const subComponent = instance.subTree.component; - if (subComponent) { - if (subComponent.asyncDep && !subComponent.asyncResolved) { - return subComponent; - } else { - return locateNonHydratedAsyncRoot(subComponent); - } - } - } - function invalidateMount(hooks) { - if (hooks) { - for (let i = 0; i < hooks.length; i++) - hooks[i].flags |= 8; - } - } - - const ssrContextKey = Symbol.for("v-scx"); - const useSSRContext = () => { - { - warn$1(`useSSRContext() is not supported in the global build.`); - } - }; - - function watchEffect(effect, options) { - return doWatch(effect, null, options); - } - function watchPostEffect(effect, options) { - return doWatch( - effect, - null, - extend({}, options, { flush: "post" }) - ); - } - function watchSyncEffect(effect, options) { - return doWatch( - effect, - null, - extend({}, options, { flush: "sync" }) - ); - } - function watch(source, cb, options) { - if (!isFunction(cb)) { - warn$1( - `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` - ); - } - return doWatch(source, cb, options); - } - function doWatch(source, cb, options = EMPTY_OBJ) { - const { immediate, deep, flush, once } = options; - if (!cb) { - if (immediate !== void 0) { - warn$1( - `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - if (deep !== void 0) { - warn$1( - `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - if (once !== void 0) { - warn$1( - `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - } - const baseWatchOptions = extend({}, options); - baseWatchOptions.onWarn = warn$1; - const instance = currentInstance; - baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); - let isPre = false; - if (flush === "post") { - baseWatchOptions.scheduler = (job) => { - queuePostRenderEffect(job, instance && instance.suspense); - }; - } else if (flush !== "sync") { - isPre = true; - baseWatchOptions.scheduler = (job, isFirstRun) => { - if (isFirstRun) { - job(); - } else { - queueJob(job); - } - }; - } - baseWatchOptions.augmentJob = (job) => { - if (cb) { - job.flags |= 4; - } - if (isPre) { - job.flags |= 2; - if (instance) { - job.id = instance.uid; - job.i = instance; - } - } - }; - const watchHandle = watch$1(source, cb, baseWatchOptions); - return watchHandle; - } - function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } else { - cb = value.handler; - options = value; - } - const reset = setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - reset(); - return res; - } - function createPathGetter(ctx, path) { - const segments = path.split("."); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; - } - - function useModel(props, name, options = EMPTY_OBJ) { - const i = getCurrentInstance(); - if (!i) { - warn$1(`useModel() called without active instance.`); - return ref(); - } - const camelizedName = camelize(name); - if (!i.propsOptions[0][camelizedName]) { - warn$1(`useModel() called with prop "${name}" which is not declared.`); - return ref(); - } - const hyphenatedName = hyphenate(name); - const modifiers = getModelModifiers(props, camelizedName); - const res = customRef((track, trigger) => { - let localValue; - let prevSetValue = EMPTY_OBJ; - let prevEmittedValue; - watchSyncEffect(() => { - const propValue = props[camelizedName]; - if (hasChanged(localValue, propValue)) { - localValue = propValue; - trigger(); - } - }); - return { - get() { - track(); - return options.get ? options.get(localValue) : localValue; - }, - set(value) { - const emittedValue = options.set ? options.set(value) : value; - if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) { - return; - } - const rawProps = i.vnode.props; - if (!(rawProps && // check if parent has passed v-model - (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { - localValue = value; - trigger(); - } - i.emit(`update:${name}`, emittedValue); - if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) { - trigger(); - } - prevSetValue = value; - prevEmittedValue = emittedValue; - } - }; - }); - res[Symbol.iterator] = () => { - let i2 = 0; - return { - next() { - if (i2 < 2) { - return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false }; - } else { - return { done: true }; - } - } - }; - }; - return res; - } - const getModelModifiers = (props, modelName) => { - return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; - }; - - function emit(instance, event, ...rawArgs) { - if (instance.isUnmounted) return; - const props = instance.vnode.props || EMPTY_OBJ; - { - const { - emitsOptions, - propsOptions: [propsOptions] - } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && true) { - if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) { - warn$1( - `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.` - ); - } - } else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn$1( - `Invalid event arguments: event validation failed for event "${event}".` - ); - } - } - } - } - } - let args = rawArgs; - const isModelListener = event.startsWith("update:"); - const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); - if (modifiers) { - if (modifiers.trim) { - args = rawArgs.map((a) => isString(a) ? a.trim() : a); - } - if (modifiers.number) { - args = rawArgs.map(looseToNumber); - } - } - { - devtoolsComponentEmit(instance, event, args); - } - { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1( - `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( - instance, - instance.type - )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( - event - )}" instead of "${event}".` - ); - } - } - let handlerName; - let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) - props[handlerName = toHandlerKey(camelize(event))]; - if (!handler && isModelListener) { - handler = props[handlerName = toHandlerKey(hyphenate(event))]; - } - if (handler) { - callWithAsyncErrorHandling( - handler, - instance, - 6, - args - ); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling( - onceHandler, - instance, - 6, - args - ); - } - } - function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== void 0) { - return cached; - } - const raw = comp.emits; - let normalized = {}; - let hasExtends = false; - if (!isFunction(comp)) { - const extendEmits = (raw2) => { - const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } - } - if (!raw && !hasExtends) { - if (isObject(comp)) { - cache.set(comp, null); - } - return null; - } - if (isArray(raw)) { - raw.forEach((key) => normalized[key] = null); - } else { - extend(normalized, raw); - } - if (isObject(comp)) { - cache.set(comp, normalized); - } - return normalized; - } - function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ""); - return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); - } - - let accessedAttrs = false; - function markAttrsAccessed() { - accessedAttrs = true; - } - function renderComponentRoot(instance) { - const { - type: Component, - vnode, - proxy, - withProxy, - propsOptions: [propsOptions], - slots, - attrs, - emit, - render, - renderCache, - props, - data, - setupState, - ctx, - inheritAttrs - } = instance; - const prev = setCurrentRenderingInstance(instance); - let result; - let fallthroughAttrs; - { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4) { - const proxyToUse = withProxy || proxy; - const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { - get(target, key, receiver) { - warn$1( - `Property '${String( - key - )}' was accessed via 'this'. Avoid using 'this' in templates.` - ); - return Reflect.get(target, key, receiver); - } - }) : proxyToUse; - result = normalizeVNode( - render.call( - thisProxy, - proxyToUse, - renderCache, - true ? shallowReadonly(props) : props, - setupState, - data, - ctx - ) - ); - fallthroughAttrs = attrs; - } else { - const render2 = Component; - if (attrs === props) { - markAttrsAccessed(); - } - result = normalizeVNode( - render2.length > 1 ? render2( - true ? shallowReadonly(props) : props, - true ? { - get attrs() { - markAttrsAccessed(); - return shallowReadonly(attrs); - }, - slots, - emit - } : { attrs, slots, emit } - ) : render2( - true ? shallowReadonly(props) : props, - null - ) - ); - fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); - } - } catch (err) { - blockStack.length = 0; - handleError(err, instance, 1); - result = createVNode(Comment); - } - let root = result; - let setRoot = void 0; - if (result.patchFlag > 0 && result.patchFlag & 2048) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 | 6)) { - if (propsOptions && keys.some(isModelListener)) { - fallthroughAttrs = filterModelListeners( - fallthroughAttrs, - propsOptions - ); - } - root = cloneVNode(root, fallthroughAttrs, false, true); - } else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - if (!isModelListener(key)) { - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1( - `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` - ); - } - if (eventAttrs.length) { - warn$1( - `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` - ); - } - } - } - } - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn$1( - `Runtime directive used on component with non-element root node. The directives will not function as intended.` - ); - } - root = cloneVNode(root, null, false, true); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; - } - if (vnode.transition) { - if (!isElementRoot(root)) { - warn$1( - `Component inside <Transition> renders non-element root node that cannot be animated.` - ); - } - setTransitionHooks(root, vnode.transition); - } - if (setRoot) { - setRoot(root); - } else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; - } - const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren, false); - if (!childRoot) { - return [vnode, void 0]; - } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { - return getChildRoot(childRoot); - } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; - }; - function filterSingleRoot(children, recurse = true) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - if (child.type !== Comment || child.children === "v-if") { - if (singleRoot) { - return; - } else { - singleRoot = child; - if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { - return filterSingleRoot(singleRoot.children); - } - } - } - } else { - return; - } - } - return singleRoot; - } - const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === "class" || key === "style" || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } - } - return res; - }; - const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } - } - return res; - }; - const isElementRoot = (vnode) => { - return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; - }; - function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - if ((prevChildren || nextChildren) && isHmrUpdating) { - return true; - } - if (nextVNode.dirs || nextVNode.transition) { - return true; - } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024) { - return true; - } - if (patchFlag & 16) { - if (!prevProps) { - return !!nextProps; - } - return hasPropsChanged(prevProps, nextProps, emits); - } else if (patchFlag & 8) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { - return true; - } - } - } - } else { - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); - } - return false; - } - function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; - } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; - } - function updateHOCHostEl({ vnode, parent }, el) { - while (parent) { - const root = parent.subTree; - if (root.suspense && root.suspense.activeBranch === vnode) { - root.el = vnode.el; - } - if (root === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; - } else { - break; - } - } - } - - const isSuspense = (type) => type.__isSuspense; - let suspenseId = 0; - const SuspenseImpl = { - name: "Suspense", - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - if (n1 == null) { - mountSuspense( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } else { - if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { - n2.suspense = n1.suspense; - n2.suspense.vnode = n2; - n2.el = n1.el; - return; - } - patchSuspense( - n1, - n2, - container, - anchor, - parentComponent, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } - }, - hydrate: hydrateSuspense, - normalize: normalizeSuspenseChildren - }; - const Suspense = SuspenseImpl ; - function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); - } - } - function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - const { - p: patch, - o: { createElement } - } = rendererInternals; - const hiddenContainer = createElement("div"); - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - container, - hiddenContainer, - anchor, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - patch( - null, - suspense.pendingBranch = vnode.ssContent, - hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds - ); - if (suspense.deps > 0) { - triggerEvent(vnode, "onPending"); - triggerEvent(vnode, "onFallback"); - patch( - null, - vnode.ssFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds - ); - setActiveBranch(suspense, vnode.ssFallback); - } else { - suspense.resolve(false, true); - } - } - function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = n2.suspense = n1.suspense; - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - patch( - pendingBranch, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else if (isInFallback) { - if (!isHydrating) { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } - } else { - suspense.pendingId = suspenseId++; - if (isHydrating) { - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } else { - unmount(pendingBranch, parentComponent, suspense); - } - suspense.deps = 0; - suspense.effects.length = 0; - suspense.hiddenContainer = createElement("div"); - if (isInFallback) { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - suspense.resolve(true); - } else { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newBranch); - } else { - triggerEvent(n2, "onPending"); - suspense.pendingBranch = newBranch; - if (newBranch.shapeFlag & 512) { - suspense.pendingId = newBranch.component.suspenseId; - } else { - suspense.pendingId = suspenseId++; - } - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } else if (timeout === 0) { - suspense.fallback(newFallback); - } - } - } - } - } - let hasWarned = false; - function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - if (!hasWarned) { - hasWarned = true; - console[console.info ? "info" : "log"]( - `<Suspense> is an experimental feature and its API will likely change.` - ); - } - const { - p: patch, - m: move, - um: unmount, - n: next, - o: { parentNode, remove } - } = rendererInternals; - let parentSuspenseId; - const isSuspensible = isVNodeSuspensible(vnode); - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch) { - parentSuspenseId = parentSuspense.pendingId; - parentSuspense.deps++; - } - } - const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; - { - assertNumber(timeout, `Suspense timeout`); - } - const initialAnchor = anchor; - const suspense = { - vnode, - parent: parentSuspense, - parentComponent, - namespace, - container, - hiddenContainer, - deps: 0, - pendingId: suspenseId++, - timeout: typeof timeout === "number" ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: !isHydrating, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false, sync = false) { - { - if (!resume && !suspense.pendingBranch) { - throw new Error( - `suspense.resolve() is called without a pending branch.` - ); - } - if (suspense.isUnmounted) { - throw new Error( - `suspense.resolve() is called on an already unmounted suspense boundary.` - ); - } - } - const { - vnode: vnode2, - activeBranch, - pendingBranch, - pendingId, - effects, - parentComponent: parentComponent2, - container: container2 - } = suspense; - let delayEnter = false; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } else if (!resume) { - delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move( - pendingBranch, - container2, - anchor === initialAnchor ? next(activeBranch) : anchor, - 0 - ); - queuePostFlushCb(effects); - } - }; - } - if (activeBranch) { - if (parentNode(activeBranch.el) === container2) { - anchor = next(activeBranch); - } - unmount(activeBranch, parentComponent2, suspense, true); - } - if (!delayEnter) { - move(pendingBranch, container2, anchor, 0); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - if (!hasUnresolvedAncestor && !delayEnter) { - queuePostFlushCb(effects); - } - suspense.effects = []; - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0 && !sync) { - parentSuspense.resolve(); - } - } - } - triggerEvent(vnode2, "onResolve"); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; - triggerEvent(vnode2, "onFallback"); - const anchor2 = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - patch( - null, - fallbackVNode, - container2, - anchor2, - parentComponent2, - null, - // fallback tree will not have suspense context - namespace2, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - unmount( - activeBranch, - parentComponent2, - null, - // no suspense so unmount hooks fire now - true - // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container2, anchor2, type) { - suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); - suspense.container = container2; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect, optimized2) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance.asyncDep.catch((err) => { - handleError(err, instance, 0); - }).then((asyncSetupResult) => { - if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { - return; - } - instance.asyncResolved = true; - const { vnode: vnode2 } = instance; - { - pushWarningContext(vnode2); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - vnode2.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect( - instance, - vnode2, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), - suspense, - namespace, - optimized2 - ); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode2.el); - { - popWarningContext(); - } - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense2, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount( - suspense.activeBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - if (suspense.pendingBranch) { - unmount( - suspense.pendingBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - } - }; - return suspense; - } - function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - node.parentNode, - // eslint-disable-next-line no-restricted-globals - document.createElement("div"), - null, - namespace, - slotScopeIds, - optimized, - rendererInternals, - true - ); - const result = hydrateNode( - node, - suspense.pendingBranch = vnode.ssContent, - parentComponent, - suspense, - slotScopeIds, - optimized - ); - if (suspense.deps === 0) { - suspense.resolve(false, true); - } - return result; - } - function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32; - vnode.ssContent = normalizeSuspenseSlot( - isSlotChildren ? children.default : children - ); - vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); - } - function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } - } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { - warn$1(`<Suspense> slots expect a single root node.`); - } - s = singleChild; - } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter((c) => c !== s); - } - return s; - } - function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } else { - suspense.effects.push(fn); - } - } else { - queuePostFlushCb(fn); - } - } - function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - let el = branch.el; - while (!el && branch.component) { - branch = branch.component.subTree; - el = branch.el; - } - vnode.el = el; - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } - } - function isVNodeSuspensible(vnode) { - const suspensible = vnode.props && vnode.props.suspensible; - return suspensible != null && suspensible !== false; - } - - const Fragment = Symbol.for("v-fgt"); - const Text = Symbol.for("v-txt"); - const Comment = Symbol.for("v-cmt"); - const Static = Symbol.for("v-stc"); - const blockStack = []; - let currentBlock = null; - function openBlock(disableTracking = false) { - blockStack.push(currentBlock = disableTracking ? null : []); - } - function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; - } - let isBlockTreeEnabled = 1; - function setBlockTracking(value, inVOnce = false) { - isBlockTreeEnabled += value; - if (value < 0 && currentBlock && inVOnce) { - currentBlock.hasOnce = true; - } - } - function setupBlock(vnode) { - vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; - closeBlock(); - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; - } - function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock( - createBaseVNode( - type, - props, - children, - patchFlag, - dynamicProps, - shapeFlag, - true - ) - ); - } - function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock( - createVNode( - type, - props, - children, - patchFlag, - dynamicProps, - true - ) - ); - } - function isVNode(value) { - return value ? value.__v_isVNode === true : false; - } - function isSameVNodeType(n1, n2) { - if (n2.shapeFlag & 6 && n1.component) { - const dirtyInstances = hmrDirtyComponents.get(n2.type); - if (dirtyInstances && dirtyInstances.has(n1.component)) { - n1.shapeFlag &= ~256; - n2.shapeFlag &= ~512; - return false; - } - } - return n1.type === n2.type && n1.key === n2.key; - } - let vnodeArgsTransformer; - function transformVNodeArgs(transformer) { - vnodeArgsTransformer = transformer; - } - const createVNodeWithArgsTransform = (...args) => { - return _createVNode( - ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args - ); - }; - const normalizeKey = ({ key }) => key != null ? key : null; - const normalizeRef = ({ - ref, - ref_key, - ref_for - }) => { - if (typeof ref === "number") { - ref = "" + ref; - } - return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; - }; - function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetStart: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null, - ctx: currentRenderingInstance - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - if (shapeFlag & 128) { - type.normalize(vnode); - } - } else if (children) { - vnode.shapeFlag |= isString(children) ? 8 : 16; - } - if (vnode.key !== vnode.key) { - warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); - } - if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself - !isBlockNode && // has current parent block - currentBlock && // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32) { - currentBlock.push(vnode); - } - return vnode; - } - const createVNode = createVNodeWithArgsTransform ; - function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - if (!type) { - warn$1(`Invalid vnode type when creating vnode: ${type}.`); - } - type = Comment; - } - if (isVNode(type)) { - const cloned = cloneVNode( - type, - props, - true - /* mergeRef: true */ - ); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } else { - currentBlock.push(cloned); - } - } - cloned.patchFlag = -2; - return cloned; - } - if (isClassComponent(type)) { - type = type.__vccOpts; - } - if (props) { - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (isObject(style)) { - if (isProxy(style) && !isArray(style)) { - style = extend({}, style); - } - props.style = normalizeStyle(style); - } - } - const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; - if (shapeFlag & 4 && isProxy(type)) { - type = toRaw(type); - warn$1( - `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, - ` -Component that was made reactive: `, - type - ); - } - return createBaseVNode( - type, - props, - children, - patchFlag, - dynamicProps, - shapeFlag, - isBlockNode, - true - ); - } - function guardReactiveProps(props) { - if (!props) return null; - return isProxy(props) || isInternalObject(props) ? extend({}, props) : props; - } - function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { - const { props, ref, patchFlag, children, transition } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref ? ( - // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) - ) : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, - target: vnode.target, - targetStart: vnode.targetStart, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor, - ctx: vnode.ctx, - ce: vnode.ce - }; - if (transition && cloneTransition) { - setTransitionHooks( - cloned, - transition.clone(cloned) - ); - } - return cloned; - } - function deepCloneVNode(vnode) { - const cloned = cloneVNode(vnode); - if (isArray(vnode.children)) { - cloned.children = vnode.children.map(deepCloneVNode); - } - return cloned; - } - function createTextVNode(text = " ", flag = 0) { - return createVNode(Text, null, text, flag); - } - function createStaticVNode(content, numberOfNodes) { - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; - } - function createCommentVNode(text = "", asBlock = false) { - return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); - } - function normalizeVNode(child) { - if (child == null || typeof child === "boolean") { - return createVNode(Comment); - } else if (isArray(child)) { - return createVNode( - Fragment, - null, - // #3666, avoid reference pollution when reusing vnode - child.slice() - ); - } else if (isVNode(child)) { - return cloneIfMounted(child); - } else { - return createVNode(Text, null, String(child)); - } - } - function cloneIfMounted(child) { - return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); - } - function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } else if (isArray(children)) { - type = 16; - } else if (typeof children === "object") { - if (shapeFlag & (1 | 64)) { - const slot = children.default; - if (slot) { - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } else { - type = 32; - const slotFlag = children._; - if (!slotFlag && !isInternalObject(children)) { - children._ctx = currentRenderingInstance; - } else if (slotFlag === 3 && currentRenderingInstance) { - if (currentRenderingInstance.slots._ === 1) { - children._ = 1; - } else { - children._ = 2; - vnode.patchFlag |= 1024; - } - } - } - } else if (isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32; - } else { - children = String(children); - if (shapeFlag & 64) { - type = 16; - children = [createTextVNode(children)]; - } else { - type = 8; - } - } - vnode.children = children; - vnode.shapeFlag |= type; - } - function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === "class") { - if (ret.class !== toMerge.class) { - ret.class = normalizeClass([ret.class, toMerge.class]); - } - } else if (key === "style") { - ret.style = normalizeStyle([ret.style, toMerge.style]); - } else if (isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { - ret[key] = existing ? [].concat(existing, incoming) : incoming; - } - } else if (key !== "") { - ret[key] = toMerge[key]; - } - } - } - return ret; - } - function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7, [ - vnode, - prevVNode - ]); - } - - const emptyAppContext = createAppContext(); - let uid = 0; - function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid++, - vnode, - type, - parent, - appContext, - root: null, - // to be immediately set - next: null, - subTree: null, - // will be set synchronously right after creation - effect: null, - update: null, - // will be set synchronously right after creation - job: null, - scope: new EffectScope( - true - /* detached */ - ), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - ids: parent ? parent.ids : ["", 0, 0], - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - // to be set immediately - emitted: null, - // props default value - propsDefaults: EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: EMPTY_OBJ, - data: EMPTY_OBJ, - props: EMPTY_OBJ, - attrs: EMPTY_OBJ, - slots: EMPTY_OBJ, - refs: EMPTY_OBJ, - setupState: EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - { - instance.ctx = createDevRenderContext(instance); - } - instance.root = parent ? parent.root : instance; - instance.emit = emit.bind(null, instance); - if (vnode.ce) { - vnode.ce(instance); - } - return instance; - } - let currentInstance = null; - const getCurrentInstance = () => currentInstance || currentRenderingInstance; - let internalSetCurrentInstance; - let setInSSRSetupState; - { - internalSetCurrentInstance = (i) => { - currentInstance = i; - }; - setInSSRSetupState = (v) => { - isInSSRComponentSetup = v; - }; - } - const setCurrentInstance = (instance) => { - const prev = currentInstance; - internalSetCurrentInstance(instance); - instance.scope.on(); - return () => { - instance.scope.off(); - internalSetCurrentInstance(prev); - }; - }; - const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - internalSetCurrentInstance(null); - }; - const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); - function validateComponentName(name, { isNativeTag }) { - if (isBuiltInTag(name) || isNativeTag(name)) { - warn$1( - "Do not use built-in or reserved HTML elements as component id: " + name - ); - } - } - function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4; - } - let isInSSRComponentSetup = false; - function setupComponent(instance, isSSR = false, optimized = false) { - isSSR && setInSSRSetupState(isSSR); - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children, optimized); - const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; - isSSR && setInSSRSetupState(false); - return setupResult; - } - function setupStatefulComponent(instance, isSSR) { - var _a; - const Component = instance.type; - { - if (Component.name) { - validateComponentName(Component.name, instance.appContext.config); - } - if (Component.components) { - const names = Object.keys(Component.components); - for (let i = 0; i < names.length; i++) { - validateComponentName(names[i], instance.appContext.config); - } - } - if (Component.directives) { - const names = Object.keys(Component.directives); - for (let i = 0; i < names.length; i++) { - validateDirectiveName(names[i]); - } - } - if (Component.compilerOptions && isRuntimeOnly()) { - warn$1( - `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` - ); - } - } - instance.accessCache = /* @__PURE__ */ Object.create(null); - instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); - { - exposePropsOnRenderContext(instance); - } - const { setup } = Component; - if (setup) { - pauseTracking(); - const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; - const reset = setCurrentInstance(instance); - const setupResult = callWithErrorHandling( - setup, - instance, - 0, - [ - shallowReadonly(instance.props) , - setupContext - ] - ); - const isAsyncSetup = isPromise(setupResult); - resetTracking(); - reset(); - if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { - markAsyncBoundary(instance); - } - if (isAsyncSetup) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - return setupResult.then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }).catch((e) => { - handleError(e, instance, 0); - }); - } else { - instance.asyncDep = setupResult; - if (!instance.suspense) { - const name = (_a = Component.name) != null ? _a : "Anonymous"; - warn$1( - `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` - ); - } - } - } else { - handleSetupResult(instance, setupResult, isSSR); - } - } else { - finishComponentSetup(instance, isSSR); - } - } - function handleSetupResult(instance, setupResult, isSSR) { - if (isFunction(setupResult)) { - { - instance.render = setupResult; - } - } else if (isObject(setupResult)) { - if (isVNode(setupResult)) { - warn$1( - `setup() should not return VNodes directly - return a render function instead.` - ); - } - { - instance.devtoolsRawSetupState = setupResult; - } - instance.setupState = proxyRefs(setupResult); - { - exposeSetupStateOnRenderContext(instance); - } - } else if (setupResult !== void 0) { - warn$1( - `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` - ); - } - finishComponentSetup(instance, isSSR); - } - let compile; - let installWithProxy; - function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = (i) => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; - } - const isRuntimeOnly = () => !compile; - function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - if (!instance.render) { - if (!isSSR && compile && !Component.render) { - const template = Component.template || resolveMergedOptions(instance).template; - if (template) { - { - startMeasure(instance, `compile`); - } - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = extend( - extend( - { - isCustomElement, - delimiters - }, - compilerOptions - ), - componentCompilerOptions - ); - Component.render = compile(template, finalCompilerOptions); - { - endMeasure(instance, `compile`); - } - } - } - instance.render = Component.render || NOOP; - if (installWithProxy) { - installWithProxy(instance); - } - } - { - const reset = setCurrentInstance(instance); - pauseTracking(); - try { - applyOptions(instance); - } finally { - resetTracking(); - reset(); - } - } - if (!Component.render && instance.render === NOOP && !isSSR) { - if (!compile && Component.template) { - warn$1( - `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.global.js" instead.` ) - ); - } else { - warn$1(`Component is missing template or render function: `, Component); - } - } - } - const attrsProxyHandlers = { - get(target, key) { - markAttrsAccessed(); - track(target, "get", ""); - return target[key]; - }, - set() { - warn$1(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn$1(`setupContext.attrs is readonly.`); - return false; - } - } ; - function getSlotsProxy(instance) { - return new Proxy(instance.slots, { - get(target, key) { - track(instance, "get", "$slots"); - return target[key]; - } - }); - } - function createSetupContext(instance) { - const expose = (exposed) => { - { - if (instance.exposed) { - warn$1(`expose() should be called only once per setup().`); - } - if (exposed != null) { - let exposedType = typeof exposed; - if (exposedType === "object") { - if (isArray(exposed)) { - exposedType = "array"; - } else if (isRef(exposed)) { - exposedType = "ref"; - } - } - if (exposedType !== "object") { - warn$1( - `expose() should be passed a plain object, received ${exposedType}.` - ); - } - } - } - instance.exposed = exposed || {}; - }; - { - let attrsProxy; - let slotsProxy; - return Object.freeze({ - get attrs() { - return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); - }, - get slots() { - return slotsProxy || (slotsProxy = getSlotsProxy(instance)); - }, - get emit() { - return (event, ...args) => instance.emit(event, ...args); - }, - expose - }); - } - } - function getComponentPublicInstance(instance) { - if (instance.exposed) { - return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - }, - has(target, key) { - return key in target || key in publicPropertiesMap; - } - })); - } else { - return instance.proxy; - } - } - const classifyRE = /(?:^|[-_])(\w)/g; - const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); - function getComponentName(Component, includeInferred = true) { - return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; - } - function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; - } - } - if (!name && instance && instance.parent) { - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = inferFromRegistry( - instance.components || instance.parent.type.components - ) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; - } - function isClassComponent(value) { - return isFunction(value) && "__vccOpts" in value; - } - - const computed = (getterOrOptions, debugOptions) => { - const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); - { - const i = getCurrentInstance(); - if (i && i.appContext.config.warnRecursiveComputed) { - c._warnRecursive = true; - } - } - return c; - }; - - function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - return createVNode(type, propsOrChildren); - } else { - return createVNode(type, null, propsOrChildren); - } - } else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } - } - - function initCustomFormatter() { - if (typeof window === "undefined") { - return; - } - const vueStyle = { style: "color:#3ba776" }; - const numberStyle = { style: "color:#1677ff" }; - const stringStyle = { style: "color:#f5222d" }; - const keywordStyle = { style: "color:#eb2f96" }; - const formatter = { - __vue_custom_formatter: true, - header(obj) { - if (!isObject(obj)) { - return null; - } - if (obj.__isVue) { - return ["div", vueStyle, `VueInstance`]; - } else if (isRef(obj)) { - return [ - "div", - {}, - ["span", vueStyle, genRefFlag(obj)], - "<", - // avoid debugger accessing value affecting behavior - formatValue("_value" in obj ? obj._value : obj), - `>` - ]; - } else if (isReactive(obj)) { - return [ - "div", - {}, - ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], - "<", - formatValue(obj), - `>${isReadonly(obj) ? ` (readonly)` : ``}` - ]; - } else if (isReadonly(obj)) { - return [ - "div", - {}, - ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], - "<", - formatValue(obj), - ">" - ]; - } - return null; - }, - hasBody(obj) { - return obj && obj.__isVue; - }, - body(obj) { - if (obj && obj.__isVue) { - return [ - "div", - {}, - ...formatInstance(obj.$) - ]; - } - } - }; - function formatInstance(instance) { - const blocks = []; - if (instance.type.props && instance.props) { - blocks.push(createInstanceBlock("props", toRaw(instance.props))); - } - if (instance.setupState !== EMPTY_OBJ) { - blocks.push(createInstanceBlock("setup", instance.setupState)); - } - if (instance.data !== EMPTY_OBJ) { - blocks.push(createInstanceBlock("data", toRaw(instance.data))); - } - const computed = extractKeys(instance, "computed"); - if (computed) { - blocks.push(createInstanceBlock("computed", computed)); - } - const injected = extractKeys(instance, "inject"); - if (injected) { - blocks.push(createInstanceBlock("injected", injected)); - } - blocks.push([ - "div", - {}, - [ - "span", - { - style: keywordStyle.style + ";opacity:0.66" - }, - "$ (internal): " - ], - ["object", { object: instance }] - ]); - return blocks; - } - function createInstanceBlock(type, target) { - target = extend({}, target); - if (!Object.keys(target).length) { - return ["span", {}]; - } - return [ - "div", - { style: "line-height:1.25em;margin-bottom:0.6em" }, - [ - "div", - { - style: "color:#476582" - }, - type - ], - [ - "div", - { - style: "padding-left:1.25em" - }, - ...Object.keys(target).map((key) => { - return [ - "div", - {}, - ["span", keywordStyle, key + ": "], - formatValue(target[key], false) - ]; - }) - ] - ]; - } - function formatValue(v, asRaw = true) { - if (typeof v === "number") { - return ["span", numberStyle, v]; - } else if (typeof v === "string") { - return ["span", stringStyle, JSON.stringify(v)]; - } else if (typeof v === "boolean") { - return ["span", keywordStyle, v]; - } else if (isObject(v)) { - return ["object", { object: asRaw ? toRaw(v) : v }]; - } else { - return ["span", stringStyle, String(v)]; - } - } - function extractKeys(instance, type) { - const Comp = instance.type; - if (isFunction(Comp)) { - return; - } - const extracted = {}; - for (const key in instance.ctx) { - if (isKeyOfType(Comp, key, type)) { - extracted[key] = instance.ctx[key]; - } - } - return extracted; - } - function isKeyOfType(Comp, key, type) { - const opts = Comp[type]; - if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { - return true; - } - if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { - return true; - } - if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { - return true; - } - } - function genRefFlag(v) { - if (isShallow(v)) { - return `ShallowRef`; - } - if (v.effect) { - return `ComputedRef`; - } - return `Ref`; - } - if (window.devtoolsFormatters) { - window.devtoolsFormatters.push(formatter); - } else { - window.devtoolsFormatters = [formatter]; - } - } - - function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - ret.memo = memo.slice(); - ret.cacheIndex = index; - return cache[index] = ret; - } - function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; - } - for (let i = 0; i < prev.length; i++) { - if (hasChanged(prev[i], memo[i])) { - return false; - } - } - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; - } - - const version = "3.5.13"; - const warn = warn$1 ; - const ErrorTypeStrings = ErrorTypeStrings$1 ; - const devtools = devtools$1 ; - const setDevtoolsHook = setDevtoolsHook$1 ; - const ssrUtils = null; - const resolveFilter = null; - const compatUtils = null; - const DeprecationTypes = null; - - let policy = void 0; - const tt = typeof window !== "undefined" && window.trustedTypes; - if (tt) { - try { - policy = /* @__PURE__ */ tt.createPolicy("vue", { - createHTML: (val) => val - }); - } catch (e) { - warn(`Error creating trusted types policy: ${e}`); - } - } - const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; - const svgNS = "http://www.w3.org/2000/svg"; - const mathmlNS = "http://www.w3.org/1998/Math/MathML"; - const doc = typeof document !== "undefined" ? document : null; - const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); - const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: (child) => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, namespace, is, props) => { - const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); - if (tag === "select" && props && props.multiple != null) { - el.setAttribute("multiple", props.multiple); - } - return el; - }, - createText: (text) => doc.createTextNode(text), - createComment: (text) => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: (node) => node.parentNode, - nextSibling: (node) => node.nextSibling, - querySelector: (selector) => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ""); - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, namespace, start, end) { - const before = anchor ? anchor.previousSibling : parent.lastChild; - if (start && (start === end || start.nextSibling)) { - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) break; - } - } else { - templateContainer.innerHTML = unsafeToTrustedHTML( - namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content - ); - const template = templateContainer.content; - if (namespace === "svg" || namespace === "mathml") { - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; - } - }; - - const TRANSITION = "transition"; - const ANIMATION = "animation"; - const vtcKey = Symbol("_vtc"); - const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String - }; - const TransitionPropsValidators = /* @__PURE__ */ extend( - {}, - BaseTransitionPropsValidators, - DOMTransitionPropsValidators - ); - const decorate$1 = (t) => { - t.displayName = "Transition"; - t.props = TransitionPropsValidators; - return t; - }; - const Transition = /* @__PURE__ */ decorate$1( - (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots) - ); - const callHook = (hook, args = []) => { - if (isArray(hook)) { - hook.forEach((h2) => h2(...args)); - } else if (hook) { - hook(...args); - } - }; - const hasExplicitCallback = (hook) => { - return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; - }; - function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; - } - } - if (rawProps.css === false) { - return baseProps; - } - const { - name = "v", - type, - duration, - enterFromClass = `${name}-enter-from`, - enterActiveClass = `${name}-enter-active`, - enterToClass = `${name}-enter-to`, - appearFromClass = enterFromClass, - appearActiveClass = enterActiveClass, - appearToClass = enterToClass, - leaveFromClass = `${name}-leave-from`, - leaveActiveClass = `${name}-leave-active`, - leaveToClass = `${name}-leave-to` - } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { - onBeforeEnter, - onEnter, - onEnterCancelled, - onLeave, - onLeaveCancelled, - onBeforeAppear = onBeforeEnter, - onAppear = onEnter, - onAppearCancelled = onEnterCancelled - } = baseProps; - const finishEnter = (el, isAppear, done, isCancelled) => { - el._enterCancelled = isCancelled; - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); - }; - const finishLeave = (el, done) => { - el._isLeaving = false; - removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return extend(baseProps, { - onBeforeEnter(el) { - callHook(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - if (!el._enterCancelled) { - forceReflow(); - addTransitionClass(el, leaveActiveClass); - } else { - addTransitionClass(el, leaveActiveClass); - forceReflow(); - } - nextFrame(() => { - if (!el._isLeaving) { - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false, void 0, true); - callHook(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true, void 0, true); - callHook(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook(onLeaveCancelled, [el]); - } - }); - } - function normalizeDuration(duration) { - if (duration == null) { - return null; - } else if (isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } else { - const n = NumberOf(duration); - return [n, n]; - } - } - function NumberOf(val) { - const res = toNumber(val); - { - assertNumber(res, "<transition> explicit duration"); - } - return res; - } - function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); - (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); - } - function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); - const _vtc = el[vtcKey]; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el[vtcKey] = void 0; - } - } - } - function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); - } - let endId = 0; - function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = el._endId = ++endId; - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout != null) { - return setTimeout(resolveIfNotStale, explicitTimeout); - } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); - } - const endEvent = type + "end"; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); - } - function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - const getStyleProperties = (key) => (styles[key] || "").split(", "); - const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); - const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(`${ANIMATION}Delay`); - const animationDurations = getStyleProperties(`${ANIMATION}Duration`); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } - } else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } - } else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; - propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; - } - const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( - getStyleProperties(`${TRANSITION}Property`).toString() - ); - return { - type, - timeout, - propCount, - hasTransform - }; - } - function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); - } - function toMs(s) { - if (s === "auto") return 0; - return Number(s.slice(0, -1).replace(",", ".")) * 1e3; - } - function forceReflow() { - return document.body.offsetHeight; - } - - function patchClass(el, value, isSVG) { - const transitionClasses = el[vtcKey]; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); - } - if (value == null) { - el.removeAttribute("class"); - } else if (isSVG) { - el.setAttribute("class", value); - } else { - el.className = value; - } - } - - const vShowOriginalDisplay = Symbol("_vod"); - const vShowHidden = Symbol("_vsh"); - const vShow = { - beforeMount(el, { value }, { transition }) { - el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); - } - }; - { - vShow.name = "show"; - } - function setDisplay(el, value) { - el.style.display = value ? el[vShowOriginalDisplay] : "none"; - el[vShowHidden] = !value; - } - - const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); - function useCssVars(getter) { - const instance = getCurrentInstance(); - if (!instance) { - warn(`useCssVars is called without current active component instance.`); - return; - } - const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { - Array.from( - document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) - ).forEach((node) => setVarsOnNode(node, vars)); - }; - { - instance.getCssVars = () => getter(instance.proxy); - } - const setVars = () => { - const vars = getter(instance.proxy); - if (instance.ce) { - setVarsOnNode(instance.ce, vars); - } else { - setVarsOnVNode(instance.subTree, vars); - } - updateTeleports(vars); - }; - onBeforeUpdate(() => { - queuePostFlushCb(setVars); - }); - onMounted(() => { - watch(setVars, NOOP, { flush: "post" }); - const ob = new MutationObserver(setVars); - ob.observe(instance.subTree.el.parentNode, { childList: true }); - onUnmounted(() => ob.disconnect()); - }); - } - function setVarsOnVNode(vnode, vars) { - if (vnode.shapeFlag & 128) { - const suspense = vnode.suspense; - vnode = suspense.activeBranch; - if (suspense.pendingBranch && !suspense.isHydrating) { - suspense.effects.push(() => { - setVarsOnVNode(suspense.activeBranch, vars); - }); - } - } - while (vnode.component) { - vnode = vnode.component.subTree; - } - if (vnode.shapeFlag & 1 && vnode.el) { - setVarsOnNode(vnode.el, vars); - } else if (vnode.type === Fragment) { - vnode.children.forEach((c) => setVarsOnVNode(c, vars)); - } else if (vnode.type === Static) { - let { el, anchor } = vnode; - while (el) { - setVarsOnNode(el, vars); - if (el === anchor) break; - el = el.nextSibling; - } - } - } - function setVarsOnNode(el, vars) { - if (el.nodeType === 1) { - const style = el.style; - let cssText = ""; - for (const key in vars) { - style.setProperty(`--${key}`, vars[key]); - cssText += `--${key}: ${vars[key]};`; - } - style[CSS_VAR_TEXT] = cssText; - } - } - - const displayRE = /(^|;)\s*display\s*:/; - function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = isString(next); - let hasControlledDisplay = false; - if (next && !isCssString) { - if (prev) { - if (!isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ""); - } - } - } else { - for (const prevStyle of prev.split(";")) { - const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); - if (next[key] == null) { - setStyle(style, key, ""); - } - } - } - } - for (const key in next) { - if (key === "display") { - hasControlledDisplay = true; - } - setStyle(style, key, next[key]); - } - } else { - if (isCssString) { - if (prev !== next) { - const cssVarText = style[CSS_VAR_TEXT]; - if (cssVarText) { - next += ";" + cssVarText; - } - style.cssText = next; - hasControlledDisplay = displayRE.test(next); - } - } else if (prev) { - el.removeAttribute("style"); - } - } - if (vShowOriginalDisplay in el) { - el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; - if (el[vShowHidden]) { - style.display = "none"; - } - } - } - const semicolonRE = /[^\\];\s*$/; - const importantRE = /\s*!important$/; - function setStyle(style, name, val) { - if (isArray(val)) { - val.forEach((v) => setStyle(style, name, v)); - } else { - if (val == null) val = ""; - { - if (semicolonRE.test(val)) { - warn( - `Unexpected semicolon at the end of '${name}' style value: '${val}'` - ); - } - } - if (name.startsWith("--")) { - style.setProperty(name, val); - } else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - style.setProperty( - hyphenate(prefixed), - val.replace(importantRE, ""), - "important" - ); - } else { - style[prefixed] = val; - } - } - } - } - const prefixes = ["Webkit", "Moz", "ms"]; - const prefixCache = {}; - function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = camelize(rawName); - if (name !== "filter" && name in style) { - return prefixCache[rawName] = name; - } - name = capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return prefixCache[rawName] = prefixed; - } - } - return rawName; - } - - const xlinkNS = "http://www.w3.org/1999/xlink"; - function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) { - if (isSVG && key.startsWith("xlink:")) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } else { - el.setAttributeNS(xlinkNS, key, value); - } - } else { - if (value == null || isBoolean && !includeBooleanAttr(value)) { - el.removeAttribute(key); - } else { - el.setAttribute( - key, - isBoolean ? "" : isSymbol(value) ? String(value) : value - ); - } - } - } - - function patchDOMProp(el, key, value, parentComponent, attrName) { - if (key === "innerHTML" || key === "textContent") { - if (value != null) { - el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; - } - return; - } - const tag = el.tagName; - if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally - !tag.includes("-")) { - const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; - const newValue = value == null ? ( - // #11647: value should be set as empty string for null and undefined, - // but <input type="checkbox"> should be set as 'on'. - el.type === "checkbox" ? "on" : "" - ) : String(value); - if (oldValue !== newValue || !("_value" in el)) { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - el._value = value; - return; - } - let needRemove = false; - if (value === "" || value == null) { - const type = typeof el[key]; - if (type === "boolean") { - value = includeBooleanAttr(value); - } else if (value == null && type === "string") { - value = ""; - needRemove = true; - } else if (type === "number") { - value = 0; - needRemove = true; - } - } - try { - el[key] = value; - } catch (e) { - if (!needRemove) { - warn( - `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, - e - ); - } - } - needRemove && el.removeAttribute(attrName || key); - } - - function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); - } - function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); - } - const veiKey = Symbol("_vei"); - function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - const invokers = el[veiKey] || (el[veiKey] = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - existingInvoker.value = sanitizeEventValue(nextValue, rawName) ; - } else { - const [name, options] = parseName(rawName); - if (nextValue) { - const invoker = invokers[rawName] = createInvoker( - sanitizeEventValue(nextValue, rawName) , - instance - ); - addEventListener(el, name, invoker, options); - } else if (existingInvoker) { - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = void 0; - } - } - } - const optionsModifierRE = /(?:Once|Passive|Capture)$/; - function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while (m = name.match(optionsModifierRE)) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); - return [event, options]; - } - let cachedNow = 0; - const p = /* @__PURE__ */ Promise.resolve(); - const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); - function createInvoker(initialValue, instance) { - const invoker = (e) => { - if (!e._vts) { - e._vts = Date.now(); - } else if (e._vts <= invoker.attached) { - return; - } - callWithAsyncErrorHandling( - patchStopImmediatePropagation(e, invoker.value), - instance, - 5, - [e] - ); - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; - } - function sanitizeEventValue(value, propName) { - if (isFunction(value) || isArray(value)) { - return value; - } - warn( - `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? -Expected function or array of functions, received type ${typeof value}.` - ); - return NOOP; - } - function patchStopImmediatePropagation(e, value) { - if (isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map( - (fn) => (e2) => !e2._stopped && fn && fn(e2) - ); - } else { - return value; - } - } - - const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter - key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; - const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { - const isSVG = namespace === "svg"; - if (key === "class") { - patchClass(el, nextValue, isSVG); - } else if (key === "style") { - patchStyle(el, prevValue, nextValue); - } else if (isOn(key)) { - if (!isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue); - if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { - patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); - } - } else if ( - // #11081 force set props for possible async custom element - el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) - ) { - patchDOMProp(el, camelize(key), nextValue, parentComponent, key); - } else { - if (key === "true-value") { - el._trueValue = nextValue; - } else if (key === "false-value") { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } - }; - function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - if (key === "innerHTML" || key === "textContent") { - return true; - } - if (key in el && isNativeOn(key) && isFunction(value)) { - return true; - } - return false; - } - if (key === "spellcheck" || key === "draggable" || key === "translate") { - return false; - } - if (key === "form") { - return false; - } - if (key === "list" && el.tagName === "INPUT") { - return false; - } - if (key === "type" && el.tagName === "TEXTAREA") { - return false; - } - if (key === "width" || key === "height") { - const tag = el.tagName; - if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { - return false; - } - } - if (isNativeOn(key) && isString(value)) { - return false; - } - return key in el; - } - - const REMOVAL = {}; - /*! #__NO_SIDE_EFFECTS__ */ - // @__NO_SIDE_EFFECTS__ - function defineCustomElement(options, extraOptions, _createApp) { - const Comp = defineComponent(options, extraOptions); - if (isPlainObject(Comp)) extend(Comp, extraOptions); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, _createApp); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; - } - /*! #__NO_SIDE_EFFECTS__ */ - const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { - return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); - }; - const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { - }; - class VueElement extends BaseClass { - constructor(_def, _props = {}, _createApp = createApp) { - super(); - this._def = _def; - this._props = _props; - this._createApp = _createApp; - this._isVueCE = true; - /** - * @internal - */ - this._instance = null; - /** - * @internal - */ - this._app = null; - /** - * @internal - */ - this._nonce = this._def.nonce; - this._connected = false; - this._resolved = false; - this._numberProps = null; - this._styleChildren = /* @__PURE__ */ new WeakSet(); - this._ob = null; - if (this.shadowRoot && _createApp !== createApp) { - this._root = this.shadowRoot; - } else { - if (this.shadowRoot) { - warn( - `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` - ); - } - if (_def.shadowRoot !== false) { - this.attachShadow({ mode: "open" }); - this._root = this.shadowRoot; - } else { - this._root = this; - } - } - if (!this._def.__asyncLoader) { - this._resolveProps(this._def); - } - } - connectedCallback() { - if (!this.isConnected) return; - if (!this.shadowRoot) { - this._parseSlots(); - } - this._connected = true; - let parent = this; - while (parent = parent && (parent.parentNode || parent.host)) { - if (parent instanceof VueElement) { - this._parent = parent; - break; - } - } - if (!this._instance) { - if (this._resolved) { - this._setParent(); - this._update(); - } else { - if (parent && parent._pendingResolve) { - this._pendingResolve = parent._pendingResolve.then(() => { - this._pendingResolve = void 0; - this._resolveDef(); - }); - } else { - this._resolveDef(); - } - } - } - } - _setParent(parent = this._parent) { - if (parent) { - this._instance.parent = parent._instance; - this._instance.provides = parent._instance.provides; - } - } - disconnectedCallback() { - this._connected = false; - nextTick(() => { - if (!this._connected) { - if (this._ob) { - this._ob.disconnect(); - this._ob = null; - } - this._app && this._app.unmount(); - if (this._instance) this._instance.ce = void 0; - this._app = this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._pendingResolve) { - return; - } - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - this._ob = new MutationObserver((mutations) => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }); - this._ob.observe(this, { attributes: true }); - const resolve = (def, isAsync = false) => { - this._resolved = true; - this._pendingResolve = void 0; - const { props, styles } = def; - let numberProps; - if (props && !isArray(props)) { - for (const key in props) { - const opt = props[key]; - if (opt === Number || opt && opt.type === Number) { - if (key in this._props) { - this._props[key] = toNumber(this._props[key]); - } - (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; - } - } - } - this._numberProps = numberProps; - if (isAsync) { - this._resolveProps(def); - } - if (this.shadowRoot) { - this._applyStyles(styles); - } else if (styles) { - warn( - "Custom element style injection is not supported when using shadowRoot: false" - ); - } - this._mount(def); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - this._pendingResolve = asyncDef().then( - (def) => resolve(this._def = def, true) - ); - } else { - resolve(this._def); - } - } - _mount(def) { - if (!def.name) { - def.name = "VueElement"; - } - this._app = this._createApp(def); - if (def.configureApp) { - def.configureApp(this._app); - } - this._app._ceVNode = this._createVNode(); - this._app.mount(this._root); - const exposed = this._instance && this._instance.exposed; - if (!exposed) return; - for (const key in exposed) { - if (!hasOwn(this, key)) { - Object.defineProperty(this, key, { - // unwrap ref to be consistent with public instance behavior - get: () => unref(exposed[key]) - }); - } else { - warn(`Exposed property "${key}" already exists on custom element.`); - } - } - } - _resolveProps(def) { - const { props } = def; - const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); - for (const key of Object.keys(this)) { - if (key[0] !== "_" && declaredPropKeys.includes(key)) { - this._setProp(key, this[key]); - } - } - for (const key of declaredPropKeys.map(camelize)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val, true, true); - } - }); - } - } - _setAttr(key) { - if (key.startsWith("data-v-")) return; - const has = this.hasAttribute(key); - let value = has ? this.getAttribute(key) : REMOVAL; - const camelKey = camelize(key); - if (has && this._numberProps && this._numberProps[camelKey]) { - value = toNumber(value); - } - this._setProp(camelKey, value, false, true); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = false) { - if (val !== this._props[key]) { - if (val === REMOVAL) { - delete this._props[key]; - } else { - this._props[key] = val; - if (key === "key" && this._app) { - this._app._ceVNode.key = val; - } - } - if (shouldUpdate && this._instance) { - this._update(); - } - if (shouldReflect) { - const ob = this._ob; - ob && ob.disconnect(); - if (val === true) { - this.setAttribute(hyphenate(key), ""); - } else if (typeof val === "string" || typeof val === "number") { - this.setAttribute(hyphenate(key), val + ""); - } else if (!val) { - this.removeAttribute(hyphenate(key)); - } - ob && ob.observe(this, { attributes: true }); - } - } - } - _update() { - render(this._createVNode(), this._root); - } - _createVNode() { - const baseProps = {}; - if (!this.shadowRoot) { - baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); - } - const vnode = createVNode(this._def, extend(baseProps, this._props)); - if (!this._instance) { - vnode.ce = (instance) => { - this._instance = instance; - instance.ce = this; - instance.isCE = true; - { - instance.ceReload = (newStyles) => { - if (this._styles) { - this._styles.forEach((s) => this._root.removeChild(s)); - this._styles.length = 0; - } - this._applyStyles(newStyles); - this._instance = null; - this._update(); - }; - } - const dispatch = (event, args) => { - this.dispatchEvent( - new CustomEvent( - event, - isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args } - ) - ); - }; - instance.emit = (event, ...args) => { - dispatch(event, args); - if (hyphenate(event) !== event) { - dispatch(hyphenate(event), args); - } - }; - this._setParent(); - }; - } - return vnode; - } - _applyStyles(styles, owner) { - if (!styles) return; - if (owner) { - if (owner === this._def || this._styleChildren.has(owner)) { - return; - } - this._styleChildren.add(owner); - } - const nonce = this._nonce; - for (let i = styles.length - 1; i >= 0; i--) { - const s = document.createElement("style"); - if (nonce) s.setAttribute("nonce", nonce); - s.textContent = styles[i]; - this.shadowRoot.prepend(s); - { - if (owner) { - if (owner.__hmrId) { - if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map(); - let entry = this._childStyles.get(owner.__hmrId); - if (!entry) { - this._childStyles.set(owner.__hmrId, entry = []); - } - entry.push(s); - } - } else { - (this._styles || (this._styles = [])).push(s); - } - } - } - } - /** - * Only called when shadowRoot is false - */ - _parseSlots() { - const slots = this._slots = {}; - let n; - while (n = this.firstChild) { - const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; - (slots[slotName] || (slots[slotName] = [])).push(n); - this.removeChild(n); - } - } - /** - * Only called when shadowRoot is false - */ - _renderSlots() { - const outlets = (this._teleportTarget || this).querySelectorAll("slot"); - const scopeId = this._instance.type.__scopeId; - for (let i = 0; i < outlets.length; i++) { - const o = outlets[i]; - const slotName = o.getAttribute("name") || "default"; - const content = this._slots[slotName]; - const parent = o.parentNode; - if (content) { - for (const n of content) { - if (scopeId && n.nodeType === 1) { - const id = scopeId + "-s"; - const walker = document.createTreeWalker(n, 1); - n.setAttribute(id, ""); - let child; - while (child = walker.nextNode()) { - child.setAttribute(id, ""); - } - } - parent.insertBefore(n, o); - } - } else { - while (o.firstChild) parent.insertBefore(o.firstChild, o); - } - parent.removeChild(o); - } - } - /** - * @internal - */ - _injectChildStyle(comp) { - this._applyStyles(comp.styles, comp); - } - /** - * @internal - */ - _removeChildStyle(comp) { - { - this._styleChildren.delete(comp); - if (this._childStyles && comp.__hmrId) { - const oldStyles = this._childStyles.get(comp.__hmrId); - if (oldStyles) { - oldStyles.forEach((s) => this._root.removeChild(s)); - oldStyles.length = 0; - } - } - } - } - } - function useHost(caller) { - const instance = getCurrentInstance(); - const el = instance && instance.ce; - if (el) { - return el; - } else { - if (!instance) { - warn( - `${caller || "useHost"} called without an active component instance.` - ); - } else { - warn( - `${caller || "useHost"} can only be used in components defined via defineCustomElement.` - ); - } - } - return null; - } - function useShadowRoot() { - const el = useHost("useShadowRoot") ; - return el && el.shadowRoot; - } - - function useCssModule(name = "$style") { - { - { - warn(`useCssModule() is not supported in the global build.`); - } - return EMPTY_OBJ; - } - } - - const positionMap = /* @__PURE__ */ new WeakMap(); - const newPositionMap = /* @__PURE__ */ new WeakMap(); - const moveCbKey = Symbol("_moveCb"); - const enterCbKey = Symbol("_enterCb"); - const decorate = (t) => { - delete t.props.mode; - return t; - }; - const TransitionGroupImpl = /* @__PURE__ */ decorate({ - name: "TransitionGroup", - props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevChildren; - let children; - onUpdated(() => { - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || "v"}-move`; - if (!hasCSSTransform( - prevChildren[0].el, - instance.vnode.el, - moveClass - )) { - return; - } - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - forceReflow(); - movedChildren.forEach((c) => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ""; - const cb = el[moveCbKey] = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener("transitionend", cb); - el[moveCbKey] = null; - removeTransitionClass(el, moveClass); - } - }; - el.addEventListener("transitionend", cb); - }); - }); - return () => { - const rawProps = toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || Fragment; - prevChildren = []; - if (children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.el && child.el instanceof Element) { - prevChildren.push(child); - setTransitionHooks( - child, - resolveTransitionHooks( - child, - cssTransitionProps, - state, - instance - ) - ); - positionMap.set( - child, - child.el.getBoundingClientRect() - ); - } - } - } - children = slots.default ? getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - setTransitionHooks( - child, - resolveTransitionHooks(child, cssTransitionProps, state, instance) - ); - } else if (child.type !== Text) { - warn(`<TransitionGroup> children must be keyed.`); - } - } - return createVNode(tag, null, children); - }; - } - }); - const TransitionGroup = TransitionGroupImpl; - function callPendingCbs(c) { - const el = c.el; - if (el[moveCbKey]) { - el[moveCbKey](); - } - if (el[enterCbKey]) { - el[enterCbKey](); - } - } - function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); - } - function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = "0s"; - return c; - } - } - function hasCSSTransform(el, root, moveClass) { - const clone = el.cloneNode(); - const _vtc = el[vtcKey]; - if (_vtc) { - _vtc.forEach((cls) => { - cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); - clone.style.display = "none"; - const container = root.nodeType === 1 ? root : root.parentNode; - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; - } - - const getModelAssigner = (vnode) => { - const fn = vnode.props["onUpdate:modelValue"] || false; - return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; - }; - function onCompositionStart(e) { - e.target.composing = true; - } - function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event("input")); - } - } - const assignKey = Symbol("_assign"); - const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el[assignKey] = getModelAssigner(vnode); - const castToNumber = number || vnode.props && vnode.props.type === "number"; - addEventListener(el, lazy ? "change" : "input", (e) => { - if (e.target.composing) return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = looseToNumber(domValue); - } - el[assignKey](domValue); - }); - if (trim) { - addEventListener(el, "change", () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, "compositionstart", onCompositionStart); - addEventListener(el, "compositionend", onCompositionEnd); - addEventListener(el, "change", onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? "" : value; - }, - beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { - el[assignKey] = getModelAssigner(vnode); - if (el.composing) return; - const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; - const newValue = value == null ? "" : value; - if (elValue === newValue) { - return; - } - if (document.activeElement === el && el.type !== "range") { - if (lazy && value === oldValue) { - return; - } - if (trim && el.value.trim() === newValue) { - return; - } - } - el.value = newValue; - } - }; - const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el[assignKey] = getModelAssigner(vnode); - addEventListener(el, "change", () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el[assignKey]; - if (isArray(modelValue)) { - const index = looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } else if (isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } else { - cloned.delete(elementValue); - } - assign(cloned); - } else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el[assignKey] = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } - }; - function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - let checked; - if (isArray(value)) { - checked = looseIndexOf(value, vnode.props.value) > -1; - } else if (isSet(value)) { - checked = value.has(vnode.props.value); - } else { - if (value === oldValue) return; - checked = looseEqual(value, getCheckboxValue(el, true)); - } - if (el.checked !== checked) { - el.checked = checked; - } - } - const vModelRadio = { - created(el, { value }, vnode) { - el.checked = looseEqual(value, vnode.props.value); - el[assignKey] = getModelAssigner(vnode); - addEventListener(el, "change", () => { - el[assignKey](getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el[assignKey] = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = looseEqual(value, vnode.props.value); - } - } - }; - const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = isSet(value); - addEventListener(el, "change", () => { - const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( - (o) => number ? looseToNumber(getValue(o)) : getValue(o) - ); - el[assignKey]( - el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] - ); - el._assigning = true; - nextTick(() => { - el._assigning = false; - }); - }); - el[assignKey] = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el[assignKey] = getModelAssigner(vnode); - }, - updated(el, { value }) { - if (!el._assigning) { - setSelected(el, value); - } - } - }; - function setSelected(el, value) { - const isMultiple = el.multiple; - const isArrayValue = isArray(value); - if (isMultiple && !isArrayValue && !isSet(value)) { - warn( - `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` - ); - return; - } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (isArrayValue) { - const optionType = typeof optionValue; - if (optionType === "string" || optionType === "number") { - option.selected = value.some((v) => String(v) === String(optionValue)); - } else { - option.selected = looseIndexOf(value, optionValue) > -1; - } - } else { - option.selected = value.has(optionValue); - } - } else if (looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) el.selectedIndex = i; - return; - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } - } - function getValue(el) { - return "_value" in el ? el._value : el.value; - } - function getCheckboxValue(el, checked) { - const key = checked ? "_trueValue" : "_falseValue"; - return key in el ? el[key] : checked; - } - const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, "created"); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, "mounted"); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, "updated"); - } - }; - function resolveDynamicModel(tagName, type) { - switch (tagName) { - case "SELECT": - return vModelSelect; - case "TEXTAREA": - return vModelText; - default: - switch (type) { - case "checkbox": - return vModelCheckbox; - case "radio": - return vModelRadio; - default: - return vModelText; - } - } - } - function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel( - el.tagName, - vnode.props && vnode.props.type - ); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); - } - - const systemModifiers = ["ctrl", "shift", "alt", "meta"]; - const modifierGuards = { - stop: (e) => e.stopPropagation(), - prevent: (e) => e.preventDefault(), - self: (e) => e.target !== e.currentTarget, - ctrl: (e) => !e.ctrlKey, - shift: (e) => !e.shiftKey, - alt: (e) => !e.altKey, - meta: (e) => !e.metaKey, - left: (e) => "button" in e && e.button !== 0, - middle: (e) => "button" in e && e.button !== 1, - right: (e) => "button" in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) - }; - const withModifiers = (fn, modifiers) => { - const cache = fn._withMods || (fn._withMods = {}); - const cacheKey = modifiers.join("."); - return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) return; - } - return fn(event, ...args); - }); - }; - const keyNames = { - esc: "escape", - space: " ", - up: "arrow-up", - left: "arrow-left", - right: "arrow-right", - down: "arrow-down", - delete: "backspace" - }; - const withKeys = (fn, modifiers) => { - const cache = fn._withKeys || (fn._withKeys = {}); - const cacheKey = modifiers.join("."); - return cache[cacheKey] || (cache[cacheKey] = (event) => { - if (!("key" in event)) { - return; - } - const eventKey = hyphenate(event.key); - if (modifiers.some( - (k) => k === eventKey || keyNames[k] === eventKey - )) { - return fn(event); - } - }); - }; - - const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); - let renderer; - let enabledHydration = false; - function ensureRenderer() { - return renderer || (renderer = createRenderer(rendererOptions)); - } - function ensureHydrationRenderer() { - renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; - } - const render = (...args) => { - ensureRenderer().render(...args); - }; - const hydrate = (...args) => { - ensureHydrationRenderer().hydrate(...args); - }; - const createApp = (...args) => { - const app = ensureRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); - } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) return; - const component = app._component; - if (!isFunction(component) && !component.render && !component.template) { - component.template = container.innerHTML; - } - if (container.nodeType === 1) { - container.textContent = ""; - } - const proxy = mount(container, false, resolveRootNamespace(container)); - if (container instanceof Element) { - container.removeAttribute("v-cloak"); - container.setAttribute("data-v-app", ""); - } - return proxy; - }; - return app; - }; - const createSSRApp = (...args) => { - const app = ensureHydrationRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); - } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, resolveRootNamespace(container)); - } - }; - return app; - }; - function resolveRootNamespace(container) { - if (container instanceof SVGElement) { - return "svg"; - } - if (typeof MathMLElement === "function" && container instanceof MathMLElement) { - return "mathml"; - } - } - function injectNativeTagCheck(app) { - Object.defineProperty(app.config, "isNativeTag", { - value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), - writable: false - }); - } - function injectCompilerOptionsCheck(app) { - if (isRuntimeOnly()) { - const isCustomElement = app.config.isCustomElement; - Object.defineProperty(app.config, "isCustomElement", { - get() { - return isCustomElement; - }, - set() { - warn( - `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` - ); - } - }); - const compilerOptions = app.config.compilerOptions; - const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. -- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. -- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader -- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; - Object.defineProperty(app.config, "compilerOptions", { - get() { - warn(msg); - return compilerOptions; - }, - set() { - warn(msg); - } - }); - } - } - function normalizeContainer(container) { - if (isString(container)) { - const res = document.querySelector(container); - if (!res) { - warn( - `Failed to mount app: mount target selector "${container}" returned null.` - ); - } - return res; - } - if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { - warn( - `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` - ); - } - return container; - } - const initDirectivesForSSR = NOOP; - - exports.BaseTransition = BaseTransition; - exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators; - exports.Comment = Comment; - exports.DeprecationTypes = DeprecationTypes; - exports.EffectScope = EffectScope; - exports.ErrorCodes = ErrorCodes; - exports.ErrorTypeStrings = ErrorTypeStrings; - exports.Fragment = Fragment; - exports.KeepAlive = KeepAlive; - exports.ReactiveEffect = ReactiveEffect; - exports.Static = Static; - exports.Suspense = Suspense; - exports.Teleport = Teleport; - exports.Text = Text; - exports.TrackOpTypes = TrackOpTypes; - exports.Transition = Transition; - exports.TransitionGroup = TransitionGroup; - exports.TriggerOpTypes = TriggerOpTypes; - exports.VueElement = VueElement; - exports.assertNumber = assertNumber; - exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling; - exports.callWithErrorHandling = callWithErrorHandling; - exports.camelize = camelize; - exports.capitalize = capitalize; - exports.cloneVNode = cloneVNode; - exports.compatUtils = compatUtils; - exports.computed = computed; - exports.createApp = createApp; - exports.createBlock = createBlock; - exports.createCommentVNode = createCommentVNode; - exports.createElementBlock = createElementBlock; - exports.createElementVNode = createBaseVNode; - exports.createHydrationRenderer = createHydrationRenderer; - exports.createPropsRestProxy = createPropsRestProxy; - exports.createRenderer = createRenderer; - exports.createSSRApp = createSSRApp; - exports.createSlots = createSlots; - exports.createStaticVNode = createStaticVNode; - exports.createTextVNode = createTextVNode; - exports.createVNode = createVNode; - exports.customRef = customRef; - exports.defineAsyncComponent = defineAsyncComponent; - exports.defineComponent = defineComponent; - exports.defineCustomElement = defineCustomElement; - exports.defineEmits = defineEmits; - exports.defineExpose = defineExpose; - exports.defineModel = defineModel; - exports.defineOptions = defineOptions; - exports.defineProps = defineProps; - exports.defineSSRCustomElement = defineSSRCustomElement; - exports.defineSlots = defineSlots; - exports.devtools = devtools; - exports.effect = effect; - exports.effectScope = effectScope; - exports.getCurrentInstance = getCurrentInstance; - exports.getCurrentScope = getCurrentScope; - exports.getCurrentWatcher = getCurrentWatcher; - exports.getTransitionRawChildren = getTransitionRawChildren; - exports.guardReactiveProps = guardReactiveProps; - exports.h = h; - exports.handleError = handleError; - exports.hasInjectionContext = hasInjectionContext; - exports.hydrate = hydrate; - exports.hydrateOnIdle = hydrateOnIdle; - exports.hydrateOnInteraction = hydrateOnInteraction; - exports.hydrateOnMediaQuery = hydrateOnMediaQuery; - exports.hydrateOnVisible = hydrateOnVisible; - exports.initCustomFormatter = initCustomFormatter; - exports.initDirectivesForSSR = initDirectivesForSSR; - exports.inject = inject; - exports.isMemoSame = isMemoSame; - exports.isProxy = isProxy; - exports.isReactive = isReactive; - exports.isReadonly = isReadonly; - exports.isRef = isRef; - exports.isRuntimeOnly = isRuntimeOnly; - exports.isShallow = isShallow; - exports.isVNode = isVNode; - exports.markRaw = markRaw; - exports.mergeDefaults = mergeDefaults; - exports.mergeModels = mergeModels; - exports.mergeProps = mergeProps; - exports.nextTick = nextTick; - exports.normalizeClass = normalizeClass; - exports.normalizeProps = normalizeProps; - exports.normalizeStyle = normalizeStyle; - exports.onActivated = onActivated; - exports.onBeforeMount = onBeforeMount; - exports.onBeforeUnmount = onBeforeUnmount; - exports.onBeforeUpdate = onBeforeUpdate; - exports.onDeactivated = onDeactivated; - exports.onErrorCaptured = onErrorCaptured; - exports.onMounted = onMounted; - exports.onRenderTracked = onRenderTracked; - exports.onRenderTriggered = onRenderTriggered; - exports.onScopeDispose = onScopeDispose; - exports.onServerPrefetch = onServerPrefetch; - exports.onUnmounted = onUnmounted; - exports.onUpdated = onUpdated; - exports.onWatcherCleanup = onWatcherCleanup; - exports.openBlock = openBlock; - exports.popScopeId = popScopeId; - exports.provide = provide; - exports.proxyRefs = proxyRefs; - exports.pushScopeId = pushScopeId; - exports.queuePostFlushCb = queuePostFlushCb; - exports.reactive = reactive; - exports.readonly = readonly; - exports.ref = ref; - exports.registerRuntimeCompiler = registerRuntimeCompiler; - exports.render = render; - exports.renderList = renderList; - exports.renderSlot = renderSlot; - exports.resolveComponent = resolveComponent; - exports.resolveDirective = resolveDirective; - exports.resolveDynamicComponent = resolveDynamicComponent; - exports.resolveFilter = resolveFilter; - exports.resolveTransitionHooks = resolveTransitionHooks; - exports.setBlockTracking = setBlockTracking; - exports.setDevtoolsHook = setDevtoolsHook; - exports.setTransitionHooks = setTransitionHooks; - exports.shallowReactive = shallowReactive; - exports.shallowReadonly = shallowReadonly; - exports.shallowRef = shallowRef; - exports.ssrContextKey = ssrContextKey; - exports.ssrUtils = ssrUtils; - exports.stop = stop; - exports.toDisplayString = toDisplayString; - exports.toHandlerKey = toHandlerKey; - exports.toHandlers = toHandlers; - exports.toRaw = toRaw; - exports.toRef = toRef; - exports.toRefs = toRefs; - exports.toValue = toValue; - exports.transformVNodeArgs = transformVNodeArgs; - exports.triggerRef = triggerRef; - exports.unref = unref; - exports.useAttrs = useAttrs; - exports.useCssModule = useCssModule; - exports.useCssVars = useCssVars; - exports.useHost = useHost; - exports.useId = useId; - exports.useModel = useModel; - exports.useSSRContext = useSSRContext; - exports.useShadowRoot = useShadowRoot; - exports.useSlots = useSlots; - exports.useTemplateRef = useTemplateRef; - exports.useTransitionState = useTransitionState; - exports.vModelCheckbox = vModelCheckbox; - exports.vModelDynamic = vModelDynamic; - exports.vModelRadio = vModelRadio; - exports.vModelSelect = vModelSelect; - exports.vModelText = vModelText; - exports.vShow = vShow; - exports.version = version; - exports.warn = warn; - exports.watch = watch; - exports.watchEffect = watchEffect; - exports.watchPostEffect = watchPostEffect; - exports.watchSyncEffect = watchSyncEffect; - exports.withAsyncContext = withAsyncContext; - exports.withCtx = withCtx; - exports.withDefaults = withDefaults; - exports.withDirectives = withDirectives; - exports.withKeys = withKeys; - exports.withMemo = withMemo; - exports.withModifiers = withModifiers; - exports.withScopeId = withScopeId; - - return exports; - -})({}); diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js deleted file mode 100644 index 80ad452..0000000 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js +++ /dev/null @@ -1,5 +0,0 @@ -/** -* @vue/runtime-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/var VueRuntimeDOM=function(e){"use strict";var t,n;let l,r,i,s,o,a,u,c,f,p,d,h;function g(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let m={},_=[],y=()=>{},b=()=>!1,S=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),C=e=>e.startsWith("onUpdate:"),x=Object.assign,w=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},E=Object.prototype.hasOwnProperty,k=(e,t)=>E.call(e,t),T=Array.isArray,A=e=>"[object Map]"===V(e),R=e=>"[object Set]"===V(e),O=e=>"[object Date]"===V(e),N=e=>"[object RegExp]"===V(e),P=e=>"function"==typeof e,M=e=>"string"==typeof e,I=e=>"symbol"==typeof e,L=e=>null!==e&&"object"==typeof e,D=e=>(L(e)||P(e))&&P(e.then)&&P(e.catch),F=Object.prototype.toString,V=e=>F.call(e),U=e=>V(e).slice(8,-1),j=e=>"[object Object]"===V(e),B=e=>M(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,$=g(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),H=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},W=/-(\w)/g,K=H(e=>e.replace(W,(e,t)=>t?t.toUpperCase():"")),z=/\B([A-Z])/g,q=H(e=>e.replace(z,"-$1").toLowerCase()),G=H(e=>e.charAt(0).toUpperCase()+e.slice(1)),J=H(e=>e?`on${G(e)}`:""),X=(e,t)=>!Object.is(e,t),Z=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Y=(e,t,n,l=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:l,value:n})},Q=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ee=e=>{let t=M(e)?Number(e):NaN;return isNaN(t)?e:t},et=()=>l||(l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),en=g("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function el(e){if(T(e)){let t={};for(let n=0;n<e.length;n++){let l=e[n],r=M(l)?function(e){let t={};return e.replace(es,"").split(er).forEach(e=>{if(e){let n=e.split(ei);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}(l):el(l);if(r)for(let e in r)t[e]=r[e]}return t}if(M(e)||L(e))return e}let er=/;(?![^(]*\))/g,ei=/:([^]+)/,es=/\/\*[^]*?\*\//g;function eo(e){let t="";if(M(e))t=e;else if(T(e))for(let n=0;n<e.length;n++){let l=eo(e[n]);l&&(t+=l+" ")}else if(L(e))for(let n in e)e[n]&&(t+=n+" ");return t.trim()}let ea=g("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function eu(e,t){if(e===t)return!0;let n=O(e),l=O(t);if(n||l)return!!n&&!!l&&e.getTime()===t.getTime();if(n=I(e),l=I(t),n||l)return e===t;if(n=T(e),l=T(t),n||l)return!!n&&!!l&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let l=0;n&&l<e.length;l++)n=eu(e[l],t[l]);return n}(e,t);if(n=L(e),l=L(t),n||l){if(!n||!l||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let l=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(l&&!r||!l&&r||!eu(e[n],t[n]))return!1}}return String(e)===String(t)}function ec(e,t){return e.findIndex(e=>eu(e,t))}let ef=e=>!!(e&&!0===e.__v_isRef),ep=e=>M(e)?e:null==e?"":T(e)||L(e)&&(e.toString===F||!P(e.toString))?ef(e)?ep(e.value):JSON.stringify(e,ed,2):String(e),ed=(e,t)=>ef(t)?ed(e,t.value):A(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],l)=>(e[eh(t,l)+" =>"]=n,e),{})}:R(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>eh(e))}:I(t)?eh(t):!L(t)||T(t)||j(t)?t:String(t),eh=(e,t="")=>{var n;return I(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class eg{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=r,!e&&r&&(this.index=(r.scopes||(r.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=r;try{return r=this,e()}finally{r=t}}}on(){r=this}off(){r=this.parent}stop(e){if(this._active){let t,n;for(t=0,this._active=!1,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,this.effects.length=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}let ev=new WeakSet;class em{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,r&&r.active&&r.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,ev.has(this)&&(ev.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||ey(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,eO(this),eS(this);let e=i,t=ek;i=this,ek=!0;try{return this.fn()}finally{eC(this),i=e,ek=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)eE(e);this.deps=this.depsTail=void 0,eO(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?ev.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ex(this)&&this.run()}get dirty(){return ex(this)}}let e_=0;function ey(e,t=!1){if(e.flags|=8,t){e.next=o,o=e;return}e.next=s,s=e}function eb(){let e;if(!(--e_>0)){if(o){let e=o;for(o=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;s;){let t=s;for(s=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eS(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function eC(e){let t;let n=e.depsTail,l=n;for(;l;){let e=l.prevDep;-1===l.version?(l===n&&(n=e),eE(l),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(l)):t=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=e}e.deps=t,e.depsTail=n}function ex(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ew(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ew(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eN))return;e.globalVersion=eN;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ex(e)){e.flags&=-3;return}let n=i,l=ek;i=e,ek=!0;try{eS(e);let n=e.fn(e._value);(0===t.version||X(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{i=n,ek=l,eC(e),e.flags&=-3}}function eE(e,t=!1){let{dep:n,prevSub:l,nextSub:r}=e;if(l&&(l.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=l,e.nextSub=void 0),n.subs===e&&(n.subs=l,!l&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)eE(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}let ek=!0,eT=[];function eA(){eT.push(ek),ek=!1}function eR(){let e=eT.pop();ek=void 0===e||e}function eO(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=i;i=void 0;try{t()}finally{i=e}}}let eN=0;class eP{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eM{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!i||!ek||i===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==i)t=this.activeLink=new eP(i,this),i.deps?(t.prevDep=i.depsTail,i.depsTail.nextDep=t,i.depsTail=t):i.deps=i.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let l=t.dep.subs;l!==t&&(t.prevSub=l,l&&(l.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=i.depsTail,t.nextDep=void 0,i.depsTail.nextDep=t,i.depsTail=t,i.deps===t&&(i.deps=e)}return t}trigger(e){this.version++,eN++,this.notify(e)}notify(e){e_++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{eb()}}}let eI=new WeakMap,eL=Symbol(""),eD=Symbol(""),eF=Symbol("");function eV(e,t,n){if(ek&&i){let t=eI.get(e);t||eI.set(e,t=new Map);let l=t.get(n);l||(t.set(n,l=new eM),l.map=t,l.key=n),l.track()}}function eU(e,t,n,l,r,i){let s=eI.get(e);if(!s){eN++;return}let o=e=>{e&&e.trigger()};if(e_++,"clear"===t)s.forEach(o);else{let r=T(e),i=r&&B(n);if(r&&"length"===n){let e=Number(l);s.forEach((t,n)=>{("length"===n||n===eF||!I(n)&&n>=e)&&o(t)})}else switch((void 0!==n||s.has(void 0))&&o(s.get(n)),i&&o(s.get(eF)),t){case"add":r?i&&o(s.get("length")):(o(s.get(eL)),A(e)&&o(s.get(eD)));break;case"delete":!r&&(o(s.get(eL)),A(e)&&o(s.get(eD)));break;case"set":A(e)&&o(s.get(eL))}}eb()}function ej(e){let t=tg(e);return t===e?t:(eV(t,"iterate",eF),td(e)?t:t.map(tm))}function eB(e){return eV(e=tg(e),"iterate",eF),e}let e$={__proto__:null,[Symbol.iterator](){return eH(this,Symbol.iterator,tm)},concat(...e){return ej(this).concat(...e.map(e=>T(e)?ej(e):e))},entries(){return eH(this,"entries",e=>(e[1]=tm(e[1]),e))},every(e,t){return eK(this,"every",e,t,void 0,arguments)},filter(e,t){return eK(this,"filter",e,t,e=>e.map(tm),arguments)},find(e,t){return eK(this,"find",e,t,tm,arguments)},findIndex(e,t){return eK(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eK(this,"findLast",e,t,tm,arguments)},findLastIndex(e,t){return eK(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eK(this,"forEach",e,t,void 0,arguments)},includes(...e){return eq(this,"includes",e)},indexOf(...e){return eq(this,"indexOf",e)},join(e){return ej(this).join(e)},lastIndexOf(...e){return eq(this,"lastIndexOf",e)},map(e,t){return eK(this,"map",e,t,void 0,arguments)},pop(){return eG(this,"pop")},push(...e){return eG(this,"push",e)},reduce(e,...t){return ez(this,"reduce",e,t)},reduceRight(e,...t){return ez(this,"reduceRight",e,t)},shift(){return eG(this,"shift")},some(e,t){return eK(this,"some",e,t,void 0,arguments)},splice(...e){return eG(this,"splice",e)},toReversed(){return ej(this).toReversed()},toSorted(e){return ej(this).toSorted(e)},toSpliced(...e){return ej(this).toSpliced(...e)},unshift(...e){return eG(this,"unshift",e)},values(){return eH(this,"values",tm)}};function eH(e,t,n){let l=eB(e),r=l[t]();return l===e||td(e)||(r._next=r.next,r.next=()=>{let e=r._next();return e.value&&(e.value=n(e.value)),e}),r}let eW=Array.prototype;function eK(e,t,n,l,r,i){let s=eB(e),o=s!==e&&!td(e),a=s[t];if(a!==eW[t]){let t=a.apply(e,i);return o?tm(t):t}let u=n;s!==e&&(o?u=function(t,l){return n.call(this,tm(t),l,e)}:n.length>2&&(u=function(t,l){return n.call(this,t,l,e)}));let c=a.call(s,u,l);return o&&r?r(c):c}function ez(e,t,n,l){let r=eB(e),i=n;return r!==e&&(td(e)?n.length>3&&(i=function(t,l,r){return n.call(this,t,l,r,e)}):i=function(t,l,r){return n.call(this,t,tm(l),r,e)}),r[t](i,...l)}function eq(e,t,n){let l=tg(e);eV(l,"iterate",eF);let r=l[t](...n);return(-1===r||!1===r)&&th(n[0])?(n[0]=tg(n[0]),l[t](...n)):r}function eG(e,t,n=[]){eA(),e_++;let l=tg(e)[t].apply(e,n);return eb(),eR(),l}let eJ=g("__proto__,__v_isRef,__isVue"),eX=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(I));function eZ(e){I(e)||(e=String(e));let t=tg(this);return eV(t,"has",e),t.hasOwnProperty(e)}class eY{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;let l=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!l;if("__v_isReadonly"===t)return l;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(l?r?ts:ti:r?tr:tl).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let i=T(e);if(!l){let e;if(i&&(e=e$[t]))return e;if("hasOwnProperty"===t)return eZ}let s=Reflect.get(e,t,ty(e)?e:n);return(I(t)?eX.has(t):eJ(t))?s:(l||eV(e,"get",t),r)?s:ty(s)?i&&B(t)?s:s.value:L(s)?l?tu(s):to(s):s}}class eQ extends eY{constructor(e=!1){super(!1,e)}set(e,t,n,l){let r=e[t];if(!this._isShallow){let t=tp(r);if(td(n)||tp(n)||(r=tg(r),n=tg(n)),!T(e)&&ty(r)&&!ty(n))return!t&&(r.value=n,!0)}let i=T(e)&&B(t)?Number(t)<e.length:k(e,t),s=Reflect.set(e,t,n,ty(e)?e:l);return e===tg(l)&&(i?X(n,r)&&eU(e,"set",t,n):eU(e,"add",t,n)),s}deleteProperty(e,t){let n=k(e,t);e[t];let l=Reflect.deleteProperty(e,t);return l&&n&&eU(e,"delete",t,void 0),l}has(e,t){let n=Reflect.has(e,t);return I(t)&&eX.has(t)||eV(e,"has",t),n}ownKeys(e){return eV(e,"iterate",T(e)?"length":eL),Reflect.ownKeys(e)}}class e0 extends eY{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let e1=new eQ,e2=new e0,e6=new eQ(!0),e4=new e0(!0),e8=e=>e,e3=e=>Reflect.getPrototypeOf(e);function e5(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function e9(e,t){let n=function(e,t){let n={get(n){let l=this.__v_raw,r=tg(l),i=tg(n);e||(X(n,i)&&eV(r,"get",n),eV(r,"get",i));let{has:s}=e3(r),o=t?e8:e?t_:tm;return s.call(r,n)?o(l.get(n)):s.call(r,i)?o(l.get(i)):void(l!==r&&l.get(n))},get size(){let t=this.__v_raw;return e||eV(tg(t),"iterate",eL),Reflect.get(t,"size",t)},has(t){let n=this.__v_raw,l=tg(n),r=tg(t);return e||(X(t,r)&&eV(l,"has",t),eV(l,"has",r)),t===r?n.has(t):n.has(t)||n.has(r)},forEach(n,l){let r=this,i=r.__v_raw,s=tg(i),o=t?e8:e?t_:tm;return e||eV(s,"iterate",eL),i.forEach((e,t)=>n.call(l,o(e),o(t),r))}};return x(n,e?{add:e5("add"),set:e5("set"),delete:e5("delete"),clear:e5("clear")}:{add(e){t||td(e)||tp(e)||(e=tg(e));let n=tg(this);return e3(n).has.call(n,e)||(n.add(e),eU(n,"add",e,e)),this},set(e,n){t||td(n)||tp(n)||(n=tg(n));let l=tg(this),{has:r,get:i}=e3(l),s=r.call(l,e);s||(e=tg(e),s=r.call(l,e));let o=i.call(l,e);return l.set(e,n),s?X(n,o)&&eU(l,"set",e,n):eU(l,"add",e,n),this},delete(e){let t=tg(this),{has:n,get:l}=e3(t),r=n.call(t,e);r||(e=tg(e),r=n.call(t,e)),l&&l.call(t,e);let i=t.delete(e);return r&&eU(t,"delete",e,void 0),i},clear(){let e=tg(this),t=0!==e.size,n=e.clear();return t&&eU(e,"clear",void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach(l=>{n[l]=function(...n){let r=this.__v_raw,i=tg(r),s=A(i),o="entries"===l||l===Symbol.iterator&&s,a=r[l](...n),u=t?e8:e?t_:tm;return e||eV(i,"iterate","keys"===l&&s?eD:eL),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}),n}(e,t);return(t,l,r)=>"__v_isReactive"===l?!e:"__v_isReadonly"===l?e:"__v_raw"===l?t:Reflect.get(k(n,l)&&l in t?n:t,l,r)}let e7={get:e9(!1,!1)},te={get:e9(!1,!0)},tt={get:e9(!0,!1)},tn={get:e9(!0,!0)},tl=new WeakMap,tr=new WeakMap,ti=new WeakMap,ts=new WeakMap;function to(e){return tp(e)?e:tc(e,!1,e1,e7,tl)}function ta(e){return tc(e,!1,e6,te,tr)}function tu(e){return tc(e,!0,e2,tt,ti)}function tc(e,t,n,l,r){if(!L(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let i=r.get(e);if(i)return i;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(U(e));if(0===s)return e;let o=new Proxy(e,2===s?l:n);return r.set(e,o),o}function tf(e){return tp(e)?tf(e.__v_raw):!!(e&&e.__v_isReactive)}function tp(e){return!!(e&&e.__v_isReadonly)}function td(e){return!!(e&&e.__v_isShallow)}function th(e){return!!e&&!!e.__v_raw}function tg(e){let t=e&&e.__v_raw;return t?tg(t):e}function tv(e){return!k(e,"__v_skip")&&Object.isExtensible(e)&&Y(e,"__v_skip",!0),e}let tm=e=>L(e)?to(e):e,t_=e=>L(e)?tu(e):e;function ty(e){return!!e&&!0===e.__v_isRef}function tb(e){return tC(e,!1)}function tS(e){return tC(e,!0)}function tC(e,t){return ty(e)?e:new tx(e,t)}class tx{constructor(e,t){this.dep=new eM,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:tg(e),this._value=t?e:tm(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||td(e)||tp(e);X(e=n?e:tg(e),t)&&(this._rawValue=e,this._value=n?e:tm(e),this.dep.trigger())}}function tw(e){return ty(e)?e.value:e}let tE={get:(e,t,n)=>"__v_raw"===t?e:tw(Reflect.get(e,t,n)),set:(e,t,n,l)=>{let r=e[t];return ty(r)&&!ty(n)?(r.value=n,!0):Reflect.set(e,t,n,l)}};function tk(e){return tf(e)?e:new Proxy(e,tE)}class tT{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new eM,{get:n,set:l}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=l}get value(){return this._value=this._get()}set value(e){this._set(e)}}function tA(e){return new tT(e)}class tR{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let n=eI.get(e);return n&&n.get(t)}(tg(this._object),this._key)}}class tO{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tN(e,t,n){let l=e[t];return ty(l)?l:new tR(e,t,n)}class tP{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eM(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eN-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&i!==this)return ey(this,!0),!0}get value(){let e=this.dep.track();return ew(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let tM={},tI=new WeakMap;function tL(e,t=!1,n=d){if(n){let t=tI.get(n);t||tI.set(n,t=[]),t.push(e)}}function tD(e,t=1/0,n){if(t<=0||!L(e)||e.__v_skip||(n=n||new Set).has(e))return e;if(n.add(e),t--,ty(e))tD(e.value,t,n);else if(T(e))for(let l=0;l<e.length;l++)tD(e[l],t,n);else if(R(e)||A(e))e.forEach(e=>{tD(e,t,n)});else if(j(e)){for(let l in e)tD(e[l],t,n);for(let l of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,l)&&tD(e[l],t,n)}return e}function tF(e,t,n,l){try{return l?e(...l):e()}catch(e){tU(e,t,n)}}function tV(e,t,n,l){if(P(e)){let r=tF(e,t,n,l);return r&&D(r)&&r.catch(e=>{tU(e,t,n)}),r}if(T(e)){let r=[];for(let i=0;i<e.length;i++)r.push(tV(e[i],t,n,l));return r}}function tU(e,t,n,l=!0){t&&t.vnode;let{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||m;if(t){let l=t.parent,i=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){let t=l.ec;if(t){for(let n=0;n<t.length;n++)if(!1===t[n](e,i,s))return}l=l.parent}if(r){eA(),tF(r,null,10,[e,i,s]),eR();return}}!function(e,t,n,l=!0,r=!1){if(r)throw e;console.error(e)}(e,0,0,l,i)}let tj=[],tB=-1,t$=[],tH=null,tW=0,tK=Promise.resolve(),tz=null;function tq(e){let t=tz||tK;return e?t.then(this?e.bind(this):e):t}function tG(e){if(!(1&e.flags)){let t=tQ(e),n=tj[tj.length-1];!n||!(2&e.flags)&&t>=tQ(n)?tj.push(e):tj.splice(function(e){let t=tB+1,n=tj.length;for(;t<n;){let l=t+n>>>1,r=tj[l],i=tQ(r);i<e||i===e&&2&r.flags?t=l+1:n=l}return t}(t),0,e),e.flags|=1,tJ()}}function tJ(){tz||(tz=tK.then(function e(t){try{for(tB=0;tB<tj.length;tB++){let e=tj[tB];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),tF(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;tB<tj.length;tB++){let e=tj[tB];e&&(e.flags&=-2)}tB=-1,tj.length=0,tY(),tz=null,(tj.length||t$.length)&&e()}}))}function tX(e){T(e)?t$.push(...e):tH&&-1===e.id?tH.splice(tW+1,0,e):1&e.flags||(t$.push(e),e.flags|=1),tJ()}function tZ(e,t,n=tB+1){for(;n<tj.length;n++){let t=tj[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;tj.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function tY(e){if(t$.length){let e=[...new Set(t$)].sort((e,t)=>tQ(e)-tQ(t));if(t$.length=0,tH){tH.push(...e);return}for(tW=0,tH=e;tW<tH.length;tW++){let e=tH[tW];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}tH=null,tW=0}}let tQ=e=>null==e.id?2&e.flags?-1:1/0:e.id,t0=null,t1=null;function t2(e){let t=t0;return t0=e,t1=e&&e.type.__scopeId||null,t}function t6(e,t=t0,n){if(!t||e._n)return e;let l=(...n)=>{let r;l._d&&rs(-1);let i=t2(t);try{r=e(...n)}finally{t2(i),l._d&&rs(1)}return r};return l._n=!0,l._c=!0,l._d=!0,l}function t4(e,t,n,l){let r=e.dirs,i=t&&t.dirs;for(let s=0;s<r.length;s++){let o=r[s];i&&(o.oldValue=i[s].value);let a=o.dir[l];a&&(eA(),tV(a,n,8,[e.el,o,e,t]),eR())}}let t8=Symbol("_vte"),t3=e=>e.__isTeleport,t5=e=>e&&(e.disabled||""===e.disabled),t9=e=>e&&(e.defer||""===e.defer),t7=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,ne=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,nt=(e,t)=>{let n=e&&e.to;return M(n)?t?t(n):null:n},nn={name:"Teleport",__isTeleport:!0,process(e,t,n,l,r,i,s,o,a,u){let{mc:c,pc:f,pbc:p,o:{insert:d,querySelector:h,createText:g,createComment:m}}=u,_=t5(t.props),{shapeFlag:y,children:b,dynamicChildren:S}=t;if(null==e){let e=t.el=g(""),u=t.anchor=g("");d(e,n,l),d(u,n,l);let f=(e,t)=>{16&y&&(r&&r.isCE&&(r.ce._teleportTarget=e),c(b,e,t,r,i,s,o,a))},p=()=>{let e=t.target=nt(t.props,h),n=ni(e,t,g,d);e&&("svg"!==s&&t7(e)?s="svg":"mathml"!==s&&ne(e)&&(s="mathml"),_||(f(e,n),nr(t,!1)))};_&&(f(n,u),nr(t,!0)),t9(t.props)?lM(()=>{p(),t.el.__isMounted=!0},i):p()}else{if(t9(t.props)&&!e.el.__isMounted){lM(()=>{nn.process(e,t,n,l,r,i,s,o,a,u),delete e.el.__isMounted},i);return}t.el=e.el,t.targetStart=e.targetStart;let c=t.anchor=e.anchor,d=t.target=e.target,g=t.targetAnchor=e.targetAnchor,m=t5(e.props),y=m?n:d;if("svg"===s||t7(d)?s="svg":("mathml"===s||ne(d))&&(s="mathml"),S?(p(e.dynamicChildren,S,y,r,i,s,o),lU(e,t,!0)):a||f(e,t,y,m?c:g,r,i,s,o,!1),_)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):nl(t,n,c,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=nt(t.props,h);e&&nl(t,e,null,u,0)}else m&&nl(t,d,g,u,1);nr(t,_)}},remove(e,t,n,{um:l,o:{remove:r}},i){let{shapeFlag:s,children:o,anchor:a,targetStart:u,targetAnchor:c,target:f,props:p}=e;if(f&&(r(u),r(c)),i&&r(a),16&s){let e=i||!t5(p);for(let r=0;r<o.length;r++){let i=o[r];l(i,t,n,e,!!i.dynamicChildren)}}},move:nl,hydrate:function(e,t,n,l,r,i,{o:{nextSibling:s,parentNode:o,querySelector:a,insert:u,createText:c}},f){let p=t.target=nt(t.props,a);if(p){let a=t5(t.props),d=p._lpa||p.firstChild;if(16&t.shapeFlag){if(a)t.anchor=f(s(e),t,o(e),n,l,r,i),t.targetStart=d,t.targetAnchor=d&&s(d);else{t.anchor=s(e);let o=d;for(;o;){if(o&&8===o.nodeType){if("teleport start anchor"===o.data)t.targetStart=o;else if("teleport anchor"===o.data){t.targetAnchor=o,p._lpa=t.targetAnchor&&s(t.targetAnchor);break}}o=s(o)}t.targetAnchor||ni(p,t,c,u),f(d&&s(d),t,p,n,l,r,i)}}nr(t,a)}return t.anchor&&s(t.anchor)}};function nl(e,t,n,{o:{insert:l},m:r},i=2){0===i&&l(e.targetAnchor,t,n);let{el:s,anchor:o,shapeFlag:a,children:u,props:c}=e,f=2===i;if(f&&l(s,t,n),(!f||t5(c))&&16&a)for(let e=0;e<u.length;e++)r(u[e],t,n,2);f&&l(o,t,n)}function nr(e,t){let n=e.ctx;if(n&&n.ut){let l,r;for(t?(l=e.el,r=e.anchor):(l=e.targetStart,r=e.targetAnchor);l&&l!==r;)1===l.nodeType&&l.setAttribute("data-v-owner",n.uid),l=l.nextSibling;n.ut()}}function ni(e,t,n,l){let r=t.targetStart=n(""),i=t.targetAnchor=n("");return r[t8]=i,e&&(l(r,e),l(i,e)),i}let ns=Symbol("_leaveCb"),no=Symbol("_enterCb");function na(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return nq(()=>{e.isMounted=!0}),nX(()=>{e.isUnmounting=!0}),e}let nu=[Function,Array],nc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nu,onEnter:nu,onAfterEnter:nu,onEnterCancelled:nu,onBeforeLeave:nu,onLeave:nu,onAfterLeave:nu,onLeaveCancelled:nu,onBeforeAppear:nu,onAppear:nu,onAfterAppear:nu,onAppearCancelled:nu},nf=e=>{let t=e.subTree;return t.component?nf(t.component):t};function np(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==l7){t=n;break}}return t}let nd={name:"BaseTransition",props:nc,setup(e,{slots:t}){let n=rk(),l=na();return()=>{let r=t.default&&ny(t.default(),!0);if(!r||!r.length)return;let i=np(r),s=tg(e),{mode:o}=s;if(l.isLeaving)return nv(i);let a=nm(i);if(!a)return nv(i);let u=ng(a,s,l,n,e=>u=e);a.type!==l7&&n_(a,u);let c=n.subTree&&nm(n.subTree);if(c&&c.type!==l7&&!rc(a,c)&&nf(n).type!==l7){let e=ng(c,s,l,n);if(n_(c,e),"out-in"===o&&a.type!==l7)return l.isLeaving=!0,e.afterLeave=()=>{l.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave,c=void 0},nv(i);"in-out"===o&&a.type!==l7?e.delayLeave=(e,t,n)=>{nh(l,c)[String(c.key)]=c,e[ns]=()=>{t(),e[ns]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{n(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function nh(e,t){let{leavingVNodes:n}=e,l=n.get(t.type);return l||(l=Object.create(null),n.set(t.type,l)),l}function ng(e,t,n,l,r){let{appear:i,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:p,onLeave:d,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:m,onAppear:_,onAfterAppear:y,onAppearCancelled:b}=t,S=String(e.key),C=nh(n,e),x=(e,t)=>{e&&tV(e,l,9,t)},w=(e,t)=>{let n=t[1];x(e,t),T(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},E={mode:s,persisted:o,beforeEnter(t){let l=a;if(!n.isMounted){if(!i)return;l=m||a}t[ns]&&t[ns](!0);let r=C[S];r&&rc(e,r)&&r.el[ns]&&r.el[ns](),x(l,[t])},enter(e){let t=u,l=c,r=f;if(!n.isMounted){if(!i)return;t=_||u,l=y||c,r=b||f}let s=!1,o=e[no]=t=>{s||(s=!0,t?x(r,[e]):x(l,[e]),E.delayedLeave&&E.delayedLeave(),e[no]=void 0)};t?w(t,[e,o]):o()},leave(t,l){let r=String(e.key);if(t[no]&&t[no](!0),n.isUnmounting)return l();x(p,[t]);let i=!1,s=t[ns]=n=>{i||(i=!0,l(),n?x(g,[t]):x(h,[t]),t[ns]=void 0,C[r]!==e||delete C[r])};C[r]=e,d?w(d,[t,s]):s()},clone(e){let i=ng(e,t,n,l,r);return r&&r(i),i}};return E}function nv(e){if(nF(e))return(e=rv(e)).children=null,e}function nm(e){if(!nF(e))return t3(e.type)&&e.children?np(e.children):e;let{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&P(n.default))return n.default()}}function n_(e,t){6&e.shapeFlag&&e.component?(e.transition=t,n_(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ny(e,t=!1,n){let l=[],r=0;for(let i=0;i<e.length;i++){let s=e[i],o=null==n?s.key:String(n)+String(null!=s.key?s.key:i);s.type===l5?(128&s.patchFlag&&r++,l=l.concat(ny(s.children,t,o))):(t||s.type!==l7)&&l.push(null!=o?rv(s,{key:o}):s)}if(r>1)for(let e=0;e<l.length;e++)l[e].patchFlag=-2;return l}function nb(e,t){return P(e)?x({name:e.name},t,{setup:e}):e}function nS(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function nC(e,t,n,l,r=!1){if(T(e)){e.forEach((e,i)=>nC(e,t&&(T(t)?t[i]:t),n,l,r));return}if(nL(l)&&!r){512&l.shapeFlag&&l.type.__asyncResolved&&l.component.subTree.component&&nC(e,t,n,l.component.subTree);return}let i=4&l.shapeFlag?rL(l.component):l.el,s=r?null:i,{i:o,r:a}=e,u=t&&t.r,c=o.refs===m?o.refs={}:o.refs,f=o.setupState,p=tg(f),d=f===m?()=>!1:e=>k(p,e);if(null!=u&&u!==a&&(M(u)?(c[u]=null,d(u)&&(f[u]=null)):ty(u)&&(u.value=null)),P(a))tF(a,o,12,[s,c]);else{let t=M(a),l=ty(a);if(t||l){let o=()=>{if(e.f){let n=t?d(a)?f[a]:c[a]:a.value;r?T(n)&&w(n,i):T(n)?n.includes(i)||n.push(i):t?(c[a]=[i],d(a)&&(f[a]=c[a])):(a.value=[i],e.k&&(c[e.k]=a.value))}else t?(c[a]=s,d(a)&&(f[a]=s)):l&&(a.value=s,e.k&&(c[e.k]=s))};s?(o.id=-1,lM(o,n)):o()}}}let nx=!1,nw=()=>{nx||(console.error("Hydration completed but contains mismatches."),nx=!0)},nE=e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName,nk=e=>e.namespaceURI.includes("MathML"),nT=e=>{if(1===e.nodeType){if(nE(e))return"svg";if(nk(e))return"mathml"}},nA=e=>8===e.nodeType;function nR(e){let{mt:t,p:n,o:{patchProp:l,createText:r,nextSibling:i,parentNode:s,remove:o,insert:a,createComment:u}}=e,c=(n,l,o,u,y,b=!1)=>{b=b||!!l.dynamicChildren;let S=nA(n)&&"["===n.data,C=()=>h(n,l,o,u,y,S),{type:x,ref:w,shapeFlag:E,patchFlag:k}=l,T=n.nodeType;l.el=n,-2===k&&(b=!1,l.dynamicChildren=null);let A=null;switch(x){case l9:3!==T?""===l.children?(a(l.el=r(""),s(n),n),A=n):A=C():(n.data!==l.children&&(nw(),n.data=l.children),A=i(n));break;case l7:_(n)?(A=i(n),m(l.el=n.content.firstChild,n,o)):A=8!==T||S?C():i(n);break;case re:if(S&&(T=(n=i(n)).nodeType),1===T||3===T){A=n;let e=!l.children.length;for(let t=0;t<l.staticCount;t++)e&&(l.children+=1===A.nodeType?A.outerHTML:A.data),t===l.staticCount-1&&(l.anchor=A),A=i(A);return S?i(A):A}C();break;case l5:A=S?d(n,l,o,u,y,b):C();break;default:if(1&E)A=1===T&&l.type.toLowerCase()===n.tagName.toLowerCase()||_(n)?f(n,l,o,u,y,b):C();else if(6&E){l.slotScopeIds=y;let e=s(n);if(A=S?g(n):nA(n)&&"teleport start"===n.data?g(n,n.data,"teleport end"):i(n),t(l,e,null,o,u,nT(e),b),nL(l)&&!l.type.__asyncResolved){let t;S?(t=rh(l5)).anchor=A?A.previousSibling:e.lastChild:t=3===n.nodeType?rm(""):rh("div"),t.el=n,l.component.subTree=t}}else 64&E?A=8!==T?C():l.type.hydrate(n,l,o,u,y,b,e,p):128&E&&(A=l.type.hydrate(n,l,o,u,nT(s(n)),y,b,e,c))}return null!=w&&nC(w,null,u,l),A},f=(e,t,n,r,i,s)=>{s=s||!!t.dynamicChildren;let{type:a,props:u,patchFlag:c,shapeFlag:f,dirs:d,transition:h}=t,g="input"===a||"option"===a;if(g||-1!==c){let a;d&&t4(t,null,n,"created");let y=!1;if(_(e)){y=lV(null,h)&&n&&n.vnode.props&&n.vnode.props.appear;let l=e.content.firstChild;y&&h.beforeEnter(l),m(l,e,n),t.el=e=l}if(16&f&&!(u&&(u.innerHTML||u.textContent))){let l=p(e.firstChild,t,e,n,r,i,s);for(;l;){nP(e,1)||nw();let t=l;l=l.nextSibling,o(t)}}else if(8&f){let n=t.children;"\n"===n[0]&&("PRE"===e.tagName||"TEXTAREA"===e.tagName)&&(n=n.slice(1)),e.textContent!==n&&(nP(e,0)||nw(),e.textContent=t.children)}if(u){if(g||!s||48&c){let t=e.tagName.includes("-");for(let r in u)(g&&(r.endsWith("value")||"indeterminate"===r)||S(r)&&!$(r)||"."===r[0]||t)&&l(e,r,null,u[r],void 0,n)}else if(u.onClick)l(e,"onClick",null,u.onClick,void 0,n);else if(4&c&&tf(u.style))for(let e in u.style)u.style[e]}(a=u&&u.onVnodeBeforeMount)&&rC(a,n,t),d&&t4(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||d||y)&&l8(()=>{a&&rC(a,n,t),y&&h.enter(e),d&&t4(t,null,n,"mounted")},r)}return e.nextSibling},p=(e,t,l,s,o,u,f)=>{f=f||!!t.dynamicChildren;let p=t.children,d=p.length;for(let t=0;t<d;t++){let h=f?p[t]:p[t]=r_(p[t]),g=h.type===l9;e?(g&&!f&&t+1<d&&r_(p[t+1]).type===l9&&(a(r(e.data.slice(h.children.length)),l,i(e)),e.data=h.children),e=c(e,h,s,o,u,f)):g&&!h.children?a(h.el=r(""),l):(nP(l,1)||nw(),n(null,h,l,null,s,o,nT(l),u))}return e},d=(e,t,n,l,r,o)=>{let{slotScopeIds:c}=t;c&&(r=r?r.concat(c):c);let f=s(e),d=p(i(e),t,f,n,l,r,o);return d&&nA(d)&&"]"===d.data?i(t.anchor=d):(nw(),a(t.anchor=u("]"),f,d),d)},h=(e,t,l,r,a,u)=>{if(nP(e.parentElement,1)||nw(),t.el=null,u){let t=g(e);for(;;){let n=i(e);if(n&&n!==t)o(n);else break}}let c=i(e),f=s(e);return o(e),n(null,t,f,c,l,r,nT(f),a),l&&(l.vnode.el=t.el,lQ(l,t.el)),c},g=(e,t="[",n="]")=>{let l=0;for(;e;)if((e=i(e))&&nA(e)&&(e.data===t&&l++,e.data===n)){if(0===l)return i(e);l--}return e},m=(e,t,n)=>{let l=t.parentNode;l&&l.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},_=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),tY(),t._vnode=e;return}c(t.firstChild,e,null,null,null),tY(),t._vnode=e},c]}let nO="data-allow-mismatch",nN={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function nP(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(nO);)e=e.parentElement;let n=e&&e.getAttribute(nO);if(null==n)return!1;if(""===n)return!0;{let e=n.split(",");return!!(0===t&&e.includes("children"))||n.split(",").includes(nN[t])}}let nM=et().requestIdleCallback||(e=>setTimeout(e,1)),nI=et().cancelIdleCallback||(e=>clearTimeout(e)),nL=e=>!!e.type.__asyncLoader;function nD(e,t){let{ref:n,props:l,children:r,ce:i}=t.vnode,s=rh(e,l,r);return s.ref=n,s.ce=i,delete t.vnode.ce,s}let nF=e=>e.type.__isKeepAlive;function nV(e,t){return T(e)?e.some(e=>nV(e,t)):M(e)?e.split(",").includes(t):!!N(e)&&(e.lastIndex=0,e.test(t))}function nU(e,t){nB(e,"a",t)}function nj(e,t){nB(e,"da",t)}function nB(e,t,n=rE){let l=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(nW(t,l,n),n){let e=n.parent;for(;e&&e.parent;)nF(e.parent.vnode)&&function(e,t,n,l){let r=nW(t,e,l,!0);nZ(()=>{w(l[t],r)},n)}(l,t,n,e),e=e.parent}}function n$(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function nH(e){return 128&e.shapeFlag?e.ssContent:e}function nW(e,t,n=rE,l=!1){if(n){let r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{eA();let r=rT(n),i=tV(t,n,e,l);return r(),eR(),i});return l?r.unshift(i):r.push(i),i}}let nK=e=>(t,n=rE)=>{rO&&"sp"!==e||nW(e,(...e)=>t(...e),n)},nz=nK("bm"),nq=nK("m"),nG=nK("bu"),nJ=nK("u"),nX=nK("bum"),nZ=nK("um"),nY=nK("sp"),nQ=nK("rtg"),n0=nK("rtc");function n1(e,t=rE){nW("ec",e,t)}let n2="components",n6=Symbol.for("v-ndc");function n4(e,t,n=!0,l=!1){let r=t0||rE;if(r){let n=r.type;if(e===n2){let e=rD(n,!1);if(e&&(e===t||e===K(t)||e===G(K(t))))return n}let i=n8(r[e]||n[e],t)||n8(r.appContext[e],t);return!i&&l?n:i}}function n8(e,t){return e&&(e[t]||e[K(t)]||e[G(K(t))])}let n3=e=>e?rR(e)?rL(e):n3(e.parent):null,n5=x(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>n3(e.parent),$root:e=>n3(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>li(e),$forceUpdate:e=>e.f||(e.f=()=>{tG(e.update)}),$nextTick:e=>e.n||(e.n=tq.bind(e.proxy)),$watch:e=>lW.bind(e)}),n9=(e,t)=>e!==m&&!e.__isScriptSetup&&k(e,t),n7={get({_:e},t){let n,l,r;if("__v_skip"===t)return!0;let{ctx:i,setupState:s,data:o,props:a,accessCache:u,type:c,appContext:f}=e;if("$"!==t[0]){let l=u[t];if(void 0!==l)switch(l){case 1:return s[t];case 2:return o[t];case 4:return i[t];case 3:return a[t]}else{if(n9(s,t))return u[t]=1,s[t];if(o!==m&&k(o,t))return u[t]=2,o[t];if((n=e.propsOptions[0])&&k(n,t))return u[t]=3,a[t];if(i!==m&&k(i,t))return u[t]=4,i[t];ll&&(u[t]=0)}}let p=n5[t];return p?("$attrs"===t&&eV(e.attrs,"get",""),p(e)):(l=c.__cssModules)&&(l=l[t])?l:i!==m&&k(i,t)?(u[t]=4,i[t]):k(r=f.config.globalProperties,t)?r[t]:void 0},set({_:e},t,n){let{data:l,setupState:r,ctx:i}=e;return n9(r,t)?(r[t]=n,!0):l!==m&&k(l,t)?(l[t]=n,!0):!k(e.props,t)&&!("$"===t[0]&&t.slice(1)in e)&&(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:l,appContext:r,propsOptions:i}},s){let o;return!!n[s]||e!==m&&k(e,s)||n9(t,s)||(o=i[0])&&k(o,s)||k(l,s)||k(n5,s)||k(r.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:k(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},le=x({},n7,{get(e,t){if(t!==Symbol.unscopables)return n7.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!en(t)});function lt(){let e=rk();return e.setupContext||(e.setupContext=rI(e))}function ln(e){return T(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let ll=!0;function lr(e,t,n){tV(T(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function li(e){let t;let n=e.type,{mixins:l,extends:r}=n,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:i.length||l||r?(t={},i.length&&i.forEach(e=>ls(t,e,o,!0)),ls(t,n,o)):t=n,L(n)&&s.set(n,t),t}function ls(e,t,n,l=!1){let{mixins:r,extends:i}=t;for(let s in i&&ls(e,i,n,!0),r&&r.forEach(t=>ls(e,t,n,!0)),t)if(l&&"expose"===s);else{let l=lo[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}let lo={data:la,props:lp,emits:lp,methods:lf,computed:lf,beforeCreate:lc,created:lc,beforeMount:lc,mounted:lc,beforeUpdate:lc,updated:lc,beforeDestroy:lc,beforeUnmount:lc,destroyed:lc,unmounted:lc,activated:lc,deactivated:lc,errorCaptured:lc,serverPrefetch:lc,components:lf,directives:lf,watch:function(e,t){if(!e)return t;if(!t)return e;let n=x(Object.create(null),e);for(let l in t)n[l]=lc(e[l],t[l]);return n},provide:la,inject:function(e,t){return lf(lu(e),lu(t))}};function la(e,t){return t?e?function(){return x(P(e)?e.call(this,this):e,P(t)?t.call(this,this):t)}:t:e}function lu(e){if(T(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function lc(e,t){return e?[...new Set([].concat(e,t))]:t}function lf(e,t){return e?x(Object.create(null),e,t):t}function lp(e,t){return e?T(e)&&T(t)?[...new Set([...e,...t])]:x(Object.create(null),ln(e),ln(null!=t?t:{})):t}function ld(){return{app:null,config:{isNativeTag:b,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let lh=0,lg=null;function lv(e,t){if(rE){let n=rE.provides,l=rE.parent&&rE.parent.provides;l===n&&(n=rE.provides=Object.create(l)),n[e]=t}}function lm(e,t,n=!1){let l=rE||t0;if(l||lg){let r=lg?lg._context.provides:l?null==l.parent?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&P(t)?t.call(l&&l.proxy):t}}let l_={},ly=()=>Object.create(l_),lb=e=>Object.getPrototypeOf(e)===l_;function lS(e,t,n,l){let r;let[i,s]=e.propsOptions,o=!1;if(t)for(let a in t){let u;if($(a))continue;let c=t[a];i&&k(i,u=K(a))?s&&s.includes(u)?(r||(r={}))[u]=c:n[u]=c:lG(e.emitsOptions,a)||a in l&&c===l[a]||(l[a]=c,o=!0)}if(s){let t=tg(n),l=r||m;for(let r=0;r<s.length;r++){let o=s[r];n[o]=lC(i,t,o,l[o],e,!k(l,o))}}return o}function lC(e,t,n,l,r,i){let s=e[n];if(null!=s){let e=k(s,"default");if(e&&void 0===l){let e=s.default;if(s.type!==Function&&!s.skipFactory&&P(e)){let{propsDefaults:i}=r;if(n in i)l=i[n];else{let s=rT(r);l=i[n]=e.call(null,t),s()}}else l=e;r.ce&&r.ce._setProp(n,l)}s[0]&&(i&&!e?l=!1:s[1]&&(""===l||l===q(n))&&(l=!0))}return l}let lx=new WeakMap;function lw(e){return!("$"===e[0]||$(e))}let lE=e=>"_"===e[0]||"$stable"===e,lk=e=>T(e)?e.map(r_):[r_(e)],lT=(e,t,n)=>{if(t._n)return t;let l=t6((...e)=>lk(t(...e)),n);return l._c=!1,l},lA=(e,t,n)=>{let l=e._ctx;for(let n in e){if(lE(n))continue;let r=e[n];if(P(r))t[n]=lT(n,r,l);else if(null!=r){let e=lk(r);t[n]=()=>e}}},lR=(e,t)=>{let n=lk(t);e.slots.default=()=>n},lO=(e,t,n)=>{for(let l in t)(n||"_"!==l)&&(e[l]=t[l])},lN=(e,t,n)=>{let l=e.slots=ly();if(32&e.vnode.shapeFlag){let e=t._;e?(lO(l,t,n),n&&Y(l,"_",e,!0)):lA(t,l)}else t&&lR(e,t)},lP=(e,t,n)=>{let{vnode:l,slots:r}=e,i=!0,s=m;if(32&l.shapeFlag){let e=t._;e?n&&1===e?i=!1:lO(r,t,n):(i=!t.$stable,lA(t,r)),s=t}else t&&(lR(e,t),s={default:1});if(i)for(let e in r)lE(e)||null!=s[e]||delete r[e]},lM=l8;function lI(e){return lL(e,nR)}function lL(e,t){var n;let l,r;et().__VUE__=!0;let{insert:i,remove:s,patchProp:o,createElement:a,createText:c,createComment:f,setText:p,setElementText:d,parentNode:h,nextSibling:g,setScopeId:b=y,insertStaticContent:S}=e,C=(e,t,n,l=null,r=null,i=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!rc(e,t)&&(l=eo(e),en(e,r,i,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:u,ref:c,shapeFlag:f}=t;switch(u){case l9:w(e,t,n,l);break;case l7:E(e,t,n,l);break;case re:null==e&&A(t,n,l,s);break;case l5:B(e,t,n,l,r,i,s,o,a);break;default:1&f?N(e,t,n,l,r,i,s,o,a):6&f?H(e,t,n,l,r,i,s,o,a):64&f?u.process(e,t,n,l,r,i,s,o,a,ec):128&f&&u.process(e,t,n,l,r,i,s,o,a,ec)}null!=c&&r&&nC(c,e&&e.ref,i,t||e,!t)},w=(e,t,n,l)=>{if(null==e)i(t.el=c(t.children),n,l);else{let n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},E=(e,t,n,l)=>{null==e?i(t.el=f(t.children||""),n,l):t.el=e.el},A=(e,t,n,l)=>{[e.el,e.anchor]=S(e.children,t,n,l,e.el,e.anchor)},R=({el:e,anchor:t},n,l)=>{let r;for(;e&&e!==t;)r=g(e),i(e,n,l),e=r;i(t,n,l)},O=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=g(e),s(e),e=n;s(t)},N=(e,t,n,l,r,i,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?M(t,n,l,r,i,s,o,a):V(e,t,r,i,s,o,a)},M=(e,t,n,l,r,s,u,c)=>{let f,p;let{props:h,shapeFlag:g,transition:m,dirs:_}=e;if(f=e.el=a(e.type,s,h&&h.is,h),8&g?d(f,e.children):16&g&&F(e.children,f,null,l,r,lD(e,s),u,c),_&&t4(e,null,l,"created"),I(f,e,e.scopeId,u,l),h){for(let e in h)"value"===e||$(e)||o(f,e,null,h[e],s,l);"value"in h&&o(f,"value",null,h.value,s),(p=h.onVnodeBeforeMount)&&rC(p,l,e)}_&&t4(e,null,l,"beforeMount");let y=lV(r,m);y&&m.beforeEnter(f),i(f,t,n),((p=h&&h.onVnodeMounted)||y||_)&&lM(()=>{p&&rC(p,l,e),y&&m.enter(f),_&&t4(e,null,l,"mounted")},r)},I=(e,t,n,l,r)=>{if(n&&b(e,n),l)for(let t=0;t<l.length;t++)b(e,l[t]);if(r){let n=r.subTree;if(t===n||l0(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=r.vnode;I(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},F=(e,t,n,l,r,i,s,o,a=0)=>{for(let u=a;u<e.length;u++)C(null,e[u]=o?ry(e[u]):r_(e[u]),t,n,l,r,i,s,o)},V=(e,t,n,l,r,i,s)=>{let a;let u=t.el=e.el,{patchFlag:c,dynamicChildren:f,dirs:p}=t;c|=16&e.patchFlag;let h=e.props||m,g=t.props||m;if(n&&lF(n,!1),(a=g.onVnodeBeforeUpdate)&&rC(a,n,t,e),p&&t4(t,e,n,"beforeUpdate"),n&&lF(n,!0),(h.innerHTML&&null==g.innerHTML||h.textContent&&null==g.textContent)&&d(u,""),f?U(e.dynamicChildren,f,u,n,l,lD(t,r),i):s||X(e,t,u,null,n,l,lD(t,r),i,!1),c>0){if(16&c)j(u,h,g,n,r);else if(2&c&&h.class!==g.class&&o(u,"class",null,g.class,r),4&c&&o(u,"style",h.style,g.style,r),8&c){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let l=e[t],i=h[l],s=g[l];(s!==i||"value"===l)&&o(u,l,i,s,r,n)}}1&c&&e.children!==t.children&&d(u,t.children)}else s||null!=f||j(u,h,g,n,r);((a=g.onVnodeUpdated)||p)&&lM(()=>{a&&rC(a,n,t,e),p&&t4(t,e,n,"updated")},l)},U=(e,t,n,l,r,i,s)=>{for(let o=0;o<t.length;o++){let a=e[o],u=t[o],c=a.el&&(a.type===l5||!rc(a,u)||70&a.shapeFlag)?h(a.el):n;C(a,u,c,null,l,r,i,s,!0)}},j=(e,t,n,l,r)=>{if(t!==n){if(t!==m)for(let i in t)$(i)||i in n||o(e,i,t[i],null,r,l);for(let i in n){if($(i))continue;let s=n[i],a=t[i];s!==a&&"value"!==i&&o(e,i,a,s,r,l)}"value"in n&&o(e,"value",t.value,n.value,r)}},B=(e,t,n,l,r,s,o,a,u)=>{let f=t.el=e?e.el:c(""),p=t.anchor=e?e.anchor:c(""),{patchFlag:d,dynamicChildren:h,slotScopeIds:g}=t;g&&(a=a?a.concat(g):g),null==e?(i(f,n,l),i(p,n,l),F(t.children||[],n,p,r,s,o,a,u)):d>0&&64&d&&h&&e.dynamicChildren?(U(e.dynamicChildren,h,n,r,s,o,a),(null!=t.key||r&&t===r.subTree)&&lU(e,t,!0)):X(e,t,n,p,r,s,o,a,u)},H=(e,t,n,l,r,i,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?r.ctx.activate(t,n,l,s,a):W(t,n,l,r,i,s,a):z(e,t,a)},W=(e,t,n,l,r,i,s)=>{let o=e.component=function(e,t,n){let l=e.type,r=(t?t.appContext:e.appContext)||rx,i={uid:rw++,vnode:e,type:l,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new eg(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:function e(t,n,l=!1){let r=l?lx:n.propsCache,i=r.get(t);if(i)return i;let s=t.props,o={},a=[],u=!1;if(!P(t)){let r=t=>{u=!0;let[l,r]=e(t,n,!0);x(o,l),r&&a.push(...r)};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}if(!s&&!u)return L(t)&&r.set(t,_),_;if(T(s))for(let e=0;e<s.length;e++){let t=K(s[e]);lw(t)&&(o[t]=m)}else if(s)for(let e in s){let t=K(e);if(lw(t)){let n=s[e],l=o[t]=T(n)||P(n)?{type:n}:x({},n),r=l.type,i=!1,u=!0;if(T(r))for(let e=0;e<r.length;++e){let t=r[e],n=P(t)&&t.name;if("Boolean"===n){i=!0;break}"String"===n&&(u=!1)}else i=P(r)&&"Boolean"===r.name;l[0]=i,l[1]=u,(i||k(l,"default"))&&a.push(t)}}let c=[o,a];return L(t)&&r.set(t,c),c}(l,r),emitsOptions:function e(t,n,l=!1){let r=n.emitsCache,i=r.get(t);if(void 0!==i)return i;let s=t.emits,o={},a=!1;if(!P(t)){let r=t=>{let l=e(t,n,!0);l&&(a=!0,x(o,l))};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}return s||a?(T(s)?s.forEach(e=>o[e]=null):x(o,s),L(t)&&r.set(t,o),o):(L(t)&&r.set(t,null),null)}(l,r),emit:null,emitted:null,propsDefaults:m,inheritAttrs:l.inheritAttrs,ctx:m,data:m,props:m,attrs:m,slots:m,refs:m,setupState:m,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=lq.bind(null,i),e.ce&&e.ce(i),i}(e,l,r);nF(e)&&(o.ctx.renderer=ec),function(e,t=!1,n=!1){t&&u(t);let{props:l,children:r}=e.vnode,i=rR(e);(function(e,t,n,l=!1){let r={},i=ly();for(let n in e.propsDefaults=Object.create(null),lS(e,t,r,i),e.propsOptions[0])n in r||(r[n]=void 0);n?e.props=l?r:ta(r):e.type.props?e.props=r:e.props=i,e.attrs=i})(e,l,i,t),lN(e,r,n),i&&function(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,n7);let{setup:l}=n;if(l){eA();let n=e.setupContext=l.length>1?rI(e):null,r=rT(e),i=tF(l,e,0,[e.props,n]),s=D(i);if(eR(),r(),(s||e.sp)&&!nL(e)&&nS(e),s){if(i.then(rA,rA),t)return i.then(n=>{rN(e,n,t)}).catch(t=>{tU(t,e,0)});e.asyncDep=i}else rN(e,i,t)}else rP(e,t)}(e,t),t&&u(!1)}(o,!1,s),o.asyncDep?(r&&r.registerDep(o,G,s),e.el||E(null,o.subTree=rh(l7),t,n)):G(o,e,t,n,r,i,s)},z=(e,t,n)=>{let l=t.component=e.component;if(function(e,t,n){let{props:l,children:r,component:i}=e,{props:s,children:o,patchFlag:a}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!r||!!o)&&(!o||!o.$stable)||l!==s&&(l?!s||lY(l,s,u):!!s);if(1024&a)return!0;if(16&a)return l?lY(l,s,u):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(s[n]!==l[n]&&!lG(u,n))return!0}}return!1}(e,t,n)){if(l.asyncDep&&!l.asyncResolved){J(l,t,n);return}l.next=t,l.update()}else t.el=e.el,l.vnode=t},G=(e,t,n,l,i,s,o)=>{let a=()=>{if(e.isMounted){let t,{next:n,bu:l,u:r,parent:u,vnode:c}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=c.el,J(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let f=n;lF(e,!1),n?(n.el=c.el,J(e,n,o)):n=c,l&&Z(l),(t=n.props&&n.props.onVnodeBeforeUpdate)&&rC(t,u,n,c),lF(e,!0);let p=lJ(e),d=e.subTree;e.subTree=p,C(d,p,h(d.el),eo(d),e,i,s),n.el=p.el,null===f&&lQ(e,p.el),r&&lM(r,i),(t=n.props&&n.props.onVnodeUpdated)&&lM(()=>rC(t,u,n,c),i)}else{let o;let{el:a,props:u}=t,{bm:c,m:f,parent:p,root:d,type:h}=e,g=nL(t);if(lF(e,!1),c&&Z(c),!g&&(o=u&&u.onVnodeBeforeMount)&&rC(o,p,t),lF(e,!0),a&&r){let t=()=>{e.subTree=lJ(e),r(a,e.subTree,e,i,null)};g&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{d.ce&&d.ce._injectChildStyle(h);let r=e.subTree=lJ(e);C(null,r,n,l,e,i,s),t.el=r.el}if(f&&lM(f,i),!g&&(o=u&&u.onVnodeMounted)){let e=t;lM(()=>rC(o,p,e),i)}(256&t.shapeFlag||p&&nL(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&lM(e.a,i),e.isMounted=!0,t=n=l=null}};e.scope.on();let u=e.effect=new em(a);e.scope.off();let c=e.update=u.run.bind(u),f=e.job=u.runIfDirty.bind(u);f.i=e,f.id=e.uid,u.scheduler=()=>tG(f),lF(e,!0),c()},J=(e,t,n)=>{t.component=e;let l=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,l){let{props:r,attrs:i,vnode:{patchFlag:s}}=e,o=tg(r),[a]=e.propsOptions,u=!1;if((l||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let l=0;l<n.length;l++){let s=n[l];if(lG(e.emitsOptions,s))continue;let c=t[s];if(a){if(k(i,s))c!==i[s]&&(i[s]=c,u=!0);else{let t=K(s);r[t]=lC(a,o,t,c,e,!1)}}else c!==i[s]&&(i[s]=c,u=!0)}}}else{let l;for(let s in lS(e,t,r,i)&&(u=!0),o)t&&(k(t,s)||(l=q(s))!==s&&k(t,l))||(a?n&&(void 0!==n[s]||void 0!==n[l])&&(r[s]=lC(a,o,s,void 0,e,!0)):delete r[s]);if(i!==o)for(let e in i)t&&k(t,e)||(delete i[e],u=!0)}u&&eU(e.attrs,"set","")}(e,t.props,l,n),lP(e,t.children,n),eA(),tZ(e),eR()},X=(e,t,n,l,r,i,s,o,a=!1)=>{let u=e&&e.children,c=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p){Q(u,f,n,l,r,i,s,o,a);return}if(256&p){Y(u,f,n,l,r,i,s,o,a);return}}8&h?(16&c&&es(u,r,i),f!==u&&d(n,f)):16&c?16&h?Q(u,f,n,l,r,i,s,o,a):es(u,r,i,!0):(8&c&&d(n,""),16&h&&F(f,n,l,r,i,s,o,a))},Y=(e,t,n,l,r,i,s,o,a)=>{let u;e=e||_,t=t||_;let c=e.length,f=t.length,p=Math.min(c,f);for(u=0;u<p;u++){let l=t[u]=a?ry(t[u]):r_(t[u]);C(e[u],l,n,null,r,i,s,o,a)}c>f?es(e,r,i,!0,!1,p):F(t,n,l,r,i,s,o,a,p)},Q=(e,t,n,l,r,i,s,o,a)=>{let u=0,c=t.length,f=e.length-1,p=c-1;for(;u<=f&&u<=p;){let l=e[u],c=t[u]=a?ry(t[u]):r_(t[u]);if(rc(l,c))C(l,c,n,null,r,i,s,o,a);else break;u++}for(;u<=f&&u<=p;){let l=e[f],u=t[p]=a?ry(t[p]):r_(t[p]);if(rc(l,u))C(l,u,n,null,r,i,s,o,a);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,f=e<c?t[e].el:l;for(;u<=p;)C(null,t[u]=a?ry(t[u]):r_(t[u]),n,f,r,i,s,o,a),u++}}else if(u>p)for(;u<=f;)en(e[u],r,i,!0),u++;else{let d;let h=u,g=u,m=new Map;for(u=g;u<=p;u++){let e=t[u]=a?ry(t[u]):r_(t[u]);null!=e.key&&m.set(e.key,u)}let y=0,b=p-g+1,S=!1,x=0,w=Array(b);for(u=0;u<b;u++)w[u]=0;for(u=h;u<=f;u++){let l;let c=e[u];if(y>=b){en(c,r,i,!0);continue}if(null!=c.key)l=m.get(c.key);else for(d=g;d<=p;d++)if(0===w[d-g]&&rc(c,t[d])){l=d;break}void 0===l?en(c,r,i,!0):(w[l-g]=u+1,l>=x?x=l:S=!0,C(c,t[l],n,null,r,i,s,o,a),y++)}let E=S?function(e){let t,n,l,r,i;let s=e.slice(),o=[0],a=e.length;for(t=0;t<a;t++){let a=e[t];if(0!==a){if(e[n=o[o.length-1]]<a){s[t]=n,o.push(t);continue}for(l=0,r=o.length-1;l<r;)e[o[i=l+r>>1]]<a?l=i+1:r=i;a<e[o[l]]&&(l>0&&(s[t]=o[l-1]),o[l]=t)}}for(l=o.length,r=o[l-1];l-- >0;)o[l]=r,r=s[r];return o}(w):_;for(d=E.length-1,u=b-1;u>=0;u--){let e=g+u,f=t[e],p=e+1<c?t[e+1].el:l;0===w[u]?C(null,f,n,p,r,i,s,o,a):S&&(d<0||u!==E[d]?ee(f,n,p,2):d--)}}},ee=(e,t,n,l,r=null)=>{let{el:s,type:o,transition:a,children:u,shapeFlag:c}=e;if(6&c){ee(e.component.subTree,t,n,l);return}if(128&c){e.suspense.move(t,n,l);return}if(64&c){o.move(e,t,n,ec);return}if(o===l5){i(s,t,n);for(let e=0;e<u.length;e++)ee(u[e],t,n,l);i(e.anchor,t,n);return}if(o===re){R(e,t,n);return}if(2!==l&&1&c&&a){if(0===l)a.beforeEnter(s),i(s,t,n),lM(()=>a.enter(s),r);else{let{leave:e,delayLeave:l,afterLeave:r}=a,o=()=>i(s,t,n),u=()=>{e(s,()=>{o(),r&&r()})};l?l(s,o,u):u()}}else i(s,t,n)},en=(e,t,n,l=!1,r=!1)=>{let i;let{type:s,props:o,ref:a,children:u,dynamicChildren:c,shapeFlag:f,patchFlag:p,dirs:d,cacheIndex:h}=e;if(-2===p&&(r=!1),null!=a&&nC(a,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&f){t.ctx.deactivate(e);return}let g=1&f&&d,m=!nL(e);if(m&&(i=o&&o.onVnodeBeforeUnmount)&&rC(i,t,e),6&f)ei(e.component,n,l);else{if(128&f){e.suspense.unmount(n,l);return}g&&t4(e,null,t,"beforeUnmount"),64&f?e.type.remove(e,t,n,ec,l):c&&!c.hasOnce&&(s!==l5||p>0&&64&p)?es(c,t,n,!1,!0):(s===l5&&384&p||!r&&16&f)&&es(u,t,n),l&&el(e)}(m&&(i=o&&o.onVnodeUnmounted)||g)&&lM(()=>{i&&rC(i,t,e),g&&t4(e,null,t,"unmounted")},n)},el=e=>{let{type:t,el:n,anchor:l,transition:r}=e;if(t===l5){er(n,l);return}if(t===re){O(e);return}let i=()=>{s(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){let{leave:t,delayLeave:l}=r,s=()=>t(n,i);l?l(e.el,i,s):s()}else i()},er=(e,t)=>{let n;for(;e!==t;)n=g(e),s(e),e=n;s(t)},ei=(e,t,n)=>{let{bum:l,scope:r,job:i,subTree:s,um:o,m:a,a:u}=e;lj(a),lj(u),l&&Z(l),r.stop(),i&&(i.flags|=8,en(s,e,t,n)),o&&lM(o,t),lM(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},es=(e,t,n,l=!1,r=!1,i=0)=>{for(let s=i;s<e.length;s++)en(e[s],t,n,l,r)},eo=e=>{if(6&e.shapeFlag)return eo(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=g(e.anchor||e.el),n=t&&t[t8];return n?g(n):t},ea=!1,eu=(e,t,n)=>{null==e?t._vnode&&en(t._vnode,null,null,!0):C(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ea||(ea=!0,tZ(),tY(),ea=!1)},ec={p:C,um:en,m:ee,r:el,mt:W,mc:F,pc:X,pbc:U,n:eo,o:e};return t&&([l,r]=t(ec)),{render:eu,hydrate:l,createApp:(n=l,function(e,t=null){P(e)||(e=x({},e)),null==t||L(t)||(t=null);let l=ld(),r=new WeakSet,i=[],s=!1,o=l.app={_uid:lh++,_component:e,_props:t,_container:null,_context:l,_instance:null,version:rj,get config(){return l.config},set config(v){},use:(e,...t)=>(r.has(e)||(e&&P(e.install)?(r.add(e),e.install(o,...t)):P(e)&&(r.add(e),e(o,...t))),o),mixin:e=>(l.mixins.includes(e)||l.mixins.push(e),o),component:(e,t)=>t?(l.components[e]=t,o):l.components[e],directive:(e,t)=>t?(l.directives[e]=t,o):l.directives[e],mount(r,i,a){if(!s){let u=o._ceVNode||rh(e,t);return u.appContext=l,!0===a?a="svg":!1===a&&(a=void 0),i&&n?n(u,r):eu(u,r,a),s=!0,o._container=r,r.__vue_app__=o,rL(u.component)}},onUnmount(e){i.push(e)},unmount(){s&&(tV(i,o._instance,16),eu(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(l.provides[e]=t,o),runWithContext(e){let t=lg;lg=o;try{return e()}finally{lg=t}}};return o})}}function lD({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function lF({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function lV(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function lU(e,t,n=!1){let l=e.children,r=t.children;if(T(l)&&T(r))for(let e=0;e<l.length;e++){let t=l[e],i=r[e];!(1&i.shapeFlag)||i.dynamicChildren||((i.patchFlag<=0||32===i.patchFlag)&&((i=r[e]=ry(r[e])).el=t.el),n||-2===i.patchFlag||lU(t,i)),i.type===l9&&(i.el=t.el)}}function lj(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}let lB=Symbol.for("v-scx");function l$(e,t){return lH(e,null,{flush:"sync"})}function lH(e,t,n=m){let{immediate:l,deep:i,flush:s,once:o}=n,a=x({},n),u=rE;a.call=(e,t,n)=>tV(e,u,t,n);let c=!1;return"post"===s?a.scheduler=e=>{lM(e,u&&u.suspense)}:"sync"!==s&&(c=!0,a.scheduler=(e,t)=>{t?e():tG(e)}),a.augmentJob=e=>{t&&(e.flags|=4),c&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))},function(e,t,n=m){let l,i,s,o;let{immediate:a,deep:u,once:c,scheduler:f,augmentJob:p,call:h}=n,g=e=>u?e:td(e)||!1===u||0===u?tD(e,1):tD(e),_=!1,b=!1;if(ty(e)?(i=()=>e.value,_=td(e)):tf(e)?(i=()=>g(e),_=!0):T(e)?(b=!0,_=e.some(e=>tf(e)||td(e)),i=()=>e.map(e=>ty(e)?e.value:tf(e)?g(e):P(e)?h?h(e,2):e():void 0)):i=P(e)?t?h?()=>h(e,2):e:()=>{if(s){eA();try{s()}finally{eR()}}let t=d;d=l;try{return h?h(e,3,[o]):e(o)}finally{d=t}}:y,t&&u){let e=i,t=!0===u?1/0:u;i=()=>tD(e(),t)}let S=r,C=()=>{l.stop(),S&&S.active&&w(S.effects,l)};if(c&&t){let e=t;t=(...t)=>{e(...t),C()}}let x=b?Array(e.length).fill(tM):tM,E=e=>{if(1&l.flags&&(l.dirty||e)){if(t){let e=l.run();if(u||_||(b?e.some((e,t)=>X(e,x[t])):X(e,x))){s&&s();let n=d;d=l;try{let n=[e,x===tM?void 0:b&&x[0]===tM?[]:x,o];h?h(t,3,n):t(...n),x=e}finally{d=n}}}else l.run()}};return p&&p(E),(l=new em(i)).scheduler=f?()=>f(E,!1):E,o=e=>tL(e,!1,l),s=l.onStop=()=>{let e=tI.get(l);if(e){if(h)h(e,4);else for(let t of e)t();tI.delete(l)}},t?a?E(!0):x=l.run():f?f(E.bind(null,!0),!0):l.run(),C.pause=l.pause.bind(l),C.resume=l.resume.bind(l),C.stop=C,C}(e,t,a)}function lW(e,t,n){let l;let r=this.proxy,i=M(e)?e.includes(".")?lK(r,e):()=>r[e]:e.bind(r,r);P(t)?l=t:(l=t.handler,n=t);let s=rT(this),o=lH(i,l.bind(r),n);return s(),o}function lK(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}let lz=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${K(t)}Modifiers`]||e[`${q(t)}Modifiers`];function lq(e,t,...n){let l;if(e.isUnmounted)return;let r=e.vnode.props||m,i=n,s=t.startsWith("update:"),o=s&&lz(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>M(e)?e.trim():e)),o.number&&(i=n.map(Q)));let a=r[l=J(t)]||r[l=J(K(t))];!a&&s&&(a=r[l=J(q(t))]),a&&tV(a,e,6,i);let u=r[l+"Once"];if(u){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,tV(u,e,6,i)}}function lG(e,t){return!!(e&&S(t))&&(k(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||k(e,q(t))||k(e,t))}function lJ(e){let t,n;let{type:l,vnode:r,proxy:i,withProxy:s,propsOptions:[o],slots:a,attrs:u,emit:c,render:f,renderCache:p,props:d,data:h,setupState:g,ctx:m,inheritAttrs:_}=e,y=t2(e);try{if(4&r.shapeFlag){let e=s||i;t=r_(f.call(e,e,p,d,g,h,m)),n=u}else t=r_(l.length>1?l(d,{attrs:u,slots:a,emit:c}):l(d,null)),n=l.props?u:lX(u)}catch(n){rt.length=0,tU(n,e,1),t=rh(l7)}let b=t;if(n&&!1!==_){let e=Object.keys(n),{shapeFlag:t}=b;e.length&&7&t&&(o&&e.some(C)&&(n=lZ(n,o)),b=rv(b,n,!1,!0))}return r.dirs&&((b=rv(b,null,!1,!0)).dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&n_(b,r.transition),t=b,t2(y),t}let lX=e=>{let t;for(let n in e)("class"===n||"style"===n||S(n))&&((t||(t={}))[n]=e[n]);return t},lZ=(e,t)=>{let n={};for(let l in e)C(l)&&l.slice(9)in t||(n[l]=e[l]);return n};function lY(e,t,n){let l=Object.keys(t);if(l.length!==Object.keys(e).length)return!0;for(let r=0;r<l.length;r++){let i=l[r];if(t[i]!==e[i]&&!lG(n,i))return!0}return!1}function lQ({vnode:e,parent:t},n){for(;t;){let l=t.subTree;if(l.suspense&&l.suspense.activeBranch===e&&(l.el=e.el),l===e)(e=t.vnode).el=n,t=t.parent;else break}}let l0=e=>e.__isSuspense,l1=0;function l2(e,t){let n=e.props&&e.props[t];P(n)&&n()}function l6(e,t,n,l,r,i,s,o,a,u,c=!1){let f;let{p:p,m:d,um:h,n:g,o:{parentNode:m,remove:_}}=u,y=function(e){let t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);y&&t&&t.pendingBranch&&(f=t.pendingId,t.deps++);let b=e.props?ee(e.props.timeout):void 0,S=i,C={vnode:e,parent:t,parentComponent:n,namespace:s,container:l,hiddenContainer:r,deps:0,pendingId:l1++,timeout:"number"==typeof b?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:l,activeBranch:r,pendingBranch:s,pendingId:o,effects:a,parentComponent:u,container:c}=C,p=!1;C.isHydrating?C.isHydrating=!1:e||((p=r&&s.transition&&"out-in"===s.transition.mode)&&(r.transition.afterLeave=()=>{o===C.pendingId&&(d(s,c,i===S?g(r):i,0),tX(a))}),r&&(m(r.el)===c&&(i=g(r)),h(r,u,C,!0)),p||d(s,c,i,0)),l3(C,s),C.pendingBranch=null,C.isInFallback=!1;let _=C.parent,b=!1;for(;_;){if(_.pendingBranch){_.effects.push(...a),b=!0;break}_=_.parent}b||p||tX(a),C.effects=[],y&&t&&t.pendingBranch&&f===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),l2(l,"onResolve")},fallback(e){if(!C.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:l,container:r,namespace:i}=C;l2(t,"onFallback");let s=g(n),u=()=>{C.isInFallback&&(p(null,e,r,s,l,null,i,o,a),l3(C,e))},c=e.transition&&"out-in"===e.transition.mode;c&&(n.transition.afterLeave=u),C.isInFallback=!0,h(n,l,null,!0),c||u()},move(e,t,n){C.activeBranch&&d(C.activeBranch,e,t,n),C.container=e},next:()=>C.activeBranch&&g(C.activeBranch),registerDep(e,t,n){let l=!!C.pendingBranch;l&&C.deps++;let r=e.vnode.el;e.asyncDep.catch(t=>{tU(t,e,0)}).then(i=>{if(e.isUnmounted||C.isUnmounted||C.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:o}=e;rN(e,i,!1),r&&(o.el=r);let a=!r&&e.subTree.el;t(e,o,m(r||e.subTree.el),r?null:g(e.subTree),C,s,n),a&&_(a),lQ(e,o.el),l&&0==--C.deps&&C.resolve()})},unmount(e,t){C.isUnmounted=!0,C.activeBranch&&h(C.activeBranch,n,e,t),C.pendingBranch&&h(C.pendingBranch,n,e,t)}};return C}function l4(e){let t;if(P(e)){let n=ri&&e._c;n&&(e._d=!1,rl()),e=e(),n&&(e._d=!0,t=rn,rr())}return T(e)&&(e=function(e,t=!0){let n;for(let t=0;t<e.length;t++){let l=e[t];if(!ru(l))return;if(l.type!==l7||"v-if"===l.children){if(n)return;n=l}}return n}(e)),e=r_(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function l8(e,t){t&&t.pendingBranch?T(e)?t.effects.push(...e):t.effects.push(e):tX(e)}function l3(e,t){e.activeBranch=t;let{vnode:n,parentComponent:l}=e,r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,l&&l.subTree===n&&(l.vnode.el=r,lQ(l,r))}let l5=Symbol.for("v-fgt"),l9=Symbol.for("v-txt"),l7=Symbol.for("v-cmt"),re=Symbol.for("v-stc"),rt=[],rn=null;function rl(e=!1){rt.push(rn=e?null:[])}function rr(){rt.pop(),rn=rt[rt.length-1]||null}let ri=1;function rs(e,t=!1){ri+=e,e<0&&rn&&t&&(rn.hasOnce=!0)}function ro(e){return e.dynamicChildren=ri>0?rn||_:null,rr(),ri>0&&rn&&rn.push(e),e}function ra(e,t,n,l,r){return ro(rh(e,t,n,l,r,!0))}function ru(e){return!!e&&!0===e.__v_isVNode}function rc(e,t){return e.type===t.type&&e.key===t.key}let rf=({key:e})=>null!=e?e:null,rp=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?M(e)||ty(e)||P(e)?{i:t0,r:e,k:t,f:!!n}:e:null);function rd(e,t=null,n=null,l=0,r=null,i=e===l5?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&rf(t),ref:t&&rp(t),scopeId:t1,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:l,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:t0};return o?(rb(a,n),128&i&&e.normalize(a)):n&&(a.shapeFlag|=M(n)?8:16),ri>0&&!s&&rn&&(a.patchFlag>0||6&i)&&32!==a.patchFlag&&rn.push(a),a}let rh=function(e,t=null,n=null,l=0,r=null,i=!1){var s;if(e&&e!==n6||(e=l7),ru(e)){let l=rv(e,t,!0);return n&&rb(l,n),ri>0&&!i&&rn&&(6&l.shapeFlag?rn[rn.indexOf(e)]=l:rn.push(l)),l.patchFlag=-2,l}if(P(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=rg(t);e&&!M(e)&&(t.class=eo(e)),L(n)&&(th(n)&&!T(n)&&(n=x({},n)),t.style=el(n))}let o=M(e)?1:l0(e)?128:t3(e)?64:L(e)?4:P(e)?2:0;return rd(e,t,n,l,r,o,i,!0)};function rg(e){return e?th(e)||lb(e)?x({},e):e:null}function rv(e,t,n=!1,l=!1){let{props:r,ref:i,patchFlag:s,children:o,transition:a}=e,u=t?rS(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&rf(u),ref:t&&t.ref?n&&i?T(i)?i.concat(rp(t)):[i,rp(t)]:rp(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==l5?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&rv(e.ssContent),ssFallback:e.ssFallback&&rv(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&l&&n_(c,a.clone(c)),c}function rm(e=" ",t=0){return rh(l9,null,e,t)}function r_(e){return null==e||"boolean"==typeof e?rh(l7):T(e)?rh(l5,null,e.slice()):ru(e)?ry(e):rh(l9,null,String(e))}function ry(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:rv(e)}function rb(e,t){let n=0,{shapeFlag:l}=e;if(null==t)t=null;else if(T(t))n=16;else if("object"==typeof t){if(65&l){let n=t.default;n&&(n._c&&(n._d=!1),rb(e,n()),n._c&&(n._d=!0));return}{n=32;let l=t._;l||lb(t)?3===l&&t0&&(1===t0.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=t0}}else P(t)?(t={default:t,_ctx:t0},n=32):(t=String(t),64&l?(n=16,t=[rm(t)]):n=8);e.children=t,e.shapeFlag|=n}function rS(...e){let t={};for(let n=0;n<e.length;n++){let l=e[n];for(let e in l)if("class"===e)t.class!==l.class&&(t.class=eo([t.class,l.class]));else if("style"===e)t.style=el([t.style,l.style]);else if(S(e)){let n=t[e],r=l[e];r&&n!==r&&!(T(n)&&n.includes(r))&&(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=l[e])}return t}function rC(e,t,n,l=null){tV(e,t,7,[n,l])}let rx=ld(),rw=0,rE=null,rk=()=>rE||t0;a=e=>{rE=e},u=e=>{rO=e};let rT=e=>{let t=rE;return a(e),e.scope.on(),()=>{e.scope.off(),a(t)}},rA=()=>{rE&&rE.scope.off(),a(null)};function rR(e){return 4&e.vnode.shapeFlag}let rO=!1;function rN(e,t,n){P(t)?e.render=t:L(t)&&(e.setupState=tk(t)),rP(e,n)}function rP(e,t,n){let l=e.type;if(!e.render){if(!t&&c&&!l.render){let t=l.template||li(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:i,compilerOptions:s}=l,o=x(x({isCustomElement:n,delimiters:i},r),s);l.render=c(t,o)}}e.render=l.render||y,f&&f(e)}{let t=rT(e);eA();try{!function(e){let t=li(e),n=e.proxy,l=e.ctx;ll=!1,t.beforeCreate&&lr(t.beforeCreate,e,"bc");let{data:r,computed:i,methods:s,watch:o,provide:a,inject:u,created:c,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:g,deactivated:m,beforeDestroy:_,beforeUnmount:b,destroyed:S,unmounted:C,render:x,renderTracked:w,renderTriggered:E,errorCaptured:k,serverPrefetch:A,expose:R,inheritAttrs:O,components:N,directives:I,filters:D}=t;if(u&&function(e,t,n=y){for(let n in T(e)&&(e=lu(e)),e){let l;let r=e[n];ty(l=L(r)?"default"in r?lm(r.from||n,r.default,!0):lm(r.from||n):lm(r))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e}):t[n]=l}}(u,l,null),s)for(let e in s){let t=s[e];P(t)&&(l[e]=t.bind(n))}if(r){let t=r.call(n,n);L(t)&&(e.data=to(t))}if(ll=!0,i)for(let e in i){let t=i[e],r=P(t)?t.bind(n,n):P(t.get)?t.get.bind(n,n):y,s=rF({get:r,set:!P(t)&&P(t.set)?t.set.bind(n):y});Object.defineProperty(l,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,l,r){let i=r.includes(".")?lK(l,r):()=>l[r];if(M(t)){let e=n[t];P(e)&&lH(i,e,void 0)}else if(P(t)){var s;s=t.bind(l),lH(i,s,void 0)}else if(L(t)){if(T(t))t.forEach(t=>e(t,n,l,r));else{let e=P(t.handler)?t.handler.bind(l):n[t.handler];P(e)&&lH(i,e,t)}}}(o[e],l,n,e);if(a){let e=P(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{lv(t,e[t])})}function F(e,t){T(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(c&&lr(c,e,"c"),F(nz,f),F(nq,p),F(nG,d),F(nJ,h),F(nU,g),F(nj,m),F(n1,k),F(n0,w),F(nQ,E),F(nX,b),F(nZ,C),F(nY,A),T(R)){if(R.length){let t=e.exposed||(e.exposed={});R.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}x&&e.render===y&&(e.render=x),null!=O&&(e.inheritAttrs=O),N&&(e.components=N),I&&(e.directives=I)}(e)}finally{eR(),t()}}}let rM={get:(e,t)=>(eV(e,"get",""),e[t])};function rI(e){return{attrs:new Proxy(e.attrs,rM),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function rL(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tk(tv(e.exposed)),{get:(t,n)=>n in t?t[n]:n in n5?n5[n](e):void 0,has:(e,t)=>t in e||t in n5})):e.proxy}function rD(e,t=!0){return P(e)?e.displayName||e.name:e.name||t&&e.__name}let rF=(e,t)=>(function(e,t,n=!1){let l,r;return P(e)?l=e:(l=e.get,r=e.set),new tP(l,r,n)})(e,0,rO);function rV(e,t,n){let l=arguments.length;return 2!==l?(l>3?n=Array.prototype.slice.call(arguments,2):3===l&&ru(n)&&(n=[n]),rh(e,t,n)):!L(t)||T(t)?rh(e,null,t):ru(t)?rh(e,null,[t]):rh(e,t)}function rU(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e<n.length;e++)if(X(n[e],t[e]))return!1;return ri>0&&rn&&rn.push(e),!0}let rj="3.5.13",rB="undefined"!=typeof window&&window.trustedTypes;if(rB)try{h=rB.createPolicy("vue",{createHTML:e=>e})}catch(e){}let r$=h?e=>h.createHTML(e):e=>e,rH="undefined"!=typeof document?document:null,rW=rH&&rH.createElement("template"),rK="transition",rz="animation",rq=Symbol("_vtc"),rG={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},rJ=x({},nc,rG),rX=((t=(e,{slots:t})=>rV(nd,rQ(e),t)).displayName="Transition",t.props=rJ,t),rZ=(e,t=[])=>{T(e)?e.forEach(e=>e(...t)):e&&e(...t)},rY=e=>!!e&&(T(e)?e.some(e=>e.length>1):e.length>1);function rQ(e){let t={};for(let n in e)n in rG||(t[n]=e[n]);if(!1===e.css)return t;let{name:n="v",type:l,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:a=i,appearActiveClass:u=s,appearToClass:c=o,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(L(e))return[ee(e.enter),ee(e.leave)];{let t=ee(e);return[t,t]}}(r),g=h&&h[0],m=h&&h[1],{onBeforeEnter:_,onEnter:y,onEnterCancelled:b,onLeave:S,onLeaveCancelled:C,onBeforeAppear:w=_,onAppear:E=y,onAppearCancelled:k=b}=t,T=(e,t,n,l)=>{e._enterCancelled=l,r1(e,t?c:o),r1(e,t?u:s),n&&n()},A=(e,t)=>{e._isLeaving=!1,r1(e,f),r1(e,d),r1(e,p),t&&t()},R=e=>(t,n)=>{let r=e?E:y,s=()=>T(t,e,n);rZ(r,[t,s]),r2(()=>{r1(t,e?a:i),r0(t,e?c:o),rY(r)||r4(t,l,g,s)})};return x(t,{onBeforeEnter(e){rZ(_,[e]),r0(e,i),r0(e,s)},onBeforeAppear(e){rZ(w,[e]),r0(e,a),r0(e,u)},onEnter:R(!1),onAppear:R(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>A(e,t);r0(e,f),e._enterCancelled?(r0(e,p),r9()):(r9(),r0(e,p)),r2(()=>{e._isLeaving&&(r1(e,f),r0(e,d),rY(S)||r4(e,l,m,n))}),rZ(S,[e,n])},onEnterCancelled(e){T(e,!1,void 0,!0),rZ(b,[e])},onAppearCancelled(e){T(e,!0,void 0,!0),rZ(k,[e])},onLeaveCancelled(e){A(e),rZ(C,[e])}})}function r0(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[rq]||(e[rq]=new Set)).add(t)}function r1(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[rq];n&&(n.delete(t),n.size||(e[rq]=void 0))}function r2(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let r6=0;function r4(e,t,n,l){let r=e._endId=++r6,i=()=>{r===e._endId&&l()};if(null!=n)return setTimeout(i,n);let{type:s,timeout:o,propCount:a}=r8(e,t);if(!s)return l();let u=s+"end",c=0,f=()=>{e.removeEventListener(u,p),i()},p=t=>{t.target===e&&++c>=a&&f()};setTimeout(()=>{c<a&&f()},o+1),e.addEventListener(u,p)}function r8(e,t){let n=window.getComputedStyle(e),l=e=>(n[e]||"").split(", "),r=l(`${rK}Delay`),i=l(`${rK}Duration`),s=r3(r,i),o=l(`${rz}Delay`),a=l(`${rz}Duration`),u=r3(o,a),c=null,f=0,p=0;t===rK?s>0&&(c=rK,f=s,p=i.length):t===rz?u>0&&(c=rz,f=u,p=a.length):p=(c=(f=Math.max(s,u))>0?s>u?rK:rz:null)?c===rK?i.length:a.length:0;let d=c===rK&&/\b(transform|all)(,|$)/.test(l(`${rK}Property`).toString());return{type:c,timeout:f,propCount:p,hasTransform:d}}function r3(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>r5(t)+r5(e[n])))}function r5(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function r9(){return document.body.offsetHeight}let r7=Symbol("_vod"),ie=Symbol("_vsh");function it(e,t){e.style.display=t?e[r7]:"none",e[ie]=!t}let il=Symbol("");function ir(e,t){if(1===e.nodeType){let n=e.style,l="";for(let e in t)n.setProperty(`--${e}`,t[e]),l+=`--${e}: ${t[e]};`;n[il]=l}}let ii=/(^|;)\s*display\s*:/,is=/\s*!important$/;function io(e,t,n){if(T(n))n.forEach(n=>io(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let l=function(e,t){let n=iu[t];if(n)return n;let l=K(t);if("filter"!==l&&l in e)return iu[t]=l;l=G(l);for(let n=0;n<ia.length;n++){let r=ia[n]+l;if(r in e)return iu[t]=r}return t}(e,t);is.test(n)?e.setProperty(q(l),n.replace(is,""),"important"):e[l]=n}}let ia=["Webkit","Moz","ms"],iu={},ic="http://www.w3.org/1999/xlink";function ip(e,t,n,l,r,i=ea(t)){l&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(ic,t.slice(6,t.length)):e.setAttributeNS(ic,t,n):null==n||i&&!(n||""===n)?e.removeAttribute(t):e.setAttribute(t,i?"":I(n)?String(n):n)}function id(e,t,n,l,r){if("innerHTML"===t||"textContent"===t){null!=n&&(e[t]="innerHTML"===t?r$(n):n);return}let i=e.tagName;if("value"===t&&"PROGRESS"!==i&&!i.includes("-")){let l="OPTION"===i?e.getAttribute("value")||"":e.value,r=null==n?"checkbox"===e.type?"on":"":String(n);l===r&&"_value"in e||(e.value=r),null==n&&e.removeAttribute(t),e._value=n;return}let s=!1;if(""===n||null==n){let l=typeof e[t];if("boolean"===l){var o;n=!!(o=n)||""===o}else null==n&&"string"===l?(n="",s=!0):"number"===l&&(n=0,s=!0)}try{e[t]=n}catch(e){}s&&e.removeAttribute(r||t)}function ih(e,t,n,l){e.addEventListener(t,n,l)}let ig=Symbol("_vei"),iv=/(?:Once|Passive|Capture)$/,im=0,i_=Promise.resolve(),iy=()=>im||(i_.then(()=>im=0),im=Date.now()),ib=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2),iS={};function iC(e,t,n){let l=nb(e,t);j(l)&&x(l,t);class r extends iw{constructor(e){super(l,e,n)}}return r.def=l,r}let ix="undefined"!=typeof HTMLElement?HTMLElement:class{};class iw extends ix{constructor(e,t={},n=i0){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==i0?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof iw){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,tq(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(e=>{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{let n;this._resolved=!0,this._pendingResolve=void 0;let{props:l,styles:r}=e;if(l&&!T(l))for(let e in l){let t=l[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=ee(this._props[e])),(n||(n=Object.create(null)))[K(e)]=!0)}this._numberProps=n,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)k(this,e)||Object.defineProperty(this,e,{get:()=>tw(t[e])})}_resolveProps(e){let{props:t}=e,n=T(t)?t:Object.keys(t||{});for(let e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(K))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):iS,l=K(e);t&&this._numberProps&&this._numberProps[l]&&(n=ee(n)),this._setProp(l,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,l=!1){if(t!==this._props[e]&&(t===iS?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),l&&this._instance&&this._update(),n)){let n=this._ob;n&&n.disconnect(),!0===t?this.setAttribute(q(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(q(e),t+""):t||this.removeAttribute(q(e)),n&&n.observe(this,{attributes:!0})}}_update(){iQ(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=rh(this._def,x(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,j(t[0])?x({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),q(e)!==e&&t(q(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let l=document.createElement("style");n&&l.setAttribute("nonce",n),l.textContent=e[t],this.shadowRoot.prepend(l)}}_parseSlots(){let e;let t=this._slots={};for(;e=this.firstChild;){let n=1===e.nodeType&&e.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(e),this.removeChild(e)}}_renderSlots(){let e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let l=e[n],r=l.getAttribute("name")||"default",i=this._slots[r],s=l.parentNode;if(i)for(let e of i){if(t&&1===e.nodeType){let n;let l=t+"-s",r=document.createTreeWalker(e,1);for(e.setAttribute(l,"");n=r.nextNode();)n.setAttribute(l,"")}s.insertBefore(e,l)}else for(;l.firstChild;)s.insertBefore(l.firstChild,l);s.removeChild(l)}}_injectChildStyle(e){this._applyStyles(e.styles,e)}_removeChildStyle(e){}}function iE(e){let t=rk();return t&&t.ce||null}let ik=new WeakMap,iT=new WeakMap,iA=Symbol("_moveCb"),iR=Symbol("_enterCb"),iO=(n={name:"TransitionGroup",props:x({},rJ,{tag:String,moveClass:String}),setup(e,{slots:t}){let n,l;let r=rk(),i=na();return nJ(()=>{if(!n.length)return;let t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){let l=e.cloneNode(),r=e[rq];r&&r.forEach(e=>{e.split(/\s+/).forEach(e=>e&&l.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&l.classList.add(e)),l.style.display="none";let i=1===t.nodeType?t:t.parentNode;i.appendChild(l);let{hasTransform:s}=r8(l);return i.removeChild(l),s}(n[0].el,r.vnode.el,t))return;n.forEach(iN),n.forEach(iP);let l=n.filter(iM);r9(),l.forEach(e=>{let n=e.el,l=n.style;r0(n,t),l.transform=l.webkitTransform=l.transitionDuration="";let r=n[iA]=e=>{(!e||e.target===n)&&(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener("transitionend",r),n[iA]=null,r1(n,t))};n.addEventListener("transitionend",r)})}),()=>{let s=tg(e),o=rQ(s),a=s.tag||l5;if(n=[],l)for(let e=0;e<l.length;e++){let t=l[e];t.el&&t.el instanceof Element&&(n.push(t),n_(t,ng(t,o,i,r)),ik.set(t,t.el.getBoundingClientRect()))}l=t.default?ny(t.default()):[];for(let e=0;e<l.length;e++){let t=l[e];null!=t.key&&n_(t,ng(t,o,i,r))}return rh(a,null,l)}}},delete n.props.mode,n);function iN(e){let t=e.el;t[iA]&&t[iA](),t[iR]&&t[iR]()}function iP(e){iT.set(e,e.el.getBoundingClientRect())}function iM(e){let t=ik.get(e),n=iT.get(e),l=t.left-n.left,r=t.top-n.top;if(l||r){let t=e.el.style;return t.transform=t.webkitTransform=`translate(${l}px,${r}px)`,t.transitionDuration="0s",e}}let iI=e=>{let t=e.props["onUpdate:modelValue"]||!1;return T(t)?e=>Z(t,e):t};function iL(e){e.target.composing=!0}function iD(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let iF=Symbol("_assign"),iV={created(e,{modifiers:{lazy:t,trim:n,number:l}},r){e[iF]=iI(r);let i=l||r.props&&"number"===r.props.type;ih(e,t?"change":"input",t=>{if(t.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=Q(l)),e[iF](l)}),n&&ih(e,"change",()=>{e.value=e.value.trim()}),t||(ih(e,"compositionstart",iL),ih(e,"compositionend",iD),ih(e,"change",iD))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:l,trim:r,number:i}},s){if(e[iF]=iI(s),e.composing)return;let o=(i||"number"===e.type)&&!/^0\d/.test(e.value)?Q(e.value):e.value,a=null==t?"":t;o===a||document.activeElement===e&&"range"!==e.type&&(l&&t===n||r&&e.value.trim()===a)||(e.value=a)}},iU={deep:!0,created(e,t,n){e[iF]=iI(n),ih(e,"change",()=>{let t=e._modelValue,n=iW(e),l=e.checked,r=e[iF];if(T(t)){let e=ec(t,n),i=-1!==e;if(l&&!i)r(t.concat(n));else if(!l&&i){let n=[...t];n.splice(e,1),r(n)}}else if(R(t)){let e=new Set(t);l?e.add(n):e.delete(n),r(e)}else r(iK(e,l))})},mounted:ij,beforeUpdate(e,t,n){e[iF]=iI(n),ij(e,t,n)}};function ij(e,{value:t,oldValue:n},l){let r;if(e._modelValue=t,T(t))r=ec(t,l.props.value)>-1;else if(R(t))r=t.has(l.props.value);else{if(t===n)return;r=eu(t,iK(e,!0))}e.checked!==r&&(e.checked=r)}let iB={created(e,{value:t},n){e.checked=eu(t,n.props.value),e[iF]=iI(n),ih(e,"change",()=>{e[iF](iW(e))})},beforeUpdate(e,{value:t,oldValue:n},l){e[iF]=iI(l),t!==n&&(e.checked=eu(t,l.props.value))}},i$={deep:!0,created(e,{value:t,modifiers:{number:n}},l){let r=R(t);ih(e,"change",()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Q(iW(e)):iW(e));e[iF](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,tq(()=>{e._assigning=!1})}),e[iF]=iI(l)},mounted(e,{value:t}){iH(e,t)},beforeUpdate(e,t,n){e[iF]=iI(n)},updated(e,{value:t}){e._assigning||iH(e,t)}};function iH(e,t){let n=e.multiple,l=T(t);if(!n||l||R(t)){for(let r=0,i=e.options.length;r<i;r++){let i=e.options[r],s=iW(i);if(n){if(l){let e=typeof s;"string"===e||"number"===e?i.selected=t.some(e=>String(e)===String(s)):i.selected=ec(t,s)>-1}else i.selected=t.has(s)}else if(eu(iW(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function iW(e){return"_value"in e?e._value:e.value}function iK(e,t){let n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}function iz(e,t,n,l,r){let i=function(e,t){switch(e){case"SELECT":return i$;case"TEXTAREA":return iV;default:switch(t){case"checkbox":return iU;case"radio":return iB;default:return iV}}}(e.tagName,n.props&&n.props.type)[r];i&&i(e,t,n,l)}let iq=["ctrl","shift","alt","meta"],iG={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>iq.some(n=>e[`${n}Key`]&&!t.includes(n))},iJ={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},iX=x({patchProp:(e,t,n,l,r,i)=>{let s="svg"===r;"class"===t?function(e,t,n){let l=e[rq];l&&(t=(t?[t,...l]:[...l]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,l,s):"style"===t?function(e,t,n){let l=e.style,r=M(n),i=!1;if(n&&!r){if(t){if(M(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&io(l,t,"")}else for(let e in t)null==n[e]&&io(l,e,"")}for(let e in n)"display"===e&&(i=!0),io(l,e,n[e])}else if(r){if(t!==n){let e=l[il];e&&(n+=";"+e),l.cssText=n,i=ii.test(n)}}else t&&e.removeAttribute("style");r7 in e&&(e[r7]=i?l.display:"",e[ie]&&(l.display="none"))}(e,n,l):S(t)?C(t)||function(e,t,n,l,r=null){let i=e[ig]||(e[ig]={}),s=i[t];if(l&&s)s.value=l;else{let[n,o]=function(e){let t;if(iv.test(e)){let n;for(t={};n=e.match(iv);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):q(e.slice(2)),t]}(t);l?ih(e,n,i[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();tV(function(e,t){if(!T(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=iy(),n}(l,r),o):s&&(!function(e,t,n,l){e.removeEventListener(t,n,l)}(e,n,s,o),i[t]=void 0)}}(e,t,0,l,i):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,l){if(l)return!!("innerHTML"===t||"textContent"===t||t in e&&ib(t)&&P(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(ib(t)&&M(n))&&t in e}(e,t,l,s))?e._isVueCE&&(/[A-Z]/.test(t)||!M(l))?id(e,K(t),l,i,t):("true-value"===t?e._trueValue=l:"false-value"===t&&(e._falseValue=l),ip(e,t,l,s)):(id(e,t,l),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||ip(e,t,l,s,i,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,l)=>{let r="svg"===t?rH.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?rH.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?rH.createElement(e,{is:n}):rH.createElement(e);return"select"===e&&l&&null!=l.multiple&&r.setAttribute("multiple",l.multiple),r},createText:e=>rH.createTextNode(e),createComment:e=>rH.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>rH.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,l,r,i){let s=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==i&&(r=r.nextSibling););else{rW.innerHTML=r$("svg"===l?`<svg>${e}</svg>`:"mathml"===l?`<math>${e}</math>`:e);let r=rW.content;if("svg"===l||"mathml"===l){let e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),iZ=!1;function iY(){return p=iZ?p:lI(iX),iZ=!0,p}let iQ=(...e)=>{(p||(p=lL(iX))).render(...e)},i0=(...e)=>{let t=(p||(p=lL(iX))).createApp(...e),{mount:n}=t;return t.mount=e=>{let l=i6(e);if(!l)return;let r=t._component;P(r)||r.render||r.template||(r.template=l.innerHTML),1===l.nodeType&&(l.textContent="");let i=n(l,!1,i2(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),i},t},i1=(...e)=>{let t=iY().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=i6(e);if(t)return n(t,!0,i2(t))},t};function i2(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function i6(e){return M(e)?document.querySelector(e):e}return e.BaseTransition=nd,e.BaseTransitionPropsValidators=nc,e.Comment=l7,e.DeprecationTypes=null,e.EffectScope=eg,e.ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},e.ErrorTypeStrings=null,e.Fragment=l5,e.KeepAlive={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=rk(),l=n.ctx,r=new Map,i=new Set,s=null,o=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:f}}}=l,p=f("div");function d(e){n$(e),c(e,n,o,!0)}function h(e){r.forEach((t,n)=>{let l=rD(t.type);l&&!e(l)&&g(n)})}function g(e){let t=r.get(e);!t||s&&rc(t,s)?s&&n$(s):d(t),r.delete(e),i.delete(e)}l.activate=(e,t,n,l,r)=>{let i=e.component;u(e,t,n,0,o),a(i.vnode,e,t,n,i,o,l,e.slotScopeIds,r),lM(()=>{i.isDeactivated=!1,i.a&&Z(i.a);let t=e.props&&e.props.onVnodeMounted;t&&rC(t,i.parent,e)},o)},l.deactivate=e=>{let t=e.component;lj(t.m),lj(t.a),u(e,p,null,1,o),lM(()=>{t.da&&Z(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&rC(n,t.parent,e),t.isDeactivated=!0},o)},lH(()=>[e.include,e.exclude],([e,t])=>{e&&h(t=>nV(e,t)),t&&h(e=>!nV(t,e))},{flush:"post",deep:!0});let m=null,_=()=>{null!=m&&(l0(n.subTree.type)?lM(()=>{r.set(m,nH(n.subTree))},n.subTree.suspense):r.set(m,nH(n.subTree)))};return nq(_),nJ(_),nX(()=>{r.forEach(e=>{let{subTree:t,suspense:l}=n,r=nH(t);if(e.type===r.type&&e.key===r.key){n$(r);let e=r.component.da;e&&lM(e,l);return}d(e)})}),()=>{if(m=null,!t.default)return s=null;let n=t.default(),l=n[0];if(n.length>1)return s=null,n;if(!ru(l)||!(4&l.shapeFlag)&&!(128&l.shapeFlag))return s=null,l;let o=nH(l);if(o.type===l7)return s=null,o;let a=o.type,u=rD(nL(o)?o.type.__asyncResolved||{}:a),{include:c,exclude:f,max:p}=e;if(c&&(!u||!nV(c,u))||f&&u&&nV(f,u))return o.shapeFlag&=-257,s=o,l;let d=null==o.key?a:o.key,h=r.get(d);return o.el&&(o=rv(o),128&l.shapeFlag&&(l.ssContent=o)),m=d,h?(o.el=h.el,o.component=h.component,o.transition&&n_(o,o.transition),o.shapeFlag|=512,i.delete(d),i.add(d)):(i.add(d),p&&i.size>parseInt(p,10)&&g(i.values().next().value)),o.shapeFlag|=256,s=o,l0(l.type)?l:o}}},e.ReactiveEffect=em,e.Static=re,e.Suspense={name:"Suspense",__isSuspense:!0,process(e,t,n,l,r,i,s,o,a,u){if(null==e)(function(e,t,n,l,r,i,s,o,a){let{p:u,o:{createElement:c}}=a,f=c("div"),p=e.suspense=l6(e,r,l,t,f,n,i,s,o,a);u(null,p.pendingBranch=e.ssContent,f,null,l,p,i,s),p.deps>0?(l2(e,"onPending"),l2(e,"onFallback"),u(null,e.ssFallback,t,n,l,null,i,s),l3(p,e.ssFallback)):p.resolve(!1,!0)})(t,n,l,r,i,s,o,a,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}(function(e,t,n,l,r,i,s,o,{p:a,um:u,o:{createElement:c}}){let f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;let p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:g,isInFallback:m,isHydrating:_}=f;if(g)f.pendingBranch=p,rc(p,g)?(a(g,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0?f.resolve():m&&!_&&(a(h,d,n,l,r,null,i,s,o),l3(f,d))):(f.pendingId=l1++,_?(f.isHydrating=!1,f.activeBranch=g):u(g,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),m?(a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0?f.resolve():(a(h,d,n,l,r,null,i,s,o),l3(f,d))):h&&rc(p,h)?(a(h,p,n,l,r,f,i,s,o),f.resolve(!0)):(a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0&&f.resolve()));else if(h&&rc(p,h))a(h,p,n,l,r,f,i,s,o),l3(f,p);else if(l2(t,"onPending"),f.pendingBranch=p,512&p.shapeFlag?f.pendingId=p.component.suspenseId:f.pendingId=l1++,a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0)f.resolve();else{let{timeout:e,pendingId:t}=f;e>0?setTimeout(()=>{f.pendingId===t&&f.fallback(d)},e):0===e&&f.fallback(d)}})(e,t,n,l,r,s,o,a,u)}},hydrate:function(e,t,n,l,r,i,s,o,a){let u=t.suspense=l6(t,l,n,e.parentNode,document.createElement("div"),null,r,i,s,o,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,i,s);return 0===u.deps&&u.resolve(!1,!0),c},normalize:function(e){let{shapeFlag:t,children:n}=e,l=32&t;e.ssContent=l4(l?n.default:n),e.ssFallback=l?l4(n.fallback):rh(l7)}},e.Teleport=nn,e.Text=l9,e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.Transition=rX,e.TransitionGroup=iO,e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.VueElement=iw,e.assertNumber=function(e,t){},e.callWithAsyncErrorHandling=tV,e.callWithErrorHandling=tF,e.camelize=K,e.capitalize=G,e.cloneVNode=rv,e.compatUtils=null,e.computed=rF,e.createApp=i0,e.createBlock=ra,e.createCommentVNode=function(e="",t=!1){return t?(rl(),ra(l7,null,e)):rh(l7,null,e)},e.createElementBlock=function(e,t,n,l,r,i){return ro(rd(e,t,n,l,r,i,!0))},e.createElementVNode=rd,e.createHydrationRenderer=lI,e.createPropsRestProxy=function(e,t){let n={};for(let l in e)t.includes(l)||Object.defineProperty(n,l,{enumerable:!0,get:()=>e[l]});return n},e.createRenderer=function(e){return lL(e)},e.createSSRApp=i1,e.createSlots=function(e,t){for(let n=0;n<t.length;n++){let l=t[n];if(T(l))for(let t=0;t<l.length;t++)e[l[t].name]=l[t].fn;else l&&(e[l.name]=l.key?(...e)=>{let t=l.fn(...e);return t&&(t.key=l.key),t}:l.fn)}return e},e.createStaticVNode=function(e,t){let n=rh(re,null,e);return n.staticCount=t,n},e.createTextVNode=rm,e.createVNode=rh,e.customRef=tA,e.defineAsyncComponent=function(e){let t;P(e)&&(e={loader:e});let{loader:n,loadingComponent:l,errorComponent:r,delay:i=200,hydrate:s,timeout:o,suspensible:a=!0,onError:u}=e,c=null,f=0,p=()=>(f++,c=null,d()),d=()=>{let e;return c||(e=c=n().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),u)return new Promise((t,n)=>{u(e,()=>t(p()),()=>n(e),f+1)});throw e}).then(n=>e!==c&&c?c:(n&&(n.__esModule||"Module"===n[Symbol.toStringTag])&&(n=n.default),t=n,n)))};return nb({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(e,n,l){let r=s?()=>{let t=s(l,t=>(function(e,t){if(nA(e)&&"["===e.data){let n=1,l=e.nextSibling;for(;l;){if(1===l.nodeType){if(!1===t(l))break}else if(nA(l)){if("]"===l.data){if(0==--n)break}else"["===l.data&&n++}l=l.nextSibling}}else t(e)})(e,t));t&&(n.bum||(n.bum=[])).push(t)}:l;t?r():d().then(()=>!n.isUnmounted&&r())},get __asyncResolved(){return t},setup(){let e=rE;if(nS(e),t)return()=>nD(t,e);let n=t=>{c=null,tU(t,e,13,!r)};if(a&&e.suspense)return d().then(t=>()=>nD(t,e)).catch(e=>(n(e),()=>r?rh(r,{error:e}):null));let s=tb(!1),u=tb(),f=tb(!!i);return i&&setTimeout(()=>{f.value=!1},i),null!=o&&setTimeout(()=>{if(!s.value&&!u.value){let e=Error(`Async component timed out after ${o}ms.`);n(e),u.value=e}},o),d().then(()=>{s.value=!0,e.parent&&nF(e.parent.vnode)&&e.parent.update()}).catch(e=>{n(e),u.value=e}),()=>s.value&&t?nD(t,e):u.value&&r?rh(r,{error:u.value}):l&&!f.value?rh(l):void 0}})},e.defineComponent=nb,e.defineCustomElement=iC,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineModel=function(){},e.defineOptions=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=(e,t)=>iC(e,t,i1),e.defineSlots=function(){return null},e.devtools=void 0,e.effect=function(e,t){e.effect instanceof em&&(e=e.effect.fn);let n=new em(e);t&&x(n,t);try{n.run()}catch(e){throw n.stop(),e}let l=n.run.bind(n);return l.effect=n,l},e.effectScope=function(e){return new eg(e)},e.getCurrentInstance=rk,e.getCurrentScope=function(){return r},e.getCurrentWatcher=function(){return d},e.getTransitionRawChildren=ny,e.guardReactiveProps=rg,e.h=rV,e.handleError=tU,e.hasInjectionContext=function(){return!!(rE||t0||lg)},e.hydrate=(...e)=>{iY().hydrate(...e)},e.hydrateOnIdle=(e=1e4)=>t=>{let n=nM(t,{timeout:e});return()=>nI(n)},e.hydrateOnInteraction=(e=[])=>(t,n)=>{M(e)&&(e=[e]);let l=!1,r=e=>{l||(l=!0,i(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},i=()=>{n(t=>{for(let n of e)t.removeEventListener(n,r)})};return n(t=>{for(let n of e)t.addEventListener(n,r,{once:!0})}),i},e.hydrateOnMediaQuery=e=>t=>{if(e){let n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},e.hydrateOnVisible=e=>(t,n)=>{let l=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){l.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(function(e){let{top:t,left:n,bottom:l,right:r}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:s}=window;return(t>0&&t<i||l>0&&l<i)&&(n>0&&n<s||r>0&&r<s)}(e))return t(),l.disconnect(),!1;l.observe(e)}}),()=>l.disconnect()},e.initCustomFormatter=function(){},e.initDirectivesForSSR=y,e.inject=lm,e.isMemoSame=rU,e.isProxy=th,e.isReactive=tf,e.isReadonly=tp,e.isRef=ty,e.isRuntimeOnly=()=>!c,e.isShallow=td,e.isVNode=ru,e.markRaw=tv,e.mergeDefaults=function(e,t){let n=ln(e);for(let e in t){if(e.startsWith("__skip"))continue;let l=n[e];l?T(l)||P(l)?l=n[e]={type:l,default:t[e]}:l.default=t[e]:null===l&&(l=n[e]={default:t[e]}),l&&t[`__skip_${e}`]&&(l.skipFactory=!0)}return n},e.mergeModels=function(e,t){return e&&t?T(e)&&T(t)?e.concat(t):x({},ln(e),ln(t)):e||t},e.mergeProps=rS,e.nextTick=tq,e.normalizeClass=eo,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!M(t)&&(e.class=eo(t)),n&&(e.style=el(n)),e},e.normalizeStyle=el,e.onActivated=nU,e.onBeforeMount=nz,e.onBeforeUnmount=nX,e.onBeforeUpdate=nG,e.onDeactivated=nj,e.onErrorCaptured=n1,e.onMounted=nq,e.onRenderTracked=n0,e.onRenderTriggered=nQ,e.onScopeDispose=function(e,t=!1){r&&r.cleanups.push(e)},e.onServerPrefetch=nY,e.onUnmounted=nZ,e.onUpdated=nJ,e.onWatcherCleanup=tL,e.openBlock=rl,e.popScopeId=function(){t1=null},e.provide=lv,e.proxyRefs=tk,e.pushScopeId=function(e){t1=e},e.queuePostFlushCb=tX,e.reactive=to,e.readonly=tu,e.ref=tb,e.registerRuntimeCompiler=function(e){c=e,f=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,le))}},e.render=iQ,e.renderList=function(e,t,n,l){let r;let i=n&&n[l],s=T(e);if(s||M(e)){let n=s&&tf(e),l=!1;n&&(l=!td(e),e=eB(e)),r=Array(e.length);for(let n=0,s=e.length;n<s;n++)r[n]=t(l?tm(e[n]):e[n],n,void 0,i&&i[n])}else if("number"==typeof e){r=Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,i&&i[n])}else if(L(e)){if(e[Symbol.iterator])r=Array.from(e,(e,n)=>t(e,n,void 0,i&&i[n]));else{let n=Object.keys(e);r=Array(n.length);for(let l=0,s=n.length;l<s;l++){let s=n[l];r[l]=t(e[s],s,l,i&&i[l])}}}else r=[];return n&&(n[l]=r),r},e.renderSlot=function(e,t,n={},l,r){if(t0.ce||t0.parent&&nL(t0.parent)&&t0.parent.ce)return"default"!==t&&(n.name=t),rl(),ra(l5,null,[rh("slot",n,l&&l())],64);let i=e[t];i&&i._c&&(i._d=!1),rl();let s=i&&function e(t){return t.some(t=>!ru(t)||!!(t.type!==l7&&(t.type!==l5||e(t.children))))?t:null}(i(n)),o=n.key||s&&s.key,a=ra(l5,{key:(o&&!I(o)?o:`_${t}`)+(!s&&l?"_fb":"")},s||(l?l():[]),s&&1===e._?64:-2);return!r&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a},e.resolveComponent=function(e,t){return n4(n2,e,!0,t)||e},e.resolveDirective=function(e){return n4("directives",e)},e.resolveDynamicComponent=function(e){return M(e)?n4(n2,e,!1)||e:e||n6},e.resolveFilter=null,e.resolveTransitionHooks=ng,e.setBlockTracking=rs,e.setDevtoolsHook=y,e.setTransitionHooks=n_,e.shallowReactive=ta,e.shallowReadonly=function(e){return tc(e,!0,e4,tn,ts)},e.shallowRef=tS,e.ssrContextKey=lB,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=ep,e.toHandlerKey=J,e.toHandlers=function(e,t){let n={};for(let l in e)n[t&&/[A-Z]/.test(l)?`on:${l}`:J(l)]=e[l];return n},e.toRaw=tg,e.toRef=function(e,t,n){return ty(e)?e:P(e)?new tO(e):L(e)&&arguments.length>1?tN(e,t,n):tb(e)},e.toRefs=function(e){let t=T(e)?Array(e.length):{};for(let n in e)t[n]=tN(e,n);return t},e.toValue=function(e){return P(e)?e():tw(e)},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){e.dep&&e.dep.trigger()},e.unref=tw,e.useAttrs=function(){return lt().attrs},e.useCssModule=function(e="$style"){return m},e.useCssVars=function(e){let t=rk();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>ir(e,n))},l=()=>{let l=e(t.proxy);t.ce?ir(t.ce,l):function e(t,n){if(128&t.shapeFlag){let l=t.suspense;t=l.activeBranch,l.pendingBranch&&!l.isHydrating&&l.effects.push(()=>{e(l.activeBranch,n)})}for(;t.component;)t=t.component.subTree;if(1&t.shapeFlag&&t.el)ir(t.el,n);else if(t.type===l5)t.children.forEach(t=>e(t,n));else if(t.type===re){let{el:e,anchor:l}=t;for(;e&&(ir(e,n),e!==l);)e=e.nextSibling}}(t.subTree,l),n(l)};nG(()=>{tX(l)}),nq(()=>{lH(l,y,{flush:"post"});let e=new MutationObserver(l);e.observe(t.subTree.el.parentNode,{childList:!0}),nZ(()=>e.disconnect())})},e.useHost=iE,e.useId=function(){let e=rk();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""},e.useModel=function(e,t,n=m){let l=rk(),r=K(t),i=q(t),s=lz(e,r),o=tA((s,o)=>{let a,u;let c=m;return l$(()=>{let t=e[r];X(a,t)&&(a=t,o())}),{get:()=>(s(),n.get?n.get(a):a),set(e){let s=n.set?n.set(e):e;if(!X(s,a)&&!(c!==m&&X(e,c)))return;let f=l.vnode.props;f&&(t in f||r in f||i in f)&&(`onUpdate:${t}`in f||`onUpdate:${r}`in f||`onUpdate:${i}`in f)||(a=e,o()),l.emit(`update:${t}`,s),X(e,s)&&X(e,c)&&!X(s,u)&&o(),c=e,u=s}}});return o[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?s||m:o,done:!1}:{done:!0}}},o},e.useSSRContext=()=>{},e.useShadowRoot=function(){let e=iE();return e&&e.shadowRoot},e.useSlots=function(){return lt().slots},e.useTemplateRef=function(e){let t=rk(),n=tS(null);return t&&Object.defineProperty(t.refs===m?t.refs={}:t.refs,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e}),n},e.useTransitionState=na,e.vModelCheckbox=iU,e.vModelDynamic={created(e,t,n){iz(e,t,n,null,"created")},mounted(e,t,n){iz(e,t,n,null,"mounted")},beforeUpdate(e,t,n,l){iz(e,t,n,l,"beforeUpdate")},updated(e,t,n,l){iz(e,t,n,l,"updated")}},e.vModelRadio=iB,e.vModelSelect=i$,e.vModelText=iV,e.vShow={beforeMount(e,{value:t},{transition:n}){e[r7]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):it(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:l}){!t!=!n&&(l?t?(l.beforeEnter(e),it(e,!0),l.enter(e)):l.leave(e,()=>{it(e,!1)}):it(e,t))},beforeUnmount(e,{value:t}){it(e,t)}},e.version=rj,e.warn=y,e.watch=function(e,t,n){return lH(e,t,n)},e.watchEffect=function(e,t){return lH(e,null,t)},e.watchPostEffect=function(e,t){return lH(e,null,{flush:"post"})},e.watchSyncEffect=l$,e.withAsyncContext=function(e){let t=rk(),n=e();return rA(),D(n)&&(n=n.catch(e=>{throw rT(t),e})),[n,()=>rT(t)]},e.withCtx=t6,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){if(null===t0)return e;let n=rL(t0),l=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[r,i,s,o=m]=t[e];r&&(P(r)&&(r={mounted:r,updated:r}),r.deep&&tD(i),l.push({dir:r,instance:n,value:i,oldValue:void 0,arg:s,modifiers:o}))}return e},e.withKeys=(e,t)=>{let n=e._withKeys||(e._withKeys={}),l=t.join(".");return n[l]||(n[l]=n=>{if(!("key"in n))return;let l=q(n.key);if(t.some(e=>e===l||iJ[e]===l))return e(n)})},e.withMemo=function(e,t,n,l){let r=n[l];if(r&&rU(r,e))return r;let i=t();return i.memo=e.slice(),i.cacheIndex=l,n[l]=i},e.withModifiers=(e,t)=>{let n=e._withMods||(e._withMods={}),l=t.join(".");return n[l]||(n[l]=(n,...l)=>{for(let e=0;e<t.length;e++){let l=iG[t[e]];if(l&&l(n,t))return}return e(n,...l)})},e.withScopeId=e=>t6,e}({}); diff --git a/node_modules/@vue/runtime-dom/index.js b/node_modules/@vue/runtime-dom/index.js deleted file mode 100644 index cdc29b2..0000000 --- a/node_modules/@vue/runtime-dom/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/runtime-dom.cjs.prod.js') -} else { - module.exports = require('./dist/runtime-dom.cjs.js') -} diff --git a/node_modules/@vue/runtime-dom/package.json b/node_modules/@vue/runtime-dom/package.json deleted file mode 100644 index 0448547..0000000 --- a/node_modules/@vue/runtime-dom/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "@vue/runtime-dom", - "version": "3.5.13", - "description": "@vue/runtime-dom", - "main": "index.js", - "module": "dist/runtime-dom.esm-bundler.js", - "types": "dist/runtime-dom.d.ts", - "unpkg": "dist/runtime-dom.global.js", - "files": [ - "index.js", - "dist" - ], - "exports": { - ".": { - "types": "./dist/runtime-dom.d.ts", - "node": { - "production": "./dist/runtime-dom.cjs.prod.js", - "development": "./dist/runtime-dom.cjs.js", - "default": "./index.js" - }, - "module": "./dist/runtime-dom.esm-bundler.js", - "import": "./dist/runtime-dom.esm-bundler.js", - "require": "./index.js" - }, - "./*": "./*" - }, - "sideEffects": false, - "buildOptions": { - "name": "VueRuntimeDOM", - "formats": [ - "esm-bundler", - "esm-browser", - "cjs", - "global" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/vuejs/core.git", - "directory": "packages/runtime-dom" - }, - "keywords": [ - "vue" - ], - "author": "Evan You", - "license": "MIT", - "bugs": { - "url": "https://github.com/vuejs/core/issues" - }, - "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-dom#readme", - "dependencies": { - "csstype": "^3.1.3", - "@vue/shared": "3.5.13", - "@vue/runtime-core": "3.5.13", - "@vue/reactivity": "3.5.13" - }, - "devDependencies": { - "@types/trusted-types": "^2.0.7" - } -} \ No newline at end of file diff --git a/node_modules/@vue/server-renderer/LICENSE b/node_modules/@vue/server-renderer/LICENSE deleted file mode 100644 index 15f1f7e..0000000 --- a/node_modules/@vue/server-renderer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018-present, Yuxi (Evan) You - -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/node_modules/@vue/server-renderer/README.md b/node_modules/@vue/server-renderer/README.md deleted file mode 100644 index 55323e4..0000000 --- a/node_modules/@vue/server-renderer/README.md +++ /dev/null @@ -1,178 +0,0 @@ -# @vue/server-renderer - -**Note: as of 3.2.13+, this package is included as a dependency of the main `vue` package and can be accessed as `vue/server-renderer`. This means you no longer need to explicitly install this package and ensure its version match that of `vue`'s. Just use the `vue/server-renderer` deep import instead.** - -## Basic API - -### `renderToString` - -**Signature** - -```ts -function renderToString( - input: App | VNode, - context?: SSRContext, -): Promise<string> -``` - -**Usage** - -```js -const { createSSRApp } = require('vue') -const { renderToString } = require('@vue/server-renderer') - -const app = createSSRApp({ - data: () => ({ msg: 'hello' }), - template: `<div>{{ msg }}</div>`, -}) - -;(async () => { - const html = await renderToString(app) - console.log(html) -})() -``` - -### Handling Teleports - -If the rendered app contains teleports, the teleported content will not be part of the rendered string. Instead, they are exposed under the `teleports` property of the ssr context object: - -```js -const ctx = {} -const html = await renderToString(app, ctx) - -console.log(ctx.teleports) // { '#teleported': 'teleported content' } -``` - -## Streaming API - -### `renderToNodeStream` - -Renders input as a [Node.js Readable stream](https://nodejs.org/api/stream.html#stream_class_stream_readable). - -**Signature** - -```ts -function renderToNodeStream(input: App | VNode, context?: SSRContext): Readable -``` - -**Usage** - -```js -// inside a Node.js http handler -renderToNodeStream(app).pipe(res) -``` - -**Note:** This method is not supported in the ESM build of `@vue/server-renderer`, which is decoupled from Node.js environments. Use `pipeToNodeWritable` instead. - -### `pipeToNodeWritable` - -Render and pipe to an existing [Node.js Writable stream](https://nodejs.org/api/stream.html#stream_writable_streams) instance. - -**Signature** - -```ts -function pipeToNodeWritable( - input: App | VNode, - context: SSRContext = {}, - writable: Writable, -): void -``` - -**Usage** - -```js -// inside a Node.js http handler -pipeToNodeWritable(app, {}, res) -``` - -### `renderToWebStream` - -Renders input as a [Web ReadableStream](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API). - -**Signature** - -```ts -function renderToWebStream( - input: App | VNode, - context?: SSRContext, -): ReadableStream -``` - -**Usage** - -```js -// inside an environment with ReadableStream support -return new Response(renderToWebStream(app)) -``` - -**Note:** in environments that do not expose `ReadableStream` constructor in the global scope, `pipeToWebWritable` should be used instead. - -### `pipeToWebWritable` - -Render and pipe to an existing [Web WritableStream](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream) instance. - -**Signature** - -```ts -function pipeToWebWritable( - input: App | VNode, - context: SSRContext = {}, - writable: WritableStream, -): void -``` - -**Usage** - -This is typically used in combination with [`TransformStream`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream): - -```js -// TransformStream is available in environments such as CloudFlare workers. -// in Node.js, TransformStream needs to be explicitly imported from 'stream/web' -const { readable, writable } = new TransformStream() -pipeToWebWritable(app, {}, writable) - -return new Response(readable) -``` - -### `renderToSimpleStream` - -Renders input in streaming mode using a simple readable interface. - -**Signature** - -```ts -function renderToSimpleStream( - input: App | VNode, - context: SSRContext, - options: SimpleReadable, -): SimpleReadable - -interface SimpleReadable { - push(content: string | null): void - destroy(err: any): void -} -``` - -**Usage** - -```js -let res = '' - -renderToSimpleStream( - app, - {}, - { - push(chunk) { - if (chunk === null) { - // done - console(`render complete: ${res}`) - } else { - res += chunk - } - }, - destroy(err) { - // error encountered - }, - }, -) -``` diff --git a/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js b/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js deleted file mode 100644 index 8725f8d..0000000 --- a/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js +++ /dev/null @@ -1,1129 +0,0 @@ -/** -* @vue/server-renderer v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var Vue = require('vue'); -var shared = require('@vue/shared'); -var compilerSsr = require('@vue/compiler-ssr'); - -function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) { - for (var k in e) { - n[k] = e[k]; - } - } - n.default = e; - return Object.freeze(n); -} - -var Vue__namespace = /*#__PURE__*/_interopNamespaceDefault(Vue); - -const shouldIgnoreProp = /* @__PURE__ */ shared.makeMap( - `,key,ref,innerHTML,textContent,ref_key,ref_for` -); -function ssrRenderAttrs(props, tag) { - let ret = ""; - for (const key in props) { - if (shouldIgnoreProp(key) || shared.isOn(key) || tag === "textarea" && key === "value") { - continue; - } - const value = props[key]; - if (key === "class") { - ret += ` class="${ssrRenderClass(value)}"`; - } else if (key === "style") { - ret += ` style="${ssrRenderStyle(value)}"`; - } else if (key === "className") { - ret += ` class="${String(value)}"`; - } else { - ret += ssrRenderDynamicAttr(key, value, tag); - } - } - return ret; -} -function ssrRenderDynamicAttr(key, value, tag) { - if (!shared.isRenderableAttrValue(value)) { - return ``; - } - const attrKey = tag && (tag.indexOf("-") > 0 || shared.isSVGTag(tag)) ? key : shared.propsToAttrMap[key] || key.toLowerCase(); - if (shared.isBooleanAttr(attrKey)) { - return shared.includeBooleanAttr(value) ? ` ${attrKey}` : ``; - } else if (shared.isSSRSafeAttrName(attrKey)) { - return value === "" ? ` ${attrKey}` : ` ${attrKey}="${shared.escapeHtml(value)}"`; - } else { - console.warn( - `[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}` - ); - return ``; - } -} -function ssrRenderAttr(key, value) { - if (!shared.isRenderableAttrValue(value)) { - return ``; - } - return ` ${key}="${shared.escapeHtml(value)}"`; -} -function ssrRenderClass(raw) { - return shared.escapeHtml(shared.normalizeClass(raw)); -} -function ssrRenderStyle(raw) { - if (!raw) { - return ""; - } - if (shared.isString(raw)) { - return shared.escapeHtml(raw); - } - const styles = shared.normalizeStyle(raw); - return shared.escapeHtml(shared.stringifyStyle(styles)); -} - -function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) { - return renderComponentVNode( - Vue.createVNode(comp, props, children), - parentComponent, - slotScopeId - ); -} - -const { ensureValidVNode } = Vue.ssrUtils; -function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { - push(`<!--[-->`); - ssrRenderSlotInner( - slots, - slotName, - slotProps, - fallbackRenderFn, - push, - parentComponent, - slotScopeId - ); - push(`<!--]-->`); -} -function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) { - const slotFn = slots[slotName]; - if (slotFn) { - const slotBuffer = []; - const bufferedPush = (item) => { - slotBuffer.push(item); - }; - const ret = slotFn( - slotProps, - bufferedPush, - parentComponent, - slotScopeId ? " " + slotScopeId : "" - ); - if (shared.isArray(ret)) { - const validSlotContent = ensureValidVNode(ret); - if (validSlotContent) { - renderVNodeChildren( - push, - validSlotContent, - parentComponent, - slotScopeId - ); - } else if (fallbackRenderFn) { - fallbackRenderFn(); - } - } else { - let isEmptySlot = true; - if (transition) { - isEmptySlot = false; - } else { - for (let i = 0; i < slotBuffer.length; i++) { - if (!isComment(slotBuffer[i])) { - isEmptySlot = false; - break; - } - } - } - if (isEmptySlot) { - if (fallbackRenderFn) { - fallbackRenderFn(); - } - } else { - let start = 0; - let end = slotBuffer.length; - if (transition && slotBuffer[0] === "<!--[-->" && slotBuffer[end - 1] === "<!--]-->") { - start++; - end--; - } - for (let i = start; i < end; i++) { - push(slotBuffer[i]); - } - } - } - } else if (fallbackRenderFn) { - fallbackRenderFn(); - } -} -const commentTestRE = /^<!--[\s\S]*-->$/; -const commentRE = /<!--[^]*?-->/gm; -function isComment(item) { - if (typeof item !== "string" || !commentTestRE.test(item)) return false; - if (item.length <= 8) return true; - return !item.replace(commentRE, "").trim(); -} - -function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { - parentPush("<!--teleport start-->"); - const context = parentComponent.appContext.provides[Vue.ssrContextKey]; - const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); - const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); - const bufferIndex = targetBuffer.length; - let teleportContent; - if (disabled) { - contentRenderFn(parentPush); - teleportContent = `<!--teleport start anchor--><!--teleport anchor-->`; - } else { - const { getBuffer, push } = createBuffer(); - push(`<!--teleport start anchor-->`); - contentRenderFn(push); - push(`<!--teleport anchor-->`); - teleportContent = getBuffer(); - } - targetBuffer.splice(bufferIndex, 0, teleportContent); - parentPush("<!--teleport end-->"); -} - -function ssrInterpolate(value) { - return shared.escapeHtml(shared.toDisplayString(value)); -} - -function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; -} - -function isRef(r) { - return r ? r["__v_isRef"] === true : false; -} - -const stack = []; -function pushWarningContext$1(vnode) { - stack.push(vnode); -} -function popWarningContext$1() { - stack.pop(); -} -let isWarning = false; -function warn$1(msg, ...args) { - if (isWarning) return; - isWarning = true; - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling( - appWarnHandler, - instance, - 11, - [ - // eslint-disable-next-line no-restricted-syntax - msg + args.map((a) => { - var _a, _b; - return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); - }).join(""), - instance && instance.proxy, - trace.map( - ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` - ).join("\n"), - trace - ] - ); - } else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - if (trace.length && // avoid spamming console during tests - true) { - warnArgs.push(` -`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - isWarning = false; -} -function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; - } - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; -} -function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...i === 0 ? [] : [` -`], ...formatTraceEntry(entry)); - }); - return logs; -} -function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName( - vnode.component, - vnode.type, - isRoot - )}`; - const close = `>` + postfix; - return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; -} -function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach((key) => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; -} -function formatProp(key, value, raw) { - if (shared.isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } else if (typeof value === "number" || typeof value === "boolean" || value == null) { - return raw ? value : [`${key}=${value}`]; - } else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } else if (shared.isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } -} - -const ErrorTypeStrings = { - ["sp"]: "serverPrefetch hook", - ["bc"]: "beforeCreate hook", - ["c"]: "created hook", - ["bm"]: "beforeMount hook", - ["m"]: "mounted hook", - ["bu"]: "beforeUpdate hook", - ["u"]: "updated", - ["bum"]: "beforeUnmount hook", - ["um"]: "unmounted hook", - ["a"]: "activated hook", - ["da"]: "deactivated hook", - ["ec"]: "errorCaptured hook", - ["rtc"]: "renderTracked hook", - ["rtg"]: "renderTriggered hook", - [0]: "setup function", - [1]: "render function", - [2]: "watcher getter", - [3]: "watcher callback", - [4]: "watcher cleanup function", - [5]: "native event handler", - [6]: "component event handler", - [7]: "vnode hook", - [8]: "directive hook", - [9]: "transition hook", - [10]: "app errorHandler", - [11]: "app warnHandler", - [12]: "ref function", - [13]: "async component loader", - [14]: "scheduler flush", - [15]: "component update", - [16]: "app unmount cleanup function" -}; -function callWithErrorHandling(fn, instance, type, args) { - try { - return args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance, type); - } -} -function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || shared.EMPTY_OBJ; - if (instance) { - let cur = instance.parent; - const exposedInstance = instance.proxy; - const errorInfo = ErrorTypeStrings[type] ; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - if (errorHandler) { - callWithErrorHandling(errorHandler, null, 10, [ - err, - exposedInstance, - errorInfo - ]); - return; - } - } - logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); -} -function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { - { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext$1(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext$1(); - } - if (throwInDev) { - throw err; - } else { - console.error(err); - } - } -} - -{ - const g = shared.getGlobalThis(); - const registerGlobalSetter = (key, setter) => { - let setters; - if (!(setters = g[key])) setters = g[key] = []; - setters.push(setter); - return (v) => { - if (setters.length > 1) setters.forEach((set) => set(v)); - else setters[0](v); - }; - }; - registerGlobalSetter( - `__VUE_INSTANCE_SETTERS__`, - (v) => v - ); - registerGlobalSetter( - `__VUE_SSR_SETTERS__`, - (v) => v - ); -} -const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); -function getComponentName(Component, includeInferred = true) { - return shared.isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; -} -function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; - } - } - if (!name && instance && instance.parent) { - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = inferFromRegistry( - instance.components || instance.parent.type.components - ) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; -} - -const warn = warn$1 ; - -function ssrRenderList(source, renderItem) { - if (shared.isArray(source) || shared.isString(source)) { - for (let i = 0, l = source.length; i < l; i++) { - renderItem(source[i], i); - } - } else if (typeof source === "number") { - if (!Number.isInteger(source)) { - warn(`The v-for range expect an integer value but got ${source}.`); - return; - } - for (let i = 0; i < source; i++) { - renderItem(i + 1, i); - } - } else if (shared.isObject(source)) { - if (source[Symbol.iterator]) { - const arr = Array.from(source); - for (let i = 0, l = arr.length; i < l; i++) { - renderItem(arr[i], i); - } - } else { - const keys = Object.keys(source); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - renderItem(source[key], key, i); - } - } - } -} - -async function ssrRenderSuspense(push, { default: renderContent }) { - if (renderContent) { - renderContent(); - } else { - push(`<!---->`); - } -} - -function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) { - if (typeof dir !== "function" && dir.getSSRProps) { - return dir.getSSRProps( - { - dir, - instance: Vue.ssrUtils.getComponentPublicInstance(instance.$), - value, - oldValue: void 0, - arg, - modifiers - }, - null - ) || {}; - } - return {}; -} - -const ssrLooseEqual = shared.looseEqual; -function ssrLooseContain(arr, value) { - return shared.looseIndexOf(arr, value) > -1; -} -function ssrRenderDynamicModel(type, model, value) { - switch (type) { - case "radio": - return shared.looseEqual(model, value) ? " checked" : ""; - case "checkbox": - return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? " checked" : ""; - default: - return ssrRenderAttr("value", model); - } -} -function ssrGetDynamicModelProps(existingProps = {}, model) { - const { type, value } = existingProps; - switch (type) { - case "radio": - return shared.looseEqual(model, value) ? { checked: true } : null; - case "checkbox": - return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? { checked: true } : null; - default: - return { value: model }; - } -} - -var helpers = /*#__PURE__*/Object.freeze({ - __proto__: null, - ssrGetDirectiveProps: ssrGetDirectiveProps, - ssrGetDynamicModelProps: ssrGetDynamicModelProps, - ssrIncludeBooleanAttr: shared.includeBooleanAttr, - ssrInterpolate: ssrInterpolate, - ssrLooseContain: ssrLooseContain, - ssrLooseEqual: ssrLooseEqual, - ssrRenderAttr: ssrRenderAttr, - ssrRenderAttrs: ssrRenderAttrs, - ssrRenderClass: ssrRenderClass, - ssrRenderComponent: ssrRenderComponent, - ssrRenderDynamicAttr: ssrRenderDynamicAttr, - ssrRenderDynamicModel: ssrRenderDynamicModel, - ssrRenderList: ssrRenderList, - ssrRenderSlot: ssrRenderSlot, - ssrRenderSlotInner: ssrRenderSlotInner, - ssrRenderStyle: ssrRenderStyle, - ssrRenderSuspense: ssrRenderSuspense, - ssrRenderTeleport: ssrRenderTeleport, - ssrRenderVNode: renderVNode -}); - -const compileCache = /* @__PURE__ */ Object.create(null); -function ssrCompile(template, instance) { - const Component = instance.type; - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = shared.extend( - shared.extend( - { - isCustomElement, - delimiters - }, - compilerOptions - ), - componentCompilerOptions - ); - finalCompilerOptions.isCustomElement = finalCompilerOptions.isCustomElement || shared.NO; - finalCompilerOptions.isNativeTag = finalCompilerOptions.isNativeTag || shared.NO; - const cacheKey = JSON.stringify( - { - template, - compilerOptions: finalCompilerOptions - }, - (key, value) => { - return shared.isFunction(value) ? value.toString() : value; - } - ); - const cached = compileCache[cacheKey]; - if (cached) { - return cached; - } - finalCompilerOptions.onError = (err) => { - { - const message = `[@vue/server-renderer] Template compilation error: ${err.message}`; - const codeFrame = err.loc && shared.generateCodeFrame( - template, - err.loc.start.offset, - err.loc.end.offset - ); - Vue.warn(codeFrame ? `${message} -${codeFrame}` : message); - } - }; - const { code } = compilerSsr.compile(template, finalCompilerOptions); - const requireMap = { - vue: Vue__namespace, - "vue/server-renderer": helpers - }; - const fakeRequire = (id) => requireMap[id]; - return compileCache[cacheKey] = Function("require", code)(fakeRequire); -} - -const { - createComponentInstance, - setCurrentRenderingInstance, - setupComponent, - renderComponentRoot, - normalizeVNode, - pushWarningContext, - popWarningContext -} = Vue.ssrUtils; -function createBuffer() { - let appendable = false; - const buffer = []; - return { - getBuffer() { - return buffer; - }, - push(item) { - const isStringItem = shared.isString(item); - if (appendable && isStringItem) { - buffer[buffer.length - 1] += item; - return; - } - buffer.push(item); - appendable = isStringItem; - if (shared.isPromise(item) || shared.isArray(item) && item.hasAsync) { - buffer.hasAsync = true; - } - } - }; -} -function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { - const instance = vnode.component = createComponentInstance( - vnode, - parentComponent, - null - ); - pushWarningContext(vnode); - const res = setupComponent( - instance, - true - /* isSSR */ - ); - popWarningContext(); - const hasAsyncSetup = shared.isPromise(res); - let prefetches = instance.sp; - if (hasAsyncSetup || prefetches) { - const p = Promise.resolve(res).then(() => { - if (hasAsyncSetup) prefetches = instance.sp; - if (prefetches) { - return Promise.all( - prefetches.map((prefetch) => prefetch.call(instance.proxy)) - ); - } - }).catch(shared.NOOP); - return p.then(() => renderComponentSubTree(instance, slotScopeId)); - } else { - return renderComponentSubTree(instance, slotScopeId); - } -} -function renderComponentSubTree(instance, slotScopeId) { - pushWarningContext(instance.vnode); - const comp = instance.type; - const { getBuffer, push } = createBuffer(); - if (shared.isFunction(comp)) { - let root = renderComponentRoot(instance); - if (!comp.props) { - for (const key in instance.attrs) { - if (key.startsWith(`data-v-`)) { - (root.props || (root.props = {}))[key] = ``; - } - } - } - renderVNode(push, instance.subTree = root, instance, slotScopeId); - } else { - if ((!instance.render || instance.render === shared.NOOP) && !instance.ssrRender && !comp.ssrRender && shared.isString(comp.template)) { - comp.ssrRender = ssrCompile(comp.template, instance); - } - const ssrRender = instance.ssrRender || comp.ssrRender; - if (ssrRender) { - let attrs = instance.inheritAttrs !== false ? instance.attrs : void 0; - let hasCloned = false; - let cur = instance; - while (true) { - const scopeId = cur.vnode.scopeId; - if (scopeId) { - if (!hasCloned) { - attrs = { ...attrs }; - hasCloned = true; - } - attrs[scopeId] = ""; - } - const parent = cur.parent; - if (parent && parent.subTree && parent.subTree === cur.vnode) { - cur = parent; - } else { - break; - } - } - if (slotScopeId) { - if (!hasCloned) attrs = { ...attrs }; - const slotScopeIdList = slotScopeId.trim().split(" "); - for (let i = 0; i < slotScopeIdList.length; i++) { - attrs[slotScopeIdList[i]] = ""; - } - } - const prev = setCurrentRenderingInstance(instance); - try { - ssrRender( - instance.proxy, - push, - instance, - attrs, - // compiler-optimized bindings - instance.props, - instance.setupState, - instance.data, - instance.ctx - ); - } finally { - setCurrentRenderingInstance(prev); - } - } else if (instance.render && instance.render !== shared.NOOP) { - renderVNode( - push, - instance.subTree = renderComponentRoot(instance), - instance, - slotScopeId - ); - } else { - const componentName = comp.name || comp.__file || `<Anonymous>`; - Vue.warn(`Component ${componentName} is missing template or render function.`); - push(`<!---->`); - } - } - popWarningContext(); - return getBuffer(); -} -function renderVNode(push, vnode, parentComponent, slotScopeId) { - const { type, shapeFlag, children, dirs, props } = vnode; - if (dirs) { - vnode.props = applySSRDirectives(vnode, props, dirs); - } - switch (type) { - case Vue.Text: - push(shared.escapeHtml(children)); - break; - case Vue.Comment: - push( - children ? `<!--${shared.escapeHtmlComment(children)}-->` : `<!---->` - ); - break; - case Vue.Static: - push(children); - break; - case Vue.Fragment: - if (vnode.slotScopeIds) { - slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" "); - } - push(`<!--[-->`); - renderVNodeChildren( - push, - children, - parentComponent, - slotScopeId - ); - push(`<!--]-->`); - break; - default: - if (shapeFlag & 1) { - renderElementVNode(push, vnode, parentComponent, slotScopeId); - } else if (shapeFlag & 6) { - push(renderComponentVNode(vnode, parentComponent, slotScopeId)); - } else if (shapeFlag & 64) { - renderTeleportVNode(push, vnode, parentComponent, slotScopeId); - } else if (shapeFlag & 128) { - renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); - } else { - Vue.warn( - "[@vue/server-renderer] Invalid VNode type:", - type, - `(${typeof type})` - ); - } - } -} -function renderVNodeChildren(push, children, parentComponent, slotScopeId) { - for (let i = 0; i < children.length; i++) { - renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); - } -} -function renderElementVNode(push, vnode, parentComponent, slotScopeId) { - const tag = vnode.type; - let { props, children, shapeFlag, scopeId } = vnode; - let openTag = `<${tag}`; - if (props) { - openTag += ssrRenderAttrs(props, tag); - } - if (scopeId) { - openTag += ` ${scopeId}`; - } - let curParent = parentComponent; - let curVnode = vnode; - while (curParent && curVnode === curParent.subTree) { - curVnode = curParent.vnode; - if (curVnode.scopeId) { - openTag += ` ${curVnode.scopeId}`; - } - curParent = curParent.parent; - } - if (slotScopeId) { - openTag += ` ${slotScopeId}`; - } - push(openTag + `>`); - if (!shared.isVoidTag(tag)) { - let hasChildrenOverride = false; - if (props) { - if (props.innerHTML) { - hasChildrenOverride = true; - push(props.innerHTML); - } else if (props.textContent) { - hasChildrenOverride = true; - push(shared.escapeHtml(props.textContent)); - } else if (tag === "textarea" && props.value) { - hasChildrenOverride = true; - push(shared.escapeHtml(props.value)); - } - } - if (!hasChildrenOverride) { - if (shapeFlag & 8) { - push(shared.escapeHtml(children)); - } else if (shapeFlag & 16) { - renderVNodeChildren( - push, - children, - parentComponent, - slotScopeId - ); - } - } - push(`</${tag}>`); - } -} -function applySSRDirectives(vnode, rawProps, dirs) { - const toMerge = []; - for (let i = 0; i < dirs.length; i++) { - const binding = dirs[i]; - const { - dir: { getSSRProps } - } = binding; - if (getSSRProps) { - const props = getSSRProps(binding, vnode); - if (props) toMerge.push(props); - } - } - return Vue.mergeProps(rawProps || {}, ...toMerge); -} -function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { - const target = vnode.props && vnode.props.to; - const disabled = vnode.props && vnode.props.disabled; - if (!target) { - if (!disabled) { - Vue.warn(`[@vue/server-renderer] Teleport is missing target prop.`); - } - return []; - } - if (!shared.isString(target)) { - Vue.warn( - `[@vue/server-renderer] Teleport target must be a query selector string.` - ); - return []; - } - ssrRenderTeleport( - push, - (push2) => { - renderVNodeChildren( - push2, - vnode.children, - parentComponent, - slotScopeId - ); - }, - target, - disabled || disabled === "", - parentComponent - ); -} - -const { isVNode: isVNode$1 } = Vue.ssrUtils; -function nestedUnrollBuffer(buffer, parentRet, startIndex) { - if (!buffer.hasAsync) { - return parentRet + unrollBufferSync$1(buffer); - } - let ret = parentRet; - for (let i = startIndex; i < buffer.length; i += 1) { - const item = buffer[i]; - if (shared.isString(item)) { - ret += item; - continue; - } - if (shared.isPromise(item)) { - return item.then((nestedItem) => { - buffer[i] = nestedItem; - return nestedUnrollBuffer(buffer, ret, i); - }); - } - const result = nestedUnrollBuffer(item, ret, 0); - if (shared.isPromise(result)) { - return result.then((nestedItem) => { - buffer[i] = nestedItem; - return nestedUnrollBuffer(buffer, "", i); - }); - } - ret = result; - } - return ret; -} -function unrollBuffer$1(buffer) { - return nestedUnrollBuffer(buffer, "", 0); -} -function unrollBufferSync$1(buffer) { - let ret = ""; - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isString(item)) { - ret += item; - } else { - ret += unrollBufferSync$1(item); - } - } - return ret; -} -async function renderToString(input, context = {}) { - if (isVNode$1(input)) { - return renderToString(Vue.createApp({ render: () => input }), context); - } - const vnode = Vue.createVNode(input._component, input._props); - vnode.appContext = input._context; - input.provide(Vue.ssrContextKey, context); - const buffer = await renderComponentVNode(vnode); - const result = await unrollBuffer$1(buffer); - await resolveTeleports(context); - if (context.__watcherHandles) { - for (const unwatch of context.__watcherHandles) { - unwatch(); - } - } - return result; -} -async function resolveTeleports(context) { - if (context.__teleportBuffers) { - context.teleports = context.teleports || {}; - for (const key in context.__teleportBuffers) { - context.teleports[key] = await unrollBuffer$1( - await Promise.all([context.__teleportBuffers[key]]) - ); - } - } -} - -const { isVNode } = Vue.ssrUtils; -async function unrollBuffer(buffer, stream) { - if (buffer.hasAsync) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isPromise(item)) { - item = await item; - } - if (shared.isString(item)) { - stream.push(item); - } else { - await unrollBuffer(item, stream); - } - } - } else { - unrollBufferSync(buffer, stream); - } -} -function unrollBufferSync(buffer, stream) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isString(item)) { - stream.push(item); - } else { - unrollBufferSync(item, stream); - } - } -} -function renderToSimpleStream(input, context, stream) { - if (isVNode(input)) { - return renderToSimpleStream( - Vue.createApp({ render: () => input }), - context, - stream - ); - } - const vnode = Vue.createVNode(input._component, input._props); - vnode.appContext = input._context; - input.provide(Vue.ssrContextKey, context); - Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => { - if (context.__watcherHandles) { - for (const unwatch of context.__watcherHandles) { - unwatch(); - } - } - }).then(() => stream.push(null)).catch((error) => { - stream.destroy(error); - }); - return stream; -} -function renderToStream(input, context = {}) { - console.warn( - `[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.` - ); - return renderToNodeStream(input, context); -} -function renderToNodeStream(input, context = {}) { - const stream = new (require("node:stream")).Readable({ read() { - } }) ; - if (!stream) { - throw new Error( - `ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.` - ); - } - return renderToSimpleStream(input, context, stream); -} -function pipeToNodeWritable(input, context = {}, writable) { - renderToSimpleStream(input, context, { - push(content) { - if (content != null) { - writable.write(content); - } else { - writable.end(); - } - }, - destroy(err) { - writable.destroy(err); - } - }); -} -function renderToWebStream(input, context = {}) { - if (typeof ReadableStream !== "function") { - throw new Error( - `ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.` - ); - } - const encoder = new TextEncoder(); - let cancelled = false; - return new ReadableStream({ - start(controller) { - renderToSimpleStream(input, context, { - push(content) { - if (cancelled) return; - if (content != null) { - controller.enqueue(encoder.encode(content)); - } else { - controller.close(); - } - }, - destroy(err) { - controller.error(err); - } - }); - }, - cancel() { - cancelled = true; - } - }); -} -function pipeToWebWritable(input, context = {}, writable) { - const writer = writable.getWriter(); - const encoder = new TextEncoder(); - let hasReady = false; - try { - hasReady = shared.isPromise(writer.ready); - } catch (e) { - } - renderToSimpleStream(input, context, { - async push(content) { - if (hasReady) { - await writer.ready; - } - if (content != null) { - return writer.write(encoder.encode(content)); - } else { - return writer.close(); - } - }, - destroy(err) { - console.log(err); - writer.close(); - } - }); -} - -Vue.initDirectivesForSSR(); - -exports.ssrIncludeBooleanAttr = shared.includeBooleanAttr; -exports.pipeToNodeWritable = pipeToNodeWritable; -exports.pipeToWebWritable = pipeToWebWritable; -exports.renderToNodeStream = renderToNodeStream; -exports.renderToSimpleStream = renderToSimpleStream; -exports.renderToStream = renderToStream; -exports.renderToString = renderToString; -exports.renderToWebStream = renderToWebStream; -exports.ssrGetDirectiveProps = ssrGetDirectiveProps; -exports.ssrGetDynamicModelProps = ssrGetDynamicModelProps; -exports.ssrInterpolate = ssrInterpolate; -exports.ssrLooseContain = ssrLooseContain; -exports.ssrLooseEqual = ssrLooseEqual; -exports.ssrRenderAttr = ssrRenderAttr; -exports.ssrRenderAttrs = ssrRenderAttrs; -exports.ssrRenderClass = ssrRenderClass; -exports.ssrRenderComponent = ssrRenderComponent; -exports.ssrRenderDynamicAttr = ssrRenderDynamicAttr; -exports.ssrRenderDynamicModel = ssrRenderDynamicModel; -exports.ssrRenderList = ssrRenderList; -exports.ssrRenderSlot = ssrRenderSlot; -exports.ssrRenderSlotInner = ssrRenderSlotInner; -exports.ssrRenderStyle = ssrRenderStyle; -exports.ssrRenderSuspense = ssrRenderSuspense; -exports.ssrRenderTeleport = ssrRenderTeleport; -exports.ssrRenderVNode = renderVNode; diff --git a/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js b/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js deleted file mode 100644 index b85ba7a..0000000 --- a/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +++ /dev/null @@ -1,857 +0,0 @@ -/** -* @vue/server-renderer v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var Vue = require('vue'); -var shared = require('@vue/shared'); -var compilerSsr = require('@vue/compiler-ssr'); - -function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) { - for (var k in e) { - n[k] = e[k]; - } - } - n.default = e; - return Object.freeze(n); -} - -var Vue__namespace = /*#__PURE__*/_interopNamespaceDefault(Vue); - -const shouldIgnoreProp = /* @__PURE__ */ shared.makeMap( - `,key,ref,innerHTML,textContent,ref_key,ref_for` -); -function ssrRenderAttrs(props, tag) { - let ret = ""; - for (const key in props) { - if (shouldIgnoreProp(key) || shared.isOn(key) || tag === "textarea" && key === "value") { - continue; - } - const value = props[key]; - if (key === "class") { - ret += ` class="${ssrRenderClass(value)}"`; - } else if (key === "style") { - ret += ` style="${ssrRenderStyle(value)}"`; - } else if (key === "className") { - ret += ` class="${String(value)}"`; - } else { - ret += ssrRenderDynamicAttr(key, value, tag); - } - } - return ret; -} -function ssrRenderDynamicAttr(key, value, tag) { - if (!shared.isRenderableAttrValue(value)) { - return ``; - } - const attrKey = tag && (tag.indexOf("-") > 0 || shared.isSVGTag(tag)) ? key : shared.propsToAttrMap[key] || key.toLowerCase(); - if (shared.isBooleanAttr(attrKey)) { - return shared.includeBooleanAttr(value) ? ` ${attrKey}` : ``; - } else if (shared.isSSRSafeAttrName(attrKey)) { - return value === "" ? ` ${attrKey}` : ` ${attrKey}="${shared.escapeHtml(value)}"`; - } else { - console.warn( - `[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}` - ); - return ``; - } -} -function ssrRenderAttr(key, value) { - if (!shared.isRenderableAttrValue(value)) { - return ``; - } - return ` ${key}="${shared.escapeHtml(value)}"`; -} -function ssrRenderClass(raw) { - return shared.escapeHtml(shared.normalizeClass(raw)); -} -function ssrRenderStyle(raw) { - if (!raw) { - return ""; - } - if (shared.isString(raw)) { - return shared.escapeHtml(raw); - } - const styles = shared.normalizeStyle(raw); - return shared.escapeHtml(shared.stringifyStyle(styles)); -} - -function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) { - return renderComponentVNode( - Vue.createVNode(comp, props, children), - parentComponent, - slotScopeId - ); -} - -const { ensureValidVNode } = Vue.ssrUtils; -function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { - push(`<!--[-->`); - ssrRenderSlotInner( - slots, - slotName, - slotProps, - fallbackRenderFn, - push, - parentComponent, - slotScopeId - ); - push(`<!--]-->`); -} -function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) { - const slotFn = slots[slotName]; - if (slotFn) { - const slotBuffer = []; - const bufferedPush = (item) => { - slotBuffer.push(item); - }; - const ret = slotFn( - slotProps, - bufferedPush, - parentComponent, - slotScopeId ? " " + slotScopeId : "" - ); - if (shared.isArray(ret)) { - const validSlotContent = ensureValidVNode(ret); - if (validSlotContent) { - renderVNodeChildren( - push, - validSlotContent, - parentComponent, - slotScopeId - ); - } else if (fallbackRenderFn) { - fallbackRenderFn(); - } - } else { - let isEmptySlot = true; - if (transition) { - isEmptySlot = false; - } else { - for (let i = 0; i < slotBuffer.length; i++) { - if (!isComment(slotBuffer[i])) { - isEmptySlot = false; - break; - } - } - } - if (isEmptySlot) { - if (fallbackRenderFn) { - fallbackRenderFn(); - } - } else { - let start = 0; - let end = slotBuffer.length; - if (transition && slotBuffer[0] === "<!--[-->" && slotBuffer[end - 1] === "<!--]-->") { - start++; - end--; - } - for (let i = start; i < end; i++) { - push(slotBuffer[i]); - } - } - } - } else if (fallbackRenderFn) { - fallbackRenderFn(); - } -} -const commentTestRE = /^<!--[\s\S]*-->$/; -const commentRE = /<!--[^]*?-->/gm; -function isComment(item) { - if (typeof item !== "string" || !commentTestRE.test(item)) return false; - if (item.length <= 8) return true; - return !item.replace(commentRE, "").trim(); -} - -function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { - parentPush("<!--teleport start-->"); - const context = parentComponent.appContext.provides[Vue.ssrContextKey]; - const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); - const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); - const bufferIndex = targetBuffer.length; - let teleportContent; - if (disabled) { - contentRenderFn(parentPush); - teleportContent = `<!--teleport start anchor--><!--teleport anchor-->`; - } else { - const { getBuffer, push } = createBuffer(); - push(`<!--teleport start anchor-->`); - contentRenderFn(push); - push(`<!--teleport anchor-->`); - teleportContent = getBuffer(); - } - targetBuffer.splice(bufferIndex, 0, teleportContent); - parentPush("<!--teleport end-->"); -} - -function ssrInterpolate(value) { - return shared.escapeHtml(shared.toDisplayString(value)); -} - -function ssrRenderList(source, renderItem) { - if (shared.isArray(source) || shared.isString(source)) { - for (let i = 0, l = source.length; i < l; i++) { - renderItem(source[i], i); - } - } else if (typeof source === "number") { - for (let i = 0; i < source; i++) { - renderItem(i + 1, i); - } - } else if (shared.isObject(source)) { - if (source[Symbol.iterator]) { - const arr = Array.from(source); - for (let i = 0, l = arr.length; i < l; i++) { - renderItem(arr[i], i); - } - } else { - const keys = Object.keys(source); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - renderItem(source[key], key, i); - } - } - } -} - -async function ssrRenderSuspense(push, { default: renderContent }) { - if (renderContent) { - renderContent(); - } else { - push(`<!---->`); - } -} - -function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) { - if (typeof dir !== "function" && dir.getSSRProps) { - return dir.getSSRProps( - { - dir, - instance: Vue.ssrUtils.getComponentPublicInstance(instance.$), - value, - oldValue: void 0, - arg, - modifiers - }, - null - ) || {}; - } - return {}; -} - -const ssrLooseEqual = shared.looseEqual; -function ssrLooseContain(arr, value) { - return shared.looseIndexOf(arr, value) > -1; -} -function ssrRenderDynamicModel(type, model, value) { - switch (type) { - case "radio": - return shared.looseEqual(model, value) ? " checked" : ""; - case "checkbox": - return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? " checked" : ""; - default: - return ssrRenderAttr("value", model); - } -} -function ssrGetDynamicModelProps(existingProps = {}, model) { - const { type, value } = existingProps; - switch (type) { - case "radio": - return shared.looseEqual(model, value) ? { checked: true } : null; - case "checkbox": - return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? { checked: true } : null; - default: - return { value: model }; - } -} - -var helpers = /*#__PURE__*/Object.freeze({ - __proto__: null, - ssrGetDirectiveProps: ssrGetDirectiveProps, - ssrGetDynamicModelProps: ssrGetDynamicModelProps, - ssrIncludeBooleanAttr: shared.includeBooleanAttr, - ssrInterpolate: ssrInterpolate, - ssrLooseContain: ssrLooseContain, - ssrLooseEqual: ssrLooseEqual, - ssrRenderAttr: ssrRenderAttr, - ssrRenderAttrs: ssrRenderAttrs, - ssrRenderClass: ssrRenderClass, - ssrRenderComponent: ssrRenderComponent, - ssrRenderDynamicAttr: ssrRenderDynamicAttr, - ssrRenderDynamicModel: ssrRenderDynamicModel, - ssrRenderList: ssrRenderList, - ssrRenderSlot: ssrRenderSlot, - ssrRenderSlotInner: ssrRenderSlotInner, - ssrRenderStyle: ssrRenderStyle, - ssrRenderSuspense: ssrRenderSuspense, - ssrRenderTeleport: ssrRenderTeleport, - ssrRenderVNode: renderVNode -}); - -const compileCache = /* @__PURE__ */ Object.create(null); -function ssrCompile(template, instance) { - const Component = instance.type; - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = shared.extend( - shared.extend( - { - isCustomElement, - delimiters - }, - compilerOptions - ), - componentCompilerOptions - ); - finalCompilerOptions.isCustomElement = finalCompilerOptions.isCustomElement || shared.NO; - finalCompilerOptions.isNativeTag = finalCompilerOptions.isNativeTag || shared.NO; - const cacheKey = JSON.stringify( - { - template, - compilerOptions: finalCompilerOptions - }, - (key, value) => { - return shared.isFunction(value) ? value.toString() : value; - } - ); - const cached = compileCache[cacheKey]; - if (cached) { - return cached; - } - finalCompilerOptions.onError = (err) => { - { - throw err; - } - }; - const { code } = compilerSsr.compile(template, finalCompilerOptions); - const requireMap = { - vue: Vue__namespace, - "vue/server-renderer": helpers - }; - const fakeRequire = (id) => requireMap[id]; - return compileCache[cacheKey] = Function("require", code)(fakeRequire); -} - -const { - createComponentInstance, - setCurrentRenderingInstance, - setupComponent, - renderComponentRoot, - normalizeVNode, - pushWarningContext, - popWarningContext -} = Vue.ssrUtils; -function createBuffer() { - let appendable = false; - const buffer = []; - return { - getBuffer() { - return buffer; - }, - push(item) { - const isStringItem = shared.isString(item); - if (appendable && isStringItem) { - buffer[buffer.length - 1] += item; - return; - } - buffer.push(item); - appendable = isStringItem; - if (shared.isPromise(item) || shared.isArray(item) && item.hasAsync) { - buffer.hasAsync = true; - } - } - }; -} -function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { - const instance = vnode.component = createComponentInstance( - vnode, - parentComponent, - null - ); - const res = setupComponent( - instance, - true - /* isSSR */ - ); - const hasAsyncSetup = shared.isPromise(res); - let prefetches = instance.sp; - if (hasAsyncSetup || prefetches) { - const p = Promise.resolve(res).then(() => { - if (hasAsyncSetup) prefetches = instance.sp; - if (prefetches) { - return Promise.all( - prefetches.map((prefetch) => prefetch.call(instance.proxy)) - ); - } - }).catch(shared.NOOP); - return p.then(() => renderComponentSubTree(instance, slotScopeId)); - } else { - return renderComponentSubTree(instance, slotScopeId); - } -} -function renderComponentSubTree(instance, slotScopeId) { - const comp = instance.type; - const { getBuffer, push } = createBuffer(); - if (shared.isFunction(comp)) { - let root = renderComponentRoot(instance); - if (!comp.props) { - for (const key in instance.attrs) { - if (key.startsWith(`data-v-`)) { - (root.props || (root.props = {}))[key] = ``; - } - } - } - renderVNode(push, instance.subTree = root, instance, slotScopeId); - } else { - if ((!instance.render || instance.render === shared.NOOP) && !instance.ssrRender && !comp.ssrRender && shared.isString(comp.template)) { - comp.ssrRender = ssrCompile(comp.template, instance); - } - const ssrRender = instance.ssrRender || comp.ssrRender; - if (ssrRender) { - let attrs = instance.inheritAttrs !== false ? instance.attrs : void 0; - let hasCloned = false; - let cur = instance; - while (true) { - const scopeId = cur.vnode.scopeId; - if (scopeId) { - if (!hasCloned) { - attrs = { ...attrs }; - hasCloned = true; - } - attrs[scopeId] = ""; - } - const parent = cur.parent; - if (parent && parent.subTree && parent.subTree === cur.vnode) { - cur = parent; - } else { - break; - } - } - if (slotScopeId) { - if (!hasCloned) attrs = { ...attrs }; - const slotScopeIdList = slotScopeId.trim().split(" "); - for (let i = 0; i < slotScopeIdList.length; i++) { - attrs[slotScopeIdList[i]] = ""; - } - } - const prev = setCurrentRenderingInstance(instance); - try { - ssrRender( - instance.proxy, - push, - instance, - attrs, - // compiler-optimized bindings - instance.props, - instance.setupState, - instance.data, - instance.ctx - ); - } finally { - setCurrentRenderingInstance(prev); - } - } else if (instance.render && instance.render !== shared.NOOP) { - renderVNode( - push, - instance.subTree = renderComponentRoot(instance), - instance, - slotScopeId - ); - } else { - const componentName = comp.name || comp.__file || `<Anonymous>`; - Vue.warn(`Component ${componentName} is missing template or render function.`); - push(`<!---->`); - } - } - return getBuffer(); -} -function renderVNode(push, vnode, parentComponent, slotScopeId) { - const { type, shapeFlag, children, dirs, props } = vnode; - if (dirs) { - vnode.props = applySSRDirectives(vnode, props, dirs); - } - switch (type) { - case Vue.Text: - push(shared.escapeHtml(children)); - break; - case Vue.Comment: - push( - children ? `<!--${shared.escapeHtmlComment(children)}-->` : `<!---->` - ); - break; - case Vue.Static: - push(children); - break; - case Vue.Fragment: - if (vnode.slotScopeIds) { - slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" "); - } - push(`<!--[-->`); - renderVNodeChildren( - push, - children, - parentComponent, - slotScopeId - ); - push(`<!--]-->`); - break; - default: - if (shapeFlag & 1) { - renderElementVNode(push, vnode, parentComponent, slotScopeId); - } else if (shapeFlag & 6) { - push(renderComponentVNode(vnode, parentComponent, slotScopeId)); - } else if (shapeFlag & 64) { - renderTeleportVNode(push, vnode, parentComponent, slotScopeId); - } else if (shapeFlag & 128) { - renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); - } else { - Vue.warn( - "[@vue/server-renderer] Invalid VNode type:", - type, - `(${typeof type})` - ); - } - } -} -function renderVNodeChildren(push, children, parentComponent, slotScopeId) { - for (let i = 0; i < children.length; i++) { - renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); - } -} -function renderElementVNode(push, vnode, parentComponent, slotScopeId) { - const tag = vnode.type; - let { props, children, shapeFlag, scopeId } = vnode; - let openTag = `<${tag}`; - if (props) { - openTag += ssrRenderAttrs(props, tag); - } - if (scopeId) { - openTag += ` ${scopeId}`; - } - let curParent = parentComponent; - let curVnode = vnode; - while (curParent && curVnode === curParent.subTree) { - curVnode = curParent.vnode; - if (curVnode.scopeId) { - openTag += ` ${curVnode.scopeId}`; - } - curParent = curParent.parent; - } - if (slotScopeId) { - openTag += ` ${slotScopeId}`; - } - push(openTag + `>`); - if (!shared.isVoidTag(tag)) { - let hasChildrenOverride = false; - if (props) { - if (props.innerHTML) { - hasChildrenOverride = true; - push(props.innerHTML); - } else if (props.textContent) { - hasChildrenOverride = true; - push(shared.escapeHtml(props.textContent)); - } else if (tag === "textarea" && props.value) { - hasChildrenOverride = true; - push(shared.escapeHtml(props.value)); - } - } - if (!hasChildrenOverride) { - if (shapeFlag & 8) { - push(shared.escapeHtml(children)); - } else if (shapeFlag & 16) { - renderVNodeChildren( - push, - children, - parentComponent, - slotScopeId - ); - } - } - push(`</${tag}>`); - } -} -function applySSRDirectives(vnode, rawProps, dirs) { - const toMerge = []; - for (let i = 0; i < dirs.length; i++) { - const binding = dirs[i]; - const { - dir: { getSSRProps } - } = binding; - if (getSSRProps) { - const props = getSSRProps(binding, vnode); - if (props) toMerge.push(props); - } - } - return Vue.mergeProps(rawProps || {}, ...toMerge); -} -function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { - const target = vnode.props && vnode.props.to; - const disabled = vnode.props && vnode.props.disabled; - if (!target) { - if (!disabled) { - Vue.warn(`[@vue/server-renderer] Teleport is missing target prop.`); - } - return []; - } - if (!shared.isString(target)) { - Vue.warn( - `[@vue/server-renderer] Teleport target must be a query selector string.` - ); - return []; - } - ssrRenderTeleport( - push, - (push2) => { - renderVNodeChildren( - push2, - vnode.children, - parentComponent, - slotScopeId - ); - }, - target, - disabled || disabled === "", - parentComponent - ); -} - -const { isVNode: isVNode$1 } = Vue.ssrUtils; -function nestedUnrollBuffer(buffer, parentRet, startIndex) { - if (!buffer.hasAsync) { - return parentRet + unrollBufferSync$1(buffer); - } - let ret = parentRet; - for (let i = startIndex; i < buffer.length; i += 1) { - const item = buffer[i]; - if (shared.isString(item)) { - ret += item; - continue; - } - if (shared.isPromise(item)) { - return item.then((nestedItem) => { - buffer[i] = nestedItem; - return nestedUnrollBuffer(buffer, ret, i); - }); - } - const result = nestedUnrollBuffer(item, ret, 0); - if (shared.isPromise(result)) { - return result.then((nestedItem) => { - buffer[i] = nestedItem; - return nestedUnrollBuffer(buffer, "", i); - }); - } - ret = result; - } - return ret; -} -function unrollBuffer$1(buffer) { - return nestedUnrollBuffer(buffer, "", 0); -} -function unrollBufferSync$1(buffer) { - let ret = ""; - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isString(item)) { - ret += item; - } else { - ret += unrollBufferSync$1(item); - } - } - return ret; -} -async function renderToString(input, context = {}) { - if (isVNode$1(input)) { - return renderToString(Vue.createApp({ render: () => input }), context); - } - const vnode = Vue.createVNode(input._component, input._props); - vnode.appContext = input._context; - input.provide(Vue.ssrContextKey, context); - const buffer = await renderComponentVNode(vnode); - const result = await unrollBuffer$1(buffer); - await resolveTeleports(context); - if (context.__watcherHandles) { - for (const unwatch of context.__watcherHandles) { - unwatch(); - } - } - return result; -} -async function resolveTeleports(context) { - if (context.__teleportBuffers) { - context.teleports = context.teleports || {}; - for (const key in context.__teleportBuffers) { - context.teleports[key] = await unrollBuffer$1( - await Promise.all([context.__teleportBuffers[key]]) - ); - } - } -} - -const { isVNode } = Vue.ssrUtils; -async function unrollBuffer(buffer, stream) { - if (buffer.hasAsync) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isPromise(item)) { - item = await item; - } - if (shared.isString(item)) { - stream.push(item); - } else { - await unrollBuffer(item, stream); - } - } - } else { - unrollBufferSync(buffer, stream); - } -} -function unrollBufferSync(buffer, stream) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isString(item)) { - stream.push(item); - } else { - unrollBufferSync(item, stream); - } - } -} -function renderToSimpleStream(input, context, stream) { - if (isVNode(input)) { - return renderToSimpleStream( - Vue.createApp({ render: () => input }), - context, - stream - ); - } - const vnode = Vue.createVNode(input._component, input._props); - vnode.appContext = input._context; - input.provide(Vue.ssrContextKey, context); - Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => { - if (context.__watcherHandles) { - for (const unwatch of context.__watcherHandles) { - unwatch(); - } - } - }).then(() => stream.push(null)).catch((error) => { - stream.destroy(error); - }); - return stream; -} -function renderToStream(input, context = {}) { - console.warn( - `[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.` - ); - return renderToNodeStream(input, context); -} -function renderToNodeStream(input, context = {}) { - const stream = new (require("node:stream")).Readable({ read() { - } }) ; - if (!stream) { - throw new Error( - `ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.` - ); - } - return renderToSimpleStream(input, context, stream); -} -function pipeToNodeWritable(input, context = {}, writable) { - renderToSimpleStream(input, context, { - push(content) { - if (content != null) { - writable.write(content); - } else { - writable.end(); - } - }, - destroy(err) { - writable.destroy(err); - } - }); -} -function renderToWebStream(input, context = {}) { - if (typeof ReadableStream !== "function") { - throw new Error( - `ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.` - ); - } - const encoder = new TextEncoder(); - let cancelled = false; - return new ReadableStream({ - start(controller) { - renderToSimpleStream(input, context, { - push(content) { - if (cancelled) return; - if (content != null) { - controller.enqueue(encoder.encode(content)); - } else { - controller.close(); - } - }, - destroy(err) { - controller.error(err); - } - }); - }, - cancel() { - cancelled = true; - } - }); -} -function pipeToWebWritable(input, context = {}, writable) { - const writer = writable.getWriter(); - const encoder = new TextEncoder(); - let hasReady = false; - try { - hasReady = shared.isPromise(writer.ready); - } catch (e) { - } - renderToSimpleStream(input, context, { - async push(content) { - if (hasReady) { - await writer.ready; - } - if (content != null) { - return writer.write(encoder.encode(content)); - } else { - return writer.close(); - } - }, - destroy(err) { - console.log(err); - writer.close(); - } - }); -} - -Vue.initDirectivesForSSR(); - -exports.ssrIncludeBooleanAttr = shared.includeBooleanAttr; -exports.pipeToNodeWritable = pipeToNodeWritable; -exports.pipeToWebWritable = pipeToWebWritable; -exports.renderToNodeStream = renderToNodeStream; -exports.renderToSimpleStream = renderToSimpleStream; -exports.renderToStream = renderToStream; -exports.renderToString = renderToString; -exports.renderToWebStream = renderToWebStream; -exports.ssrGetDirectiveProps = ssrGetDirectiveProps; -exports.ssrGetDynamicModelProps = ssrGetDynamicModelProps; -exports.ssrInterpolate = ssrInterpolate; -exports.ssrLooseContain = ssrLooseContain; -exports.ssrLooseEqual = ssrLooseEqual; -exports.ssrRenderAttr = ssrRenderAttr; -exports.ssrRenderAttrs = ssrRenderAttrs; -exports.ssrRenderClass = ssrRenderClass; -exports.ssrRenderComponent = ssrRenderComponent; -exports.ssrRenderDynamicAttr = ssrRenderDynamicAttr; -exports.ssrRenderDynamicModel = ssrRenderDynamicModel; -exports.ssrRenderList = ssrRenderList; -exports.ssrRenderSlot = ssrRenderSlot; -exports.ssrRenderSlotInner = ssrRenderSlotInner; -exports.ssrRenderStyle = ssrRenderStyle; -exports.ssrRenderSuspense = ssrRenderSuspense; -exports.ssrRenderTeleport = ssrRenderTeleport; -exports.ssrRenderVNode = renderVNode; diff --git a/node_modules/@vue/server-renderer/dist/server-renderer.d.ts b/node_modules/@vue/server-renderer/dist/server-renderer.d.ts deleted file mode 100644 index 40f9ccc..0000000 --- a/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { VNode, ComponentInternalInstance, App, Slots, Component, ComponentPublicInstance, Directive } from 'vue'; -import { Readable, Writable } from 'node:stream'; -export { includeBooleanAttr as ssrIncludeBooleanAttr } from '@vue/shared'; - -type SSRBuffer = SSRBufferItem[] & { - hasAsync?: boolean; -}; -type SSRBufferItem = string | SSRBuffer | Promise<SSRBuffer>; -type PushFn = (item: SSRBufferItem) => void; -type Props = Record<string, unknown>; -export type SSRContext = { - [key: string]: any; - teleports?: Record<string, string>; -}; -export declare function renderVNode(push: PushFn, vnode: VNode, parentComponent: ComponentInternalInstance, slotScopeId?: string): void; - -export declare function renderToString(input: App | VNode, context?: SSRContext): Promise<string>; - -export interface SimpleReadable { - push(chunk: string | null): void; - destroy(err: any): void; -} -export declare function renderToSimpleStream<T extends SimpleReadable>(input: App | VNode, context: SSRContext, stream: T): T; -/** - * @deprecated - */ -export declare function renderToStream(input: App | VNode, context?: SSRContext): Readable; -export declare function renderToNodeStream(input: App | VNode, context?: SSRContext): Readable; -export declare function pipeToNodeWritable(input: App | VNode, context: SSRContext | undefined, writable: Writable): void; -export declare function renderToWebStream(input: App | VNode, context?: SSRContext): ReadableStream; -export declare function pipeToWebWritable(input: App | VNode, context: SSRContext | undefined, writable: WritableStream): void; - -type SSRSlots = Record<string, SSRSlot>; -type SSRSlot = (props: Props, push: PushFn, parentComponent: ComponentInternalInstance | null, scopeId: string | null) => void; -export declare function ssrRenderSlot(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string): void; -export declare function ssrRenderSlotInner(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string, transition?: boolean): void; - -export declare function ssrRenderComponent(comp: Component, props?: Props | null, children?: Slots | SSRSlots | null, parentComponent?: ComponentInternalInstance | null, slotScopeId?: string): SSRBuffer | Promise<SSRBuffer>; - -export declare function ssrRenderTeleport(parentPush: PushFn, contentRenderFn: (push: PushFn) => void, target: string, disabled: boolean, parentComponent: ComponentInternalInstance): void; - -export declare function ssrRenderAttrs(props: Record<string, unknown>, tag?: string): string; -export declare function ssrRenderDynamicAttr(key: string, value: unknown, tag?: string): string; -export declare function ssrRenderAttr(key: string, value: unknown): string; -export declare function ssrRenderClass(raw: unknown): string; -export declare function ssrRenderStyle(raw: unknown): string; - -export declare function ssrInterpolate(value: unknown): string; - -export declare function ssrRenderList(source: unknown, renderItem: (value: unknown, key: string | number, index?: number) => void): void; - -export declare function ssrRenderSuspense(push: PushFn, { default: renderContent }: Record<string, (() => void) | undefined>): Promise<void>; - -export declare function ssrGetDirectiveProps(instance: ComponentPublicInstance, dir: Directive, value?: any, arg?: string, modifiers?: Record<string, boolean>): Record<string, any>; - -export declare const ssrLooseEqual: (a: unknown, b: unknown) => boolean; -export declare function ssrLooseContain(arr: unknown[], value: unknown): boolean; -export declare function ssrRenderDynamicModel(type: unknown, model: unknown, value: unknown): string; -export declare function ssrGetDynamicModelProps(existingProps: any, model: unknown): { - checked: true; -} | { - value: any; -} | null; - -export { renderVNode as ssrRenderVNode }; diff --git a/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js b/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js deleted file mode 100644 index fbf67fe..0000000 --- a/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js +++ /dev/null @@ -1,8566 +0,0 @@ -/** -* @vue/server-renderer v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function makeMap(str) { - const map = /* @__PURE__ */ Object.create(null); - for (const key of str.split(",")) map[key] = 1; - return (val) => val in map; -} - -const EMPTY_OBJ = Object.freeze({}) ; -const EMPTY_ARR = Object.freeze([]) ; -const NOOP = () => { -}; -const NO = () => false; -const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter -(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); -const isModelListener = (key) => key.startsWith("onUpdate:"); -const extend = Object.assign; -const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } -}; -const hasOwnProperty$1 = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); -const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === "[object Map]"; -const isSet = (val) => toTypeString(val) === "[object Set]"; -const isDate = (val) => toTypeString(val) === "[object Date]"; -const isFunction = (val) => typeof val === "function"; -const isString = (val) => typeof val === "string"; -const isSymbol = (val) => typeof val === "symbol"; -const isObject = (val) => val !== null && typeof val === "object"; -const isPromise = (val) => { - return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); -}; -const objectToString = Object.prototype.toString; -const toTypeString = (value) => objectToString.call(value); -const toRawType = (value) => { - return toTypeString(value).slice(8, -1); -}; -const isPlainObject = (val) => toTypeString(val) === "[object Object]"; -const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; -const isReservedProp = /* @__PURE__ */ makeMap( - // the leading comma is intentional so empty string "" is also included - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" -); -const isBuiltInDirective = /* @__PURE__ */ makeMap( - "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" -); -const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -const camelizeRE = /-(\w)/g; -const camelize = cacheStringFunction( - (str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); - } -); -const hyphenateRE = /\B([A-Z])/g; -const hyphenate = cacheStringFunction( - (str) => str.replace(hyphenateRE, "-$1").toLowerCase() -); -const capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); -}); -const toHandlerKey = cacheStringFunction( - (str) => { - const s = str ? `on${capitalize(str)}` : ``; - return s; - } -); -const hasChanged = (value, oldValue) => !Object.is(value, oldValue); -const invokeArrayFns = (fns, ...arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](...arg); - } -}; -const def = (obj, key, value, writable = false) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - writable, - value - }); -}; -const looseToNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; -}; -let _globalThis; -const getGlobalThis = () => { - return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); -}; - -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } else if (isString(value) || isObject(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:([^]+)/; -const styleCommentRE = /\/\*[^]*?\*\//g; -function parseStringStyle(cssText) { - const ret = {}; - cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function stringifyStyle(styles) { - if (!styles) return ""; - if (isString(styles)) return styles; - let ret = ""; - for (const key in styles) { - const value = styles[key]; - if (isString(value) || typeof value === "number") { - const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); - ret += `${normalizedKey}:${value};`; - } - } - return ret; -} -function normalizeClass(value) { - let res = ""; - if (isString(value)) { - res = value; - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + " "; - } - } - } else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + " "; - } - } - } - return res.trim(); -} - -const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; -const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; -const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; -const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; -const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); -const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); -const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); -const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); - -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); -const isBooleanAttr = /* @__PURE__ */ makeMap( - specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` -); -function includeBooleanAttr(value) { - return !!value || value === ""; -} -const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; -const attrValidationCache = {}; -function isSSRSafeAttrName(name) { - if (attrValidationCache.hasOwnProperty(name)) { - return attrValidationCache[name]; - } - const isUnsafe = unsafeAttrCharRE.test(name); - if (isUnsafe) { - console.error(`unsafe attribute name: ${name}`); - } - return attrValidationCache[name] = !isUnsafe; -} -const propsToAttrMap = { - acceptCharset: "accept-charset", - className: "class", - htmlFor: "for", - httpEquiv: "http-equiv" -}; -function isRenderableAttrValue(value) { - if (value == null) { - return false; - } - const type = typeof value; - return type === "string" || type === "number" || type === "boolean"; -} - -const escapeRE = /["'&<>]/; -function escapeHtml(string) { - const str = "" + string; - const match = escapeRE.exec(str); - if (!match) { - return str; - } - let html = ""; - let escaped; - let index; - let lastIndex = 0; - for (index = match.index; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: - escaped = """; - break; - case 38: - escaped = "&"; - break; - case 39: - escaped = "'"; - break; - case 60: - escaped = "<"; - break; - case 62: - escaped = ">"; - break; - default: - continue; - } - if (lastIndex !== index) { - html += str.slice(lastIndex, index); - } - lastIndex = index + 1; - html += escaped; - } - return lastIndex !== index ? html + str.slice(lastIndex, index) : html; -} -const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; -function escapeHtmlComment(src) { - return src.replace(commentStripRE, ""); -} - -function looseCompareArrays(a, b) { - if (a.length !== b.length) return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex((item) => looseEqual(item, val)); -} - -const isRef$1 = (val) => { - return !!(val && val["__v_isRef"] === true); -}; -const toDisplayString = (val) => { - return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); -}; -const replacer = (_key, val) => { - if (isRef$1(val)) { - return replacer(_key, val.value); - } else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce( - (entries, [key, val2], i) => { - entries[stringifySymbol(key, i) + " =>"] = val2; - return entries; - }, - {} - ) - }; - } else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) - }; - } else if (isSymbol(val)) { - return stringifySymbol(val); - } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; -const stringifySymbol = (v, i = "") => { - var _a; - return ( - // Symbol.description in es2019+ so we need to cast here to pass - // the lib: es2016 check - isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v - ); -}; - -function warn$2(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); -} - -let activeEffectScope; -class EffectScope { - constructor(detached = false) { - this.detached = detached; - /** - * @internal - */ - this._active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - this._isPaused = false; - this.parent = activeEffectScope; - if (!detached && activeEffectScope) { - this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( - this - ) - 1; - } - } - get active() { - return this._active; - } - pause() { - if (this._active) { - this._isPaused = true; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].pause(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].pause(); - } - } - } - /** - * Resumes the effect scope, including all child scopes and effects. - */ - resume() { - if (this._active) { - if (this._isPaused) { - this._isPaused = false; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].resume(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].resume(); - } - } - } - } - run(fn) { - if (this._active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } finally { - activeEffectScope = currentEffectScope; - } - } else { - warn$2(`cannot run an inactive effect scope.`); - } - } - /** - * This should only be called on non-detached scopes - * @internal - */ - on() { - activeEffectScope = this; - } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this._active) { - this._active = false; - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - this.effects.length = 0; - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - this.cleanups.length = 0; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - this.scopes.length = 0; - } - if (!this.detached && this.parent && !fromParent) { - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.parent = void 0; - } - } -} -function getCurrentScope() { - return activeEffectScope; -} - -let activeSub; -const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); -class ReactiveEffect { - constructor(fn) { - this.fn = fn; - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 1 | 4; - /** - * @internal - */ - this.next = void 0; - /** - * @internal - */ - this.cleanup = void 0; - this.scheduler = void 0; - if (activeEffectScope && activeEffectScope.active) { - activeEffectScope.effects.push(this); - } - } - pause() { - this.flags |= 64; - } - resume() { - if (this.flags & 64) { - this.flags &= ~64; - if (pausedQueueEffects.has(this)) { - pausedQueueEffects.delete(this); - this.trigger(); - } - } - } - /** - * @internal - */ - notify() { - if (this.flags & 2 && !(this.flags & 32)) { - return; - } - if (!(this.flags & 8)) { - batch(this); - } - } - run() { - if (!(this.flags & 1)) { - return this.fn(); - } - this.flags |= 2; - cleanupEffect(this); - prepareDeps(this); - const prevEffect = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = this; - shouldTrack = true; - try { - return this.fn(); - } finally { - if (activeSub !== this) { - warn$2( - "Active effect was not restored correctly - this is likely a Vue internal bug." - ); - } - cleanupDeps(this); - activeSub = prevEffect; - shouldTrack = prevShouldTrack; - this.flags &= ~2; - } - } - stop() { - if (this.flags & 1) { - for (let link = this.deps; link; link = link.nextDep) { - removeSub(link); - } - this.deps = this.depsTail = void 0; - cleanupEffect(this); - this.onStop && this.onStop(); - this.flags &= ~1; - } - } - trigger() { - if (this.flags & 64) { - pausedQueueEffects.add(this); - } else if (this.scheduler) { - this.scheduler(); - } else { - this.runIfDirty(); - } - } - /** - * @internal - */ - runIfDirty() { - if (isDirty(this)) { - this.run(); - } - } - get dirty() { - return isDirty(this); - } -} -let batchDepth = 0; -let batchedSub; -let batchedComputed; -function batch(sub, isComputed = false) { - sub.flags |= 8; - if (isComputed) { - sub.next = batchedComputed; - batchedComputed = sub; - return; - } - sub.next = batchedSub; - batchedSub = sub; -} -function startBatch() { - batchDepth++; -} -function endBatch() { - if (--batchDepth > 0) { - return; - } - if (batchedComputed) { - let e = batchedComputed; - batchedComputed = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - e = next; - } - } - let error; - while (batchedSub) { - let e = batchedSub; - batchedSub = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - if (e.flags & 1) { - try { - ; - e.trigger(); - } catch (err) { - if (!error) error = err; - } - } - e = next; - } - } - if (error) throw error; -} -function prepareDeps(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - link.version = -1; - link.prevActiveLink = link.dep.activeLink; - link.dep.activeLink = link; - } -} -function cleanupDeps(sub) { - let head; - let tail = sub.depsTail; - let link = tail; - while (link) { - const prev = link.prevDep; - if (link.version === -1) { - if (link === tail) tail = prev; - removeSub(link); - removeDep(link); - } else { - head = link; - } - link.dep.activeLink = link.prevActiveLink; - link.prevActiveLink = void 0; - link = prev; - } - sub.deps = head; - sub.depsTail = tail; -} -function isDirty(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { - return true; - } - } - if (sub._dirty) { - return true; - } - return false; -} -function refreshComputed(computed) { - if (computed.flags & 4 && !(computed.flags & 16)) { - return; - } - computed.flags &= ~16; - if (computed.globalVersion === globalVersion) { - return; - } - computed.globalVersion = globalVersion; - const dep = computed.dep; - computed.flags |= 2; - if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { - computed.flags &= ~2; - return; - } - const prevSub = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = computed; - shouldTrack = true; - try { - prepareDeps(computed); - const value = computed.fn(computed._value); - if (dep.version === 0 || hasChanged(value, computed._value)) { - computed._value = value; - dep.version++; - } - } catch (err) { - dep.version++; - throw err; - } finally { - activeSub = prevSub; - shouldTrack = prevShouldTrack; - cleanupDeps(computed); - computed.flags &= ~2; - } -} -function removeSub(link, soft = false) { - const { dep, prevSub, nextSub } = link; - if (prevSub) { - prevSub.nextSub = nextSub; - link.prevSub = void 0; - } - if (nextSub) { - nextSub.prevSub = prevSub; - link.nextSub = void 0; - } - if (dep.subsHead === link) { - dep.subsHead = nextSub; - } - if (dep.subs === link) { - dep.subs = prevSub; - if (!prevSub && dep.computed) { - dep.computed.flags &= ~4; - for (let l = dep.computed.deps; l; l = l.nextDep) { - removeSub(l, true); - } - } - } - if (!soft && !--dep.sc && dep.map) { - dep.map.delete(dep.key); - } -} -function removeDep(link) { - const { prevDep, nextDep } = link; - if (prevDep) { - prevDep.nextDep = nextDep; - link.prevDep = void 0; - } - if (nextDep) { - nextDep.prevDep = prevDep; - link.nextDep = void 0; - } -} -let shouldTrack = true; -const trackStack = []; -function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; -} -function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === void 0 ? true : last; -} -function cleanupEffect(e) { - const { cleanup } = e; - e.cleanup = void 0; - if (cleanup) { - const prevSub = activeSub; - activeSub = void 0; - try { - cleanup(); - } finally { - activeSub = prevSub; - } - } -} - -let globalVersion = 0; -class Link { - constructor(sub, dep) { - this.sub = sub; - this.dep = dep; - this.version = dep.version; - this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; - } -} -class Dep { - constructor(computed) { - this.computed = computed; - this.version = 0; - /** - * Link between this dep and the current active effect - */ - this.activeLink = void 0; - /** - * Doubly linked list representing the subscribing effects (tail) - */ - this.subs = void 0; - /** - * For object property deps cleanup - */ - this.map = void 0; - this.key = void 0; - /** - * Subscriber counter - */ - this.sc = 0; - { - this.subsHead = void 0; - } - } - track(debugInfo) { - if (!activeSub || !shouldTrack || activeSub === this.computed) { - return; - } - let link = this.activeLink; - if (link === void 0 || link.sub !== activeSub) { - link = this.activeLink = new Link(activeSub, this); - if (!activeSub.deps) { - activeSub.deps = activeSub.depsTail = link; - } else { - link.prevDep = activeSub.depsTail; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - } - addSub(link); - } else if (link.version === -1) { - link.version = this.version; - if (link.nextDep) { - const next = link.nextDep; - next.prevDep = link.prevDep; - if (link.prevDep) { - link.prevDep.nextDep = next; - } - link.prevDep = activeSub.depsTail; - link.nextDep = void 0; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - if (activeSub.deps === link) { - activeSub.deps = next; - } - } - } - if (activeSub.onTrack) { - activeSub.onTrack( - extend( - { - effect: activeSub - }, - debugInfo - ) - ); - } - return link; - } - trigger(debugInfo) { - this.version++; - globalVersion++; - this.notify(debugInfo); - } - notify(debugInfo) { - startBatch(); - try { - if (true) { - for (let head = this.subsHead; head; head = head.nextSub) { - if (head.sub.onTrigger && !(head.sub.flags & 8)) { - head.sub.onTrigger( - extend( - { - effect: head.sub - }, - debugInfo - ) - ); - } - } - } - for (let link = this.subs; link; link = link.prevSub) { - if (link.sub.notify()) { - ; - link.sub.dep.notify(); - } - } - } finally { - endBatch(); - } - } -} -function addSub(link) { - link.dep.sc++; - if (link.sub.flags & 4) { - const computed = link.dep.computed; - if (computed && !link.dep.subs) { - computed.flags |= 4 | 16; - for (let l = computed.deps; l; l = l.nextDep) { - addSub(l); - } - } - const currentTail = link.dep.subs; - if (currentTail !== link) { - link.prevSub = currentTail; - if (currentTail) currentTail.nextSub = link; - } - if (link.dep.subsHead === void 0) { - link.dep.subsHead = link; - } - link.dep.subs = link; - } -} -const targetMap = /* @__PURE__ */ new WeakMap(); -const ITERATE_KEY = Symbol( - "Object iterate" -); -const MAP_KEY_ITERATE_KEY = Symbol( - "Map keys iterate" -); -const ARRAY_ITERATE_KEY = Symbol( - "Array iterate" -); -function track(target, type, key) { - if (shouldTrack && activeSub) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = new Dep()); - dep.map = depsMap; - dep.key = key; - } - { - dep.track({ - target, - type, - key - }); - } - } -} -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - globalVersion++; - return; - } - const run = (dep) => { - if (dep) { - { - dep.trigger({ - target, - type, - key, - newValue, - oldValue, - oldTarget - }); - } - } - }; - startBatch(); - if (type === "clear") { - depsMap.forEach(run); - } else { - const targetIsArray = isArray(target); - const isArrayIndex = targetIsArray && isIntegerKey(key); - if (targetIsArray && key === "length") { - const newLength = Number(newValue); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { - run(dep); - } - }); - } else { - if (key !== void 0 || depsMap.has(void 0)) { - run(depsMap.get(key)); - } - if (isArrayIndex) { - run(depsMap.get(ARRAY_ITERATE_KEY)); - } - switch (type) { - case "add": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isArrayIndex) { - run(depsMap.get("length")); - } - break; - case "delete": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (isMap(target)) { - run(depsMap.get(ITERATE_KEY)); - } - break; - } - } - } - endBatch(); -} - -function reactiveReadArray(array) { - const raw = toRaw(array); - if (raw === array) return raw; - track(raw, "iterate", ARRAY_ITERATE_KEY); - return isShallow(array) ? raw : raw.map(toReactive); -} -function shallowReadArray(arr) { - track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); - return arr; -} -const arrayInstrumentations = { - __proto__: null, - [Symbol.iterator]() { - return iterator(this, Symbol.iterator, toReactive); - }, - concat(...args) { - return reactiveReadArray(this).concat( - ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) - ); - }, - entries() { - return iterator(this, "entries", (value) => { - value[1] = toReactive(value[1]); - return value; - }); - }, - every(fn, thisArg) { - return apply(this, "every", fn, thisArg, void 0, arguments); - }, - filter(fn, thisArg) { - return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); - }, - find(fn, thisArg) { - return apply(this, "find", fn, thisArg, toReactive, arguments); - }, - findIndex(fn, thisArg) { - return apply(this, "findIndex", fn, thisArg, void 0, arguments); - }, - findLast(fn, thisArg) { - return apply(this, "findLast", fn, thisArg, toReactive, arguments); - }, - findLastIndex(fn, thisArg) { - return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); - }, - // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement - forEach(fn, thisArg) { - return apply(this, "forEach", fn, thisArg, void 0, arguments); - }, - includes(...args) { - return searchProxy(this, "includes", args); - }, - indexOf(...args) { - return searchProxy(this, "indexOf", args); - }, - join(separator) { - return reactiveReadArray(this).join(separator); - }, - // keys() iterator only reads `length`, no optimisation required - lastIndexOf(...args) { - return searchProxy(this, "lastIndexOf", args); - }, - map(fn, thisArg) { - return apply(this, "map", fn, thisArg, void 0, arguments); - }, - pop() { - return noTracking(this, "pop"); - }, - push(...args) { - return noTracking(this, "push", args); - }, - reduce(fn, ...args) { - return reduce(this, "reduce", fn, args); - }, - reduceRight(fn, ...args) { - return reduce(this, "reduceRight", fn, args); - }, - shift() { - return noTracking(this, "shift"); - }, - // slice could use ARRAY_ITERATE but also seems to beg for range tracking - some(fn, thisArg) { - return apply(this, "some", fn, thisArg, void 0, arguments); - }, - splice(...args) { - return noTracking(this, "splice", args); - }, - toReversed() { - return reactiveReadArray(this).toReversed(); - }, - toSorted(comparer) { - return reactiveReadArray(this).toSorted(comparer); - }, - toSpliced(...args) { - return reactiveReadArray(this).toSpliced(...args); - }, - unshift(...args) { - return noTracking(this, "unshift", args); - }, - values() { - return iterator(this, "values", toReactive); - } -}; -function iterator(self, method, wrapValue) { - const arr = shallowReadArray(self); - const iter = arr[method](); - if (arr !== self && !isShallow(self)) { - iter._next = iter.next; - iter.next = () => { - const result = iter._next(); - if (result.value) { - result.value = wrapValue(result.value); - } - return result; - }; - } - return iter; -} -const arrayProto = Array.prototype; -function apply(self, method, fn, thisArg, wrappedRetFn, args) { - const arr = shallowReadArray(self); - const needsWrap = arr !== self && !isShallow(self); - const methodFn = arr[method]; - if (methodFn !== arrayProto[method]) { - const result2 = methodFn.apply(self, args); - return needsWrap ? toReactive(result2) : result2; - } - let wrappedFn = fn; - if (arr !== self) { - if (needsWrap) { - wrappedFn = function(item, index) { - return fn.call(this, toReactive(item), index, self); - }; - } else if (fn.length > 2) { - wrappedFn = function(item, index) { - return fn.call(this, item, index, self); - }; - } - } - const result = methodFn.call(arr, wrappedFn, thisArg); - return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; -} -function reduce(self, method, fn, args) { - const arr = shallowReadArray(self); - let wrappedFn = fn; - if (arr !== self) { - if (!isShallow(self)) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, toReactive(item), index, self); - }; - } else if (fn.length > 3) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, item, index, self); - }; - } - } - return arr[method](wrappedFn, ...args); -} -function searchProxy(self, method, args) { - const arr = toRaw(self); - track(arr, "iterate", ARRAY_ITERATE_KEY); - const res = arr[method](...args); - if ((res === -1 || res === false) && isProxy(args[0])) { - args[0] = toRaw(args[0]); - return arr[method](...args); - } - return res; -} -function noTracking(self, method, args = []) { - pauseTracking(); - startBatch(); - const res = toRaw(self)[method].apply(self, args); - endBatch(); - resetTracking(); - return res; -} - -const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); -const builtInSymbols = new Set( - /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) -); -function hasOwnProperty(key) { - if (!isSymbol(key)) key = String(key); - const obj = toRaw(this); - track(obj, "has", key); - return obj.hasOwnProperty(key); -} -class BaseReactiveHandler { - constructor(_isReadonly = false, _isShallow = false) { - this._isReadonly = _isReadonly; - this._isShallow = _isShallow; - } - get(target, key, receiver) { - if (key === "__v_skip") return target["__v_skip"]; - const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_isShallow") { - return isShallow2; - } else if (key === "__v_raw") { - if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype - // this means the receiver is a user proxy of the reactive proxy - Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { - return target; - } - return; - } - const targetIsArray = isArray(target); - if (!isReadonly2) { - let fn; - if (targetIsArray && (fn = arrayInstrumentations[key])) { - return fn; - } - if (key === "hasOwnProperty") { - return hasOwnProperty; - } - } - const res = Reflect.get( - target, - key, - // if this is a proxy wrapping a ref, return methods using the raw ref - // as receiver so that we don't have to call `toRaw` on the ref in all - // its class methods - isRef(target) ? target : receiver - ); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly2) { - track(target, "get", key); - } - if (isShallow2) { - return res; - } - if (isRef(res)) { - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - return isReadonly2 ? readonly(res) : reactive(res); - } - return res; - } -} -class MutableReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(false, isShallow2); - } - set(target, key, value, receiver) { - let oldValue = target[key]; - if (!this._isShallow) { - const isOldValueReadonly = isReadonly(oldValue); - if (!isShallow(value) && !isReadonly(value)) { - oldValue = toRaw(oldValue); - value = toRaw(value); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - if (isOldValueReadonly) { - return false; - } else { - oldValue.value = value; - return true; - } - } - } - const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); - const result = Reflect.set( - target, - key, - value, - isRef(target) ? target : receiver - ); - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - } - return result; - } - deleteProperty(target, key) { - const hadKey = hasOwn(target, key); - const oldValue = target[key]; - const result = Reflect.deleteProperty(target, key); - if (result && hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - } - has(target, key) { - const result = Reflect.has(target, key); - if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has", key); - } - return result; - } - ownKeys(target) { - track( - target, - "iterate", - isArray(target) ? "length" : ITERATE_KEY - ); - return Reflect.ownKeys(target); - } -} -class ReadonlyReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(true, isShallow2); - } - set(target, key) { - { - warn$2( - `Set operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } - deleteProperty(target, key) { - { - warn$2( - `Delete operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } -} -const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); -const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); -const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); -const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); - -const toShallow = (value) => value; -const getProto = (v) => Reflect.getPrototypeOf(v); -function createIterableMethod(method, isReadonly2, isShallow2) { - return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; - const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; - !isReadonly2 && track( - rawTarget, - "iterate", - isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY - ); - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done ? { value, done } : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } - }; - }; -} -function createReadonlyMethod(type) { - return function(...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - warn$2( - `${capitalize(type)} operation ${key}failed: target is readonly.`, - toRaw(this) - ); - } - return type === "delete" ? false : type === "clear" ? void 0 : this; - }; -} -function createInstrumentations(readonly, shallow) { - const instrumentations = { - get(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "get", key); - } - track(rawTarget, "get", rawKey); - } - const { has } = getProto(rawTarget); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } else if (target !== rawTarget) { - target.get(key); - } - }, - get size() { - const target = this["__v_raw"]; - !readonly && track(toRaw(target), "iterate", ITERATE_KEY); - return Reflect.get(target, "size", target); - }, - has(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "has", key); - } - track(rawTarget, "has", rawKey); - } - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); - }, - forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; - !readonly && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value, key) => { - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - } - }; - extend( - instrumentations, - readonly ? { - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear") - } : { - add(value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add", value, value); - } - return this; - }, - set(key, value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - return this; - }, - delete(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : void 0; - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - }, - clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; - const result = target.clear(); - if (hadItems) { - trigger( - target, - "clear", - void 0, - void 0, - oldTarget - ); - } - return result; - } - } - ); - const iteratorMethods = [ - "keys", - "values", - "entries", - Symbol.iterator - ]; - iteratorMethods.forEach((method) => { - instrumentations[method] = createIterableMethod(method, readonly, shallow); - }); - return instrumentations; -} -function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = createInstrumentations(isReadonly2, shallow); - return (target, key, receiver) => { - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_raw") { - return target; - } - return Reflect.get( - hasOwn(instrumentations, key) && key in target ? instrumentations : target, - key, - receiver - ); - }; -} -const mutableCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, false) -}; -const shallowCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, true) -}; -const readonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, false) -}; -const shallowReadonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, true) -}; -function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - warn$2( - `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` - ); - } -} - -const reactiveMap = /* @__PURE__ */ new WeakMap(); -const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); -const readonlyMap = /* @__PURE__ */ new WeakMap(); -const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); -function targetTypeMap(rawType) { - switch (rawType) { - case "Object": - case "Array": - return 1 /* COMMON */; - case "Map": - case "Set": - case "WeakMap": - case "WeakSet": - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } -} -function getTargetType(value) { - return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); -} -function reactive(target) { - if (isReadonly(target)) { - return target; - } - return createReactiveObject( - target, - false, - mutableHandlers, - mutableCollectionHandlers, - reactiveMap - ); -} -function shallowReactive(target) { - return createReactiveObject( - target, - false, - shallowReactiveHandlers, - shallowCollectionHandlers, - shallowReactiveMap - ); -} -function readonly(target) { - return createReactiveObject( - target, - true, - readonlyHandlers, - readonlyCollectionHandlers, - readonlyMap - ); -} -function shallowReadonly(target) { - return createReactiveObject( - target, - true, - shallowReadonlyHandlers, - shallowReadonlyCollectionHandlers, - shallowReadonlyMap - ); -} -function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - { - warn$2( - `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( - target - )}` - ); - } - return target; - } - if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { - return target; - } - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy( - target, - targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers - ); - proxyMap.set(target, proxy); - return proxy; -} -function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw"]); - } - return !!(value && value["__v_isReactive"]); -} -function isReadonly(value) { - return !!(value && value["__v_isReadonly"]); -} -function isShallow(value) { - return !!(value && value["__v_isShallow"]); -} -function isProxy(value) { - return value ? !!value["__v_raw"] : false; -} -function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; -} -function markRaw(value) { - if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { - def(value, "__v_skip", true); - } - return value; -} -const toReactive = (value) => isObject(value) ? reactive(value) : value; -const toReadonly = (value) => isObject(value) ? readonly(value) : value; - -function isRef(r) { - return r ? r["__v_isRef"] === true : false; -} -function unref(ref2) { - return isRef(ref2) ? ref2.value : ref2; -} -const shallowUnwrapHandlers = { - get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} - -class ComputedRefImpl { - constructor(fn, setter, isSSR) { - this.fn = fn; - this.setter = setter; - /** - * @internal - */ - this._value = void 0; - /** - * @internal - */ - this.dep = new Dep(this); - /** - * @internal - */ - this.__v_isRef = true; - // TODO isolatedDeclarations "__v_isReadonly" - // A computed is also a subscriber that tracks other deps - /** - * @internal - */ - this.deps = void 0; - /** - * @internal - */ - this.depsTail = void 0; - /** - * @internal - */ - this.flags = 16; - /** - * @internal - */ - this.globalVersion = globalVersion - 1; - /** - * @internal - */ - this.next = void 0; - // for backwards compat - this.effect = this; - this["__v_isReadonly"] = !setter; - this.isSSR = isSSR; - } - /** - * @internal - */ - notify() { - this.flags |= 16; - if (!(this.flags & 8) && // avoid infinite self recursion - activeSub !== this) { - batch(this, true); - return true; - } - } - get value() { - const link = this.dep.track({ - target: this, - type: "get", - key: "value" - }) ; - refreshComputed(this); - if (link) { - link.version = this.dep.version; - } - return this._value; - } - set value(newValue) { - if (this.setter) { - this.setter(newValue); - } else { - warn$2("Write operation failed: computed value is readonly"); - } - } -} -function computed$1(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - if (isFunction(getterOrOptions)) { - getter = getterOrOptions; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, isSSR); - return cRef; -} - -const INITIAL_WATCHER_VALUE = {}; -const cleanupMap = /* @__PURE__ */ new WeakMap(); -let activeWatcher = void 0; -function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { - if (owner) { - let cleanups = cleanupMap.get(owner); - if (!cleanups) cleanupMap.set(owner, cleanups = []); - cleanups.push(cleanupFn); - } else if (!failSilently) { - warn$2( - `onWatcherCleanup() was called when there was no active watcher to associate with.` - ); - } -} -function watch$1(source, cb, options = EMPTY_OBJ) { - const { immediate, deep, once, scheduler, augmentJob, call } = options; - const warnInvalidSource = (s) => { - (options.onWarn || warn$2)( - `Invalid watch source: `, - s, - `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` - ); - }; - const reactiveGetter = (source2) => { - if (deep) return source2; - if (isShallow(source2) || deep === false || deep === 0) - return traverse(source2, 1); - return traverse(source2); - }; - let effect; - let getter; - let cleanup; - let boundCleanup; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); - } else if (isReactive(source)) { - getter = () => reactiveGetter(source); - forceTrigger = true; - } else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); - getter = () => source.map((s) => { - if (isRef(s)) { - return s.value; - } else if (isReactive(s)) { - return reactiveGetter(s); - } else if (isFunction(s)) { - return call ? call(s, 2) : s(); - } else { - warnInvalidSource(s); - } - }); - } else if (isFunction(source)) { - if (cb) { - getter = call ? () => call(source, 2) : source; - } else { - getter = () => { - if (cleanup) { - pauseTracking(); - try { - cleanup(); - } finally { - resetTracking(); - } - } - const currentEffect = activeWatcher; - activeWatcher = effect; - try { - return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); - } finally { - activeWatcher = currentEffect; - } - }; - } - } else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - const depth = deep === true ? Infinity : deep; - getter = () => traverse(baseGetter(), depth); - } - const scope = getCurrentScope(); - const watchHandle = () => { - effect.stop(); - if (scope && scope.active) { - remove(scope.effects, effect); - } - }; - if (once && cb) { - const _cb = cb; - cb = (...args) => { - _cb(...args); - watchHandle(); - }; - } - let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; - const job = (immediateFirstRun) => { - if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { - return; - } - if (cb) { - const newValue = effect.run(); - if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { - if (cleanup) { - cleanup(); - } - const currentWatcher = activeWatcher; - activeWatcher = effect; - try { - const args = [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, - boundCleanup - ]; - call ? call(cb, 3, args) : ( - // @ts-expect-error - cb(...args) - ); - oldValue = newValue; - } finally { - activeWatcher = currentWatcher; - } - } - } else { - effect.run(); - } - }; - if (augmentJob) { - augmentJob(job); - } - effect = new ReactiveEffect(getter); - effect.scheduler = scheduler ? () => scheduler(job, false) : job; - boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); - cleanup = effect.onStop = () => { - const cleanups = cleanupMap.get(effect); - if (cleanups) { - if (call) { - call(cleanups, 4); - } else { - for (const cleanup2 of cleanups) cleanup2(); - } - cleanupMap.delete(effect); - } - }; - { - effect.onTrack = options.onTrack; - effect.onTrigger = options.onTrigger; - } - if (cb) { - if (immediate) { - job(true); - } else { - oldValue = effect.run(); - } - } else if (scheduler) { - scheduler(job.bind(null, true), true); - } else { - effect.run(); - } - watchHandle.pause = effect.pause.bind(effect); - watchHandle.resume = effect.resume.bind(effect); - watchHandle.stop = watchHandle; - return watchHandle; -} -function traverse(value, depth = Infinity, seen) { - if (depth <= 0 || !isObject(value) || value["__v_skip"]) { - return value; - } - seen = seen || /* @__PURE__ */ new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - depth--; - if (isRef(value)) { - traverse(value.value, depth, seen); - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], depth, seen); - } - } else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, depth, seen); - }); - } else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], depth, seen); - } - for (const key of Object.getOwnPropertySymbols(value)) { - if (Object.prototype.propertyIsEnumerable.call(value, key)) { - traverse(value[key], depth, seen); - } - } - } - return value; -} - -const stack = []; -function pushWarningContext$1(vnode) { - stack.push(vnode); -} -function popWarningContext$1() { - stack.pop(); -} -let isWarning = false; -function warn$1(msg, ...args) { - if (isWarning) return; - isWarning = true; - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling( - appWarnHandler, - instance, - 11, - [ - // eslint-disable-next-line no-restricted-syntax - msg + args.map((a) => { - var _a, _b; - return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); - }).join(""), - instance && instance.proxy, - trace.map( - ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` - ).join("\n"), - trace - ] - ); - } else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - if (trace.length && // avoid spamming console during tests - true) { - warnArgs.push(` -`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); - isWarning = false; -} -function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; - } - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; -} -function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...i === 0 ? [] : [` -`], ...formatTraceEntry(entry)); - }); - return logs; -} -function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName( - vnode.component, - vnode.type, - isRoot - )}`; - const close = `>` + postfix; - return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; -} -function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach((key) => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; -} -function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } else if (typeof value === "number" || typeof value === "boolean" || value == null) { - return raw ? value : [`${key}=${value}`]; - } else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } -} - -const ErrorTypeStrings = { - ["sp"]: "serverPrefetch hook", - ["bc"]: "beforeCreate hook", - ["c"]: "created hook", - ["bm"]: "beforeMount hook", - ["m"]: "mounted hook", - ["bu"]: "beforeUpdate hook", - ["u"]: "updated", - ["bum"]: "beforeUnmount hook", - ["um"]: "unmounted hook", - ["a"]: "activated hook", - ["da"]: "deactivated hook", - ["ec"]: "errorCaptured hook", - ["rtc"]: "renderTracked hook", - ["rtg"]: "renderTriggered hook", - [0]: "setup function", - [1]: "render function", - [2]: "watcher getter", - [3]: "watcher callback", - [4]: "watcher cleanup function", - [5]: "native event handler", - [6]: "component event handler", - [7]: "vnode hook", - [8]: "directive hook", - [9]: "transition hook", - [10]: "app errorHandler", - [11]: "app warnHandler", - [12]: "ref function", - [13]: "async component loader", - [14]: "scheduler flush", - [15]: "component update", - [16]: "app unmount cleanup function" -}; -function callWithErrorHandling(fn, instance, type, args) { - try { - return args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance, type); - } -} -function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch((err) => { - handleError(err, instance, type); - }); - } - return res; - } - if (isArray(fn)) { - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; - } else { - warn$1( - `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` - ); - } -} -function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; - if (instance) { - let cur = instance.parent; - const exposedInstance = instance.proxy; - const errorInfo = ErrorTypeStrings[type] ; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - if (errorHandler) { - pauseTracking(); - callWithErrorHandling(errorHandler, null, 10, [ - err, - exposedInstance, - errorInfo - ]); - resetTracking(); - return; - } - } - logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); -} -function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { - { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext$1(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext$1(); - } - if (throwInDev) { - throw err; - } else { - console.error(err); - } - } -} - -const queue = []; -let flushIndex = -1; -const pendingPostFlushCbs = []; -let activePostFlushCbs = null; -let postFlushIndex = 0; -const resolvedPromise = /* @__PURE__ */ Promise.resolve(); -let currentFlushPromise = null; -const RECURSION_LIMIT = 100; -function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; -} -function findInsertionIndex(id) { - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = start + end >>> 1; - const middleJob = queue[middle]; - const middleJobId = getId(middleJob); - if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { - start = middle + 1; - } else { - end = middle; - } - } - return start; -} -function queueJob(job) { - if (!(job.flags & 1)) { - const jobId = getId(job); - const lastJob = queue[queue.length - 1]; - if (!lastJob || // fast path when the job id is larger than the tail - !(job.flags & 2) && jobId >= getId(lastJob)) { - queue.push(job); - } else { - queue.splice(findInsertionIndex(jobId), 0, job); - } - job.flags |= 1; - queueFlush(); - } -} -function queueFlush() { - if (!currentFlushPromise) { - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function queuePostFlushCb(cb) { - if (!isArray(cb)) { - if (activePostFlushCbs && cb.id === -1) { - activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); - } else if (!(cb.flags & 1)) { - pendingPostFlushCbs.push(cb); - cb.flags |= 1; - } - } else { - pendingPostFlushCbs.push(...cb); - } - queueFlush(); -} -function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { - { - seen = seen || /* @__PURE__ */ new Map(); - } - for (; i < queue.length; i++) { - const cb = queue[i]; - if (cb && cb.flags & 2) { - if (instance && cb.id !== instance.uid) { - continue; - } - if (checkRecursiveUpdates(seen, cb)) { - continue; - } - queue.splice(i, 1); - i--; - if (cb.flags & 4) { - cb.flags &= ~1; - } - cb(); - if (!(cb.flags & 4)) { - cb.flags &= ~1; - } - } - } -} -function flushPostFlushCbs(seen) { - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)].sort( - (a, b) => getId(a) - getId(b) - ); - pendingPostFlushCbs.length = 0; - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - { - seen = seen || /* @__PURE__ */ new Map(); - } - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - const cb = activePostFlushCbs[postFlushIndex]; - if (checkRecursiveUpdates(seen, cb)) { - continue; - } - if (cb.flags & 4) { - cb.flags &= ~1; - } - if (!(cb.flags & 8)) cb(); - cb.flags &= ~1; - } - activePostFlushCbs = null; - postFlushIndex = 0; - } -} -const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; -function flushJobs(seen) { - { - seen = seen || /* @__PURE__ */ new Map(); - } - const check = (job) => checkRecursiveUpdates(seen, job) ; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && !(job.flags & 8)) { - if (check(job)) { - continue; - } - if (job.flags & 4) { - job.flags &= ~1; - } - callWithErrorHandling( - job, - job.i, - job.i ? 15 : 14 - ); - if (!(job.flags & 4)) { - job.flags &= ~1; - } - } - } - } finally { - for (; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job) { - job.flags &= ~1; - } - } - flushIndex = -1; - queue.length = 0; - flushPostFlushCbs(seen); - currentFlushPromise = null; - if (queue.length || pendingPostFlushCbs.length) { - flushJobs(seen); - } - } -} -function checkRecursiveUpdates(seen, fn) { - const count = seen.get(fn) || 0; - if (count > RECURSION_LIMIT) { - const instance = fn.i; - const componentName = instance && getComponentName(instance.type); - handleError( - `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, - null, - 10 - ); - return true; - } - seen.set(fn, count + 1); - return false; -} - -let isHmrUpdating = false; -const hmrDirtyComponents = /* @__PURE__ */ new Map(); -{ - getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; -} -const map = /* @__PURE__ */ new Map(); -function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); -} -function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); -} -function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: /* @__PURE__ */ new Set() - }); - return true; -} -function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; -} -function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; - } - record.initialDef.render = newRender; - [...record.instances].forEach((instance) => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); -} -function reload(id, newComp) { - const record = map.get(id); - if (!record) return; - newComp = normalizeClassComponent(newComp); - updateComponentDef(record.initialDef, newComp); - const instances = [...record.instances]; - for (let i = 0; i < instances.length; i++) { - const instance = instances[i]; - const oldComp = normalizeClassComponent(instance.type); - let dirtyInstances = hmrDirtyComponents.get(oldComp); - if (!dirtyInstances) { - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); - } - dirtyInstances.add(instance); - instance.appContext.propsCache.delete(instance.type); - instance.appContext.emitsCache.delete(instance.type); - instance.appContext.optionsCache.delete(instance.type); - if (instance.ceReload) { - dirtyInstances.add(instance); - instance.ceReload(newComp.styles); - dirtyInstances.delete(instance); - } else if (instance.parent) { - queueJob(() => { - isHmrUpdating = true; - instance.parent.update(); - isHmrUpdating = false; - dirtyInstances.delete(instance); - }); - } else if (instance.appContext.reload) { - instance.appContext.reload(); - } else if (typeof window !== "undefined") { - window.location.reload(); - } else { - console.warn( - "[HMR] Root or manually mounted instance modified. Full reload required." - ); - } - if (instance.root.ce && instance !== instance.root) { - instance.root.ce._removeChildStyle(oldComp); - } - } - queuePostFlushCb(() => { - hmrDirtyComponents.clear(); - }); -} -function updateComponentDef(oldComp, newComp) { - extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== "__file" && !(key in newComp)) { - delete oldComp[key]; - } - } -} -function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } catch (e) { - console.error(e); - console.warn( - `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` - ); - } - }; -} - -let devtools; -let buffer = []; -let devtoolsNotInstalled = false; -function emit$1(event, ...args) { - if (devtools) { - devtools.emit(event, ...args); - } else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } -} -function setDevtoolsHook(hook, target) { - var _a, _b; - devtools = hook; - if (devtools) { - devtools.enabled = true; - buffer.forEach(({ event, args }) => devtools.emit(event, ...args)); - buffer = []; - } else if ( - // handle late devtools injection - only do this if we are in an actual - // browser environment to avoid the timer handle stalling test runner exit - // (#4815) - typeof window !== "undefined" && // some envs mock window but not fully - window.HTMLElement && // also exclude jsdom - // eslint-disable-next-line no-restricted-syntax - !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) - ) { - const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; - replay.push((newHook) => { - setDevtoolsHook(newHook, target); - }); - setTimeout(() => { - if (!devtools) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3e3); - } else { - devtoolsNotInstalled = true; - buffer = []; - } -} -function devtoolsInitApp(app, version) { - emit$1("app:init" /* APP_INIT */, app, version, { - Fragment, - Text, - Comment, - Static - }); -} -function devtoolsUnmountApp(app) { - emit$1("app:unmount" /* APP_UNMOUNT */, app); -} -const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); -const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); -const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( - "component:removed" /* COMPONENT_REMOVED */ -); -const devtoolsComponentRemoved = (component) => { - if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered - !devtools.cleanupBuffer(component)) { - _devtoolsComponentRemoved(component); - } -}; -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function createDevtoolsComponentHook(hook) { - return (component) => { - emit$1( - hook, - component.appContext.app, - component.uid, - component.parent ? component.parent.uid : void 0, - component - ); - }; -} -const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); -const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); -function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit$1(hook, component.appContext.app, component.uid, component, type, time); - }; -} -function devtoolsComponentEmit(component, event, params) { - emit$1( - "component:emit" /* COMPONENT_EMIT */, - component.appContext.app, - component, - event, - params - ); -} - -let currentRenderingInstance = null; -let currentScopeId = null; -function setCurrentRenderingInstance$1(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = instance && instance.type.__scopeId || null; - return prev; -} -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { - if (!ctx) return fn; - if (fn._n) { - return fn; - } - const renderFnWithContext = (...args) => { - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance$1(ctx); - let res; - try { - res = fn(...args); - } finally { - setCurrentRenderingInstance$1(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - } - { - devtoolsComponentUpdated(ctx); - } - return res; - }; - renderFnWithContext._n = true; - renderFnWithContext._c = true; - renderFnWithContext._d = true; - return renderFnWithContext; -} - -function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn$1("Do not use built-in directive ids as custom directive id: " + name); - } -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } -} - -const TeleportEndKey = Symbol("_vte"); -const isTeleport = (type) => type.__isTeleport; - -function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 && vnode.component) { - vnode.transition = hooks; - setTransitionHooks(vnode.component.subTree, hooks); - } else if (vnode.shapeFlag & 128) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } else { - vnode.transition = hooks; - } -} - -function markAsyncBoundary(instance) { - instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; -} - -const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); - -function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray(rawRef)) { - rawRef.forEach( - (r, i) => setRef( - r, - oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), - parentSuspense, - vnode, - isUnmount - ) - ); - return; - } - if (isAsyncWrapper(vnode) && !isUnmount) { - if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { - setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); - } - return; - } - const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if (!owner) { - warn$1( - `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` - ); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; - const setupState = owner.setupState; - const rawSetupState = toRaw(setupState); - const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { - { - if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) { - warn$1( - `Template ref "${key}" used on a non-ref value. It will not work in the production build.` - ); - } - if (knownTemplateRefs.has(rawSetupState[key])) { - return false; - } - } - return hasOwn(rawSetupState, key); - }; - if (oldRef != null && oldRef !== ref) { - if (isString(oldRef)) { - refs[oldRef] = null; - if (canSetSetupRef(oldRef)) { - setupState[oldRef] = null; - } - } else if (isRef(oldRef)) { - oldRef.value = null; - } - } - if (isFunction(ref)) { - callWithErrorHandling(ref, owner, 12, [value, refs]); - } else { - const _isString = isString(ref); - const _isRef = isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; - if (isUnmount) { - isArray(existing) && remove(existing, refValue); - } else { - if (!isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (canSetSetupRef(ref)) { - setupState[ref] = refs[ref]; - } - } else { - ref.value = [refValue]; - if (rawRef.k) refs[rawRef.k] = ref.value; - } - } else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } else if (_isString) { - refs[ref] = value; - if (canSetSetupRef(ref)) { - setupState[ref] = value; - } - } else if (_isRef) { - ref.value = value; - if (rawRef.k) refs[rawRef.k] = value; - } else { - warn$1("Invalid template ref type:", ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } else { - doSet(); - } - } else { - warn$1("Invalid template ref type:", ref, `(${typeof ref})`); - } - } -} - -const isAsyncWrapper = (i) => !!i.type.__asyncLoader; - -const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; -function onActivated(hook, target) { - registerKeepAliveHook(hook, "a", target); -} -function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da", target); -} -function registerKeepAliveHook(hook, type, target = currentInstance) { - const wrappedHook = hook.__wdc || (hook.__wdc = () => { - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } - } -} -function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - const injected = injectHook( - type, - hook, - keepAliveRoot, - true - /* prepend */ - ); - onUnmounted(() => { - remove(keepAliveRoot[type], injected); - }, target); -} - -function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - const wrappedHook = hook.__weh || (hook.__weh = (...args) => { - pauseTracking(); - const reset = setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - reset(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } else { - hooks.push(wrappedHook); - } - return wrappedHook; - } else { - const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, "")); - warn$1( - `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) - ); - } -} -const createHook = (lifecycle) => (hook, target = currentInstance) => { - if (!isInSSRComponentSetup || lifecycle === "sp") { - injectHook(lifecycle, (...args) => hook(...args), target); - } -}; -const onBeforeMount = createHook("bm"); -const onMounted = createHook("m"); -const onBeforeUpdate = createHook( - "bu" -); -const onUpdated = createHook("u"); -const onBeforeUnmount = createHook( - "bum" -); -const onUnmounted = createHook("um"); -const onServerPrefetch = createHook( - "sp" -); -const onRenderTriggered = createHook("rtg"); -const onRenderTracked = createHook("rtc"); -function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec", hook, target); -} - -const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); - -function ensureValidVNode$1(vnodes) { - return vnodes.some((child) => { - if (!isVNode$2(child)) return true; - if (child.type === Comment) return false; - if (child.type === Fragment && !ensureValidVNode$1(child.children)) - return false; - return true; - }) ? vnodes : null; -} - -const getPublicInstance = (i) => { - if (!i) return null; - if (isStatefulComponent(i)) return getComponentPublicInstance(i); - return getPublicInstance(i.parent); -}; -const publicPropertiesMap = ( - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { - $: (i) => i, - $el: (i) => i.vnode.el, - $data: (i) => i.data, - $props: (i) => shallowReadonly(i.props) , - $attrs: (i) => shallowReadonly(i.attrs) , - $slots: (i) => shallowReadonly(i.slots) , - $refs: (i) => shallowReadonly(i.refs) , - $parent: (i) => getPublicInstance(i.parent), - $root: (i) => getPublicInstance(i.root), - $host: (i) => i.ce, - $emit: (i) => i.emit, - $options: (i) => resolveMergedOptions(i) , - $forceUpdate: (i) => i.f || (i.f = () => { - queueJob(i.update); - }), - $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: (i) => instanceWatch.bind(i) - }) -); -const isReservedPrefix = (key) => key === "_" || key === "$"; -const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); -const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - if (key === "__v_skip") { - return true; - } - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - if (key === "__isVue") { - return true; - } - let normalizedProps; - if (key[0] !== "$") { - const n = accessCache[key]; - if (n !== void 0) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - } - } else if (hasSetupBinding(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) - ) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } else if (shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - if (publicGetter) { - if (key === "$attrs") { - track(instance.attrs, "get", ""); - markAttrsAccessed(); - } else if (key === "$slots") { - track(instance, "get", key); - } - return publicGetter(instance); - } else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && (cssModule = cssModule[key]) - ) { - return cssModule; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } else if ( - // global properties - globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) - ) { - { - return globalProperties[key]; - } - } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf("__v") !== 0)) { - if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { - warn$1( - `Property ${JSON.stringify( - key - )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` - ); - } else if (instance === currentRenderingInstance) { - warn$1( - `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` - ); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (hasSetupBinding(setupState, key)) { - setupState[key] = value; - return true; - } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { - warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); - return false; - } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - data[key] = value; - return true; - } else if (hasOwn(instance.props, key)) { - warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); - return false; - } - if (key[0] === "$" && key.slice(1) in instance) { - warn$1( - `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` - ); - return false; - } else { - if (key in instance.appContext.config.globalProperties) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - value - }); - } else { - ctx[key] = value; - } - } - return true; - }, - has({ - _: { data, setupState, accessCache, ctx, appContext, propsOptions } - }, key) { - let normalizedProps; - return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - target._.accessCache[key] = 0; - } else if (hasOwn(descriptor, "value")) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); - } -}; -{ - PublicInstanceProxyHandlers.ownKeys = (target) => { - warn$1( - `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` - ); - return Reflect.ownKeys(target); - }; -} -function createDevRenderContext(instance) { - const target = {}; - Object.defineProperty(target, `_`, { - configurable: true, - enumerable: false, - get: () => instance - }); - Object.keys(publicPropertiesMap).forEach((key) => { - Object.defineProperty(target, key, { - configurable: true, - enumerable: false, - get: () => publicPropertiesMap[key](instance), - // intercepted by the proxy so no need for implementation, - // but needed to prevent set errors - set: NOOP - }); - }); - return target; -} -function exposePropsOnRenderContext(instance) { - const { - ctx, - propsOptions: [propsOptions] - } = instance; - if (propsOptions) { - Object.keys(propsOptions).forEach((key) => { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => instance.props[key], - set: NOOP - }); - }); - } -} -function exposeSetupStateOnRenderContext(instance) { - const { ctx, setupState } = instance; - Object.keys(toRaw(setupState)).forEach((key) => { - if (!setupState.__isScriptSetup) { - if (isReservedPrefix(key[0])) { - warn$1( - `setup() return property ${JSON.stringify( - key - )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` - ); - return; - } - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => setupState[key], - set: NOOP - }); - } - }); -} - -function normalizePropsOrEmits(props) { - return isArray(props) ? props.reduce( - (normalized, p) => (normalized[p] = null, normalized), - {} - ) : props; -} - -function createDuplicateChecker() { - const cache = /* @__PURE__ */ Object.create(null); - return (type, key) => { - if (cache[key]) { - warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); - } else { - cache[key] = type; - } - }; -} -let shouldCacheAccess = true; -function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - shouldCacheAccess = false; - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc"); - } - const { - // state - data: dataOptions, - computed: computedOptions, - methods, - watch: watchOptions, - provide: provideOptions, - inject: injectOptions, - // lifecycle - created, - beforeMount, - mounted, - beforeUpdate, - updated, - activated, - deactivated, - beforeDestroy, - beforeUnmount, - destroyed, - unmounted, - render, - renderTracked, - renderTriggered, - errorCaptured, - serverPrefetch, - // public API - expose, - inheritAttrs, - // assets - components, - directives, - filters - } = options; - const checkDuplicateProperties = createDuplicateChecker() ; - { - const [propsOptions] = instance.propsOptions; - if (propsOptions) { - for (const key in propsOptions) { - checkDuplicateProperties("Props" /* PROPS */, key); - } - } - } - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (isFunction(methodHandler)) { - { - Object.defineProperty(ctx, key, { - value: methodHandler.bind(publicThis), - configurable: true, - enumerable: true, - writable: true - }); - } - { - checkDuplicateProperties("Methods" /* METHODS */, key); - } - } else { - warn$1( - `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` - ); - } - } - } - if (dataOptions) { - if (!isFunction(dataOptions)) { - warn$1( - `The data option must be a function. Plain object usage is no longer supported.` - ); - } - const data = dataOptions.call(publicThis, publicThis); - if (isPromise(data)) { - warn$1( - `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` - ); - } - if (!isObject(data)) { - warn$1(`data() should return an object.`); - } else { - instance.data = reactive(data); - { - for (const key in data) { - checkDuplicateProperties("Data" /* DATA */, key); - if (!isReservedPrefix(key[0])) { - Object.defineProperty(ctx, key, { - configurable: true, - enumerable: true, - get: () => data[key], - set: NOOP - }); - } - } - } - } - } - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; - if (get === NOOP) { - warn$1(`Computed property "${key}" has no getter.`); - } - const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { - warn$1( - `Write operation failed: computed property "${key}" is readonly.` - ); - } ; - const c = computed({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: (v) => c.value = v - }); - { - checkDuplicateProperties("Computed" /* COMPUTED */, key); - } - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; - Reflect.ownKeys(provides).forEach((key) => { - provide(key, provides[key]); - }); - } - if (created) { - callHook(created, instance, "c"); - } - function registerLifecycleHook(register, hook) { - if (isArray(hook)) { - hook.forEach((_hook) => register(_hook.bind(publicThis))); - } else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach((key) => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: (val) => publicThis[key] = val - }); - }); - } else if (!instance.exposed) { - instance.exposed = {}; - } - } - if (render && instance.render === NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - if (components) instance.components = components; - if (directives) instance.directives = directives; - if (serverPrefetch) { - markAsyncBoundary(instance); - } -} -function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { - if (isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (isObject(opt)) { - if ("default" in opt) { - injected = inject( - opt.from || key, - opt.default, - true - ); - } else { - injected = inject(opt.from || key); - } - } else { - injected = inject(opt); - } - if (isRef(injected)) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: (v) => injected.value = v - }); - } else { - ctx[key] = injected; - } - { - checkDuplicateProperties("Inject" /* INJECT */, key); - } - } -} -function callHook(hook, instance, type) { - callWithAsyncErrorHandling( - isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), - instance, - type - ); -} -function createWatcher(raw, ctx, publicThis, key) { - let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; - if (isString(raw)) { - const handler = ctx[raw]; - if (isFunction(handler)) { - { - watch(getter, handler); - } - } else { - warn$1(`Invalid watch handler specified by key "${raw}"`, handler); - } - } else if (isFunction(raw)) { - { - watch(getter, raw.bind(publicThis)); - } - } else if (isObject(raw)) { - if (isArray(raw)) { - raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); - } else { - const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; - if (isFunction(handler)) { - watch(getter, handler, raw); - } else { - warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); - } - } - } else { - warn$1(`Invalid watch option: "${key}"`, raw); - } -} -function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { - mixins: globalMixins, - optionsCache: cache, - config: { optionMergeStrategies } - } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; - } else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach( - (m) => mergeOptions(resolved, m, optionMergeStrategies, true) - ); - } - mergeOptions(resolved, base, optionMergeStrategies); - } - if (isObject(base)) { - cache.set(base, resolved); - } - return resolved; -} -function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); - } - if (mixins) { - mixins.forEach( - (m) => mergeOptions(to, m, strats, true) - ); - } - for (const key in from) { - if (asMixin && key === "expose") { - warn$1( - `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` - ); - } else { - const strat = internalOptionMergeStrats[key] || strats && strats[key]; - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; -} -const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeEmitsOrPropsOptions, - emits: mergeEmitsOrPropsOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject -}; -function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (extend)( - isFunction(to) ? to.call(this, this) : to, - isFunction(from) ? from.call(this, this) : from - ); - }; -} -function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); -} -function normalizeInject(raw) { - if (isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; - } - return raw; -} -function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; -} -function mergeObjectOptions(to, from) { - return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; -} -function mergeEmitsOrPropsOptions(to, from) { - if (to) { - if (isArray(to) && isArray(from)) { - return [.../* @__PURE__ */ new Set([...to, ...from])]; - } - return extend( - /* @__PURE__ */ Object.create(null), - normalizePropsOrEmits(to), - normalizePropsOrEmits(from != null ? from : {}) - ); - } else { - return from; - } -} -function mergeWatchOptions(to, from) { - if (!to) return from; - if (!from) return to; - const merged = extend(/* @__PURE__ */ Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; -} - -function createAppContext() { - return { - app: null, - config: { - isNativeTag: NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: void 0, - warnHandler: void 0, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: /* @__PURE__ */ Object.create(null), - optionsCache: /* @__PURE__ */ new WeakMap(), - propsCache: /* @__PURE__ */ new WeakMap(), - emitsCache: /* @__PURE__ */ new WeakMap() - }; -} -let uid$1 = 0; -function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!isFunction(rootComponent)) { - rootComponent = extend({}, rootComponent); - } - if (rootProps != null && !isObject(rootProps)) { - warn$1(`root props passed to app.mount() must be an object.`); - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = /* @__PURE__ */ new WeakSet(); - const pluginCleanupFns = []; - let isMounted = false; - const app = context.app = { - _uid: uid$1++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - { - warn$1( - `app.config cannot be replaced. Modify individual options instead.` - ); - } - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) { - warn$1(`Plugin has already been applied to target app.`); - } else if (plugin && isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } else if (isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } else { - warn$1( - `A plugin must either be a function or an object with an "install" function.` - ); - } - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } else { - warn$1( - "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") - ); - } - } - return app; - }, - component(name, component) { - { - validateComponentName(name, context.config); - } - if (!component) { - return context.components[name]; - } - if (context.components[name]) { - warn$1(`Component "${name}" has already been registered in target app.`); - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - { - validateDirectiveName(name); - } - if (!directive) { - return context.directives[name]; - } - if (context.directives[name]) { - warn$1(`Directive "${name}" has already been registered in target app.`); - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, namespace) { - if (!isMounted) { - if (rootContainer.__vue_app__) { - warn$1( - `There is already an app instance mounted on the host container. - If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` - ); - } - const vnode = app._ceVNode || createVNode(rootComponent, rootProps); - vnode.appContext = context; - if (namespace === true) { - namespace = "svg"; - } else if (namespace === false) { - namespace = void 0; - } - { - context.reload = () => { - render( - cloneVNode(vnode), - rootContainer, - namespace - ); - }; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } else { - render(vnode, rootContainer, namespace); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - { - app._instance = vnode.component; - devtoolsInitApp(app, version); - } - return getComponentPublicInstance(vnode.component); - } else { - warn$1( - `App has already been mounted. -If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` - ); - } - }, - onUnmount(cleanupFn) { - if (typeof cleanupFn !== "function") { - warn$1( - `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` - ); - } - pluginCleanupFns.push(cleanupFn); - }, - unmount() { - if (isMounted) { - callWithAsyncErrorHandling( - pluginCleanupFns, - app._instance, - 16 - ); - render(null, app._container); - { - app._instance = null; - devtoolsUnmountApp(app); - } - delete app._container.__vue_app__; - } else { - warn$1(`Cannot unmount an app that is not mounted.`); - } - }, - provide(key, value) { - if (key in context.provides) { - warn$1( - `App already provides property with key "${String(key)}". It will be overwritten with the new value.` - ); - } - context.provides[key] = value; - return app; - }, - runWithContext(fn) { - const lastApp = currentApp; - currentApp = app; - try { - return fn(); - } finally { - currentApp = lastApp; - } - } - }; - return app; - }; -} -let currentApp = null; - -function provide(key, value) { - if (!currentInstance) { - { - warn$1(`provide() can only be used inside setup().`); - } - } else { - let provides = currentInstance.provides; - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - provides[key] = value; - } -} -function inject(key, defaultValue, treatDefaultAsFactory = false) { - const instance = currentInstance || currentRenderingInstance; - if (instance || currentApp) { - const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; - if (provides && key in provides) { - return provides[key]; - } else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; - } else { - warn$1(`injection "${String(key)}" not found.`); - } - } else { - warn$1(`inject() can only be used inside setup() or functional components.`); - } -} - -const internalObjectProto = {}; -const createInternalObject = () => Object.create(internalObjectProto); -const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; - -function initProps(instance, rawProps, isStateful, isSSR = false) { - const props = {}; - const attrs = createInternalObject(); - instance.propsDefaults = /* @__PURE__ */ Object.create(null); - setFullProps(instance, rawProps, props, attrs); - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = void 0; - } - } - { - validateProps(rawProps || {}, props, instance); - } - if (isStateful) { - instance.props = isSSR ? props : shallowReactive(props); - } else { - if (!instance.type.props) { - instance.props = attrs; - } else { - instance.props = props; - } - } - instance.attrs = attrs; -} -function isInHmrContext(instance) { - while (instance) { - if (instance.type.__hmrId) return true; - instance = instance.parent; - } -} -function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { - props, - attrs, - vnode: { patchFlag } - } = instance; - const rawCurrentProps = toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( - // always force full diff in dev - // - #1942 if hmr is enabled with sfc component - // - vite#872 non-sfc component used by sfc component - !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) - ) { - if (patchFlag & 8) { - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - const value = rawProps[key]; - if (options) { - if (hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } else { - const camelizedKey = camelize(key); - props[camelizedKey] = resolvePropValue( - options, - rawCurrentProps, - camelizedKey, - value, - instance, - false - ); - } - } else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - } else { - if (setFullProps(instance, rawProps, props, attrs)) { - hasAttrsChanged = true; - } - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || // for camelCase - !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { - if (options) { - if (rawPrevProps && // for camelCase - (rawPrevProps[key] !== void 0 || // for kebab-case - rawPrevProps[kebabKey] !== void 0)) { - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - void 0, - instance, - true - ); - } - } else { - delete props[key]; - } - } - } - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || !hasOwn(rawProps, key) && true) { - delete attrs[key]; - hasAttrsChanged = true; - } - } - } - } - if (hasAttrsChanged) { - trigger(instance.attrs, "set", ""); - } - { - validateProps(rawProps || {}, props, instance); - } -} -function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - if (isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - let camelKey; - if (options && hasOwn(options, camelKey = camelize(key))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - if (needCastKeys) { - const rawCurrentProps = toRaw(props); - const castValues = rawCastValues || EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - castValues[key], - instance, - !hasOwn(castValues, key) - ); - } - } - return hasAttrsChanged; -} -function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = hasOwn(opt, "default"); - if (hasDefault && value === void 0) { - const defaultValue = opt.default; - if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } else { - const reset = setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call( - null, - props - ); - reset(); - } - } else { - value = defaultValue; - } - if (instance.ce) { - instance.ce._setProp(key, value); - } - } - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { - value = true; - } - } - } - return value; -} -const mixinPropsCache = /* @__PURE__ */ new WeakMap(); -function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = asMixin ? mixinPropsCache : appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; - } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - let hasExtends = false; - if (!isFunction(comp)) { - const extendProps = (raw2) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw2, appContext, true); - extend(normalized, props); - if (keys) needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } - } - if (!raw && !hasExtends) { - if (isObject(comp)) { - cache.set(comp, EMPTY_ARR); - } - return EMPTY_ARR; - } - if (isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - if (!isString(raw[i])) { - warn$1(`props must be strings when using array syntax.`, raw[i]); - } - const normalizedKey = camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = EMPTY_OBJ; - } - } - } else if (raw) { - if (!isObject(raw)) { - warn$1(`invalid props options`, raw); - } - for (const key in raw) { - const normalizedKey = camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); - const propType = prop.type; - let shouldCast = false; - let shouldCastTrue = true; - if (isArray(propType)) { - for (let index = 0; index < propType.length; ++index) { - const type = propType[index]; - const typeName = isFunction(type) && type.name; - if (typeName === "Boolean") { - shouldCast = true; - break; - } else if (typeName === "String") { - shouldCastTrue = false; - } - } - } else { - shouldCast = isFunction(propType) && propType.name === "Boolean"; - } - prop[0 /* shouldCast */] = shouldCast; - prop[1 /* shouldCastTrue */] = shouldCastTrue; - if (shouldCast || hasOwn(prop, "default")) { - needCastKeys.push(normalizedKey); - } - } - } - } - const res = [normalized, needCastKeys]; - if (isObject(comp)) { - cache.set(comp, res); - } - return res; -} -function validatePropName(key) { - if (key[0] !== "$" && !isReservedProp(key)) { - return true; - } else { - warn$1(`Invalid prop name: "${key}" is a reserved property.`); - } - return false; -} -function getType(ctor) { - if (ctor === null) { - return "null"; - } - if (typeof ctor === "function") { - return ctor.name || ""; - } else if (typeof ctor === "object") { - const name = ctor.constructor && ctor.constructor.name; - return name || ""; - } - return ""; -} -function validateProps(rawProps, props, instance) { - const resolvedValues = toRaw(props); - const options = instance.propsOptions[0]; - const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key)); - for (const key in options) { - let opt = options[key]; - if (opt == null) continue; - validateProp( - key, - resolvedValues[key], - opt, - shallowReadonly(resolvedValues) , - !camelizePropsKey.includes(key) - ); - } -} -function validateProp(name, value, prop, props, isAbsent) { - const { type, required, validator, skipCheck } = prop; - if (required && isAbsent) { - warn$1('Missing required prop: "' + name + '"'); - return; - } - if (value == null && !required) { - return; - } - if (type != null && type !== true && !skipCheck) { - let isValid = false; - const types = isArray(type) ? type : [type]; - const expectedTypes = []; - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); - expectedTypes.push(expectedType || ""); - isValid = valid; - } - if (!isValid) { - warn$1(getInvalidTypeMessage(name, value, expectedTypes)); - return; - } - } - if (validator && !validator(value, props)) { - warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); - } -} -const isSimpleType = /* @__PURE__ */ makeMap( - "String,Number,Boolean,Function,Symbol,BigInt" -); -function assertType(value, type) { - let valid; - const expectedType = getType(type); - if (expectedType === "null") { - valid = value === null; - } else if (isSimpleType(expectedType)) { - const t = typeof value; - valid = t === expectedType.toLowerCase(); - if (!valid && t === "object") { - valid = value instanceof type; - } - } else if (expectedType === "Object") { - valid = isObject(value); - } else if (expectedType === "Array") { - valid = isArray(value); - } else { - valid = value instanceof type; - } - return { - valid, - expectedType - }; -} -function getInvalidTypeMessage(name, value, expectedTypes) { - if (expectedTypes.length === 0) { - return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; - } - let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; - const expectedType = expectedTypes[0]; - const receivedType = toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); - if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; - } - message += `, got ${receivedType} `; - if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; - } - return message; -} -function styleValue(value, type) { - if (type === "String") { - return `"${value}"`; - } else if (type === "Number") { - return `${Number(value)}`; - } else { - return `${value}`; - } -} -function isExplicable(type) { - const explicitTypes = ["string", "number", "boolean"]; - return explicitTypes.some((elem) => type.toLowerCase() === elem); -} -function isBoolean(...args) { - return args.some((elem) => elem.toLowerCase() === "boolean"); -} - -const isInternalKey = (key) => key[0] === "_" || key === "$stable"; -const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode$1) : [normalizeVNode$1(value)]; -const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - return rawSlot; - } - const normalized = withCtx((...args) => { - if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { - warn$1( - `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` - ); - } - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; -}; -const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) continue; - const value = rawSlots[key]; - if (isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } else if (value != null) { - { - warn$1( - `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` - ); - } - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } - } -}; -const normalizeVNodeSlots = (instance, children) => { - if (!isKeepAlive(instance.vnode) && true) { - warn$1( - `Non-function value encountered for default slot. Prefer function slots for better performance.` - ); - } - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; -}; -const assignSlots = (slots, children, optimized) => { - for (const key in children) { - if (optimized || key !== "_") { - slots[key] = children[key]; - } - } -}; -const initSlots = (instance, children, optimized) => { - const slots = instance.slots = createInternalObject(); - if (instance.vnode.shapeFlag & 32) { - const type = children._; - if (type) { - assignSlots(slots, children, optimized); - if (optimized) { - def(slots, "_", type, true); - } - } else { - normalizeObjectSlots(children, slots); - } - } else if (children) { - normalizeVNodeSlots(instance, children); - } -}; -const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = EMPTY_OBJ; - if (vnode.shapeFlag & 32) { - const type = children._; - if (type) { - if (isHmrUpdating) { - assignSlots(slots, children, optimized); - trigger(instance, "set", "$slots"); - } else if (optimized && type === 1) { - needDeletionCheck = false; - } else { - assignSlots(slots, children, optimized); - } - } else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; - } else if (children) { - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { - delete slots[key]; - } - } - } -}; - -let supported; -let perf; -function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - { - devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); - } -} -function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure( - `<${formatComponentName(instance, instance.type)}> ${type}`, - startTag, - endTag - ); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - { - devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); - } -} -function isSupported() { - if (supported !== void 0) { - return supported; - } - if (typeof window !== "undefined" && window.performance) { - supported = true; - perf = window.performance; - } else { - supported = false; - } - return supported; -} - -const queuePostRenderEffect = queueEffectWithSuspense ; -function createRenderer(options) { - return baseCreateRenderer(options); -} -function baseCreateRenderer(options, createHydrationFns) { - const target = getGlobalThis(); - target.__VUE__ = true; - { - setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); - } - const { - insert: hostInsert, - remove: hostRemove, - patchProp: hostPatchProp, - createElement: hostCreateElement, - createText: hostCreateText, - createComment: hostCreateComment, - setText: hostSetText, - setElementText: hostSetElementText, - parentNode: hostParentNode, - nextSibling: hostNextSibling, - setScopeId: hostSetScopeId = NOOP, - insertStaticContent: hostInsertStaticContent - } = options; - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, namespace); - } else { - patchStaticNode(n1, n2, container, namespace); - } - break; - case Fragment: - processFragment( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - break; - default: - if (shapeFlag & 1) { - processElement( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 6) { - processComponent( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 64) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else if (shapeFlag & 128) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else { - warn$1("Invalid VNode type:", type, `(${typeof type})`); - } - } - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateText(n2.children), - container, - anchor - ); - } else { - const el = n2.el = n1.el; - if (n2.children !== n1.children) { - hostSetText(el, n2.children); - } - } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateComment(n2.children || ""), - container, - anchor - ); - } else { - n2.el = n1.el; - } - }; - const mountStaticNode = (n2, container, anchor, namespace) => { - [n2.el, n2.anchor] = hostInsertStaticContent( - n2.children, - container, - anchor, - namespace, - n2.el, - n2.anchor - ); - }; - const patchStaticNode = (n1, n2, container, namespace) => { - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent( - n2.children, - container, - anchor, - namespace - ); - } else { - n2.el = n1.el; - n2.anchor = n1.anchor; - } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; - } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; - } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - if (n2.type === "svg") { - namespace = "svg"; - } else if (n2.type === "math") { - namespace = "mathml"; - } - if (n1 == null) { - mountElement( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - patchElement( - n1, - n2, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - let el; - let vnodeHook; - const { props, shapeFlag, transition, dirs } = vnode; - el = vnode.el = hostCreateElement( - vnode.type, - namespace, - props && props.is, - props - ); - if (shapeFlag & 8) { - hostSetElementText(el, vnode.children); - } else if (shapeFlag & 16) { - mountChildren( - vnode.children, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(vnode, namespace), - slotScopeIds, - optimized - ); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); - if (props) { - for (const key in props) { - if (key !== "value" && !isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], namespace, parentComponent); - } - } - if ("value" in props) { - hostPatchProp(el, "value", null, props.value, namespace); - } - if (vnodeHook = props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - { - def(el, "__vnode", vnode, true); - def(el, "__vueParentComponent", parentComponent, true); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - const needCallTransitionHooks = needTransition(parentSuspense, transition); - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { - subTree = filterSingleRoot(subTree.children) || subTree; - } - if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { - const parentVNode = parentComponent.vnode; - setScopeId( - el, - parentVNode, - parentVNode.scopeId, - parentVNode.slotScopeIds, - parentComponent.parent - ); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode$1(children[i]); - patch( - null, - child, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const el = n2.el = n1.el; - { - el.__vnode = n2; - } - let { patchFlag, dynamicChildren, dirs } = n2; - patchFlag |= n1.patchFlag & 16; - const oldProps = n1.props || EMPTY_OBJ; - const newProps = n2.props || EMPTY_OBJ; - let vnodeHook; - parentComponent && toggleRecurse(parentComponent, false); - if (vnodeHook = newProps.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); - } - parentComponent && toggleRecurse(parentComponent, true); - if (isHmrUpdating) { - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { - hostSetElementText(el, ""); - } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - el, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds - ); - { - traverseStaticChildren(n1, n2); - } - } else if (!optimized) { - patchChildren( - n1, - n2, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds, - false - ); - } - if (patchFlag > 0) { - if (patchFlag & 16) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } else { - if (patchFlag & 2) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, "class", null, newProps.class, namespace); - } - } - if (patchFlag & 4) { - hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); - } - if (patchFlag & 8) { - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - if (next !== prev || key === "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - } - } - if (patchFlag & 1) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } else if (!optimized && dynamicChildren == null) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); - }, parentSuspense); - } - }; - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - const container = ( - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( - // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer - ) - ); - patch( - oldVNode, - newVNode, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - true - ); - } - }; - const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { - if (oldProps !== newProps) { - if (oldProps !== EMPTY_OBJ) { - for (const key in oldProps) { - if (!isReservedProp(key) && !(key in newProps)) { - hostPatchProp( - el, - key, - oldProps[key], - null, - namespace, - parentComponent - ); - } - } - } - for (const key in newProps) { - if (isReservedProp(key)) continue; - const next = newProps[key]; - const prev = oldProps[key]; - if (next !== prev && key !== "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - if ("value" in newProps) { - hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); - const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if ( - // #5523 dev root fragment may inherit directives - isHmrUpdating || patchFlag & 2048 - ) { - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - mountChildren( - // #10007 - // such fragment like `<></>` will be compiled into - // a fragment which doesn't have a children. - // In this case fallback to an empty array - n2.children || [], - container, - fragmentEndAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - container, - parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - { - traverseStaticChildren(n1, n2); - } - } else { - patchChildren( - n1, - n2, - container, - fragmentEndAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512) { - parentComponent.ctx.activate( - n2, - container, - anchor, - namespace, - optimized - ); - } else { - mountComponent( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - optimized - ); - } - } else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { - const instance = (initialVNode.component = createComponentInstance$1( - initialVNode, - parentComponent, - parentSuspense - )); - if (instance.type.__hmrId) { - registerHMR(instance); - } - { - pushWarningContext$1(initialVNode); - startMeasure(instance, `mount`); - } - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - { - { - startMeasure(instance, `init`); - } - setupComponent$1(instance, false, optimized); - { - endMeasure(instance, `init`); - } - } - if (instance.asyncDep) { - if (isHmrUpdating) initialVNode.el = null; - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); - if (!initialVNode.el) { - const placeholder = instance.subTree = createVNode(Comment); - processCommentNode(null, placeholder, container, anchor); - } - } else { - setupRenderEffect( - instance, - initialVNode, - container, - anchor, - parentSuspense, - namespace, - optimized - ); - } - { - popWarningContext$1(); - endMeasure(instance, `mount`); - } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = n2.component = n1.component; - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && !instance.asyncResolved) { - { - pushWarningContext$1(n2); - } - updateComponentPreRender(instance, n2, optimized); - { - popWarningContext$1(); - } - return; - } else { - instance.next = n2; - instance.update(); - } - } else { - n2.el = n1.el; - instance.vnode = n2; - } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent, root, type } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - if (bm) { - invokeArrayFns(bm); - } - if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - const hydrateSubTree = () => { - { - startMeasure(instance, `render`); - } - instance.subTree = renderComponentRoot$1(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `hydrate`); - } - hydrateNode( - el, - instance.subTree, - instance, - parentSuspense, - null - ); - { - endMeasure(instance, `hydrate`); - } - }; - if (isAsyncWrapperVNode && type.__asyncHydrate) { - type.__asyncHydrate( - el, - instance, - hydrateSubTree - ); - } else { - hydrateSubTree(); - } - } else { - if (root.ce) { - root.ce._injectChildStyle(type); - } - { - startMeasure(instance, `render`); - } - const subTree = instance.subTree = renderComponentRoot$1(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `patch`); - } - patch( - null, - subTree, - container, - anchor, - instance, - parentSuspense, - namespace - ); - { - endMeasure(instance, `patch`); - } - initialVNode.el = subTree.el; - } - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect( - () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), - parentSuspense - ); - } - if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - { - devtoolsComponentAdded(instance); - } - initialVNode = container = anchor = null; - } else { - let { next, bu, u, parent, vnode } = instance; - { - const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); - if (nonHydratedAsyncRoot) { - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - nonHydratedAsyncRoot.asyncDep.then(() => { - if (!instance.isUnmounted) { - componentUpdateFn(); - } - }); - return; - } - } - let originNext = next; - let vnodeHook; - { - pushWarningContext$1(next || instance.vnode); - } - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } else { - next = vnode; - } - if (bu) { - invokeArrayFns(bu); - } - if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - { - startMeasure(instance, `render`); - } - const nextTree = renderComponentRoot$1(instance); - { - endMeasure(instance, `render`); - } - const prevTree = instance.subTree; - instance.subTree = nextTree; - { - startMeasure(instance, `patch`); - } - patch( - prevTree, - nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), - instance, - parentSuspense, - namespace - ); - { - endMeasure(instance, `patch`); - } - next.el = nextTree.el; - if (originNext === null) { - updateHOCHostEl(instance, nextTree.el); - } - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - if (vnodeHook = next.props && next.props.onVnodeUpdated) { - queuePostRenderEffect( - () => invokeVNodeHook(vnodeHook, parent, next, vnode), - parentSuspense - ); - } - { - devtoolsComponentUpdated(instance); - } - { - popWarningContext$1(); - } - } - }; - instance.scope.on(); - const effect = instance.effect = new ReactiveEffect(componentUpdateFn); - instance.scope.off(); - const update = instance.update = effect.run.bind(effect); - const job = instance.job = effect.runIfDirty.bind(effect); - job.i = instance; - job.id = instance.uid; - effect.scheduler = () => queueJob(job); - toggleRecurse(instance, true); - { - effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; - effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; - } - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - pauseTracking(); - flushPreFlushCbs(instance); - resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - if (patchFlag > 0) { - if (patchFlag & 128) { - patchKeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - return; - } else if (patchFlag & 256) { - patchUnkeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - return; - } - } - if (shapeFlag & 8) { - if (prevShapeFlag & 16) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } - } else { - if (prevShapeFlag & 16) { - if (shapeFlag & 16) { - patchKeyedChildren( - c1, - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } else { - if (prevShapeFlag & 8) { - hostSetElementText(container, ""); - } - if (shapeFlag & 16) { - mountChildren( - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - } - } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - c1 = c1 || EMPTY_ARR; - c2 = c2 || EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode$1(c2[i]); - patch( - c1[i], - nextChild, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - if (oldLength > newLength) { - unmountChildren( - c1, - parentComponent, - parentSuspense, - true, - false, - commonLength - ); - } else { - mountChildren( - c2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - commonLength - ); - } - }; - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; - let e2 = l2 - 1; - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode$1(c2[i]); - if (isSameVNodeType(n1, n2)) { - patch( - n1, - n2, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - break; - } - i++; - } - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode$1(c2[e2]); - if (isSameVNodeType(n1, n2)) { - patch( - n1, - n2, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - break; - } - e1--; - e2--; - } - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch( - null, - c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode$1(c2[i]), - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - i++; - } - } - } else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } else { - const s1 = i; - const s2 = i; - const keyToNewIndexMap = /* @__PURE__ */ new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode$1(c2[i]); - if (nextChild.key != null) { - if (keyToNewIndexMap.has(nextChild.key)) { - warn$1( - `Duplicate keys found during update:`, - JSON.stringify(nextChild.key), - `Make sure keys are unique.` - ); - } - keyToNewIndexMap.set(nextChild.key, i); - } - } - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - let maxNewIndexSoFar = 0; - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } else { - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === void 0) { - unmount(prevChild, parentComponent, parentSuspense, true); - } else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } else { - moved = true; - } - patch( - prevChild, - c2[newIndex], - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - patched++; - } - } - const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - patch( - null, - nextChild, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (moved) { - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2); - } else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; - if (needTransition2) { - if (moveType === 0) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } else { - const { leave, delayLeave, afterLeave } = transition; - const remove2 = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove2(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove2, performLeave); - } else { - performLeave(); - } - } - } else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { - type, - props, - ref, - children, - dynamicChildren, - shapeFlag, - patchFlag, - dirs, - cacheIndex - } = vnode; - if (patchFlag === -2) { - optimized = false; - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (cacheIndex != null) { - parentComponent.renderCache[cacheIndex] = void 0; - } - if (shapeFlag & 256) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } else { - if (shapeFlag & 128) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); - } - if (shapeFlag & 64) { - vnode.type.remove( - vnode, - parentComponent, - parentSuspense, - internals, - doRemove - ); - } else if (dynamicChildren && // #5154 - // when v-once is used inside a block, setBlockTracking(-1) marks the - // parent block with hasOnce: true - // so that it doesn't take the fast path during unmount - otherwise - // components nested in v-once are never unmounted. - !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { - unmountChildren( - dynamicChildren, - parentComponent, - parentSuspense, - false, - true - ); - } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); - }, parentSuspense); - } - }; - const remove = (vnode) => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { - vnode.children.forEach((child) => { - if (child.type === Comment) { - hostRemove(child.el); - } else { - remove(child); - } - }); - } else { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 && transition && !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } else { - performLeave(); - } - } else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - if (instance.type.__hmrId) { - unregisterHMR(instance); - } - const { bum, scope, job, subTree, um, m, a } = instance; - invalidateMount(m); - invalidateMount(a); - if (bum) { - invokeArrayFns(bum); - } - scope.stop(); - if (job) { - job.flags |= 8; - unmount(subTree, instance, parentSuspense, doRemove); - } - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } - } - { - devtoolsComponentRemoved(instance); - } - }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } - }; - const getNextHostNode = (vnode) => { - if (vnode.shapeFlag & 6) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128) { - return vnode.suspense.next(); - } - const el = hostNextSibling(vnode.anchor || vnode.el); - const teleportEnd = el && el[TeleportEndKey]; - return teleportEnd ? hostNextSibling(teleportEnd) : el; - }; - let isFlushing = false; - const render = (vnode, container, namespace) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } else { - patch( - container._vnode || null, - vnode, - container, - null, - null, - null, - namespace - ); - } - container._vnode = vnode; - if (!isFlushing) { - isFlushing = true; - flushPreFlushCbs(); - flushPostFlushCbs(); - isFlushing = false; - } - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) - }; -} -function resolveChildrenNamespace({ type, props }, currentNamespace) { - return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; -} -function toggleRecurse({ effect, job }, allowed) { - if (allowed) { - effect.flags |= 32; - job.flags |= 4; - } else { - effect.flags &= ~32; - job.flags &= ~4; - } -} -function needTransition(parentSuspense, transition) { - return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; -} -function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (isArray(ch1) && isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow && c2.patchFlag !== -2) - traverseStaticChildren(c1, c2); - } - if (c2.type === Text) { - c2.el = c1.el; - } - if (c2.type === Comment && !c2.el) { - c2.el = c1.el; - } - } - } -} -function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = u + v >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } - } - } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; - } - return result; -} -function locateNonHydratedAsyncRoot(instance) { - const subComponent = instance.subTree.component; - if (subComponent) { - if (subComponent.asyncDep && !subComponent.asyncResolved) { - return subComponent; - } else { - return locateNonHydratedAsyncRoot(subComponent); - } - } -} -function invalidateMount(hooks) { - if (hooks) { - for (let i = 0; i < hooks.length; i++) - hooks[i].flags |= 8; - } -} - -const ssrContextKey = Symbol.for("v-scx"); -const useSSRContext = () => { - { - const ctx = inject(ssrContextKey); - if (!ctx) { - warn$1( - `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` - ); - } - return ctx; - } -}; - -function watch(source, cb, options) { - if (!isFunction(cb)) { - warn$1( - `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` - ); - } - return doWatch(source, cb, options); -} -function doWatch(source, cb, options = EMPTY_OBJ) { - const { immediate, deep, flush, once } = options; - if (!cb) { - if (immediate !== void 0) { - warn$1( - `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - if (deep !== void 0) { - warn$1( - `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - if (once !== void 0) { - warn$1( - `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - } - const baseWatchOptions = extend({}, options); - baseWatchOptions.onWarn = warn$1; - const runsImmediately = cb && immediate || !cb && flush !== "post"; - let ssrCleanup; - if (isInSSRComponentSetup) { - if (flush === "sync") { - const ctx = useSSRContext(); - ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); - } else if (!runsImmediately) { - const watchStopHandle = () => { - }; - watchStopHandle.stop = NOOP; - watchStopHandle.resume = NOOP; - watchStopHandle.pause = NOOP; - return watchStopHandle; - } - } - const instance = currentInstance; - baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); - let isPre = false; - if (flush === "post") { - baseWatchOptions.scheduler = (job) => { - queuePostRenderEffect(job, instance && instance.suspense); - }; - } else if (flush !== "sync") { - isPre = true; - baseWatchOptions.scheduler = (job, isFirstRun) => { - if (isFirstRun) { - job(); - } else { - queueJob(job); - } - }; - } - baseWatchOptions.augmentJob = (job) => { - if (cb) { - job.flags |= 4; - } - if (isPre) { - job.flags |= 2; - if (instance) { - job.id = instance.uid; - job.i = instance; - } - } - }; - const watchHandle = watch$1(source, cb, baseWatchOptions); - if (isInSSRComponentSetup) { - if (ssrCleanup) { - ssrCleanup.push(watchHandle); - } else if (runsImmediately) { - watchHandle(); - } - } - return watchHandle; -} -function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } else { - cb = value.handler; - options = value; - } - const reset = setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - reset(); - return res; -} -function createPathGetter(ctx, path) { - const segments = path.split("."); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; -} - -const getModelModifiers = (props, modelName) => { - return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; -}; - -function emit(instance, event, ...rawArgs) { - if (instance.isUnmounted) return; - const props = instance.vnode.props || EMPTY_OBJ; - { - const { - emitsOptions, - propsOptions: [propsOptions] - } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && true) { - if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) { - warn$1( - `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.` - ); - } - } else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn$1( - `Invalid event arguments: event validation failed for event "${event}".` - ); - } - } - } - } - } - let args = rawArgs; - const isModelListener = event.startsWith("update:"); - const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); - if (modifiers) { - if (modifiers.trim) { - args = rawArgs.map((a) => isString(a) ? a.trim() : a); - } - if (modifiers.number) { - args = rawArgs.map(looseToNumber); - } - } - { - devtoolsComponentEmit(instance, event, args); - } - { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1( - `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( - instance, - instance.type - )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( - event - )}" instead of "${event}".` - ); - } - } - let handlerName; - let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) - props[handlerName = toHandlerKey(camelize(event))]; - if (!handler && isModelListener) { - handler = props[handlerName = toHandlerKey(hyphenate(event))]; - } - if (handler) { - callWithAsyncErrorHandling( - handler, - instance, - 6, - args - ); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling( - onceHandler, - instance, - 6, - args - ); - } -} -function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== void 0) { - return cached; - } - const raw = comp.emits; - let normalized = {}; - let hasExtends = false; - if (!isFunction(comp)) { - const extendEmits = (raw2) => { - const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } - } - if (!raw && !hasExtends) { - if (isObject(comp)) { - cache.set(comp, null); - } - return null; - } - if (isArray(raw)) { - raw.forEach((key) => normalized[key] = null); - } else { - extend(normalized, raw); - } - if (isObject(comp)) { - cache.set(comp, normalized); - } - return normalized; -} -function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ""); - return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); -} - -let accessedAttrs = false; -function markAttrsAccessed() { - accessedAttrs = true; -} -function renderComponentRoot$1(instance) { - const { - type: Component, - vnode, - proxy, - withProxy, - propsOptions: [propsOptions], - slots, - attrs, - emit, - render, - renderCache, - props, - data, - setupState, - ctx, - inheritAttrs - } = instance; - const prev = setCurrentRenderingInstance$1(instance); - let result; - let fallthroughAttrs; - { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4) { - const proxyToUse = withProxy || proxy; - const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { - get(target, key, receiver) { - warn$1( - `Property '${String( - key - )}' was accessed via 'this'. Avoid using 'this' in templates.` - ); - return Reflect.get(target, key, receiver); - } - }) : proxyToUse; - result = normalizeVNode$1( - render.call( - thisProxy, - proxyToUse, - renderCache, - true ? shallowReadonly(props) : props, - setupState, - data, - ctx - ) - ); - fallthroughAttrs = attrs; - } else { - const render2 = Component; - if (attrs === props) { - markAttrsAccessed(); - } - result = normalizeVNode$1( - render2.length > 1 ? render2( - true ? shallowReadonly(props) : props, - true ? { - get attrs() { - markAttrsAccessed(); - return shallowReadonly(attrs); - }, - slots, - emit - } : { attrs, slots, emit } - ) : render2( - true ? shallowReadonly(props) : props, - null - ) - ); - fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); - } - } catch (err) { - handleError(err, instance, 1); - result = createVNode(Comment); - } - let root = result; - let setRoot = void 0; - if (result.patchFlag > 0 && result.patchFlag & 2048) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 | 6)) { - if (propsOptions && keys.some(isModelListener)) { - fallthroughAttrs = filterModelListeners( - fallthroughAttrs, - propsOptions - ); - } - root = cloneVNode(root, fallthroughAttrs, false, true); - } else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - if (!isModelListener(key)) { - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1( - `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` - ); - } - if (eventAttrs.length) { - warn$1( - `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` - ); - } - } - } - } - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn$1( - `Runtime directive used on component with non-element root node. The directives will not function as intended.` - ); - } - root = cloneVNode(root, null, false, true); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; - } - if (vnode.transition) { - if (!isElementRoot(root)) { - warn$1( - `Component inside <Transition> renders non-element root node that cannot be animated.` - ); - } - setTransitionHooks(root, vnode.transition); - } - if (setRoot) { - setRoot(root); - } else { - result = root; - } - setCurrentRenderingInstance$1(prev); - return result; -} -const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren, false); - if (!childRoot) { - return [vnode, void 0]; - } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { - return getChildRoot(childRoot); - } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode$1(childRoot), setRoot]; -}; -function filterSingleRoot(children, recurse = true) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode$2(child)) { - if (child.type !== Comment || child.children === "v-if") { - if (singleRoot) { - return; - } else { - singleRoot = child; - if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { - return filterSingleRoot(singleRoot.children); - } - } - } - } else { - return; - } - } - return singleRoot; -} -const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === "class" || key === "style" || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } - } - return res; -}; -const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } - } - return res; -}; -const isElementRoot = (vnode) => { - return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; -}; -function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - if ((prevChildren || nextChildren) && isHmrUpdating) { - return true; - } - if (nextVNode.dirs || nextVNode.transition) { - return true; - } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024) { - return true; - } - if (patchFlag & 16) { - if (!prevProps) { - return !!nextProps; - } - return hasPropsChanged(prevProps, nextProps, emits); - } else if (patchFlag & 8) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { - return true; - } - } - } - } else { - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); - } - return false; -} -function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; - } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; -} -function updateHOCHostEl({ vnode, parent }, el) { - while (parent) { - const root = parent.subTree; - if (root.suspense && root.suspense.activeBranch === vnode) { - root.el = vnode.el; - } - if (root === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; - } else { - break; - } - } -} - -const isSuspense = (type) => type.__isSuspense; -function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } else { - suspense.effects.push(fn); - } - } else { - queuePostFlushCb(fn); - } -} - -const Fragment = Symbol.for("v-fgt"); -const Text = Symbol.for("v-txt"); -const Comment = Symbol.for("v-cmt"); -const Static = Symbol.for("v-stc"); -let currentBlock = null; -let isBlockTreeEnabled = 1; -function setBlockTracking(value, inVOnce = false) { - isBlockTreeEnabled += value; - if (value < 0 && currentBlock && inVOnce) { - currentBlock.hasOnce = true; - } -} -function isVNode$2(value) { - return value ? value.__v_isVNode === true : false; -} -function isSameVNodeType(n1, n2) { - if (n2.shapeFlag & 6 && n1.component) { - const dirtyInstances = hmrDirtyComponents.get(n2.type); - if (dirtyInstances && dirtyInstances.has(n1.component)) { - n1.shapeFlag &= ~256; - n2.shapeFlag &= ~512; - return false; - } - } - return n1.type === n2.type && n1.key === n2.key; -} -const createVNodeWithArgsTransform = (...args) => { - return _createVNode( - ...args - ); -}; -const normalizeKey = ({ key }) => key != null ? key : null; -const normalizeRef = ({ - ref, - ref_key, - ref_for -}) => { - if (typeof ref === "number") { - ref = "" + ref; - } - return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; -}; -function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetStart: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null, - ctx: currentRenderingInstance - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - if (shapeFlag & 128) { - type.normalize(vnode); - } - } else if (children) { - vnode.shapeFlag |= isString(children) ? 8 : 16; - } - if (vnode.key !== vnode.key) { - warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); - } - if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself - !isBlockNode && // has current parent block - currentBlock && // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32) { - currentBlock.push(vnode); - } - return vnode; -} -const createVNode = createVNodeWithArgsTransform ; -function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - if (!type) { - warn$1(`Invalid vnode type when creating vnode: ${type}.`); - } - type = Comment; - } - if (isVNode$2(type)) { - const cloned = cloneVNode( - type, - props, - true - /* mergeRef: true */ - ); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } else { - currentBlock.push(cloned); - } - } - cloned.patchFlag = -2; - return cloned; - } - if (isClassComponent(type)) { - type = type.__vccOpts; - } - if (props) { - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (isObject(style)) { - if (isProxy(style) && !isArray(style)) { - style = extend({}, style); - } - props.style = normalizeStyle(style); - } - } - const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; - if (shapeFlag & 4 && isProxy(type)) { - type = toRaw(type); - warn$1( - `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, - ` -Component that was made reactive: `, - type - ); - } - return createBaseVNode( - type, - props, - children, - patchFlag, - dynamicProps, - shapeFlag, - isBlockNode, - true - ); -} -function guardReactiveProps(props) { - if (!props) return null; - return isProxy(props) || isInternalObject(props) ? extend({}, props) : props; -} -function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { - const { props, ref, patchFlag, children, transition } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref ? ( - // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) - ) : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, - target: vnode.target, - targetStart: vnode.targetStart, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor, - ctx: vnode.ctx, - ce: vnode.ce - }; - if (transition && cloneTransition) { - setTransitionHooks( - cloned, - transition.clone(cloned) - ); - } - return cloned; -} -function deepCloneVNode(vnode) { - const cloned = cloneVNode(vnode); - if (isArray(vnode.children)) { - cloned.children = vnode.children.map(deepCloneVNode); - } - return cloned; -} -function createTextVNode(text = " ", flag = 0) { - return createVNode(Text, null, text, flag); -} -function normalizeVNode$1(child) { - if (child == null || typeof child === "boolean") { - return createVNode(Comment); - } else if (isArray(child)) { - return createVNode( - Fragment, - null, - // #3666, avoid reference pollution when reusing vnode - child.slice() - ); - } else if (isVNode$2(child)) { - return cloneIfMounted(child); - } else { - return createVNode(Text, null, String(child)); - } -} -function cloneIfMounted(child) { - return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); -} -function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } else if (isArray(children)) { - type = 16; - } else if (typeof children === "object") { - if (shapeFlag & (1 | 64)) { - const slot = children.default; - if (slot) { - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } else { - type = 32; - const slotFlag = children._; - if (!slotFlag && !isInternalObject(children)) { - children._ctx = currentRenderingInstance; - } else if (slotFlag === 3 && currentRenderingInstance) { - if (currentRenderingInstance.slots._ === 1) { - children._ = 1; - } else { - children._ = 2; - vnode.patchFlag |= 1024; - } - } - } - } else if (isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32; - } else { - children = String(children); - if (shapeFlag & 64) { - type = 16; - children = [createTextVNode(children)]; - } else { - type = 8; - } - } - vnode.children = children; - vnode.shapeFlag |= type; -} -function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === "class") { - if (ret.class !== toMerge.class) { - ret.class = normalizeClass([ret.class, toMerge.class]); - } - } else if (key === "style") { - ret.style = normalizeStyle([ret.style, toMerge.style]); - } else if (isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { - ret[key] = existing ? [].concat(existing, incoming) : incoming; - } - } else if (key !== "") { - ret[key] = toMerge[key]; - } - } - } - return ret; -} -function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7, [ - vnode, - prevVNode - ]); -} - -const emptyAppContext = createAppContext(); -let uid = 0; -function createComponentInstance$1(vnode, parent, suspense) { - const type = vnode.type; - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid++, - vnode, - type, - parent, - appContext, - root: null, - // to be immediately set - next: null, - subTree: null, - // will be set synchronously right after creation - effect: null, - update: null, - // will be set synchronously right after creation - job: null, - scope: new EffectScope( - true - /* detached */ - ), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - ids: parent ? parent.ids : ["", 0, 0], - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - // to be set immediately - emitted: null, - // props default value - propsDefaults: EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: EMPTY_OBJ, - data: EMPTY_OBJ, - props: EMPTY_OBJ, - attrs: EMPTY_OBJ, - slots: EMPTY_OBJ, - refs: EMPTY_OBJ, - setupState: EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - { - instance.ctx = createDevRenderContext(instance); - } - instance.root = parent ? parent.root : instance; - instance.emit = emit.bind(null, instance); - if (vnode.ce) { - vnode.ce(instance); - } - return instance; -} -let currentInstance = null; -const getCurrentInstance = () => currentInstance || currentRenderingInstance; -let internalSetCurrentInstance; -let setInSSRSetupState; -{ - const g = getGlobalThis(); - const registerGlobalSetter = (key, setter) => { - let setters; - if (!(setters = g[key])) setters = g[key] = []; - setters.push(setter); - return (v) => { - if (setters.length > 1) setters.forEach((set) => set(v)); - else setters[0](v); - }; - }; - internalSetCurrentInstance = registerGlobalSetter( - `__VUE_INSTANCE_SETTERS__`, - (v) => currentInstance = v - ); - setInSSRSetupState = registerGlobalSetter( - `__VUE_SSR_SETTERS__`, - (v) => isInSSRComponentSetup = v - ); -} -const setCurrentInstance = (instance) => { - const prev = currentInstance; - internalSetCurrentInstance(instance); - instance.scope.on(); - return () => { - instance.scope.off(); - internalSetCurrentInstance(prev); - }; -}; -const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - internalSetCurrentInstance(null); -}; -const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); -function validateComponentName(name, { isNativeTag }) { - if (isBuiltInTag(name) || isNativeTag(name)) { - warn$1( - "Do not use built-in or reserved HTML elements as component id: " + name - ); - } -} -function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4; -} -let isInSSRComponentSetup = false; -function setupComponent$1(instance, isSSR = false, optimized = false) { - isSSR && setInSSRSetupState(isSSR); - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children, optimized); - const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; - isSSR && setInSSRSetupState(false); - return setupResult; -} -function setupStatefulComponent(instance, isSSR) { - var _a; - const Component = instance.type; - { - if (Component.name) { - validateComponentName(Component.name, instance.appContext.config); - } - if (Component.components) { - const names = Object.keys(Component.components); - for (let i = 0; i < names.length; i++) { - validateComponentName(names[i], instance.appContext.config); - } - } - if (Component.directives) { - const names = Object.keys(Component.directives); - for (let i = 0; i < names.length; i++) { - validateDirectiveName(names[i]); - } - } - if (Component.compilerOptions && isRuntimeOnly()) { - warn$1( - `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` - ); - } - } - instance.accessCache = /* @__PURE__ */ Object.create(null); - instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); - { - exposePropsOnRenderContext(instance); - } - const { setup } = Component; - if (setup) { - pauseTracking(); - const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; - const reset = setCurrentInstance(instance); - const setupResult = callWithErrorHandling( - setup, - instance, - 0, - [ - shallowReadonly(instance.props) , - setupContext - ] - ); - const isAsyncSetup = isPromise(setupResult); - resetTracking(); - reset(); - if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { - markAsyncBoundary(instance); - } - if (isAsyncSetup) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - return setupResult.then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }).catch((e) => { - handleError(e, instance, 0); - }); - } else { - instance.asyncDep = setupResult; - if (!instance.suspense) { - const name = (_a = Component.name) != null ? _a : "Anonymous"; - warn$1( - `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` - ); - } - } - } else { - handleSetupResult(instance, setupResult, isSSR); - } - } else { - finishComponentSetup(instance, isSSR); - } -} -function handleSetupResult(instance, setupResult, isSSR) { - if (isFunction(setupResult)) { - if (instance.type.__ssrInlineRender) { - instance.ssrRender = setupResult; - } else { - instance.render = setupResult; - } - } else if (isObject(setupResult)) { - if (isVNode$2(setupResult)) { - warn$1( - `setup() should not return VNodes directly - return a render function instead.` - ); - } - { - instance.devtoolsRawSetupState = setupResult; - } - instance.setupState = proxyRefs(setupResult); - { - exposeSetupStateOnRenderContext(instance); - } - } else if (setupResult !== void 0) { - warn$1( - `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` - ); - } - finishComponentSetup(instance, isSSR); -} -let compile; -const isRuntimeOnly = () => !compile; -function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - if (!instance.render) { - if (!isSSR && compile && !Component.render) { - const template = Component.template || resolveMergedOptions(instance).template; - if (template) { - { - startMeasure(instance, `compile`); - } - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = extend( - extend( - { - isCustomElement, - delimiters - }, - compilerOptions - ), - componentCompilerOptions - ); - Component.render = compile(template, finalCompilerOptions); - { - endMeasure(instance, `compile`); - } - } - } - instance.render = Component.render || NOOP; - } - { - const reset = setCurrentInstance(instance); - pauseTracking(); - try { - applyOptions(instance); - } finally { - resetTracking(); - reset(); - } - } - if (!Component.render && instance.render === NOOP && !isSSR) { - if (Component.template) { - warn$1( - `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` ) - ); - } else { - warn$1(`Component is missing template or render function: `, Component); - } - } -} -const attrsProxyHandlers = { - get(target, key) { - markAttrsAccessed(); - track(target, "get", ""); - return target[key]; - }, - set() { - warn$1(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn$1(`setupContext.attrs is readonly.`); - return false; - } -} ; -function getSlotsProxy(instance) { - return new Proxy(instance.slots, { - get(target, key) { - track(instance, "get", "$slots"); - return target[key]; - } - }); -} -function createSetupContext(instance) { - const expose = (exposed) => { - { - if (instance.exposed) { - warn$1(`expose() should be called only once per setup().`); - } - if (exposed != null) { - let exposedType = typeof exposed; - if (exposedType === "object") { - if (isArray(exposed)) { - exposedType = "array"; - } else if (isRef(exposed)) { - exposedType = "ref"; - } - } - if (exposedType !== "object") { - warn$1( - `expose() should be passed a plain object, received ${exposedType}.` - ); - } - } - } - instance.exposed = exposed || {}; - }; - { - let attrsProxy; - let slotsProxy; - return Object.freeze({ - get attrs() { - return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); - }, - get slots() { - return slotsProxy || (slotsProxy = getSlotsProxy(instance)); - }, - get emit() { - return (event, ...args) => instance.emit(event, ...args); - }, - expose - }); - } -} -function getComponentPublicInstance(instance) { - if (instance.exposed) { - return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - }, - has(target, key) { - return key in target || key in publicPropertiesMap; - } - })); - } else { - return instance.proxy; - } -} -const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); -function getComponentName(Component, includeInferred = true) { - return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; -} -function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; - } - } - if (!name && instance && instance.parent) { - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = inferFromRegistry( - instance.components || instance.parent.type.components - ) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; -} -function isClassComponent(value) { - return isFunction(value) && "__vccOpts" in value; -} - -const computed = (getterOrOptions, debugOptions) => { - const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); - { - const i = getCurrentInstance(); - if (i && i.appContext.config.warnRecursiveComputed) { - c._warnRecursive = true; - } - } - return c; -}; - -const version = "3.5.13"; -const warn = warn$1 ; -const _ssrUtils = { - createComponentInstance: createComponentInstance$1, - setupComponent: setupComponent$1, - renderComponentRoot: renderComponentRoot$1, - setCurrentRenderingInstance: setCurrentRenderingInstance$1, - isVNode: isVNode$2, - normalizeVNode: normalizeVNode$1, - getComponentPublicInstance, - ensureValidVNode: ensureValidVNode$1, - pushWarningContext: pushWarningContext$1, - popWarningContext: popWarningContext$1 -}; -const ssrUtils = _ssrUtils ; - -let policy = void 0; -const tt = typeof window !== "undefined" && window.trustedTypes; -if (tt) { - try { - policy = /* @__PURE__ */ tt.createPolicy("vue", { - createHTML: (val) => val - }); - } catch (e) { - warn(`Error creating trusted types policy: ${e}`); - } -} -const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; -const svgNS = "http://www.w3.org/2000/svg"; -const mathmlNS = "http://www.w3.org/1998/Math/MathML"; -const doc = typeof document !== "undefined" ? document : null; -const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); -const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: (child) => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, namespace, is, props) => { - const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); - if (tag === "select" && props && props.multiple != null) { - el.setAttribute("multiple", props.multiple); - } - return el; - }, - createText: (text) => doc.createTextNode(text), - createComment: (text) => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: (node) => node.parentNode, - nextSibling: (node) => node.nextSibling, - querySelector: (selector) => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ""); - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, namespace, start, end) { - const before = anchor ? anchor.previousSibling : parent.lastChild; - if (start && (start === end || start.nextSibling)) { - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) break; - } - } else { - templateContainer.innerHTML = unsafeToTrustedHTML( - namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content - ); - const template = templateContainer.content; - if (namespace === "svg" || namespace === "mathml") { - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; - } -}; - -const vtcKey = Symbol("_vtc"); - -function patchClass(el, value, isSVG) { - const transitionClasses = el[vtcKey]; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); - } - if (value == null) { - el.removeAttribute("class"); - } else if (isSVG) { - el.setAttribute("class", value); - } else { - el.className = value; - } -} - -const vShowOriginalDisplay = Symbol("_vod"); -const vShowHidden = Symbol("_vsh"); - -const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); - -const displayRE = /(^|;)\s*display\s*:/; -function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = isString(next); - let hasControlledDisplay = false; - if (next && !isCssString) { - if (prev) { - if (!isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ""); - } - } - } else { - for (const prevStyle of prev.split(";")) { - const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); - if (next[key] == null) { - setStyle(style, key, ""); - } - } - } - } - for (const key in next) { - if (key === "display") { - hasControlledDisplay = true; - } - setStyle(style, key, next[key]); - } - } else { - if (isCssString) { - if (prev !== next) { - const cssVarText = style[CSS_VAR_TEXT]; - if (cssVarText) { - next += ";" + cssVarText; - } - style.cssText = next; - hasControlledDisplay = displayRE.test(next); - } - } else if (prev) { - el.removeAttribute("style"); - } - } - if (vShowOriginalDisplay in el) { - el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; - if (el[vShowHidden]) { - style.display = "none"; - } - } -} -const semicolonRE = /[^\\];\s*$/; -const importantRE = /\s*!important$/; -function setStyle(style, name, val) { - if (isArray(val)) { - val.forEach((v) => setStyle(style, name, v)); - } else { - if (val == null) val = ""; - { - if (semicolonRE.test(val)) { - warn( - `Unexpected semicolon at the end of '${name}' style value: '${val}'` - ); - } - } - if (name.startsWith("--")) { - style.setProperty(name, val); - } else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - style.setProperty( - hyphenate(prefixed), - val.replace(importantRE, ""), - "important" - ); - } else { - style[prefixed] = val; - } - } - } -} -const prefixes = ["Webkit", "Moz", "ms"]; -const prefixCache = {}; -function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = camelize(rawName); - if (name !== "filter" && name in style) { - return prefixCache[rawName] = name; - } - name = capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return prefixCache[rawName] = prefixed; - } - } - return rawName; -} - -const xlinkNS = "http://www.w3.org/1999/xlink"; -function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) { - if (isSVG && key.startsWith("xlink:")) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } else { - el.setAttributeNS(xlinkNS, key, value); - } - } else { - if (value == null || isBoolean && !includeBooleanAttr(value)) { - el.removeAttribute(key); - } else { - el.setAttribute( - key, - isBoolean ? "" : isSymbol(value) ? String(value) : value - ); - } - } -} - -function patchDOMProp(el, key, value, parentComponent, attrName) { - if (key === "innerHTML" || key === "textContent") { - if (value != null) { - el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; - } - return; - } - const tag = el.tagName; - if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally - !tag.includes("-")) { - const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; - const newValue = value == null ? ( - // #11647: value should be set as empty string for null and undefined, - // but <input type="checkbox"> should be set as 'on'. - el.type === "checkbox" ? "on" : "" - ) : String(value); - if (oldValue !== newValue || !("_value" in el)) { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - el._value = value; - return; - } - let needRemove = false; - if (value === "" || value == null) { - const type = typeof el[key]; - if (type === "boolean") { - value = includeBooleanAttr(value); - } else if (value == null && type === "string") { - value = ""; - needRemove = true; - } else if (type === "number") { - value = 0; - needRemove = true; - } - } - try { - el[key] = value; - } catch (e) { - if (!needRemove) { - warn( - `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, - e - ); - } - } - needRemove && el.removeAttribute(attrName || key); -} - -function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); -} -function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); -} -const veiKey = Symbol("_vei"); -function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - const invokers = el[veiKey] || (el[veiKey] = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - existingInvoker.value = sanitizeEventValue(nextValue, rawName) ; - } else { - const [name, options] = parseName(rawName); - if (nextValue) { - const invoker = invokers[rawName] = createInvoker( - sanitizeEventValue(nextValue, rawName) , - instance - ); - addEventListener(el, name, invoker, options); - } else if (existingInvoker) { - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = void 0; - } - } -} -const optionsModifierRE = /(?:Once|Passive|Capture)$/; -function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while (m = name.match(optionsModifierRE)) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); - return [event, options]; -} -let cachedNow = 0; -const p = /* @__PURE__ */ Promise.resolve(); -const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); -function createInvoker(initialValue, instance) { - const invoker = (e) => { - if (!e._vts) { - e._vts = Date.now(); - } else if (e._vts <= invoker.attached) { - return; - } - callWithAsyncErrorHandling( - patchStopImmediatePropagation(e, invoker.value), - instance, - 5, - [e] - ); - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; -} -function sanitizeEventValue(value, propName) { - if (isFunction(value) || isArray(value)) { - return value; - } - warn( - `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? -Expected function or array of functions, received type ${typeof value}.` - ); - return NOOP; -} -function patchStopImmediatePropagation(e, value) { - if (isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map( - (fn) => (e2) => !e2._stopped && fn && fn(e2) - ); - } else { - return value; - } -} - -const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter -key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; -const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { - const isSVG = namespace === "svg"; - if (key === "class") { - patchClass(el, nextValue, isSVG); - } else if (key === "style") { - patchStyle(el, prevValue, nextValue); - } else if (isOn(key)) { - if (!isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue); - if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { - patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); - } - } else if ( - // #11081 force set props for possible async custom element - el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) - ) { - patchDOMProp(el, camelize(key), nextValue, parentComponent, key); - } else { - if (key === "true-value") { - el._trueValue = nextValue; - } else if (key === "false-value") { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } -}; -function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - if (key === "innerHTML" || key === "textContent") { - return true; - } - if (key in el && isNativeOn(key) && isFunction(value)) { - return true; - } - return false; - } - if (key === "spellcheck" || key === "draggable" || key === "translate") { - return false; - } - if (key === "form") { - return false; - } - if (key === "list" && el.tagName === "INPUT") { - return false; - } - if (key === "type" && el.tagName === "TEXTAREA") { - return false; - } - if (key === "width" || key === "height") { - const tag = el.tagName; - if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { - return false; - } - } - if (isNativeOn(key) && isString(value)) { - return false; - } - return key in el; -} - -const getModelAssigner = (vnode) => { - const fn = vnode.props["onUpdate:modelValue"] || false; - return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; -}; -function onCompositionStart(e) { - e.target.composing = true; -} -function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event("input")); - } -} -const assignKey = Symbol("_assign"); -const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el[assignKey] = getModelAssigner(vnode); - const castToNumber = number || vnode.props && vnode.props.type === "number"; - addEventListener(el, lazy ? "change" : "input", (e) => { - if (e.target.composing) return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = looseToNumber(domValue); - } - el[assignKey](domValue); - }); - if (trim) { - addEventListener(el, "change", () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, "compositionstart", onCompositionStart); - addEventListener(el, "compositionend", onCompositionEnd); - addEventListener(el, "change", onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? "" : value; - }, - beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { - el[assignKey] = getModelAssigner(vnode); - if (el.composing) return; - const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; - const newValue = value == null ? "" : value; - if (elValue === newValue) { - return; - } - if (document.activeElement === el && el.type !== "range") { - if (lazy && value === oldValue) { - return; - } - if (trim && el.value.trim() === newValue) { - return; - } - } - el.value = newValue; - } -}; -const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el[assignKey] = getModelAssigner(vnode); - addEventListener(el, "change", () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el[assignKey]; - if (isArray(modelValue)) { - const index = looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } else if (isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } else { - cloned.delete(elementValue); - } - assign(cloned); - } else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el[assignKey] = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } -}; -function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - let checked; - if (isArray(value)) { - checked = looseIndexOf(value, vnode.props.value) > -1; - } else if (isSet(value)) { - checked = value.has(vnode.props.value); - } else { - if (value === oldValue) return; - checked = looseEqual(value, getCheckboxValue(el, true)); - } - if (el.checked !== checked) { - el.checked = checked; - } -} -const vModelRadio = { - created(el, { value }, vnode) { - el.checked = looseEqual(value, vnode.props.value); - el[assignKey] = getModelAssigner(vnode); - addEventListener(el, "change", () => { - el[assignKey](getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el[assignKey] = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = looseEqual(value, vnode.props.value); - } - } -}; -function getValue(el) { - return "_value" in el ? el._value : el.value; -} -function getCheckboxValue(el, checked) { - const key = checked ? "_trueValue" : "_falseValue"; - return key in el ? el[key] : checked; -} -function initVModelForSSR() { - vModelText.getSSRProps = ({ value }) => ({ value }); - vModelRadio.getSSRProps = ({ value }, vnode) => { - if (vnode.props && looseEqual(vnode.props.value, value)) { - return { checked: true }; - } - }; - vModelCheckbox.getSSRProps = ({ value }, vnode) => { - if (isArray(value)) { - if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) { - return { checked: true }; - } - } else if (isSet(value)) { - if (vnode.props && value.has(vnode.props.value)) { - return { checked: true }; - } - } else if (value) { - return { checked: true }; - } - }; -} - -const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); -let renderer; -function ensureRenderer() { - return renderer || (renderer = createRenderer(rendererOptions)); -} -const createApp = (...args) => { - const app = ensureRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); - } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) return; - const component = app._component; - if (!isFunction(component) && !component.render && !component.template) { - component.template = container.innerHTML; - } - if (container.nodeType === 1) { - container.textContent = ""; - } - const proxy = mount(container, false, resolveRootNamespace(container)); - if (container instanceof Element) { - container.removeAttribute("v-cloak"); - container.setAttribute("data-v-app", ""); - } - return proxy; - }; - return app; -}; -function resolveRootNamespace(container) { - if (container instanceof SVGElement) { - return "svg"; - } - if (typeof MathMLElement === "function" && container instanceof MathMLElement) { - return "mathml"; - } -} -function injectNativeTagCheck(app) { - Object.defineProperty(app.config, "isNativeTag", { - value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), - writable: false - }); -} -function injectCompilerOptionsCheck(app) { - { - const isCustomElement = app.config.isCustomElement; - Object.defineProperty(app.config, "isCustomElement", { - get() { - return isCustomElement; - }, - set() { - warn( - `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` - ); - } - }); - const compilerOptions = app.config.compilerOptions; - const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. -- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. -- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader -- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; - Object.defineProperty(app.config, "compilerOptions", { - get() { - warn(msg); - return compilerOptions; - }, - set() { - warn(msg); - } - }); - } -} -function normalizeContainer(container) { - if (isString(container)) { - const res = document.querySelector(container); - if (!res) { - warn( - `Failed to mount app: mount target selector "${container}" returned null.` - ); - } - return res; - } - if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { - warn( - `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` - ); - } - return container; -} -let ssrDirectiveInitialized = false; -const initDirectivesForSSR = () => { - if (!ssrDirectiveInitialized) { - ssrDirectiveInitialized = true; - initVModelForSSR(); - } -} ; - -const shouldIgnoreProp = /* @__PURE__ */ makeMap( - `,key,ref,innerHTML,textContent,ref_key,ref_for` -); -function ssrRenderAttrs(props, tag) { - let ret = ""; - for (const key in props) { - if (shouldIgnoreProp(key) || isOn(key) || tag === "textarea" && key === "value") { - continue; - } - const value = props[key]; - if (key === "class") { - ret += ` class="${ssrRenderClass(value)}"`; - } else if (key === "style") { - ret += ` style="${ssrRenderStyle(value)}"`; - } else if (key === "className") { - ret += ` class="${String(value)}"`; - } else { - ret += ssrRenderDynamicAttr(key, value, tag); - } - } - return ret; -} -function ssrRenderDynamicAttr(key, value, tag) { - if (!isRenderableAttrValue(value)) { - return ``; - } - const attrKey = tag && (tag.indexOf("-") > 0 || isSVGTag(tag)) ? key : propsToAttrMap[key] || key.toLowerCase(); - if (isBooleanAttr(attrKey)) { - return includeBooleanAttr(value) ? ` ${attrKey}` : ``; - } else if (isSSRSafeAttrName(attrKey)) { - return value === "" ? ` ${attrKey}` : ` ${attrKey}="${escapeHtml(value)}"`; - } else { - console.warn( - `[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}` - ); - return ``; - } -} -function ssrRenderAttr(key, value) { - if (!isRenderableAttrValue(value)) { - return ``; - } - return ` ${key}="${escapeHtml(value)}"`; -} -function ssrRenderClass(raw) { - return escapeHtml(normalizeClass(raw)); -} -function ssrRenderStyle(raw) { - if (!raw) { - return ""; - } - if (isString(raw)) { - return escapeHtml(raw); - } - const styles = normalizeStyle(raw); - return escapeHtml(stringifyStyle(styles)); -} - -function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) { - return renderComponentVNode( - createVNode(comp, props, children), - parentComponent, - slotScopeId - ); -} - -const { ensureValidVNode } = ssrUtils; -function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { - push(`<!--[-->`); - ssrRenderSlotInner( - slots, - slotName, - slotProps, - fallbackRenderFn, - push, - parentComponent, - slotScopeId - ); - push(`<!--]-->`); -} -function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) { - const slotFn = slots[slotName]; - if (slotFn) { - const slotBuffer = []; - const bufferedPush = (item) => { - slotBuffer.push(item); - }; - const ret = slotFn( - slotProps, - bufferedPush, - parentComponent, - slotScopeId ? " " + slotScopeId : "" - ); - if (isArray(ret)) { - const validSlotContent = ensureValidVNode(ret); - if (validSlotContent) { - renderVNodeChildren( - push, - validSlotContent, - parentComponent, - slotScopeId - ); - } else if (fallbackRenderFn) { - fallbackRenderFn(); - } - } else { - let isEmptySlot = true; - if (transition) { - isEmptySlot = false; - } else { - for (let i = 0; i < slotBuffer.length; i++) { - if (!isComment(slotBuffer[i])) { - isEmptySlot = false; - break; - } - } - } - if (isEmptySlot) { - if (fallbackRenderFn) { - fallbackRenderFn(); - } - } else { - let start = 0; - let end = slotBuffer.length; - if (transition && slotBuffer[0] === "<!--[-->" && slotBuffer[end - 1] === "<!--]-->") { - start++; - end--; - } - for (let i = start; i < end; i++) { - push(slotBuffer[i]); - } - } - } - } else if (fallbackRenderFn) { - fallbackRenderFn(); - } -} -const commentTestRE = /^<!--[\s\S]*-->$/; -const commentRE = /<!--[^]*?-->/gm; -function isComment(item) { - if (typeof item !== "string" || !commentTestRE.test(item)) return false; - if (item.length <= 8) return true; - return !item.replace(commentRE, "").trim(); -} - -function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { - parentPush("<!--teleport start-->"); - const context = parentComponent.appContext.provides[ssrContextKey]; - const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); - const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); - const bufferIndex = targetBuffer.length; - let teleportContent; - if (disabled) { - contentRenderFn(parentPush); - teleportContent = `<!--teleport start anchor--><!--teleport anchor-->`; - } else { - const { getBuffer, push } = createBuffer(); - push(`<!--teleport start anchor-->`); - contentRenderFn(push); - push(`<!--teleport anchor-->`); - teleportContent = getBuffer(); - } - targetBuffer.splice(bufferIndex, 0, teleportContent); - parentPush("<!--teleport end-->"); -} - -function ssrInterpolate(value) { - return escapeHtml(toDisplayString(value)); -} - -function ssrRenderList(source, renderItem) { - if (isArray(source) || isString(source)) { - for (let i = 0, l = source.length; i < l; i++) { - renderItem(source[i], i); - } - } else if (typeof source === "number") { - if (!Number.isInteger(source)) { - warn(`The v-for range expect an integer value but got ${source}.`); - return; - } - for (let i = 0; i < source; i++) { - renderItem(i + 1, i); - } - } else if (isObject(source)) { - if (source[Symbol.iterator]) { - const arr = Array.from(source); - for (let i = 0, l = arr.length; i < l; i++) { - renderItem(arr[i], i); - } - } else { - const keys = Object.keys(source); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - renderItem(source[key], key, i); - } - } - } -} - -async function ssrRenderSuspense(push, { default: renderContent }) { - if (renderContent) { - renderContent(); - } else { - push(`<!---->`); - } -} - -function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) { - if (typeof dir !== "function" && dir.getSSRProps) { - return dir.getSSRProps( - { - dir, - instance: ssrUtils.getComponentPublicInstance(instance.$), - value, - oldValue: void 0, - arg, - modifiers - }, - null - ) || {}; - } - return {}; -} - -const ssrLooseEqual = looseEqual; -function ssrLooseContain(arr, value) { - return looseIndexOf(arr, value) > -1; -} -function ssrRenderDynamicModel(type, model, value) { - switch (type) { - case "radio": - return looseEqual(model, value) ? " checked" : ""; - case "checkbox": - return (isArray(model) ? ssrLooseContain(model, value) : model) ? " checked" : ""; - default: - return ssrRenderAttr("value", model); - } -} -function ssrGetDynamicModelProps(existingProps = {}, model) { - const { type, value } = existingProps; - switch (type) { - case "radio": - return looseEqual(model, value) ? { checked: true } : null; - case "checkbox": - return (isArray(model) ? ssrLooseContain(model, value) : model) ? { checked: true } : null; - default: - return { value: model }; - } -} - -function ssrCompile(template, instance) { - { - throw new Error( - `On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.` - ); - } -} - -const { - createComponentInstance, - setCurrentRenderingInstance, - setupComponent, - renderComponentRoot, - normalizeVNode, - pushWarningContext, - popWarningContext -} = ssrUtils; -function createBuffer() { - let appendable = false; - const buffer = []; - return { - getBuffer() { - return buffer; - }, - push(item) { - const isStringItem = isString(item); - if (appendable && isStringItem) { - buffer[buffer.length - 1] += item; - return; - } - buffer.push(item); - appendable = isStringItem; - if (isPromise(item) || isArray(item) && item.hasAsync) { - buffer.hasAsync = true; - } - } - }; -} -function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { - const instance = vnode.component = createComponentInstance( - vnode, - parentComponent, - null - ); - pushWarningContext(vnode); - const res = setupComponent( - instance, - true - /* isSSR */ - ); - popWarningContext(); - const hasAsyncSetup = isPromise(res); - let prefetches = instance.sp; - if (hasAsyncSetup || prefetches) { - const p = Promise.resolve(res).then(() => { - if (hasAsyncSetup) prefetches = instance.sp; - if (prefetches) { - return Promise.all( - prefetches.map((prefetch) => prefetch.call(instance.proxy)) - ); - } - }).catch(NOOP); - return p.then(() => renderComponentSubTree(instance, slotScopeId)); - } else { - return renderComponentSubTree(instance, slotScopeId); - } -} -function renderComponentSubTree(instance, slotScopeId) { - pushWarningContext(instance.vnode); - const comp = instance.type; - const { getBuffer, push } = createBuffer(); - if (isFunction(comp)) { - let root = renderComponentRoot(instance); - if (!comp.props) { - for (const key in instance.attrs) { - if (key.startsWith(`data-v-`)) { - (root.props || (root.props = {}))[key] = ``; - } - } - } - renderVNode(push, instance.subTree = root, instance, slotScopeId); - } else { - if ((!instance.render || instance.render === NOOP) && !instance.ssrRender && !comp.ssrRender && isString(comp.template)) { - comp.ssrRender = ssrCompile(comp.template); - } - const ssrRender = instance.ssrRender || comp.ssrRender; - if (ssrRender) { - let attrs = instance.inheritAttrs !== false ? instance.attrs : void 0; - let hasCloned = false; - let cur = instance; - while (true) { - const scopeId = cur.vnode.scopeId; - if (scopeId) { - if (!hasCloned) { - attrs = { ...attrs }; - hasCloned = true; - } - attrs[scopeId] = ""; - } - const parent = cur.parent; - if (parent && parent.subTree && parent.subTree === cur.vnode) { - cur = parent; - } else { - break; - } - } - if (slotScopeId) { - if (!hasCloned) attrs = { ...attrs }; - const slotScopeIdList = slotScopeId.trim().split(" "); - for (let i = 0; i < slotScopeIdList.length; i++) { - attrs[slotScopeIdList[i]] = ""; - } - } - const prev = setCurrentRenderingInstance(instance); - try { - ssrRender( - instance.proxy, - push, - instance, - attrs, - // compiler-optimized bindings - instance.props, - instance.setupState, - instance.data, - instance.ctx - ); - } finally { - setCurrentRenderingInstance(prev); - } - } else if (instance.render && instance.render !== NOOP) { - renderVNode( - push, - instance.subTree = renderComponentRoot(instance), - instance, - slotScopeId - ); - } else { - const componentName = comp.name || comp.__file || `<Anonymous>`; - warn(`Component ${componentName} is missing template or render function.`); - push(`<!---->`); - } - } - popWarningContext(); - return getBuffer(); -} -function renderVNode(push, vnode, parentComponent, slotScopeId) { - const { type, shapeFlag, children, dirs, props } = vnode; - if (dirs) { - vnode.props = applySSRDirectives(vnode, props, dirs); - } - switch (type) { - case Text: - push(escapeHtml(children)); - break; - case Comment: - push( - children ? `<!--${escapeHtmlComment(children)}-->` : `<!---->` - ); - break; - case Static: - push(children); - break; - case Fragment: - if (vnode.slotScopeIds) { - slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" "); - } - push(`<!--[-->`); - renderVNodeChildren( - push, - children, - parentComponent, - slotScopeId - ); - push(`<!--]-->`); - break; - default: - if (shapeFlag & 1) { - renderElementVNode(push, vnode, parentComponent, slotScopeId); - } else if (shapeFlag & 6) { - push(renderComponentVNode(vnode, parentComponent, slotScopeId)); - } else if (shapeFlag & 64) { - renderTeleportVNode(push, vnode, parentComponent, slotScopeId); - } else if (shapeFlag & 128) { - renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); - } else { - warn( - "[@vue/server-renderer] Invalid VNode type:", - type, - `(${typeof type})` - ); - } - } -} -function renderVNodeChildren(push, children, parentComponent, slotScopeId) { - for (let i = 0; i < children.length; i++) { - renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); - } -} -function renderElementVNode(push, vnode, parentComponent, slotScopeId) { - const tag = vnode.type; - let { props, children, shapeFlag, scopeId } = vnode; - let openTag = `<${tag}`; - if (props) { - openTag += ssrRenderAttrs(props, tag); - } - if (scopeId) { - openTag += ` ${scopeId}`; - } - let curParent = parentComponent; - let curVnode = vnode; - while (curParent && curVnode === curParent.subTree) { - curVnode = curParent.vnode; - if (curVnode.scopeId) { - openTag += ` ${curVnode.scopeId}`; - } - curParent = curParent.parent; - } - if (slotScopeId) { - openTag += ` ${slotScopeId}`; - } - push(openTag + `>`); - if (!isVoidTag(tag)) { - let hasChildrenOverride = false; - if (props) { - if (props.innerHTML) { - hasChildrenOverride = true; - push(props.innerHTML); - } else if (props.textContent) { - hasChildrenOverride = true; - push(escapeHtml(props.textContent)); - } else if (tag === "textarea" && props.value) { - hasChildrenOverride = true; - push(escapeHtml(props.value)); - } - } - if (!hasChildrenOverride) { - if (shapeFlag & 8) { - push(escapeHtml(children)); - } else if (shapeFlag & 16) { - renderVNodeChildren( - push, - children, - parentComponent, - slotScopeId - ); - } - } - push(`</${tag}>`); - } -} -function applySSRDirectives(vnode, rawProps, dirs) { - const toMerge = []; - for (let i = 0; i < dirs.length; i++) { - const binding = dirs[i]; - const { - dir: { getSSRProps } - } = binding; - if (getSSRProps) { - const props = getSSRProps(binding, vnode); - if (props) toMerge.push(props); - } - } - return mergeProps(rawProps || {}, ...toMerge); -} -function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { - const target = vnode.props && vnode.props.to; - const disabled = vnode.props && vnode.props.disabled; - if (!target) { - if (!disabled) { - warn(`[@vue/server-renderer] Teleport is missing target prop.`); - } - return []; - } - if (!isString(target)) { - warn( - `[@vue/server-renderer] Teleport target must be a query selector string.` - ); - return []; - } - ssrRenderTeleport( - push, - (push2) => { - renderVNodeChildren( - push2, - vnode.children, - parentComponent, - slotScopeId - ); - }, - target, - disabled || disabled === "", - parentComponent - ); -} - -const { isVNode: isVNode$1 } = ssrUtils; -function nestedUnrollBuffer(buffer, parentRet, startIndex) { - if (!buffer.hasAsync) { - return parentRet + unrollBufferSync$1(buffer); - } - let ret = parentRet; - for (let i = startIndex; i < buffer.length; i += 1) { - const item = buffer[i]; - if (isString(item)) { - ret += item; - continue; - } - if (isPromise(item)) { - return item.then((nestedItem) => { - buffer[i] = nestedItem; - return nestedUnrollBuffer(buffer, ret, i); - }); - } - const result = nestedUnrollBuffer(item, ret, 0); - if (isPromise(result)) { - return result.then((nestedItem) => { - buffer[i] = nestedItem; - return nestedUnrollBuffer(buffer, "", i); - }); - } - ret = result; - } - return ret; -} -function unrollBuffer$1(buffer) { - return nestedUnrollBuffer(buffer, "", 0); -} -function unrollBufferSync$1(buffer) { - let ret = ""; - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (isString(item)) { - ret += item; - } else { - ret += unrollBufferSync$1(item); - } - } - return ret; -} -async function renderToString(input, context = {}) { - if (isVNode$1(input)) { - return renderToString(createApp({ render: () => input }), context); - } - const vnode = createVNode(input._component, input._props); - vnode.appContext = input._context; - input.provide(ssrContextKey, context); - const buffer = await renderComponentVNode(vnode); - const result = await unrollBuffer$1(buffer); - await resolveTeleports(context); - if (context.__watcherHandles) { - for (const unwatch of context.__watcherHandles) { - unwatch(); - } - } - return result; -} -async function resolveTeleports(context) { - if (context.__teleportBuffers) { - context.teleports = context.teleports || {}; - for (const key in context.__teleportBuffers) { - context.teleports[key] = await unrollBuffer$1( - await Promise.all([context.__teleportBuffers[key]]) - ); - } - } -} - -const { isVNode } = ssrUtils; -async function unrollBuffer(buffer, stream) { - if (buffer.hasAsync) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (isPromise(item)) { - item = await item; - } - if (isString(item)) { - stream.push(item); - } else { - await unrollBuffer(item, stream); - } - } - } else { - unrollBufferSync(buffer, stream); - } -} -function unrollBufferSync(buffer, stream) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (isString(item)) { - stream.push(item); - } else { - unrollBufferSync(item, stream); - } - } -} -function renderToSimpleStream(input, context, stream) { - if (isVNode(input)) { - return renderToSimpleStream( - createApp({ render: () => input }), - context, - stream - ); - } - const vnode = createVNode(input._component, input._props); - vnode.appContext = input._context; - input.provide(ssrContextKey, context); - Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => { - if (context.__watcherHandles) { - for (const unwatch of context.__watcherHandles) { - unwatch(); - } - } - }).then(() => stream.push(null)).catch((error) => { - stream.destroy(error); - }); - return stream; -} -function renderToStream(input, context = {}) { - console.warn( - `[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.` - ); - return renderToNodeStream(input, context); -} -function renderToNodeStream(input, context = {}) { - { - throw new Error( - `ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.` - ); - } -} -function pipeToNodeWritable(input, context = {}, writable) { - renderToSimpleStream(input, context, { - push(content) { - if (content != null) { - writable.write(content); - } else { - writable.end(); - } - }, - destroy(err) { - writable.destroy(err); - } - }); -} -function renderToWebStream(input, context = {}) { - if (typeof ReadableStream !== "function") { - throw new Error( - `ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.` - ); - } - const encoder = new TextEncoder(); - let cancelled = false; - return new ReadableStream({ - start(controller) { - renderToSimpleStream(input, context, { - push(content) { - if (cancelled) return; - if (content != null) { - controller.enqueue(encoder.encode(content)); - } else { - controller.close(); - } - }, - destroy(err) { - controller.error(err); - } - }); - }, - cancel() { - cancelled = true; - } - }); -} -function pipeToWebWritable(input, context = {}, writable) { - const writer = writable.getWriter(); - const encoder = new TextEncoder(); - let hasReady = false; - try { - hasReady = isPromise(writer.ready); - } catch (e) { - } - renderToSimpleStream(input, context, { - async push(content) { - if (hasReady) { - await writer.ready; - } - if (content != null) { - return writer.write(encoder.encode(content)); - } else { - return writer.close(); - } - }, - destroy(err) { - console.log(err); - writer.close(); - } - }); -} - -initDirectivesForSSR(); - -export { pipeToNodeWritable, pipeToWebWritable, renderToNodeStream, renderToSimpleStream, renderToStream, renderToString, renderToWebStream, ssrGetDirectiveProps, ssrGetDynamicModelProps, includeBooleanAttr as ssrIncludeBooleanAttr, ssrInterpolate, ssrLooseContain, ssrLooseEqual, ssrRenderAttr, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrRenderDynamicAttr, ssrRenderDynamicModel, ssrRenderList, ssrRenderSlot, ssrRenderSlotInner, ssrRenderStyle, ssrRenderSuspense, ssrRenderTeleport, renderVNode as ssrRenderVNode }; diff --git a/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js b/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js deleted file mode 100644 index c0cfd01..0000000 --- a/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js +++ /dev/null @@ -1,5 +0,0 @@ -/** -* @vue/server-renderer v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let e,t,n,l,r,i,s,o,a,u,c;function f(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let p={},d=[],h=()=>{},g=()=>!1,m=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),y=e=>e.startsWith("onUpdate:"),_=Object.assign,b=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},x=Object.prototype.hasOwnProperty,S=(e,t)=>x.call(e,t),w=Array.isArray,k=e=>"[object Map]"===$(e),C=e=>"[object Set]"===$(e),T=e=>"[object Date]"===$(e),O=e=>"function"==typeof e,R=e=>"string"==typeof e,P=e=>"symbol"==typeof e,E=e=>null!==e&&"object"==typeof e,M=e=>(E(e)||O(e))&&O(e.then)&&O(e.catch),A=Object.prototype.toString,$=e=>A.call(e),j=e=>$(e).slice(8,-1),D=e=>"[object Object]"===$(e),I=e=>R(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,N=f(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),F=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},L=/-(\w)/g,V=F(e=>e.replace(L,(e,t)=>t?t.toUpperCase():"")),W=/\B([A-Z])/g,U=F(e=>e.replace(W,"-$1").toLowerCase()),B=F(e=>e.charAt(0).toUpperCase()+e.slice(1)),H=F(e=>e?`on${B(e)}`:""),q=(e,t)=>!Object.is(e,t),G=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},z=(e,t,n,l=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:l,value:n})},K=e=>{let t=parseFloat(e);return isNaN(t)?e:t},J=()=>e||(e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function Z(e){if(w(e)){let t={};for(let n=0;n<e.length;n++){let l=e[n],r=R(l)?function(e){let t={};return e.replace(Y,"").split(X).forEach(e=>{if(e){let n=e.split(Q);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}(l):Z(l);if(r)for(let e in r)t[e]=r[e]}return t}if(R(e)||E(e))return e}let X=/;(?![^(]*\))/g,Q=/:([^]+)/,Y=/\/\*[^]*?\*\//g;function ee(e){let t="";if(R(e))t=e;else if(w(e))for(let n=0;n<e.length;n++){let l=ee(e[n]);l&&(t+=l+" ")}else if(E(e))for(let n in e)e[n]&&(t+=n+" ");return t.trim()}let et=f("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),en=f("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),el="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",er=f(el),ei=f(el+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function es(e){return!!e||""===e}let eo=/[>/="'\u0009\u000a\u000c\u0020]/,ea={},eu={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"};function ec(e){if(null==e)return!1;let t=typeof e;return"string"===t||"number"===t||"boolean"===t}let ef=/["'&<>]/;function ep(e){let t,n;let l=""+e,r=ef.exec(l);if(!r)return l;let i="",s=0;for(n=r.index;n<l.length;n++){switch(l.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}s!==n&&(i+=l.slice(s,n)),s=n+1,i+=t}return s!==n?i+l.slice(s,n):i}let ed=/^-?>|<!--|-->|--!>|<!-$/g;function eh(e,t){if(e===t)return!0;let n=T(e),l=T(t);if(n||l)return!!n&&!!l&&e.getTime()===t.getTime();if(n=P(e),l=P(t),n||l)return e===t;if(n=w(e),l=w(t),n||l)return!!n&&!!l&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let l=0;n&&l<e.length;l++)n=eh(e[l],t[l]);return n}(e,t);if(n=E(e),l=E(t),n||l){if(!n||!l||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let l=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(l&&!r||!l&&r||!eh(e[n],t[n]))return!1}}return String(e)===String(t)}function eg(e,t){return e.findIndex(e=>eh(e,t))}let ev=e=>!!(e&&!0===e.__v_isRef),em=e=>R(e)?e:null==e?"":w(e)||E(e)&&(e.toString===A||!O(e.toString))?ev(e)?em(e.value):JSON.stringify(e,ey,2):String(e),ey=(e,t)=>ev(t)?ey(e,t.value):k(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],l)=>(e[e_(t,l)+" =>"]=n,e),{})}:C(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>e_(e))}:P(t)?e_(t):!E(t)||w(t)||D(t)?t:String(t),e_=(e,t="")=>{var n;return P(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class eb{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=t,!e&&t&&(this.index=(t.scopes||(t.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let n=t;try{return t=this,e()}finally{t=n}}}on(){t=this}off(){t=this.parent}stop(e){if(this._active){let t,n;for(t=0,this._active=!1,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,this.effects.length=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}let ex=new WeakSet;class eS{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,t&&t.active&&t.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,ex.has(this)&&(ex.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||ek(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,eD(this),eT(this);let e=n,t=eM;n=this,eM=!0;try{return this.fn()}finally{eO(this),n=e,eM=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)eE(e);this.deps=this.depsTail=void 0,eD(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?ex.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){eR(this)&&this.run()}get dirty(){return eR(this)}}let ew=0;function ek(e,t=!1){if(e.flags|=8,t){e.next=r,r=e;return}e.next=l,l=e}function eC(){let e;if(!(--ew>0)){if(r){let e=r;for(r=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;l;){let t=l;for(l=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eT(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function eO(e){let t;let n=e.depsTail,l=n;for(;l;){let e=l.prevDep;-1===l.version?(l===n&&(n=e),eE(l),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(l)):t=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=e}e.deps=t,e.depsTail=n}function eR(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(eP(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function eP(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eI))return;e.globalVersion=eI;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!eR(e)){e.flags&=-3;return}let l=n,r=eM;n=e,eM=!0;try{eT(e);let n=e.fn(e._value);(0===t.version||q(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{n=l,eM=r,eO(e),e.flags&=-3}}function eE(e,t=!1){let{dep:n,prevSub:l,nextSub:r}=e;if(l&&(l.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=l,e.nextSub=void 0),n.subs===e&&(n.subs=l,!l&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)eE(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}let eM=!0,eA=[];function e$(){eA.push(eM),eM=!1}function ej(){let e=eA.pop();eM=void 0===e||e}function eD(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=n;n=void 0;try{t()}finally{n=e}}}let eI=0;class eN{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eF{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!n||!eM||n===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==n)t=this.activeLink=new eN(n,this),n.deps?(t.prevDep=n.depsTail,n.depsTail.nextDep=t,n.depsTail=t):n.deps=n.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let l=t.dep.subs;l!==t&&(t.prevSub=l,l&&(l.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=n.depsTail,t.nextDep=void 0,n.depsTail.nextDep=t,n.depsTail=t,n.deps===t&&(n.deps=e)}return t}trigger(e){this.version++,eI++,this.notify(e)}notify(e){ew++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{eC()}}}let eL=new WeakMap,eV=Symbol(""),eW=Symbol(""),eU=Symbol("");function eB(e,t,l){if(eM&&n){let t=eL.get(e);t||eL.set(e,t=new Map);let n=t.get(l);n||(t.set(l,n=new eF),n.map=t,n.key=l),n.track()}}function eH(e,t,n,l,r,i){let s=eL.get(e);if(!s){eI++;return}let o=e=>{e&&e.trigger()};if(ew++,"clear"===t)s.forEach(o);else{let r=w(e),i=r&&I(n);if(r&&"length"===n){let e=Number(l);s.forEach((t,n)=>{("length"===n||n===eU||!P(n)&&n>=e)&&o(t)})}else switch((void 0!==n||s.has(void 0))&&o(s.get(n)),i&&o(s.get(eU)),t){case"add":r?i&&o(s.get("length")):(o(s.get(eV)),k(e)&&o(s.get(eW)));break;case"delete":!r&&(o(s.get(eV)),k(e)&&o(s.get(eW)));break;case"set":k(e)&&o(s.get(eV))}}eC()}function eq(e){let t=tv(e);return t===e?t:(eB(t,"iterate",eU),th(e)?t:t.map(tm))}function eG(e){return eB(e=tv(e),"iterate",eU),e}let ez={__proto__:null,[Symbol.iterator](){return eK(this,Symbol.iterator,tm)},concat(...e){return eq(this).concat(...e.map(e=>w(e)?eq(e):e))},entries(){return eK(this,"entries",e=>(e[1]=tm(e[1]),e))},every(e,t){return eZ(this,"every",e,t,void 0,arguments)},filter(e,t){return eZ(this,"filter",e,t,e=>e.map(tm),arguments)},find(e,t){return eZ(this,"find",e,t,tm,arguments)},findIndex(e,t){return eZ(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eZ(this,"findLast",e,t,tm,arguments)},findLastIndex(e,t){return eZ(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eZ(this,"forEach",e,t,void 0,arguments)},includes(...e){return eQ(this,"includes",e)},indexOf(...e){return eQ(this,"indexOf",e)},join(e){return eq(this).join(e)},lastIndexOf(...e){return eQ(this,"lastIndexOf",e)},map(e,t){return eZ(this,"map",e,t,void 0,arguments)},pop(){return eY(this,"pop")},push(...e){return eY(this,"push",e)},reduce(e,...t){return eX(this,"reduce",e,t)},reduceRight(e,...t){return eX(this,"reduceRight",e,t)},shift(){return eY(this,"shift")},some(e,t){return eZ(this,"some",e,t,void 0,arguments)},splice(...e){return eY(this,"splice",e)},toReversed(){return eq(this).toReversed()},toSorted(e){return eq(this).toSorted(e)},toSpliced(...e){return eq(this).toSpliced(...e)},unshift(...e){return eY(this,"unshift",e)},values(){return eK(this,"values",tm)}};function eK(e,t,n){let l=eG(e),r=l[t]();return l===e||th(e)||(r._next=r.next,r.next=()=>{let e=r._next();return e.value&&(e.value=n(e.value)),e}),r}let eJ=Array.prototype;function eZ(e,t,n,l,r,i){let s=eG(e),o=s!==e&&!th(e),a=s[t];if(a!==eJ[t]){let t=a.apply(e,i);return o?tm(t):t}let u=n;s!==e&&(o?u=function(t,l){return n.call(this,tm(t),l,e)}:n.length>2&&(u=function(t,l){return n.call(this,t,l,e)}));let c=a.call(s,u,l);return o&&r?r(c):c}function eX(e,t,n,l){let r=eG(e),i=n;return r!==e&&(th(e)?n.length>3&&(i=function(t,l,r){return n.call(this,t,l,r,e)}):i=function(t,l,r){return n.call(this,t,tm(l),r,e)}),r[t](i,...l)}function eQ(e,t,n){let l=tv(e);eB(l,"iterate",eU);let r=l[t](...n);return(-1===r||!1===r)&&tg(n[0])?(n[0]=tv(n[0]),l[t](...n)):r}function eY(e,t,n=[]){e$(),ew++;let l=tv(e)[t].apply(e,n);return eC(),ej(),l}let e0=f("__proto__,__v_isRef,__isVue"),e1=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(P));function e2(e){P(e)||(e=String(e));let t=tv(this);return eB(t,"has",e),t.hasOwnProperty(e)}class e6{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;let l=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!l;if("__v_isReadonly"===t)return l;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(l?r?ta:to:r?ts:ti).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let i=w(e);if(!l){let e;if(i&&(e=ez[t]))return e;if("hasOwnProperty"===t)return e2}let s=Reflect.get(e,t,t_(e)?e:n);return(P(t)?e1.has(t):e0(t))?s:(l||eB(e,"get",t),r)?s:t_(s)?i&&I(t)?s:s.value:E(s)?l?tc(s):tu(s):s}}class e4 extends e6{constructor(e=!1){super(!1,e)}set(e,t,n,l){let r=e[t];if(!this._isShallow){let t=td(r);if(th(n)||td(n)||(r=tv(r),n=tv(n)),!w(e)&&t_(r)&&!t_(n))return!t&&(r.value=n,!0)}let i=w(e)&&I(t)?Number(t)<e.length:S(e,t),s=Reflect.set(e,t,n,t_(e)?e:l);return e===tv(l)&&(i?q(n,r)&&eH(e,"set",t,n):eH(e,"add",t,n)),s}deleteProperty(e,t){let n=S(e,t);e[t];let l=Reflect.deleteProperty(e,t);return l&&n&&eH(e,"delete",t,void 0),l}has(e,t){let n=Reflect.has(e,t);return P(t)&&e1.has(t)||eB(e,"has",t),n}ownKeys(e){return eB(e,"iterate",w(e)?"length":eV),Reflect.ownKeys(e)}}let e8=new e4,e3=new class extends e6{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},e5=new e4(!0),e9=e=>e,e7=e=>Reflect.getPrototypeOf(e);function te(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function tt(e,t){let n=function(e,t){let n={get(n){let l=this.__v_raw,r=tv(l),i=tv(n);e||(q(n,i)&&eB(r,"get",n),eB(r,"get",i));let{has:s}=e7(r),o=t?e9:e?ty:tm;return s.call(r,n)?o(l.get(n)):s.call(r,i)?o(l.get(i)):void(l!==r&&l.get(n))},get size(){let t=this.__v_raw;return e||eB(tv(t),"iterate",eV),Reflect.get(t,"size",t)},has(t){let n=this.__v_raw,l=tv(n),r=tv(t);return e||(q(t,r)&&eB(l,"has",t),eB(l,"has",r)),t===r?n.has(t):n.has(t)||n.has(r)},forEach(n,l){let r=this,i=r.__v_raw,s=tv(i),o=t?e9:e?ty:tm;return e||eB(s,"iterate",eV),i.forEach((e,t)=>n.call(l,o(e),o(t),r))}};return _(n,e?{add:te("add"),set:te("set"),delete:te("delete"),clear:te("clear")}:{add(e){t||th(e)||td(e)||(e=tv(e));let n=tv(this);return e7(n).has.call(n,e)||(n.add(e),eH(n,"add",e,e)),this},set(e,n){t||th(n)||td(n)||(n=tv(n));let l=tv(this),{has:r,get:i}=e7(l),s=r.call(l,e);s||(e=tv(e),s=r.call(l,e));let o=i.call(l,e);return l.set(e,n),s?q(n,o)&&eH(l,"set",e,n):eH(l,"add",e,n),this},delete(e){let t=tv(this),{has:n,get:l}=e7(t),r=n.call(t,e);r||(e=tv(e),r=n.call(t,e)),l&&l.call(t,e);let i=t.delete(e);return r&&eH(t,"delete",e,void 0),i},clear(){let e=tv(this),t=0!==e.size,n=e.clear();return t&&eH(e,"clear",void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach(l=>{n[l]=function(...n){let r=this.__v_raw,i=tv(r),s=k(i),o="entries"===l||l===Symbol.iterator&&s,a=r[l](...n),u=t?e9:e?ty:tm;return e||eB(i,"iterate","keys"===l&&s?eW:eV),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}),n}(e,t);return(t,l,r)=>"__v_isReactive"===l?!e:"__v_isReadonly"===l?e:"__v_raw"===l?t:Reflect.get(S(n,l)&&l in t?n:t,l,r)}let tn={get:tt(!1,!1)},tl={get:tt(!1,!0)},tr={get:tt(!0,!1)},ti=new WeakMap,ts=new WeakMap,to=new WeakMap,ta=new WeakMap;function tu(e){return td(e)?e:tf(e,!1,e8,tn,ti)}function tc(e){return tf(e,!0,e3,tr,to)}function tf(e,t,n,l,r){if(!E(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let i=r.get(e);if(i)return i;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(j(e));if(0===s)return e;let o=new Proxy(e,2===s?l:n);return r.set(e,o),o}function tp(e){return td(e)?tp(e.__v_raw):!!(e&&e.__v_isReactive)}function td(e){return!!(e&&e.__v_isReadonly)}function th(e){return!!(e&&e.__v_isShallow)}function tg(e){return!!e&&!!e.__v_raw}function tv(e){let t=e&&e.__v_raw;return t?tv(t):e}let tm=e=>E(e)?tu(e):e,ty=e=>E(e)?tc(e):e;function t_(e){return!!e&&!0===e.__v_isRef}let tb={get:(e,t,n)=>{var l;return"__v_raw"===t?e:t_(l=Reflect.get(e,t,n))?l.value:l},set:(e,t,n,l)=>{let r=e[t];return t_(r)&&!t_(n)?(r.value=n,!0):Reflect.set(e,t,n,l)}};function tx(e){return tp(e)?e:new Proxy(e,tb)}class tS{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eF(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eI-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&n!==this)return ek(this,!0),!0}get value(){let e=this.dep.track();return eP(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let tw={},tk=new WeakMap;function tC(e,t=1/0,n){if(t<=0||!E(e)||e.__v_skip||(n=n||new Set).has(e))return e;if(n.add(e),t--,t_(e))tC(e.value,t,n);else if(w(e))for(let l=0;l<e.length;l++)tC(e[l],t,n);else if(C(e)||k(e))e.forEach(e=>{tC(e,t,n)});else if(D(e)){for(let l in e)tC(e[l],t,n);for(let l of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,l)&&tC(e[l],t,n)}return e}function tT(e,t,n,l){try{return l?e(...l):e()}catch(e){tR(e,t,n)}}function tO(e,t,n,l){if(O(e)){let r=tT(e,t,n,l);return r&&M(r)&&r.catch(e=>{tR(e,t,n)}),r}if(w(e)){let r=[];for(let i=0;i<e.length;i++)r.push(tO(e[i],t,n,l));return r}}function tR(e,t,n,l=!0){t&&t.vnode;let{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||p;if(t){let l=t.parent,i=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){let t=l.ec;if(t){for(let n=0;n<t.length;n++)if(!1===t[n](e,i,s))return}l=l.parent}if(r){e$(),tT(r,null,10,[e,i,s]),ej();return}}!function(e,t,n,l=!0,r=!1){if(r)throw e;console.error(e)}(e,0,0,l,i)}let tP=[],tE=-1,tM=[],tA=null,t$=0,tj=Promise.resolve(),tD=null;function tI(e){let t=tD||tj;return e?t.then(this?e.bind(this):e):t}function tN(e){if(!(1&e.flags)){let t=tW(e),n=tP[tP.length-1];!n||!(2&e.flags)&&t>=tW(n)?tP.push(e):tP.splice(function(e){let t=tE+1,n=tP.length;for(;t<n;){let l=t+n>>>1,r=tP[l],i=tW(r);i<e||i===e&&2&r.flags?t=l+1:n=l}return t}(t),0,e),e.flags|=1,tF()}}function tF(){tD||(tD=tj.then(function e(t){try{for(tE=0;tE<tP.length;tE++){let e=tP[tE];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),tT(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;tE<tP.length;tE++){let e=tP[tE];e&&(e.flags&=-2)}tE=-1,tP.length=0,tV(),tD=null,(tP.length||tM.length)&&e()}}))}function tL(e,t,n=tE+1){for(;n<tP.length;n++){let t=tP[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;tP.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function tV(e){if(tM.length){let e=[...new Set(tM)].sort((e,t)=>tW(e)-tW(t));if(tM.length=0,tA){tA.push(...e);return}for(t$=0,tA=e;t$<tA.length;t$++){let e=tA[t$];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}tA=null,t$=0}}let tW=e=>null==e.id?2&e.flags?-1:1/0:e.id,tU=null,tB=null;function tH(e){let t=tU;return tU=e,tB=e&&e.type.__scopeId||null,t}function tq(e,t,n,l){let r=e.dirs,i=t&&t.dirs;for(let s=0;s<r.length;s++){let o=r[s];i&&(o.oldValue=i[s].value);let a=o.dir[l];a&&(e$(),tO(a,n,8,[e.el,o,e,t]),ej())}}let tG=Symbol("_vte"),tz=e=>e.__isTeleport;function tK(e,t){6&e.shapeFlag&&e.component?(e.transition=t,tK(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function tJ(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function tZ(e,t,n,l,r=!1){if(w(e)){e.forEach((e,i)=>tZ(e,t&&(w(t)?t[i]:t),n,l,r));return}if(tX(l)&&!r){512&l.shapeFlag&&l.type.__asyncResolved&&l.component.subTree.component&&tZ(e,t,n,l.component.subTree);return}let i=4&l.shapeFlag?lx(l.component):l.el,s=r?null:i,{i:o,r:a}=e,u=t&&t.r,c=o.refs===p?o.refs={}:o.refs,f=o.setupState,d=tv(f),h=f===p?()=>!1:e=>S(d,e);if(null!=u&&u!==a&&(R(u)?(c[u]=null,h(u)&&(f[u]=null)):t_(u)&&(u.value=null)),O(a))tT(a,o,12,[s,c]);else{let t=R(a),l=t_(a);if(t||l){let o=()=>{if(e.f){let n=t?h(a)?f[a]:c[a]:a.value;r?w(n)&&b(n,i):w(n)?n.includes(i)||n.push(i):t?(c[a]=[i],h(a)&&(f[a]=c[a])):(a.value=[i],e.k&&(c[e.k]=a.value))}else t?(c[a]=s,h(a)&&(f[a]=s)):l&&(a.value=s,e.k&&(c[e.k]=s))};s?(o.id=-1,nL(o,n)):o()}}}let tX=e=>!!e.type.__asyncLoader,tQ=e=>e.type.__isKeepAlive;function tY(e,t){t1(e,"a",t)}function t0(e,t){t1(e,"da",t)}function t1(e,t,n=lp){let l=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(t2(t,l,n),n){let e=n.parent;for(;e&&e.parent;)tQ(e.parent.vnode)&&function(e,t,n,l){let r=t2(t,e,l,!0);t7(()=>{b(l[t],r)},n)}(l,t,n,e),e=e.parent}}function t2(e,t,n=lp,l=!1){if(n){let r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{e$();let r=ld(n),i=tO(t,n,e,l);return r(),ej(),i});return l?r.unshift(i):r.push(i),i}}let t6=e=>(t,n=lp)=>{lv&&"sp"!==e||t2(e,(...e)=>t(...e),n)},t4=t6("bm"),t8=t6("m"),t3=t6("bu"),t5=t6("u"),t9=t6("bum"),t7=t6("um"),ne=t6("sp"),nt=t6("rtg"),nn=t6("rtc");function nl(e,t=lp){t2("ec",e,t)}let nr=Symbol.for("v-ndc"),ni=e=>e?lg(e)?lx(e):ni(e.parent):null,ns=_(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ni(e.parent),$root:e=>ni(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>np(e),$forceUpdate:e=>e.f||(e.f=()=>{tN(e.update)}),$nextTick:e=>e.n||(e.n=tI.bind(e.proxy)),$watch:e=>nG.bind(e)}),no=(e,t)=>e!==p&&!e.__isScriptSetup&&S(e,t),na={get({_:e},t){let n,l,r;if("__v_skip"===t)return!0;let{ctx:i,setupState:s,data:o,props:a,accessCache:u,type:c,appContext:f}=e;if("$"!==t[0]){let l=u[t];if(void 0!==l)switch(l){case 1:return s[t];case 2:return o[t];case 4:return i[t];case 3:return a[t]}else{if(no(s,t))return u[t]=1,s[t];if(o!==p&&S(o,t))return u[t]=2,o[t];if((n=e.propsOptions[0])&&S(n,t))return u[t]=3,a[t];if(i!==p&&S(i,t))return u[t]=4,i[t];nc&&(u[t]=0)}}let d=ns[t];return d?("$attrs"===t&&eB(e.attrs,"get",""),d(e)):(l=c.__cssModules)&&(l=l[t])?l:i!==p&&S(i,t)?(u[t]=4,i[t]):S(r=f.config.globalProperties,t)?r[t]:void 0},set({_:e},t,n){let{data:l,setupState:r,ctx:i}=e;return no(r,t)?(r[t]=n,!0):l!==p&&S(l,t)?(l[t]=n,!0):!S(e.props,t)&&!("$"===t[0]&&t.slice(1)in e)&&(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:l,appContext:r,propsOptions:i}},s){let o;return!!n[s]||e!==p&&S(e,s)||no(t,s)||(o=i[0])&&S(o,s)||S(l,s)||S(ns,s)||S(r.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:S(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function nu(e){return w(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let nc=!0;function nf(e,t,n){tO(w(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function np(e){let t;let n=e.type,{mixins:l,extends:r}=n,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:i.length||l||r?(t={},i.length&&i.forEach(e=>nd(t,e,o,!0)),nd(t,n,o)):t=n,E(n)&&s.set(n,t),t}function nd(e,t,n,l=!1){let{mixins:r,extends:i}=t;for(let s in i&&nd(e,i,n,!0),r&&r.forEach(t=>nd(e,t,n,!0)),t)if(l&&"expose"===s);else{let l=nh[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}let nh={data:ng,props:n_,emits:n_,methods:ny,computed:ny,beforeCreate:nm,created:nm,beforeMount:nm,mounted:nm,beforeUpdate:nm,updated:nm,beforeDestroy:nm,beforeUnmount:nm,destroyed:nm,unmounted:nm,activated:nm,deactivated:nm,errorCaptured:nm,serverPrefetch:nm,components:ny,directives:ny,watch:function(e,t){if(!e)return t;if(!t)return e;let n=_(Object.create(null),e);for(let l in t)n[l]=nm(e[l],t[l]);return n},provide:ng,inject:function(e,t){return ny(nv(e),nv(t))}};function ng(e,t){return t?e?function(){return _(O(e)?e.call(this,this):e,O(t)?t.call(this,this):t)}:t:e}function nv(e){if(w(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function nm(e,t){return e?[...new Set([].concat(e,t))]:t}function ny(e,t){return e?_(Object.create(null),e,t):t}function n_(e,t){return e?w(e)&&w(t)?[...new Set([...e,...t])]:_(Object.create(null),nu(e),nu(null!=t?t:{})):t}function nb(){return{app:null,config:{isNativeTag:g,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let nx=0,nS=null;function nw(e,t,n=!1){let l=lp||tU;if(l||nS){let r=nS?nS._context.provides:l?null==l.parent?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&O(t)?t.call(l&&l.proxy):t}}let nk={},nC=()=>Object.create(nk),nT=e=>Object.getPrototypeOf(e)===nk;function nO(e,t,n,l){let r;let[i,s]=e.propsOptions,o=!1;if(t)for(let a in t){let u;if(N(a))continue;let c=t[a];i&&S(i,u=V(a))?s&&s.includes(u)?(r||(r={}))[u]=c:n[u]=c:nZ(e.emitsOptions,a)||a in l&&c===l[a]||(l[a]=c,o=!0)}if(s){let t=tv(n),l=r||p;for(let r=0;r<s.length;r++){let o=s[r];n[o]=nR(i,t,o,l[o],e,!S(l,o))}}return o}function nR(e,t,n,l,r,i){let s=e[n];if(null!=s){let e=S(s,"default");if(e&&void 0===l){let e=s.default;if(s.type!==Function&&!s.skipFactory&&O(e)){let{propsDefaults:i}=r;if(n in i)l=i[n];else{let s=ld(r);l=i[n]=e.call(null,t),s()}}else l=e;r.ce&&r.ce._setProp(n,l)}s[0]&&(i&&!e?l=!1:s[1]&&(""===l||l===U(n))&&(l=!0))}return l}let nP=new WeakMap;function nE(e){return!("$"===e[0]||N(e))}let nM=e=>"_"===e[0]||"$stable"===e,nA=e=>w(e)?e.map(lr):[lr(e)],n$=(e,t,n)=>{if(t._n)return t;let l=function(e,t=tU,n){if(!t||e._n)return e;let l=(...n)=>{let r;l._d&&n5(-1);let i=tH(t);try{r=e(...n)}finally{tH(i),l._d&&n5(1)}return r};return l._n=!0,l._c=!0,l._d=!0,l}((...e)=>nA(t(...e)),n);return l._c=!1,l},nj=(e,t,n)=>{let l=e._ctx;for(let n in e){if(nM(n))continue;let r=e[n];if(O(r))t[n]=n$(n,r,l);else if(null!=r){let e=nA(r);t[n]=()=>e}}},nD=(e,t)=>{let n=nA(t);e.slots.default=()=>n},nI=(e,t,n)=>{for(let l in t)(n||"_"!==l)&&(e[l]=t[l])},nN=(e,t,n)=>{let l=e.slots=nC();if(32&e.vnode.shapeFlag){let e=t._;e?(nI(l,t,n),n&&z(l,"_",e,!0)):nj(t,l)}else t&&nD(e,t)},nF=(e,t,n)=>{let{vnode:l,slots:r}=e,i=!0,s=p;if(32&l.shapeFlag){let e=t._;e?n&&1===e?i=!1:nI(r,t,n):(i=!t.$stable,nj(t,r)),s=t}else t&&(nD(e,t),s={default:1});if(i)for(let e in r)nM(e)||null!=s[e]||delete r[e]},nL=function(e,t){t&&t.pendingBranch?w(e)?t.effects.push(...e):t.effects.push(e):(w(e)?tM.push(...e):tA&&-1===e.id?tA.splice(t$+1,0,e):1&e.flags||(tM.push(e),e.flags|=1),tF())};function nV({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function nW({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function nU(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}let nB=Symbol.for("v-scx"),nH=()=>nw(nB);function nq(e,n,l=p){let r;let{immediate:i,deep:s,flush:o,once:a}=l,c=_({},l),f=n&&i||!n&&"post"!==o;if(lv){if("sync"===o){let e=nH();r=e.__watcherHandles||(e.__watcherHandles=[])}else if(!f){let e=()=>{};return e.stop=h,e.resume=h,e.pause=h,e}}let d=lp;c.call=(e,t,n)=>tO(e,d,t,n);let g=!1;"post"===o?c.scheduler=e=>{nL(e,d&&d.suspense)}:"sync"!==o&&(g=!0,c.scheduler=(e,t)=>{t?e():tN(e)}),c.augmentJob=e=>{n&&(e.flags|=4),g&&(e.flags|=2,d&&(e.id=d.uid,e.i=d))};let m=function(e,n,l=p){let r,i,s,o;let{immediate:a,deep:c,once:f,scheduler:d,augmentJob:g,call:m}=l,y=e=>c?e:th(e)||!1===c||0===c?tC(e,1):tC(e),_=!1,x=!1;if(t_(e)?(i=()=>e.value,_=th(e)):tp(e)?(i=()=>y(e),_=!0):w(e)?(x=!0,_=e.some(e=>tp(e)||th(e)),i=()=>e.map(e=>t_(e)?e.value:tp(e)?y(e):O(e)?m?m(e,2):e():void 0)):i=O(e)?n?m?()=>m(e,2):e:()=>{if(s){e$();try{s()}finally{ej()}}let t=u;u=r;try{return m?m(e,3,[o]):e(o)}finally{u=t}}:h,n&&c){let e=i,t=!0===c?1/0:c;i=()=>tC(e(),t)}let S=t,k=()=>{r.stop(),S&&S.active&&b(S.effects,r)};if(f&&n){let e=n;n=(...t)=>{e(...t),k()}}let C=x?Array(e.length).fill(tw):tw,T=e=>{if(1&r.flags&&(r.dirty||e)){if(n){let e=r.run();if(c||_||(x?e.some((e,t)=>q(e,C[t])):q(e,C))){s&&s();let t=u;u=r;try{let t=[e,C===tw?void 0:x&&C[0]===tw?[]:C,o];m?m(n,3,t):n(...t),C=e}finally{u=t}}}else r.run()}};return g&&g(T),(r=new eS(i)).scheduler=d?()=>d(T,!1):T,o=e=>(function(e,t=!1,n=u){if(n){let t=tk.get(n);t||tk.set(n,t=[]),t.push(e)}})(e,!1,r),s=r.onStop=()=>{let e=tk.get(r);if(e){if(m)m(e,4);else for(let t of e)t();tk.delete(r)}},n?a?T(!0):C=r.run():d?d(T.bind(null,!0),!0):r.run(),k.pause=r.pause.bind(r),k.resume=r.resume.bind(r),k.stop=k,k}(e,n,c);return lv&&(r?r.push(m):f&&m()),m}function nG(e,t,n){let l;let r=this.proxy,i=R(e)?e.includes(".")?nz(r,e):()=>r[e]:e.bind(r,r);O(t)?l=t:(l=t.handler,n=t);let s=ld(this),o=nq(i,l.bind(r),n);return s(),o}function nz(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}let nK=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${V(t)}Modifiers`]||e[`${U(t)}Modifiers`];function nJ(e,t,...n){let l;if(e.isUnmounted)return;let r=e.vnode.props||p,i=n,s=t.startsWith("update:"),o=s&&nK(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>R(e)?e.trim():e)),o.number&&(i=n.map(K)));let a=r[l=H(t)]||r[l=H(V(t))];!a&&s&&(a=r[l=H(U(t))]),a&&tO(a,e,6,i);let u=r[l+"Once"];if(u){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,tO(u,e,6,i)}}function nZ(e,t){return!!(e&&m(t))&&(S(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||S(e,U(t))||S(e,t))}function nX(e){let t,n;let{type:l,vnode:r,proxy:i,withProxy:s,propsOptions:[o],slots:a,attrs:u,emit:c,render:f,renderCache:p,props:d,data:h,setupState:g,ctx:m,inheritAttrs:_}=e,b=tH(e);try{if(4&r.shapeFlag){let e=s||i;t=lr(f.call(e,e,p,d,g,h,m)),n=u}else t=lr(l.length>1?l(d,{attrs:u,slots:a,emit:c}):l(d,null)),n=l.props?u:nQ(u)}catch(n){tR(n,e,1),t=ln(n4)}let x=t;if(n&&!1!==_){let e=Object.keys(n),{shapeFlag:t}=x;e.length&&7&t&&(o&&e.some(y)&&(n=nY(n,o)),x=ll(x,n,!1,!0))}return r.dirs&&((x=ll(x,null,!1,!0)).dirs=x.dirs?x.dirs.concat(r.dirs):r.dirs),r.transition&&tK(x,r.transition),t=x,tH(b),t}let nQ=e=>{let t;for(let n in e)("class"===n||"style"===n||m(n))&&((t||(t={}))[n]=e[n]);return t},nY=(e,t)=>{let n={};for(let l in e)y(l)&&l.slice(9)in t||(n[l]=e[l]);return n};function n0(e,t,n){let l=Object.keys(t);if(l.length!==Object.keys(e).length)return!0;for(let r=0;r<l.length;r++){let i=l[r];if(t[i]!==e[i]&&!nZ(n,i))return!0}return!1}let n1=e=>e.__isSuspense,n2=Symbol.for("v-fgt"),n6=Symbol.for("v-txt"),n4=Symbol.for("v-cmt"),n8=Symbol.for("v-stc"),n3=1;function n5(e,t=!1){n3+=e}function n9(e){return!!e&&!0===e.__v_isVNode}function n7(e,t){return e.type===t.type&&e.key===t.key}let le=({key:e})=>null!=e?e:null,lt=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?R(e)||t_(e)||O(e)?{i:tU,r:e,k:t,f:!!n}:e:null),ln=function(e,t=null,n=null,l=0,r=null,i=!1){var s,o;if(e&&e!==nr||(e=n4),n9(e)){let l=ll(e,t,!0);return n&&ls(l,n),l.patchFlag=-2,l}if(O(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=(o=t)?tg(o)||nT(o)?_({},o):o:null;e&&!R(e)&&(t.class=ee(e)),E(n)&&(tg(n)&&!w(n)&&(n=_({},n)),t.style=Z(n))}let a=R(e)?1:n1(e)?128:tz(e)?64:E(e)?4:O(e)?2:0;return function(e,t=null,n=null,l=0,r=null,i=e===n2?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&le(t),ref:t&<(t),scopeId:tB,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:l,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:tU};return o?(ls(a,n),128&i&&e.normalize(a)):n&&(a.shapeFlag|=R(n)?8:16),a}(e,t,n,l,r,a,i,!0)};function ll(e,t,n=!1,l=!1){let{props:r,ref:i,patchFlag:s,children:o,transition:a}=e,u=t?lo(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&le(u),ref:t&&t.ref?n&&i?w(i)?i.concat(lt(t)):[i,lt(t)]:lt(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==n2?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ll(e.ssContent),ssFallback:e.ssFallback&&ll(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&l&&tK(c,a.clone(c)),c}function lr(e){return null==e||"boolean"==typeof e?ln(n4):w(e)?ln(n2,null,e.slice()):n9(e)?li(e):ln(n6,null,String(e))}function li(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:ll(e)}function ls(e,t){let n=0,{shapeFlag:l}=e;if(null==t)t=null;else if(w(t))n=16;else if("object"==typeof t){if(65&l){let n=t.default;n&&(n._c&&(n._d=!1),ls(e,n()),n._c&&(n._d=!0));return}{n=32;let l=t._;l||nT(t)?3===l&&tU&&(1===tU.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=tU}}else O(t)?(t={default:t,_ctx:tU},n=32):(t=String(t),64&l?(n=16,t=[function(e=" ",t=0){return ln(n6,null,e,t)}(t)]):n=8);e.children=t,e.shapeFlag|=n}function lo(...e){let t={};for(let n=0;n<e.length;n++){let l=e[n];for(let e in l)if("class"===e)t.class!==l.class&&(t.class=ee([t.class,l.class]));else if("style"===e)t.style=Z([t.style,l.style]);else if(m(e)){let n=t[e],r=l[e];r&&n!==r&&!(w(n)&&n.includes(r))&&(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=l[e])}return t}function la(e,t,n,l=null){tO(e,t,7,[n,l])}let lu=nb(),lc=0;function lf(e,t,n){let l=e.type,r=(t?t.appContext:e.appContext)||lu,i={uid:lc++,vnode:e,type:l,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new eb(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:function e(t,n,l=!1){let r=l?nP:n.propsCache,i=r.get(t);if(i)return i;let s=t.props,o={},a=[],u=!1;if(!O(t)){let r=t=>{u=!0;let[l,r]=e(t,n,!0);_(o,l),r&&a.push(...r)};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}if(!s&&!u)return E(t)&&r.set(t,d),d;if(w(s))for(let e=0;e<s.length;e++){let t=V(s[e]);nE(t)&&(o[t]=p)}else if(s)for(let e in s){let t=V(e);if(nE(t)){let n=s[e],l=o[t]=w(n)||O(n)?{type:n}:_({},n),r=l.type,i=!1,u=!0;if(w(r))for(let e=0;e<r.length;++e){let t=r[e],n=O(t)&&t.name;if("Boolean"===n){i=!0;break}"String"===n&&(u=!1)}else i=O(r)&&"Boolean"===r.name;l[0]=i,l[1]=u,(i||S(l,"default"))&&a.push(t)}}let c=[o,a];return E(t)&&r.set(t,c),c}(l,r),emitsOptions:function e(t,n,l=!1){let r=n.emitsCache,i=r.get(t);if(void 0!==i)return i;let s=t.emits,o={},a=!1;if(!O(t)){let r=t=>{let l=e(t,n,!0);l&&(a=!0,_(o,l))};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}return s||a?(w(s)?s.forEach(e=>o[e]=null):_(o,s),E(t)&&r.set(t,o),o):(E(t)&&r.set(t,null),null)}(l,r),emit:null,emitted:null,propsDefaults:p,inheritAttrs:l.inheritAttrs,ctx:p,data:p,props:p,attrs:p,slots:p,refs:p,setupState:p,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=nJ.bind(null,i),e.ce&&e.ce(i),i}let lp=null;{let e=J(),t=(t,n)=>{let l;return(l=e[t])||(l=e[t]=[]),l.push(n),e=>{l.length>1?l.forEach(t=>t(e)):l[0](e)}};i=t("__VUE_INSTANCE_SETTERS__",e=>lp=e),s=t("__VUE_SSR_SETTERS__",e=>lv=e)}let ld=e=>{let t=lp;return i(e),e.scope.on(),()=>{e.scope.off(),i(t)}},lh=()=>{lp&&lp.scope.off(),i(null)};function lg(e){return 4&e.vnode.shapeFlag}let lv=!1;function lm(e,t=!1,n=!1){t&&s(t);let{props:l,children:r}=e.vnode,i=lg(e);!function(e,t,n,l=!1){let r={},i=nC();for(let n in e.propsDefaults=Object.create(null),nO(e,t,r,i),e.propsOptions[0])n in r||(r[n]=void 0);n?e.props=l?r:tf(r,!1,e5,tl,ts):e.type.props?e.props=r:e.props=i,e.attrs=i}(e,l,i,t),nN(e,r,n);let o=i?function(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,na);let{setup:l}=n;if(l){e$();let n=e.setupContext=l.length>1?{attrs:new Proxy(e.attrs,lb),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}:null,r=ld(e),i=tT(l,e,0,[e.props,n]),s=M(i);if(ej(),r(),(s||e.sp)&&!tX(e)&&tJ(e),s){if(i.then(lh,lh),t)return i.then(n=>{ly(e,n,t)}).catch(t=>{tR(t,e,0)});e.asyncDep=i}else ly(e,i,t)}else l_(e,t)}(e,t):void 0;return t&&s(!1),o}function ly(e,t,n){O(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:E(t)&&(e.setupState=tx(t)),l_(e,n)}function l_(e,t,n){let l=e.type;if(!e.render){if(!t&&o&&!l.render){let t=l.template||np(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:i,compilerOptions:s}=l,a=_(_({isCustomElement:n,delimiters:i},r),s);l.render=o(t,a)}}e.render=l.render||h}{let t=ld(e);e$();try{!function(e){let t=np(e),n=e.proxy,l=e.ctx;nc=!1,t.beforeCreate&&nf(t.beforeCreate,e,"bc");let{data:r,computed:i,methods:s,watch:o,provide:a,inject:u,created:c,beforeMount:f,mounted:p,beforeUpdate:d,updated:g,activated:m,deactivated:y,beforeDestroy:_,beforeUnmount:b,destroyed:x,unmounted:S,render:k,renderTracked:C,renderTriggered:T,errorCaptured:P,serverPrefetch:M,expose:A,inheritAttrs:$,components:j,directives:D,filters:I}=t;if(u&&function(e,t,n=h){for(let n in w(e)&&(e=nv(e)),e){let l;let r=e[n];t_(l=E(r)?"default"in r?nw(r.from||n,r.default,!0):nw(r.from||n):nw(r))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e}):t[n]=l}}(u,l,null),s)for(let e in s){let t=s[e];O(t)&&(l[e]=t.bind(n))}if(r){let t=r.call(n,n);E(t)&&(e.data=tu(t))}if(nc=!0,i)for(let e in i){let t=i[e],r=O(t)?t.bind(n,n):O(t.get)?t.get.bind(n,n):h,s=lS({get:r,set:!O(t)&&O(t.set)?t.set.bind(n):h});Object.defineProperty(l,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,l,r){let i=r.includes(".")?nz(l,r):()=>l[r];if(R(t)){let e=n[t];O(e)&&nq(i,e,void 0)}else if(O(t)){var s;s=t.bind(l),nq(i,s,void 0)}else if(E(t)){if(w(t))t.forEach(t=>e(t,n,l,r));else{let e=O(t.handler)?t.handler.bind(l):n[t.handler];O(e)&&nq(i,e,t)}}}(o[e],l,n,e);if(a){let e=O(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{!function(e,t){if(lp){let n=lp.provides,l=lp.parent&&lp.parent.provides;l===n&&(n=lp.provides=Object.create(l)),n[e]=t}}(t,e[t])})}function N(e,t){w(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(c&&nf(c,e,"c"),N(t4,f),N(t8,p),N(t3,d),N(t5,g),N(tY,m),N(t0,y),N(nl,P),N(nn,C),N(nt,T),N(t9,b),N(t7,S),N(ne,M),w(A)){if(A.length){let t=e.exposed||(e.exposed={});A.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}k&&e.render===h&&(e.render=k),null!=$&&(e.inheritAttrs=$),j&&(e.components=j),D&&(e.directives=D),M&&tJ(e)}(e)}finally{ej(),t()}}}let lb={get:(e,t)=>(eB(e,"get",""),e[t])};function lx(e){var t;return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tx((!S(t=e.exposed,"__v_skip")&&Object.isExtensible(t)&&z(t,"__v_skip",!0),t)),{get:(t,n)=>n in t?t[n]:n in ns?ns[n](e):void 0,has:(e,t)=>t in e||t in ns})):e.proxy}let lS=(e,t)=>(function(e,t,n=!1){let l,r;return O(e)?l=e:(l=e.get,r=e.set),new tS(l,r,n)})(e,0,lv),lw={createComponentInstance:lf,setupComponent:lm,renderComponentRoot:nX,setCurrentRenderingInstance:tH,isVNode:n9,normalizeVNode:lr,getComponentPublicInstance:lx,ensureValidVNode:function e(t){return t.some(t=>!n9(t)||!!(t.type!==n4&&(t.type!==n2||e(t.children))))?t:null},pushWarningContext:function(e){},popWarningContext:function(){}},lk="undefined"!=typeof window&&window.trustedTypes;if(lk)try{c=lk.createPolicy("vue",{createHTML:e=>e})}catch(e){}let lC=c?e=>c.createHTML(e):e=>e,lT="undefined"!=typeof document?document:null,lO=lT&&lT.createElement("template"),lR=Symbol("_vtc"),lP=Symbol("_vod"),lE=Symbol("_vsh"),lM=Symbol(""),lA=/(^|;)\s*display\s*:/,l$=/\s*!important$/;function lj(e,t,n){if(w(n))n.forEach(n=>lj(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let l=function(e,t){let n=lI[t];if(n)return n;let l=V(t);if("filter"!==l&&l in e)return lI[t]=l;l=B(l);for(let n=0;n<lD.length;n++){let r=lD[n]+l;if(r in e)return lI[t]=r}return t}(e,t);l$.test(n)?e.setProperty(U(l),n.replace(l$,""),"important"):e[l]=n}}let lD=["Webkit","Moz","ms"],lI={},lN="http://www.w3.org/1999/xlink";function lF(e,t,n,l,r,i=er(t)){l&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(lN,t.slice(6,t.length)):e.setAttributeNS(lN,t,n):null==n||i&&!es(n)?e.removeAttribute(t):e.setAttribute(t,i?"":P(n)?String(n):n)}function lL(e,t,n,l,r){if("innerHTML"===t||"textContent"===t){null!=n&&(e[t]="innerHTML"===t?lC(n):n);return}let i=e.tagName;if("value"===t&&"PROGRESS"!==i&&!i.includes("-")){let l="OPTION"===i?e.getAttribute("value")||"":e.value,r=null==n?"checkbox"===e.type?"on":"":String(n);l===r&&"_value"in e||(e.value=r),null==n&&e.removeAttribute(t),e._value=n;return}let s=!1;if(""===n||null==n){let l=typeof e[t];"boolean"===l?n=es(n):null==n&&"string"===l?(n="",s=!0):"number"===l&&(n=0,s=!0)}try{e[t]=n}catch(e){}s&&e.removeAttribute(r||t)}let lV=Symbol("_vei"),lW=/(?:Once|Passive|Capture)$/,lU=0,lB=Promise.resolve(),lH=()=>lU||(lB.then(()=>lU=0),lU=Date.now()),lq=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2);Symbol("_assign");let lG=_({patchProp:(e,t,n,l,r,i)=>{let s="svg"===r;"class"===t?function(e,t,n){let l=e[lR];l&&(t=(t?[t,...l]:[...l]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,l,s):"style"===t?function(e,t,n){let l=e.style,r=R(n),i=!1;if(n&&!r){if(t){if(R(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&lj(l,t,"")}else for(let e in t)null==n[e]&&lj(l,e,"")}for(let e in n)"display"===e&&(i=!0),lj(l,e,n[e])}else if(r){if(t!==n){let e=l[lM];e&&(n+=";"+e),l.cssText=n,i=lA.test(n)}}else t&&e.removeAttribute("style");lP in e&&(e[lP]=i?l.display:"",e[lE]&&(l.display="none"))}(e,n,l):m(t)?y(t)||function(e,t,n,l,r=null){let i=e[lV]||(e[lV]={}),s=i[t];if(l&&s)s.value=l;else{let[n,o]=function(e){let t;if(lW.test(e)){let n;for(t={};n=e.match(lW);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):U(e.slice(2)),t]}(t);l?function(e,t,n,l){e.addEventListener(t,n,l)}(e,n,i[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();tO(function(e,t){if(!w(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=lH(),n}(l,r),o):s&&(!function(e,t,n,l){e.removeEventListener(t,n,l)}(e,n,s,o),i[t]=void 0)}}(e,t,0,l,i):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,l){if(l)return!!("innerHTML"===t||"textContent"===t||t in e&&lq(t)&&O(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(lq(t)&&R(n))&&t in e}(e,t,l,s))?e._isVueCE&&(/[A-Z]/.test(t)||!R(l))?lL(e,V(t),l,i,t):("true-value"===t?e._trueValue=l:"false-value"===t&&(e._falseValue=l),lF(e,t,l,s)):(lL(e,t,l),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||lF(e,t,l,s,i,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,l)=>{let r="svg"===t?lT.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?lT.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?lT.createElement(e,{is:n}):lT.createElement(e);return"select"===e&&l&&null!=l.multiple&&r.setAttribute("multiple",l.multiple),r},createText:e=>lT.createTextNode(e),createComment:e=>lT.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>lT.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,l,r,i){let s=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==i&&(r=r.nextSibling););else{lO.innerHTML=lC("svg"===l?`<svg>${e}</svg>`:"mathml"===l?`<math>${e}</math>`:e);let r=lO.content;if("svg"===l||"mathml"===l){let e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),lz=(...e)=>{let t=(a||(a=function(e,t){let n,l;J().__VUE__=!0;let{insert:r,remove:i,patchProp:s,createElement:o,createText:a,createComment:u,setText:c,setElementText:f,parentNode:g,nextSibling:m,setScopeId:y=h,insertStaticContent:b}=e,x=(e,t,n,l=null,r=null,i=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!n7(e,t)&&(l=er(e),Y(e,r,i,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:u,ref:c,shapeFlag:f}=t;switch(u){case n6:k(e,t,n,l);break;case n4:C(e,t,n,l);break;case n8:null==e&&T(t,n,l,s);break;case n2:L(e,t,n,l,r,i,s,o,a);break;default:1&f?M(e,t,n,l,r,i,s,o,a):6&f?W(e,t,n,l,r,i,s,o,a):64&f?u.process(e,t,n,l,r,i,s,o,a,eo):128&f&&u.process(e,t,n,l,r,i,s,o,a,eo)}null!=c&&r&&tZ(c,e&&e.ref,i,t||e,!t)},k=(e,t,n,l)=>{if(null==e)r(t.el=a(t.children),n,l);else{let n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},C=(e,t,n,l)=>{null==e?r(t.el=u(t.children||""),n,l):t.el=e.el},T=(e,t,n,l)=>{[e.el,e.anchor]=b(e.children,t,n,l,e.el,e.anchor)},R=({el:e,anchor:t},n,l)=>{let i;for(;e&&e!==t;)i=m(e),r(e,n,l),e=i;r(t,n,l)},P=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),i(e),e=n;i(t)},M=(e,t,n,l,r,i,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?A(t,n,l,r,i,s,o,a):D(e,t,r,i,s,o,a)},A=(e,t,n,l,i,a,u,c)=>{let p,d;let{props:h,shapeFlag:g,transition:m,dirs:y}=e;if(p=e.el=o(e.type,a,h&&h.is,h),8&g?f(p,e.children):16&g&&j(e.children,p,null,l,i,nV(e,a),u,c),y&&tq(e,null,l,"created"),$(p,e,e.scopeId,u,l),h){for(let e in h)"value"===e||N(e)||s(p,e,null,h[e],a,l);"value"in h&&s(p,"value",null,h.value,a),(d=h.onVnodeBeforeMount)&&la(d,l,e)}y&&tq(e,null,l,"beforeMount");let _=(!i||i&&!i.pendingBranch)&&m&&!m.persisted;_&&m.beforeEnter(p),r(p,t,n),((d=h&&h.onVnodeMounted)||_||y)&&nL(()=>{d&&la(d,l,e),_&&m.enter(p),y&&tq(e,null,l,"mounted")},i)},$=(e,t,n,l,r)=>{if(n&&y(e,n),l)for(let t=0;t<l.length;t++)y(e,l[t]);if(r){let n=r.subTree;if(t===n||n1(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=r.vnode;$(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},j=(e,t,n,l,r,i,s,o,a=0)=>{for(let u=a;u<e.length;u++)x(null,e[u]=o?li(e[u]):lr(e[u]),t,n,l,r,i,s,o)},D=(e,t,n,l,r,i,o)=>{let a;let u=t.el=e.el,{patchFlag:c,dynamicChildren:d,dirs:h}=t;c|=16&e.patchFlag;let g=e.props||p,m=t.props||p;if(n&&nW(n,!1),(a=m.onVnodeBeforeUpdate)&&la(a,n,t,e),h&&tq(t,e,n,"beforeUpdate"),n&&nW(n,!0),(g.innerHTML&&null==m.innerHTML||g.textContent&&null==m.textContent)&&f(u,""),d?I(e.dynamicChildren,d,u,n,l,nV(t,r),i):o||K(e,t,u,null,n,l,nV(t,r),i,!1),c>0){if(16&c)F(u,g,m,n,r);else if(2&c&&g.class!==m.class&&s(u,"class",null,m.class,r),4&c&&s(u,"style",g.style,m.style,r),8&c){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let l=e[t],i=g[l],o=m[l];(o!==i||"value"===l)&&s(u,l,i,o,r,n)}}1&c&&e.children!==t.children&&f(u,t.children)}else o||null!=d||F(u,g,m,n,r);((a=m.onVnodeUpdated)||h)&&nL(()=>{a&&la(a,n,t,e),h&&tq(t,e,n,"updated")},l)},I=(e,t,n,l,r,i,s)=>{for(let o=0;o<t.length;o++){let a=e[o],u=t[o],c=a.el&&(a.type===n2||!n7(a,u)||70&a.shapeFlag)?g(a.el):n;x(a,u,c,null,l,r,i,s,!0)}},F=(e,t,n,l,r)=>{if(t!==n){if(t!==p)for(let i in t)N(i)||i in n||s(e,i,t[i],null,r,l);for(let i in n){if(N(i))continue;let o=n[i],a=t[i];o!==a&&"value"!==i&&s(e,i,a,o,r,l)}"value"in n&&s(e,"value",t.value,n.value,r)}},L=(e,t,n,l,i,s,o,u,c)=>{let f=t.el=e?e.el:a(""),p=t.anchor=e?e.anchor:a(""),{patchFlag:d,dynamicChildren:h,slotScopeIds:g}=t;g&&(u=u?u.concat(g):g),null==e?(r(f,n,l),r(p,n,l),j(t.children||[],n,p,i,s,o,u,c)):d>0&&64&d&&h&&e.dynamicChildren?(I(e.dynamicChildren,h,n,i,s,o,u),(null!=t.key||i&&t===i.subTree)&&function e(t,n,l=!1){let r=t.children,i=n.children;if(w(r)&&w(i))for(let t=0;t<r.length;t++){let n=r[t],s=i[t];!(1&s.shapeFlag)||s.dynamicChildren||((s.patchFlag<=0||32===s.patchFlag)&&((s=i[t]=li(i[t])).el=n.el),l||-2===s.patchFlag||e(n,s)),s.type===n6&&(s.el=n.el)}}(e,t,!0)):K(e,t,n,p,i,s,o,u,c)},W=(e,t,n,l,r,i,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?r.ctx.activate(t,n,l,s,a):B(t,n,l,r,i,s,a):H(e,t,a)},B=(e,t,n,l,r,i,s)=>{let o=e.component=lf(e,l,r);tQ(e)&&(o.ctx.renderer=eo),lm(o,!1,s),o.asyncDep?(r&&r.registerDep(o,q,s),e.el||C(null,o.subTree=ln(n4),t,n)):q(o,e,t,n,r,i,s)},H=(e,t,n)=>{let l=t.component=e.component;if(function(e,t,n){let{props:l,children:r,component:i}=e,{props:s,children:o,patchFlag:a}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!r||!!o)&&(!o||!o.$stable)||l!==s&&(l?!s||n0(l,s,u):!!s);if(1024&a)return!0;if(16&a)return l?n0(l,s,u):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(s[n]!==l[n]&&!nZ(u,n))return!0}}return!1}(e,t,n)){if(l.asyncDep&&!l.asyncResolved){z(l,t,n);return}l.next=t,l.update()}else t.el=e.el,l.vnode=t},q=(e,t,n,r,i,s,o)=>{let a=()=>{if(e.isMounted){let t,{next:n,bu:l,u:r,parent:u,vnode:c}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=c.el,z(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let f=n;nW(e,!1),n?(n.el=c.el,z(e,n,o)):n=c,l&&G(l),(t=n.props&&n.props.onVnodeBeforeUpdate)&&la(t,u,n,c),nW(e,!0);let p=nX(e),d=e.subTree;e.subTree=p,x(d,p,g(d.el),er(d),e,i,s),n.el=p.el,null===f&&function({vnode:e,parent:t},n){for(;t;){let l=t.subTree;if(l.suspense&&l.suspense.activeBranch===e&&(l.el=e.el),l===e)(e=t.vnode).el=n,t=t.parent;else break}}(e,p.el),r&&nL(r,i),(t=n.props&&n.props.onVnodeUpdated)&&nL(()=>la(t,u,n,c),i)}else{let o;let{el:a,props:u}=t,{bm:c,m:f,parent:p,root:d,type:h}=e,g=tX(t);if(nW(e,!1),c&&G(c),!g&&(o=u&&u.onVnodeBeforeMount)&&la(o,p,t),nW(e,!0),a&&l){let t=()=>{e.subTree=nX(e),l(a,e.subTree,e,i,null)};g&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{d.ce&&d.ce._injectChildStyle(h);let l=e.subTree=nX(e);x(null,l,n,r,e,i,s),t.el=l.el}if(f&&nL(f,i),!g&&(o=u&&u.onVnodeMounted)){let e=t;nL(()=>la(o,p,e),i)}(256&t.shapeFlag||p&&tX(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&nL(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let u=e.effect=new eS(a);e.scope.off();let c=e.update=u.run.bind(u),f=e.job=u.runIfDirty.bind(u);f.i=e,f.id=e.uid,u.scheduler=()=>tN(f),nW(e,!0),c()},z=(e,t,n)=>{t.component=e;let l=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,l){let{props:r,attrs:i,vnode:{patchFlag:s}}=e,o=tv(r),[a]=e.propsOptions,u=!1;if((l||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let l=0;l<n.length;l++){let s=n[l];if(nZ(e.emitsOptions,s))continue;let c=t[s];if(a){if(S(i,s))c!==i[s]&&(i[s]=c,u=!0);else{let t=V(s);r[t]=nR(a,o,t,c,e,!1)}}else c!==i[s]&&(i[s]=c,u=!0)}}}else{let l;for(let s in nO(e,t,r,i)&&(u=!0),o)t&&(S(t,s)||(l=U(s))!==s&&S(t,l))||(a?n&&(void 0!==n[s]||void 0!==n[l])&&(r[s]=nR(a,o,s,void 0,e,!0)):delete r[s]);if(i!==o)for(let e in i)t&&S(t,e)||(delete i[e],u=!0)}u&&eH(e.attrs,"set","")}(e,t.props,l,n),nF(e,t.children,n),e$(),tL(e),ej()},K=(e,t,n,l,r,i,s,o,a=!1)=>{let u=e&&e.children,c=e?e.shapeFlag:0,p=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d){X(u,p,n,l,r,i,s,o,a);return}if(256&d){Z(u,p,n,l,r,i,s,o,a);return}}8&h?(16&c&&el(u,r,i),p!==u&&f(n,p)):16&c?16&h?X(u,p,n,l,r,i,s,o,a):el(u,r,i,!0):(8&c&&f(n,""),16&h&&j(p,n,l,r,i,s,o,a))},Z=(e,t,n,l,r,i,s,o,a)=>{let u;e=e||d,t=t||d;let c=e.length,f=t.length,p=Math.min(c,f);for(u=0;u<p;u++){let l=t[u]=a?li(t[u]):lr(t[u]);x(e[u],l,n,null,r,i,s,o,a)}c>f?el(e,r,i,!0,!1,p):j(t,n,l,r,i,s,o,a,p)},X=(e,t,n,l,r,i,s,o,a)=>{let u=0,c=t.length,f=e.length-1,p=c-1;for(;u<=f&&u<=p;){let l=e[u],c=t[u]=a?li(t[u]):lr(t[u]);if(n7(l,c))x(l,c,n,null,r,i,s,o,a);else break;u++}for(;u<=f&&u<=p;){let l=e[f],u=t[p]=a?li(t[p]):lr(t[p]);if(n7(l,u))x(l,u,n,null,r,i,s,o,a);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,f=e<c?t[e].el:l;for(;u<=p;)x(null,t[u]=a?li(t[u]):lr(t[u]),n,f,r,i,s,o,a),u++}}else if(u>p)for(;u<=f;)Y(e[u],r,i,!0),u++;else{let h;let g=u,m=u,y=new Map;for(u=m;u<=p;u++){let e=t[u]=a?li(t[u]):lr(t[u]);null!=e.key&&y.set(e.key,u)}let _=0,b=p-m+1,S=!1,w=0,k=Array(b);for(u=0;u<b;u++)k[u]=0;for(u=g;u<=f;u++){let l;let c=e[u];if(_>=b){Y(c,r,i,!0);continue}if(null!=c.key)l=y.get(c.key);else for(h=m;h<=p;h++)if(0===k[h-m]&&n7(c,t[h])){l=h;break}void 0===l?Y(c,r,i,!0):(k[l-m]=u+1,l>=w?w=l:S=!0,x(c,t[l],n,null,r,i,s,o,a),_++)}let C=S?function(e){let t,n,l,r,i;let s=e.slice(),o=[0],a=e.length;for(t=0;t<a;t++){let a=e[t];if(0!==a){if(e[n=o[o.length-1]]<a){s[t]=n,o.push(t);continue}for(l=0,r=o.length-1;l<r;)e[o[i=l+r>>1]]<a?l=i+1:r=i;a<e[o[l]]&&(l>0&&(s[t]=o[l-1]),o[l]=t)}}for(l=o.length,r=o[l-1];l-- >0;)o[l]=r,r=s[r];return o}(k):d;for(h=C.length-1,u=b-1;u>=0;u--){let e=m+u,f=t[e],p=e+1<c?t[e+1].el:l;0===k[u]?x(null,f,n,p,r,i,s,o,a):S&&(h<0||u!==C[h]?Q(f,n,p,2):h--)}}},Q=(e,t,n,l,i=null)=>{let{el:s,type:o,transition:a,children:u,shapeFlag:c}=e;if(6&c){Q(e.component.subTree,t,n,l);return}if(128&c){e.suspense.move(t,n,l);return}if(64&c){o.move(e,t,n,eo);return}if(o===n2){r(s,t,n);for(let e=0;e<u.length;e++)Q(u[e],t,n,l);r(e.anchor,t,n);return}if(o===n8){R(e,t,n);return}if(2!==l&&1&c&&a){if(0===l)a.beforeEnter(s),r(s,t,n),nL(()=>a.enter(s),i);else{let{leave:e,delayLeave:l,afterLeave:i}=a,o=()=>r(s,t,n),u=()=>{e(s,()=>{o(),i&&i()})};l?l(s,o,u):u()}}else r(s,t,n)},Y=(e,t,n,l=!1,r=!1)=>{let i;let{type:s,props:o,ref:a,children:u,dynamicChildren:c,shapeFlag:f,patchFlag:p,dirs:d,cacheIndex:h}=e;if(-2===p&&(r=!1),null!=a&&tZ(a,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&f){t.ctx.deactivate(e);return}let g=1&f&&d,m=!tX(e);if(m&&(i=o&&o.onVnodeBeforeUnmount)&&la(i,t,e),6&f)en(e.component,n,l);else{if(128&f){e.suspense.unmount(n,l);return}g&&tq(e,null,t,"beforeUnmount"),64&f?e.type.remove(e,t,n,eo,l):c&&!c.hasOnce&&(s!==n2||p>0&&64&p)?el(c,t,n,!1,!0):(s===n2&&384&p||!r&&16&f)&&el(u,t,n),l&&ee(e)}(m&&(i=o&&o.onVnodeUnmounted)||g)&&nL(()=>{i&&la(i,t,e),g&&tq(e,null,t,"unmounted")},n)},ee=e=>{let{type:t,el:n,anchor:l,transition:r}=e;if(t===n2){et(n,l);return}if(t===n8){P(e);return}let s=()=>{i(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){let{leave:t,delayLeave:l}=r,i=()=>t(n,s);l?l(e.el,s,i):i()}else s()},et=(e,t)=>{let n;for(;e!==t;)n=m(e),i(e),e=n;i(t)},en=(e,t,n)=>{let{bum:l,scope:r,job:i,subTree:s,um:o,m:a,a:u}=e;nU(a),nU(u),l&&G(l),r.stop(),i&&(i.flags|=8,Y(s,e,t,n)),o&&nL(o,t),nL(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},el=(e,t,n,l=!1,r=!1,i=0)=>{for(let s=i;s<e.length;s++)Y(e[s],t,n,l,r)},er=e=>{if(6&e.shapeFlag)return er(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=m(e.anchor||e.el),n=t&&t[tG];return n?m(n):t},ei=!1,es=(e,t,n)=>{null==e?t._vnode&&Y(t._vnode,null,null,!0):x(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ei||(ei=!0,tL(),tV(),ei=!1)},eo={p:x,um:Y,m:Q,r:ee,mt:B,mc:j,pc:K,pbc:I,n:er,o:e};return{render:es,hydrate:n,createApp:function(e,t=null){O(e)||(e=_({},e)),null==t||E(t)||(t=null);let l=nb(),r=new WeakSet,i=[],s=!1,o=l.app={_uid:nx++,_component:e,_props:t,_container:null,_context:l,_instance:null,version:"3.5.13",get config(){return l.config},set config(v){},use:(e,...t)=>(r.has(e)||(e&&O(e.install)?(r.add(e),e.install(o,...t)):O(e)&&(r.add(e),e(o,...t))),o),mixin:e=>(l.mixins.includes(e)||l.mixins.push(e),o),component:(e,t)=>t?(l.components[e]=t,o):l.components[e],directive:(e,t)=>t?(l.directives[e]=t,o):l.directives[e],mount(r,i,a){if(!s){let u=o._ceVNode||ln(e,t);return u.appContext=l,!0===a?a="svg":!1===a&&(a=void 0),i&&n?n(u,r):es(u,r,a),s=!0,o._container=r,r.__vue_app__=o,lx(u.component)}},onUnmount(e){i.push(e)},unmount(){s&&(tO(i,o._instance,16),es(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(l.provides[e]=t,o),runWithContext(e){let t=nS;nS=o;try{return e()}finally{nS=t}}};return o}}}(lG))).createApp(...e),{mount:n}=t;return t.mount=e=>{let l=R(e)?document.querySelector(e):e;if(!l)return;let r=t._component;O(r)||r.render||r.template||(r.template=l.innerHTML),1===l.nodeType&&(l.textContent="");let i=n(l,!1,l instanceof SVGElement?"svg":"function"==typeof MathMLElement&&l instanceof MathMLElement?"mathml":void 0);return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),i},t},lK=!1,lJ=f(",key,ref,innerHTML,textContent,ref_key,ref_for");function lZ(e,t){let n="";for(let l in e){if(lJ(l)||m(l)||"textarea"===t&&"value"===l)continue;let r=e[l];"class"===l?n+=` class="${lY(r)}"`:"style"===l?n+=` style="${l0(r)}"`:"className"===l?n+=` class="${String(r)}"`:n+=lX(l,r,t)}return n}function lX(e,t,n){if(!ec(t))return"";let l=n&&(n.indexOf("-")>0||et(n))?e:eu[e]||e.toLowerCase();return ei(l)?es(t)?` ${l}`:"":!function(e){if(ea.hasOwnProperty(e))return ea[e];let t=eo.test(e);return t&&console.error(`unsafe attribute name: ${e}`),ea[e]=!t}(l)?(console.warn(`[@vue/server-renderer] Skipped rendering unsafe attribute name: ${l}`),""):""===t?` ${l}`:` ${l}="${ep(t)}"`}function lQ(e,t){return ec(t)?` ${e}="${ep(t)}"`:""}function lY(e){return ep(ee(e))}function l0(e){return e?R(e)?ep(e):ep(function(e){if(!e)return"";if(R(e))return e;let t="";for(let n in e){let l=e[n];if(R(l)||"number"==typeof l){let e=n.startsWith("--")?n:U(n);t+=`${e}:${l};`}}return t}(Z(e))):""}function l1(e,t=null,n=null,l=null,r){return rh(ln(e,t,n),l,r)}let{ensureValidVNode:l2}=lw;function l6(e,t,n,l,r,i,s){r("<!--[-->"),l4(e,t,n,l,r,i,s),r("<!--]-->")}function l4(e,t,n,l,r,i,s,o){let a=e[t];if(a){let e=[],t=a(n,t=>{e.push(t)},i,s?" "+s:"");if(w(t)){let e=l2(t);e?rm(r,e,i,s):l&&l()}else{let t=!0;if(o)t=!1;else for(let n=0;n<e.length;n++){var u;if(!("string"==typeof(u=e[n])&&l8.test(u)&&(u.length<=8||!u.replace(l3,"").trim()))){t=!1;break}}if(t)l&&l();else{let t=0,n=e.length;o&&"<!--[-->"===e[0]&&"<!--]-->"===e[n-1]&&(t++,n--);for(let l=t;l<n;l++)r(e[l])}}}else l&&l()}let l8=/^<!--[\s\S]*-->$/,l3=/<!--[^]*?-->/gm;function l5(e,t,n,l,r){let i;e("<!--teleport start-->");let s=r.appContext.provides[nB],o=s.__teleportBuffers||(s.__teleportBuffers={}),a=o[n]||(o[n]=[]),u=a.length;if(l)t(e),i="<!--teleport start anchor--><!--teleport anchor-->";else{let{getBuffer:e,push:n}=rd();n("<!--teleport start anchor-->"),t(n),n("<!--teleport anchor-->"),i=e()}a.splice(u,0,i),e("<!--teleport end-->")}function l9(e){return ep(em(e))}function l7(e,t){if(w(e)||R(e))for(let n=0,l=e.length;n<l;n++)t(e[n],n);else if("number"==typeof e)for(let n=0;n<e;n++)t(n+1,n);else if(E(e)){if(e[Symbol.iterator]){let n=Array.from(e);for(let e=0,l=n.length;e<l;e++)t(n[e],e)}else{let n=Object.keys(e);for(let l=0,r=n.length;l<r;l++){let r=n[l];t(e[r],r,l)}}}}async function re(e,{default:t}){t?t():e("<!---->")}function rt(e,t,n,l,r={}){return"function"!=typeof t&&t.getSSRProps&&t.getSSRProps({dir:t,instance:lw.getComponentPublicInstance(e.$),value:n,oldValue:void 0,arg:l,modifiers:r},null)||{}}let rn=eh;function rl(e,t){return eg(e,t)>-1}function rr(e,t,n){switch(e){case"radio":return eh(t,n)?" checked":"";case"checkbox":return(w(t)?rl(t,n):t)?" checked":"";default:return lQ("value",t)}}function ri(e={},t){let{type:n,value:l}=e;switch(n){case"radio":return eh(t,l)?{checked:!0}:null;case"checkbox":return(w(t)?rl(t,l):t)?{checked:!0}:null;default:return{value:t}}}let{createComponentInstance:rs,setCurrentRenderingInstance:ro,setupComponent:ra,renderComponentRoot:ru,normalizeVNode:rc,pushWarningContext:rf,popWarningContext:rp}=lw;function rd(){let e=!1,t=[];return{getBuffer:()=>t,push(n){let l=R(n);if(e&&l){t[t.length-1]+=n;return}t.push(n),e=l,(M(n)||w(n)&&n.hasAsync)&&(t.hasAsync=!0)}}}function rh(e,t=null,n){let l=e.component=rs(e,t,null),r=ra(l,!0),i=M(r),s=l.sp;return i||s?Promise.resolve(r).then(()=>{if(i&&(s=l.sp),s)return Promise.all(s.map(e=>e.call(l.proxy)))}).catch(h).then(()=>rg(l,n)):rg(l,n)}function rg(e,t){let n=e.type,{getBuffer:l,push:r}=rd();if(O(n)){let l=ru(e);if(!n.props)for(let t in e.attrs)t.startsWith("data-v-")&&((l.props||(l.props={}))[t]="");rv(r,e.subTree=l,e,t)}else{(!e.render||e.render===h)&&!e.ssrRender&&!n.ssrRender&&R(n.template)&&(n.ssrRender=function(e,t){throw Error("On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.")}(n.template));let l=e.ssrRender||n.ssrRender;if(l){let n=!1!==e.inheritAttrs?e.attrs:void 0,i=!1,s=e;for(;;){let e=s.vnode.scopeId;e&&(i||(n={...n},i=!0),n[e]="");let t=s.parent;if(t&&t.subTree&&t.subTree===s.vnode)s=t;else break}if(t){i||(n={...n});let e=t.trim().split(" ");for(let t=0;t<e.length;t++)n[e[t]]=""}let o=ro(e);try{l(e.proxy,r,e,n,e.props,e.setupState,e.data,e.ctx)}finally{ro(o)}}else e.render&&e.render!==h?rv(r,e.subTree=ru(e),e,t):(n.name||n.__file,r("<!---->"))}return l()}function rv(e,t,n,l){let{type:r,shapeFlag:i,children:s,dirs:o,props:a}=t;switch(o&&(t.props=function(e,t,n){let l=[];for(let t=0;t<n.length;t++){let r=n[t],{dir:{getSSRProps:i}}=r;if(i){let t=i(r,e);t&&l.push(t)}}return lo(t||{},...l)}(t,a,o)),r){case n6:e(ep(s));break;case n4:e(s?`<!--${s.replace(ed,"")}-->`:"<!---->");break;case n8:e(s);break;case n2:t.slotScopeIds&&(l=(l?l+" ":"")+t.slotScopeIds.join(" ")),e("<!--[-->"),rm(e,s,n,l),e("<!--]-->");break;default:1&i?function(e,t,n,l){let r=t.type,{props:i,children:s,shapeFlag:o,scopeId:a}=t,u=`<${r}`;i&&(u+=lZ(i,r)),a&&(u+=` ${a}`);let c=n,f=t;for(;c&&f===c.subTree;)(f=c.vnode).scopeId&&(u+=` ${f.scopeId}`),c=c.parent;if(l&&(u+=` ${l}`),e(u+">"),!en(r)){let t=!1;i&&(i.innerHTML?(t=!0,e(i.innerHTML)):i.textContent?(t=!0,e(ep(i.textContent))):"textarea"===r&&i.value&&(t=!0,e(ep(i.value)))),!t&&(8&o?e(ep(s)):16&o&&rm(e,s,n,l)),e(`</${r}>`)}}(e,t,n,l):6&i?e(rh(t,n,l)):64&i?function(e,t,n,l){let r=t.props&&t.props.to,i=t.props&&t.props.disabled;if(!r||!R(r))return[];l5(e,e=>{rm(e,t.children,n,l)},r,i||""===i,n)}(e,t,n,l):128&i&&rv(e,t.ssContent,n,l)}}function rm(e,t,n,l){for(let r=0;r<t.length;r++)rv(e,rc(t[r]),n,l)}let{isVNode:ry}=lw;function r_(e){return function e(t,n,l){if(!t.hasAsync)return n+function e(t){let n="";for(let l=0;l<t.length;l++){let r=t[l];R(r)?n+=r:n+=e(r)}return n}(t);let r=n;for(let n=l;n<t.length;n+=1){let l=t[n];if(R(l)){r+=l;continue}if(M(l))return l.then(l=>(t[n]=l,e(t,r,n)));let i=e(l,r,0);if(M(i))return i.then(l=>(t[n]=l,e(t,"",n)));r=i}return r}(e,"",0)}async function rb(e,t={}){if(ry(e))return rb(lz({render:()=>e}),t);let n=ln(e._component,e._props);n.appContext=e._context,e.provide(nB,t);let l=await rh(n),r=await r_(l);if(await rx(t),t.__watcherHandles)for(let e of t.__watcherHandles)e();return r}async function rx(e){if(e.__teleportBuffers)for(let t in e.teleports=e.teleports||{},e.__teleportBuffers)e.teleports[t]=await r_(await Promise.all([e.__teleportBuffers[t]]))}let{isVNode:rS}=lw;async function rw(e,t){if(e.hasAsync)for(let n=0;n<e.length;n++){let l=e[n];M(l)&&(l=await l),R(l)?t.push(l):await rw(l,t)}else!function e(t,n){for(let l=0;l<t.length;l++){let r=t[l];R(r)?n.push(r):e(r,n)}}(e,t)}function rk(e,t,n){if(rS(e))return rk(lz({render:()=>e}),t,n);let l=ln(e._component,e._props);return l.appContext=e._context,e.provide(nB,t),Promise.resolve(rh(l)).then(e=>rw(e,n)).then(()=>rx(t)).then(()=>{if(t.__watcherHandles)for(let e of t.__watcherHandles)e()}).then(()=>n.push(null)).catch(e=>{n.destroy(e)}),n}function rC(e,t={}){return console.warn("[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead."),rT(e,t)}function rT(e,t={}){throw Error("ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.")}function rO(e,t={},n){rk(e,t,{push(e){null!=e?n.write(e):n.end()},destroy(e){n.destroy(e)}})}function rR(e,t={}){if("function"!=typeof ReadableStream)throw Error("ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.");let n=new TextEncoder,l=!1;return new ReadableStream({start(r){rk(e,t,{push(e){l||(null!=e?r.enqueue(n.encode(e)):r.close())},destroy(e){r.error(e)}})},cancel(){l=!0}})}function rP(e,t={},n){let l=n.getWriter(),r=new TextEncoder,i=!1;try{i=M(l.ready)}catch(e){}rk(e,t,{push:async e=>(i&&await l.ready,null!=e)?l.write(r.encode(e)):l.close(),destroy(e){console.log(e),l.close()}})}lK||(lK=!0,({value:e},t)=>{if(w(e)){if(t.props&&eg(e,t.props.value)>-1)return{checked:!0}}else if(C(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}});export{rO as pipeToNodeWritable,rP as pipeToWebWritable,rT as renderToNodeStream,rk as renderToSimpleStream,rC as renderToStream,rb as renderToString,rR as renderToWebStream,rt as ssrGetDirectiveProps,ri as ssrGetDynamicModelProps,es as ssrIncludeBooleanAttr,l9 as ssrInterpolate,rl as ssrLooseContain,rn as ssrLooseEqual,lQ as ssrRenderAttr,lZ as ssrRenderAttrs,lY as ssrRenderClass,l1 as ssrRenderComponent,lX as ssrRenderDynamicAttr,rr as ssrRenderDynamicModel,l7 as ssrRenderList,l6 as ssrRenderSlot,l4 as ssrRenderSlotInner,l0 as ssrRenderStyle,re as ssrRenderSuspense,l5 as ssrRenderTeleport,rv as ssrRenderVNode}; diff --git a/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js b/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js deleted file mode 100644 index c357c52..0000000 --- a/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +++ /dev/null @@ -1,1224 +0,0 @@ -/** -* @vue/server-renderer v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -import { createVNode, ssrUtils, ssrContextKey, warn as warn$2, Fragment, Static, Comment, Text, mergeProps, createApp, initDirectivesForSSR } from 'vue'; -import { isOn, isRenderableAttrValue, isSVGTag, propsToAttrMap, isBooleanAttr, includeBooleanAttr, isSSRSafeAttrName, escapeHtml, normalizeClass, isString, normalizeStyle, stringifyStyle, makeMap, isArray, toDisplayString, extend, isFunction, EMPTY_OBJ, getGlobalThis, NOOP, isObject, looseEqual, looseIndexOf, isPromise, escapeHtmlComment, isVoidTag } from '@vue/shared'; -export { includeBooleanAttr as ssrIncludeBooleanAttr } from '@vue/shared'; - -const shouldIgnoreProp = /* @__PURE__ */ makeMap( - `,key,ref,innerHTML,textContent,ref_key,ref_for` -); -function ssrRenderAttrs(props, tag) { - let ret = ""; - for (const key in props) { - if (shouldIgnoreProp(key) || isOn(key) || tag === "textarea" && key === "value") { - continue; - } - const value = props[key]; - if (key === "class") { - ret += ` class="${ssrRenderClass(value)}"`; - } else if (key === "style") { - ret += ` style="${ssrRenderStyle(value)}"`; - } else if (key === "className") { - ret += ` class="${String(value)}"`; - } else { - ret += ssrRenderDynamicAttr(key, value, tag); - } - } - return ret; -} -function ssrRenderDynamicAttr(key, value, tag) { - if (!isRenderableAttrValue(value)) { - return ``; - } - const attrKey = tag && (tag.indexOf("-") > 0 || isSVGTag(tag)) ? key : propsToAttrMap[key] || key.toLowerCase(); - if (isBooleanAttr(attrKey)) { - return includeBooleanAttr(value) ? ` ${attrKey}` : ``; - } else if (isSSRSafeAttrName(attrKey)) { - return value === "" ? ` ${attrKey}` : ` ${attrKey}="${escapeHtml(value)}"`; - } else { - console.warn( - `[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}` - ); - return ``; - } -} -function ssrRenderAttr(key, value) { - if (!isRenderableAttrValue(value)) { - return ``; - } - return ` ${key}="${escapeHtml(value)}"`; -} -function ssrRenderClass(raw) { - return escapeHtml(normalizeClass(raw)); -} -function ssrRenderStyle(raw) { - if (!raw) { - return ""; - } - if (isString(raw)) { - return escapeHtml(raw); - } - const styles = normalizeStyle(raw); - return escapeHtml(stringifyStyle(styles)); -} - -function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) { - return renderComponentVNode( - createVNode(comp, props, children), - parentComponent, - slotScopeId - ); -} - -const { ensureValidVNode } = ssrUtils; -function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { - push(`<!--[-->`); - ssrRenderSlotInner( - slots, - slotName, - slotProps, - fallbackRenderFn, - push, - parentComponent, - slotScopeId - ); - push(`<!--]-->`); -} -function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) { - const slotFn = slots[slotName]; - if (slotFn) { - const slotBuffer = []; - const bufferedPush = (item) => { - slotBuffer.push(item); - }; - const ret = slotFn( - slotProps, - bufferedPush, - parentComponent, - slotScopeId ? " " + slotScopeId : "" - ); - if (isArray(ret)) { - const validSlotContent = ensureValidVNode(ret); - if (validSlotContent) { - renderVNodeChildren( - push, - validSlotContent, - parentComponent, - slotScopeId - ); - } else if (fallbackRenderFn) { - fallbackRenderFn(); - } - } else { - let isEmptySlot = true; - if (transition) { - isEmptySlot = false; - } else { - for (let i = 0; i < slotBuffer.length; i++) { - if (!isComment(slotBuffer[i])) { - isEmptySlot = false; - break; - } - } - } - if (isEmptySlot) { - if (fallbackRenderFn) { - fallbackRenderFn(); - } - } else { - let start = 0; - let end = slotBuffer.length; - if (transition && slotBuffer[0] === "<!--[-->" && slotBuffer[end - 1] === "<!--]-->") { - start++; - end--; - } - for (let i = start; i < end; i++) { - push(slotBuffer[i]); - } - } - } - } else if (fallbackRenderFn) { - fallbackRenderFn(); - } -} -const commentTestRE = /^<!--[\s\S]*-->$/; -const commentRE = /<!--[^]*?-->/gm; -function isComment(item) { - if (typeof item !== "string" || !commentTestRE.test(item)) return false; - if (item.length <= 8) return true; - return !item.replace(commentRE, "").trim(); -} - -function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { - parentPush("<!--teleport start-->"); - const context = parentComponent.appContext.provides[ssrContextKey]; - const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); - const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); - const bufferIndex = targetBuffer.length; - let teleportContent; - if (disabled) { - contentRenderFn(parentPush); - teleportContent = `<!--teleport start anchor--><!--teleport anchor-->`; - } else { - const { getBuffer, push } = createBuffer(); - push(`<!--teleport start anchor-->`); - contentRenderFn(push); - push(`<!--teleport anchor-->`); - teleportContent = getBuffer(); - } - targetBuffer.splice(bufferIndex, 0, teleportContent); - parentPush("<!--teleport end-->"); -} - -function ssrInterpolate(value) { - return escapeHtml(toDisplayString(value)); -} - -let activeSub; -let batchDepth = 0; -let batchedSub; -function startBatch() { - batchDepth++; -} -function endBatch() { - if (--batchDepth > 0) { - return; - } - let error; - while (batchedSub) { - let e = batchedSub; - batchedSub = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= ~8; - if (e.flags & 1) { - try { - ; - e.trigger(); - } catch (err) { - if (!error) error = err; - } - } - e = next; - } - } - if (error) throw error; -} -let shouldTrack = true; -const trackStack = []; -function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; -} -function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === void 0 ? true : last; -} - -class Dep { - constructor(computed) { - this.computed = computed; - this.version = 0; - /** - * Link between this dep and the current active effect - */ - this.activeLink = void 0; - /** - * Doubly linked list representing the subscribing effects (tail) - */ - this.subs = void 0; - /** - * For object property deps cleanup - */ - this.map = void 0; - this.key = void 0; - /** - * Subscriber counter - */ - this.sc = 0; - if (!!(process.env.NODE_ENV !== "production")) { - this.subsHead = void 0; - } - } - track(debugInfo) { - { - return; - } - } - trigger(debugInfo) { - this.version++; - this.notify(debugInfo); - } - notify(debugInfo) { - startBatch(); - try { - if (!!(process.env.NODE_ENV !== "production")) { - for (let head = this.subsHead; head; head = head.nextSub) { - if (head.sub.onTrigger && !(head.sub.flags & 8)) { - head.sub.onTrigger( - extend( - { - effect: head.sub - }, - debugInfo - ) - ); - } - } - } - for (let link = this.subs; link; link = link.prevSub) { - if (link.sub.notify()) { - ; - link.sub.dep.notify(); - } - } - } finally { - endBatch(); - } - } -} -const targetMap = /* @__PURE__ */ new WeakMap(); -Symbol( - !!(process.env.NODE_ENV !== "production") ? "Object iterate" : "" -); -Symbol( - !!(process.env.NODE_ENV !== "production") ? "Map keys iterate" : "" -); -Symbol( - !!(process.env.NODE_ENV !== "production") ? "Array iterate" : "" -); -function track(target, type, key) { - if (shouldTrack && activeSub) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = new Dep()); - dep.map = depsMap; - dep.key = key; - } - if (!!(process.env.NODE_ENV !== "production")) { - dep.track({ - target, - type, - key - }); - } else { - dep.track(); - } - } -} - -function isProxy(value) { - return value ? !!value["__v_raw"] : false; -} -function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; -} - -function isRef(r) { - return r ? r["__v_isRef"] === true : false; -} - -const stack = []; -function pushWarningContext$1(vnode) { - stack.push(vnode); -} -function popWarningContext$1() { - stack.pop(); -} -let isWarning = false; -function warn$1(msg, ...args) { - if (isWarning) return; - isWarning = true; - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling( - appWarnHandler, - instance, - 11, - [ - // eslint-disable-next-line no-restricted-syntax - msg + args.map((a) => { - var _a, _b; - return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); - }).join(""), - instance && instance.proxy, - trace.map( - ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` - ).join("\n"), - trace - ] - ); - } else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - if (trace.length && // avoid spamming console during tests - true) { - warnArgs.push(` -`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); - isWarning = false; -} -function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; - } - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; -} -function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...i === 0 ? [] : [` -`], ...formatTraceEntry(entry)); - }); - return logs; -} -function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName( - vnode.component, - vnode.type, - isRoot - )}`; - const close = `>` + postfix; - return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; -} -function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach((key) => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; -} -function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } else if (typeof value === "number" || typeof value === "boolean" || value == null) { - return raw ? value : [`${key}=${value}`]; - } else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } -} - -const ErrorTypeStrings = { - ["sp"]: "serverPrefetch hook", - ["bc"]: "beforeCreate hook", - ["c"]: "created hook", - ["bm"]: "beforeMount hook", - ["m"]: "mounted hook", - ["bu"]: "beforeUpdate hook", - ["u"]: "updated", - ["bum"]: "beforeUnmount hook", - ["um"]: "unmounted hook", - ["a"]: "activated hook", - ["da"]: "deactivated hook", - ["ec"]: "errorCaptured hook", - ["rtc"]: "renderTracked hook", - ["rtg"]: "renderTriggered hook", - [0]: "setup function", - [1]: "render function", - [2]: "watcher getter", - [3]: "watcher callback", - [4]: "watcher cleanup function", - [5]: "native event handler", - [6]: "component event handler", - [7]: "vnode hook", - [8]: "directive hook", - [9]: "transition hook", - [10]: "app errorHandler", - [11]: "app warnHandler", - [12]: "ref function", - [13]: "async component loader", - [14]: "scheduler flush", - [15]: "component update", - [16]: "app unmount cleanup function" -}; -function callWithErrorHandling(fn, instance, type, args) { - try { - return args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance, type); - } -} -function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; - if (instance) { - let cur = instance.parent; - const exposedInstance = instance.proxy; - const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings[type] : `https://vuejs.org/error-reference/#runtime-${type}`; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - if (errorHandler) { - pauseTracking(); - callWithErrorHandling(errorHandler, null, 10, [ - err, - exposedInstance, - errorInfo - ]); - resetTracking(); - return; - } - } - logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); -} -function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { - if (!!(process.env.NODE_ENV !== "production")) { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext$1(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext$1(); - } - if (throwInDev) { - throw err; - } else { - console.error(err); - } - } else if (throwInProd) { - throw err; - } else { - console.error(err); - } -} - -let devtools; -let buffer = []; -function setDevtoolsHook(hook, target) { - var _a, _b; - devtools = hook; - if (devtools) { - devtools.enabled = true; - buffer.forEach(({ event, args }) => devtools.emit(event, ...args)); - buffer = []; - } else if ( - // handle late devtools injection - only do this if we are in an actual - // browser environment to avoid the timer handle stalling test runner exit - // (#4815) - typeof window !== "undefined" && // some envs mock window but not fully - window.HTMLElement && // also exclude jsdom - // eslint-disable-next-line no-restricted-syntax - !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) - ) { - const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; - replay.push((newHook) => { - setDevtoolsHook(newHook, target); - }); - setTimeout(() => { - if (!devtools) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - buffer = []; - } - }, 3e3); - } else { - buffer = []; - } -} - -{ - const g = getGlobalThis(); - const registerGlobalSetter = (key, setter) => { - let setters; - if (!(setters = g[key])) setters = g[key] = []; - setters.push(setter); - return (v) => { - if (setters.length > 1) setters.forEach((set) => set(v)); - else setters[0](v); - }; - }; - registerGlobalSetter( - `__VUE_INSTANCE_SETTERS__`, - (v) => v - ); - registerGlobalSetter( - `__VUE_SSR_SETTERS__`, - (v) => v - ); -} -!!(process.env.NODE_ENV !== "production") ? { - get(target, key) { - track(target, "get", ""); - return target[key]; - }, - set() { - warn$1(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn$1(`setupContext.attrs is readonly.`); - return false; - } -} : { - get(target, key) { - track(target, "get", ""); - return target[key]; - } -}; -const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); -function getComponentName(Component, includeInferred = true) { - return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; -} -function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; - } - } - if (!name && instance && instance.parent) { - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = inferFromRegistry( - instance.components || instance.parent.type.components - ) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; -} -function isClassComponent(value) { - return isFunction(value) && "__vccOpts" in value; -} - -const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP; -!!(process.env.NODE_ENV !== "production") || true ? devtools : void 0; -!!(process.env.NODE_ENV !== "production") || true ? setDevtoolsHook : NOOP; - -function ssrRenderList(source, renderItem) { - if (isArray(source) || isString(source)) { - for (let i = 0, l = source.length; i < l; i++) { - renderItem(source[i], i); - } - } else if (typeof source === "number") { - if (!!(process.env.NODE_ENV !== "production") && !Number.isInteger(source)) { - warn(`The v-for range expect an integer value but got ${source}.`); - return; - } - for (let i = 0; i < source; i++) { - renderItem(i + 1, i); - } - } else if (isObject(source)) { - if (source[Symbol.iterator]) { - const arr = Array.from(source); - for (let i = 0, l = arr.length; i < l; i++) { - renderItem(arr[i], i); - } - } else { - const keys = Object.keys(source); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - renderItem(source[key], key, i); - } - } - } -} - -async function ssrRenderSuspense(push, { default: renderContent }) { - if (renderContent) { - renderContent(); - } else { - push(`<!---->`); - } -} - -function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) { - if (typeof dir !== "function" && dir.getSSRProps) { - return dir.getSSRProps( - { - dir, - instance: ssrUtils.getComponentPublicInstance(instance.$), - value, - oldValue: void 0, - arg, - modifiers - }, - null - ) || {}; - } - return {}; -} - -const ssrLooseEqual = looseEqual; -function ssrLooseContain(arr, value) { - return looseIndexOf(arr, value) > -1; -} -function ssrRenderDynamicModel(type, model, value) { - switch (type) { - case "radio": - return looseEqual(model, value) ? " checked" : ""; - case "checkbox": - return (isArray(model) ? ssrLooseContain(model, value) : model) ? " checked" : ""; - default: - return ssrRenderAttr("value", model); - } -} -function ssrGetDynamicModelProps(existingProps = {}, model) { - const { type, value } = existingProps; - switch (type) { - case "radio": - return looseEqual(model, value) ? { checked: true } : null; - case "checkbox": - return (isArray(model) ? ssrLooseContain(model, value) : model) ? { checked: true } : null; - default: - return { value: model }; - } -} - -function ssrCompile(template, instance) { - { - throw new Error( - `On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.` - ); - } -} - -const { - createComponentInstance, - setCurrentRenderingInstance, - setupComponent, - renderComponentRoot, - normalizeVNode, - pushWarningContext, - popWarningContext -} = ssrUtils; -function createBuffer() { - let appendable = false; - const buffer = []; - return { - getBuffer() { - return buffer; - }, - push(item) { - const isStringItem = isString(item); - if (appendable && isStringItem) { - buffer[buffer.length - 1] += item; - return; - } - buffer.push(item); - appendable = isStringItem; - if (isPromise(item) || isArray(item) && item.hasAsync) { - buffer.hasAsync = true; - } - } - }; -} -function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { - const instance = vnode.component = createComponentInstance( - vnode, - parentComponent, - null - ); - if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(vnode); - const res = setupComponent( - instance, - true - /* isSSR */ - ); - if (!!(process.env.NODE_ENV !== "production")) popWarningContext(); - const hasAsyncSetup = isPromise(res); - let prefetches = instance.sp; - if (hasAsyncSetup || prefetches) { - const p = Promise.resolve(res).then(() => { - if (hasAsyncSetup) prefetches = instance.sp; - if (prefetches) { - return Promise.all( - prefetches.map((prefetch) => prefetch.call(instance.proxy)) - ); - } - }).catch(NOOP); - return p.then(() => renderComponentSubTree(instance, slotScopeId)); - } else { - return renderComponentSubTree(instance, slotScopeId); - } -} -function renderComponentSubTree(instance, slotScopeId) { - if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(instance.vnode); - const comp = instance.type; - const { getBuffer, push } = createBuffer(); - if (isFunction(comp)) { - let root = renderComponentRoot(instance); - if (!comp.props) { - for (const key in instance.attrs) { - if (key.startsWith(`data-v-`)) { - (root.props || (root.props = {}))[key] = ``; - } - } - } - renderVNode(push, instance.subTree = root, instance, slotScopeId); - } else { - if ((!instance.render || instance.render === NOOP) && !instance.ssrRender && !comp.ssrRender && isString(comp.template)) { - comp.ssrRender = ssrCompile(comp.template); - } - const ssrRender = instance.ssrRender || comp.ssrRender; - if (ssrRender) { - let attrs = instance.inheritAttrs !== false ? instance.attrs : void 0; - let hasCloned = false; - let cur = instance; - while (true) { - const scopeId = cur.vnode.scopeId; - if (scopeId) { - if (!hasCloned) { - attrs = { ...attrs }; - hasCloned = true; - } - attrs[scopeId] = ""; - } - const parent = cur.parent; - if (parent && parent.subTree && parent.subTree === cur.vnode) { - cur = parent; - } else { - break; - } - } - if (slotScopeId) { - if (!hasCloned) attrs = { ...attrs }; - const slotScopeIdList = slotScopeId.trim().split(" "); - for (let i = 0; i < slotScopeIdList.length; i++) { - attrs[slotScopeIdList[i]] = ""; - } - } - const prev = setCurrentRenderingInstance(instance); - try { - ssrRender( - instance.proxy, - push, - instance, - attrs, - // compiler-optimized bindings - instance.props, - instance.setupState, - instance.data, - instance.ctx - ); - } finally { - setCurrentRenderingInstance(prev); - } - } else if (instance.render && instance.render !== NOOP) { - renderVNode( - push, - instance.subTree = renderComponentRoot(instance), - instance, - slotScopeId - ); - } else { - const componentName = comp.name || comp.__file || `<Anonymous>`; - warn$2(`Component ${componentName} is missing template or render function.`); - push(`<!---->`); - } - } - if (!!(process.env.NODE_ENV !== "production")) popWarningContext(); - return getBuffer(); -} -function renderVNode(push, vnode, parentComponent, slotScopeId) { - const { type, shapeFlag, children, dirs, props } = vnode; - if (dirs) { - vnode.props = applySSRDirectives(vnode, props, dirs); - } - switch (type) { - case Text: - push(escapeHtml(children)); - break; - case Comment: - push( - children ? `<!--${escapeHtmlComment(children)}-->` : `<!---->` - ); - break; - case Static: - push(children); - break; - case Fragment: - if (vnode.slotScopeIds) { - slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" "); - } - push(`<!--[-->`); - renderVNodeChildren( - push, - children, - parentComponent, - slotScopeId - ); - push(`<!--]-->`); - break; - default: - if (shapeFlag & 1) { - renderElementVNode(push, vnode, parentComponent, slotScopeId); - } else if (shapeFlag & 6) { - push(renderComponentVNode(vnode, parentComponent, slotScopeId)); - } else if (shapeFlag & 64) { - renderTeleportVNode(push, vnode, parentComponent, slotScopeId); - } else if (shapeFlag & 128) { - renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); - } else { - warn$2( - "[@vue/server-renderer] Invalid VNode type:", - type, - `(${typeof type})` - ); - } - } -} -function renderVNodeChildren(push, children, parentComponent, slotScopeId) { - for (let i = 0; i < children.length; i++) { - renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); - } -} -function renderElementVNode(push, vnode, parentComponent, slotScopeId) { - const tag = vnode.type; - let { props, children, shapeFlag, scopeId } = vnode; - let openTag = `<${tag}`; - if (props) { - openTag += ssrRenderAttrs(props, tag); - } - if (scopeId) { - openTag += ` ${scopeId}`; - } - let curParent = parentComponent; - let curVnode = vnode; - while (curParent && curVnode === curParent.subTree) { - curVnode = curParent.vnode; - if (curVnode.scopeId) { - openTag += ` ${curVnode.scopeId}`; - } - curParent = curParent.parent; - } - if (slotScopeId) { - openTag += ` ${slotScopeId}`; - } - push(openTag + `>`); - if (!isVoidTag(tag)) { - let hasChildrenOverride = false; - if (props) { - if (props.innerHTML) { - hasChildrenOverride = true; - push(props.innerHTML); - } else if (props.textContent) { - hasChildrenOverride = true; - push(escapeHtml(props.textContent)); - } else if (tag === "textarea" && props.value) { - hasChildrenOverride = true; - push(escapeHtml(props.value)); - } - } - if (!hasChildrenOverride) { - if (shapeFlag & 8) { - push(escapeHtml(children)); - } else if (shapeFlag & 16) { - renderVNodeChildren( - push, - children, - parentComponent, - slotScopeId - ); - } - } - push(`</${tag}>`); - } -} -function applySSRDirectives(vnode, rawProps, dirs) { - const toMerge = []; - for (let i = 0; i < dirs.length; i++) { - const binding = dirs[i]; - const { - dir: { getSSRProps } - } = binding; - if (getSSRProps) { - const props = getSSRProps(binding, vnode); - if (props) toMerge.push(props); - } - } - return mergeProps(rawProps || {}, ...toMerge); -} -function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { - const target = vnode.props && vnode.props.to; - const disabled = vnode.props && vnode.props.disabled; - if (!target) { - if (!disabled) { - warn$2(`[@vue/server-renderer] Teleport is missing target prop.`); - } - return []; - } - if (!isString(target)) { - warn$2( - `[@vue/server-renderer] Teleport target must be a query selector string.` - ); - return []; - } - ssrRenderTeleport( - push, - (push2) => { - renderVNodeChildren( - push2, - vnode.children, - parentComponent, - slotScopeId - ); - }, - target, - disabled || disabled === "", - parentComponent - ); -} - -const { isVNode: isVNode$1 } = ssrUtils; -function nestedUnrollBuffer(buffer, parentRet, startIndex) { - if (!buffer.hasAsync) { - return parentRet + unrollBufferSync$1(buffer); - } - let ret = parentRet; - for (let i = startIndex; i < buffer.length; i += 1) { - const item = buffer[i]; - if (isString(item)) { - ret += item; - continue; - } - if (isPromise(item)) { - return item.then((nestedItem) => { - buffer[i] = nestedItem; - return nestedUnrollBuffer(buffer, ret, i); - }); - } - const result = nestedUnrollBuffer(item, ret, 0); - if (isPromise(result)) { - return result.then((nestedItem) => { - buffer[i] = nestedItem; - return nestedUnrollBuffer(buffer, "", i); - }); - } - ret = result; - } - return ret; -} -function unrollBuffer$1(buffer) { - return nestedUnrollBuffer(buffer, "", 0); -} -function unrollBufferSync$1(buffer) { - let ret = ""; - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (isString(item)) { - ret += item; - } else { - ret += unrollBufferSync$1(item); - } - } - return ret; -} -async function renderToString(input, context = {}) { - if (isVNode$1(input)) { - return renderToString(createApp({ render: () => input }), context); - } - const vnode = createVNode(input._component, input._props); - vnode.appContext = input._context; - input.provide(ssrContextKey, context); - const buffer = await renderComponentVNode(vnode); - const result = await unrollBuffer$1(buffer); - await resolveTeleports(context); - if (context.__watcherHandles) { - for (const unwatch of context.__watcherHandles) { - unwatch(); - } - } - return result; -} -async function resolveTeleports(context) { - if (context.__teleportBuffers) { - context.teleports = context.teleports || {}; - for (const key in context.__teleportBuffers) { - context.teleports[key] = await unrollBuffer$1( - await Promise.all([context.__teleportBuffers[key]]) - ); - } - } -} - -const { isVNode } = ssrUtils; -async function unrollBuffer(buffer, stream) { - if (buffer.hasAsync) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (isPromise(item)) { - item = await item; - } - if (isString(item)) { - stream.push(item); - } else { - await unrollBuffer(item, stream); - } - } - } else { - unrollBufferSync(buffer, stream); - } -} -function unrollBufferSync(buffer, stream) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (isString(item)) { - stream.push(item); - } else { - unrollBufferSync(item, stream); - } - } -} -function renderToSimpleStream(input, context, stream) { - if (isVNode(input)) { - return renderToSimpleStream( - createApp({ render: () => input }), - context, - stream - ); - } - const vnode = createVNode(input._component, input._props); - vnode.appContext = input._context; - input.provide(ssrContextKey, context); - Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => { - if (context.__watcherHandles) { - for (const unwatch of context.__watcherHandles) { - unwatch(); - } - } - }).then(() => stream.push(null)).catch((error) => { - stream.destroy(error); - }); - return stream; -} -function renderToStream(input, context = {}) { - console.warn( - `[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.` - ); - return renderToNodeStream(input, context); -} -function renderToNodeStream(input, context = {}) { - { - throw new Error( - `ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.` - ); - } -} -function pipeToNodeWritable(input, context = {}, writable) { - renderToSimpleStream(input, context, { - push(content) { - if (content != null) { - writable.write(content); - } else { - writable.end(); - } - }, - destroy(err) { - writable.destroy(err); - } - }); -} -function renderToWebStream(input, context = {}) { - if (typeof ReadableStream !== "function") { - throw new Error( - `ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.` - ); - } - const encoder = new TextEncoder(); - let cancelled = false; - return new ReadableStream({ - start(controller) { - renderToSimpleStream(input, context, { - push(content) { - if (cancelled) return; - if (content != null) { - controller.enqueue(encoder.encode(content)); - } else { - controller.close(); - } - }, - destroy(err) { - controller.error(err); - } - }); - }, - cancel() { - cancelled = true; - } - }); -} -function pipeToWebWritable(input, context = {}, writable) { - const writer = writable.getWriter(); - const encoder = new TextEncoder(); - let hasReady = false; - try { - hasReady = isPromise(writer.ready); - } catch (e) { - } - renderToSimpleStream(input, context, { - async push(content) { - if (hasReady) { - await writer.ready; - } - if (content != null) { - return writer.write(encoder.encode(content)); - } else { - return writer.close(); - } - }, - destroy(err) { - console.log(err); - writer.close(); - } - }); -} - -initDirectivesForSSR(); - -export { pipeToNodeWritable, pipeToWebWritable, renderToNodeStream, renderToSimpleStream, renderToStream, renderToString, renderToWebStream, ssrGetDirectiveProps, ssrGetDynamicModelProps, ssrInterpolate, ssrLooseContain, ssrLooseEqual, ssrRenderAttr, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrRenderDynamicAttr, ssrRenderDynamicModel, ssrRenderList, ssrRenderSlot, ssrRenderSlotInner, ssrRenderStyle, ssrRenderSuspense, ssrRenderTeleport, renderVNode as ssrRenderVNode }; diff --git a/node_modules/@vue/server-renderer/index.js b/node_modules/@vue/server-renderer/index.js deleted file mode 100644 index f5a3d90..0000000 --- a/node_modules/@vue/server-renderer/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/server-renderer.cjs.prod.js') -} else { - module.exports = require('./dist/server-renderer.cjs.js') -} diff --git a/node_modules/@vue/server-renderer/package.json b/node_modules/@vue/server-renderer/package.json deleted file mode 100644 index d44abb9..0000000 --- a/node_modules/@vue/server-renderer/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "@vue/server-renderer", - "version": "3.5.13", - "description": "@vue/server-renderer", - "main": "index.js", - "module": "dist/server-renderer.esm-bundler.js", - "types": "dist/server-renderer.d.ts", - "files": [ - "index.js", - "dist" - ], - "exports": { - ".": { - "types": "./dist/server-renderer.d.ts", - "node": { - "production": "./dist/server-renderer.cjs.prod.js", - "development": "./dist/server-renderer.cjs.js", - "default": "./index.js" - }, - "module": "./dist/server-renderer.esm-bundler.js", - "import": "./dist/server-renderer.esm-bundler.js", - "require": "./index.js" - }, - "./*": "./*" - }, - "buildOptions": { - "name": "VueServerRenderer", - "formats": [ - "esm-bundler", - "esm-browser", - "cjs" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/vuejs/core.git", - "directory": "packages/server-renderer" - }, - "keywords": [ - "vue" - ], - "author": "Evan You", - "license": "MIT", - "bugs": { - "url": "https://github.com/vuejs/core/issues" - }, - "homepage": "https://github.com/vuejs/core/tree/main/packages/server-renderer#readme", - "peerDependencies": { - "vue": "3.5.13" - }, - "dependencies": { - "@vue/shared": "3.5.13", - "@vue/compiler-ssr": "3.5.13" - } -} \ No newline at end of file diff --git a/node_modules/@vue/shared/LICENSE b/node_modules/@vue/shared/LICENSE deleted file mode 100644 index 15f1f7e..0000000 --- a/node_modules/@vue/shared/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018-present, Yuxi (Evan) You - -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/node_modules/@vue/shared/README.md b/node_modules/@vue/shared/README.md deleted file mode 100644 index 1d01f2f..0000000 --- a/node_modules/@vue/shared/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# @vue/shared - -Internal utility functions and constants shared across `@vue` packages. diff --git a/node_modules/@vue/shared/dist/shared.cjs.js b/node_modules/@vue/shared/dist/shared.cjs.js deleted file mode 100644 index 94f7cc6..0000000 --- a/node_modules/@vue/shared/dist/shared.cjs.js +++ /dev/null @@ -1,594 +0,0 @@ -/** -* @vue/shared v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function makeMap(str) { - const map = /* @__PURE__ */ Object.create(null); - for (const key of str.split(",")) map[key] = 1; - return (val) => val in map; -} - -const EMPTY_OBJ = Object.freeze({}) ; -const EMPTY_ARR = Object.freeze([]) ; -const NOOP = () => { -}; -const NO = () => false; -const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter -(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); -const isModelListener = (key) => key.startsWith("onUpdate:"); -const extend = Object.assign; -const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } -}; -const hasOwnProperty = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty.call(val, key); -const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === "[object Map]"; -const isSet = (val) => toTypeString(val) === "[object Set]"; -const isDate = (val) => toTypeString(val) === "[object Date]"; -const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; -const isFunction = (val) => typeof val === "function"; -const isString = (val) => typeof val === "string"; -const isSymbol = (val) => typeof val === "symbol"; -const isObject = (val) => val !== null && typeof val === "object"; -const isPromise = (val) => { - return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); -}; -const objectToString = Object.prototype.toString; -const toTypeString = (value) => objectToString.call(value); -const toRawType = (value) => { - return toTypeString(value).slice(8, -1); -}; -const isPlainObject = (val) => toTypeString(val) === "[object Object]"; -const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; -const isReservedProp = /* @__PURE__ */ makeMap( - // the leading comma is intentional so empty string "" is also included - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" -); -const isBuiltInDirective = /* @__PURE__ */ makeMap( - "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" -); -const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -const camelizeRE = /-(\w)/g; -const camelize = cacheStringFunction( - (str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); - } -); -const hyphenateRE = /\B([A-Z])/g; -const hyphenate = cacheStringFunction( - (str) => str.replace(hyphenateRE, "-$1").toLowerCase() -); -const capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); -}); -const toHandlerKey = cacheStringFunction( - (str) => { - const s = str ? `on${capitalize(str)}` : ``; - return s; - } -); -const hasChanged = (value, oldValue) => !Object.is(value, oldValue); -const invokeArrayFns = (fns, ...arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](...arg); - } -}; -const def = (obj, key, value, writable = false) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - writable, - value - }); -}; -const looseToNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; -}; -const toNumber = (val) => { - const n = isString(val) ? Number(val) : NaN; - return isNaN(n) ? val : n; -}; -let _globalThis; -const getGlobalThis = () => { - return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); -}; -const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; -function genPropsAccessExp(name) { - return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`; -} -function genCacheKey(source, options) { - return source + JSON.stringify( - options, - (_, val) => typeof val === "function" ? val.toString() : val - ); -} - -const PatchFlags = { - "TEXT": 1, - "1": "TEXT", - "CLASS": 2, - "2": "CLASS", - "STYLE": 4, - "4": "STYLE", - "PROPS": 8, - "8": "PROPS", - "FULL_PROPS": 16, - "16": "FULL_PROPS", - "NEED_HYDRATION": 32, - "32": "NEED_HYDRATION", - "STABLE_FRAGMENT": 64, - "64": "STABLE_FRAGMENT", - "KEYED_FRAGMENT": 128, - "128": "KEYED_FRAGMENT", - "UNKEYED_FRAGMENT": 256, - "256": "UNKEYED_FRAGMENT", - "NEED_PATCH": 512, - "512": "NEED_PATCH", - "DYNAMIC_SLOTS": 1024, - "1024": "DYNAMIC_SLOTS", - "DEV_ROOT_FRAGMENT": 2048, - "2048": "DEV_ROOT_FRAGMENT", - "CACHED": -1, - "-1": "CACHED", - "BAIL": -2, - "-2": "BAIL" -}; -const PatchFlagNames = { - [1]: `TEXT`, - [2]: `CLASS`, - [4]: `STYLE`, - [8]: `PROPS`, - [16]: `FULL_PROPS`, - [32]: `NEED_HYDRATION`, - [64]: `STABLE_FRAGMENT`, - [128]: `KEYED_FRAGMENT`, - [256]: `UNKEYED_FRAGMENT`, - [512]: `NEED_PATCH`, - [1024]: `DYNAMIC_SLOTS`, - [2048]: `DEV_ROOT_FRAGMENT`, - [-1]: `HOISTED`, - [-2]: `BAIL` -}; - -const ShapeFlags = { - "ELEMENT": 1, - "1": "ELEMENT", - "FUNCTIONAL_COMPONENT": 2, - "2": "FUNCTIONAL_COMPONENT", - "STATEFUL_COMPONENT": 4, - "4": "STATEFUL_COMPONENT", - "TEXT_CHILDREN": 8, - "8": "TEXT_CHILDREN", - "ARRAY_CHILDREN": 16, - "16": "ARRAY_CHILDREN", - "SLOTS_CHILDREN": 32, - "32": "SLOTS_CHILDREN", - "TELEPORT": 64, - "64": "TELEPORT", - "SUSPENSE": 128, - "128": "SUSPENSE", - "COMPONENT_SHOULD_KEEP_ALIVE": 256, - "256": "COMPONENT_SHOULD_KEEP_ALIVE", - "COMPONENT_KEPT_ALIVE": 512, - "512": "COMPONENT_KEPT_ALIVE", - "COMPONENT": 6, - "6": "COMPONENT" -}; - -const SlotFlags = { - "STABLE": 1, - "1": "STABLE", - "DYNAMIC": 2, - "2": "DYNAMIC", - "FORWARDED": 3, - "3": "FORWARDED" -}; -const slotFlagsText = { - [1]: "STABLE", - [2]: "DYNAMIC", - [3]: "FORWARDED" -}; - -const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; -const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); -const isGloballyWhitelisted = isGloballyAllowed; - -const range = 2; -function generateCodeFrame(source, start = 0, end = source.length) { - start = Math.max(0, Math.min(start, source.length)); - end = Math.max(0, Math.min(end, source.length)); - if (start > end) return ""; - let lines = source.split(/(\r?\n)/); - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) continue; - const line = j + 1; - res.push( - `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` - ); - const lineLength = lines[j].length; - const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; - if (j === i) { - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max( - 1, - end > count ? lineLength - pad : end - start - ); - res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); - } else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + "^".repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; - } - } - return res.join("\n"); -} - -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } else if (isString(value) || isObject(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:([^]+)/; -const styleCommentRE = /\/\*[^]*?\*\//g; -function parseStringStyle(cssText) { - const ret = {}; - cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function stringifyStyle(styles) { - if (!styles) return ""; - if (isString(styles)) return styles; - let ret = ""; - for (const key in styles) { - const value = styles[key]; - if (isString(value) || typeof value === "number") { - const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); - ret += `${normalizedKey}:${value};`; - } - } - return ret; -} -function normalizeClass(value) { - let res = ""; - if (isString(value)) { - res = value; - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + " "; - } - } - } else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + " "; - } - } - } - return res.trim(); -} -function normalizeProps(props) { - if (!props) return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; -} - -const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; -const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; -const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; -const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; -const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); -const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); -const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); -const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); - -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); -const isBooleanAttr = /* @__PURE__ */ makeMap( - specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` -); -function includeBooleanAttr(value) { - return !!value || value === ""; -} -const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; -const attrValidationCache = {}; -function isSSRSafeAttrName(name) { - if (attrValidationCache.hasOwnProperty(name)) { - return attrValidationCache[name]; - } - const isUnsafe = unsafeAttrCharRE.test(name); - if (isUnsafe) { - console.error(`unsafe attribute name: ${name}`); - } - return attrValidationCache[name] = !isUnsafe; -} -const propsToAttrMap = { - acceptCharset: "accept-charset", - className: "class", - htmlFor: "for", - httpEquiv: "http-equiv" -}; -const isKnownHtmlAttr = /* @__PURE__ */ makeMap( - `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` -); -const isKnownSvgAttr = /* @__PURE__ */ makeMap( - `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` -); -const isKnownMathMLAttr = /* @__PURE__ */ makeMap( - `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns` -); -function isRenderableAttrValue(value) { - if (value == null) { - return false; - } - const type = typeof value; - return type === "string" || type === "number" || type === "boolean"; -} - -const escapeRE = /["'&<>]/; -function escapeHtml(string) { - const str = "" + string; - const match = escapeRE.exec(str); - if (!match) { - return str; - } - let html = ""; - let escaped; - let index; - let lastIndex = 0; - for (index = match.index; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: - escaped = """; - break; - case 38: - escaped = "&"; - break; - case 39: - escaped = "'"; - break; - case 60: - escaped = "<"; - break; - case 62: - escaped = ">"; - break; - default: - continue; - } - if (lastIndex !== index) { - html += str.slice(lastIndex, index); - } - lastIndex = index + 1; - html += escaped; - } - return lastIndex !== index ? html + str.slice(lastIndex, index) : html; -} -const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; -function escapeHtmlComment(src) { - return src.replace(commentStripRE, ""); -} -const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; -function getEscapedCssVarName(key, doubleEscape) { - return key.replace( - cssVarNameEscapeSymbolsRE, - (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}` - ); -} - -function looseCompareArrays(a, b) { - if (a.length !== b.length) return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex((item) => looseEqual(item, val)); -} - -const isRef = (val) => { - return !!(val && val["__v_isRef"] === true); -}; -const toDisplayString = (val) => { - return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); -}; -const replacer = (_key, val) => { - if (isRef(val)) { - return replacer(_key, val.value); - } else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce( - (entries, [key, val2], i) => { - entries[stringifySymbol(key, i) + " =>"] = val2; - return entries; - }, - {} - ) - }; - } else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) - }; - } else if (isSymbol(val)) { - return stringifySymbol(val); - } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; -const stringifySymbol = (v, i = "") => { - var _a; - return ( - // Symbol.description in es2019+ so we need to cast here to pass - // the lib: es2016 check - isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v - ); -}; - -exports.EMPTY_ARR = EMPTY_ARR; -exports.EMPTY_OBJ = EMPTY_OBJ; -exports.NO = NO; -exports.NOOP = NOOP; -exports.PatchFlagNames = PatchFlagNames; -exports.PatchFlags = PatchFlags; -exports.ShapeFlags = ShapeFlags; -exports.SlotFlags = SlotFlags; -exports.camelize = camelize; -exports.capitalize = capitalize; -exports.cssVarNameEscapeSymbolsRE = cssVarNameEscapeSymbolsRE; -exports.def = def; -exports.escapeHtml = escapeHtml; -exports.escapeHtmlComment = escapeHtmlComment; -exports.extend = extend; -exports.genCacheKey = genCacheKey; -exports.genPropsAccessExp = genPropsAccessExp; -exports.generateCodeFrame = generateCodeFrame; -exports.getEscapedCssVarName = getEscapedCssVarName; -exports.getGlobalThis = getGlobalThis; -exports.hasChanged = hasChanged; -exports.hasOwn = hasOwn; -exports.hyphenate = hyphenate; -exports.includeBooleanAttr = includeBooleanAttr; -exports.invokeArrayFns = invokeArrayFns; -exports.isArray = isArray; -exports.isBooleanAttr = isBooleanAttr; -exports.isBuiltInDirective = isBuiltInDirective; -exports.isDate = isDate; -exports.isFunction = isFunction; -exports.isGloballyAllowed = isGloballyAllowed; -exports.isGloballyWhitelisted = isGloballyWhitelisted; -exports.isHTMLTag = isHTMLTag; -exports.isIntegerKey = isIntegerKey; -exports.isKnownHtmlAttr = isKnownHtmlAttr; -exports.isKnownMathMLAttr = isKnownMathMLAttr; -exports.isKnownSvgAttr = isKnownSvgAttr; -exports.isMap = isMap; -exports.isMathMLTag = isMathMLTag; -exports.isModelListener = isModelListener; -exports.isObject = isObject; -exports.isOn = isOn; -exports.isPlainObject = isPlainObject; -exports.isPromise = isPromise; -exports.isRegExp = isRegExp; -exports.isRenderableAttrValue = isRenderableAttrValue; -exports.isReservedProp = isReservedProp; -exports.isSSRSafeAttrName = isSSRSafeAttrName; -exports.isSVGTag = isSVGTag; -exports.isSet = isSet; -exports.isSpecialBooleanAttr = isSpecialBooleanAttr; -exports.isString = isString; -exports.isSymbol = isSymbol; -exports.isVoidTag = isVoidTag; -exports.looseEqual = looseEqual; -exports.looseIndexOf = looseIndexOf; -exports.looseToNumber = looseToNumber; -exports.makeMap = makeMap; -exports.normalizeClass = normalizeClass; -exports.normalizeProps = normalizeProps; -exports.normalizeStyle = normalizeStyle; -exports.objectToString = objectToString; -exports.parseStringStyle = parseStringStyle; -exports.propsToAttrMap = propsToAttrMap; -exports.remove = remove; -exports.slotFlagsText = slotFlagsText; -exports.stringifyStyle = stringifyStyle; -exports.toDisplayString = toDisplayString; -exports.toHandlerKey = toHandlerKey; -exports.toNumber = toNumber; -exports.toRawType = toRawType; -exports.toTypeString = toTypeString; diff --git a/node_modules/@vue/shared/dist/shared.cjs.prod.js b/node_modules/@vue/shared/dist/shared.cjs.prod.js deleted file mode 100644 index 14b1902..0000000 --- a/node_modules/@vue/shared/dist/shared.cjs.prod.js +++ /dev/null @@ -1,594 +0,0 @@ -/** -* @vue/shared v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function makeMap(str) { - const map = /* @__PURE__ */ Object.create(null); - for (const key of str.split(",")) map[key] = 1; - return (val) => val in map; -} - -const EMPTY_OBJ = {}; -const EMPTY_ARR = []; -const NOOP = () => { -}; -const NO = () => false; -const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter -(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); -const isModelListener = (key) => key.startsWith("onUpdate:"); -const extend = Object.assign; -const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } -}; -const hasOwnProperty = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty.call(val, key); -const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === "[object Map]"; -const isSet = (val) => toTypeString(val) === "[object Set]"; -const isDate = (val) => toTypeString(val) === "[object Date]"; -const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; -const isFunction = (val) => typeof val === "function"; -const isString = (val) => typeof val === "string"; -const isSymbol = (val) => typeof val === "symbol"; -const isObject = (val) => val !== null && typeof val === "object"; -const isPromise = (val) => { - return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); -}; -const objectToString = Object.prototype.toString; -const toTypeString = (value) => objectToString.call(value); -const toRawType = (value) => { - return toTypeString(value).slice(8, -1); -}; -const isPlainObject = (val) => toTypeString(val) === "[object Object]"; -const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; -const isReservedProp = /* @__PURE__ */ makeMap( - // the leading comma is intentional so empty string "" is also included - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" -); -const isBuiltInDirective = /* @__PURE__ */ makeMap( - "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" -); -const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -const camelizeRE = /-(\w)/g; -const camelize = cacheStringFunction( - (str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); - } -); -const hyphenateRE = /\B([A-Z])/g; -const hyphenate = cacheStringFunction( - (str) => str.replace(hyphenateRE, "-$1").toLowerCase() -); -const capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); -}); -const toHandlerKey = cacheStringFunction( - (str) => { - const s = str ? `on${capitalize(str)}` : ``; - return s; - } -); -const hasChanged = (value, oldValue) => !Object.is(value, oldValue); -const invokeArrayFns = (fns, ...arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](...arg); - } -}; -const def = (obj, key, value, writable = false) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - writable, - value - }); -}; -const looseToNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; -}; -const toNumber = (val) => { - const n = isString(val) ? Number(val) : NaN; - return isNaN(n) ? val : n; -}; -let _globalThis; -const getGlobalThis = () => { - return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); -}; -const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; -function genPropsAccessExp(name) { - return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`; -} -function genCacheKey(source, options) { - return source + JSON.stringify( - options, - (_, val) => typeof val === "function" ? val.toString() : val - ); -} - -const PatchFlags = { - "TEXT": 1, - "1": "TEXT", - "CLASS": 2, - "2": "CLASS", - "STYLE": 4, - "4": "STYLE", - "PROPS": 8, - "8": "PROPS", - "FULL_PROPS": 16, - "16": "FULL_PROPS", - "NEED_HYDRATION": 32, - "32": "NEED_HYDRATION", - "STABLE_FRAGMENT": 64, - "64": "STABLE_FRAGMENT", - "KEYED_FRAGMENT": 128, - "128": "KEYED_FRAGMENT", - "UNKEYED_FRAGMENT": 256, - "256": "UNKEYED_FRAGMENT", - "NEED_PATCH": 512, - "512": "NEED_PATCH", - "DYNAMIC_SLOTS": 1024, - "1024": "DYNAMIC_SLOTS", - "DEV_ROOT_FRAGMENT": 2048, - "2048": "DEV_ROOT_FRAGMENT", - "CACHED": -1, - "-1": "CACHED", - "BAIL": -2, - "-2": "BAIL" -}; -const PatchFlagNames = { - [1]: `TEXT`, - [2]: `CLASS`, - [4]: `STYLE`, - [8]: `PROPS`, - [16]: `FULL_PROPS`, - [32]: `NEED_HYDRATION`, - [64]: `STABLE_FRAGMENT`, - [128]: `KEYED_FRAGMENT`, - [256]: `UNKEYED_FRAGMENT`, - [512]: `NEED_PATCH`, - [1024]: `DYNAMIC_SLOTS`, - [2048]: `DEV_ROOT_FRAGMENT`, - [-1]: `HOISTED`, - [-2]: `BAIL` -}; - -const ShapeFlags = { - "ELEMENT": 1, - "1": "ELEMENT", - "FUNCTIONAL_COMPONENT": 2, - "2": "FUNCTIONAL_COMPONENT", - "STATEFUL_COMPONENT": 4, - "4": "STATEFUL_COMPONENT", - "TEXT_CHILDREN": 8, - "8": "TEXT_CHILDREN", - "ARRAY_CHILDREN": 16, - "16": "ARRAY_CHILDREN", - "SLOTS_CHILDREN": 32, - "32": "SLOTS_CHILDREN", - "TELEPORT": 64, - "64": "TELEPORT", - "SUSPENSE": 128, - "128": "SUSPENSE", - "COMPONENT_SHOULD_KEEP_ALIVE": 256, - "256": "COMPONENT_SHOULD_KEEP_ALIVE", - "COMPONENT_KEPT_ALIVE": 512, - "512": "COMPONENT_KEPT_ALIVE", - "COMPONENT": 6, - "6": "COMPONENT" -}; - -const SlotFlags = { - "STABLE": 1, - "1": "STABLE", - "DYNAMIC": 2, - "2": "DYNAMIC", - "FORWARDED": 3, - "3": "FORWARDED" -}; -const slotFlagsText = { - [1]: "STABLE", - [2]: "DYNAMIC", - [3]: "FORWARDED" -}; - -const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; -const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); -const isGloballyWhitelisted = isGloballyAllowed; - -const range = 2; -function generateCodeFrame(source, start = 0, end = source.length) { - start = Math.max(0, Math.min(start, source.length)); - end = Math.max(0, Math.min(end, source.length)); - if (start > end) return ""; - let lines = source.split(/(\r?\n)/); - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) continue; - const line = j + 1; - res.push( - `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` - ); - const lineLength = lines[j].length; - const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; - if (j === i) { - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max( - 1, - end > count ? lineLength - pad : end - start - ); - res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); - } else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + "^".repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; - } - } - return res.join("\n"); -} - -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } else if (isString(value) || isObject(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:([^]+)/; -const styleCommentRE = /\/\*[^]*?\*\//g; -function parseStringStyle(cssText) { - const ret = {}; - cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function stringifyStyle(styles) { - if (!styles) return ""; - if (isString(styles)) return styles; - let ret = ""; - for (const key in styles) { - const value = styles[key]; - if (isString(value) || typeof value === "number") { - const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); - ret += `${normalizedKey}:${value};`; - } - } - return ret; -} -function normalizeClass(value) { - let res = ""; - if (isString(value)) { - res = value; - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + " "; - } - } - } else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + " "; - } - } - } - return res.trim(); -} -function normalizeProps(props) { - if (!props) return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; -} - -const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; -const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; -const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; -const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; -const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); -const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); -const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); -const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); - -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); -const isBooleanAttr = /* @__PURE__ */ makeMap( - specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` -); -function includeBooleanAttr(value) { - return !!value || value === ""; -} -const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; -const attrValidationCache = {}; -function isSSRSafeAttrName(name) { - if (attrValidationCache.hasOwnProperty(name)) { - return attrValidationCache[name]; - } - const isUnsafe = unsafeAttrCharRE.test(name); - if (isUnsafe) { - console.error(`unsafe attribute name: ${name}`); - } - return attrValidationCache[name] = !isUnsafe; -} -const propsToAttrMap = { - acceptCharset: "accept-charset", - className: "class", - htmlFor: "for", - httpEquiv: "http-equiv" -}; -const isKnownHtmlAttr = /* @__PURE__ */ makeMap( - `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` -); -const isKnownSvgAttr = /* @__PURE__ */ makeMap( - `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` -); -const isKnownMathMLAttr = /* @__PURE__ */ makeMap( - `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns` -); -function isRenderableAttrValue(value) { - if (value == null) { - return false; - } - const type = typeof value; - return type === "string" || type === "number" || type === "boolean"; -} - -const escapeRE = /["'&<>]/; -function escapeHtml(string) { - const str = "" + string; - const match = escapeRE.exec(str); - if (!match) { - return str; - } - let html = ""; - let escaped; - let index; - let lastIndex = 0; - for (index = match.index; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: - escaped = """; - break; - case 38: - escaped = "&"; - break; - case 39: - escaped = "'"; - break; - case 60: - escaped = "<"; - break; - case 62: - escaped = ">"; - break; - default: - continue; - } - if (lastIndex !== index) { - html += str.slice(lastIndex, index); - } - lastIndex = index + 1; - html += escaped; - } - return lastIndex !== index ? html + str.slice(lastIndex, index) : html; -} -const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; -function escapeHtmlComment(src) { - return src.replace(commentStripRE, ""); -} -const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; -function getEscapedCssVarName(key, doubleEscape) { - return key.replace( - cssVarNameEscapeSymbolsRE, - (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}` - ); -} - -function looseCompareArrays(a, b) { - if (a.length !== b.length) return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex((item) => looseEqual(item, val)); -} - -const isRef = (val) => { - return !!(val && val["__v_isRef"] === true); -}; -const toDisplayString = (val) => { - return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); -}; -const replacer = (_key, val) => { - if (isRef(val)) { - return replacer(_key, val.value); - } else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce( - (entries, [key, val2], i) => { - entries[stringifySymbol(key, i) + " =>"] = val2; - return entries; - }, - {} - ) - }; - } else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) - }; - } else if (isSymbol(val)) { - return stringifySymbol(val); - } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; -const stringifySymbol = (v, i = "") => { - var _a; - return ( - // Symbol.description in es2019+ so we need to cast here to pass - // the lib: es2016 check - isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v - ); -}; - -exports.EMPTY_ARR = EMPTY_ARR; -exports.EMPTY_OBJ = EMPTY_OBJ; -exports.NO = NO; -exports.NOOP = NOOP; -exports.PatchFlagNames = PatchFlagNames; -exports.PatchFlags = PatchFlags; -exports.ShapeFlags = ShapeFlags; -exports.SlotFlags = SlotFlags; -exports.camelize = camelize; -exports.capitalize = capitalize; -exports.cssVarNameEscapeSymbolsRE = cssVarNameEscapeSymbolsRE; -exports.def = def; -exports.escapeHtml = escapeHtml; -exports.escapeHtmlComment = escapeHtmlComment; -exports.extend = extend; -exports.genCacheKey = genCacheKey; -exports.genPropsAccessExp = genPropsAccessExp; -exports.generateCodeFrame = generateCodeFrame; -exports.getEscapedCssVarName = getEscapedCssVarName; -exports.getGlobalThis = getGlobalThis; -exports.hasChanged = hasChanged; -exports.hasOwn = hasOwn; -exports.hyphenate = hyphenate; -exports.includeBooleanAttr = includeBooleanAttr; -exports.invokeArrayFns = invokeArrayFns; -exports.isArray = isArray; -exports.isBooleanAttr = isBooleanAttr; -exports.isBuiltInDirective = isBuiltInDirective; -exports.isDate = isDate; -exports.isFunction = isFunction; -exports.isGloballyAllowed = isGloballyAllowed; -exports.isGloballyWhitelisted = isGloballyWhitelisted; -exports.isHTMLTag = isHTMLTag; -exports.isIntegerKey = isIntegerKey; -exports.isKnownHtmlAttr = isKnownHtmlAttr; -exports.isKnownMathMLAttr = isKnownMathMLAttr; -exports.isKnownSvgAttr = isKnownSvgAttr; -exports.isMap = isMap; -exports.isMathMLTag = isMathMLTag; -exports.isModelListener = isModelListener; -exports.isObject = isObject; -exports.isOn = isOn; -exports.isPlainObject = isPlainObject; -exports.isPromise = isPromise; -exports.isRegExp = isRegExp; -exports.isRenderableAttrValue = isRenderableAttrValue; -exports.isReservedProp = isReservedProp; -exports.isSSRSafeAttrName = isSSRSafeAttrName; -exports.isSVGTag = isSVGTag; -exports.isSet = isSet; -exports.isSpecialBooleanAttr = isSpecialBooleanAttr; -exports.isString = isString; -exports.isSymbol = isSymbol; -exports.isVoidTag = isVoidTag; -exports.looseEqual = looseEqual; -exports.looseIndexOf = looseIndexOf; -exports.looseToNumber = looseToNumber; -exports.makeMap = makeMap; -exports.normalizeClass = normalizeClass; -exports.normalizeProps = normalizeProps; -exports.normalizeStyle = normalizeStyle; -exports.objectToString = objectToString; -exports.parseStringStyle = parseStringStyle; -exports.propsToAttrMap = propsToAttrMap; -exports.remove = remove; -exports.slotFlagsText = slotFlagsText; -exports.stringifyStyle = stringifyStyle; -exports.toDisplayString = toDisplayString; -exports.toHandlerKey = toHandlerKey; -exports.toNumber = toNumber; -exports.toRawType = toRawType; -exports.toTypeString = toTypeString; diff --git a/node_modules/@vue/shared/dist/shared.d.ts b/node_modules/@vue/shared/dist/shared.d.ts deleted file mode 100644 index ab2199d..0000000 --- a/node_modules/@vue/shared/dist/shared.d.ts +++ /dev/null @@ -1,328 +0,0 @@ -/** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ -/*! #__NO_SIDE_EFFECTS__ */ -export declare function makeMap(str: string): (key: string) => boolean; - -export declare const EMPTY_OBJ: { - readonly [key: string]: any; -}; -export declare const EMPTY_ARR: readonly never[]; -export declare const NOOP: () => void; -/** - * Always return false. - */ -export declare const NO: () => boolean; -export declare const isOn: (key: string) => boolean; -export declare const isModelListener: (key: string) => key is `onUpdate:${string}`; -export declare const extend: typeof Object.assign; -export declare const remove: <T>(arr: T[], el: T) => void; -export declare const hasOwn: (val: object, key: string | symbol) => key is keyof typeof val; -export declare const isArray: typeof Array.isArray; -export declare const isMap: (val: unknown) => val is Map<any, any>; -export declare const isSet: (val: unknown) => val is Set<any>; -export declare const isDate: (val: unknown) => val is Date; -export declare const isRegExp: (val: unknown) => val is RegExp; -export declare const isFunction: (val: unknown) => val is Function; -export declare const isString: (val: unknown) => val is string; -export declare const isSymbol: (val: unknown) => val is symbol; -export declare const isObject: (val: unknown) => val is Record<any, any>; -export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>; -export declare const objectToString: typeof Object.prototype.toString; -export declare const toTypeString: (value: unknown) => string; -export declare const toRawType: (value: unknown) => string; -export declare const isPlainObject: (val: unknown) => val is object; -export declare const isIntegerKey: (key: unknown) => boolean; -export declare const isReservedProp: (key: string) => boolean; -export declare const isBuiltInDirective: (key: string) => boolean; -/** - * @private - */ -export declare const camelize: (str: string) => string; -/** - * @private - */ -export declare const hyphenate: (str: string) => string; -/** - * @private - */ -export declare const capitalize: <T extends string>(str: T) => Capitalize<T>; -/** - * @private - */ -export declare const toHandlerKey: <T extends string>(str: T) => T extends '' ? '' : `on${Capitalize<T>}`; -export declare const hasChanged: (value: any, oldValue: any) => boolean; -export declare const invokeArrayFns: (fns: Function[], ...arg: any[]) => void; -export declare const def: (obj: object, key: string | symbol, value: any, writable?: boolean) => void; -/** - * "123-foo" will be parsed to 123 - * This is used for the .number modifier in v-model - */ -export declare const looseToNumber: (val: any) => any; -/** - * Only concerns number-like strings - * "123-foo" will be returned as-is - */ -export declare const toNumber: (val: any) => any; -export declare const getGlobalThis: () => any; -export declare function genPropsAccessExp(name: string): string; -export declare function genCacheKey(source: string, options: any): string; - -/** - * Patch flags are optimization hints generated by the compiler. - * when a block with dynamicChildren is encountered during diff, the algorithm - * enters "optimized mode". In this mode, we know that the vdom is produced by - * a render function generated by the compiler, so the algorithm only needs to - * handle updates explicitly marked by these patch flags. - * - * Patch flags can be combined using the | bitwise operator and can be checked - * using the & operator, e.g. - * - * ```js - * const flag = TEXT | CLASS - * if (flag & TEXT) { ... } - * ``` - * - * Check the `patchElement` function in '../../runtime-core/src/renderer.ts' to see how the - * flags are handled during diff. - */ -export declare enum PatchFlags { - /** - * Indicates an element with dynamic textContent (children fast path) - */ - TEXT = 1, - /** - * Indicates an element with dynamic class binding. - */ - CLASS = 2, - /** - * Indicates an element with dynamic style - * The compiler pre-compiles static string styles into static objects - * + detects and hoists inline static objects - * e.g. `style="color: red"` and `:style="{ color: 'red' }"` both get hoisted - * as: - * ```js - * const style = { color: 'red' } - * render() { return e('div', { style }) } - * ``` - */ - STYLE = 4, - /** - * Indicates an element that has non-class/style dynamic props. - * Can also be on a component that has any dynamic props (includes - * class/style). when this flag is present, the vnode also has a dynamicProps - * array that contains the keys of the props that may change so the runtime - * can diff them faster (without having to worry about removed props) - */ - PROPS = 8, - /** - * Indicates an element with props with dynamic keys. When keys change, a full - * diff is always needed to remove the old key. This flag is mutually - * exclusive with CLASS, STYLE and PROPS. - */ - FULL_PROPS = 16, - /** - * Indicates an element that requires props hydration - * (but not necessarily patching) - * e.g. event listeners & v-bind with prop modifier - */ - NEED_HYDRATION = 32, - /** - * Indicates a fragment whose children order doesn't change. - */ - STABLE_FRAGMENT = 64, - /** - * Indicates a fragment with keyed or partially keyed children - */ - KEYED_FRAGMENT = 128, - /** - * Indicates a fragment with unkeyed children. - */ - UNKEYED_FRAGMENT = 256, - /** - * Indicates an element that only needs non-props patching, e.g. ref or - * directives (onVnodeXXX hooks). since every patched vnode checks for refs - * and onVnodeXXX hooks, it simply marks the vnode so that a parent block - * will track it. - */ - NEED_PATCH = 512, - /** - * Indicates a component with dynamic slots (e.g. slot that references a v-for - * iterated value, or dynamic slot names). - * Components with this flag are always force updated. - */ - DYNAMIC_SLOTS = 1024, - /** - * Indicates a fragment that was created only because the user has placed - * comments at the root level of a template. This is a dev-only flag since - * comments are stripped in production. - */ - DEV_ROOT_FRAGMENT = 2048, - /** - * SPECIAL FLAGS ------------------------------------------------------------- - * Special flags are negative integers. They are never matched against using - * bitwise operators (bitwise matching should only happen in branches where - * patchFlag > 0), and are mutually exclusive. When checking for a special - * flag, simply check patchFlag === FLAG. - */ - /** - * Indicates a cached static vnode. This is also a hint for hydration to skip - * the entire sub tree since static content never needs to be updated. - */ - CACHED = -1, - /** - * A special flag that indicates that the diffing algorithm should bail out - * of optimized mode. For example, on block fragments created by renderSlot() - * when encountering non-compiler generated slots (i.e. manually written - * render functions, which should always be fully diffed) - * OR manually cloneVNodes - */ - BAIL = -2 -} -/** - * dev only flag -> name mapping - */ -export declare const PatchFlagNames: Record<PatchFlags, string>; - -export declare enum ShapeFlags { - ELEMENT = 1, - FUNCTIONAL_COMPONENT = 2, - STATEFUL_COMPONENT = 4, - TEXT_CHILDREN = 8, - ARRAY_CHILDREN = 16, - SLOTS_CHILDREN = 32, - TELEPORT = 64, - SUSPENSE = 128, - COMPONENT_SHOULD_KEEP_ALIVE = 256, - COMPONENT_KEPT_ALIVE = 512, - COMPONENT = 6 -} - -export declare enum SlotFlags { - /** - * Stable slots that only reference slot props or context state. The slot - * can fully capture its own dependencies so when passed down the parent won't - * need to force the child to update. - */ - STABLE = 1, - /** - * Slots that reference scope variables (v-for or an outer slot prop), or - * has conditional structure (v-if, v-for). The parent will need to force - * the child to update because the slot does not fully capture its dependencies. - */ - DYNAMIC = 2, - /** - * `<slot/>` being forwarded into a child component. Whether the parent needs - * to update the child is dependent on what kind of slots the parent itself - * received. This has to be refined at runtime, when the child's vnode - * is being created (in `normalizeChildren`) - */ - FORWARDED = 3 -} -/** - * Dev only - */ -export declare const slotFlagsText: Record<SlotFlags, string>; - -export declare const isGloballyAllowed: (key: string) => boolean; -/** @deprecated use `isGloballyAllowed` instead */ -export declare const isGloballyWhitelisted: (key: string) => boolean; - -export declare function generateCodeFrame(source: string, start?: number, end?: number): string; - -export type NormalizedStyle = Record<string, string | number>; -export declare function normalizeStyle(value: unknown): NormalizedStyle | string | undefined; -export declare function parseStringStyle(cssText: string): NormalizedStyle; -export declare function stringifyStyle(styles: NormalizedStyle | string | undefined): string; -export declare function normalizeClass(value: unknown): string; -export declare function normalizeProps(props: Record<string, any> | null): Record<string, any> | null; - -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `__DEV__` flag. - */ -export declare const isHTMLTag: (key: string) => boolean; -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `__DEV__` flag. - */ -export declare const isSVGTag: (key: string) => boolean; -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `__DEV__` flag. - */ -export declare const isMathMLTag: (key: string) => boolean; -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `__DEV__` flag. - */ -export declare const isVoidTag: (key: string) => boolean; - -export declare const isSpecialBooleanAttr: (key: string) => boolean; -/** - * The full list is needed during SSR to produce the correct initial markup. - */ -export declare const isBooleanAttr: (key: string) => boolean; -/** - * Boolean attributes should be included if the value is truthy or ''. - * e.g. `<select multiple>` compiles to `{ multiple: '' }` - */ -export declare function includeBooleanAttr(value: unknown): boolean; -export declare function isSSRSafeAttrName(name: string): boolean; -export declare const propsToAttrMap: Record<string, string | undefined>; -/** - * Known attributes, this is used for stringification of runtime static nodes - * so that we don't stringify bindings that cannot be set from HTML. - * Don't also forget to allow `data-*` and `aria-*`! - * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes - */ -export declare const isKnownHtmlAttr: (key: string) => boolean; -/** - * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute - */ -export declare const isKnownSvgAttr: (key: string) => boolean; -/** - * Generated from https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute - */ -export declare const isKnownMathMLAttr: (key: string) => boolean; -/** - * Shared between server-renderer and runtime-core hydration logic - */ -export declare function isRenderableAttrValue(value: unknown): boolean; - -export declare function escapeHtml(string: unknown): string; -export declare function escapeHtmlComment(src: string): string; -export declare const cssVarNameEscapeSymbolsRE: RegExp; -export declare function getEscapedCssVarName(key: string, doubleEscape: boolean): string; - -export declare function looseEqual(a: any, b: any): boolean; -export declare function looseIndexOf(arr: any[], val: any): number; - -/** - * For converting {{ interpolation }} values to displayed strings. - * @private - */ -export declare const toDisplayString: (val: unknown) => string; - -export type Prettify<T> = { - [K in keyof T]: T[K]; -} & {}; -export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; -export type LooseRequired<T> = { - [P in keyof (T & Required<T>)]: T[P]; -}; -export type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N; -export type IsKeyValues<T, K = string> = IfAny<T, false, T extends object ? (keyof T extends K ? true : false) : false>; -/** - * Utility for extracting the parameters from a function overload (for typed emits) - * https://github.com/microsoft/TypeScript/issues/32164#issuecomment-1146737709 - */ -export type OverloadParameters<T extends (...args: any[]) => any> = Parameters<OverloadUnion<T>>; -type OverloadProps<TOverload> = Pick<TOverload, keyof TOverload>; -type OverloadUnionRecursive<TOverload, TPartialOverload = unknown> = TOverload extends (...args: infer TArgs) => infer TReturn ? TPartialOverload extends TOverload ? never : OverloadUnionRecursive<TPartialOverload & TOverload, TPartialOverload & ((...args: TArgs) => TReturn) & OverloadProps<TOverload>> | ((...args: TArgs) => TReturn) : never; -type OverloadUnion<TOverload extends (...args: any[]) => any> = Exclude<OverloadUnionRecursive<(() => never) & TOverload>, TOverload extends () => never ? never : () => never>; - diff --git a/node_modules/@vue/shared/dist/shared.esm-bundler.js b/node_modules/@vue/shared/dist/shared.esm-bundler.js deleted file mode 100644 index 68f3306..0000000 --- a/node_modules/@vue/shared/dist/shared.esm-bundler.js +++ /dev/null @@ -1,519 +0,0 @@ -/** -* @vue/shared v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function makeMap(str) { - const map = /* @__PURE__ */ Object.create(null); - for (const key of str.split(",")) map[key] = 1; - return (val) => val in map; -} - -const EMPTY_OBJ = !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {}; -const EMPTY_ARR = !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : []; -const NOOP = () => { -}; -const NO = () => false; -const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter -(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); -const isModelListener = (key) => key.startsWith("onUpdate:"); -const extend = Object.assign; -const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } -}; -const hasOwnProperty = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty.call(val, key); -const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === "[object Map]"; -const isSet = (val) => toTypeString(val) === "[object Set]"; -const isDate = (val) => toTypeString(val) === "[object Date]"; -const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; -const isFunction = (val) => typeof val === "function"; -const isString = (val) => typeof val === "string"; -const isSymbol = (val) => typeof val === "symbol"; -const isObject = (val) => val !== null && typeof val === "object"; -const isPromise = (val) => { - return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); -}; -const objectToString = Object.prototype.toString; -const toTypeString = (value) => objectToString.call(value); -const toRawType = (value) => { - return toTypeString(value).slice(8, -1); -}; -const isPlainObject = (val) => toTypeString(val) === "[object Object]"; -const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; -const isReservedProp = /* @__PURE__ */ makeMap( - // the leading comma is intentional so empty string "" is also included - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" -); -const isBuiltInDirective = /* @__PURE__ */ makeMap( - "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" -); -const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -const camelizeRE = /-(\w)/g; -const camelize = cacheStringFunction( - (str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); - } -); -const hyphenateRE = /\B([A-Z])/g; -const hyphenate = cacheStringFunction( - (str) => str.replace(hyphenateRE, "-$1").toLowerCase() -); -const capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); -}); -const toHandlerKey = cacheStringFunction( - (str) => { - const s = str ? `on${capitalize(str)}` : ``; - return s; - } -); -const hasChanged = (value, oldValue) => !Object.is(value, oldValue); -const invokeArrayFns = (fns, ...arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](...arg); - } -}; -const def = (obj, key, value, writable = false) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - writable, - value - }); -}; -const looseToNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; -}; -const toNumber = (val) => { - const n = isString(val) ? Number(val) : NaN; - return isNaN(n) ? val : n; -}; -let _globalThis; -const getGlobalThis = () => { - return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); -}; -const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; -function genPropsAccessExp(name) { - return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`; -} -function genCacheKey(source, options) { - return source + JSON.stringify( - options, - (_, val) => typeof val === "function" ? val.toString() : val - ); -} - -const PatchFlags = { - "TEXT": 1, - "1": "TEXT", - "CLASS": 2, - "2": "CLASS", - "STYLE": 4, - "4": "STYLE", - "PROPS": 8, - "8": "PROPS", - "FULL_PROPS": 16, - "16": "FULL_PROPS", - "NEED_HYDRATION": 32, - "32": "NEED_HYDRATION", - "STABLE_FRAGMENT": 64, - "64": "STABLE_FRAGMENT", - "KEYED_FRAGMENT": 128, - "128": "KEYED_FRAGMENT", - "UNKEYED_FRAGMENT": 256, - "256": "UNKEYED_FRAGMENT", - "NEED_PATCH": 512, - "512": "NEED_PATCH", - "DYNAMIC_SLOTS": 1024, - "1024": "DYNAMIC_SLOTS", - "DEV_ROOT_FRAGMENT": 2048, - "2048": "DEV_ROOT_FRAGMENT", - "CACHED": -1, - "-1": "CACHED", - "BAIL": -2, - "-2": "BAIL" -}; -const PatchFlagNames = { - [1]: `TEXT`, - [2]: `CLASS`, - [4]: `STYLE`, - [8]: `PROPS`, - [16]: `FULL_PROPS`, - [32]: `NEED_HYDRATION`, - [64]: `STABLE_FRAGMENT`, - [128]: `KEYED_FRAGMENT`, - [256]: `UNKEYED_FRAGMENT`, - [512]: `NEED_PATCH`, - [1024]: `DYNAMIC_SLOTS`, - [2048]: `DEV_ROOT_FRAGMENT`, - [-1]: `HOISTED`, - [-2]: `BAIL` -}; - -const ShapeFlags = { - "ELEMENT": 1, - "1": "ELEMENT", - "FUNCTIONAL_COMPONENT": 2, - "2": "FUNCTIONAL_COMPONENT", - "STATEFUL_COMPONENT": 4, - "4": "STATEFUL_COMPONENT", - "TEXT_CHILDREN": 8, - "8": "TEXT_CHILDREN", - "ARRAY_CHILDREN": 16, - "16": "ARRAY_CHILDREN", - "SLOTS_CHILDREN": 32, - "32": "SLOTS_CHILDREN", - "TELEPORT": 64, - "64": "TELEPORT", - "SUSPENSE": 128, - "128": "SUSPENSE", - "COMPONENT_SHOULD_KEEP_ALIVE": 256, - "256": "COMPONENT_SHOULD_KEEP_ALIVE", - "COMPONENT_KEPT_ALIVE": 512, - "512": "COMPONENT_KEPT_ALIVE", - "COMPONENT": 6, - "6": "COMPONENT" -}; - -const SlotFlags = { - "STABLE": 1, - "1": "STABLE", - "DYNAMIC": 2, - "2": "DYNAMIC", - "FORWARDED": 3, - "3": "FORWARDED" -}; -const slotFlagsText = { - [1]: "STABLE", - [2]: "DYNAMIC", - [3]: "FORWARDED" -}; - -const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; -const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); -const isGloballyWhitelisted = isGloballyAllowed; - -const range = 2; -function generateCodeFrame(source, start = 0, end = source.length) { - start = Math.max(0, Math.min(start, source.length)); - end = Math.max(0, Math.min(end, source.length)); - if (start > end) return ""; - let lines = source.split(/(\r?\n)/); - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) continue; - const line = j + 1; - res.push( - `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` - ); - const lineLength = lines[j].length; - const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; - if (j === i) { - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max( - 1, - end > count ? lineLength - pad : end - start - ); - res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); - } else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + "^".repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; - } - } - return res.join("\n"); -} - -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } else if (isString(value) || isObject(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:([^]+)/; -const styleCommentRE = /\/\*[^]*?\*\//g; -function parseStringStyle(cssText) { - const ret = {}; - cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function stringifyStyle(styles) { - if (!styles) return ""; - if (isString(styles)) return styles; - let ret = ""; - for (const key in styles) { - const value = styles[key]; - if (isString(value) || typeof value === "number") { - const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); - ret += `${normalizedKey}:${value};`; - } - } - return ret; -} -function normalizeClass(value) { - let res = ""; - if (isString(value)) { - res = value; - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + " "; - } - } - } else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + " "; - } - } - } - return res.trim(); -} -function normalizeProps(props) { - if (!props) return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; -} - -const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; -const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; -const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; -const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; -const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); -const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); -const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); -const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); - -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); -const isBooleanAttr = /* @__PURE__ */ makeMap( - specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` -); -function includeBooleanAttr(value) { - return !!value || value === ""; -} -const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; -const attrValidationCache = {}; -function isSSRSafeAttrName(name) { - if (attrValidationCache.hasOwnProperty(name)) { - return attrValidationCache[name]; - } - const isUnsafe = unsafeAttrCharRE.test(name); - if (isUnsafe) { - console.error(`unsafe attribute name: ${name}`); - } - return attrValidationCache[name] = !isUnsafe; -} -const propsToAttrMap = { - acceptCharset: "accept-charset", - className: "class", - htmlFor: "for", - httpEquiv: "http-equiv" -}; -const isKnownHtmlAttr = /* @__PURE__ */ makeMap( - `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` -); -const isKnownSvgAttr = /* @__PURE__ */ makeMap( - `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` -); -const isKnownMathMLAttr = /* @__PURE__ */ makeMap( - `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns` -); -function isRenderableAttrValue(value) { - if (value == null) { - return false; - } - const type = typeof value; - return type === "string" || type === "number" || type === "boolean"; -} - -const escapeRE = /["'&<>]/; -function escapeHtml(string) { - const str = "" + string; - const match = escapeRE.exec(str); - if (!match) { - return str; - } - let html = ""; - let escaped; - let index; - let lastIndex = 0; - for (index = match.index; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: - escaped = """; - break; - case 38: - escaped = "&"; - break; - case 39: - escaped = "'"; - break; - case 60: - escaped = "<"; - break; - case 62: - escaped = ">"; - break; - default: - continue; - } - if (lastIndex !== index) { - html += str.slice(lastIndex, index); - } - lastIndex = index + 1; - html += escaped; - } - return lastIndex !== index ? html + str.slice(lastIndex, index) : html; -} -const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; -function escapeHtmlComment(src) { - return src.replace(commentStripRE, ""); -} -const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; -function getEscapedCssVarName(key, doubleEscape) { - return key.replace( - cssVarNameEscapeSymbolsRE, - (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}` - ); -} - -function looseCompareArrays(a, b) { - if (a.length !== b.length) return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex((item) => looseEqual(item, val)); -} - -const isRef = (val) => { - return !!(val && val["__v_isRef"] === true); -}; -const toDisplayString = (val) => { - return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); -}; -const replacer = (_key, val) => { - if (isRef(val)) { - return replacer(_key, val.value); - } else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce( - (entries, [key, val2], i) => { - entries[stringifySymbol(key, i) + " =>"] = val2; - return entries; - }, - {} - ) - }; - } else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) - }; - } else if (isSymbol(val)) { - return stringifySymbol(val); - } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; -const stringifySymbol = (v, i = "") => { - var _a; - return ( - // Symbol.description in es2019+ so we need to cast here to pass - // the lib: es2016 check - isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v - ); -}; - -export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString }; diff --git a/node_modules/@vue/shared/index.js b/node_modules/@vue/shared/index.js deleted file mode 100644 index a2ee43e..0000000 --- a/node_modules/@vue/shared/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/shared.cjs.prod.js') -} else { - module.exports = require('./dist/shared.cjs.js') -} diff --git a/node_modules/@vue/shared/package.json b/node_modules/@vue/shared/package.json deleted file mode 100644 index 9541478..0000000 --- a/node_modules/@vue/shared/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@vue/shared", - "version": "3.5.13", - "description": "internal utils shared across @vue packages", - "main": "index.js", - "module": "dist/shared.esm-bundler.js", - "types": "dist/shared.d.ts", - "files": [ - "index.js", - "dist" - ], - "exports": { - ".": { - "types": "./dist/shared.d.ts", - "node": { - "production": "./dist/shared.cjs.prod.js", - "development": "./dist/shared.cjs.js", - "default": "./index.js" - }, - "module": "./dist/shared.esm-bundler.js", - "import": "./dist/shared.esm-bundler.js", - "require": "./index.js" - }, - "./*": "./*" - }, - "sideEffects": false, - "buildOptions": { - "formats": [ - "esm-bundler", - "cjs" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/vuejs/core.git", - "directory": "packages/shared" - }, - "keywords": [ - "vue" - ], - "author": "Evan You", - "license": "MIT", - "bugs": { - "url": "https://github.com/vuejs/core/issues" - }, - "homepage": "https://github.com/vuejs/core/tree/main/packages/shared#readme" -} \ No newline at end of file diff --git a/node_modules/ansi-styles/index.d.ts b/node_modules/ansi-styles/index.d.ts deleted file mode 100644 index 44a907e..0000000 --- a/node_modules/ansi-styles/index.d.ts +++ /dev/null @@ -1,345 +0,0 @@ -declare type CSSColor = - | 'aliceblue' - | 'antiquewhite' - | 'aqua' - | 'aquamarine' - | 'azure' - | 'beige' - | 'bisque' - | 'black' - | 'blanchedalmond' - | 'blue' - | 'blueviolet' - | 'brown' - | 'burlywood' - | 'cadetblue' - | 'chartreuse' - | 'chocolate' - | 'coral' - | 'cornflowerblue' - | 'cornsilk' - | 'crimson' - | 'cyan' - | 'darkblue' - | 'darkcyan' - | 'darkgoldenrod' - | 'darkgray' - | 'darkgreen' - | 'darkgrey' - | 'darkkhaki' - | 'darkmagenta' - | 'darkolivegreen' - | 'darkorange' - | 'darkorchid' - | 'darkred' - | 'darksalmon' - | 'darkseagreen' - | 'darkslateblue' - | 'darkslategray' - | 'darkslategrey' - | 'darkturquoise' - | 'darkviolet' - | 'deeppink' - | 'deepskyblue' - | 'dimgray' - | 'dimgrey' - | 'dodgerblue' - | 'firebrick' - | 'floralwhite' - | 'forestgreen' - | 'fuchsia' - | 'gainsboro' - | 'ghostwhite' - | 'gold' - | 'goldenrod' - | 'gray' - | 'green' - | 'greenyellow' - | 'grey' - | 'honeydew' - | 'hotpink' - | 'indianred' - | 'indigo' - | 'ivory' - | 'khaki' - | 'lavender' - | 'lavenderblush' - | 'lawngreen' - | 'lemonchiffon' - | 'lightblue' - | 'lightcoral' - | 'lightcyan' - | 'lightgoldenrodyellow' - | 'lightgray' - | 'lightgreen' - | 'lightgrey' - | 'lightpink' - | 'lightsalmon' - | 'lightseagreen' - | 'lightskyblue' - | 'lightslategray' - | 'lightslategrey' - | 'lightsteelblue' - | 'lightyellow' - | 'lime' - | 'limegreen' - | 'linen' - | 'magenta' - | 'maroon' - | 'mediumaquamarine' - | 'mediumblue' - | 'mediumorchid' - | 'mediumpurple' - | 'mediumseagreen' - | 'mediumslateblue' - | 'mediumspringgreen' - | 'mediumturquoise' - | 'mediumvioletred' - | 'midnightblue' - | 'mintcream' - | 'mistyrose' - | 'moccasin' - | 'navajowhite' - | 'navy' - | 'oldlace' - | 'olive' - | 'olivedrab' - | 'orange' - | 'orangered' - | 'orchid' - | 'palegoldenrod' - | 'palegreen' - | 'paleturquoise' - | 'palevioletred' - | 'papayawhip' - | 'peachpuff' - | 'peru' - | 'pink' - | 'plum' - | 'powderblue' - | 'purple' - | 'rebeccapurple' - | 'red' - | 'rosybrown' - | 'royalblue' - | 'saddlebrown' - | 'salmon' - | 'sandybrown' - | 'seagreen' - | 'seashell' - | 'sienna' - | 'silver' - | 'skyblue' - | 'slateblue' - | 'slategray' - | 'slategrey' - | 'snow' - | 'springgreen' - | 'steelblue' - | 'tan' - | 'teal' - | 'thistle' - | 'tomato' - | 'turquoise' - | 'violet' - | 'wheat' - | 'white' - | 'whitesmoke' - | 'yellow' - | 'yellowgreen'; - -declare namespace ansiStyles { - interface ColorConvert { - /** - The RGB color space. - - @param red - (`0`-`255`) - @param green - (`0`-`255`) - @param blue - (`0`-`255`) - */ - rgb(red: number, green: number, blue: number): string; - - /** - The RGB HEX color space. - - @param hex - A hexadecimal string containing RGB data. - */ - hex(hex: string): string; - - /** - @param keyword - A CSS color name. - */ - keyword(keyword: CSSColor): string; - - /** - The HSL color space. - - @param hue - (`0`-`360`) - @param saturation - (`0`-`100`) - @param lightness - (`0`-`100`) - */ - hsl(hue: number, saturation: number, lightness: number): string; - - /** - The HSV color space. - - @param hue - (`0`-`360`) - @param saturation - (`0`-`100`) - @param value - (`0`-`100`) - */ - hsv(hue: number, saturation: number, value: number): string; - - /** - The HSV color space. - - @param hue - (`0`-`360`) - @param whiteness - (`0`-`100`) - @param blackness - (`0`-`100`) - */ - hwb(hue: number, whiteness: number, blackness: number): string; - - /** - Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color. - */ - ansi(ansi: number): string; - - /** - Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. - */ - ansi256(ansi: number): string; - } - - interface CSPair { - /** - The ANSI terminal control sequence for starting this style. - */ - readonly open: string; - - /** - The ANSI terminal control sequence for ending this style. - */ - readonly close: string; - } - - interface ColorBase { - readonly ansi: ColorConvert; - readonly ansi256: ColorConvert; - readonly ansi16m: ColorConvert; - - /** - The ANSI terminal control sequence for ending this color. - */ - readonly close: string; - } - - interface Modifier { - /** - Resets the current color chain. - */ - readonly reset: CSPair; - - /** - Make text bold. - */ - readonly bold: CSPair; - - /** - Emitting only a small amount of light. - */ - readonly dim: CSPair; - - /** - Make text italic. (Not widely supported) - */ - readonly italic: CSPair; - - /** - Make text underline. (Not widely supported) - */ - readonly underline: CSPair; - - /** - Inverse background and foreground colors. - */ - readonly inverse: CSPair; - - /** - Prints the text, but makes it invisible. - */ - readonly hidden: CSPair; - - /** - Puts a horizontal line through the center of the text. (Not widely supported) - */ - readonly strikethrough: CSPair; - } - - interface ForegroundColor { - readonly black: CSPair; - readonly red: CSPair; - readonly green: CSPair; - readonly yellow: CSPair; - readonly blue: CSPair; - readonly cyan: CSPair; - readonly magenta: CSPair; - readonly white: CSPair; - - /** - Alias for `blackBright`. - */ - readonly gray: CSPair; - - /** - Alias for `blackBright`. - */ - readonly grey: CSPair; - - readonly blackBright: CSPair; - readonly redBright: CSPair; - readonly greenBright: CSPair; - readonly yellowBright: CSPair; - readonly blueBright: CSPair; - readonly cyanBright: CSPair; - readonly magentaBright: CSPair; - readonly whiteBright: CSPair; - } - - interface BackgroundColor { - readonly bgBlack: CSPair; - readonly bgRed: CSPair; - readonly bgGreen: CSPair; - readonly bgYellow: CSPair; - readonly bgBlue: CSPair; - readonly bgCyan: CSPair; - readonly bgMagenta: CSPair; - readonly bgWhite: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGray: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGrey: CSPair; - - readonly bgBlackBright: CSPair; - readonly bgRedBright: CSPair; - readonly bgGreenBright: CSPair; - readonly bgYellowBright: CSPair; - readonly bgBlueBright: CSPair; - readonly bgCyanBright: CSPair; - readonly bgMagentaBright: CSPair; - readonly bgWhiteBright: CSPair; - } -} - -declare const ansiStyles: { - readonly modifier: ansiStyles.Modifier; - readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; - readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; - readonly codes: ReadonlyMap<number, number>; -} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier; - -export = ansiStyles; diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js deleted file mode 100644 index 5d82581..0000000 --- a/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; - -const wrapAnsi16 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => (...args) => { - const rgb = fn(...args); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -const ansi2ansi = n => n; -const rgb2rgb = (r, g, b) => [r, g, b]; - -const setLazyProperty = (object, property, get) => { - Object.defineProperty(object, property, { - get: () => { - const value = get(); - - Object.defineProperty(object, property, { - value, - enumerable: true, - configurable: true - }); - - return value; - }, - enumerable: true, - configurable: true - }); -}; - -/** @type {typeof import('color-convert')} */ -let colorConvert; -const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { - if (colorConvert === undefined) { - colorConvert = require('color-convert'); - } - - const offset = isBackground ? 10 : 0; - const styles = {}; - - for (const [sourceSpace, suite] of Object.entries(colorConvert)) { - const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; - if (sourceSpace === targetSpace) { - styles[name] = wrap(identity, offset); - } else if (typeof suite === 'object') { - styles[name] = wrap(suite[targetSpace], offset); - } - } - - return styles; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - - // Bright color - blackBright: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Alias bright black as gray (and grey) - styles.color.gray = styles.color.blackBright; - styles.bgColor.bgGray = styles.bgColor.bgBlackBright; - styles.color.grey = styles.color.blackBright; - styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; - - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - } - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); - setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); diff --git a/node_modules/ansi-styles/license b/node_modules/ansi-styles/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/ansi-styles/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/node_modules/ansi-styles/package.json b/node_modules/ansi-styles/package.json deleted file mode 100644 index 7539328..0000000 --- a/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "ansi-styles", - "version": "4.3.0", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "funding": "https://github.com/chalk/ansi-styles?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "color-convert": "^2.0.1" - }, - "devDependencies": { - "@types/color-convert": "^1.9.0", - "ava": "^2.3.0", - "svg-term-cli": "^2.1.1", - "tsd": "^0.11.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/ansi-styles/readme.md b/node_modules/ansi-styles/readme.md deleted file mode 100644 index 24883de..0000000 --- a/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,152 +0,0 @@ -# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) - -> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal - -You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - -<img src="screenshot.svg" width="900"> - -## Install - -``` -$ npm install ansi-styles -``` - -## Usage - -```js -const style = require('ansi-styles'); - -console.log(`${style.green.open}Hello world!${style.green.close}`); - - -// Color conversion between 16/256/truecolor -// NOTE: If conversion goes to 16 colors or 256 colors, the original color -// may be degraded to fit that color palette. This means terminals -// that do not support 16 million colors will best-match the -// original color. -console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); -console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); -console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close); -``` - -## API - -Each style has an `open` and `close` property. - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(Not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(Not widely supported)* - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `blackBright` (alias: `gray`, `grey`) -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` (alias: `bgGray`, `bgGrey`) -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - -## Advanced usage - -By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. - -- `style.modifier` -- `style.color` -- `style.bgColor` - -###### Example - -```js -console.log(style.color.green.open); -``` - -Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. - -###### Example - -```js -console.log(style.codes.get(36)); -//=> 39 -``` - -## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) - -`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. - -The following color spaces from `color-convert` are supported: - -- `rgb` -- `hex` -- `keyword` -- `hsl` -- `hsv` -- `hwb` -- `ansi` -- `ansi256` - -To use these, call the associated conversion function with the intended output, for example: - -```js -style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code -style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code - -style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code -style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code - -style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code -style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code -``` - -## Related - -- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - -## For enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/async/CHANGELOG.md b/node_modules/async/CHANGELOG.md deleted file mode 100644 index ec6b871..0000000 --- a/node_modules/async/CHANGELOG.md +++ /dev/null @@ -1,278 +0,0 @@ -# v2.6.4 -- Fix potential prototype pollution exploit (#1828) - -# v2.6.3 -- Updated lodash to squelch a security warning (#1675) - -# v2.6.2 -- Updated lodash to squelch a security warning (#1620) - -# v2.6.1 -- Updated lodash to prevent `npm audit` warnings. (#1532, #1533) -- Made `async-es` more optimized for webpack users (#1517) -- Fixed a stack overflow with large collections and a synchronous iterator (#1514) -- Various small fixes/chores (#1505, #1511, #1527, #1530) - -# v2.6.0 -- Added missing aliases for many methods. Previously, you could not (e.g.) `require('async/find')` or use `async.anyLimit`. (#1483) -- Improved `queue` performance. (#1448, #1454) -- Add missing sourcemap (#1452, #1453) -- Various doc updates (#1448, #1471, #1483) - -# v2.5.0 -- Added `concatLimit`, the `Limit` equivalent of [`concat`](https://caolan.github.io/async/docs.html#concat) ([#1426](https://github.com/caolan/async/issues/1426), [#1430](https://github.com/caolan/async/pull/1430)) -- `concat` improvements: it now preserves order, handles falsy values and the `iteratee` callback takes a variable number of arguments ([#1437](https://github.com/caolan/async/issues/1437), [#1436](https://github.com/caolan/async/pull/1436)) -- Fixed an issue in `queue` where there was a size discrepancy between `workersList().length` and `running()` ([#1428](https://github.com/caolan/async/issues/1428), [#1429](https://github.com/caolan/async/pull/1429)) -- Various doc fixes ([#1422](https://github.com/caolan/async/issues/1422), [#1424](https://github.com/caolan/async/pull/1424)) - -# v2.4.1 -- Fixed a bug preventing functions wrapped with `timeout()` from being re-used. ([#1418](https://github.com/caolan/async/issues/1418), [#1419](https://github.com/caolan/async/issues/1419)) - -# v2.4.0 -- Added `tryEach`, for running async functions in parallel, where you only expect one to succeed. ([#1365](https://github.com/caolan/async/issues/1365), [#687](https://github.com/caolan/async/issues/687)) -- Improved performance, most notably in `parallel` and `waterfall` ([#1395](https://github.com/caolan/async/issues/1395)) -- Added `queue.remove()`, for removing items in a `queue` ([#1397](https://github.com/caolan/async/issues/1397), [#1391](https://github.com/caolan/async/issues/1391)) -- Fixed using `eval`, preventing Async from running in pages with Content Security Policy ([#1404](https://github.com/caolan/async/issues/1404), [#1403](https://github.com/caolan/async/issues/1403)) -- Fixed errors thrown in an `asyncify`ed function's callback being caught by the underlying Promise ([#1408](https://github.com/caolan/async/issues/1408)) -- Fixed timing of `queue.empty()` ([#1367](https://github.com/caolan/async/issues/1367)) -- Various doc fixes ([#1314](https://github.com/caolan/async/issues/1314), [#1394](https://github.com/caolan/async/issues/1394), [#1412](https://github.com/caolan/async/issues/1412)) - -# v2.3.0 -- Added support for ES2017 `async` functions. Wherever you can pass a Node-style/CPS function that uses a callback, you can also pass an `async` function. Previously, you had to wrap `async` functions with `asyncify`. The caveat is that it will only work if `async` functions are supported natively in your environment, transpiled implementations can't be detected. ([#1386](https://github.com/caolan/async/issues/1386), [#1390](https://github.com/caolan/async/issues/1390)) -- Small doc fix ([#1392](https://github.com/caolan/async/issues/1392)) - -# v2.2.0 -- Added `groupBy`, and the `Series`/`Limit` equivalents, analogous to [`_.groupBy`](http://lodash.com/docs#groupBy) ([#1364](https://github.com/caolan/async/issues/1364)) -- Fixed `transform` bug when `callback` was not passed ([#1381](https://github.com/caolan/async/issues/1381)) -- Added note about `reflect` to `parallel` docs ([#1385](https://github.com/caolan/async/issues/1385)) - -# v2.1.5 -- Fix `auto` bug when function names collided with Array.prototype ([#1358](https://github.com/caolan/async/issues/1358)) -- Improve some error messages ([#1349](https://github.com/caolan/async/issues/1349)) -- Avoid stack overflow case in queue -- Fixed an issue in `some`, `every` and `find` where processing would continue after the result was determined. -- Cleanup implementations of `some`, `every` and `find` - -# v2.1.3 -- Make bundle size smaller -- Create optimized hotpath for `filter` in array case. - -# v2.1.2 -- Fixed a stackoverflow bug with `detect`, `some`, `every` on large inputs ([#1293](https://github.com/caolan/async/issues/1293)). - -# v2.1.0 - -- `retry` and `retryable` now support an optional `errorFilter` function that determines if the `task` should retry on the error ([#1256](https://github.com/caolan/async/issues/1256), [#1261](https://github.com/caolan/async/issues/1261)) -- Optimized array iteration in `race`, `cargo`, `queue`, and `priorityQueue` ([#1253](https://github.com/caolan/async/issues/1253)) -- Added alias documentation to doc site ([#1251](https://github.com/caolan/async/issues/1251), [#1254](https://github.com/caolan/async/issues/1254)) -- Added [BootStrap scrollspy](http://getbootstrap.com/javascript/#scrollspy) to docs to highlight in the sidebar the current method being viewed ([#1289](https://github.com/caolan/async/issues/1289), [#1300](https://github.com/caolan/async/issues/1300)) -- Various minor doc fixes ([#1263](https://github.com/caolan/async/issues/1263), [#1264](https://github.com/caolan/async/issues/1264), [#1271](https://github.com/caolan/async/issues/1271), [#1278](https://github.com/caolan/async/issues/1278), [#1280](https://github.com/caolan/async/issues/1280), [#1282](https://github.com/caolan/async/issues/1282), [#1302](https://github.com/caolan/async/issues/1302)) - -# v2.0.1 - -- Significantly optimized all iteration based collection methods such as `each`, `map`, `filter`, etc ([#1245](https://github.com/caolan/async/issues/1245), [#1246](https://github.com/caolan/async/issues/1246), [#1247](https://github.com/caolan/async/issues/1247)). - -# v2.0.0 - -Lots of changes here! - -First and foremost, we have a slick new [site for docs](https://caolan.github.io/async/). Special thanks to [**@hargasinski**](https://github.com/hargasinski) for his work converting our old docs to `jsdoc` format and implementing the new website. Also huge ups to [**@ivanseidel**](https://github.com/ivanseidel) for designing our new logo. It was a long process for both of these tasks, but I think these changes turned out extraordinary well. - -The biggest feature is modularization. You can now `require("async/series")` to only require the `series` function. Every Async library function is available this way. You still can `require("async")` to require the entire library, like you could do before. - -We also provide Async as a collection of ES2015 modules. You can now `import {each} from 'async-es'` or `import waterfall from 'async-es/waterfall'`. If you are using only a few Async functions, and are using a ES bundler such as Rollup, this can significantly lower your build size. - -Major thanks to [**@Kikobeats**](github.com/Kikobeats), [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for doing the majority of the modularization work, as well as [**@jdalton**](github.com/jdalton) and [**@Rich-Harris**](github.com/Rich-Harris) for advisory work on the general modularization strategy. - -Another one of the general themes of the 2.0 release is standardization of what an "async" function is. We are now more strictly following the node-style continuation passing style. That is, an async function is a function that: - -1. Takes a variable number of arguments -2. The last argument is always a callback -3. The callback can accept any number of arguments -4. The first argument passed to the callback will be treated as an error result, if the argument is truthy -5. Any number of result arguments can be passed after the "error" argument -6. The callback is called once and exactly once, either on the same tick or later tick of the JavaScript event loop. - -There were several cases where Async accepted some functions that did not strictly have these properties, most notably `auto`, `every`, `some`, `filter`, `reject` and `detect`. - -Another theme is performance. We have eliminated internal deferrals in all cases where they make sense. For example, in `waterfall` and `auto`, there was a `setImmediate` between each task -- these deferrals have been removed. A `setImmediate` call can add up to 1ms of delay. This might not seem like a lot, but it can add up if you are using many Async functions in the course of processing a HTTP request, for example. Nearly all asynchronous functions that do I/O already have some sort of deferral built in, so the extra deferral is unnecessary. The trade-off of this change is removing our built-in stack-overflow defense. Many synchronous callback calls in series can quickly overflow the JS call stack. If you do have a function that is sometimes synchronous (calling its callback on the same tick), and are running into stack overflows, wrap it with `async.ensureAsync()`. - -Another big performance win has been re-implementing `queue`, `cargo`, and `priorityQueue` with [doubly linked lists](https://en.wikipedia.org/wiki/Doubly_linked_list) instead of arrays. This has lead to queues being an order of [magnitude faster on large sets of tasks](https://github.com/caolan/async/pull/1205). - -## New Features - -- Async is now modularized. Individual functions can be `require()`d from the main package. (`require('async/auto')`) ([#984](https://github.com/caolan/async/issues/984), [#996](https://github.com/caolan/async/issues/996)) -- Async is also available as a collection of ES2015 modules in the new `async-es` package. (`import {forEachSeries} from 'async-es'`) ([#984](https://github.com/caolan/async/issues/984), [#996](https://github.com/caolan/async/issues/996)) -- Added `race`, analogous to `Promise.race()`. It will run an array of async tasks in parallel and will call its callback with the result of the first task to respond. ([#568](https://github.com/caolan/async/issues/568), [#1038](https://github.com/caolan/async/issues/1038)) -- Collection methods now accept ES2015 iterators. Maps, Sets, and anything that implements the iterator spec can now be passed directly to `each`, `map`, `parallel`, etc.. ([#579](https://github.com/caolan/async/issues/579), [#839](https://github.com/caolan/async/issues/839), [#1074](https://github.com/caolan/async/issues/1074)) -- Added `mapValues`, for mapping over the properties of an object and returning an object with the same keys. ([#1157](https://github.com/caolan/async/issues/1157), [#1177](https://github.com/caolan/async/issues/1177)) -- Added `timeout`, a wrapper for an async function that will make the task time-out after the specified time. ([#1007](https://github.com/caolan/async/issues/1007), [#1027](https://github.com/caolan/async/issues/1027)) -- Added `reflect` and `reflectAll`, analagous to [`Promise.reflect()`](http://bluebirdjs.com/docs/api/reflect.html), a wrapper for async tasks that always succeeds, by gathering results and errors into an object. ([#942](https://github.com/caolan/async/issues/942), [#1012](https://github.com/caolan/async/issues/1012), [#1095](https://github.com/caolan/async/issues/1095)) -- `constant` supports dynamic arguments -- it will now always use its last argument as the callback. ([#1016](https://github.com/caolan/async/issues/1016), [#1052](https://github.com/caolan/async/issues/1052)) -- `setImmediate` and `nextTick` now support arguments to partially apply to the deferred function, like the node-native versions do. ([#940](https://github.com/caolan/async/issues/940), [#1053](https://github.com/caolan/async/issues/1053)) -- `auto` now supports resolving cyclic dependencies using [Kahn's algorithm](https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm) ([#1140](https://github.com/caolan/async/issues/1140)). -- Added `autoInject`, a relative of `auto` that automatically spreads a task's dependencies as arguments to the task function. ([#608](https://github.com/caolan/async/issues/608), [#1055](https://github.com/caolan/async/issues/1055), [#1099](https://github.com/caolan/async/issues/1099), [#1100](https://github.com/caolan/async/issues/1100)) -- You can now limit the concurrency of `auto` tasks. ([#635](https://github.com/caolan/async/issues/635), [#637](https://github.com/caolan/async/issues/637)) -- Added `retryable`, a relative of `retry` that wraps an async function, making it retry when called. ([#1058](https://github.com/caolan/async/issues/1058)) -- `retry` now supports specifying a function that determines the next time interval, useful for exponential backoff, logging and other retry strategies. ([#1161](https://github.com/caolan/async/issues/1161)) -- `retry` will now pass all of the arguments the task function was resolved with to the callback ([#1231](https://github.com/caolan/async/issues/1231)). -- Added `q.unsaturated` -- callback called when a `queue`'s number of running workers falls below a threshold. ([#868](https://github.com/caolan/async/issues/868), [#1030](https://github.com/caolan/async/issues/1030), [#1033](https://github.com/caolan/async/issues/1033), [#1034](https://github.com/caolan/async/issues/1034)) -- Added `q.error` -- a callback called whenever a `queue` task calls its callback with an error. ([#1170](https://github.com/caolan/async/issues/1170)) -- `applyEach` and `applyEachSeries` now pass results to the final callback. ([#1088](https://github.com/caolan/async/issues/1088)) - -## Breaking changes - -- Calling a callback more than once is considered an error, and an error will be thrown. This had an explicit breaking change in `waterfall`. If you were relying on this behavior, you should more accurately represent your control flow as an event emitter or stream. ([#814](https://github.com/caolan/async/issues/814), [#815](https://github.com/caolan/async/issues/815), [#1048](https://github.com/caolan/async/issues/1048), [#1050](https://github.com/caolan/async/issues/1050)) -- `auto` task functions now always take the callback as the last argument. If a task has dependencies, the `results` object will be passed as the first argument. To migrate old task functions, wrap them with [`_.flip`](https://lodash.com/docs#flip) ([#1036](https://github.com/caolan/async/issues/1036), [#1042](https://github.com/caolan/async/issues/1042)) -- Internal `setImmediate` calls have been refactored away. This may make existing flows vulnerable to stack overflows if you use many synchronous functions in series. Use `ensureAsync` to work around this. ([#696](https://github.com/caolan/async/issues/696), [#704](https://github.com/caolan/async/issues/704), [#1049](https://github.com/caolan/async/issues/1049), [#1050](https://github.com/caolan/async/issues/1050)) -- `map` used to return an object when iterating over an object. `map` now always returns an array, like in other libraries. The previous object behavior has been split out into `mapValues`. ([#1157](https://github.com/caolan/async/issues/1157), [#1177](https://github.com/caolan/async/issues/1177)) -- `filter`, `reject`, `some`, `every`, `detect` and their families like `{METHOD}Series` and `{METHOD}Limit` now expect an error as the first callback argument, rather than just a simple boolean. Pass `null` as the first argument, or use `fs.access` instead of `fs.exists`. ([#118](https://github.com/caolan/async/issues/118), [#774](https://github.com/caolan/async/issues/774), [#1028](https://github.com/caolan/async/issues/1028), [#1041](https://github.com/caolan/async/issues/1041)) -- `{METHOD}` and `{METHOD}Series` are now implemented in terms of `{METHOD}Limit`. This is a major internal simplification, and is not expected to cause many problems, but it does subtly affect how functions execute internally. ([#778](https://github.com/caolan/async/issues/778), [#847](https://github.com/caolan/async/issues/847)) -- `retry`'s callback is now optional. Previously, omitting the callback would partially apply the function, meaning it could be passed directly as a task to `series` or `auto`. The partially applied "control-flow" behavior has been separated out into `retryable`. ([#1054](https://github.com/caolan/async/issues/1054), [#1058](https://github.com/caolan/async/issues/1058)) -- The test function for `whilst`, `until`, and `during` used to be passed non-error args from the iteratee function's callback, but this led to weirdness where the first call of the test function would be passed no args. We have made it so the test function is never passed extra arguments, and only the `doWhilst`, `doUntil`, and `doDuring` functions pass iteratee callback arguments to the test function ([#1217](https://github.com/caolan/async/issues/1217), [#1224](https://github.com/caolan/async/issues/1224)) -- The `q.tasks` array has been renamed `q._tasks` and is now implemented as a doubly linked list (DLL). Any code that used to interact with this array will need to be updated to either use the provided helpers or support DLLs ([#1205](https://github.com/caolan/async/issues/1205)). -- The timing of the `q.saturated()` callback in a `queue` has been modified to better reflect when tasks pushed to the queue will start queueing. ([#724](https://github.com/caolan/async/issues/724), [#1078](https://github.com/caolan/async/issues/1078)) -- Removed `iterator` method in favour of [ES2015 iterator protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators ) which natively supports arrays ([#1237](https://github.com/caolan/async/issues/1237)) -- Dropped support for Component, Jam, SPM, and Volo ([#1175](https://github.com/caolan/async/issues/1175), #[#176](https://github.com/caolan/async/issues/176)) - -## Bug Fixes - -- Improved handling of no dependency cases in `auto` & `autoInject` ([#1147](https://github.com/caolan/async/issues/1147)). -- Fixed a bug where the callback generated by `asyncify` with `Promises` could resolve twice ([#1197](https://github.com/caolan/async/issues/1197)). -- Fixed several documented optional callbacks not actually being optional ([#1223](https://github.com/caolan/async/issues/1223)). - -## Other - -- Added `someSeries` and `everySeries` for symmetry, as well as a complete set of `any`/`anyLimit`/`anySeries` and `all`/`/allLmit`/`allSeries` aliases. -- Added `find` as an alias for `detect. (as well as `findLimit` and `findSeries`). -- Various doc fixes ([#1005](https://github.com/caolan/async/issues/1005), [#1008](https://github.com/caolan/async/issues/1008), [#1010](https://github.com/caolan/async/issues/1010), [#1015](https://github.com/caolan/async/issues/1015), [#1021](https://github.com/caolan/async/issues/1021), [#1037](https://github.com/caolan/async/issues/1037), [#1039](https://github.com/caolan/async/issues/1039), [#1051](https://github.com/caolan/async/issues/1051), [#1102](https://github.com/caolan/async/issues/1102), [#1107](https://github.com/caolan/async/issues/1107), [#1121](https://github.com/caolan/async/issues/1121), [#1123](https://github.com/caolan/async/issues/1123), [#1129](https://github.com/caolan/async/issues/1129), [#1135](https://github.com/caolan/async/issues/1135), [#1138](https://github.com/caolan/async/issues/1138), [#1141](https://github.com/caolan/async/issues/1141), [#1153](https://github.com/caolan/async/issues/1153), [#1216](https://github.com/caolan/async/issues/1216), [#1217](https://github.com/caolan/async/issues/1217), [#1232](https://github.com/caolan/async/issues/1232), [#1233](https://github.com/caolan/async/issues/1233), [#1236](https://github.com/caolan/async/issues/1236), [#1238](https://github.com/caolan/async/issues/1238)) - -Thank you [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for taking the lead on version 2 of async. - ------------------------------------------- - -# v1.5.2 -- Allow using `"constructor"` as an argument in `memoize` ([#998](https://github.com/caolan/async/issues/998)) -- Give a better error messsage when `auto` dependency checking fails ([#994](https://github.com/caolan/async/issues/994)) -- Various doc updates ([#936](https://github.com/caolan/async/issues/936), [#956](https://github.com/caolan/async/issues/956), [#979](https://github.com/caolan/async/issues/979), [#1002](https://github.com/caolan/async/issues/1002)) - -# v1.5.1 -- Fix issue with `pause` in `queue` with concurrency enabled ([#946](https://github.com/caolan/async/issues/946)) -- `while` and `until` now pass the final result to callback ([#963](https://github.com/caolan/async/issues/963)) -- `auto` will properly handle concurrency when there is no callback ([#966](https://github.com/caolan/async/issues/966)) -- `auto` will no. properly stop execution when an error occurs ([#988](https://github.com/caolan/async/issues/988), [#993](https://github.com/caolan/async/issues/993)) -- Various doc fixes ([#971](https://github.com/caolan/async/issues/971), [#980](https://github.com/caolan/async/issues/980)) - -# v1.5.0 - -- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) ([#892](https://github.com/caolan/async/issues/892)) -- `map` now returns an object when an object is passed in, rather than array with non-numeric keys. `map` will begin always returning an array with numeric indexes in the next major release. ([#873](https://github.com/caolan/async/issues/873)) -- `auto` now accepts an optional `concurrency` argument to limit the number o. running tasks ([#637](https://github.com/caolan/async/issues/637)) -- Added `queue#workersList()`, to retrieve the lis. of currently running tasks. ([#891](https://github.com/caolan/async/issues/891)) -- Various code simplifications ([#896](https://github.com/caolan/async/issues/896), [#904](https://github.com/caolan/async/issues/904)) -- Various doc fixes :scroll: ([#890](https://github.com/caolan/async/issues/890), [#894](https://github.com/caolan/async/issues/894), [#903](https://github.com/caolan/async/issues/903), [#905](https://github.com/caolan/async/issues/905), [#912](https://github.com/caolan/async/issues/912)) - -# v1.4.2 - -- Ensure coverage files don't get published on npm ([#879](https://github.com/caolan/async/issues/879)) - -# v1.4.1 - -- Add in overlooked `detectLimit` method ([#866](https://github.com/caolan/async/issues/866)) -- Removed unnecessary files from npm releases ([#861](https://github.com/caolan/async/issues/861)) -- Removed usage of a reserved word to prevent :boom: in older environments ([#870](https://github.com/caolan/async/issues/870)) - -# v1.4.0 - -- `asyncify` now supports promises ([#840](https://github.com/caolan/async/issues/840)) -- Added `Limit` versions of `filter` and `reject` ([#836](https://github.com/caolan/async/issues/836)) -- Add `Limit` versions of `detect`, `some` and `every` ([#828](https://github.com/caolan/async/issues/828), [#829](https://github.com/caolan/async/issues/829)) -- `some`, `every` and `detect` now short circuit early ([#828](https://github.com/caolan/async/issues/828), [#829](https://github.com/caolan/async/issues/829)) -- Improve detection of the global object ([#804](https://github.com/caolan/async/issues/804)), enabling use in WebWorkers -- `whilst` now called with arguments from iterator ([#823](https://github.com/caolan/async/issues/823)) -- `during` now gets called with arguments from iterator ([#824](https://github.com/caolan/async/issues/824)) -- Code simplifications and optimizations aplenty ([diff](https://github.com/caolan/async/compare/v1.3.0...v1.4.0)) - - -# v1.3.0 - -New Features: -- Added `constant` -- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. ([#671](https://github.com/caolan/async/issues/671), [#806](https://github.com/caolan/async/issues/806)) -- Added `during` and `doDuring`, which are like `whilst` with an async truth test. ([#800](https://github.com/caolan/async/issues/800)) -- `retry` now accepts an `interval` parameter to specify a delay between retries. ([#793](https://github.com/caolan/async/issues/793)) -- `async` should work better in Web Workers due to better `root` detection ([#804](https://github.com/caolan/async/issues/804)) -- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` ([#642](https://github.com/caolan/async/issues/642)) -- Various internal updates ([#786](https://github.com/caolan/async/issues/786), [#801](https://github.com/caolan/async/issues/801), [#802](https://github.com/caolan/async/issues/802), [#803](https://github.com/caolan/async/issues/803)) -- Various doc fixes ([#790](https://github.com/caolan/async/issues/790), [#794](https://github.com/caolan/async/issues/794)) - -Bug Fixes: -- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. ([#740](https://github.com/caolan/async/issues/740), [#744](https://github.com/caolan/async/issues/744), [#783](https://github.com/caolan/async/issues/783)) - - -# v1.2.1 - -Bug Fix: - -- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. ([#782](https://github.com/caolan/async/issues/782)) - - -# v1.2.0 - -New Features: - -- Added `timesLimit` ([#743](https://github.com/caolan/async/issues/743)) -- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. ([#747](https://github.com/caolan/async/issues/747), [#772](https://github.com/caolan/async/issues/772)) - -Bug Fixes: - -- Fixed a regression in `each` and family with empty arrays that have additional properties. ([#775](https://github.com/caolan/async/issues/775), [#777](https://github.com/caolan/async/issues/777)) - - -# v1.1.1 - -Bug Fix: - -- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. ([#782](https://github.com/caolan/async/issues/782)) - - -# v1.1.0 - -New Features: - -- `cargo` now supports all of the same methods and event callbacks as `queue`. -- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. ([#769](https://github.com/caolan/async/issues/769)) -- Optimized `map`, `eachOf`, and `waterfall` families of functions -- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array ([#667](https://github.com/caolan/async/issues/667)). -- The callback is now optional for the composed results of `compose` and `seq`. ([#618](https://github.com/caolan/async/issues/618)) -- Reduced file size by 4kb, (minified version by 1kb) -- Added code coverage through `nyc` and `coveralls` ([#768](https://github.com/caolan/async/issues/768)) - -Bug Fixes: - -- `forever` will no longer stack overflow with a synchronous iterator ([#622](https://github.com/caolan/async/issues/622)) -- `eachLimit` and other limit functions will stop iterating once an error occurs ([#754](https://github.com/caolan/async/issues/754)) -- Always pass `null` in callbacks when there is no error ([#439](https://github.com/caolan/async/issues/439)) -- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue ([#668](https://github.com/caolan/async/issues/668)) -- `each` and family will properly handle an empty array ([#578](https://github.com/caolan/async/issues/578)) -- `eachSeries` and family will finish if the underlying array is modified during execution ([#557](https://github.com/caolan/async/issues/557)) -- `queue` will throw if a non-function is passed to `q.push()` ([#593](https://github.com/caolan/async/issues/593)) -- Doc fixes ([#629](https://github.com/caolan/async/issues/629), [#766](https://github.com/caolan/async/issues/766)) - - -# v1.0.0 - -No known breaking changes, we are simply complying with semver from here on out. - -Changes: - -- Start using a changelog! -- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) ([#168](https://github.com/caolan/async/issues/168) [#704](https://github.com/caolan/async/issues/704) [#321](https://github.com/caolan/async/issues/321)) -- Detect deadlocks in `auto` ([#663](https://github.com/caolan/async/issues/663)) -- Better support for require.js ([#527](https://github.com/caolan/async/issues/527)) -- Throw if queue created with concurrency `0` ([#714](https://github.com/caolan/async/issues/714)) -- Fix unneeded iteration in `queue.resume()` ([#758](https://github.com/caolan/async/issues/758)) -- Guard against timer mocking overriding `setImmediate` ([#609](https://github.com/caolan/async/issues/609) [#611](https://github.com/caolan/async/issues/611)) -- Miscellaneous doc fixes ([#542](https://github.com/caolan/async/issues/542) [#596](https://github.com/caolan/async/issues/596) [#615](https://github.com/caolan/async/issues/615) [#628](https://github.com/caolan/async/issues/628) [#631](https://github.com/caolan/async/issues/631) [#690](https://github.com/caolan/async/issues/690) [#729](https://github.com/caolan/async/issues/729)) -- Use single noop function internally ([#546](https://github.com/caolan/async/issues/546)) -- Optimize internal `_each`, `_map` and `_keys` functions. diff --git a/node_modules/async/LICENSE b/node_modules/async/LICENSE deleted file mode 100644 index b18aed6..0000000 --- a/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010-2018 Caolan McMahon - -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/node_modules/async/README.md b/node_modules/async/README.md deleted file mode 100644 index 49cf950..0000000 --- a/node_modules/async/README.md +++ /dev/null @@ -1,56 +0,0 @@ -![Async Logo](https://raw.githubusercontent.com/caolan/async/master/logo/async-logo_readme.jpg) - -[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async) -[![NPM version](https://img.shields.io/npm/v/async.svg)](https://www.npmjs.com/package/async) -[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master) -[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![libhive - Open source examples](https://www.libhive.com/providers/npm/packages/async/examples/badge.svg)](https://www.libhive.com/providers/npm/packages/async) -[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/async/badge?style=rounded)](https://www.jsdelivr.com/package/npm/async) - - -Async is a utility module which provides straight-forward, powerful functions for working with [asynchronous JavaScript](http://caolan.github.io/async/global.html). Although originally designed for use with [Node.js](https://nodejs.org/) and installable via `npm install --save async`, it can also be used directly in the browser. - -This version of the package is optimized for the Node.js environment. If you use Async with webpack, install [`async-es`](https://www.npmjs.com/package/async-es) instead. - -For Documentation, visit <https://caolan.github.io/async/> - -*For Async v1.5.x documentation, go [HERE](https://github.com/caolan/async/blob/v1.5.2/README.md)* - - -```javascript -// for use with Node-style callbacks... -var async = require("async"); - -var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; -var configs = {}; - -async.forEachOf(obj, (value, key, callback) => { - fs.readFile(__dirname + value, "utf8", (err, data) => { - if (err) return callback(err); - try { - configs[key] = JSON.parse(data); - } catch (e) { - return callback(e); - } - callback(); - }); -}, err => { - if (err) console.error(err.message); - // configs is now a map of JSON data - doSomethingWith(configs); -}); -``` - -```javascript -var async = require("async"); - -// ...or ES2017 async functions -async.mapLimit(urls, 5, async function(url) { - const response = await fetch(url) - return response.body -}, (err, results) => { - if (err) throw err - // results is now an array of the response bodies - console.log(results) -}) -``` diff --git a/node_modules/async/all.js b/node_modules/async/all.js deleted file mode 100644 index d0565b0..0000000 --- a/node_modules/async/all.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -var _notId = require('./internal/notId'); - -var _notId2 = _interopRequireDefault(_notId); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns `true` if every element in `coll` satisfies an async test. If any - * iteratee call returns `false`, the main `callback` is immediately called. - * - * @name every - * @static - * @memberOf module:Collections - * @method - * @alias all - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @example - * - * async.every(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // if result is true then every file exists - * }); - */ -exports.default = (0, _doParallel2.default)((0, _createTester2.default)(_notId2.default, _notId2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/allLimit.js b/node_modules/async/allLimit.js deleted file mode 100644 index a1a759a..0000000 --- a/node_modules/async/allLimit.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -var _notId = require('./internal/notId'); - -var _notId2 = _interopRequireDefault(_notId); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. - * - * @name everyLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - */ -exports.default = (0, _doParallelLimit2.default)((0, _createTester2.default)(_notId2.default, _notId2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/allSeries.js b/node_modules/async/allSeries.js deleted file mode 100644 index 23bfebb..0000000 --- a/node_modules/async/allSeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _everyLimit = require('./everyLimit'); - -var _everyLimit2 = _interopRequireDefault(_everyLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. - * - * @name everySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in series. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - */ -exports.default = (0, _doLimit2.default)(_everyLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/any.js b/node_modules/async/any.js deleted file mode 100644 index a8e70f7..0000000 --- a/node_modules/async/any.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns `true` if at least one element in the `coll` satisfies an async test. - * If any iteratee call returns `true`, the main `callback` is immediately - * called. - * - * @name some - * @static - * @memberOf module:Collections - * @method - * @alias any - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @example - * - * async.some(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // if result is true then at least one of the files exists - * }); - */ -exports.default = (0, _doParallel2.default)((0, _createTester2.default)(Boolean, _identity2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/anyLimit.js b/node_modules/async/anyLimit.js deleted file mode 100644 index 24ca3f4..0000000 --- a/node_modules/async/anyLimit.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. - * - * @name someLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anyLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - */ -exports.default = (0, _doParallelLimit2.default)((0, _createTester2.default)(Boolean, _identity2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/anySeries.js b/node_modules/async/anySeries.js deleted file mode 100644 index dc24ed2..0000000 --- a/node_modules/async/anySeries.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _someLimit = require('./someLimit'); - -var _someLimit2 = _interopRequireDefault(_someLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. - * - * @name someSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anySeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in series. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - */ -exports.default = (0, _doLimit2.default)(_someLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/apply.js b/node_modules/async/apply.js deleted file mode 100644 index f590fa5..0000000 --- a/node_modules/async/apply.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (fn /*, ...args*/) { - var args = (0, _slice2.default)(arguments, 1); - return function () /*callArgs*/{ - var callArgs = (0, _slice2.default)(arguments); - return fn.apply(null, args.concat(callArgs)); - }; -}; - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -; - -/** - * Creates a continuation function with some arguments already applied. - * - * Useful as a shorthand when combined with other control flow functions. Any - * arguments passed to the returned function are added to the arguments - * originally passed to apply. - * - * @name apply - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {Function} fn - The function you want to eventually apply all - * arguments to. Invokes with (arguments...). - * @param {...*} arguments... - Any number of arguments to automatically apply - * when the continuation is called. - * @returns {Function} the partially-applied function - * @example - * - * // using apply - * async.parallel([ - * async.apply(fs.writeFile, 'testfile1', 'test1'), - * async.apply(fs.writeFile, 'testfile2', 'test2') - * ]); - * - * - * // the same process without using apply - * async.parallel([ - * function(callback) { - * fs.writeFile('testfile1', 'test1', callback); - * }, - * function(callback) { - * fs.writeFile('testfile2', 'test2', callback); - * } - * ]); - * - * // It's possible to pass any number of additional arguments when calling the - * // continuation: - * - * node> var fn = async.apply(sys.puts, 'one'); - * node> fn('two', 'three'); - * one - * two - * three - */ -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/applyEach.js b/node_modules/async/applyEach.js deleted file mode 100644 index 06c0845..0000000 --- a/node_modules/async/applyEach.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _applyEach = require('./internal/applyEach'); - -var _applyEach2 = _interopRequireDefault(_applyEach); - -var _map = require('./map'); - -var _map2 = _interopRequireDefault(_map); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Applies the provided arguments to each function in the array, calling - * `callback` after all functions have completed. If you only provide the first - * argument, `fns`, then it will return a function which lets you pass in the - * arguments as if it were a single function call. If more arguments are - * provided, `callback` is required while `args` is still optional. - * - * @name applyEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s - * to all call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {Function} - If only the first argument, `fns`, is provided, it will - * return a function which lets you pass in the arguments as if it were a single - * function call. The signature is `(..args, callback)`. If invoked with any - * arguments, `callback` is required. - * @example - * - * async.applyEach([enableSearch, updateSchema], 'bucket', callback); - * - * // partial application example: - * async.each( - * buckets, - * async.applyEach([enableSearch, updateSchema]), - * callback - * ); - */ -exports.default = (0, _applyEach2.default)(_map2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/applyEachSeries.js b/node_modules/async/applyEachSeries.js deleted file mode 100644 index ad80280..0000000 --- a/node_modules/async/applyEachSeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _applyEach = require('./internal/applyEach'); - -var _applyEach2 = _interopRequireDefault(_applyEach); - -var _mapSeries = require('./mapSeries'); - -var _mapSeries2 = _interopRequireDefault(_mapSeries); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time. - * - * @name applyEachSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.applyEach]{@link module:ControlFlow.applyEach} - * @category Control Flow - * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s to all - * call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {Function} - If only the first argument is provided, it will return - * a function which lets you pass in the arguments as if it were a single - * function call. - */ -exports.default = (0, _applyEach2.default)(_mapSeries2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/asyncify.js b/node_modules/async/asyncify.js deleted file mode 100644 index 5e3fc91..0000000 --- a/node_modules/async/asyncify.js +++ /dev/null @@ -1,110 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = asyncify; - -var _isObject = require('lodash/isObject'); - -var _isObject2 = _interopRequireDefault(_isObject); - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _setImmediate = require('./internal/setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Take a sync function and make it async, passing its return value to a - * callback. This is useful for plugging sync functions into a waterfall, - * series, or other async functions. Any arguments passed to the generated - * function will be passed to the wrapped function (except for the final - * callback argument). Errors thrown will be passed to the callback. - * - * If the function passed to `asyncify` returns a Promise, that promises's - * resolved/rejected state will be used to call the callback, rather than simply - * the synchronous return value. - * - * This also means you can asyncify ES2017 `async` functions. - * - * @name asyncify - * @static - * @memberOf module:Utils - * @method - * @alias wrapSync - * @category Util - * @param {Function} func - The synchronous function, or Promise-returning - * function to convert to an {@link AsyncFunction}. - * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be - * invoked with `(args..., callback)`. - * @example - * - * // passing a regular synchronous function - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(JSON.parse), - * function (data, next) { - * // data is the result of parsing the text. - * // If there was a parsing error, it would have been caught. - * } - * ], callback); - * - * // passing a function returning a promise - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(function (contents) { - * return db.model.create(contents); - * }), - * function (model, next) { - * // `model` is the instantiated model object. - * // If there was an error, this function would be skipped. - * } - * ], callback); - * - * // es2017 example, though `asyncify` is not needed if your JS environment - * // supports async functions out of the box - * var q = async.queue(async.asyncify(async function(file) { - * var intermediateStep = await processFile(file); - * return await somePromise(intermediateStep) - * })); - * - * q.push(files); - */ -function asyncify(func) { - return (0, _initialParams2.default)(function (args, callback) { - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if ((0, _isObject2.default)(result) && typeof result.then === 'function') { - result.then(function (value) { - invokeCallback(callback, null, value); - }, function (err) { - invokeCallback(callback, err.message ? err : new Error(err)); - }); - } else { - callback(null, result); - } - }); -} - -function invokeCallback(callback, error, value) { - try { - callback(error, value); - } catch (e) { - (0, _setImmediate2.default)(rethrow, e); - } -} - -function rethrow(error) { - throw error; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/auto.js b/node_modules/async/auto.js deleted file mode 100644 index 26c1d56..0000000 --- a/node_modules/async/auto.js +++ /dev/null @@ -1,289 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (tasks, concurrency, callback) { - if (typeof concurrency === 'function') { - // concurrency is optional, shift the args. - callback = concurrency; - concurrency = null; - } - callback = (0, _once2.default)(callback || _noop2.default); - var keys = (0, _keys2.default)(tasks); - var numTasks = keys.length; - if (!numTasks) { - return callback(null); - } - if (!concurrency) { - concurrency = numTasks; - } - - var results = {}; - var runningTasks = 0; - var hasError = false; - - var listeners = Object.create(null); - - var readyTasks = []; - - // for cycle detection: - var readyToCheck = []; // tasks that have been identified as reachable - // without the possibility of returning to an ancestor task - var uncheckedDependencies = {}; - - (0, _baseForOwn2.default)(tasks, function (task, key) { - if (!(0, _isArray2.default)(task)) { - // no dependencies - enqueueTask(key, [task]); - readyToCheck.push(key); - return; - } - - var dependencies = task.slice(0, task.length - 1); - var remainingDependencies = dependencies.length; - if (remainingDependencies === 0) { - enqueueTask(key, task); - readyToCheck.push(key); - return; - } - uncheckedDependencies[key] = remainingDependencies; - - (0, _arrayEach2.default)(dependencies, function (dependencyName) { - if (!tasks[dependencyName]) { - throw new Error('async.auto task `' + key + '` has a non-existent dependency `' + dependencyName + '` in ' + dependencies.join(', ')); - } - addListener(dependencyName, function () { - remainingDependencies--; - if (remainingDependencies === 0) { - enqueueTask(key, task); - } - }); - }); - }); - - checkForDeadlocks(); - processQueue(); - - function enqueueTask(key, task) { - readyTasks.push(function () { - runTask(key, task); - }); - } - - function processQueue() { - if (readyTasks.length === 0 && runningTasks === 0) { - return callback(null, results); - } - while (readyTasks.length && runningTasks < concurrency) { - var run = readyTasks.shift(); - run(); - } - } - - function addListener(taskName, fn) { - var taskListeners = listeners[taskName]; - if (!taskListeners) { - taskListeners = listeners[taskName] = []; - } - - taskListeners.push(fn); - } - - function taskComplete(taskName) { - var taskListeners = listeners[taskName] || []; - (0, _arrayEach2.default)(taskListeners, function (fn) { - fn(); - }); - processQueue(); - } - - function runTask(key, task) { - if (hasError) return; - - var taskCallback = (0, _onlyOnce2.default)(function (err, result) { - runningTasks--; - if (arguments.length > 2) { - result = (0, _slice2.default)(arguments, 1); - } - if (err) { - var safeResults = {}; - (0, _baseForOwn2.default)(results, function (val, rkey) { - safeResults[rkey] = val; - }); - safeResults[key] = result; - hasError = true; - listeners = Object.create(null); - - callback(err, safeResults); - } else { - results[key] = result; - taskComplete(key); - } - }); - - runningTasks++; - var taskFn = (0, _wrapAsync2.default)(task[task.length - 1]); - if (task.length > 1) { - taskFn(results, taskCallback); - } else { - taskFn(taskCallback); - } - } - - function checkForDeadlocks() { - // Kahn's algorithm - // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm - // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html - var currentTask; - var counter = 0; - while (readyToCheck.length) { - currentTask = readyToCheck.pop(); - counter++; - (0, _arrayEach2.default)(getDependents(currentTask), function (dependent) { - if (--uncheckedDependencies[dependent] === 0) { - readyToCheck.push(dependent); - } - }); - } - - if (counter !== numTasks) { - throw new Error('async.auto cannot execute tasks due to a recursive dependency'); - } - } - - function getDependents(taskName) { - var result = []; - (0, _baseForOwn2.default)(tasks, function (task, key) { - if ((0, _isArray2.default)(task) && (0, _baseIndexOf2.default)(task, taskName, 0) >= 0) { - result.push(key); - } - }); - return result; - } -}; - -var _arrayEach = require('lodash/_arrayEach'); - -var _arrayEach2 = _interopRequireDefault(_arrayEach); - -var _baseForOwn = require('lodash/_baseForOwn'); - -var _baseForOwn2 = _interopRequireDefault(_baseForOwn); - -var _baseIndexOf = require('lodash/_baseIndexOf'); - -var _baseIndexOf2 = _interopRequireDefault(_baseIndexOf); - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _keys = require('lodash/keys'); - -var _keys2 = _interopRequireDefault(_keys); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; - -/** - * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on - * their requirements. Each function can optionally depend on other functions - * being completed first, and each function is run as soon as its requirements - * are satisfied. - * - * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence - * will stop. Further tasks will not execute (so any other functions depending - * on it will not run), and the main `callback` is immediately called with the - * error. - * - * {@link AsyncFunction}s also receive an object containing the results of functions which - * have completed so far as the first argument, if they have dependencies. If a - * task function has no dependencies, it will only be passed a callback. - * - * @name auto - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Object} tasks - An object. Each of its properties is either a - * function or an array of requirements, with the {@link AsyncFunction} itself the last item - * in the array. The object's key of a property serves as the name of the task - * defined by that property, i.e. can be used when specifying requirements for - * other tasks. The function receives one or two arguments: - * * a `results` object, containing the results of the previously executed - * functions, only passed if the task has any dependencies, - * * a `callback(err, result)` function, which must be called when finished, - * passing an `error` (which can be `null`) and the result of the function's - * execution. - * @param {number} [concurrency=Infinity] - An optional `integer` for - * determining the maximum number of tasks that can be run in parallel. By - * default, as many as possible. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback. Results are always returned; however, if an - * error occurs, no further `tasks` will be performed, and the results object - * will only contain partial results. Invoked with (err, results). - * @returns undefined - * @example - * - * async.auto({ - * // this function will just be passed a callback - * readData: async.apply(fs.readFile, 'data.txt', 'utf-8'), - * showData: ['readData', function(results, cb) { - * // results.readData is the file's contents - * // ... - * }] - * }, callback); - * - * async.auto({ - * get_data: function(callback) { - * console.log('in get_data'); - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * console.log('in make_folder'); - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * console.log('in write_file', JSON.stringify(results)); - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * console.log('in email_link', JSON.stringify(results)); - * // once the file is written let's email a link to it... - * // results.write_file contains the filename returned by write_file. - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }, function(err, results) { - * console.log('err = ', err); - * console.log('results = ', results); - * }); - */ \ No newline at end of file diff --git a/node_modules/async/autoInject.js b/node_modules/async/autoInject.js deleted file mode 100644 index bfbe7e8..0000000 --- a/node_modules/async/autoInject.js +++ /dev/null @@ -1,170 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = autoInject; - -var _auto = require('./auto'); - -var _auto2 = _interopRequireDefault(_auto); - -var _baseForOwn = require('lodash/_baseForOwn'); - -var _baseForOwn2 = _interopRequireDefault(_baseForOwn); - -var _arrayMap = require('lodash/_arrayMap'); - -var _arrayMap2 = _interopRequireDefault(_arrayMap); - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _trim = require('lodash/trim'); - -var _trim2 = _interopRequireDefault(_trim); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var FN_ARGS = /^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m; -var FN_ARG_SPLIT = /,/; -var FN_ARG = /(=.+)?(\s*)$/; -var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; - -function parseParams(func) { - func = func.toString().replace(STRIP_COMMENTS, ''); - func = func.match(FN_ARGS)[2].replace(' ', ''); - func = func ? func.split(FN_ARG_SPLIT) : []; - func = func.map(function (arg) { - return (0, _trim2.default)(arg.replace(FN_ARG, '')); - }); - return func; -} - -/** - * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent - * tasks are specified as parameters to the function, after the usual callback - * parameter, with the parameter names matching the names of the tasks it - * depends on. This can provide even more readable task graphs which can be - * easier to maintain. - * - * If a final callback is specified, the task results are similarly injected, - * specified as named parameters after the initial error parameter. - * - * The autoInject function is purely syntactic sugar and its semantics are - * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}. - * - * @name autoInject - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.auto]{@link module:ControlFlow.auto} - * @category Control Flow - * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of - * the form 'func([dependencies...], callback). The object's key of a property - * serves as the name of the task defined by that property, i.e. can be used - * when specifying requirements for other tasks. - * * The `callback` parameter is a `callback(err, result)` which must be called - * when finished, passing an `error` (which can be `null`) and the result of - * the function's execution. The remaining parameters name other tasks on - * which the task is dependent, and the results from those tasks are the - * arguments of those parameters. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback, and a `results` object with any completed - * task results, similar to `auto`. - * @example - * - * // The example from `auto` can be rewritten as follows: - * async.autoInject({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: function(get_data, make_folder, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }, - * email_link: function(write_file, callback) { - * // once the file is written let's email a link to it... - * // write_file contains the filename returned by write_file. - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * } - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - * - * // If you are using a JS minifier that mangles parameter names, `autoInject` - * // will not work with plain functions, since the parameter names will be - * // collapsed to a single letter identifier. To work around this, you can - * // explicitly specify the names of the parameters your task function needs - * // in an array, similar to Angular.js dependency injection. - * - * // This still has an advantage over plain `auto`, since the results a task - * // depends on are still spread into arguments. - * async.autoInject({ - * //... - * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) { - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(write_file, callback) { - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * }] - * //... - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - */ -function autoInject(tasks, callback) { - var newTasks = {}; - - (0, _baseForOwn2.default)(tasks, function (taskFn, key) { - var params; - var fnIsAsync = (0, _wrapAsync.isAsync)(taskFn); - var hasNoDeps = !fnIsAsync && taskFn.length === 1 || fnIsAsync && taskFn.length === 0; - - if ((0, _isArray2.default)(taskFn)) { - params = taskFn.slice(0, -1); - taskFn = taskFn[taskFn.length - 1]; - - newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn); - } else if (hasNoDeps) { - // no dependencies, use the function as-is - newTasks[key] = taskFn; - } else { - params = parseParams(taskFn); - if (taskFn.length === 0 && !fnIsAsync && params.length === 0) { - throw new Error("autoInject task functions require explicit parameters."); - } - - // remove callback param - if (!fnIsAsync) params.pop(); - - newTasks[key] = params.concat(newTask); - } - - function newTask(results, taskCb) { - var newArgs = (0, _arrayMap2.default)(params, function (name) { - return results[name]; - }); - newArgs.push(taskCb); - (0, _wrapAsync2.default)(taskFn).apply(null, newArgs); - } - }); - - (0, _auto2.default)(newTasks, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/bower.json b/node_modules/async/bower.json deleted file mode 100644 index 7dbeb14..0000000 --- a/node_modules/async/bower.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "async", - "main": "dist/async.js", - "ignore": [ - "bower_components", - "lib", - "mocha_test", - "node_modules", - "perf", - "support", - "**/.*", - "*.config.js", - "*.json", - "index.js", - "Makefile" - ] -} diff --git a/node_modules/async/cargo.js b/node_modules/async/cargo.js deleted file mode 100644 index c7e59c7..0000000 --- a/node_modules/async/cargo.js +++ /dev/null @@ -1,94 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cargo; - -var _queue = require('./internal/queue'); - -var _queue2 = _interopRequireDefault(_queue); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * A cargo of tasks for the worker function to complete. Cargo inherits all of - * the same methods and event callbacks as [`queue`]{@link module:ControlFlow.queue}. - * @typedef {Object} CargoObject - * @memberOf module:ControlFlow - * @property {Function} length - A function returning the number of items - * waiting to be processed. Invoke like `cargo.length()`. - * @property {number} payload - An `integer` for determining how many tasks - * should be process per round. This property can be changed after a `cargo` is - * created to alter the payload on-the-fly. - * @property {Function} push - Adds `task` to the `queue`. The callback is - * called once the `worker` has finished processing the task. Instead of a - * single task, an array of `tasks` can be submitted. The respective callback is - * used for every task in the list. Invoke like `cargo.push(task, [callback])`. - * @property {Function} saturated - A callback that is called when the - * `queue.length()` hits the concurrency and further tasks will be queued. - * @property {Function} empty - A callback that is called when the last item - * from the `queue` is given to a `worker`. - * @property {Function} drain - A callback that is called when the last item - * from the `queue` has returned from the `worker`. - * @property {Function} idle - a function returning false if there are items - * waiting or being processed, or true if not. Invoke like `cargo.idle()`. - * @property {Function} pause - a function that pauses the processing of tasks - * until `resume()` is called. Invoke like `cargo.pause()`. - * @property {Function} resume - a function that resumes the processing of - * queued tasks when the queue is paused. Invoke like `cargo.resume()`. - * @property {Function} kill - a function that removes the `drain` callback and - * empties remaining tasks from the queue forcing it to go idle. Invoke like `cargo.kill()`. - */ - -/** - * Creates a `cargo` object with the specified payload. Tasks added to the - * cargo will be processed altogether (up to the `payload` limit). If the - * `worker` is in progress, the task is queued until it becomes available. Once - * the `worker` has completed some tasks, each callback of those tasks is - * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) - * for how `cargo` and `queue` work. - * - * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers - * at a time, cargo passes an array of tasks to a single worker, repeating - * when the worker is finished. - * - * @name cargo - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An asynchronous function for processing an array - * of queued tasks. Invoked with `(tasks, callback)`. - * @param {number} [payload=Infinity] - An optional `integer` for determining - * how many tasks should be processed per round; if omitted, the default is - * unlimited. - * @returns {module:ControlFlow.CargoObject} A cargo object to manage the tasks. Callbacks can - * attached as certain properties to listen for specific events during the - * lifecycle of the cargo and inner queue. - * @example - * - * // create a cargo object with payload 2 - * var cargo = async.cargo(function(tasks, callback) { - * for (var i=0; i<tasks.length; i++) { - * console.log('hello ' + tasks[i].name); - * } - * callback(); - * }, 2); - * - * // add some items - * cargo.push({name: 'foo'}, function(err) { - * console.log('finished processing foo'); - * }); - * cargo.push({name: 'bar'}, function(err) { - * console.log('finished processing bar'); - * }); - * cargo.push({name: 'baz'}, function(err) { - * console.log('finished processing baz'); - * }); - */ -function cargo(worker, payload) { - return (0, _queue2.default)(worker, 1, payload); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/compose.js b/node_modules/async/compose.js deleted file mode 100644 index 47c49f6..0000000 --- a/node_modules/async/compose.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function () /*...args*/{ - return _seq2.default.apply(null, (0, _slice2.default)(arguments).reverse()); -}; - -var _seq = require('./seq'); - -var _seq2 = _interopRequireDefault(_seq); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -; - -/** - * Creates a function which is a composition of the passed asynchronous - * functions. Each function consumes the return value of the function that - * follows. Composing functions `f()`, `g()`, and `h()` would produce the result - * of `f(g(h()))`, only this version uses callbacks to obtain the return values. - * - * Each function is executed with the `this` binding of the composed function. - * - * @name compose - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {...AsyncFunction} functions - the asynchronous functions to compose - * @returns {Function} an asynchronous function that is the composed - * asynchronous `functions` - * @example - * - * function add1(n, callback) { - * setTimeout(function () { - * callback(null, n + 1); - * }, 10); - * } - * - * function mul3(n, callback) { - * setTimeout(function () { - * callback(null, n * 3); - * }, 10); - * } - * - * var add1mul3 = async.compose(mul3, add1); - * add1mul3(4, function (err, result) { - * // result now equals 15 - * }); - */ -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/concat.js b/node_modules/async/concat.js deleted file mode 100644 index c39ea00..0000000 --- a/node_modules/async/concat.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -var _concatLimit = require('./concatLimit'); - -var _concatLimit2 = _interopRequireDefault(_concatLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Applies `iteratee` to each item in `coll`, concatenating the results. Returns - * the concatenated list. The `iteratee`s are called in parallel, and the - * results are concatenated as they return. There is no guarantee that the - * results array will be returned in the original order of `coll` passed to the - * `iteratee` function. - * - * @name concat - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`, - * which should use an array as its result. Invoked with (item, callback). - * @param {Function} [callback(err)] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @example - * - * async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files) { - * // files is now a list of filenames that exist in the 3 directories - * }); - */ -exports.default = (0, _doLimit2.default)(_concatLimit2.default, Infinity); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/concatLimit.js b/node_modules/async/concatLimit.js deleted file mode 100644 index f32cd4d..0000000 --- a/node_modules/async/concatLimit.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (coll, limit, iteratee, callback) { - callback = callback || _noop2.default; - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _mapLimit2.default)(coll, limit, function (val, callback) { - _iteratee(val, function (err /*, ...args*/) { - if (err) return callback(err); - return callback(null, (0, _slice2.default)(arguments, 1)); - }); - }, function (err, mapResults) { - var result = []; - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - result = _concat.apply(result, mapResults[i]); - } - } - - return callback(err, result); - }); -}; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _mapLimit = require('./mapLimit'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _concat = Array.prototype.concat; - -/** - * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time. - * - * @name concatLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`, - * which should use an array as its result. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - */ -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/concatSeries.js b/node_modules/async/concatSeries.js deleted file mode 100644 index 541ab7d..0000000 --- a/node_modules/async/concatSeries.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -var _concatLimit = require('./concatLimit'); - -var _concatLimit2 = _interopRequireDefault(_concatLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time. - * - * @name concatSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`. - * The iteratee should complete with an array an array of results. - * Invoked with (item, callback). - * @param {Function} [callback(err)] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - */ -exports.default = (0, _doLimit2.default)(_concatLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/constant.js b/node_modules/async/constant.js deleted file mode 100644 index c825475..0000000 --- a/node_modules/async/constant.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function () /*...values*/{ - var values = (0, _slice2.default)(arguments); - var args = [null].concat(values); - return function () /*...ignoredArgs, callback*/{ - var callback = arguments[arguments.length - 1]; - return callback.apply(this, args); - }; -}; - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -; - -/** - * Returns a function that when called, calls-back with the values provided. - * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to - * [`auto`]{@link module:ControlFlow.auto}. - * - * @name constant - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {...*} arguments... - Any number of arguments to automatically invoke - * callback with. - * @returns {AsyncFunction} Returns a function that when invoked, automatically - * invokes the callback with the previous given arguments. - * @example - * - * async.waterfall([ - * async.constant(42), - * function (value, next) { - * // value === 42 - * }, - * //... - * ], callback); - * - * async.waterfall([ - * async.constant(filename, "utf8"), - * fs.readFile, - * function (fileData, next) { - * //... - * } - * //... - * ], callback); - * - * async.auto({ - * hostname: async.constant("https://server.net/"), - * port: findFreePort, - * launchServer: ["hostname", "port", function (options, cb) { - * startServer(options, cb); - * }], - * //... - * }, callback); - */ -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/detect.js b/node_modules/async/detect.js deleted file mode 100644 index db46783..0000000 --- a/node_modules/async/detect.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -var _findGetResult = require('./internal/findGetResult'); - -var _findGetResult2 = _interopRequireDefault(_findGetResult); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns the first value in `coll` that passes an async truth test. The - * `iteratee` is applied in parallel, meaning the first iteratee to return - * `true` will fire the detect `callback` with that result. That means the - * result might not be the first item in the original `coll` (in terms of order) - * that passes the test. - - * If order within the original `coll` is important, then look at - * [`detectSeries`]{@link module:Collections.detectSeries}. - * - * @name detect - * @static - * @memberOf module:Collections - * @method - * @alias find - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @example - * - * async.detect(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // result now equals the first file in the list that exists - * }); - */ -exports.default = (0, _doParallel2.default)((0, _createTester2.default)(_identity2.default, _findGetResult2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/detectLimit.js b/node_modules/async/detectLimit.js deleted file mode 100644 index 6bf6560..0000000 --- a/node_modules/async/detectLimit.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -var _findGetResult = require('./internal/findGetResult'); - -var _findGetResult2 = _interopRequireDefault(_findGetResult); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a - * time. - * - * @name detectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findLimit - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - */ -exports.default = (0, _doParallelLimit2.default)((0, _createTester2.default)(_identity2.default, _findGetResult2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/detectSeries.js b/node_modules/async/detectSeries.js deleted file mode 100644 index 6fe16c9..0000000 --- a/node_modules/async/detectSeries.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _detectLimit = require('./detectLimit'); - -var _detectLimit2 = _interopRequireDefault(_detectLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time. - * - * @name detectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findSeries - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - */ -exports.default = (0, _doLimit2.default)(_detectLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/dir.js b/node_modules/async/dir.js deleted file mode 100644 index 85fbcce..0000000 --- a/node_modules/async/dir.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _consoleFunc = require('./internal/consoleFunc'); - -var _consoleFunc2 = _interopRequireDefault(_consoleFunc); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Logs the result of an [`async` function]{@link AsyncFunction} to the - * `console` using `console.dir` to display the properties of the resulting object. - * Only works in Node.js or in browsers that support `console.dir` and - * `console.error` (such as FF and Chrome). - * If multiple arguments are returned from the async function, - * `console.dir` is called on each argument in order. - * - * @name dir - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, {hello: name}); - * }, 1000); - * }; - * - * // in the node repl - * node> async.dir(hello, 'world'); - * {hello: 'world'} - */ -exports.default = (0, _consoleFunc2.default)('dir'); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/dist/async.js b/node_modules/async/dist/async.js deleted file mode 100644 index 61c7588..0000000 --- a/node_modules/async/dist/async.js +++ /dev/null @@ -1,5612 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.async = global.async || {}))); -}(this, (function (exports) { 'use strict'; - -function slice(arrayLike, start) { - start = start|0; - var newLen = Math.max(arrayLike.length - start, 0); - var newArr = Array(newLen); - for(var idx = 0; idx < newLen; idx++) { - newArr[idx] = arrayLike[start + idx]; - } - return newArr; -} - -/** - * Creates a continuation function with some arguments already applied. - * - * Useful as a shorthand when combined with other control flow functions. Any - * arguments passed to the returned function are added to the arguments - * originally passed to apply. - * - * @name apply - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {Function} fn - The function you want to eventually apply all - * arguments to. Invokes with (arguments...). - * @param {...*} arguments... - Any number of arguments to automatically apply - * when the continuation is called. - * @returns {Function} the partially-applied function - * @example - * - * // using apply - * async.parallel([ - * async.apply(fs.writeFile, 'testfile1', 'test1'), - * async.apply(fs.writeFile, 'testfile2', 'test2') - * ]); - * - * - * // the same process without using apply - * async.parallel([ - * function(callback) { - * fs.writeFile('testfile1', 'test1', callback); - * }, - * function(callback) { - * fs.writeFile('testfile2', 'test2', callback); - * } - * ]); - * - * // It's possible to pass any number of additional arguments when calling the - * // continuation: - * - * node> var fn = async.apply(sys.puts, 'one'); - * node> fn('two', 'three'); - * one - * two - * three - */ -var apply = function(fn/*, ...args*/) { - var args = slice(arguments, 1); - return function(/*callArgs*/) { - var callArgs = slice(arguments); - return fn.apply(null, args.concat(callArgs)); - }; -}; - -var initialParams = function (fn) { - return function (/*...args, callback*/) { - var args = slice(arguments); - var callback = args.pop(); - fn.call(this, args, callback); - }; -}; - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -var hasSetImmediate = typeof setImmediate === 'function' && setImmediate; -var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; - -function fallback(fn) { - setTimeout(fn, 0); -} - -function wrap(defer) { - return function (fn/*, ...args*/) { - var args = slice(arguments, 1); - defer(function () { - fn.apply(null, args); - }); - }; -} - -var _defer; - -if (hasSetImmediate) { - _defer = setImmediate; -} else if (hasNextTick) { - _defer = process.nextTick; -} else { - _defer = fallback; -} - -var setImmediate$1 = wrap(_defer); - -/** - * Take a sync function and make it async, passing its return value to a - * callback. This is useful for plugging sync functions into a waterfall, - * series, or other async functions. Any arguments passed to the generated - * function will be passed to the wrapped function (except for the final - * callback argument). Errors thrown will be passed to the callback. - * - * If the function passed to `asyncify` returns a Promise, that promises's - * resolved/rejected state will be used to call the callback, rather than simply - * the synchronous return value. - * - * This also means you can asyncify ES2017 `async` functions. - * - * @name asyncify - * @static - * @memberOf module:Utils - * @method - * @alias wrapSync - * @category Util - * @param {Function} func - The synchronous function, or Promise-returning - * function to convert to an {@link AsyncFunction}. - * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be - * invoked with `(args..., callback)`. - * @example - * - * // passing a regular synchronous function - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(JSON.parse), - * function (data, next) { - * // data is the result of parsing the text. - * // If there was a parsing error, it would have been caught. - * } - * ], callback); - * - * // passing a function returning a promise - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(function (contents) { - * return db.model.create(contents); - * }), - * function (model, next) { - * // `model` is the instantiated model object. - * // If there was an error, this function would be skipped. - * } - * ], callback); - * - * // es2017 example, though `asyncify` is not needed if your JS environment - * // supports async functions out of the box - * var q = async.queue(async.asyncify(async function(file) { - * var intermediateStep = await processFile(file); - * return await somePromise(intermediateStep) - * })); - * - * q.push(files); - */ -function asyncify(func) { - return initialParams(function (args, callback) { - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if (isObject(result) && typeof result.then === 'function') { - result.then(function(value) { - invokeCallback(callback, null, value); - }, function(err) { - invokeCallback(callback, err.message ? err : new Error(err)); - }); - } else { - callback(null, result); - } - }); -} - -function invokeCallback(callback, error, value) { - try { - callback(error, value); - } catch (e) { - setImmediate$1(rethrow, e); - } -} - -function rethrow(error) { - throw error; -} - -var supportsSymbol = typeof Symbol === 'function'; - -function isAsync(fn) { - return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction'; -} - -function wrapAsync(asyncFn) { - return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn; -} - -function applyEach$1(eachfn) { - return function(fns/*, ...args*/) { - var args = slice(arguments, 1); - var go = initialParams(function(args, callback) { - var that = this; - return eachfn(fns, function (fn, cb) { - wrapAsync(fn).apply(that, args.concat(cb)); - }, callback); - }); - if (args.length) { - return go.apply(this, args); - } - else { - return go; - } - }; -} - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -/** Built-in value references. */ -var Symbol$1 = root.Symbol; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** Built-in value references. */ -var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag$1), - tag = value[symToStringTag$1]; - - try { - value[symToStringTag$1] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag$1] = tag; - } else { - delete value[symToStringTag$1]; - } - } - return result; -} - -/** Used for built-in method references. */ -var objectProto$1 = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString$1 = objectProto$1.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString$1.call(value); -} - -/** `Object#toString` result references. */ -var nullTag = '[object Null]'; -var undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]'; -var funcTag = '[object Function]'; -var genTag = '[object GeneratorFunction]'; -var proxyTag = '[object Proxy]'; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -// A temporary value used to identify if the loop should be broken. -// See #1064, #1293 -var breakLoop = {}; - -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -function once(fn) { - return function () { - if (fn === null) return; - var callFn = fn; - fn = null; - callFn.apply(this, arguments); - }; -} - -var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator; - -var getIterator = function (coll) { - return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol](); -}; - -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; - -/** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ -function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; -} - -/** Used for built-in method references. */ -var objectProto$3 = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty$2 = objectProto$3.hasOwnProperty; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto$3.propertyIsEnumerable; - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty$2.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); -}; - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; - -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER$1 = 9007199254740991; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER$1 : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); -} - -/** `Object#toString` result references. */ -var argsTag$1 = '[object Arguments]'; -var arrayTag = '[object Array]'; -var boolTag = '[object Boolean]'; -var dateTag = '[object Date]'; -var errorTag = '[object Error]'; -var funcTag$1 = '[object Function]'; -var mapTag = '[object Map]'; -var numberTag = '[object Number]'; -var objectTag = '[object Object]'; -var regexpTag = '[object RegExp]'; -var setTag = '[object Set]'; -var stringTag = '[object String]'; -var weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]'; -var dataViewTag = '[object DataView]'; -var float32Tag = '[object Float32Array]'; -var float64Tag = '[object Float64Array]'; -var int8Tag = '[object Int8Array]'; -var int16Tag = '[object Int16Array]'; -var int32Tag = '[object Int32Array]'; -var uint8Tag = '[object Uint8Array]'; -var uint8ClampedTag = '[object Uint8ClampedArray]'; -var uint16Tag = '[object Uint16Array]'; -var uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag$1] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - -/** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; -} - -/** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ -function baseUnary(func) { - return function(value) { - return func(value); - }; -} - -/** Detect free variable `exports`. */ -var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1; - -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports$1 && freeGlobal.process; - -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - // Use `util.types` for Node.js 10+. - var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types; - - if (types) { - return types; - } - - // Legacy `process.binding('util')` for Node.js < 10. - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} -}()); - -/* Node.js helper references. */ -var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - -/** Used for built-in method references. */ -var objectProto$2 = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty$1 = objectProto$2.hasOwnProperty; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty$1.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; -} - -/** Used for built-in method references. */ -var objectProto$5 = Object.prototype; - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5; - - return value === proto; -} - -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object); - -/** Used for built-in method references. */ -var objectProto$4 = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty$3 = objectProto$4.hasOwnProperty; - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty$3.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} - -function createArrayIterator(coll) { - var i = -1; - var len = coll.length; - return function next() { - return ++i < len ? {value: coll[i], key: i} : null; - } -} - -function createES2015Iterator(iterator) { - var i = -1; - return function next() { - var item = iterator.next(); - if (item.done) - return null; - i++; - return {value: item.value, key: i}; - } -} - -function createObjectIterator(obj) { - var okeys = keys(obj); - var i = -1; - var len = okeys.length; - return function next() { - var key = okeys[++i]; - if (key === '__proto__') { - return next(); - } - return i < len ? {value: obj[key], key: key} : null; - }; -} - -function iterator(coll) { - if (isArrayLike(coll)) { - return createArrayIterator(coll); - } - - var iterator = getIterator(coll); - return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); -} - -function onlyOnce(fn) { - return function() { - if (fn === null) throw new Error("Callback was already called."); - var callFn = fn; - fn = null; - callFn.apply(this, arguments); - }; -} - -function _eachOfLimit(limit) { - return function (obj, iteratee, callback) { - callback = once(callback || noop); - if (limit <= 0 || !obj) { - return callback(null); - } - var nextElem = iterator(obj); - var done = false; - var running = 0; - var looping = false; - - function iterateeCallback(err, value) { - running -= 1; - if (err) { - done = true; - callback(err); - } - else if (value === breakLoop || (done && running <= 0)) { - done = true; - return callback(null); - } - else if (!looping) { - replenish(); - } - } - - function replenish () { - looping = true; - while (running < limit && !done) { - var elem = nextElem(); - if (elem === null) { - done = true; - if (running <= 0) { - callback(null); - } - return; - } - running += 1; - iteratee(elem.value, elem.key, onlyOnce(iterateeCallback)); - } - looping = false; - } - - replenish(); - }; -} - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a - * time. - * - * @name eachOfLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. The `key` is the item's key, or index in the case of an - * array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -function eachOfLimit(coll, limit, iteratee, callback) { - _eachOfLimit(limit)(coll, wrapAsync(iteratee), callback); -} - -function doLimit(fn, limit) { - return function (iterable, iteratee, callback) { - return fn(iterable, limit, iteratee, callback); - }; -} - -// eachOf implementation optimized for array-likes -function eachOfArrayLike(coll, iteratee, callback) { - callback = once(callback || noop); - var index = 0, - completed = 0, - length = coll.length; - if (length === 0) { - callback(null); - } - - function iteratorCallback(err, value) { - if (err) { - callback(err); - } else if ((++completed === length) || value === breakLoop) { - callback(null); - } - } - - for (; index < length; index++) { - iteratee(coll[index], index, onlyOnce(iteratorCallback)); - } -} - -// a generic version of eachOf which can handle array, object, and iterator cases. -var eachOfGeneric = doLimit(eachOfLimit, Infinity); - -/** - * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument - * to the iteratee. - * - * @name eachOf - * @static - * @memberOf module:Collections - * @method - * @alias forEachOf - * @category Collection - * @see [async.each]{@link module:Collections.each} - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each - * item in `coll`. - * The `key` is the item's key, or index in the case of an array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @example - * - * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; - * var configs = {}; - * - * async.forEachOf(obj, function (value, key, callback) { - * fs.readFile(__dirname + value, "utf8", function (err, data) { - * if (err) return callback(err); - * try { - * configs[key] = JSON.parse(data); - * } catch (e) { - * return callback(e); - * } - * callback(); - * }); - * }, function (err) { - * if (err) console.error(err.message); - * // configs is now a map of JSON data - * doSomethingWith(configs); - * }); - */ -var eachOf = function(coll, iteratee, callback) { - var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric; - eachOfImplementation(coll, wrapAsync(iteratee), callback); -}; - -function doParallel(fn) { - return function (obj, iteratee, callback) { - return fn(eachOf, obj, wrapAsync(iteratee), callback); - }; -} - -function _asyncMap(eachfn, arr, iteratee, callback) { - callback = callback || noop; - arr = arr || []; - var results = []; - var counter = 0; - var _iteratee = wrapAsync(iteratee); - - eachfn(arr, function (value, _, callback) { - var index = counter++; - _iteratee(value, function (err, v) { - results[index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); -} - -/** - * Produces a new collection of values by mapping each value in `coll` through - * the `iteratee` function. The `iteratee` is called with an item from `coll` - * and a callback for when it has finished processing. Each of these callback - * takes 2 arguments: an `error`, and the transformed item from `coll`. If - * `iteratee` passes an error to its callback, the main `callback` (for the - * `map` function) is immediately called with the error. - * - * Note, that since this function applies the `iteratee` to each item in - * parallel, there is no guarantee that the `iteratee` functions will complete - * in order. However, the results array will be in the same order as the - * original `coll`. - * - * If `map` is passed an Object, the results will be an Array. The results - * will roughly be in the order of the original Objects' keys (but this can - * vary across JavaScript engines). - * - * @name map - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an Array of the - * transformed items from the `coll`. Invoked with (err, results). - * @example - * - * async.map(['file1','file2','file3'], fs.stat, function(err, results) { - * // results is now an array of stats for each file - * }); - */ -var map = doParallel(_asyncMap); - -/** - * Applies the provided arguments to each function in the array, calling - * `callback` after all functions have completed. If you only provide the first - * argument, `fns`, then it will return a function which lets you pass in the - * arguments as if it were a single function call. If more arguments are - * provided, `callback` is required while `args` is still optional. - * - * @name applyEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s - * to all call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {Function} - If only the first argument, `fns`, is provided, it will - * return a function which lets you pass in the arguments as if it were a single - * function call. The signature is `(..args, callback)`. If invoked with any - * arguments, `callback` is required. - * @example - * - * async.applyEach([enableSearch, updateSchema], 'bucket', callback); - * - * // partial application example: - * async.each( - * buckets, - * async.applyEach([enableSearch, updateSchema]), - * callback - * ); - */ -var applyEach = applyEach$1(map); - -function doParallelLimit(fn) { - return function (obj, limit, iteratee, callback) { - return fn(_eachOfLimit(limit), obj, wrapAsync(iteratee), callback); - }; -} - -/** - * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time. - * - * @name mapLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - */ -var mapLimit = doParallelLimit(_asyncMap); - -/** - * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time. - * - * @name mapSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - */ -var mapSeries = doLimit(mapLimit, 1); - -/** - * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time. - * - * @name applyEachSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.applyEach]{@link module:ControlFlow.applyEach} - * @category Control Flow - * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s to all - * call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {Function} - If only the first argument is provided, it will return - * a function which lets you pass in the arguments as if it were a single - * function call. - */ -var applyEachSeries = applyEach$1(mapSeries); - -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; -} - -/** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); -} - -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); -} - -/** - * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on - * their requirements. Each function can optionally depend on other functions - * being completed first, and each function is run as soon as its requirements - * are satisfied. - * - * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence - * will stop. Further tasks will not execute (so any other functions depending - * on it will not run), and the main `callback` is immediately called with the - * error. - * - * {@link AsyncFunction}s also receive an object containing the results of functions which - * have completed so far as the first argument, if they have dependencies. If a - * task function has no dependencies, it will only be passed a callback. - * - * @name auto - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Object} tasks - An object. Each of its properties is either a - * function or an array of requirements, with the {@link AsyncFunction} itself the last item - * in the array. The object's key of a property serves as the name of the task - * defined by that property, i.e. can be used when specifying requirements for - * other tasks. The function receives one or two arguments: - * * a `results` object, containing the results of the previously executed - * functions, only passed if the task has any dependencies, - * * a `callback(err, result)` function, which must be called when finished, - * passing an `error` (which can be `null`) and the result of the function's - * execution. - * @param {number} [concurrency=Infinity] - An optional `integer` for - * determining the maximum number of tasks that can be run in parallel. By - * default, as many as possible. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback. Results are always returned; however, if an - * error occurs, no further `tasks` will be performed, and the results object - * will only contain partial results. Invoked with (err, results). - * @returns undefined - * @example - * - * async.auto({ - * // this function will just be passed a callback - * readData: async.apply(fs.readFile, 'data.txt', 'utf-8'), - * showData: ['readData', function(results, cb) { - * // results.readData is the file's contents - * // ... - * }] - * }, callback); - * - * async.auto({ - * get_data: function(callback) { - * console.log('in get_data'); - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * console.log('in make_folder'); - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * console.log('in write_file', JSON.stringify(results)); - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * console.log('in email_link', JSON.stringify(results)); - * // once the file is written let's email a link to it... - * // results.write_file contains the filename returned by write_file. - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }, function(err, results) { - * console.log('err = ', err); - * console.log('results = ', results); - * }); - */ -var auto = function (tasks, concurrency, callback) { - if (typeof concurrency === 'function') { - // concurrency is optional, shift the args. - callback = concurrency; - concurrency = null; - } - callback = once(callback || noop); - var keys$$1 = keys(tasks); - var numTasks = keys$$1.length; - if (!numTasks) { - return callback(null); - } - if (!concurrency) { - concurrency = numTasks; - } - - var results = {}; - var runningTasks = 0; - var hasError = false; - - var listeners = Object.create(null); - - var readyTasks = []; - - // for cycle detection: - var readyToCheck = []; // tasks that have been identified as reachable - // without the possibility of returning to an ancestor task - var uncheckedDependencies = {}; - - baseForOwn(tasks, function (task, key) { - if (!isArray(task)) { - // no dependencies - enqueueTask(key, [task]); - readyToCheck.push(key); - return; - } - - var dependencies = task.slice(0, task.length - 1); - var remainingDependencies = dependencies.length; - if (remainingDependencies === 0) { - enqueueTask(key, task); - readyToCheck.push(key); - return; - } - uncheckedDependencies[key] = remainingDependencies; - - arrayEach(dependencies, function (dependencyName) { - if (!tasks[dependencyName]) { - throw new Error('async.auto task `' + key + - '` has a non-existent dependency `' + - dependencyName + '` in ' + - dependencies.join(', ')); - } - addListener(dependencyName, function () { - remainingDependencies--; - if (remainingDependencies === 0) { - enqueueTask(key, task); - } - }); - }); - }); - - checkForDeadlocks(); - processQueue(); - - function enqueueTask(key, task) { - readyTasks.push(function () { - runTask(key, task); - }); - } - - function processQueue() { - if (readyTasks.length === 0 && runningTasks === 0) { - return callback(null, results); - } - while(readyTasks.length && runningTasks < concurrency) { - var run = readyTasks.shift(); - run(); - } - - } - - function addListener(taskName, fn) { - var taskListeners = listeners[taskName]; - if (!taskListeners) { - taskListeners = listeners[taskName] = []; - } - - taskListeners.push(fn); - } - - function taskComplete(taskName) { - var taskListeners = listeners[taskName] || []; - arrayEach(taskListeners, function (fn) { - fn(); - }); - processQueue(); - } - - - function runTask(key, task) { - if (hasError) return; - - var taskCallback = onlyOnce(function(err, result) { - runningTasks--; - if (arguments.length > 2) { - result = slice(arguments, 1); - } - if (err) { - var safeResults = {}; - baseForOwn(results, function(val, rkey) { - safeResults[rkey] = val; - }); - safeResults[key] = result; - hasError = true; - listeners = Object.create(null); - - callback(err, safeResults); - } else { - results[key] = result; - taskComplete(key); - } - }); - - runningTasks++; - var taskFn = wrapAsync(task[task.length - 1]); - if (task.length > 1) { - taskFn(results, taskCallback); - } else { - taskFn(taskCallback); - } - } - - function checkForDeadlocks() { - // Kahn's algorithm - // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm - // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html - var currentTask; - var counter = 0; - while (readyToCheck.length) { - currentTask = readyToCheck.pop(); - counter++; - arrayEach(getDependents(currentTask), function (dependent) { - if (--uncheckedDependencies[dependent] === 0) { - readyToCheck.push(dependent); - } - }); - } - - if (counter !== numTasks) { - throw new Error( - 'async.auto cannot execute tasks due to a recursive dependency' - ); - } - } - - function getDependents(taskName) { - var result = []; - baseForOwn(tasks, function (task, key) { - if (isArray(task) && baseIndexOf(task, taskName, 0) >= 0) { - result.push(key); - } - }); - return result; - } -}; - -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined; -var symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ -function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; -} - -/** - * Casts `array` to a slice if it's needed. - * - * @private - * @param {Array} array The array to inspect. - * @param {number} start The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the cast slice. - */ -function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return (!start && end >= length) ? array : baseSlice(array, start, end); -} - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the last unmatched string symbol. - */ -function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; - - while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; -} - -/** - * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the first unmatched string symbol. - */ -function charsStartIndex(strSymbols, chrSymbols) { - var index = -1, - length = strSymbols.length; - - while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; -} - -/** - * Converts an ASCII `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function asciiToArray(string) { - return string.split(''); -} - -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff'; -var rsComboMarksRange = '\\u0300-\\u036f'; -var reComboHalfMarksRange = '\\ufe20-\\ufe2f'; -var rsComboSymbolsRange = '\\u20d0-\\u20ff'; -var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; -var rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -/** Used to compose unicode character classes. */ -var rsAstralRange$1 = '\\ud800-\\udfff'; -var rsComboMarksRange$1 = '\\u0300-\\u036f'; -var reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f'; -var rsComboSymbolsRange$1 = '\\u20d0-\\u20ff'; -var rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1; -var rsVarRange$1 = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange$1 + ']'; -var rsCombo = '[' + rsComboRange$1 + ']'; -var rsFitz = '\\ud83c[\\udffb-\\udfff]'; -var rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')'; -var rsNonAstral = '[^' + rsAstralRange$1 + ']'; -var rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}'; -var rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]'; -var rsZWJ$1 = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?'; -var rsOptVar = '[' + rsVarRange$1 + ']?'; -var rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*'; -var rsSeq = rsOptVar + reOptMod + rsOptJoin; -var rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Converts a Unicode `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function unicodeToArray(string) { - return string.match(reUnicode) || []; -} - -/** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function stringToArray(string) { - return hasUnicode(string) - ? unicodeToArray(string) - : asciiToArray(string); -} - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - return value == null ? '' : baseToString(value); -} - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** - * Removes leading and trailing whitespace or specified characters from `string`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to trim. - * @param {string} [chars=whitespace] The characters to trim. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the trimmed string. - * @example - * - * _.trim(' abc '); - * // => 'abc' - * - * _.trim('-_-abc-_-', '_-'); - * // => 'abc' - * - * _.map([' foo ', ' bar '], _.trim); - * // => ['foo', 'bar'] - */ -function trim(string, chars, guard) { - string = toString(string); - if (string && (guard || chars === undefined)) { - return string.replace(reTrim, ''); - } - if (!string || !(chars = baseToString(chars))) { - return string; - } - var strSymbols = stringToArray(string), - chrSymbols = stringToArray(chars), - start = charsStartIndex(strSymbols, chrSymbols), - end = charsEndIndex(strSymbols, chrSymbols) + 1; - - return castSlice(strSymbols, start, end).join(''); -} - -var FN_ARGS = /^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m; -var FN_ARG_SPLIT = /,/; -var FN_ARG = /(=.+)?(\s*)$/; -var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; - -function parseParams(func) { - func = func.toString().replace(STRIP_COMMENTS, ''); - func = func.match(FN_ARGS)[2].replace(' ', ''); - func = func ? func.split(FN_ARG_SPLIT) : []; - func = func.map(function (arg){ - return trim(arg.replace(FN_ARG, '')); - }); - return func; -} - -/** - * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent - * tasks are specified as parameters to the function, after the usual callback - * parameter, with the parameter names matching the names of the tasks it - * depends on. This can provide even more readable task graphs which can be - * easier to maintain. - * - * If a final callback is specified, the task results are similarly injected, - * specified as named parameters after the initial error parameter. - * - * The autoInject function is purely syntactic sugar and its semantics are - * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}. - * - * @name autoInject - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.auto]{@link module:ControlFlow.auto} - * @category Control Flow - * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of - * the form 'func([dependencies...], callback). The object's key of a property - * serves as the name of the task defined by that property, i.e. can be used - * when specifying requirements for other tasks. - * * The `callback` parameter is a `callback(err, result)` which must be called - * when finished, passing an `error` (which can be `null`) and the result of - * the function's execution. The remaining parameters name other tasks on - * which the task is dependent, and the results from those tasks are the - * arguments of those parameters. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback, and a `results` object with any completed - * task results, similar to `auto`. - * @example - * - * // The example from `auto` can be rewritten as follows: - * async.autoInject({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: function(get_data, make_folder, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }, - * email_link: function(write_file, callback) { - * // once the file is written let's email a link to it... - * // write_file contains the filename returned by write_file. - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * } - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - * - * // If you are using a JS minifier that mangles parameter names, `autoInject` - * // will not work with plain functions, since the parameter names will be - * // collapsed to a single letter identifier. To work around this, you can - * // explicitly specify the names of the parameters your task function needs - * // in an array, similar to Angular.js dependency injection. - * - * // This still has an advantage over plain `auto`, since the results a task - * // depends on are still spread into arguments. - * async.autoInject({ - * //... - * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) { - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(write_file, callback) { - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * }] - * //... - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - */ -function autoInject(tasks, callback) { - var newTasks = {}; - - baseForOwn(tasks, function (taskFn, key) { - var params; - var fnIsAsync = isAsync(taskFn); - var hasNoDeps = - (!fnIsAsync && taskFn.length === 1) || - (fnIsAsync && taskFn.length === 0); - - if (isArray(taskFn)) { - params = taskFn.slice(0, -1); - taskFn = taskFn[taskFn.length - 1]; - - newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn); - } else if (hasNoDeps) { - // no dependencies, use the function as-is - newTasks[key] = taskFn; - } else { - params = parseParams(taskFn); - if (taskFn.length === 0 && !fnIsAsync && params.length === 0) { - throw new Error("autoInject task functions require explicit parameters."); - } - - // remove callback param - if (!fnIsAsync) params.pop(); - - newTasks[key] = params.concat(newTask); - } - - function newTask(results, taskCb) { - var newArgs = arrayMap(params, function (name) { - return results[name]; - }); - newArgs.push(taskCb); - wrapAsync(taskFn).apply(null, newArgs); - } - }); - - auto(newTasks, callback); -} - -// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation -// used for queues. This implementation assumes that the node provided by the user can be modified -// to adjust the next and last properties. We implement only the minimal functionality -// for queue support. -function DLL() { - this.head = this.tail = null; - this.length = 0; -} - -function setInitial(dll, node) { - dll.length = 1; - dll.head = dll.tail = node; -} - -DLL.prototype.removeLink = function(node) { - if (node.prev) node.prev.next = node.next; - else this.head = node.next; - if (node.next) node.next.prev = node.prev; - else this.tail = node.prev; - - node.prev = node.next = null; - this.length -= 1; - return node; -}; - -DLL.prototype.empty = function () { - while(this.head) this.shift(); - return this; -}; - -DLL.prototype.insertAfter = function(node, newNode) { - newNode.prev = node; - newNode.next = node.next; - if (node.next) node.next.prev = newNode; - else this.tail = newNode; - node.next = newNode; - this.length += 1; -}; - -DLL.prototype.insertBefore = function(node, newNode) { - newNode.prev = node.prev; - newNode.next = node; - if (node.prev) node.prev.next = newNode; - else this.head = newNode; - node.prev = newNode; - this.length += 1; -}; - -DLL.prototype.unshift = function(node) { - if (this.head) this.insertBefore(this.head, node); - else setInitial(this, node); -}; - -DLL.prototype.push = function(node) { - if (this.tail) this.insertAfter(this.tail, node); - else setInitial(this, node); -}; - -DLL.prototype.shift = function() { - return this.head && this.removeLink(this.head); -}; - -DLL.prototype.pop = function() { - return this.tail && this.removeLink(this.tail); -}; - -DLL.prototype.toArray = function () { - var arr = Array(this.length); - var curr = this.head; - for(var idx = 0; idx < this.length; idx++) { - arr[idx] = curr.data; - curr = curr.next; - } - return arr; -}; - -DLL.prototype.remove = function (testFn) { - var curr = this.head; - while(!!curr) { - var next = curr.next; - if (testFn(curr)) { - this.removeLink(curr); - } - curr = next; - } - return this; -}; - -function queue(worker, concurrency, payload) { - if (concurrency == null) { - concurrency = 1; - } - else if(concurrency === 0) { - throw new Error('Concurrency must not be zero'); - } - - var _worker = wrapAsync(worker); - var numRunning = 0; - var workersList = []; - - var processingScheduled = false; - function _insert(data, insertAtFront, callback) { - if (callback != null && typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - if (!isArray(data)) { - data = [data]; - } - if (data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - return setImmediate$1(function() { - q.drain(); - }); - } - - for (var i = 0, l = data.length; i < l; i++) { - var item = { - data: data[i], - callback: callback || noop - }; - - if (insertAtFront) { - q._tasks.unshift(item); - } else { - q._tasks.push(item); - } - } - - if (!processingScheduled) { - processingScheduled = true; - setImmediate$1(function() { - processingScheduled = false; - q.process(); - }); - } - } - - function _next(tasks) { - return function(err){ - numRunning -= 1; - - for (var i = 0, l = tasks.length; i < l; i++) { - var task = tasks[i]; - - var index = baseIndexOf(workersList, task, 0); - if (index === 0) { - workersList.shift(); - } else if (index > 0) { - workersList.splice(index, 1); - } - - task.callback.apply(task, arguments); - - if (err != null) { - q.error(err, task.data); - } - } - - if (numRunning <= (q.concurrency - q.buffer) ) { - q.unsaturated(); - } - - if (q.idle()) { - q.drain(); - } - q.process(); - }; - } - - var isProcessing = false; - var q = { - _tasks: new DLL(), - concurrency: concurrency, - payload: payload, - saturated: noop, - unsaturated:noop, - buffer: concurrency / 4, - empty: noop, - drain: noop, - error: noop, - started: false, - paused: false, - push: function (data, callback) { - _insert(data, false, callback); - }, - kill: function () { - q.drain = noop; - q._tasks.empty(); - }, - unshift: function (data, callback) { - _insert(data, true, callback); - }, - remove: function (testFn) { - q._tasks.remove(testFn); - }, - process: function () { - // Avoid trying to start too many processing operations. This can occur - // when callbacks resolve synchronously (#1267). - if (isProcessing) { - return; - } - isProcessing = true; - while(!q.paused && numRunning < q.concurrency && q._tasks.length){ - var tasks = [], data = []; - var l = q._tasks.length; - if (q.payload) l = Math.min(l, q.payload); - for (var i = 0; i < l; i++) { - var node = q._tasks.shift(); - tasks.push(node); - workersList.push(node); - data.push(node.data); - } - - numRunning += 1; - - if (q._tasks.length === 0) { - q.empty(); - } - - if (numRunning === q.concurrency) { - q.saturated(); - } - - var cb = onlyOnce(_next(tasks)); - _worker(data, cb); - } - isProcessing = false; - }, - length: function () { - return q._tasks.length; - }, - running: function () { - return numRunning; - }, - workersList: function () { - return workersList; - }, - idle: function() { - return q._tasks.length + numRunning === 0; - }, - pause: function () { - q.paused = true; - }, - resume: function () { - if (q.paused === false) { return; } - q.paused = false; - setImmediate$1(q.process); - } - }; - return q; -} - -/** - * A cargo of tasks for the worker function to complete. Cargo inherits all of - * the same methods and event callbacks as [`queue`]{@link module:ControlFlow.queue}. - * @typedef {Object} CargoObject - * @memberOf module:ControlFlow - * @property {Function} length - A function returning the number of items - * waiting to be processed. Invoke like `cargo.length()`. - * @property {number} payload - An `integer` for determining how many tasks - * should be process per round. This property can be changed after a `cargo` is - * created to alter the payload on-the-fly. - * @property {Function} push - Adds `task` to the `queue`. The callback is - * called once the `worker` has finished processing the task. Instead of a - * single task, an array of `tasks` can be submitted. The respective callback is - * used for every task in the list. Invoke like `cargo.push(task, [callback])`. - * @property {Function} saturated - A callback that is called when the - * `queue.length()` hits the concurrency and further tasks will be queued. - * @property {Function} empty - A callback that is called when the last item - * from the `queue` is given to a `worker`. - * @property {Function} drain - A callback that is called when the last item - * from the `queue` has returned from the `worker`. - * @property {Function} idle - a function returning false if there are items - * waiting or being processed, or true if not. Invoke like `cargo.idle()`. - * @property {Function} pause - a function that pauses the processing of tasks - * until `resume()` is called. Invoke like `cargo.pause()`. - * @property {Function} resume - a function that resumes the processing of - * queued tasks when the queue is paused. Invoke like `cargo.resume()`. - * @property {Function} kill - a function that removes the `drain` callback and - * empties remaining tasks from the queue forcing it to go idle. Invoke like `cargo.kill()`. - */ - -/** - * Creates a `cargo` object with the specified payload. Tasks added to the - * cargo will be processed altogether (up to the `payload` limit). If the - * `worker` is in progress, the task is queued until it becomes available. Once - * the `worker` has completed some tasks, each callback of those tasks is - * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) - * for how `cargo` and `queue` work. - * - * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers - * at a time, cargo passes an array of tasks to a single worker, repeating - * when the worker is finished. - * - * @name cargo - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An asynchronous function for processing an array - * of queued tasks. Invoked with `(tasks, callback)`. - * @param {number} [payload=Infinity] - An optional `integer` for determining - * how many tasks should be processed per round; if omitted, the default is - * unlimited. - * @returns {module:ControlFlow.CargoObject} A cargo object to manage the tasks. Callbacks can - * attached as certain properties to listen for specific events during the - * lifecycle of the cargo and inner queue. - * @example - * - * // create a cargo object with payload 2 - * var cargo = async.cargo(function(tasks, callback) { - * for (var i=0; i<tasks.length; i++) { - * console.log('hello ' + tasks[i].name); - * } - * callback(); - * }, 2); - * - * // add some items - * cargo.push({name: 'foo'}, function(err) { - * console.log('finished processing foo'); - * }); - * cargo.push({name: 'bar'}, function(err) { - * console.log('finished processing bar'); - * }); - * cargo.push({name: 'baz'}, function(err) { - * console.log('finished processing baz'); - * }); - */ -function cargo(worker, payload) { - return queue(worker, 1, payload); -} - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time. - * - * @name eachOfSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Invoked with (err). - */ -var eachOfSeries = doLimit(eachOfLimit, 1); - -/** - * Reduces `coll` into a single value using an async `iteratee` to return each - * successive step. `memo` is the initial state of the reduction. This function - * only operates in series. - * - * For performance reasons, it may make sense to split a call to this function - * into a parallel map, and then use the normal `Array.prototype.reduce` on the - * results. This function is for situations where each step in the reduction - * needs to be async; if you can get the data before reducing it, then it's - * probably a good idea to do so. - * - * @name reduce - * @static - * @memberOf module:Collections - * @method - * @alias inject - * @alias foldl - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee complete with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @example - * - * async.reduce([1,2,3], 0, function(memo, item, callback) { - * // pointless async: - * process.nextTick(function() { - * callback(null, memo + item) - * }); - * }, function(err, result) { - * // result is now equal to the last value of memo, which is 6 - * }); - */ -function reduce(coll, memo, iteratee, callback) { - callback = once(callback || noop); - var _iteratee = wrapAsync(iteratee); - eachOfSeries(coll, function(x, i, callback) { - _iteratee(memo, x, function(err, v) { - memo = v; - callback(err); - }); - }, function(err) { - callback(err, memo); - }); -} - -/** - * Version of the compose function that is more natural to read. Each function - * consumes the return value of the previous function. It is the equivalent of - * [compose]{@link module:ControlFlow.compose} with the arguments reversed. - * - * Each function is executed with the `this` binding of the composed function. - * - * @name seq - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.compose]{@link module:ControlFlow.compose} - * @category Control Flow - * @param {...AsyncFunction} functions - the asynchronous functions to compose - * @returns {Function} a function that composes the `functions` in order - * @example - * - * // Requires lodash (or underscore), express3 and dresende's orm2. - * // Part of an app, that fetches cats of the logged user. - * // This example uses `seq` function to avoid overnesting and error - * // handling clutter. - * app.get('/cats', function(request, response) { - * var User = request.models.User; - * async.seq( - * _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data)) - * function(user, fn) { - * user.getCats(fn); // 'getCats' has signature (callback(err, data)) - * } - * )(req.session.user_id, function (err, cats) { - * if (err) { - * console.error(err); - * response.json({ status: 'error', message: err.message }); - * } else { - * response.json({ status: 'ok', message: 'Cats found', data: cats }); - * } - * }); - * }); - */ -function seq(/*...functions*/) { - var _functions = arrayMap(arguments, wrapAsync); - return function(/*...args*/) { - var args = slice(arguments); - var that = this; - - var cb = args[args.length - 1]; - if (typeof cb == 'function') { - args.pop(); - } else { - cb = noop; - } - - reduce(_functions, args, function(newargs, fn, cb) { - fn.apply(that, newargs.concat(function(err/*, ...nextargs*/) { - var nextargs = slice(arguments, 1); - cb(err, nextargs); - })); - }, - function(err, results) { - cb.apply(that, [err].concat(results)); - }); - }; -} - -/** - * Creates a function which is a composition of the passed asynchronous - * functions. Each function consumes the return value of the function that - * follows. Composing functions `f()`, `g()`, and `h()` would produce the result - * of `f(g(h()))`, only this version uses callbacks to obtain the return values. - * - * Each function is executed with the `this` binding of the composed function. - * - * @name compose - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {...AsyncFunction} functions - the asynchronous functions to compose - * @returns {Function} an asynchronous function that is the composed - * asynchronous `functions` - * @example - * - * function add1(n, callback) { - * setTimeout(function () { - * callback(null, n + 1); - * }, 10); - * } - * - * function mul3(n, callback) { - * setTimeout(function () { - * callback(null, n * 3); - * }, 10); - * } - * - * var add1mul3 = async.compose(mul3, add1); - * add1mul3(4, function (err, result) { - * // result now equals 15 - * }); - */ -var compose = function(/*...args*/) { - return seq.apply(null, slice(arguments).reverse()); -}; - -var _concat = Array.prototype.concat; - -/** - * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time. - * - * @name concatLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`, - * which should use an array as its result. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - */ -var concatLimit = function(coll, limit, iteratee, callback) { - callback = callback || noop; - var _iteratee = wrapAsync(iteratee); - mapLimit(coll, limit, function(val, callback) { - _iteratee(val, function(err /*, ...args*/) { - if (err) return callback(err); - return callback(null, slice(arguments, 1)); - }); - }, function(err, mapResults) { - var result = []; - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - result = _concat.apply(result, mapResults[i]); - } - } - - return callback(err, result); - }); -}; - -/** - * Applies `iteratee` to each item in `coll`, concatenating the results. Returns - * the concatenated list. The `iteratee`s are called in parallel, and the - * results are concatenated as they return. There is no guarantee that the - * results array will be returned in the original order of `coll` passed to the - * `iteratee` function. - * - * @name concat - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`, - * which should use an array as its result. Invoked with (item, callback). - * @param {Function} [callback(err)] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @example - * - * async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files) { - * // files is now a list of filenames that exist in the 3 directories - * }); - */ -var concat = doLimit(concatLimit, Infinity); - -/** - * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time. - * - * @name concatSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`. - * The iteratee should complete with an array an array of results. - * Invoked with (item, callback). - * @param {Function} [callback(err)] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - */ -var concatSeries = doLimit(concatLimit, 1); - -/** - * Returns a function that when called, calls-back with the values provided. - * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to - * [`auto`]{@link module:ControlFlow.auto}. - * - * @name constant - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {...*} arguments... - Any number of arguments to automatically invoke - * callback with. - * @returns {AsyncFunction} Returns a function that when invoked, automatically - * invokes the callback with the previous given arguments. - * @example - * - * async.waterfall([ - * async.constant(42), - * function (value, next) { - * // value === 42 - * }, - * //... - * ], callback); - * - * async.waterfall([ - * async.constant(filename, "utf8"), - * fs.readFile, - * function (fileData, next) { - * //... - * } - * //... - * ], callback); - * - * async.auto({ - * hostname: async.constant("https://server.net/"), - * port: findFreePort, - * launchServer: ["hostname", "port", function (options, cb) { - * startServer(options, cb); - * }], - * //... - * }, callback); - */ -var constant = function(/*...values*/) { - var values = slice(arguments); - var args = [null].concat(values); - return function (/*...ignoredArgs, callback*/) { - var callback = arguments[arguments.length - 1]; - return callback.apply(this, args); - }; -}; - -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} - -function _createTester(check, getResult) { - return function(eachfn, arr, iteratee, cb) { - cb = cb || noop; - var testPassed = false; - var testResult; - eachfn(arr, function(value, _, callback) { - iteratee(value, function(err, result) { - if (err) { - callback(err); - } else if (check(result) && !testResult) { - testPassed = true; - testResult = getResult(true, value); - callback(null, breakLoop); - } else { - callback(); - } - }); - }, function(err) { - if (err) { - cb(err); - } else { - cb(null, testPassed ? testResult : getResult(false)); - } - }); - }; -} - -function _findGetResult(v, x) { - return x; -} - -/** - * Returns the first value in `coll` that passes an async truth test. The - * `iteratee` is applied in parallel, meaning the first iteratee to return - * `true` will fire the detect `callback` with that result. That means the - * result might not be the first item in the original `coll` (in terms of order) - * that passes the test. - - * If order within the original `coll` is important, then look at - * [`detectSeries`]{@link module:Collections.detectSeries}. - * - * @name detect - * @static - * @memberOf module:Collections - * @method - * @alias find - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @example - * - * async.detect(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // result now equals the first file in the list that exists - * }); - */ -var detect = doParallel(_createTester(identity, _findGetResult)); - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a - * time. - * - * @name detectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findLimit - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - */ -var detectLimit = doParallelLimit(_createTester(identity, _findGetResult)); - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time. - * - * @name detectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findSeries - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - */ -var detectSeries = doLimit(detectLimit, 1); - -function consoleFunc(name) { - return function (fn/*, ...args*/) { - var args = slice(arguments, 1); - args.push(function (err/*, ...args*/) { - var args = slice(arguments, 1); - if (typeof console === 'object') { - if (err) { - if (console.error) { - console.error(err); - } - } else if (console[name]) { - arrayEach(args, function (x) { - console[name](x); - }); - } - } - }); - wrapAsync(fn).apply(null, args); - }; -} - -/** - * Logs the result of an [`async` function]{@link AsyncFunction} to the - * `console` using `console.dir` to display the properties of the resulting object. - * Only works in Node.js or in browsers that support `console.dir` and - * `console.error` (such as FF and Chrome). - * If multiple arguments are returned from the async function, - * `console.dir` is called on each argument in order. - * - * @name dir - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, {hello: name}); - * }, 1000); - * }; - * - * // in the node repl - * node> async.dir(hello, 'world'); - * {hello: 'world'} - */ -var dir = consoleFunc('dir'); - -/** - * The post-check version of [`during`]{@link module:ControlFlow.during}. To reflect the difference in - * the order of operations, the arguments `test` and `fn` are switched. - * - * Also a version of [`doWhilst`]{@link module:ControlFlow.doWhilst} with asynchronous `test` function. - * @name doDuring - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.during]{@link module:ControlFlow.during} - * @category Control Flow - * @param {AsyncFunction} fn - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `fn`. Invoked with (...args, callback), where `...args` are the - * non-error args from the previous callback of `fn`. - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `fn` has stopped. `callback` - * will be passed an error if one occurred, otherwise `null`. - */ -function doDuring(fn, test, callback) { - callback = onlyOnce(callback || noop); - var _fn = wrapAsync(fn); - var _test = wrapAsync(test); - - function next(err/*, ...args*/) { - if (err) return callback(err); - var args = slice(arguments, 1); - args.push(check); - _test.apply(this, args); - } - - function check(err, truth) { - if (err) return callback(err); - if (!truth) return callback(null); - _fn(next); - } - - check(null, true); - -} - -/** - * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in - * the order of operations, the arguments `test` and `iteratee` are switched. - * - * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - * - * @name doWhilst - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - A function which is called each time `test` - * passes. Invoked with (callback). - * @param {Function} test - synchronous truth test to perform after each - * execution of `iteratee`. Invoked with any non-error callback results of - * `iteratee`. - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. - * `callback` will be passed an error and any arguments passed to the final - * `iteratee`'s callback. Invoked with (err, [results]); - */ -function doWhilst(iteratee, test, callback) { - callback = onlyOnce(callback || noop); - var _iteratee = wrapAsync(iteratee); - var next = function(err/*, ...args*/) { - if (err) return callback(err); - var args = slice(arguments, 1); - if (test.apply(this, args)) return _iteratee(next); - callback.apply(null, [null].concat(args)); - }; - _iteratee(next); -} - -/** - * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the - * argument ordering differs from `until`. - * - * @name doUntil - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.doWhilst]{@link module:ControlFlow.doWhilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {Function} test - synchronous truth test to perform after each - * execution of `iteratee`. Invoked with any non-error callback results of - * `iteratee`. - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - */ -function doUntil(iteratee, test, callback) { - doWhilst(iteratee, function() { - return !test.apply(this, arguments); - }, callback); -} - -/** - * Like [`whilst`]{@link module:ControlFlow.whilst}, except the `test` is an asynchronous function that - * is passed a callback in the form of `function (err, truth)`. If error is - * passed to `test` or `fn`, the main callback is immediately called with the - * value of the error. - * - * @name during - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `fn`. Invoked with (callback). - * @param {AsyncFunction} fn - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `fn` has stopped. `callback` - * will be passed an error, if one occurred, otherwise `null`. - * @example - * - * var count = 0; - * - * async.during( - * function (callback) { - * return callback(null, count < 5); - * }, - * function (callback) { - * count++; - * setTimeout(callback, 1000); - * }, - * function (err) { - * // 5 seconds have passed - * } - * ); - */ -function during(test, fn, callback) { - callback = onlyOnce(callback || noop); - var _fn = wrapAsync(fn); - var _test = wrapAsync(test); - - function next(err) { - if (err) return callback(err); - _test(check); - } - - function check(err, truth) { - if (err) return callback(err); - if (!truth) return callback(null); - _fn(next); - } - - _test(check); -} - -function _withoutIndex(iteratee) { - return function (value, index, callback) { - return iteratee(value, callback); - }; -} - -/** - * Applies the function `iteratee` to each item in `coll`, in parallel. - * The `iteratee` is called with an item from the list, and a callback for when - * it has finished. If the `iteratee` passes an error to its `callback`, the - * main `callback` (for the `each` function) is immediately called with the - * error. - * - * Note, that since this function applies `iteratee` to each item in parallel, - * there is no guarantee that the iteratee functions will complete in order. - * - * @name each - * @static - * @memberOf module:Collections - * @method - * @alias forEach - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to - * each item in `coll`. Invoked with (item, callback). - * The array index is not passed to the iteratee. - * If you need the index, use `eachOf`. - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @example - * - * // assuming openFiles is an array of file names and saveFile is a function - * // to save the modified contents of that file: - * - * async.each(openFiles, saveFile, function(err){ - * // if any of the saves produced an error, err would equal that error - * }); - * - * // assuming openFiles is an array of file names - * async.each(openFiles, function(file, callback) { - * - * // Perform operation on file here. - * console.log('Processing file ' + file); - * - * if( file.length > 32 ) { - * console.log('This file name is too long'); - * callback('File name too long'); - * } else { - * // Do work to process file here - * console.log('File processed'); - * callback(); - * } - * }, function(err) { - * // if any of the file processing produced an error, err would equal that error - * if( err ) { - * // One of the iterations produced an error. - * // All processing will now stop. - * console.log('A file failed to process'); - * } else { - * console.log('All files have been processed successfully'); - * } - * }); - */ -function eachLimit(coll, iteratee, callback) { - eachOf(coll, _withoutIndex(wrapAsync(iteratee)), callback); -} - -/** - * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. - * - * @name eachLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfLimit`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -function eachLimit$1(coll, limit, iteratee, callback) { - _eachOfLimit(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback); -} - -/** - * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. - * - * @name eachSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfSeries`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -var eachSeries = doLimit(eachLimit$1, 1); - -/** - * Wrap an async function and ensure it calls its callback on a later tick of - * the event loop. If the function already calls its callback on a next tick, - * no extra deferral is added. This is useful for preventing stack overflows - * (`RangeError: Maximum call stack size exceeded`) and generally keeping - * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) - * contained. ES2017 `async` functions are returned as-is -- they are immune - * to Zalgo's corrupting influences, as they always resolve on a later tick. - * - * @name ensureAsync - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - an async function, one that expects a node-style - * callback as its last argument. - * @returns {AsyncFunction} Returns a wrapped function with the exact same call - * signature as the function passed in. - * @example - * - * function sometimesAsync(arg, callback) { - * if (cache[arg]) { - * return callback(null, cache[arg]); // this would be synchronous!! - * } else { - * doSomeIO(arg, callback); // this IO would be asynchronous - * } - * } - * - * // this has a risk of stack overflows if many results are cached in a row - * async.mapSeries(args, sometimesAsync, done); - * - * // this will defer sometimesAsync's callback if necessary, - * // preventing stack overflows - * async.mapSeries(args, async.ensureAsync(sometimesAsync), done); - */ -function ensureAsync(fn) { - if (isAsync(fn)) return fn; - return initialParams(function (args, callback) { - var sync = true; - args.push(function () { - var innerArgs = arguments; - if (sync) { - setImmediate$1(function () { - callback.apply(null, innerArgs); - }); - } else { - callback.apply(null, innerArgs); - } - }); - fn.apply(this, args); - sync = false; - }); -} - -function notId(v) { - return !v; -} - -/** - * Returns `true` if every element in `coll` satisfies an async test. If any - * iteratee call returns `false`, the main `callback` is immediately called. - * - * @name every - * @static - * @memberOf module:Collections - * @method - * @alias all - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @example - * - * async.every(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // if result is true then every file exists - * }); - */ -var every = doParallel(_createTester(notId, notId)); - -/** - * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. - * - * @name everyLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - */ -var everyLimit = doParallelLimit(_createTester(notId, notId)); - -/** - * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. - * - * @name everySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in series. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - */ -var everySeries = doLimit(everyLimit, 1); - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -function filterArray(eachfn, arr, iteratee, callback) { - var truthValues = new Array(arr.length); - eachfn(arr, function (x, index, callback) { - iteratee(x, function (err, v) { - truthValues[index] = !!v; - callback(err); - }); - }, function (err) { - if (err) return callback(err); - var results = []; - for (var i = 0; i < arr.length; i++) { - if (truthValues[i]) results.push(arr[i]); - } - callback(null, results); - }); -} - -function filterGeneric(eachfn, coll, iteratee, callback) { - var results = []; - eachfn(coll, function (x, index, callback) { - iteratee(x, function (err, v) { - if (err) { - callback(err); - } else { - if (v) { - results.push({index: index, value: x}); - } - callback(); - } - }); - }, function (err) { - if (err) { - callback(err); - } else { - callback(null, arrayMap(results.sort(function (a, b) { - return a.index - b.index; - }), baseProperty('value'))); - } - }); -} - -function _filter(eachfn, coll, iteratee, callback) { - var filter = isArrayLike(coll) ? filterArray : filterGeneric; - filter(eachfn, coll, wrapAsync(iteratee), callback || noop); -} - -/** - * Returns a new array of all the values in `coll` which pass an async truth - * test. This operation is performed in parallel, but the results array will be - * in the same order as the original. - * - * @name filter - * @static - * @memberOf module:Collections - * @method - * @alias select - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @example - * - * async.filter(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, results) { - * // results now equals an array of the existing files - * }); - */ -var filter = doParallel(_filter); - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a - * time. - * - * @name filterLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -var filterLimit = doParallelLimit(_filter); - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. - * - * @name filterSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results) - */ -var filterSeries = doLimit(filterLimit, 1); - -/** - * Calls the asynchronous function `fn` with a callback parameter that allows it - * to call itself again, in series, indefinitely. - - * If an error is passed to the callback then `errback` is called with the - * error, and execution stops, otherwise it will never be called. - * - * @name forever - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} fn - an async function to call repeatedly. - * Invoked with (next). - * @param {Function} [errback] - when `fn` passes an error to it's callback, - * this function will be called, and execution stops. Invoked with (err). - * @example - * - * async.forever( - * function(next) { - * // next is suitable for passing to things that need a callback(err [, whatever]); - * // it will result in this function being called again. - * }, - * function(err) { - * // if next is called with a value in its first parameter, it will appear - * // in here as 'err', and execution will stop. - * } - * ); - */ -function forever(fn, errback) { - var done = onlyOnce(errback || noop); - var task = wrapAsync(ensureAsync(fn)); - - function next(err) { - if (err) return done(err); - task(next); - } - next(); -} - -/** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time. - * - * @name groupByLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - */ -var groupByLimit = function(coll, limit, iteratee, callback) { - callback = callback || noop; - var _iteratee = wrapAsync(iteratee); - mapLimit(coll, limit, function(val, callback) { - _iteratee(val, function(err, key) { - if (err) return callback(err); - return callback(null, {key: key, val: val}); - }); - }, function(err, mapResults) { - var result = {}; - // from MDN, handle object having an `hasOwnProperty` prop - var hasOwnProperty = Object.prototype.hasOwnProperty; - - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - var key = mapResults[i].key; - var val = mapResults[i].val; - - if (hasOwnProperty.call(result, key)) { - result[key].push(val); - } else { - result[key] = [val]; - } - } - } - - return callback(err, result); - }); -}; - -/** - * Returns a new object, where each value corresponds to an array of items, from - * `coll`, that returned the corresponding key. That is, the keys of the object - * correspond to the values passed to the `iteratee` callback. - * - * Note: Since this function applies the `iteratee` to each item in parallel, - * there is no guarantee that the `iteratee` functions will complete in order. - * However, the values for each key in the `result` will be in the same order as - * the original `coll`. For Objects, the values will roughly be in the order of - * the original Objects' keys (but this can vary across JavaScript engines). - * - * @name groupBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - * @example - * - * async.groupBy(['userId1', 'userId2', 'userId3'], function(userId, callback) { - * db.findById(userId, function(err, user) { - * if (err) return callback(err); - * return callback(null, user.age); - * }); - * }, function(err, result) { - * // result is object containing the userIds grouped by age - * // e.g. { 30: ['userId1', 'userId3'], 42: ['userId2']}; - * }); - */ -var groupBy = doLimit(groupByLimit, Infinity); - -/** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time. - * - * @name groupBySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - */ -var groupBySeries = doLimit(groupByLimit, 1); - -/** - * Logs the result of an `async` function to the `console`. Only works in - * Node.js or in browsers that support `console.log` and `console.error` (such - * as FF and Chrome). If multiple arguments are returned from the async - * function, `console.log` is called on each argument in order. - * - * @name log - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, 'hello ' + name); - * }, 1000); - * }; - * - * // in the node repl - * node> async.log(hello, 'world'); - * 'hello world' - */ -var log = consoleFunc('log'); - -/** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a - * time. - * - * @name mapValuesLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - */ -function mapValuesLimit(obj, limit, iteratee, callback) { - callback = once(callback || noop); - var newObj = {}; - var _iteratee = wrapAsync(iteratee); - eachOfLimit(obj, limit, function(val, key, next) { - _iteratee(val, key, function (err, result) { - if (err) return next(err); - newObj[key] = result; - next(); - }); - }, function (err) { - callback(err, newObj); - }); -} - -/** - * A relative of [`map`]{@link module:Collections.map}, designed for use with objects. - * - * Produces a new Object by mapping each value of `obj` through the `iteratee` - * function. The `iteratee` is called each `value` and `key` from `obj` and a - * callback for when it has finished processing. Each of these callbacks takes - * two arguments: an `error`, and the transformed item from `obj`. If `iteratee` - * passes an error to its callback, the main `callback` (for the `mapValues` - * function) is immediately called with the error. - * - * Note, the order of the keys in the result is not guaranteed. The keys will - * be roughly in the order they complete, (but this is very engine-specific) - * - * @name mapValues - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @example - * - * async.mapValues({ - * f1: 'file1', - * f2: 'file2', - * f3: 'file3' - * }, function (file, key, callback) { - * fs.stat(file, callback); - * }, function(err, result) { - * // result is now a map of stats for each file, e.g. - * // { - * // f1: [stats for file1], - * // f2: [stats for file2], - * // f3: [stats for file3] - * // } - * }); - */ - -var mapValues = doLimit(mapValuesLimit, Infinity); - -/** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time. - * - * @name mapValuesSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - */ -var mapValuesSeries = doLimit(mapValuesLimit, 1); - -function has(obj, key) { - return key in obj; -} - -/** - * Caches the results of an async function. When creating a hash to store - * function results against, the callback is omitted from the hash and an - * optional hash function can be used. - * - * If no hash function is specified, the first argument is used as a hash key, - * which may work reasonably if it is a string or a data type that converts to a - * distinct string. Note that objects and arrays will not behave reasonably. - * Neither will cases where the other arguments are significant. In such cases, - * specify your own hash function. - * - * The cache of results is exposed as the `memo` property of the function - * returned by `memoize`. - * - * @name memoize - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function to proxy and cache results from. - * @param {Function} hasher - An optional function for generating a custom hash - * for storing results. It has all the arguments applied to it apart from the - * callback, and must be synchronous. - * @returns {AsyncFunction} a memoized version of `fn` - * @example - * - * var slow_fn = function(name, callback) { - * // do something - * callback(null, result); - * }; - * var fn = async.memoize(slow_fn); - * - * // fn can now be used as if it were slow_fn - * fn('some name', function() { - * // callback - * }); - */ -function memoize(fn, hasher) { - var memo = Object.create(null); - var queues = Object.create(null); - hasher = hasher || identity; - var _fn = wrapAsync(fn); - var memoized = initialParams(function memoized(args, callback) { - var key = hasher.apply(null, args); - if (has(memo, key)) { - setImmediate$1(function() { - callback.apply(null, memo[key]); - }); - } else if (has(queues, key)) { - queues[key].push(callback); - } else { - queues[key] = [callback]; - _fn.apply(null, args.concat(function(/*args*/) { - var args = slice(arguments); - memo[key] = args; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, args); - } - })); - } - }); - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; -} - -/** - * Calls `callback` on a later loop around the event loop. In Node.js this just - * calls `process.nextTick`. In the browser it will use `setImmediate` if - * available, otherwise `setTimeout(callback, 0)`, which means other higher - * priority events may precede the execution of `callback`. - * - * This is used internally for browser-compatibility purposes. - * - * @name nextTick - * @static - * @memberOf module:Utils - * @method - * @see [async.setImmediate]{@link module:Utils.setImmediate} - * @category Util - * @param {Function} callback - The function to call on a later loop around - * the event loop. Invoked with (args...). - * @param {...*} args... - any number of additional arguments to pass to the - * callback on the next tick. - * @example - * - * var call_order = []; - * async.nextTick(function() { - * call_order.push('two'); - * // call_order now equals ['one','two'] - * }); - * call_order.push('one'); - * - * async.setImmediate(function (a, b, c) { - * // a, b, and c equal 1, 2, and 3 - * }, 1, 2, 3); - */ -var _defer$1; - -if (hasNextTick) { - _defer$1 = process.nextTick; -} else if (hasSetImmediate) { - _defer$1 = setImmediate; -} else { - _defer$1 = fallback; -} - -var nextTick = wrap(_defer$1); - -function _parallel(eachfn, tasks, callback) { - callback = callback || noop; - var results = isArrayLike(tasks) ? [] : {}; - - eachfn(tasks, function (task, key, callback) { - wrapAsync(task)(function (err, result) { - if (arguments.length > 2) { - result = slice(arguments, 1); - } - results[key] = result; - callback(err); - }); - }, function (err) { - callback(err, results); - }); -} - -/** - * Run the `tasks` collection of functions in parallel, without waiting until - * the previous function has completed. If any of the functions pass an error to - * its callback, the main `callback` is immediately called with the value of the - * error. Once the `tasks` have completed, the results are passed to the final - * `callback` as an array. - * - * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about - * parallel execution of code. If your tasks do not use any timers or perform - * any I/O, they will actually be executed in series. Any synchronous setup - * sections for each task will happen one after the other. JavaScript remains - * single-threaded. - * - * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the - * execution of other tasks when a task fails. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.parallel}. - * - * @name parallel - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - * - * @example - * async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], - * // optional callback - * function(err, results) { - * // the results array will equal ['one','two'] even though - * // the second function had a shorter timeout. - * }); - * - * // an example using an object instead of an array - * async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * // results is now equals to: {one: 1, two: 2} - * }); - */ -function parallelLimit(tasks, callback) { - _parallel(eachOf, tasks, callback); -} - -/** - * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a - * time. - * - * @name parallelLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.parallel]{@link module:ControlFlow.parallel} - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - */ -function parallelLimit$1(tasks, limit, callback) { - _parallel(_eachOfLimit(limit), tasks, callback); -} - -/** - * A queue of tasks for the worker function to complete. - * @typedef {Object} QueueObject - * @memberOf module:ControlFlow - * @property {Function} length - a function returning the number of items - * waiting to be processed. Invoke with `queue.length()`. - * @property {boolean} started - a boolean indicating whether or not any - * items have been pushed and processed by the queue. - * @property {Function} running - a function returning the number of items - * currently being processed. Invoke with `queue.running()`. - * @property {Function} workersList - a function returning the array of items - * currently being processed. Invoke with `queue.workersList()`. - * @property {Function} idle - a function returning false if there are items - * waiting or being processed, or true if not. Invoke with `queue.idle()`. - * @property {number} concurrency - an integer for determining how many `worker` - * functions should be run in parallel. This property can be changed after a - * `queue` is created to alter the concurrency on-the-fly. - * @property {Function} push - add a new task to the `queue`. Calls `callback` - * once the `worker` has finished processing the task. Instead of a single task, - * a `tasks` array can be submitted. The respective callback is used for every - * task in the list. Invoke with `queue.push(task, [callback])`, - * @property {Function} unshift - add a new task to the front of the `queue`. - * Invoke with `queue.unshift(task, [callback])`. - * @property {Function} remove - remove items from the queue that match a test - * function. The test function will be passed an object with a `data` property, - * and a `priority` property, if this is a - * [priorityQueue]{@link module:ControlFlow.priorityQueue} object. - * Invoked with `queue.remove(testFn)`, where `testFn` is of the form - * `function ({data, priority}) {}` and returns a Boolean. - * @property {Function} saturated - a callback that is called when the number of - * running workers hits the `concurrency` limit, and further tasks will be - * queued. - * @property {Function} unsaturated - a callback that is called when the number - * of running workers is less than the `concurrency` & `buffer` limits, and - * further tasks will not be queued. - * @property {number} buffer - A minimum threshold buffer in order to say that - * the `queue` is `unsaturated`. - * @property {Function} empty - a callback that is called when the last item - * from the `queue` is given to a `worker`. - * @property {Function} drain - a callback that is called when the last item - * from the `queue` has returned from the `worker`. - * @property {Function} error - a callback that is called when a task errors. - * Has the signature `function(error, task)`. - * @property {boolean} paused - a boolean for determining whether the queue is - * in a paused state. - * @property {Function} pause - a function that pauses the processing of tasks - * until `resume()` is called. Invoke with `queue.pause()`. - * @property {Function} resume - a function that resumes the processing of - * queued tasks when the queue is paused. Invoke with `queue.resume()`. - * @property {Function} kill - a function that removes the `drain` callback and - * empties remaining tasks from the queue forcing it to go idle. No more tasks - * should be pushed to the queue after calling this function. Invoke with `queue.kill()`. - */ - -/** - * Creates a `queue` object with the specified `concurrency`. Tasks added to the - * `queue` are processed in parallel (up to the `concurrency` limit). If all - * `worker`s are in progress, the task is queued until one becomes available. - * Once a `worker` completes a `task`, that `task`'s callback is called. - * - * @name queue - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. Invoked with (task, callback). - * @param {number} [concurrency=1] - An `integer` for determining how many - * `worker` functions should be run in parallel. If omitted, the concurrency - * defaults to `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can - * attached as certain properties to listen for specific events during the - * lifecycle of the queue. - * @example - * - * // create a queue object with concurrency 2 - * var q = async.queue(function(task, callback) { - * console.log('hello ' + task.name); - * callback(); - * }, 2); - * - * // assign a callback - * q.drain = function() { - * console.log('all items have been processed'); - * }; - * - * // add some items to the queue - * q.push({name: 'foo'}, function(err) { - * console.log('finished processing foo'); - * }); - * q.push({name: 'bar'}, function (err) { - * console.log('finished processing bar'); - * }); - * - * // add some items to the queue (batch-wise) - * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) { - * console.log('finished processing item'); - * }); - * - * // add some items to the front of the queue - * q.unshift({name: 'bar'}, function (err) { - * console.log('finished processing bar'); - * }); - */ -var queue$1 = function (worker, concurrency) { - var _worker = wrapAsync(worker); - return queue(function (items, cb) { - _worker(items[0], cb); - }, concurrency, 1); -}; - -/** - * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and - * completed in ascending priority order. - * - * @name priorityQueue - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. - * Invoked with (task, callback). - * @param {number} concurrency - An `integer` for determining how many `worker` - * functions should be run in parallel. If omitted, the concurrency defaults to - * `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two - * differences between `queue` and `priorityQueue` objects: - * * `push(task, priority, [callback])` - `priority` should be a number. If an - * array of `tasks` is given, all tasks will be assigned the same priority. - * * The `unshift` method was removed. - */ -var priorityQueue = function(worker, concurrency) { - // Start with a normal queue - var q = queue$1(worker, concurrency); - - // Override push to accept second parameter representing priority - q.push = function(data, priority, callback) { - if (callback == null) callback = noop; - if (typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - if (!isArray(data)) { - data = [data]; - } - if (data.length === 0) { - // call drain immediately if there are no tasks - return setImmediate$1(function() { - q.drain(); - }); - } - - priority = priority || 0; - var nextNode = q._tasks.head; - while (nextNode && priority >= nextNode.priority) { - nextNode = nextNode.next; - } - - for (var i = 0, l = data.length; i < l; i++) { - var item = { - data: data[i], - priority: priority, - callback: callback - }; - - if (nextNode) { - q._tasks.insertBefore(nextNode, item); - } else { - q._tasks.push(item); - } - } - setImmediate$1(q.process); - }; - - // Remove unshift function - delete q.unshift; - - return q; -}; - -/** - * Runs the `tasks` array of functions in parallel, without waiting until the - * previous function has completed. Once any of the `tasks` complete or pass an - * error to its callback, the main `callback` is immediately called. It's - * equivalent to `Promise.race()`. - * - * @name race - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction} - * to run. Each function can complete with an optional `result` value. - * @param {Function} callback - A callback to run once any of the functions have - * completed. This function gets an error or result from the first function that - * completed. Invoked with (err, result). - * @returns undefined - * @example - * - * async.race([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], - * // main callback - * function(err, result) { - * // the result will be equal to 'two' as it finishes earlier - * }); - */ -function race(tasks, callback) { - callback = once(callback || noop); - if (!isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions')); - if (!tasks.length) return callback(); - for (var i = 0, l = tasks.length; i < l; i++) { - wrapAsync(tasks[i])(callback); - } -} - -/** - * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. - * - * @name reduceRight - * @static - * @memberOf module:Collections - * @method - * @see [async.reduce]{@link module:Collections.reduce} - * @alias foldr - * @category Collection - * @param {Array} array - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee complete with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - */ -function reduceRight (array, memo, iteratee, callback) { - var reversed = slice(array).reverse(); - reduce(reversed, memo, iteratee, callback); -} - -/** - * Wraps the async function in another function that always completes with a - * result object, even when it errors. - * - * The result object has either the property `error` or `value`. - * - * @name reflect - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function you want to wrap - * @returns {Function} - A function that always passes null to it's callback as - * the error. The second argument to the callback will be an `object` with - * either an `error` or a `value` property. - * @example - * - * async.parallel([ - * async.reflect(function(callback) { - * // do some stuff ... - * callback(null, 'one'); - * }), - * async.reflect(function(callback) { - * // do some more stuff but error ... - * callback('bad stuff happened'); - * }), - * async.reflect(function(callback) { - * // do some more stuff ... - * callback(null, 'two'); - * }) - * ], - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = 'bad stuff happened' - * // results[2].value = 'two' - * }); - */ -function reflect(fn) { - var _fn = wrapAsync(fn); - return initialParams(function reflectOn(args, reflectCallback) { - args.push(function callback(error, cbArg) { - if (error) { - reflectCallback(null, { error: error }); - } else { - var value; - if (arguments.length <= 2) { - value = cbArg; - } else { - value = slice(arguments, 1); - } - reflectCallback(null, { value: value }); - } - }); - - return _fn.apply(this, args); - }); -} - -/** - * A helper function that wraps an array or an object of functions with `reflect`. - * - * @name reflectAll - * @static - * @memberOf module:Utils - * @method - * @see [async.reflect]{@link module:Utils.reflect} - * @category Util - * @param {Array|Object|Iterable} tasks - The collection of - * [async functions]{@link AsyncFunction} to wrap in `async.reflect`. - * @returns {Array} Returns an array of async functions, each wrapped in - * `async.reflect` - * @example - * - * let tasks = [ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * // do some more stuff but error ... - * callback(new Error('bad stuff happened')); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = Error('bad stuff happened') - * // results[2].value = 'two' - * }); - * - * // an example using an object instead of an array - * let tasks = { - * one: function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * two: function(callback) { - * callback('two'); - * }, - * three: function(callback) { - * setTimeout(function() { - * callback(null, 'three'); - * }, 100); - * } - * }; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results.one.value = 'one' - * // results.two.error = 'two' - * // results.three.value = 'three' - * }); - */ -function reflectAll(tasks) { - var results; - if (isArray(tasks)) { - results = arrayMap(tasks, reflect); - } else { - results = {}; - baseForOwn(tasks, function(task, key) { - results[key] = reflect.call(this, task); - }); - } - return results; -} - -function reject$1(eachfn, arr, iteratee, callback) { - _filter(eachfn, arr, function(value, cb) { - iteratee(value, function(err, v) { - cb(err, !v); - }); - }, callback); -} - -/** - * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test. - * - * @name reject - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @example - * - * async.reject(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, results) { - * // results now equals an array of missing files - * createFiles(results); - * }); - */ -var reject = doParallel(reject$1); - -/** - * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a - * time. - * - * @name rejectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -var rejectLimit = doParallelLimit(reject$1); - -/** - * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time. - * - * @name rejectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -var rejectSeries = doLimit(rejectLimit, 1); - -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ -function constant$1(value) { - return function() { - return value; - }; -} - -/** - * Attempts to get a successful response from `task` no more than `times` times - * before returning an error. If the task is successful, the `callback` will be - * passed the result of the successful task. If all attempts fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name retry - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @see [async.retryable]{@link module:ControlFlow.retryable} - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an - * object with `times` and `interval` or a number. - * * `times` - The number of attempts to make before giving up. The default - * is `5`. - * * `interval` - The time to wait between retries, in milliseconds. The - * default is `0`. The interval may also be specified as a function of the - * retry count (see example). - * * `errorFilter` - An optional synchronous function that is invoked on - * erroneous result. If it returns `true` the retry attempts will continue; - * if the function returns `false` the retry flow is aborted with the current - * attempt's error and result being returned to the final callback. - * Invoked with (err). - * * If `opts` is a number, the number specifies the number of times to retry, - * with the default interval of `0`. - * @param {AsyncFunction} task - An async function to retry. - * Invoked with (callback). - * @param {Function} [callback] - An optional callback which is called when the - * task has succeeded, or after the final failed attempt. It receives the `err` - * and `result` arguments of the last attempt at completing the `task`. Invoked - * with (err, results). - * - * @example - * - * // The `retry` function can be used as a stand-alone control flow by passing - * // a callback, as shown below: - * - * // try calling apiMethod 3 times - * async.retry(3, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 3 times, waiting 200 ms between each retry - * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 10 times with exponential backoff - * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds) - * async.retry({ - * times: 10, - * interval: function(retryCount) { - * return 50 * Math.pow(2, retryCount); - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod the default 5 times no delay between each retry - * async.retry(apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod only when error condition satisfies, all other - * // errors will abort the retry control flow and return to final callback - * async.retry({ - * errorFilter: function(err) { - * return err.message === 'Temporary error'; // only retry on a specific error - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // to retry individual methods that are not as reliable within other - * // control flow functions, use the `retryable` wrapper: - * async.auto({ - * users: api.getUsers.bind(api), - * payments: async.retryable(3, api.getPayments.bind(api)) - * }, function(err, results) { - * // do something with the results - * }); - * - */ -function retry(opts, task, callback) { - var DEFAULT_TIMES = 5; - var DEFAULT_INTERVAL = 0; - - var options = { - times: DEFAULT_TIMES, - intervalFunc: constant$1(DEFAULT_INTERVAL) - }; - - function parseTimes(acc, t) { - if (typeof t === 'object') { - acc.times = +t.times || DEFAULT_TIMES; - - acc.intervalFunc = typeof t.interval === 'function' ? - t.interval : - constant$1(+t.interval || DEFAULT_INTERVAL); - - acc.errorFilter = t.errorFilter; - } else if (typeof t === 'number' || typeof t === 'string') { - acc.times = +t || DEFAULT_TIMES; - } else { - throw new Error("Invalid arguments for async.retry"); - } - } - - if (arguments.length < 3 && typeof opts === 'function') { - callback = task || noop; - task = opts; - } else { - parseTimes(options, opts); - callback = callback || noop; - } - - if (typeof task !== 'function') { - throw new Error("Invalid arguments for async.retry"); - } - - var _task = wrapAsync(task); - - var attempt = 1; - function retryAttempt() { - _task(function(err) { - if (err && attempt++ < options.times && - (typeof options.errorFilter != 'function' || - options.errorFilter(err))) { - setTimeout(retryAttempt, options.intervalFunc(attempt)); - } else { - callback.apply(null, arguments); - } - }); - } - - retryAttempt(); -} - -/** - * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method - * wraps a task and makes it retryable, rather than immediately calling it - * with retries. - * - * @name retryable - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.retry]{@link module:ControlFlow.retry} - * @category Control Flow - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional - * options, exactly the same as from `retry` - * @param {AsyncFunction} task - the asynchronous function to wrap. - * This function will be passed any arguments passed to the returned wrapper. - * Invoked with (...args, callback). - * @returns {AsyncFunction} The wrapped function, which when invoked, will - * retry on an error, based on the parameters specified in `opts`. - * This function will accept the same parameters as `task`. - * @example - * - * async.auto({ - * dep1: async.retryable(3, getFromFlakyService), - * process: ["dep1", async.retryable(3, function (results, cb) { - * maybeProcessData(results.dep1, cb); - * })] - * }, callback); - */ -var retryable = function (opts, task) { - if (!task) { - task = opts; - opts = null; - } - var _task = wrapAsync(task); - return initialParams(function (args, callback) { - function taskFn(cb) { - _task.apply(null, args.concat(cb)); - } - - if (opts) retry(opts, taskFn, callback); - else retry(taskFn, callback); - - }); -}; - -/** - * Run the functions in the `tasks` collection in series, each one running once - * the previous function has completed. If any functions in the series pass an - * error to its callback, no more functions are run, and `callback` is - * immediately called with the value of the error. Otherwise, `callback` - * receives an array of results when `tasks` have completed. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function, and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.series}. - * - * **Note** that while many implementations preserve the order of object - * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) - * explicitly states that - * - * > The mechanics and order of enumerating the properties is not specified. - * - * So if you rely on the order in which your series of functions are executed, - * and want this to work on all platforms, consider using an array. - * - * @name series - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection containing - * [async functions]{@link AsyncFunction} to run in series. - * Each function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This function gets a results array (or object) - * containing all the result arguments passed to the `task` callbacks. Invoked - * with (err, result). - * @example - * async.series([ - * function(callback) { - * // do some stuff ... - * callback(null, 'one'); - * }, - * function(callback) { - * // do some more stuff ... - * callback(null, 'two'); - * } - * ], - * // optional callback - * function(err, results) { - * // results is now equal to ['one', 'two'] - * }); - * - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback){ - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * // results is now equal to: {one: 1, two: 2} - * }); - */ -function series(tasks, callback) { - _parallel(eachOfSeries, tasks, callback); -} - -/** - * Returns `true` if at least one element in the `coll` satisfies an async test. - * If any iteratee call returns `true`, the main `callback` is immediately - * called. - * - * @name some - * @static - * @memberOf module:Collections - * @method - * @alias any - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @example - * - * async.some(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // if result is true then at least one of the files exists - * }); - */ -var some = doParallel(_createTester(Boolean, identity)); - -/** - * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. - * - * @name someLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anyLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - */ -var someLimit = doParallelLimit(_createTester(Boolean, identity)); - -/** - * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. - * - * @name someSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anySeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in series. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - */ -var someSeries = doLimit(someLimit, 1); - -/** - * Sorts a list by the results of running each `coll` value through an async - * `iteratee`. - * - * @name sortBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a value to use as the sort criteria as - * its `result`. - * Invoked with (item, callback). - * @param {Function} callback - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is the items - * from the original `coll` sorted by the values returned by the `iteratee` - * calls. Invoked with (err, results). - * @example - * - * async.sortBy(['file1','file2','file3'], function(file, callback) { - * fs.stat(file, function(err, stats) { - * callback(err, stats.mtime); - * }); - * }, function(err, results) { - * // results is now the original array of files sorted by - * // modified date - * }); - * - * // By modifying the callback parameter the - * // sorting order can be influenced: - * - * // ascending order - * async.sortBy([1,9,3,5], function(x, callback) { - * callback(null, x); - * }, function(err,result) { - * // result callback - * }); - * - * // descending order - * async.sortBy([1,9,3,5], function(x, callback) { - * callback(null, x*-1); //<- x*-1 instead of x, turns the order around - * }, function(err,result) { - * // result callback - * }); - */ -function sortBy (coll, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - map(coll, function (x, callback) { - _iteratee(x, function (err, criteria) { - if (err) return callback(err); - callback(null, {value: x, criteria: criteria}); - }); - }, function (err, results) { - if (err) return callback(err); - callback(null, arrayMap(results.sort(comparator), baseProperty('value'))); - }); - - function comparator(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - } -} - -/** - * Sets a time limit on an asynchronous function. If the function does not call - * its callback within the specified milliseconds, it will be called with a - * timeout error. The code property for the error object will be `'ETIMEDOUT'`. - * - * @name timeout - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} asyncFn - The async function to limit in time. - * @param {number} milliseconds - The specified time limit. - * @param {*} [info] - Any variable you want attached (`string`, `object`, etc) - * to timeout Error for more information.. - * @returns {AsyncFunction} Returns a wrapped function that can be used with any - * of the control flow functions. - * Invoke this function with the same parameters as you would `asyncFunc`. - * @example - * - * function myFunction(foo, callback) { - * doAsyncTask(foo, function(err, data) { - * // handle errors - * if (err) return callback(err); - * - * // do some stuff ... - * - * // return processed data - * return callback(null, data); - * }); - * } - * - * var wrapped = async.timeout(myFunction, 1000); - * - * // call `wrapped` as you would `myFunction` - * wrapped({ bar: 'bar' }, function(err, data) { - * // if `myFunction` takes < 1000 ms to execute, `err` - * // and `data` will have their expected values - * - * // else `err` will be an Error with the code 'ETIMEDOUT' - * }); - */ -function timeout(asyncFn, milliseconds, info) { - var fn = wrapAsync(asyncFn); - - return initialParams(function (args, callback) { - var timedOut = false; - var timer; - - function timeoutCallback() { - var name = asyncFn.name || 'anonymous'; - var error = new Error('Callback function "' + name + '" timed out.'); - error.code = 'ETIMEDOUT'; - if (info) { - error.info = info; - } - timedOut = true; - callback(error); - } - - args.push(function () { - if (!timedOut) { - callback.apply(null, arguments); - clearTimeout(timer); - } - }); - - // setup timer and call original function - timer = setTimeout(timeoutCallback, milliseconds); - fn.apply(null, args); - }); -} - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil; -var nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -/** - * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a - * time. - * - * @name timesLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} count - The number of times to run the function. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see [async.map]{@link module:Collections.map}. - */ -function timeLimit(count, limit, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - mapLimit(baseRange(0, count, 1), limit, _iteratee, callback); -} - -/** - * Calls the `iteratee` function `n` times, and accumulates results in the same - * manner you would use with [map]{@link module:Collections.map}. - * - * @name times - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.map]{@link module:Collections.map} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - * @example - * - * // Pretend this is some complicated async factory - * var createUser = function(id, callback) { - * callback(null, { - * id: 'user' + id - * }); - * }; - * - * // generate 5 users - * async.times(5, function(n, next) { - * createUser(n, function(err, user) { - * next(err, user); - * }); - * }, function(err, users) { - * // we should now have 5 users - * }); - */ -var times = doLimit(timeLimit, Infinity); - -/** - * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time. - * - * @name timesSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - */ -var timesSeries = doLimit(timeLimit, 1); - -/** - * A relative of `reduce`. Takes an Object or Array, and iterates over each - * element in series, each step potentially mutating an `accumulator` value. - * The type of the accumulator defaults to the type of collection passed in. - * - * @name transform - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {*} [accumulator] - The initial state of the transform. If omitted, - * it will default to an empty Object or Array, depending on the type of `coll` - * @param {AsyncFunction} iteratee - A function applied to each item in the - * collection that potentially modifies the accumulator. - * Invoked with (accumulator, item, key, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the transformed accumulator. - * Invoked with (err, result). - * @example - * - * async.transform([1,2,3], function(acc, item, index, callback) { - * // pointless async: - * process.nextTick(function() { - * acc.push(item * 2) - * callback(null) - * }); - * }, function(err, result) { - * // result is now equal to [2, 4, 6] - * }); - * - * @example - * - * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) { - * setImmediate(function () { - * obj[key] = val * 2; - * callback(); - * }) - * }, function (err, result) { - * // result is equal to {a: 2, b: 4, c: 6} - * }) - */ -function transform (coll, accumulator, iteratee, callback) { - if (arguments.length <= 3) { - callback = iteratee; - iteratee = accumulator; - accumulator = isArray(coll) ? [] : {}; - } - callback = once(callback || noop); - var _iteratee = wrapAsync(iteratee); - - eachOf(coll, function(v, k, cb) { - _iteratee(accumulator, v, k, cb); - }, function(err) { - callback(err, accumulator); - }); -} - -/** - * It runs each task in series but stops whenever any of the functions were - * successful. If one of the tasks were successful, the `callback` will be - * passed the result of the successful task. If all tasks fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name tryEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection containing functions to - * run, each function is passed a `callback(err, result)` it must call on - * completion with an error `err` (which can be `null`) and an optional `result` - * value. - * @param {Function} [callback] - An optional callback which is called when one - * of the tasks has succeeded, or all have failed. It receives the `err` and - * `result` arguments of the last attempt at completing the `task`. Invoked with - * (err, results). - * @example - * async.tryEach([ - * function getDataFromFirstWebsite(callback) { - * // Try getting the data from the first website - * callback(err, data); - * }, - * function getDataFromSecondWebsite(callback) { - * // First website failed, - * // Try getting the data from the backup website - * callback(err, data); - * } - * ], - * // optional callback - * function(err, results) { - * Now do something with the data. - * }); - * - */ -function tryEach(tasks, callback) { - var error = null; - var result; - callback = callback || noop; - eachSeries(tasks, function(task, callback) { - wrapAsync(task)(function (err, res/*, ...args*/) { - if (arguments.length > 2) { - result = slice(arguments, 1); - } else { - result = res; - } - error = err; - callback(!err); - }); - }, function () { - callback(error, result); - }); -} - -/** - * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original, - * unmemoized form. Handy for testing. - * - * @name unmemoize - * @static - * @memberOf module:Utils - * @method - * @see [async.memoize]{@link module:Utils.memoize} - * @category Util - * @param {AsyncFunction} fn - the memoized function - * @returns {AsyncFunction} a function that calls the original unmemoized function - */ -function unmemoize(fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; -} - -/** - * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. - * - * @name whilst - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Function} test - synchronous truth test to perform before each - * execution of `iteratee`. Invoked with (). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns undefined - * @example - * - * var count = 0; - * async.whilst( - * function() { return count < 5; }, - * function(callback) { - * count++; - * setTimeout(function() { - * callback(null, count); - * }, 1000); - * }, - * function (err, n) { - * // 5 seconds have passed, n = 5 - * } - * ); - */ -function whilst(test, iteratee, callback) { - callback = onlyOnce(callback || noop); - var _iteratee = wrapAsync(iteratee); - if (!test()) return callback(null); - var next = function(err/*, ...args*/) { - if (err) return callback(err); - if (test()) return _iteratee(next); - var args = slice(arguments, 1); - callback.apply(null, [null].concat(args)); - }; - _iteratee(next); -} - -/** - * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. `callback` will be passed an error and any - * arguments passed to the final `iteratee`'s callback. - * - * The inverse of [whilst]{@link module:ControlFlow.whilst}. - * - * @name until - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {Function} test - synchronous truth test to perform before each - * execution of `iteratee`. Invoked with (). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - */ -function until(test, iteratee, callback) { - whilst(function() { - return !test.apply(this, arguments); - }, iteratee, callback); -} - -/** - * Runs the `tasks` array of functions in series, each passing their results to - * the next in the array. However, if any of the `tasks` pass an error to their - * own callback, the next function is not executed, and the main `callback` is - * immediately called with the error. - * - * @name waterfall - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array of [async functions]{@link AsyncFunction} - * to run. - * Each function should complete with any number of `result` values. - * The `result` values will be passed as arguments, in order, to the next task. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This will be passed the results of the last task's - * callback. Invoked with (err, [results]). - * @returns undefined - * @example - * - * async.waterfall([ - * function(callback) { - * callback(null, 'one', 'two'); - * }, - * function(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * }, - * function(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - * ], function (err, result) { - * // result now equals 'done' - * }); - * - * // Or, with named functions: - * async.waterfall([ - * myFirstFunction, - * mySecondFunction, - * myLastFunction, - * ], function (err, result) { - * // result now equals 'done' - * }); - * function myFirstFunction(callback) { - * callback(null, 'one', 'two'); - * } - * function mySecondFunction(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * } - * function myLastFunction(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - */ -var waterfall = function(tasks, callback) { - callback = once(callback || noop); - if (!isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions')); - if (!tasks.length) return callback(); - var taskIndex = 0; - - function nextTask(args) { - var task = wrapAsync(tasks[taskIndex++]); - args.push(onlyOnce(next)); - task.apply(null, args); - } - - function next(err/*, ...args*/) { - if (err || taskIndex === tasks.length) { - return callback.apply(null, arguments); - } - nextTask(slice(arguments, 1)); - } - - nextTask([]); -}; - -/** - * An "async function" in the context of Async is an asynchronous function with - * a variable number of parameters, with the final parameter being a callback. - * (`function (arg1, arg2, ..., callback) {}`) - * The final callback is of the form `callback(err, results...)`, which must be - * called once the function is completed. The callback should be called with a - * Error as its first argument to signal that an error occurred. - * Otherwise, if no error occurred, it should be called with `null` as the first - * argument, and any additional `result` arguments that may apply, to signal - * successful completion. - * The callback must be called exactly once, ideally on a later tick of the - * JavaScript event loop. - * - * This type of function is also referred to as a "Node-style async function", - * or a "continuation passing-style function" (CPS). Most of the methods of this - * library are themselves CPS/Node-style async functions, or functions that - * return CPS/Node-style async functions. - * - * Wherever we accept a Node-style async function, we also directly accept an - * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}. - * In this case, the `async` function will not be passed a final callback - * argument, and any thrown error will be used as the `err` argument of the - * implicit callback, and the return value will be used as the `result` value. - * (i.e. a `rejected` of the returned Promise becomes the `err` callback - * argument, and a `resolved` value becomes the `result`.) - * - * Note, due to JavaScript limitations, we can only detect native `async` - * functions and not transpilied implementations. - * Your environment must have `async`/`await` support for this to work. - * (e.g. Node > v7.6, or a recent version of a modern browser). - * If you are using `async` functions through a transpiler (e.g. Babel), you - * must still wrap the function with [asyncify]{@link module:Utils.asyncify}, - * because the `async function` will be compiled to an ordinary function that - * returns a promise. - * - * @typedef {Function} AsyncFunction - * @static - */ - -/** - * Async is a utility module which provides straight-forward, powerful functions - * for working with asynchronous JavaScript. Although originally designed for - * use with [Node.js](http://nodejs.org) and installable via - * `npm install --save async`, it can also be used directly in the browser. - * @module async - * @see AsyncFunction - */ - - -/** - * A collection of `async` functions for manipulating collections, such as - * arrays and objects. - * @module Collections - */ - -/** - * A collection of `async` functions for controlling the flow through a script. - * @module ControlFlow - */ - -/** - * A collection of `async` utility functions. - * @module Utils - */ - -var index = { - apply: apply, - applyEach: applyEach, - applyEachSeries: applyEachSeries, - asyncify: asyncify, - auto: auto, - autoInject: autoInject, - cargo: cargo, - compose: compose, - concat: concat, - concatLimit: concatLimit, - concatSeries: concatSeries, - constant: constant, - detect: detect, - detectLimit: detectLimit, - detectSeries: detectSeries, - dir: dir, - doDuring: doDuring, - doUntil: doUntil, - doWhilst: doWhilst, - during: during, - each: eachLimit, - eachLimit: eachLimit$1, - eachOf: eachOf, - eachOfLimit: eachOfLimit, - eachOfSeries: eachOfSeries, - eachSeries: eachSeries, - ensureAsync: ensureAsync, - every: every, - everyLimit: everyLimit, - everySeries: everySeries, - filter: filter, - filterLimit: filterLimit, - filterSeries: filterSeries, - forever: forever, - groupBy: groupBy, - groupByLimit: groupByLimit, - groupBySeries: groupBySeries, - log: log, - map: map, - mapLimit: mapLimit, - mapSeries: mapSeries, - mapValues: mapValues, - mapValuesLimit: mapValuesLimit, - mapValuesSeries: mapValuesSeries, - memoize: memoize, - nextTick: nextTick, - parallel: parallelLimit, - parallelLimit: parallelLimit$1, - priorityQueue: priorityQueue, - queue: queue$1, - race: race, - reduce: reduce, - reduceRight: reduceRight, - reflect: reflect, - reflectAll: reflectAll, - reject: reject, - rejectLimit: rejectLimit, - rejectSeries: rejectSeries, - retry: retry, - retryable: retryable, - seq: seq, - series: series, - setImmediate: setImmediate$1, - some: some, - someLimit: someLimit, - someSeries: someSeries, - sortBy: sortBy, - timeout: timeout, - times: times, - timesLimit: timeLimit, - timesSeries: timesSeries, - transform: transform, - tryEach: tryEach, - unmemoize: unmemoize, - until: until, - waterfall: waterfall, - whilst: whilst, - - // aliases - all: every, - allLimit: everyLimit, - allSeries: everySeries, - any: some, - anyLimit: someLimit, - anySeries: someSeries, - find: detect, - findLimit: detectLimit, - findSeries: detectSeries, - forEach: eachLimit, - forEachSeries: eachSeries, - forEachLimit: eachLimit$1, - forEachOf: eachOf, - forEachOfSeries: eachOfSeries, - forEachOfLimit: eachOfLimit, - inject: reduce, - foldl: reduce, - foldr: reduceRight, - select: filter, - selectLimit: filterLimit, - selectSeries: filterSeries, - wrapSync: asyncify -}; - -exports['default'] = index; -exports.apply = apply; -exports.applyEach = applyEach; -exports.applyEachSeries = applyEachSeries; -exports.asyncify = asyncify; -exports.auto = auto; -exports.autoInject = autoInject; -exports.cargo = cargo; -exports.compose = compose; -exports.concat = concat; -exports.concatLimit = concatLimit; -exports.concatSeries = concatSeries; -exports.constant = constant; -exports.detect = detect; -exports.detectLimit = detectLimit; -exports.detectSeries = detectSeries; -exports.dir = dir; -exports.doDuring = doDuring; -exports.doUntil = doUntil; -exports.doWhilst = doWhilst; -exports.during = during; -exports.each = eachLimit; -exports.eachLimit = eachLimit$1; -exports.eachOf = eachOf; -exports.eachOfLimit = eachOfLimit; -exports.eachOfSeries = eachOfSeries; -exports.eachSeries = eachSeries; -exports.ensureAsync = ensureAsync; -exports.every = every; -exports.everyLimit = everyLimit; -exports.everySeries = everySeries; -exports.filter = filter; -exports.filterLimit = filterLimit; -exports.filterSeries = filterSeries; -exports.forever = forever; -exports.groupBy = groupBy; -exports.groupByLimit = groupByLimit; -exports.groupBySeries = groupBySeries; -exports.log = log; -exports.map = map; -exports.mapLimit = mapLimit; -exports.mapSeries = mapSeries; -exports.mapValues = mapValues; -exports.mapValuesLimit = mapValuesLimit; -exports.mapValuesSeries = mapValuesSeries; -exports.memoize = memoize; -exports.nextTick = nextTick; -exports.parallel = parallelLimit; -exports.parallelLimit = parallelLimit$1; -exports.priorityQueue = priorityQueue; -exports.queue = queue$1; -exports.race = race; -exports.reduce = reduce; -exports.reduceRight = reduceRight; -exports.reflect = reflect; -exports.reflectAll = reflectAll; -exports.reject = reject; -exports.rejectLimit = rejectLimit; -exports.rejectSeries = rejectSeries; -exports.retry = retry; -exports.retryable = retryable; -exports.seq = seq; -exports.series = series; -exports.setImmediate = setImmediate$1; -exports.some = some; -exports.someLimit = someLimit; -exports.someSeries = someSeries; -exports.sortBy = sortBy; -exports.timeout = timeout; -exports.times = times; -exports.timesLimit = timeLimit; -exports.timesSeries = timesSeries; -exports.transform = transform; -exports.tryEach = tryEach; -exports.unmemoize = unmemoize; -exports.until = until; -exports.waterfall = waterfall; -exports.whilst = whilst; -exports.all = every; -exports.allLimit = everyLimit; -exports.allSeries = everySeries; -exports.any = some; -exports.anyLimit = someLimit; -exports.anySeries = someSeries; -exports.find = detect; -exports.findLimit = detectLimit; -exports.findSeries = detectSeries; -exports.forEach = eachLimit; -exports.forEachSeries = eachSeries; -exports.forEachLimit = eachLimit$1; -exports.forEachOf = eachOf; -exports.forEachOfSeries = eachOfSeries; -exports.forEachOfLimit = eachOfLimit; -exports.inject = reduce; -exports.foldl = reduce; -exports.foldr = reduceRight; -exports.select = filter; -exports.selectLimit = filterLimit; -exports.selectSeries = filterSeries; -exports.wrapSync = asyncify; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/node_modules/async/dist/async.min.js b/node_modules/async/dist/async.min.js deleted file mode 100644 index 0b9e113..0000000 --- a/node_modules/async/dist/async.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.async=n.async||{})}(this,function(n){"use strict";function t(n,t){t|=0;for(var e=Math.max(n.length-t,0),r=Array(e),u=0;u<e;u++)r[u]=n[t+u];return r}function e(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function r(n){setTimeout(n,0)}function u(n){return function(e){var r=t(arguments,1);n(function(){e.apply(null,r)})}}function i(n){return ct(function(t,r){var u;try{u=n.apply(this,t)}catch(n){return r(n)}e(u)&&"function"==typeof u.then?u.then(function(n){o(r,null,n)},function(n){o(r,n.message?n:new Error(n))}):r(null,u)})}function o(n,t,e){try{n(t,e)}catch(n){lt(c,n)}}function c(n){throw n}function f(n){return st&&"AsyncFunction"===n[Symbol.toStringTag]}function a(n){return f(n)?i(n):n}function l(n){return function(e){var r=t(arguments,1),u=ct(function(t,r){var u=this;return n(e,function(n,e){a(n).apply(u,t.concat(e))},r)});return r.length?u.apply(this,r):u}}function s(n){var t=mt.call(n,bt),e=n[bt];try{n[bt]=void 0;var r=!0}catch(n){}var u=gt.call(n);return r&&(t?n[bt]=e:delete n[bt]),u}function p(n){return St.call(n)}function h(n){return null==n?void 0===n?Lt:kt:Ot&&Ot in Object(n)?s(n):p(n)}function y(n){if(!e(n))return!1;var t=h(n);return t==xt||t==Et||t==wt||t==At}function v(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=Tt}function d(n){return null!=n&&v(n.length)&&!y(n)}function m(){}function g(n){return function(){if(null!==n){var t=n;n=null,t.apply(this,arguments)}}}function b(n,t){for(var e=-1,r=Array(n);++e<n;)r[e]=t(e);return r}function j(n){return null!=n&&"object"==typeof n}function S(n){return j(n)&&h(n)==It}function k(){return!1}function L(n,t){var e=typeof n;return t=null==t?Nt:t,!!t&&("number"==e||"symbol"!=e&&Qt.test(n))&&n>-1&&n%1==0&&n<t}function O(n){return j(n)&&v(n.length)&&!!me[h(n)]}function w(n){return function(t){return n(t)}}function x(n,t){var e=Pt(n),r=!e&&zt(n),u=!e&&!r&&Wt(n),i=!e&&!r&&!u&&Oe(n),o=e||r||u||i,c=o?b(n.length,String):[],f=c.length;for(var a in n)!t&&!xe.call(n,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||L(a,f))||c.push(a);return c}function E(n){var t=n&&n.constructor,e="function"==typeof t&&t.prototype||Ee;return n===e}function A(n,t){return function(e){return n(t(e))}}function T(n){if(!E(n))return Ae(n);var t=[];for(var e in Object(n))_e.call(n,e)&&"constructor"!=e&&t.push(e);return t}function _(n){return d(n)?x(n):T(n)}function B(n){var t=-1,e=n.length;return function(){return++t<e?{value:n[t],key:t}:null}}function F(n){var t=-1;return function(){var e=n.next();return e.done?null:(t++,{value:e.value,key:t})}}function I(n){var t=_(n),e=-1,r=t.length;return function u(){var i=t[++e];return"__proto__"===i?u():e<r?{value:n[i],key:i}:null}}function M(n){if(d(n))return B(n);var t=Ft(n);return t?F(t):I(n)}function U(n){return function(){if(null===n)throw new Error("Callback was already called.");var t=n;n=null,t.apply(this,arguments)}}function q(n){return function(t,e,r){function u(n,t){if(f-=1,n)c=!0,r(n);else{if(t===_t||c&&f<=0)return c=!0,r(null);a||i()}}function i(){for(a=!0;f<n&&!c;){var t=o();if(null===t)return c=!0,void(f<=0&&r(null));f+=1,e(t.value,t.key,U(u))}a=!1}if(r=g(r||m),n<=0||!t)return r(null);var o=M(t),c=!1,f=0,a=!1;i()}}function z(n,t,e,r){q(t)(n,a(e),r)}function P(n,t){return function(e,r,u){return n(e,t,r,u)}}function V(n,t,e){function r(n,t){n?e(n):++i!==o&&t!==_t||e(null)}e=g(e||m);var u=0,i=0,o=n.length;for(0===o&&e(null);u<o;u++)t(n[u],u,U(r))}function D(n){return function(t,e,r){return n(Fe,t,a(e),r)}}function R(n,t,e,r){r=r||m,t=t||[];var u=[],i=0,o=a(e);n(t,function(n,t,e){var r=i++;o(n,function(n,t){u[r]=t,e(n)})},function(n){r(n,u)})}function C(n){return function(t,e,r,u){return n(q(e),t,a(r),u)}}function $(n,t){for(var e=-1,r=null==n?0:n.length;++e<r&&t(n[e],e,n)!==!1;);return n}function W(n){return function(t,e,r){for(var u=-1,i=Object(t),o=r(t),c=o.length;c--;){var f=o[n?c:++u];if(e(i[f],f,i)===!1)break}return t}}function N(n,t){return n&&Pe(n,t,_)}function Q(n,t,e,r){for(var u=n.length,i=e+(r?1:-1);r?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function G(n){return n!==n}function H(n,t,e){for(var r=e-1,u=n.length;++r<u;)if(n[r]===t)return r;return-1}function J(n,t,e){return t===t?H(n,t,e):Q(n,G,e)}function K(n,t){for(var e=-1,r=null==n?0:n.length,u=Array(r);++e<r;)u[e]=t(n[e],e,n);return u}function X(n){return"symbol"==typeof n||j(n)&&h(n)==De}function Y(n){if("string"==typeof n)return n;if(Pt(n))return K(n,Y)+"";if(X(n))return $e?$e.call(n):"";var t=n+"";return"0"==t&&1/n==-Re?"-0":t}function Z(n,t,e){var r=-1,u=n.length;t<0&&(t=-t>u?0:u+t),e=e>u?u:e,e<0&&(e+=u),u=t>e?0:e-t>>>0,t>>>=0;for(var i=Array(u);++r<u;)i[r]=n[r+t];return i}function nn(n,t,e){var r=n.length;return e=void 0===e?r:e,!t&&e>=r?n:Z(n,t,e)}function tn(n,t){for(var e=n.length;e--&&J(t,n[e],0)>-1;);return e}function en(n,t){for(var e=-1,r=n.length;++e<r&&J(t,n[e],0)>-1;);return e}function rn(n){return n.split("")}function un(n){return Xe.test(n)}function on(n){return n.match(mr)||[]}function cn(n){return un(n)?on(n):rn(n)}function fn(n){return null==n?"":Y(n)}function an(n,t,e){if(n=fn(n),n&&(e||void 0===t))return n.replace(gr,"");if(!n||!(t=Y(t)))return n;var r=cn(n),u=cn(t),i=en(r,u),o=tn(r,u)+1;return nn(r,i,o).join("")}function ln(n){return n=n.toString().replace(kr,""),n=n.match(br)[2].replace(" ",""),n=n?n.split(jr):[],n=n.map(function(n){return an(n.replace(Sr,""))})}function sn(n,t){var e={};N(n,function(n,t){function r(t,e){var r=K(u,function(n){return t[n]});r.push(e),a(n).apply(null,r)}var u,i=f(n),o=!i&&1===n.length||i&&0===n.length;if(Pt(n))u=n.slice(0,-1),n=n[n.length-1],e[t]=u.concat(u.length>0?r:n);else if(o)e[t]=n;else{if(u=ln(n),0===n.length&&!i&&0===u.length)throw new Error("autoInject task functions require explicit parameters.");i||u.pop(),e[t]=u.concat(r)}}),Ve(e,t)}function pn(){this.head=this.tail=null,this.length=0}function hn(n,t){n.length=1,n.head=n.tail=t}function yn(n,t,e){function r(n,t,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");if(s.started=!0,Pt(n)||(n=[n]),0===n.length&&s.idle())return lt(function(){s.drain()});for(var r=0,u=n.length;r<u;r++){var i={data:n[r],callback:e||m};t?s._tasks.unshift(i):s._tasks.push(i)}f||(f=!0,lt(function(){f=!1,s.process()}))}function u(n){return function(t){o-=1;for(var e=0,r=n.length;e<r;e++){var u=n[e],i=J(c,u,0);0===i?c.shift():i>0&&c.splice(i,1),u.callback.apply(u,arguments),null!=t&&s.error(t,u.data)}o<=s.concurrency-s.buffer&&s.unsaturated(),s.idle()&&s.drain(),s.process()}}if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var i=a(n),o=0,c=[],f=!1,l=!1,s={_tasks:new pn,concurrency:t,payload:e,saturated:m,unsaturated:m,buffer:t/4,empty:m,drain:m,error:m,started:!1,paused:!1,push:function(n,t){r(n,!1,t)},kill:function(){s.drain=m,s._tasks.empty()},unshift:function(n,t){r(n,!0,t)},remove:function(n){s._tasks.remove(n)},process:function(){if(!l){for(l=!0;!s.paused&&o<s.concurrency&&s._tasks.length;){var n=[],t=[],e=s._tasks.length;s.payload&&(e=Math.min(e,s.payload));for(var r=0;r<e;r++){var f=s._tasks.shift();n.push(f),c.push(f),t.push(f.data)}o+=1,0===s._tasks.length&&s.empty(),o===s.concurrency&&s.saturated();var a=U(u(n));i(t,a)}l=!1}},length:function(){return s._tasks.length},running:function(){return o},workersList:function(){return c},idle:function(){return s._tasks.length+o===0},pause:function(){s.paused=!0},resume:function(){s.paused!==!1&&(s.paused=!1,lt(s.process))}};return s}function vn(n,t){return yn(n,1,t)}function dn(n,t,e,r){r=g(r||m);var u=a(e);Or(n,function(n,e,r){u(t,n,function(n,e){t=e,r(n)})},function(n){r(n,t)})}function mn(){var n=K(arguments,a);return function(){var e=t(arguments),r=this,u=e[e.length-1];"function"==typeof u?e.pop():u=m,dn(n,e,function(n,e,u){e.apply(r,n.concat(function(n){var e=t(arguments,1);u(n,e)}))},function(n,t){u.apply(r,[n].concat(t))})}}function gn(n){return n}function bn(n,t){return function(e,r,u,i){i=i||m;var o,c=!1;e(r,function(e,r,i){u(e,function(r,u){r?i(r):n(u)&&!o?(c=!0,o=t(!0,e),i(null,_t)):i()})},function(n){n?i(n):i(null,c?o:t(!1))})}}function jn(n,t){return t}function Sn(n){return function(e){var r=t(arguments,1);r.push(function(e){var r=t(arguments,1);"object"==typeof console&&(e?console.error&&console.error(e):console[n]&&$(r,function(t){console[n](t)}))}),a(e).apply(null,r)}}function kn(n,e,r){function u(n){if(n)return r(n);var e=t(arguments,1);e.push(i),c.apply(this,e)}function i(n,t){return n?r(n):t?void o(u):r(null)}r=U(r||m);var o=a(n),c=a(e);i(null,!0)}function Ln(n,e,r){r=U(r||m);var u=a(n),i=function(n){if(n)return r(n);var o=t(arguments,1);return e.apply(this,o)?u(i):void r.apply(null,[null].concat(o))};u(i)}function On(n,t,e){Ln(n,function(){return!t.apply(this,arguments)},e)}function wn(n,t,e){function r(n){return n?e(n):void o(u)}function u(n,t){return n?e(n):t?void i(r):e(null)}e=U(e||m);var i=a(t),o=a(n);o(u)}function xn(n){return function(t,e,r){return n(t,r)}}function En(n,t,e){Fe(n,xn(a(t)),e)}function An(n,t,e,r){q(t)(n,xn(a(e)),r)}function Tn(n){return f(n)?n:ct(function(t,e){var r=!0;t.push(function(){var n=arguments;r?lt(function(){e.apply(null,n)}):e.apply(null,n)}),n.apply(this,t),r=!1})}function _n(n){return!n}function Bn(n){return function(t){return null==t?void 0:t[n]}}function Fn(n,t,e,r){var u=new Array(t.length);n(t,function(n,t,r){e(n,function(n,e){u[t]=!!e,r(n)})},function(n){if(n)return r(n);for(var e=[],i=0;i<t.length;i++)u[i]&&e.push(t[i]);r(null,e)})}function In(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(e,i){e?r(e):(i&&u.push({index:t,value:n}),r())})},function(n){n?r(n):r(null,K(u.sort(function(n,t){return n.index-t.index}),Bn("value")))})}function Mn(n,t,e,r){var u=d(t)?Fn:In;u(n,t,a(e),r||m)}function Un(n,t){function e(n){return n?r(n):void u(e)}var r=U(t||m),u=a(Tn(n));e()}function qn(n,t,e,r){r=g(r||m);var u={},i=a(e);z(n,t,function(n,t,e){i(n,t,function(n,r){return n?e(n):(u[t]=r,void e())})},function(n){r(n,u)})}function zn(n,t){return t in n}function Pn(n,e){var r=Object.create(null),u=Object.create(null);e=e||gn;var i=a(n),o=ct(function(n,o){var c=e.apply(null,n);zn(r,c)?lt(function(){o.apply(null,r[c])}):zn(u,c)?u[c].push(o):(u[c]=[o],i.apply(null,n.concat(function(){var n=t(arguments);r[c]=n;var e=u[c];delete u[c];for(var i=0,o=e.length;i<o;i++)e[i].apply(null,n)})))});return o.memo=r,o.unmemoized=n,o}function Vn(n,e,r){r=r||m;var u=d(e)?[]:{};n(e,function(n,e,r){a(n)(function(n,i){arguments.length>2&&(i=t(arguments,1)),u[e]=i,r(n)})},function(n){r(n,u)})}function Dn(n,t){Vn(Fe,n,t)}function Rn(n,t,e){Vn(q(t),n,e)}function Cn(n,t){if(t=g(t||m),!Pt(n))return t(new TypeError("First argument to race must be an array of functions"));if(!n.length)return t();for(var e=0,r=n.length;e<r;e++)a(n[e])(t)}function $n(n,e,r,u){var i=t(n).reverse();dn(i,e,r,u)}function Wn(n){var e=a(n);return ct(function(n,r){return n.push(function(n,e){if(n)r(null,{error:n});else{var u;u=arguments.length<=2?e:t(arguments,1),r(null,{value:u})}}),e.apply(this,n)})}function Nn(n){var t;return Pt(n)?t=K(n,Wn):(t={},N(n,function(n,e){t[e]=Wn.call(this,n)})),t}function Qn(n,t,e,r){Mn(n,t,function(n,t){e(n,function(n,e){t(n,!e)})},r)}function Gn(n){return function(){return n}}function Hn(n,t,e){function r(n,t){if("object"==typeof t)n.times=+t.times||i,n.intervalFunc="function"==typeof t.interval?t.interval:Gn(+t.interval||o),n.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");n.times=+t||i}}function u(){f(function(n){n&&l++<c.times&&("function"!=typeof c.errorFilter||c.errorFilter(n))?setTimeout(u,c.intervalFunc(l)):e.apply(null,arguments)})}var i=5,o=0,c={times:i,intervalFunc:Gn(o)};if(arguments.length<3&&"function"==typeof n?(e=t||m,t=n):(r(c,n),e=e||m),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var f=a(t),l=1;u()}function Jn(n,t){Vn(Or,n,t)}function Kn(n,t,e){function r(n,t){var e=n.criteria,r=t.criteria;return e<r?-1:e>r?1:0}var u=a(t);Ie(n,function(n,t){u(n,function(e,r){return e?t(e):void t(null,{value:n,criteria:r})})},function(n,t){return n?e(n):void e(null,K(t.sort(r),Bn("value")))})}function Xn(n,t,e){var r=a(n);return ct(function(u,i){function o(){var t=n.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",e&&(r.info=e),f=!0,i(r)}var c,f=!1;u.push(function(){f||(i.apply(null,arguments),clearTimeout(c))}),c=setTimeout(o,t),r.apply(null,u)})}function Yn(n,t,e,r){for(var u=-1,i=iu(uu((t-n)/(e||1)),0),o=Array(i);i--;)o[r?i:++u]=n,n+=e;return o}function Zn(n,t,e,r){var u=a(e);Ue(Yn(0,n,1),t,u,r)}function nt(n,t,e,r){arguments.length<=3&&(r=e,e=t,t=Pt(n)?[]:{}),r=g(r||m);var u=a(e);Fe(n,function(n,e,r){u(t,n,e,r)},function(n){r(n,t)})}function tt(n,e){var r,u=null;e=e||m,Ur(n,function(n,e){a(n)(function(n,i){r=arguments.length>2?t(arguments,1):i,u=n,e(!n)})},function(){e(u,r)})}function et(n){return function(){return(n.unmemoized||n).apply(null,arguments)}}function rt(n,e,r){r=U(r||m);var u=a(e);if(!n())return r(null);var i=function(e){if(e)return r(e);if(n())return u(i);var o=t(arguments,1);r.apply(null,[null].concat(o))};u(i)}function ut(n,t,e){rt(function(){return!n.apply(this,arguments)},t,e)}var it,ot=function(n){var e=t(arguments,1);return function(){var r=t(arguments);return n.apply(null,e.concat(r))}},ct=function(n){return function(){var e=t(arguments),r=e.pop();n.call(this,e,r)}},ft="function"==typeof setImmediate&&setImmediate,at="object"==typeof process&&"function"==typeof process.nextTick;it=ft?setImmediate:at?process.nextTick:r;var lt=u(it),st="function"==typeof Symbol,pt="object"==typeof global&&global&&global.Object===Object&&global,ht="object"==typeof self&&self&&self.Object===Object&&self,yt=pt||ht||Function("return this")(),vt=yt.Symbol,dt=Object.prototype,mt=dt.hasOwnProperty,gt=dt.toString,bt=vt?vt.toStringTag:void 0,jt=Object.prototype,St=jt.toString,kt="[object Null]",Lt="[object Undefined]",Ot=vt?vt.toStringTag:void 0,wt="[object AsyncFunction]",xt="[object Function]",Et="[object GeneratorFunction]",At="[object Proxy]",Tt=9007199254740991,_t={},Bt="function"==typeof Symbol&&Symbol.iterator,Ft=function(n){return Bt&&n[Bt]&&n[Bt]()},It="[object Arguments]",Mt=Object.prototype,Ut=Mt.hasOwnProperty,qt=Mt.propertyIsEnumerable,zt=S(function(){return arguments}())?S:function(n){return j(n)&&Ut.call(n,"callee")&&!qt.call(n,"callee")},Pt=Array.isArray,Vt="object"==typeof n&&n&&!n.nodeType&&n,Dt=Vt&&"object"==typeof module&&module&&!module.nodeType&&module,Rt=Dt&&Dt.exports===Vt,Ct=Rt?yt.Buffer:void 0,$t=Ct?Ct.isBuffer:void 0,Wt=$t||k,Nt=9007199254740991,Qt=/^(?:0|[1-9]\d*)$/,Gt="[object Arguments]",Ht="[object Array]",Jt="[object Boolean]",Kt="[object Date]",Xt="[object Error]",Yt="[object Function]",Zt="[object Map]",ne="[object Number]",te="[object Object]",ee="[object RegExp]",re="[object Set]",ue="[object String]",ie="[object WeakMap]",oe="[object ArrayBuffer]",ce="[object DataView]",fe="[object Float32Array]",ae="[object Float64Array]",le="[object Int8Array]",se="[object Int16Array]",pe="[object Int32Array]",he="[object Uint8Array]",ye="[object Uint8ClampedArray]",ve="[object Uint16Array]",de="[object Uint32Array]",me={};me[fe]=me[ae]=me[le]=me[se]=me[pe]=me[he]=me[ye]=me[ve]=me[de]=!0,me[Gt]=me[Ht]=me[oe]=me[Jt]=me[ce]=me[Kt]=me[Xt]=me[Yt]=me[Zt]=me[ne]=me[te]=me[ee]=me[re]=me[ue]=me[ie]=!1;var ge="object"==typeof n&&n&&!n.nodeType&&n,be=ge&&"object"==typeof module&&module&&!module.nodeType&&module,je=be&&be.exports===ge,Se=je&&pt.process,ke=function(){try{var n=be&&be.require&&be.require("util").types;return n?n:Se&&Se.binding&&Se.binding("util")}catch(n){}}(),Le=ke&&ke.isTypedArray,Oe=Le?w(Le):O,we=Object.prototype,xe=we.hasOwnProperty,Ee=Object.prototype,Ae=A(Object.keys,Object),Te=Object.prototype,_e=Te.hasOwnProperty,Be=P(z,1/0),Fe=function(n,t,e){var r=d(n)?V:Be;r(n,a(t),e)},Ie=D(R),Me=l(Ie),Ue=C(R),qe=P(Ue,1),ze=l(qe),Pe=W(),Ve=function(n,e,r){function u(n,t){j.push(function(){f(n,t)})}function i(){if(0===j.length&&0===v)return r(null,y);for(;j.length&&v<e;){var n=j.shift();n()}}function o(n,t){var e=b[n];e||(e=b[n]=[]),e.push(t)}function c(n){var t=b[n]||[];$(t,function(n){n()}),i()}function f(n,e){if(!d){var u=U(function(e,u){if(v--,arguments.length>2&&(u=t(arguments,1)),e){var i={};N(y,function(n,t){i[t]=n}),i[n]=u,d=!0,b=Object.create(null),r(e,i)}else y[n]=u,c(n)});v++;var i=a(e[e.length-1]);e.length>1?i(y,u):i(u)}}function l(){for(var n,t=0;S.length;)n=S.pop(),t++,$(s(n),function(n){0===--k[n]&&S.push(n)});if(t!==h)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function s(t){var e=[];return N(n,function(n,r){Pt(n)&&J(n,t,0)>=0&&e.push(r)}),e}"function"==typeof e&&(r=e,e=null),r=g(r||m);var p=_(n),h=p.length;if(!h)return r(null);e||(e=h);var y={},v=0,d=!1,b=Object.create(null),j=[],S=[],k={};N(n,function(t,e){if(!Pt(t))return u(e,[t]),void S.push(e);var r=t.slice(0,t.length-1),i=r.length;return 0===i?(u(e,t),void S.push(e)):(k[e]=i,void $(r,function(c){if(!n[c])throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+c+"` in "+r.join(", "));o(c,function(){i--,0===i&&u(e,t)})}))}),l(),i()},De="[object Symbol]",Re=1/0,Ce=vt?vt.prototype:void 0,$e=Ce?Ce.toString:void 0,We="\\ud800-\\udfff",Ne="\\u0300-\\u036f",Qe="\\ufe20-\\ufe2f",Ge="\\u20d0-\\u20ff",He=Ne+Qe+Ge,Je="\\ufe0e\\ufe0f",Ke="\\u200d",Xe=RegExp("["+Ke+We+He+Je+"]"),Ye="\\ud800-\\udfff",Ze="\\u0300-\\u036f",nr="\\ufe20-\\ufe2f",tr="\\u20d0-\\u20ff",er=Ze+nr+tr,rr="\\ufe0e\\ufe0f",ur="["+Ye+"]",ir="["+er+"]",or="\\ud83c[\\udffb-\\udfff]",cr="(?:"+ir+"|"+or+")",fr="[^"+Ye+"]",ar="(?:\\ud83c[\\udde6-\\uddff]){2}",lr="[\\ud800-\\udbff][\\udc00-\\udfff]",sr="\\u200d",pr=cr+"?",hr="["+rr+"]?",yr="(?:"+sr+"(?:"+[fr,ar,lr].join("|")+")"+hr+pr+")*",vr=hr+pr+yr,dr="(?:"+[fr+ir+"?",ir,ar,lr,ur].join("|")+")",mr=RegExp(or+"(?="+or+")|"+dr+vr,"g"),gr=/^\s+|\s+$/g,br=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,jr=/,/,Sr=/(=.+)?(\s*)$/,kr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;pn.prototype.removeLink=function(n){return n.prev?n.prev.next=n.next:this.head=n.next,n.next?n.next.prev=n.prev:this.tail=n.prev,n.prev=n.next=null,this.length-=1,n},pn.prototype.empty=function(){for(;this.head;)this.shift();return this},pn.prototype.insertAfter=function(n,t){t.prev=n,t.next=n.next,n.next?n.next.prev=t:this.tail=t,n.next=t,this.length+=1},pn.prototype.insertBefore=function(n,t){t.prev=n.prev,t.next=n,n.prev?n.prev.next=t:this.head=t,n.prev=t,this.length+=1},pn.prototype.unshift=function(n){this.head?this.insertBefore(this.head,n):hn(this,n)},pn.prototype.push=function(n){this.tail?this.insertAfter(this.tail,n):hn(this,n)},pn.prototype.shift=function(){return this.head&&this.removeLink(this.head)},pn.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},pn.prototype.toArray=function(){for(var n=Array(this.length),t=this.head,e=0;e<this.length;e++)n[e]=t.data,t=t.next;return n},pn.prototype.remove=function(n){for(var t=this.head;t;){var e=t.next;n(t)&&this.removeLink(t),t=e}return this};var Lr,Or=P(z,1),wr=function(){return mn.apply(null,t(arguments).reverse())},xr=Array.prototype.concat,Er=function(n,e,r,u){u=u||m;var i=a(r);Ue(n,e,function(n,e){i(n,function(n){return n?e(n):e(null,t(arguments,1))})},function(n,t){for(var e=[],r=0;r<t.length;r++)t[r]&&(e=xr.apply(e,t[r]));return u(n,e)})},Ar=P(Er,1/0),Tr=P(Er,1),_r=function(){var n=t(arguments),e=[null].concat(n);return function(){var n=arguments[arguments.length-1];return n.apply(this,e)}},Br=D(bn(gn,jn)),Fr=C(bn(gn,jn)),Ir=P(Fr,1),Mr=Sn("dir"),Ur=P(An,1),qr=D(bn(_n,_n)),zr=C(bn(_n,_n)),Pr=P(zr,1),Vr=D(Mn),Dr=C(Mn),Rr=P(Dr,1),Cr=function(n,t,e,r){r=r||m;var u=a(e);Ue(n,t,function(n,t){u(n,function(e,r){return e?t(e):t(null,{key:r,val:n})})},function(n,t){for(var e={},u=Object.prototype.hasOwnProperty,i=0;i<t.length;i++)if(t[i]){var o=t[i].key,c=t[i].val;u.call(e,o)?e[o].push(c):e[o]=[c]}return r(n,e)})},$r=P(Cr,1/0),Wr=P(Cr,1),Nr=Sn("log"),Qr=P(qn,1/0),Gr=P(qn,1);Lr=at?process.nextTick:ft?setImmediate:r;var Hr=u(Lr),Jr=function(n,t){var e=a(n);return yn(function(n,t){e(n[0],t)},t,1)},Kr=function(n,t){var e=Jr(n,t);return e.push=function(n,t,r){if(null==r&&(r=m),"function"!=typeof r)throw new Error("task callback must be a function");if(e.started=!0,Pt(n)||(n=[n]),0===n.length)return lt(function(){e.drain()});t=t||0;for(var u=e._tasks.head;u&&t>=u.priority;)u=u.next;for(var i=0,o=n.length;i<o;i++){var c={data:n[i],priority:t,callback:r};u?e._tasks.insertBefore(u,c):e._tasks.push(c)}lt(e.process)},delete e.unshift,e},Xr=D(Qn),Yr=C(Qn),Zr=P(Yr,1),nu=function(n,t){t||(t=n,n=null);var e=a(t);return ct(function(t,r){function u(n){e.apply(null,t.concat(n))}n?Hn(n,u,r):Hn(u,r)})},tu=D(bn(Boolean,gn)),eu=C(bn(Boolean,gn)),ru=P(eu,1),uu=Math.ceil,iu=Math.max,ou=P(Zn,1/0),cu=P(Zn,1),fu=function(n,e){function r(t){var e=a(n[i++]);t.push(U(u)),e.apply(null,t)}function u(u){return u||i===n.length?e.apply(null,arguments):void r(t(arguments,1))}if(e=g(e||m),!Pt(n))return e(new Error("First argument to waterfall must be an array of functions"));if(!n.length)return e();var i=0;r([])},au={apply:ot,applyEach:Me,applyEachSeries:ze,asyncify:i,auto:Ve,autoInject:sn,cargo:vn,compose:wr,concat:Ar,concatLimit:Er,concatSeries:Tr,constant:_r,detect:Br,detectLimit:Fr,detectSeries:Ir,dir:Mr,doDuring:kn,doUntil:On,doWhilst:Ln,during:wn,each:En,eachLimit:An,eachOf:Fe,eachOfLimit:z,eachOfSeries:Or,eachSeries:Ur,ensureAsync:Tn,every:qr,everyLimit:zr,everySeries:Pr,filter:Vr,filterLimit:Dr,filterSeries:Rr,forever:Un,groupBy:$r,groupByLimit:Cr,groupBySeries:Wr,log:Nr,map:Ie,mapLimit:Ue,mapSeries:qe,mapValues:Qr,mapValuesLimit:qn,mapValuesSeries:Gr,memoize:Pn,nextTick:Hr,parallel:Dn,parallelLimit:Rn,priorityQueue:Kr,queue:Jr,race:Cn,reduce:dn,reduceRight:$n,reflect:Wn,reflectAll:Nn,reject:Xr,rejectLimit:Yr,rejectSeries:Zr,retry:Hn,retryable:nu,seq:mn,series:Jn,setImmediate:lt,some:tu,someLimit:eu,someSeries:ru,sortBy:Kn,timeout:Xn,times:ou,timesLimit:Zn,timesSeries:cu,transform:nt,tryEach:tt,unmemoize:et,until:ut,waterfall:fu,whilst:rt,all:qr,allLimit:zr,allSeries:Pr,any:tu,anyLimit:eu,anySeries:ru,find:Br,findLimit:Fr,findSeries:Ir,forEach:En,forEachSeries:Ur,forEachLimit:An,forEachOf:Fe,forEachOfSeries:Or,forEachOfLimit:z,inject:dn,foldl:dn,foldr:$n,select:Vr,selectLimit:Dr,selectSeries:Rr,wrapSync:i};n.default=au,n.apply=ot,n.applyEach=Me,n.applyEachSeries=ze,n.asyncify=i,n.auto=Ve,n.autoInject=sn,n.cargo=vn,n.compose=wr,n.concat=Ar,n.concatLimit=Er,n.concatSeries=Tr,n.constant=_r,n.detect=Br,n.detectLimit=Fr,n.detectSeries=Ir,n.dir=Mr,n.doDuring=kn,n.doUntil=On,n.doWhilst=Ln,n.during=wn,n.each=En,n.eachLimit=An,n.eachOf=Fe,n.eachOfLimit=z,n.eachOfSeries=Or,n.eachSeries=Ur,n.ensureAsync=Tn,n.every=qr,n.everyLimit=zr,n.everySeries=Pr,n.filter=Vr,n.filterLimit=Dr,n.filterSeries=Rr,n.forever=Un,n.groupBy=$r,n.groupByLimit=Cr,n.groupBySeries=Wr,n.log=Nr,n.map=Ie,n.mapLimit=Ue,n.mapSeries=qe,n.mapValues=Qr,n.mapValuesLimit=qn,n.mapValuesSeries=Gr,n.memoize=Pn,n.nextTick=Hr,n.parallel=Dn,n.parallelLimit=Rn,n.priorityQueue=Kr,n.queue=Jr,n.race=Cn,n.reduce=dn,n.reduceRight=$n,n.reflect=Wn,n.reflectAll=Nn,n.reject=Xr,n.rejectLimit=Yr,n.rejectSeries=Zr,n.retry=Hn,n.retryable=nu,n.seq=mn,n.series=Jn,n.setImmediate=lt,n.some=tu,n.someLimit=eu,n.someSeries=ru,n.sortBy=Kn,n.timeout=Xn,n.times=ou,n.timesLimit=Zn,n.timesSeries=cu,n.transform=nt,n.tryEach=tt,n.unmemoize=et,n.until=ut,n.waterfall=fu,n.whilst=rt,n.all=qr,n.allLimit=zr,n.allSeries=Pr,n.any=tu,n.anyLimit=eu,n.anySeries=ru,n.find=Br,n.findLimit=Fr,n.findSeries=Ir,n.forEach=En,n.forEachSeries=Ur,n.forEachLimit=An,n.forEachOf=Fe,n.forEachOfSeries=Or,n.forEachOfLimit=z,n.inject=dn,n.foldl=dn,n.foldr=$n,n.select=Vr,n.selectLimit=Dr,n.selectSeries=Rr,n.wrapSync=i,Object.defineProperty(n,"__esModule",{value:!0})}); -//# sourceMappingURL=async.min.map \ No newline at end of file diff --git a/node_modules/async/dist/async.min.map b/node_modules/async/dist/async.min.map deleted file mode 100644 index be27ab6..0000000 --- a/node_modules/async/dist/async.min.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["build/dist/async.js"],"names":["global","factory","exports","module","define","amd","async","this","slice","arrayLike","start","newLen","Math","max","length","newArr","Array","idx","isObject","value","type","fallback","fn","setTimeout","wrap","defer","args","arguments","apply","asyncify","func","initialParams","callback","result","e","then","invokeCallback","err","message","Error","error","setImmediate$1","rethrow","isAsync","supportsSymbol","Symbol","toStringTag","wrapAsync","asyncFn","applyEach$1","eachfn","fns","go","that","cb","concat","getRawTag","isOwn","hasOwnProperty","call","symToStringTag$1","tag","undefined","unmasked","nativeObjectToString","objectToString","nativeObjectToString$1","baseGetTag","undefinedTag","nullTag","symToStringTag","Object","isFunction","funcTag","genTag","asyncTag","proxyTag","isLength","MAX_SAFE_INTEGER","isArrayLike","noop","once","callFn","baseTimes","n","iteratee","index","isObjectLike","baseIsArguments","argsTag","stubFalse","isIndex","MAX_SAFE_INTEGER$1","reIsUint","test","baseIsTypedArray","typedArrayTags","baseUnary","arrayLikeKeys","inherited","isArr","isArray","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","String","key","hasOwnProperty$1","push","isPrototype","Ctor","constructor","proto","prototype","objectProto$5","overArg","transform","arg","baseKeys","object","nativeKeys","hasOwnProperty$3","keys","createArrayIterator","coll","i","len","createES2015Iterator","iterator","item","next","done","createObjectIterator","obj","okeys","getIterator","onlyOnce","_eachOfLimit","limit","iterateeCallback","running","breakLoop","looping","replenish","elem","nextElem","eachOfLimit","doLimit","iterable","eachOfArrayLike","iteratorCallback","completed","doParallel","eachOf","_asyncMap","arr","results","counter","_iteratee","_","v","doParallelLimit","arrayEach","array","createBaseFor","fromRight","keysFunc","props","baseForOwn","baseFor","baseFindIndex","predicate","fromIndex","baseIsNaN","strictIndexOf","baseIndexOf","arrayMap","isSymbol","symbolTag","baseToString","symbolToString","INFINITY","baseSlice","end","castSlice","charsEndIndex","strSymbols","chrSymbols","charsStartIndex","asciiToArray","string","split","hasUnicode","reHasUnicode","unicodeToArray","match","reUnicode","stringToArray","toString","trim","chars","guard","replace","reTrim","join","parseParams","STRIP_COMMENTS","FN_ARGS","FN_ARG_SPLIT","map","FN_ARG","autoInject","tasks","newTasks","taskFn","newTask","taskCb","newArgs","params","name","fnIsAsync","hasNoDeps","pop","auto","DLL","head","tail","setInitial","dll","node","queue","worker","concurrency","payload","_insert","data","insertAtFront","q","started","idle","drain","l","_tasks","unshift","processingScheduled","process","_next","numRunning","task","workersList","shift","splice","buffer","unsaturated","_worker","isProcessing","saturated","empty","paused","kill","remove","testFn","min","pause","resume","cargo","reduce","memo","eachOfSeries","x","seq","_functions","newargs","nextargs","identity","_createTester","check","getResult","testResult","testPassed","_findGetResult","consoleFunc","console","doDuring","_test","truth","_fn","doWhilst","doUntil","during","_withoutIndex","eachLimit","eachLimit$1","ensureAsync","sync","innerArgs","notId","baseProperty","filterArray","truthValues","filterGeneric","sort","a","b","_filter","filter","forever","errback","mapValuesLimit","newObj","val","has","memoize","hasher","create","queues","memoized","unmemoized","_parallel","parallelLimit","parallelLimit$1","race","TypeError","reduceRight","reversed","reverse","reflect","reflectCallback","cbArg","reflectAll","reject$1","constant$1","retry","opts","parseTimes","acc","t","times","DEFAULT_TIMES","intervalFunc","interval","DEFAULT_INTERVAL","errorFilter","retryAttempt","_task","attempt","options","series","sortBy","comparator","left","right","criteria","timeout","milliseconds","info","timeoutCallback","code","timedOut","timer","clearTimeout","baseRange","step","nativeMax","nativeCeil","timeLimit","count","mapLimit","accumulator","k","tryEach","eachSeries","res","unmemoize","whilst","until","_defer","callArgs","hasSetImmediate","setImmediate","hasNextTick","nextTick","freeGlobal","freeSelf","self","root","Function","Symbol$1","objectProto","objectProto$1","iteratorSymbol","objectProto$3","hasOwnProperty$2","propertyIsEnumerable","freeExports","nodeType","freeModule","moduleExports","Buffer","nativeIsBuffer","argsTag$1","arrayTag","boolTag","dateTag","errorTag","funcTag$1","mapTag","numberTag","objectTag","regexpTag","setTag","stringTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","freeExports$1","freeModule$1","moduleExports$1","freeProcess","nodeUtil","types","require","binding","nodeIsTypedArray","objectProto$2","objectProto$4","eachOfGeneric","Infinity","eachOfImplementation","applyEach","mapSeries","applyEachSeries","enqueueTask","readyTasks","runTask","processQueue","runningTasks","run","addListener","taskName","taskListeners","listeners","taskComplete","hasError","taskCallback","safeResults","rkey","checkForDeadlocks","currentTask","readyToCheck","getDependents","dependent","uncheckedDependencies","numTasks","keys$$1","dependencies","remainingDependencies","dependencyName","symbolProto","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsVarRange","rsZWJ","RegExp","rsAstralRange$1","rsComboMarksRange$1","reComboHalfMarksRange$1","rsComboSymbolsRange$1","rsComboRange$1","rsVarRange$1","rsAstral","rsCombo","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","rsZWJ$1","reOptMod","rsOptVar","rsOptJoin","rsSeq","rsSymbol","removeLink","prev","insertAfter","newNode","insertBefore","toArray","curr","_defer$1","compose","_concat","concatLimit","mapResults","concatSeries","constant","values","detect","detectLimit","detectSeries","dir","every","everyLimit","everySeries","filterLimit","filterSeries","groupByLimit","groupBy","groupBySeries","log","mapValues","mapValuesSeries","queue$1","items","priorityQueue","priority","nextNode","reject","rejectLimit","rejectSeries","retryable","some","Boolean","someLimit","someSeries","ceil","timesSeries","waterfall","nextTask","taskIndex","each","parallel","timesLimit","all","allLimit","allSeries","any","anyLimit","anySeries","find","findLimit","findSeries","forEach","forEachSeries","forEachLimit","forEachOf","forEachOfSeries","forEachOfLimit","inject","foldl","foldr","select","selectLimit","selectSeries","wrapSync","defineProperty"],"mappings":"CAAC,SAAUA,EAAQC,GACE,gBAAZC,UAA0C,mBAAXC,QAAyBF,EAAQC,SACrD,kBAAXE,SAAyBA,OAAOC,IAAMD,QAAQ,WAAYH,GAChEA,EAASD,EAAOM,MAAQN,EAAOM,YAChCC,KAAM,SAAWL,GAAW,YAE9B,SAASM,GAAMC,EAAWC,GACtBA,GAAc,CAGd,KAAI,GAFAC,GAASC,KAAKC,IAAIJ,EAAUK,OAASJ,EAAO,GAC5CK,EAASC,MAAML,GACXM,EAAM,EAAGA,EAAMN,EAAQM,IAC3BF,EAAOE,GAAOR,EAAUC,EAAQO,EAEpC,OAAOF,GAyFX,QAASG,GAASC,GAChB,GAAIC,SAAcD,EAClB,OAAgB,OAATA,IAA0B,UAARC,GAA4B,YAARA,GAM/C,QAASC,GAASC,GACdC,WAAWD,EAAI,GAGnB,QAASE,GAAKC,GACV,MAAO,UAAUH,GACb,GAAII,GAAOlB,EAAMmB,UAAW,EAC5BF,GAAM,WACFH,EAAGM,MAAM,KAAMF,MAyE3B,QAASG,GAASC,GACd,MAAOC,IAAc,SAAUL,EAAMM,GACjC,GAAIC,EACJ,KACIA,EAASH,EAAKF,MAAMrB,KAAMmB,GAC5B,MAAOQ,GACL,MAAOF,GAASE,GAGhBhB,EAASe,IAAkC,kBAAhBA,GAAOE,KAClCF,EAAOE,KAAK,SAAShB,GACjBiB,EAAeJ,EAAU,KAAMb,IAChC,SAASkB,GACRD,EAAeJ,EAAUK,EAAIC,QAAUD,EAAM,GAAIE,OAAMF,MAG3DL,EAAS,KAAMC,KAK3B,QAASG,GAAeJ,EAAUQ,EAAOrB,GACrC,IACIa,EAASQ,EAAOrB,GAClB,MAAOe,GACLO,GAAeC,EAASR,IAIhC,QAASQ,GAAQF,GACb,KAAMA,GAKV,QAASG,GAAQrB,GACb,MAAOsB,KAA6C,kBAA3BtB,EAAGuB,OAAOC,aAGvC,QAASC,GAAUC,GACf,MAAOL,GAAQK,GAAWnB,EAASmB,GAAWA,EAGlD,QAASC,GAAYC,GACjB,MAAO,UAASC,GACZ,GAAIzB,GAAOlB,EAAMmB,UAAW,GACxByB,EAAKrB,GAAc,SAASL,EAAMM,GAClC,GAAIqB,GAAO9C,IACX,OAAO2C,GAAOC,EAAK,SAAU7B,EAAIgC,GAC7BP,EAAUzB,GAAIM,MAAMyB,EAAM3B,EAAK6B,OAAOD,KACvCtB,IAEP,OAAIN,GAAKZ,OACEsC,EAAGxB,MAAMrB,KAAMmB,GAGf0B,GAwCnB,QAASI,GAAUrC,GACjB,GAAIsC,GAAQC,GAAeC,KAAKxC,EAAOyC,IACnCC,EAAM1C,EAAMyC,GAEhB,KACEzC,EAAMyC,IAAoBE,MAC1B,IAAIC,IAAW,EACf,MAAO7B,IAET,GAAID,GAAS+B,GAAqBL,KAAKxC,EAQvC,OAPI4C,KACEN,EACFtC,EAAMyC,IAAoBC,QAEnB1C,GAAMyC,KAGV3B,EAoBT,QAASgC,GAAe9C,GACtB,MAAO+C,IAAuBP,KAAKxC,GAiBrC,QAASgD,GAAWhD,GAClB,MAAa,OAATA,EACe2C,SAAV3C,EAAsBiD,GAAeC,GAEtCC,IAAkBA,KAAkBC,QAAOpD,GAC/CqC,EAAUrC,GACV8C,EAAe9C,GA0BrB,QAASqD,GAAWrD,GAClB,IAAKD,EAASC,GACZ,OAAO,CAIT,IAAI0C,GAAMM,EAAWhD,EACrB,OAAO0C,IAAOY,IAAWZ,GAAOa,IAAUb,GAAOc,IAAYd,GAAOe,GAgCtE,QAASC,GAAS1D,GAChB,MAAuB,gBAATA,IACZA,GAAQ,GAAMA,EAAQ,GAAK,GAAKA,GAAS2D,GA4B7C,QAASC,GAAY5D,GACnB,MAAgB,OAATA,GAAiB0D,EAAS1D,EAAML,UAAY0D,EAAWrD,GAmBhE,QAAS6D,MAIT,QAASC,GAAK3D,GACV,MAAO,YACH,GAAW,OAAPA,EAAJ,CACA,GAAI4D,GAAS5D,CACbA,GAAK,KACL4D,EAAOtD,MAAMrB,KAAMoB,aAmB3B,QAASwD,GAAUC,EAAGC,GAIpB,IAHA,GAAIC,IAAQ,EACRrD,EAASjB,MAAMoE,KAEVE,EAAQF,GACfnD,EAAOqD,GAASD,EAASC,EAE3B,OAAOrD,GA2BT,QAASsD,GAAapE,GACpB,MAAgB,OAATA,GAAiC,gBAATA,GAajC,QAASqE,GAAgBrE,GACvB,MAAOoE,GAAapE,IAAUgD,EAAWhD,IAAUsE,GAyErD,QAASC,KACP,OAAO,EAmDT,QAASC,GAAQxE,EAAOL,GACtB,GAAIM,SAAcD,EAGlB,OAFAL,GAAmB,MAAVA,EAAiB8E,GAAqB9E,IAEtCA,IACE,UAARM,GACU,UAARA,GAAoByE,GAASC,KAAK3E,KAChCA,GAAQ,GAAMA,EAAQ,GAAK,GAAKA,EAAQL,EAqDjD,QAASiF,GAAiB5E,GACxB,MAAOoE,GAAapE,IAClB0D,EAAS1D,EAAML,WAAakF,GAAe7B,EAAWhD,IAU1D,QAAS8E,GAAUnE,GACjB,MAAO,UAASX,GACd,MAAOW,GAAKX,IAmEhB,QAAS+E,GAAc/E,EAAOgF,GAC5B,GAAIC,GAAQC,GAAQlF,GAChBmF,GAASF,GAASG,GAAYpF,GAC9BqF,GAAUJ,IAAUE,GAASG,GAAStF,GACtCuF,GAAUN,IAAUE,IAAUE,GAAUG,GAAaxF,GACrDyF,EAAcR,GAASE,GAASE,GAAUE,EAC1CzE,EAAS2E,EAAczB,EAAUhE,EAAML,OAAQ+F,WAC/C/F,EAASmB,EAAOnB,MAEpB,KAAK,GAAIgG,KAAO3F,IACTgF,IAAaY,GAAiBpD,KAAKxC,EAAO2F,IACzCF,IAEQ,UAAPE,GAECN,IAAkB,UAAPM,GAA0B,UAAPA,IAE9BJ,IAAkB,UAAPI,GAA0B,cAAPA,GAA8B,cAAPA,IAEtDnB,EAAQmB,EAAKhG,KAElBmB,EAAO+E,KAAKF,EAGhB,OAAO7E,GAaT,QAASgF,GAAY9F,GACnB,GAAI+F,GAAO/F,GAASA,EAAMgG,YACtBC,EAAwB,kBAARF,IAAsBA,EAAKG,WAAcC,EAE7D,OAAOnG,KAAUiG,EAWnB,QAASG,GAAQzF,EAAM0F,GACrB,MAAO,UAASC,GACd,MAAO3F,GAAK0F,EAAUC,KAoB1B,QAASC,GAASC,GAChB,IAAKV,EAAYU,GACf,MAAOC,IAAWD,EAEpB,IAAI1F,KACJ,KAAK,GAAI6E,KAAOvC,QAAOoD,GACjBE,GAAiBlE,KAAKgE,EAAQb,IAAe,eAAPA,GACxC7E,EAAO+E,KAAKF,EAGhB,OAAO7E,GA+BT,QAAS6F,GAAKH,GACZ,MAAO5C,GAAY4C,GAAUzB,EAAcyB,GAAUD,EAASC,GAGhE,QAASI,GAAoBC,GACzB,GAAIC,IAAI,EACJC,EAAMF,EAAKlH,MACf,OAAO,YACH,QAASmH,EAAIC,GAAO/G,MAAO6G,EAAKC,GAAInB,IAAKmB,GAAK,MAItD,QAASE,GAAqBC,GAC1B,GAAIH,IAAI,CACR,OAAO,YACH,GAAII,GAAOD,EAASE,MACpB,OAAID,GAAKE,KACE,MACXN,KACQ9G,MAAOkH,EAAKlH,MAAO2F,IAAKmB,KAIxC,QAASO,GAAqBC,GAC1B,GAAIC,GAAQZ,EAAKW,GACbR,GAAI,EACJC,EAAMQ,EAAM5H,MAChB,OAAO,SAASwH,KACZ,GAAIxB,GAAM4B,IAAQT,EAClB,OAAY,cAARnB,EACOwB,IAEJL,EAAIC,GAAO/G,MAAOsH,EAAI3B,GAAMA,IAAKA,GAAO,MAIvD,QAASsB,GAASJ,GACd,GAAIjD,EAAYiD,GACZ,MAAOD,GAAoBC,EAG/B,IAAII,GAAWO,GAAYX,EAC3B,OAAOI,GAAWD,EAAqBC,GAAYI,EAAqBR,GAG5E,QAASY,GAAStH,GACd,MAAO,YACH,GAAW,OAAPA,EAAa,KAAM,IAAIiB,OAAM,+BACjC,IAAI2C,GAAS5D,CACbA,GAAK,KACL4D,EAAOtD,MAAMrB,KAAMoB,YAI3B,QAASkH,GAAaC,GAClB,MAAO,UAAUL,EAAKpD,EAAUrD,GAU5B,QAAS+G,GAAiB1G,EAAKlB,GAE3B,GADA6H,GAAW,EACP3G,EACAkG,GAAO,EACPvG,EAASK,OAER,CAAA,GAAIlB,IAAU8H,IAAcV,GAAQS,GAAW,EAEhD,MADAT,IAAO,EACAvG,EAAS,KAEVkH,IACNC,KAIR,QAASA,KAEL,IADAD,GAAU,EACHF,EAAUF,IAAUP,GAAM,CAC7B,GAAIa,GAAOC,GACX,IAAa,OAATD,EAKA,MAJAb,IAAO,OACHS,GAAW,GACXhH,EAAS,MAIjBgH,IAAW,EACX3D,EAAS+D,EAAKjI,MAAOiI,EAAKtC,IAAK8B,EAASG,IAE5CG,GAAU,EArCd,GADAlH,EAAWiD,EAAKjD,GAAYgD,GACxB8D,GAAS,IAAML,EACf,MAAOzG,GAAS,KAEpB,IAAIqH,GAAWjB,EAASK,GACpBF,GAAO,EACPS,EAAU,EACVE,GAAU,CAkCdC,MAwBR,QAASG,GAAYtB,EAAMc,EAAOzD,EAAUrD,GACxC6G,EAAaC,GAAOd,EAAMjF,EAAUsC,GAAWrD,GAGnD,QAASuH,GAAQjI,EAAIwH,GACjB,MAAO,UAAUU,EAAUnE,EAAUrD,GACjC,MAAOV,GAAGkI,EAAUV,EAAOzD,EAAUrD,IAK7C,QAASyH,GAAgBzB,EAAM3C,EAAUrD,GASrC,QAAS0H,GAAiBrH,EAAKlB,GACvBkB,EACAL,EAASK,KACCsH,IAAc7I,GAAWK,IAAU8H,IAC7CjH,EAAS,MAZjBA,EAAWiD,EAAKjD,GAAYgD,EAC5B,IAAIM,GAAQ,EACRqE,EAAY,EACZ7I,EAASkH,EAAKlH,MAalB,KAZe,IAAXA,GACAkB,EAAS,MAWNsD,EAAQxE,EAAQwE,IACnBD,EAAS2C,EAAK1C,GAAQA,EAAOsD,EAASc,IAmD9C,QAASE,GAAWtI,GAChB,MAAO,UAAUmH,EAAKpD,EAAUrD,GAC5B,MAAOV,GAAGuI,GAAQpB,EAAK1F,EAAUsC,GAAWrD,IAIpD,QAAS8H,GAAU5G,EAAQ6G,EAAK1E,EAAUrD,GACtCA,EAAWA,GAAYgD,EACvB+E,EAAMA,KACN,IAAIC,MACAC,EAAU,EACVC,EAAYnH,EAAUsC,EAE1BnC,GAAO6G,EAAK,SAAU5I,EAAOgJ,EAAGnI,GAC5B,GAAIsD,GAAQ2E,GACZC,GAAU/I,EAAO,SAAUkB,EAAK+H,GAC5BJ,EAAQ1E,GAAS8E,EACjBpI,EAASK,MAEd,SAAUA,GACTL,EAASK,EAAK2H,KA6EtB,QAASK,GAAgB/I,GACrB,MAAO,UAAUmH,EAAKK,EAAOzD,EAAUrD,GACnC,MAAOV,GAAGuH,EAAaC,GAAQL,EAAK1F,EAAUsC,GAAWrD,IA2EjE,QAASsI,GAAUC,EAAOlF,GAIxB,IAHA,GAAIC,IAAQ,EACRxE,EAAkB,MAATyJ,EAAgB,EAAIA,EAAMzJ,SAE9BwE,EAAQxE,GACXuE,EAASkF,EAAMjF,GAAQA,EAAOiF,MAAW,IAI/C,MAAOA,GAUT,QAASC,GAAcC,GACrB,MAAO,UAAS9C,EAAQtC,EAAUqF,GAMhC,IALA,GAAIpF,IAAQ,EACRkE,EAAWjF,OAAOoD,GAClBgD,EAAQD,EAAS/C,GACjB7G,EAAS6J,EAAM7J,OAEZA,KAAU,CACf,GAAIgG,GAAM6D,EAAMF,EAAY3J,IAAWwE,EACvC,IAAID,EAASmE,EAAS1C,GAAMA,EAAK0C,MAAc,EAC7C,MAGJ,MAAO7B,IAyBX,QAASiD,GAAWjD,EAAQtC,GAC1B,MAAOsC,IAAUkD,GAAQlD,EAAQtC,EAAUyC,GAc7C,QAASgD,GAAcP,EAAOQ,EAAWC,EAAWP,GAIlD,IAHA,GAAI3J,GAASyJ,EAAMzJ,OACfwE,EAAQ0F,GAAaP,EAAY,GAAI,GAEjCA,EAAYnF,MAAYA,EAAQxE,GACtC,GAAIiK,EAAUR,EAAMjF,GAAQA,EAAOiF,GACjC,MAAOjF,EAGX,QAAO,EAUT,QAAS2F,GAAU9J,GACjB,MAAOA,KAAUA,EAanB,QAAS+J,GAAcX,EAAOpJ,EAAO6J,GAInC,IAHA,GAAI1F,GAAQ0F,EAAY,EACpBlK,EAASyJ,EAAMzJ,SAEVwE,EAAQxE,GACf,GAAIyJ,EAAMjF,KAAWnE,EACnB,MAAOmE,EAGX,QAAO,EAYT,QAAS6F,GAAYZ,EAAOpJ,EAAO6J,GACjC,MAAO7J,KAAUA,EACb+J,EAAcX,EAAOpJ,EAAO6J,GAC5BF,EAAcP,EAAOU,EAAWD,GAkQtC,QAASI,GAASb,EAAOlF,GAKvB,IAJA,GAAIC,IAAQ,EACRxE,EAAkB,MAATyJ,EAAgB,EAAIA,EAAMzJ,OACnCmB,EAASjB,MAAMF,KAEVwE,EAAQxE,GACfmB,EAAOqD,GAASD,EAASkF,EAAMjF,GAAQA,EAAOiF,EAEhD,OAAOtI,GAuBT,QAASoJ,GAASlK,GAChB,MAAuB,gBAATA,IACXoE,EAAapE,IAAUgD,EAAWhD,IAAUmK,GAkBjD,QAASC,GAAapK,GAEpB,GAAoB,gBAATA,GACT,MAAOA,EAET,IAAIkF,GAAQlF,GAEV,MAAOiK,GAASjK,EAAOoK,GAAgB,EAEzC,IAAIF,EAASlK,GACX,MAAOqK,IAAiBA,GAAe7H,KAAKxC,GAAS,EAEvD,IAAIc,GAAUd,EAAQ,EACtB,OAAkB,KAAVc,GAAkB,EAAId,IAAWsK,GAAY,KAAOxJ,EAY9D,QAASyJ,GAAUnB,EAAO7J,EAAOiL,GAC/B,GAAIrG,IAAQ,EACRxE,EAASyJ,EAAMzJ,MAEfJ,GAAQ,IACVA,GAASA,EAAQI,EAAS,EAAKA,EAASJ,GAE1CiL,EAAMA,EAAM7K,EAASA,EAAS6K,EAC1BA,EAAM,IACRA,GAAO7K,GAETA,EAASJ,EAAQiL,EAAM,EAAMA,EAAMjL,IAAW,EAC9CA,KAAW,CAGX,KADA,GAAIuB,GAASjB,MAAMF,KACVwE,EAAQxE,GACfmB,EAAOqD,GAASiF,EAAMjF,EAAQ5E,EAEhC,OAAOuB,GAYT,QAAS2J,IAAUrB,EAAO7J,EAAOiL,GAC/B,GAAI7K,GAASyJ,EAAMzJ,MAEnB,OADA6K,GAAc7H,SAAR6H,EAAoB7K,EAAS6K,GAC1BjL,GAASiL,GAAO7K,EAAUyJ,EAAQmB,EAAUnB,EAAO7J,EAAOiL,GAYrE,QAASE,IAAcC,EAAYC,GAGjC,IAFA,GAAIzG,GAAQwG,EAAWhL,OAEhBwE,KAAW6F,EAAYY,EAAYD,EAAWxG,GAAQ,IAAK,IAClE,MAAOA,GAYT,QAAS0G,IAAgBF,EAAYC,GAInC,IAHA,GAAIzG,IAAQ,EACRxE,EAASgL,EAAWhL,SAEfwE,EAAQxE,GAAUqK,EAAYY,EAAYD,EAAWxG,GAAQ,IAAK,IAC3E,MAAOA,GAUT,QAAS2G,IAAaC,GACpB,MAAOA,GAAOC,MAAM,IAwBtB,QAASC,IAAWF,GAClB,MAAOG,IAAavG,KAAKoG,GAsC3B,QAASI,IAAeJ,GACtB,MAAOA,GAAOK,MAAMC,QAUtB,QAASC,IAAcP,GACrB,MAAOE,IAAWF,GACdI,GAAeJ,GACfD,GAAaC,GAwBnB,QAASQ,IAASvL,GAChB,MAAgB,OAATA,EAAgB,GAAKoK,EAAapK,GA4B3C,QAASwL,IAAKT,EAAQU,EAAOC,GAE3B,GADAX,EAASQ,GAASR,GACdA,IAAWW,GAAmB/I,SAAV8I,GACtB,MAAOV,GAAOY,QAAQC,GAAQ,GAEhC,KAAKb,KAAYU,EAAQrB,EAAaqB,IACpC,MAAOV,EAET,IAAIJ,GAAaW,GAAcP,GAC3BH,EAAaU,GAAcG,GAC3BlM,EAAQsL,GAAgBF,EAAYC,GACpCJ,EAAME,GAAcC,EAAYC,GAAc,CAElD,OAAOH,IAAUE,EAAYpL,EAAOiL,GAAKqB,KAAK,IAQhD,QAASC,IAAYnL,GAOjB,MANAA,GAAOA,EAAK4K,WAAWI,QAAQI,GAAgB,IAC/CpL,EAAOA,EAAKyK,MAAMY,IAAS,GAAGL,QAAQ,IAAK,IAC3ChL,EAAOA,EAAOA,EAAKqK,MAAMiB,OACzBtL,EAAOA,EAAKuL,IAAI,SAAU5F,GACtB,MAAOkF,IAAKlF,EAAIqF,QAAQQ,GAAQ,OAuFxC,QAASC,IAAWC,EAAOxL,GACvB,GAAIyL,KAEJ7C,GAAW4C,EAAO,SAAUE,EAAQ5G,GA2BhC,QAAS6G,GAAQ3D,EAAS4D,GACtB,GAAIC,GAAUzC,EAAS0C,EAAQ,SAAUC,GACrC,MAAO/D,GAAQ+D,IAEnBF,GAAQ7G,KAAK4G,GACb7K,EAAU2K,GAAQ9L,MAAM,KAAMiM,GA/BlC,GAAIC,GACAE,EAAYrL,EAAQ+K,GACpBO,GACED,GAA+B,IAAlBN,EAAO5M,QACrBkN,GAA+B,IAAlBN,EAAO5M,MAEzB,IAAIuF,GAAQqH,GACRI,EAASJ,EAAOlN,MAAM,GAAG,GACzBkN,EAASA,EAAOA,EAAO5M,OAAS,GAEhC2M,EAAS3G,GAAOgH,EAAOvK,OAAOuK,EAAOhN,OAAS,EAAI6M,EAAUD,OACzD,IAAIO,EAEPR,EAAS3G,GAAO4G,MACb,CAEH,GADAI,EAASb,GAAYS,GACC,IAAlBA,EAAO5M,SAAiBkN,GAA+B,IAAlBF,EAAOhN,OAC5C,KAAM,IAAIyB,OAAM,yDAIfyL,IAAWF,EAAOI,MAEvBT,EAAS3G,GAAOgH,EAAOvK,OAAOoK,MAYtCQ,GAAKV,EAAUzL,GAOnB,QAASoM,MACL7N,KAAK8N,KAAO9N,KAAK+N,KAAO,KACxB/N,KAAKO,OAAS,EAGlB,QAASyN,IAAWC,EAAKC,GACrBD,EAAI1N,OAAS,EACb0N,EAAIH,KAAOG,EAAIF,KAAOG,EA6E1B,QAASC,IAAMC,EAAQC,EAAaC,GAahC,QAASC,GAAQC,EAAMC,EAAehN,GAClC,GAAgB,MAAZA,GAAwC,kBAAbA,GAC3B,KAAM,IAAIO,OAAM,mCAMpB,IAJA0M,EAAEC,SAAU,EACP7I,GAAQ0I,KACTA,GAAQA,IAEQ,IAAhBA,EAAKjO,QAAgBmO,EAAEE,OAEvB,MAAO1M,IAAe,WAClBwM,EAAEG,SAIV,KAAK,GAAInH,GAAI,EAAGoH,EAAIN,EAAKjO,OAAQmH,EAAIoH,EAAGpH,IAAK,CACzC,GAAII,IACA0G,KAAMA,EAAK9G,GACXjG,SAAUA,GAAYgD,EAGtBgK,GACAC,EAAEK,OAAOC,QAAQlH,GAEjB4G,EAAEK,OAAOtI,KAAKqB,GAIjBmH,IACDA,GAAsB,EACtB/M,GAAe,WACX+M,GAAsB,EACtBP,EAAEQ,aAKd,QAASC,GAAMlC,GACX,MAAO,UAASnL,GACZsN,GAAc,CAEd,KAAK,GAAI1H,GAAI,EAAGoH,EAAI7B,EAAM1M,OAAQmH,EAAIoH,EAAGpH,IAAK,CAC1C,GAAI2H,GAAOpC,EAAMvF,GAEb3C,EAAQ6F,EAAY0E,EAAaD,EAAM,EAC7B,KAAVtK,EACAuK,EAAYC,QACLxK,EAAQ,GACfuK,EAAYE,OAAOzK,EAAO,GAG9BsK,EAAK5N,SAASJ,MAAMgO,EAAMjO,WAEf,MAAPU,GACA4M,EAAEzM,MAAMH,EAAKuN,EAAKb,MAItBY,GAAeV,EAAEL,YAAcK,EAAEe,QACjCf,EAAEgB,cAGFhB,EAAEE,QACFF,EAAEG,QAENH,EAAEQ,WA7EV,GAAmB,MAAfb,EACAA,EAAc,MAEb,IAAmB,IAAhBA,EACJ,KAAM,IAAIrM,OAAM,+BAGpB,IAAI2N,GAAUnN,EAAU4L,GACpBgB,EAAa,EACbE,KAEAL,GAAsB,EAsEtBW,GAAe,EACflB,GACAK,OAAQ,GAAIlB,IACZQ,YAAaA,EACbC,QAASA,EACTuB,UAAWpL,EACXiL,YAAYjL,EACZgL,OAAQpB,EAAc,EACtByB,MAAOrL,EACPoK,MAAOpK,EACPxC,MAAOwC,EACPkK,SAAS,EACToB,QAAQ,EACRtJ,KAAM,SAAU+H,EAAM/M,GAClB8M,EAAQC,GAAM,EAAO/M,IAEzBuO,KAAM,WACFtB,EAAEG,MAAQpK,EACViK,EAAEK,OAAOe,SAEbd,QAAS,SAAUR,EAAM/M,GACrB8M,EAAQC,GAAM,EAAM/M,IAExBwO,OAAQ,SAAUC,GACdxB,EAAEK,OAAOkB,OAAOC,IAEpBhB,QAAS,WAGL,IAAIU,EAAJ,CAIA,IADAA,GAAe,GACRlB,EAAEqB,QAAUX,EAAaV,EAAEL,aAAeK,EAAEK,OAAOxO,QAAO,CAC7D,GAAI0M,MAAYuB,KACZM,EAAIJ,EAAEK,OAAOxO,MACbmO,GAAEJ,UAASQ,EAAIzO,KAAK8P,IAAIrB,EAAGJ,EAAEJ,SACjC,KAAK,GAAI5G,GAAI,EAAGA,EAAIoH,EAAGpH,IAAK,CACxB,GAAIwG,GAAOQ,EAAEK,OAAOQ,OACpBtC,GAAMxG,KAAKyH,GACXoB,EAAY7I,KAAKyH,GACjBM,EAAK/H,KAAKyH,EAAKM,MAGnBY,GAAc,EAEU,IAApBV,EAAEK,OAAOxO,QACTmO,EAAEoB,QAGFV,IAAeV,EAAEL,aACjBK,EAAEmB,WAGN,IAAI9M,GAAKsF,EAAS8G,EAAMlC,GACxB0C,GAAQnB,EAAMzL,GAElB6M,GAAe,IAEnBrP,OAAQ,WACJ,MAAOmO,GAAEK,OAAOxO,QAEpBkI,QAAS,WACL,MAAO2G,IAEXE,YAAa,WACT,MAAOA,IAEXV,KAAM,WACF,MAAOF,GAAEK,OAAOxO,OAAS6O,IAAe,GAE5CgB,MAAO,WACH1B,EAAEqB,QAAS,GAEfM,OAAQ,WACA3B,EAAEqB,UAAW,IACjBrB,EAAEqB,QAAS,EACX7N,GAAewM,EAAEQ,WAGzB,OAAOR,GAgFX,QAAS4B,IAAMlC,EAAQE,GACnB,MAAOH,IAAMC,EAAQ,EAAGE,GA8D5B,QAASiC,IAAO9I,EAAM+I,EAAM1L,EAAUrD,GAClCA,EAAWiD,EAAKjD,GAAYgD,EAC5B,IAAIkF,GAAYnH,EAAUsC,EAC1B2L,IAAahJ,EAAM,SAASiJ,EAAGhJ,EAAGjG,GAC9BkI,EAAU6G,EAAME,EAAG,SAAS5O,EAAK+H,GAC7B2G,EAAO3G,EACPpI,EAASK,MAEd,SAASA,GACRL,EAASK,EAAK0O,KA0CtB,QAASG,MACL,GAAIC,GAAa/F,EAASzJ,UAAWoB,EACrC,OAAO,YACH,GAAIrB,GAAOlB,EAAMmB,WACb0B,EAAO9C,KAEP+C,EAAK5B,EAAKA,EAAKZ,OAAS,EACX,mBAANwC,GACP5B,EAAKwM,MAEL5K,EAAK0B,EAGT8L,GAAOK,EAAYzP,EAAM,SAAS0P,EAAS9P,EAAIgC,GAC3ChC,EAAGM,MAAMyB,EAAM+N,EAAQ7N,OAAO,SAASlB,GACnC,GAAIgP,GAAW7Q,EAAMmB,UAAW,EAChC2B,GAAGjB,EAAKgP,OAGhB,SAAShP,EAAK2H,GACV1G,EAAG1B,MAAMyB,GAAOhB,GAAKkB,OAAOyG,OAsMxC,QAASsH,IAASnQ,GAChB,MAAOA,GAGT,QAASoQ,IAAcC,EAAOC,GAC1B,MAAO,UAASvO,EAAQ6G,EAAK1E,EAAU/B,GACnCA,EAAKA,GAAM0B,CACX,IACI0M,GADAC,GAAa,CAEjBzO,GAAO6G,EAAK,SAAS5I,EAAOgJ,EAAGnI,GAC3BqD,EAASlE,EAAO,SAASkB,EAAKJ,GACtBI,EACAL,EAASK,GACFmP,EAAMvP,KAAYyP,GACzBC,GAAa,EACbD,EAAaD,GAAU,EAAMtQ,GAC7Ba,EAAS,KAAMiH,KAEfjH,OAGT,SAASK,GACJA,EACAiB,EAAGjB,GAEHiB,EAAG,KAAMqO,EAAaD,EAAaD,GAAU,OAM7D,QAASG,IAAexH,EAAG6G,GACvB,MAAOA,GAsFX,QAASY,IAAY9D,GACjB,MAAO,UAAUzM,GACb,GAAII,GAAOlB,EAAMmB,UAAW,EAC5BD,GAAKsF,KAAK,SAAU3E,GAChB,GAAIX,GAAOlB,EAAMmB,UAAW,EACL,iBAAZmQ,WACHzP,EACIyP,QAAQtP,OACRsP,QAAQtP,MAAMH,GAEXyP,QAAQ/D,IACfzD,EAAU5I,EAAM,SAAUuP,GACtBa,QAAQ/D,GAAMkD,QAK9BlO,EAAUzB,GAAIM,MAAM,KAAMF,IAuDlC,QAASqQ,IAASzQ,EAAIwE,EAAM9D,GAKxB,QAASsG,GAAKjG,GACV,GAAIA,EAAK,MAAOL,GAASK,EACzB,IAAIX,GAAOlB,EAAMmB,UAAW,EAC5BD,GAAKsF,KAAKwK,GACVQ,EAAMpQ,MAAMrB,KAAMmB,GAGtB,QAAS8P,GAAMnP,EAAK4P,GAChB,MAAI5P,GAAYL,EAASK,GACpB4P,MACLC,GAAI5J,GADetG,EAAS,MAbhCA,EAAW4G,EAAS5G,GAAYgD,EAChC,IAAIkN,GAAMnP,EAAUzB,GAChB0Q,EAAQjP,EAAU+C,EAetB0L,GAAM,MAAM,GA0BhB,QAASW,IAAS9M,EAAUS,EAAM9D,GAC9BA,EAAW4G,EAAS5G,GAAYgD,EAChC,IAAIkF,GAAYnH,EAAUsC,GACtBiD,EAAO,SAASjG,GAChB,GAAIA,EAAK,MAAOL,GAASK,EACzB,IAAIX,GAAOlB,EAAMmB,UAAW,EAC5B,OAAImE,GAAKlE,MAAMrB,KAAMmB,GAAcwI,EAAU5B,OAC7CtG,GAASJ,MAAM,MAAO,MAAM2B,OAAO7B,IAEvCwI,GAAU5B,GAuBd,QAAS8J,IAAQ/M,EAAUS,EAAM9D,GAC7BmQ,GAAS9M,EAAU,WACf,OAAQS,EAAKlE,MAAMrB,KAAMoB,YAC1BK,GAuCP,QAASqQ,IAAOvM,EAAMxE,EAAIU,GAKtB,QAASsG,GAAKjG,GACV,MAAIA,GAAYL,EAASK,OACzB2P,GAAMR,GAGV,QAASA,GAAMnP,EAAK4P,GAChB,MAAI5P,GAAYL,EAASK,GACpB4P,MACLC,GAAI5J,GADetG,EAAS,MAXhCA,EAAW4G,EAAS5G,GAAYgD,EAChC,IAAIkN,GAAMnP,EAAUzB,GAChB0Q,EAAQjP,EAAU+C,EAatBkM,GAAMR,GAGV,QAASc,IAAcjN,GACnB,MAAO,UAAUlE,EAAOmE,EAAOtD,GAC3B,MAAOqD,GAASlE,EAAOa,IA6D/B,QAASuQ,IAAUvK,EAAM3C,EAAUrD,GAC/B6H,GAAO7B,EAAMsK,GAAcvP,EAAUsC,IAAYrD,GAuBrD,QAASwQ,IAAYxK,EAAMc,EAAOzD,EAAUrD,GACxC6G,EAAaC,GAAOd,EAAMsK,GAAcvP,EAAUsC,IAAYrD,GA2DlE,QAASyQ,IAAYnR,GACjB,MAAIqB,GAAQrB,GAAYA,EACjBS,GAAc,SAAUL,EAAMM,GACjC,GAAI0Q,IAAO,CACXhR,GAAKsF,KAAK,WACN,GAAI2L,GAAYhR,SACZ+Q,GACAjQ,GAAe,WACXT,EAASJ,MAAM,KAAM+Q,KAGzB3Q,EAASJ,MAAM,KAAM+Q,KAG7BrR,EAAGM,MAAMrB,KAAMmB,GACfgR,GAAO,IAIf,QAASE,IAAMxI,GACX,OAAQA,EAmFZ,QAASyI,IAAa/L,GACpB,MAAO,UAASa,GACd,MAAiB,OAAVA,EAAiB7D,OAAY6D,EAAOb,IAI/C,QAASgM,IAAY5P,EAAQ6G,EAAK1E,EAAUrD,GACxC,GAAI+Q,GAAc,GAAI/R,OAAM+I,EAAIjJ,OAChCoC,GAAO6G,EAAK,SAAUkH,EAAG3L,EAAOtD,GAC5BqD,EAAS4L,EAAG,SAAU5O,EAAK+H,GACvB2I,EAAYzN,KAAW8E,EACvBpI,EAASK,MAEd,SAAUA,GACT,GAAIA,EAAK,MAAOL,GAASK,EAEzB,KAAK,GADD2H,MACK/B,EAAI,EAAGA,EAAI8B,EAAIjJ,OAAQmH,IACxB8K,EAAY9K,IAAI+B,EAAQhD,KAAK+C,EAAI9B,GAEzCjG,GAAS,KAAMgI,KAIvB,QAASgJ,IAAc9P,EAAQ8E,EAAM3C,EAAUrD,GAC3C,GAAIgI,KACJ9G,GAAO8E,EAAM,SAAUiJ,EAAG3L,EAAOtD,GAC7BqD,EAAS4L,EAAG,SAAU5O,EAAK+H,GACnB/H,EACAL,EAASK,IAEL+H,GACAJ,EAAQhD,MAAM1B,MAAOA,EAAOnE,MAAO8P,IAEvCjP,QAGT,SAAUK,GACLA,EACAL,EAASK,GAETL,EAAS,KAAMoJ,EAASpB,EAAQiJ,KAAK,SAAUC,EAAGC,GAC9C,MAAOD,GAAE5N,MAAQ6N,EAAE7N,QACnBuN,GAAa,aAK7B,QAASO,IAAQlQ,EAAQ8E,EAAM3C,EAAUrD,GACrC,GAAIqR,GAAStO,EAAYiD,GAAQ8K,GAAcE,EAC/CK,GAAOnQ,EAAQ8E,EAAMjF,EAAUsC,GAAWrD,GAAYgD,GAqG1D,QAASsO,IAAQhS,EAAIiS,GAIjB,QAASjL,GAAKjG,GACV,MAAIA,GAAYkG,EAAKlG,OACrBuN,GAAKtH,GALT,GAAIC,GAAOK,EAAS2K,GAAWvO,GAC3B4K,EAAO7M,EAAU0P,GAAYnR,GAMjCgH,KAiKJ,QAASkL,IAAe/K,EAAKK,EAAOzD,EAAUrD,GAC1CA,EAAWiD,EAAKjD,GAAYgD,EAC5B,IAAIyO,MACAvJ,EAAYnH,EAAUsC,EAC1BiE,GAAYb,EAAKK,EAAO,SAAS4K,EAAK5M,EAAKwB,GACvC4B,EAAUwJ,EAAK5M,EAAK,SAAUzE,EAAKJ,GAC/B,MAAII,GAAYiG,EAAKjG,IACrBoR,EAAO3M,GAAO7E,MACdqG,SAEL,SAAUjG,GACTL,EAASK,EAAKoR,KAwEtB,QAASE,IAAIlL,EAAK3B,GACd,MAAOA,KAAO2B,GAwClB,QAASmL,IAAQtS,EAAIuS,GACjB,GAAI9C,GAAOxM,OAAOuP,OAAO,MACrBC,EAASxP,OAAOuP,OAAO,KAC3BD,GAASA,GAAUvC,EACnB,IAAIY,GAAMnP,EAAUzB,GAChB0S,EAAWjS,GAAc,SAAkBL,EAAMM,GACjD,GAAI8E,GAAM+M,EAAOjS,MAAM,KAAMF,EACzBiS,IAAI5C,EAAMjK,GACVrE,GAAe,WACXT,EAASJ,MAAM,KAAMmP,EAAKjK,MAEvB6M,GAAII,EAAQjN,GACnBiN,EAAOjN,GAAKE,KAAKhF,IAEjB+R,EAAOjN,IAAQ9E,GACfkQ,EAAItQ,MAAM,KAAMF,EAAK6B,OAAO,WACxB,GAAI7B,GAAOlB,EAAMmB,UACjBoP,GAAKjK,GAAOpF,CACZ,IAAIuN,GAAI8E,EAAOjN,SACRiN,GAAOjN,EACd,KAAK,GAAImB,GAAI,EAAGoH,EAAIJ,EAAEnO,OAAQmH,EAAIoH,EAAGpH,IACjCgH,EAAEhH,GAAGrG,MAAM,KAAMF,QAOjC,OAFAsS,GAASjD,KAAOA,EAChBiD,EAASC,WAAa3S,EACf0S,EA8CX,QAASE,IAAUhR,EAAQsK,EAAOxL,GAC9BA,EAAWA,GAAYgD,CACvB,IAAIgF,GAAUjF,EAAYyI,QAE1BtK,GAAOsK,EAAO,SAAUoC,EAAM9I,EAAK9E,GAC/Be,EAAU6M,GAAM,SAAUvN,EAAKJ,GACvBN,UAAUb,OAAS,IACnBmB,EAASzB,EAAMmB,UAAW,IAE9BqI,EAAQlD,GAAO7E,EACfD,EAASK,MAEd,SAAUA,GACTL,EAASK,EAAK2H,KAyEtB,QAASmK,IAAc3G,EAAOxL,GAC1BkS,GAAUrK,GAAQ2D,EAAOxL,GAsB7B,QAASoS,IAAgB5G,EAAO1E,EAAO9G,GACnCkS,GAAUrL,EAAaC,GAAQ0E,EAAOxL,GA+N1C,QAASqS,IAAK7G,EAAOxL,GAEjB,GADAA,EAAWiD,EAAKjD,GAAYgD,IACvBqB,GAAQmH,GAAQ,MAAOxL,GAAS,GAAIsS,WAAU,wDACnD,KAAK9G,EAAM1M,OAAQ,MAAOkB,IAC1B,KAAK,GAAIiG,GAAI,EAAGoH,EAAI7B,EAAM1M,OAAQmH,EAAIoH,EAAGpH,IACrClF,EAAUyK,EAAMvF,IAAIjG,GA0B5B,QAASuS,IAAahK,EAAOwG,EAAM1L,EAAUrD,GACzC,GAAIwS,GAAWhU,EAAM+J,GAAOkK,SAC5B3D,IAAO0D,EAAUzD,EAAM1L,EAAUrD,GA0CrC,QAAS0S,IAAQpT,GACb,GAAI4Q,GAAMnP,EAAUzB,EACpB,OAAOS,IAAc,SAAmBL,EAAMiT,GAe1C,MAdAjT,GAAKsF,KAAK,SAAkBxE,EAAOoS,GAC/B,GAAIpS,EACAmS,EAAgB,MAAQnS,MAAOA,QAC5B,CACH,GAAIrB,EAEAA,GADAQ,UAAUb,QAAU,EACZ8T,EAEApU,EAAMmB,UAAW,GAE7BgT,EAAgB,MAAQxT,MAAOA,OAIhC+Q,EAAItQ,MAAMrB,KAAMmB,KAuE/B,QAASmT,IAAWrH,GAChB,GAAIxD,EASJ,OARI3D,IAAQmH,GACRxD,EAAUoB,EAASoC,EAAOkH,KAE1B1K,KACAY,EAAW4C,EAAO,SAASoC,EAAM9I,GAC7BkD,EAAQlD,GAAO4N,GAAQ/Q,KAAKpD,KAAMqP,MAGnC5F,EAGX,QAAS8K,IAAS5R,EAAQ6G,EAAK1E,EAAUrD,GACrCoR,GAAQlQ,EAAQ6G,EAAK,SAAS5I,EAAOmC,GACjC+B,EAASlE,EAAO,SAASkB,EAAK+H,GAC1B9G,EAAGjB,GAAM+H,MAEdpI,GA2FP,QAAS+S,IAAW5T,GAClB,MAAO,YACL,MAAOA,IAwFX,QAAS6T,IAAMC,EAAMrF,EAAM5N,GASvB,QAASkT,GAAWC,EAAKC,GACrB,GAAiB,gBAANA,GACPD,EAAIE,OAASD,EAAEC,OAASC,EAExBH,EAAII,aAAqC,kBAAfH,GAAEI,SACxBJ,EAAEI,SACFT,IAAYK,EAAEI,UAAYC,GAE9BN,EAAIO,YAAcN,EAAEM,gBACjB,CAAA,GAAiB,gBAANN,IAA+B,gBAANA,GAGvC,KAAM,IAAI7S,OAAM,oCAFhB4S,GAAIE,OAASD,GAAKE,GAqB1B,QAASK,KACLC,EAAM,SAASvT,GACPA,GAAOwT,IAAYC,EAAQT,QACI,kBAAvBS,GAAQJ,aACZI,EAAQJ,YAAYrT,IACxBd,WAAWoU,EAAcG,EAAQP,aAAaM,IAE9C7T,EAASJ,MAAM,KAAMD,aA9CjC,GAAI2T,GAAgB,EAChBG,EAAmB,EAEnBK,GACAT,MAAOC,EACPC,aAAcR,GAAWU,GA2B7B,IARI9T,UAAUb,OAAS,GAAqB,kBAATmU,IAC/BjT,EAAW4N,GAAQ5K,EACnB4K,EAAOqF,IAEPC,EAAWY,EAASb,GACpBjT,EAAWA,GAAYgD,GAGP,kBAAT4K,GACP,KAAM,IAAIrN,OAAM,oCAGpB,IAAIqT,GAAQ7S,EAAU6M,GAElBiG,EAAU,CAadF,KAgHJ,QAASI,IAAOvI,EAAOxL,GACnBkS,GAAUlD,GAAcxD,EAAOxL,GA+HnC,QAASgU,IAAQhO,EAAM3C,EAAUrD,GAY7B,QAASiU,GAAWC,EAAMC,GACtB,GAAIjD,GAAIgD,EAAKE,SAAUjD,EAAIgD,EAAMC,QACjC,OAAOlD,GAAIC,GAAI,EAAKD,EAAIC,EAAI,EAAI,EAbpC,GAAIjJ,GAAYnH,EAAUsC,EAC1BgI,IAAIrF,EAAM,SAAUiJ,EAAGjP,GACnBkI,EAAU+G,EAAG,SAAU5O,EAAK+T,GACxB,MAAI/T,GAAYL,EAASK,OACzBL,GAAS,MAAOb,MAAO8P,EAAGmF,SAAUA,OAEzC,SAAU/T,EAAK2H,GACd,MAAI3H,GAAYL,EAASK,OACzBL,GAAS,KAAMoJ,EAASpB,EAAQiJ,KAAKgD,GAAapD,GAAa,aAkDvE,QAASwD,IAAQrT,EAASsT,EAAcC,GACpC,GAAIjV,GAAKyB,EAAUC,EAEnB,OAAOjB,IAAc,SAAUL,EAAMM,GAIjC,QAASwU,KACL,GAAIzI,GAAO/K,EAAQ+K,MAAQ,YACvBvL,EAAS,GAAID,OAAM,sBAAwBwL,EAAO,eACtDvL,GAAMiU,KAAO,YACTF,IACA/T,EAAM+T,KAAOA,GAEjBG,GAAW,EACX1U,EAASQ,GAXb,GACImU,GADAD,GAAW,CAcfhV,GAAKsF,KAAK,WACD0P,IACD1U,EAASJ,MAAM,KAAMD,WACrBiV,aAAaD,MAKrBA,EAAQpV,WAAWiV,EAAiBF,GACpChV,EAAGM,MAAM,KAAMF,KAmBvB,QAASmV,IAAUnW,EAAOiL,EAAKmL,EAAMrM,GAKnC,IAJA,GAAInF,IAAQ,EACRxE,EAASiW,GAAUC,IAAYrL,EAAMjL,IAAUoW,GAAQ,IAAK,GAC5D7U,EAASjB,MAAMF,GAEZA,KACLmB,EAAOwI,EAAY3J,IAAWwE,GAAS5E,EACvCA,GAASoW,CAEX,OAAO7U,GAmBT,QAASgV,IAAUC,EAAOpO,EAAOzD,EAAUrD,GACvC,GAAIkI,GAAYnH,EAAUsC,EAC1B8R,IAASN,GAAU,EAAGK,EAAO,GAAIpO,EAAOoB,EAAWlI,GA+FvD,QAASwF,IAAWQ,EAAMoP,EAAa/R,EAAUrD,GACzCL,UAAUb,QAAU,IACpBkB,EAAWqD,EACXA,EAAW+R,EACXA,EAAc/Q,GAAQ2B,UAE1BhG,EAAWiD,EAAKjD,GAAYgD,EAC5B,IAAIkF,GAAYnH,EAAUsC,EAE1BwE,IAAO7B,EAAM,SAASoC,EAAGiN,EAAG/T,GACxB4G,EAAUkN,EAAahN,EAAGiN,EAAG/T,IAC9B,SAASjB,GACRL,EAASK,EAAK+U,KAyCtB,QAASE,IAAQ9J,EAAOxL,GACpB,GACIC,GADAO,EAAQ,IAEZR,GAAWA,GAAYgD,EACvBuS,GAAW/J,EAAO,SAASoC,EAAM5N,GAC7Be,EAAU6M,GAAM,SAAUvN,EAAKmV,GAEvBvV,EADAN,UAAUb,OAAS,EACVN,EAAMmB,UAAW,GAEjB6V,EAEbhV,EAAQH,EACRL,GAAUK,MAEf,WACCL,EAASQ,EAAOP,KAiBxB,QAASwV,IAAUnW,GACf,MAAO,YACH,OAAQA,EAAG2S,YAAc3S,GAAIM,MAAM,KAAMD,YAsCjD,QAAS+V,IAAO5R,EAAMT,EAAUrD,GAC5BA,EAAW4G,EAAS5G,GAAYgD,EAChC,IAAIkF,GAAYnH,EAAUsC,EAC1B,KAAKS,IAAQ,MAAO9D,GAAS,KAC7B,IAAIsG,GAAO,SAASjG,GAChB,GAAIA,EAAK,MAAOL,GAASK,EACzB,IAAIyD,IAAQ,MAAOoE,GAAU5B,EAC7B,IAAI5G,GAAOlB,EAAMmB,UAAW,EAC5BK,GAASJ,MAAM,MAAO,MAAM2B,OAAO7B,IAEvCwI,GAAU5B,GAyBd,QAASqP,IAAM7R,EAAMT,EAAUrD,GAC3B0V,GAAO,WACH,OAAQ5R,EAAKlE,MAAMrB,KAAMoB,YAC1B0D,EAAUrD,GA5kKjB,GA8DI4V,IA9DAhW,GAAQ,SAASN,GACjB,GAAII,GAAOlB,EAAMmB,UAAW,EAC5B,OAAO,YACH,GAAIkW,GAAWrX,EAAMmB,UACrB,OAAOL,GAAGM,MAAM,KAAMF,EAAK6B,OAAOsU,MAItC9V,GAAgB,SAAUT,GAC1B,MAAO,YACH,GAAII,GAAOlB,EAAMmB,WACbK,EAAWN,EAAKwM,KACpB5M,GAAGqC,KAAKpD,KAAMmB,EAAMM,KAkCxB8V,GAA0C,kBAAjBC,eAA+BA,aACxDC,GAAiC,gBAAZvI,UAAoD,kBAArBA,SAAQwI,QAkB5DL,IADAE,GACSC,aACFC,GACEvI,QAAQwI,SAER5W,CAGb,IAAIoB,IAAiBjB,EAAKoW,IA2FtBhV,GAAmC,kBAAXC,QA6BxBqV,GAA8B,gBAAVlY,SAAsBA,QAAUA,OAAOuE,SAAWA,QAAUvE,OAGhFmY,GAA0B,gBAARC,OAAoBA,MAAQA,KAAK7T,SAAWA,QAAU6T,KAGxEC,GAAOH,IAAcC,IAAYG,SAAS,iBAG1CC,GAAWF,GAAKxV,OAGhB2V,GAAcjU,OAAO8C,UAGrB3D,GAAiB8U,GAAY9U,eAO7BM,GAAuBwU,GAAY9L,SAGnC9I,GAAmB2U,GAAWA,GAASzV,YAAcgB,OA8BrD2U,GAAgBlU,OAAO8C,UAOvBnD,GAAyBuU,GAAc/L,SAcvCrI,GAAU,gBACVD,GAAe,qBAGfE,GAAiBiU,GAAWA,GAASzV,YAAcgB,OAmBnDa,GAAW,yBACXF,GAAU,oBACVC,GAAS,6BACTE,GAAW,iBA8BXE,GAAmB,iBAgEnBmE,MA2BAyP,GAAmC,kBAAX7V,SAAyBA,OAAOuF,SAExDO,GAAc,SAAUX,GACxB,MAAO0Q,KAAkB1Q,EAAK0Q,KAAmB1Q,EAAK0Q,OAmDtDjT,GAAU,qBAcVkT,GAAgBpU,OAAO8C,UAGvBuR,GAAmBD,GAAcjV,eAGjCmV,GAAuBF,GAAcE,qBAoBrCtS,GAAcf,EAAgB,WAAa,MAAO7D,eAAkB6D,EAAkB,SAASrE,GACjG,MAAOoE,GAAapE,IAAUyX,GAAiBjV,KAAKxC,EAAO,YACxD0X,GAAqBlV,KAAKxC,EAAO,WA0BlCkF,GAAUrF,MAAMqF,QAoBhByS,GAAgC,gBAAX5Y,IAAuBA,IAAYA,EAAQ6Y,UAAY7Y,EAG5E8Y,GAAaF,IAAgC,gBAAV3Y,SAAsBA,SAAWA,OAAO4Y,UAAY5Y,OAGvF8Y,GAAgBD,IAAcA,GAAW9Y,UAAY4Y,GAGrDI,GAASD,GAAgBZ,GAAKa,OAASpV,OAGvCqV,GAAiBD,GAASA,GAAOzS,SAAW3C,OAmB5C2C,GAAW0S,IAAkBzT,EAG7BE,GAAqB,iBAGrBC,GAAW,mBAqBXuT,GAAY,qBACZC,GAAW,iBACXC,GAAU,mBACVC,GAAU,gBACVC,GAAW,iBACXC,GAAY,oBACZC,GAAS,eACTC,GAAY,kBACZC,GAAY,kBACZC,GAAY,kBACZC,GAAS,eACTC,GAAY,kBACZC,GAAa,mBAEbC,GAAiB,uBACjBC,GAAc,oBACdC,GAAa,wBACbC,GAAa,wBACbC,GAAU,qBACVC,GAAW,sBACXC,GAAW,sBACXC,GAAW,sBACXC,GAAkB,6BAClBC,GAAY,uBACZC,GAAY,uBAGZ3U,KACJA,IAAemU,IAAcnU,GAAeoU,IAC5CpU,GAAeqU,IAAWrU,GAAesU,IACzCtU,GAAeuU,IAAYvU,GAAewU,IAC1CxU,GAAeyU,IAAmBzU,GAAe0U,IACjD1U,GAAe2U,KAAa,EAC5B3U,GAAeoT,IAAapT,GAAeqT,IAC3CrT,GAAeiU,IAAkBjU,GAAesT,IAChDtT,GAAekU,IAAelU,GAAeuT,IAC7CvT,GAAewT,IAAYxT,GAAeyT,IAC1CzT,GAAe0T,IAAU1T,GAAe2T,IACxC3T,GAAe4T,IAAa5T,GAAe6T,IAC3C7T,GAAe8T,IAAU9T,GAAe+T,IACxC/T,GAAegU,KAAc,CA4B7B,IAAIY,IAAkC,gBAAX1a,IAAuBA,IAAYA,EAAQ6Y,UAAY7Y,EAG9E2a,GAAeD,IAAkC,gBAAVza,SAAsBA,SAAWA,OAAO4Y,UAAY5Y,OAG3F2a,GAAkBD,IAAgBA,GAAa3a,UAAY0a,GAG3DG,GAAcD,IAAmB5C,GAAWzI,QAG5CuL,GAAY,WACd,IAEE,GAAIC,GAAQJ,IAAgBA,GAAaK,SAAWL,GAAaK,QAAQ,QAAQD,KAEjF,OAAIA,GACKA,EAIFF,IAAeA,GAAYI,SAAWJ,GAAYI,QAAQ,QACjE,MAAOjZ,QAIPkZ,GAAmBJ,IAAYA,GAASrU,aAmBxCA,GAAeyU,GAAmBnV,EAAUmV,IAAoBrV,EAGhEsV,GAAgB9W,OAAO8C,UAGvBN,GAAmBsU,GAAc3X,eAsCjC4D,GAAgB/C,OAAO8C,UA+BvBO,GAAaL,EAAQhD,OAAOuD,KAAMvD,QAGlC+W,GAAgB/W,OAAO8C,UAGvBQ,GAAmByT,GAAc5X,eA6MjC6X,GAAgBhS,EAAQD,EAAakS,EAAAA,GAyCrC3R,GAAS,SAAS7B,EAAM3C,EAAUrD,GAClC,GAAIyZ,GAAuB1W,EAAYiD,GAAQyB,EAAkB8R,EACjEE,GAAqBzT,EAAMjF,EAAUsC,GAAWrD,IA+DhDqL,GAAMzD,EAAWE,GAmCjB4R,GAAYzY,EAAYoK,IA2BxB8J,GAAW9M,EAAgBP,GAoB3B6R,GAAYpS,EAAQ4N,GAAU,GAqB9ByE,GAAkB3Y,EAAY0Y,IA0D9B9Q,GAAUL,IAoKV2D,GAAO,SAAUX,EAAOoB,EAAa5M,GAiErC,QAAS6Z,GAAY/U,EAAK8I,GACtBkM,EAAW9U,KAAK,WACZ+U,EAAQjV,EAAK8I,KAIrB,QAASoM,KACL,GAA0B,IAAtBF,EAAWhb,QAAiC,IAAjBmb,EAC3B,MAAOja,GAAS,KAAMgI,EAE1B,MAAM8R,EAAWhb,QAAUmb,EAAerN,GAAa,CACnD,GAAIsN,GAAMJ,EAAWhM,OACrBoM,MAKR,QAASC,GAAYC,EAAU9a,GAC3B,GAAI+a,GAAgBC,EAAUF,EACzBC,KACDA,EAAgBC,EAAUF,OAG9BC,EAAcrV,KAAK1F,GAGvB,QAASib,GAAaH,GAClB,GAAIC,GAAgBC,EAAUF,MAC9B9R,GAAU+R,EAAe,SAAU/a,GAC/BA,MAEJ0a,IAIJ,QAASD,GAAQjV,EAAK8I,GAClB,IAAI4M,EAAJ,CAEA,GAAIC,GAAe7T,EAAS,SAASvG,EAAKJ,GAKtC,GAJAga,IACIta,UAAUb,OAAS,IACnBmB,EAASzB,EAAMmB,UAAW,IAE1BU,EAAK,CACL,GAAIqa,KACJ9R,GAAWZ,EAAS,SAAS0J,EAAKiJ,GAC9BD,EAAYC,GAAQjJ,IAExBgJ,EAAY5V,GAAO7E,EACnBua,GAAW,EACXF,EAAY/X,OAAOuP,OAAO,MAE1B9R,EAASK,EAAKqa,OAEd1S,GAAQlD,GAAO7E,EACfsa,EAAazV,IAIrBmV,IACA,IAAIvO,GAAS3K,EAAU6M,EAAKA,EAAK9O,OAAS,GACtC8O,GAAK9O,OAAS,EACd4M,EAAO1D,EAASyS,GAEhB/O,EAAO+O,IAIf,QAASG,KAML,IAFA,GAAIC,GACA5S,EAAU,EACP6S,EAAahc,QAChB+b,EAAcC,EAAa5O,MAC3BjE,IACAK,EAAUyS,EAAcF,GAAc,SAAUG,GACD,MAArCC,EAAsBD,IACxBF,EAAa9V,KAAKgW,IAK9B,IAAI/S,IAAYiT,EACZ,KAAM,IAAI3a,OACN,iEAKZ,QAASwa,GAAcX,GACnB,GAAIna,KAMJ,OALA2I,GAAW4C,EAAO,SAAUoC,EAAM9I,GAC1BT,GAAQuJ,IAASzE,EAAYyE,EAAMwM,EAAU,IAAM,GACnDna,EAAO+E,KAAKF,KAGb7E,EAlKgB,kBAAhB2M,KAEP5M,EAAW4M,EACXA,EAAc,MAElB5M,EAAWiD,EAAKjD,GAAYgD,EAC5B,IAAImY,GAAUrV,EAAK0F,GACf0P,EAAWC,EAAQrc,MACvB,KAAKoc,EACD,MAAOlb,GAAS,KAEf4M,KACDA,EAAcsO,EAGlB,IAAIlT,MACAiS,EAAe,EACfO,GAAW,EAEXF,EAAY/X,OAAOuP,OAAO,MAE1BgI,KAGAgB,KAEAG,IAEJrS,GAAW4C,EAAO,SAAUoC,EAAM9I,GAC9B,IAAKT,GAAQuJ,GAIT,MAFAiM,GAAY/U,GAAM8I,QAClBkN,GAAa9V,KAAKF,EAItB,IAAIsW,GAAexN,EAAKpP,MAAM,EAAGoP,EAAK9O,OAAS,GAC3Cuc,EAAwBD,EAAatc,MACzC,OAA8B,KAA1Buc,GACAxB,EAAY/U,EAAK8I,OACjBkN,GAAa9V,KAAKF,KAGtBmW,EAAsBnW,GAAOuW,MAE7B/S,GAAU8S,EAAc,SAAUE,GAC9B,IAAK9P,EAAM8P,GACP,KAAM,IAAI/a,OAAM,oBAAsBuE,EAClC,oCACAwW,EAAiB,QACjBF,EAAapQ,KAAK,MAE1BmP,GAAYmB,EAAgB,WACxBD,IAC8B,IAA1BA,GACAxB,EAAY/U,EAAK8I,UAMjCgN,IACAZ,KA6HA1Q,GAAY,kBAyBZG,GAAW,EAAI,EAGf8R,GAAchF,GAAWA,GAASlR,UAAYvD,OAC9C0H,GAAiB+R,GAAcA,GAAY7Q,SAAW5I,OAoHtD0Z,GAAgB,kBAChBC,GAAoB,kBACpBC,GAAwB,kBACxBC,GAAsB,kBACtBC,GAAeH,GAAoBC,GAAwBC,GAC3DE,GAAa,iBAGbC,GAAQ,UAGRzR,GAAe0R,OAAO,IAAMD,GAAQN,GAAiBI,GAAeC,GAAa,KAcjFG,GAAkB,kBAClBC,GAAsB,kBACtBC,GAA0B,kBAC1BC,GAAwB,kBACxBC,GAAiBH,GAAsBC,GAA0BC,GACjEE,GAAe,iBAGfC,GAAW,IAAMN,GAAkB,IACnCO,GAAU,IAAMH,GAAiB,IACjCI,GAAS,2BACTC,GAAa,MAAQF,GAAU,IAAMC,GAAS,IAC9CE,GAAc,KAAOV,GAAkB,IACvCW,GAAa,kCACbC,GAAa,qCACbC,GAAU,UAGVC,GAAWL,GAAa,IACxBM,GAAW,IAAMV,GAAe,KAChCW,GAAY,MAAQH,GAAU,OAASH,GAAaC,GAAYC,IAAY5R,KAAK,KAAO,IAAM+R,GAAWD,GAAW,KACpHG,GAAQF,GAAWD,GAAWE,GAC9BE,GAAW,OAASR,GAAcH,GAAU,IAAKA,GAASI,GAAYC,GAAYN,IAAUtR,KAAK,KAAO,IAGxGR,GAAYuR,OAAOS,GAAS,MAAQA,GAAS,KAAOU,GAAWD,GAAO,KAoDtElS,GAAS,aAwCTI,GAAU,qDACVC,GAAe,IACfE,GAAS,eACTJ,GAAiB,kCAsJrBkB,IAAI/G,UAAU8X,WAAa,SAAS1Q,GAQhC,MAPIA,GAAK2Q,KAAM3Q,EAAK2Q,KAAK9W,KAAOmG,EAAKnG,KAChC/H,KAAK8N,KAAOI,EAAKnG,KAClBmG,EAAKnG,KAAMmG,EAAKnG,KAAK8W,KAAO3Q,EAAK2Q,KAChC7e,KAAK+N,KAAOG,EAAK2Q,KAEtB3Q,EAAK2Q,KAAO3Q,EAAKnG,KAAO,KACxB/H,KAAKO,QAAU,EACR2N,GAGXL,GAAI/G,UAAUgJ,MAAQ,WAClB,KAAM9P,KAAK8N,MAAM9N,KAAKuP,OACtB,OAAOvP,OAGX6N,GAAI/G,UAAUgY,YAAc,SAAS5Q,EAAM6Q,GACvCA,EAAQF,KAAO3Q,EACf6Q,EAAQhX,KAAOmG,EAAKnG,KAChBmG,EAAKnG,KAAMmG,EAAKnG,KAAK8W,KAAOE,EAC3B/e,KAAK+N,KAAOgR,EACjB7Q,EAAKnG,KAAOgX,EACZ/e,KAAKO,QAAU,GAGnBsN,GAAI/G,UAAUkY,aAAe,SAAS9Q,EAAM6Q,GACxCA,EAAQF,KAAO3Q,EAAK2Q,KACpBE,EAAQhX,KAAOmG,EACXA,EAAK2Q,KAAM3Q,EAAK2Q,KAAK9W,KAAOgX,EAC3B/e,KAAK8N,KAAOiR,EACjB7Q,EAAK2Q,KAAOE,EACZ/e,KAAKO,QAAU,GAGnBsN,GAAI/G,UAAUkI,QAAU,SAASd,GACzBlO,KAAK8N,KAAM9N,KAAKgf,aAAahf,KAAK8N,KAAMI,GACvCF,GAAWhO,KAAMkO,IAG1BL,GAAI/G,UAAUL,KAAO,SAASyH,GACtBlO,KAAK+N,KAAM/N,KAAK8e,YAAY9e,KAAK+N,KAAMG,GACtCF,GAAWhO,KAAMkO,IAG1BL,GAAI/G,UAAUyI,MAAQ,WAClB,MAAOvP,MAAK8N,MAAQ9N,KAAK4e,WAAW5e,KAAK8N,OAG7CD,GAAI/G,UAAU6G,IAAM,WAChB,MAAO3N,MAAK+N,MAAQ/N,KAAK4e,WAAW5e,KAAK+N,OAG7CF,GAAI/G,UAAUmY,QAAU,WAGpB,IAAI,GAFAzV,GAAM/I,MAAMT,KAAKO,QACjB2e,EAAOlf,KAAK8N,KACRpN,EAAM,EAAGA,EAAMV,KAAKO,OAAQG,IAChC8I,EAAI9I,GAAOwe,EAAK1Q,KAChB0Q,EAAOA,EAAKnX,IAEhB,OAAOyB,IAGXqE,GAAI/G,UAAUmJ,OAAS,SAAUC,GAE7B,IADA,GAAIgP,GAAOlf,KAAK8N,KACRoR,GAAM,CACV,GAAInX,GAAOmX,EAAKnX,IACZmI,GAAOgP,IACPlf,KAAK4e,WAAWM,GAEpBA,EAAOnX,EAEX,MAAO/H,MA0QX,IAi3CImf,IAj3CA1O,GAAezH,EAAQD,EAAa,GAyJpCqW,GAAU,WACV,MAAOzO,IAAItP,MAAM,KAAMpB,EAAMmB,WAAW8S,YAGxCmL,GAAU5e,MAAMqG,UAAU9D,OAoB1Bsc,GAAc,SAAS7X,EAAMc,EAAOzD,EAAUrD,GAC9CA,EAAWA,GAAYgD,CACvB,IAAIkF,GAAYnH,EAAUsC,EAC1B8R,IAASnP,EAAMc,EAAO,SAAS4K,EAAK1R,GAChCkI,EAAUwJ,EAAK,SAASrR,GACpB,MAAIA,GAAYL,EAASK,GAClBL,EAAS,KAAMxB,EAAMmB,UAAW,OAE5C,SAASU,EAAKyd,GAEb,IAAK,GADD7d,MACKgG,EAAI,EAAGA,EAAI6X,EAAWhf,OAAQmH,IAC/B6X,EAAW7X,KACXhG,EAAS2d,GAAQhe,MAAMK,EAAQ6d,EAAW7X,IAIlD,OAAOjG,GAASK,EAAKJ,MA6BzBsB,GAASgG,EAAQsW,GAAarE,EAAAA,GAoB9BuE,GAAexW,EAAQsW,GAAa,GA4CpCG,GAAW,WACX,GAAIC,GAASzf,EAAMmB,WACfD,GAAQ,MAAM6B,OAAO0c,EACzB,OAAO,YACH,GAAIje,GAAWL,UAAUA,UAAUb,OAAS,EAC5C,OAAOkB,GAASJ,MAAMrB,KAAMmB,KA0FhCwe,GAAStW,EAAW2H,GAAcD,GAAUM,KAwB5CuO,GAAc9V,EAAgBkH,GAAcD,GAAUM,KAsBtDwO,GAAe7W,EAAQ4W,GAAa,GAoDpCE,GAAMxO,GAAY,OA6QlB0F,GAAahO,EAAQiJ,GAAa,GAwFlC8N,GAAQ1W,EAAW2H,GAAcqB,GAAOA,KAsBxC2N,GAAalW,EAAgBkH,GAAcqB,GAAOA,KAqBlD4N,GAAcjX,EAAQgX,GAAY,GAwFlClN,GAASzJ,EAAWwJ,IAqBpBqN,GAAcpW,EAAgB+I,IAmB9BsN,GAAenX,EAAQkX,GAAa,GA6DpCE,GAAe,SAAS3Y,EAAMc,EAAOzD,EAAUrD,GAC/CA,EAAWA,GAAYgD,CACvB,IAAIkF,GAAYnH,EAAUsC,EAC1B8R,IAASnP,EAAMc,EAAO,SAAS4K,EAAK1R,GAChCkI,EAAUwJ,EAAK,SAASrR,EAAKyE,GACzB,MAAIzE,GAAYL,EAASK,GAClBL,EAAS,MAAO8E,IAAKA,EAAK4M,IAAKA,OAE3C,SAASrR,EAAKyd,GAKb,IAAK,GAJD7d,MAEAyB,EAAiBa,OAAO8C,UAAU3D,eAE7BuE,EAAI,EAAGA,EAAI6X,EAAWhf,OAAQmH,IACnC,GAAI6X,EAAW7X,GAAI,CACf,GAAInB,GAAMgZ,EAAW7X,GAAGnB,IACpB4M,EAAMoM,EAAW7X,GAAGyL,GAEpBhQ,GAAeC,KAAK1B,EAAQ6E,GAC5B7E,EAAO6E,GAAKE,KAAK0M,GAEjBzR,EAAO6E,IAAQ4M,GAK3B,MAAO1R,GAASK,EAAKJ,MAwCzB2e,GAAUrX,EAAQoX,GAAcnF,EAAAA,GAqBhCqF,GAAgBtX,EAAQoX,GAAc,GA6BtCG,GAAMjP,GAAY,OAmFlBkP,GAAYxX,EAAQiK,GAAgBgI,EAAAA,GAqBpCwF,GAAkBzX,EAAQiK,GAAgB,EA4G1CkM,IADA1H,GACWvI,QAAQwI,SACZH,GACIC,aAEA1W,CAGf,IAAI4W,IAAWzW,EAAKke,IA4NhBuB,GAAU,SAAUtS,EAAQC,GAC5B,GAAIsB,GAAUnN,EAAU4L,EACxB,OAAOD,IAAM,SAAUwS,EAAO5d,GAC1B4M,EAAQgR,EAAM,GAAI5d,IACnBsL,EAAa,IA0BhBuS,GAAgB,SAASxS,EAAQC,GAEjC,GAAIK,GAAIgS,GAAQtS,EAAQC,EA4CxB,OAzCAK,GAAEjI,KAAO,SAAS+H,EAAMqS,EAAUpf,GAE9B,GADgB,MAAZA,IAAkBA,EAAWgD,GACT,kBAAbhD,GACP,KAAM,IAAIO,OAAM,mCAMpB,IAJA0M,EAAEC,SAAU,EACP7I,GAAQ0I,KACTA,GAAQA,IAEQ,IAAhBA,EAAKjO,OAEL,MAAO2B,IAAe,WAClBwM,EAAEG,SAIVgS,GAAWA,GAAY,CAEvB,KADA,GAAIC,GAAWpS,EAAEK,OAAOjB,KACjBgT,GAAYD,GAAYC,EAASD,UACpCC,EAAWA,EAAS/Y,IAGxB,KAAK,GAAIL,GAAI,EAAGoH,EAAIN,EAAKjO,OAAQmH,EAAIoH,EAAGpH,IAAK,CACzC,GAAII,IACA0G,KAAMA,EAAK9G,GACXmZ,SAAUA,EACVpf,SAAUA,EAGVqf,GACApS,EAAEK,OAAOiQ,aAAa8B,EAAUhZ,GAEhC4G,EAAEK,OAAOtI,KAAKqB,GAGtB5F,GAAewM,EAAEQ,gBAIdR,GAAEM,QAEFN,GA0PPqS,GAAS1X,EAAWkL,IAqBpByM,GAAclX,EAAgByK,IAmB9B0M,GAAejY,EAAQgY,GAAa,GAkMpCE,GAAY,SAAUxM,EAAMrF,GACvBA,IACDA,EAAOqF,EACPA,EAAO,KAEX,IAAIW,GAAQ7S,EAAU6M,EACtB,OAAO7N,IAAc,SAAUL,EAAMM,GACjC,QAAS0L,GAAOpK,GACZsS,EAAMhU,MAAM,KAAMF,EAAK6B,OAAOD,IAG9B2R,EAAMD,GAAMC,EAAMvH,EAAQ1L,GACzBgT,GAAMtH,EAAQ1L,MAuGvB0f,GAAO9X,EAAW2H,GAAcoQ,QAASrQ,KAuBzCsQ,GAAYvX,EAAgBkH,GAAcoQ,QAASrQ,KAsBnDuQ,GAAatY,EAAQqY,GAAW,GA4IhC5K,GAAapW,KAAKkhB,KAClB/K,GAAYnW,KAAKC,IA8EjBwU,GAAQ9L,EAAQ0N,GAAWuE,EAAAA,GAgB3BuG,GAAcxY,EAAQ0N,GAAW,GA2QjC+K,GAAY,SAASxU,EAAOxL,GAM5B,QAASigB,GAASvgB,GACd,GAAIkO,GAAO7M,EAAUyK,EAAM0U,KAC3BxgB,GAAKsF,KAAK4B,EAASN,IACnBsH,EAAKhO,MAAM,KAAMF,GAGrB,QAAS4G,GAAKjG,GACV,MAAIA,IAAO6f,IAAc1U,EAAM1M,OACpBkB,EAASJ,MAAM,KAAMD,eAEhCsgB,GAASzhB,EAAMmB,UAAW,IAd9B,GADAK,EAAWiD,EAAKjD,GAAYgD,IACvBqB,GAAQmH,GAAQ,MAAOxL,GAAS,GAAIO,OAAM,6DAC/C,KAAKiL,EAAM1M,OAAQ,MAAOkB,IAC1B,IAAIkgB,GAAY,CAehBD,QAoEA3c,IACA1D,MAAOA,GACP8Z,UAAWA,GACXE,gBAAiBA,GACjB/Z,SAAUA,EACVsM,KAAMA,GACNZ,WAAYA,GACZsD,MAAOA,GACP8O,QAASA,GACTpc,OAAQA,GACRsc,YAAaA,GACbE,aAAcA,GACdC,SAAUA,GACVE,OAAQA,GACRC,YAAaA,GACbC,aAAcA,GACdC,IAAKA,GACLtO,SAAUA,GACVK,QAASA,GACTD,SAAUA,GACVE,OAAQA,GACR8P,KAAM5P,GACNA,UAAWC,GACX3I,OAAQA,GACRP,YAAaA,EACb0H,aAAcA,GACduG,WAAYA,GACZ9E,YAAaA,GACb6N,MAAOA,GACPC,WAAYA,GACZC,YAAaA,GACbnN,OAAQA,GACRoN,YAAaA,GACbC,aAAcA,GACdpN,QAASA,GACTsN,QAASA,GACTD,aAAcA,GACdE,cAAeA,GACfC,IAAKA,GACLzT,IAAKA,GACL8J,SAAUA,GACVwE,UAAWA,GACXoF,UAAWA,GACXvN,eAAgBA,GAChBwN,gBAAiBA,GACjBpN,QAASA,GACTqE,SAAUA,GACVmK,SAAUjO,GACVA,cAAeC,GACf+M,cAAeA,GACfzS,MAAOuS,GACP5M,KAAMA,GACNvD,OAAQA,GACRyD,YAAaA,GACbG,QAASA,GACTG,WAAYA,GACZyM,OAAQA,GACRC,YAAaA,GACbC,aAAcA,GACdxM,MAAOA,GACPyM,UAAWA,GACXvQ,IAAKA,GACL6E,OAAQA,GACRgC,aAActV,GACdif,KAAMA,GACNE,UAAWA,GACXC,WAAYA,GACZ7L,OAAQA,GACRK,QAASA,GACThB,MAAOA,GACPgN,WAAYpL,GACZ8K,YAAaA,GACbva,UAAWA,GACX8P,QAASA,GACTG,UAAWA,GACXE,MAAOA,GACPqK,UAAWA,GACXtK,OAAQA,GAGR4K,IAAKhC,GACLiC,SAAUhC,GACViC,UAAWhC,GACXiC,IAAKf,GACLgB,SAAUd,GACVe,UAAWd,GACXe,KAAM1C,GACN2C,UAAW1C,GACX2C,WAAY1C,GACZ2C,QAASxQ,GACTyQ,cAAezL,GACf0L,aAAczQ,GACd0Q,UAAWrZ,GACXsZ,gBAAiBnS,GACjBoS,eAAgB9Z,EAChB+Z,OAAQvS,GACRwS,MAAOxS,GACPyS,MAAOhP,GACPiP,OAAQnQ,GACRoQ,YAAahD,GACbiD,aAAchD,GACdiD,SAAU9hB,EAGd3B,GAAiB,QAAIoF,GACrBpF,EAAQ0B,MAAQA,GAChB1B,EAAQwb,UAAYA,GACpBxb,EAAQ0b,gBAAkBA,GAC1B1b,EAAQ2B,SAAWA,EACnB3B,EAAQiO,KAAOA,GACfjO,EAAQqN,WAAaA,GACrBrN,EAAQ2Q,MAAQA,GAChB3Q,EAAQyf,QAAUA,GAClBzf,EAAQqD,OAASA,GACjBrD,EAAQ2f,YAAcA,GACtB3f,EAAQ6f,aAAeA,GACvB7f,EAAQ8f,SAAWA,GACnB9f,EAAQggB,OAASA,GACjBhgB,EAAQigB,YAAcA,GACtBjgB,EAAQkgB,aAAeA,GACvBlgB,EAAQmgB,IAAMA,GACdngB,EAAQ6R,SAAWA,GACnB7R,EAAQkS,QAAUA,GAClBlS,EAAQiS,SAAWA,GACnBjS,EAAQmS,OAASA,GACjBnS,EAAQiiB,KAAO5P,GACfrS,EAAQqS,UAAYC,GACpBtS,EAAQ2J,OAASA,GACjB3J,EAAQoJ,YAAcA,EACtBpJ,EAAQ8Q,aAAeA,GACvB9Q,EAAQqX,WAAaA,GACrBrX,EAAQuS,YAAcA,GACtBvS,EAAQogB,MAAQA,GAChBpgB,EAAQqgB,WAAaA,GACrBrgB,EAAQsgB,YAAcA,GACtBtgB,EAAQmT,OAASA,GACjBnT,EAAQugB,YAAcA,GACtBvgB,EAAQwgB,aAAeA,GACvBxgB,EAAQoT,QAAUA,GAClBpT,EAAQ0gB,QAAUA,GAClB1gB,EAAQygB,aAAeA,GACvBzgB,EAAQ2gB,cAAgBA,GACxB3gB,EAAQ4gB,IAAMA,GACd5gB,EAAQmN,IAAMA,GACdnN,EAAQiX,SAAWA,GACnBjX,EAAQyb,UAAYA,GACpBzb,EAAQ6gB,UAAYA,GACpB7gB,EAAQsT,eAAiBA,GACzBtT,EAAQ8gB,gBAAkBA,GAC1B9gB,EAAQ0T,QAAUA,GAClB1T,EAAQ+X,SAAWA,GACnB/X,EAAQkiB,SAAWjO,GACnBjU,EAAQiU,cAAgBC,GACxBlU,EAAQihB,cAAgBA,GACxBjhB,EAAQwO,MAAQuS,GAChB/gB,EAAQmU,KAAOA,GACfnU,EAAQ4Q,OAASA,GACjB5Q,EAAQqU,YAAcA,GACtBrU,EAAQwU,QAAUA,GAClBxU,EAAQ2U,WAAaA,GACrB3U,EAAQohB,OAASA,GACjBphB,EAAQqhB,YAAcA,GACtBrhB,EAAQshB,aAAeA,GACvBthB,EAAQ8U,MAAQA,GAChB9U,EAAQuhB,UAAYA,GACpBvhB,EAAQgR,IAAMA,GACdhR,EAAQ6V,OAASA,GACjB7V,EAAQ6X,aAAetV,GACvBvC,EAAQwhB,KAAOA,GACfxhB,EAAQ0hB,UAAYA,GACpB1hB,EAAQ2hB,WAAaA,GACrB3hB,EAAQ8V,OAASA,GACjB9V,EAAQmW,QAAUA,GAClBnW,EAAQmV,MAAQA,GAChBnV,EAAQmiB,WAAapL,GACrB/W,EAAQ6hB,YAAcA,GACtB7hB,EAAQsH,UAAYA,GACpBtH,EAAQoX,QAAUA,GAClBpX,EAAQuX,UAAYA,GACpBvX,EAAQyX,MAAQA,GAChBzX,EAAQ8hB,UAAYA,GACpB9hB,EAAQwX,OAASA,GACjBxX,EAAQoiB,IAAMhC,GACdpgB,EAAQqiB,SAAWhC,GACnBrgB,EAAQsiB,UAAYhC,GACpBtgB,EAAQuiB,IAAMf,GACdxhB,EAAQwiB,SAAWd,GACnB1hB,EAAQyiB,UAAYd,GACpB3hB,EAAQ0iB,KAAO1C,GACfhgB,EAAQ2iB,UAAY1C,GACpBjgB,EAAQ4iB,WAAa1C,GACrBlgB,EAAQ6iB,QAAUxQ,GAClBrS,EAAQ8iB,cAAgBzL,GACxBrX,EAAQ+iB,aAAezQ,GACvBtS,EAAQgjB,UAAYrZ,GACpB3J,EAAQijB,gBAAkBnS,GAC1B9Q,EAAQkjB,eAAiB9Z,EACzBpJ,EAAQmjB,OAASvS,GACjB5Q,EAAQojB,MAAQxS,GAChB5Q,EAAQqjB,MAAQhP,GAChBrU,EAAQsjB,OAASnQ,GACjBnT,EAAQujB,YAAchD,GACtBvgB,EAAQwjB,aAAehD,GACvBxgB,EAAQyjB,SAAW9hB,EAEnB0C,OAAOqf,eAAe1jB,EAAS,cAAgBiB,OAAO","file":"build/dist/async.min.js"} \ No newline at end of file diff --git a/node_modules/async/doDuring.js b/node_modules/async/doDuring.js deleted file mode 100644 index 6812990..0000000 --- a/node_modules/async/doDuring.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = doDuring; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The post-check version of [`during`]{@link module:ControlFlow.during}. To reflect the difference in - * the order of operations, the arguments `test` and `fn` are switched. - * - * Also a version of [`doWhilst`]{@link module:ControlFlow.doWhilst} with asynchronous `test` function. - * @name doDuring - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.during]{@link module:ControlFlow.during} - * @category Control Flow - * @param {AsyncFunction} fn - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `fn`. Invoked with (...args, callback), where `...args` are the - * non-error args from the previous callback of `fn`. - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `fn` has stopped. `callback` - * will be passed an error if one occurred, otherwise `null`. - */ -function doDuring(fn, test, callback) { - callback = (0, _onlyOnce2.default)(callback || _noop2.default); - var _fn = (0, _wrapAsync2.default)(fn); - var _test = (0, _wrapAsync2.default)(test); - - function next(err /*, ...args*/) { - if (err) return callback(err); - var args = (0, _slice2.default)(arguments, 1); - args.push(check); - _test.apply(this, args); - }; - - function check(err, truth) { - if (err) return callback(err); - if (!truth) return callback(null); - _fn(next); - } - - check(null, true); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/doUntil.js b/node_modules/async/doUntil.js deleted file mode 100644 index 5a6a30f..0000000 --- a/node_modules/async/doUntil.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = doUntil; - -var _doWhilst = require('./doWhilst'); - -var _doWhilst2 = _interopRequireDefault(_doWhilst); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the - * argument ordering differs from `until`. - * - * @name doUntil - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.doWhilst]{@link module:ControlFlow.doWhilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {Function} test - synchronous truth test to perform after each - * execution of `iteratee`. Invoked with any non-error callback results of - * `iteratee`. - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - */ -function doUntil(iteratee, test, callback) { - (0, _doWhilst2.default)(iteratee, function () { - return !test.apply(this, arguments); - }, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/doWhilst.js b/node_modules/async/doWhilst.js deleted file mode 100644 index d935113..0000000 --- a/node_modules/async/doWhilst.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = doWhilst; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in - * the order of operations, the arguments `test` and `iteratee` are switched. - * - * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - * - * @name doWhilst - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - A function which is called each time `test` - * passes. Invoked with (callback). - * @param {Function} test - synchronous truth test to perform after each - * execution of `iteratee`. Invoked with any non-error callback results of - * `iteratee`. - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. - * `callback` will be passed an error and any arguments passed to the final - * `iteratee`'s callback. Invoked with (err, [results]); - */ -function doWhilst(iteratee, test, callback) { - callback = (0, _onlyOnce2.default)(callback || _noop2.default); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - var next = function (err /*, ...args*/) { - if (err) return callback(err); - var args = (0, _slice2.default)(arguments, 1); - if (test.apply(this, args)) return _iteratee(next); - callback.apply(null, [null].concat(args)); - }; - _iteratee(next); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/during.js b/node_modules/async/during.js deleted file mode 100644 index fd73437..0000000 --- a/node_modules/async/during.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = during; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Like [`whilst`]{@link module:ControlFlow.whilst}, except the `test` is an asynchronous function that - * is passed a callback in the form of `function (err, truth)`. If error is - * passed to `test` or `fn`, the main callback is immediately called with the - * value of the error. - * - * @name during - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `fn`. Invoked with (callback). - * @param {AsyncFunction} fn - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `fn` has stopped. `callback` - * will be passed an error, if one occurred, otherwise `null`. - * @example - * - * var count = 0; - * - * async.during( - * function (callback) { - * return callback(null, count < 5); - * }, - * function (callback) { - * count++; - * setTimeout(callback, 1000); - * }, - * function (err) { - * // 5 seconds have passed - * } - * ); - */ -function during(test, fn, callback) { - callback = (0, _onlyOnce2.default)(callback || _noop2.default); - var _fn = (0, _wrapAsync2.default)(fn); - var _test = (0, _wrapAsync2.default)(test); - - function next(err) { - if (err) return callback(err); - _test(check); - } - - function check(err, truth) { - if (err) return callback(err); - if (!truth) return callback(null); - _fn(next); - } - - _test(check); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/each.js b/node_modules/async/each.js deleted file mode 100644 index 4b20af3..0000000 --- a/node_modules/async/each.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = eachLimit; - -var _eachOf = require('./eachOf'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _withoutIndex = require('./internal/withoutIndex'); - -var _withoutIndex2 = _interopRequireDefault(_withoutIndex); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Applies the function `iteratee` to each item in `coll`, in parallel. - * The `iteratee` is called with an item from the list, and a callback for when - * it has finished. If the `iteratee` passes an error to its `callback`, the - * main `callback` (for the `each` function) is immediately called with the - * error. - * - * Note, that since this function applies `iteratee` to each item in parallel, - * there is no guarantee that the iteratee functions will complete in order. - * - * @name each - * @static - * @memberOf module:Collections - * @method - * @alias forEach - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to - * each item in `coll`. Invoked with (item, callback). - * The array index is not passed to the iteratee. - * If you need the index, use `eachOf`. - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @example - * - * // assuming openFiles is an array of file names and saveFile is a function - * // to save the modified contents of that file: - * - * async.each(openFiles, saveFile, function(err){ - * // if any of the saves produced an error, err would equal that error - * }); - * - * // assuming openFiles is an array of file names - * async.each(openFiles, function(file, callback) { - * - * // Perform operation on file here. - * console.log('Processing file ' + file); - * - * if( file.length > 32 ) { - * console.log('This file name is too long'); - * callback('File name too long'); - * } else { - * // Do work to process file here - * console.log('File processed'); - * callback(); - * } - * }, function(err) { - * // if any of the file processing produced an error, err would equal that error - * if( err ) { - * // One of the iterations produced an error. - * // All processing will now stop. - * console.log('A file failed to process'); - * } else { - * console.log('All files have been processed successfully'); - * } - * }); - */ -function eachLimit(coll, iteratee, callback) { - (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/eachLimit.js b/node_modules/async/eachLimit.js deleted file mode 100644 index fff721b..0000000 --- a/node_modules/async/eachLimit.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = eachLimit; - -var _eachOfLimit = require('./internal/eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _withoutIndex = require('./internal/withoutIndex'); - -var _withoutIndex2 = _interopRequireDefault(_withoutIndex); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. - * - * @name eachLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfLimit`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -function eachLimit(coll, limit, iteratee, callback) { - (0, _eachOfLimit2.default)(limit)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/eachOf.js b/node_modules/async/eachOf.js deleted file mode 100644 index 055b9bd..0000000 --- a/node_modules/async/eachOf.js +++ /dev/null @@ -1,111 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (coll, iteratee, callback) { - var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric; - eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback); -}; - -var _isArrayLike = require('lodash/isArrayLike'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _breakLoop = require('./internal/breakLoop'); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// eachOf implementation optimized for array-likes -function eachOfArrayLike(coll, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - var index = 0, - completed = 0, - length = coll.length; - if (length === 0) { - callback(null); - } - - function iteratorCallback(err, value) { - if (err) { - callback(err); - } else if (++completed === length || value === _breakLoop2.default) { - callback(null); - } - } - - for (; index < length; index++) { - iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback)); - } -} - -// a generic version of eachOf which can handle array, object, and iterator cases. -var eachOfGeneric = (0, _doLimit2.default)(_eachOfLimit2.default, Infinity); - -/** - * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument - * to the iteratee. - * - * @name eachOf - * @static - * @memberOf module:Collections - * @method - * @alias forEachOf - * @category Collection - * @see [async.each]{@link module:Collections.each} - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each - * item in `coll`. - * The `key` is the item's key, or index in the case of an array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @example - * - * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; - * var configs = {}; - * - * async.forEachOf(obj, function (value, key, callback) { - * fs.readFile(__dirname + value, "utf8", function (err, data) { - * if (err) return callback(err); - * try { - * configs[key] = JSON.parse(data); - * } catch (e) { - * return callback(e); - * } - * callback(); - * }); - * }, function (err) { - * if (err) console.error(err.message); - * // configs is now a map of JSON data - * doSomethingWith(configs); - * }); - */ -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/eachOfLimit.js b/node_modules/async/eachOfLimit.js deleted file mode 100644 index 30a1329..0000000 --- a/node_modules/async/eachOfLimit.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = eachOfLimit; - -var _eachOfLimit2 = require('./internal/eachOfLimit'); - -var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a - * time. - * - * @name eachOfLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. The `key` is the item's key, or index in the case of an - * array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -function eachOfLimit(coll, limit, iteratee, callback) { - (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/eachOfSeries.js b/node_modules/async/eachOfSeries.js deleted file mode 100644 index 9dfd711..0000000 --- a/node_modules/async/eachOfSeries.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time. - * - * @name eachOfSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Invoked with (err). - */ -exports.default = (0, _doLimit2.default)(_eachOfLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/eachSeries.js b/node_modules/async/eachSeries.js deleted file mode 100644 index 55c7840..0000000 --- a/node_modules/async/eachSeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachLimit = require('./eachLimit'); - -var _eachLimit2 = _interopRequireDefault(_eachLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. - * - * @name eachSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfSeries`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -exports.default = (0, _doLimit2.default)(_eachLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/ensureAsync.js b/node_modules/async/ensureAsync.js deleted file mode 100644 index 1f57aec..0000000 --- a/node_modules/async/ensureAsync.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = ensureAsync; - -var _setImmediate = require('./internal/setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./internal/wrapAsync'); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Wrap an async function and ensure it calls its callback on a later tick of - * the event loop. If the function already calls its callback on a next tick, - * no extra deferral is added. This is useful for preventing stack overflows - * (`RangeError: Maximum call stack size exceeded`) and generally keeping - * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) - * contained. ES2017 `async` functions are returned as-is -- they are immune - * to Zalgo's corrupting influences, as they always resolve on a later tick. - * - * @name ensureAsync - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - an async function, one that expects a node-style - * callback as its last argument. - * @returns {AsyncFunction} Returns a wrapped function with the exact same call - * signature as the function passed in. - * @example - * - * function sometimesAsync(arg, callback) { - * if (cache[arg]) { - * return callback(null, cache[arg]); // this would be synchronous!! - * } else { - * doSomeIO(arg, callback); // this IO would be asynchronous - * } - * } - * - * // this has a risk of stack overflows if many results are cached in a row - * async.mapSeries(args, sometimesAsync, done); - * - * // this will defer sometimesAsync's callback if necessary, - * // preventing stack overflows - * async.mapSeries(args, async.ensureAsync(sometimesAsync), done); - */ -function ensureAsync(fn) { - if ((0, _wrapAsync.isAsync)(fn)) return fn; - return (0, _initialParams2.default)(function (args, callback) { - var sync = true; - args.push(function () { - var innerArgs = arguments; - if (sync) { - (0, _setImmediate2.default)(function () { - callback.apply(null, innerArgs); - }); - } else { - callback.apply(null, innerArgs); - } - }); - fn.apply(this, args); - sync = false; - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/every.js b/node_modules/async/every.js deleted file mode 100644 index d0565b0..0000000 --- a/node_modules/async/every.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -var _notId = require('./internal/notId'); - -var _notId2 = _interopRequireDefault(_notId); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns `true` if every element in `coll` satisfies an async test. If any - * iteratee call returns `false`, the main `callback` is immediately called. - * - * @name every - * @static - * @memberOf module:Collections - * @method - * @alias all - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @example - * - * async.every(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // if result is true then every file exists - * }); - */ -exports.default = (0, _doParallel2.default)((0, _createTester2.default)(_notId2.default, _notId2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/everyLimit.js b/node_modules/async/everyLimit.js deleted file mode 100644 index a1a759a..0000000 --- a/node_modules/async/everyLimit.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -var _notId = require('./internal/notId'); - -var _notId2 = _interopRequireDefault(_notId); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. - * - * @name everyLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - */ -exports.default = (0, _doParallelLimit2.default)((0, _createTester2.default)(_notId2.default, _notId2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/everySeries.js b/node_modules/async/everySeries.js deleted file mode 100644 index 23bfebb..0000000 --- a/node_modules/async/everySeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _everyLimit = require('./everyLimit'); - -var _everyLimit2 = _interopRequireDefault(_everyLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. - * - * @name everySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in series. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - */ -exports.default = (0, _doLimit2.default)(_everyLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/filter.js b/node_modules/async/filter.js deleted file mode 100644 index 54772d5..0000000 --- a/node_modules/async/filter.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter = require('./internal/filter'); - -var _filter2 = _interopRequireDefault(_filter); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns a new array of all the values in `coll` which pass an async truth - * test. This operation is performed in parallel, but the results array will be - * in the same order as the original. - * - * @name filter - * @static - * @memberOf module:Collections - * @method - * @alias select - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @example - * - * async.filter(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, results) { - * // results now equals an array of the existing files - * }); - */ -exports.default = (0, _doParallel2.default)(_filter2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/filterLimit.js b/node_modules/async/filterLimit.js deleted file mode 100644 index 06216f7..0000000 --- a/node_modules/async/filterLimit.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter = require('./internal/filter'); - -var _filter2 = _interopRequireDefault(_filter); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a - * time. - * - * @name filterLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -exports.default = (0, _doParallelLimit2.default)(_filter2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/filterSeries.js b/node_modules/async/filterSeries.js deleted file mode 100644 index e48d966..0000000 --- a/node_modules/async/filterSeries.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filterLimit = require('./filterLimit'); - -var _filterLimit2 = _interopRequireDefault(_filterLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. - * - * @name filterSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results) - */ -exports.default = (0, _doLimit2.default)(_filterLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/find.js b/node_modules/async/find.js deleted file mode 100644 index db46783..0000000 --- a/node_modules/async/find.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -var _findGetResult = require('./internal/findGetResult'); - -var _findGetResult2 = _interopRequireDefault(_findGetResult); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns the first value in `coll` that passes an async truth test. The - * `iteratee` is applied in parallel, meaning the first iteratee to return - * `true` will fire the detect `callback` with that result. That means the - * result might not be the first item in the original `coll` (in terms of order) - * that passes the test. - - * If order within the original `coll` is important, then look at - * [`detectSeries`]{@link module:Collections.detectSeries}. - * - * @name detect - * @static - * @memberOf module:Collections - * @method - * @alias find - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @example - * - * async.detect(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // result now equals the first file in the list that exists - * }); - */ -exports.default = (0, _doParallel2.default)((0, _createTester2.default)(_identity2.default, _findGetResult2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/findLimit.js b/node_modules/async/findLimit.js deleted file mode 100644 index 6bf6560..0000000 --- a/node_modules/async/findLimit.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -var _findGetResult = require('./internal/findGetResult'); - -var _findGetResult2 = _interopRequireDefault(_findGetResult); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a - * time. - * - * @name detectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findLimit - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - */ -exports.default = (0, _doParallelLimit2.default)((0, _createTester2.default)(_identity2.default, _findGetResult2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/findSeries.js b/node_modules/async/findSeries.js deleted file mode 100644 index 6fe16c9..0000000 --- a/node_modules/async/findSeries.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _detectLimit = require('./detectLimit'); - -var _detectLimit2 = _interopRequireDefault(_detectLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time. - * - * @name detectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findSeries - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - */ -exports.default = (0, _doLimit2.default)(_detectLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/foldl.js b/node_modules/async/foldl.js deleted file mode 100644 index 3fb8019..0000000 --- a/node_modules/async/foldl.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reduce; - -var _eachOfSeries = require('./eachOfSeries'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Reduces `coll` into a single value using an async `iteratee` to return each - * successive step. `memo` is the initial state of the reduction. This function - * only operates in series. - * - * For performance reasons, it may make sense to split a call to this function - * into a parallel map, and then use the normal `Array.prototype.reduce` on the - * results. This function is for situations where each step in the reduction - * needs to be async; if you can get the data before reducing it, then it's - * probably a good idea to do so. - * - * @name reduce - * @static - * @memberOf module:Collections - * @method - * @alias inject - * @alias foldl - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee complete with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @example - * - * async.reduce([1,2,3], 0, function(memo, item, callback) { - * // pointless async: - * process.nextTick(function() { - * callback(null, memo + item) - * }); - * }, function(err, result) { - * // result is now equal to the last value of memo, which is 6 - * }); - */ -function reduce(coll, memo, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _eachOfSeries2.default)(coll, function (x, i, callback) { - _iteratee(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/foldr.js b/node_modules/async/foldr.js deleted file mode 100644 index 3d17d32..0000000 --- a/node_modules/async/foldr.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reduceRight; - -var _reduce = require('./reduce'); - -var _reduce2 = _interopRequireDefault(_reduce); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. - * - * @name reduceRight - * @static - * @memberOf module:Collections - * @method - * @see [async.reduce]{@link module:Collections.reduce} - * @alias foldr - * @category Collection - * @param {Array} array - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee complete with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - */ -function reduceRight(array, memo, iteratee, callback) { - var reversed = (0, _slice2.default)(array).reverse(); - (0, _reduce2.default)(reversed, memo, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forEach.js b/node_modules/async/forEach.js deleted file mode 100644 index 4b20af3..0000000 --- a/node_modules/async/forEach.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = eachLimit; - -var _eachOf = require('./eachOf'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _withoutIndex = require('./internal/withoutIndex'); - -var _withoutIndex2 = _interopRequireDefault(_withoutIndex); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Applies the function `iteratee` to each item in `coll`, in parallel. - * The `iteratee` is called with an item from the list, and a callback for when - * it has finished. If the `iteratee` passes an error to its `callback`, the - * main `callback` (for the `each` function) is immediately called with the - * error. - * - * Note, that since this function applies `iteratee` to each item in parallel, - * there is no guarantee that the iteratee functions will complete in order. - * - * @name each - * @static - * @memberOf module:Collections - * @method - * @alias forEach - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to - * each item in `coll`. Invoked with (item, callback). - * The array index is not passed to the iteratee. - * If you need the index, use `eachOf`. - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @example - * - * // assuming openFiles is an array of file names and saveFile is a function - * // to save the modified contents of that file: - * - * async.each(openFiles, saveFile, function(err){ - * // if any of the saves produced an error, err would equal that error - * }); - * - * // assuming openFiles is an array of file names - * async.each(openFiles, function(file, callback) { - * - * // Perform operation on file here. - * console.log('Processing file ' + file); - * - * if( file.length > 32 ) { - * console.log('This file name is too long'); - * callback('File name too long'); - * } else { - * // Do work to process file here - * console.log('File processed'); - * callback(); - * } - * }, function(err) { - * // if any of the file processing produced an error, err would equal that error - * if( err ) { - * // One of the iterations produced an error. - * // All processing will now stop. - * console.log('A file failed to process'); - * } else { - * console.log('All files have been processed successfully'); - * } - * }); - */ -function eachLimit(coll, iteratee, callback) { - (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forEachLimit.js b/node_modules/async/forEachLimit.js deleted file mode 100644 index fff721b..0000000 --- a/node_modules/async/forEachLimit.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = eachLimit; - -var _eachOfLimit = require('./internal/eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _withoutIndex = require('./internal/withoutIndex'); - -var _withoutIndex2 = _interopRequireDefault(_withoutIndex); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. - * - * @name eachLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfLimit`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -function eachLimit(coll, limit, iteratee, callback) { - (0, _eachOfLimit2.default)(limit)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forEachOf.js b/node_modules/async/forEachOf.js deleted file mode 100644 index 055b9bd..0000000 --- a/node_modules/async/forEachOf.js +++ /dev/null @@ -1,111 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (coll, iteratee, callback) { - var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric; - eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback); -}; - -var _isArrayLike = require('lodash/isArrayLike'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _breakLoop = require('./internal/breakLoop'); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// eachOf implementation optimized for array-likes -function eachOfArrayLike(coll, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - var index = 0, - completed = 0, - length = coll.length; - if (length === 0) { - callback(null); - } - - function iteratorCallback(err, value) { - if (err) { - callback(err); - } else if (++completed === length || value === _breakLoop2.default) { - callback(null); - } - } - - for (; index < length; index++) { - iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback)); - } -} - -// a generic version of eachOf which can handle array, object, and iterator cases. -var eachOfGeneric = (0, _doLimit2.default)(_eachOfLimit2.default, Infinity); - -/** - * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument - * to the iteratee. - * - * @name eachOf - * @static - * @memberOf module:Collections - * @method - * @alias forEachOf - * @category Collection - * @see [async.each]{@link module:Collections.each} - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each - * item in `coll`. - * The `key` is the item's key, or index in the case of an array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @example - * - * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; - * var configs = {}; - * - * async.forEachOf(obj, function (value, key, callback) { - * fs.readFile(__dirname + value, "utf8", function (err, data) { - * if (err) return callback(err); - * try { - * configs[key] = JSON.parse(data); - * } catch (e) { - * return callback(e); - * } - * callback(); - * }); - * }, function (err) { - * if (err) console.error(err.message); - * // configs is now a map of JSON data - * doSomethingWith(configs); - * }); - */ -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forEachOfLimit.js b/node_modules/async/forEachOfLimit.js deleted file mode 100644 index 30a1329..0000000 --- a/node_modules/async/forEachOfLimit.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = eachOfLimit; - -var _eachOfLimit2 = require('./internal/eachOfLimit'); - -var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a - * time. - * - * @name eachOfLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. The `key` is the item's key, or index in the case of an - * array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -function eachOfLimit(coll, limit, iteratee, callback) { - (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forEachOfSeries.js b/node_modules/async/forEachOfSeries.js deleted file mode 100644 index 9dfd711..0000000 --- a/node_modules/async/forEachOfSeries.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time. - * - * @name eachOfSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Invoked with (err). - */ -exports.default = (0, _doLimit2.default)(_eachOfLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forEachSeries.js b/node_modules/async/forEachSeries.js deleted file mode 100644 index 55c7840..0000000 --- a/node_modules/async/forEachSeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachLimit = require('./eachLimit'); - -var _eachLimit2 = _interopRequireDefault(_eachLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. - * - * @name eachSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfSeries`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -exports.default = (0, _doLimit2.default)(_eachLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forever.js b/node_modules/async/forever.js deleted file mode 100644 index 6c7b8a4..0000000 --- a/node_modules/async/forever.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = forever; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _ensureAsync = require('./ensureAsync'); - -var _ensureAsync2 = _interopRequireDefault(_ensureAsync); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Calls the asynchronous function `fn` with a callback parameter that allows it - * to call itself again, in series, indefinitely. - - * If an error is passed to the callback then `errback` is called with the - * error, and execution stops, otherwise it will never be called. - * - * @name forever - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} fn - an async function to call repeatedly. - * Invoked with (next). - * @param {Function} [errback] - when `fn` passes an error to it's callback, - * this function will be called, and execution stops. Invoked with (err). - * @example - * - * async.forever( - * function(next) { - * // next is suitable for passing to things that need a callback(err [, whatever]); - * // it will result in this function being called again. - * }, - * function(err) { - * // if next is called with a value in its first parameter, it will appear - * // in here as 'err', and execution will stop. - * } - * ); - */ -function forever(fn, errback) { - var done = (0, _onlyOnce2.default)(errback || _noop2.default); - var task = (0, _wrapAsync2.default)((0, _ensureAsync2.default)(fn)); - - function next(err) { - if (err) return done(err); - task(next); - } - next(); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/groupBy.js b/node_modules/async/groupBy.js deleted file mode 100644 index 755cba7..0000000 --- a/node_modules/async/groupBy.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -var _groupByLimit = require('./groupByLimit'); - -var _groupByLimit2 = _interopRequireDefault(_groupByLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns a new object, where each value corresponds to an array of items, from - * `coll`, that returned the corresponding key. That is, the keys of the object - * correspond to the values passed to the `iteratee` callback. - * - * Note: Since this function applies the `iteratee` to each item in parallel, - * there is no guarantee that the `iteratee` functions will complete in order. - * However, the values for each key in the `result` will be in the same order as - * the original `coll`. For Objects, the values will roughly be in the order of - * the original Objects' keys (but this can vary across JavaScript engines). - * - * @name groupBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - * @example - * - * async.groupBy(['userId1', 'userId2', 'userId3'], function(userId, callback) { - * db.findById(userId, function(err, user) { - * if (err) return callback(err); - * return callback(null, user.age); - * }); - * }, function(err, result) { - * // result is object containing the userIds grouped by age - * // e.g. { 30: ['userId1', 'userId3'], 42: ['userId2']}; - * }); - */ -exports.default = (0, _doLimit2.default)(_groupByLimit2.default, Infinity); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/groupByLimit.js b/node_modules/async/groupByLimit.js deleted file mode 100644 index fec13f8..0000000 --- a/node_modules/async/groupByLimit.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (coll, limit, iteratee, callback) { - callback = callback || _noop2.default; - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _mapLimit2.default)(coll, limit, function (val, callback) { - _iteratee(val, function (err, key) { - if (err) return callback(err); - return callback(null, { key: key, val: val }); - }); - }, function (err, mapResults) { - var result = {}; - // from MDN, handle object having an `hasOwnProperty` prop - var hasOwnProperty = Object.prototype.hasOwnProperty; - - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - var key = mapResults[i].key; - var val = mapResults[i].val; - - if (hasOwnProperty.call(result, key)) { - result[key].push(val); - } else { - result[key] = [val]; - } - } - } - - return callback(err, result); - }); -}; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _mapLimit = require('./mapLimit'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -; -/** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time. - * - * @name groupByLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - */ -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/groupBySeries.js b/node_modules/async/groupBySeries.js deleted file mode 100644 index b94805e..0000000 --- a/node_modules/async/groupBySeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -var _groupByLimit = require('./groupByLimit'); - -var _groupByLimit2 = _interopRequireDefault(_groupByLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time. - * - * @name groupBySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - */ -exports.default = (0, _doLimit2.default)(_groupByLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/index.js b/node_modules/async/index.js deleted file mode 100644 index c39d8d8..0000000 --- a/node_modules/async/index.js +++ /dev/null @@ -1,582 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.wrapSync = exports.selectSeries = exports.selectLimit = exports.select = exports.foldr = exports.foldl = exports.inject = exports.forEachOfLimit = exports.forEachOfSeries = exports.forEachOf = exports.forEachLimit = exports.forEachSeries = exports.forEach = exports.findSeries = exports.findLimit = exports.find = exports.anySeries = exports.anyLimit = exports.any = exports.allSeries = exports.allLimit = exports.all = exports.whilst = exports.waterfall = exports.until = exports.unmemoize = exports.tryEach = exports.transform = exports.timesSeries = exports.timesLimit = exports.times = exports.timeout = exports.sortBy = exports.someSeries = exports.someLimit = exports.some = exports.setImmediate = exports.series = exports.seq = exports.retryable = exports.retry = exports.rejectSeries = exports.rejectLimit = exports.reject = exports.reflectAll = exports.reflect = exports.reduceRight = exports.reduce = exports.race = exports.queue = exports.priorityQueue = exports.parallelLimit = exports.parallel = exports.nextTick = exports.memoize = exports.mapValuesSeries = exports.mapValuesLimit = exports.mapValues = exports.mapSeries = exports.mapLimit = exports.map = exports.log = exports.groupBySeries = exports.groupByLimit = exports.groupBy = exports.forever = exports.filterSeries = exports.filterLimit = exports.filter = exports.everySeries = exports.everyLimit = exports.every = exports.ensureAsync = exports.eachSeries = exports.eachOfSeries = exports.eachOfLimit = exports.eachOf = exports.eachLimit = exports.each = exports.during = exports.doWhilst = exports.doUntil = exports.doDuring = exports.dir = exports.detectSeries = exports.detectLimit = exports.detect = exports.constant = exports.concatSeries = exports.concatLimit = exports.concat = exports.compose = exports.cargo = exports.autoInject = exports.auto = exports.asyncify = exports.applyEachSeries = exports.applyEach = exports.apply = undefined; - -var _apply = require('./apply'); - -var _apply2 = _interopRequireDefault(_apply); - -var _applyEach = require('./applyEach'); - -var _applyEach2 = _interopRequireDefault(_applyEach); - -var _applyEachSeries = require('./applyEachSeries'); - -var _applyEachSeries2 = _interopRequireDefault(_applyEachSeries); - -var _asyncify = require('./asyncify'); - -var _asyncify2 = _interopRequireDefault(_asyncify); - -var _auto = require('./auto'); - -var _auto2 = _interopRequireDefault(_auto); - -var _autoInject = require('./autoInject'); - -var _autoInject2 = _interopRequireDefault(_autoInject); - -var _cargo = require('./cargo'); - -var _cargo2 = _interopRequireDefault(_cargo); - -var _compose = require('./compose'); - -var _compose2 = _interopRequireDefault(_compose); - -var _concat = require('./concat'); - -var _concat2 = _interopRequireDefault(_concat); - -var _concatLimit = require('./concatLimit'); - -var _concatLimit2 = _interopRequireDefault(_concatLimit); - -var _concatSeries = require('./concatSeries'); - -var _concatSeries2 = _interopRequireDefault(_concatSeries); - -var _constant = require('./constant'); - -var _constant2 = _interopRequireDefault(_constant); - -var _detect = require('./detect'); - -var _detect2 = _interopRequireDefault(_detect); - -var _detectLimit = require('./detectLimit'); - -var _detectLimit2 = _interopRequireDefault(_detectLimit); - -var _detectSeries = require('./detectSeries'); - -var _detectSeries2 = _interopRequireDefault(_detectSeries); - -var _dir = require('./dir'); - -var _dir2 = _interopRequireDefault(_dir); - -var _doDuring = require('./doDuring'); - -var _doDuring2 = _interopRequireDefault(_doDuring); - -var _doUntil = require('./doUntil'); - -var _doUntil2 = _interopRequireDefault(_doUntil); - -var _doWhilst = require('./doWhilst'); - -var _doWhilst2 = _interopRequireDefault(_doWhilst); - -var _during = require('./during'); - -var _during2 = _interopRequireDefault(_during); - -var _each = require('./each'); - -var _each2 = _interopRequireDefault(_each); - -var _eachLimit = require('./eachLimit'); - -var _eachLimit2 = _interopRequireDefault(_eachLimit); - -var _eachOf = require('./eachOf'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _eachOfSeries = require('./eachOfSeries'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _eachSeries = require('./eachSeries'); - -var _eachSeries2 = _interopRequireDefault(_eachSeries); - -var _ensureAsync = require('./ensureAsync'); - -var _ensureAsync2 = _interopRequireDefault(_ensureAsync); - -var _every = require('./every'); - -var _every2 = _interopRequireDefault(_every); - -var _everyLimit = require('./everyLimit'); - -var _everyLimit2 = _interopRequireDefault(_everyLimit); - -var _everySeries = require('./everySeries'); - -var _everySeries2 = _interopRequireDefault(_everySeries); - -var _filter = require('./filter'); - -var _filter2 = _interopRequireDefault(_filter); - -var _filterLimit = require('./filterLimit'); - -var _filterLimit2 = _interopRequireDefault(_filterLimit); - -var _filterSeries = require('./filterSeries'); - -var _filterSeries2 = _interopRequireDefault(_filterSeries); - -var _forever = require('./forever'); - -var _forever2 = _interopRequireDefault(_forever); - -var _groupBy = require('./groupBy'); - -var _groupBy2 = _interopRequireDefault(_groupBy); - -var _groupByLimit = require('./groupByLimit'); - -var _groupByLimit2 = _interopRequireDefault(_groupByLimit); - -var _groupBySeries = require('./groupBySeries'); - -var _groupBySeries2 = _interopRequireDefault(_groupBySeries); - -var _log = require('./log'); - -var _log2 = _interopRequireDefault(_log); - -var _map = require('./map'); - -var _map2 = _interopRequireDefault(_map); - -var _mapLimit = require('./mapLimit'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -var _mapSeries = require('./mapSeries'); - -var _mapSeries2 = _interopRequireDefault(_mapSeries); - -var _mapValues = require('./mapValues'); - -var _mapValues2 = _interopRequireDefault(_mapValues); - -var _mapValuesLimit = require('./mapValuesLimit'); - -var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit); - -var _mapValuesSeries = require('./mapValuesSeries'); - -var _mapValuesSeries2 = _interopRequireDefault(_mapValuesSeries); - -var _memoize = require('./memoize'); - -var _memoize2 = _interopRequireDefault(_memoize); - -var _nextTick = require('./nextTick'); - -var _nextTick2 = _interopRequireDefault(_nextTick); - -var _parallel = require('./parallel'); - -var _parallel2 = _interopRequireDefault(_parallel); - -var _parallelLimit = require('./parallelLimit'); - -var _parallelLimit2 = _interopRequireDefault(_parallelLimit); - -var _priorityQueue = require('./priorityQueue'); - -var _priorityQueue2 = _interopRequireDefault(_priorityQueue); - -var _queue = require('./queue'); - -var _queue2 = _interopRequireDefault(_queue); - -var _race = require('./race'); - -var _race2 = _interopRequireDefault(_race); - -var _reduce = require('./reduce'); - -var _reduce2 = _interopRequireDefault(_reduce); - -var _reduceRight = require('./reduceRight'); - -var _reduceRight2 = _interopRequireDefault(_reduceRight); - -var _reflect = require('./reflect'); - -var _reflect2 = _interopRequireDefault(_reflect); - -var _reflectAll = require('./reflectAll'); - -var _reflectAll2 = _interopRequireDefault(_reflectAll); - -var _reject = require('./reject'); - -var _reject2 = _interopRequireDefault(_reject); - -var _rejectLimit = require('./rejectLimit'); - -var _rejectLimit2 = _interopRequireDefault(_rejectLimit); - -var _rejectSeries = require('./rejectSeries'); - -var _rejectSeries2 = _interopRequireDefault(_rejectSeries); - -var _retry = require('./retry'); - -var _retry2 = _interopRequireDefault(_retry); - -var _retryable = require('./retryable'); - -var _retryable2 = _interopRequireDefault(_retryable); - -var _seq = require('./seq'); - -var _seq2 = _interopRequireDefault(_seq); - -var _series = require('./series'); - -var _series2 = _interopRequireDefault(_series); - -var _setImmediate = require('./setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _some = require('./some'); - -var _some2 = _interopRequireDefault(_some); - -var _someLimit = require('./someLimit'); - -var _someLimit2 = _interopRequireDefault(_someLimit); - -var _someSeries = require('./someSeries'); - -var _someSeries2 = _interopRequireDefault(_someSeries); - -var _sortBy = require('./sortBy'); - -var _sortBy2 = _interopRequireDefault(_sortBy); - -var _timeout = require('./timeout'); - -var _timeout2 = _interopRequireDefault(_timeout); - -var _times = require('./times'); - -var _times2 = _interopRequireDefault(_times); - -var _timesLimit = require('./timesLimit'); - -var _timesLimit2 = _interopRequireDefault(_timesLimit); - -var _timesSeries = require('./timesSeries'); - -var _timesSeries2 = _interopRequireDefault(_timesSeries); - -var _transform = require('./transform'); - -var _transform2 = _interopRequireDefault(_transform); - -var _tryEach = require('./tryEach'); - -var _tryEach2 = _interopRequireDefault(_tryEach); - -var _unmemoize = require('./unmemoize'); - -var _unmemoize2 = _interopRequireDefault(_unmemoize); - -var _until = require('./until'); - -var _until2 = _interopRequireDefault(_until); - -var _waterfall = require('./waterfall'); - -var _waterfall2 = _interopRequireDefault(_waterfall); - -var _whilst = require('./whilst'); - -var _whilst2 = _interopRequireDefault(_whilst); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = { - apply: _apply2.default, - applyEach: _applyEach2.default, - applyEachSeries: _applyEachSeries2.default, - asyncify: _asyncify2.default, - auto: _auto2.default, - autoInject: _autoInject2.default, - cargo: _cargo2.default, - compose: _compose2.default, - concat: _concat2.default, - concatLimit: _concatLimit2.default, - concatSeries: _concatSeries2.default, - constant: _constant2.default, - detect: _detect2.default, - detectLimit: _detectLimit2.default, - detectSeries: _detectSeries2.default, - dir: _dir2.default, - doDuring: _doDuring2.default, - doUntil: _doUntil2.default, - doWhilst: _doWhilst2.default, - during: _during2.default, - each: _each2.default, - eachLimit: _eachLimit2.default, - eachOf: _eachOf2.default, - eachOfLimit: _eachOfLimit2.default, - eachOfSeries: _eachOfSeries2.default, - eachSeries: _eachSeries2.default, - ensureAsync: _ensureAsync2.default, - every: _every2.default, - everyLimit: _everyLimit2.default, - everySeries: _everySeries2.default, - filter: _filter2.default, - filterLimit: _filterLimit2.default, - filterSeries: _filterSeries2.default, - forever: _forever2.default, - groupBy: _groupBy2.default, - groupByLimit: _groupByLimit2.default, - groupBySeries: _groupBySeries2.default, - log: _log2.default, - map: _map2.default, - mapLimit: _mapLimit2.default, - mapSeries: _mapSeries2.default, - mapValues: _mapValues2.default, - mapValuesLimit: _mapValuesLimit2.default, - mapValuesSeries: _mapValuesSeries2.default, - memoize: _memoize2.default, - nextTick: _nextTick2.default, - parallel: _parallel2.default, - parallelLimit: _parallelLimit2.default, - priorityQueue: _priorityQueue2.default, - queue: _queue2.default, - race: _race2.default, - reduce: _reduce2.default, - reduceRight: _reduceRight2.default, - reflect: _reflect2.default, - reflectAll: _reflectAll2.default, - reject: _reject2.default, - rejectLimit: _rejectLimit2.default, - rejectSeries: _rejectSeries2.default, - retry: _retry2.default, - retryable: _retryable2.default, - seq: _seq2.default, - series: _series2.default, - setImmediate: _setImmediate2.default, - some: _some2.default, - someLimit: _someLimit2.default, - someSeries: _someSeries2.default, - sortBy: _sortBy2.default, - timeout: _timeout2.default, - times: _times2.default, - timesLimit: _timesLimit2.default, - timesSeries: _timesSeries2.default, - transform: _transform2.default, - tryEach: _tryEach2.default, - unmemoize: _unmemoize2.default, - until: _until2.default, - waterfall: _waterfall2.default, - whilst: _whilst2.default, - - // aliases - all: _every2.default, - allLimit: _everyLimit2.default, - allSeries: _everySeries2.default, - any: _some2.default, - anyLimit: _someLimit2.default, - anySeries: _someSeries2.default, - find: _detect2.default, - findLimit: _detectLimit2.default, - findSeries: _detectSeries2.default, - forEach: _each2.default, - forEachSeries: _eachSeries2.default, - forEachLimit: _eachLimit2.default, - forEachOf: _eachOf2.default, - forEachOfSeries: _eachOfSeries2.default, - forEachOfLimit: _eachOfLimit2.default, - inject: _reduce2.default, - foldl: _reduce2.default, - foldr: _reduceRight2.default, - select: _filter2.default, - selectLimit: _filterLimit2.default, - selectSeries: _filterSeries2.default, - wrapSync: _asyncify2.default -}; /** - * An "async function" in the context of Async is an asynchronous function with - * a variable number of parameters, with the final parameter being a callback. - * (`function (arg1, arg2, ..., callback) {}`) - * The final callback is of the form `callback(err, results...)`, which must be - * called once the function is completed. The callback should be called with a - * Error as its first argument to signal that an error occurred. - * Otherwise, if no error occurred, it should be called with `null` as the first - * argument, and any additional `result` arguments that may apply, to signal - * successful completion. - * The callback must be called exactly once, ideally on a later tick of the - * JavaScript event loop. - * - * This type of function is also referred to as a "Node-style async function", - * or a "continuation passing-style function" (CPS). Most of the methods of this - * library are themselves CPS/Node-style async functions, or functions that - * return CPS/Node-style async functions. - * - * Wherever we accept a Node-style async function, we also directly accept an - * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}. - * In this case, the `async` function will not be passed a final callback - * argument, and any thrown error will be used as the `err` argument of the - * implicit callback, and the return value will be used as the `result` value. - * (i.e. a `rejected` of the returned Promise becomes the `err` callback - * argument, and a `resolved` value becomes the `result`.) - * - * Note, due to JavaScript limitations, we can only detect native `async` - * functions and not transpilied implementations. - * Your environment must have `async`/`await` support for this to work. - * (e.g. Node > v7.6, or a recent version of a modern browser). - * If you are using `async` functions through a transpiler (e.g. Babel), you - * must still wrap the function with [asyncify]{@link module:Utils.asyncify}, - * because the `async function` will be compiled to an ordinary function that - * returns a promise. - * - * @typedef {Function} AsyncFunction - * @static - */ - -/** - * Async is a utility module which provides straight-forward, powerful functions - * for working with asynchronous JavaScript. Although originally designed for - * use with [Node.js](http://nodejs.org) and installable via - * `npm install --save async`, it can also be used directly in the browser. - * @module async - * @see AsyncFunction - */ - -/** - * A collection of `async` functions for manipulating collections, such as - * arrays and objects. - * @module Collections - */ - -/** - * A collection of `async` functions for controlling the flow through a script. - * @module ControlFlow - */ - -/** - * A collection of `async` utility functions. - * @module Utils - */ - -exports.apply = _apply2.default; -exports.applyEach = _applyEach2.default; -exports.applyEachSeries = _applyEachSeries2.default; -exports.asyncify = _asyncify2.default; -exports.auto = _auto2.default; -exports.autoInject = _autoInject2.default; -exports.cargo = _cargo2.default; -exports.compose = _compose2.default; -exports.concat = _concat2.default; -exports.concatLimit = _concatLimit2.default; -exports.concatSeries = _concatSeries2.default; -exports.constant = _constant2.default; -exports.detect = _detect2.default; -exports.detectLimit = _detectLimit2.default; -exports.detectSeries = _detectSeries2.default; -exports.dir = _dir2.default; -exports.doDuring = _doDuring2.default; -exports.doUntil = _doUntil2.default; -exports.doWhilst = _doWhilst2.default; -exports.during = _during2.default; -exports.each = _each2.default; -exports.eachLimit = _eachLimit2.default; -exports.eachOf = _eachOf2.default; -exports.eachOfLimit = _eachOfLimit2.default; -exports.eachOfSeries = _eachOfSeries2.default; -exports.eachSeries = _eachSeries2.default; -exports.ensureAsync = _ensureAsync2.default; -exports.every = _every2.default; -exports.everyLimit = _everyLimit2.default; -exports.everySeries = _everySeries2.default; -exports.filter = _filter2.default; -exports.filterLimit = _filterLimit2.default; -exports.filterSeries = _filterSeries2.default; -exports.forever = _forever2.default; -exports.groupBy = _groupBy2.default; -exports.groupByLimit = _groupByLimit2.default; -exports.groupBySeries = _groupBySeries2.default; -exports.log = _log2.default; -exports.map = _map2.default; -exports.mapLimit = _mapLimit2.default; -exports.mapSeries = _mapSeries2.default; -exports.mapValues = _mapValues2.default; -exports.mapValuesLimit = _mapValuesLimit2.default; -exports.mapValuesSeries = _mapValuesSeries2.default; -exports.memoize = _memoize2.default; -exports.nextTick = _nextTick2.default; -exports.parallel = _parallel2.default; -exports.parallelLimit = _parallelLimit2.default; -exports.priorityQueue = _priorityQueue2.default; -exports.queue = _queue2.default; -exports.race = _race2.default; -exports.reduce = _reduce2.default; -exports.reduceRight = _reduceRight2.default; -exports.reflect = _reflect2.default; -exports.reflectAll = _reflectAll2.default; -exports.reject = _reject2.default; -exports.rejectLimit = _rejectLimit2.default; -exports.rejectSeries = _rejectSeries2.default; -exports.retry = _retry2.default; -exports.retryable = _retryable2.default; -exports.seq = _seq2.default; -exports.series = _series2.default; -exports.setImmediate = _setImmediate2.default; -exports.some = _some2.default; -exports.someLimit = _someLimit2.default; -exports.someSeries = _someSeries2.default; -exports.sortBy = _sortBy2.default; -exports.timeout = _timeout2.default; -exports.times = _times2.default; -exports.timesLimit = _timesLimit2.default; -exports.timesSeries = _timesSeries2.default; -exports.transform = _transform2.default; -exports.tryEach = _tryEach2.default; -exports.unmemoize = _unmemoize2.default; -exports.until = _until2.default; -exports.waterfall = _waterfall2.default; -exports.whilst = _whilst2.default; -exports.all = _every2.default; -exports.allLimit = _everyLimit2.default; -exports.allSeries = _everySeries2.default; -exports.any = _some2.default; -exports.anyLimit = _someLimit2.default; -exports.anySeries = _someSeries2.default; -exports.find = _detect2.default; -exports.findLimit = _detectLimit2.default; -exports.findSeries = _detectSeries2.default; -exports.forEach = _each2.default; -exports.forEachSeries = _eachSeries2.default; -exports.forEachLimit = _eachLimit2.default; -exports.forEachOf = _eachOf2.default; -exports.forEachOfSeries = _eachOfSeries2.default; -exports.forEachOfLimit = _eachOfLimit2.default; -exports.inject = _reduce2.default; -exports.foldl = _reduce2.default; -exports.foldr = _reduceRight2.default; -exports.select = _filter2.default; -exports.selectLimit = _filterLimit2.default; -exports.selectSeries = _filterSeries2.default; -exports.wrapSync = _asyncify2.default; \ No newline at end of file diff --git a/node_modules/async/inject.js b/node_modules/async/inject.js deleted file mode 100644 index 3fb8019..0000000 --- a/node_modules/async/inject.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reduce; - -var _eachOfSeries = require('./eachOfSeries'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Reduces `coll` into a single value using an async `iteratee` to return each - * successive step. `memo` is the initial state of the reduction. This function - * only operates in series. - * - * For performance reasons, it may make sense to split a call to this function - * into a parallel map, and then use the normal `Array.prototype.reduce` on the - * results. This function is for situations where each step in the reduction - * needs to be async; if you can get the data before reducing it, then it's - * probably a good idea to do so. - * - * @name reduce - * @static - * @memberOf module:Collections - * @method - * @alias inject - * @alias foldl - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee complete with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @example - * - * async.reduce([1,2,3], 0, function(memo, item, callback) { - * // pointless async: - * process.nextTick(function() { - * callback(null, memo + item) - * }); - * }, function(err, result) { - * // result is now equal to the last value of memo, which is 6 - * }); - */ -function reduce(coll, memo, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _eachOfSeries2.default)(coll, function (x, i, callback) { - _iteratee(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/DoublyLinkedList.js b/node_modules/async/internal/DoublyLinkedList.js deleted file mode 100644 index 7e71728..0000000 --- a/node_modules/async/internal/DoublyLinkedList.js +++ /dev/null @@ -1,88 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = DLL; -// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation -// used for queues. This implementation assumes that the node provided by the user can be modified -// to adjust the next and last properties. We implement only the minimal functionality -// for queue support. -function DLL() { - this.head = this.tail = null; - this.length = 0; -} - -function setInitial(dll, node) { - dll.length = 1; - dll.head = dll.tail = node; -} - -DLL.prototype.removeLink = function (node) { - if (node.prev) node.prev.next = node.next;else this.head = node.next; - if (node.next) node.next.prev = node.prev;else this.tail = node.prev; - - node.prev = node.next = null; - this.length -= 1; - return node; -}; - -DLL.prototype.empty = function () { - while (this.head) this.shift(); - return this; -}; - -DLL.prototype.insertAfter = function (node, newNode) { - newNode.prev = node; - newNode.next = node.next; - if (node.next) node.next.prev = newNode;else this.tail = newNode; - node.next = newNode; - this.length += 1; -}; - -DLL.prototype.insertBefore = function (node, newNode) { - newNode.prev = node.prev; - newNode.next = node; - if (node.prev) node.prev.next = newNode;else this.head = newNode; - node.prev = newNode; - this.length += 1; -}; - -DLL.prototype.unshift = function (node) { - if (this.head) this.insertBefore(this.head, node);else setInitial(this, node); -}; - -DLL.prototype.push = function (node) { - if (this.tail) this.insertAfter(this.tail, node);else setInitial(this, node); -}; - -DLL.prototype.shift = function () { - return this.head && this.removeLink(this.head); -}; - -DLL.prototype.pop = function () { - return this.tail && this.removeLink(this.tail); -}; - -DLL.prototype.toArray = function () { - var arr = Array(this.length); - var curr = this.head; - for (var idx = 0; idx < this.length; idx++) { - arr[idx] = curr.data; - curr = curr.next; - } - return arr; -}; - -DLL.prototype.remove = function (testFn) { - var curr = this.head; - while (!!curr) { - var next = curr.next; - if (testFn(curr)) { - this.removeLink(curr); - } - curr = next; - } - return this; -}; -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/applyEach.js b/node_modules/async/internal/applyEach.js deleted file mode 100644 index 322e03c..0000000 --- a/node_modules/async/internal/applyEach.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = applyEach; - -var _slice = require('./slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _initialParams = require('./initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function applyEach(eachfn) { - return function (fns /*, ...args*/) { - var args = (0, _slice2.default)(arguments, 1); - var go = (0, _initialParams2.default)(function (args, callback) { - var that = this; - return eachfn(fns, function (fn, cb) { - (0, _wrapAsync2.default)(fn).apply(that, args.concat(cb)); - }, callback); - }); - if (args.length) { - return go.apply(this, args); - } else { - return go; - } - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/breakLoop.js b/node_modules/async/internal/breakLoop.js deleted file mode 100644 index 1065058..0000000 --- a/node_modules/async/internal/breakLoop.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -// A temporary value used to identify if the loop should be broken. -// See #1064, #1293 -exports.default = {}; -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/consoleFunc.js b/node_modules/async/internal/consoleFunc.js deleted file mode 100644 index 603f48e..0000000 --- a/node_modules/async/internal/consoleFunc.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = consoleFunc; - -var _arrayEach = require('lodash/_arrayEach'); - -var _arrayEach2 = _interopRequireDefault(_arrayEach); - -var _slice = require('./slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function consoleFunc(name) { - return function (fn /*, ...args*/) { - var args = (0, _slice2.default)(arguments, 1); - args.push(function (err /*, ...args*/) { - var args = (0, _slice2.default)(arguments, 1); - if (typeof console === 'object') { - if (err) { - if (console.error) { - console.error(err); - } - } else if (console[name]) { - (0, _arrayEach2.default)(args, function (x) { - console[name](x); - }); - } - } - }); - (0, _wrapAsync2.default)(fn).apply(null, args); - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/createTester.js b/node_modules/async/internal/createTester.js deleted file mode 100644 index ce96e8b..0000000 --- a/node_modules/async/internal/createTester.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _createTester; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _breakLoop = require('./breakLoop'); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _createTester(check, getResult) { - return function (eachfn, arr, iteratee, cb) { - cb = cb || _noop2.default; - var testPassed = false; - var testResult; - eachfn(arr, function (value, _, callback) { - iteratee(value, function (err, result) { - if (err) { - callback(err); - } else if (check(result) && !testResult) { - testPassed = true; - testResult = getResult(true, value); - callback(null, _breakLoop2.default); - } else { - callback(); - } - }); - }, function (err) { - if (err) { - cb(err); - } else { - cb(null, testPassed ? testResult : getResult(false)); - } - }); - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/doLimit.js b/node_modules/async/internal/doLimit.js deleted file mode 100644 index 963c608..0000000 --- a/node_modules/async/internal/doLimit.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = doLimit; -function doLimit(fn, limit) { - return function (iterable, iteratee, callback) { - return fn(iterable, limit, iteratee, callback); - }; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/doParallel.js b/node_modules/async/internal/doParallel.js deleted file mode 100644 index bb40207..0000000 --- a/node_modules/async/internal/doParallel.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = doParallel; - -var _eachOf = require('../eachOf'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function doParallel(fn) { - return function (obj, iteratee, callback) { - return fn(_eachOf2.default, obj, (0, _wrapAsync2.default)(iteratee), callback); - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/doParallelLimit.js b/node_modules/async/internal/doParallelLimit.js deleted file mode 100644 index a7e963d..0000000 --- a/node_modules/async/internal/doParallelLimit.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = doParallelLimit; - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function doParallelLimit(fn) { - return function (obj, limit, iteratee, callback) { - return fn((0, _eachOfLimit2.default)(limit), obj, (0, _wrapAsync2.default)(iteratee), callback); - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/eachOfLimit.js b/node_modules/async/internal/eachOfLimit.js deleted file mode 100644 index 6f6fe55..0000000 --- a/node_modules/async/internal/eachOfLimit.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _eachOfLimit; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./once'); - -var _once2 = _interopRequireDefault(_once); - -var _iterator = require('./iterator'); - -var _iterator2 = _interopRequireDefault(_iterator); - -var _onlyOnce = require('./onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _breakLoop = require('./breakLoop'); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _eachOfLimit(limit) { - return function (obj, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - if (limit <= 0 || !obj) { - return callback(null); - } - var nextElem = (0, _iterator2.default)(obj); - var done = false; - var running = 0; - var looping = false; - - function iterateeCallback(err, value) { - running -= 1; - if (err) { - done = true; - callback(err); - } else if (value === _breakLoop2.default || done && running <= 0) { - done = true; - return callback(null); - } else if (!looping) { - replenish(); - } - } - - function replenish() { - looping = true; - while (running < limit && !done) { - var elem = nextElem(); - if (elem === null) { - done = true; - if (running <= 0) { - callback(null); - } - return; - } - running += 1; - iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback)); - } - looping = false; - } - - replenish(); - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/filter.js b/node_modules/async/internal/filter.js deleted file mode 100644 index 74f3986..0000000 --- a/node_modules/async/internal/filter.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _filter; - -var _arrayMap = require('lodash/_arrayMap'); - -var _arrayMap2 = _interopRequireDefault(_arrayMap); - -var _isArrayLike = require('lodash/isArrayLike'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _baseProperty = require('lodash/_baseProperty'); - -var _baseProperty2 = _interopRequireDefault(_baseProperty); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function filterArray(eachfn, arr, iteratee, callback) { - var truthValues = new Array(arr.length); - eachfn(arr, function (x, index, callback) { - iteratee(x, function (err, v) { - truthValues[index] = !!v; - callback(err); - }); - }, function (err) { - if (err) return callback(err); - var results = []; - for (var i = 0; i < arr.length; i++) { - if (truthValues[i]) results.push(arr[i]); - } - callback(null, results); - }); -} - -function filterGeneric(eachfn, coll, iteratee, callback) { - var results = []; - eachfn(coll, function (x, index, callback) { - iteratee(x, function (err, v) { - if (err) { - callback(err); - } else { - if (v) { - results.push({ index: index, value: x }); - } - callback(); - } - }); - }, function (err) { - if (err) { - callback(err); - } else { - callback(null, (0, _arrayMap2.default)(results.sort(function (a, b) { - return a.index - b.index; - }), (0, _baseProperty2.default)('value'))); - } - }); -} - -function _filter(eachfn, coll, iteratee, callback) { - var filter = (0, _isArrayLike2.default)(coll) ? filterArray : filterGeneric; - filter(eachfn, coll, (0, _wrapAsync2.default)(iteratee), callback || _noop2.default); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/findGetResult.js b/node_modules/async/internal/findGetResult.js deleted file mode 100644 index f8d3fe0..0000000 --- a/node_modules/async/internal/findGetResult.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _findGetResult; -function _findGetResult(v, x) { - return x; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/getIterator.js b/node_modules/async/internal/getIterator.js deleted file mode 100644 index 3eadd24..0000000 --- a/node_modules/async/internal/getIterator.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (coll) { - return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol](); -}; - -var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator; - -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/initialParams.js b/node_modules/async/internal/initialParams.js deleted file mode 100644 index df02cb1..0000000 --- a/node_modules/async/internal/initialParams.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (fn) { - return function () /*...args, callback*/{ - var args = (0, _slice2.default)(arguments); - var callback = args.pop(); - fn.call(this, args, callback); - }; -}; - -var _slice = require('./slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/iterator.js b/node_modules/async/internal/iterator.js deleted file mode 100644 index 886beb5..0000000 --- a/node_modules/async/internal/iterator.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = iterator; - -var _isArrayLike = require('lodash/isArrayLike'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _getIterator = require('./getIterator'); - -var _getIterator2 = _interopRequireDefault(_getIterator); - -var _keys = require('lodash/keys'); - -var _keys2 = _interopRequireDefault(_keys); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function createArrayIterator(coll) { - var i = -1; - var len = coll.length; - return function next() { - return ++i < len ? { value: coll[i], key: i } : null; - }; -} - -function createES2015Iterator(iterator) { - var i = -1; - return function next() { - var item = iterator.next(); - if (item.done) return null; - i++; - return { value: item.value, key: i }; - }; -} - -function createObjectIterator(obj) { - var okeys = (0, _keys2.default)(obj); - var i = -1; - var len = okeys.length; - return function next() { - var key = okeys[++i]; - if (key === '__proto__') { - return next(); - } - return i < len ? { value: obj[key], key: key } : null; - }; -} - -function iterator(coll) { - if ((0, _isArrayLike2.default)(coll)) { - return createArrayIterator(coll); - } - - var iterator = (0, _getIterator2.default)(coll); - return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/map.js b/node_modules/async/internal/map.js deleted file mode 100644 index f4f2aa5..0000000 --- a/node_modules/async/internal/map.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _asyncMap; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _asyncMap(eachfn, arr, iteratee, callback) { - callback = callback || _noop2.default; - arr = arr || []; - var results = []; - var counter = 0; - var _iteratee = (0, _wrapAsync2.default)(iteratee); - - eachfn(arr, function (value, _, callback) { - var index = counter++; - _iteratee(value, function (err, v) { - results[index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/notId.js b/node_modules/async/internal/notId.js deleted file mode 100644 index 0106c92..0000000 --- a/node_modules/async/internal/notId.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = notId; -function notId(v) { - return !v; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/once.js b/node_modules/async/internal/once.js deleted file mode 100644 index f0c379f..0000000 --- a/node_modules/async/internal/once.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = once; -function once(fn) { - return function () { - if (fn === null) return; - var callFn = fn; - fn = null; - callFn.apply(this, arguments); - }; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/onlyOnce.js b/node_modules/async/internal/onlyOnce.js deleted file mode 100644 index f2e3001..0000000 --- a/node_modules/async/internal/onlyOnce.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = onlyOnce; -function onlyOnce(fn) { - return function () { - if (fn === null) throw new Error("Callback was already called."); - var callFn = fn; - fn = null; - callFn.apply(this, arguments); - }; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/parallel.js b/node_modules/async/internal/parallel.js deleted file mode 100644 index c97293b..0000000 --- a/node_modules/async/internal/parallel.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _parallel; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _isArrayLike = require('lodash/isArrayLike'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _slice = require('./slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _parallel(eachfn, tasks, callback) { - callback = callback || _noop2.default; - var results = (0, _isArrayLike2.default)(tasks) ? [] : {}; - - eachfn(tasks, function (task, key, callback) { - (0, _wrapAsync2.default)(task)(function (err, result) { - if (arguments.length > 2) { - result = (0, _slice2.default)(arguments, 1); - } - results[key] = result; - callback(err); - }); - }, function (err) { - callback(err, results); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/queue.js b/node_modules/async/internal/queue.js deleted file mode 100644 index 19534a7..0000000 --- a/node_modules/async/internal/queue.js +++ /dev/null @@ -1,204 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = queue; - -var _baseIndexOf = require('lodash/_baseIndexOf'); - -var _baseIndexOf2 = _interopRequireDefault(_baseIndexOf); - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _onlyOnce = require('./onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _setImmediate = require('./setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _DoublyLinkedList = require('./DoublyLinkedList'); - -var _DoublyLinkedList2 = _interopRequireDefault(_DoublyLinkedList); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function queue(worker, concurrency, payload) { - if (concurrency == null) { - concurrency = 1; - } else if (concurrency === 0) { - throw new Error('Concurrency must not be zero'); - } - - var _worker = (0, _wrapAsync2.default)(worker); - var numRunning = 0; - var workersList = []; - - var processingScheduled = false; - function _insert(data, insertAtFront, callback) { - if (callback != null && typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - if (!(0, _isArray2.default)(data)) { - data = [data]; - } - if (data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - return (0, _setImmediate2.default)(function () { - q.drain(); - }); - } - - for (var i = 0, l = data.length; i < l; i++) { - var item = { - data: data[i], - callback: callback || _noop2.default - }; - - if (insertAtFront) { - q._tasks.unshift(item); - } else { - q._tasks.push(item); - } - } - - if (!processingScheduled) { - processingScheduled = true; - (0, _setImmediate2.default)(function () { - processingScheduled = false; - q.process(); - }); - } - } - - function _next(tasks) { - return function (err) { - numRunning -= 1; - - for (var i = 0, l = tasks.length; i < l; i++) { - var task = tasks[i]; - - var index = (0, _baseIndexOf2.default)(workersList, task, 0); - if (index === 0) { - workersList.shift(); - } else if (index > 0) { - workersList.splice(index, 1); - } - - task.callback.apply(task, arguments); - - if (err != null) { - q.error(err, task.data); - } - } - - if (numRunning <= q.concurrency - q.buffer) { - q.unsaturated(); - } - - if (q.idle()) { - q.drain(); - } - q.process(); - }; - } - - var isProcessing = false; - var q = { - _tasks: new _DoublyLinkedList2.default(), - concurrency: concurrency, - payload: payload, - saturated: _noop2.default, - unsaturated: _noop2.default, - buffer: concurrency / 4, - empty: _noop2.default, - drain: _noop2.default, - error: _noop2.default, - started: false, - paused: false, - push: function (data, callback) { - _insert(data, false, callback); - }, - kill: function () { - q.drain = _noop2.default; - q._tasks.empty(); - }, - unshift: function (data, callback) { - _insert(data, true, callback); - }, - remove: function (testFn) { - q._tasks.remove(testFn); - }, - process: function () { - // Avoid trying to start too many processing operations. This can occur - // when callbacks resolve synchronously (#1267). - if (isProcessing) { - return; - } - isProcessing = true; - while (!q.paused && numRunning < q.concurrency && q._tasks.length) { - var tasks = [], - data = []; - var l = q._tasks.length; - if (q.payload) l = Math.min(l, q.payload); - for (var i = 0; i < l; i++) { - var node = q._tasks.shift(); - tasks.push(node); - workersList.push(node); - data.push(node.data); - } - - numRunning += 1; - - if (q._tasks.length === 0) { - q.empty(); - } - - if (numRunning === q.concurrency) { - q.saturated(); - } - - var cb = (0, _onlyOnce2.default)(_next(tasks)); - _worker(data, cb); - } - isProcessing = false; - }, - length: function () { - return q._tasks.length; - }, - running: function () { - return numRunning; - }, - workersList: function () { - return workersList; - }, - idle: function () { - return q._tasks.length + numRunning === 0; - }, - pause: function () { - q.paused = true; - }, - resume: function () { - if (q.paused === false) { - return; - } - q.paused = false; - (0, _setImmediate2.default)(q.process); - } - }; - return q; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/reject.js b/node_modules/async/internal/reject.js deleted file mode 100644 index 5dbfcfb..0000000 --- a/node_modules/async/internal/reject.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reject; - -var _filter = require('./filter'); - -var _filter2 = _interopRequireDefault(_filter); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function reject(eachfn, arr, iteratee, callback) { - (0, _filter2.default)(eachfn, arr, function (value, cb) { - iteratee(value, function (err, v) { - cb(err, !v); - }); - }, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/setImmediate.js b/node_modules/async/internal/setImmediate.js deleted file mode 100644 index 3545f2b..0000000 --- a/node_modules/async/internal/setImmediate.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.hasNextTick = exports.hasSetImmediate = undefined; -exports.fallback = fallback; -exports.wrap = wrap; - -var _slice = require('./slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate; -var hasNextTick = exports.hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; - -function fallback(fn) { - setTimeout(fn, 0); -} - -function wrap(defer) { - return function (fn /*, ...args*/) { - var args = (0, _slice2.default)(arguments, 1); - defer(function () { - fn.apply(null, args); - }); - }; -} - -var _defer; - -if (hasSetImmediate) { - _defer = setImmediate; -} else if (hasNextTick) { - _defer = process.nextTick; -} else { - _defer = fallback; -} - -exports.default = wrap(_defer); \ No newline at end of file diff --git a/node_modules/async/internal/slice.js b/node_modules/async/internal/slice.js deleted file mode 100644 index 56f10c0..0000000 --- a/node_modules/async/internal/slice.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = slice; -function slice(arrayLike, start) { - start = start | 0; - var newLen = Math.max(arrayLike.length - start, 0); - var newArr = Array(newLen); - for (var idx = 0; idx < newLen; idx++) { - newArr[idx] = arrayLike[start + idx]; - } - return newArr; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/withoutIndex.js b/node_modules/async/internal/withoutIndex.js deleted file mode 100644 index 2bd3579..0000000 --- a/node_modules/async/internal/withoutIndex.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _withoutIndex; -function _withoutIndex(iteratee) { - return function (value, index, callback) { - return iteratee(value, callback); - }; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/wrapAsync.js b/node_modules/async/internal/wrapAsync.js deleted file mode 100644 index bc6c966..0000000 --- a/node_modules/async/internal/wrapAsync.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isAsync = undefined; - -var _asyncify = require('../asyncify'); - -var _asyncify2 = _interopRequireDefault(_asyncify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var supportsSymbol = typeof Symbol === 'function'; - -function isAsync(fn) { - return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction'; -} - -function wrapAsync(asyncFn) { - return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn; -} - -exports.default = wrapAsync; -exports.isAsync = isAsync; \ No newline at end of file diff --git a/node_modules/async/log.js b/node_modules/async/log.js deleted file mode 100644 index c643867..0000000 --- a/node_modules/async/log.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _consoleFunc = require('./internal/consoleFunc'); - -var _consoleFunc2 = _interopRequireDefault(_consoleFunc); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Logs the result of an `async` function to the `console`. Only works in - * Node.js or in browsers that support `console.log` and `console.error` (such - * as FF and Chrome). If multiple arguments are returned from the async - * function, `console.log` is called on each argument in order. - * - * @name log - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, 'hello ' + name); - * }, 1000); - * }; - * - * // in the node repl - * node> async.log(hello, 'world'); - * 'hello world' - */ -exports.default = (0, _consoleFunc2.default)('log'); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/map.js b/node_modules/async/map.js deleted file mode 100644 index 67c9cda..0000000 --- a/node_modules/async/map.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -var _map = require('./internal/map'); - -var _map2 = _interopRequireDefault(_map); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Produces a new collection of values by mapping each value in `coll` through - * the `iteratee` function. The `iteratee` is called with an item from `coll` - * and a callback for when it has finished processing. Each of these callback - * takes 2 arguments: an `error`, and the transformed item from `coll`. If - * `iteratee` passes an error to its callback, the main `callback` (for the - * `map` function) is immediately called with the error. - * - * Note, that since this function applies the `iteratee` to each item in - * parallel, there is no guarantee that the `iteratee` functions will complete - * in order. However, the results array will be in the same order as the - * original `coll`. - * - * If `map` is passed an Object, the results will be an Array. The results - * will roughly be in the order of the original Objects' keys (but this can - * vary across JavaScript engines). - * - * @name map - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an Array of the - * transformed items from the `coll`. Invoked with (err, results). - * @example - * - * async.map(['file1','file2','file3'], fs.stat, function(err, results) { - * // results is now an array of stats for each file - * }); - */ -exports.default = (0, _doParallel2.default)(_map2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/mapLimit.js b/node_modules/async/mapLimit.js deleted file mode 100644 index c8b60d8..0000000 --- a/node_modules/async/mapLimit.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -var _map = require('./internal/map'); - -var _map2 = _interopRequireDefault(_map); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time. - * - * @name mapLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - */ -exports.default = (0, _doParallelLimit2.default)(_map2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/mapSeries.js b/node_modules/async/mapSeries.js deleted file mode 100644 index 61b42d0..0000000 --- a/node_modules/async/mapSeries.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _mapLimit = require('./mapLimit'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time. - * - * @name mapSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - */ -exports.default = (0, _doLimit2.default)(_mapLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/mapValues.js b/node_modules/async/mapValues.js deleted file mode 100644 index 3d838ca..0000000 --- a/node_modules/async/mapValues.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _mapValuesLimit = require('./mapValuesLimit'); - -var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * A relative of [`map`]{@link module:Collections.map}, designed for use with objects. - * - * Produces a new Object by mapping each value of `obj` through the `iteratee` - * function. The `iteratee` is called each `value` and `key` from `obj` and a - * callback for when it has finished processing. Each of these callbacks takes - * two arguments: an `error`, and the transformed item from `obj`. If `iteratee` - * passes an error to its callback, the main `callback` (for the `mapValues` - * function) is immediately called with the error. - * - * Note, the order of the keys in the result is not guaranteed. The keys will - * be roughly in the order they complete, (but this is very engine-specific) - * - * @name mapValues - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @example - * - * async.mapValues({ - * f1: 'file1', - * f2: 'file2', - * f3: 'file3' - * }, function (file, key, callback) { - * fs.stat(file, callback); - * }, function(err, result) { - * // result is now a map of stats for each file, e.g. - * // { - * // f1: [stats for file1], - * // f2: [stats for file2], - * // f3: [stats for file3] - * // } - * }); - */ - -exports.default = (0, _doLimit2.default)(_mapValuesLimit2.default, Infinity); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/mapValuesLimit.js b/node_modules/async/mapValuesLimit.js deleted file mode 100644 index 912a8b5..0000000 --- a/node_modules/async/mapValuesLimit.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = mapValuesLimit; - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a - * time. - * - * @name mapValuesLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - */ -function mapValuesLimit(obj, limit, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - var newObj = {}; - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _eachOfLimit2.default)(obj, limit, function (val, key, next) { - _iteratee(val, key, function (err, result) { - if (err) return next(err); - newObj[key] = result; - next(); - }); - }, function (err) { - callback(err, newObj); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/mapValuesSeries.js b/node_modules/async/mapValuesSeries.js deleted file mode 100644 index b378c4a..0000000 --- a/node_modules/async/mapValuesSeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _mapValuesLimit = require('./mapValuesLimit'); - -var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time. - * - * @name mapValuesSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - */ -exports.default = (0, _doLimit2.default)(_mapValuesLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/memoize.js b/node_modules/async/memoize.js deleted file mode 100644 index 1f2b566..0000000 --- a/node_modules/async/memoize.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = memoize; - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _setImmediate = require('./internal/setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function has(obj, key) { - return key in obj; -} - -/** - * Caches the results of an async function. When creating a hash to store - * function results against, the callback is omitted from the hash and an - * optional hash function can be used. - * - * If no hash function is specified, the first argument is used as a hash key, - * which may work reasonably if it is a string or a data type that converts to a - * distinct string. Note that objects and arrays will not behave reasonably. - * Neither will cases where the other arguments are significant. In such cases, - * specify your own hash function. - * - * The cache of results is exposed as the `memo` property of the function - * returned by `memoize`. - * - * @name memoize - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function to proxy and cache results from. - * @param {Function} hasher - An optional function for generating a custom hash - * for storing results. It has all the arguments applied to it apart from the - * callback, and must be synchronous. - * @returns {AsyncFunction} a memoized version of `fn` - * @example - * - * var slow_fn = function(name, callback) { - * // do something - * callback(null, result); - * }; - * var fn = async.memoize(slow_fn); - * - * // fn can now be used as if it were slow_fn - * fn('some name', function() { - * // callback - * }); - */ -function memoize(fn, hasher) { - var memo = Object.create(null); - var queues = Object.create(null); - hasher = hasher || _identity2.default; - var _fn = (0, _wrapAsync2.default)(fn); - var memoized = (0, _initialParams2.default)(function memoized(args, callback) { - var key = hasher.apply(null, args); - if (has(memo, key)) { - (0, _setImmediate2.default)(function () { - callback.apply(null, memo[key]); - }); - } else if (has(queues, key)) { - queues[key].push(callback); - } else { - queues[key] = [callback]; - _fn.apply(null, args.concat(function () /*args*/{ - var args = (0, _slice2.default)(arguments); - memo[key] = args; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, args); - } - })); - } - }); - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/nextTick.js b/node_modules/async/nextTick.js deleted file mode 100644 index 886f58e..0000000 --- a/node_modules/async/nextTick.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _setImmediate = require('./internal/setImmediate'); - -/** - * Calls `callback` on a later loop around the event loop. In Node.js this just - * calls `process.nextTick`. In the browser it will use `setImmediate` if - * available, otherwise `setTimeout(callback, 0)`, which means other higher - * priority events may precede the execution of `callback`. - * - * This is used internally for browser-compatibility purposes. - * - * @name nextTick - * @static - * @memberOf module:Utils - * @method - * @see [async.setImmediate]{@link module:Utils.setImmediate} - * @category Util - * @param {Function} callback - The function to call on a later loop around - * the event loop. Invoked with (args...). - * @param {...*} args... - any number of additional arguments to pass to the - * callback on the next tick. - * @example - * - * var call_order = []; - * async.nextTick(function() { - * call_order.push('two'); - * // call_order now equals ['one','two'] - * }); - * call_order.push('one'); - * - * async.setImmediate(function (a, b, c) { - * // a, b, and c equal 1, 2, and 3 - * }, 1, 2, 3); - */ -var _defer; - -if (_setImmediate.hasNextTick) { - _defer = process.nextTick; -} else if (_setImmediate.hasSetImmediate) { - _defer = setImmediate; -} else { - _defer = _setImmediate.fallback; -} - -exports.default = (0, _setImmediate.wrap)(_defer); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/package.json b/node_modules/async/package.json deleted file mode 100644 index 76b3db7..0000000 --- a/node_modules/async/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "async", - "description": "Higher-order functions and common patterns for asynchronous code", - "version": "2.6.4", - "main": "dist/async.js", - "author": "Caolan McMahon", - "homepage": "https://caolan.github.io/async/", - "repository": { - "type": "git", - "url": "https://github.com/caolan/async.git" - }, - "bugs": { - "url": "https://github.com/caolan/async/issues" - }, - "keywords": [ - "async", - "callback", - "module", - "utility" - ], - "dependencies": { - "lodash": "^4.17.14" - }, - "devDependencies": { - "babel-cli": "^6.24.0", - "babel-core": "^6.26.3", - "babel-plugin-add-module-exports": "^0.2.1", - "babel-plugin-istanbul": "^2.0.1", - "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", - "babel-preset-es2015": "^6.3.13", - "babel-preset-es2017": "^6.22.0", - "babelify": "^8.0.0", - "benchmark": "^2.1.1", - "bluebird": "^3.4.6", - "browserify": "^16.2.2", - "chai": "^4.1.2", - "cheerio": "^0.22.0", - "coveralls": "^3.0.1", - "es6-promise": "^2.3.0", - "eslint": "^2.13.1", - "fs-extra": "^0.26.7", - "gh-pages-deploy": "^0.5.0", - "jsdoc": "^3.4.0", - "karma": "^2.0.2", - "karma-browserify": "^5.2.0", - "karma-firefox-launcher": "^1.1.0", - "karma-mocha": "^1.2.0", - "karma-mocha-reporter": "^2.2.0", - "mocha": "^5.2.0", - "native-promise-only": "^0.8.0-a", - "nyc": "^11.8.0", - "rimraf": "^2.5.0", - "rollup": "^0.36.3", - "rollup-plugin-node-resolve": "^2.0.0", - "rollup-plugin-npm": "^2.0.0", - "rsvp": "^3.0.18", - "semver": "^5.5.0", - "uglify-js": "~2.7.3", - "yargs": "^11.0.0" - }, - "scripts": { - "coverage": "nyc npm run mocha-node-test -- --grep @nycinvalid --invert", - "coveralls": "npm run coverage && nyc report --reporter=text-lcov | coveralls", - "jsdoc": "jsdoc -c ./support/jsdoc/jsdoc.json && node support/jsdoc/jsdoc-fix-html.js", - "lint": "eslint lib/ mocha_test/ perf/memory.js perf/suites.js perf/benchmark.js support/build/ support/*.js karma.conf.js", - "mocha-browser-test": "karma start", - "mocha-node-test": "mocha mocha_test/ --compilers js:babel-core/register", - "mocha-test": "npm run mocha-node-test && npm run mocha-browser-test", - "test": "npm run lint && npm run mocha-node-test" - }, - "license": "MIT", - "gh-pages-deploy": { - "staticpath": "docs" - }, - "nyc": { - "exclude": [ - "mocha_test" - ] - } -} \ No newline at end of file diff --git a/node_modules/async/parallel.js b/node_modules/async/parallel.js deleted file mode 100644 index da28a4d..0000000 --- a/node_modules/async/parallel.js +++ /dev/null @@ -1,90 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = parallelLimit; - -var _eachOf = require('./eachOf'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _parallel = require('./internal/parallel'); - -var _parallel2 = _interopRequireDefault(_parallel); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Run the `tasks` collection of functions in parallel, without waiting until - * the previous function has completed. If any of the functions pass an error to - * its callback, the main `callback` is immediately called with the value of the - * error. Once the `tasks` have completed, the results are passed to the final - * `callback` as an array. - * - * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about - * parallel execution of code. If your tasks do not use any timers or perform - * any I/O, they will actually be executed in series. Any synchronous setup - * sections for each task will happen one after the other. JavaScript remains - * single-threaded. - * - * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the - * execution of other tasks when a task fails. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.parallel}. - * - * @name parallel - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - * - * @example - * async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], - * // optional callback - * function(err, results) { - * // the results array will equal ['one','two'] even though - * // the second function had a shorter timeout. - * }); - * - * // an example using an object instead of an array - * async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * // results is now equals to: {one: 1, two: 2} - * }); - */ -function parallelLimit(tasks, callback) { - (0, _parallel2.default)(_eachOf2.default, tasks, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/parallelLimit.js b/node_modules/async/parallelLimit.js deleted file mode 100644 index a026526..0000000 --- a/node_modules/async/parallelLimit.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = parallelLimit; - -var _eachOfLimit = require('./internal/eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _parallel = require('./internal/parallel'); - -var _parallel2 = _interopRequireDefault(_parallel); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a - * time. - * - * @name parallelLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.parallel]{@link module:ControlFlow.parallel} - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - */ -function parallelLimit(tasks, limit, callback) { - (0, _parallel2.default)((0, _eachOfLimit2.default)(limit), tasks, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/priorityQueue.js b/node_modules/async/priorityQueue.js deleted file mode 100644 index 3a5f023..0000000 --- a/node_modules/async/priorityQueue.js +++ /dev/null @@ -1,98 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (worker, concurrency) { - // Start with a normal queue - var q = (0, _queue2.default)(worker, concurrency); - - // Override push to accept second parameter representing priority - q.push = function (data, priority, callback) { - if (callback == null) callback = _noop2.default; - if (typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - if (!(0, _isArray2.default)(data)) { - data = [data]; - } - if (data.length === 0) { - // call drain immediately if there are no tasks - return (0, _setImmediate2.default)(function () { - q.drain(); - }); - } - - priority = priority || 0; - var nextNode = q._tasks.head; - while (nextNode && priority >= nextNode.priority) { - nextNode = nextNode.next; - } - - for (var i = 0, l = data.length; i < l; i++) { - var item = { - data: data[i], - priority: priority, - callback: callback - }; - - if (nextNode) { - q._tasks.insertBefore(nextNode, item); - } else { - q._tasks.push(item); - } - } - (0, _setImmediate2.default)(q.process); - }; - - // Remove unshift function - delete q.unshift; - - return q; -}; - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _setImmediate = require('./setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _queue = require('./queue'); - -var _queue2 = _interopRequireDefault(_queue); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; - -/** - * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and - * completed in ascending priority order. - * - * @name priorityQueue - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. - * Invoked with (task, callback). - * @param {number} concurrency - An `integer` for determining how many `worker` - * functions should be run in parallel. If omitted, the concurrency defaults to - * `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two - * differences between `queue` and `priorityQueue` objects: - * * `push(task, priority, [callback])` - `priority` should be a number. If an - * array of `tasks` is given, all tasks will be assigned the same priority. - * * The `unshift` method was removed. - */ \ No newline at end of file diff --git a/node_modules/async/queue.js b/node_modules/async/queue.js deleted file mode 100644 index 0ca8ba2..0000000 --- a/node_modules/async/queue.js +++ /dev/null @@ -1,130 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (worker, concurrency) { - var _worker = (0, _wrapAsync2.default)(worker); - return (0, _queue2.default)(function (items, cb) { - _worker(items[0], cb); - }, concurrency, 1); -}; - -var _queue = require('./internal/queue'); - -var _queue2 = _interopRequireDefault(_queue); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; - -/** - * A queue of tasks for the worker function to complete. - * @typedef {Object} QueueObject - * @memberOf module:ControlFlow - * @property {Function} length - a function returning the number of items - * waiting to be processed. Invoke with `queue.length()`. - * @property {boolean} started - a boolean indicating whether or not any - * items have been pushed and processed by the queue. - * @property {Function} running - a function returning the number of items - * currently being processed. Invoke with `queue.running()`. - * @property {Function} workersList - a function returning the array of items - * currently being processed. Invoke with `queue.workersList()`. - * @property {Function} idle - a function returning false if there are items - * waiting or being processed, or true if not. Invoke with `queue.idle()`. - * @property {number} concurrency - an integer for determining how many `worker` - * functions should be run in parallel. This property can be changed after a - * `queue` is created to alter the concurrency on-the-fly. - * @property {Function} push - add a new task to the `queue`. Calls `callback` - * once the `worker` has finished processing the task. Instead of a single task, - * a `tasks` array can be submitted. The respective callback is used for every - * task in the list. Invoke with `queue.push(task, [callback])`, - * @property {Function} unshift - add a new task to the front of the `queue`. - * Invoke with `queue.unshift(task, [callback])`. - * @property {Function} remove - remove items from the queue that match a test - * function. The test function will be passed an object with a `data` property, - * and a `priority` property, if this is a - * [priorityQueue]{@link module:ControlFlow.priorityQueue} object. - * Invoked with `queue.remove(testFn)`, where `testFn` is of the form - * `function ({data, priority}) {}` and returns a Boolean. - * @property {Function} saturated - a callback that is called when the number of - * running workers hits the `concurrency` limit, and further tasks will be - * queued. - * @property {Function} unsaturated - a callback that is called when the number - * of running workers is less than the `concurrency` & `buffer` limits, and - * further tasks will not be queued. - * @property {number} buffer - A minimum threshold buffer in order to say that - * the `queue` is `unsaturated`. - * @property {Function} empty - a callback that is called when the last item - * from the `queue` is given to a `worker`. - * @property {Function} drain - a callback that is called when the last item - * from the `queue` has returned from the `worker`. - * @property {Function} error - a callback that is called when a task errors. - * Has the signature `function(error, task)`. - * @property {boolean} paused - a boolean for determining whether the queue is - * in a paused state. - * @property {Function} pause - a function that pauses the processing of tasks - * until `resume()` is called. Invoke with `queue.pause()`. - * @property {Function} resume - a function that resumes the processing of - * queued tasks when the queue is paused. Invoke with `queue.resume()`. - * @property {Function} kill - a function that removes the `drain` callback and - * empties remaining tasks from the queue forcing it to go idle. No more tasks - * should be pushed to the queue after calling this function. Invoke with `queue.kill()`. - */ - -/** - * Creates a `queue` object with the specified `concurrency`. Tasks added to the - * `queue` are processed in parallel (up to the `concurrency` limit). If all - * `worker`s are in progress, the task is queued until one becomes available. - * Once a `worker` completes a `task`, that `task`'s callback is called. - * - * @name queue - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. Invoked with (task, callback). - * @param {number} [concurrency=1] - An `integer` for determining how many - * `worker` functions should be run in parallel. If omitted, the concurrency - * defaults to `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can - * attached as certain properties to listen for specific events during the - * lifecycle of the queue. - * @example - * - * // create a queue object with concurrency 2 - * var q = async.queue(function(task, callback) { - * console.log('hello ' + task.name); - * callback(); - * }, 2); - * - * // assign a callback - * q.drain = function() { - * console.log('all items have been processed'); - * }; - * - * // add some items to the queue - * q.push({name: 'foo'}, function(err) { - * console.log('finished processing foo'); - * }); - * q.push({name: 'bar'}, function (err) { - * console.log('finished processing bar'); - * }); - * - * // add some items to the queue (batch-wise) - * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) { - * console.log('finished processing item'); - * }); - * - * // add some items to the front of the queue - * q.unshift({name: 'bar'}, function (err) { - * console.log('finished processing bar'); - * }); - */ \ No newline at end of file diff --git a/node_modules/async/race.js b/node_modules/async/race.js deleted file mode 100644 index 6713c74..0000000 --- a/node_modules/async/race.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = race; - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Runs the `tasks` array of functions in parallel, without waiting until the - * previous function has completed. Once any of the `tasks` complete or pass an - * error to its callback, the main `callback` is immediately called. It's - * equivalent to `Promise.race()`. - * - * @name race - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction} - * to run. Each function can complete with an optional `result` value. - * @param {Function} callback - A callback to run once any of the functions have - * completed. This function gets an error or result from the first function that - * completed. Invoked with (err, result). - * @returns undefined - * @example - * - * async.race([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], - * // main callback - * function(err, result) { - * // the result will be equal to 'two' as it finishes earlier - * }); - */ -function race(tasks, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - if (!(0, _isArray2.default)(tasks)) return callback(new TypeError('First argument to race must be an array of functions')); - if (!tasks.length) return callback(); - for (var i = 0, l = tasks.length; i < l; i++) { - (0, _wrapAsync2.default)(tasks[i])(callback); - } -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/reduce.js b/node_modules/async/reduce.js deleted file mode 100644 index 3fb8019..0000000 --- a/node_modules/async/reduce.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reduce; - -var _eachOfSeries = require('./eachOfSeries'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Reduces `coll` into a single value using an async `iteratee` to return each - * successive step. `memo` is the initial state of the reduction. This function - * only operates in series. - * - * For performance reasons, it may make sense to split a call to this function - * into a parallel map, and then use the normal `Array.prototype.reduce` on the - * results. This function is for situations where each step in the reduction - * needs to be async; if you can get the data before reducing it, then it's - * probably a good idea to do so. - * - * @name reduce - * @static - * @memberOf module:Collections - * @method - * @alias inject - * @alias foldl - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee complete with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @example - * - * async.reduce([1,2,3], 0, function(memo, item, callback) { - * // pointless async: - * process.nextTick(function() { - * callback(null, memo + item) - * }); - * }, function(err, result) { - * // result is now equal to the last value of memo, which is 6 - * }); - */ -function reduce(coll, memo, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _eachOfSeries2.default)(coll, function (x, i, callback) { - _iteratee(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/reduceRight.js b/node_modules/async/reduceRight.js deleted file mode 100644 index 3d17d32..0000000 --- a/node_modules/async/reduceRight.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reduceRight; - -var _reduce = require('./reduce'); - -var _reduce2 = _interopRequireDefault(_reduce); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. - * - * @name reduceRight - * @static - * @memberOf module:Collections - * @method - * @see [async.reduce]{@link module:Collections.reduce} - * @alias foldr - * @category Collection - * @param {Array} array - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee complete with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - */ -function reduceRight(array, memo, iteratee, callback) { - var reversed = (0, _slice2.default)(array).reverse(); - (0, _reduce2.default)(reversed, memo, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/reflect.js b/node_modules/async/reflect.js deleted file mode 100644 index 098ba86..0000000 --- a/node_modules/async/reflect.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reflect; - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Wraps the async function in another function that always completes with a - * result object, even when it errors. - * - * The result object has either the property `error` or `value`. - * - * @name reflect - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function you want to wrap - * @returns {Function} - A function that always passes null to it's callback as - * the error. The second argument to the callback will be an `object` with - * either an `error` or a `value` property. - * @example - * - * async.parallel([ - * async.reflect(function(callback) { - * // do some stuff ... - * callback(null, 'one'); - * }), - * async.reflect(function(callback) { - * // do some more stuff but error ... - * callback('bad stuff happened'); - * }), - * async.reflect(function(callback) { - * // do some more stuff ... - * callback(null, 'two'); - * }) - * ], - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = 'bad stuff happened' - * // results[2].value = 'two' - * }); - */ -function reflect(fn) { - var _fn = (0, _wrapAsync2.default)(fn); - return (0, _initialParams2.default)(function reflectOn(args, reflectCallback) { - args.push(function callback(error, cbArg) { - if (error) { - reflectCallback(null, { error: error }); - } else { - var value; - if (arguments.length <= 2) { - value = cbArg; - } else { - value = (0, _slice2.default)(arguments, 1); - } - reflectCallback(null, { value: value }); - } - }); - - return _fn.apply(this, args); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/reflectAll.js b/node_modules/async/reflectAll.js deleted file mode 100644 index 966e83d..0000000 --- a/node_modules/async/reflectAll.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reflectAll; - -var _reflect = require('./reflect'); - -var _reflect2 = _interopRequireDefault(_reflect); - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _arrayMap2 = require('lodash/_arrayMap'); - -var _arrayMap3 = _interopRequireDefault(_arrayMap2); - -var _baseForOwn = require('lodash/_baseForOwn'); - -var _baseForOwn2 = _interopRequireDefault(_baseForOwn); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * A helper function that wraps an array or an object of functions with `reflect`. - * - * @name reflectAll - * @static - * @memberOf module:Utils - * @method - * @see [async.reflect]{@link module:Utils.reflect} - * @category Util - * @param {Array|Object|Iterable} tasks - The collection of - * [async functions]{@link AsyncFunction} to wrap in `async.reflect`. - * @returns {Array} Returns an array of async functions, each wrapped in - * `async.reflect` - * @example - * - * let tasks = [ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * // do some more stuff but error ... - * callback(new Error('bad stuff happened')); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = Error('bad stuff happened') - * // results[2].value = 'two' - * }); - * - * // an example using an object instead of an array - * let tasks = { - * one: function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * two: function(callback) { - * callback('two'); - * }, - * three: function(callback) { - * setTimeout(function() { - * callback(null, 'three'); - * }, 100); - * } - * }; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results.one.value = 'one' - * // results.two.error = 'two' - * // results.three.value = 'three' - * }); - */ -function reflectAll(tasks) { - var results; - if ((0, _isArray2.default)(tasks)) { - results = (0, _arrayMap3.default)(tasks, _reflect2.default); - } else { - results = {}; - (0, _baseForOwn2.default)(tasks, function (task, key) { - results[key] = _reflect2.default.call(this, task); - }); - } - return results; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/reject.js b/node_modules/async/reject.js deleted file mode 100644 index 53802b5..0000000 --- a/node_modules/async/reject.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reject = require('./internal/reject'); - -var _reject2 = _interopRequireDefault(_reject); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test. - * - * @name reject - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @example - * - * async.reject(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, results) { - * // results now equals an array of missing files - * createFiles(results); - * }); - */ -exports.default = (0, _doParallel2.default)(_reject2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/rejectLimit.js b/node_modules/async/rejectLimit.js deleted file mode 100644 index 74bba7f..0000000 --- a/node_modules/async/rejectLimit.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reject = require('./internal/reject'); - -var _reject2 = _interopRequireDefault(_reject); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a - * time. - * - * @name rejectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -exports.default = (0, _doParallelLimit2.default)(_reject2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/rejectSeries.js b/node_modules/async/rejectSeries.js deleted file mode 100644 index f905588..0000000 --- a/node_modules/async/rejectSeries.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _rejectLimit = require('./rejectLimit'); - -var _rejectLimit2 = _interopRequireDefault(_rejectLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time. - * - * @name rejectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -exports.default = (0, _doLimit2.default)(_rejectLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/retry.js b/node_modules/async/retry.js deleted file mode 100644 index 6a1aa1e..0000000 --- a/node_modules/async/retry.js +++ /dev/null @@ -1,156 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = retry; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _constant = require('lodash/constant'); - -var _constant2 = _interopRequireDefault(_constant); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Attempts to get a successful response from `task` no more than `times` times - * before returning an error. If the task is successful, the `callback` will be - * passed the result of the successful task. If all attempts fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name retry - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @see [async.retryable]{@link module:ControlFlow.retryable} - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an - * object with `times` and `interval` or a number. - * * `times` - The number of attempts to make before giving up. The default - * is `5`. - * * `interval` - The time to wait between retries, in milliseconds. The - * default is `0`. The interval may also be specified as a function of the - * retry count (see example). - * * `errorFilter` - An optional synchronous function that is invoked on - * erroneous result. If it returns `true` the retry attempts will continue; - * if the function returns `false` the retry flow is aborted with the current - * attempt's error and result being returned to the final callback. - * Invoked with (err). - * * If `opts` is a number, the number specifies the number of times to retry, - * with the default interval of `0`. - * @param {AsyncFunction} task - An async function to retry. - * Invoked with (callback). - * @param {Function} [callback] - An optional callback which is called when the - * task has succeeded, or after the final failed attempt. It receives the `err` - * and `result` arguments of the last attempt at completing the `task`. Invoked - * with (err, results). - * - * @example - * - * // The `retry` function can be used as a stand-alone control flow by passing - * // a callback, as shown below: - * - * // try calling apiMethod 3 times - * async.retry(3, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 3 times, waiting 200 ms between each retry - * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 10 times with exponential backoff - * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds) - * async.retry({ - * times: 10, - * interval: function(retryCount) { - * return 50 * Math.pow(2, retryCount); - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod the default 5 times no delay between each retry - * async.retry(apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod only when error condition satisfies, all other - * // errors will abort the retry control flow and return to final callback - * async.retry({ - * errorFilter: function(err) { - * return err.message === 'Temporary error'; // only retry on a specific error - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // to retry individual methods that are not as reliable within other - * // control flow functions, use the `retryable` wrapper: - * async.auto({ - * users: api.getUsers.bind(api), - * payments: async.retryable(3, api.getPayments.bind(api)) - * }, function(err, results) { - * // do something with the results - * }); - * - */ -function retry(opts, task, callback) { - var DEFAULT_TIMES = 5; - var DEFAULT_INTERVAL = 0; - - var options = { - times: DEFAULT_TIMES, - intervalFunc: (0, _constant2.default)(DEFAULT_INTERVAL) - }; - - function parseTimes(acc, t) { - if (typeof t === 'object') { - acc.times = +t.times || DEFAULT_TIMES; - - acc.intervalFunc = typeof t.interval === 'function' ? t.interval : (0, _constant2.default)(+t.interval || DEFAULT_INTERVAL); - - acc.errorFilter = t.errorFilter; - } else if (typeof t === 'number' || typeof t === 'string') { - acc.times = +t || DEFAULT_TIMES; - } else { - throw new Error("Invalid arguments for async.retry"); - } - } - - if (arguments.length < 3 && typeof opts === 'function') { - callback = task || _noop2.default; - task = opts; - } else { - parseTimes(options, opts); - callback = callback || _noop2.default; - } - - if (typeof task !== 'function') { - throw new Error("Invalid arguments for async.retry"); - } - - var _task = (0, _wrapAsync2.default)(task); - - var attempt = 1; - function retryAttempt() { - _task(function (err) { - if (err && attempt++ < options.times && (typeof options.errorFilter != 'function' || options.errorFilter(err))) { - setTimeout(retryAttempt, options.intervalFunc(attempt)); - } else { - callback.apply(null, arguments); - } - }); - } - - retryAttempt(); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/retryable.js b/node_modules/async/retryable.js deleted file mode 100644 index 002bfb0..0000000 --- a/node_modules/async/retryable.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (opts, task) { - if (!task) { - task = opts; - opts = null; - } - var _task = (0, _wrapAsync2.default)(task); - return (0, _initialParams2.default)(function (args, callback) { - function taskFn(cb) { - _task.apply(null, args.concat(cb)); - } - - if (opts) (0, _retry2.default)(opts, taskFn, callback);else (0, _retry2.default)(taskFn, callback); - }); -}; - -var _retry = require('./retry'); - -var _retry2 = _interopRequireDefault(_retry); - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; - -/** - * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method - * wraps a task and makes it retryable, rather than immediately calling it - * with retries. - * - * @name retryable - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.retry]{@link module:ControlFlow.retry} - * @category Control Flow - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional - * options, exactly the same as from `retry` - * @param {AsyncFunction} task - the asynchronous function to wrap. - * This function will be passed any arguments passed to the returned wrapper. - * Invoked with (...args, callback). - * @returns {AsyncFunction} The wrapped function, which when invoked, will - * retry on an error, based on the parameters specified in `opts`. - * This function will accept the same parameters as `task`. - * @example - * - * async.auto({ - * dep1: async.retryable(3, getFromFlakyService), - * process: ["dep1", async.retryable(3, function (results, cb) { - * maybeProcessData(results.dep1, cb); - * })] - * }, callback); - */ \ No newline at end of file diff --git a/node_modules/async/select.js b/node_modules/async/select.js deleted file mode 100644 index 54772d5..0000000 --- a/node_modules/async/select.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter = require('./internal/filter'); - -var _filter2 = _interopRequireDefault(_filter); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns a new array of all the values in `coll` which pass an async truth - * test. This operation is performed in parallel, but the results array will be - * in the same order as the original. - * - * @name filter - * @static - * @memberOf module:Collections - * @method - * @alias select - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @example - * - * async.filter(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, results) { - * // results now equals an array of the existing files - * }); - */ -exports.default = (0, _doParallel2.default)(_filter2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/selectLimit.js b/node_modules/async/selectLimit.js deleted file mode 100644 index 06216f7..0000000 --- a/node_modules/async/selectLimit.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter = require('./internal/filter'); - -var _filter2 = _interopRequireDefault(_filter); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a - * time. - * - * @name filterLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -exports.default = (0, _doParallelLimit2.default)(_filter2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/selectSeries.js b/node_modules/async/selectSeries.js deleted file mode 100644 index e48d966..0000000 --- a/node_modules/async/selectSeries.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filterLimit = require('./filterLimit'); - -var _filterLimit2 = _interopRequireDefault(_filterLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. - * - * @name filterSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results) - */ -exports.default = (0, _doLimit2.default)(_filterLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/seq.js b/node_modules/async/seq.js deleted file mode 100644 index ff86ef9..0000000 --- a/node_modules/async/seq.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = seq; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _reduce = require('./reduce'); - -var _reduce2 = _interopRequireDefault(_reduce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _arrayMap = require('lodash/_arrayMap'); - -var _arrayMap2 = _interopRequireDefault(_arrayMap); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Version of the compose function that is more natural to read. Each function - * consumes the return value of the previous function. It is the equivalent of - * [compose]{@link module:ControlFlow.compose} with the arguments reversed. - * - * Each function is executed with the `this` binding of the composed function. - * - * @name seq - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.compose]{@link module:ControlFlow.compose} - * @category Control Flow - * @param {...AsyncFunction} functions - the asynchronous functions to compose - * @returns {Function} a function that composes the `functions` in order - * @example - * - * // Requires lodash (or underscore), express3 and dresende's orm2. - * // Part of an app, that fetches cats of the logged user. - * // This example uses `seq` function to avoid overnesting and error - * // handling clutter. - * app.get('/cats', function(request, response) { - * var User = request.models.User; - * async.seq( - * _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data)) - * function(user, fn) { - * user.getCats(fn); // 'getCats' has signature (callback(err, data)) - * } - * )(req.session.user_id, function (err, cats) { - * if (err) { - * console.error(err); - * response.json({ status: 'error', message: err.message }); - * } else { - * response.json({ status: 'ok', message: 'Cats found', data: cats }); - * } - * }); - * }); - */ -function seq() /*...functions*/{ - var _functions = (0, _arrayMap2.default)(arguments, _wrapAsync2.default); - return function () /*...args*/{ - var args = (0, _slice2.default)(arguments); - var that = this; - - var cb = args[args.length - 1]; - if (typeof cb == 'function') { - args.pop(); - } else { - cb = _noop2.default; - } - - (0, _reduce2.default)(_functions, args, function (newargs, fn, cb) { - fn.apply(that, newargs.concat(function (err /*, ...nextargs*/) { - var nextargs = (0, _slice2.default)(arguments, 1); - cb(err, nextargs); - })); - }, function (err, results) { - cb.apply(that, [err].concat(results)); - }); - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/series.js b/node_modules/async/series.js deleted file mode 100644 index e8c2928..0000000 --- a/node_modules/async/series.js +++ /dev/null @@ -1,85 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = series; - -var _parallel = require('./internal/parallel'); - -var _parallel2 = _interopRequireDefault(_parallel); - -var _eachOfSeries = require('./eachOfSeries'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Run the functions in the `tasks` collection in series, each one running once - * the previous function has completed. If any functions in the series pass an - * error to its callback, no more functions are run, and `callback` is - * immediately called with the value of the error. Otherwise, `callback` - * receives an array of results when `tasks` have completed. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function, and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.series}. - * - * **Note** that while many implementations preserve the order of object - * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) - * explicitly states that - * - * > The mechanics and order of enumerating the properties is not specified. - * - * So if you rely on the order in which your series of functions are executed, - * and want this to work on all platforms, consider using an array. - * - * @name series - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection containing - * [async functions]{@link AsyncFunction} to run in series. - * Each function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This function gets a results array (or object) - * containing all the result arguments passed to the `task` callbacks. Invoked - * with (err, result). - * @example - * async.series([ - * function(callback) { - * // do some stuff ... - * callback(null, 'one'); - * }, - * function(callback) { - * // do some more stuff ... - * callback(null, 'two'); - * } - * ], - * // optional callback - * function(err, results) { - * // results is now equal to ['one', 'two'] - * }); - * - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback){ - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * // results is now equal to: {one: 1, two: 2} - * }); - */ -function series(tasks, callback) { - (0, _parallel2.default)(_eachOfSeries2.default, tasks, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/setImmediate.js b/node_modules/async/setImmediate.js deleted file mode 100644 index e52f7c5..0000000 --- a/node_modules/async/setImmediate.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _setImmediate = require('./internal/setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Calls `callback` on a later loop around the event loop. In Node.js this just - * calls `setImmediate`. In the browser it will use `setImmediate` if - * available, otherwise `setTimeout(callback, 0)`, which means other higher - * priority events may precede the execution of `callback`. - * - * This is used internally for browser-compatibility purposes. - * - * @name setImmediate - * @static - * @memberOf module:Utils - * @method - * @see [async.nextTick]{@link module:Utils.nextTick} - * @category Util - * @param {Function} callback - The function to call on a later loop around - * the event loop. Invoked with (args...). - * @param {...*} args... - any number of additional arguments to pass to the - * callback on the next tick. - * @example - * - * var call_order = []; - * async.nextTick(function() { - * call_order.push('two'); - * // call_order now equals ['one','two'] - * }); - * call_order.push('one'); - * - * async.setImmediate(function (a, b, c) { - * // a, b, and c equal 1, 2, and 3 - * }, 1, 2, 3); - */ -exports.default = _setImmediate2.default; -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/some.js b/node_modules/async/some.js deleted file mode 100644 index a8e70f7..0000000 --- a/node_modules/async/some.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns `true` if at least one element in the `coll` satisfies an async test. - * If any iteratee call returns `true`, the main `callback` is immediately - * called. - * - * @name some - * @static - * @memberOf module:Collections - * @method - * @alias any - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @example - * - * async.some(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // if result is true then at least one of the files exists - * }); - */ -exports.default = (0, _doParallel2.default)((0, _createTester2.default)(Boolean, _identity2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/someLimit.js b/node_modules/async/someLimit.js deleted file mode 100644 index 24ca3f4..0000000 --- a/node_modules/async/someLimit.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. - * - * @name someLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anyLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - */ -exports.default = (0, _doParallelLimit2.default)((0, _createTester2.default)(Boolean, _identity2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/someSeries.js b/node_modules/async/someSeries.js deleted file mode 100644 index dc24ed2..0000000 --- a/node_modules/async/someSeries.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _someLimit = require('./someLimit'); - -var _someLimit2 = _interopRequireDefault(_someLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. - * - * @name someSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anySeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in series. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - */ -exports.default = (0, _doLimit2.default)(_someLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/sortBy.js b/node_modules/async/sortBy.js deleted file mode 100644 index ee5e93d..0000000 --- a/node_modules/async/sortBy.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = sortBy; - -var _arrayMap = require('lodash/_arrayMap'); - -var _arrayMap2 = _interopRequireDefault(_arrayMap); - -var _baseProperty = require('lodash/_baseProperty'); - -var _baseProperty2 = _interopRequireDefault(_baseProperty); - -var _map = require('./map'); - -var _map2 = _interopRequireDefault(_map); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Sorts a list by the results of running each `coll` value through an async - * `iteratee`. - * - * @name sortBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a value to use as the sort criteria as - * its `result`. - * Invoked with (item, callback). - * @param {Function} callback - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is the items - * from the original `coll` sorted by the values returned by the `iteratee` - * calls. Invoked with (err, results). - * @example - * - * async.sortBy(['file1','file2','file3'], function(file, callback) { - * fs.stat(file, function(err, stats) { - * callback(err, stats.mtime); - * }); - * }, function(err, results) { - * // results is now the original array of files sorted by - * // modified date - * }); - * - * // By modifying the callback parameter the - * // sorting order can be influenced: - * - * // ascending order - * async.sortBy([1,9,3,5], function(x, callback) { - * callback(null, x); - * }, function(err,result) { - * // result callback - * }); - * - * // descending order - * async.sortBy([1,9,3,5], function(x, callback) { - * callback(null, x*-1); //<- x*-1 instead of x, turns the order around - * }, function(err,result) { - * // result callback - * }); - */ -function sortBy(coll, iteratee, callback) { - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _map2.default)(coll, function (x, callback) { - _iteratee(x, function (err, criteria) { - if (err) return callback(err); - callback(null, { value: x, criteria: criteria }); - }); - }, function (err, results) { - if (err) return callback(err); - callback(null, (0, _arrayMap2.default)(results.sort(comparator), (0, _baseProperty2.default)('value'))); - }); - - function comparator(left, right) { - var a = left.criteria, - b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - } -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/timeout.js b/node_modules/async/timeout.js deleted file mode 100644 index b5cb505..0000000 --- a/node_modules/async/timeout.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = timeout; - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Sets a time limit on an asynchronous function. If the function does not call - * its callback within the specified milliseconds, it will be called with a - * timeout error. The code property for the error object will be `'ETIMEDOUT'`. - * - * @name timeout - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} asyncFn - The async function to limit in time. - * @param {number} milliseconds - The specified time limit. - * @param {*} [info] - Any variable you want attached (`string`, `object`, etc) - * to timeout Error for more information.. - * @returns {AsyncFunction} Returns a wrapped function that can be used with any - * of the control flow functions. - * Invoke this function with the same parameters as you would `asyncFunc`. - * @example - * - * function myFunction(foo, callback) { - * doAsyncTask(foo, function(err, data) { - * // handle errors - * if (err) return callback(err); - * - * // do some stuff ... - * - * // return processed data - * return callback(null, data); - * }); - * } - * - * var wrapped = async.timeout(myFunction, 1000); - * - * // call `wrapped` as you would `myFunction` - * wrapped({ bar: 'bar' }, function(err, data) { - * // if `myFunction` takes < 1000 ms to execute, `err` - * // and `data` will have their expected values - * - * // else `err` will be an Error with the code 'ETIMEDOUT' - * }); - */ -function timeout(asyncFn, milliseconds, info) { - var fn = (0, _wrapAsync2.default)(asyncFn); - - return (0, _initialParams2.default)(function (args, callback) { - var timedOut = false; - var timer; - - function timeoutCallback() { - var name = asyncFn.name || 'anonymous'; - var error = new Error('Callback function "' + name + '" timed out.'); - error.code = 'ETIMEDOUT'; - if (info) { - error.info = info; - } - timedOut = true; - callback(error); - } - - args.push(function () { - if (!timedOut) { - callback.apply(null, arguments); - clearTimeout(timer); - } - }); - - // setup timer and call original function - timer = setTimeout(timeoutCallback, milliseconds); - fn.apply(null, args); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/times.js b/node_modules/async/times.js deleted file mode 100644 index b5ca24d..0000000 --- a/node_modules/async/times.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _timesLimit = require('./timesLimit'); - -var _timesLimit2 = _interopRequireDefault(_timesLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Calls the `iteratee` function `n` times, and accumulates results in the same - * manner you would use with [map]{@link module:Collections.map}. - * - * @name times - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.map]{@link module:Collections.map} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - * @example - * - * // Pretend this is some complicated async factory - * var createUser = function(id, callback) { - * callback(null, { - * id: 'user' + id - * }); - * }; - * - * // generate 5 users - * async.times(5, function(n, next) { - * createUser(n, function(err, user) { - * next(err, user); - * }); - * }, function(err, users) { - * // we should now have 5 users - * }); - */ -exports.default = (0, _doLimit2.default)(_timesLimit2.default, Infinity); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/timesLimit.js b/node_modules/async/timesLimit.js deleted file mode 100644 index aad8495..0000000 --- a/node_modules/async/timesLimit.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = timeLimit; - -var _mapLimit = require('./mapLimit'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -var _baseRange = require('lodash/_baseRange'); - -var _baseRange2 = _interopRequireDefault(_baseRange); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a - * time. - * - * @name timesLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} count - The number of times to run the function. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see [async.map]{@link module:Collections.map}. - */ -function timeLimit(count, limit, iteratee, callback) { - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _mapLimit2.default)((0, _baseRange2.default)(0, count, 1), limit, _iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/timesSeries.js b/node_modules/async/timesSeries.js deleted file mode 100644 index f187a35..0000000 --- a/node_modules/async/timesSeries.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _timesLimit = require('./timesLimit'); - -var _timesLimit2 = _interopRequireDefault(_timesLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time. - * - * @name timesSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - */ -exports.default = (0, _doLimit2.default)(_timesLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/transform.js b/node_modules/async/transform.js deleted file mode 100644 index 84ee217..0000000 --- a/node_modules/async/transform.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = transform; - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _eachOf = require('./eachOf'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * A relative of `reduce`. Takes an Object or Array, and iterates over each - * element in series, each step potentially mutating an `accumulator` value. - * The type of the accumulator defaults to the type of collection passed in. - * - * @name transform - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {*} [accumulator] - The initial state of the transform. If omitted, - * it will default to an empty Object or Array, depending on the type of `coll` - * @param {AsyncFunction} iteratee - A function applied to each item in the - * collection that potentially modifies the accumulator. - * Invoked with (accumulator, item, key, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the transformed accumulator. - * Invoked with (err, result). - * @example - * - * async.transform([1,2,3], function(acc, item, index, callback) { - * // pointless async: - * process.nextTick(function() { - * acc.push(item * 2) - * callback(null) - * }); - * }, function(err, result) { - * // result is now equal to [2, 4, 6] - * }); - * - * @example - * - * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) { - * setImmediate(function () { - * obj[key] = val * 2; - * callback(); - * }) - * }, function (err, result) { - * // result is equal to {a: 2, b: 4, c: 6} - * }) - */ -function transform(coll, accumulator, iteratee, callback) { - if (arguments.length <= 3) { - callback = iteratee; - iteratee = accumulator; - accumulator = (0, _isArray2.default)(coll) ? [] : {}; - } - callback = (0, _once2.default)(callback || _noop2.default); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - - (0, _eachOf2.default)(coll, function (v, k, cb) { - _iteratee(accumulator, v, k, cb); - }, function (err) { - callback(err, accumulator); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/tryEach.js b/node_modules/async/tryEach.js deleted file mode 100644 index f4e4c97..0000000 --- a/node_modules/async/tryEach.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = tryEach; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _eachSeries = require('./eachSeries'); - -var _eachSeries2 = _interopRequireDefault(_eachSeries); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * It runs each task in series but stops whenever any of the functions were - * successful. If one of the tasks were successful, the `callback` will be - * passed the result of the successful task. If all tasks fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name tryEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection containing functions to - * run, each function is passed a `callback(err, result)` it must call on - * completion with an error `err` (which can be `null`) and an optional `result` - * value. - * @param {Function} [callback] - An optional callback which is called when one - * of the tasks has succeeded, or all have failed. It receives the `err` and - * `result` arguments of the last attempt at completing the `task`. Invoked with - * (err, results). - * @example - * async.tryEach([ - * function getDataFromFirstWebsite(callback) { - * // Try getting the data from the first website - * callback(err, data); - * }, - * function getDataFromSecondWebsite(callback) { - * // First website failed, - * // Try getting the data from the backup website - * callback(err, data); - * } - * ], - * // optional callback - * function(err, results) { - * Now do something with the data. - * }); - * - */ -function tryEach(tasks, callback) { - var error = null; - var result; - callback = callback || _noop2.default; - (0, _eachSeries2.default)(tasks, function (task, callback) { - (0, _wrapAsync2.default)(task)(function (err, res /*, ...args*/) { - if (arguments.length > 2) { - result = (0, _slice2.default)(arguments, 1); - } else { - result = res; - } - error = err; - callback(!err); - }); - }, function () { - callback(error, result); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/unmemoize.js b/node_modules/async/unmemoize.js deleted file mode 100644 index 08f9f9f..0000000 --- a/node_modules/async/unmemoize.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = unmemoize; -/** - * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original, - * unmemoized form. Handy for testing. - * - * @name unmemoize - * @static - * @memberOf module:Utils - * @method - * @see [async.memoize]{@link module:Utils.memoize} - * @category Util - * @param {AsyncFunction} fn - the memoized function - * @returns {AsyncFunction} a function that calls the original unmemoized function - */ -function unmemoize(fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/until.js b/node_modules/async/until.js deleted file mode 100644 index 29955ab..0000000 --- a/node_modules/async/until.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = until; - -var _whilst = require('./whilst'); - -var _whilst2 = _interopRequireDefault(_whilst); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. `callback` will be passed an error and any - * arguments passed to the final `iteratee`'s callback. - * - * The inverse of [whilst]{@link module:ControlFlow.whilst}. - * - * @name until - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {Function} test - synchronous truth test to perform before each - * execution of `iteratee`. Invoked with (). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - */ -function until(test, iteratee, callback) { - (0, _whilst2.default)(function () { - return !test.apply(this, arguments); - }, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/waterfall.js b/node_modules/async/waterfall.js deleted file mode 100644 index d547d6b..0000000 --- a/node_modules/async/waterfall.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (tasks, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - if (!(0, _isArray2.default)(tasks)) return callback(new Error('First argument to waterfall must be an array of functions')); - if (!tasks.length) return callback(); - var taskIndex = 0; - - function nextTask(args) { - var task = (0, _wrapAsync2.default)(tasks[taskIndex++]); - args.push((0, _onlyOnce2.default)(next)); - task.apply(null, args); - } - - function next(err /*, ...args*/) { - if (err || taskIndex === tasks.length) { - return callback.apply(null, arguments); - } - nextTask((0, _slice2.default)(arguments, 1)); - } - - nextTask([]); -}; - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; - -/** - * Runs the `tasks` array of functions in series, each passing their results to - * the next in the array. However, if any of the `tasks` pass an error to their - * own callback, the next function is not executed, and the main `callback` is - * immediately called with the error. - * - * @name waterfall - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array of [async functions]{@link AsyncFunction} - * to run. - * Each function should complete with any number of `result` values. - * The `result` values will be passed as arguments, in order, to the next task. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This will be passed the results of the last task's - * callback. Invoked with (err, [results]). - * @returns undefined - * @example - * - * async.waterfall([ - * function(callback) { - * callback(null, 'one', 'two'); - * }, - * function(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * }, - * function(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - * ], function (err, result) { - * // result now equals 'done' - * }); - * - * // Or, with named functions: - * async.waterfall([ - * myFirstFunction, - * mySecondFunction, - * myLastFunction, - * ], function (err, result) { - * // result now equals 'done' - * }); - * function myFirstFunction(callback) { - * callback(null, 'one', 'two'); - * } - * function mySecondFunction(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * } - * function myLastFunction(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - */ \ No newline at end of file diff --git a/node_modules/async/whilst.js b/node_modules/async/whilst.js deleted file mode 100644 index 9c4d8f6..0000000 --- a/node_modules/async/whilst.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = whilst; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. - * - * @name whilst - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Function} test - synchronous truth test to perform before each - * execution of `iteratee`. Invoked with (). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns undefined - * @example - * - * var count = 0; - * async.whilst( - * function() { return count < 5; }, - * function(callback) { - * count++; - * setTimeout(function() { - * callback(null, count); - * }, 1000); - * }, - * function (err, n) { - * // 5 seconds have passed, n = 5 - * } - * ); - */ -function whilst(test, iteratee, callback) { - callback = (0, _onlyOnce2.default)(callback || _noop2.default); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - if (!test()) return callback(null); - var next = function (err /*, ...args*/) { - if (err) return callback(err); - if (test()) return _iteratee(next); - var args = (0, _slice2.default)(arguments, 1); - callback.apply(null, [null].concat(args)); - }; - _iteratee(next); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/wrapSync.js b/node_modules/async/wrapSync.js deleted file mode 100644 index 5e3fc91..0000000 --- a/node_modules/async/wrapSync.js +++ /dev/null @@ -1,110 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = asyncify; - -var _isObject = require('lodash/isObject'); - -var _isObject2 = _interopRequireDefault(_isObject); - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _setImmediate = require('./internal/setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Take a sync function and make it async, passing its return value to a - * callback. This is useful for plugging sync functions into a waterfall, - * series, or other async functions. Any arguments passed to the generated - * function will be passed to the wrapped function (except for the final - * callback argument). Errors thrown will be passed to the callback. - * - * If the function passed to `asyncify` returns a Promise, that promises's - * resolved/rejected state will be used to call the callback, rather than simply - * the synchronous return value. - * - * This also means you can asyncify ES2017 `async` functions. - * - * @name asyncify - * @static - * @memberOf module:Utils - * @method - * @alias wrapSync - * @category Util - * @param {Function} func - The synchronous function, or Promise-returning - * function to convert to an {@link AsyncFunction}. - * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be - * invoked with `(args..., callback)`. - * @example - * - * // passing a regular synchronous function - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(JSON.parse), - * function (data, next) { - * // data is the result of parsing the text. - * // If there was a parsing error, it would have been caught. - * } - * ], callback); - * - * // passing a function returning a promise - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(function (contents) { - * return db.model.create(contents); - * }), - * function (model, next) { - * // `model` is the instantiated model object. - * // If there was an error, this function would be skipped. - * } - * ], callback); - * - * // es2017 example, though `asyncify` is not needed if your JS environment - * // supports async functions out of the box - * var q = async.queue(async.asyncify(async function(file) { - * var intermediateStep = await processFile(file); - * return await somePromise(intermediateStep) - * })); - * - * q.push(files); - */ -function asyncify(func) { - return (0, _initialParams2.default)(function (args, callback) { - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if ((0, _isObject2.default)(result) && typeof result.then === 'function') { - result.then(function (value) { - invokeCallback(callback, null, value); - }, function (err) { - invokeCallback(callback, err.message ? err : new Error(err)); - }); - } else { - callback(null, result); - } - }); -} - -function invokeCallback(callback, error, value) { - try { - callback(error, value); - } catch (e) { - (0, _setImmediate2.default)(rethrow, e); - } -} - -function rethrow(error) { - throw error; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/basic-auth/HISTORY.md b/node_modules/basic-auth/HISTORY.md deleted file mode 100644 index 2c44a01..0000000 --- a/node_modules/basic-auth/HISTORY.md +++ /dev/null @@ -1,52 +0,0 @@ -2.0.1 / 2018-09-19 -================== - - * deps: safe-buffer@5.1.2 - -2.0.0 / 2017-09-12 -================== - - * Drop support for Node.js below 0.8 - * Remove `auth(ctx)` signature -- pass in header or `auth(ctx.req)` - * Use `safe-buffer` for improved Buffer API - -1.1.0 / 2016-11-18 -================== - - * Add `auth.parse` for low-level string parsing - -1.0.4 / 2016-05-10 -================== - - * Improve error message when `req` argument is not an object - * Improve error message when `req` missing `headers` property - -1.0.3 / 2015-07-01 -================== - - * Fix regression accepting a Koa context - -1.0.2 / 2015-06-12 -================== - - * Improve error message when `req` argument missing - * perf: enable strict mode - * perf: hoist regular expression - * perf: parse with regular expressions - * perf: remove argument reassignment - -1.0.1 / 2015-05-04 -================== - - * Update readme - -1.0.0 / 2014-07-01 -================== - - * Support empty password - * Support empty username - -0.0.1 / 2013-11-30 -================== - - * Initial release diff --git a/node_modules/basic-auth/LICENSE b/node_modules/basic-auth/LICENSE deleted file mode 100644 index 89041f6..0000000 --- a/node_modules/basic-auth/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2013 TJ Holowaychuk -Copyright (c) 2014 Jonathan Ong <me@jongleberry.com> -Copyright (c) 2015-2016 Douglas Christopher Wilson <doug@somethingdoug.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/node_modules/basic-auth/README.md b/node_modules/basic-auth/README.md deleted file mode 100644 index 5f3d758..0000000 --- a/node_modules/basic-auth/README.md +++ /dev/null @@ -1,113 +0,0 @@ -# basic-auth - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Generic basic auth Authorization header field parser for whatever. - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -``` -$ npm install basic-auth -``` - -## API - -<!-- eslint-disable no-unused-vars --> - -```js -var auth = require('basic-auth') -``` - -### auth(req) - -Get the basic auth credentials from the given request. The `Authorization` -header is parsed and if the header is invalid, `undefined` is returned, -otherwise an object with `name` and `pass` properties. - -### auth.parse(string) - -Parse a basic auth authorization header string. This will return an object -with `name` and `pass` properties, or `undefined` if the string is invalid. - -## Example - -Pass a Node.js request object to the module export. If parsing fails -`undefined` is returned, otherwise an object with `.name` and `.pass`. - -<!-- eslint-disable no-unused-vars, no-undef --> - -```js -var auth = require('basic-auth') -var user = auth(req) -// => { name: 'something', pass: 'whatever' } -``` - -A header string from any other location can also be parsed with -`auth.parse`, for example a `Proxy-Authorization` header: - -<!-- eslint-disable no-unused-vars, no-undef --> - -```js -var auth = require('basic-auth') -var user = auth.parse(req.getHeader('Proxy-Authorization')) -``` - -### With vanilla node.js http server - -```js -var http = require('http') -var auth = require('basic-auth') -var compare = require('tsscmp') - -// Create server -var server = http.createServer(function (req, res) { - var credentials = auth(req) - - // Check credentials - // The "check" function will typically be against your user store - if (!credentials || !check(credentials.name, credentials.pass)) { - res.statusCode = 401 - res.setHeader('WWW-Authenticate', 'Basic realm="example"') - res.end('Access denied') - } else { - res.end('Access granted') - } -}) - -// Basic function to validate credentials for example -function check (name, pass) { - var valid = true - - // Simple method to prevent short-circut and use timing-safe compare - valid = compare(name, 'john') && valid - valid = compare(pass, 'secret') && valid - - return valid -} - -// Listen -server.listen(3000) -``` - -# License - -[MIT](LICENSE) - -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/basic-auth/master -[coveralls-url]: https://coveralls.io/r/jshttp/basic-auth?branch=master -[downloads-image]: https://badgen.net/npm/dm/basic-auth -[downloads-url]: https://npmjs.org/package/basic-auth -[node-version-image]: https://badgen.net/npm/node/basic-auth -[node-version-url]: https://nodejs.org/en/download -[npm-image]: https://badgen.net/npm/v/basic-auth -[npm-url]: https://npmjs.org/package/basic-auth -[travis-image]: https://badgen.net/travis/jshttp/basic-auth/master -[travis-url]: https://travis-ci.org/jshttp/basic-auth diff --git a/node_modules/basic-auth/index.js b/node_modules/basic-auth/index.js deleted file mode 100644 index 9106e64..0000000 --- a/node_modules/basic-auth/index.js +++ /dev/null @@ -1,133 +0,0 @@ -/*! - * basic-auth - * Copyright(c) 2013 TJ Holowaychuk - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015-2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var Buffer = require('safe-buffer').Buffer - -/** - * Module exports. - * @public - */ - -module.exports = auth -module.exports.parse = parse - -/** - * RegExp for basic auth credentials - * - * credentials = auth-scheme 1*SP token68 - * auth-scheme = "Basic" ; case insensitive - * token68 = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" ) *"=" - * @private - */ - -var CREDENTIALS_REGEXP = /^ *(?:[Bb][Aa][Ss][Ii][Cc]) +([A-Za-z0-9._~+/-]+=*) *$/ - -/** - * RegExp for basic auth user/pass - * - * user-pass = userid ":" password - * userid = *<TEXT excluding ":"> - * password = *TEXT - * @private - */ - -var USER_PASS_REGEXP = /^([^:]*):(.*)$/ - -/** - * Parse the Authorization header field of a request. - * - * @param {object} req - * @return {object} with .name and .pass - * @public - */ - -function auth (req) { - if (!req) { - throw new TypeError('argument req is required') - } - - if (typeof req !== 'object') { - throw new TypeError('argument req is required to be an object') - } - - // get header - var header = getAuthorization(req) - - // parse header - return parse(header) -} - -/** - * Decode base64 string. - * @private - */ - -function decodeBase64 (str) { - return Buffer.from(str, 'base64').toString() -} - -/** - * Get the Authorization header from request object. - * @private - */ - -function getAuthorization (req) { - if (!req.headers || typeof req.headers !== 'object') { - throw new TypeError('argument req is required to have headers property') - } - - return req.headers.authorization -} - -/** - * Parse basic auth to object. - * - * @param {string} string - * @return {object} - * @public - */ - -function parse (string) { - if (typeof string !== 'string') { - return undefined - } - - // parse header - var match = CREDENTIALS_REGEXP.exec(string) - - if (!match) { - return undefined - } - - // decode user pass - var userPass = USER_PASS_REGEXP.exec(decodeBase64(match[1])) - - if (!userPass) { - return undefined - } - - // return credentials object - return new Credentials(userPass[1], userPass[2]) -} - -/** - * Object to represent user credentials. - * @private - */ - -function Credentials (name, pass) { - this.name = name - this.pass = pass -} diff --git a/node_modules/basic-auth/package.json b/node_modules/basic-auth/package.json deleted file mode 100644 index 01bd8dc..0000000 --- a/node_modules/basic-auth/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "basic-auth", - "description": "node.js basic auth parser", - "version": "2.0.1", - "license": "MIT", - "keywords": [ - "basic", - "auth", - "authorization", - "basicauth" - ], - "repository": "jshttp/basic-auth", - "dependencies": { - "safe-buffer": "5.1.2" - }, - "devDependencies": { - "eslint": "5.6.0", - "eslint-config-standard": "12.0.0", - "eslint-plugin-import": "2.14.0", - "eslint-plugin-markdown": "1.0.0-beta.6", - "eslint-plugin-node": "7.0.1", - "eslint-plugin-promise": "4.0.1", - "eslint-plugin-standard": "4.0.0", - "istanbul": "0.4.5", - "mocha": "5.2.0" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --check-leaks --reporter spec --bail", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - } -} diff --git a/node_modules/call-bind-apply-helpers/.eslintrc b/node_modules/call-bind-apply-helpers/.eslintrc deleted file mode 100644 index dfa9a6c..0000000 --- a/node_modules/call-bind-apply-helpers/.eslintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "func-name-matching": 0, - "id-length": 0, - "new-cap": [2, { - "capIsNewExceptions": [ - "GetIntrinsic", - ], - }], - "no-magic-numbers": 0, - }, -} diff --git a/node_modules/call-bind-apply-helpers/.github/FUNDING.yml b/node_modules/call-bind-apply-helpers/.github/FUNDING.yml deleted file mode 100644 index 0011e9d..0000000 --- a/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/call-bind-apply-helpers -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/call-bind-apply-helpers/.nycrc b/node_modules/call-bind-apply-helpers/.nycrc deleted file mode 100644 index bdd626c..0000000 --- a/node_modules/call-bind-apply-helpers/.nycrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/call-bind-apply-helpers/CHANGELOG.md b/node_modules/call-bind-apply-helpers/CHANGELOG.md deleted file mode 100644 index cf630e8..0000000 --- a/node_modules/call-bind-apply-helpers/CHANGELOG.md +++ /dev/null @@ -1,23 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.1](https://github.com/ljharb/call-bind-apply-helpers/compare/v1.0.0...v1.0.1) - 2024-12-08 - -### Commits - -- [types] `reflectApply`: fix types [`4efc396`](https://github.com/ljharb/call-bind-apply-helpers/commit/4efc3965351a4f02cc55e836fa391d3d11ef2ef8) -- [Fix] `reflectApply`: oops, Reflect is not a function [`83cc739`](https://github.com/ljharb/call-bind-apply-helpers/commit/83cc7395de6b79b7730bdf092f1436f0b1263c75) -- [Dev Deps] update `@arethetypeswrong/cli` [`80bd5d3`](https://github.com/ljharb/call-bind-apply-helpers/commit/80bd5d3ae58b4f6b6995ce439dd5a1bcb178a940) - -## v1.0.0 - 2024-12-05 - -### Commits - -- Initial implementation, tests, readme [`7879629`](https://github.com/ljharb/call-bind-apply-helpers/commit/78796290f9b7430c9934d6f33d94ae9bc89fce04) -- Initial commit [`3f1dc16`](https://github.com/ljharb/call-bind-apply-helpers/commit/3f1dc164afc43285631b114a5f9dd9137b2b952f) -- npm init [`081df04`](https://github.com/ljharb/call-bind-apply-helpers/commit/081df048c312fcee400922026f6e97281200a603) -- Only apps should have lockfiles [`5b9ca0f`](https://github.com/ljharb/call-bind-apply-helpers/commit/5b9ca0fe8101ebfaf309c549caac4e0a017ed930) diff --git a/node_modules/call-bind-apply-helpers/LICENSE b/node_modules/call-bind-apply-helpers/LICENSE deleted file mode 100644 index f82f389..0000000 --- a/node_modules/call-bind-apply-helpers/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Jordan Harband - -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/node_modules/call-bind-apply-helpers/README.md b/node_modules/call-bind-apply-helpers/README.md deleted file mode 100644 index 8fc0dae..0000000 --- a/node_modules/call-bind-apply-helpers/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# call-bind-apply-helpers <sup>[![Version Badge][npm-version-svg]][package-url]</sup> - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Helper functions around Function call/apply/bind, for use in `call-bind`. - -The only packages that should likely ever use this package directly are `call-bind` and `get-intrinsic`. -Please use `call-bind` unless you have a very good reason not to. - -## Getting started - -```sh -npm install --save call-bind-apply-helpers -``` - -## Usage/Examples - -```js -const assert = require('assert'); -const callBindBasic = require('call-bind-apply-helpers'); - -function f(a, b) { - assert.equal(this, 1); - assert.equal(a, 2); - assert.equal(b, 3); - assert.equal(arguments.length, 2); -} - -const fBound = callBindBasic([f, 1]); - -delete Function.prototype.call; -delete Function.prototype.bind; - -fBound(2, 3); -``` - -## Tests - -Clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/call-bind-apply-helpers -[npm-version-svg]: https://versionbadg.es/ljharb/call-bind-apply-helpers.svg -[deps-svg]: https://david-dm.org/ljharb/call-bind-apply-helpers.svg -[deps-url]: https://david-dm.org/ljharb/call-bind-apply-helpers -[dev-deps-svg]: https://david-dm.org/ljharb/call-bind-apply-helpers/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/call-bind-apply-helpers#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/call-bind-apply-helpers.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/call-bind-apply-helpers.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/call-bind-apply-helpers.svg -[downloads-url]: https://npm-stat.com/charts.html?package=call-bind-apply-helpers -[codecov-image]: https://codecov.io/gh/ljharb/call-bind-apply-helpers/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/call-bind-apply-helpers/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bind-apply-helpers -[actions-url]: https://github.com/ljharb/call-bind-apply-helpers/actions diff --git a/node_modules/call-bind-apply-helpers/actualApply.d.ts b/node_modules/call-bind-apply-helpers/actualApply.d.ts deleted file mode 100644 index b87286a..0000000 --- a/node_modules/call-bind-apply-helpers/actualApply.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Reflect.apply; \ No newline at end of file diff --git a/node_modules/call-bind-apply-helpers/actualApply.js b/node_modules/call-bind-apply-helpers/actualApply.js deleted file mode 100644 index ffa5135..0000000 --- a/node_modules/call-bind-apply-helpers/actualApply.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); - -var $apply = require('./functionApply'); -var $call = require('./functionCall'); -var $reflectApply = require('./reflectApply'); - -/** @type {import('./actualApply')} */ -module.exports = $reflectApply || bind.call($call, $apply); diff --git a/node_modules/call-bind-apply-helpers/applyBind.d.ts b/node_modules/call-bind-apply-helpers/applyBind.d.ts deleted file mode 100644 index d176c1a..0000000 --- a/node_modules/call-bind-apply-helpers/applyBind.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import actualApply from './actualApply'; - -type TupleSplitHead<T extends any[], N extends number> = T['length'] extends N - ? T - : T extends [...infer R, any] - ? TupleSplitHead<R, N> - : never - -type TupleSplitTail<T, N extends number, O extends any[] = []> = O['length'] extends N - ? T - : T extends [infer F, ...infer R] - ? TupleSplitTail<[...R], N, [...O, F]> - : never - -type TupleSplit<T extends any[], N extends number> = [TupleSplitHead<T, N>, TupleSplitTail<T, N>] - -declare function applyBind(...args: TupleSplit<Parameters<typeof actualApply>, 2>[1]): ReturnType<typeof actualApply>; - -export = applyBind; \ No newline at end of file diff --git a/node_modules/call-bind-apply-helpers/applyBind.js b/node_modules/call-bind-apply-helpers/applyBind.js deleted file mode 100644 index d2b7723..0000000 --- a/node_modules/call-bind-apply-helpers/applyBind.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); -var $apply = require('./functionApply'); -var actualApply = require('./actualApply'); - -/** @type {import('./applyBind')} */ -module.exports = function applyBind() { - return actualApply(bind, $apply, arguments); -}; diff --git a/node_modules/call-bind-apply-helpers/functionApply.d.ts b/node_modules/call-bind-apply-helpers/functionApply.d.ts deleted file mode 100644 index 1f6e11b..0000000 --- a/node_modules/call-bind-apply-helpers/functionApply.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Function.prototype.apply; \ No newline at end of file diff --git a/node_modules/call-bind-apply-helpers/functionApply.js b/node_modules/call-bind-apply-helpers/functionApply.js deleted file mode 100644 index c71df9c..0000000 --- a/node_modules/call-bind-apply-helpers/functionApply.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./functionApply')} */ -module.exports = Function.prototype.apply; diff --git a/node_modules/call-bind-apply-helpers/functionCall.d.ts b/node_modules/call-bind-apply-helpers/functionCall.d.ts deleted file mode 100644 index 15e93df..0000000 --- a/node_modules/call-bind-apply-helpers/functionCall.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Function.prototype.call; \ No newline at end of file diff --git a/node_modules/call-bind-apply-helpers/functionCall.js b/node_modules/call-bind-apply-helpers/functionCall.js deleted file mode 100644 index 7a8d873..0000000 --- a/node_modules/call-bind-apply-helpers/functionCall.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./functionCall')} */ -module.exports = Function.prototype.call; diff --git a/node_modules/call-bind-apply-helpers/index.d.ts b/node_modules/call-bind-apply-helpers/index.d.ts deleted file mode 100644 index a7ae2c5..0000000 --- a/node_modules/call-bind-apply-helpers/index.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -type RemoveFromTuple< - Tuple extends unknown[], - RemoveCount extends number, - Index extends 1[] = [] -> = Index["length"] extends RemoveCount - ? Tuple - : Tuple extends [first: unknown, ...infer Rest] - ? RemoveFromTuple<Rest, RemoveCount, [...Index, 1]> - : Tuple; - -type ConcatTuples< - Prefix extends unknown[], - Suffix extends unknown[] -> = [...Prefix, ...Suffix]; - -type ReplaceThis<T, NewThis> = T extends (this: infer OldThis, ...args: infer A) => infer R - ? (this: NewThis, ...args: A) => R - : never; - -type BindFunction< - TThis, - T extends (this: TThis, ...args: any[]) => any, // Allow specific types to propagate - TBoundArgs extends unknown[], - ReceiverBound extends boolean -> = ReceiverBound extends true - ? (...args: RemoveFromTuple<Parameters<T>, TBoundArgs["length"] & number>) => ReturnType<ReplaceThis<T, TThis>> - : (...args: ConcatTuples<[TThis], RemoveFromTuple<Parameters<T>, TBoundArgs["length"] & number>>) => ReturnType<T>; - -declare function callBind< - TThis, - T extends (this: TThis, ...args: any[]) => any, - TBoundArgs extends Partial<Parameters<T>> ->( - args: [fn: T, thisArg: TThis, ...boundArgs: TBoundArgs] -): BindFunction<TThis, T, TBoundArgs, true>; - -declare function callBind< - TThis, - T extends (this: TThis, ...args: any[]) => any, - TBoundArgs extends Partial<Parameters<T>> ->( - args: [fn: T, ...boundArgs: TBoundArgs] -): BindFunction<TThis, T, TBoundArgs, false>; - -export as namespace callBind; -export = callBind; diff --git a/node_modules/call-bind-apply-helpers/index.js b/node_modules/call-bind-apply-helpers/index.js deleted file mode 100644 index 8b6b994..0000000 --- a/node_modules/call-bind-apply-helpers/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); -var $TypeError = require('es-errors/type'); - -var $call = require('./functionCall'); -var $actualApply = require('./actualApply'); - -/** @type {import('.')} */ -module.exports = function callBindBasic(args) { - if (args.length < 1 || typeof args[0] !== 'function') { - throw new $TypeError('a function is required'); - } - return $actualApply(bind, $call, args); -}; diff --git a/node_modules/call-bind-apply-helpers/package.json b/node_modules/call-bind-apply-helpers/package.json deleted file mode 100644 index 7398be7..0000000 --- a/node_modules/call-bind-apply-helpers/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "name": "call-bind-apply-helpers", - "version": "1.0.1", - "description": "Helper functions around Function call/apply/bind, for use in `call-bind`", - "main": "index.js", - "exports": { - ".": "./index.js", - "./actualApply": "./actualApply.js", - "./applyBind": "./applyBind.js", - "./functionApply": "./functionApply.js", - "./functionCall": "./functionCall.js", - "./reflectApply": "./reflectApply.js", - "./package.json": "./package.json" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=auto", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=.js,.mjs .", - "postlint": "tsc -p . && attw -P", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>=10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/call-bind-apply-helpers.git" - }, - "author": "Jordan Harband <ljharb@gmail.com>", - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/call-bind-apply-helpers/issues" - }, - "homepage": "https://github.com/ljharb/call-bind-apply-helpers#readme", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.1", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.2", - "@types/for-each": "^0.3.3", - "@types/function-bind": "^1.1.10", - "@types/object-inspect": "^1.13.0", - "@types/tape": "^5.6.5", - "auto-changelog": "^2.5.0", - "encoding": "^0.1.13", - "es-value-fixtures": "^1.5.0", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "for-each": "^0.3.3", - "has-strict-mode": "^1.0.1", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "object-inspect": "^1.13.3", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "testling": { - "files": "test/index.js" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/call-bind-apply-helpers/reflectApply.d.ts b/node_modules/call-bind-apply-helpers/reflectApply.d.ts deleted file mode 100644 index 6b2ae76..0000000 --- a/node_modules/call-bind-apply-helpers/reflectApply.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const reflectApply: false | typeof Reflect.apply; - -export = reflectApply; diff --git a/node_modules/call-bind-apply-helpers/reflectApply.js b/node_modules/call-bind-apply-helpers/reflectApply.js deleted file mode 100644 index 3d03caa..0000000 --- a/node_modules/call-bind-apply-helpers/reflectApply.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./reflectApply')} */ -module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; diff --git a/node_modules/call-bind-apply-helpers/test/index.js b/node_modules/call-bind-apply-helpers/test/index.js deleted file mode 100644 index 8acc08a..0000000 --- a/node_modules/call-bind-apply-helpers/test/index.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -var callBind = require('../'); -var hasStrictMode = require('has-strict-mode')(); -var forEach = require('for-each'); -var inspect = require('object-inspect'); -var v = require('es-value-fixtures'); - -var test = require('tape'); - -test('callBindBasic', function (t) { - forEach(v.nonFunctions, function (nonFunction) { - t['throws']( - // @ts-expect-error - function () { callBind([nonFunction]); }, - TypeError, - inspect(nonFunction) + ' is not a function' - ); - }); - - var sentinel = { sentinel: true }; - /** @type {<T>(this: T, a: number, b: number) => [T | undefined, number, number]} */ - var func = function (a, b) { - // eslint-disable-next-line no-invalid-this - return [!hasStrictMode && this === global ? undefined : this, a, b]; - }; - t.equal(func.length, 2, 'original function length is 2'); - - /** type {(thisArg: unknown, a: number, b: number) => [unknown, number, number]} */ - var bound = callBind([func]); - /** type {((a: number, b: number) => [sentinel, typeof a, typeof b])} */ - var boundR = callBind([func, sentinel]); - /** type {((b: number) => [sentinel, number, typeof b])} */ - var boundArg = callBind([func, sentinel, 1]); - - // @ts-expect-error - t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with no args'); - - // @ts-expect-error - t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args'); - // @ts-expect-error - t.deepEqual(bound(1, 2), [hasStrictMode ? 1 : Object(1), 2, undefined], 'bound func too few args'); - // @ts-expect-error - t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args'); - // @ts-expect-error - t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args'); - - t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args'); - t.deepEqual(bound(1, 2, 3), [hasStrictMode ? 1 : Object(1), 2, 3], 'bound func with right args'); - t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args'); - t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg'); - - // @ts-expect-error - t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args'); - // @ts-expect-error - t.deepEqual(bound(1, 2, 3, 4), [hasStrictMode ? 1 : Object(1), 2, 3], 'bound func with too many args'); - // @ts-expect-error - t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args'); - // @ts-expect-error - t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args'); - - t.end(); -}); diff --git a/node_modules/call-bind-apply-helpers/tsconfig.json b/node_modules/call-bind-apply-helpers/tsconfig.json deleted file mode 100644 index aef9993..0000000 --- a/node_modules/call-bind-apply-helpers/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "es2021", - }, - "exclude": [ - "coverage", - ], -} \ No newline at end of file diff --git a/node_modules/call-bound/.eslintrc b/node_modules/call-bound/.eslintrc deleted file mode 100644 index 2612ed8..0000000 --- a/node_modules/call-bound/.eslintrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "new-cap": [2, { - "capIsNewExceptions": [ - "GetIntrinsic", - ], - }], - }, -} diff --git a/node_modules/call-bound/.github/FUNDING.yml b/node_modules/call-bound/.github/FUNDING.yml deleted file mode 100644 index 2a2a135..0000000 --- a/node_modules/call-bound/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/call-bound -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/call-bound/.nycrc b/node_modules/call-bound/.nycrc deleted file mode 100644 index bdd626c..0000000 --- a/node_modules/call-bound/.nycrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/call-bound/CHANGELOG.md b/node_modules/call-bound/CHANGELOG.md deleted file mode 100644 index 25fa7a5..0000000 --- a/node_modules/call-bound/CHANGELOG.md +++ /dev/null @@ -1,34 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.3](https://github.com/ljharb/call-bound/compare/v1.0.2...v1.0.3) - 2024-12-15 - -### Commits - -- [Refactor] use `call-bind-apply-helpers` instead of `call-bind` [`5e0b134`](https://github.com/ljharb/call-bound/commit/5e0b13496df14fb7d05dae9412f088da8d3f75be) -- [Deps] update `get-intrinsic` [`41fc967`](https://github.com/ljharb/call-bound/commit/41fc96732a22c7b7e8f381f93ccc54bb6293be2e) -- [readme] fix example [`79a0137`](https://github.com/ljharb/call-bound/commit/79a0137723f7c6d09c9c05452bbf8d5efb5d6e49) -- [meta] add `sideEffects` flag [`08b07be`](https://github.com/ljharb/call-bound/commit/08b07be7f1c03f67dc6f3cdaf0906259771859f7) - -## [v1.0.2](https://github.com/ljharb/call-bound/compare/v1.0.1...v1.0.2) - 2024-12-10 - -### Commits - -- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `gopd` [`e6a5ffe`](https://github.com/ljharb/call-bound/commit/e6a5ffe849368fe4f74dfd6cdeca1b9baa39e8d5) -- [Deps] update `call-bind`, `get-intrinsic` [`2aeb5b5`](https://github.com/ljharb/call-bound/commit/2aeb5b521dc2b2683d1345c753ea1161de2d1c14) -- [types] improve return type [`1a0c9fe`](https://github.com/ljharb/call-bound/commit/1a0c9fe3114471e7ca1f57d104e2efe713bb4871) - -## v1.0.1 - 2024-12-05 - -### Commits - -- Initial implementation, tests, readme, types [`6d94121`](https://github.com/ljharb/call-bound/commit/6d94121a9243602e506334069f7a03189fe3363d) -- Initial commit [`0eae867`](https://github.com/ljharb/call-bound/commit/0eae867334ea025c33e6e91cdecfc9df96680cf9) -- npm init [`71b2479`](https://github.com/ljharb/call-bound/commit/71b2479c6723e0b7d91a6b663613067e98b7b275) -- Only apps should have lockfiles [`c3754a9`](https://github.com/ljharb/call-bound/commit/c3754a949b7f9132b47e2d18c1729889736741eb) -- [actions] skip `npm ls` in node < 10 [`74275a5`](https://github.com/ljharb/call-bound/commit/74275a5186b8caf6309b6b97472bdcb0df4683a8) -- [Dev Deps] add missing peer dep [`1354de8`](https://github.com/ljharb/call-bound/commit/1354de8679413e4ae9c523d85f76fa7a5e032d97) diff --git a/node_modules/call-bound/LICENSE b/node_modules/call-bound/LICENSE deleted file mode 100644 index f82f389..0000000 --- a/node_modules/call-bound/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Jordan Harband - -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/node_modules/call-bound/README.md b/node_modules/call-bound/README.md deleted file mode 100644 index a44e43e..0000000 --- a/node_modules/call-bound/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# call-bound <sup>[![Version Badge][npm-version-svg]][package-url]</sup> - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`. - -## Getting started - -```sh -npm install --save call-bound -``` - -## Usage/Examples - -```js -const assert = require('assert'); -const callBound = require('call-bound'); - -const slice = callBound('Array.prototype.slice'); - -delete Function.prototype.call; -delete Function.prototype.bind; -delete Array.prototype.slice; - -assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]); -``` - -## Tests - -Clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/call-bound -[npm-version-svg]: https://versionbadg.es/ljharb/call-bound.svg -[deps-svg]: https://david-dm.org/ljharb/call-bound.svg -[deps-url]: https://david-dm.org/ljharb/call-bound -[dev-deps-svg]: https://david-dm.org/ljharb/call-bound/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/call-bound#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/call-bound.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/call-bound.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/call-bound.svg -[downloads-url]: https://npm-stat.com/charts.html?package=call-bound -[codecov-image]: https://codecov.io/gh/ljharb/call-bound/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/call-bound/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bound -[actions-url]: https://github.com/ljharb/call-bound/actions diff --git a/node_modules/call-bound/index.d.ts b/node_modules/call-bound/index.d.ts deleted file mode 100644 index e3d772c..0000000 --- a/node_modules/call-bound/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import callBind from 'call-bind-apply-helpers'; - -declare function callBoundIntrinsic( - name: string, - allowMissing?: false -): ReturnType<typeof callBind>; - -declare function callBoundIntrinsic( - name: string, - allowMissing: true -): undefined | ReturnType<typeof callBind>; - -export = callBoundIntrinsic; \ No newline at end of file diff --git a/node_modules/call-bound/index.js b/node_modules/call-bound/index.js deleted file mode 100644 index 3bb4012..0000000 --- a/node_modules/call-bound/index.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('get-intrinsic'); - -var callBindBasic = require('call-bind-apply-helpers'); - -/** @type {(thisArg: string, searchString: string, position?: number) => number} */ -var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]); - -/** @type {import('.')} */ -module.exports = function callBoundIntrinsic(name, allowMissing) { - // eslint-disable-next-line no-extra-parens - var intrinsic = /** @type {Parameters<typeof callBindBasic>[0][0]} */ (GetIntrinsic(name, !!allowMissing)); - if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { - return callBindBasic([intrinsic]); - } - return intrinsic; -}; diff --git a/node_modules/call-bound/package.json b/node_modules/call-bound/package.json deleted file mode 100644 index 2893ed1..0000000 --- a/node_modules/call-bound/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "name": "call-bound", - "version": "1.0.3", - "description": "Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=auto", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=.js,.mjs .", - "postlint": "tsc -p . && attw -P", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>=10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/call-bound.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "es", - "js", - "callbind", - "callbound", - "call", - "bind", - "bound", - "call-bind", - "call-bound", - "function", - "es-abstract" - ], - "author": "Jordan Harband <ljharb@gmail.com>", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/call-bound/issues" - }, - "homepage": "https://github.com/ljharb/call-bound#readme", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "get-intrinsic": "^1.2.6" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.1", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.2", - "@types/call-bind": "^1.0.5", - "@types/get-intrinsic": "^1.2.3", - "@types/tape": "^5.6.5", - "auto-changelog": "^2.5.0", - "encoding": "^0.1.13", - "es-value-fixtures": "^1.5.0", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-strict-mode": "^1.0.1", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "object-inspect": "^1.13.3", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "testling": { - "files": "test/index.js" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/call-bound/test/index.js b/node_modules/call-bound/test/index.js deleted file mode 100644 index 36f5f0b..0000000 --- a/node_modules/call-bound/test/index.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var callBound = require('../'); - -test('callBound', function (t) { - // static primitive - t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself'); - t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself'); - - // static non-function object - t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself'); - t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself'); - t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself'); - t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself'); - - // static function - t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself'); - t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself'); - - // prototype primitive - t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself'); - t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself'); - - // prototype function - t.notEqual(callBound('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString does not yield itself'); - t.notEqual(callBound('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% does not yield itself'); - t.equal(callBound('Object.prototype.toString')(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original'); - t.equal(callBound('%Object.prototype.toString%')(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original'); - - t['throws']( - function () { callBound('does not exist'); }, - SyntaxError, - 'nonexistent intrinsic throws' - ); - t['throws']( - function () { callBound('does not exist', true); }, - SyntaxError, - 'allowMissing arg still throws for unknown intrinsic' - ); - - t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) { - st['throws']( - function () { callBound('WeakRef'); }, - TypeError, - 'real but absent intrinsic throws' - ); - st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception'); - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/call-bound/tsconfig.json b/node_modules/call-bound/tsconfig.json deleted file mode 100644 index d9a6668..0000000 --- a/node_modules/call-bound/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "es2021", - }, - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/chalk/index.d.ts b/node_modules/chalk/index.d.ts deleted file mode 100644 index 9cd88f3..0000000 --- a/node_modules/chalk/index.d.ts +++ /dev/null @@ -1,415 +0,0 @@ -/** -Basic foreground colors. - -[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) -*/ -declare type ForegroundColor = - | 'black' - | 'red' - | 'green' - | 'yellow' - | 'blue' - | 'magenta' - | 'cyan' - | 'white' - | 'gray' - | 'grey' - | 'blackBright' - | 'redBright' - | 'greenBright' - | 'yellowBright' - | 'blueBright' - | 'magentaBright' - | 'cyanBright' - | 'whiteBright'; - -/** -Basic background colors. - -[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) -*/ -declare type BackgroundColor = - | 'bgBlack' - | 'bgRed' - | 'bgGreen' - | 'bgYellow' - | 'bgBlue' - | 'bgMagenta' - | 'bgCyan' - | 'bgWhite' - | 'bgGray' - | 'bgGrey' - | 'bgBlackBright' - | 'bgRedBright' - | 'bgGreenBright' - | 'bgYellowBright' - | 'bgBlueBright' - | 'bgMagentaBright' - | 'bgCyanBright' - | 'bgWhiteBright'; - -/** -Basic colors. - -[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) -*/ -declare type Color = ForegroundColor | BackgroundColor; - -declare type Modifiers = - | 'reset' - | 'bold' - | 'dim' - | 'italic' - | 'underline' - | 'inverse' - | 'hidden' - | 'strikethrough' - | 'visible'; - -declare namespace chalk { - /** - Levels: - - `0` - All colors disabled. - - `1` - Basic 16 colors support. - - `2` - ANSI 256 colors support. - - `3` - Truecolor 16 million colors support. - */ - type Level = 0 | 1 | 2 | 3; - - interface Options { - /** - Specify the color support for Chalk. - - By default, color support is automatically detected based on the environment. - - Levels: - - `0` - All colors disabled. - - `1` - Basic 16 colors support. - - `2` - ANSI 256 colors support. - - `3` - Truecolor 16 million colors support. - */ - level?: Level; - } - - /** - Return a new Chalk instance. - */ - type Instance = new (options?: Options) => Chalk; - - /** - Detect whether the terminal supports color. - */ - interface ColorSupport { - /** - The color level used by Chalk. - */ - level: Level; - - /** - Return whether Chalk supports basic 16 colors. - */ - hasBasic: boolean; - - /** - Return whether Chalk supports ANSI 256 colors. - */ - has256: boolean; - - /** - Return whether Chalk supports Truecolor 16 million colors. - */ - has16m: boolean; - } - - interface ChalkFunction { - /** - Use a template string. - - @remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341)) - - @example - ``` - import chalk = require('chalk'); - - log(chalk` - CPU: {red ${cpu.totalPercent}%} - RAM: {green ${ram.used / ram.total * 100}%} - DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} - `); - ``` - - @example - ``` - import chalk = require('chalk'); - - log(chalk.red.bgBlack`2 + 3 = {bold ${2 + 3}}`) - ``` - */ - (text: TemplateStringsArray, ...placeholders: unknown[]): string; - - (...text: unknown[]): string; - } - - interface Chalk extends ChalkFunction { - /** - Return a new Chalk instance. - */ - Instance: Instance; - - /** - The color support for Chalk. - - By default, color support is automatically detected based on the environment. - - Levels: - - `0` - All colors disabled. - - `1` - Basic 16 colors support. - - `2` - ANSI 256 colors support. - - `3` - Truecolor 16 million colors support. - */ - level: Level; - - /** - Use HEX value to set text color. - - @param color - Hexadecimal value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.hex('#DEADED'); - ``` - */ - hex(color: string): Chalk; - - /** - Use keyword color value to set text color. - - @param color - Keyword value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.keyword('orange'); - ``` - */ - keyword(color: string): Chalk; - - /** - Use RGB values to set text color. - */ - rgb(red: number, green: number, blue: number): Chalk; - - /** - Use HSL values to set text color. - */ - hsl(hue: number, saturation: number, lightness: number): Chalk; - - /** - Use HSV values to set text color. - */ - hsv(hue: number, saturation: number, value: number): Chalk; - - /** - Use HWB values to set text color. - */ - hwb(hue: number, whiteness: number, blackness: number): Chalk; - - /** - Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set text color. - - 30 <= code && code < 38 || 90 <= code && code < 98 - For example, 31 for red, 91 for redBright. - */ - ansi(code: number): Chalk; - - /** - Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. - */ - ansi256(index: number): Chalk; - - /** - Use HEX value to set background color. - - @param color - Hexadecimal value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.bgHex('#DEADED'); - ``` - */ - bgHex(color: string): Chalk; - - /** - Use keyword color value to set background color. - - @param color - Keyword value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.bgKeyword('orange'); - ``` - */ - bgKeyword(color: string): Chalk; - - /** - Use RGB values to set background color. - */ - bgRgb(red: number, green: number, blue: number): Chalk; - - /** - Use HSL values to set background color. - */ - bgHsl(hue: number, saturation: number, lightness: number): Chalk; - - /** - Use HSV values to set background color. - */ - bgHsv(hue: number, saturation: number, value: number): Chalk; - - /** - Use HWB values to set background color. - */ - bgHwb(hue: number, whiteness: number, blackness: number): Chalk; - - /** - Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set background color. - - 30 <= code && code < 38 || 90 <= code && code < 98 - For example, 31 for red, 91 for redBright. - Use the foreground code, not the background code (for example, not 41, nor 101). - */ - bgAnsi(code: number): Chalk; - - /** - Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color. - */ - bgAnsi256(index: number): Chalk; - - /** - Modifier: Resets the current color chain. - */ - readonly reset: Chalk; - - /** - Modifier: Make text bold. - */ - readonly bold: Chalk; - - /** - Modifier: Emitting only a small amount of light. - */ - readonly dim: Chalk; - - /** - Modifier: Make text italic. (Not widely supported) - */ - readonly italic: Chalk; - - /** - Modifier: Make text underline. (Not widely supported) - */ - readonly underline: Chalk; - - /** - Modifier: Inverse background and foreground colors. - */ - readonly inverse: Chalk; - - /** - Modifier: Prints the text, but makes it invisible. - */ - readonly hidden: Chalk; - - /** - Modifier: Puts a horizontal line through the center of the text. (Not widely supported) - */ - readonly strikethrough: Chalk; - - /** - Modifier: Prints the text only when Chalk has a color support level > 0. - Can be useful for things that are purely cosmetic. - */ - readonly visible: Chalk; - - readonly black: Chalk; - readonly red: Chalk; - readonly green: Chalk; - readonly yellow: Chalk; - readonly blue: Chalk; - readonly magenta: Chalk; - readonly cyan: Chalk; - readonly white: Chalk; - - /* - Alias for `blackBright`. - */ - readonly gray: Chalk; - - /* - Alias for `blackBright`. - */ - readonly grey: Chalk; - - readonly blackBright: Chalk; - readonly redBright: Chalk; - readonly greenBright: Chalk; - readonly yellowBright: Chalk; - readonly blueBright: Chalk; - readonly magentaBright: Chalk; - readonly cyanBright: Chalk; - readonly whiteBright: Chalk; - - readonly bgBlack: Chalk; - readonly bgRed: Chalk; - readonly bgGreen: Chalk; - readonly bgYellow: Chalk; - readonly bgBlue: Chalk; - readonly bgMagenta: Chalk; - readonly bgCyan: Chalk; - readonly bgWhite: Chalk; - - /* - Alias for `bgBlackBright`. - */ - readonly bgGray: Chalk; - - /* - Alias for `bgBlackBright`. - */ - readonly bgGrey: Chalk; - - readonly bgBlackBright: Chalk; - readonly bgRedBright: Chalk; - readonly bgGreenBright: Chalk; - readonly bgYellowBright: Chalk; - readonly bgBlueBright: Chalk; - readonly bgMagentaBright: Chalk; - readonly bgCyanBright: Chalk; - readonly bgWhiteBright: Chalk; - } -} - -/** -Main Chalk object that allows to chain styles together. -Call the last one as a method with a string argument. -Order doesn't matter, and later styles take precedent in case of a conflict. -This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`. -*/ -declare const chalk: chalk.Chalk & chalk.ChalkFunction & { - supportsColor: chalk.ColorSupport | false; - Level: chalk.Level; - Color: Color; - ForegroundColor: ForegroundColor; - BackgroundColor: BackgroundColor; - Modifiers: Modifiers; - stderr: chalk.Chalk & {supportsColor: chalk.ColorSupport | false}; -}; - -export = chalk; diff --git a/node_modules/chalk/license b/node_modules/chalk/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/chalk/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/node_modules/chalk/package.json b/node_modules/chalk/package.json deleted file mode 100644 index 47c23f2..0000000 --- a/node_modules/chalk/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "chalk", - "version": "4.1.2", - "description": "Terminal string styling done right", - "license": "MIT", - "repository": "chalk/chalk", - "funding": "https://github.com/chalk/chalk?sponsor=1", - "main": "source", - "engines": { - "node": ">=10" - }, - "scripts": { - "test": "xo && nyc ava && tsd", - "bench": "matcha benchmark.js" - }, - "files": [ - "source", - "index.d.ts" - ], - "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": "^4.1.0", - "supports-color": "^7.1.0" - }, - "devDependencies": { - "ava": "^2.4.0", - "coveralls": "^3.0.7", - "execa": "^4.0.0", - "import-fresh": "^3.1.0", - "matcha": "^0.7.0", - "nyc": "^15.0.0", - "resolve-from": "^5.0.0", - "tsd": "^0.7.4", - "xo": "^0.28.2" - }, - "xo": { - "rules": { - "unicorn/prefer-string-slice": "off", - "unicorn/prefer-includes": "off", - "@typescript-eslint/member-ordering": "off", - "no-redeclare": "off", - "unicorn/string-content": "off", - "unicorn/better-regex": "off" - } - } -} diff --git a/node_modules/chalk/readme.md b/node_modules/chalk/readme.md deleted file mode 100644 index a055d21..0000000 --- a/node_modules/chalk/readme.md +++ /dev/null @@ -1,341 +0,0 @@ -<h1 align="center"> - <br> - <br> - <img width="320" src="media/logo.svg" alt="Chalk"> - <br> - <br> - <br> -</h1> - -> 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) [![npm dependents](https://badgen.net/npm/dependents/chalk)](https://www.npmjs.com/package/chalk?activeTab=dependents) [![Downloads](https://badgen.net/npm/dt/chalk)](https://www.npmjs.com/package/chalk) [![](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) ![TypeScript-ready](https://img.shields.io/npm/types/chalk.svg) [![run on repl.it](https://repl.it/badge/github/chalk/chalk)](https://repl.it/github/chalk/chalk) - -<img src="https://cdn.jsdelivr.net/gh/chalk/ansi-styles@8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900"> - -<br> - ---- - -<div align="center"> - <p> - <p> - <sup> - Sindre Sorhus' open source work is supported by the community on <a href="https://github.com/sponsors/sindresorhus">GitHub Sponsors</a> and <a href="https://stakes.social/0x44d871aebF0126Bf646753E2C976Aa7e68A66c15">Dev</a> - </sup> - </p> - <sup>Special thanks to:</sup> - <br> - <br> - <a href="https://standardresume.co/tech"> - <img src="https://sindresorhus.com/assets/thanks/standard-resume-logo.svg" width="160"/> - </a> - <br> - <br> - <a href="https://retool.com/?utm_campaign=sindresorhus"> - <img src="https://sindresorhus.com/assets/thanks/retool-logo.svg" width="230"/> - </a> - <br> - <br> - <a href="https://doppler.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=chalk&utm_source=github"> - <div> - <img src="https://dashboard.doppler.com/imgs/logo-long.svg" width="240" alt="Doppler"> - </div> - <b>All your environment variables, in one place</b> - <div> - <span>Stop struggling with scattered API keys, hacking together home-brewed tools,</span> - <br> - <span>and avoiding access controls. Keep your team and servers in sync with Doppler.</span> - </div> - </a> - <br> - <a href="https://uibakery.io/?utm_source=chalk&utm_medium=sponsor&utm_campaign=github"> - <div> - <img src="https://sindresorhus.com/assets/thanks/uibakery-logo.jpg" width="270" alt="UI Bakery"> - </div> - </a> - </p> -</div> - ---- - -<br> - -## 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 ~50,000 packages](https://www.npmjs.com/browse/depended/chalk) as of January 1, 2020 - -## 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.`<style>[.<style>...](string, [string...])` - -Example: `chalk.red.bold.underline('Hello', 'world');` - -Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`. - -Multiple arguments will be separated by space. - -### chalk.level - -Specifies the level of color support. - -Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers. - -If you need to change this in a reusable module, create a new instance: - -```js -const ctx = new chalk.Instance({level: 0}); -``` - -| Level | Description | -| :---: | :--- | -| `0` | All colors disabled | -| `1` | Basic color support (16 colors) | -| `2` | 256 color support | -| `3` | Truecolor support (16 million colors) | - -### chalk.supportsColor - -Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience. - -Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. - -Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. - -### chalk.stderr and chalk.stderr.supportsColor - -`chalk.stderr` contains a separate instance configured with color support detected for `stderr` stream instead of `stdout`. Override rules from `chalk.supportsColor` apply to this too. `chalk.stderr.supportsColor` is exposed for convenience. - -## Styles - -### Modifiers - -- `reset` - Resets the current color chain. -- `bold` - Make text bold. -- `dim` - Emitting only a small amount of light. -- `italic` - Make text italic. *(Not widely supported)* -- `underline` - Make text underline. *(Not widely supported)* -- `inverse`- Inverse background and foreground colors. -- `hidden` - Prints the text, but makes it invisible. -- `strikethrough` - Puts a horizontal line through the center of the text. *(Not widely supported)* -- `visible`- Prints the text only when Chalk has a color level > 0. Can be useful for things that are purely cosmetic. - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `blackBright` (alias: `gray`, `grey`) -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` (alias: `bgGray`, `bgGrey`) -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - -## Tagged template literal - -Chalk can be used as a [tagged template literal](https://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals). - -```js -const chalk = require('chalk'); - -const miles = 18; -const calculateFeet = miles => miles * 5280; - -console.log(chalk` - There are {bold 5280 feet} in a mile. - In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}. -`); -``` - -Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`). - -Template styles are chained exactly like normal Chalk styles. The following three statements are equivalent: - -```js -console.log(chalk.bold.rgb(10, 100, 200)('Hello!')); -console.log(chalk.bold.rgb(10, 100, 200)`Hello!`); -console.log(chalk`{bold.rgb(10,100,200) Hello!}`); -``` - -Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters. - -All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped. - -## 256 and Truecolor color support - -Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps. - -Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red). - -Examples: - -- `chalk.hex('#DEADED').underline('Hello, world!')` -- `chalk.keyword('orange')('Some orange text')` -- `chalk.rgb(15, 100, 204).inverse('Hello!')` - -Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors). - -- `chalk.bgHex('#DEADED').underline('Hello, world!')` -- `chalk.bgKeyword('orange')('Some orange text')` -- `chalk.bgRgb(15, 100, 204).inverse('Hello!')` - -The following color models can be used: - -- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')` -- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')` -- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')` -- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')` -- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')` -- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')` -- [`ansi`](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) - Example: `chalk.ansi(31).bgAnsi(93)('red on yellowBright')` -- [`ansi256`](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) - Example: `chalk.bgAnsi256(194)('Honeydew, more or less')` - -## Windows - -If you're on Windows, do yourself a favor and use [Windows Terminal](https://github.com/microsoft/terminal) instead of `cmd.exe`. - -## Origin story - -[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative. - -## chalk for enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of chalk and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-chalk?utm_source=npm-chalk&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - -## Related - -- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module -- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal -- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color -- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes -- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes -- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models -- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal -- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings -- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings -- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) diff --git a/node_modules/chalk/source/index.js b/node_modules/chalk/source/index.js deleted file mode 100644 index 75ec663..0000000 --- a/node_modules/chalk/source/index.js +++ /dev/null @@ -1,229 +0,0 @@ -'use strict'; -const ansiStyles = require('ansi-styles'); -const {stdout: stdoutColor, stderr: stderrColor} = require('supports-color'); -const { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex -} = require('./util'); - -const {isArray} = Array; - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = [ - 'ansi', - 'ansi', - 'ansi256', - 'ansi16m' -]; - -const styles = Object.create(null); - -const applyOptions = (object, options = {}) => { - if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { - throw new Error('The `level` option should be an integer from 0 to 3'); - } - - // Detect level if not set manually - const colorLevel = stdoutColor ? stdoutColor.level : 0; - object.level = options.level === undefined ? colorLevel : options.level; -}; - -class ChalkClass { - constructor(options) { - // eslint-disable-next-line no-constructor-return - return chalkFactory(options); - } -} - -const chalkFactory = options => { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_); - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = () => { - throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.'); - }; - - chalk.template.Instance = ChalkClass; - - return chalk.template; -}; - -function Chalk(options) { - return chalkFactory(options); -} - -for (const [styleName, style] of Object.entries(ansiStyles)) { - styles[styleName] = { - get() { - const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty); - Object.defineProperty(this, styleName, {value: builder}); - return builder; - } - }; -} - -styles.visible = { - get() { - const builder = createBuilder(this, this._styler, true); - Object.defineProperty(this, 'visible', {value: builder}); - return builder; - } -}; - -const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256']; - -for (const model of usedModels) { - styles[model] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; -} - -for (const model of usedModels) { - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, { - ...styles, - level: { - enumerable: true, - get() { - return this._generator.level; - }, - set(level) { - this._generator.level = level; - } - } -}); - -const createStyler = (open, close, parent) => { - let openAll; - let closeAll; - if (parent === undefined) { - openAll = open; - closeAll = close; - } else { - openAll = parent.openAll + open; - closeAll = close + parent.closeAll; - } - - return { - open, - close, - openAll, - closeAll, - parent - }; -}; - -const createBuilder = (self, _styler, _isEmpty) => { - const builder = (...arguments_) => { - if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) { - // Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}` - return applyStyle(builder, chalkTag(builder, ...arguments_)); - } - - // Single argument is hot path, implicit coercion is faster than anything - // eslint-disable-next-line no-implicit-coercion - return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' ')); - }; - - // We alter the prototype because we must return a function, but there is - // no way to create a function with a different prototype - Object.setPrototypeOf(builder, proto); - - builder._generator = self; - builder._styler = _styler; - builder._isEmpty = _isEmpty; - - return builder; -}; - -const applyStyle = (self, string) => { - if (self.level <= 0 || !string) { - return self._isEmpty ? '' : string; - } - - let styler = self._styler; - - if (styler === undefined) { - return string; - } - - const {openAll, closeAll} = styler; - if (string.indexOf('\u001B') !== -1) { - while (styler !== undefined) { - // 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'. - string = stringReplaceAll(string, styler.close, styler.open); - - styler = styler.parent; - } - } - - // We can move both next actions out of loop, because remaining actions in loop won't have - // any/visible effect on parts we add here. 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 - const lfIndex = string.indexOf('\n'); - if (lfIndex !== -1) { - string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); - } - - return openAll + string + closeAll; -}; - -let template; -const chalkTag = (chalk, ...strings) => { - const [firstString] = strings; - - if (!isArray(firstString) || !isArray(firstString.raw)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return strings.join(' '); - } - - const arguments_ = strings.slice(1); - const parts = [firstString.raw[0]]; - - for (let i = 1; i < firstString.length; i++) { - parts.push( - String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'), - String(firstString.raw[i]) - ); - } - - if (template === undefined) { - template = require('./templates'); - } - - return template(chalk, parts.join('')); -}; - -Object.defineProperties(Chalk.prototype, styles); - -const chalk = Chalk(); // eslint-disable-line new-cap -chalk.supportsColor = stdoutColor; -chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap -chalk.stderr.supportsColor = stderrColor; - -module.exports = chalk; diff --git a/node_modules/chalk/source/templates.js b/node_modules/chalk/source/templates.js deleted file mode 100644 index b130949..0000000 --- a/node_modules/chalk/source/templates.js +++ /dev/null @@ -1,134 +0,0 @@ -'use strict'; -const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; -const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; -const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; -const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi; - -const ESCAPES = new Map([ - ['n', '\n'], - ['r', '\r'], - ['t', '\t'], - ['b', '\b'], - ['f', '\f'], - ['v', '\v'], - ['0', '\0'], - ['\\', '\\'], - ['e', '\u001B'], - ['a', '\u0007'] -]); - -function unescape(c) { - const u = c[0] === 'u'; - const bracket = c[1] === '{'; - - if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - - if (u && bracket) { - return String.fromCodePoint(parseInt(c.slice(2, -1), 16)); - } - - return ESCAPES.get(c) || c; -} - -function parseArguments(name, arguments_) { - const results = []; - const chunks = arguments_.trim().split(/\s*,\s*/g); - let matches; - - for (const chunk of chunks) { - const number = Number(chunk); - if (!Number.isNaN(number)) { - results.push(number); - } else if ((matches = chunk.match(STRING_REGEX))) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } - - return results; -} - -function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - - const results = []; - let matches; - - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; - - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } - - return results; -} - -function buildStyle(chalk, styles) { - const enabled = {}; - - for (const layer of styles) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } - - let current = chalk; - for (const [styleName, styles] of Object.entries(enabled)) { - if (!Array.isArray(styles)) { - continue; - } - - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - - current = styles.length > 0 ? current[styleName](...styles) : current[styleName]; - } - - return current; -} - -module.exports = (chalk, temporary) => { - const styles = []; - const chunks = []; - let chunk = []; - - // eslint-disable-next-line max-params - temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => { - if (escapeCharacter) { - chunk.push(unescape(escapeCharacter)); - } else if (style) { - const string = chunk.join(''); - chunk = []; - chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string)); - styles.push({inverse, styles: parseStyle(style)}); - } else if (close) { - if (styles.length === 0) { - throw new Error('Found extraneous } in Chalk template literal'); - } - - chunks.push(buildStyle(chalk, styles)(chunk.join(''))); - chunk = []; - styles.pop(); - } else { - chunk.push(character); - } - }); - - chunks.push(chunk.join('')); - - if (styles.length > 0) { - const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; - throw new Error(errMessage); - } - - return chunks.join(''); -}; diff --git a/node_modules/chalk/source/util.js b/node_modules/chalk/source/util.js deleted file mode 100644 index ca466fd..0000000 --- a/node_modules/chalk/source/util.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -const stringReplaceAll = (string, substring, replacer) => { - let index = string.indexOf(substring); - if (index === -1) { - return string; - } - - const substringLength = substring.length; - let endIndex = 0; - let returnValue = ''; - do { - returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; - endIndex = index + substringLength; - index = string.indexOf(substring, endIndex); - } while (index !== -1); - - returnValue += string.substr(endIndex); - return returnValue; -}; - -const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => { - let endIndex = 0; - let returnValue = ''; - do { - const gotCR = string[index - 1] === '\r'; - returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix; - endIndex = index + 1; - index = string.indexOf('\n', endIndex); - } while (index !== -1); - - returnValue += string.substr(endIndex); - return returnValue; -}; - -module.exports = { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex -}; diff --git a/node_modules/color-convert/CHANGELOG.md b/node_modules/color-convert/CHANGELOG.md deleted file mode 100644 index 0a7bce4..0000000 --- a/node_modules/color-convert/CHANGELOG.md +++ /dev/null @@ -1,54 +0,0 @@ -# 1.0.0 - 2016-01-07 - -- Removed: unused speed test -- Added: Automatic routing between previously unsupported conversions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `convert()` class -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: all functions to lookup dictionary -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: `ansi` to `ansi256` -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Fixed: argument grouping for functions requiring only one argument -([#27](https://github.com/Qix-/color-convert/pull/27)) - -# 0.6.0 - 2015-07-23 - -- Added: methods to handle -[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors: - - rgb2ansi16 - - rgb2ansi - - hsl2ansi16 - - hsl2ansi - - hsv2ansi16 - - hsv2ansi - - hwb2ansi16 - - hwb2ansi - - cmyk2ansi16 - - cmyk2ansi - - keyword2ansi16 - - keyword2ansi - - ansi162rgb - - ansi162hsl - - ansi162hsv - - ansi162hwb - - ansi162cmyk - - ansi162keyword - - ansi2rgb - - ansi2hsl - - ansi2hsv - - ansi2hwb - - ansi2cmyk - - ansi2keyword -([#18](https://github.com/harthur/color-convert/pull/18)) - -# 0.5.3 - 2015-06-02 - -- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]` -([#15](https://github.com/harthur/color-convert/issues/15)) - ---- - -Check out commit logs for older releases diff --git a/node_modules/color-convert/LICENSE b/node_modules/color-convert/LICENSE deleted file mode 100644 index 5b4c386..0000000 --- a/node_modules/color-convert/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011-2016 Heather Arthur <fayearthur@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/node_modules/color-convert/README.md b/node_modules/color-convert/README.md deleted file mode 100644 index d4b08fc..0000000 --- a/node_modules/color-convert/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# color-convert - -[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) - -Color-convert is a color conversion library for JavaScript and node. -It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): - -```js -var convert = require('color-convert'); - -convert.rgb.hsl(140, 200, 100); // [96, 48, 59] -convert.keyword.rgb('blue'); // [0, 0, 255] - -var rgbChannels = convert.rgb.channels; // 3 -var cmykChannels = convert.cmyk.channels; // 4 -var ansiChannels = convert.ansi16.channels; // 1 -``` - -# Install - -```console -$ npm install color-convert -``` - -# API - -Simply get the property of the _from_ and _to_ conversion that you're looking for. - -All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. - -All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). - -```js -var convert = require('color-convert'); - -// Hex to LAB -convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] -convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] - -// RGB to CMYK -convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] -convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] -``` - -### Arrays -All functions that accept multiple arguments also support passing an array. - -Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) - -```js -var convert = require('color-convert'); - -convert.rgb.hex(123, 45, 67); // '7B2D43' -convert.rgb.hex([123, 45, 67]); // '7B2D43' -``` - -## Routing - -Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). - -Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). - -# Contribute - -If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. - -# License -Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/node_modules/color-convert/conversions.js b/node_modules/color-convert/conversions.js deleted file mode 100644 index 2657f26..0000000 --- a/node_modules/color-convert/conversions.js +++ /dev/null @@ -1,839 +0,0 @@ -/* MIT license */ -/* eslint-disable no-mixed-operators */ -const cssKeywords = require('color-name'); - -// NOTE: conversions should only return primitive values (i.e. arrays, or -// values that give correct `typeof` results). -// do not use box values types (i.e. Number(), String(), etc.) - -const reverseKeywords = {}; -for (const key of Object.keys(cssKeywords)) { - reverseKeywords[cssKeywords[key]] = key; -} - -const convert = { - rgb: {channels: 3, labels: 'rgb'}, - hsl: {channels: 3, labels: 'hsl'}, - hsv: {channels: 3, labels: 'hsv'}, - hwb: {channels: 3, labels: 'hwb'}, - cmyk: {channels: 4, labels: 'cmyk'}, - xyz: {channels: 3, labels: 'xyz'}, - lab: {channels: 3, labels: 'lab'}, - lch: {channels: 3, labels: 'lch'}, - hex: {channels: 1, labels: ['hex']}, - keyword: {channels: 1, labels: ['keyword']}, - ansi16: {channels: 1, labels: ['ansi16']}, - ansi256: {channels: 1, labels: ['ansi256']}, - hcg: {channels: 3, labels: ['h', 'c', 'g']}, - apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, - gray: {channels: 1, labels: ['gray']} -}; - -module.exports = convert; - -// Hide .channels and .labels properties -for (const model of Object.keys(convert)) { - if (!('channels' in convert[model])) { - throw new Error('missing channels property: ' + model); - } - - if (!('labels' in convert[model])) { - throw new Error('missing channel labels property: ' + model); - } - - if (convert[model].labels.length !== convert[model].channels) { - throw new Error('channel and label counts mismatch: ' + model); - } - - const {channels, labels} = convert[model]; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], 'channels', {value: channels}); - Object.defineProperty(convert[model], 'labels', {value: labels}); -} - -convert.rgb.hsl = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const min = Math.min(r, g, b); - const max = Math.max(r, g, b); - const delta = max - min; - let h; - let s; - - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - const l = (min + max) / 2; - - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); - } else { - s = delta / (2 - max - min); - } - - return [h, s * 100, l * 100]; -}; - -convert.rgb.hsv = function (rgb) { - let rdif; - let gdif; - let bdif; - let h; - let s; - - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const v = Math.max(r, g, b); - const diff = v - Math.min(r, g, b); - const diffc = function (c) { - return (v - c) / 6 / diff + 1 / 2; - }; - - if (diff === 0) { - h = 0; - s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = (1 / 3) + rdif - bdif; - } else if (b === v) { - h = (2 / 3) + gdif - rdif; - } - - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - - return [ - h * 360, - s * 100, - v * 100 - ]; -}; - -convert.rgb.hwb = function (rgb) { - const r = rgb[0]; - const g = rgb[1]; - let b = rgb[2]; - const h = convert.rgb.hsl(rgb)[0]; - const w = 1 / 255 * Math.min(r, Math.min(g, b)); - - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - - return [h, w * 100, b * 100]; -}; - -convert.rgb.cmyk = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - - const k = Math.min(1 - r, 1 - g, 1 - b); - const c = (1 - r - k) / (1 - k) || 0; - const m = (1 - g - k) / (1 - k) || 0; - const y = (1 - b - k) / (1 - k) || 0; - - return [c * 100, m * 100, y * 100, k * 100]; -}; - -function comparativeDistance(x, y) { - /* - See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance - */ - return ( - ((x[0] - y[0]) ** 2) + - ((x[1] - y[1]) ** 2) + - ((x[2] - y[2]) ** 2) - ); -} - -convert.rgb.keyword = function (rgb) { - const reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - - let currentClosestDistance = Infinity; - let currentClosestKeyword; - - for (const keyword of Object.keys(cssKeywords)) { - const value = cssKeywords[keyword]; - - // Compute comparative distance - const distance = comparativeDistance(rgb, value); - - // Check if its less, if so set as closest - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - - return currentClosestKeyword; -}; - -convert.keyword.rgb = function (keyword) { - return cssKeywords[keyword]; -}; - -convert.rgb.xyz = function (rgb) { - let r = rgb[0] / 255; - let g = rgb[1] / 255; - let b = rgb[2] / 255; - - // Assume sRGB - r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); - g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); - b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); - - const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); - const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); - const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); - - return [x * 100, y * 100, z * 100]; -}; - -convert.rgb.lab = function (rgb) { - const xyz = convert.rgb.xyz(rgb); - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.hsl.rgb = function (hsl) { - const h = hsl[0] / 360; - const s = hsl[1] / 100; - const l = hsl[2] / 100; - let t2; - let t3; - let val; - - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - - const t1 = 2 * l - t2; - - const rgb = [0, 0, 0]; - for (let i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - - if (t3 > 1) { - t3--; - } - - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - - rgb[i] = val * 255; - } - - return rgb; -}; - -convert.hsl.hsv = function (hsl) { - const h = hsl[0]; - let s = hsl[1] / 100; - let l = hsl[2] / 100; - let smin = s; - const lmin = Math.max(l, 0.01); - - l *= 2; - s *= (l <= 1) ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - const v = (l + s) / 2; - const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); - - return [h, sv * 100, v * 100]; -}; - -convert.hsv.rgb = function (hsv) { - const h = hsv[0] / 60; - const s = hsv[1] / 100; - let v = hsv[2] / 100; - const hi = Math.floor(h) % 6; - - const f = h - Math.floor(h); - const p = 255 * v * (1 - s); - const q = 255 * v * (1 - (s * f)); - const t = 255 * v * (1 - (s * (1 - f))); - v *= 255; - - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } -}; - -convert.hsv.hsl = function (hsv) { - const h = hsv[0]; - const s = hsv[1] / 100; - const v = hsv[2] / 100; - const vmin = Math.max(v, 0.01); - let sl; - let l; - - l = (2 - s) * v; - const lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= (lmin <= 1) ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - - return [h, sl * 100, l * 100]; -}; - -// http://dev.w3.org/csswg/css-color/#hwb-to-rgb -convert.hwb.rgb = function (hwb) { - const h = hwb[0] / 360; - let wh = hwb[1] / 100; - let bl = hwb[2] / 100; - const ratio = wh + bl; - let f; - - // Wh + bl cant be > 1 - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - - const i = Math.floor(6 * h); - const v = 1 - bl; - f = 6 * h - i; - - if ((i & 0x01) !== 0) { - f = 1 - f; - } - - const n = wh + f * (v - wh); // Linear interpolation - - let r; - let g; - let b; - /* eslint-disable max-statements-per-line,no-multi-spaces */ - switch (i) { - default: - case 6: - case 0: r = v; g = n; b = wh; break; - case 1: r = n; g = v; b = wh; break; - case 2: r = wh; g = v; b = n; break; - case 3: r = wh; g = n; b = v; break; - case 4: r = n; g = wh; b = v; break; - case 5: r = v; g = wh; b = n; break; - } - /* eslint-enable max-statements-per-line,no-multi-spaces */ - - return [r * 255, g * 255, b * 255]; -}; - -convert.cmyk.rgb = function (cmyk) { - const c = cmyk[0] / 100; - const m = cmyk[1] / 100; - const y = cmyk[2] / 100; - const k = cmyk[3] / 100; - - const r = 1 - Math.min(1, c * (1 - k) + k); - const g = 1 - Math.min(1, m * (1 - k) + k); - const b = 1 - Math.min(1, y * (1 - k) + k); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.rgb = function (xyz) { - const x = xyz[0] / 100; - const y = xyz[1] / 100; - const z = xyz[2] / 100; - let r; - let g; - let b; - - r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); - g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); - b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); - - // Assume sRGB - r = r > 0.0031308 - ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) - : r * 12.92; - - g = g > 0.0031308 - ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) - : g * 12.92; - - b = b > 0.0031308 - ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) - : b * 12.92; - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.lab = function (xyz) { - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.lab.xyz = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let x; - let y; - let z; - - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - - const y2 = y ** 3; - const x2 = x ** 3; - const z2 = z ** 3; - y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; - - x *= 95.047; - y *= 100; - z *= 108.883; - - return [x, y, z]; -}; - -convert.lab.lch = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let h; - - const hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - - if (h < 0) { - h += 360; - } - - const c = Math.sqrt(a * a + b * b); - - return [l, c, h]; -}; - -convert.lch.lab = function (lch) { - const l = lch[0]; - const c = lch[1]; - const h = lch[2]; - - const hr = h / 360 * 2 * Math.PI; - const a = c * Math.cos(hr); - const b = c * Math.sin(hr); - - return [l, a, b]; -}; - -convert.rgb.ansi16 = function (args, saturation = null) { - const [r, g, b] = args; - let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization - - value = Math.round(value / 50); - - if (value === 0) { - return 30; - } - - let ansi = 30 - + ((Math.round(b / 255) << 2) - | (Math.round(g / 255) << 1) - | Math.round(r / 255)); - - if (value === 2) { - ansi += 60; - } - - return ansi; -}; - -convert.hsv.ansi16 = function (args) { - // Optimization here; we already know the value and don't need to get - // it converted for us. - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); -}; - -convert.rgb.ansi256 = function (args) { - const r = args[0]; - const g = args[1]; - const b = args[2]; - - // We use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (r === g && g === b) { - if (r < 8) { - return 16; - } - - if (r > 248) { - return 231; - } - - return Math.round(((r - 8) / 247) * 24) + 232; - } - - const ansi = 16 - + (36 * Math.round(r / 255 * 5)) - + (6 * Math.round(g / 255 * 5)) - + Math.round(b / 255 * 5); - - return ansi; -}; - -convert.ansi16.rgb = function (args) { - let color = args % 10; - - // Handle greyscale - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - - color = color / 10.5 * 255; - - return [color, color, color]; - } - - const mult = (~~(args > 50) + 1) * 0.5; - const r = ((color & 1) * mult) * 255; - const g = (((color >> 1) & 1) * mult) * 255; - const b = (((color >> 2) & 1) * mult) * 255; - - return [r, g, b]; -}; - -convert.ansi256.rgb = function (args) { - // Handle greyscale - if (args >= 232) { - const c = (args - 232) * 10 + 8; - return [c, c, c]; - } - - args -= 16; - - let rem; - const r = Math.floor(args / 36) / 5 * 255; - const g = Math.floor((rem = args % 36) / 6) / 5 * 255; - const b = (rem % 6) / 5 * 255; - - return [r, g, b]; -}; - -convert.rgb.hex = function (args) { - const integer = ((Math.round(args[0]) & 0xFF) << 16) - + ((Math.round(args[1]) & 0xFF) << 8) - + (Math.round(args[2]) & 0xFF); - - const string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.hex.rgb = function (args) { - const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; - } - - let colorString = match[0]; - - if (match[0].length === 3) { - colorString = colorString.split('').map(char => { - return char + char; - }).join(''); - } - - const integer = parseInt(colorString, 16); - const r = (integer >> 16) & 0xFF; - const g = (integer >> 8) & 0xFF; - const b = integer & 0xFF; - - return [r, g, b]; -}; - -convert.rgb.hcg = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const max = Math.max(Math.max(r, g), b); - const min = Math.min(Math.min(r, g), b); - const chroma = (max - min); - let grayscale; - let hue; - - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - - if (chroma <= 0) { - hue = 0; - } else - if (max === r) { - hue = ((g - b) / chroma) % 6; - } else - if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma; - } - - hue /= 6; - hue %= 1; - - return [hue * 360, chroma * 100, grayscale * 100]; -}; - -convert.hsl.hcg = function (hsl) { - const s = hsl[1] / 100; - const l = hsl[2] / 100; - - const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); - - let f = 0; - if (c < 1.0) { - f = (l - 0.5 * c) / (1.0 - c); - } - - return [hsl[0], c * 100, f * 100]; -}; - -convert.hsv.hcg = function (hsv) { - const s = hsv[1] / 100; - const v = hsv[2] / 100; - - const c = s * v; - let f = 0; - - if (c < 1.0) { - f = (v - c) / (1 - c); - } - - return [hsv[0], c * 100, f * 100]; -}; - -convert.hcg.rgb = function (hcg) { - const h = hcg[0] / 360; - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - if (c === 0.0) { - return [g * 255, g * 255, g * 255]; - } - - const pure = [0, 0, 0]; - const hi = (h % 1) * 6; - const v = hi % 1; - const w = 1 - v; - let mg = 0; - - /* eslint-disable max-statements-per-line */ - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; pure[1] = v; pure[2] = 0; break; - case 1: - pure[0] = w; pure[1] = 1; pure[2] = 0; break; - case 2: - pure[0] = 0; pure[1] = 1; pure[2] = v; break; - case 3: - pure[0] = 0; pure[1] = w; pure[2] = 1; break; - case 4: - pure[0] = v; pure[1] = 0; pure[2] = 1; break; - default: - pure[0] = 1; pure[1] = 0; pure[2] = w; - } - /* eslint-enable max-statements-per-line */ - - mg = (1.0 - c) * g; - - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; -}; - -convert.hcg.hsv = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const v = c + g * (1.0 - c); - let f = 0; - - if (v > 0.0) { - f = c / v; - } - - return [hcg[0], f * 100, v * 100]; -}; - -convert.hcg.hsl = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const l = g * (1.0 - c) + 0.5 * c; - let s = 0; - - if (l > 0.0 && l < 0.5) { - s = c / (2 * l); - } else - if (l >= 0.5 && l < 1.0) { - s = c / (2 * (1 - l)); - } - - return [hcg[0], s * 100, l * 100]; -}; - -convert.hcg.hwb = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - const v = c + g * (1.0 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; -}; - -convert.hwb.hcg = function (hwb) { - const w = hwb[1] / 100; - const b = hwb[2] / 100; - const v = 1 - b; - const c = v - w; - let g = 0; - - if (c < 1) { - g = (v - c) / (1 - c); - } - - return [hwb[0], c * 100, g * 100]; -}; - -convert.apple.rgb = function (apple) { - return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; -}; - -convert.rgb.apple = function (rgb) { - return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; -}; - -convert.gray.rgb = function (args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; -}; - -convert.gray.hsl = function (args) { - return [0, 0, args[0]]; -}; - -convert.gray.hsv = convert.gray.hsl; - -convert.gray.hwb = function (gray) { - return [0, 100, gray[0]]; -}; - -convert.gray.cmyk = function (gray) { - return [0, 0, 0, gray[0]]; -}; - -convert.gray.lab = function (gray) { - return [gray[0], 0, 0]; -}; - -convert.gray.hex = function (gray) { - const val = Math.round(gray[0] / 100 * 255) & 0xFF; - const integer = (val << 16) + (val << 8) + val; - - const string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.rgb.gray = function (rgb) { - const val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; -}; diff --git a/node_modules/color-convert/index.js b/node_modules/color-convert/index.js deleted file mode 100644 index b648e57..0000000 --- a/node_modules/color-convert/index.js +++ /dev/null @@ -1,81 +0,0 @@ -const conversions = require('./conversions'); -const route = require('./route'); - -const convert = {}; - -const models = Object.keys(conversions); - -function wrapRaw(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - return fn(args); - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -function wrapRounded(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - const result = fn(args); - - // We're assuming the result is an array here. - // see notice in conversions.js; don't use box types - // in conversion functions. - if (typeof result === 'object') { - for (let len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } - } - - return result; - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -models.forEach(fromModel => { - convert[fromModel] = {}; - - Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); - Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); - - const routes = route(fromModel); - const routeModels = Object.keys(routes); - - routeModels.forEach(toModel => { - const fn = routes[toModel]; - - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); -}); - -module.exports = convert; diff --git a/node_modules/color-convert/package.json b/node_modules/color-convert/package.json deleted file mode 100644 index 6e48000..0000000 --- a/node_modules/color-convert/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "color-convert", - "description": "Plain color conversion functions", - "version": "2.0.1", - "author": "Heather Arthur <fayearthur@gmail.com>", - "license": "MIT", - "repository": "Qix-/color-convert", - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" - }, - "engines": { - "node": ">=7.0.0" - }, - "keywords": [ - "color", - "colour", - "convert", - "converter", - "conversion", - "rgb", - "hsl", - "hsv", - "hwb", - "cmyk", - "ansi", - "ansi16" - ], - "files": [ - "index.js", - "conversions.js", - "route.js" - ], - "xo": { - "rules": { - "default-case": 0, - "no-inline-comments": 0, - "operator-linebreak": 0 - } - }, - "devDependencies": { - "chalk": "^2.4.2", - "xo": "^0.24.0" - }, - "dependencies": { - "color-name": "~1.1.4" - } -} diff --git a/node_modules/color-convert/route.js b/node_modules/color-convert/route.js deleted file mode 100644 index 1a08521..0000000 --- a/node_modules/color-convert/route.js +++ /dev/null @@ -1,97 +0,0 @@ -const conversions = require('./conversions'); - -/* - This function routes a model to all other models. - - all functions that are routed have a property `.conversion` attached - to the returned synthetic function. This property is an array - of strings, each with the steps in between the 'from' and 'to' - color models (inclusive). - - conversions that are not possible simply are not included. -*/ - -function buildGraph() { - const graph = {}; - // https://jsperf.com/object-keys-vs-for-in-with-closure/3 - const models = Object.keys(conversions); - - for (let len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null - }; - } - - return graph; -} - -// https://en.wikipedia.org/wiki/Breadth-first_search -function deriveBFS(fromModel) { - const graph = buildGraph(); - const queue = [fromModel]; // Unshift -> queue -> pop - - graph[fromModel].distance = 0; - - while (queue.length) { - const current = queue.pop(); - const adjacents = Object.keys(conversions[current]); - - for (let len = adjacents.length, i = 0; i < len; i++) { - const adjacent = adjacents[i]; - const node = graph[adjacent]; - - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - - return graph; -} - -function link(from, to) { - return function (args) { - return to(from(args)); - }; -} - -function wrapConversion(toModel, graph) { - const path = [graph[toModel].parent, toModel]; - let fn = conversions[graph[toModel].parent][toModel]; - - let cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - - fn.conversion = path; - return fn; -} - -module.exports = function (fromModel) { - const graph = deriveBFS(fromModel); - const conversion = {}; - - const models = Object.keys(graph); - for (let len = models.length, i = 0; i < len; i++) { - const toModel = models[i]; - const node = graph[toModel]; - - if (node.parent === null) { - // No possible conversion, or this node is the source model. - continue; - } - - conversion[toModel] = wrapConversion(toModel, graph); - } - - return conversion; -}; - diff --git a/node_modules/color-name/LICENSE b/node_modules/color-name/LICENSE deleted file mode 100644 index 4d9802a..0000000 --- a/node_modules/color-name/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -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. \ No newline at end of file diff --git a/node_modules/color-name/README.md b/node_modules/color-name/README.md deleted file mode 100644 index 3611a6b..0000000 --- a/node_modules/color-name/README.md +++ /dev/null @@ -1,11 +0,0 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - -<a href="LICENSE"><img src="https://upload.wikimedia.org/wikipedia/commons/0/0c/MIT_logo.svg" width="120"/></a> diff --git a/node_modules/color-name/index.js b/node_modules/color-name/index.js deleted file mode 100644 index e42aa68..0000000 --- a/node_modules/color-name/index.js +++ /dev/null @@ -1,152 +0,0 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; diff --git a/node_modules/color-name/package.json b/node_modules/color-name/package.json deleted file mode 100644 index 7acc902..0000000 --- a/node_modules/color-name/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "color-name", - "version": "1.1.4", - "description": "A list of color names and its values", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY <dfcreative@gmail.com>", - "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "homepage": "https://github.com/colorjs/color-name" -} diff --git a/node_modules/corser/.npmignore b/node_modules/corser/.npmignore deleted file mode 100644 index ffa2e1f..0000000 --- a/node_modules/corser/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -example/ -test/ diff --git a/node_modules/corser/.travis.yml b/node_modules/corser/.travis.yml deleted file mode 100644 index 57071b9..0000000 --- a/node_modules/corser/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "node" -sudo: false diff --git a/node_modules/corser/LICENSE b/node_modules/corser/LICENSE deleted file mode 100644 index 5c4ea09..0000000 --- a/node_modules/corser/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012 Alexander Grüneberg - -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/node_modules/corser/README.md b/node_modules/corser/README.md deleted file mode 100644 index 5fcf666..0000000 --- a/node_modules/corser/README.md +++ /dev/null @@ -1,202 +0,0 @@ -Corser -======= - -[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/0.1.0/active.svg)](http://www.repostatus.org/#active) -[![Build Status](https://secure.travis-ci.org/agrueneberg/Corser.png)](http://travis-ci.org/agrueneberg/Corser) - -A highly configurable, middleware compatible implementation of [CORS](http://www.w3.org/TR/cors/) for [Node.js](http://nodejs.org/). - - -Changelog ---------- - -### 2.0.1 (August 16, 2016) - -* Add workaround for [Chrome 52 sending empty `Access-Control-Request-Headers` header](https://bugs.chromium.org/p/chromium/issues/detail?id=633729). - -### 2.0.0 (March 22, 2014) - -* Preflight requests are automatically closed. If there is a need for handling `OPTIONS` requests, check the `endPreflightRequests` option. -* The parameters of the callback function in dynamic origin checking are now `(err, matches)` instead of just `(matches)`. - - -Examples --------- - -### How to use Corser as a middleware in Express - -See `example/express/` for a working example. - - var express, corser, app; - - express = require("express"); - corser = require("corser"); - - app = express(); - - app.use(corser.create()); - - app.get("/", function (req, res) { - res.writeHead(200); - res.end("Nice weather today, huh?"); - }); - - app.listen(1337); - -### How to use Corser as a middleware in Connect - -See `example/connect/` for a working example. - - var connect, corser, app; - - connect = require("connect"); - corser = require("corser"); - - app = connect(); - - app.use(corser.create()); - - app.use(function (req, res) { - res.writeHead(200); - res.end("Nice weather today, huh?"); - }); - - app.listen(1337); - -### How to use Corser with plain `http` - - var http, corser, corserRequestListener; - - http = require("http"); - corser = require("corser"); - - // Create Corser request listener. - corserRequestListener = corser.create(); - - http.createServer(function (req, res) { - // Route req and res through the request listener. - corserRequestListener(req, res, function () { - res.writeHead(200); - res.end("Nice weather today, huh?"); - }); - }).listen(1337); - - -API ---- - -### Creating a Corser request listener - -Creating a Corser request listener that generates the appropriate response headers to enable CORS is as simple as: - - corser.create() - -This is the equivalent of setting a response header of `Access-Control-Allow-Origin: *`. If you want to restrict the origins, or allow more sophisticated request or response headers, you have to pass a configuration object to `corser.create`. - -Corser will automatically end preflight requests for you. A preflight request is a special `OPTIONS` request that the browser sends under certain conditions to negotiate with the server what methods, request headers and response headers are allowed for a CORS request. If you need to use the `OPTIONS` method for other stuff, just set `endPreflightRequests` to `false` and terminate those requests yourself: - - var corserRequestListener; - - corserRequestListener = corser.create({ - endPreflightRequests: false - }); - - corserRequestListener(req, res, function () { - if (req.method === "OPTIONS") { - // End CORS preflight request. - res.writeHead(204); - res.end(); - } else { - // Implement other HTTP methods. - } - }); - - -#### Configuration Object - -A configuration object with the following properties can be passed to `corser.create`. - -##### `origins` - -A case-sensitive whitelist of origins. Unless unbound, if the request comes from an origin that is not in this list, it will not be handled by CORS. - -To allow for dynamic origin checking, a function `(origin, callback)` can be passed instead of an array. `origin` is the Origin header, `callback` is a function `(err, matches)`, where `matches` is a boolean flag that indicates whether the given Origin header matches or not. - -Default: unbound, i.e. every origin is accepted. - -##### `methods` - -An uppercase whitelist of methods. If the request uses a method that is not in this list, it will not be handled by CORS. - -Setting a value here will overwrite the list of default simple methods. To not lose them, concat the methods you want to add with `corser.simpleMethods`: `corser.simpleMethods.concat(["PUT", "DELETE"])`. - -Default: simple methods (`GET`, `HEAD`, `POST`). - -##### `requestHeaders` - -A case-insensitive whitelist of request headers. If the request uses a request header that is not in this list, it will not be handled by CORS. - -Setting a value here will overwrite the list of default simple request headers. To not lose them, concat the request headers you want to add with `corser.simpleRequestHeaders`: `corser.simpleRequestHeaders.concat(["Authorization"])`. - -Default: simple request headers (`Accept`, `Accept-Language`, `Content-Language`, `Content-Type`, `Last-Event-ID`). - -##### `responseHeaders` - -A case-insensitive whitelist of response headers. Any response header that is not in this list will be filtered out by the user-agent (the browser). - -Setting a value here will overwrite the list of default simple response headers. To not lose them, concat the response headers you want to add with `corser.simpleResponseHeaders`: `corser.simpleResponseHeaders.concat(["ETag"])`. - -Default: simple response headers (`Cache-Control`, `Content-Language`, `Content-Type`, `Expires`, `Last-Modified`, `Pragma`). - -##### `supportsCredentials` - -A boolean that indicates if cookie credentials can be transferred as part of a CORS request. Currently, only a few HTML5 elements can benefit from this setting. - -Default: `false`. - -##### `maxAge` - -An integer that indicates the maximum amount of time in seconds that a preflight request is kept in the client-side preflight result cache. - -Default: not set. - -##### `endPreflightRequests` - -A boolean that indicates if CORS preflight requests should be automatically closed. - -Default: `true`. - - -FAQ ---- - -### Ajax call returns `Origin X is not allowed by Access-Control-Allow-Origin` - -Check if the `Origin` header of your request matches one of the origins provided in the `origins` property of the configuration object. If you didn't set any `origins` property, jump to the next question. - - -### Ajax call still returns `Origin X is not allowed by Access-Control-Allow-Origin` - -Your request might use a non-simple method or one or more non-simple headers. According to the specification, the set of simple methods is `GET`, `HEAD`, and `POST`, and the set of simple request headers is `Accept`, `Accept-Language`, `Content-Language`, `Content-Type`, and `Last-Event-ID`. If your request uses **any** other method or header, you have to explicitly list them in the `methods` or `requestHeaders` property of the configuration object. - - -#### Example - -You want to allow requests that use an `X-Requested-With` header. Pass the following configuration object to `corser.create`: - - corser.create({ - requestHeaders: corser.simpleRequestHeaders.concat(["X-Requested-With"]) - }); - - -### Getting a response header returns `Refused to get unsafe header "X"` - -Your browser blocks every non-simple response headers that was not explicitly allowed in the preflight request. The set of simple response headers is `Cache-Control`, `Content-Language`, `Content-Type`, `Expires`, `Last-Modified`, `Pragma`. If you want to access **any** other response header, you have to explicitly list them in the `responseHeaders` property of the configuration object. - -#### Example - -You want to allow clients to read the `ETag` header of a response. Pass the following configuration object to `corser.create`: - - corser.create({ - responseHeaders: corser.simpleResponseHeaders.concat(["ETag"]) - }); diff --git a/node_modules/corser/lib/corser.js b/node_modules/corser/lib/corser.js deleted file mode 100644 index b1b34ff..0000000 --- a/node_modules/corser/lib/corser.js +++ /dev/null @@ -1,228 +0,0 @@ -/** - * Specification: http://www.w3.org/TR/2012/WD-cors-20120403/ - * W3C Working Draft 3 April 2012 - */ -"use strict"; - -/*jshint node:true */ - -var simpleMethods, simpleRequestHeaders, simpleResponseHeaders, toLowerCase, checkOriginMatch; - -// A method is said to be a simple method if it is a case-sensitive match for one of the following: -Object.defineProperty(exports, "simpleMethods", { - get: function () { - return [ - "GET", - "HEAD", - "POST" - ]; - } -}); -simpleMethods = exports.simpleMethods; - -// A header is said to be a simple header if the header field name is an ASCII case-insensitive match for one of -// the following: -Object.defineProperty(exports, "simpleRequestHeaders", { - get: function () { - return [ - "accept", - "accept-language", - "content-language", - "content-type" - ]; - } -}); -simpleRequestHeaders = exports.simpleRequestHeaders; - -// A header is said to be a simple response header if the header field name is an ASCII case-insensitive -// match for one of the following: -Object.defineProperty(exports, "simpleResponseHeaders", { - get: function () { - return [ - "cache-control", - "content-language", - "content-type", - "expires", - "last-modified", - "pragma" - ]; - } -}); -simpleResponseHeaders = exports.simpleResponseHeaders; - -toLowerCase = function (array) { - return array.map(function (el) { - return el.toLowerCase(); - }); -}; - -checkOriginMatch = function (originHeader, origins, callback) { - if (typeof origins === "function") { - origins(originHeader, function (err, allow) { - callback(err, allow); - }); - } else if (origins.length > 0) { - callback(null, origins.some(function (origin) { - return origin === originHeader; - })); - } else { - // Always matching is acceptable since the list of origins can be unbounded. - callback(null, true); - } -}; - -exports.create = function (options) { - options = options || {}; - options.origins = options.origins || []; - options.methods = options.methods || simpleMethods; - if (options.hasOwnProperty("requestHeaders") === true) { - options.requestHeaders = toLowerCase(options.requestHeaders); - } else { - options.requestHeaders = simpleRequestHeaders; - } - if (options.hasOwnProperty("responseHeaders") === true) { - options.responseHeaders = toLowerCase(options.responseHeaders); - } else { - options.responseHeaders = simpleResponseHeaders; - } - options.maxAge = options.maxAge || null; - options.supportsCredentials = options.supportsCredentials || false; - if (options.hasOwnProperty("endPreflightRequests") === false) { - options.endPreflightRequests = true; - } - return function (req, res, next) { - var methodMatches, headersMatch, requestMethod, requestHeaders, exposedHeaders, endPreflight; - // If the Origin header is not present terminate this set of steps. - if (!req.headers.hasOwnProperty("origin")) { - // The request is outside the scope of the CORS specification. If there is no Origin header, - // it could be a same-origin request. Let's let the user-agent handle this situation. - next(); - } else { - // If the value of the Origin header is not a case-sensitive match for any of the values in - // list of origins, do not set any additional headers and terminate this set of steps. - checkOriginMatch(req.headers.origin, options.origins, function (err, originMatches) { - if (err !== null) { - next(err); - } else { - if (typeof originMatches !== "boolean" || originMatches === false) { - next(); - } else { - // Respond to preflight request. - if (req.method === "OPTIONS") { - endPreflight = function () { - if (options.endPreflightRequests === true) { - res.writeHead(204); - res.end(); - } else { - next(); - } - }; - // If there is no Access-Control-Request-Method header or if parsing failed, do not set - // any additional headers and terminate this set of steps. - if (!req.headers.hasOwnProperty("access-control-request-method")) { - endPreflight(); - } else { - requestMethod = req.headers["access-control-request-method"]; - // If there are no Access-Control-Request-Headers headers let header field-names be the - // empty list. If parsing failed do not set any additional headers and terminate this set - // of steps. - // Checking for an empty header is a workaround for a bug Chrome 52: - // https://bugs.chromium.org/p/chromium/issues/detail?id=633729 - if (req.headers.hasOwnProperty("access-control-request-headers") && req.headers["access-control-request-headers"] !== "") { - requestHeaders = toLowerCase(req.headers["access-control-request-headers"].split(/,\s*/)); - } else { - requestHeaders = []; - } - // If method is not a case-sensitive match for any of the values in list of methods do not - // set any additional headers and terminate this set of steps. - methodMatches = options.methods.indexOf(requestMethod) !== -1; - if (methodMatches === false) { - endPreflight(); - } else { - // If any of the header field-names is not a ASCII case-insensitive match for any of - // the values in list of headers do not set any additional headers and terminate this - // set of steps. - headersMatch = requestHeaders.every(function (requestHeader) { - // Browsers automatically add Origin to Access-Control-Request-Headers. However, - // Origin is not one of the simple request headers. Therefore, the header is - // accepted even if it is not in the list of request headers because CORS would - // not work without it. - if (requestHeader === "origin") { - return true; - } else { - if (options.requestHeaders.indexOf(requestHeader) !== -1) { - return true; - } else { - return false; - } - } - }); - if (headersMatch === false) { - endPreflight(); - } else { - if (options.supportsCredentials === true) { - // If the resource supports credentials add a single Access-Control-Allow-Origin - // header, with the value of the Origin header as value, and add a single - // Access-Control-Allow-Credentials header with the literal string "true" - // as value. - res.setHeader("Access-Control-Allow-Origin", req.headers.origin); - res.setHeader("Access-Control-Allow-Credentials", "true"); - } else { - // Otherwise, add a single Access-Control-Allow-Origin header, with either the - // value of the Origin header or the string "*" as value. - if (options.origins.length > 0 || typeof options.origins === "function") { - res.setHeader("Access-Control-Allow-Origin", req.headers.origin); - } else { - res.setHeader("Access-Control-Allow-Origin", "*"); - } - } - // Optionally add a single Access-Control-Max-Age header with as value the amount - // of seconds the user agent is allowed to cache the result of the request. - if (options.maxAge !== null) { - res.setHeader("Access-Control-Max-Age", options.maxAge); - } - // Add one or more Access-Control-Allow-Methods headers consisting of (a subset - // of) the list of methods. - res.setHeader("Access-Control-Allow-Methods", options.methods.join(",")); - // Add one or more Access-Control-Allow-Headers headers consisting of (a subset - // of) the list of headers. - res.setHeader("Access-Control-Allow-Headers", options.requestHeaders.join(",")); - // And out. - endPreflight(); - } - } - } - } else { - if (options.supportsCredentials === true) { - // If the resource supports credentials add a single Access-Control-Allow-Origin header, - // with the value of the Origin header as value, and add a single - // Access-Control-Allow-Credentials header with the literal string "true" as value. - res.setHeader("Access-Control-Allow-Origin", req.headers.origin); - res.setHeader("Access-Control-Allow-Credentials", "true"); - } else { - // Otherwise, add a single Access-Control-Allow-Origin header, with either the value of - // the Origin header or the literal string "*" as value. - // If the list of origins is empty, use "*" as value. - if (options.origins.length > 0 || typeof options.origins === "function") { - res.setHeader("Access-Control-Allow-Origin", req.headers.origin); - } else { - res.setHeader("Access-Control-Allow-Origin", "*"); - } - } - // If the list of exposed headers is not empty add one or more Access-Control-Expose-Headers - // headers, with as values the header field names given in the list of exposed headers. - exposedHeaders = options.responseHeaders.filter(function (optionsResponseHeader) { - return simpleResponseHeaders.indexOf(optionsResponseHeader) === -1; - }); - if (exposedHeaders.length > 0) { - res.setHeader("Access-Control-Expose-Headers", exposedHeaders.join(",")); - } - // And out. - next(); - } - } - } - }); - } - }; -}; diff --git a/node_modules/corser/package.json b/node_modules/corser/package.json deleted file mode 100644 index 8b04918..0000000 --- a/node_modules/corser/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "corser", - "version": "2.0.1", - "description": "A highly configurable, middleware compatible implementation of CORS.", - "keywords": ["cors", "cross-origin resource sharing", "connect", "express", "middleware"], - "bugs": "https://github.com/agrueneberg/Corser/issues", - "license": "MIT", - "author": "Alexander Grüneberg <alexander.grueneberg@googlemail.com>", - "main": "./lib/corser.js", - "repository": { - "type": "git", - "url": "https://github.com/agrueneberg/Corser.git" - }, - "scripts": { - "test": "./node_modules/.bin/mocha" - }, - "devDependencies": { - "mocha": "1.3.x", - "expect.js": "0.1.x" - }, - "engines": { - "node": ">= 0.4.0" - } -} diff --git a/node_modules/csstype/LICENSE b/node_modules/csstype/LICENSE deleted file mode 100644 index ac06f62..0000000 --- a/node_modules/csstype/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2017-2018 Fredrik Nicol - -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/node_modules/csstype/README.md b/node_modules/csstype/README.md deleted file mode 100644 index 75947e1..0000000 --- a/node_modules/csstype/README.md +++ /dev/null @@ -1,277 +0,0 @@ -# CSSType - -[![npm](https://img.shields.io/npm/v/csstype.svg)](https://www.npmjs.com/package/csstype) - -TypeScript and Flow definitions for CSS, generated by [data from MDN](https://github.com/mdn/data). It provides autocompletion and type checking for CSS properties and values. - -**TypeScript** - -```ts -import type * as CSS from 'csstype'; - -const style: CSS.Properties = { - colour: 'white', // Type error on property - textAlign: 'middle', // Type error on value -}; -``` - -**Flow** - -```js -// @flow strict -import * as CSS from 'csstype'; - -const style: CSS.Properties<> = { - colour: 'white', // Type error on property - textAlign: 'middle', // Type error on value -}; -``` - -_Further examples below will be in TypeScript!_ - -## Getting started - -```sh -$ npm install csstype -``` - -## Table of content - -- [Style types](#style-types) -- [At-rule types](#at-rule-types) -- [Pseudo types](#pseudo-types) -- [Generics](#generics) -- [Usage](#usage) -- [What should I do when I get type errors?](#what-should-i-do-when-i-get-type-errors) -- [Version 3.0](#version-30) -- [Contributing](#contributing) - -## Style types - -Properties are categorized in different uses and in several technical variations to provide typings that suits as many as possible. - -| | Default | `Hyphen` | `Fallback` | `HyphenFallback` | -| -------------- | -------------------- | -------------------------- | ---------------------------- | ---------------------------------- | -| **All** | `Properties` | `PropertiesHyphen` | `PropertiesFallback` | `PropertiesHyphenFallback` | -| **`Standard`** | `StandardProperties` | `StandardPropertiesHyphen` | `StandardPropertiesFallback` | `StandardPropertiesHyphenFallback` | -| **`Vendor`** | `VendorProperties` | `VendorPropertiesHyphen` | `VendorPropertiesFallback` | `VendorPropertiesHyphenFallback` | -| **`Obsolete`** | `ObsoleteProperties` | `ObsoletePropertiesHyphen` | `ObsoletePropertiesFallback` | `ObsoletePropertiesHyphenFallback` | -| **`Svg`** | `SvgProperties` | `SvgPropertiesHyphen` | `SvgPropertiesFallback` | `SvgPropertiesHyphenFallback` | - -Categories: - -- **All** - Includes `Standard`, `Vendor`, `Obsolete` and `Svg` -- **`Standard`** - Current properties and extends subcategories `StandardLonghand` and `StandardShorthand` _(e.g. `StandardShorthandProperties`)_ -- **`Vendor`** - Vendor prefixed properties and extends subcategories `VendorLonghand` and `VendorShorthand` _(e.g. `VendorShorthandProperties`)_ -- **`Obsolete`** - Removed or deprecated properties -- **`Svg`** - SVG-specific properties - -Variations: - -- **Default** - JavaScript (camel) cased property names -- **`Hyphen`** - CSS (kebab) cased property names -- **`Fallback`** - Also accepts array of values e.g. `string | string[]` - -## At-rule types - -At-rule interfaces with descriptors. - -**TypeScript**: These will be found in the `AtRule` namespace, e.g. `AtRule.Viewport`. -**Flow**: These will be prefixed with `AtRule$`, e.g. `AtRule$Viewport`. - -| | Default | `Hyphen` | `Fallback` | `HyphenFallback` | -| -------------------- | -------------- | -------------------- | ---------------------- | ---------------------------- | -| **`@counter-style`** | `CounterStyle` | `CounterStyleHyphen` | `CounterStyleFallback` | `CounterStyleHyphenFallback` | -| **`@font-face`** | `FontFace` | `FontFaceHyphen` | `FontFaceFallback` | `FontFaceHyphenFallback` | -| **`@viewport`** | `Viewport` | `ViewportHyphen` | `ViewportFallback` | `ViewportHyphenFallback` | - -## Pseudo types - -String literals of pseudo classes and pseudo elements - -- `Pseudos` - - Extends: - - - `AdvancedPseudos` - - Function-like pseudos e.g. `:not(:first-child)`. The string literal contains the value excluding the parenthesis: `:not`. These are separated because they require an argument that results in infinite number of variations. - - - `SimplePseudos` - - Plain pseudos e.g. `:hover` that can only be **one** variation. - -## Generics - -All interfaces has two optional generic argument to define length and time: `CSS.Properties<TLength = string | 0, TTime = string>` - -- **Length** is the first generic parameter and defaults to `string | 0` because `0` is the only [length where the unit identifier is optional](https://drafts.csswg.org/css-values-3/#lengths). You can specify this, e.g. `string | number`, for platforms and libraries that accepts any numeric value as length with a specific unit. - ```tsx - const style: CSS.Properties<string | number> = { - width: 100, - }; - ``` -- **Time** is the second generic argument and defaults to `string`. You can specify this, e.g. `string | number`, for platforms and libraries that accepts any numeric value as length with a specific unit. - ```tsx - const style: CSS.Properties<string | number, number> = { - transitionDuration: 1000, - }; - ``` - -## Usage - -```ts -import type * as CSS from 'csstype'; - -const style: CSS.Properties = { - width: '10px', - margin: '1em', -}; -``` - -In some cases, like for CSS-in-JS libraries, an array of values is a way to provide fallback values in CSS. Using `CSS.PropertiesFallback` instead of `CSS.Properties` will add the possibility to use any property value as an array of values. - -```ts -import type * as CSS from 'csstype'; - -const style: CSS.PropertiesFallback = { - display: ['-webkit-flex', 'flex'], - color: 'white', -}; -``` - -There's even string literals for pseudo selectors and elements. - -```ts -import type * as CSS from 'csstype'; - -const pseudos: { [P in CSS.SimplePseudos]?: CSS.Properties } = { - ':hover': { - display: 'flex', - }, -}; -``` - -Hyphen cased (kebab cased) properties are provided in `CSS.PropertiesHyphen` and `CSS.PropertiesHyphenFallback`. It's not **not** added by default in `CSS.Properties`. To allow both of them, you can simply extend with `CSS.PropertiesHyphen` or/and `CSS.PropertiesHyphenFallback`. - -```ts -import type * as CSS from 'csstype'; - -interface Style extends CSS.Properties, CSS.PropertiesHyphen {} - -const style: Style = { - 'flex-grow': 1, - 'flex-shrink': 0, - 'font-weight': 'normal', - backgroundColor: 'white', -}; -``` - -Adding type checked CSS properties to a `HTMLElement`. - -```ts -import type * as CSS from 'csstype'; - -const style: CSS.Properties = { - color: 'red', - margin: '1em', -}; - -let button = document.createElement('button'); - -Object.assign(button.style, style); -``` - -## What should I do when I get type errors? - -The goal is to have as perfect types as possible and we're trying to do our best. But with CSS Custom Properties, the CSS specification changing frequently and vendors implementing their own specifications with new releases sometimes causes type errors even if it should work. Here's some steps you could take to get it fixed: - -_If you're using CSS Custom Properties you can step directly to step 3._ - -1. **First of all, make sure you're doing it right.** A type error could also indicate that you're not :wink: - - - Some CSS specs that some vendors has implemented could have been officially rejected or haven't yet received any official acceptance and are therefor not included - - If you're using TypeScript, [type widening](https://blog.mariusschulz.com/2017/02/04/TypeScript-2-1-literal-type-widening) could be the reason you get `Type 'string' is not assignable to...` errors - -2. **Have a look in [issues](https://github.com/frenic/csstype/issues) to see if an issue already has been filed. If not, create a new one.** To help us out, please refer to any information you have found. -3. Fix the issue locally with **TypeScript** (Flow further down): - - - The recommended way is to use **module augmentation**. Here's a few examples: - - ```ts - // My css.d.ts file - import type * as CSS from 'csstype'; - - declare module 'csstype' { - interface Properties { - // Add a missing property - WebkitRocketLauncher?: string; - - // Add a CSS Custom Property - '--theme-color'?: 'black' | 'white'; - - // Allow namespaced CSS Custom Properties - [index: `--theme-${string}`]: any; - - // Allow any CSS Custom Properties - [index: `--${string}`]: any; - - // ...or allow any other property - [index: string]: any; - } - } - ``` - - - The alternative way is to use **type assertion**. Here's a few examples: - - ```ts - const style: CSS.Properties = { - // Add a missing property - ['WebkitRocketLauncher' as any]: 'launching', - - // Add a CSS Custom Property - ['--theme-color' as any]: 'black', - }; - ``` - - Fix the issue locally with **Flow**: - - - Use **type assertion**. Here's a few examples: - - ```js - const style: $Exact<CSS.Properties<*>> = { - // Add a missing property - [('WebkitRocketLauncher': any)]: 'launching', - - // Add a CSS Custom Property - [('--theme-color': any)]: 'black', - }; - ``` - -## Version 3.0 - -- **All property types are exposed with namespace** - TypeScript: `Property.AlignContent` (was `AlignContentProperty` before) - Flow: `Property$AlignContent` -- **All at-rules are exposed with namespace** - TypeScript: `AtRule.FontFace` (was `FontFace` before) - Flow: `AtRule$FontFace` -- **Data types are NOT exposed** - E.g. `Color` and `Box`. Because the generation of data types may suddenly be removed or renamed. -- **TypeScript hack for autocompletion** - Uses `(string & {})` for literal string unions and `(number & {})` for literal number unions ([related issue](https://github.com/microsoft/TypeScript/issues/29729)). Utilize `PropertyValue<T>` to unpack types from e.g. `(string & {})` to `string`. -- **New generic for time** - Read more on the ["Generics"](#generics) section. -- **Flow types improvements** - Flow Strict enabled and exact types are used. - -## Contributing - -**Never modify `index.d.ts` and `index.js.flow` directly. They are generated automatically and committed so that we can easily follow any change it results in.** Therefor it's important that you run `$ git config merge.ours.driver true` after you've forked and cloned. That setting prevents merge conflicts when doing rebase. - -### Commands - -- `npm run build` Generates typings and type checks them -- `npm run watch` Runs build on each save -- `npm run test` Runs the tests -- `npm run lazy` Type checks, lints and formats everything diff --git a/node_modules/csstype/index.d.ts b/node_modules/csstype/index.d.ts deleted file mode 100644 index b466d21..0000000 --- a/node_modules/csstype/index.d.ts +++ /dev/null @@ -1,21297 +0,0 @@ -export {}; - -export type PropertyValue<TValue> = TValue extends Array<infer AValue> - ? Array<AValue extends infer TUnpacked & {} ? TUnpacked : AValue> - : TValue extends infer TUnpacked & {} - ? TUnpacked - : TValue; - -export type Fallback<T> = { [P in keyof T]: T[P] | readonly NonNullable<T[P]>[] }; - -export interface StandardLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> { - /** - * The **`accent-color`** CSS property sets the accent color for user-interface controls generated by some elements. - * - * **Syntax**: `auto | <color>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **93** | **92** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/accent-color - */ - accentColor?: Property.AccentColor | undefined; - /** - * The CSS **`align-content`** property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. - * - * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **28** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-content - */ - alignContent?: Property.AlignContent | undefined; - /** - * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. - * - * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-items - */ - alignItems?: Property.AlignItems | undefined; - /** - * The **`align-self`** CSS property overrides a grid or flex item's `align-items` value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. - * - * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **10** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-self - */ - alignSelf?: Property.AlignSelf | undefined; - /** - * The **`align-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their block axis. - * - * **Syntax**: `[ normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-tracks - */ - alignTracks?: Property.AlignTracks | undefined; - /** - * The **`animation-composition`** CSS property specifies the composite operation to use when multiple animations affect the same property simultaneously. - * - * **Syntax**: `<single-animation-composition>#` - * - * **Initial value**: `replace` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **112** | **115** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-composition - */ - animationComposition?: Property.AnimationComposition | undefined; - /** - * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-delay - */ - animationDelay?: Property.AnimationDelay<TTime> | undefined; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-direction - */ - animationDirection?: Property.AnimationDirection | undefined; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-duration - */ - animationDuration?: Property.AnimationDuration<TTime> | undefined; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 5 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode - */ - animationFillMode?: Property.AnimationFillMode | undefined; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count - */ - animationIterationCount?: Property.AnimationIterationCount | undefined; - /** - * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-name - */ - animationName?: Property.AnimationName | undefined; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-play-state - */ - animationPlayState?: Property.AnimationPlayState | undefined; - /** - * The **`animation-range-end`** CSS property is used to set the end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will end. - * - * **Syntax**: `[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-range-end - */ - animationRangeEnd?: Property.AnimationRangeEnd<TLength> | undefined; - /** - * The **`animation-range-start`** CSS property is used to set the start of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start. - * - * **Syntax**: `[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-range-start - */ - animationRangeStart?: Property.AnimationRangeStart<TLength> | undefined; - /** - * The **`animation-timeline`** CSS property specifies the timeline that is used to control the progress of an animation. - * - * **Syntax**: `<single-animation-timeline>#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-timeline - */ - animationTimeline?: Property.AnimationTimeline | undefined; - /** - * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-timing-function - */ - animationTimingFunction?: Property.AnimationTimingFunction | undefined; - /** - * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. - * - * **Syntax**: `none | auto | textfield | menulist-button | <compat-auto>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :------: | :-: | - * | **84** | **80** | **15.4** | **84** | No | - * | 1 _-x-_ | 1 _-x-_ | 3 _-x-_ | 12 _-x-_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/appearance - */ - appearance?: Property.Appearance | undefined; - /** - * The **`aspect-ratio`** CSS property sets a **preferred aspect ratio** for the box, which will be used in the calculation of auto sizes and some other layout functions. - * - * **Syntax**: `auto | <ratio>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **88** | **89** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/aspect-ratio - */ - aspectRatio?: Property.AspectRatio | undefined; - /** - * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------: | :----: | :-: | - * | **76** | **103** | **9** _-x-_ | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/backdrop-filter - */ - backdropFilter?: Property.BackdropFilter | undefined; - /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. - * - * **Syntax**: `visible | hidden` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-------: | :----: | :----: | - * | **36** | **16** | **15.4** | **12** | **10** | - * | 12 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/backface-visibility - */ - backfaceVisibility?: Property.BackfaceVisibility | undefined; - /** - * The **`background-attachment`** CSS property sets whether a background image's position is fixed within the viewport, or scrolls with its containing block. - * - * **Syntax**: `<attachment>#` - * - * **Initial value**: `scroll` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-attachment - */ - backgroundAttachment?: Property.BackgroundAttachment | undefined; - /** - * The **`background-blend-mode`** CSS property sets how an element's background images should blend with each other and with the element's background color. - * - * **Syntax**: `<blend-mode>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **35** | **30** | **8** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-blend-mode - */ - backgroundBlendMode?: Property.BackgroundBlendMode | undefined; - /** - * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `border-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **4** | **5** | **12** | **9** | - * | | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-clip - */ - backgroundClip?: Property.BackgroundClip | undefined; - /** - * The **`background-color`** CSS property sets the background color of an element. - * - * **Syntax**: `<color>` - * - * **Initial value**: `transparent` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-color - */ - backgroundColor?: Property.BackgroundColor | undefined; - /** - * The **`background-image`** CSS property sets one or more background images on an element. - * - * **Syntax**: `<bg-image>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-image - */ - backgroundImage?: Property.BackgroundImage | undefined; - /** - * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `padding-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **4** | **3** | **12** | **9** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-origin - */ - backgroundOrigin?: Property.BackgroundOrigin | undefined; - /** - * The **`background-position-x`** CSS property sets the initial horizontal position for each background image. The position is relative to the position layer set by `background-origin`. - * - * **Syntax**: `[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#` - * - * **Initial value**: `0%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **49** | **1** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-position-x - */ - backgroundPositionX?: Property.BackgroundPositionX<TLength> | undefined; - /** - * The **`background-position-y`** CSS property sets the initial vertical position for each background image. The position is relative to the position layer set by `background-origin`. - * - * **Syntax**: `[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#` - * - * **Initial value**: `0%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **49** | **1** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-position-y - */ - backgroundPositionY?: Property.BackgroundPositionY<TLength> | undefined; - /** - * The **`background-repeat`** CSS property sets how background images are repeated. A background image can be repeated along the horizontal and vertical axes, or not repeated at all. - * - * **Syntax**: `<repeat-style>#` - * - * **Initial value**: `repeat` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-repeat - */ - backgroundRepeat?: Property.BackgroundRepeat | undefined; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **3** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-size - */ - backgroundSize?: Property.BackgroundSize<TLength> | undefined; - /** - * **Syntax**: `clip | ellipsis | <string>` - * - * **Initial value**: `clip` - */ - blockOverflow?: Property.BlockOverflow | undefined; - /** - * The **`block-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'width'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/block-size - */ - blockSize?: Property.BlockSize<TLength> | undefined; - /** - * The **`border-block-color`** CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>{1,2}` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-color - */ - borderBlockColor?: Property.BorderBlockColor | undefined; - /** - * The **`border-block-end-color`** CSS property defines the color of the logical block-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-color - */ - borderBlockEndColor?: Property.BorderBlockEndColor | undefined; - /** - * The **`border-block-end-style`** CSS property defines the style of the logical block-end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-style - */ - borderBlockEndStyle?: Property.BorderBlockEndStyle | undefined; - /** - * The **`border-block-end-width`** CSS property defines the width of the logical block-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-width - */ - borderBlockEndWidth?: Property.BorderBlockEndWidth<TLength> | undefined; - /** - * The **`border-block-start-color`** CSS property defines the color of the logical block-start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-color - */ - borderBlockStartColor?: Property.BorderBlockStartColor | undefined; - /** - * The **`border-block-start-style`** CSS property defines the style of the logical block start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-style - */ - borderBlockStartStyle?: Property.BorderBlockStartStyle | undefined; - /** - * The **`border-block-start-width`** CSS property defines the width of the logical block-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-width - */ - borderBlockStartWidth?: Property.BorderBlockStartWidth<TLength> | undefined; - /** - * The **`border-block-style`** CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-style - */ - borderBlockStyle?: Property.BorderBlockStyle | undefined; - /** - * The **`border-block-width`** CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-width - */ - borderBlockWidth?: Property.BorderBlockWidth<TLength> | undefined; - /** - * The **`border-bottom-color`** CSS property sets the color of an element's bottom border. It can also be set with the shorthand CSS properties `border-color` or `border-bottom`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-color - */ - borderBottomColor?: Property.BorderBottomColor | undefined; - /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius - */ - borderBottomLeftRadius?: Property.BorderBottomLeftRadius<TLength> | undefined; - /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius - */ - borderBottomRightRadius?: Property.BorderBottomRightRadius<TLength> | undefined; - /** - * The **`border-bottom-style`** CSS property sets the line style of an element's bottom `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-style - */ - borderBottomStyle?: Property.BorderBottomStyle | undefined; - /** - * The **`border-bottom-width`** CSS property sets the width of the bottom border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-width - */ - borderBottomWidth?: Property.BorderBottomWidth<TLength> | undefined; - /** - * The **`border-collapse`** CSS property sets whether cells inside a `<table>` have shared or separate borders. - * - * **Syntax**: `collapse | separate` - * - * **Initial value**: `separate` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-collapse - */ - borderCollapse?: Property.BorderCollapse | undefined; - /** - * The **`border-end-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius - */ - borderEndEndRadius?: Property.BorderEndEndRadius<TLength> | undefined; - /** - * The **`border-end-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius - */ - borderEndStartRadius?: Property.BorderEndStartRadius<TLength> | undefined; - /** - * The **`border-image-outset`** CSS property sets the distance by which an element's border image is set out from its border box. - * - * **Syntax**: `[ <length> | <number> ]{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-outset - */ - borderImageOutset?: Property.BorderImageOutset<TLength> | undefined; - /** - * The **`border-image-repeat`** CSS property defines how the edge regions and middle region of a source image are adjusted to fit the dimensions of an element's border image. The middle region can be displayed by using the keyword "fill" in the border-image-slice property. - * - * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` - * - * **Initial value**: `stretch` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-repeat - */ - borderImageRepeat?: Property.BorderImageRepeat | undefined; - /** - * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. - * - * **Syntax**: `<number-percentage>{1,4} && fill?` - * - * **Initial value**: `100%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-slice - */ - borderImageSlice?: Property.BorderImageSlice | undefined; - /** - * The **`border-image-source`** CSS property sets the source image used to create an element's border image. - * - * **Syntax**: `none | <image>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-source - */ - borderImageSource?: Property.BorderImageSource | undefined; - /** - * The **`border-image-width`** CSS property sets the width of an element's border image. - * - * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **13** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-width - */ - borderImageWidth?: Property.BorderImageWidth<TLength> | undefined; - /** - * The **`border-inline-color`** CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>{1,2}` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-color - */ - borderInlineColor?: Property.BorderInlineColor | undefined; - /** - * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-end-color)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color - */ - borderInlineEndColor?: Property.BorderInlineEndColor | undefined; - /** - * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-end-style)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style - */ - borderInlineEndStyle?: Property.BorderInlineEndStyle | undefined; - /** - * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-end-width)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width - */ - borderInlineEndWidth?: Property.BorderInlineEndWidth<TLength> | undefined; - /** - * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :---------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-start-color)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color - */ - borderInlineStartColor?: Property.BorderInlineStartColor | undefined; - /** - * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :---------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-start-style)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style - */ - borderInlineStartStyle?: Property.BorderInlineStartStyle | undefined; - /** - * The **`border-inline-start-width`** CSS property defines the width of the logical inline-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width - */ - borderInlineStartWidth?: Property.BorderInlineStartWidth<TLength> | undefined; - /** - * The **`border-inline-style`** CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-style - */ - borderInlineStyle?: Property.BorderInlineStyle | undefined; - /** - * The **`border-inline-width`** CSS property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-width - */ - borderInlineWidth?: Property.BorderInlineWidth<TLength> | undefined; - /** - * The **`border-left-color`** CSS property sets the color of an element's left border. It can also be set with the shorthand CSS properties `border-color` or `border-left`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left-color - */ - borderLeftColor?: Property.BorderLeftColor | undefined; - /** - * The **`border-left-style`** CSS property sets the line style of an element's left `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left-style - */ - borderLeftStyle?: Property.BorderLeftStyle | undefined; - /** - * The **`border-left-width`** CSS property sets the width of the left border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left-width - */ - borderLeftWidth?: Property.BorderLeftWidth<TLength> | undefined; - /** - * The **`border-right-color`** CSS property sets the color of an element's right border. It can also be set with the shorthand CSS properties `border-color` or `border-right`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right-color - */ - borderRightColor?: Property.BorderRightColor | undefined; - /** - * The **`border-right-style`** CSS property sets the line style of an element's right `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right-style - */ - borderRightStyle?: Property.BorderRightStyle | undefined; - /** - * The **`border-right-width`** CSS property sets the width of the right border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right-width - */ - borderRightWidth?: Property.BorderRightWidth<TLength> | undefined; - /** - * The **`border-spacing`** CSS property sets the distance between the borders of adjacent cells in a `<table>`. This property applies only when `border-collapse` is `separate`. - * - * **Syntax**: `<length> <length>?` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-spacing - */ - borderSpacing?: Property.BorderSpacing<TLength> | undefined; - /** - * The **`border-start-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius - */ - borderStartEndRadius?: Property.BorderStartEndRadius<TLength> | undefined; - /** - * The **`border-start-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius - */ - borderStartStartRadius?: Property.BorderStartStartRadius<TLength> | undefined; - /** - * The **`border-top-color`** CSS property sets the color of an element's top border. It can also be set with the shorthand CSS properties `border-color` or `border-top`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-color - */ - borderTopColor?: Property.BorderTopColor | undefined; - /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius - */ - borderTopLeftRadius?: Property.BorderTopLeftRadius<TLength> | undefined; - /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius - */ - borderTopRightRadius?: Property.BorderTopRightRadius<TLength> | undefined; - /** - * The **`border-top-style`** CSS property sets the line style of an element's top `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-style - */ - borderTopStyle?: Property.BorderTopStyle | undefined; - /** - * The **`border-top-width`** CSS property sets the width of the top border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-width - */ - borderTopWidth?: Property.BorderTopWidth<TLength> | undefined; - /** - * The **`bottom`** CSS property participates in setting the vertical position of a positioned element. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/bottom - */ - bottom?: Property.Bottom<TLength> | undefined; - /** - * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. - * - * **Syntax**: `slice | clone` - * - * **Initial value**: `slice` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------: | :-----: | :---------: | :--: | :-: | - * | **22** _-x-_ | **32** | **7** _-x-_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/box-decoration-break - */ - boxDecorationBreak?: Property.BoxDecorationBreak | undefined; - /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. - * - * **Syntax**: `none | <shadow>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **10** | **4** | **5.1** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/box-shadow - */ - boxShadow?: Property.BoxShadow | undefined; - /** - * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. - * - * **Syntax**: `content-box | border-box` - * - * **Initial value**: `content-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **10** | **29** | **5.1** | **12** | **8** | - * | 1 _-x-_ | 1 _-x-_ | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/box-sizing - */ - boxSizing?: Property.BoxSizing | undefined; - /** - * The **`break-after`** CSS property sets how page, column, or region breaks should behave after a generated box. If there is no generated box, the property is ignored. - * - * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **50** | **65** | **10** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/break-after - */ - breakAfter?: Property.BreakAfter | undefined; - /** - * The **`break-before`** CSS property sets how page, column, or region breaks should behave before a generated box. If there is no generated box, the property is ignored. - * - * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **50** | **65** | **10** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/break-before - */ - breakBefore?: Property.BreakBefore | undefined; - /** - * The **`break-inside`** CSS property sets how page, column, or region breaks should behave inside a generated box. If there is no generated box, the property is ignored. - * - * **Syntax**: `auto | avoid | avoid-page | avoid-column | avoid-region` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **50** | **65** | **10** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/break-inside - */ - breakInside?: Property.BreakInside | undefined; - /** - * The **`caption-side`** CSS property puts the content of a table's `<caption>` on the specified side. The values are relative to the `writing-mode` of the table. - * - * **Syntax**: `top | bottom | block-start | block-end | inline-start | inline-end` - * - * **Initial value**: `top` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/caption-side - */ - captionSide?: Property.CaptionSide | undefined; - /** - * The **`caret-color`** CSS property sets the color of the **insertion caret**, the visible marker where the next character typed will be inserted. This is sometimes referred to as the **text input cursor**. The caret appears in elements such as `<input>` or those with the `contenteditable` attribute. The caret is typically a thin vertical line that flashes to help make it more noticeable. By default, it is black, but its color can be altered with this property. - * - * **Syntax**: `auto | <color>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **53** | **11.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/caret-color - */ - caretColor?: Property.CaretColor | undefined; - /** - * **Syntax**: `auto | bar | block | underscore` - * - * **Initial value**: `auto` - */ - caretShape?: Property.CaretShape | undefined; - /** - * The **`clear`** CSS property sets whether an element must be moved below (cleared) floating elements that precede it. The `clear` property applies to floating and non-floating elements. - * - * **Syntax**: `none | left | right | both | inline-start | inline-end` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/clear - */ - clear?: Property.Clear | undefined; - /** - * The **`clip-path`** CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. - * - * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **55** | **3.5** | **9.1** | **79** | **10** | - * | 23 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/clip-path - */ - clipPath?: Property.ClipPath | undefined; - /** - * The **`color`** CSS property sets the foreground color value of an element's text and text decorations, and sets the `currentcolor` value. `currentcolor` may be used as an indirect value on _other_ properties and is the default for other color properties, such as `border-color`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `canvastext` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/color - */ - color?: Property.Color | undefined; - /** - * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. - * - * **Syntax**: `economy | exact` - * - * **Initial value**: `economy` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------: | :-----------------: | :------: | :----------: | :-: | - * | **17** _-x-_ | **97** | **15.4** | **79** _-x-_ | No | - * | | 48 _(color-adjust)_ | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust - */ - colorAdjust?: Property.PrintColorAdjust | undefined; - /** - * The **`color-scheme`** CSS property allows an element to indicate which color schemes it can comfortably be rendered in. - * - * **Syntax**: `normal | [ light | dark | <custom-ident> ]+ && only?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **81** | **96** | **13** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/color-scheme - */ - colorScheme?: Property.ColorScheme | undefined; - /** - * The **`column-count`** CSS property breaks an element's content into the specified number of columns. - * - * **Syntax**: `<integer> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-count - */ - columnCount?: Property.ColumnCount | undefined; - /** - * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. - * - * **Syntax**: `auto | balance | balance-all` - * - * **Initial value**: `balance` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-fill - */ - columnFill?: Property.ColumnFill | undefined; - /** - * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. - * - * **Syntax**: `normal | <length-percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **1** | **1.5** | **3** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-gap - */ - columnGap?: Property.ColumnGap<TLength> | undefined; - /** - * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-color - */ - columnRuleColor?: Property.ColumnRuleColor | undefined; - /** - * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-style - */ - columnRuleStyle?: Property.ColumnRuleStyle | undefined; - /** - * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-width - */ - columnRuleWidth?: Property.ColumnRuleWidth<TLength> | undefined; - /** - * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. - * - * **Syntax**: `none | all` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **50** | **71** | **9** | **12** | **10** | - * | 6 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-span - */ - columnSpan?: Property.ColumnSpan | undefined; - /** - * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. - * - * **Syntax**: `<length> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **50** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-width - */ - columnWidth?: Property.ColumnWidth<TLength> | undefined; - /** - * The **`contain`** CSS property indicates that an element and its contents are, as much as possible, independent from the rest of the document tree. Containment enables isolating a subsection of the DOM, providing performance benefits by limiting calculations of layout, style, paint, size, or any combination to a DOM subtree rather than the entire page. Containment can also be used to scope CSS counters and quotes. - * - * **Syntax**: `none | strict | content | [ [ size || inline-size ] || layout || style || paint ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **52** | **69** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain - */ - contain?: Property.Contain | undefined; - /** - * The **`contain-intrinsic-block-size`** CSS logical property defines the block size of an element that a browser can use for layout when the element is subject to size containment. - * - * **Syntax**: `auto? [ none | <length> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **95** | **107** | **17** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-contain-intrinsic-block-size - */ - containIntrinsicBlockSize?: Property.ContainIntrinsicBlockSize<TLength> | undefined; - /** - * The **`contain-intrinsic-length`** CSS property sets the height of an element that a browser can use for layout when the element is subject to size containment. - * - * **Syntax**: `auto? [ none | <length> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **95** | **107** | **17** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height - */ - containIntrinsicHeight?: Property.ContainIntrinsicHeight<TLength> | undefined; - /** - * The **`contain-intrinsic-inline-size`** CSS logical property defines the inline-size of an element that a browser can use for layout when the element is subject to size containment. - * - * **Syntax**: `auto? [ none | <length> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **95** | **107** | **17** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-contain-intrinsic-inline-size - */ - containIntrinsicInlineSize?: Property.ContainIntrinsicInlineSize<TLength> | undefined; - /** - * The **`contain-intrinsic-width`** CSS property sets the width of an element that a browser will use for layout when the element is subject to size containment. - * - * **Syntax**: `auto? [ none | <length> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **95** | **107** | **17** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-width - */ - containIntrinsicWidth?: Property.ContainIntrinsicWidth<TLength> | undefined; - /** - * The **container-name** CSS property specifies a list of query container names used by the @container at-rule in a container query. A container query will apply styles to elements based on the size of the nearest ancestor with a containment context. When a containment context is given a name, it can be specifically targeted using the `@container` at-rule instead of the nearest ancestor with containment. - * - * **Syntax**: `none | <custom-ident>+` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **105** | **110** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/container-name - */ - containerName?: Property.ContainerName | undefined; - /** - * The **container-type** CSS property is used to define the type of containment used in a container query. - * - * **Syntax**: `normal | size | inline-size` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **105** | **110** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/container-type - */ - containerType?: Property.ContainerType | undefined; - /** - * The **`content`** CSS property replaces an element with a generated value. Objects inserted using the `content` property are **anonymous replaced elements**. - * - * **Syntax**: `normal | none | [ <content-replacement> | <content-list> ] [/ [ <string> | <counter> ]+ ]?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/content - */ - content?: Property.Content | undefined; - /** - * The **`content-visibility`** CSS property controls whether or not an element renders its contents at all, along with forcing a strong set of containments, allowing user agents to potentially omit large swathes of layout and rendering work until it becomes needed. It enables the user agent to skip an element's rendering work (including layout and painting) until it is needed — which makes the initial page load much faster. - * - * **Syntax**: `visible | auto | hidden` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :---------: | :----: | :--: | :-: | - * | **85** | **preview** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/content-visibility - */ - contentVisibility?: Property.ContentVisibility | undefined; - /** - * The **`counter-increment`** CSS property increases or decreases the value of a CSS counter by a given value. - * - * **Syntax**: `[ <counter-name> <integer>? ]+ | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **2** | **1** | **3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/counter-increment - */ - counterIncrement?: Property.CounterIncrement | undefined; - /** - * The **`counter-reset`** CSS property resets a CSS counter to a given value. This property will create a new counter or reversed counter with the given name on the specified element. - * - * **Syntax**: `[ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **2** | **1** | **3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/counter-reset - */ - counterReset?: Property.CounterReset | undefined; - /** - * The **`counter-set`** CSS property sets a CSS counter to a given value. It manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element. - * - * **Syntax**: `[ <counter-name> <integer>? ]+ | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **85** | **68** | **17.2** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/counter-set - */ - counterSet?: Property.CounterSet | undefined; - /** - * The **`cursor`** CSS property sets the mouse cursor, if any, to show when the mouse pointer is over an element. - * - * **Syntax**: `[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/cursor - */ - cursor?: Property.Cursor | undefined; - /** - * The **`direction`** CSS property sets the direction of text, table columns, and horizontal overflow. Use `rtl` for languages written from right to left (like Hebrew or Arabic), and `ltr` for those written from left to right (like English and most other languages). - * - * **Syntax**: `ltr | rtl` - * - * **Initial value**: `ltr` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **2** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/direction - */ - direction?: Property.Direction | undefined; - /** - * The **`display`** CSS property sets whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex. - * - * **Syntax**: `[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>` - * - * **Initial value**: `inline` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/display - */ - display?: Property.Display | undefined; - /** - * The **`empty-cells`** CSS property sets whether borders and backgrounds appear around `<table>` cells that have no visible content. - * - * **Syntax**: `show | hide` - * - * **Initial value**: `show` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/empty-cells - */ - emptyCells?: Property.EmptyCells | undefined; - /** - * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :-: | - * | **53** | **35** | **9.1** | **12** | No | - * | 18 _-x-_ | | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/filter - */ - filter?: Property.Filter | undefined; - /** - * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. - * - * **Syntax**: `content | <'width'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **22** | **9** | **12** | **11** | - * | 22 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-basis - */ - flexBasis?: Property.FlexBasis<TLength> | undefined; - /** - * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). - * - * **Syntax**: `row | row-reverse | column | column-reverse` - * - * **Initial value**: `row` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :------: | - * | **29** | **81** | **9** | **12** | **11** | - * | 21 _-x-_ | 49 _-x-_ | 7 _-x-_ | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-direction - */ - flexDirection?: Property.FlexDirection | undefined; - /** - * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----------------------: | - * | **29** | **20** | **9** | **12** | **11** | - * | 22 _-x-_ | | 7 _-x-_ | | 10 _(-ms-flex-positive)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-grow - */ - flexGrow?: Property.FlexGrow | undefined; - /** - * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. - * - * **Syntax**: `<number>` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **10** | - * | 22 _-x-_ | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-shrink - */ - flexShrink?: Property.FlexShrink | undefined; - /** - * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. - * - * **Syntax**: `nowrap | wrap | wrap-reverse` - * - * **Initial value**: `nowrap` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **28** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-wrap - */ - flexWrap?: Property.FlexWrap | undefined; - /** - * The **`float`** CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow (in contrast to absolute positioning). - * - * **Syntax**: `left | right | none | inline-start | inline-end` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/float - */ - float?: Property.Float | undefined; - /** - * The **`font-family`** CSS property specifies a prioritized list of one or more font family names and/or generic family names for the selected element. - * - * **Syntax**: `[ <family-name> | <generic-family> ]#` - * - * **Initial value**: depends on user agent - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-family - */ - fontFamily?: Property.FontFamily | undefined; - /** - * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. - * - * **Syntax**: `normal | <feature-tag-value>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :----: | - * | **48** | **34** | **9.1** | **15** | **10** | - * | 16 _-x-_ | 15 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-feature-settings - */ - fontFeatureSettings?: Property.FontFeatureSettings | undefined; - /** - * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. - * - * **Syntax**: `auto | normal | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **33** | **32** | **9** | n/a | No | - * | | | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-kerning - */ - fontKerning?: Property.FontKerning | undefined; - /** - * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. - * - * **Syntax**: `normal | <string>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **34** | No | n/a | No | - * | | 4 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-language-override - */ - fontLanguageOverride?: Property.FontLanguageOverride | undefined; - /** - * The **`font-optical-sizing`** CSS property sets whether text rendering is optimized for viewing at different sizes. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **79** | **62** | **11** | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing - */ - fontOpticalSizing?: Property.FontOpticalSizing | undefined; - /** - * **Syntax**: `normal | light | dark | <palette-identifier>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **101** | **107** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-palette - */ - fontPalette?: Property.FontPalette | undefined; - /** - * The **`font-size`** CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative `<length>` units, such as `em`, `ex`, and so forth. - * - * **Syntax**: `<absolute-size> | <relative-size> | <length-percentage>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-size - */ - fontSize?: Property.FontSize<TLength> | undefined; - /** - * The **`font-size-adjust`** CSS property sets the size of lower-case letters relative to the current font size (which defines the size of upper-case letters). - * - * **Syntax**: `none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | No | **3** | **16.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-size-adjust - */ - fontSizeAdjust?: Property.FontSizeAdjust | undefined; - /** - * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. - * - * **Syntax**: `auto | never | always | <absolute-size> | <length>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------: | :--------------------------------: | :------------------------------: | :--: | :-: | - * | **5** _(-webkit-font-smoothing)_ | **25** _(-moz-osx-font-smoothing)_ | **4** _(-webkit-font-smoothing)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-smooth - */ - fontSmooth?: Property.FontSmooth<TLength> | undefined; - /** - * The **`font-stretch`** CSS property selects a normal, condensed, or expanded face from a font. - * - * **Syntax**: `<font-stretch-absolute>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **60** | **9** | **11** | **12** | **9** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-stretch - */ - fontStretch?: Property.FontStretch | undefined; - /** - * The **`font-style`** CSS property sets whether a font should be styled with a normal, italic, or oblique face from its `font-family`. - * - * **Syntax**: `normal | italic | oblique <angle>?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-style - */ - fontStyle?: Property.FontStyle | undefined; - /** - * The **`font-synthesis`** CSS property controls which missing typefaces, bold, italic, or small-caps, may be synthesized by the browser. - * - * **Syntax**: `none | [ weight || style || small-caps || position]` - * - * **Initial value**: `weight style small-caps position ` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **97** | **34** | **9** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis - */ - fontSynthesis?: Property.FontSynthesis | undefined; - /** - * The **`font-synthesis-position`** CSS property lets you specify whether or not a browser may synthesize the subscript and superscript "position" typefaces when they are missing in a font family, while using `font-variant-position` to set the positions. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **118** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-position - */ - fontSynthesisPosition?: Property.FontSynthesisPosition | undefined; - /** - * The **`font-synthesis-small-caps`** CSS property lets you specify whether or not the browser may synthesize small-caps typeface when it is missing in a font family. Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **97** | **111** | **16.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps - */ - fontSynthesisSmallCaps?: Property.FontSynthesisSmallCaps | undefined; - /** - * The **`font-synthesis-style`** CSS property lets you specify whether or not the browser may synthesize the oblique typeface when it is missing in a font family. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **97** | **111** | **16.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style - */ - fontSynthesisStyle?: Property.FontSynthesisStyle | undefined; - /** - * The **`font-synthesis-weight`** CSS property lets you specify whether or not the browser may synthesize the bold typeface when it is missing in a font family. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **97** | **111** | **16.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight - */ - fontSynthesisWeight?: Property.FontSynthesisWeight | undefined; - /** - * The **`font-variant`** CSS shorthand property allows you to set all the font variants for a font. - * - * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant - */ - fontVariant?: Property.FontVariant | undefined; - /** - * The **`font-variant-alternates`** CSS property controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in `@font-feature-values`. - * - * **Syntax**: `normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :--: | :-: | - * | **111** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates - */ - fontVariantAlternates?: Property.FontVariantAlternates | undefined; - /** - * The **`font-variant-caps`** CSS property controls the use of alternate glyphs for capital letters. - * - * **Syntax**: `normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **52** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-caps - */ - fontVariantCaps?: Property.FontVariantCaps | undefined; - /** - * The **`font-variant-east-asian`** CSS property controls the use of alternate glyphs for East Asian scripts, like Japanese and Chinese. - * - * **Syntax**: `normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **63** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian - */ - fontVariantEastAsian?: Property.FontVariantEastAsian | undefined; - /** - * **Syntax**: `normal | text | emoji | unicode` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-emoji - */ - fontVariantEmoji?: Property.FontVariantEmoji | undefined; - /** - * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. - * - * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :--: | :-: | - * | **34** | **34** | **9.1** | n/a | No | - * | 31 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures - */ - fontVariantLigatures?: Property.FontVariantLigatures | undefined; - /** - * The **`font-variant-numeric`** CSS property controls the usage of alternate glyphs for numbers, fractions, and ordinal markers. - * - * **Syntax**: `normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **52** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric - */ - fontVariantNumeric?: Property.FontVariantNumeric | undefined; - /** - * The **`font-variant-position`** CSS property controls the use of alternate, smaller glyphs that are positioned as superscript or subscript. - * - * **Syntax**: `normal | sub | super` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :--: | :-: | - * | **117** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-position - */ - fontVariantPosition?: Property.FontVariantPosition | undefined; - /** - * The **`font-variation-settings`** CSS property provides low-level control over variable font characteristics, by specifying the four letter axis names of the characteristics you want to vary, along with their values. - * - * **Syntax**: `normal | [ <string> <number> ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **62** | **62** | **11** | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variation-settings - */ - fontVariationSettings?: Property.FontVariationSettings | undefined; - /** - * The **`font-weight`** CSS property sets the weight (or boldness) of the font. The weights available depend on the `font-family` that is currently set. - * - * **Syntax**: `<font-weight-absolute> | bolder | lighter` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **2** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-weight - */ - fontWeight?: Property.FontWeight | undefined; - /** - * The **`forced-color-adjust`** CSS property allows authors to opt certain elements out of forced colors mode. This then restores the control of those values to CSS. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :-----------------------------: | :---------------------------------: | - * | **89** | **113** | No | **79** | **10** _(-ms-high-contrast-adjust)_ | - * | | | | 12 _(-ms-high-contrast-adjust)_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust - */ - forcedColorAdjust?: Property.ForcedColorAdjust | undefined; - /** - * The **`grid-auto-columns`** CSS property specifies the size of an implicitly-created grid column track or pattern of tracks. - * - * **Syntax**: `<track-size>+` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-------------------------: | - * | **57** | **70** | **10.1** | **16** | **10** _(-ms-grid-columns)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns - */ - gridAutoColumns?: Property.GridAutoColumns<TLength> | undefined; - /** - * The **`grid-auto-flow`** CSS property controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid. - * - * **Syntax**: `[ row | column ] || dense` - * - * **Initial value**: `row` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow - */ - gridAutoFlow?: Property.GridAutoFlow | undefined; - /** - * The **`grid-auto-rows`** CSS property specifies the size of an implicitly-created grid row track or pattern of tracks. - * - * **Syntax**: `<track-size>+` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :----------------------: | - * | **57** | **70** | **10.1** | **16** | **10** _(-ms-grid-rows)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows - */ - gridAutoRows?: Property.GridAutoRows<TLength> | undefined; - /** - * The **`grid-column-end`** CSS property specifies a grid item's end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-end - */ - gridColumnEnd?: Property.GridColumnEnd | undefined; - /** - * The **`grid-column-start`** CSS property specifies a grid item's start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-start - */ - gridColumnStart?: Property.GridColumnStart | undefined; - /** - * The **`grid-row-end`** CSS property specifies a grid item's end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-end - */ - gridRowEnd?: Property.GridRowEnd | undefined; - /** - * The **`grid-row-start`** CSS property specifies a grid item's start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-start - */ - gridRowStart?: Property.GridRowStart | undefined; - /** - * The **`grid-template-areas`** CSS property specifies named grid areas, establishing the cells in the grid and assigning them names. - * - * **Syntax**: `none | <string>+` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-areas - */ - gridTemplateAreas?: Property.GridTemplateAreas | undefined; - /** - * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. - * - * **Syntax**: `none | <track-list> | <auto-track-list> | subgrid <line-name-list>?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-------------------------: | - * | **57** | **52** | **10.1** | **16** | **10** _(-ms-grid-columns)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-columns - */ - gridTemplateColumns?: Property.GridTemplateColumns<TLength> | undefined; - /** - * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. - * - * **Syntax**: `none | <track-list> | <auto-track-list> | subgrid <line-name-list>?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :----------------------: | - * | **57** | **52** | **10.1** | **16** | **10** _(-ms-grid-rows)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-rows - */ - gridTemplateRows?: Property.GridTemplateRows<TLength> | undefined; - /** - * The **`hanging-punctuation`** CSS property specifies whether a punctuation mark should hang at the start or end of a line of text. Hanging punctuation may be placed outside the line box. - * - * **Syntax**: `none | [ first || [ force-end | allow-end ] || last ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | No | **10** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation - */ - hangingPunctuation?: Property.HangingPunctuation | undefined; - /** - * The **`height`** CSS property specifies the height of an element. By default, the property defines the height of the content area. If `box-sizing` is set to `border-box`, however, it instead determines the height of the border area. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/height - */ - height?: Property.Height<TLength> | undefined; - /** - * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. - * - * **Syntax**: `auto | <string>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :--: | :-: | - * | **106** | **98** | **17** | n/a | No | - * | 6 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/hyphenate-character - */ - hyphenateCharacter?: Property.HyphenateCharacter | undefined; - /** - * The **`hyphenate-limit-chars`** CSS property specifies the minimum word length to allow hyphenation of words as well as the the minimum number of characters before and after the hyphen. - * - * **Syntax**: `[ auto | <integer> ]{1,3}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **109** | No | No | n/a | No | - */ - hyphenateLimitChars?: Property.HyphenateLimitChars | undefined; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-------: | :----: | :----------: | - * | **55** | **43** | **17** | **79** | **10** _-x-_ | - * | 13 _-x-_ | 6 _-x-_ | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/hyphens - */ - hyphens?: Property.Hyphens | undefined; - /** - * The **`image-orientation`** CSS property specifies a layout-independent correction to the orientation of an image. - * - * **Syntax**: `from-image | <angle> | [ <angle>? flip ]` - * - * **Initial value**: `from-image` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **81** | **26** | **13.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/image-orientation - */ - imageOrientation?: Property.ImageOrientation | undefined; - /** - * The **`image-rendering`** CSS property sets an image scaling algorithm. The property applies to an element itself, to any images set in its other properties, and to its descendants. - * - * **Syntax**: `auto | crisp-edges | pixelated` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **13** | **3.6** | **6** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/image-rendering - */ - imageRendering?: Property.ImageRendering | undefined; - /** - * **Syntax**: `[ from-image || <resolution> ] && snap?` - * - * **Initial value**: `1dppx` - */ - imageResolution?: Property.ImageResolution | undefined; - /** - * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. - * - * **Syntax**: `normal | [ <number> <integer>? ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :---------: | :--: | :-: | - * | **110** | No | **9** _-x-_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/initial-letter - */ - initialLetter?: Property.InitialLetter | undefined; - /** - * The **`inline-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'width'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inline-size - */ - inlineSize?: Property.InlineSize<TLength> | undefined; - /** - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - */ - inputSecurity?: Property.InputSecurity | undefined; - /** - * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-end - */ - insetBlockEnd?: Property.InsetBlockEnd<TLength> | undefined; - /** - * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-start - */ - insetBlockStart?: Property.InsetBlockStart<TLength> | undefined; - /** - * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-end - */ - insetInlineEnd?: Property.InsetInlineEnd<TLength> | undefined; - /** - * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-start - */ - insetInlineStart?: Property.InsetInlineStart<TLength> | undefined; - /** - * The **`isolation`** CSS property determines whether an element must create a new stacking context. - * - * **Syntax**: `auto | isolate` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **41** | **36** | **8** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/isolation - */ - isolation?: Property.Isolation | undefined; - /** - * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. - * - * **Syntax**: `normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-content - */ - justifyContent?: Property.JustifyContent | undefined; - /** - * The CSS **`justify-items`** property defines the default `justify-self` for all items of the box, giving them all a default way of justifying each box along the appropriate axis. - * - * **Syntax**: `normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]` - * - * **Initial value**: `legacy` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **52** | **20** | **9** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-items - */ - justifyItems?: Property.JustifyItems | undefined; - /** - * The CSS **`justify-self`** property sets the way a box is justified inside its alignment container along the appropriate axis. - * - * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :----: | - * | **57** | **45** | **10.1** | **16** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-self - */ - justifySelf?: Property.JustifySelf | undefined; - /** - * The **`justify-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their inline axis. - * - * **Syntax**: `[ normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-tracks - */ - justifyTracks?: Property.JustifyTracks | undefined; - /** - * The **`left`** CSS property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/left - */ - left?: Property.Left<TLength> | undefined; - /** - * The **`letter-spacing`** CSS property sets the horizontal spacing behavior between text characters. This value is added to the natural spacing between characters while rendering the text. Positive values of `letter-spacing` causes characters to spread farther apart, while negative values of `letter-spacing` bring characters closer together. - * - * **Syntax**: `normal | <length>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/letter-spacing - */ - letterSpacing?: Property.LetterSpacing<TLength> | undefined; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :-----: | - * | **58** | **69** | **11** | **14** | **5.5** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/line-break - */ - lineBreak?: Property.LineBreak | undefined; - /** - * The **`line-height`** CSS property sets the height of a line box. It's commonly used to set the distance between lines of text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height. - * - * **Syntax**: `normal | <number> | <length> | <percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/line-height - */ - lineHeight?: Property.LineHeight<TLength> | undefined; - /** - * The **`line-height-step`** CSS property sets the step unit for line box heights. When the property is set, line box heights are rounded up to the closest multiple of the unit. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | n/a | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/line-height-step - */ - lineHeightStep?: Property.LineHeightStep<TLength> | undefined; - /** - * The **`list-style-image`** CSS property sets an image to be used as the list item marker. - * - * **Syntax**: `<image> | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style-image - */ - listStyleImage?: Property.ListStyleImage | undefined; - /** - * The **`list-style-position`** CSS property sets the position of the `::marker` relative to a list item. - * - * **Syntax**: `inside | outside` - * - * **Initial value**: `outside` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style-position - */ - listStylePosition?: Property.ListStylePosition | undefined; - /** - * The **`list-style-type`** CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element. - * - * **Syntax**: `<counter-style> | <string> | none` - * - * **Initial value**: `disc` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style-type - */ - listStyleType?: Property.ListStyleType | undefined; - /** - * The **`margin-block-end`** CSS property defines the logical block end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-end - */ - marginBlockEnd?: Property.MarginBlockEnd<TLength> | undefined; - /** - * The **`margin-block-start`** CSS property defines the logical block start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-start - */ - marginBlockStart?: Property.MarginBlockStart<TLength> | undefined; - /** - * The **`margin-bottom`** CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-bottom - */ - marginBottom?: Property.MarginBottom<TLength> | undefined; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------------------: | :-------------------: | :----------------------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-margin-end)_ | 3 _(-moz-margin-end)_ | 3 _(-webkit-margin-end)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-end - */ - marginInlineEnd?: Property.MarginInlineEnd<TLength> | undefined; - /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------: | :---------------------: | :------------------------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-margin-start)_ | 3 _(-moz-margin-start)_ | 3 _(-webkit-margin-start)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-start - */ - marginInlineStart?: Property.MarginInlineStart<TLength> | undefined; - /** - * The **`margin-left`** CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-left - */ - marginLeft?: Property.MarginLeft<TLength> | undefined; - /** - * The **`margin-right`** CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-right - */ - marginRight?: Property.MarginRight<TLength> | undefined; - /** - * The **`margin-top`** CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-top - */ - marginTop?: Property.MarginTop<TLength> | undefined; - /** - * The `margin-trim` property allows the container to trim the margins of its children where they adjoin the container's edges. - * - * **Syntax**: `none | in-flow | all` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | No | No | **16.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-trim - */ - marginTrim?: Property.MarginTrim | undefined; - /** - * The **`mask-border-mode`** CSS property specifies the blending mode used in a mask border. - * - * **Syntax**: `luminance | alpha` - * - * **Initial value**: `alpha` - */ - maskBorderMode?: Property.MaskBorderMode | undefined; - /** - * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. - * - * **Syntax**: `[ <length> | <number> ]{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-outset)_ | No | **17.2** | n/a | No | - * | | | 3.1 _(-webkit-mask-box-image-outset)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-outset - */ - maskBorderOutset?: Property.MaskBorderOutset<TLength> | undefined; - /** - * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. - * - * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` - * - * **Initial value**: `stretch` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-repeat)_ | No | **17.2** | n/a | No | - * | | | 3.1 _(-webkit-mask-box-image-repeat)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat - */ - maskBorderRepeat?: Property.MaskBorderRepeat | undefined; - /** - * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. - * - * **Syntax**: `<number-percentage>{1,4} fill?` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------------: | :-----: | :----------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-slice)_ | No | **17.2** | n/a | No | - * | | | 3.1 _(-webkit-mask-box-image-slice)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-slice - */ - maskBorderSlice?: Property.MaskBorderSlice | undefined; - /** - * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. - * - * **Syntax**: `none | <image>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-source)_ | No | **17.2** | n/a | No | - * | | | 3.1 _(-webkit-mask-box-image-source)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-source - */ - maskBorderSource?: Property.MaskBorderSource | undefined; - /** - * The **`mask-border-width`** CSS property sets the width of an element's mask border. - * - * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------------: | :-----: | :----------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-width)_ | No | **17.2** | n/a | No | - * | | | 3.1 _(-webkit-mask-box-image-width)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-width - */ - maskBorderWidth?: Property.MaskBorderWidth<TLength> | undefined; - /** - * The **`mask-clip`** CSS property determines the area which is affected by a mask. The painted content of an element must be restricted to this area. - * - * **Syntax**: `[ <geometry-box> | no-clip ]#` - * - * **Initial value**: `border-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **120** | **53** | **15.4** | n/a | No | - * | 1 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-clip - */ - maskClip?: Property.MaskClip | undefined; - /** - * The **`mask-composite`** CSS property represents a compositing operation used on the current mask layer with the mask layers below it. - * - * **Syntax**: `<compositing-operator>#` - * - * **Initial value**: `add` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :---: | :-: | - * | **120** | **53** | **15.4** | 18-79 | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-composite - */ - maskComposite?: Property.MaskComposite | undefined; - /** - * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. By default this means the alpha channel of the mask image will be multiplied with the alpha channel of the element. This can be controlled with the `mask-mode` property. - * - * **Syntax**: `<mask-reference>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :---: | :-: | - * | **120** | **53** | **15.4** | 16-79 | No | - * | 1 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-image - */ - maskImage?: Property.MaskImage | undefined; - /** - * The **`mask-mode`** CSS property sets whether the mask reference defined by `mask-image` is treated as a luminance or alpha mask. - * - * **Syntax**: `<masking-mode>#` - * - * **Initial value**: `match-source` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **120** | **53** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-mode - */ - maskMode?: Property.MaskMode | undefined; - /** - * The **`mask-origin`** CSS property sets the origin of a mask. - * - * **Syntax**: `<geometry-box>#` - * - * **Initial value**: `border-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **120** | **53** | **15.4** | n/a | No | - * | 1 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-origin - */ - maskOrigin?: Property.MaskOrigin | undefined; - /** - * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. - * - * **Syntax**: `<position>#` - * - * **Initial value**: `center` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :---: | :-: | - * | **120** | **53** | **15.4** | 18-79 | No | - * | 1 _-x-_ | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-position - */ - maskPosition?: Property.MaskPosition<TLength> | undefined; - /** - * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. - * - * **Syntax**: `<repeat-style>#` - * - * **Initial value**: `repeat` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :---: | :-: | - * | **120** | **53** | **15.4** | 18-79 | No | - * | 1 _-x-_ | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-repeat - */ - maskRepeat?: Property.MaskRepeat | undefined; - /** - * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :---: | :-: | - * | **120** | **53** | **15.4** | 18-79 | No | - * | 4 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-size - */ - maskSize?: Property.MaskSize<TLength> | undefined; - /** - * The **`mask-type`** CSS property sets whether an SVG `<mask>` element is used as a _luminance_ or an _alpha_ mask. It applies to the `<mask>` element itself. - * - * **Syntax**: `luminance | alpha` - * - * **Initial value**: `luminance` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **24** | **35** | **7** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-type - */ - maskType?: Property.MaskType | undefined; - /** - * This feature is not Baseline because it does not work in some of the most widely-used browsers. - * - * **Syntax**: `[ pack | next ] || [ definite-first | ordered ]` - * - * **Initial value**: `pack` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------: | :--: | :-: | - * | No | No | **preview** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/masonry-auto-flow - */ - masonryAutoFlow?: Property.MasonryAutoFlow | undefined; - /** - * The **`math-depth`** property describes a notion of _depth_ for each element of a mathematical formula, with respect to the top-level container of that formula. Concretely, this is used to determine the computed value of the font-size property when its specified value is `math`. - * - * **Syntax**: `auto-add | add(<integer>) | <integer>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **109** | **117** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/math-depth - */ - mathDepth?: Property.MathDepth | undefined; - /** - * The `math-shift` property indicates whether superscripts inside MathML formulas should be raised by a normal or compact shift. - * - * **Syntax**: `normal | compact` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **109** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/math-shift - */ - mathShift?: Property.MathShift | undefined; - /** - * The `math-style` property indicates whether MathML equations should render with normal or compact height. - * - * **Syntax**: `normal | compact` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **109** | **117** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/math-style - */ - mathStyle?: Property.MathStyle | undefined; - /** - * The **`max-block-size`** CSS property specifies the maximum size of an element in the direction opposite that of the writing direction as specified by `writing-mode`. That is, if the writing direction is horizontal, then `max-block-size` is equivalent to `max-height`; if the writing direction is vertical, `max-block-size` is the same as `max-width`. - * - * **Syntax**: `<'max-width'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-block-size - */ - maxBlockSize?: Property.MaxBlockSize<TLength> | undefined; - /** - * The **`max-height`** CSS property sets the maximum height of an element. It prevents the used value of the `height` property from becoming larger than the value specified for `max-height`. - * - * **Syntax**: `none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **18** | **1** | **1.3** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-height - */ - maxHeight?: Property.MaxHeight<TLength> | undefined; - /** - * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block, depending on its writing mode. It corresponds to either the `max-width` or the `max-height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'max-width'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :--------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * | | | 10.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-inline-size - */ - maxInlineSize?: Property.MaxInlineSize<TLength> | undefined; - /** - * **Syntax**: `none | <integer>` - * - * **Initial value**: `none` - */ - maxLines?: Property.MaxLines | undefined; - /** - * The **`max-width`** CSS property sets the maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified by `max-width`. - * - * **Syntax**: `none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-width - */ - maxWidth?: Property.MaxWidth<TLength> | undefined; - /** - * The **`min-block-size`** CSS property defines the minimum horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'min-width'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-block-size - */ - minBlockSize?: Property.MinBlockSize<TLength> | undefined; - /** - * The **`min-height`** CSS property sets the minimum height of an element. It prevents the used value of the `height` property from becoming smaller than the value specified for `min-height`. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **3** | **1.3** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-height - */ - minHeight?: Property.MinHeight<TLength> | undefined; - /** - * The **`min-inline-size`** CSS property defines the horizontal or vertical minimal size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'min-width'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-inline-size - */ - minInlineSize?: Property.MinInlineSize<TLength> | undefined; - /** - * The **`min-width`** CSS property sets the minimum width of an element. It prevents the used value of the `width` property from becoming smaller than the value specified for `min-width`. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-width - */ - minWidth?: Property.MinWidth<TLength> | undefined; - /** - * The **`mix-blend-mode`** CSS property sets how an element's content should blend with the content of the element's parent and the element's background. - * - * **Syntax**: `<blend-mode> | plus-lighter` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **41** | **32** | **8** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode - */ - mixBlendMode?: Property.MixBlendMode | undefined; - /** - * The **`offset-distance`** CSS property specifies a position along an `offset-path` for an element to be placed. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | **16** | n/a | No | - * | 46 _(motion-distance)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance - */ - motionDistance?: Property.OffsetDistance<TLength> | undefined; - /** - * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. - * - * **Syntax**: `none | <offset-path> || <coord-box>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------------: | :-----: | :------: | :--: | :-: | - * | **55** | **72** | **15.4** | n/a | No | - * | 46 _(motion-path)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-path - */ - motionPath?: Property.OffsetPath | undefined; - /** - * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. - * - * **Syntax**: `[ auto | reverse ] || <angle>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | **16** | n/a | No | - * | 46 _(motion-rotation)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate - */ - motionRotation?: Property.OffsetRotate | undefined; - /** - * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. - * - * **Syntax**: `fill | contain | cover | none | scale-down` - * - * **Initial value**: `fill` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **32** | **36** | **10** | **79** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/object-fit - */ - objectFit?: Property.ObjectFit | undefined; - /** - * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **32** | **36** | **10** | **79** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/object-position - */ - objectPosition?: Property.ObjectPosition<TLength> | undefined; - /** - * **Syntax**: `auto | <position>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **116** | **72** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-anchor - */ - offsetAnchor?: Property.OffsetAnchor<TLength> | undefined; - /** - * The **`offset-distance`** CSS property specifies a position along an `offset-path` for an element to be placed. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | **16** | n/a | No | - * | 46 _(motion-distance)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance - */ - offsetDistance?: Property.OffsetDistance<TLength> | undefined; - /** - * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. - * - * **Syntax**: `none | <offset-path> || <coord-box>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------------: | :-----: | :------: | :--: | :-: | - * | **55** | **72** | **15.4** | n/a | No | - * | 46 _(motion-path)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-path - */ - offsetPath?: Property.OffsetPath | undefined; - /** - * **Syntax**: `normal | auto | <position>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **116** | n/a | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-position - */ - offsetPosition?: Property.OffsetPosition<TLength> | undefined; - /** - * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. - * - * **Syntax**: `[ auto | reverse ] || <angle>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | **16** | n/a | No | - * | 46 _(motion-rotation)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate - */ - offsetRotate?: Property.OffsetRotate | undefined; - /** - * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. - * - * **Syntax**: `[ auto | reverse ] || <angle>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | **16** | n/a | No | - * | 46 _(motion-rotation)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate - */ - offsetRotation?: Property.OffsetRotate | undefined; - /** - * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **2** | **12** | **9** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/opacity - */ - opacity?: Property.Opacity | undefined; - /** - * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :------: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/order - */ - order?: Property.Order | undefined; - /** - * The **`orphans`** CSS property sets the minimum number of lines in a block container that must be shown at the _bottom_ of a page, region, or column. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `2` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **25** | No | **1.3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/orphans - */ - orphans?: Property.Orphans | undefined; - /** - * The **`outline-color`** CSS property sets the color of an element's outline. - * - * **Syntax**: `<color> | invert` - * - * **Initial value**: `invert`, for browsers supporting it, `currentColor` for the other - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-color - */ - outlineColor?: Property.OutlineColor | undefined; - /** - * The **`outline-offset`** CSS property sets the amount of space between an outline and the edge or border of an element. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :-: | - * | **1** | **1.5** | **1.2** | **15** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-offset - */ - outlineOffset?: Property.OutlineOffset<TLength> | undefined; - /** - * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `auto | <'border-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-style - */ - outlineStyle?: Property.OutlineStyle | undefined; - /** - * The CSS **`outline-width`** property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-width - */ - outlineWidth?: Property.OutlineWidth<TLength> | undefined; - /** - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **56** | **66** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-anchor - */ - overflowAnchor?: Property.OverflowAnchor | undefined; - /** - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **69** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-block - */ - overflowBlock?: Property.OverflowBlock | undefined; - /** - * The **`overflow-clip-box`** CSS property specifies relative to which box the clipping happens when there is an overflow. It is short hand for the `overflow-clip-box-inline` and `overflow-clip-box-block` properties. - * - * **Syntax**: `padding-box | content-box` - * - * **Initial value**: `padding-box` - */ - overflowClipBox?: Property.OverflowClipBox | undefined; - /** - * **Syntax**: `<visual-box> || <length [0,∞]>` - * - * **Initial value**: `0px` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **90** | **102** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin - */ - overflowClipMargin?: Property.OverflowClipMargin<TLength> | undefined; - /** - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **69** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-inline - */ - overflowInline?: Property.OverflowInline | undefined; - /** - * The **`overflow-wrap`** CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box. - * - * **Syntax**: `normal | break-word | anywhere` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------: | :---------------: | :-------------: | :--------------: | :-------------------: | - * | **23** | **49** | **7** | **18** | **5.5** _(word-wrap)_ | - * | 1 _(word-wrap)_ | 3.5 _(word-wrap)_ | 1 _(word-wrap)_ | 12 _(word-wrap)_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-wrap - */ - overflowWrap?: Property.OverflowWrap | undefined; - /** - * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **3.5** | **3** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-x - */ - overflowX?: Property.OverflowX | undefined; - /** - * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **3.5** | **3** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-y - */ - overflowY?: Property.OverflowY | undefined; - /** - * The **`overlay`** CSS property specifies whether an element appearing in the top layer (for example, a shown popover or modal `<dialog>` element) is actually rendered in the top layer. This property is only relevant within a list of `transition-property` values, and only if `allow-discrete` is set as the `transition-behavior`. - * - * **Syntax**: `none | auto` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **117** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overlay - */ - overlay?: Property.Overlay | undefined; - /** - * The **`overscroll-behavior-block`** CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **77** | **73** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block - */ - overscrollBehaviorBlock?: Property.OverscrollBehaviorBlock | undefined; - /** - * The **`overscroll-behavior-inline`** CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **77** | **73** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline - */ - overscrollBehaviorInline?: Property.OverscrollBehaviorInline | undefined; - /** - * The **`overscroll-behavior-x`** CSS property sets the browser's behavior when the horizontal boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **63** | **59** | **16** | **18** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x - */ - overscrollBehaviorX?: Property.OverscrollBehaviorX | undefined; - /** - * The **`overscroll-behavior-y`** CSS property sets the browser's behavior when the vertical boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **63** | **59** | **16** | **18** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y - */ - overscrollBehaviorY?: Property.OverscrollBehaviorY | undefined; - /** - * The **`padding-block-end`** CSS property defines the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-end - */ - paddingBlockEnd?: Property.PaddingBlockEnd<TLength> | undefined; - /** - * The **`padding-block-start`** CSS property defines the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-start - */ - paddingBlockStart?: Property.PaddingBlockStart<TLength> | undefined; - /** - * The **`padding-bottom`** CSS property sets the height of the padding area on the bottom of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-bottom - */ - paddingBottom?: Property.PaddingBottom<TLength> | undefined; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----------------------: | :--------------------: | :-----------------------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-padding-end)_ | 3 _(-moz-padding-end)_ | 3 _(-webkit-padding-end)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-end - */ - paddingInlineEnd?: Property.PaddingInlineEnd<TLength> | undefined; - /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------: | :----------------------: | :-------------------------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-padding-start)_ | 3 _(-moz-padding-start)_ | 3 _(-webkit-padding-start)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-start - */ - paddingInlineStart?: Property.PaddingInlineStart<TLength> | undefined; - /** - * The **`padding-left`** CSS property sets the width of the padding area to the left of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-left - */ - paddingLeft?: Property.PaddingLeft<TLength> | undefined; - /** - * The **`padding-right`** CSS property sets the width of the padding area on the right of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-right - */ - paddingRight?: Property.PaddingRight<TLength> | undefined; - /** - * The **`padding-top`** CSS property sets the height of the padding area on the top of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-top - */ - paddingTop?: Property.PaddingTop<TLength> | undefined; - /** - * The **`page`** CSS property is used to specify the named page, a specific type of page defined by the `@page` at-rule. - * - * **Syntax**: `auto | <custom-ident>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-------: | :--: | :-: | - * | **85** | **110** | **≤13.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page - */ - page?: Property.Page | undefined; - /** - * The **`page-break-after`** CSS property adjusts page breaks _after_ the current element. - * - * **Syntax**: `auto | always | avoid | left | right | recto | verso` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page-break-after - */ - pageBreakAfter?: Property.PageBreakAfter | undefined; - /** - * The **`page-break-before`** CSS property adjusts page breaks _before_ the current element. - * - * **Syntax**: `auto | always | avoid | left | right | recto | verso` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page-break-before - */ - pageBreakBefore?: Property.PageBreakBefore | undefined; - /** - * The **`page-break-inside`** CSS property adjusts page breaks _inside_ the current element. - * - * **Syntax**: `auto | avoid` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **19** | **1.3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page-break-inside - */ - pageBreakInside?: Property.PageBreakInside | undefined; - /** - * The **`paint-order`** CSS property lets you control the order in which the fill and stroke (and painting markers) of text content and shapes are drawn. - * - * **Syntax**: `normal | [ fill || stroke || markers ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **35** | **60** | **8** | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/paint-order - */ - paintOrder?: Property.PaintOrder | undefined; - /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 12 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/perspective - */ - perspective?: Property.Perspective<TLength> | undefined; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 12 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/perspective-origin - */ - perspectiveOrigin?: Property.PerspectiveOrigin<TLength> | undefined; - /** - * The **`pointer-events`** CSS property sets under what circumstances (if any) a particular graphic element can become the target of pointer events. - * - * **Syntax**: `auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **1** | **1.5** | **4** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/pointer-events - */ - pointerEvents?: Property.PointerEvents | undefined; - /** - * The **`position`** CSS property sets how an element is positioned in a document. The `top`, `right`, `bottom`, and `left` properties determine the final location of positioned elements. - * - * **Syntax**: `static | relative | absolute | sticky | fixed` - * - * **Initial value**: `static` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/position - */ - position?: Property.Position | undefined; - /** - * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. - * - * **Syntax**: `economy | exact` - * - * **Initial value**: `economy` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------: | :-----------------: | :------: | :----------: | :-: | - * | **17** _-x-_ | **97** | **15.4** | **79** _-x-_ | No | - * | | 48 _(color-adjust)_ | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust - */ - printColorAdjust?: Property.PrintColorAdjust | undefined; - /** - * The **`quotes`** CSS property sets how the browser should render quotation marks that are added using the `open-quotes` or `close-quotes` values of the CSS `content` property. - * - * **Syntax**: `none | auto | [ <string> <string> ]+` - * - * **Initial value**: depends on user agent - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **11** | **1.5** | **9** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/quotes - */ - quotes?: Property.Quotes | undefined; - /** - * The **`resize`** CSS property sets whether an element is resizable, and if so, in which directions. - * - * **Syntax**: `none | both | horizontal | vertical | block | inline` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **1** | **4** | **3** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/resize - */ - resize?: Property.Resize | undefined; - /** - * The **`right`** CSS property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/right - */ - right?: Property.Right<TLength> | undefined; - /** - * The **`rotate`** CSS property allows you to specify rotation transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` property. - * - * **Syntax**: `none | <angle> | [ x | y | z | <number>{3} ] && <angle>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **104** | **72** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/rotate - */ - rotate?: Property.Rotate | undefined; - /** - * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows. - * - * **Syntax**: `normal | <length-percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **47** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/row-gap - */ - rowGap?: Property.RowGap<TLength> | undefined; - /** - * The **`ruby-align`** CSS property defines the distribution of the different ruby elements over the base. - * - * **Syntax**: `start | center | space-between | space-around` - * - * **Initial value**: `space-around` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **38** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/ruby-align - */ - rubyAlign?: Property.RubyAlign | undefined; - /** - * **Syntax**: `separate | collapse | auto` - * - * **Initial value**: `separate` - */ - rubyMerge?: Property.RubyMerge | undefined; - /** - * The **`ruby-position`** CSS property defines the position of a ruby element relatives to its base element. It can be positioned over the element (`over`), under it (`under`), or between the characters on their right side (`inter-character`). - * - * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` - * - * **Initial value**: `alternate` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :---------: | :---: | :-: | - * | **84** | **38** | **7** _-x-_ | 12-79 | No | - * | 1 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/ruby-position - */ - rubyPosition?: Property.RubyPosition | undefined; - /** - * The **`scale`** CSS property allows you to specify scale transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. - * - * **Syntax**: `none | <number>{1,3}` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **104** | **72** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scale - */ - scale?: Property.Scale | undefined; - /** - * The **`scroll-behavior`** CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs. - * - * **Syntax**: `auto | smooth` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **61** | **36** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-behavior - */ - scrollBehavior?: Property.ScrollBehavior | undefined; - /** - * The `scroll-margin-block-end` property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end - */ - scrollMarginBlockEnd?: Property.ScrollMarginBlockEnd<TLength> | undefined; - /** - * The `scroll-margin-block-start` property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start - */ - scrollMarginBlockStart?: Property.ScrollMarginBlockStart<TLength> | undefined; - /** - * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-bottom)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom - */ - scrollMarginBottom?: Property.ScrollMarginBottom<TLength> | undefined; - /** - * The `scroll-margin-inline-end` property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end - */ - scrollMarginInlineEnd?: Property.ScrollMarginInlineEnd<TLength> | undefined; - /** - * The `scroll-margin-inline-start` property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start - */ - scrollMarginInlineStart?: Property.ScrollMarginInlineStart<TLength> | undefined; - /** - * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-left)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left - */ - scrollMarginLeft?: Property.ScrollMarginLeft<TLength> | undefined; - /** - * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-right)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right - */ - scrollMarginRight?: Property.ScrollMarginRight<TLength> | undefined; - /** - * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-top)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top - */ - scrollMarginTop?: Property.ScrollMarginTop<TLength> | undefined; - /** - * The `scroll-padding-block-end` property defines offsets for the end edge in the block dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end - */ - scrollPaddingBlockEnd?: Property.ScrollPaddingBlockEnd<TLength> | undefined; - /** - * The `scroll-padding-block-start` property defines offsets for the start edge in the block dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start - */ - scrollPaddingBlockStart?: Property.ScrollPaddingBlockStart<TLength> | undefined; - /** - * The `scroll-padding-bottom` property defines offsets for the bottom of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom - */ - scrollPaddingBottom?: Property.ScrollPaddingBottom<TLength> | undefined; - /** - * The `scroll-padding-inline-end` property defines offsets for the end edge in the inline dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end - */ - scrollPaddingInlineEnd?: Property.ScrollPaddingInlineEnd<TLength> | undefined; - /** - * The `scroll-padding-inline-start` property defines offsets for the start edge in the inline dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start - */ - scrollPaddingInlineStart?: Property.ScrollPaddingInlineStart<TLength> | undefined; - /** - * The `scroll-padding-left` property defines offsets for the left of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left - */ - scrollPaddingLeft?: Property.ScrollPaddingLeft<TLength> | undefined; - /** - * The `scroll-padding-right` property defines offsets for the right of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right - */ - scrollPaddingRight?: Property.ScrollPaddingRight<TLength> | undefined; - /** - * The **`scroll-padding-top`** property defines offsets for the top of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top - */ - scrollPaddingTop?: Property.ScrollPaddingTop<TLength> | undefined; - /** - * The `scroll-snap-align` property specifies the box's snap position as an alignment of its snap area (as the alignment subject) within its snap container's snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value. - * - * **Syntax**: `[ none | start | end | center ]{1,2}` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align - */ - scrollSnapAlign?: Property.ScrollSnapAlign | undefined; - /** - * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-bottom)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom - */ - scrollSnapMarginBottom?: Property.ScrollMarginBottom<TLength> | undefined; - /** - * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-left)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left - */ - scrollSnapMarginLeft?: Property.ScrollMarginLeft<TLength> | undefined; - /** - * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-right)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right - */ - scrollSnapMarginRight?: Property.ScrollMarginRight<TLength> | undefined; - /** - * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-top)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top - */ - scrollSnapMarginTop?: Property.ScrollMarginTop<TLength> | undefined; - /** - * The **`scroll-snap-stop`** CSS property defines whether or not the scroll container is allowed to "pass over" possible snap positions. - * - * **Syntax**: `normal | always` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **75** | **103** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop - */ - scrollSnapStop?: Property.ScrollSnapStop | undefined; - /** - * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. - * - * **Syntax**: `none | [ x | y | block | inline | both ] [ mandatory | proximity ]?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----------: | - * | **69** | 39-68 | **11** | **79** | **10** _-x-_ | - * | | | 9 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type - */ - scrollSnapType?: Property.ScrollSnapType | undefined; - /** - * The **`scroll-timeline-axis`** CSS property can be used to specify the scrollbar that will be used to provide the timeline for a scroll-timeline animation. - * - * **Syntax**: `[ block | inline | x | y ]#` - * - * **Initial value**: `block` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-axis - */ - scrollTimelineAxis?: Property.ScrollTimelineAxis | undefined; - /** - * The **`scroll-timeline-name`** CSS property defines a name that can be used to identify an element as the source of a scroll timeline for an animation. - * - * **Syntax**: `none | <dashed-ident>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-name - */ - scrollTimelineName?: Property.ScrollTimelineName | undefined; - /** - * The **`scrollbar-color`** CSS property sets the color of the scrollbar track and thumb. - * - * **Syntax**: `auto | <color>{2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **121** | **64** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-color - */ - scrollbarColor?: Property.ScrollbarColor | undefined; - /** - * The **`scrollbar-gutter`** CSS property allows authors to reserve space for the scrollbar, preventing unwanted layout changes as the content grows while also avoiding unnecessary visuals when scrolling isn't needed. - * - * **Syntax**: `auto | stable && both-edges?` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **94** | **97** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter - */ - scrollbarGutter?: Property.ScrollbarGutter | undefined; - /** - * The **`scrollbar-width`** property allows the author to set the maximum thickness of an element's scrollbars when they are shown. - * - * **Syntax**: `auto | thin | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **121** | **64** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-width - */ - scrollbarWidth?: Property.ScrollbarWidth | undefined; - /** - * The **`shape-image-threshold`** CSS property sets the alpha channel threshold used to extract the shape using an image as the value for `shape-outside`. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `0.0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **37** | **62** | **10.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold - */ - shapeImageThreshold?: Property.ShapeImageThreshold | undefined; - /** - * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **37** | **62** | **10.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/shape-margin - */ - shapeMargin?: Property.ShapeMargin<TLength> | undefined; - /** - * The **`shape-outside`** CSS property defines a shape—which may be non-rectangular—around which adjacent inline content should wrap. By default, inline content wraps around its margin box; `shape-outside` provides a way to customize this wrapping, making it possible to wrap text around complex objects rather than simple boxes. - * - * **Syntax**: `none | [ <shape-box> || <basic-shape> ] | <image>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **37** | **62** | **10.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/shape-outside - */ - shapeOutside?: Property.ShapeOutside | undefined; - /** - * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **21** | **91** | **7** | n/a | No | - * | | 4 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/tab-size - */ - tabSize?: Property.TabSize<TLength> | undefined; - /** - * The **`table-layout`** CSS property sets the algorithm used to lay out `<table>` cells, rows, and columns. - * - * **Syntax**: `auto | fixed` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **14** | **1** | **1** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/table-layout - */ - tableLayout?: Property.TableLayout | undefined; - /** - * The **`text-align`** CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box. This means it works like `vertical-align` but in the horizontal direction. - * - * **Syntax**: `start | end | left | right | center | justify | match-parent` - * - * **Initial value**: `start`, or a nameless value that acts as `left` if _direction_ is `ltr`, `right` if _direction_ is `rtl` if `start` is not supported by the browser. - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-align - */ - textAlign?: Property.TextAlign | undefined; - /** - * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. - * - * **Syntax**: `auto | start | end | left | right | center | justify` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **47** | **49** | **16** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-align-last - */ - textAlignLast?: Property.TextAlignLast | undefined; - /** - * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. - * - * **Syntax**: `none | all | [ digits <integer>? ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------: | :-----: | :--------------------------: | :----: | :------------------------------------: | - * | **48** | **48** | **15.4** | **79** | **11** _(-ms-text-combine-horizontal)_ | - * | 9 _(-webkit-text-combine)_ | | 5.1 _(-webkit-text-combine)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-combine-upright - */ - textCombineUpright?: Property.TextCombineUpright | undefined; - /** - * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **36** | **12.1** | n/a | No | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-color - */ - textDecorationColor?: Property.TextDecorationColor | undefined; - /** - * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. - * - * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **36** | **12.1** | n/a | No | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-line - */ - textDecorationLine?: Property.TextDecorationLine | undefined; - /** - * The **`text-decoration-skip`** CSS property sets what parts of an element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. - * - * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` - * - * **Initial value**: `objects` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | 57-64 | No | **12.1** | n/a | No | - * | | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip - */ - textDecorationSkip?: Property.TextDecorationSkip | undefined; - /** - * The **`text-decoration-skip-ink`** CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders. - * - * **Syntax**: `auto | all | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **64** | **70** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink - */ - textDecorationSkipInk?: Property.TextDecorationSkipInk | undefined; - /** - * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. - * - * **Syntax**: `solid | double | dotted | dashed | wavy` - * - * **Initial value**: `solid` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **36** | **12.1** | n/a | No | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-style - */ - textDecorationStyle?: Property.TextDecorationStyle | undefined; - /** - * The **`text-decoration-thickness`** CSS property sets the stroke thickness of the decoration line that is used on text in an element, such as a line-through, underline, or overline. - * - * **Syntax**: `auto | from-font | <length> | <percentage> ` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **89** | **70** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness - */ - textDecorationThickness?: Property.TextDecorationThickness<TLength> | undefined; - /** - * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color - */ - textEmphasisColor?: Property.TextEmphasisColor | undefined; - /** - * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. - * - * **Syntax**: `[ over | under ] && [ right | left ]` - * - * **Initial value**: `over right` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position - */ - textEmphasisPosition?: Property.TextEmphasisPosition | undefined; - /** - * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. - * - * **Syntax**: `none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style - */ - textEmphasisStyle?: Property.TextEmphasisStyle | undefined; - /** - * The **`text-indent`** CSS property sets the length of empty space (indentation) that is put before lines of text in a block. - * - * **Syntax**: `<length-percentage> && hanging? && each-line?` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-indent - */ - textIndent?: Property.TextIndent<TLength> | undefined; - /** - * The **`text-justify`** CSS property sets what type of justification should be applied to text when `text-align``: justify;` is set on an element. - * - * **Syntax**: `auto | inter-character | inter-word | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :---: | :----: | - * | n/a | **55** | No | 12-79 | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-justify - */ - textJustify?: Property.TextJustify | undefined; - /** - * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. - * - * **Syntax**: `mixed | upright | sideways` - * - * **Initial value**: `mixed` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-------: | :--: | :-: | - * | **48** | **41** | **14** | n/a | No | - * | 11 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-orientation - */ - textOrientation?: Property.TextOrientation | undefined; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **7** | **1.3** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-overflow - */ - textOverflow?: Property.TextOverflow | undefined; - /** - * The **`text-rendering`** CSS property provides information to the rendering engine about what to optimize for when rendering text. - * - * **Syntax**: `auto | optimizeSpeed | optimizeLegibility | geometricPrecision` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **4** | **1** | **5** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-rendering - */ - textRendering?: Property.TextRendering | undefined; - /** - * The **`text-shadow`** CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its `decorations`. Each shadow is described by some combination of X and Y offsets from the element, blur radius, and color. - * - * **Syntax**: `none | <shadow-t>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----: | - * | **2** | **3.5** | **1.1** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-shadow - */ - textShadow?: Property.TextShadow | undefined; - /** - * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. - * - * **Syntax**: `none | auto | <percentage>` - * - * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **54** | No | No | **79** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-size-adjust - */ - textSizeAdjust?: Property.TextSizeAdjust | undefined; - /** - * The **`text-transform`** CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby. - * - * **Syntax**: `none | capitalize | uppercase | lowercase | full-width | full-size-kana` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-transform - */ - textTransform?: Property.TextTransform | undefined; - /** - * The **`text-underline-offset`** CSS property sets the offset distance of an underline text decoration line (applied using `text-decoration`) from its original position. - * - * **Syntax**: `auto | <length> | <percentage> ` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **70** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-offset - */ - textUnderlineOffset?: Property.TextUnderlineOffset<TLength> | undefined; - /** - * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. - * - * **Syntax**: `auto | from-font | [ under || [ left | right ] ]` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :---: | - * | **33** | **74** | **12.1** | **12** | **6** | - * | | | 9 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-position - */ - textUnderlinePosition?: Property.TextUnderlinePosition | undefined; - /** - * The **`text-wrap`** CSS property controls how text inside an element is wrapped. The different values provide: - * - * **Syntax**: `wrap | nowrap | balance | stable | pretty` - * - * **Initial value**: `wrap` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **114** | **121** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-wrap - */ - textWrap?: Property.TextWrap | undefined; - /** - * The **`timeline-scope`** CSS property modifies the scope of a named animation timeline. - * - * **Syntax**: `none | <dashed-ident>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **116** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/timeline-scope - */ - timelineScope?: Property.TimelineScope | undefined; - /** - * The **`top`** CSS property participates in specifying the vertical position of a positioned element. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/top - */ - top?: Property.Top<TLength> | undefined; - /** - * The **`touch-action`** CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). - * - * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :------: | - * | **36** | **52** | **13** | **12** | **11** | - * | | | | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/touch-action - */ - touchAction?: Property.TouchAction | undefined; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :-----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3.1 _-x-_ | | 9 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform - */ - transform?: Property.Transform | undefined; - /** - * The **`transform-box`** CSS property defines the layout box to which the `transform`, individual transform properties `translate`,`scale`, and `rotate`, and `transform-origin` properties relate. - * - * **Syntax**: `content-box | border-box | fill-box | stroke-box | view-box` - * - * **Initial value**: `view-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **64** | **55** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform-box - */ - transformBox?: Property.TransformBox | undefined; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :-----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 2 _-x-_ | | 9 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform-origin - */ - transformOrigin?: Property.TransformOrigin<TLength> | undefined; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :-: | - * | **36** | **16** | **9** | **12** | No | - * | 12 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform-style - */ - transformStyle?: Property.TransformStyle | undefined; - /** - * The **`transition-behavior`** CSS property specifies whether transitions will be started for properties whose animation behavior is discrete. - * - * **Syntax**: `<transition-behavior-value>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **117** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-behavior - */ - transitionBehavior?: Property.TransitionBehavior | undefined; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-delay - */ - transitionDelay?: Property.TransitionDelay<TTime> | undefined; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-duration - */ - transitionDuration?: Property.TransitionDuration<TTime> | undefined; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-property - */ - transitionProperty?: Property.TransitionProperty | undefined; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-timing-function - */ - transitionTimingFunction?: Property.TransitionTimingFunction | undefined; - /** - * The **`translate`** CSS property allows you to specify translation transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. - * - * **Syntax**: `none | <length-percentage> [ <length-percentage> <length>? ]?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **104** | **72** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/translate - */ - translate?: Property.Translate<TLength> | undefined; - /** - * The **`unicode-bidi`** CSS property, together with the `direction` property, determines how bidirectional text in a document is handled. For example, if a block of content contains both left-to-right and right-to-left text, the user-agent uses a complex Unicode algorithm to decide how to display the text. The `unicode-bidi` property overrides this algorithm and allows the developer to control the text embedding. - * - * **Syntax**: `normal | embed | isolate | bidi-override | isolate-override | plaintext` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :-----: | - * | **2** | **1** | **1.3** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/unicode-bidi - */ - unicodeBidi?: Property.UnicodeBidi | undefined; - /** - * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :---------: | :------: | :----------: | - * | **54** | **69** | **3** _-x-_ | **79** | **10** _-x-_ | - * | 1 _-x-_ | 1 _-x-_ | | 12 _-x-_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/user-select - */ - userSelect?: Property.UserSelect | undefined; - /** - * The **`vertical-align`** CSS property sets vertical alignment of an inline, inline-block or table-cell box. - * - * **Syntax**: `baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>` - * - * **Initial value**: `baseline` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/vertical-align - */ - verticalAlign?: Property.VerticalAlign<TLength> | undefined; - /** - * The **`view-timeline-axis`** CSS property is used to specify the scrollbar direction that will be used to provide the timeline for a _named view progress timeline_ animation, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline-axis` is set on the subject. See CSS scroll-driven animations for more details. - * - * **Syntax**: `[ block | inline | x | y ]#` - * - * **Initial value**: `block` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-axis - */ - viewTimelineAxis?: Property.ViewTimelineAxis | undefined; - /** - * The **`view-timeline-inset`** CSS property is used to specify one or two values representing an adjustment to the position of the scrollport (see Scroll container for more details) in which the subject element of a _named view progress timeline_ animation is deemed to be visible. Put another way, this allows you to specify start and/or end inset (or outset) values that offset the position of the timeline. - * - * **Syntax**: `[ [ auto | <length-percentage> ]{1,2} ]#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-inset - */ - viewTimelineInset?: Property.ViewTimelineInset<TLength> | undefined; - /** - * The **`view-timeline-name`** CSS property is used to define the name of a _named view progress timeline_, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline` is set on the subject. - * - * **Syntax**: `none | <dashed-ident>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-name - */ - viewTimelineName?: Property.ViewTimelineName | undefined; - /** - * The **`view-transition-name`** CSS property provides the selected element with a distinct identifying name (a `<custom-ident>`) and causes it to participate in a separate view transition from the root view transition — or no view transition if the `none` value is specified. - * - * **Syntax**: `none | <custom-ident>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **111** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/view-transition-name - */ - viewTransitionName?: Property.ViewTransitionName | undefined; - /** - * The **`visibility`** CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or columns in a `<table>`. - * - * **Syntax**: `visible | hidden | collapse` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/visibility - */ - visibility?: Property.Visibility | undefined; - /** - * The **`white-space`** CSS property sets how white space inside an element is handled. - * - * **Syntax**: `normal | pre | nowrap | pre-wrap | pre-line | break-spaces | [ <'white-space-collapse'> || <'text-wrap'> || <'white-space-trim'> ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/white-space - */ - whiteSpace?: Property.WhiteSpace | undefined; - /** - * The **`white-space-collapse`** CSS property controls how white space inside an element is collapsed. - * - * **Syntax**: `collapse | discard | preserve | preserve-breaks | preserve-spaces | break-spaces` - * - * **Initial value**: `collapse` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **114** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/white-space-collapse - */ - whiteSpaceCollapse?: Property.WhiteSpaceCollapse | undefined; - /** - * **Syntax**: `none | discard-before || discard-after || discard-inner` - * - * **Initial value**: `none` - */ - whiteSpaceTrim?: Property.WhiteSpaceTrim | undefined; - /** - * The **`widows`** CSS property sets the minimum number of lines in a block container that must be shown at the _top_ of a page, region, or column. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `2` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **25** | No | **1.3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/widows - */ - widows?: Property.Widows | undefined; - /** - * The **`width`** CSS property sets an element's width. By default, it sets the width of the content area, but if `box-sizing` is set to `border-box`, it sets the width of the border area. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/width - */ - width?: Property.Width<TLength> | undefined; - /** - * The **`will-change`** CSS property hints to browsers how an element is expected to change. Browsers may set up optimizations before an element is actually changed. These kinds of optimizations can increase the responsiveness of a page by doing potentially expensive work before they are actually required. - * - * **Syntax**: `auto | <animateable-feature>#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **36** | **36** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/will-change - */ - willChange?: Property.WillChange | undefined; - /** - * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. - * - * **Syntax**: `normal | break-all | keep-all | break-word` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **15** | **3** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/word-break - */ - wordBreak?: Property.WordBreak | undefined; - /** - * The **`word-spacing`** CSS property sets the length of space between words and between tags. - * - * **Syntax**: `normal | <length>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/word-spacing - */ - wordSpacing?: Property.WordSpacing<TLength> | undefined; - /** - * The **`overflow-wrap`** CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box. - * - * **Syntax**: `normal | break-word` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :-----: | :-: | - * | **≤80** | **≤72** | **≤13.1** | **≤80** | No | - */ - wordWrap?: Property.WordWrap | undefined; - /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). - * - * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` - * - * **Initial value**: `horizontal-tb` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :---: | - * | **48** | **41** | **10.1** | **12** | **9** | - * | 8 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/writing-mode - */ - writingMode?: Property.WritingMode | undefined; - /** - * The **`z-index`** CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one. - * - * **Syntax**: `auto | <integer>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/z-index - */ - zIndex?: Property.ZIndex | undefined; - /** - * The non-standard **`zoom`** CSS property can be used to control the magnification level of an element. `transform: scale()` should be used instead of this property, if possible. However, unlike CSS Transforms, `zoom` affects the layout size of the element. - * - * **Syntax**: `normal | reset | <number> | <percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :-----: | - * | **1** | n/a | **3.1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/zoom - */ - zoom?: Property.Zoom | undefined; -} - -export interface StandardShorthandProperties<TLength = (string & {}) | 0, TTime = string & {}> { - /** - * The **`all`** shorthand CSS property resets all of an element's properties except `unicode-bidi`, `direction`, and CSS Custom Properties. It can set properties to their initial or inherited values, or to the values specified in another cascade layer or stylesheet origin. - * - * **Syntax**: `initial | inherit | unset | revert | revert-layer` - * - * **Initial value**: There is no practical initial value for it. - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **37** | **27** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/all - */ - all?: Property.All | undefined; - /** - * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation - */ - animation?: Property.Animation<TTime> | undefined; - /** - * The **`animation-range`** CSS shorthand property is used to set the start and end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start and end. - * - * **Syntax**: `[ <'animation-range-start'> <'animation-range-end'>? ]#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-range - */ - animationRange?: Property.AnimationRange<TLength> | undefined; - /** - * The **`background`** shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method. - * - * **Syntax**: `[ <bg-layer> , ]* <final-bg-layer>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background - */ - background?: Property.Background<TLength> | undefined; - /** - * The **`background-position`** CSS property sets the initial position for each background image. The position is relative to the position layer set by `background-origin`. - * - * **Syntax**: `<bg-position>#` - * - * **Initial value**: `0% 0%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-position - */ - backgroundPosition?: Property.BackgroundPosition<TLength> | undefined; - /** - * The **`border`** shorthand CSS property sets an element's border. It sets the values of `border-width`, `border-style`, and `border-color`. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border - */ - border?: Property.Border<TLength> | undefined; - /** - * The **`border-block`** CSS property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block - */ - borderBlock?: Property.BorderBlock<TLength> | undefined; - /** - * The **`border-block-end`** CSS property is a shorthand property for setting the individual logical block-end border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end - */ - borderBlockEnd?: Property.BorderBlockEnd<TLength> | undefined; - /** - * The **`border-block-start`** CSS property is a shorthand property for setting the individual logical block-start border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start - */ - borderBlockStart?: Property.BorderBlockStart<TLength> | undefined; - /** - * The **`border-bottom`** shorthand CSS property sets an element's bottom border. It sets the values of `border-bottom-width`, `border-bottom-style` and `border-bottom-color`. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom - */ - borderBottom?: Property.BorderBottom<TLength> | undefined; - /** - * The **`border-color`** shorthand CSS property sets the color of an element's border. - * - * **Syntax**: `<color>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-color - */ - borderColor?: Property.BorderColor | undefined; - /** - * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-------: | :-----: | :----: | :----: | - * | **16** | **15** | **6** | **12** | **11** | - * | 7 _-x-_ | 3.5 _-x-_ | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image - */ - borderImage?: Property.BorderImage | undefined; - /** - * The **`border-inline`** CSS property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline - */ - borderInline?: Property.BorderInline<TLength> | undefined; - /** - * The **`border-inline-end`** CSS property is a shorthand property for setting the individual logical inline-end border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end - */ - borderInlineEnd?: Property.BorderInlineEnd<TLength> | undefined; - /** - * The **`border-inline-start`** CSS property is a shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start - */ - borderInlineStart?: Property.BorderInlineStart<TLength> | undefined; - /** - * The **`border-left`** shorthand CSS property sets all the properties of an element's left border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left - */ - borderLeft?: Property.BorderLeft<TLength> | undefined; - /** - * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. - * - * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-radius - */ - borderRadius?: Property.BorderRadius<TLength> | undefined; - /** - * The **`border-right`** shorthand CSS property sets all the properties of an element's right border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right - */ - borderRight?: Property.BorderRight<TLength> | undefined; - /** - * The **`border-style`** shorthand CSS property sets the line style for all four sides of an element's border. - * - * **Syntax**: `<line-style>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-style - */ - borderStyle?: Property.BorderStyle | undefined; - /** - * The **`border-top`** shorthand CSS property sets all the properties of an element's top border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top - */ - borderTop?: Property.BorderTop<TLength> | undefined; - /** - * The **`border-width`** shorthand CSS property sets the width of an element's border. - * - * **Syntax**: `<line-width>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-width - */ - borderWidth?: Property.BorderWidth<TLength> | undefined; - /** **Syntax**: `<'caret-color'> || <'caret-shape'>` */ - caret?: Property.Caret | undefined; - /** - * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule - */ - columnRule?: Property.ColumnRule<TLength> | undefined; - /** - * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. - * - * **Syntax**: `<'column-width'> || <'column-count'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/columns - */ - columns?: Property.Columns<TLength> | undefined; - /** - * The **`contain-intrinsic-size`** CSS shorthand property sets the size of an element that a browser will use for layout when the element is subject to size containment. - * - * **Syntax**: `[ auto? [ none | <length> ] ]{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **83** | **107** | **17** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size - */ - containIntrinsicSize?: Property.ContainIntrinsicSize<TLength> | undefined; - /** - * The **container** shorthand CSS property establishes the element as a query container and specifies the name or name for the containment context used in a container query. - * - * **Syntax**: `<'container-name'> [ / <'container-type'> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **105** | **110** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/container - */ - container?: Property.Container | undefined; - /** - * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. - * - * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :------: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex - */ - flex?: Property.Flex<TLength> | undefined; - /** - * The **`flex-flow`** CSS shorthand property specifies the direction of a flex container, as well as its wrapping behavior. - * - * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **28** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-flow - */ - flexFlow?: Property.FlexFlow | undefined; - /** - * The **`font`** CSS shorthand property sets all the different properties of an element's font. Alternatively, it sets an element's font to a system font. - * - * **Syntax**: `[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font - */ - font?: Property.Font | undefined; - /** - * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. - * - * **Syntax**: `<'row-gap'> <'column-gap'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/gap - */ - gap?: Property.Gap<TLength> | undefined; - /** - * The **`grid`** CSS property is a shorthand property that sets all of the explicit and implicit grid properties in a single declaration. - * - * **Syntax**: `<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid - */ - grid?: Property.Grid | undefined; - /** - * The **`grid-area`** CSS shorthand property specifies a grid item's size and location within a grid by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area. - * - * **Syntax**: `<grid-line> [ / <grid-line> ]{0,3}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-area - */ - gridArea?: Property.GridArea | undefined; - /** - * The **`grid-column`** CSS shorthand property specifies a grid item's size and location within a grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. - * - * **Syntax**: `<grid-line> [ / <grid-line> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-column - */ - gridColumn?: Property.GridColumn | undefined; - /** - * The **`grid-row`** CSS shorthand property specifies a grid item's size and location within a grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. - * - * **Syntax**: `<grid-line> [ / <grid-line> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-row - */ - gridRow?: Property.GridRow | undefined; - /** - * The **`grid-template`** CSS property is a shorthand property for defining grid columns, grid rows, and grid areas. - * - * **Syntax**: `none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template - */ - gridTemplate?: Property.GridTemplate | undefined; - /** - * The **`inset`** CSS property is a shorthand that corresponds to the `top`, `right`, `bottom`, and/or `left` properties. It has the same multi-value syntax of the `margin` shorthand. - * - * **Syntax**: `<'top'>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset - */ - inset?: Property.Inset<TLength> | undefined; - /** - * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block - */ - insetBlock?: Property.InsetBlock<TLength> | undefined; - /** - * The **`inset-inline`** CSS property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline - */ - insetInline?: Property.InsetInline<TLength> | undefined; - /** - * **Syntax**: `none | <integer>` - * - * **Initial value**: `none` - */ - lineClamp?: Property.LineClamp | undefined; - /** - * The **`list-style`** CSS shorthand property allows you to set all the list style properties at once. - * - * **Syntax**: `<'list-style-type'> || <'list-style-position'> || <'list-style-image'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style - */ - listStyle?: Property.ListStyle | undefined; - /** - * The **`margin`** CSS shorthand property sets the margin area on all four sides of an element. - * - * **Syntax**: `[ <length> | <percentage> | auto ]{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin - */ - margin?: Property.Margin<TLength> | undefined; - /** - * The **`margin-block`** CSS shorthand property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block - */ - marginBlock?: Property.MarginBlock<TLength> | undefined; - /** - * The **`margin-inline`** CSS shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline - */ - marginInline?: Property.MarginInline<TLength> | undefined; - /** - * The **`mask`** CSS shorthand property hides an element (partially or fully) by masking or clipping the image at specific points. - * - * **Syntax**: `<mask-layer>#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-------: | :---: | :-: | - * | **1** | **53** | **15.4** | 12-79 | No | - * | | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask - */ - mask?: Property.Mask<TLength> | undefined; - /** - * The **`mask-border`** CSS shorthand property lets you create a mask along the edge of an element's border. - * - * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------: | :-----: | :----------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image)_ | No | **17.2** | n/a | No | - * | | | 3.1 _(-webkit-mask-box-image)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border - */ - maskBorder?: Property.MaskBorder | undefined; - /** - * The **`offset`** CSS shorthand property sets all the properties required for animating an element along a defined path. - * - * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | **16** | n/a | No | - * | 46 _(motion)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset - */ - motion?: Property.Offset<TLength> | undefined; - /** - * The **`offset`** CSS shorthand property sets all the properties required for animating an element along a defined path. - * - * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | **16** | n/a | No | - * | 46 _(motion)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset - */ - offset?: Property.Offset<TLength> | undefined; - /** - * The **`outline`** CSS shorthand property sets most of the outline properties in a single declaration. - * - * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :---: | - * | **94** | **88** | **16.4** | **94** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline - */ - outline?: Property.Outline<TLength> | undefined; - /** - * The **`overflow`** CSS shorthand property sets the desired behavior for an element's overflow — i.e. when an element's content is too big to fit in its block formatting context — in both directions. - * - * **Syntax**: `[ visible | hidden | clip | scroll | auto ]{1,2}` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow - */ - overflow?: Property.Overflow | undefined; - /** - * The **`overscroll-behavior`** CSS property sets what a browser does when reaching the boundary of a scrolling area. It's a shorthand for `overscroll-behavior-x` and `overscroll-behavior-y`. - * - * **Syntax**: `[ contain | none | auto ]{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **63** | **59** | **16** | **18** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior - */ - overscrollBehavior?: Property.OverscrollBehavior | undefined; - /** - * The **`padding`** CSS shorthand property sets the padding area on all four sides of an element at once. - * - * **Syntax**: `[ <length> | <percentage> ]{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding - */ - padding?: Property.Padding<TLength> | undefined; - /** - * The **`padding-block`** CSS shorthand property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block - */ - paddingBlock?: Property.PaddingBlock<TLength> | undefined; - /** - * The **`padding-inline`** CSS shorthand property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline - */ - paddingInline?: Property.PaddingInline<TLength> | undefined; - /** - * The **`place-content`** CSS shorthand property allows you to align content along both the block and inline directions at once (i.e. the `align-content` and `justify-content` properties) in a relevant layout system such as Grid or Flexbox. - * - * **Syntax**: `<'align-content'> <'justify-content'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **9** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-content - */ - placeContent?: Property.PlaceContent | undefined; - /** - * The CSS **`place-items`** shorthand property allows you to align items along both the block and inline directions at once (i.e. the `align-items` and `justify-items` properties) in a relevant layout system such as Grid or Flexbox. If the second value is not set, the first value is also used for it. - * - * **Syntax**: `<'align-items'> <'justify-items'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-items - */ - placeItems?: Property.PlaceItems | undefined; - /** - * The **`place-self`** CSS shorthand property allows you to align an individual item in both the block and inline directions at once (i.e. the `align-self` and `justify-self` properties) in a relevant layout system such as Grid or Flexbox. If the second value is not present, the first value is also used for it. - * - * **Syntax**: `<'align-self'> <'justify-self'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-self - */ - placeSelf?: Property.PlaceSelf | undefined; - /** - * The **`scroll-margin`** shorthand property sets all of the scroll margins of an element at once, assigning values much like the `margin` property does for margins of an element. - * - * **Syntax**: `<length>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------: | :--: | :-: | - * | **69** | **90** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin - */ - scrollMargin?: Property.ScrollMargin<TLength> | undefined; - /** - * The `scroll-margin-block` shorthand property sets the scroll margins of an element in the block dimension. - * - * **Syntax**: `<length>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block - */ - scrollMarginBlock?: Property.ScrollMarginBlock<TLength> | undefined; - /** - * The `scroll-margin-inline` shorthand property sets the scroll margins of an element in the inline dimension. - * - * **Syntax**: `<length>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline - */ - scrollMarginInline?: Property.ScrollMarginInline<TLength> | undefined; - /** - * The **`scroll-padding`** shorthand property sets scroll padding on all sides of an element at once, much like the `padding` property does for padding on an element. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding - */ - scrollPadding?: Property.ScrollPadding<TLength> | undefined; - /** - * The `scroll-padding-block` shorthand property sets the scroll padding of an element in the block dimension. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block - */ - scrollPaddingBlock?: Property.ScrollPaddingBlock<TLength> | undefined; - /** - * The `scroll-padding-inline` shorthand property sets the scroll padding of an element in the inline dimension. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline - */ - scrollPaddingInline?: Property.ScrollPaddingInline<TLength> | undefined; - /** - * The **`scroll-margin`** shorthand property sets all of the scroll margins of an element at once, assigning values much like the `margin` property does for margins of an element. - * - * **Syntax**: `<length>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------: | :--: | :-: | - * | **69** | 68-90 | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin - */ - scrollSnapMargin?: Property.ScrollMargin<TLength> | undefined; - /** - * The **`scroll-timeline`** CSS shorthand property defines a name that can be used to identify the source element of a scroll timeline, along with the scrollbar axis that should provide the timeline. - * - * **Syntax**: `[ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline - */ - scrollTimeline?: Property.ScrollTimeline | undefined; - /** - * The **`text-decoration`** shorthand CSS property sets the appearance of decorative lines on text. It is a shorthand for `text-decoration-line`, `text-decoration-color`, `text-decoration-style`, and the newer `text-decoration-thickness` property. - * - * **Syntax**: `<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration - */ - textDecoration?: Property.TextDecoration<TLength> | undefined; - /** - * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. - * - * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis - */ - textEmphasis?: Property.TextEmphasis | undefined; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition - */ - transition?: Property.Transition<TTime> | undefined; - /** - * The **`view-timeline`** CSS shorthand property is used to define a _named view progress timeline_, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline` is set on the subject. - * - * **Syntax**: `[ <'view-timeline-name'> <'view-timeline-axis'>? ]#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline - */ - viewTimeline?: Property.ViewTimeline | undefined; -} - -export interface StandardProperties<TLength = (string & {}) | 0, TTime = string & {}> - extends StandardLonghandProperties<TLength, TTime>, - StandardShorthandProperties<TLength, TTime> {} - -export interface VendorLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> { - /** - * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - MozAnimationDelay?: Property.AnimationDelay<TTime> | undefined; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - */ - MozAnimationDirection?: Property.AnimationDirection | undefined; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - MozAnimationDuration?: Property.AnimationDuration<TTime> | undefined; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - */ - MozAnimationFillMode?: Property.AnimationFillMode | undefined; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - */ - MozAnimationIterationCount?: Property.AnimationIterationCount | undefined; - /** - * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - */ - MozAnimationName?: Property.AnimationName | undefined; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - */ - MozAnimationPlayState?: Property.AnimationPlayState | undefined; - /** - * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - MozAnimationTimingFunction?: Property.AnimationTimingFunction | undefined; - /** - * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. - * - * **Syntax**: `none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized` - * - * **Initial value**: `none` (but this value is overridden in the user agent CSS) - */ - MozAppearance?: Property.MozAppearance | undefined; - /** - * The **`-moz-binding`** CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element. - * - * **Syntax**: `<url> | none` - * - * **Initial value**: `none` - */ - MozBinding?: Property.MozBinding | undefined; - /** - * In Mozilla applications like Firefox, the **`-moz-border-bottom-colors`** CSS property sets a list of colors for the bottom border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - MozBorderBottomColors?: Property.MozBorderBottomColors | undefined; - /** - * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - */ - MozBorderEndColor?: Property.BorderInlineEndColor | undefined; - /** - * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - */ - MozBorderEndStyle?: Property.BorderInlineEndStyle | undefined; - /** - * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - */ - MozBorderEndWidth?: Property.BorderInlineEndWidth<TLength> | undefined; - /** - * In Mozilla applications like Firefox, the **`-moz-border-left-colors`** CSS property sets a list of colors for the left border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - MozBorderLeftColors?: Property.MozBorderLeftColors | undefined; - /** - * In Mozilla applications like Firefox, the **`-moz-border-right-colors`** CSS property sets a list of colors for the right border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - MozBorderRightColors?: Property.MozBorderRightColors | undefined; - /** - * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - */ - MozBorderStartColor?: Property.BorderInlineStartColor | undefined; - /** - * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - */ - MozBorderStartStyle?: Property.BorderInlineStartStyle | undefined; - /** - * In Mozilla applications like Firefox, the **`-moz-border-top-colors`** CSS property sets a list of colors for the top border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - MozBorderTopColors?: Property.MozBorderTopColors | undefined; - /** - * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. - * - * **Syntax**: `content-box | border-box` - * - * **Initial value**: `content-box` - */ - MozBoxSizing?: Property.BoxSizing | undefined; - /** - * The **`column-count`** CSS property breaks an element's content into the specified number of columns. - * - * **Syntax**: `<integer> | auto` - * - * **Initial value**: `auto` - */ - MozColumnCount?: Property.ColumnCount | undefined; - /** - * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. - * - * **Syntax**: `auto | balance | balance-all` - * - * **Initial value**: `balance` - */ - MozColumnFill?: Property.ColumnFill | undefined; - /** - * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - MozColumnRuleColor?: Property.ColumnRuleColor | undefined; - /** - * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - */ - MozColumnRuleStyle?: Property.ColumnRuleStyle | undefined; - /** - * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - */ - MozColumnRuleWidth?: Property.ColumnRuleWidth<TLength> | undefined; - /** - * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. - * - * **Syntax**: `<length> | auto` - * - * **Initial value**: `auto` - */ - MozColumnWidth?: Property.ColumnWidth<TLength> | undefined; - /** - * The **`-moz-context-properties`** property can be used within privileged contexts in Firefox to share the values of specified properties of the element with a child SVG image. - * - * **Syntax**: `none | [ fill | fill-opacity | stroke | stroke-opacity ]#` - * - * **Initial value**: `none` - */ - MozContextProperties?: Property.MozContextProperties | undefined; - /** - * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. - * - * **Syntax**: `normal | <feature-tag-value>#` - * - * **Initial value**: `normal` - */ - MozFontFeatureSettings?: Property.FontFeatureSettings | undefined; - /** - * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. - * - * **Syntax**: `normal | <string>` - * - * **Initial value**: `normal` - */ - MozFontLanguageOverride?: Property.FontLanguageOverride | undefined; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - */ - MozHyphens?: Property.Hyphens | undefined; - /** - * For certain XUL elements and pseudo-elements that use an image from the `list-style-image` property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance. - * - * **Syntax**: `<shape> | auto` - * - * **Initial value**: `auto` - */ - MozImageRegion?: Property.MozImageRegion | undefined; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - MozMarginEnd?: Property.MarginInlineEnd<TLength> | undefined; - /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - MozMarginStart?: Property.MarginInlineStart<TLength> | undefined; - /** - * The **`-moz-orient`** CSS property specifies the orientation of the element to which it's applied. - * - * **Syntax**: `inline | block | horizontal | vertical` - * - * **Initial value**: `inline` - */ - MozOrient?: Property.MozOrient | undefined; - /** - * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. - * - * **Syntax**: `auto | never | always | <absolute-size> | <length>` - * - * **Initial value**: `auto` - */ - MozOsxFontSmoothing?: Property.FontSmooth<TLength> | undefined; - /** - * In Mozilla applications, the **`-moz-outline-radius-bottomleft`** CSS property can be used to round the bottom-left corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - */ - MozOutlineRadiusBottomleft?: Property.MozOutlineRadiusBottomleft<TLength> | undefined; - /** - * In Mozilla applications, the **`-moz-outline-radius-bottomright`** CSS property can be used to round the bottom-right corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - */ - MozOutlineRadiusBottomright?: Property.MozOutlineRadiusBottomright<TLength> | undefined; - /** - * In Mozilla applications, the **`-moz-outline-radius-topleft`** CSS property can be used to round the top-left corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - */ - MozOutlineRadiusTopleft?: Property.MozOutlineRadiusTopleft<TLength> | undefined; - /** - * In Mozilla applications, the **`-moz-outline-radius-topright`** CSS property can be used to round the top-right corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - */ - MozOutlineRadiusTopright?: Property.MozOutlineRadiusTopright<TLength> | undefined; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - MozPaddingEnd?: Property.PaddingInlineEnd<TLength> | undefined; - /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - MozPaddingStart?: Property.PaddingInlineStart<TLength> | undefined; - /** - * **`-moz-stack-sizing`** is an extended CSS property. Normally, a `<xul:stack>` will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible. - * - * **Syntax**: `ignore | stretch-to-fit` - * - * **Initial value**: `stretch-to-fit` - */ - MozStackSizing?: Property.MozStackSizing | undefined; - /** - * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - */ - MozTabSize?: Property.TabSize<TLength> | undefined; - /** - * The **`-moz-text-blink`** non-standard Mozilla CSS extension specifies the blink mode. - * - * **Syntax**: `none | blink` - * - * **Initial value**: `none` - */ - MozTextBlink?: Property.MozTextBlink | undefined; - /** - * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. - * - * **Syntax**: `none | auto | <percentage>` - * - * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). - */ - MozTextSizeAdjust?: Property.TextSizeAdjust | undefined; - /** - * The **`-moz-user-focus`** CSS property is used to indicate whether an element can have the focus. - * - * **Syntax**: `ignore | normal | select-after | select-before | select-menu | select-same | select-all | none` - * - * **Initial value**: `none` - */ - MozUserFocus?: Property.MozUserFocus | undefined; - /** - * The **`user-modify`** property has no effect in Firefox. It was originally planned to determine whether or not the content of an element can be edited by a user. - * - * **Syntax**: `read-only | read-write | write-only` - * - * **Initial value**: `read-only` - */ - MozUserModify?: Property.MozUserModify | undefined; - /** - * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - */ - MozUserSelect?: Property.UserSelect | undefined; - /** - * The **`-moz-window-dragging`** CSS property specifies whether a window is draggable or not. It only works in Chrome code, and only on Mac OS X. - * - * **Syntax**: `drag | no-drag` - * - * **Initial value**: `drag` - */ - MozWindowDragging?: Property.MozWindowDragging | undefined; - /** - * The **`-moz-window-shadow`** CSS property specifies whether a window will have a shadow. It only works on Mac OS X. - * - * **Syntax**: `default | menu | tooltip | sheet | none` - * - * **Initial value**: `default` - */ - MozWindowShadow?: Property.MozWindowShadow | undefined; - /** - * The **`-ms-accelerator`** CSS property is a Microsoft extension that sets or retrieves a string indicating whether the object represents a keyboard shortcut. - * - * **Syntax**: `false | true` - * - * **Initial value**: `false` - */ - msAccelerator?: Property.MsAccelerator | undefined; - /** - * The **`-ms-block-progression`** CSS property is a Microsoft extension that specifies the block progression and layout orientation. - * - * **Syntax**: `tb | rl | bt | lr` - * - * **Initial value**: `tb` - */ - msBlockProgression?: Property.MsBlockProgression | undefined; - /** - * The **`-ms-content-zoom-chaining`** CSS property is a Microsoft extension specifying the zoom behavior that occurs when a user hits the zoom limit during page manipulation. - * - * **Syntax**: `none | chained` - * - * **Initial value**: `none` - */ - msContentZoomChaining?: Property.MsContentZoomChaining | undefined; - /** - * The **`-ms-content-zoom-limit-max`** CSS property is a Microsoft extension that specifies the selected elements' maximum zoom factor. - * - * **Syntax**: `<percentage>` - * - * **Initial value**: `400%` - */ - msContentZoomLimitMax?: Property.MsContentZoomLimitMax | undefined; - /** - * The **`-ms-content-zoom-limit-min`** CSS property is a Microsoft extension that specifies the minimum zoom factor. - * - * **Syntax**: `<percentage>` - * - * **Initial value**: `100%` - */ - msContentZoomLimitMin?: Property.MsContentZoomLimitMin | undefined; - /** - * The **`-ms-content-zoom-snap-points`** CSS property is a Microsoft extension that specifies where zoom snap-points are located. - * - * **Syntax**: `snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )` - * - * **Initial value**: `snapInterval(0%, 100%)` - */ - msContentZoomSnapPoints?: Property.MsContentZoomSnapPoints | undefined; - /** - * The **`-ms-content-zoom-snap-type`** CSS property is a Microsoft extension that specifies how zooming is affected by defined snap-points. - * - * **Syntax**: `none | proximity | mandatory` - * - * **Initial value**: `none` - */ - msContentZoomSnapType?: Property.MsContentZoomSnapType | undefined; - /** - * The **`-ms-content-zooming`** CSS property is a Microsoft extension that specifies whether zooming is enabled. - * - * **Syntax**: `none | zoom` - * - * **Initial value**: zoom for the top level element, none for all other elements - */ - msContentZooming?: Property.MsContentZooming | undefined; - /** - * The `-ms-filter` CSS property is a Microsoft extension that sets or retrieves the filter or collection of filters applied to an object. - * - * **Syntax**: `<string>` - * - * **Initial value**: "" (the empty string) - */ - msFilter?: Property.MsFilter | undefined; - /** - * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). - * - * **Syntax**: `row | row-reverse | column | column-reverse` - * - * **Initial value**: `row` - */ - msFlexDirection?: Property.FlexDirection | undefined; - /** - * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - */ - msFlexPositive?: Property.FlexGrow | undefined; - /** - * The **`-ms-flow-from`** CSS property is a Microsoft extension that gets or sets a value identifying a region container in the document that accepts the content flow from the data source. - * - * **Syntax**: `[ none | <custom-ident> ]#` - * - * **Initial value**: `none` - */ - msFlowFrom?: Property.MsFlowFrom | undefined; - /** - * The **`-ms-flow-into`** CSS property is a Microsoft extension that gets or sets a value identifying an iframe container in the document that serves as the region's data source. - * - * **Syntax**: `[ none | <custom-ident> ]#` - * - * **Initial value**: `none` - */ - msFlowInto?: Property.MsFlowInto | undefined; - /** - * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. - * - * **Syntax**: `none | <track-list> | <auto-track-list>` - * - * **Initial value**: `none` - */ - msGridColumns?: Property.MsGridColumns<TLength> | undefined; - /** - * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. - * - * **Syntax**: `none | <track-list> | <auto-track-list>` - * - * **Initial value**: `none` - */ - msGridRows?: Property.MsGridRows<TLength> | undefined; - /** - * The **`-ms-high-contrast-adjust`** CSS property is a Microsoft extension that gets or sets a value indicating whether to override any CSS properties that would have been set in high contrast mode. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - */ - msHighContrastAdjust?: Property.MsHighContrastAdjust | undefined; - /** - * The **`-ms-hyphenate-limit-chars`** CSS property is a Microsoft extension that specifies one to three values indicating the minimum number of characters in a hyphenated word. If the word does not meet the required minimum number of characters in the word, before the hyphen, or after the hyphen, then the word is not hyphenated. - * - * **Syntax**: `auto | <integer>{1,3}` - * - * **Initial value**: `auto` - */ - msHyphenateLimitChars?: Property.MsHyphenateLimitChars | undefined; - /** - * The **`-ms-hyphenate-limit-lines`** CSS property is a Microsoft extension specifying the maximum number of consecutive lines in an element that may be ended with a hyphenated word. - * - * **Syntax**: `no-limit | <integer>` - * - * **Initial value**: `no-limit` - */ - msHyphenateLimitLines?: Property.MsHyphenateLimitLines | undefined; - /** - * The `**-ms-hyphenate-limit-zone**` CSS property is a Microsoft extension specifying the width of the hyphenation zone. - * - * **Syntax**: `<percentage> | <length>` - * - * **Initial value**: `0` - */ - msHyphenateLimitZone?: Property.MsHyphenateLimitZone<TLength> | undefined; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - */ - msHyphens?: Property.Hyphens | undefined; - /** - * The **`-ms-ime-align`** CSS property is a Microsoft extension aligning the Input Method Editor (IME) candidate window box relative to the element on which the IME composition is active. The extension is implemented in Microsoft Edge and Internet Explorer 11. - * - * **Syntax**: `auto | after` - * - * **Initial value**: `auto` - */ - msImeAlign?: Property.MsImeAlign | undefined; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - */ - msLineBreak?: Property.LineBreak | undefined; - /** - * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `0` - */ - msOrder?: Property.Order | undefined; - /** - * The **`-ms-overflow-style`** CSS property is a Microsoft extension controlling the behavior of scrollbars when the content of an element overflows. - * - * **Syntax**: `auto | none | scrollbar | -ms-autohiding-scrollbar` - * - * **Initial value**: `auto` - */ - msOverflowStyle?: Property.MsOverflowStyle | undefined; - /** - * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - */ - msOverflowX?: Property.OverflowX | undefined; - /** - * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - */ - msOverflowY?: Property.OverflowY | undefined; - /** - * The `**-ms-scroll-chaining**` CSS property is a Microsoft extension that specifies the scrolling behavior that occurs when a user hits the scroll limit during a manipulation. - * - * **Syntax**: `chained | none` - * - * **Initial value**: `chained` - */ - msScrollChaining?: Property.MsScrollChaining | undefined; - /** - * The `**-ms-scroll-limit-x-max**` CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollLeft` property. - * - * **Syntax**: `auto | <length>` - * - * **Initial value**: `auto` - */ - msScrollLimitXMax?: Property.MsScrollLimitXMax<TLength> | undefined; - /** - * The **`-ms-scroll-limit-x-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollLeft` property. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - msScrollLimitXMin?: Property.MsScrollLimitXMin<TLength> | undefined; - /** - * The **`-ms-scroll-limit-y-max`** CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollTop` property. - * - * **Syntax**: `auto | <length>` - * - * **Initial value**: `auto` - */ - msScrollLimitYMax?: Property.MsScrollLimitYMax<TLength> | undefined; - /** - * The **`-ms-scroll-limit-y-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollTop` property. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - msScrollLimitYMin?: Property.MsScrollLimitYMin<TLength> | undefined; - /** - * The **`-ms-scroll-rails`** CSS property is a Microsoft extension that specifies whether scrolling locks to the primary axis of motion. - * - * **Syntax**: `none | railed` - * - * **Initial value**: `railed` - */ - msScrollRails?: Property.MsScrollRails | undefined; - /** - * The **`-ms-scroll-snap-points-x`** CSS property is a Microsoft extension that specifies where snap-points will be located along the x-axis. - * - * **Syntax**: `snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )` - * - * **Initial value**: `snapInterval(0px, 100%)` - */ - msScrollSnapPointsX?: Property.MsScrollSnapPointsX | undefined; - /** - * The **`-ms-scroll-snap-points-y`** CSS property is a Microsoft extension that specifies where snap-points will be located along the y-axis. - * - * **Syntax**: `snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )` - * - * **Initial value**: `snapInterval(0px, 100%)` - */ - msScrollSnapPointsY?: Property.MsScrollSnapPointsY | undefined; - /** - * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. - * - * **Syntax**: `none | proximity | mandatory` - * - * **Initial value**: `none` - */ - msScrollSnapType?: Property.MsScrollSnapType | undefined; - /** - * The **`-ms-scroll-translation`** CSS property is a Microsoft extension that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element. - * - * **Syntax**: `none | vertical-to-horizontal` - * - * **Initial value**: `none` - */ - msScrollTranslation?: Property.MsScrollTranslation | undefined; - /** - * The **`-ms-scrollbar-3dlight-color`** CSS property is a Microsoft extension specifying the color of the top and left edges of the scroll box and scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: depends on user agent - */ - msScrollbar3dlightColor?: Property.MsScrollbar3dlightColor | undefined; - /** - * The **`-ms-scrollbar-arrow-color`** CSS property is a Microsoft extension that specifies the color of the arrow elements of a scroll arrow. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ButtonText` - */ - msScrollbarArrowColor?: Property.MsScrollbarArrowColor | undefined; - /** - * The `**-ms-scrollbar-base-color**` CSS property is a Microsoft extension that specifies the base color of the main elements of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: depends on user agent - */ - msScrollbarBaseColor?: Property.MsScrollbarBaseColor | undefined; - /** - * The **`-ms-scrollbar-darkshadow-color`** CSS property is a Microsoft extension that specifies the color of a scroll bar's gutter. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDDarkShadow` - */ - msScrollbarDarkshadowColor?: Property.MsScrollbarDarkshadowColor | undefined; - /** - * The `**-ms-scrollbar-face-color**` CSS property is a Microsoft extension that specifies the color of the scroll box and scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDFace` - */ - msScrollbarFaceColor?: Property.MsScrollbarFaceColor | undefined; - /** - * The `**-ms-scrollbar-highlight-color**` CSS property is a Microsoft extension that specifies the color of the slider tray, the top and left edges of the scroll box, and the scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDHighlight` - */ - msScrollbarHighlightColor?: Property.MsScrollbarHighlightColor | undefined; - /** - * The **`-ms-scrollbar-shadow-color`** CSS property is a Microsoft extension that specifies the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDDarkShadow` - */ - msScrollbarShadowColor?: Property.MsScrollbarShadowColor | undefined; - /** - * The **`-ms-scrollbar-track-color`** CSS property is a Microsoft extension that specifies the color of the track element of a scrollbar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `Scrollbar` - */ - msScrollbarTrackColor?: Property.MsScrollbarTrackColor | undefined; - /** - * The **`-ms-text-autospace`** CSS property is a Microsoft extension that specifies the autospacing and narrow space width adjustment of text. - * - * **Syntax**: `none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space` - * - * **Initial value**: `none` - */ - msTextAutospace?: Property.MsTextAutospace | undefined; - /** - * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. - * - * **Syntax**: `none | all | [ digits <integer>? ]` - * - * **Initial value**: `none` - */ - msTextCombineHorizontal?: Property.TextCombineUpright | undefined; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - */ - msTextOverflow?: Property.TextOverflow | undefined; - /** - * The **`touch-action`** CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). - * - * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` - * - * **Initial value**: `auto` - */ - msTouchAction?: Property.TouchAction | undefined; - /** - * The **`-ms-touch-select`** CSS property is a Microsoft extension that toggles the gripper visual elements that enable touch text selection. - * - * **Syntax**: `grippers | none` - * - * **Initial value**: `grippers` - */ - msTouchSelect?: Property.MsTouchSelect | undefined; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - */ - msTransform?: Property.Transform | undefined; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - */ - msTransformOrigin?: Property.TransformOrigin<TLength> | undefined; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - msTransitionDelay?: Property.TransitionDelay<TTime> | undefined; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - msTransitionDuration?: Property.TransitionDuration<TTime> | undefined; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - */ - msTransitionProperty?: Property.TransitionProperty | undefined; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - msTransitionTimingFunction?: Property.TransitionTimingFunction | undefined; - /** - * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. - * - * **Syntax**: `none | element | text` - * - * **Initial value**: `text` - */ - msUserSelect?: Property.MsUserSelect | undefined; - /** - * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. - * - * **Syntax**: `normal | break-all | keep-all | break-word` - * - * **Initial value**: `normal` - */ - msWordBreak?: Property.WordBreak | undefined; - /** - * The **`-ms-wrap-flow`** CSS property is a Microsoft extension that specifies how exclusions impact inline content within block-level elements. - * - * **Syntax**: `auto | both | start | end | maximum | clear` - * - * **Initial value**: `auto` - */ - msWrapFlow?: Property.MsWrapFlow | undefined; - /** - * The **`-ms-wrap-margin`** CSS property is a Microsoft extension that specifies a margin that offsets the inner wrap shape from other shapes. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - msWrapMargin?: Property.MsWrapMargin<TLength> | undefined; - /** - * The **`-ms-wrap-through`** CSS property is a Microsoft extension that specifies how content should wrap around an exclusion element. - * - * **Syntax**: `wrap | none` - * - * **Initial value**: `wrap` - */ - msWrapThrough?: Property.MsWrapThrough | undefined; - /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). - * - * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` - * - * **Initial value**: `horizontal-tb` - */ - msWritingMode?: Property.WritingMode | undefined; - /** - * The CSS **`align-content`** property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. - * - * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` - * - * **Initial value**: `normal` - */ - WebkitAlignContent?: Property.AlignContent | undefined; - /** - * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. - * - * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` - * - * **Initial value**: `normal` - */ - WebkitAlignItems?: Property.AlignItems | undefined; - /** - * The **`align-self`** CSS property overrides a grid or flex item's `align-items` value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. - * - * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` - * - * **Initial value**: `auto` - */ - WebkitAlignSelf?: Property.AlignSelf | undefined; - /** - * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - WebkitAnimationDelay?: Property.AnimationDelay<TTime> | undefined; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - */ - WebkitAnimationDirection?: Property.AnimationDirection | undefined; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - WebkitAnimationDuration?: Property.AnimationDuration<TTime> | undefined; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - */ - WebkitAnimationFillMode?: Property.AnimationFillMode | undefined; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - */ - WebkitAnimationIterationCount?: Property.AnimationIterationCount | undefined; - /** - * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - */ - WebkitAnimationName?: Property.AnimationName | undefined; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - */ - WebkitAnimationPlayState?: Property.AnimationPlayState | undefined; - /** - * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - WebkitAnimationTimingFunction?: Property.AnimationTimingFunction | undefined; - /** - * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. - * - * **Syntax**: `none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button` - * - * **Initial value**: `none` (but this value is overridden in the user agent CSS) - */ - WebkitAppearance?: Property.WebkitAppearance | undefined; - /** - * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - */ - WebkitBackdropFilter?: Property.BackdropFilter | undefined; - /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. - * - * **Syntax**: `visible | hidden` - * - * **Initial value**: `visible` - */ - WebkitBackfaceVisibility?: Property.BackfaceVisibility | undefined; - /** - * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `border-box` - */ - WebkitBackgroundClip?: Property.BackgroundClip | undefined; - /** - * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `padding-box` - */ - WebkitBackgroundOrigin?: Property.BackgroundOrigin | undefined; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - */ - WebkitBackgroundSize?: Property.BackgroundSize<TLength> | undefined; - /** - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - WebkitBorderBeforeColor?: Property.WebkitBorderBeforeColor | undefined; - /** - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - */ - WebkitBorderBeforeStyle?: Property.WebkitBorderBeforeStyle | undefined; - /** - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - */ - WebkitBorderBeforeWidth?: Property.WebkitBorderBeforeWidth<TLength> | undefined; - /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - WebkitBorderBottomLeftRadius?: Property.BorderBottomLeftRadius<TLength> | undefined; - /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - WebkitBorderBottomRightRadius?: Property.BorderBottomRightRadius<TLength> | undefined; - /** - * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. - * - * **Syntax**: `<number-percentage>{1,4} && fill?` - * - * **Initial value**: `100%` - */ - WebkitBorderImageSlice?: Property.BorderImageSlice | undefined; - /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - WebkitBorderTopLeftRadius?: Property.BorderTopLeftRadius<TLength> | undefined; - /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - WebkitBorderTopRightRadius?: Property.BorderTopRightRadius<TLength> | undefined; - /** - * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. - * - * **Syntax**: `slice | clone` - * - * **Initial value**: `slice` - */ - WebkitBoxDecorationBreak?: Property.BoxDecorationBreak | undefined; - /** - * The **`-webkit-box-reflect`** CSS property lets you reflect the content of an element in one specific direction. - * - * **Syntax**: `[ above | below | right | left ]? <length>? <image>?` - * - * **Initial value**: `none` - */ - WebkitBoxReflect?: Property.WebkitBoxReflect<TLength> | undefined; - /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. - * - * **Syntax**: `none | <shadow>#` - * - * **Initial value**: `none` - */ - WebkitBoxShadow?: Property.BoxShadow | undefined; - /** - * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. - * - * **Syntax**: `content-box | border-box` - * - * **Initial value**: `content-box` - */ - WebkitBoxSizing?: Property.BoxSizing | undefined; - /** - * The **`clip-path`** CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. - * - * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` - * - * **Initial value**: `none` - */ - WebkitClipPath?: Property.ClipPath | undefined; - /** - * The **`column-count`** CSS property breaks an element's content into the specified number of columns. - * - * **Syntax**: `<integer> | auto` - * - * **Initial value**: `auto` - */ - WebkitColumnCount?: Property.ColumnCount | undefined; - /** - * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. - * - * **Syntax**: `auto | balance | balance-all` - * - * **Initial value**: `balance` - */ - WebkitColumnFill?: Property.ColumnFill | undefined; - /** - * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - WebkitColumnRuleColor?: Property.ColumnRuleColor | undefined; - /** - * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - */ - WebkitColumnRuleStyle?: Property.ColumnRuleStyle | undefined; - /** - * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - */ - WebkitColumnRuleWidth?: Property.ColumnRuleWidth<TLength> | undefined; - /** - * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. - * - * **Syntax**: `none | all` - * - * **Initial value**: `none` - */ - WebkitColumnSpan?: Property.ColumnSpan | undefined; - /** - * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. - * - * **Syntax**: `<length> | auto` - * - * **Initial value**: `auto` - */ - WebkitColumnWidth?: Property.ColumnWidth<TLength> | undefined; - /** - * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - */ - WebkitFilter?: Property.Filter | undefined; - /** - * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. - * - * **Syntax**: `content | <'width'>` - * - * **Initial value**: `auto` - */ - WebkitFlexBasis?: Property.FlexBasis<TLength> | undefined; - /** - * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). - * - * **Syntax**: `row | row-reverse | column | column-reverse` - * - * **Initial value**: `row` - */ - WebkitFlexDirection?: Property.FlexDirection | undefined; - /** - * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - */ - WebkitFlexGrow?: Property.FlexGrow | undefined; - /** - * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. - * - * **Syntax**: `<number>` - * - * **Initial value**: `1` - */ - WebkitFlexShrink?: Property.FlexShrink | undefined; - /** - * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. - * - * **Syntax**: `nowrap | wrap | wrap-reverse` - * - * **Initial value**: `nowrap` - */ - WebkitFlexWrap?: Property.FlexWrap | undefined; - /** - * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. - * - * **Syntax**: `normal | <feature-tag-value>#` - * - * **Initial value**: `normal` - */ - WebkitFontFeatureSettings?: Property.FontFeatureSettings | undefined; - /** - * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. - * - * **Syntax**: `auto | normal | none` - * - * **Initial value**: `auto` - */ - WebkitFontKerning?: Property.FontKerning | undefined; - /** - * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. - * - * **Syntax**: `auto | never | always | <absolute-size> | <length>` - * - * **Initial value**: `auto` - */ - WebkitFontSmoothing?: Property.FontSmooth<TLength> | undefined; - /** - * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. - * - * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]` - * - * **Initial value**: `normal` - */ - WebkitFontVariantLigatures?: Property.FontVariantLigatures | undefined; - /** - * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. - * - * **Syntax**: `auto | <string>` - * - * **Initial value**: `auto` - */ - WebkitHyphenateCharacter?: Property.HyphenateCharacter | undefined; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - */ - WebkitHyphens?: Property.Hyphens | undefined; - /** - * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. - * - * **Syntax**: `normal | [ <number> <integer>? ]` - * - * **Initial value**: `normal` - */ - WebkitInitialLetter?: Property.InitialLetter | undefined; - /** - * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. - * - * **Syntax**: `normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]` - * - * **Initial value**: `normal` - */ - WebkitJustifyContent?: Property.JustifyContent | undefined; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - */ - WebkitLineBreak?: Property.LineBreak | undefined; - /** - * The **`-webkit-line-clamp`** CSS property allows limiting of the contents of a block to the specified number of lines. - * - * **Syntax**: `none | <integer>` - * - * **Initial value**: `none` - */ - WebkitLineClamp?: Property.WebkitLineClamp | undefined; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - WebkitMarginEnd?: Property.MarginInlineEnd<TLength> | undefined; - /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - WebkitMarginStart?: Property.MarginInlineStart<TLength> | undefined; - /** - * If a `mask-image` is specified, `-webkit-mask-attachment` determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block. - * - * **Syntax**: `<attachment>#` - * - * **Initial value**: `scroll` - */ - WebkitMaskAttachment?: Property.WebkitMaskAttachment | undefined; - /** - * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. - * - * **Syntax**: `[ <length> | <number> ]{1,4}` - * - * **Initial value**: `0` - */ - WebkitMaskBoxImageOutset?: Property.MaskBorderOutset<TLength> | undefined; - /** - * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. - * - * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` - * - * **Initial value**: `stretch` - */ - WebkitMaskBoxImageRepeat?: Property.MaskBorderRepeat | undefined; - /** - * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. - * - * **Syntax**: `<number-percentage>{1,4} fill?` - * - * **Initial value**: `0` - */ - WebkitMaskBoxImageSlice?: Property.MaskBorderSlice | undefined; - /** - * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. - * - * **Syntax**: `none | <image>` - * - * **Initial value**: `none` - */ - WebkitMaskBoxImageSource?: Property.MaskBorderSource | undefined; - /** - * The **`mask-border-width`** CSS property sets the width of an element's mask border. - * - * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` - * - * **Initial value**: `auto` - */ - WebkitMaskBoxImageWidth?: Property.MaskBorderWidth<TLength> | undefined; - /** - * The **`mask-clip`** CSS property determines the area which is affected by a mask. The painted content of an element must be restricted to this area. - * - * **Syntax**: `[ <box> | border | padding | content | text ]#` - * - * **Initial value**: `border` - */ - WebkitMaskClip?: Property.WebkitMaskClip | undefined; - /** - * The **`-webkit-mask-composite`** property specifies the manner in which multiple mask images applied to the same element are composited with one another. Mask images are composited in the opposite order that they are declared with the `-webkit-mask-image` property. - * - * **Syntax**: `<composite-style>#` - * - * **Initial value**: `source-over` - */ - WebkitMaskComposite?: Property.WebkitMaskComposite | undefined; - /** - * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. By default this means the alpha channel of the mask image will be multiplied with the alpha channel of the element. This can be controlled with the `mask-mode` property. - * - * **Syntax**: `<mask-reference>#` - * - * **Initial value**: `none` - */ - WebkitMaskImage?: Property.WebkitMaskImage | undefined; - /** - * The **`mask-origin`** CSS property sets the origin of a mask. - * - * **Syntax**: `[ <box> | border | padding | content ]#` - * - * **Initial value**: `padding` - */ - WebkitMaskOrigin?: Property.WebkitMaskOrigin | undefined; - /** - * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. - * - * **Syntax**: `<position>#` - * - * **Initial value**: `0% 0%` - */ - WebkitMaskPosition?: Property.WebkitMaskPosition<TLength> | undefined; - /** - * The `-webkit-mask-position-x` CSS property sets the initial horizontal position of a mask image. - * - * **Syntax**: `[ <length-percentage> | left | center | right ]#` - * - * **Initial value**: `0%` - */ - WebkitMaskPositionX?: Property.WebkitMaskPositionX<TLength> | undefined; - /** - * The `-webkit-mask-position-y` CSS property sets the initial vertical position of a mask image. - * - * **Syntax**: `[ <length-percentage> | top | center | bottom ]#` - * - * **Initial value**: `0%` - */ - WebkitMaskPositionY?: Property.WebkitMaskPositionY<TLength> | undefined; - /** - * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. - * - * **Syntax**: `<repeat-style>#` - * - * **Initial value**: `repeat` - */ - WebkitMaskRepeat?: Property.WebkitMaskRepeat | undefined; - /** - * The `-webkit-mask-repeat-x` property specifies whether and how a mask image is repeated (tiled) horizontally. - * - * **Syntax**: `repeat | no-repeat | space | round` - * - * **Initial value**: `repeat` - */ - WebkitMaskRepeatX?: Property.WebkitMaskRepeatX | undefined; - /** - * The `-webkit-mask-repeat-y` property sets whether and how a mask image is repeated (tiled) vertically. - * - * **Syntax**: `repeat | no-repeat | space | round` - * - * **Initial value**: `repeat` - */ - WebkitMaskRepeatY?: Property.WebkitMaskRepeatY | undefined; - /** - * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - */ - WebkitMaskSize?: Property.WebkitMaskSize<TLength> | undefined; - /** - * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block, depending on its writing mode. It corresponds to either the `max-width` or the `max-height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'max-width'>` - * - * **Initial value**: `none` - */ - WebkitMaxInlineSize?: Property.MaxInlineSize<TLength> | undefined; - /** - * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `0` - */ - WebkitOrder?: Property.Order | undefined; - /** - * The `-webkit-overflow-scrolling` CSS property controls whether or not touch devices use momentum-based scrolling for a given element. - * - * **Syntax**: `auto | touch` - * - * **Initial value**: `auto` - */ - WebkitOverflowScrolling?: Property.WebkitOverflowScrolling | undefined; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - WebkitPaddingEnd?: Property.PaddingInlineEnd<TLength> | undefined; - /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - WebkitPaddingStart?: Property.PaddingInlineStart<TLength> | undefined; - /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - */ - WebkitPerspective?: Property.Perspective<TLength> | undefined; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - */ - WebkitPerspectiveOrigin?: Property.PerspectiveOrigin<TLength> | undefined; - /** - * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. - * - * **Syntax**: `economy | exact` - * - * **Initial value**: `economy` - */ - WebkitPrintColorAdjust?: Property.PrintColorAdjust | undefined; - /** - * The **`ruby-position`** CSS property defines the position of a ruby element relatives to its base element. It can be positioned over the element (`over`), under it (`under`), or between the characters on their right side (`inter-character`). - * - * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` - * - * **Initial value**: `alternate` - */ - WebkitRubyPosition?: Property.RubyPosition | undefined; - /** - * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. - * - * **Syntax**: `none | [ x | y | block | inline | both ] [ mandatory | proximity ]?` - * - * **Initial value**: `none` - */ - WebkitScrollSnapType?: Property.ScrollSnapType | undefined; - /** - * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - */ - WebkitShapeMargin?: Property.ShapeMargin<TLength> | undefined; - /** - * **`-webkit-tap-highlight-color`** is a non-standard CSS property that sets the color of the highlight that appears over a link while it's being tapped. The highlighting indicates to the user that their tap is being successfully recognized, and indicates which element they're tapping on. - * - * **Syntax**: `<color>` - * - * **Initial value**: `black` - */ - WebkitTapHighlightColor?: Property.WebkitTapHighlightColor | undefined; - /** - * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. - * - * **Syntax**: `none | all | [ digits <integer>? ]` - * - * **Initial value**: `none` - */ - WebkitTextCombine?: Property.TextCombineUpright | undefined; - /** - * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - WebkitTextDecorationColor?: Property.TextDecorationColor | undefined; - /** - * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. - * - * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` - * - * **Initial value**: `none` - */ - WebkitTextDecorationLine?: Property.TextDecorationLine | undefined; - /** - * The **`text-decoration-skip`** CSS property sets what parts of an element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. - * - * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` - * - * **Initial value**: `objects` - */ - WebkitTextDecorationSkip?: Property.TextDecorationSkip | undefined; - /** - * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. - * - * **Syntax**: `solid | double | dotted | dashed | wavy` - * - * **Initial value**: `solid` - */ - WebkitTextDecorationStyle?: Property.TextDecorationStyle | undefined; - /** - * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - WebkitTextEmphasisColor?: Property.TextEmphasisColor | undefined; - /** - * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. - * - * **Syntax**: `[ over | under ] && [ right | left ]` - * - * **Initial value**: `over right` - */ - WebkitTextEmphasisPosition?: Property.TextEmphasisPosition | undefined; - /** - * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. - * - * **Syntax**: `none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>` - * - * **Initial value**: `none` - */ - WebkitTextEmphasisStyle?: Property.TextEmphasisStyle | undefined; - /** - * The **`-webkit-text-fill-color`** CSS property specifies the fill color of characters of text. If this property is not set, the value of the `color` property is used. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - WebkitTextFillColor?: Property.WebkitTextFillColor | undefined; - /** - * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. - * - * **Syntax**: `mixed | upright | sideways` - * - * **Initial value**: `mixed` - */ - WebkitTextOrientation?: Property.TextOrientation | undefined; - /** - * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. - * - * **Syntax**: `none | auto | <percentage>` - * - * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). - */ - WebkitTextSizeAdjust?: Property.TextSizeAdjust | undefined; - /** - * The **`-webkit-text-stroke-color`** CSS property specifies the stroke color of characters of text. If this property is not set, the value of the `color` property is used. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - WebkitTextStrokeColor?: Property.WebkitTextStrokeColor | undefined; - /** - * The **`-webkit-text-stroke-width`** CSS property specifies the width of the stroke for text. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - WebkitTextStrokeWidth?: Property.WebkitTextStrokeWidth<TLength> | undefined; - /** - * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. - * - * **Syntax**: `auto | from-font | [ under || [ left | right ] ]` - * - * **Initial value**: `auto` - */ - WebkitTextUnderlinePosition?: Property.TextUnderlinePosition | undefined; - /** - * The `-webkit-touch-callout` CSS property controls the display of the default callout shown when you touch and hold a touch target. - * - * **Syntax**: `default | none` - * - * **Initial value**: `default` - */ - WebkitTouchCallout?: Property.WebkitTouchCallout | undefined; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - */ - WebkitTransform?: Property.Transform | undefined; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - */ - WebkitTransformOrigin?: Property.TransformOrigin<TLength> | undefined; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - */ - WebkitTransformStyle?: Property.TransformStyle | undefined; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - WebkitTransitionDelay?: Property.TransitionDelay<TTime> | undefined; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - WebkitTransitionDuration?: Property.TransitionDuration<TTime> | undefined; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - */ - WebkitTransitionProperty?: Property.TransitionProperty | undefined; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - WebkitTransitionTimingFunction?: Property.TransitionTimingFunction | undefined; - /** - * **Syntax**: `read-only | read-write | read-write-plaintext-only` - * - * **Initial value**: `read-only` - */ - WebkitUserModify?: Property.WebkitUserModify | undefined; - /** - * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - */ - WebkitUserSelect?: Property.UserSelect | undefined; - /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). - * - * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` - * - * **Initial value**: `horizontal-tb` - */ - WebkitWritingMode?: Property.WritingMode | undefined; -} - -export interface VendorShorthandProperties<TLength = (string & {}) | 0, TTime = string & {}> { - /** - * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - */ - MozAnimation?: Property.Animation<TTime> | undefined; - /** - * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - */ - MozBorderImage?: Property.BorderImage | undefined; - /** - * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` - */ - MozColumnRule?: Property.ColumnRule<TLength> | undefined; - /** - * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. - * - * **Syntax**: `<'column-width'> || <'column-count'>` - */ - MozColumns?: Property.Columns<TLength> | undefined; - /** - * In Mozilla applications like Firefox, the **`-moz-outline-radius`** CSS shorthand property can be used to give an element's `outline` rounded corners. - * - * **Syntax**: `<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?` - */ - MozOutlineRadius?: Property.MozOutlineRadius<TLength> | undefined; - /** - * The **`-ms-content-zoom-limit`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-limit-min` and `-ms-content-zoom-limit-max` properties. - * - * **Syntax**: `<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>` - */ - msContentZoomLimit?: Property.MsContentZoomLimit | undefined; - /** - * The **`-ms-content-zoom-snap`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-snap-type` and `-ms-content-zoom-snap-points` properties. - * - * **Syntax**: `<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>` - */ - msContentZoomSnap?: Property.MsContentZoomSnap | undefined; - /** - * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. - * - * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` - */ - msFlex?: Property.Flex<TLength> | undefined; - /** - * The **\-ms-scroll-limit** CSS property is a Microsoft extension that specifies values for the `-ms-scroll-limit-x-min`, `-ms-scroll-limit-y-min`, `-ms-scroll-limit-x-max`, and `-ms-scroll-limit-y-max` properties. - * - * **Syntax**: `<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>` - */ - msScrollLimit?: Property.MsScrollLimit | undefined; - /** - * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-x` properties. - * - * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>` - */ - msScrollSnapX?: Property.MsScrollSnapX | undefined; - /** - * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-y` properties. - * - * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>` - */ - msScrollSnapY?: Property.MsScrollSnapY | undefined; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - */ - msTransition?: Property.Transition<TTime> | undefined; - /** - * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - */ - WebkitAnimation?: Property.Animation<TTime> | undefined; - /** - * The **`-webkit-border-before`** CSS property is a shorthand property for setting the individual logical block start border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-width'> || <'border-style'> || <color>` - */ - WebkitBorderBefore?: Property.WebkitBorderBefore<TLength> | undefined; - /** - * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - */ - WebkitBorderImage?: Property.BorderImage | undefined; - /** - * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. - * - * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` - */ - WebkitBorderRadius?: Property.BorderRadius<TLength> | undefined; - /** - * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` - */ - WebkitColumnRule?: Property.ColumnRule<TLength> | undefined; - /** - * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. - * - * **Syntax**: `<'column-width'> || <'column-count'>` - */ - WebkitColumns?: Property.Columns<TLength> | undefined; - /** - * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. - * - * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` - */ - WebkitFlex?: Property.Flex<TLength> | undefined; - /** - * The **`flex-flow`** CSS shorthand property specifies the direction of a flex container, as well as its wrapping behavior. - * - * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` - */ - WebkitFlexFlow?: Property.FlexFlow | undefined; - /** - * The **`mask`** CSS shorthand property hides an element (partially or fully) by masking or clipping the image at specific points. - * - * **Syntax**: `[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#` - */ - WebkitMask?: Property.WebkitMask<TLength> | undefined; - /** - * The **`mask-border`** CSS shorthand property lets you create a mask along the edge of an element's border. - * - * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` - */ - WebkitMaskBoxImage?: Property.MaskBorder | undefined; - /** - * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. - * - * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` - */ - WebkitTextEmphasis?: Property.TextEmphasis | undefined; - /** - * The **`-webkit-text-stroke`** CSS property specifies the width and color of strokes for text characters. This is a shorthand property for the longhand properties `-webkit-text-stroke-width` and `-webkit-text-stroke-color`. - * - * **Syntax**: `<length> || <color>` - */ - WebkitTextStroke?: Property.WebkitTextStroke<TLength> | undefined; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - */ - WebkitTransition?: Property.Transition<TTime> | undefined; -} - -export interface VendorProperties<TLength = (string & {}) | 0, TTime = string & {}> extends VendorLonghandProperties<TLength, TTime>, VendorShorthandProperties<TLength, TTime> {} - -export interface ObsoleteProperties<TLength = (string & {}) | 0, TTime = string & {}> { - /** - * In combination with `elevation`, the **`azimuth`** CSS property enables different audio sources to be positioned spatially for aural presentation. This is important in that it provides a natural way to tell several voices apart, as each can be positioned to originate at a different location on the sound stage. Stereo output produce a lateral sound stage, while binaural headphones and multi-speaker setups allow for a fully three-dimensional stage. - * - * **Syntax**: `<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards` - * - * **Initial value**: `center` - * - * @deprecated - */ - azimuth?: Property.Azimuth | undefined; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - boxAlign?: Property.BoxAlign | undefined; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - boxDirection?: Property.BoxDirection | undefined; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - boxFlex?: Property.BoxFlex | undefined; - /** - * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - boxFlexGroup?: Property.BoxFlexGroup | undefined; - /** - * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). - * - * **Syntax**: `single | multiple` - * - * **Initial value**: `single` - * - * @deprecated - */ - boxLines?: Property.BoxLines | undefined; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - boxOrdinalGroup?: Property.BoxOrdinalGroup | undefined; - /** - * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - boxOrient?: Property.BoxOrient | undefined; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - boxPack?: Property.BoxPack | undefined; - /** - * The **`clip`** CSS property defines a visible portion of an element. The `clip` property applies only to absolutely positioned elements — that is, elements with `position:absolute` or `position:fixed`. - * - * **Syntax**: `<shape> | auto` - * - * **Initial value**: `auto` - * - * @deprecated - */ - clip?: Property.Clip | undefined; - /** - * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * @deprecated - */ - gridColumnGap?: Property.GridColumnGap<TLength> | undefined; - /** - * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. - * - * **Syntax**: `<'grid-row-gap'> <'grid-column-gap'>?` - * - * @deprecated - */ - gridGap?: Property.GridGap<TLength> | undefined; - /** - * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * @deprecated - */ - gridRowGap?: Property.GridRowGap<TLength> | undefined; - /** - * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. - * - * **Syntax**: `auto | normal | active | inactive | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - imeMode?: Property.ImeMode | undefined; - /** - * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * @deprecated - */ - offsetBlock?: Property.InsetBlock<TLength> | undefined; - /** - * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - offsetBlockEnd?: Property.InsetBlockEnd<TLength> | undefined; - /** - * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - offsetBlockStart?: Property.InsetBlockStart<TLength> | undefined; - /** - * The **`inset-inline`** CSS property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * @deprecated - */ - offsetInline?: Property.InsetInline<TLength> | undefined; - /** - * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - offsetInlineEnd?: Property.InsetInlineEnd<TLength> | undefined; - /** - * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - offsetInlineStart?: Property.InsetInlineStart<TLength> | undefined; - /** - * The **`scroll-snap-coordinate`** CSS property defines the x and y coordinate positions within an element that will align with its nearest ancestor scroll container's `scroll-snap-destination` for each respective axis. - * - * **Syntax**: `none | <position>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - scrollSnapCoordinate?: Property.ScrollSnapCoordinate<TLength> | undefined; - /** - * The **`scroll-snap-destination`** CSS property defines the position in x and y coordinates within the scroll container's visual viewport which element snap points align with. - * - * **Syntax**: `<position>` - * - * **Initial value**: `0px 0px` - * - * @deprecated - */ - scrollSnapDestination?: Property.ScrollSnapDestination<TLength> | undefined; - /** - * The **`scroll-snap-points-x`** CSS property defines the horizontal positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - scrollSnapPointsX?: Property.ScrollSnapPointsX | undefined; - /** - * The **`scroll-snap-points-y`** CSS property defines the vertical positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - scrollSnapPointsY?: Property.ScrollSnapPointsY | undefined; - /** - * The **`scroll-snap-type-x`** CSS property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one. - * - * **Syntax**: `none | mandatory | proximity` - * - * **Initial value**: `none` - * - * @deprecated - */ - scrollSnapTypeX?: Property.ScrollSnapTypeX | undefined; - /** - * The **`scroll-snap-type-y`** CSS property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one. - * - * **Syntax**: `none | mandatory | proximity` - * - * **Initial value**: `none` - * - * @deprecated - */ - scrollSnapTypeY?: Property.ScrollSnapTypeY | undefined; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - KhtmlBoxAlign?: Property.BoxAlign | undefined; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - KhtmlBoxDirection?: Property.BoxDirection | undefined; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - KhtmlBoxFlex?: Property.BoxFlex | undefined; - /** - * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - KhtmlBoxFlexGroup?: Property.BoxFlexGroup | undefined; - /** - * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). - * - * **Syntax**: `single | multiple` - * - * **Initial value**: `single` - * - * @deprecated - */ - KhtmlBoxLines?: Property.BoxLines | undefined; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - KhtmlBoxOrdinalGroup?: Property.BoxOrdinalGroup | undefined; - /** - * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - KhtmlBoxOrient?: Property.BoxOrient | undefined; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - KhtmlBoxPack?: Property.BoxPack | undefined; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - * - * @deprecated - */ - KhtmlLineBreak?: Property.LineBreak | undefined; - /** - * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `1` - * - * @deprecated - */ - KhtmlOpacity?: Property.Opacity | undefined; - /** - * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - * - * @deprecated - */ - KhtmlUserSelect?: Property.UserSelect | undefined; - /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. - * - * **Syntax**: `visible | hidden` - * - * **Initial value**: `visible` - * - * @deprecated - */ - MozBackfaceVisibility?: Property.BackfaceVisibility | undefined; - /** - * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `border-box` - * - * @deprecated - */ - MozBackgroundClip?: Property.BackgroundClip | undefined; - /** - * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. - * - * **Syntax**: `slice | clone` - * - * **Initial value**: `slice` - * - * @deprecated - */ - MozBackgroundInlinePolicy?: Property.BoxDecorationBreak | undefined; - /** - * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `padding-box` - * - * @deprecated - */ - MozBackgroundOrigin?: Property.BackgroundOrigin | undefined; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * @deprecated - */ - MozBackgroundSize?: Property.BackgroundSize<TLength> | undefined; - /** - * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. - * - * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` - * - * @deprecated - */ - MozBorderRadius?: Property.BorderRadius<TLength> | undefined; - /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozBorderRadiusBottomleft?: Property.BorderBottomLeftRadius<TLength> | undefined; - /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozBorderRadiusBottomright?: Property.BorderBottomRightRadius<TLength> | undefined; - /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozBorderRadiusTopleft?: Property.BorderTopLeftRadius<TLength> | undefined; - /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozBorderRadiusTopright?: Property.BorderTopRightRadius<TLength> | undefined; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - MozBoxAlign?: Property.BoxAlign | undefined; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - MozBoxDirection?: Property.BoxDirection | undefined; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozBoxFlex?: Property.BoxFlex | undefined; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - MozBoxOrdinalGroup?: Property.BoxOrdinalGroup | undefined; - /** - * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - MozBoxOrient?: Property.BoxOrient | undefined; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - MozBoxPack?: Property.BoxPack | undefined; - /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. - * - * **Syntax**: `none | <shadow>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - MozBoxShadow?: Property.BoxShadow | undefined; - /** - * The non-standard **`-moz-float-edge`** CSS property specifies whether the height and width properties of the element include the margin, border, or padding thickness. - * - * **Syntax**: `border-box | content-box | margin-box | padding-box` - * - * **Initial value**: `content-box` - * - * @deprecated - */ - MozFloatEdge?: Property.MozFloatEdge | undefined; - /** - * The **`-moz-force-broken-image-icon`** extended CSS property can be used to force the broken image icon to be shown even when a broken image has an `alt` attribute. - * - * **Syntax**: `0 | 1` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozForceBrokenImageIcon?: Property.MozForceBrokenImageIcon | undefined; - /** - * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `1` - * - * @deprecated - */ - MozOpacity?: Property.Opacity | undefined; - /** - * The **`outline`** CSS shorthand property sets most of the outline properties in a single declaration. - * - * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` - * - * @deprecated - */ - MozOutline?: Property.Outline<TLength> | undefined; - /** - * The **`outline-color`** CSS property sets the color of an element's outline. - * - * **Syntax**: `<color> | invert` - * - * **Initial value**: `invert`, for browsers supporting it, `currentColor` for the other - * - * @deprecated - */ - MozOutlineColor?: Property.OutlineColor | undefined; - /** - * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `auto | <'border-style'>` - * - * **Initial value**: `none` - * - * @deprecated - */ - MozOutlineStyle?: Property.OutlineStyle | undefined; - /** - * The CSS **`outline-width`** property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * @deprecated - */ - MozOutlineWidth?: Property.OutlineWidth<TLength> | undefined; - /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - * - * @deprecated - */ - MozPerspective?: Property.Perspective<TLength> | undefined; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * @deprecated - */ - MozPerspectiveOrigin?: Property.PerspectiveOrigin<TLength> | undefined; - /** - * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. - * - * **Syntax**: `auto | start | end | left | right | center | justify` - * - * **Initial value**: `auto` - * - * @deprecated - */ - MozTextAlignLast?: Property.TextAlignLast | undefined; - /** - * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * @deprecated - */ - MozTextDecorationColor?: Property.TextDecorationColor | undefined; - /** - * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. - * - * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` - * - * **Initial value**: `none` - * - * @deprecated - */ - MozTextDecorationLine?: Property.TextDecorationLine | undefined; - /** - * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. - * - * **Syntax**: `solid | double | dotted | dashed | wavy` - * - * **Initial value**: `solid` - * - * @deprecated - */ - MozTextDecorationStyle?: Property.TextDecorationStyle | undefined; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - * - * @deprecated - */ - MozTransform?: Property.Transform | undefined; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - * - * @deprecated - */ - MozTransformOrigin?: Property.TransformOrigin<TLength> | undefined; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - * - * @deprecated - */ - MozTransformStyle?: Property.TransformStyle | undefined; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - * - * @deprecated - */ - MozTransition?: Property.Transition<TTime> | undefined; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - MozTransitionDelay?: Property.TransitionDelay<TTime> | undefined; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - MozTransitionDuration?: Property.TransitionDuration<TTime> | undefined; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - * - * @deprecated - */ - MozTransitionProperty?: Property.TransitionProperty | undefined; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * @deprecated - */ - MozTransitionTimingFunction?: Property.TransitionTimingFunction | undefined; - /** - * In Mozilla applications, **`-moz-user-input`** determines if an element will accept user input. - * - * **Syntax**: `auto | none | enabled | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - MozUserInput?: Property.MozUserInput | undefined; - /** - * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. - * - * **Syntax**: `auto | normal | active | inactive | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - msImeMode?: Property.ImeMode | undefined; - /** - * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - * - * @deprecated - */ - OAnimation?: Property.Animation<TTime> | undefined; - /** - * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - OAnimationDelay?: Property.AnimationDelay<TTime> | undefined; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - * - * @deprecated - */ - OAnimationDirection?: Property.AnimationDirection | undefined; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - OAnimationDuration?: Property.AnimationDuration<TTime> | undefined; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - OAnimationFillMode?: Property.AnimationFillMode | undefined; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - * - * @deprecated - */ - OAnimationIterationCount?: Property.AnimationIterationCount | undefined; - /** - * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - * - * @deprecated - */ - OAnimationName?: Property.AnimationName | undefined; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - * - * @deprecated - */ - OAnimationPlayState?: Property.AnimationPlayState | undefined; - /** - * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * @deprecated - */ - OAnimationTimingFunction?: Property.AnimationTimingFunction | undefined; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * @deprecated - */ - OBackgroundSize?: Property.BackgroundSize<TLength> | undefined; - /** - * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - * - * @deprecated - */ - OBorderImage?: Property.BorderImage | undefined; - /** - * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. - * - * **Syntax**: `fill | contain | cover | none | scale-down` - * - * **Initial value**: `fill` - * - * @deprecated - */ - OObjectFit?: Property.ObjectFit | undefined; - /** - * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * @deprecated - */ - OObjectPosition?: Property.ObjectPosition<TLength> | undefined; - /** - * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - * - * @deprecated - */ - OTabSize?: Property.TabSize<TLength> | undefined; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - * - * @deprecated - */ - OTextOverflow?: Property.TextOverflow | undefined; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - * - * @deprecated - */ - OTransform?: Property.Transform | undefined; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - * - * @deprecated - */ - OTransformOrigin?: Property.TransformOrigin<TLength> | undefined; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - * - * @deprecated - */ - OTransition?: Property.Transition<TTime> | undefined; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - OTransitionDelay?: Property.TransitionDelay<TTime> | undefined; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - OTransitionDuration?: Property.TransitionDuration<TTime> | undefined; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - * - * @deprecated - */ - OTransitionProperty?: Property.TransitionProperty | undefined; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * @deprecated - */ - OTransitionTimingFunction?: Property.TransitionTimingFunction | undefined; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - WebkitBoxAlign?: Property.BoxAlign | undefined; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - WebkitBoxDirection?: Property.BoxDirection | undefined; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - WebkitBoxFlex?: Property.BoxFlex | undefined; - /** - * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - WebkitBoxFlexGroup?: Property.BoxFlexGroup | undefined; - /** - * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). - * - * **Syntax**: `single | multiple` - * - * **Initial value**: `single` - * - * @deprecated - */ - WebkitBoxLines?: Property.BoxLines | undefined; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - WebkitBoxOrdinalGroup?: Property.BoxOrdinalGroup | undefined; - /** - * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - WebkitBoxOrient?: Property.BoxOrient | undefined; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - WebkitBoxPack?: Property.BoxPack | undefined; -} - -export interface SvgProperties<TLength = (string & {}) | 0, TTime = string & {}> { - alignmentBaseline?: Property.AlignmentBaseline | undefined; - baselineShift?: Property.BaselineShift<TLength> | undefined; - clip?: Property.Clip | undefined; - clipPath?: Property.ClipPath | undefined; - clipRule?: Property.ClipRule | undefined; - color?: Property.Color | undefined; - colorInterpolation?: Property.ColorInterpolation | undefined; - colorRendering?: Property.ColorRendering | undefined; - cursor?: Property.Cursor | undefined; - direction?: Property.Direction | undefined; - display?: Property.Display | undefined; - dominantBaseline?: Property.DominantBaseline | undefined; - fill?: Property.Fill | undefined; - fillOpacity?: Property.FillOpacity | undefined; - fillRule?: Property.FillRule | undefined; - filter?: Property.Filter | undefined; - floodColor?: Property.FloodColor | undefined; - floodOpacity?: Property.FloodOpacity | undefined; - font?: Property.Font | undefined; - fontFamily?: Property.FontFamily | undefined; - fontSize?: Property.FontSize<TLength> | undefined; - fontSizeAdjust?: Property.FontSizeAdjust | undefined; - fontStretch?: Property.FontStretch | undefined; - fontStyle?: Property.FontStyle | undefined; - fontVariant?: Property.FontVariant | undefined; - fontWeight?: Property.FontWeight | undefined; - glyphOrientationVertical?: Property.GlyphOrientationVertical | undefined; - imageRendering?: Property.ImageRendering | undefined; - letterSpacing?: Property.LetterSpacing<TLength> | undefined; - lightingColor?: Property.LightingColor | undefined; - lineHeight?: Property.LineHeight<TLength> | undefined; - marker?: Property.Marker | undefined; - markerEnd?: Property.MarkerEnd | undefined; - markerMid?: Property.MarkerMid | undefined; - markerStart?: Property.MarkerStart | undefined; - mask?: Property.Mask<TLength> | undefined; - opacity?: Property.Opacity | undefined; - overflow?: Property.Overflow | undefined; - paintOrder?: Property.PaintOrder | undefined; - pointerEvents?: Property.PointerEvents | undefined; - shapeRendering?: Property.ShapeRendering | undefined; - stopColor?: Property.StopColor | undefined; - stopOpacity?: Property.StopOpacity | undefined; - stroke?: Property.Stroke | undefined; - strokeDasharray?: Property.StrokeDasharray<TLength> | undefined; - strokeDashoffset?: Property.StrokeDashoffset<TLength> | undefined; - strokeLinecap?: Property.StrokeLinecap | undefined; - strokeLinejoin?: Property.StrokeLinejoin | undefined; - strokeMiterlimit?: Property.StrokeMiterlimit | undefined; - strokeOpacity?: Property.StrokeOpacity | undefined; - strokeWidth?: Property.StrokeWidth<TLength> | undefined; - textAnchor?: Property.TextAnchor | undefined; - textDecoration?: Property.TextDecoration<TLength> | undefined; - textRendering?: Property.TextRendering | undefined; - unicodeBidi?: Property.UnicodeBidi | undefined; - vectorEffect?: Property.VectorEffect | undefined; - visibility?: Property.Visibility | undefined; - whiteSpace?: Property.WhiteSpace | undefined; - wordSpacing?: Property.WordSpacing<TLength> | undefined; - writingMode?: Property.WritingMode | undefined; -} - -export interface Properties<TLength = (string & {}) | 0, TTime = string & {}> - extends StandardProperties<TLength, TTime>, - VendorProperties<TLength, TTime>, - ObsoleteProperties<TLength, TTime>, - SvgProperties<TLength, TTime> {} - -export interface StandardLonghandPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { - /** - * The **`accent-color`** CSS property sets the accent color for user-interface controls generated by some elements. - * - * **Syntax**: `auto | <color>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **93** | **92** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/accent-color - */ - "accent-color"?: Property.AccentColor | undefined; - /** - * The CSS **`align-content`** property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. - * - * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **28** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-content - */ - "align-content"?: Property.AlignContent | undefined; - /** - * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. - * - * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-items - */ - "align-items"?: Property.AlignItems | undefined; - /** - * The **`align-self`** CSS property overrides a grid or flex item's `align-items` value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. - * - * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **10** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-self - */ - "align-self"?: Property.AlignSelf | undefined; - /** - * The **`align-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their block axis. - * - * **Syntax**: `[ normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-tracks - */ - "align-tracks"?: Property.AlignTracks | undefined; - /** - * The **`animation-composition`** CSS property specifies the composite operation to use when multiple animations affect the same property simultaneously. - * - * **Syntax**: `<single-animation-composition>#` - * - * **Initial value**: `replace` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **112** | **115** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-composition - */ - "animation-composition"?: Property.AnimationComposition | undefined; - /** - * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-delay - */ - "animation-delay"?: Property.AnimationDelay<TTime> | undefined; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-direction - */ - "animation-direction"?: Property.AnimationDirection | undefined; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-duration - */ - "animation-duration"?: Property.AnimationDuration<TTime> | undefined; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 5 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode - */ - "animation-fill-mode"?: Property.AnimationFillMode | undefined; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count - */ - "animation-iteration-count"?: Property.AnimationIterationCount | undefined; - /** - * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-name - */ - "animation-name"?: Property.AnimationName | undefined; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-play-state - */ - "animation-play-state"?: Property.AnimationPlayState | undefined; - /** - * The **`animation-range-end`** CSS property is used to set the end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will end. - * - * **Syntax**: `[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-range-end - */ - "animation-range-end"?: Property.AnimationRangeEnd<TLength> | undefined; - /** - * The **`animation-range-start`** CSS property is used to set the start of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start. - * - * **Syntax**: `[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-range-start - */ - "animation-range-start"?: Property.AnimationRangeStart<TLength> | undefined; - /** - * The **`animation-timeline`** CSS property specifies the timeline that is used to control the progress of an animation. - * - * **Syntax**: `<single-animation-timeline>#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-timeline - */ - "animation-timeline"?: Property.AnimationTimeline | undefined; - /** - * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-timing-function - */ - "animation-timing-function"?: Property.AnimationTimingFunction | undefined; - /** - * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. - * - * **Syntax**: `none | auto | textfield | menulist-button | <compat-auto>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :------: | :-: | - * | **84** | **80** | **15.4** | **84** | No | - * | 1 _-x-_ | 1 _-x-_ | 3 _-x-_ | 12 _-x-_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/appearance - */ - appearance?: Property.Appearance | undefined; - /** - * The **`aspect-ratio`** CSS property sets a **preferred aspect ratio** for the box, which will be used in the calculation of auto sizes and some other layout functions. - * - * **Syntax**: `auto | <ratio>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **88** | **89** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/aspect-ratio - */ - "aspect-ratio"?: Property.AspectRatio | undefined; - /** - * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------: | :----: | :-: | - * | **76** | **103** | **9** _-x-_ | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/backdrop-filter - */ - "backdrop-filter"?: Property.BackdropFilter | undefined; - /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. - * - * **Syntax**: `visible | hidden` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-------: | :----: | :----: | - * | **36** | **16** | **15.4** | **12** | **10** | - * | 12 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/backface-visibility - */ - "backface-visibility"?: Property.BackfaceVisibility | undefined; - /** - * The **`background-attachment`** CSS property sets whether a background image's position is fixed within the viewport, or scrolls with its containing block. - * - * **Syntax**: `<attachment>#` - * - * **Initial value**: `scroll` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-attachment - */ - "background-attachment"?: Property.BackgroundAttachment | undefined; - /** - * The **`background-blend-mode`** CSS property sets how an element's background images should blend with each other and with the element's background color. - * - * **Syntax**: `<blend-mode>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **35** | **30** | **8** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-blend-mode - */ - "background-blend-mode"?: Property.BackgroundBlendMode | undefined; - /** - * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `border-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **4** | **5** | **12** | **9** | - * | | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-clip - */ - "background-clip"?: Property.BackgroundClip | undefined; - /** - * The **`background-color`** CSS property sets the background color of an element. - * - * **Syntax**: `<color>` - * - * **Initial value**: `transparent` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-color - */ - "background-color"?: Property.BackgroundColor | undefined; - /** - * The **`background-image`** CSS property sets one or more background images on an element. - * - * **Syntax**: `<bg-image>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-image - */ - "background-image"?: Property.BackgroundImage | undefined; - /** - * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `padding-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **4** | **3** | **12** | **9** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-origin - */ - "background-origin"?: Property.BackgroundOrigin | undefined; - /** - * The **`background-position-x`** CSS property sets the initial horizontal position for each background image. The position is relative to the position layer set by `background-origin`. - * - * **Syntax**: `[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#` - * - * **Initial value**: `0%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **49** | **1** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-position-x - */ - "background-position-x"?: Property.BackgroundPositionX<TLength> | undefined; - /** - * The **`background-position-y`** CSS property sets the initial vertical position for each background image. The position is relative to the position layer set by `background-origin`. - * - * **Syntax**: `[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#` - * - * **Initial value**: `0%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **49** | **1** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-position-y - */ - "background-position-y"?: Property.BackgroundPositionY<TLength> | undefined; - /** - * The **`background-repeat`** CSS property sets how background images are repeated. A background image can be repeated along the horizontal and vertical axes, or not repeated at all. - * - * **Syntax**: `<repeat-style>#` - * - * **Initial value**: `repeat` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-repeat - */ - "background-repeat"?: Property.BackgroundRepeat | undefined; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **3** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-size - */ - "background-size"?: Property.BackgroundSize<TLength> | undefined; - /** - * **Syntax**: `clip | ellipsis | <string>` - * - * **Initial value**: `clip` - */ - "block-overflow"?: Property.BlockOverflow | undefined; - /** - * The **`block-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'width'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/block-size - */ - "block-size"?: Property.BlockSize<TLength> | undefined; - /** - * The **`border-block-color`** CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>{1,2}` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-color - */ - "border-block-color"?: Property.BorderBlockColor | undefined; - /** - * The **`border-block-end-color`** CSS property defines the color of the logical block-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-color - */ - "border-block-end-color"?: Property.BorderBlockEndColor | undefined; - /** - * The **`border-block-end-style`** CSS property defines the style of the logical block-end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-style - */ - "border-block-end-style"?: Property.BorderBlockEndStyle | undefined; - /** - * The **`border-block-end-width`** CSS property defines the width of the logical block-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-width - */ - "border-block-end-width"?: Property.BorderBlockEndWidth<TLength> | undefined; - /** - * The **`border-block-start-color`** CSS property defines the color of the logical block-start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-color - */ - "border-block-start-color"?: Property.BorderBlockStartColor | undefined; - /** - * The **`border-block-start-style`** CSS property defines the style of the logical block start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-style - */ - "border-block-start-style"?: Property.BorderBlockStartStyle | undefined; - /** - * The **`border-block-start-width`** CSS property defines the width of the logical block-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-width - */ - "border-block-start-width"?: Property.BorderBlockStartWidth<TLength> | undefined; - /** - * The **`border-block-style`** CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-style - */ - "border-block-style"?: Property.BorderBlockStyle | undefined; - /** - * The **`border-block-width`** CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-width - */ - "border-block-width"?: Property.BorderBlockWidth<TLength> | undefined; - /** - * The **`border-bottom-color`** CSS property sets the color of an element's bottom border. It can also be set with the shorthand CSS properties `border-color` or `border-bottom`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-color - */ - "border-bottom-color"?: Property.BorderBottomColor | undefined; - /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius - */ - "border-bottom-left-radius"?: Property.BorderBottomLeftRadius<TLength> | undefined; - /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius - */ - "border-bottom-right-radius"?: Property.BorderBottomRightRadius<TLength> | undefined; - /** - * The **`border-bottom-style`** CSS property sets the line style of an element's bottom `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-style - */ - "border-bottom-style"?: Property.BorderBottomStyle | undefined; - /** - * The **`border-bottom-width`** CSS property sets the width of the bottom border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-width - */ - "border-bottom-width"?: Property.BorderBottomWidth<TLength> | undefined; - /** - * The **`border-collapse`** CSS property sets whether cells inside a `<table>` have shared or separate borders. - * - * **Syntax**: `collapse | separate` - * - * **Initial value**: `separate` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-collapse - */ - "border-collapse"?: Property.BorderCollapse | undefined; - /** - * The **`border-end-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius - */ - "border-end-end-radius"?: Property.BorderEndEndRadius<TLength> | undefined; - /** - * The **`border-end-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius - */ - "border-end-start-radius"?: Property.BorderEndStartRadius<TLength> | undefined; - /** - * The **`border-image-outset`** CSS property sets the distance by which an element's border image is set out from its border box. - * - * **Syntax**: `[ <length> | <number> ]{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-outset - */ - "border-image-outset"?: Property.BorderImageOutset<TLength> | undefined; - /** - * The **`border-image-repeat`** CSS property defines how the edge regions and middle region of a source image are adjusted to fit the dimensions of an element's border image. The middle region can be displayed by using the keyword "fill" in the border-image-slice property. - * - * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` - * - * **Initial value**: `stretch` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-repeat - */ - "border-image-repeat"?: Property.BorderImageRepeat | undefined; - /** - * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. - * - * **Syntax**: `<number-percentage>{1,4} && fill?` - * - * **Initial value**: `100%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-slice - */ - "border-image-slice"?: Property.BorderImageSlice | undefined; - /** - * The **`border-image-source`** CSS property sets the source image used to create an element's border image. - * - * **Syntax**: `none | <image>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-source - */ - "border-image-source"?: Property.BorderImageSource | undefined; - /** - * The **`border-image-width`** CSS property sets the width of an element's border image. - * - * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **13** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-width - */ - "border-image-width"?: Property.BorderImageWidth<TLength> | undefined; - /** - * The **`border-inline-color`** CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>{1,2}` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-color - */ - "border-inline-color"?: Property.BorderInlineColor | undefined; - /** - * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-end-color)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color - */ - "border-inline-end-color"?: Property.BorderInlineEndColor | undefined; - /** - * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-end-style)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style - */ - "border-inline-end-style"?: Property.BorderInlineEndStyle | undefined; - /** - * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-end-width)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width - */ - "border-inline-end-width"?: Property.BorderInlineEndWidth<TLength> | undefined; - /** - * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :---------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-start-color)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color - */ - "border-inline-start-color"?: Property.BorderInlineStartColor | undefined; - /** - * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :---------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-start-style)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style - */ - "border-inline-start-style"?: Property.BorderInlineStartStyle | undefined; - /** - * The **`border-inline-start-width`** CSS property defines the width of the logical inline-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width - */ - "border-inline-start-width"?: Property.BorderInlineStartWidth<TLength> | undefined; - /** - * The **`border-inline-style`** CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-style - */ - "border-inline-style"?: Property.BorderInlineStyle | undefined; - /** - * The **`border-inline-width`** CSS property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-width - */ - "border-inline-width"?: Property.BorderInlineWidth<TLength> | undefined; - /** - * The **`border-left-color`** CSS property sets the color of an element's left border. It can also be set with the shorthand CSS properties `border-color` or `border-left`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left-color - */ - "border-left-color"?: Property.BorderLeftColor | undefined; - /** - * The **`border-left-style`** CSS property sets the line style of an element's left `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left-style - */ - "border-left-style"?: Property.BorderLeftStyle | undefined; - /** - * The **`border-left-width`** CSS property sets the width of the left border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left-width - */ - "border-left-width"?: Property.BorderLeftWidth<TLength> | undefined; - /** - * The **`border-right-color`** CSS property sets the color of an element's right border. It can also be set with the shorthand CSS properties `border-color` or `border-right`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right-color - */ - "border-right-color"?: Property.BorderRightColor | undefined; - /** - * The **`border-right-style`** CSS property sets the line style of an element's right `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right-style - */ - "border-right-style"?: Property.BorderRightStyle | undefined; - /** - * The **`border-right-width`** CSS property sets the width of the right border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right-width - */ - "border-right-width"?: Property.BorderRightWidth<TLength> | undefined; - /** - * The **`border-spacing`** CSS property sets the distance between the borders of adjacent cells in a `<table>`. This property applies only when `border-collapse` is `separate`. - * - * **Syntax**: `<length> <length>?` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-spacing - */ - "border-spacing"?: Property.BorderSpacing<TLength> | undefined; - /** - * The **`border-start-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius - */ - "border-start-end-radius"?: Property.BorderStartEndRadius<TLength> | undefined; - /** - * The **`border-start-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius - */ - "border-start-start-radius"?: Property.BorderStartStartRadius<TLength> | undefined; - /** - * The **`border-top-color`** CSS property sets the color of an element's top border. It can also be set with the shorthand CSS properties `border-color` or `border-top`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-color - */ - "border-top-color"?: Property.BorderTopColor | undefined; - /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius - */ - "border-top-left-radius"?: Property.BorderTopLeftRadius<TLength> | undefined; - /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius - */ - "border-top-right-radius"?: Property.BorderTopRightRadius<TLength> | undefined; - /** - * The **`border-top-style`** CSS property sets the line style of an element's top `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-style - */ - "border-top-style"?: Property.BorderTopStyle | undefined; - /** - * The **`border-top-width`** CSS property sets the width of the top border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-width - */ - "border-top-width"?: Property.BorderTopWidth<TLength> | undefined; - /** - * The **`bottom`** CSS property participates in setting the vertical position of a positioned element. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/bottom - */ - bottom?: Property.Bottom<TLength> | undefined; - /** - * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. - * - * **Syntax**: `slice | clone` - * - * **Initial value**: `slice` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------: | :-----: | :---------: | :--: | :-: | - * | **22** _-x-_ | **32** | **7** _-x-_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/box-decoration-break - */ - "box-decoration-break"?: Property.BoxDecorationBreak | undefined; - /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. - * - * **Syntax**: `none | <shadow>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **10** | **4** | **5.1** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/box-shadow - */ - "box-shadow"?: Property.BoxShadow | undefined; - /** - * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. - * - * **Syntax**: `content-box | border-box` - * - * **Initial value**: `content-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **10** | **29** | **5.1** | **12** | **8** | - * | 1 _-x-_ | 1 _-x-_ | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/box-sizing - */ - "box-sizing"?: Property.BoxSizing | undefined; - /** - * The **`break-after`** CSS property sets how page, column, or region breaks should behave after a generated box. If there is no generated box, the property is ignored. - * - * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **50** | **65** | **10** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/break-after - */ - "break-after"?: Property.BreakAfter | undefined; - /** - * The **`break-before`** CSS property sets how page, column, or region breaks should behave before a generated box. If there is no generated box, the property is ignored. - * - * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **50** | **65** | **10** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/break-before - */ - "break-before"?: Property.BreakBefore | undefined; - /** - * The **`break-inside`** CSS property sets how page, column, or region breaks should behave inside a generated box. If there is no generated box, the property is ignored. - * - * **Syntax**: `auto | avoid | avoid-page | avoid-column | avoid-region` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **50** | **65** | **10** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/break-inside - */ - "break-inside"?: Property.BreakInside | undefined; - /** - * The **`caption-side`** CSS property puts the content of a table's `<caption>` on the specified side. The values are relative to the `writing-mode` of the table. - * - * **Syntax**: `top | bottom | block-start | block-end | inline-start | inline-end` - * - * **Initial value**: `top` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/caption-side - */ - "caption-side"?: Property.CaptionSide | undefined; - /** - * The **`caret-color`** CSS property sets the color of the **insertion caret**, the visible marker where the next character typed will be inserted. This is sometimes referred to as the **text input cursor**. The caret appears in elements such as `<input>` or those with the `contenteditable` attribute. The caret is typically a thin vertical line that flashes to help make it more noticeable. By default, it is black, but its color can be altered with this property. - * - * **Syntax**: `auto | <color>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **53** | **11.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/caret-color - */ - "caret-color"?: Property.CaretColor | undefined; - /** - * **Syntax**: `auto | bar | block | underscore` - * - * **Initial value**: `auto` - */ - "caret-shape"?: Property.CaretShape | undefined; - /** - * The **`clear`** CSS property sets whether an element must be moved below (cleared) floating elements that precede it. The `clear` property applies to floating and non-floating elements. - * - * **Syntax**: `none | left | right | both | inline-start | inline-end` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/clear - */ - clear?: Property.Clear | undefined; - /** - * The **`clip-path`** CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. - * - * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **55** | **3.5** | **9.1** | **79** | **10** | - * | 23 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/clip-path - */ - "clip-path"?: Property.ClipPath | undefined; - /** - * The **`color`** CSS property sets the foreground color value of an element's text and text decorations, and sets the `currentcolor` value. `currentcolor` may be used as an indirect value on _other_ properties and is the default for other color properties, such as `border-color`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `canvastext` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/color - */ - color?: Property.Color | undefined; - /** - * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. - * - * **Syntax**: `economy | exact` - * - * **Initial value**: `economy` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------: | :-----------------: | :------: | :----------: | :-: | - * | **17** _-x-_ | **97** | **15.4** | **79** _-x-_ | No | - * | | 48 _(color-adjust)_ | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust - */ - "color-adjust"?: Property.PrintColorAdjust | undefined; - /** - * The **`color-scheme`** CSS property allows an element to indicate which color schemes it can comfortably be rendered in. - * - * **Syntax**: `normal | [ light | dark | <custom-ident> ]+ && only?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **81** | **96** | **13** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/color-scheme - */ - "color-scheme"?: Property.ColorScheme | undefined; - /** - * The **`column-count`** CSS property breaks an element's content into the specified number of columns. - * - * **Syntax**: `<integer> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-count - */ - "column-count"?: Property.ColumnCount | undefined; - /** - * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. - * - * **Syntax**: `auto | balance | balance-all` - * - * **Initial value**: `balance` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-fill - */ - "column-fill"?: Property.ColumnFill | undefined; - /** - * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. - * - * **Syntax**: `normal | <length-percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **1** | **1.5** | **3** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-gap - */ - "column-gap"?: Property.ColumnGap<TLength> | undefined; - /** - * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-color - */ - "column-rule-color"?: Property.ColumnRuleColor | undefined; - /** - * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-style - */ - "column-rule-style"?: Property.ColumnRuleStyle | undefined; - /** - * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-width - */ - "column-rule-width"?: Property.ColumnRuleWidth<TLength> | undefined; - /** - * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. - * - * **Syntax**: `none | all` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **50** | **71** | **9** | **12** | **10** | - * | 6 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-span - */ - "column-span"?: Property.ColumnSpan | undefined; - /** - * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. - * - * **Syntax**: `<length> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **50** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-width - */ - "column-width"?: Property.ColumnWidth<TLength> | undefined; - /** - * The **`contain`** CSS property indicates that an element and its contents are, as much as possible, independent from the rest of the document tree. Containment enables isolating a subsection of the DOM, providing performance benefits by limiting calculations of layout, style, paint, size, or any combination to a DOM subtree rather than the entire page. Containment can also be used to scope CSS counters and quotes. - * - * **Syntax**: `none | strict | content | [ [ size || inline-size ] || layout || style || paint ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **52** | **69** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain - */ - contain?: Property.Contain | undefined; - /** - * The **`contain-intrinsic-block-size`** CSS logical property defines the block size of an element that a browser can use for layout when the element is subject to size containment. - * - * **Syntax**: `auto? [ none | <length> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **95** | **107** | **17** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-contain-intrinsic-block-size - */ - "contain-intrinsic-block-size"?: Property.ContainIntrinsicBlockSize<TLength> | undefined; - /** - * The **`contain-intrinsic-length`** CSS property sets the height of an element that a browser can use for layout when the element is subject to size containment. - * - * **Syntax**: `auto? [ none | <length> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **95** | **107** | **17** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height - */ - "contain-intrinsic-height"?: Property.ContainIntrinsicHeight<TLength> | undefined; - /** - * The **`contain-intrinsic-inline-size`** CSS logical property defines the inline-size of an element that a browser can use for layout when the element is subject to size containment. - * - * **Syntax**: `auto? [ none | <length> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **95** | **107** | **17** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-contain-intrinsic-inline-size - */ - "contain-intrinsic-inline-size"?: Property.ContainIntrinsicInlineSize<TLength> | undefined; - /** - * The **`contain-intrinsic-width`** CSS property sets the width of an element that a browser will use for layout when the element is subject to size containment. - * - * **Syntax**: `auto? [ none | <length> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **95** | **107** | **17** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-width - */ - "contain-intrinsic-width"?: Property.ContainIntrinsicWidth<TLength> | undefined; - /** - * The **container-name** CSS property specifies a list of query container names used by the @container at-rule in a container query. A container query will apply styles to elements based on the size of the nearest ancestor with a containment context. When a containment context is given a name, it can be specifically targeted using the `@container` at-rule instead of the nearest ancestor with containment. - * - * **Syntax**: `none | <custom-ident>+` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **105** | **110** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/container-name - */ - "container-name"?: Property.ContainerName | undefined; - /** - * The **container-type** CSS property is used to define the type of containment used in a container query. - * - * **Syntax**: `normal | size | inline-size` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **105** | **110** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/container-type - */ - "container-type"?: Property.ContainerType | undefined; - /** - * The **`content`** CSS property replaces an element with a generated value. Objects inserted using the `content` property are **anonymous replaced elements**. - * - * **Syntax**: `normal | none | [ <content-replacement> | <content-list> ] [/ [ <string> | <counter> ]+ ]?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/content - */ - content?: Property.Content | undefined; - /** - * The **`content-visibility`** CSS property controls whether or not an element renders its contents at all, along with forcing a strong set of containments, allowing user agents to potentially omit large swathes of layout and rendering work until it becomes needed. It enables the user agent to skip an element's rendering work (including layout and painting) until it is needed — which makes the initial page load much faster. - * - * **Syntax**: `visible | auto | hidden` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :---------: | :----: | :--: | :-: | - * | **85** | **preview** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/content-visibility - */ - "content-visibility"?: Property.ContentVisibility | undefined; - /** - * The **`counter-increment`** CSS property increases or decreases the value of a CSS counter by a given value. - * - * **Syntax**: `[ <counter-name> <integer>? ]+ | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **2** | **1** | **3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/counter-increment - */ - "counter-increment"?: Property.CounterIncrement | undefined; - /** - * The **`counter-reset`** CSS property resets a CSS counter to a given value. This property will create a new counter or reversed counter with the given name on the specified element. - * - * **Syntax**: `[ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **2** | **1** | **3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/counter-reset - */ - "counter-reset"?: Property.CounterReset | undefined; - /** - * The **`counter-set`** CSS property sets a CSS counter to a given value. It manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element. - * - * **Syntax**: `[ <counter-name> <integer>? ]+ | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **85** | **68** | **17.2** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/counter-set - */ - "counter-set"?: Property.CounterSet | undefined; - /** - * The **`cursor`** CSS property sets the mouse cursor, if any, to show when the mouse pointer is over an element. - * - * **Syntax**: `[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/cursor - */ - cursor?: Property.Cursor | undefined; - /** - * The **`direction`** CSS property sets the direction of text, table columns, and horizontal overflow. Use `rtl` for languages written from right to left (like Hebrew or Arabic), and `ltr` for those written from left to right (like English and most other languages). - * - * **Syntax**: `ltr | rtl` - * - * **Initial value**: `ltr` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **2** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/direction - */ - direction?: Property.Direction | undefined; - /** - * The **`display`** CSS property sets whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex. - * - * **Syntax**: `[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>` - * - * **Initial value**: `inline` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/display - */ - display?: Property.Display | undefined; - /** - * The **`empty-cells`** CSS property sets whether borders and backgrounds appear around `<table>` cells that have no visible content. - * - * **Syntax**: `show | hide` - * - * **Initial value**: `show` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/empty-cells - */ - "empty-cells"?: Property.EmptyCells | undefined; - /** - * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :-: | - * | **53** | **35** | **9.1** | **12** | No | - * | 18 _-x-_ | | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/filter - */ - filter?: Property.Filter | undefined; - /** - * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. - * - * **Syntax**: `content | <'width'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **22** | **9** | **12** | **11** | - * | 22 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-basis - */ - "flex-basis"?: Property.FlexBasis<TLength> | undefined; - /** - * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). - * - * **Syntax**: `row | row-reverse | column | column-reverse` - * - * **Initial value**: `row` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :------: | - * | **29** | **81** | **9** | **12** | **11** | - * | 21 _-x-_ | 49 _-x-_ | 7 _-x-_ | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-direction - */ - "flex-direction"?: Property.FlexDirection | undefined; - /** - * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----------------------: | - * | **29** | **20** | **9** | **12** | **11** | - * | 22 _-x-_ | | 7 _-x-_ | | 10 _(-ms-flex-positive)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-grow - */ - "flex-grow"?: Property.FlexGrow | undefined; - /** - * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. - * - * **Syntax**: `<number>` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **10** | - * | 22 _-x-_ | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-shrink - */ - "flex-shrink"?: Property.FlexShrink | undefined; - /** - * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. - * - * **Syntax**: `nowrap | wrap | wrap-reverse` - * - * **Initial value**: `nowrap` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **28** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-wrap - */ - "flex-wrap"?: Property.FlexWrap | undefined; - /** - * The **`float`** CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow (in contrast to absolute positioning). - * - * **Syntax**: `left | right | none | inline-start | inline-end` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/float - */ - float?: Property.Float | undefined; - /** - * The **`font-family`** CSS property specifies a prioritized list of one or more font family names and/or generic family names for the selected element. - * - * **Syntax**: `[ <family-name> | <generic-family> ]#` - * - * **Initial value**: depends on user agent - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-family - */ - "font-family"?: Property.FontFamily | undefined; - /** - * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. - * - * **Syntax**: `normal | <feature-tag-value>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :----: | - * | **48** | **34** | **9.1** | **15** | **10** | - * | 16 _-x-_ | 15 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-feature-settings - */ - "font-feature-settings"?: Property.FontFeatureSettings | undefined; - /** - * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. - * - * **Syntax**: `auto | normal | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **33** | **32** | **9** | n/a | No | - * | | | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-kerning - */ - "font-kerning"?: Property.FontKerning | undefined; - /** - * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. - * - * **Syntax**: `normal | <string>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **34** | No | n/a | No | - * | | 4 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-language-override - */ - "font-language-override"?: Property.FontLanguageOverride | undefined; - /** - * The **`font-optical-sizing`** CSS property sets whether text rendering is optimized for viewing at different sizes. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **79** | **62** | **11** | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing - */ - "font-optical-sizing"?: Property.FontOpticalSizing | undefined; - /** - * **Syntax**: `normal | light | dark | <palette-identifier>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **101** | **107** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-palette - */ - "font-palette"?: Property.FontPalette | undefined; - /** - * The **`font-size`** CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative `<length>` units, such as `em`, `ex`, and so forth. - * - * **Syntax**: `<absolute-size> | <relative-size> | <length-percentage>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-size - */ - "font-size"?: Property.FontSize<TLength> | undefined; - /** - * The **`font-size-adjust`** CSS property sets the size of lower-case letters relative to the current font size (which defines the size of upper-case letters). - * - * **Syntax**: `none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | No | **3** | **16.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-size-adjust - */ - "font-size-adjust"?: Property.FontSizeAdjust | undefined; - /** - * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. - * - * **Syntax**: `auto | never | always | <absolute-size> | <length>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------: | :--------------------------------: | :------------------------------: | :--: | :-: | - * | **5** _(-webkit-font-smoothing)_ | **25** _(-moz-osx-font-smoothing)_ | **4** _(-webkit-font-smoothing)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-smooth - */ - "font-smooth"?: Property.FontSmooth<TLength> | undefined; - /** - * The **`font-stretch`** CSS property selects a normal, condensed, or expanded face from a font. - * - * **Syntax**: `<font-stretch-absolute>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **60** | **9** | **11** | **12** | **9** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-stretch - */ - "font-stretch"?: Property.FontStretch | undefined; - /** - * The **`font-style`** CSS property sets whether a font should be styled with a normal, italic, or oblique face from its `font-family`. - * - * **Syntax**: `normal | italic | oblique <angle>?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-style - */ - "font-style"?: Property.FontStyle | undefined; - /** - * The **`font-synthesis`** CSS property controls which missing typefaces, bold, italic, or small-caps, may be synthesized by the browser. - * - * **Syntax**: `none | [ weight || style || small-caps || position]` - * - * **Initial value**: `weight style small-caps position ` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **97** | **34** | **9** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis - */ - "font-synthesis"?: Property.FontSynthesis | undefined; - /** - * The **`font-synthesis-position`** CSS property lets you specify whether or not a browser may synthesize the subscript and superscript "position" typefaces when they are missing in a font family, while using `font-variant-position` to set the positions. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **118** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-position - */ - "font-synthesis-position"?: Property.FontSynthesisPosition | undefined; - /** - * The **`font-synthesis-small-caps`** CSS property lets you specify whether or not the browser may synthesize small-caps typeface when it is missing in a font family. Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **97** | **111** | **16.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps - */ - "font-synthesis-small-caps"?: Property.FontSynthesisSmallCaps | undefined; - /** - * The **`font-synthesis-style`** CSS property lets you specify whether or not the browser may synthesize the oblique typeface when it is missing in a font family. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **97** | **111** | **16.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style - */ - "font-synthesis-style"?: Property.FontSynthesisStyle | undefined; - /** - * The **`font-synthesis-weight`** CSS property lets you specify whether or not the browser may synthesize the bold typeface when it is missing in a font family. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **97** | **111** | **16.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight - */ - "font-synthesis-weight"?: Property.FontSynthesisWeight | undefined; - /** - * The **`font-variant`** CSS shorthand property allows you to set all the font variants for a font. - * - * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant - */ - "font-variant"?: Property.FontVariant | undefined; - /** - * The **`font-variant-alternates`** CSS property controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in `@font-feature-values`. - * - * **Syntax**: `normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :--: | :-: | - * | **111** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates - */ - "font-variant-alternates"?: Property.FontVariantAlternates | undefined; - /** - * The **`font-variant-caps`** CSS property controls the use of alternate glyphs for capital letters. - * - * **Syntax**: `normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **52** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-caps - */ - "font-variant-caps"?: Property.FontVariantCaps | undefined; - /** - * The **`font-variant-east-asian`** CSS property controls the use of alternate glyphs for East Asian scripts, like Japanese and Chinese. - * - * **Syntax**: `normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **63** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian - */ - "font-variant-east-asian"?: Property.FontVariantEastAsian | undefined; - /** - * **Syntax**: `normal | text | emoji | unicode` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-emoji - */ - "font-variant-emoji"?: Property.FontVariantEmoji | undefined; - /** - * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. - * - * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :--: | :-: | - * | **34** | **34** | **9.1** | n/a | No | - * | 31 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures - */ - "font-variant-ligatures"?: Property.FontVariantLigatures | undefined; - /** - * The **`font-variant-numeric`** CSS property controls the usage of alternate glyphs for numbers, fractions, and ordinal markers. - * - * **Syntax**: `normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **52** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric - */ - "font-variant-numeric"?: Property.FontVariantNumeric | undefined; - /** - * The **`font-variant-position`** CSS property controls the use of alternate, smaller glyphs that are positioned as superscript or subscript. - * - * **Syntax**: `normal | sub | super` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :--: | :-: | - * | **117** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-position - */ - "font-variant-position"?: Property.FontVariantPosition | undefined; - /** - * The **`font-variation-settings`** CSS property provides low-level control over variable font characteristics, by specifying the four letter axis names of the characteristics you want to vary, along with their values. - * - * **Syntax**: `normal | [ <string> <number> ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **62** | **62** | **11** | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variation-settings - */ - "font-variation-settings"?: Property.FontVariationSettings | undefined; - /** - * The **`font-weight`** CSS property sets the weight (or boldness) of the font. The weights available depend on the `font-family` that is currently set. - * - * **Syntax**: `<font-weight-absolute> | bolder | lighter` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **2** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-weight - */ - "font-weight"?: Property.FontWeight | undefined; - /** - * The **`forced-color-adjust`** CSS property allows authors to opt certain elements out of forced colors mode. This then restores the control of those values to CSS. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :-----------------------------: | :---------------------------------: | - * | **89** | **113** | No | **79** | **10** _(-ms-high-contrast-adjust)_ | - * | | | | 12 _(-ms-high-contrast-adjust)_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust - */ - "forced-color-adjust"?: Property.ForcedColorAdjust | undefined; - /** - * The **`grid-auto-columns`** CSS property specifies the size of an implicitly-created grid column track or pattern of tracks. - * - * **Syntax**: `<track-size>+` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-------------------------: | - * | **57** | **70** | **10.1** | **16** | **10** _(-ms-grid-columns)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns - */ - "grid-auto-columns"?: Property.GridAutoColumns<TLength> | undefined; - /** - * The **`grid-auto-flow`** CSS property controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid. - * - * **Syntax**: `[ row | column ] || dense` - * - * **Initial value**: `row` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow - */ - "grid-auto-flow"?: Property.GridAutoFlow | undefined; - /** - * The **`grid-auto-rows`** CSS property specifies the size of an implicitly-created grid row track or pattern of tracks. - * - * **Syntax**: `<track-size>+` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :----------------------: | - * | **57** | **70** | **10.1** | **16** | **10** _(-ms-grid-rows)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows - */ - "grid-auto-rows"?: Property.GridAutoRows<TLength> | undefined; - /** - * The **`grid-column-end`** CSS property specifies a grid item's end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-end - */ - "grid-column-end"?: Property.GridColumnEnd | undefined; - /** - * The **`grid-column-start`** CSS property specifies a grid item's start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-start - */ - "grid-column-start"?: Property.GridColumnStart | undefined; - /** - * The **`grid-row-end`** CSS property specifies a grid item's end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-end - */ - "grid-row-end"?: Property.GridRowEnd | undefined; - /** - * The **`grid-row-start`** CSS property specifies a grid item's start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-start - */ - "grid-row-start"?: Property.GridRowStart | undefined; - /** - * The **`grid-template-areas`** CSS property specifies named grid areas, establishing the cells in the grid and assigning them names. - * - * **Syntax**: `none | <string>+` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-areas - */ - "grid-template-areas"?: Property.GridTemplateAreas | undefined; - /** - * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. - * - * **Syntax**: `none | <track-list> | <auto-track-list> | subgrid <line-name-list>?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-------------------------: | - * | **57** | **52** | **10.1** | **16** | **10** _(-ms-grid-columns)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-columns - */ - "grid-template-columns"?: Property.GridTemplateColumns<TLength> | undefined; - /** - * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. - * - * **Syntax**: `none | <track-list> | <auto-track-list> | subgrid <line-name-list>?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :----------------------: | - * | **57** | **52** | **10.1** | **16** | **10** _(-ms-grid-rows)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-rows - */ - "grid-template-rows"?: Property.GridTemplateRows<TLength> | undefined; - /** - * The **`hanging-punctuation`** CSS property specifies whether a punctuation mark should hang at the start or end of a line of text. Hanging punctuation may be placed outside the line box. - * - * **Syntax**: `none | [ first || [ force-end | allow-end ] || last ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | No | **10** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation - */ - "hanging-punctuation"?: Property.HangingPunctuation | undefined; - /** - * The **`height`** CSS property specifies the height of an element. By default, the property defines the height of the content area. If `box-sizing` is set to `border-box`, however, it instead determines the height of the border area. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/height - */ - height?: Property.Height<TLength> | undefined; - /** - * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. - * - * **Syntax**: `auto | <string>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :--: | :-: | - * | **106** | **98** | **17** | n/a | No | - * | 6 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/hyphenate-character - */ - "hyphenate-character"?: Property.HyphenateCharacter | undefined; - /** - * The **`hyphenate-limit-chars`** CSS property specifies the minimum word length to allow hyphenation of words as well as the the minimum number of characters before and after the hyphen. - * - * **Syntax**: `[ auto | <integer> ]{1,3}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **109** | No | No | n/a | No | - */ - "hyphenate-limit-chars"?: Property.HyphenateLimitChars | undefined; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-------: | :----: | :----------: | - * | **55** | **43** | **17** | **79** | **10** _-x-_ | - * | 13 _-x-_ | 6 _-x-_ | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/hyphens - */ - hyphens?: Property.Hyphens | undefined; - /** - * The **`image-orientation`** CSS property specifies a layout-independent correction to the orientation of an image. - * - * **Syntax**: `from-image | <angle> | [ <angle>? flip ]` - * - * **Initial value**: `from-image` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **81** | **26** | **13.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/image-orientation - */ - "image-orientation"?: Property.ImageOrientation | undefined; - /** - * The **`image-rendering`** CSS property sets an image scaling algorithm. The property applies to an element itself, to any images set in its other properties, and to its descendants. - * - * **Syntax**: `auto | crisp-edges | pixelated` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **13** | **3.6** | **6** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/image-rendering - */ - "image-rendering"?: Property.ImageRendering | undefined; - /** - * **Syntax**: `[ from-image || <resolution> ] && snap?` - * - * **Initial value**: `1dppx` - */ - "image-resolution"?: Property.ImageResolution | undefined; - /** - * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. - * - * **Syntax**: `normal | [ <number> <integer>? ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :---------: | :--: | :-: | - * | **110** | No | **9** _-x-_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/initial-letter - */ - "initial-letter"?: Property.InitialLetter | undefined; - /** - * The **`inline-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'width'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inline-size - */ - "inline-size"?: Property.InlineSize<TLength> | undefined; - /** - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - */ - "input-security"?: Property.InputSecurity | undefined; - /** - * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-end - */ - "inset-block-end"?: Property.InsetBlockEnd<TLength> | undefined; - /** - * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-start - */ - "inset-block-start"?: Property.InsetBlockStart<TLength> | undefined; - /** - * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-end - */ - "inset-inline-end"?: Property.InsetInlineEnd<TLength> | undefined; - /** - * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-start - */ - "inset-inline-start"?: Property.InsetInlineStart<TLength> | undefined; - /** - * The **`isolation`** CSS property determines whether an element must create a new stacking context. - * - * **Syntax**: `auto | isolate` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **41** | **36** | **8** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/isolation - */ - isolation?: Property.Isolation | undefined; - /** - * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. - * - * **Syntax**: `normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-content - */ - "justify-content"?: Property.JustifyContent | undefined; - /** - * The CSS **`justify-items`** property defines the default `justify-self` for all items of the box, giving them all a default way of justifying each box along the appropriate axis. - * - * **Syntax**: `normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]` - * - * **Initial value**: `legacy` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **52** | **20** | **9** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-items - */ - "justify-items"?: Property.JustifyItems | undefined; - /** - * The CSS **`justify-self`** property sets the way a box is justified inside its alignment container along the appropriate axis. - * - * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :----: | - * | **57** | **45** | **10.1** | **16** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-self - */ - "justify-self"?: Property.JustifySelf | undefined; - /** - * The **`justify-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their inline axis. - * - * **Syntax**: `[ normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-tracks - */ - "justify-tracks"?: Property.JustifyTracks | undefined; - /** - * The **`left`** CSS property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/left - */ - left?: Property.Left<TLength> | undefined; - /** - * The **`letter-spacing`** CSS property sets the horizontal spacing behavior between text characters. This value is added to the natural spacing between characters while rendering the text. Positive values of `letter-spacing` causes characters to spread farther apart, while negative values of `letter-spacing` bring characters closer together. - * - * **Syntax**: `normal | <length>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/letter-spacing - */ - "letter-spacing"?: Property.LetterSpacing<TLength> | undefined; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :-----: | - * | **58** | **69** | **11** | **14** | **5.5** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/line-break - */ - "line-break"?: Property.LineBreak | undefined; - /** - * The **`line-height`** CSS property sets the height of a line box. It's commonly used to set the distance between lines of text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height. - * - * **Syntax**: `normal | <number> | <length> | <percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/line-height - */ - "line-height"?: Property.LineHeight<TLength> | undefined; - /** - * The **`line-height-step`** CSS property sets the step unit for line box heights. When the property is set, line box heights are rounded up to the closest multiple of the unit. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | n/a | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/line-height-step - */ - "line-height-step"?: Property.LineHeightStep<TLength> | undefined; - /** - * The **`list-style-image`** CSS property sets an image to be used as the list item marker. - * - * **Syntax**: `<image> | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style-image - */ - "list-style-image"?: Property.ListStyleImage | undefined; - /** - * The **`list-style-position`** CSS property sets the position of the `::marker` relative to a list item. - * - * **Syntax**: `inside | outside` - * - * **Initial value**: `outside` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style-position - */ - "list-style-position"?: Property.ListStylePosition | undefined; - /** - * The **`list-style-type`** CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element. - * - * **Syntax**: `<counter-style> | <string> | none` - * - * **Initial value**: `disc` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style-type - */ - "list-style-type"?: Property.ListStyleType | undefined; - /** - * The **`margin-block-end`** CSS property defines the logical block end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-end - */ - "margin-block-end"?: Property.MarginBlockEnd<TLength> | undefined; - /** - * The **`margin-block-start`** CSS property defines the logical block start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-start - */ - "margin-block-start"?: Property.MarginBlockStart<TLength> | undefined; - /** - * The **`margin-bottom`** CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-bottom - */ - "margin-bottom"?: Property.MarginBottom<TLength> | undefined; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------------------: | :-------------------: | :----------------------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-margin-end)_ | 3 _(-moz-margin-end)_ | 3 _(-webkit-margin-end)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-end - */ - "margin-inline-end"?: Property.MarginInlineEnd<TLength> | undefined; - /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------: | :---------------------: | :------------------------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-margin-start)_ | 3 _(-moz-margin-start)_ | 3 _(-webkit-margin-start)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-start - */ - "margin-inline-start"?: Property.MarginInlineStart<TLength> | undefined; - /** - * The **`margin-left`** CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-left - */ - "margin-left"?: Property.MarginLeft<TLength> | undefined; - /** - * The **`margin-right`** CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-right - */ - "margin-right"?: Property.MarginRight<TLength> | undefined; - /** - * The **`margin-top`** CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-top - */ - "margin-top"?: Property.MarginTop<TLength> | undefined; - /** - * The `margin-trim` property allows the container to trim the margins of its children where they adjoin the container's edges. - * - * **Syntax**: `none | in-flow | all` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | No | No | **16.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-trim - */ - "margin-trim"?: Property.MarginTrim | undefined; - /** - * The **`mask-border-mode`** CSS property specifies the blending mode used in a mask border. - * - * **Syntax**: `luminance | alpha` - * - * **Initial value**: `alpha` - */ - "mask-border-mode"?: Property.MaskBorderMode | undefined; - /** - * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. - * - * **Syntax**: `[ <length> | <number> ]{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-outset)_ | No | **17.2** | n/a | No | - * | | | 3.1 _(-webkit-mask-box-image-outset)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-outset - */ - "mask-border-outset"?: Property.MaskBorderOutset<TLength> | undefined; - /** - * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. - * - * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` - * - * **Initial value**: `stretch` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-repeat)_ | No | **17.2** | n/a | No | - * | | | 3.1 _(-webkit-mask-box-image-repeat)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat - */ - "mask-border-repeat"?: Property.MaskBorderRepeat | undefined; - /** - * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. - * - * **Syntax**: `<number-percentage>{1,4} fill?` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------------: | :-----: | :----------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-slice)_ | No | **17.2** | n/a | No | - * | | | 3.1 _(-webkit-mask-box-image-slice)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-slice - */ - "mask-border-slice"?: Property.MaskBorderSlice | undefined; - /** - * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. - * - * **Syntax**: `none | <image>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-source)_ | No | **17.2** | n/a | No | - * | | | 3.1 _(-webkit-mask-box-image-source)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-source - */ - "mask-border-source"?: Property.MaskBorderSource | undefined; - /** - * The **`mask-border-width`** CSS property sets the width of an element's mask border. - * - * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------------: | :-----: | :----------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-width)_ | No | **17.2** | n/a | No | - * | | | 3.1 _(-webkit-mask-box-image-width)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-width - */ - "mask-border-width"?: Property.MaskBorderWidth<TLength> | undefined; - /** - * The **`mask-clip`** CSS property determines the area which is affected by a mask. The painted content of an element must be restricted to this area. - * - * **Syntax**: `[ <geometry-box> | no-clip ]#` - * - * **Initial value**: `border-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **120** | **53** | **15.4** | n/a | No | - * | 1 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-clip - */ - "mask-clip"?: Property.MaskClip | undefined; - /** - * The **`mask-composite`** CSS property represents a compositing operation used on the current mask layer with the mask layers below it. - * - * **Syntax**: `<compositing-operator>#` - * - * **Initial value**: `add` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :---: | :-: | - * | **120** | **53** | **15.4** | 18-79 | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-composite - */ - "mask-composite"?: Property.MaskComposite | undefined; - /** - * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. By default this means the alpha channel of the mask image will be multiplied with the alpha channel of the element. This can be controlled with the `mask-mode` property. - * - * **Syntax**: `<mask-reference>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :---: | :-: | - * | **120** | **53** | **15.4** | 16-79 | No | - * | 1 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-image - */ - "mask-image"?: Property.MaskImage | undefined; - /** - * The **`mask-mode`** CSS property sets whether the mask reference defined by `mask-image` is treated as a luminance or alpha mask. - * - * **Syntax**: `<masking-mode>#` - * - * **Initial value**: `match-source` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **120** | **53** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-mode - */ - "mask-mode"?: Property.MaskMode | undefined; - /** - * The **`mask-origin`** CSS property sets the origin of a mask. - * - * **Syntax**: `<geometry-box>#` - * - * **Initial value**: `border-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **120** | **53** | **15.4** | n/a | No | - * | 1 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-origin - */ - "mask-origin"?: Property.MaskOrigin | undefined; - /** - * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. - * - * **Syntax**: `<position>#` - * - * **Initial value**: `center` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :---: | :-: | - * | **120** | **53** | **15.4** | 18-79 | No | - * | 1 _-x-_ | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-position - */ - "mask-position"?: Property.MaskPosition<TLength> | undefined; - /** - * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. - * - * **Syntax**: `<repeat-style>#` - * - * **Initial value**: `repeat` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :---: | :-: | - * | **120** | **53** | **15.4** | 18-79 | No | - * | 1 _-x-_ | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-repeat - */ - "mask-repeat"?: Property.MaskRepeat | undefined; - /** - * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :---: | :-: | - * | **120** | **53** | **15.4** | 18-79 | No | - * | 4 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-size - */ - "mask-size"?: Property.MaskSize<TLength> | undefined; - /** - * The **`mask-type`** CSS property sets whether an SVG `<mask>` element is used as a _luminance_ or an _alpha_ mask. It applies to the `<mask>` element itself. - * - * **Syntax**: `luminance | alpha` - * - * **Initial value**: `luminance` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **24** | **35** | **7** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-type - */ - "mask-type"?: Property.MaskType | undefined; - /** - * This feature is not Baseline because it does not work in some of the most widely-used browsers. - * - * **Syntax**: `[ pack | next ] || [ definite-first | ordered ]` - * - * **Initial value**: `pack` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------: | :--: | :-: | - * | No | No | **preview** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/masonry-auto-flow - */ - "masonry-auto-flow"?: Property.MasonryAutoFlow | undefined; - /** - * The **`math-depth`** property describes a notion of _depth_ for each element of a mathematical formula, with respect to the top-level container of that formula. Concretely, this is used to determine the computed value of the font-size property when its specified value is `math`. - * - * **Syntax**: `auto-add | add(<integer>) | <integer>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **109** | **117** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/math-depth - */ - "math-depth"?: Property.MathDepth | undefined; - /** - * The `math-shift` property indicates whether superscripts inside MathML formulas should be raised by a normal or compact shift. - * - * **Syntax**: `normal | compact` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **109** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/math-shift - */ - "math-shift"?: Property.MathShift | undefined; - /** - * The `math-style` property indicates whether MathML equations should render with normal or compact height. - * - * **Syntax**: `normal | compact` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **109** | **117** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/math-style - */ - "math-style"?: Property.MathStyle | undefined; - /** - * The **`max-block-size`** CSS property specifies the maximum size of an element in the direction opposite that of the writing direction as specified by `writing-mode`. That is, if the writing direction is horizontal, then `max-block-size` is equivalent to `max-height`; if the writing direction is vertical, `max-block-size` is the same as `max-width`. - * - * **Syntax**: `<'max-width'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-block-size - */ - "max-block-size"?: Property.MaxBlockSize<TLength> | undefined; - /** - * The **`max-height`** CSS property sets the maximum height of an element. It prevents the used value of the `height` property from becoming larger than the value specified for `max-height`. - * - * **Syntax**: `none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **18** | **1** | **1.3** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-height - */ - "max-height"?: Property.MaxHeight<TLength> | undefined; - /** - * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block, depending on its writing mode. It corresponds to either the `max-width` or the `max-height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'max-width'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :--------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * | | | 10.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-inline-size - */ - "max-inline-size"?: Property.MaxInlineSize<TLength> | undefined; - /** - * **Syntax**: `none | <integer>` - * - * **Initial value**: `none` - */ - "max-lines"?: Property.MaxLines | undefined; - /** - * The **`max-width`** CSS property sets the maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified by `max-width`. - * - * **Syntax**: `none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-width - */ - "max-width"?: Property.MaxWidth<TLength> | undefined; - /** - * The **`min-block-size`** CSS property defines the minimum horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'min-width'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-block-size - */ - "min-block-size"?: Property.MinBlockSize<TLength> | undefined; - /** - * The **`min-height`** CSS property sets the minimum height of an element. It prevents the used value of the `height` property from becoming smaller than the value specified for `min-height`. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **3** | **1.3** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-height - */ - "min-height"?: Property.MinHeight<TLength> | undefined; - /** - * The **`min-inline-size`** CSS property defines the horizontal or vertical minimal size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'min-width'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-inline-size - */ - "min-inline-size"?: Property.MinInlineSize<TLength> | undefined; - /** - * The **`min-width`** CSS property sets the minimum width of an element. It prevents the used value of the `width` property from becoming smaller than the value specified for `min-width`. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-width - */ - "min-width"?: Property.MinWidth<TLength> | undefined; - /** - * The **`mix-blend-mode`** CSS property sets how an element's content should blend with the content of the element's parent and the element's background. - * - * **Syntax**: `<blend-mode> | plus-lighter` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **41** | **32** | **8** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode - */ - "mix-blend-mode"?: Property.MixBlendMode | undefined; - /** - * The **`offset-distance`** CSS property specifies a position along an `offset-path` for an element to be placed. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | **16** | n/a | No | - * | 46 _(motion-distance)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance - */ - "motion-distance"?: Property.OffsetDistance<TLength> | undefined; - /** - * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. - * - * **Syntax**: `none | <offset-path> || <coord-box>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------------: | :-----: | :------: | :--: | :-: | - * | **55** | **72** | **15.4** | n/a | No | - * | 46 _(motion-path)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-path - */ - "motion-path"?: Property.OffsetPath | undefined; - /** - * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. - * - * **Syntax**: `[ auto | reverse ] || <angle>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | **16** | n/a | No | - * | 46 _(motion-rotation)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate - */ - "motion-rotation"?: Property.OffsetRotate | undefined; - /** - * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. - * - * **Syntax**: `fill | contain | cover | none | scale-down` - * - * **Initial value**: `fill` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **32** | **36** | **10** | **79** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/object-fit - */ - "object-fit"?: Property.ObjectFit | undefined; - /** - * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **32** | **36** | **10** | **79** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/object-position - */ - "object-position"?: Property.ObjectPosition<TLength> | undefined; - /** - * **Syntax**: `auto | <position>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **116** | **72** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-anchor - */ - "offset-anchor"?: Property.OffsetAnchor<TLength> | undefined; - /** - * The **`offset-distance`** CSS property specifies a position along an `offset-path` for an element to be placed. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | **16** | n/a | No | - * | 46 _(motion-distance)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance - */ - "offset-distance"?: Property.OffsetDistance<TLength> | undefined; - /** - * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. - * - * **Syntax**: `none | <offset-path> || <coord-box>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------------: | :-----: | :------: | :--: | :-: | - * | **55** | **72** | **15.4** | n/a | No | - * | 46 _(motion-path)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-path - */ - "offset-path"?: Property.OffsetPath | undefined; - /** - * **Syntax**: `normal | auto | <position>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **116** | n/a | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-position - */ - "offset-position"?: Property.OffsetPosition<TLength> | undefined; - /** - * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. - * - * **Syntax**: `[ auto | reverse ] || <angle>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | **16** | n/a | No | - * | 46 _(motion-rotation)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate - */ - "offset-rotate"?: Property.OffsetRotate | undefined; - /** - * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. - * - * **Syntax**: `[ auto | reverse ] || <angle>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | **16** | n/a | No | - * | 46 _(motion-rotation)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate - */ - "offset-rotation"?: Property.OffsetRotate | undefined; - /** - * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **2** | **12** | **9** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/opacity - */ - opacity?: Property.Opacity | undefined; - /** - * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :------: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/order - */ - order?: Property.Order | undefined; - /** - * The **`orphans`** CSS property sets the minimum number of lines in a block container that must be shown at the _bottom_ of a page, region, or column. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `2` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **25** | No | **1.3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/orphans - */ - orphans?: Property.Orphans | undefined; - /** - * The **`outline-color`** CSS property sets the color of an element's outline. - * - * **Syntax**: `<color> | invert` - * - * **Initial value**: `invert`, for browsers supporting it, `currentColor` for the other - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-color - */ - "outline-color"?: Property.OutlineColor | undefined; - /** - * The **`outline-offset`** CSS property sets the amount of space between an outline and the edge or border of an element. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :-: | - * | **1** | **1.5** | **1.2** | **15** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-offset - */ - "outline-offset"?: Property.OutlineOffset<TLength> | undefined; - /** - * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `auto | <'border-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-style - */ - "outline-style"?: Property.OutlineStyle | undefined; - /** - * The CSS **`outline-width`** property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-width - */ - "outline-width"?: Property.OutlineWidth<TLength> | undefined; - /** - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **56** | **66** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-anchor - */ - "overflow-anchor"?: Property.OverflowAnchor | undefined; - /** - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **69** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-block - */ - "overflow-block"?: Property.OverflowBlock | undefined; - /** - * The **`overflow-clip-box`** CSS property specifies relative to which box the clipping happens when there is an overflow. It is short hand for the `overflow-clip-box-inline` and `overflow-clip-box-block` properties. - * - * **Syntax**: `padding-box | content-box` - * - * **Initial value**: `padding-box` - */ - "overflow-clip-box"?: Property.OverflowClipBox | undefined; - /** - * **Syntax**: `<visual-box> || <length [0,∞]>` - * - * **Initial value**: `0px` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **90** | **102** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin - */ - "overflow-clip-margin"?: Property.OverflowClipMargin<TLength> | undefined; - /** - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **69** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-inline - */ - "overflow-inline"?: Property.OverflowInline | undefined; - /** - * The **`overflow-wrap`** CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box. - * - * **Syntax**: `normal | break-word | anywhere` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------: | :---------------: | :-------------: | :--------------: | :-------------------: | - * | **23** | **49** | **7** | **18** | **5.5** _(word-wrap)_ | - * | 1 _(word-wrap)_ | 3.5 _(word-wrap)_ | 1 _(word-wrap)_ | 12 _(word-wrap)_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-wrap - */ - "overflow-wrap"?: Property.OverflowWrap | undefined; - /** - * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **3.5** | **3** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-x - */ - "overflow-x"?: Property.OverflowX | undefined; - /** - * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **3.5** | **3** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-y - */ - "overflow-y"?: Property.OverflowY | undefined; - /** - * The **`overlay`** CSS property specifies whether an element appearing in the top layer (for example, a shown popover or modal `<dialog>` element) is actually rendered in the top layer. This property is only relevant within a list of `transition-property` values, and only if `allow-discrete` is set as the `transition-behavior`. - * - * **Syntax**: `none | auto` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **117** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overlay - */ - overlay?: Property.Overlay | undefined; - /** - * The **`overscroll-behavior-block`** CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **77** | **73** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block - */ - "overscroll-behavior-block"?: Property.OverscrollBehaviorBlock | undefined; - /** - * The **`overscroll-behavior-inline`** CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **77** | **73** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline - */ - "overscroll-behavior-inline"?: Property.OverscrollBehaviorInline | undefined; - /** - * The **`overscroll-behavior-x`** CSS property sets the browser's behavior when the horizontal boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **63** | **59** | **16** | **18** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x - */ - "overscroll-behavior-x"?: Property.OverscrollBehaviorX | undefined; - /** - * The **`overscroll-behavior-y`** CSS property sets the browser's behavior when the vertical boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **63** | **59** | **16** | **18** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y - */ - "overscroll-behavior-y"?: Property.OverscrollBehaviorY | undefined; - /** - * The **`padding-block-end`** CSS property defines the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-end - */ - "padding-block-end"?: Property.PaddingBlockEnd<TLength> | undefined; - /** - * The **`padding-block-start`** CSS property defines the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-start - */ - "padding-block-start"?: Property.PaddingBlockStart<TLength> | undefined; - /** - * The **`padding-bottom`** CSS property sets the height of the padding area on the bottom of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-bottom - */ - "padding-bottom"?: Property.PaddingBottom<TLength> | undefined; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----------------------: | :--------------------: | :-----------------------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-padding-end)_ | 3 _(-moz-padding-end)_ | 3 _(-webkit-padding-end)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-end - */ - "padding-inline-end"?: Property.PaddingInlineEnd<TLength> | undefined; - /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------: | :----------------------: | :-------------------------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-padding-start)_ | 3 _(-moz-padding-start)_ | 3 _(-webkit-padding-start)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-start - */ - "padding-inline-start"?: Property.PaddingInlineStart<TLength> | undefined; - /** - * The **`padding-left`** CSS property sets the width of the padding area to the left of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-left - */ - "padding-left"?: Property.PaddingLeft<TLength> | undefined; - /** - * The **`padding-right`** CSS property sets the width of the padding area on the right of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-right - */ - "padding-right"?: Property.PaddingRight<TLength> | undefined; - /** - * The **`padding-top`** CSS property sets the height of the padding area on the top of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-top - */ - "padding-top"?: Property.PaddingTop<TLength> | undefined; - /** - * The **`page`** CSS property is used to specify the named page, a specific type of page defined by the `@page` at-rule. - * - * **Syntax**: `auto | <custom-ident>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-------: | :--: | :-: | - * | **85** | **110** | **≤13.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page - */ - page?: Property.Page | undefined; - /** - * The **`page-break-after`** CSS property adjusts page breaks _after_ the current element. - * - * **Syntax**: `auto | always | avoid | left | right | recto | verso` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page-break-after - */ - "page-break-after"?: Property.PageBreakAfter | undefined; - /** - * The **`page-break-before`** CSS property adjusts page breaks _before_ the current element. - * - * **Syntax**: `auto | always | avoid | left | right | recto | verso` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page-break-before - */ - "page-break-before"?: Property.PageBreakBefore | undefined; - /** - * The **`page-break-inside`** CSS property adjusts page breaks _inside_ the current element. - * - * **Syntax**: `auto | avoid` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **19** | **1.3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page-break-inside - */ - "page-break-inside"?: Property.PageBreakInside | undefined; - /** - * The **`paint-order`** CSS property lets you control the order in which the fill and stroke (and painting markers) of text content and shapes are drawn. - * - * **Syntax**: `normal | [ fill || stroke || markers ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **35** | **60** | **8** | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/paint-order - */ - "paint-order"?: Property.PaintOrder | undefined; - /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 12 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/perspective - */ - perspective?: Property.Perspective<TLength> | undefined; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 12 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/perspective-origin - */ - "perspective-origin"?: Property.PerspectiveOrigin<TLength> | undefined; - /** - * The **`pointer-events`** CSS property sets under what circumstances (if any) a particular graphic element can become the target of pointer events. - * - * **Syntax**: `auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **1** | **1.5** | **4** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/pointer-events - */ - "pointer-events"?: Property.PointerEvents | undefined; - /** - * The **`position`** CSS property sets how an element is positioned in a document. The `top`, `right`, `bottom`, and `left` properties determine the final location of positioned elements. - * - * **Syntax**: `static | relative | absolute | sticky | fixed` - * - * **Initial value**: `static` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/position - */ - position?: Property.Position | undefined; - /** - * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. - * - * **Syntax**: `economy | exact` - * - * **Initial value**: `economy` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------: | :-----------------: | :------: | :----------: | :-: | - * | **17** _-x-_ | **97** | **15.4** | **79** _-x-_ | No | - * | | 48 _(color-adjust)_ | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust - */ - "print-color-adjust"?: Property.PrintColorAdjust | undefined; - /** - * The **`quotes`** CSS property sets how the browser should render quotation marks that are added using the `open-quotes` or `close-quotes` values of the CSS `content` property. - * - * **Syntax**: `none | auto | [ <string> <string> ]+` - * - * **Initial value**: depends on user agent - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **11** | **1.5** | **9** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/quotes - */ - quotes?: Property.Quotes | undefined; - /** - * The **`resize`** CSS property sets whether an element is resizable, and if so, in which directions. - * - * **Syntax**: `none | both | horizontal | vertical | block | inline` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **1** | **4** | **3** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/resize - */ - resize?: Property.Resize | undefined; - /** - * The **`right`** CSS property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/right - */ - right?: Property.Right<TLength> | undefined; - /** - * The **`rotate`** CSS property allows you to specify rotation transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` property. - * - * **Syntax**: `none | <angle> | [ x | y | z | <number>{3} ] && <angle>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **104** | **72** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/rotate - */ - rotate?: Property.Rotate | undefined; - /** - * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows. - * - * **Syntax**: `normal | <length-percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **47** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/row-gap - */ - "row-gap"?: Property.RowGap<TLength> | undefined; - /** - * The **`ruby-align`** CSS property defines the distribution of the different ruby elements over the base. - * - * **Syntax**: `start | center | space-between | space-around` - * - * **Initial value**: `space-around` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **38** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/ruby-align - */ - "ruby-align"?: Property.RubyAlign | undefined; - /** - * **Syntax**: `separate | collapse | auto` - * - * **Initial value**: `separate` - */ - "ruby-merge"?: Property.RubyMerge | undefined; - /** - * The **`ruby-position`** CSS property defines the position of a ruby element relatives to its base element. It can be positioned over the element (`over`), under it (`under`), or between the characters on their right side (`inter-character`). - * - * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` - * - * **Initial value**: `alternate` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :---------: | :---: | :-: | - * | **84** | **38** | **7** _-x-_ | 12-79 | No | - * | 1 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/ruby-position - */ - "ruby-position"?: Property.RubyPosition | undefined; - /** - * The **`scale`** CSS property allows you to specify scale transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. - * - * **Syntax**: `none | <number>{1,3}` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **104** | **72** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scale - */ - scale?: Property.Scale | undefined; - /** - * The **`scroll-behavior`** CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs. - * - * **Syntax**: `auto | smooth` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **61** | **36** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-behavior - */ - "scroll-behavior"?: Property.ScrollBehavior | undefined; - /** - * The `scroll-margin-block-end` property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end - */ - "scroll-margin-block-end"?: Property.ScrollMarginBlockEnd<TLength> | undefined; - /** - * The `scroll-margin-block-start` property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start - */ - "scroll-margin-block-start"?: Property.ScrollMarginBlockStart<TLength> | undefined; - /** - * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-bottom)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom - */ - "scroll-margin-bottom"?: Property.ScrollMarginBottom<TLength> | undefined; - /** - * The `scroll-margin-inline-end` property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end - */ - "scroll-margin-inline-end"?: Property.ScrollMarginInlineEnd<TLength> | undefined; - /** - * The `scroll-margin-inline-start` property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start - */ - "scroll-margin-inline-start"?: Property.ScrollMarginInlineStart<TLength> | undefined; - /** - * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-left)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left - */ - "scroll-margin-left"?: Property.ScrollMarginLeft<TLength> | undefined; - /** - * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-right)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right - */ - "scroll-margin-right"?: Property.ScrollMarginRight<TLength> | undefined; - /** - * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-top)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top - */ - "scroll-margin-top"?: Property.ScrollMarginTop<TLength> | undefined; - /** - * The `scroll-padding-block-end` property defines offsets for the end edge in the block dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end - */ - "scroll-padding-block-end"?: Property.ScrollPaddingBlockEnd<TLength> | undefined; - /** - * The `scroll-padding-block-start` property defines offsets for the start edge in the block dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start - */ - "scroll-padding-block-start"?: Property.ScrollPaddingBlockStart<TLength> | undefined; - /** - * The `scroll-padding-bottom` property defines offsets for the bottom of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom - */ - "scroll-padding-bottom"?: Property.ScrollPaddingBottom<TLength> | undefined; - /** - * The `scroll-padding-inline-end` property defines offsets for the end edge in the inline dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end - */ - "scroll-padding-inline-end"?: Property.ScrollPaddingInlineEnd<TLength> | undefined; - /** - * The `scroll-padding-inline-start` property defines offsets for the start edge in the inline dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start - */ - "scroll-padding-inline-start"?: Property.ScrollPaddingInlineStart<TLength> | undefined; - /** - * The `scroll-padding-left` property defines offsets for the left of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left - */ - "scroll-padding-left"?: Property.ScrollPaddingLeft<TLength> | undefined; - /** - * The `scroll-padding-right` property defines offsets for the right of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right - */ - "scroll-padding-right"?: Property.ScrollPaddingRight<TLength> | undefined; - /** - * The **`scroll-padding-top`** property defines offsets for the top of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top - */ - "scroll-padding-top"?: Property.ScrollPaddingTop<TLength> | undefined; - /** - * The `scroll-snap-align` property specifies the box's snap position as an alignment of its snap area (as the alignment subject) within its snap container's snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value. - * - * **Syntax**: `[ none | start | end | center ]{1,2}` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align - */ - "scroll-snap-align"?: Property.ScrollSnapAlign | undefined; - /** - * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-bottom)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom - */ - "scroll-snap-margin-bottom"?: Property.ScrollMarginBottom<TLength> | undefined; - /** - * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-left)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left - */ - "scroll-snap-margin-left"?: Property.ScrollMarginLeft<TLength> | undefined; - /** - * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-right)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right - */ - "scroll-snap-margin-right"?: Property.ScrollMarginRight<TLength> | undefined; - /** - * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-top)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top - */ - "scroll-snap-margin-top"?: Property.ScrollMarginTop<TLength> | undefined; - /** - * The **`scroll-snap-stop`** CSS property defines whether or not the scroll container is allowed to "pass over" possible snap positions. - * - * **Syntax**: `normal | always` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **75** | **103** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop - */ - "scroll-snap-stop"?: Property.ScrollSnapStop | undefined; - /** - * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. - * - * **Syntax**: `none | [ x | y | block | inline | both ] [ mandatory | proximity ]?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----------: | - * | **69** | 39-68 | **11** | **79** | **10** _-x-_ | - * | | | 9 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type - */ - "scroll-snap-type"?: Property.ScrollSnapType | undefined; - /** - * The **`scroll-timeline-axis`** CSS property can be used to specify the scrollbar that will be used to provide the timeline for a scroll-timeline animation. - * - * **Syntax**: `[ block | inline | x | y ]#` - * - * **Initial value**: `block` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-axis - */ - "scroll-timeline-axis"?: Property.ScrollTimelineAxis | undefined; - /** - * The **`scroll-timeline-name`** CSS property defines a name that can be used to identify an element as the source of a scroll timeline for an animation. - * - * **Syntax**: `none | <dashed-ident>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-name - */ - "scroll-timeline-name"?: Property.ScrollTimelineName | undefined; - /** - * The **`scrollbar-color`** CSS property sets the color of the scrollbar track and thumb. - * - * **Syntax**: `auto | <color>{2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **121** | **64** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-color - */ - "scrollbar-color"?: Property.ScrollbarColor | undefined; - /** - * The **`scrollbar-gutter`** CSS property allows authors to reserve space for the scrollbar, preventing unwanted layout changes as the content grows while also avoiding unnecessary visuals when scrolling isn't needed. - * - * **Syntax**: `auto | stable && both-edges?` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **94** | **97** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter - */ - "scrollbar-gutter"?: Property.ScrollbarGutter | undefined; - /** - * The **`scrollbar-width`** property allows the author to set the maximum thickness of an element's scrollbars when they are shown. - * - * **Syntax**: `auto | thin | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **121** | **64** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-width - */ - "scrollbar-width"?: Property.ScrollbarWidth | undefined; - /** - * The **`shape-image-threshold`** CSS property sets the alpha channel threshold used to extract the shape using an image as the value for `shape-outside`. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `0.0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **37** | **62** | **10.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold - */ - "shape-image-threshold"?: Property.ShapeImageThreshold | undefined; - /** - * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **37** | **62** | **10.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/shape-margin - */ - "shape-margin"?: Property.ShapeMargin<TLength> | undefined; - /** - * The **`shape-outside`** CSS property defines a shape—which may be non-rectangular—around which adjacent inline content should wrap. By default, inline content wraps around its margin box; `shape-outside` provides a way to customize this wrapping, making it possible to wrap text around complex objects rather than simple boxes. - * - * **Syntax**: `none | [ <shape-box> || <basic-shape> ] | <image>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **37** | **62** | **10.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/shape-outside - */ - "shape-outside"?: Property.ShapeOutside | undefined; - /** - * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **21** | **91** | **7** | n/a | No | - * | | 4 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/tab-size - */ - "tab-size"?: Property.TabSize<TLength> | undefined; - /** - * The **`table-layout`** CSS property sets the algorithm used to lay out `<table>` cells, rows, and columns. - * - * **Syntax**: `auto | fixed` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **14** | **1** | **1** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/table-layout - */ - "table-layout"?: Property.TableLayout | undefined; - /** - * The **`text-align`** CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box. This means it works like `vertical-align` but in the horizontal direction. - * - * **Syntax**: `start | end | left | right | center | justify | match-parent` - * - * **Initial value**: `start`, or a nameless value that acts as `left` if _direction_ is `ltr`, `right` if _direction_ is `rtl` if `start` is not supported by the browser. - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-align - */ - "text-align"?: Property.TextAlign | undefined; - /** - * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. - * - * **Syntax**: `auto | start | end | left | right | center | justify` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **47** | **49** | **16** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-align-last - */ - "text-align-last"?: Property.TextAlignLast | undefined; - /** - * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. - * - * **Syntax**: `none | all | [ digits <integer>? ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------: | :-----: | :--------------------------: | :----: | :------------------------------------: | - * | **48** | **48** | **15.4** | **79** | **11** _(-ms-text-combine-horizontal)_ | - * | 9 _(-webkit-text-combine)_ | | 5.1 _(-webkit-text-combine)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-combine-upright - */ - "text-combine-upright"?: Property.TextCombineUpright | undefined; - /** - * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **36** | **12.1** | n/a | No | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-color - */ - "text-decoration-color"?: Property.TextDecorationColor | undefined; - /** - * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. - * - * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **36** | **12.1** | n/a | No | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-line - */ - "text-decoration-line"?: Property.TextDecorationLine | undefined; - /** - * The **`text-decoration-skip`** CSS property sets what parts of an element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. - * - * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` - * - * **Initial value**: `objects` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | 57-64 | No | **12.1** | n/a | No | - * | | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip - */ - "text-decoration-skip"?: Property.TextDecorationSkip | undefined; - /** - * The **`text-decoration-skip-ink`** CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders. - * - * **Syntax**: `auto | all | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **64** | **70** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink - */ - "text-decoration-skip-ink"?: Property.TextDecorationSkipInk | undefined; - /** - * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. - * - * **Syntax**: `solid | double | dotted | dashed | wavy` - * - * **Initial value**: `solid` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **36** | **12.1** | n/a | No | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-style - */ - "text-decoration-style"?: Property.TextDecorationStyle | undefined; - /** - * The **`text-decoration-thickness`** CSS property sets the stroke thickness of the decoration line that is used on text in an element, such as a line-through, underline, or overline. - * - * **Syntax**: `auto | from-font | <length> | <percentage> ` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **89** | **70** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness - */ - "text-decoration-thickness"?: Property.TextDecorationThickness<TLength> | undefined; - /** - * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color - */ - "text-emphasis-color"?: Property.TextEmphasisColor | undefined; - /** - * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. - * - * **Syntax**: `[ over | under ] && [ right | left ]` - * - * **Initial value**: `over right` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position - */ - "text-emphasis-position"?: Property.TextEmphasisPosition | undefined; - /** - * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. - * - * **Syntax**: `none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style - */ - "text-emphasis-style"?: Property.TextEmphasisStyle | undefined; - /** - * The **`text-indent`** CSS property sets the length of empty space (indentation) that is put before lines of text in a block. - * - * **Syntax**: `<length-percentage> && hanging? && each-line?` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-indent - */ - "text-indent"?: Property.TextIndent<TLength> | undefined; - /** - * The **`text-justify`** CSS property sets what type of justification should be applied to text when `text-align``: justify;` is set on an element. - * - * **Syntax**: `auto | inter-character | inter-word | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :---: | :----: | - * | n/a | **55** | No | 12-79 | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-justify - */ - "text-justify"?: Property.TextJustify | undefined; - /** - * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. - * - * **Syntax**: `mixed | upright | sideways` - * - * **Initial value**: `mixed` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-------: | :--: | :-: | - * | **48** | **41** | **14** | n/a | No | - * | 11 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-orientation - */ - "text-orientation"?: Property.TextOrientation | undefined; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **7** | **1.3** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-overflow - */ - "text-overflow"?: Property.TextOverflow | undefined; - /** - * The **`text-rendering`** CSS property provides information to the rendering engine about what to optimize for when rendering text. - * - * **Syntax**: `auto | optimizeSpeed | optimizeLegibility | geometricPrecision` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **4** | **1** | **5** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-rendering - */ - "text-rendering"?: Property.TextRendering | undefined; - /** - * The **`text-shadow`** CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its `decorations`. Each shadow is described by some combination of X and Y offsets from the element, blur radius, and color. - * - * **Syntax**: `none | <shadow-t>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----: | - * | **2** | **3.5** | **1.1** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-shadow - */ - "text-shadow"?: Property.TextShadow | undefined; - /** - * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. - * - * **Syntax**: `none | auto | <percentage>` - * - * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **54** | No | No | **79** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-size-adjust - */ - "text-size-adjust"?: Property.TextSizeAdjust | undefined; - /** - * The **`text-transform`** CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby. - * - * **Syntax**: `none | capitalize | uppercase | lowercase | full-width | full-size-kana` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-transform - */ - "text-transform"?: Property.TextTransform | undefined; - /** - * The **`text-underline-offset`** CSS property sets the offset distance of an underline text decoration line (applied using `text-decoration`) from its original position. - * - * **Syntax**: `auto | <length> | <percentage> ` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **70** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-offset - */ - "text-underline-offset"?: Property.TextUnderlineOffset<TLength> | undefined; - /** - * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. - * - * **Syntax**: `auto | from-font | [ under || [ left | right ] ]` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :---: | - * | **33** | **74** | **12.1** | **12** | **6** | - * | | | 9 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-position - */ - "text-underline-position"?: Property.TextUnderlinePosition | undefined; - /** - * The **`text-wrap`** CSS property controls how text inside an element is wrapped. The different values provide: - * - * **Syntax**: `wrap | nowrap | balance | stable | pretty` - * - * **Initial value**: `wrap` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **114** | **121** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-wrap - */ - "text-wrap"?: Property.TextWrap | undefined; - /** - * The **`timeline-scope`** CSS property modifies the scope of a named animation timeline. - * - * **Syntax**: `none | <dashed-ident>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **116** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/timeline-scope - */ - "timeline-scope"?: Property.TimelineScope | undefined; - /** - * The **`top`** CSS property participates in specifying the vertical position of a positioned element. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/top - */ - top?: Property.Top<TLength> | undefined; - /** - * The **`touch-action`** CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). - * - * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :------: | - * | **36** | **52** | **13** | **12** | **11** | - * | | | | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/touch-action - */ - "touch-action"?: Property.TouchAction | undefined; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :-----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3.1 _-x-_ | | 9 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform - */ - transform?: Property.Transform | undefined; - /** - * The **`transform-box`** CSS property defines the layout box to which the `transform`, individual transform properties `translate`,`scale`, and `rotate`, and `transform-origin` properties relate. - * - * **Syntax**: `content-box | border-box | fill-box | stroke-box | view-box` - * - * **Initial value**: `view-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **64** | **55** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform-box - */ - "transform-box"?: Property.TransformBox | undefined; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :-----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 2 _-x-_ | | 9 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform-origin - */ - "transform-origin"?: Property.TransformOrigin<TLength> | undefined; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :-: | - * | **36** | **16** | **9** | **12** | No | - * | 12 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform-style - */ - "transform-style"?: Property.TransformStyle | undefined; - /** - * The **`transition-behavior`** CSS property specifies whether transitions will be started for properties whose animation behavior is discrete. - * - * **Syntax**: `<transition-behavior-value>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **117** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-behavior - */ - "transition-behavior"?: Property.TransitionBehavior | undefined; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-delay - */ - "transition-delay"?: Property.TransitionDelay<TTime> | undefined; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-duration - */ - "transition-duration"?: Property.TransitionDuration<TTime> | undefined; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-property - */ - "transition-property"?: Property.TransitionProperty | undefined; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-timing-function - */ - "transition-timing-function"?: Property.TransitionTimingFunction | undefined; - /** - * The **`translate`** CSS property allows you to specify translation transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. - * - * **Syntax**: `none | <length-percentage> [ <length-percentage> <length>? ]?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **104** | **72** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/translate - */ - translate?: Property.Translate<TLength> | undefined; - /** - * The **`unicode-bidi`** CSS property, together with the `direction` property, determines how bidirectional text in a document is handled. For example, if a block of content contains both left-to-right and right-to-left text, the user-agent uses a complex Unicode algorithm to decide how to display the text. The `unicode-bidi` property overrides this algorithm and allows the developer to control the text embedding. - * - * **Syntax**: `normal | embed | isolate | bidi-override | isolate-override | plaintext` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :-----: | - * | **2** | **1** | **1.3** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/unicode-bidi - */ - "unicode-bidi"?: Property.UnicodeBidi | undefined; - /** - * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :---------: | :------: | :----------: | - * | **54** | **69** | **3** _-x-_ | **79** | **10** _-x-_ | - * | 1 _-x-_ | 1 _-x-_ | | 12 _-x-_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/user-select - */ - "user-select"?: Property.UserSelect | undefined; - /** - * The **`vertical-align`** CSS property sets vertical alignment of an inline, inline-block or table-cell box. - * - * **Syntax**: `baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>` - * - * **Initial value**: `baseline` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/vertical-align - */ - "vertical-align"?: Property.VerticalAlign<TLength> | undefined; - /** - * The **`view-timeline-axis`** CSS property is used to specify the scrollbar direction that will be used to provide the timeline for a _named view progress timeline_ animation, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline-axis` is set on the subject. See CSS scroll-driven animations for more details. - * - * **Syntax**: `[ block | inline | x | y ]#` - * - * **Initial value**: `block` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-axis - */ - "view-timeline-axis"?: Property.ViewTimelineAxis | undefined; - /** - * The **`view-timeline-inset`** CSS property is used to specify one or two values representing an adjustment to the position of the scrollport (see Scroll container for more details) in which the subject element of a _named view progress timeline_ animation is deemed to be visible. Put another way, this allows you to specify start and/or end inset (or outset) values that offset the position of the timeline. - * - * **Syntax**: `[ [ auto | <length-percentage> ]{1,2} ]#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-inset - */ - "view-timeline-inset"?: Property.ViewTimelineInset<TLength> | undefined; - /** - * The **`view-timeline-name`** CSS property is used to define the name of a _named view progress timeline_, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline` is set on the subject. - * - * **Syntax**: `none | <dashed-ident>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-name - */ - "view-timeline-name"?: Property.ViewTimelineName | undefined; - /** - * The **`view-transition-name`** CSS property provides the selected element with a distinct identifying name (a `<custom-ident>`) and causes it to participate in a separate view transition from the root view transition — or no view transition if the `none` value is specified. - * - * **Syntax**: `none | <custom-ident>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **111** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/view-transition-name - */ - "view-transition-name"?: Property.ViewTransitionName | undefined; - /** - * The **`visibility`** CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or columns in a `<table>`. - * - * **Syntax**: `visible | hidden | collapse` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/visibility - */ - visibility?: Property.Visibility | undefined; - /** - * The **`white-space`** CSS property sets how white space inside an element is handled. - * - * **Syntax**: `normal | pre | nowrap | pre-wrap | pre-line | break-spaces | [ <'white-space-collapse'> || <'text-wrap'> || <'white-space-trim'> ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/white-space - */ - "white-space"?: Property.WhiteSpace | undefined; - /** - * The **`white-space-collapse`** CSS property controls how white space inside an element is collapsed. - * - * **Syntax**: `collapse | discard | preserve | preserve-breaks | preserve-spaces | break-spaces` - * - * **Initial value**: `collapse` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **114** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/white-space-collapse - */ - "white-space-collapse"?: Property.WhiteSpaceCollapse | undefined; - /** - * **Syntax**: `none | discard-before || discard-after || discard-inner` - * - * **Initial value**: `none` - */ - "white-space-trim"?: Property.WhiteSpaceTrim | undefined; - /** - * The **`widows`** CSS property sets the minimum number of lines in a block container that must be shown at the _top_ of a page, region, or column. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `2` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **25** | No | **1.3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/widows - */ - widows?: Property.Widows | undefined; - /** - * The **`width`** CSS property sets an element's width. By default, it sets the width of the content area, but if `box-sizing` is set to `border-box`, it sets the width of the border area. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/width - */ - width?: Property.Width<TLength> | undefined; - /** - * The **`will-change`** CSS property hints to browsers how an element is expected to change. Browsers may set up optimizations before an element is actually changed. These kinds of optimizations can increase the responsiveness of a page by doing potentially expensive work before they are actually required. - * - * **Syntax**: `auto | <animateable-feature>#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **36** | **36** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/will-change - */ - "will-change"?: Property.WillChange | undefined; - /** - * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. - * - * **Syntax**: `normal | break-all | keep-all | break-word` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **15** | **3** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/word-break - */ - "word-break"?: Property.WordBreak | undefined; - /** - * The **`word-spacing`** CSS property sets the length of space between words and between tags. - * - * **Syntax**: `normal | <length>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/word-spacing - */ - "word-spacing"?: Property.WordSpacing<TLength> | undefined; - /** - * The **`overflow-wrap`** CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box. - * - * **Syntax**: `normal | break-word` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :-----: | :-: | - * | **≤80** | **≤72** | **≤13.1** | **≤80** | No | - */ - "word-wrap"?: Property.WordWrap | undefined; - /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). - * - * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` - * - * **Initial value**: `horizontal-tb` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :---: | - * | **48** | **41** | **10.1** | **12** | **9** | - * | 8 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/writing-mode - */ - "writing-mode"?: Property.WritingMode | undefined; - /** - * The **`z-index`** CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one. - * - * **Syntax**: `auto | <integer>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/z-index - */ - "z-index"?: Property.ZIndex | undefined; - /** - * The non-standard **`zoom`** CSS property can be used to control the magnification level of an element. `transform: scale()` should be used instead of this property, if possible. However, unlike CSS Transforms, `zoom` affects the layout size of the element. - * - * **Syntax**: `normal | reset | <number> | <percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :-----: | - * | **1** | n/a | **3.1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/zoom - */ - zoom?: Property.Zoom | undefined; -} - -export interface StandardShorthandPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { - /** - * The **`all`** shorthand CSS property resets all of an element's properties except `unicode-bidi`, `direction`, and CSS Custom Properties. It can set properties to their initial or inherited values, or to the values specified in another cascade layer or stylesheet origin. - * - * **Syntax**: `initial | inherit | unset | revert | revert-layer` - * - * **Initial value**: There is no practical initial value for it. - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **37** | **27** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/all - */ - all?: Property.All | undefined; - /** - * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation - */ - animation?: Property.Animation<TTime> | undefined; - /** - * The **`animation-range`** CSS shorthand property is used to set the start and end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start and end. - * - * **Syntax**: `[ <'animation-range-start'> <'animation-range-end'>? ]#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-range - */ - "animation-range"?: Property.AnimationRange<TLength> | undefined; - /** - * The **`background`** shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method. - * - * **Syntax**: `[ <bg-layer> , ]* <final-bg-layer>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background - */ - background?: Property.Background<TLength> | undefined; - /** - * The **`background-position`** CSS property sets the initial position for each background image. The position is relative to the position layer set by `background-origin`. - * - * **Syntax**: `<bg-position>#` - * - * **Initial value**: `0% 0%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-position - */ - "background-position"?: Property.BackgroundPosition<TLength> | undefined; - /** - * The **`border`** shorthand CSS property sets an element's border. It sets the values of `border-width`, `border-style`, and `border-color`. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border - */ - border?: Property.Border<TLength> | undefined; - /** - * The **`border-block`** CSS property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block - */ - "border-block"?: Property.BorderBlock<TLength> | undefined; - /** - * The **`border-block-end`** CSS property is a shorthand property for setting the individual logical block-end border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end - */ - "border-block-end"?: Property.BorderBlockEnd<TLength> | undefined; - /** - * The **`border-block-start`** CSS property is a shorthand property for setting the individual logical block-start border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start - */ - "border-block-start"?: Property.BorderBlockStart<TLength> | undefined; - /** - * The **`border-bottom`** shorthand CSS property sets an element's bottom border. It sets the values of `border-bottom-width`, `border-bottom-style` and `border-bottom-color`. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom - */ - "border-bottom"?: Property.BorderBottom<TLength> | undefined; - /** - * The **`border-color`** shorthand CSS property sets the color of an element's border. - * - * **Syntax**: `<color>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-color - */ - "border-color"?: Property.BorderColor | undefined; - /** - * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-------: | :-----: | :----: | :----: | - * | **16** | **15** | **6** | **12** | **11** | - * | 7 _-x-_ | 3.5 _-x-_ | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image - */ - "border-image"?: Property.BorderImage | undefined; - /** - * The **`border-inline`** CSS property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline - */ - "border-inline"?: Property.BorderInline<TLength> | undefined; - /** - * The **`border-inline-end`** CSS property is a shorthand property for setting the individual logical inline-end border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end - */ - "border-inline-end"?: Property.BorderInlineEnd<TLength> | undefined; - /** - * The **`border-inline-start`** CSS property is a shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start - */ - "border-inline-start"?: Property.BorderInlineStart<TLength> | undefined; - /** - * The **`border-left`** shorthand CSS property sets all the properties of an element's left border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left - */ - "border-left"?: Property.BorderLeft<TLength> | undefined; - /** - * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. - * - * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-radius - */ - "border-radius"?: Property.BorderRadius<TLength> | undefined; - /** - * The **`border-right`** shorthand CSS property sets all the properties of an element's right border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right - */ - "border-right"?: Property.BorderRight<TLength> | undefined; - /** - * The **`border-style`** shorthand CSS property sets the line style for all four sides of an element's border. - * - * **Syntax**: `<line-style>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-style - */ - "border-style"?: Property.BorderStyle | undefined; - /** - * The **`border-top`** shorthand CSS property sets all the properties of an element's top border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top - */ - "border-top"?: Property.BorderTop<TLength> | undefined; - /** - * The **`border-width`** shorthand CSS property sets the width of an element's border. - * - * **Syntax**: `<line-width>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-width - */ - "border-width"?: Property.BorderWidth<TLength> | undefined; - /** **Syntax**: `<'caret-color'> || <'caret-shape'>` */ - caret?: Property.Caret | undefined; - /** - * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule - */ - "column-rule"?: Property.ColumnRule<TLength> | undefined; - /** - * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. - * - * **Syntax**: `<'column-width'> || <'column-count'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/columns - */ - columns?: Property.Columns<TLength> | undefined; - /** - * The **`contain-intrinsic-size`** CSS shorthand property sets the size of an element that a browser will use for layout when the element is subject to size containment. - * - * **Syntax**: `[ auto? [ none | <length> ] ]{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **83** | **107** | **17** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size - */ - "contain-intrinsic-size"?: Property.ContainIntrinsicSize<TLength> | undefined; - /** - * The **container** shorthand CSS property establishes the element as a query container and specifies the name or name for the containment context used in a container query. - * - * **Syntax**: `<'container-name'> [ / <'container-type'> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **105** | **110** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/container - */ - container?: Property.Container | undefined; - /** - * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. - * - * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :------: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex - */ - flex?: Property.Flex<TLength> | undefined; - /** - * The **`flex-flow`** CSS shorthand property specifies the direction of a flex container, as well as its wrapping behavior. - * - * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **28** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-flow - */ - "flex-flow"?: Property.FlexFlow | undefined; - /** - * The **`font`** CSS shorthand property sets all the different properties of an element's font. Alternatively, it sets an element's font to a system font. - * - * **Syntax**: `[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font - */ - font?: Property.Font | undefined; - /** - * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. - * - * **Syntax**: `<'row-gap'> <'column-gap'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/gap - */ - gap?: Property.Gap<TLength> | undefined; - /** - * The **`grid`** CSS property is a shorthand property that sets all of the explicit and implicit grid properties in a single declaration. - * - * **Syntax**: `<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid - */ - grid?: Property.Grid | undefined; - /** - * The **`grid-area`** CSS shorthand property specifies a grid item's size and location within a grid by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area. - * - * **Syntax**: `<grid-line> [ / <grid-line> ]{0,3}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-area - */ - "grid-area"?: Property.GridArea | undefined; - /** - * The **`grid-column`** CSS shorthand property specifies a grid item's size and location within a grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. - * - * **Syntax**: `<grid-line> [ / <grid-line> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-column - */ - "grid-column"?: Property.GridColumn | undefined; - /** - * The **`grid-row`** CSS shorthand property specifies a grid item's size and location within a grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. - * - * **Syntax**: `<grid-line> [ / <grid-line> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-row - */ - "grid-row"?: Property.GridRow | undefined; - /** - * The **`grid-template`** CSS property is a shorthand property for defining grid columns, grid rows, and grid areas. - * - * **Syntax**: `none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template - */ - "grid-template"?: Property.GridTemplate | undefined; - /** - * The **`inset`** CSS property is a shorthand that corresponds to the `top`, `right`, `bottom`, and/or `left` properties. It has the same multi-value syntax of the `margin` shorthand. - * - * **Syntax**: `<'top'>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset - */ - inset?: Property.Inset<TLength> | undefined; - /** - * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block - */ - "inset-block"?: Property.InsetBlock<TLength> | undefined; - /** - * The **`inset-inline`** CSS property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline - */ - "inset-inline"?: Property.InsetInline<TLength> | undefined; - /** - * **Syntax**: `none | <integer>` - * - * **Initial value**: `none` - */ - "line-clamp"?: Property.LineClamp | undefined; - /** - * The **`list-style`** CSS shorthand property allows you to set all the list style properties at once. - * - * **Syntax**: `<'list-style-type'> || <'list-style-position'> || <'list-style-image'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style - */ - "list-style"?: Property.ListStyle | undefined; - /** - * The **`margin`** CSS shorthand property sets the margin area on all four sides of an element. - * - * **Syntax**: `[ <length> | <percentage> | auto ]{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin - */ - margin?: Property.Margin<TLength> | undefined; - /** - * The **`margin-block`** CSS shorthand property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block - */ - "margin-block"?: Property.MarginBlock<TLength> | undefined; - /** - * The **`margin-inline`** CSS shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline - */ - "margin-inline"?: Property.MarginInline<TLength> | undefined; - /** - * The **`mask`** CSS shorthand property hides an element (partially or fully) by masking or clipping the image at specific points. - * - * **Syntax**: `<mask-layer>#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-------: | :---: | :-: | - * | **1** | **53** | **15.4** | 12-79 | No | - * | | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask - */ - mask?: Property.Mask<TLength> | undefined; - /** - * The **`mask-border`** CSS shorthand property lets you create a mask along the edge of an element's border. - * - * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------: | :-----: | :----------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image)_ | No | **17.2** | n/a | No | - * | | | 3.1 _(-webkit-mask-box-image)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border - */ - "mask-border"?: Property.MaskBorder | undefined; - /** - * The **`offset`** CSS shorthand property sets all the properties required for animating an element along a defined path. - * - * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | **16** | n/a | No | - * | 46 _(motion)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset - */ - motion?: Property.Offset<TLength> | undefined; - /** - * The **`offset`** CSS shorthand property sets all the properties required for animating an element along a defined path. - * - * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | **16** | n/a | No | - * | 46 _(motion)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset - */ - offset?: Property.Offset<TLength> | undefined; - /** - * The **`outline`** CSS shorthand property sets most of the outline properties in a single declaration. - * - * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :---: | - * | **94** | **88** | **16.4** | **94** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline - */ - outline?: Property.Outline<TLength> | undefined; - /** - * The **`overflow`** CSS shorthand property sets the desired behavior for an element's overflow — i.e. when an element's content is too big to fit in its block formatting context — in both directions. - * - * **Syntax**: `[ visible | hidden | clip | scroll | auto ]{1,2}` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow - */ - overflow?: Property.Overflow | undefined; - /** - * The **`overscroll-behavior`** CSS property sets what a browser does when reaching the boundary of a scrolling area. It's a shorthand for `overscroll-behavior-x` and `overscroll-behavior-y`. - * - * **Syntax**: `[ contain | none | auto ]{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **63** | **59** | **16** | **18** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior - */ - "overscroll-behavior"?: Property.OverscrollBehavior | undefined; - /** - * The **`padding`** CSS shorthand property sets the padding area on all four sides of an element at once. - * - * **Syntax**: `[ <length> | <percentage> ]{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding - */ - padding?: Property.Padding<TLength> | undefined; - /** - * The **`padding-block`** CSS shorthand property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block - */ - "padding-block"?: Property.PaddingBlock<TLength> | undefined; - /** - * The **`padding-inline`** CSS shorthand property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline - */ - "padding-inline"?: Property.PaddingInline<TLength> | undefined; - /** - * The **`place-content`** CSS shorthand property allows you to align content along both the block and inline directions at once (i.e. the `align-content` and `justify-content` properties) in a relevant layout system such as Grid or Flexbox. - * - * **Syntax**: `<'align-content'> <'justify-content'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **9** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-content - */ - "place-content"?: Property.PlaceContent | undefined; - /** - * The CSS **`place-items`** shorthand property allows you to align items along both the block and inline directions at once (i.e. the `align-items` and `justify-items` properties) in a relevant layout system such as Grid or Flexbox. If the second value is not set, the first value is also used for it. - * - * **Syntax**: `<'align-items'> <'justify-items'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-items - */ - "place-items"?: Property.PlaceItems | undefined; - /** - * The **`place-self`** CSS shorthand property allows you to align an individual item in both the block and inline directions at once (i.e. the `align-self` and `justify-self` properties) in a relevant layout system such as Grid or Flexbox. If the second value is not present, the first value is also used for it. - * - * **Syntax**: `<'align-self'> <'justify-self'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-self - */ - "place-self"?: Property.PlaceSelf | undefined; - /** - * The **`scroll-margin`** shorthand property sets all of the scroll margins of an element at once, assigning values much like the `margin` property does for margins of an element. - * - * **Syntax**: `<length>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------: | :--: | :-: | - * | **69** | **90** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin - */ - "scroll-margin"?: Property.ScrollMargin<TLength> | undefined; - /** - * The `scroll-margin-block` shorthand property sets the scroll margins of an element in the block dimension. - * - * **Syntax**: `<length>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block - */ - "scroll-margin-block"?: Property.ScrollMarginBlock<TLength> | undefined; - /** - * The `scroll-margin-inline` shorthand property sets the scroll margins of an element in the inline dimension. - * - * **Syntax**: `<length>{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline - */ - "scroll-margin-inline"?: Property.ScrollMarginInline<TLength> | undefined; - /** - * The **`scroll-padding`** shorthand property sets scroll padding on all sides of an element at once, much like the `padding` property does for padding on an element. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding - */ - "scroll-padding"?: Property.ScrollPadding<TLength> | undefined; - /** - * The `scroll-padding-block` shorthand property sets the scroll padding of an element in the block dimension. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block - */ - "scroll-padding-block"?: Property.ScrollPaddingBlock<TLength> | undefined; - /** - * The `scroll-padding-inline` shorthand property sets the scroll padding of an element in the inline dimension. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,2}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline - */ - "scroll-padding-inline"?: Property.ScrollPaddingInline<TLength> | undefined; - /** - * The **`scroll-margin`** shorthand property sets all of the scroll margins of an element at once, assigning values much like the `margin` property does for margins of an element. - * - * **Syntax**: `<length>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------: | :--: | :-: | - * | **69** | 68-90 | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin - */ - "scroll-snap-margin"?: Property.ScrollMargin<TLength> | undefined; - /** - * The **`scroll-timeline`** CSS shorthand property defines a name that can be used to identify the source element of a scroll timeline, along with the scrollbar axis that should provide the timeline. - * - * **Syntax**: `[ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline - */ - "scroll-timeline"?: Property.ScrollTimeline | undefined; - /** - * The **`text-decoration`** shorthand CSS property sets the appearance of decorative lines on text. It is a shorthand for `text-decoration-line`, `text-decoration-color`, `text-decoration-style`, and the newer `text-decoration-thickness` property. - * - * **Syntax**: `<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration - */ - "text-decoration"?: Property.TextDecoration<TLength> | undefined; - /** - * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. - * - * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis - */ - "text-emphasis"?: Property.TextEmphasis | undefined; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition - */ - transition?: Property.Transition<TTime> | undefined; - /** - * The **`view-timeline`** CSS shorthand property is used to define a _named view progress timeline_, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline` is set on the subject. - * - * **Syntax**: `[ <'view-timeline-name'> <'view-timeline-axis'>? ]#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **115** | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline - */ - "view-timeline"?: Property.ViewTimeline | undefined; -} - -export interface StandardPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> - extends StandardLonghandPropertiesHyphen<TLength, TTime>, - StandardShorthandPropertiesHyphen<TLength, TTime> {} - -export interface VendorLonghandPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { - /** - * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-moz-animation-delay"?: Property.AnimationDelay<TTime> | undefined; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - */ - "-moz-animation-direction"?: Property.AnimationDirection | undefined; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-moz-animation-duration"?: Property.AnimationDuration<TTime> | undefined; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - */ - "-moz-animation-fill-mode"?: Property.AnimationFillMode | undefined; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - */ - "-moz-animation-iteration-count"?: Property.AnimationIterationCount | undefined; - /** - * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - */ - "-moz-animation-name"?: Property.AnimationName | undefined; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - */ - "-moz-animation-play-state"?: Property.AnimationPlayState | undefined; - /** - * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - "-moz-animation-timing-function"?: Property.AnimationTimingFunction | undefined; - /** - * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. - * - * **Syntax**: `none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized` - * - * **Initial value**: `none` (but this value is overridden in the user agent CSS) - */ - "-moz-appearance"?: Property.MozAppearance | undefined; - /** - * The **`-moz-binding`** CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element. - * - * **Syntax**: `<url> | none` - * - * **Initial value**: `none` - */ - "-moz-binding"?: Property.MozBinding | undefined; - /** - * In Mozilla applications like Firefox, the **`-moz-border-bottom-colors`** CSS property sets a list of colors for the bottom border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - "-moz-border-bottom-colors"?: Property.MozBorderBottomColors | undefined; - /** - * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - */ - "-moz-border-end-color"?: Property.BorderInlineEndColor | undefined; - /** - * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - */ - "-moz-border-end-style"?: Property.BorderInlineEndStyle | undefined; - /** - * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - */ - "-moz-border-end-width"?: Property.BorderInlineEndWidth<TLength> | undefined; - /** - * In Mozilla applications like Firefox, the **`-moz-border-left-colors`** CSS property sets a list of colors for the left border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - "-moz-border-left-colors"?: Property.MozBorderLeftColors | undefined; - /** - * In Mozilla applications like Firefox, the **`-moz-border-right-colors`** CSS property sets a list of colors for the right border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - "-moz-border-right-colors"?: Property.MozBorderRightColors | undefined; - /** - * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - */ - "-moz-border-start-color"?: Property.BorderInlineStartColor | undefined; - /** - * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - */ - "-moz-border-start-style"?: Property.BorderInlineStartStyle | undefined; - /** - * In Mozilla applications like Firefox, the **`-moz-border-top-colors`** CSS property sets a list of colors for the top border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - "-moz-border-top-colors"?: Property.MozBorderTopColors | undefined; - /** - * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. - * - * **Syntax**: `content-box | border-box` - * - * **Initial value**: `content-box` - */ - "-moz-box-sizing"?: Property.BoxSizing | undefined; - /** - * The **`column-count`** CSS property breaks an element's content into the specified number of columns. - * - * **Syntax**: `<integer> | auto` - * - * **Initial value**: `auto` - */ - "-moz-column-count"?: Property.ColumnCount | undefined; - /** - * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. - * - * **Syntax**: `auto | balance | balance-all` - * - * **Initial value**: `balance` - */ - "-moz-column-fill"?: Property.ColumnFill | undefined; - /** - * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-moz-column-rule-color"?: Property.ColumnRuleColor | undefined; - /** - * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - */ - "-moz-column-rule-style"?: Property.ColumnRuleStyle | undefined; - /** - * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - */ - "-moz-column-rule-width"?: Property.ColumnRuleWidth<TLength> | undefined; - /** - * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. - * - * **Syntax**: `<length> | auto` - * - * **Initial value**: `auto` - */ - "-moz-column-width"?: Property.ColumnWidth<TLength> | undefined; - /** - * The **`-moz-context-properties`** property can be used within privileged contexts in Firefox to share the values of specified properties of the element with a child SVG image. - * - * **Syntax**: `none | [ fill | fill-opacity | stroke | stroke-opacity ]#` - * - * **Initial value**: `none` - */ - "-moz-context-properties"?: Property.MozContextProperties | undefined; - /** - * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. - * - * **Syntax**: `normal | <feature-tag-value>#` - * - * **Initial value**: `normal` - */ - "-moz-font-feature-settings"?: Property.FontFeatureSettings | undefined; - /** - * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. - * - * **Syntax**: `normal | <string>` - * - * **Initial value**: `normal` - */ - "-moz-font-language-override"?: Property.FontLanguageOverride | undefined; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - */ - "-moz-hyphens"?: Property.Hyphens | undefined; - /** - * For certain XUL elements and pseudo-elements that use an image from the `list-style-image` property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance. - * - * **Syntax**: `<shape> | auto` - * - * **Initial value**: `auto` - */ - "-moz-image-region"?: Property.MozImageRegion | undefined; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - "-moz-margin-end"?: Property.MarginInlineEnd<TLength> | undefined; - /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - "-moz-margin-start"?: Property.MarginInlineStart<TLength> | undefined; - /** - * The **`-moz-orient`** CSS property specifies the orientation of the element to which it's applied. - * - * **Syntax**: `inline | block | horizontal | vertical` - * - * **Initial value**: `inline` - */ - "-moz-orient"?: Property.MozOrient | undefined; - /** - * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. - * - * **Syntax**: `auto | never | always | <absolute-size> | <length>` - * - * **Initial value**: `auto` - */ - "-moz-osx-font-smoothing"?: Property.FontSmooth<TLength> | undefined; - /** - * In Mozilla applications, the **`-moz-outline-radius-bottomleft`** CSS property can be used to round the bottom-left corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - */ - "-moz-outline-radius-bottomleft"?: Property.MozOutlineRadiusBottomleft<TLength> | undefined; - /** - * In Mozilla applications, the **`-moz-outline-radius-bottomright`** CSS property can be used to round the bottom-right corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - */ - "-moz-outline-radius-bottomright"?: Property.MozOutlineRadiusBottomright<TLength> | undefined; - /** - * In Mozilla applications, the **`-moz-outline-radius-topleft`** CSS property can be used to round the top-left corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - */ - "-moz-outline-radius-topleft"?: Property.MozOutlineRadiusTopleft<TLength> | undefined; - /** - * In Mozilla applications, the **`-moz-outline-radius-topright`** CSS property can be used to round the top-right corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - */ - "-moz-outline-radius-topright"?: Property.MozOutlineRadiusTopright<TLength> | undefined; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - "-moz-padding-end"?: Property.PaddingInlineEnd<TLength> | undefined; - /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - "-moz-padding-start"?: Property.PaddingInlineStart<TLength> | undefined; - /** - * **`-moz-stack-sizing`** is an extended CSS property. Normally, a `<xul:stack>` will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible. - * - * **Syntax**: `ignore | stretch-to-fit` - * - * **Initial value**: `stretch-to-fit` - */ - "-moz-stack-sizing"?: Property.MozStackSizing | undefined; - /** - * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - */ - "-moz-tab-size"?: Property.TabSize<TLength> | undefined; - /** - * The **`-moz-text-blink`** non-standard Mozilla CSS extension specifies the blink mode. - * - * **Syntax**: `none | blink` - * - * **Initial value**: `none` - */ - "-moz-text-blink"?: Property.MozTextBlink | undefined; - /** - * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. - * - * **Syntax**: `none | auto | <percentage>` - * - * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). - */ - "-moz-text-size-adjust"?: Property.TextSizeAdjust | undefined; - /** - * The **`-moz-user-focus`** CSS property is used to indicate whether an element can have the focus. - * - * **Syntax**: `ignore | normal | select-after | select-before | select-menu | select-same | select-all | none` - * - * **Initial value**: `none` - */ - "-moz-user-focus"?: Property.MozUserFocus | undefined; - /** - * The **`user-modify`** property has no effect in Firefox. It was originally planned to determine whether or not the content of an element can be edited by a user. - * - * **Syntax**: `read-only | read-write | write-only` - * - * **Initial value**: `read-only` - */ - "-moz-user-modify"?: Property.MozUserModify | undefined; - /** - * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - */ - "-moz-user-select"?: Property.UserSelect | undefined; - /** - * The **`-moz-window-dragging`** CSS property specifies whether a window is draggable or not. It only works in Chrome code, and only on Mac OS X. - * - * **Syntax**: `drag | no-drag` - * - * **Initial value**: `drag` - */ - "-moz-window-dragging"?: Property.MozWindowDragging | undefined; - /** - * The **`-moz-window-shadow`** CSS property specifies whether a window will have a shadow. It only works on Mac OS X. - * - * **Syntax**: `default | menu | tooltip | sheet | none` - * - * **Initial value**: `default` - */ - "-moz-window-shadow"?: Property.MozWindowShadow | undefined; - /** - * The **`-ms-accelerator`** CSS property is a Microsoft extension that sets or retrieves a string indicating whether the object represents a keyboard shortcut. - * - * **Syntax**: `false | true` - * - * **Initial value**: `false` - */ - "-ms-accelerator"?: Property.MsAccelerator | undefined; - /** - * The **`-ms-block-progression`** CSS property is a Microsoft extension that specifies the block progression and layout orientation. - * - * **Syntax**: `tb | rl | bt | lr` - * - * **Initial value**: `tb` - */ - "-ms-block-progression"?: Property.MsBlockProgression | undefined; - /** - * The **`-ms-content-zoom-chaining`** CSS property is a Microsoft extension specifying the zoom behavior that occurs when a user hits the zoom limit during page manipulation. - * - * **Syntax**: `none | chained` - * - * **Initial value**: `none` - */ - "-ms-content-zoom-chaining"?: Property.MsContentZoomChaining | undefined; - /** - * The **`-ms-content-zoom-limit-max`** CSS property is a Microsoft extension that specifies the selected elements' maximum zoom factor. - * - * **Syntax**: `<percentage>` - * - * **Initial value**: `400%` - */ - "-ms-content-zoom-limit-max"?: Property.MsContentZoomLimitMax | undefined; - /** - * The **`-ms-content-zoom-limit-min`** CSS property is a Microsoft extension that specifies the minimum zoom factor. - * - * **Syntax**: `<percentage>` - * - * **Initial value**: `100%` - */ - "-ms-content-zoom-limit-min"?: Property.MsContentZoomLimitMin | undefined; - /** - * The **`-ms-content-zoom-snap-points`** CSS property is a Microsoft extension that specifies where zoom snap-points are located. - * - * **Syntax**: `snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )` - * - * **Initial value**: `snapInterval(0%, 100%)` - */ - "-ms-content-zoom-snap-points"?: Property.MsContentZoomSnapPoints | undefined; - /** - * The **`-ms-content-zoom-snap-type`** CSS property is a Microsoft extension that specifies how zooming is affected by defined snap-points. - * - * **Syntax**: `none | proximity | mandatory` - * - * **Initial value**: `none` - */ - "-ms-content-zoom-snap-type"?: Property.MsContentZoomSnapType | undefined; - /** - * The **`-ms-content-zooming`** CSS property is a Microsoft extension that specifies whether zooming is enabled. - * - * **Syntax**: `none | zoom` - * - * **Initial value**: zoom for the top level element, none for all other elements - */ - "-ms-content-zooming"?: Property.MsContentZooming | undefined; - /** - * The `-ms-filter` CSS property is a Microsoft extension that sets or retrieves the filter or collection of filters applied to an object. - * - * **Syntax**: `<string>` - * - * **Initial value**: "" (the empty string) - */ - "-ms-filter"?: Property.MsFilter | undefined; - /** - * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). - * - * **Syntax**: `row | row-reverse | column | column-reverse` - * - * **Initial value**: `row` - */ - "-ms-flex-direction"?: Property.FlexDirection | undefined; - /** - * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - */ - "-ms-flex-positive"?: Property.FlexGrow | undefined; - /** - * The **`-ms-flow-from`** CSS property is a Microsoft extension that gets or sets a value identifying a region container in the document that accepts the content flow from the data source. - * - * **Syntax**: `[ none | <custom-ident> ]#` - * - * **Initial value**: `none` - */ - "-ms-flow-from"?: Property.MsFlowFrom | undefined; - /** - * The **`-ms-flow-into`** CSS property is a Microsoft extension that gets or sets a value identifying an iframe container in the document that serves as the region's data source. - * - * **Syntax**: `[ none | <custom-ident> ]#` - * - * **Initial value**: `none` - */ - "-ms-flow-into"?: Property.MsFlowInto | undefined; - /** - * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. - * - * **Syntax**: `none | <track-list> | <auto-track-list>` - * - * **Initial value**: `none` - */ - "-ms-grid-columns"?: Property.MsGridColumns<TLength> | undefined; - /** - * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. - * - * **Syntax**: `none | <track-list> | <auto-track-list>` - * - * **Initial value**: `none` - */ - "-ms-grid-rows"?: Property.MsGridRows<TLength> | undefined; - /** - * The **`-ms-high-contrast-adjust`** CSS property is a Microsoft extension that gets or sets a value indicating whether to override any CSS properties that would have been set in high contrast mode. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - */ - "-ms-high-contrast-adjust"?: Property.MsHighContrastAdjust | undefined; - /** - * The **`-ms-hyphenate-limit-chars`** CSS property is a Microsoft extension that specifies one to three values indicating the minimum number of characters in a hyphenated word. If the word does not meet the required minimum number of characters in the word, before the hyphen, or after the hyphen, then the word is not hyphenated. - * - * **Syntax**: `auto | <integer>{1,3}` - * - * **Initial value**: `auto` - */ - "-ms-hyphenate-limit-chars"?: Property.MsHyphenateLimitChars | undefined; - /** - * The **`-ms-hyphenate-limit-lines`** CSS property is a Microsoft extension specifying the maximum number of consecutive lines in an element that may be ended with a hyphenated word. - * - * **Syntax**: `no-limit | <integer>` - * - * **Initial value**: `no-limit` - */ - "-ms-hyphenate-limit-lines"?: Property.MsHyphenateLimitLines | undefined; - /** - * The `**-ms-hyphenate-limit-zone**` CSS property is a Microsoft extension specifying the width of the hyphenation zone. - * - * **Syntax**: `<percentage> | <length>` - * - * **Initial value**: `0` - */ - "-ms-hyphenate-limit-zone"?: Property.MsHyphenateLimitZone<TLength> | undefined; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - */ - "-ms-hyphens"?: Property.Hyphens | undefined; - /** - * The **`-ms-ime-align`** CSS property is a Microsoft extension aligning the Input Method Editor (IME) candidate window box relative to the element on which the IME composition is active. The extension is implemented in Microsoft Edge and Internet Explorer 11. - * - * **Syntax**: `auto | after` - * - * **Initial value**: `auto` - */ - "-ms-ime-align"?: Property.MsImeAlign | undefined; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - */ - "-ms-line-break"?: Property.LineBreak | undefined; - /** - * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `0` - */ - "-ms-order"?: Property.Order | undefined; - /** - * The **`-ms-overflow-style`** CSS property is a Microsoft extension controlling the behavior of scrollbars when the content of an element overflows. - * - * **Syntax**: `auto | none | scrollbar | -ms-autohiding-scrollbar` - * - * **Initial value**: `auto` - */ - "-ms-overflow-style"?: Property.MsOverflowStyle | undefined; - /** - * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - */ - "-ms-overflow-x"?: Property.OverflowX | undefined; - /** - * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - */ - "-ms-overflow-y"?: Property.OverflowY | undefined; - /** - * The `**-ms-scroll-chaining**` CSS property is a Microsoft extension that specifies the scrolling behavior that occurs when a user hits the scroll limit during a manipulation. - * - * **Syntax**: `chained | none` - * - * **Initial value**: `chained` - */ - "-ms-scroll-chaining"?: Property.MsScrollChaining | undefined; - /** - * The `**-ms-scroll-limit-x-max**` CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollLeft` property. - * - * **Syntax**: `auto | <length>` - * - * **Initial value**: `auto` - */ - "-ms-scroll-limit-x-max"?: Property.MsScrollLimitXMax<TLength> | undefined; - /** - * The **`-ms-scroll-limit-x-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollLeft` property. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - "-ms-scroll-limit-x-min"?: Property.MsScrollLimitXMin<TLength> | undefined; - /** - * The **`-ms-scroll-limit-y-max`** CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollTop` property. - * - * **Syntax**: `auto | <length>` - * - * **Initial value**: `auto` - */ - "-ms-scroll-limit-y-max"?: Property.MsScrollLimitYMax<TLength> | undefined; - /** - * The **`-ms-scroll-limit-y-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollTop` property. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - "-ms-scroll-limit-y-min"?: Property.MsScrollLimitYMin<TLength> | undefined; - /** - * The **`-ms-scroll-rails`** CSS property is a Microsoft extension that specifies whether scrolling locks to the primary axis of motion. - * - * **Syntax**: `none | railed` - * - * **Initial value**: `railed` - */ - "-ms-scroll-rails"?: Property.MsScrollRails | undefined; - /** - * The **`-ms-scroll-snap-points-x`** CSS property is a Microsoft extension that specifies where snap-points will be located along the x-axis. - * - * **Syntax**: `snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )` - * - * **Initial value**: `snapInterval(0px, 100%)` - */ - "-ms-scroll-snap-points-x"?: Property.MsScrollSnapPointsX | undefined; - /** - * The **`-ms-scroll-snap-points-y`** CSS property is a Microsoft extension that specifies where snap-points will be located along the y-axis. - * - * **Syntax**: `snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )` - * - * **Initial value**: `snapInterval(0px, 100%)` - */ - "-ms-scroll-snap-points-y"?: Property.MsScrollSnapPointsY | undefined; - /** - * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. - * - * **Syntax**: `none | proximity | mandatory` - * - * **Initial value**: `none` - */ - "-ms-scroll-snap-type"?: Property.MsScrollSnapType | undefined; - /** - * The **`-ms-scroll-translation`** CSS property is a Microsoft extension that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element. - * - * **Syntax**: `none | vertical-to-horizontal` - * - * **Initial value**: `none` - */ - "-ms-scroll-translation"?: Property.MsScrollTranslation | undefined; - /** - * The **`-ms-scrollbar-3dlight-color`** CSS property is a Microsoft extension specifying the color of the top and left edges of the scroll box and scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: depends on user agent - */ - "-ms-scrollbar-3dlight-color"?: Property.MsScrollbar3dlightColor | undefined; - /** - * The **`-ms-scrollbar-arrow-color`** CSS property is a Microsoft extension that specifies the color of the arrow elements of a scroll arrow. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ButtonText` - */ - "-ms-scrollbar-arrow-color"?: Property.MsScrollbarArrowColor | undefined; - /** - * The `**-ms-scrollbar-base-color**` CSS property is a Microsoft extension that specifies the base color of the main elements of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: depends on user agent - */ - "-ms-scrollbar-base-color"?: Property.MsScrollbarBaseColor | undefined; - /** - * The **`-ms-scrollbar-darkshadow-color`** CSS property is a Microsoft extension that specifies the color of a scroll bar's gutter. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDDarkShadow` - */ - "-ms-scrollbar-darkshadow-color"?: Property.MsScrollbarDarkshadowColor | undefined; - /** - * The `**-ms-scrollbar-face-color**` CSS property is a Microsoft extension that specifies the color of the scroll box and scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDFace` - */ - "-ms-scrollbar-face-color"?: Property.MsScrollbarFaceColor | undefined; - /** - * The `**-ms-scrollbar-highlight-color**` CSS property is a Microsoft extension that specifies the color of the slider tray, the top and left edges of the scroll box, and the scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDHighlight` - */ - "-ms-scrollbar-highlight-color"?: Property.MsScrollbarHighlightColor | undefined; - /** - * The **`-ms-scrollbar-shadow-color`** CSS property is a Microsoft extension that specifies the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDDarkShadow` - */ - "-ms-scrollbar-shadow-color"?: Property.MsScrollbarShadowColor | undefined; - /** - * The **`-ms-scrollbar-track-color`** CSS property is a Microsoft extension that specifies the color of the track element of a scrollbar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `Scrollbar` - */ - "-ms-scrollbar-track-color"?: Property.MsScrollbarTrackColor | undefined; - /** - * The **`-ms-text-autospace`** CSS property is a Microsoft extension that specifies the autospacing and narrow space width adjustment of text. - * - * **Syntax**: `none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space` - * - * **Initial value**: `none` - */ - "-ms-text-autospace"?: Property.MsTextAutospace | undefined; - /** - * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. - * - * **Syntax**: `none | all | [ digits <integer>? ]` - * - * **Initial value**: `none` - */ - "-ms-text-combine-horizontal"?: Property.TextCombineUpright | undefined; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - */ - "-ms-text-overflow"?: Property.TextOverflow | undefined; - /** - * The **`touch-action`** CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). - * - * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` - * - * **Initial value**: `auto` - */ - "-ms-touch-action"?: Property.TouchAction | undefined; - /** - * The **`-ms-touch-select`** CSS property is a Microsoft extension that toggles the gripper visual elements that enable touch text selection. - * - * **Syntax**: `grippers | none` - * - * **Initial value**: `grippers` - */ - "-ms-touch-select"?: Property.MsTouchSelect | undefined; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - */ - "-ms-transform"?: Property.Transform | undefined; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - */ - "-ms-transform-origin"?: Property.TransformOrigin<TLength> | undefined; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-ms-transition-delay"?: Property.TransitionDelay<TTime> | undefined; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-ms-transition-duration"?: Property.TransitionDuration<TTime> | undefined; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - */ - "-ms-transition-property"?: Property.TransitionProperty | undefined; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - "-ms-transition-timing-function"?: Property.TransitionTimingFunction | undefined; - /** - * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. - * - * **Syntax**: `none | element | text` - * - * **Initial value**: `text` - */ - "-ms-user-select"?: Property.MsUserSelect | undefined; - /** - * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. - * - * **Syntax**: `normal | break-all | keep-all | break-word` - * - * **Initial value**: `normal` - */ - "-ms-word-break"?: Property.WordBreak | undefined; - /** - * The **`-ms-wrap-flow`** CSS property is a Microsoft extension that specifies how exclusions impact inline content within block-level elements. - * - * **Syntax**: `auto | both | start | end | maximum | clear` - * - * **Initial value**: `auto` - */ - "-ms-wrap-flow"?: Property.MsWrapFlow | undefined; - /** - * The **`-ms-wrap-margin`** CSS property is a Microsoft extension that specifies a margin that offsets the inner wrap shape from other shapes. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - "-ms-wrap-margin"?: Property.MsWrapMargin<TLength> | undefined; - /** - * The **`-ms-wrap-through`** CSS property is a Microsoft extension that specifies how content should wrap around an exclusion element. - * - * **Syntax**: `wrap | none` - * - * **Initial value**: `wrap` - */ - "-ms-wrap-through"?: Property.MsWrapThrough | undefined; - /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). - * - * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` - * - * **Initial value**: `horizontal-tb` - */ - "-ms-writing-mode"?: Property.WritingMode | undefined; - /** - * The CSS **`align-content`** property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. - * - * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` - * - * **Initial value**: `normal` - */ - "-webkit-align-content"?: Property.AlignContent | undefined; - /** - * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. - * - * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` - * - * **Initial value**: `normal` - */ - "-webkit-align-items"?: Property.AlignItems | undefined; - /** - * The **`align-self`** CSS property overrides a grid or flex item's `align-items` value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. - * - * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` - * - * **Initial value**: `auto` - */ - "-webkit-align-self"?: Property.AlignSelf | undefined; - /** - * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-webkit-animation-delay"?: Property.AnimationDelay<TTime> | undefined; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - */ - "-webkit-animation-direction"?: Property.AnimationDirection | undefined; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-webkit-animation-duration"?: Property.AnimationDuration<TTime> | undefined; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - */ - "-webkit-animation-fill-mode"?: Property.AnimationFillMode | undefined; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - */ - "-webkit-animation-iteration-count"?: Property.AnimationIterationCount | undefined; - /** - * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - */ - "-webkit-animation-name"?: Property.AnimationName | undefined; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - */ - "-webkit-animation-play-state"?: Property.AnimationPlayState | undefined; - /** - * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - "-webkit-animation-timing-function"?: Property.AnimationTimingFunction | undefined; - /** - * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. - * - * **Syntax**: `none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button` - * - * **Initial value**: `none` (but this value is overridden in the user agent CSS) - */ - "-webkit-appearance"?: Property.WebkitAppearance | undefined; - /** - * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - */ - "-webkit-backdrop-filter"?: Property.BackdropFilter | undefined; - /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. - * - * **Syntax**: `visible | hidden` - * - * **Initial value**: `visible` - */ - "-webkit-backface-visibility"?: Property.BackfaceVisibility | undefined; - /** - * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `border-box` - */ - "-webkit-background-clip"?: Property.BackgroundClip | undefined; - /** - * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `padding-box` - */ - "-webkit-background-origin"?: Property.BackgroundOrigin | undefined; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - */ - "-webkit-background-size"?: Property.BackgroundSize<TLength> | undefined; - /** - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-webkit-border-before-color"?: Property.WebkitBorderBeforeColor | undefined; - /** - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - */ - "-webkit-border-before-style"?: Property.WebkitBorderBeforeStyle | undefined; - /** - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - */ - "-webkit-border-before-width"?: Property.WebkitBorderBeforeWidth<TLength> | undefined; - /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - "-webkit-border-bottom-left-radius"?: Property.BorderBottomLeftRadius<TLength> | undefined; - /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - "-webkit-border-bottom-right-radius"?: Property.BorderBottomRightRadius<TLength> | undefined; - /** - * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. - * - * **Syntax**: `<number-percentage>{1,4} && fill?` - * - * **Initial value**: `100%` - */ - "-webkit-border-image-slice"?: Property.BorderImageSlice | undefined; - /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - "-webkit-border-top-left-radius"?: Property.BorderTopLeftRadius<TLength> | undefined; - /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - "-webkit-border-top-right-radius"?: Property.BorderTopRightRadius<TLength> | undefined; - /** - * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. - * - * **Syntax**: `slice | clone` - * - * **Initial value**: `slice` - */ - "-webkit-box-decoration-break"?: Property.BoxDecorationBreak | undefined; - /** - * The **`-webkit-box-reflect`** CSS property lets you reflect the content of an element in one specific direction. - * - * **Syntax**: `[ above | below | right | left ]? <length>? <image>?` - * - * **Initial value**: `none` - */ - "-webkit-box-reflect"?: Property.WebkitBoxReflect<TLength> | undefined; - /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. - * - * **Syntax**: `none | <shadow>#` - * - * **Initial value**: `none` - */ - "-webkit-box-shadow"?: Property.BoxShadow | undefined; - /** - * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. - * - * **Syntax**: `content-box | border-box` - * - * **Initial value**: `content-box` - */ - "-webkit-box-sizing"?: Property.BoxSizing | undefined; - /** - * The **`clip-path`** CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. - * - * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` - * - * **Initial value**: `none` - */ - "-webkit-clip-path"?: Property.ClipPath | undefined; - /** - * The **`column-count`** CSS property breaks an element's content into the specified number of columns. - * - * **Syntax**: `<integer> | auto` - * - * **Initial value**: `auto` - */ - "-webkit-column-count"?: Property.ColumnCount | undefined; - /** - * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. - * - * **Syntax**: `auto | balance | balance-all` - * - * **Initial value**: `balance` - */ - "-webkit-column-fill"?: Property.ColumnFill | undefined; - /** - * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-webkit-column-rule-color"?: Property.ColumnRuleColor | undefined; - /** - * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - */ - "-webkit-column-rule-style"?: Property.ColumnRuleStyle | undefined; - /** - * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - */ - "-webkit-column-rule-width"?: Property.ColumnRuleWidth<TLength> | undefined; - /** - * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. - * - * **Syntax**: `none | all` - * - * **Initial value**: `none` - */ - "-webkit-column-span"?: Property.ColumnSpan | undefined; - /** - * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. - * - * **Syntax**: `<length> | auto` - * - * **Initial value**: `auto` - */ - "-webkit-column-width"?: Property.ColumnWidth<TLength> | undefined; - /** - * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - */ - "-webkit-filter"?: Property.Filter | undefined; - /** - * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. - * - * **Syntax**: `content | <'width'>` - * - * **Initial value**: `auto` - */ - "-webkit-flex-basis"?: Property.FlexBasis<TLength> | undefined; - /** - * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). - * - * **Syntax**: `row | row-reverse | column | column-reverse` - * - * **Initial value**: `row` - */ - "-webkit-flex-direction"?: Property.FlexDirection | undefined; - /** - * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - */ - "-webkit-flex-grow"?: Property.FlexGrow | undefined; - /** - * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. - * - * **Syntax**: `<number>` - * - * **Initial value**: `1` - */ - "-webkit-flex-shrink"?: Property.FlexShrink | undefined; - /** - * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. - * - * **Syntax**: `nowrap | wrap | wrap-reverse` - * - * **Initial value**: `nowrap` - */ - "-webkit-flex-wrap"?: Property.FlexWrap | undefined; - /** - * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. - * - * **Syntax**: `normal | <feature-tag-value>#` - * - * **Initial value**: `normal` - */ - "-webkit-font-feature-settings"?: Property.FontFeatureSettings | undefined; - /** - * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. - * - * **Syntax**: `auto | normal | none` - * - * **Initial value**: `auto` - */ - "-webkit-font-kerning"?: Property.FontKerning | undefined; - /** - * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. - * - * **Syntax**: `auto | never | always | <absolute-size> | <length>` - * - * **Initial value**: `auto` - */ - "-webkit-font-smoothing"?: Property.FontSmooth<TLength> | undefined; - /** - * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. - * - * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]` - * - * **Initial value**: `normal` - */ - "-webkit-font-variant-ligatures"?: Property.FontVariantLigatures | undefined; - /** - * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. - * - * **Syntax**: `auto | <string>` - * - * **Initial value**: `auto` - */ - "-webkit-hyphenate-character"?: Property.HyphenateCharacter | undefined; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - */ - "-webkit-hyphens"?: Property.Hyphens | undefined; - /** - * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. - * - * **Syntax**: `normal | [ <number> <integer>? ]` - * - * **Initial value**: `normal` - */ - "-webkit-initial-letter"?: Property.InitialLetter | undefined; - /** - * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. - * - * **Syntax**: `normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]` - * - * **Initial value**: `normal` - */ - "-webkit-justify-content"?: Property.JustifyContent | undefined; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - */ - "-webkit-line-break"?: Property.LineBreak | undefined; - /** - * The **`-webkit-line-clamp`** CSS property allows limiting of the contents of a block to the specified number of lines. - * - * **Syntax**: `none | <integer>` - * - * **Initial value**: `none` - */ - "-webkit-line-clamp"?: Property.WebkitLineClamp | undefined; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - "-webkit-margin-end"?: Property.MarginInlineEnd<TLength> | undefined; - /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - "-webkit-margin-start"?: Property.MarginInlineStart<TLength> | undefined; - /** - * If a `mask-image` is specified, `-webkit-mask-attachment` determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block. - * - * **Syntax**: `<attachment>#` - * - * **Initial value**: `scroll` - */ - "-webkit-mask-attachment"?: Property.WebkitMaskAttachment | undefined; - /** - * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. - * - * **Syntax**: `[ <length> | <number> ]{1,4}` - * - * **Initial value**: `0` - */ - "-webkit-mask-box-image-outset"?: Property.MaskBorderOutset<TLength> | undefined; - /** - * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. - * - * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` - * - * **Initial value**: `stretch` - */ - "-webkit-mask-box-image-repeat"?: Property.MaskBorderRepeat | undefined; - /** - * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. - * - * **Syntax**: `<number-percentage>{1,4} fill?` - * - * **Initial value**: `0` - */ - "-webkit-mask-box-image-slice"?: Property.MaskBorderSlice | undefined; - /** - * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. - * - * **Syntax**: `none | <image>` - * - * **Initial value**: `none` - */ - "-webkit-mask-box-image-source"?: Property.MaskBorderSource | undefined; - /** - * The **`mask-border-width`** CSS property sets the width of an element's mask border. - * - * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` - * - * **Initial value**: `auto` - */ - "-webkit-mask-box-image-width"?: Property.MaskBorderWidth<TLength> | undefined; - /** - * The **`mask-clip`** CSS property determines the area which is affected by a mask. The painted content of an element must be restricted to this area. - * - * **Syntax**: `[ <box> | border | padding | content | text ]#` - * - * **Initial value**: `border` - */ - "-webkit-mask-clip"?: Property.WebkitMaskClip | undefined; - /** - * The **`-webkit-mask-composite`** property specifies the manner in which multiple mask images applied to the same element are composited with one another. Mask images are composited in the opposite order that they are declared with the `-webkit-mask-image` property. - * - * **Syntax**: `<composite-style>#` - * - * **Initial value**: `source-over` - */ - "-webkit-mask-composite"?: Property.WebkitMaskComposite | undefined; - /** - * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. By default this means the alpha channel of the mask image will be multiplied with the alpha channel of the element. This can be controlled with the `mask-mode` property. - * - * **Syntax**: `<mask-reference>#` - * - * **Initial value**: `none` - */ - "-webkit-mask-image"?: Property.WebkitMaskImage | undefined; - /** - * The **`mask-origin`** CSS property sets the origin of a mask. - * - * **Syntax**: `[ <box> | border | padding | content ]#` - * - * **Initial value**: `padding` - */ - "-webkit-mask-origin"?: Property.WebkitMaskOrigin | undefined; - /** - * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. - * - * **Syntax**: `<position>#` - * - * **Initial value**: `0% 0%` - */ - "-webkit-mask-position"?: Property.WebkitMaskPosition<TLength> | undefined; - /** - * The `-webkit-mask-position-x` CSS property sets the initial horizontal position of a mask image. - * - * **Syntax**: `[ <length-percentage> | left | center | right ]#` - * - * **Initial value**: `0%` - */ - "-webkit-mask-position-x"?: Property.WebkitMaskPositionX<TLength> | undefined; - /** - * The `-webkit-mask-position-y` CSS property sets the initial vertical position of a mask image. - * - * **Syntax**: `[ <length-percentage> | top | center | bottom ]#` - * - * **Initial value**: `0%` - */ - "-webkit-mask-position-y"?: Property.WebkitMaskPositionY<TLength> | undefined; - /** - * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. - * - * **Syntax**: `<repeat-style>#` - * - * **Initial value**: `repeat` - */ - "-webkit-mask-repeat"?: Property.WebkitMaskRepeat | undefined; - /** - * The `-webkit-mask-repeat-x` property specifies whether and how a mask image is repeated (tiled) horizontally. - * - * **Syntax**: `repeat | no-repeat | space | round` - * - * **Initial value**: `repeat` - */ - "-webkit-mask-repeat-x"?: Property.WebkitMaskRepeatX | undefined; - /** - * The `-webkit-mask-repeat-y` property sets whether and how a mask image is repeated (tiled) vertically. - * - * **Syntax**: `repeat | no-repeat | space | round` - * - * **Initial value**: `repeat` - */ - "-webkit-mask-repeat-y"?: Property.WebkitMaskRepeatY | undefined; - /** - * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - */ - "-webkit-mask-size"?: Property.WebkitMaskSize<TLength> | undefined; - /** - * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block, depending on its writing mode. It corresponds to either the `max-width` or the `max-height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'max-width'>` - * - * **Initial value**: `none` - */ - "-webkit-max-inline-size"?: Property.MaxInlineSize<TLength> | undefined; - /** - * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `0` - */ - "-webkit-order"?: Property.Order | undefined; - /** - * The `-webkit-overflow-scrolling` CSS property controls whether or not touch devices use momentum-based scrolling for a given element. - * - * **Syntax**: `auto | touch` - * - * **Initial value**: `auto` - */ - "-webkit-overflow-scrolling"?: Property.WebkitOverflowScrolling | undefined; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - "-webkit-padding-end"?: Property.PaddingInlineEnd<TLength> | undefined; - /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - "-webkit-padding-start"?: Property.PaddingInlineStart<TLength> | undefined; - /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - */ - "-webkit-perspective"?: Property.Perspective<TLength> | undefined; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - */ - "-webkit-perspective-origin"?: Property.PerspectiveOrigin<TLength> | undefined; - /** - * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. - * - * **Syntax**: `economy | exact` - * - * **Initial value**: `economy` - */ - "-webkit-print-color-adjust"?: Property.PrintColorAdjust | undefined; - /** - * The **`ruby-position`** CSS property defines the position of a ruby element relatives to its base element. It can be positioned over the element (`over`), under it (`under`), or between the characters on their right side (`inter-character`). - * - * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` - * - * **Initial value**: `alternate` - */ - "-webkit-ruby-position"?: Property.RubyPosition | undefined; - /** - * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. - * - * **Syntax**: `none | [ x | y | block | inline | both ] [ mandatory | proximity ]?` - * - * **Initial value**: `none` - */ - "-webkit-scroll-snap-type"?: Property.ScrollSnapType | undefined; - /** - * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - */ - "-webkit-shape-margin"?: Property.ShapeMargin<TLength> | undefined; - /** - * **`-webkit-tap-highlight-color`** is a non-standard CSS property that sets the color of the highlight that appears over a link while it's being tapped. The highlighting indicates to the user that their tap is being successfully recognized, and indicates which element they're tapping on. - * - * **Syntax**: `<color>` - * - * **Initial value**: `black` - */ - "-webkit-tap-highlight-color"?: Property.WebkitTapHighlightColor | undefined; - /** - * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. - * - * **Syntax**: `none | all | [ digits <integer>? ]` - * - * **Initial value**: `none` - */ - "-webkit-text-combine"?: Property.TextCombineUpright | undefined; - /** - * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-webkit-text-decoration-color"?: Property.TextDecorationColor | undefined; - /** - * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. - * - * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` - * - * **Initial value**: `none` - */ - "-webkit-text-decoration-line"?: Property.TextDecorationLine | undefined; - /** - * The **`text-decoration-skip`** CSS property sets what parts of an element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. - * - * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` - * - * **Initial value**: `objects` - */ - "-webkit-text-decoration-skip"?: Property.TextDecorationSkip | undefined; - /** - * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. - * - * **Syntax**: `solid | double | dotted | dashed | wavy` - * - * **Initial value**: `solid` - */ - "-webkit-text-decoration-style"?: Property.TextDecorationStyle | undefined; - /** - * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-webkit-text-emphasis-color"?: Property.TextEmphasisColor | undefined; - /** - * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. - * - * **Syntax**: `[ over | under ] && [ right | left ]` - * - * **Initial value**: `over right` - */ - "-webkit-text-emphasis-position"?: Property.TextEmphasisPosition | undefined; - /** - * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. - * - * **Syntax**: `none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>` - * - * **Initial value**: `none` - */ - "-webkit-text-emphasis-style"?: Property.TextEmphasisStyle | undefined; - /** - * The **`-webkit-text-fill-color`** CSS property specifies the fill color of characters of text. If this property is not set, the value of the `color` property is used. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-webkit-text-fill-color"?: Property.WebkitTextFillColor | undefined; - /** - * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. - * - * **Syntax**: `mixed | upright | sideways` - * - * **Initial value**: `mixed` - */ - "-webkit-text-orientation"?: Property.TextOrientation | undefined; - /** - * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. - * - * **Syntax**: `none | auto | <percentage>` - * - * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). - */ - "-webkit-text-size-adjust"?: Property.TextSizeAdjust | undefined; - /** - * The **`-webkit-text-stroke-color`** CSS property specifies the stroke color of characters of text. If this property is not set, the value of the `color` property is used. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-webkit-text-stroke-color"?: Property.WebkitTextStrokeColor | undefined; - /** - * The **`-webkit-text-stroke-width`** CSS property specifies the width of the stroke for text. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - "-webkit-text-stroke-width"?: Property.WebkitTextStrokeWidth<TLength> | undefined; - /** - * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. - * - * **Syntax**: `auto | from-font | [ under || [ left | right ] ]` - * - * **Initial value**: `auto` - */ - "-webkit-text-underline-position"?: Property.TextUnderlinePosition | undefined; - /** - * The `-webkit-touch-callout` CSS property controls the display of the default callout shown when you touch and hold a touch target. - * - * **Syntax**: `default | none` - * - * **Initial value**: `default` - */ - "-webkit-touch-callout"?: Property.WebkitTouchCallout | undefined; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - */ - "-webkit-transform"?: Property.Transform | undefined; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - */ - "-webkit-transform-origin"?: Property.TransformOrigin<TLength> | undefined; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - */ - "-webkit-transform-style"?: Property.TransformStyle | undefined; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-webkit-transition-delay"?: Property.TransitionDelay<TTime> | undefined; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-webkit-transition-duration"?: Property.TransitionDuration<TTime> | undefined; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - */ - "-webkit-transition-property"?: Property.TransitionProperty | undefined; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - "-webkit-transition-timing-function"?: Property.TransitionTimingFunction | undefined; - /** - * **Syntax**: `read-only | read-write | read-write-plaintext-only` - * - * **Initial value**: `read-only` - */ - "-webkit-user-modify"?: Property.WebkitUserModify | undefined; - /** - * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - */ - "-webkit-user-select"?: Property.UserSelect | undefined; - /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). - * - * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` - * - * **Initial value**: `horizontal-tb` - */ - "-webkit-writing-mode"?: Property.WritingMode | undefined; -} - -export interface VendorShorthandPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { - /** - * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - */ - "-moz-animation"?: Property.Animation<TTime> | undefined; - /** - * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - */ - "-moz-border-image"?: Property.BorderImage | undefined; - /** - * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` - */ - "-moz-column-rule"?: Property.ColumnRule<TLength> | undefined; - /** - * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. - * - * **Syntax**: `<'column-width'> || <'column-count'>` - */ - "-moz-columns"?: Property.Columns<TLength> | undefined; - /** - * In Mozilla applications like Firefox, the **`-moz-outline-radius`** CSS shorthand property can be used to give an element's `outline` rounded corners. - * - * **Syntax**: `<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?` - */ - "-moz-outline-radius"?: Property.MozOutlineRadius<TLength> | undefined; - /** - * The **`-ms-content-zoom-limit`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-limit-min` and `-ms-content-zoom-limit-max` properties. - * - * **Syntax**: `<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>` - */ - "-ms-content-zoom-limit"?: Property.MsContentZoomLimit | undefined; - /** - * The **`-ms-content-zoom-snap`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-snap-type` and `-ms-content-zoom-snap-points` properties. - * - * **Syntax**: `<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>` - */ - "-ms-content-zoom-snap"?: Property.MsContentZoomSnap | undefined; - /** - * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. - * - * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` - */ - "-ms-flex"?: Property.Flex<TLength> | undefined; - /** - * The **\-ms-scroll-limit** CSS property is a Microsoft extension that specifies values for the `-ms-scroll-limit-x-min`, `-ms-scroll-limit-y-min`, `-ms-scroll-limit-x-max`, and `-ms-scroll-limit-y-max` properties. - * - * **Syntax**: `<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>` - */ - "-ms-scroll-limit"?: Property.MsScrollLimit | undefined; - /** - * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-x` properties. - * - * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>` - */ - "-ms-scroll-snap-x"?: Property.MsScrollSnapX | undefined; - /** - * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-y` properties. - * - * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>` - */ - "-ms-scroll-snap-y"?: Property.MsScrollSnapY | undefined; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - */ - "-ms-transition"?: Property.Transition<TTime> | undefined; - /** - * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - */ - "-webkit-animation"?: Property.Animation<TTime> | undefined; - /** - * The **`-webkit-border-before`** CSS property is a shorthand property for setting the individual logical block start border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-width'> || <'border-style'> || <color>` - */ - "-webkit-border-before"?: Property.WebkitBorderBefore<TLength> | undefined; - /** - * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - */ - "-webkit-border-image"?: Property.BorderImage | undefined; - /** - * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. - * - * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` - */ - "-webkit-border-radius"?: Property.BorderRadius<TLength> | undefined; - /** - * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` - */ - "-webkit-column-rule"?: Property.ColumnRule<TLength> | undefined; - /** - * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. - * - * **Syntax**: `<'column-width'> || <'column-count'>` - */ - "-webkit-columns"?: Property.Columns<TLength> | undefined; - /** - * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. - * - * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` - */ - "-webkit-flex"?: Property.Flex<TLength> | undefined; - /** - * The **`flex-flow`** CSS shorthand property specifies the direction of a flex container, as well as its wrapping behavior. - * - * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` - */ - "-webkit-flex-flow"?: Property.FlexFlow | undefined; - /** - * The **`mask`** CSS shorthand property hides an element (partially or fully) by masking or clipping the image at specific points. - * - * **Syntax**: `[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#` - */ - "-webkit-mask"?: Property.WebkitMask<TLength> | undefined; - /** - * The **`mask-border`** CSS shorthand property lets you create a mask along the edge of an element's border. - * - * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` - */ - "-webkit-mask-box-image"?: Property.MaskBorder | undefined; - /** - * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. - * - * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` - */ - "-webkit-text-emphasis"?: Property.TextEmphasis | undefined; - /** - * The **`-webkit-text-stroke`** CSS property specifies the width and color of strokes for text characters. This is a shorthand property for the longhand properties `-webkit-text-stroke-width` and `-webkit-text-stroke-color`. - * - * **Syntax**: `<length> || <color>` - */ - "-webkit-text-stroke"?: Property.WebkitTextStroke<TLength> | undefined; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - */ - "-webkit-transition"?: Property.Transition<TTime> | undefined; -} - -export interface VendorPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> - extends VendorLonghandPropertiesHyphen<TLength, TTime>, - VendorShorthandPropertiesHyphen<TLength, TTime> {} - -export interface ObsoletePropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { - /** - * In combination with `elevation`, the **`azimuth`** CSS property enables different audio sources to be positioned spatially for aural presentation. This is important in that it provides a natural way to tell several voices apart, as each can be positioned to originate at a different location on the sound stage. Stereo output produce a lateral sound stage, while binaural headphones and multi-speaker setups allow for a fully three-dimensional stage. - * - * **Syntax**: `<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards` - * - * **Initial value**: `center` - * - * @deprecated - */ - azimuth?: Property.Azimuth | undefined; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - "box-align"?: Property.BoxAlign | undefined; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - "box-direction"?: Property.BoxDirection | undefined; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "box-flex"?: Property.BoxFlex | undefined; - /** - * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "box-flex-group"?: Property.BoxFlexGroup | undefined; - /** - * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). - * - * **Syntax**: `single | multiple` - * - * **Initial value**: `single` - * - * @deprecated - */ - "box-lines"?: Property.BoxLines | undefined; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "box-ordinal-group"?: Property.BoxOrdinalGroup | undefined; - /** - * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - "box-orient"?: Property.BoxOrient | undefined; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - "box-pack"?: Property.BoxPack | undefined; - /** - * The **`clip`** CSS property defines a visible portion of an element. The `clip` property applies only to absolutely positioned elements — that is, elements with `position:absolute` or `position:fixed`. - * - * **Syntax**: `<shape> | auto` - * - * **Initial value**: `auto` - * - * @deprecated - */ - clip?: Property.Clip | undefined; - /** - * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "grid-column-gap"?: Property.GridColumnGap<TLength> | undefined; - /** - * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. - * - * **Syntax**: `<'grid-row-gap'> <'grid-column-gap'>?` - * - * @deprecated - */ - "grid-gap"?: Property.GridGap<TLength> | undefined; - /** - * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "grid-row-gap"?: Property.GridRowGap<TLength> | undefined; - /** - * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. - * - * **Syntax**: `auto | normal | active | inactive | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "ime-mode"?: Property.ImeMode | undefined; - /** - * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * @deprecated - */ - "offset-block"?: Property.InsetBlock<TLength> | undefined; - /** - * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "offset-block-end"?: Property.InsetBlockEnd<TLength> | undefined; - /** - * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "offset-block-start"?: Property.InsetBlockStart<TLength> | undefined; - /** - * The **`inset-inline`** CSS property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * @deprecated - */ - "offset-inline"?: Property.InsetInline<TLength> | undefined; - /** - * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "offset-inline-end"?: Property.InsetInlineEnd<TLength> | undefined; - /** - * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "offset-inline-start"?: Property.InsetInlineStart<TLength> | undefined; - /** - * The **`scroll-snap-coordinate`** CSS property defines the x and y coordinate positions within an element that will align with its nearest ancestor scroll container's `scroll-snap-destination` for each respective axis. - * - * **Syntax**: `none | <position>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - "scroll-snap-coordinate"?: Property.ScrollSnapCoordinate<TLength> | undefined; - /** - * The **`scroll-snap-destination`** CSS property defines the position in x and y coordinates within the scroll container's visual viewport which element snap points align with. - * - * **Syntax**: `<position>` - * - * **Initial value**: `0px 0px` - * - * @deprecated - */ - "scroll-snap-destination"?: Property.ScrollSnapDestination<TLength> | undefined; - /** - * The **`scroll-snap-points-x`** CSS property defines the horizontal positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - "scroll-snap-points-x"?: Property.ScrollSnapPointsX | undefined; - /** - * The **`scroll-snap-points-y`** CSS property defines the vertical positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - "scroll-snap-points-y"?: Property.ScrollSnapPointsY | undefined; - /** - * The **`scroll-snap-type-x`** CSS property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one. - * - * **Syntax**: `none | mandatory | proximity` - * - * **Initial value**: `none` - * - * @deprecated - */ - "scroll-snap-type-x"?: Property.ScrollSnapTypeX | undefined; - /** - * The **`scroll-snap-type-y`** CSS property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one. - * - * **Syntax**: `none | mandatory | proximity` - * - * **Initial value**: `none` - * - * @deprecated - */ - "scroll-snap-type-y"?: Property.ScrollSnapTypeY | undefined; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - "-khtml-box-align"?: Property.BoxAlign | undefined; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - "-khtml-box-direction"?: Property.BoxDirection | undefined; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-khtml-box-flex"?: Property.BoxFlex | undefined; - /** - * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-khtml-box-flex-group"?: Property.BoxFlexGroup | undefined; - /** - * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). - * - * **Syntax**: `single | multiple` - * - * **Initial value**: `single` - * - * @deprecated - */ - "-khtml-box-lines"?: Property.BoxLines | undefined; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-khtml-box-ordinal-group"?: Property.BoxOrdinalGroup | undefined; - /** - * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - "-khtml-box-orient"?: Property.BoxOrient | undefined; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - "-khtml-box-pack"?: Property.BoxPack | undefined; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "-khtml-line-break"?: Property.LineBreak | undefined; - /** - * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-khtml-opacity"?: Property.Opacity | undefined; - /** - * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "-khtml-user-select"?: Property.UserSelect | undefined; - /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. - * - * **Syntax**: `visible | hidden` - * - * **Initial value**: `visible` - * - * @deprecated - */ - "-moz-backface-visibility"?: Property.BackfaceVisibility | undefined; - /** - * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `border-box` - * - * @deprecated - */ - "-moz-background-clip"?: Property.BackgroundClip | undefined; - /** - * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. - * - * **Syntax**: `slice | clone` - * - * **Initial value**: `slice` - * - * @deprecated - */ - "-moz-background-inline-policy"?: Property.BoxDecorationBreak | undefined; - /** - * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `padding-box` - * - * @deprecated - */ - "-moz-background-origin"?: Property.BackgroundOrigin | undefined; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * @deprecated - */ - "-moz-background-size"?: Property.BackgroundSize<TLength> | undefined; - /** - * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. - * - * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` - * - * @deprecated - */ - "-moz-border-radius"?: Property.BorderRadius<TLength> | undefined; - /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-border-radius-bottomleft"?: Property.BorderBottomLeftRadius<TLength> | undefined; - /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-border-radius-bottomright"?: Property.BorderBottomRightRadius<TLength> | undefined; - /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-border-radius-topleft"?: Property.BorderTopLeftRadius<TLength> | undefined; - /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-border-radius-topright"?: Property.BorderTopRightRadius<TLength> | undefined; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - "-moz-box-align"?: Property.BoxAlign | undefined; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - "-moz-box-direction"?: Property.BoxDirection | undefined; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-box-flex"?: Property.BoxFlex | undefined; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-moz-box-ordinal-group"?: Property.BoxOrdinalGroup | undefined; - /** - * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - "-moz-box-orient"?: Property.BoxOrient | undefined; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - "-moz-box-pack"?: Property.BoxPack | undefined; - /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. - * - * **Syntax**: `none | <shadow>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-moz-box-shadow"?: Property.BoxShadow | undefined; - /** - * The non-standard **`-moz-float-edge`** CSS property specifies whether the height and width properties of the element include the margin, border, or padding thickness. - * - * **Syntax**: `border-box | content-box | margin-box | padding-box` - * - * **Initial value**: `content-box` - * - * @deprecated - */ - "-moz-float-edge"?: Property.MozFloatEdge | undefined; - /** - * The **`-moz-force-broken-image-icon`** extended CSS property can be used to force the broken image icon to be shown even when a broken image has an `alt` attribute. - * - * **Syntax**: `0 | 1` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-force-broken-image-icon"?: Property.MozForceBrokenImageIcon | undefined; - /** - * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-moz-opacity"?: Property.Opacity | undefined; - /** - * The **`outline`** CSS shorthand property sets most of the outline properties in a single declaration. - * - * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` - * - * @deprecated - */ - "-moz-outline"?: Property.Outline<TLength> | undefined; - /** - * The **`outline-color`** CSS property sets the color of an element's outline. - * - * **Syntax**: `<color> | invert` - * - * **Initial value**: `invert`, for browsers supporting it, `currentColor` for the other - * - * @deprecated - */ - "-moz-outline-color"?: Property.OutlineColor | undefined; - /** - * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `auto | <'border-style'>` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-moz-outline-style"?: Property.OutlineStyle | undefined; - /** - * The CSS **`outline-width`** property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * @deprecated - */ - "-moz-outline-width"?: Property.OutlineWidth<TLength> | undefined; - /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-moz-perspective"?: Property.Perspective<TLength> | undefined; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * @deprecated - */ - "-moz-perspective-origin"?: Property.PerspectiveOrigin<TLength> | undefined; - /** - * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. - * - * **Syntax**: `auto | start | end | left | right | center | justify` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "-moz-text-align-last"?: Property.TextAlignLast | undefined; - /** - * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * @deprecated - */ - "-moz-text-decoration-color"?: Property.TextDecorationColor | undefined; - /** - * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. - * - * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-moz-text-decoration-line"?: Property.TextDecorationLine | undefined; - /** - * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. - * - * **Syntax**: `solid | double | dotted | dashed | wavy` - * - * **Initial value**: `solid` - * - * @deprecated - */ - "-moz-text-decoration-style"?: Property.TextDecorationStyle | undefined; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-moz-transform"?: Property.Transform | undefined; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - * - * @deprecated - */ - "-moz-transform-origin"?: Property.TransformOrigin<TLength> | undefined; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - * - * @deprecated - */ - "-moz-transform-style"?: Property.TransformStyle | undefined; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - * - * @deprecated - */ - "-moz-transition"?: Property.Transition<TTime> | undefined; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - "-moz-transition-delay"?: Property.TransitionDelay<TTime> | undefined; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - "-moz-transition-duration"?: Property.TransitionDuration<TTime> | undefined; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - * - * @deprecated - */ - "-moz-transition-property"?: Property.TransitionProperty | undefined; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * @deprecated - */ - "-moz-transition-timing-function"?: Property.TransitionTimingFunction | undefined; - /** - * In Mozilla applications, **`-moz-user-input`** determines if an element will accept user input. - * - * **Syntax**: `auto | none | enabled | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "-moz-user-input"?: Property.MozUserInput | undefined; - /** - * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. - * - * **Syntax**: `auto | normal | active | inactive | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "-ms-ime-mode"?: Property.ImeMode | undefined; - /** - * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - * - * @deprecated - */ - "-o-animation"?: Property.Animation<TTime> | undefined; - /** - * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - "-o-animation-delay"?: Property.AnimationDelay<TTime> | undefined; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - * - * @deprecated - */ - "-o-animation-direction"?: Property.AnimationDirection | undefined; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - "-o-animation-duration"?: Property.AnimationDuration<TTime> | undefined; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-o-animation-fill-mode"?: Property.AnimationFillMode | undefined; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-o-animation-iteration-count"?: Property.AnimationIterationCount | undefined; - /** - * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-o-animation-name"?: Property.AnimationName | undefined; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - * - * @deprecated - */ - "-o-animation-play-state"?: Property.AnimationPlayState | undefined; - /** - * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * @deprecated - */ - "-o-animation-timing-function"?: Property.AnimationTimingFunction | undefined; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * @deprecated - */ - "-o-background-size"?: Property.BackgroundSize<TLength> | undefined; - /** - * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - * - * @deprecated - */ - "-o-border-image"?: Property.BorderImage | undefined; - /** - * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. - * - * **Syntax**: `fill | contain | cover | none | scale-down` - * - * **Initial value**: `fill` - * - * @deprecated - */ - "-o-object-fit"?: Property.ObjectFit | undefined; - /** - * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * @deprecated - */ - "-o-object-position"?: Property.ObjectPosition<TLength> | undefined; - /** - * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - * - * @deprecated - */ - "-o-tab-size"?: Property.TabSize<TLength> | undefined; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - * - * @deprecated - */ - "-o-text-overflow"?: Property.TextOverflow | undefined; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-o-transform"?: Property.Transform | undefined; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - * - * @deprecated - */ - "-o-transform-origin"?: Property.TransformOrigin<TLength> | undefined; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - * - * @deprecated - */ - "-o-transition"?: Property.Transition<TTime> | undefined; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - "-o-transition-delay"?: Property.TransitionDelay<TTime> | undefined; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - "-o-transition-duration"?: Property.TransitionDuration<TTime> | undefined; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - * - * @deprecated - */ - "-o-transition-property"?: Property.TransitionProperty | undefined; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * @deprecated - */ - "-o-transition-timing-function"?: Property.TransitionTimingFunction | undefined; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - "-webkit-box-align"?: Property.BoxAlign | undefined; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - "-webkit-box-direction"?: Property.BoxDirection | undefined; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-webkit-box-flex"?: Property.BoxFlex | undefined; - /** - * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-webkit-box-flex-group"?: Property.BoxFlexGroup | undefined; - /** - * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). - * - * **Syntax**: `single | multiple` - * - * **Initial value**: `single` - * - * @deprecated - */ - "-webkit-box-lines"?: Property.BoxLines | undefined; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-webkit-box-ordinal-group"?: Property.BoxOrdinalGroup | undefined; - /** - * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - "-webkit-box-orient"?: Property.BoxOrient | undefined; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - "-webkit-box-pack"?: Property.BoxPack | undefined; -} - -export interface SvgPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { - "alignment-baseline"?: Property.AlignmentBaseline | undefined; - "baseline-shift"?: Property.BaselineShift<TLength> | undefined; - clip?: Property.Clip | undefined; - "clip-path"?: Property.ClipPath | undefined; - "clip-rule"?: Property.ClipRule | undefined; - color?: Property.Color | undefined; - "color-interpolation"?: Property.ColorInterpolation | undefined; - "color-rendering"?: Property.ColorRendering | undefined; - cursor?: Property.Cursor | undefined; - direction?: Property.Direction | undefined; - display?: Property.Display | undefined; - "dominant-baseline"?: Property.DominantBaseline | undefined; - fill?: Property.Fill | undefined; - "fill-opacity"?: Property.FillOpacity | undefined; - "fill-rule"?: Property.FillRule | undefined; - filter?: Property.Filter | undefined; - "flood-color"?: Property.FloodColor | undefined; - "flood-opacity"?: Property.FloodOpacity | undefined; - font?: Property.Font | undefined; - "font-family"?: Property.FontFamily | undefined; - "font-size"?: Property.FontSize<TLength> | undefined; - "font-size-adjust"?: Property.FontSizeAdjust | undefined; - "font-stretch"?: Property.FontStretch | undefined; - "font-style"?: Property.FontStyle | undefined; - "font-variant"?: Property.FontVariant | undefined; - "font-weight"?: Property.FontWeight | undefined; - "glyph-orientation-vertical"?: Property.GlyphOrientationVertical | undefined; - "image-rendering"?: Property.ImageRendering | undefined; - "letter-spacing"?: Property.LetterSpacing<TLength> | undefined; - "lighting-color"?: Property.LightingColor | undefined; - "line-height"?: Property.LineHeight<TLength> | undefined; - marker?: Property.Marker | undefined; - "marker-end"?: Property.MarkerEnd | undefined; - "marker-mid"?: Property.MarkerMid | undefined; - "marker-start"?: Property.MarkerStart | undefined; - mask?: Property.Mask<TLength> | undefined; - opacity?: Property.Opacity | undefined; - overflow?: Property.Overflow | undefined; - "paint-order"?: Property.PaintOrder | undefined; - "pointer-events"?: Property.PointerEvents | undefined; - "shape-rendering"?: Property.ShapeRendering | undefined; - "stop-color"?: Property.StopColor | undefined; - "stop-opacity"?: Property.StopOpacity | undefined; - stroke?: Property.Stroke | undefined; - "stroke-dasharray"?: Property.StrokeDasharray<TLength> | undefined; - "stroke-dashoffset"?: Property.StrokeDashoffset<TLength> | undefined; - "stroke-linecap"?: Property.StrokeLinecap | undefined; - "stroke-linejoin"?: Property.StrokeLinejoin | undefined; - "stroke-miterlimit"?: Property.StrokeMiterlimit | undefined; - "stroke-opacity"?: Property.StrokeOpacity | undefined; - "stroke-width"?: Property.StrokeWidth<TLength> | undefined; - "text-anchor"?: Property.TextAnchor | undefined; - "text-decoration"?: Property.TextDecoration<TLength> | undefined; - "text-rendering"?: Property.TextRendering | undefined; - "unicode-bidi"?: Property.UnicodeBidi | undefined; - "vector-effect"?: Property.VectorEffect | undefined; - visibility?: Property.Visibility | undefined; - "white-space"?: Property.WhiteSpace | undefined; - "word-spacing"?: Property.WordSpacing<TLength> | undefined; - "writing-mode"?: Property.WritingMode | undefined; -} - -export interface PropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> - extends StandardPropertiesHyphen<TLength, TTime>, - VendorPropertiesHyphen<TLength, TTime>, - ObsoletePropertiesHyphen<TLength, TTime>, - SvgPropertiesHyphen<TLength, TTime> {} - -export type StandardLonghandPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardLonghandProperties<TLength, TTime>>; - -export type StandardShorthandPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandProperties<TLength, TTime>>; - -export interface StandardPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> - extends StandardLonghandPropertiesFallback<TLength, TTime>, - StandardShorthandPropertiesFallback<TLength, TTime> {} - -export type VendorLonghandPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorLonghandProperties<TLength, TTime>>; - -export type VendorShorthandPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorShorthandProperties<TLength, TTime>>; - -export interface VendorPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> - extends VendorLonghandPropertiesFallback<TLength, TTime>, - VendorShorthandPropertiesFallback<TLength, TTime> {} - -export type ObsoletePropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<ObsoleteProperties<TLength, TTime>>; - -export type SvgPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<SvgProperties<TLength, TTime>>; - -export interface PropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> - extends StandardPropertiesFallback<TLength, TTime>, - VendorPropertiesFallback<TLength, TTime>, - ObsoletePropertiesFallback<TLength, TTime>, - SvgPropertiesFallback<TLength, TTime> {} - -export type StandardLonghandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardLonghandPropertiesHyphen<TLength, TTime>>; - -export type StandardShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandPropertiesHyphen<TLength, TTime>>; - -export interface StandardPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> - extends StandardLonghandPropertiesHyphenFallback<TLength, TTime>, - StandardShorthandPropertiesHyphenFallback<TLength, TTime> {} - -export type VendorLonghandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorLonghandPropertiesHyphen<TLength, TTime>>; - -export type VendorShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorShorthandPropertiesHyphen<TLength, TTime>>; - -export interface VendorPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> - extends VendorLonghandPropertiesHyphenFallback<TLength, TTime>, - VendorShorthandPropertiesHyphenFallback<TLength, TTime> {} - -export type ObsoletePropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<ObsoletePropertiesHyphen<TLength, TTime>>; - -export type SvgPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<SvgPropertiesHyphen<TLength, TTime>>; - -export interface PropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> - extends StandardPropertiesHyphenFallback<TLength, TTime>, - VendorPropertiesHyphenFallback<TLength, TTime>, - ObsoletePropertiesHyphenFallback<TLength, TTime>, - SvgPropertiesHyphenFallback<TLength, TTime> {} - -export type AtRules = - | "@charset" - | "@counter-style" - | "@document" - | "@font-face" - | "@font-feature-values" - | "@font-palette-values" - | "@import" - | "@keyframes" - | "@layer" - | "@media" - | "@namespace" - | "@page" - | "@property" - | "@scope" - | "@scroll-timeline" - | "@starting-style" - | "@supports" - | "@viewport"; - -export type AdvancedPseudos = - | ":-moz-any()" - | ":-moz-dir" - | ":-webkit-any()" - | "::cue" - | "::cue-region" - | "::part" - | "::slotted" - | "::view-transition-group" - | "::view-transition-image-pair" - | "::view-transition-new" - | "::view-transition-old" - | ":dir" - | ":has" - | ":host" - | ":host-context" - | ":is" - | ":lang" - | ":matches()" - | ":not" - | ":nth-child" - | ":nth-last-child" - | ":nth-last-of-type" - | ":nth-of-type" - | ":where"; - -export type SimplePseudos = - | ":-khtml-any-link" - | ":-moz-any-link" - | ":-moz-focusring" - | ":-moz-full-screen" - | ":-moz-placeholder" - | ":-moz-read-only" - | ":-moz-read-write" - | ":-moz-ui-invalid" - | ":-moz-ui-valid" - | ":-ms-fullscreen" - | ":-ms-input-placeholder" - | ":-webkit-any-link" - | ":-webkit-full-screen" - | "::-moz-placeholder" - | "::-moz-progress-bar" - | "::-moz-range-progress" - | "::-moz-range-thumb" - | "::-moz-range-track" - | "::-moz-selection" - | "::-ms-backdrop" - | "::-ms-browse" - | "::-ms-check" - | "::-ms-clear" - | "::-ms-expand" - | "::-ms-fill" - | "::-ms-fill-lower" - | "::-ms-fill-upper" - | "::-ms-input-placeholder" - | "::-ms-reveal" - | "::-ms-thumb" - | "::-ms-ticks-after" - | "::-ms-ticks-before" - | "::-ms-tooltip" - | "::-ms-track" - | "::-ms-value" - | "::-webkit-backdrop" - | "::-webkit-input-placeholder" - | "::-webkit-progress-bar" - | "::-webkit-progress-inner-value" - | "::-webkit-progress-value" - | "::-webkit-slider-runnable-track" - | "::-webkit-slider-thumb" - | "::after" - | "::backdrop" - | "::before" - | "::cue" - | "::cue-region" - | "::first-letter" - | "::first-line" - | "::grammar-error" - | "::marker" - | "::placeholder" - | "::selection" - | "::spelling-error" - | "::target-text" - | "::view-transition" - | ":active" - | ":after" - | ":any-link" - | ":before" - | ":blank" - | ":checked" - | ":current" - | ":default" - | ":defined" - | ":disabled" - | ":empty" - | ":enabled" - | ":first" - | ":first-child" - | ":first-letter" - | ":first-line" - | ":first-of-type" - | ":focus" - | ":focus-visible" - | ":focus-within" - | ":fullscreen" - | ":future" - | ":hover" - | ":in-range" - | ":indeterminate" - | ":invalid" - | ":last-child" - | ":last-of-type" - | ":left" - | ":link" - | ":local-link" - | ":nth-col" - | ":nth-last-col" - | ":only-child" - | ":only-of-type" - | ":optional" - | ":out-of-range" - | ":past" - | ":paused" - | ":picture-in-picture" - | ":placeholder-shown" - | ":playing" - | ":read-only" - | ":read-write" - | ":required" - | ":right" - | ":root" - | ":scope" - | ":target" - | ":target-within" - | ":user-invalid" - | ":user-valid" - | ":valid" - | ":visited"; - -export type Pseudos = AdvancedPseudos | SimplePseudos; - -export type HtmlAttributes = - | "[abbr]" - | "[accept-charset]" - | "[accept]" - | "[accesskey]" - | "[action]" - | "[align]" - | "[alink]" - | "[allow]" - | "[allowfullscreen]" - | "[allowpaymentrequest]" - | "[alt]" - | "[archive]" - | "[async]" - | "[attributionsrc]" - | "[autobuffer]" - | "[autocapitalize]" - | "[autocomplete]" - | "[autofocus]" - | "[autoplay]" - | "[axis]" - | "[background]" - | "[behavior]" - | "[bgcolor]" - | "[blocking]" - | "[border]" - | "[bottommargin]" - | "[browsingtopics]" - | "[capture]" - | "[cellpadding]" - | "[cellspacing]" - | "[char]" - | "[charoff]" - | "[charset]" - | "[checked]" - | "[cite]" - | "[class]" - | "[classid]" - | "[clear]" - | "[codebase]" - | "[codetype]" - | "[color]" - | "[cols]" - | "[colspan]" - | "[compact]" - | "[content]" - | "[contenteditable]" - | "[contextmenu]" - | "[controls]" - | "[coords]" - | "[credentialless]" - | "[crossorigin]" - | "[data]" - | "[datetime]" - | "[declare]" - | "[decoding]" - | "[default]" - | "[defer]" - | "[dir]" - | "[direction]" - | "[dirname]" - | "[disabled]" - | "[download]" - | "[draggable]" - | "[enctype]" - | "[enterkeyhint]" - | "[exportparts]" - | "[face]" - | "[fetchpriority]" - | "[for]" - | "[form]" - | "[formaction]" - | "[formenctype]" - | "[formmethod]" - | "[formnovalidate]" - | "[formtarget]" - | "[frame]" - | "[frameborder]" - | "[headers]" - | "[height]" - | "[hidden]" - | "[high]" - | "[href]" - | "[hreflang]" - | "[hspace]" - | "[http-equiv]" - | "[id]" - | "[imagesizes]" - | "[imagesrcset]" - | "[inert]" - | "[inputmode]" - | "[integrity]" - | "[is]" - | "[ismap]" - | "[itemid]" - | "[itemprop]" - | "[itemref]" - | "[itemscope]" - | "[itemtype]" - | "[kind]" - | "[label]" - | "[lang]" - | "[language]" - | "[leftmargin]" - | "[link]" - | "[list]" - | "[loading]" - | "[longdesc]" - | "[loop]" - | "[low]" - | "[manifest]" - | "[marginheight]" - | "[marginwidth]" - | "[max]" - | "[maxlength]" - | "[media]" - | "[method]" - | "[methods]" - | "[min]" - | "[minlength]" - | "[moz-opaque]" - | "[mozactionhint]" - | "[mozallowfullscreen]" - | "[msallowfullscreen]" - | "[multiple]" - | "[muted]" - | "[name]" - | "[nohref]" - | "[nomodule]" - | "[nonce]" - | "[noresize]" - | "[noshade]" - | "[novalidate]" - | "[nowrap]" - | "[onerror]" - | "[open]" - | "[optimum]" - | "[part]" - | "[pattern]" - | "[ping]" - | "[placeholder]" - | "[popover]" - | "[popovertarget]" - | "[popovertargetaction]" - | "[poster]" - | "[preload]" - | "[profile]" - | "[readonly]" - | "[referrerpolicy]" - | "[rel]" - | "[required]" - | "[rev]" - | "[reversed]" - | "[rightmargin]" - | "[rows]" - | "[rowspan]" - | "[rules]" - | "[sandbox]" - | "[scope]" - | "[scrollamount]" - | "[scrolldelay]" - | "[scrolling]" - | "[selected]" - | "[shadowroot]" - | "[shadowrootmode]" - | "[shape]" - | "[size]" - | "[sizes]" - | "[slot]" - | "[span]" - | "[spellcheck]" - | "[src]" - | "[srcdoc]" - | "[srclang]" - | "[srcset]" - | "[standby]" - | "[start]" - | "[step]" - | "[style]" - | "[summary]" - | "[tabindex]" - | "[target]" - | "[text]" - | "[title]" - | "[topmargin]" - | "[translate]" - | "[truespeed]" - | "[type]" - | "[usemap]" - | "[valign]" - | "[value]" - | "[valuetype]" - | "[version]" - | "[virtualkeyboardpolicy]" - | "[vlink]" - | "[vspace]" - | "[webkitallowfullscreen]" - | "[width]" - | "[wrap]" - | "[x-moz-errormessage]" - | "[xmlns]"; - -export type SvgAttributes = - | "[accent-height]" - | "[alignment-baseline]" - | "[allowReorder]" - | "[alphabetic]" - | "[animation]" - | "[arabic-form]" - | "[ascent]" - | "[async]" - | "[attributeName]" - | "[attributeType]" - | "[azimuth]" - | "[baseFrequency]" - | "[baseProfile]" - | "[baseline-shift]" - | "[bbox]" - | "[bias]" - | "[by]" - | "[calcMode]" - | "[cap-height]" - | "[class]" - | "[clip-path]" - | "[clip-rule]" - | "[clipPathUnits]" - | "[clip]" - | "[color-interpolation-filters]" - | "[color-interpolation]" - | "[color-profile]" - | "[color]" - | "[contentScriptType]" - | "[contentStyleType]" - | "[crossorigin]" - | "[cursor]" - | "[cx]" - | "[cy]" - | "[d]" - | "[decoding]" - | "[defer]" - | "[descent]" - | "[diffuseConstant]" - | "[direction]" - | "[display]" - | "[divisor]" - | "[document]" - | "[dominant-baseline]" - | "[download]" - | "[dur]" - | "[dx]" - | "[dy]" - | "[edgeMode]" - | "[elevation]" - | "[enable-background]" - | "[fill-opacity]" - | "[fill-rule]" - | "[fill]" - | "[filterRes]" - | "[filterUnits]" - | "[filter]" - | "[flood-color]" - | "[flood-opacity]" - | "[font-family]" - | "[font-size-adjust]" - | "[font-size]" - | "[font-stretch]" - | "[font-style]" - | "[font-variant]" - | "[font-weight]" - | "[format]" - | "[fr]" - | "[from]" - | "[fx]" - | "[fy]" - | "[g1]" - | "[g2]" - | "[global]" - | "[glyph-name]" - | "[glyph-orientation-horizontal]" - | "[glyph-orientation-vertical]" - | "[glyphRef]" - | "[gradientTransform]" - | "[gradientUnits]" - | "[graphical]" - | "[hanging]" - | "[height]" - | "[horiz-adv-x]" - | "[horiz-origin-x]" - | "[horiz-origin-y]" - | "[href]" - | "[hreflang]" - | "[id]" - | "[ideographic]" - | "[image-rendering]" - | "[in2]" - | "[in]" - | "[k1]" - | "[k2]" - | "[k3]" - | "[k4]" - | "[k]" - | "[kernelMatrix]" - | "[kernelUnitLength]" - | "[kerning]" - | "[keyPoints]" - | "[lang]" - | "[lengthAdjust]" - | "[letter-spacing]" - | "[lighting-color]" - | "[limitingConeAngle]" - | "[marker-end]" - | "[marker-mid]" - | "[marker-start]" - | "[markerHeight]" - | "[markerUnits]" - | "[markerWidth]" - | "[maskContentUnits]" - | "[maskUnits]" - | "[mask]" - | "[mathematical]" - | "[media]" - | "[mode]" - | "[name]" - | "[numOctaves]" - | "[offset]" - | "[opacity]" - | "[operator]" - | "[order]" - | "[orient]" - | "[orientation]" - | "[origin]" - | "[overflow]" - | "[overline-position]" - | "[overline-thickness]" - | "[paint-order]" - | "[panose-1]" - | "[path]" - | "[patternContentUnits]" - | "[patternTransform]" - | "[patternUnits]" - | "[ping]" - | "[pointer-events]" - | "[pointsAtX]" - | "[pointsAtY]" - | "[pointsAtZ]" - | "[points]" - | "[preserveAlpha]" - | "[preserveAspectRatio]" - | "[primitiveUnits]" - | "[r]" - | "[radius]" - | "[refX]" - | "[refY]" - | "[referrerpolicy]" - | "[rel]" - | "[repeatCount]" - | "[requiredExtensions]" - | "[requiredFeatures]" - | "[rotate]" - | "[rx]" - | "[ry]" - | "[scale]" - | "[seed]" - | "[shape-rendering]" - | "[side]" - | "[slope]" - | "[solid-color]" - | "[solid-opacity]" - | "[spacing]" - | "[specularConstant]" - | "[specularExponent]" - | "[spreadMethod]" - | "[startOffset]" - | "[stdDeviation]" - | "[stemh]" - | "[stemv]" - | "[stitchTiles]" - | "[stop-color]" - | "[stop-opacity]" - | "[strikethrough-position]" - | "[strikethrough-thickness]" - | "[string]" - | "[stroke-dasharray]" - | "[stroke-dashoffset]" - | "[stroke-linecap]" - | "[stroke-linejoin]" - | "[stroke-miterlimit]" - | "[stroke-opacity]" - | "[stroke-width]" - | "[stroke]" - | "[style]" - | "[surfaceScale]" - | "[systemLanguage]" - | "[tabindex]" - | "[targetX]" - | "[targetY]" - | "[target]" - | "[text-anchor]" - | "[text-decoration]" - | "[text-overflow]" - | "[text-rendering]" - | "[textLength]" - | "[title]" - | "[to]" - | "[transform-origin]" - | "[transform]" - | "[type]" - | "[u1]" - | "[u2]" - | "[underline-position]" - | "[underline-thickness]" - | "[unicode-bidi]" - | "[unicode-range]" - | "[unicode]" - | "[units-per-em]" - | "[v-alphabetic]" - | "[v-hanging]" - | "[v-ideographic]" - | "[v-mathematical]" - | "[values]" - | "[vector-effect]" - | "[version]" - | "[vert-adv-y]" - | "[vert-origin-x]" - | "[vert-origin-y]" - | "[viewBox]" - | "[viewTarget]" - | "[visibility]" - | "[white-space]" - | "[width]" - | "[widths]" - | "[word-spacing]" - | "[writing-mode]" - | "[x-height]" - | "[x1]" - | "[x2]" - | "[xChannelSelector]" - | "[x]" - | "[y1]" - | "[y2]" - | "[yChannelSelector]" - | "[y]" - | "[z]" - | "[zoomAndPan]"; - -export type Globals = "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset"; - -export namespace Property { - export type AccentColor = Globals | DataType.Color | "auto"; - - export type AlignContent = Globals | DataType.ContentDistribution | DataType.ContentPosition | "baseline" | "normal" | (string & {}); - - export type AlignItems = Globals | DataType.SelfPosition | "baseline" | "normal" | "stretch" | (string & {}); - - export type AlignSelf = Globals | DataType.SelfPosition | "auto" | "baseline" | "normal" | "stretch" | (string & {}); - - export type AlignTracks = Globals | DataType.ContentDistribution | DataType.ContentPosition | "baseline" | "normal" | (string & {}); - - export type All = Globals; - - export type Animation<TTime = string & {}> = Globals | DataType.SingleAnimation<TTime> | (string & {}); - - export type AnimationComposition = Globals | DataType.SingleAnimationComposition | (string & {}); - - export type AnimationDelay<TTime = string & {}> = Globals | TTime | (string & {}); - - export type AnimationDirection = Globals | DataType.SingleAnimationDirection | (string & {}); - - export type AnimationDuration<TTime = string & {}> = Globals | TTime | (string & {}); - - export type AnimationFillMode = Globals | DataType.SingleAnimationFillMode | (string & {}); - - export type AnimationIterationCount = Globals | "infinite" | (string & {}) | (number & {}); - - export type AnimationName = Globals | "none" | (string & {}); - - export type AnimationPlayState = Globals | "paused" | "running" | (string & {}); - - export type AnimationRange<TLength = (string & {}) | 0> = Globals | DataType.TimelineRangeName | TLength | "normal" | (string & {}); - - export type AnimationRangeEnd<TLength = (string & {}) | 0> = Globals | DataType.TimelineRangeName | TLength | "normal" | (string & {}); - - export type AnimationRangeStart<TLength = (string & {}) | 0> = Globals | DataType.TimelineRangeName | TLength | "normal" | (string & {}); - - export type AnimationTimeline = Globals | DataType.SingleAnimationTimeline | (string & {}); - - export type AnimationTimingFunction = Globals | DataType.EasingFunction | (string & {}); - - export type Appearance = Globals | DataType.CompatAuto | "auto" | "menulist-button" | "none" | "textfield"; - - export type AspectRatio = Globals | "auto" | (string & {}) | (number & {}); - - export type Azimuth = - | Globals - | "behind" - | "center" - | "center-left" - | "center-right" - | "far-left" - | "far-right" - | "left" - | "left-side" - | "leftwards" - | "right" - | "right-side" - | "rightwards" - | (string & {}); - - export type BackdropFilter = Globals | "none" | (string & {}); - - export type BackfaceVisibility = Globals | "hidden" | "visible"; - - export type Background<TLength = (string & {}) | 0> = Globals | DataType.FinalBgLayer<TLength> | (string & {}); - - export type BackgroundAttachment = Globals | DataType.Attachment | (string & {}); - - export type BackgroundBlendMode = Globals | DataType.BlendMode | (string & {}); - - export type BackgroundClip = Globals | DataType.Box | (string & {}); - - export type BackgroundColor = Globals | DataType.Color; - - export type BackgroundImage = Globals | "none" | (string & {}); - - export type BackgroundOrigin = Globals | DataType.Box | (string & {}); - - export type BackgroundPosition<TLength = (string & {}) | 0> = Globals | DataType.BgPosition<TLength> | (string & {}); - - export type BackgroundPositionX<TLength = (string & {}) | 0> = Globals | TLength | "center" | "left" | "right" | "x-end" | "x-start" | (string & {}); - - export type BackgroundPositionY<TLength = (string & {}) | 0> = Globals | TLength | "bottom" | "center" | "top" | "y-end" | "y-start" | (string & {}); - - export type BackgroundRepeat = Globals | DataType.RepeatStyle | (string & {}); - - export type BackgroundSize<TLength = (string & {}) | 0> = Globals | DataType.BgSize<TLength> | (string & {}); - - export type BlockOverflow = Globals | "clip" | "ellipsis" | (string & {}); - - export type BlockSize<TLength = (string & {}) | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | (string & {}); - - export type Border<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); - - export type BorderBlock<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); - - export type BorderBlockColor = Globals | DataType.Color | (string & {}); - - export type BorderBlockEnd<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); - - export type BorderBlockEndColor = Globals | DataType.Color; - - export type BorderBlockEndStyle = Globals | DataType.LineStyle; - - export type BorderBlockEndWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; - - export type BorderBlockStart<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); - - export type BorderBlockStartColor = Globals | DataType.Color; - - export type BorderBlockStartStyle = Globals | DataType.LineStyle; - - export type BorderBlockStartWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; - - export type BorderBlockStyle = Globals | DataType.LineStyle; - - export type BorderBlockWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; - - export type BorderBottom<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); - - export type BorderBottomColor = Globals | DataType.Color; - - export type BorderBottomLeftRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type BorderBottomRightRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type BorderBottomStyle = Globals | DataType.LineStyle; - - export type BorderBottomWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; - - export type BorderCollapse = Globals | "collapse" | "separate"; - - export type BorderColor = Globals | DataType.Color | (string & {}); - - export type BorderEndEndRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type BorderEndStartRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type BorderImage = Globals | "none" | "repeat" | "round" | "space" | "stretch" | (string & {}) | (number & {}); - - export type BorderImageOutset<TLength = (string & {}) | 0> = Globals | TLength | (string & {}) | (number & {}); - - export type BorderImageRepeat = Globals | "repeat" | "round" | "space" | "stretch" | (string & {}); - - export type BorderImageSlice = Globals | (string & {}) | (number & {}); - - export type BorderImageSource = Globals | "none" | (string & {}); - - export type BorderImageWidth<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}) | (number & {}); - - export type BorderInline<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); - - export type BorderInlineColor = Globals | DataType.Color | (string & {}); - - export type BorderInlineEnd<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); - - export type BorderInlineEndColor = Globals | DataType.Color; - - export type BorderInlineEndStyle = Globals | DataType.LineStyle; - - export type BorderInlineEndWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; - - export type BorderInlineStart<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); - - export type BorderInlineStartColor = Globals | DataType.Color; - - export type BorderInlineStartStyle = Globals | DataType.LineStyle; - - export type BorderInlineStartWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; - - export type BorderInlineStyle = Globals | DataType.LineStyle; - - export type BorderInlineWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; - - export type BorderLeft<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); - - export type BorderLeftColor = Globals | DataType.Color; - - export type BorderLeftStyle = Globals | DataType.LineStyle; - - export type BorderLeftWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; - - export type BorderRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type BorderRight<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); - - export type BorderRightColor = Globals | DataType.Color; - - export type BorderRightStyle = Globals | DataType.LineStyle; - - export type BorderRightWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; - - export type BorderSpacing<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type BorderStartEndRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type BorderStartStartRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type BorderStyle = Globals | DataType.LineStyle | (string & {}); - - export type BorderTop<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); - - export type BorderTopColor = Globals | DataType.Color; - - export type BorderTopLeftRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type BorderTopRightRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type BorderTopStyle = Globals | DataType.LineStyle; - - export type BorderTopWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; - - export type BorderWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | (string & {}); - - export type Bottom<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type BoxAlign = Globals | "baseline" | "center" | "end" | "start" | "stretch"; - - export type BoxDecorationBreak = Globals | "clone" | "slice"; - - export type BoxDirection = Globals | "inherit" | "normal" | "reverse"; - - export type BoxFlex = Globals | (number & {}) | (string & {}); - - export type BoxFlexGroup = Globals | (number & {}) | (string & {}); - - export type BoxLines = Globals | "multiple" | "single"; - - export type BoxOrdinalGroup = Globals | (number & {}) | (string & {}); - - export type BoxOrient = Globals | "block-axis" | "horizontal" | "inherit" | "inline-axis" | "vertical"; - - export type BoxPack = Globals | "center" | "end" | "justify" | "start"; - - export type BoxShadow = Globals | "none" | (string & {}); - - export type BoxSizing = Globals | "border-box" | "content-box"; - - export type BreakAfter = - | Globals - | "all" - | "always" - | "auto" - | "avoid" - | "avoid-column" - | "avoid-page" - | "avoid-region" - | "column" - | "left" - | "page" - | "recto" - | "region" - | "right" - | "verso"; - - export type BreakBefore = - | Globals - | "all" - | "always" - | "auto" - | "avoid" - | "avoid-column" - | "avoid-page" - | "avoid-region" - | "column" - | "left" - | "page" - | "recto" - | "region" - | "right" - | "verso"; - - export type BreakInside = Globals | "auto" | "avoid" | "avoid-column" | "avoid-page" | "avoid-region"; - - export type CaptionSide = Globals | "block-end" | "block-start" | "bottom" | "inline-end" | "inline-start" | "top"; - - export type Caret = Globals | DataType.Color | "auto" | "bar" | "block" | "underscore" | (string & {}); - - export type CaretColor = Globals | DataType.Color | "auto"; - - export type CaretShape = Globals | "auto" | "bar" | "block" | "underscore"; - - export type Clear = Globals | "both" | "inline-end" | "inline-start" | "left" | "none" | "right"; - - export type Clip = Globals | "auto" | (string & {}); - - export type ClipPath = Globals | DataType.GeometryBox | "none" | (string & {}); - - export type Color = Globals | DataType.Color; - - export type PrintColorAdjust = Globals | "economy" | "exact"; - - export type ColorScheme = Globals | "dark" | "light" | "normal" | (string & {}); - - export type ColumnCount = Globals | "auto" | (number & {}) | (string & {}); - - export type ColumnFill = Globals | "auto" | "balance" | "balance-all"; - - export type ColumnGap<TLength = (string & {}) | 0> = Globals | TLength | "normal" | (string & {}); - - export type ColumnRule<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); - - export type ColumnRuleColor = Globals | DataType.Color; - - export type ColumnRuleStyle = Globals | DataType.LineStyle | (string & {}); - - export type ColumnRuleWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | (string & {}); - - export type ColumnSpan = Globals | "all" | "none"; - - export type ColumnWidth<TLength = (string & {}) | 0> = Globals | TLength | "auto"; - - export type Columns<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}) | (number & {}); - - export type Contain = Globals | "content" | "inline-size" | "layout" | "none" | "paint" | "size" | "strict" | "style" | (string & {}); - - export type ContainIntrinsicBlockSize<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); - - export type ContainIntrinsicHeight<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); - - export type ContainIntrinsicInlineSize<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); - - export type ContainIntrinsicSize<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); - - export type ContainIntrinsicWidth<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); - - export type Container = Globals | "none" | (string & {}); - - export type ContainerName = Globals | "none" | (string & {}); - - export type ContainerType = Globals | "inline-size" | "normal" | "size"; - - export type Content = Globals | DataType.ContentList | "none" | "normal" | (string & {}); - - export type ContentVisibility = Globals | "auto" | "hidden" | "visible"; - - export type CounterIncrement = Globals | "none" | (string & {}); - - export type CounterReset = Globals | "none" | (string & {}); - - export type CounterSet = Globals | "none" | (string & {}); - - export type Cursor = - | Globals - | "-moz-grab" - | "-webkit-grab" - | "alias" - | "all-scroll" - | "auto" - | "cell" - | "col-resize" - | "context-menu" - | "copy" - | "crosshair" - | "default" - | "e-resize" - | "ew-resize" - | "grab" - | "grabbing" - | "help" - | "move" - | "n-resize" - | "ne-resize" - | "nesw-resize" - | "no-drop" - | "none" - | "not-allowed" - | "ns-resize" - | "nw-resize" - | "nwse-resize" - | "pointer" - | "progress" - | "row-resize" - | "s-resize" - | "se-resize" - | "sw-resize" - | "text" - | "vertical-text" - | "w-resize" - | "wait" - | "zoom-in" - | "zoom-out" - | (string & {}); - - export type Direction = Globals | "ltr" | "rtl"; - - export type Display = - | Globals - | DataType.DisplayOutside - | DataType.DisplayInside - | DataType.DisplayInternal - | DataType.DisplayLegacy - | "contents" - | "list-item" - | "none" - | (string & {}); - - export type EmptyCells = Globals | "hide" | "show"; - - export type Filter = Globals | "none" | (string & {}); - - export type Flex<TLength = (string & {}) | 0> = Globals | TLength | "auto" | "content" | "fit-content" | "max-content" | "min-content" | "none" | (string & {}) | (number & {}); - - export type FlexBasis<TLength = (string & {}) | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-auto" - | "auto" - | "content" - | "fit-content" - | "max-content" - | "min-content" - | (string & {}); - - export type FlexDirection = Globals | "column" | "column-reverse" | "row" | "row-reverse"; - - export type FlexFlow = Globals | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | (string & {}); - - export type FlexGrow = Globals | (number & {}) | (string & {}); - - export type FlexShrink = Globals | (number & {}) | (string & {}); - - export type FlexWrap = Globals | "nowrap" | "wrap" | "wrap-reverse"; - - export type Float = Globals | "inline-end" | "inline-start" | "left" | "none" | "right"; - - export type Font = Globals | "caption" | "icon" | "menu" | "message-box" | "small-caption" | "status-bar" | (string & {}); - - export type FontFamily = Globals | DataType.GenericFamily | (string & {}); - - export type FontFeatureSettings = Globals | "normal" | (string & {}); - - export type FontKerning = Globals | "auto" | "none" | "normal"; - - export type FontLanguageOverride = Globals | "normal" | (string & {}); - - export type FontOpticalSizing = Globals | "auto" | "none"; - - export type FontPalette = Globals | "dark" | "light" | "normal" | (string & {}); - - export type FontSize<TLength = (string & {}) | 0> = Globals | DataType.AbsoluteSize | TLength | "larger" | "smaller" | (string & {}); - - export type FontSizeAdjust = Globals | "from-font" | "none" | (string & {}) | (number & {}); - - export type FontSmooth<TLength = (string & {}) | 0> = Globals | DataType.AbsoluteSize | TLength | "always" | "auto" | "never"; - - export type FontStretch = Globals | DataType.FontStretchAbsolute; - - export type FontStyle = Globals | "italic" | "normal" | "oblique" | (string & {}); - - export type FontSynthesis = Globals | "none" | "position" | "small-caps" | "style" | "weight" | (string & {}); - - export type FontSynthesisPosition = Globals | "auto" | "none"; - - export type FontSynthesisSmallCaps = Globals | "auto" | "none"; - - export type FontSynthesisStyle = Globals | "auto" | "none"; - - export type FontSynthesisWeight = Globals | "auto" | "none"; - - export type FontVariant = - | Globals - | DataType.EastAsianVariantValues - | "all-petite-caps" - | "all-small-caps" - | "common-ligatures" - | "contextual" - | "diagonal-fractions" - | "discretionary-ligatures" - | "full-width" - | "historical-forms" - | "historical-ligatures" - | "lining-nums" - | "no-common-ligatures" - | "no-contextual" - | "no-discretionary-ligatures" - | "no-historical-ligatures" - | "none" - | "normal" - | "oldstyle-nums" - | "ordinal" - | "petite-caps" - | "proportional-nums" - | "proportional-width" - | "ruby" - | "slashed-zero" - | "small-caps" - | "stacked-fractions" - | "tabular-nums" - | "titling-caps" - | "unicase" - | (string & {}); - - export type FontVariantAlternates = Globals | "historical-forms" | "normal" | (string & {}); - - export type FontVariantCaps = Globals | "all-petite-caps" | "all-small-caps" | "normal" | "petite-caps" | "small-caps" | "titling-caps" | "unicase"; - - export type FontVariantEastAsian = Globals | DataType.EastAsianVariantValues | "full-width" | "normal" | "proportional-width" | "ruby" | (string & {}); - - export type FontVariantEmoji = Globals | "emoji" | "normal" | "text" | "unicode"; - - export type FontVariantLigatures = - | Globals - | "common-ligatures" - | "contextual" - | "discretionary-ligatures" - | "historical-ligatures" - | "no-common-ligatures" - | "no-contextual" - | "no-discretionary-ligatures" - | "no-historical-ligatures" - | "none" - | "normal" - | (string & {}); - - export type FontVariantNumeric = - | Globals - | "diagonal-fractions" - | "lining-nums" - | "normal" - | "oldstyle-nums" - | "ordinal" - | "proportional-nums" - | "slashed-zero" - | "stacked-fractions" - | "tabular-nums" - | (string & {}); - - export type FontVariantPosition = Globals | "normal" | "sub" | "super"; - - export type FontVariationSettings = Globals | "normal" | (string & {}); - - export type FontWeight = Globals | DataType.FontWeightAbsolute | "bolder" | "lighter"; - - export type ForcedColorAdjust = Globals | "auto" | "none"; - - export type Gap<TLength = (string & {}) | 0> = Globals | TLength | "normal" | (string & {}); - - export type Grid = Globals | "none" | (string & {}); - - export type GridArea = Globals | DataType.GridLine | (string & {}); - - export type GridAutoColumns<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | (string & {}); - - export type GridAutoFlow = Globals | "column" | "dense" | "row" | (string & {}); - - export type GridAutoRows<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | (string & {}); - - export type GridColumn = Globals | DataType.GridLine | (string & {}); - - export type GridColumnEnd = Globals | DataType.GridLine; - - export type GridColumnGap<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type GridColumnStart = Globals | DataType.GridLine; - - export type GridGap<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type GridRow = Globals | DataType.GridLine | (string & {}); - - export type GridRowEnd = Globals | DataType.GridLine; - - export type GridRowGap<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type GridRowStart = Globals | DataType.GridLine; - - export type GridTemplate = Globals | "none" | (string & {}); - - export type GridTemplateAreas = Globals | "none" | (string & {}); - - export type GridTemplateColumns<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | "none" | "subgrid" | (string & {}); - - export type GridTemplateRows<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | "none" | "subgrid" | (string & {}); - - export type HangingPunctuation = Globals | "allow-end" | "first" | "force-end" | "last" | "none" | (string & {}); - - export type Height<TLength = (string & {}) | 0> = - | Globals - | TLength - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | (string & {}); - - export type HyphenateCharacter = Globals | "auto" | (string & {}); - - export type HyphenateLimitChars = Globals | "auto" | (string & {}) | (number & {}); - - export type Hyphens = Globals | "auto" | "manual" | "none"; - - export type ImageOrientation = Globals | "flip" | "from-image" | (string & {}); - - export type ImageRendering = Globals | "-moz-crisp-edges" | "-webkit-optimize-contrast" | "auto" | "crisp-edges" | "pixelated"; - - export type ImageResolution = Globals | "from-image" | (string & {}); - - export type ImeMode = Globals | "active" | "auto" | "disabled" | "inactive" | "normal"; - - export type InitialLetter = Globals | "normal" | (string & {}) | (number & {}); - - export type InlineSize<TLength = (string & {}) | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | (string & {}); - - export type InputSecurity = Globals | "auto" | "none"; - - export type Inset<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type InsetBlock<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type InsetBlockEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type InsetBlockStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type InsetInline<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type InsetInlineEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type InsetInlineStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type Isolation = Globals | "auto" | "isolate"; - - export type JustifyContent = Globals | DataType.ContentDistribution | DataType.ContentPosition | "left" | "normal" | "right" | (string & {}); - - export type JustifyItems = Globals | DataType.SelfPosition | "baseline" | "left" | "legacy" | "normal" | "right" | "stretch" | (string & {}); - - export type JustifySelf = Globals | DataType.SelfPosition | "auto" | "baseline" | "left" | "normal" | "right" | "stretch" | (string & {}); - - export type JustifyTracks = Globals | DataType.ContentDistribution | DataType.ContentPosition | "left" | "normal" | "right" | (string & {}); - - export type Left<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type LetterSpacing<TLength = (string & {}) | 0> = Globals | TLength | "normal"; - - export type LineBreak = Globals | "anywhere" | "auto" | "loose" | "normal" | "strict"; - - export type LineClamp = Globals | "none" | (number & {}) | (string & {}); - - export type LineHeight<TLength = (string & {}) | 0> = Globals | TLength | "normal" | (string & {}) | (number & {}); - - export type LineHeightStep<TLength = (string & {}) | 0> = Globals | TLength; - - export type ListStyle = Globals | "inside" | "none" | "outside" | (string & {}); - - export type ListStyleImage = Globals | "none" | (string & {}); - - export type ListStylePosition = Globals | "inside" | "outside"; - - export type ListStyleType = Globals | "none" | (string & {}); - - export type Margin<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type MarginBlock<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type MarginBlockEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type MarginBlockStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type MarginBottom<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type MarginInline<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type MarginInlineEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type MarginInlineStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type MarginLeft<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type MarginRight<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type MarginTop<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type MarginTrim = Globals | "all" | "in-flow" | "none"; - - export type Mask<TLength = (string & {}) | 0> = Globals | DataType.MaskLayer<TLength> | (string & {}); - - export type MaskBorder = Globals | "alpha" | "luminance" | "none" | "repeat" | "round" | "space" | "stretch" | (string & {}) | (number & {}); - - export type MaskBorderMode = Globals | "alpha" | "luminance"; - - export type MaskBorderOutset<TLength = (string & {}) | 0> = Globals | TLength | (string & {}) | (number & {}); - - export type MaskBorderRepeat = Globals | "repeat" | "round" | "space" | "stretch" | (string & {}); - - export type MaskBorderSlice = Globals | (string & {}) | (number & {}); - - export type MaskBorderSource = Globals | "none" | (string & {}); - - export type MaskBorderWidth<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}) | (number & {}); - - export type MaskClip = Globals | DataType.GeometryBox | "no-clip" | (string & {}); - - export type MaskComposite = Globals | DataType.CompositingOperator | (string & {}); - - export type MaskImage = Globals | "none" | (string & {}); - - export type MaskMode = Globals | DataType.MaskingMode | (string & {}); - - export type MaskOrigin = Globals | DataType.GeometryBox | (string & {}); - - export type MaskPosition<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | (string & {}); - - export type MaskRepeat = Globals | DataType.RepeatStyle | (string & {}); - - export type MaskSize<TLength = (string & {}) | 0> = Globals | DataType.BgSize<TLength> | (string & {}); - - export type MaskType = Globals | "alpha" | "luminance"; - - export type MasonryAutoFlow = Globals | "definite-first" | "next" | "ordered" | "pack" | (string & {}); - - export type MathDepth = Globals | "auto-add" | (string & {}) | (number & {}); - - export type MathShift = Globals | "compact" | "normal"; - - export type MathStyle = Globals | "compact" | "normal"; - - export type MaxBlockSize<TLength = (string & {}) | 0> = - | Globals - | TLength - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "fit-content" - | "max-content" - | "min-content" - | "none" - | (string & {}); - - export type MaxHeight<TLength = (string & {}) | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "-webkit-max-content" - | "-webkit-min-content" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | "none" - | (string & {}); - - export type MaxInlineSize<TLength = (string & {}) | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "fit-content" - | "max-content" - | "min-content" - | "none" - | (string & {}); - - export type MaxLines = Globals | "none" | (number & {}) | (string & {}); - - export type MaxWidth<TLength = (string & {}) | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "-webkit-max-content" - | "-webkit-min-content" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | "none" - | (string & {}); - - export type MinBlockSize<TLength = (string & {}) | 0> = - | Globals - | TLength - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | (string & {}); - - export type MinHeight<TLength = (string & {}) | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "-webkit-max-content" - | "-webkit-min-content" - | "auto" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | (string & {}); - - export type MinInlineSize<TLength = (string & {}) | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | (string & {}); - - export type MinWidth<TLength = (string & {}) | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "-webkit-fit-content" - | "-webkit-max-content" - | "-webkit-min-content" - | "auto" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | "min-intrinsic" - | (string & {}); - - export type MixBlendMode = Globals | DataType.BlendMode | "plus-lighter"; - - export type Offset<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | "auto" | "none" | "normal" | (string & {}); - - export type OffsetDistance<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type OffsetPath = Globals | "none" | (string & {}); - - export type OffsetRotate = Globals | "auto" | "reverse" | (string & {}); - - export type ObjectFit = Globals | "contain" | "cover" | "fill" | "none" | "scale-down"; - - export type ObjectPosition<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength>; - - export type OffsetAnchor<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | "auto"; - - export type OffsetPosition<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | "auto" | "normal"; - - export type Opacity = Globals | (string & {}) | (number & {}); - - export type Order = Globals | (number & {}) | (string & {}); - - export type Orphans = Globals | (number & {}) | (string & {}); - - export type Outline<TLength = (string & {}) | 0> = Globals | DataType.Color | DataType.LineStyle | DataType.LineWidth<TLength> | "auto" | "invert" | (string & {}); - - export type OutlineColor = Globals | DataType.Color | "invert"; - - export type OutlineOffset<TLength = (string & {}) | 0> = Globals | TLength; - - export type OutlineStyle = Globals | DataType.LineStyle | "auto" | (string & {}); - - export type OutlineWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; - - export type Overflow = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible" | (string & {}); - - export type OverflowAnchor = Globals | "auto" | "none"; - - export type OverflowBlock = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; - - export type OverflowClipBox = Globals | "content-box" | "padding-box"; - - export type OverflowClipMargin<TLength = (string & {}) | 0> = Globals | DataType.VisualBox | TLength | (string & {}); - - export type OverflowInline = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; - - export type OverflowWrap = Globals | "anywhere" | "break-word" | "normal"; - - export type OverflowX = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; - - export type OverflowY = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; - - export type Overlay = Globals | "auto" | "none"; - - export type OverscrollBehavior = Globals | "auto" | "contain" | "none" | (string & {}); - - export type OverscrollBehaviorBlock = Globals | "auto" | "contain" | "none"; - - export type OverscrollBehaviorInline = Globals | "auto" | "contain" | "none"; - - export type OverscrollBehaviorX = Globals | "auto" | "contain" | "none"; - - export type OverscrollBehaviorY = Globals | "auto" | "contain" | "none"; - - export type Padding<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type PaddingBlock<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type PaddingBlockEnd<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type PaddingBlockStart<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type PaddingBottom<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type PaddingInline<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type PaddingInlineEnd<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type PaddingInlineStart<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type PaddingLeft<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type PaddingRight<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type PaddingTop<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type Page = Globals | "auto" | (string & {}); - - export type PageBreakAfter = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; - - export type PageBreakBefore = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; - - export type PageBreakInside = Globals | "auto" | "avoid"; - - export type PaintOrder = Globals | "fill" | "markers" | "normal" | "stroke" | (string & {}); - - export type Perspective<TLength = (string & {}) | 0> = Globals | TLength | "none"; - - export type PerspectiveOrigin<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength>; - - export type PlaceContent = Globals | DataType.ContentDistribution | DataType.ContentPosition | "baseline" | "normal" | (string & {}); - - export type PlaceItems = Globals | DataType.SelfPosition | "baseline" | "normal" | "stretch" | (string & {}); - - export type PlaceSelf = Globals | DataType.SelfPosition | "auto" | "baseline" | "normal" | "stretch" | (string & {}); - - export type PointerEvents = Globals | "all" | "auto" | "fill" | "inherit" | "none" | "painted" | "stroke" | "visible" | "visibleFill" | "visiblePainted" | "visibleStroke"; - - export type Position = Globals | "-webkit-sticky" | "absolute" | "fixed" | "relative" | "static" | "sticky"; - - export type Quotes = Globals | "auto" | "none" | (string & {}); - - export type Resize = Globals | "block" | "both" | "horizontal" | "inline" | "none" | "vertical"; - - export type Right<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type Rotate = Globals | "none" | (string & {}); - - export type RowGap<TLength = (string & {}) | 0> = Globals | TLength | "normal" | (string & {}); - - export type RubyAlign = Globals | "center" | "space-around" | "space-between" | "start"; - - export type RubyMerge = Globals | "auto" | "collapse" | "separate"; - - export type RubyPosition = Globals | "alternate" | "inter-character" | "over" | "under" | (string & {}); - - export type Scale = Globals | "none" | (string & {}) | (number & {}); - - export type ScrollBehavior = Globals | "auto" | "smooth"; - - export type ScrollMargin<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type ScrollMarginBlock<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type ScrollMarginBlockEnd<TLength = (string & {}) | 0> = Globals | TLength; - - export type ScrollMarginBlockStart<TLength = (string & {}) | 0> = Globals | TLength; - - export type ScrollMarginBottom<TLength = (string & {}) | 0> = Globals | TLength; - - export type ScrollMarginInline<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type ScrollMarginInlineEnd<TLength = (string & {}) | 0> = Globals | TLength; - - export type ScrollMarginInlineStart<TLength = (string & {}) | 0> = Globals | TLength; - - export type ScrollMarginLeft<TLength = (string & {}) | 0> = Globals | TLength; - - export type ScrollMarginRight<TLength = (string & {}) | 0> = Globals | TLength; - - export type ScrollMarginTop<TLength = (string & {}) | 0> = Globals | TLength; - - export type ScrollPadding<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type ScrollPaddingBlock<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type ScrollPaddingBlockEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type ScrollPaddingBlockStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type ScrollPaddingBottom<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type ScrollPaddingInline<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type ScrollPaddingInlineEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type ScrollPaddingInlineStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type ScrollPaddingLeft<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type ScrollPaddingRight<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type ScrollPaddingTop<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type ScrollSnapAlign = Globals | "center" | "end" | "none" | "start" | (string & {}); - - export type ScrollSnapCoordinate<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | "none" | (string & {}); - - export type ScrollSnapDestination<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength>; - - export type ScrollSnapPointsX = Globals | "none" | (string & {}); - - export type ScrollSnapPointsY = Globals | "none" | (string & {}); - - export type ScrollSnapStop = Globals | "always" | "normal"; - - export type ScrollSnapType = Globals | "block" | "both" | "inline" | "none" | "x" | "y" | (string & {}); - - export type ScrollSnapTypeX = Globals | "mandatory" | "none" | "proximity"; - - export type ScrollSnapTypeY = Globals | "mandatory" | "none" | "proximity"; - - export type ScrollTimeline = Globals | "none" | (string & {}); - - export type ScrollTimelineAxis = Globals | "block" | "inline" | "x" | "y" | (string & {}); - - export type ScrollTimelineName = Globals | "none" | (string & {}); - - export type ScrollbarColor = Globals | "auto" | (string & {}); - - export type ScrollbarGutter = Globals | "auto" | "stable" | (string & {}); - - export type ScrollbarWidth = Globals | "auto" | "none" | "thin"; - - export type ShapeImageThreshold = Globals | (string & {}) | (number & {}); - - export type ShapeMargin<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type ShapeOutside = Globals | DataType.Box | "margin-box" | "none" | (string & {}); - - export type TabSize<TLength = (string & {}) | 0> = Globals | TLength | (number & {}) | (string & {}); - - export type TableLayout = Globals | "auto" | "fixed"; - - export type TextAlign = Globals | "-webkit-match-parent" | "center" | "end" | "justify" | "left" | "match-parent" | "right" | "start"; - - export type TextAlignLast = Globals | "auto" | "center" | "end" | "justify" | "left" | "right" | "start"; - - export type TextCombineUpright = Globals | "all" | "none" | (string & {}); - - export type TextDecoration<TLength = (string & {}) | 0> = - | Globals - | DataType.Color - | TLength - | "auto" - | "blink" - | "dashed" - | "dotted" - | "double" - | "from-font" - | "grammar-error" - | "line-through" - | "none" - | "overline" - | "solid" - | "spelling-error" - | "underline" - | "wavy" - | (string & {}); - - export type TextDecorationColor = Globals | DataType.Color; - - export type TextDecorationLine = Globals | "blink" | "grammar-error" | "line-through" | "none" | "overline" | "spelling-error" | "underline" | (string & {}); - - export type TextDecorationSkip = Globals | "box-decoration" | "edges" | "leading-spaces" | "none" | "objects" | "spaces" | "trailing-spaces" | (string & {}); - - export type TextDecorationSkipInk = Globals | "all" | "auto" | "none"; - - export type TextDecorationStyle = Globals | "dashed" | "dotted" | "double" | "solid" | "wavy"; - - export type TextDecorationThickness<TLength = (string & {}) | 0> = Globals | TLength | "auto" | "from-font" | (string & {}); - - export type TextEmphasis = Globals | DataType.Color | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | (string & {}); - - export type TextEmphasisColor = Globals | DataType.Color; - - export type TextEmphasisPosition = Globals | (string & {}); - - export type TextEmphasisStyle = Globals | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | (string & {}); - - export type TextIndent<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type TextJustify = Globals | "auto" | "inter-character" | "inter-word" | "none"; - - export type TextOrientation = Globals | "mixed" | "sideways" | "upright"; - - export type TextOverflow = Globals | "clip" | "ellipsis" | (string & {}); - - export type TextRendering = Globals | "auto" | "geometricPrecision" | "optimizeLegibility" | "optimizeSpeed"; - - export type TextShadow = Globals | "none" | (string & {}); - - export type TextSizeAdjust = Globals | "auto" | "none" | (string & {}); - - export type TextTransform = Globals | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "none" | "uppercase"; - - export type TextUnderlineOffset<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type TextUnderlinePosition = Globals | "auto" | "from-font" | "left" | "right" | "under" | (string & {}); - - export type TextWrap = Globals | "balance" | "nowrap" | "pretty" | "stable" | "wrap"; - - export type TimelineScope = Globals | "none" | (string & {}); - - export type Top<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type TouchAction = - | Globals - | "-ms-manipulation" - | "-ms-none" - | "-ms-pinch-zoom" - | "auto" - | "manipulation" - | "none" - | "pan-down" - | "pan-left" - | "pan-right" - | "pan-up" - | "pan-x" - | "pan-y" - | "pinch-zoom" - | (string & {}); - - export type Transform = Globals | "none" | (string & {}); - - export type TransformBox = Globals | "border-box" | "content-box" | "fill-box" | "stroke-box" | "view-box"; - - export type TransformOrigin<TLength = (string & {}) | 0> = Globals | TLength | "bottom" | "center" | "left" | "right" | "top" | (string & {}); - - export type TransformStyle = Globals | "flat" | "preserve-3d"; - - export type Transition<TTime = string & {}> = Globals | DataType.SingleTransition<TTime> | (string & {}); - - export type TransitionBehavior = Globals | "allow-discrete" | "normal" | (string & {}); - - export type TransitionDelay<TTime = string & {}> = Globals | TTime | (string & {}); - - export type TransitionDuration<TTime = string & {}> = Globals | TTime | (string & {}); - - export type TransitionProperty = Globals | "all" | "none" | (string & {}); - - export type TransitionTimingFunction = Globals | DataType.EasingFunction | (string & {}); - - export type Translate<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); - - export type UnicodeBidi = - | Globals - | "-moz-isolate" - | "-moz-isolate-override" - | "-moz-plaintext" - | "-webkit-isolate" - | "-webkit-isolate-override" - | "-webkit-plaintext" - | "bidi-override" - | "embed" - | "isolate" - | "isolate-override" - | "normal" - | "plaintext"; - - export type UserSelect = Globals | "-moz-none" | "all" | "auto" | "contain" | "element" | "none" | "text"; - - export type VerticalAlign<TLength = (string & {}) | 0> = - | Globals - | TLength - | "baseline" - | "bottom" - | "middle" - | "sub" - | "super" - | "text-bottom" - | "text-top" - | "top" - | (string & {}); - - export type ViewTimeline = Globals | "none" | (string & {}); - - export type ViewTimelineAxis = Globals | "block" | "inline" | "x" | "y" | (string & {}); - - export type ViewTimelineInset<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); - - export type ViewTimelineName = Globals | "none" | (string & {}); - - export type ViewTransitionName = Globals | "none" | (string & {}); - - export type Visibility = Globals | "collapse" | "hidden" | "visible"; - - export type WhiteSpace = - | Globals - | "-moz-pre-wrap" - | "balance" - | "break-spaces" - | "collapse" - | "discard" - | "discard-after" - | "discard-before" - | "discard-inner" - | "none" - | "normal" - | "nowrap" - | "pre" - | "pre-line" - | "pre-wrap" - | "preserve" - | "preserve-breaks" - | "preserve-spaces" - | "pretty" - | "stable" - | "wrap" - | (string & {}); - - export type WhiteSpaceCollapse = Globals | "break-spaces" | "collapse" | "discard" | "preserve" | "preserve-breaks" | "preserve-spaces"; - - export type WhiteSpaceTrim = Globals | "discard-after" | "discard-before" | "discard-inner" | "none" | (string & {}); - - export type Widows = Globals | (number & {}) | (string & {}); - - export type Width<TLength = (string & {}) | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "-webkit-max-content" - | "auto" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | "min-intrinsic" - | (string & {}); - - export type WillChange = Globals | DataType.AnimateableFeature | "auto" | (string & {}); - - export type WordBreak = Globals | "break-all" | "break-word" | "keep-all" | "normal"; - - export type WordSpacing<TLength = (string & {}) | 0> = Globals | TLength | "normal"; - - export type WordWrap = Globals | "break-word" | "normal"; - - export type WritingMode = Globals | "horizontal-tb" | "sideways-lr" | "sideways-rl" | "vertical-lr" | "vertical-rl"; - - export type ZIndex = Globals | "auto" | (number & {}) | (string & {}); - - export type Zoom = Globals | "normal" | "reset" | (string & {}) | (number & {}); - - export type MozAppearance = - | Globals - | "-moz-mac-unified-toolbar" - | "-moz-win-borderless-glass" - | "-moz-win-browsertabbar-toolbox" - | "-moz-win-communications-toolbox" - | "-moz-win-communicationstext" - | "-moz-win-exclude-glass" - | "-moz-win-glass" - | "-moz-win-media-toolbox" - | "-moz-win-mediatext" - | "-moz-window-button-box" - | "-moz-window-button-box-maximized" - | "-moz-window-button-close" - | "-moz-window-button-maximize" - | "-moz-window-button-minimize" - | "-moz-window-button-restore" - | "-moz-window-frame-bottom" - | "-moz-window-frame-left" - | "-moz-window-frame-right" - | "-moz-window-titlebar" - | "-moz-window-titlebar-maximized" - | "button" - | "button-arrow-down" - | "button-arrow-next" - | "button-arrow-previous" - | "button-arrow-up" - | "button-bevel" - | "button-focus" - | "caret" - | "checkbox" - | "checkbox-container" - | "checkbox-label" - | "checkmenuitem" - | "dualbutton" - | "groupbox" - | "listbox" - | "listitem" - | "menuarrow" - | "menubar" - | "menucheckbox" - | "menuimage" - | "menuitem" - | "menuitemtext" - | "menulist" - | "menulist-button" - | "menulist-text" - | "menulist-textfield" - | "menupopup" - | "menuradio" - | "menuseparator" - | "meterbar" - | "meterchunk" - | "none" - | "progressbar" - | "progressbar-vertical" - | "progresschunk" - | "progresschunk-vertical" - | "radio" - | "radio-container" - | "radio-label" - | "radiomenuitem" - | "range" - | "range-thumb" - | "resizer" - | "resizerpanel" - | "scale-horizontal" - | "scale-vertical" - | "scalethumb-horizontal" - | "scalethumb-vertical" - | "scalethumbend" - | "scalethumbstart" - | "scalethumbtick" - | "scrollbarbutton-down" - | "scrollbarbutton-left" - | "scrollbarbutton-right" - | "scrollbarbutton-up" - | "scrollbarthumb-horizontal" - | "scrollbarthumb-vertical" - | "scrollbartrack-horizontal" - | "scrollbartrack-vertical" - | "searchfield" - | "separator" - | "sheet" - | "spinner" - | "spinner-downbutton" - | "spinner-textfield" - | "spinner-upbutton" - | "splitter" - | "statusbar" - | "statusbarpanel" - | "tab" - | "tab-scroll-arrow-back" - | "tab-scroll-arrow-forward" - | "tabpanel" - | "tabpanels" - | "textfield" - | "textfield-multiline" - | "toolbar" - | "toolbarbutton" - | "toolbarbutton-dropdown" - | "toolbargripper" - | "toolbox" - | "tooltip" - | "treeheader" - | "treeheadercell" - | "treeheadersortarrow" - | "treeitem" - | "treeline" - | "treetwisty" - | "treetwistyopen" - | "treeview"; - - export type MozBinding = Globals | "none" | (string & {}); - - export type MozBorderBottomColors = Globals | DataType.Color | "none" | (string & {}); - - export type MozBorderLeftColors = Globals | DataType.Color | "none" | (string & {}); - - export type MozBorderRightColors = Globals | DataType.Color | "none" | (string & {}); - - export type MozBorderTopColors = Globals | DataType.Color | "none" | (string & {}); - - export type MozContextProperties = Globals | "fill" | "fill-opacity" | "none" | "stroke" | "stroke-opacity" | (string & {}); - - export type MozFloatEdge = Globals | "border-box" | "content-box" | "margin-box" | "padding-box"; - - export type MozForceBrokenImageIcon = Globals | 0 | (string & {}) | 1; - - export type MozImageRegion = Globals | "auto" | (string & {}); - - export type MozOrient = Globals | "block" | "horizontal" | "inline" | "vertical"; - - export type MozOutlineRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type MozOutlineRadiusBottomleft<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type MozOutlineRadiusBottomright<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type MozOutlineRadiusTopleft<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type MozOutlineRadiusTopright<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type MozStackSizing = Globals | "ignore" | "stretch-to-fit"; - - export type MozTextBlink = Globals | "blink" | "none"; - - export type MozUserFocus = Globals | "ignore" | "none" | "normal" | "select-after" | "select-all" | "select-before" | "select-menu" | "select-same"; - - export type MozUserInput = Globals | "auto" | "disabled" | "enabled" | "none"; - - export type MozUserModify = Globals | "read-only" | "read-write" | "write-only"; - - export type MozWindowDragging = Globals | "drag" | "no-drag"; - - export type MozWindowShadow = Globals | "default" | "menu" | "none" | "sheet" | "tooltip"; - - export type MsAccelerator = Globals | "false" | "true"; - - export type MsBlockProgression = Globals | "bt" | "lr" | "rl" | "tb"; - - export type MsContentZoomChaining = Globals | "chained" | "none"; - - export type MsContentZoomLimit = Globals | (string & {}); - - export type MsContentZoomLimitMax = Globals | (string & {}); - - export type MsContentZoomLimitMin = Globals | (string & {}); - - export type MsContentZoomSnap = Globals | "mandatory" | "none" | "proximity" | (string & {}); - - export type MsContentZoomSnapPoints = Globals | (string & {}); - - export type MsContentZoomSnapType = Globals | "mandatory" | "none" | "proximity"; - - export type MsContentZooming = Globals | "none" | "zoom"; - - export type MsFilter = Globals | (string & {}); - - export type MsFlowFrom = Globals | "none" | (string & {}); - - export type MsFlowInto = Globals | "none" | (string & {}); - - export type MsGridColumns<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | "none" | (string & {}); - - export type MsGridRows<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | "none" | (string & {}); - - export type MsHighContrastAdjust = Globals | "auto" | "none"; - - export type MsHyphenateLimitChars = Globals | "auto" | (string & {}) | (number & {}); - - export type MsHyphenateLimitLines = Globals | "no-limit" | (number & {}) | (string & {}); - - export type MsHyphenateLimitZone<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type MsImeAlign = Globals | "after" | "auto"; - - export type MsOverflowStyle = Globals | "-ms-autohiding-scrollbar" | "auto" | "none" | "scrollbar"; - - export type MsScrollChaining = Globals | "chained" | "none"; - - export type MsScrollLimit = Globals | (string & {}); - - export type MsScrollLimitXMax<TLength = (string & {}) | 0> = Globals | TLength | "auto"; - - export type MsScrollLimitXMin<TLength = (string & {}) | 0> = Globals | TLength; - - export type MsScrollLimitYMax<TLength = (string & {}) | 0> = Globals | TLength | "auto"; - - export type MsScrollLimitYMin<TLength = (string & {}) | 0> = Globals | TLength; - - export type MsScrollRails = Globals | "none" | "railed"; - - export type MsScrollSnapPointsX = Globals | (string & {}); - - export type MsScrollSnapPointsY = Globals | (string & {}); - - export type MsScrollSnapType = Globals | "mandatory" | "none" | "proximity"; - - export type MsScrollSnapX = Globals | (string & {}); - - export type MsScrollSnapY = Globals | (string & {}); - - export type MsScrollTranslation = Globals | "none" | "vertical-to-horizontal"; - - export type MsScrollbar3dlightColor = Globals | DataType.Color; - - export type MsScrollbarArrowColor = Globals | DataType.Color; - - export type MsScrollbarBaseColor = Globals | DataType.Color; - - export type MsScrollbarDarkshadowColor = Globals | DataType.Color; - - export type MsScrollbarFaceColor = Globals | DataType.Color; - - export type MsScrollbarHighlightColor = Globals | DataType.Color; - - export type MsScrollbarShadowColor = Globals | DataType.Color; - - export type MsScrollbarTrackColor = Globals | DataType.Color; - - export type MsTextAutospace = Globals | "ideograph-alpha" | "ideograph-numeric" | "ideograph-parenthesis" | "ideograph-space" | "none"; - - export type MsTouchSelect = Globals | "grippers" | "none"; - - export type MsUserSelect = Globals | "element" | "none" | "text"; - - export type MsWrapFlow = Globals | "auto" | "both" | "clear" | "end" | "maximum" | "start"; - - export type MsWrapMargin<TLength = (string & {}) | 0> = Globals | TLength; - - export type MsWrapThrough = Globals | "none" | "wrap"; - - export type WebkitAppearance = - | Globals - | "-apple-pay-button" - | "button" - | "button-bevel" - | "caret" - | "checkbox" - | "default-button" - | "inner-spin-button" - | "listbox" - | "listitem" - | "media-controls-background" - | "media-controls-fullscreen-background" - | "media-current-time-display" - | "media-enter-fullscreen-button" - | "media-exit-fullscreen-button" - | "media-fullscreen-button" - | "media-mute-button" - | "media-overlay-play-button" - | "media-play-button" - | "media-seek-back-button" - | "media-seek-forward-button" - | "media-slider" - | "media-sliderthumb" - | "media-time-remaining-display" - | "media-toggle-closed-captions-button" - | "media-volume-slider" - | "media-volume-slider-container" - | "media-volume-sliderthumb" - | "menulist" - | "menulist-button" - | "menulist-text" - | "menulist-textfield" - | "meter" - | "none" - | "progress-bar" - | "progress-bar-value" - | "push-button" - | "radio" - | "searchfield" - | "searchfield-cancel-button" - | "searchfield-decoration" - | "searchfield-results-button" - | "searchfield-results-decoration" - | "slider-horizontal" - | "slider-vertical" - | "sliderthumb-horizontal" - | "sliderthumb-vertical" - | "square-button" - | "textarea" - | "textfield"; - - export type WebkitBorderBefore<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); - - export type WebkitBorderBeforeColor = Globals | DataType.Color; - - export type WebkitBorderBeforeStyle = Globals | DataType.LineStyle | (string & {}); - - export type WebkitBorderBeforeWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | (string & {}); - - export type WebkitBoxReflect<TLength = (string & {}) | 0> = Globals | TLength | "above" | "below" | "left" | "right" | (string & {}); - - export type WebkitLineClamp = Globals | "none" | (number & {}) | (string & {}); - - export type WebkitMask<TLength = (string & {}) | 0> = - | Globals - | DataType.Position<TLength> - | DataType.RepeatStyle - | DataType.Box - | "border" - | "content" - | "none" - | "padding" - | "text" - | (string & {}); - - export type WebkitMaskAttachment = Globals | DataType.Attachment | (string & {}); - - export type WebkitMaskClip = Globals | DataType.Box | "border" | "content" | "padding" | "text" | (string & {}); - - export type WebkitMaskComposite = Globals | DataType.CompositeStyle | (string & {}); - - export type WebkitMaskImage = Globals | "none" | (string & {}); - - export type WebkitMaskOrigin = Globals | DataType.Box | "border" | "content" | "padding" | (string & {}); - - export type WebkitMaskPosition<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | (string & {}); - - export type WebkitMaskPositionX<TLength = (string & {}) | 0> = Globals | TLength | "center" | "left" | "right" | (string & {}); - - export type WebkitMaskPositionY<TLength = (string & {}) | 0> = Globals | TLength | "bottom" | "center" | "top" | (string & {}); - - export type WebkitMaskRepeat = Globals | DataType.RepeatStyle | (string & {}); - - export type WebkitMaskRepeatX = Globals | "no-repeat" | "repeat" | "round" | "space"; - - export type WebkitMaskRepeatY = Globals | "no-repeat" | "repeat" | "round" | "space"; - - export type WebkitMaskSize<TLength = (string & {}) | 0> = Globals | DataType.BgSize<TLength> | (string & {}); - - export type WebkitOverflowScrolling = Globals | "auto" | "touch"; - - export type WebkitTapHighlightColor = Globals | DataType.Color; - - export type WebkitTextFillColor = Globals | DataType.Color; - - export type WebkitTextStroke<TLength = (string & {}) | 0> = Globals | DataType.Color | TLength | (string & {}); - - export type WebkitTextStrokeColor = Globals | DataType.Color; - - export type WebkitTextStrokeWidth<TLength = (string & {}) | 0> = Globals | TLength; - - export type WebkitTouchCallout = Globals | "default" | "none"; - - export type WebkitUserModify = Globals | "read-only" | "read-write" | "read-write-plaintext-only"; - - export type AlignmentBaseline = - | Globals - | "after-edge" - | "alphabetic" - | "auto" - | "baseline" - | "before-edge" - | "central" - | "hanging" - | "ideographic" - | "mathematical" - | "middle" - | "text-after-edge" - | "text-before-edge"; - - export type BaselineShift<TLength = (string & {}) | 0> = Globals | TLength | "baseline" | "sub" | "super" | (string & {}); - - export type ClipRule = Globals | "evenodd" | "nonzero"; - - export type ColorInterpolation = Globals | "auto" | "linearRGB" | "sRGB"; - - export type ColorRendering = Globals | "auto" | "optimizeQuality" | "optimizeSpeed"; - - export type DominantBaseline = - | Globals - | "alphabetic" - | "auto" - | "central" - | "hanging" - | "ideographic" - | "mathematical" - | "middle" - | "no-change" - | "reset-size" - | "text-after-edge" - | "text-before-edge" - | "use-script"; - - export type Fill = Globals | DataType.Paint; - - export type FillOpacity = Globals | (number & {}) | (string & {}); - - export type FillRule = Globals | "evenodd" | "nonzero"; - - export type FloodColor = Globals | DataType.Color | "currentColor"; - - export type FloodOpacity = Globals | (number & {}) | (string & {}); - - export type GlyphOrientationVertical = Globals | "auto" | (string & {}) | (number & {}); - - export type LightingColor = Globals | DataType.Color | "currentColor"; - - export type Marker = Globals | "none" | (string & {}); - - export type MarkerEnd = Globals | "none" | (string & {}); - - export type MarkerMid = Globals | "none" | (string & {}); - - export type MarkerStart = Globals | "none" | (string & {}); - - export type ShapeRendering = Globals | "auto" | "crispEdges" | "geometricPrecision" | "optimizeSpeed"; - - export type StopColor = Globals | DataType.Color | "currentColor"; - - export type StopOpacity = Globals | (number & {}) | (string & {}); - - export type Stroke = Globals | DataType.Paint; - - export type StrokeDasharray<TLength = (string & {}) | 0> = Globals | DataType.Dasharray<TLength> | "none"; - - export type StrokeDashoffset<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type StrokeLinecap = Globals | "butt" | "round" | "square"; - - export type StrokeLinejoin = Globals | "bevel" | "miter" | "round"; - - export type StrokeMiterlimit = Globals | (number & {}) | (string & {}); - - export type StrokeOpacity = Globals | (number & {}) | (string & {}); - - export type StrokeWidth<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); - - export type TextAnchor = Globals | "end" | "middle" | "start"; - - export type VectorEffect = Globals | "non-scaling-stroke" | "none"; -} - -export namespace AtRule { - export interface CounterStyle<TLength = (string & {}) | 0, TTime = string & {}> { - additiveSymbols?: string | undefined; - fallback?: string | undefined; - negative?: string | undefined; - pad?: string | undefined; - prefix?: string | undefined; - range?: Range | undefined; - speakAs?: SpeakAs | undefined; - suffix?: string | undefined; - symbols?: string | undefined; - system?: System | undefined; - } - - export interface CounterStyleHyphen<TLength = (string & {}) | 0, TTime = string & {}> { - "additive-symbols"?: string | undefined; - fallback?: string | undefined; - negative?: string | undefined; - pad?: string | undefined; - prefix?: string | undefined; - range?: Range | undefined; - "speak-as"?: SpeakAs | undefined; - suffix?: string | undefined; - symbols?: string | undefined; - system?: System | undefined; - } - - export type CounterStyleFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<CounterStyle<TLength, TTime>>; - - export type CounterStyleHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<CounterStyleHyphen<TLength, TTime>>; - - export interface FontFace<TLength = (string & {}) | 0, TTime = string & {}> { - MozFontFeatureSettings?: FontFeatureSettings | undefined; - ascentOverride?: AscentOverride | undefined; - descentOverride?: DescentOverride | undefined; - fontDisplay?: FontDisplay | undefined; - fontFamily?: string | undefined; - fontFeatureSettings?: FontFeatureSettings | undefined; - fontStretch?: FontStretch | undefined; - fontStyle?: FontStyle | undefined; - fontVariant?: FontVariant | undefined; - fontVariationSettings?: FontVariationSettings | undefined; - fontWeight?: FontWeight | undefined; - lineGapOverride?: LineGapOverride | undefined; - sizeAdjust?: string | undefined; - src?: string | undefined; - unicodeRange?: string | undefined; - } - - export interface FontFaceHyphen<TLength = (string & {}) | 0, TTime = string & {}> { - "-moz-font-feature-settings"?: FontFeatureSettings | undefined; - "ascent-override"?: AscentOverride | undefined; - "descent-override"?: DescentOverride | undefined; - "font-display"?: FontDisplay | undefined; - "font-family"?: string | undefined; - "font-feature-settings"?: FontFeatureSettings | undefined; - "font-stretch"?: FontStretch | undefined; - "font-style"?: FontStyle | undefined; - "font-variant"?: FontVariant | undefined; - "font-variation-settings"?: FontVariationSettings | undefined; - "font-weight"?: FontWeight | undefined; - "line-gap-override"?: LineGapOverride | undefined; - "size-adjust"?: string | undefined; - src?: string | undefined; - "unicode-range"?: string | undefined; - } - - export type FontFaceFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<FontFace<TLength, TTime>>; - - export type FontFaceHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<FontFaceHyphen<TLength, TTime>>; - - export interface FontPaletteValues<TLength = (string & {}) | 0, TTime = string & {}> { - basePalette?: BasePalette | undefined; - fontFamily?: string | undefined; - overrideColors?: string | undefined; - } - - export interface FontPaletteValuesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { - "base-palette"?: BasePalette | undefined; - "font-family"?: string | undefined; - "override-colors"?: string | undefined; - } - - export type FontPaletteValuesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<FontPaletteValues<TLength, TTime>>; - - export type FontPaletteValuesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<FontPaletteValuesHyphen<TLength, TTime>>; - - export interface Page<TLength = (string & {}) | 0, TTime = string & {}> { - bleed?: Bleed<TLength> | undefined; - marks?: Marks | undefined; - pageOrientation?: PageOrientation | undefined; - size?: Size<TLength> | undefined; - } - - export interface PageHyphen<TLength = (string & {}) | 0, TTime = string & {}> { - bleed?: Bleed<TLength> | undefined; - marks?: Marks | undefined; - "page-orientation"?: PageOrientation | undefined; - size?: Size<TLength> | undefined; - } - - export type PageFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<Page<TLength, TTime>>; - - export type PageHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<PageHyphen<TLength, TTime>>; - - export interface Property<TLength = (string & {}) | 0, TTime = string & {}> { - inherits?: Inherits | undefined; - initialValue?: string | undefined; - syntax?: string | undefined; - } - - export interface PropertyHyphen<TLength = (string & {}) | 0, TTime = string & {}> { - inherits?: Inherits | undefined; - "initial-value"?: string | undefined; - syntax?: string | undefined; - } - - export type PropertyFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<Property<TLength, TTime>>; - - export type PropertyHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<PropertyHyphen<TLength, TTime>>; - - export interface Viewport<TLength = (string & {}) | 0, TTime = string & {}> { - height?: Height<TLength> | undefined; - maxHeight?: MaxHeight<TLength> | undefined; - maxWidth?: MaxWidth<TLength> | undefined; - maxZoom?: MaxZoom | undefined; - minHeight?: MinHeight<TLength> | undefined; - minWidth?: MinWidth<TLength> | undefined; - minZoom?: MinZoom | undefined; - orientation?: Orientation | undefined; - userZoom?: UserZoom | undefined; - viewportFit?: ViewportFit | undefined; - width?: Width<TLength> | undefined; - zoom?: Zoom | undefined; - } - - export interface ViewportHyphen<TLength = (string & {}) | 0, TTime = string & {}> { - height?: Height<TLength> | undefined; - "max-height"?: MaxHeight<TLength> | undefined; - "max-width"?: MaxWidth<TLength> | undefined; - "max-zoom"?: MaxZoom | undefined; - "min-height"?: MinHeight<TLength> | undefined; - "min-width"?: MinWidth<TLength> | undefined; - "min-zoom"?: MinZoom | undefined; - orientation?: Orientation | undefined; - "user-zoom"?: UserZoom | undefined; - "viewport-fit"?: ViewportFit | undefined; - width?: Width<TLength> | undefined; - zoom?: Zoom | undefined; - } - - export type ViewportFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<Viewport<TLength, TTime>>; - - export type ViewportHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<ViewportHyphen<TLength, TTime>>; - - type Range = "auto" | (string & {}); - - type SpeakAs = "auto" | "bullets" | "numbers" | "spell-out" | "words" | (string & {}); - - type System = "additive" | "alphabetic" | "cyclic" | "fixed" | "numeric" | "symbolic" | (string & {}); - - type FontFeatureSettings = "normal" | (string & {}); - - type AscentOverride = "normal" | (string & {}); - - type DescentOverride = "normal" | (string & {}); - - type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; - - type FontStretch = DataType.FontStretchAbsolute | (string & {}); - - type FontStyle = "italic" | "normal" | "oblique" | (string & {}); - - type FontVariant = - | DataType.EastAsianVariantValues - | "all-petite-caps" - | "all-small-caps" - | "common-ligatures" - | "contextual" - | "diagonal-fractions" - | "discretionary-ligatures" - | "full-width" - | "historical-forms" - | "historical-ligatures" - | "lining-nums" - | "no-common-ligatures" - | "no-contextual" - | "no-discretionary-ligatures" - | "no-historical-ligatures" - | "none" - | "normal" - | "oldstyle-nums" - | "ordinal" - | "petite-caps" - | "proportional-nums" - | "proportional-width" - | "ruby" - | "slashed-zero" - | "small-caps" - | "stacked-fractions" - | "tabular-nums" - | "titling-caps" - | "unicase" - | (string & {}); - - type FontVariationSettings = "normal" | (string & {}); - - type FontWeight = DataType.FontWeightAbsolute | (string & {}); - - type LineGapOverride = "normal" | (string & {}); - - type BasePalette = "dark" | "light" | (number & {}) | (string & {}); - - type Bleed<TLength> = TLength | "auto"; - - type Marks = "crop" | "cross" | "none" | (string & {}); - - type PageOrientation = "rotate-left" | "rotate-right" | "upright"; - - type Size<TLength> = DataType.PageSize | TLength | "auto" | "landscape" | "portrait" | (string & {}); - - type Inherits = "false" | "true"; - - type Height<TLength> = DataType.ViewportLength<TLength> | (string & {}); - - type MaxHeight<TLength> = DataType.ViewportLength<TLength>; - - type MaxWidth<TLength> = DataType.ViewportLength<TLength>; - - type MaxZoom = "auto" | (string & {}) | (number & {}); - - type MinHeight<TLength> = DataType.ViewportLength<TLength>; - - type MinWidth<TLength> = DataType.ViewportLength<TLength>; - - type MinZoom = "auto" | (string & {}) | (number & {}); - - type Orientation = "auto" | "landscape" | "portrait"; - - type UserZoom = "fixed" | "zoom"; - - type ViewportFit = "auto" | "contain" | "cover"; - - type Width<TLength> = DataType.ViewportLength<TLength> | (string & {}); - - type Zoom = "auto" | (string & {}) | (number & {}); -} - -/** - * **Attention!** Data types receives its name from the spec. E.g. `<color>` becomes `DataType.Color` and - * `<content-distribution>` becomes `DataType.ContentDistribution`. It happens quite frequent that these data types - * are split into several data types or/and name changes as the spec develops. So there's a risk that a minor/patch - * update from `csstype` can break your typing if you're using the `DataType` namespace. - */ -export namespace DataType { - type AbsoluteSize = "large" | "medium" | "small" | "x-large" | "x-small" | "xx-large" | "xx-small" | "xxx-large"; - - type AnimateableFeature = "contents" | "scroll-position" | (string & {}); - - type Attachment = "fixed" | "local" | "scroll"; - - type BgPosition<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | (string & {}); - - type BgSize<TLength> = TLength | "auto" | "contain" | "cover" | (string & {}); - - type BlendMode = - | "color" - | "color-burn" - | "color-dodge" - | "darken" - | "difference" - | "exclusion" - | "hard-light" - | "hue" - | "lighten" - | "luminosity" - | "multiply" - | "normal" - | "overlay" - | "saturation" - | "screen" - | "soft-light"; - - type Box = "border-box" | "content-box" | "padding-box"; - - type Color = NamedColor | DeprecatedSystemColor | "currentcolor" | (string & {}); - - type CompatAuto = - | "button" - | "checkbox" - | "listbox" - | "menulist" - | "meter" - | "progress-bar" - | "push-button" - | "radio" - | "searchfield" - | "slider-horizontal" - | "square-button" - | "textarea"; - - type CompositeStyle = - | "clear" - | "copy" - | "destination-atop" - | "destination-in" - | "destination-out" - | "destination-over" - | "source-atop" - | "source-in" - | "source-out" - | "source-over" - | "xor"; - - type CompositingOperator = "add" | "exclude" | "intersect" | "subtract"; - - type ContentDistribution = "space-around" | "space-between" | "space-evenly" | "stretch"; - - type ContentList = Quote | "contents" | (string & {}); - - type ContentPosition = "center" | "end" | "flex-end" | "flex-start" | "start"; - - type CubicBezierTimingFunction = "ease" | "ease-in" | "ease-in-out" | "ease-out" | (string & {}); - - type Dasharray<TLength> = TLength | (string & {}) | (number & {}); - - type DeprecatedSystemColor = - | "ActiveBorder" - | "ActiveCaption" - | "AppWorkspace" - | "Background" - | "ButtonFace" - | "ButtonHighlight" - | "ButtonShadow" - | "ButtonText" - | "CaptionText" - | "GrayText" - | "Highlight" - | "HighlightText" - | "InactiveBorder" - | "InactiveCaption" - | "InactiveCaptionText" - | "InfoBackground" - | "InfoText" - | "Menu" - | "MenuText" - | "Scrollbar" - | "ThreeDDarkShadow" - | "ThreeDFace" - | "ThreeDHighlight" - | "ThreeDLightShadow" - | "ThreeDShadow" - | "Window" - | "WindowFrame" - | "WindowText"; - - type DisplayInside = "-ms-flexbox" | "-ms-grid" | "-webkit-flex" | "flex" | "flow" | "flow-root" | "grid" | "ruby" | "table"; - - type DisplayInternal = - | "ruby-base" - | "ruby-base-container" - | "ruby-text" - | "ruby-text-container" - | "table-caption" - | "table-cell" - | "table-column" - | "table-column-group" - | "table-footer-group" - | "table-header-group" - | "table-row" - | "table-row-group"; - - type DisplayLegacy = "-ms-inline-flexbox" | "-ms-inline-grid" | "-webkit-inline-flex" | "inline-block" | "inline-flex" | "inline-grid" | "inline-list-item" | "inline-table"; - - type DisplayOutside = "block" | "inline" | "run-in"; - - type EasingFunction = CubicBezierTimingFunction | StepTimingFunction | "linear"; - - type EastAsianVariantValues = "jis04" | "jis78" | "jis83" | "jis90" | "simplified" | "traditional"; - - type FinalBgLayer<TLength> = Color | BgPosition<TLength> | RepeatStyle | Attachment | Box | "none" | (string & {}); - - type FontStretchAbsolute = - | "condensed" - | "expanded" - | "extra-condensed" - | "extra-expanded" - | "normal" - | "semi-condensed" - | "semi-expanded" - | "ultra-condensed" - | "ultra-expanded" - | (string & {}); - - type FontWeightAbsolute = "bold" | "normal" | (number & {}) | (string & {}); - - type GenericFamily = "cursive" | "fantasy" | "monospace" | "sans-serif" | "serif"; - - type GeometryBox = Box | "fill-box" | "margin-box" | "stroke-box" | "view-box"; - - type GridLine = "auto" | (string & {}) | (number & {}); - - type LineStyle = "dashed" | "dotted" | "double" | "groove" | "hidden" | "inset" | "none" | "outset" | "ridge" | "solid"; - - type LineWidth<TLength> = TLength | "medium" | "thick" | "thin"; - - type MaskLayer<TLength> = Position<TLength> | RepeatStyle | GeometryBox | CompositingOperator | MaskingMode | "no-clip" | "none" | (string & {}); - - type MaskingMode = "alpha" | "luminance" | "match-source"; - - type NamedColor = - | "aliceblue" - | "antiquewhite" - | "aqua" - | "aquamarine" - | "azure" - | "beige" - | "bisque" - | "black" - | "blanchedalmond" - | "blue" - | "blueviolet" - | "brown" - | "burlywood" - | "cadetblue" - | "chartreuse" - | "chocolate" - | "coral" - | "cornflowerblue" - | "cornsilk" - | "crimson" - | "cyan" - | "darkblue" - | "darkcyan" - | "darkgoldenrod" - | "darkgray" - | "darkgreen" - | "darkgrey" - | "darkkhaki" - | "darkmagenta" - | "darkolivegreen" - | "darkorange" - | "darkorchid" - | "darkred" - | "darksalmon" - | "darkseagreen" - | "darkslateblue" - | "darkslategray" - | "darkslategrey" - | "darkturquoise" - | "darkviolet" - | "deeppink" - | "deepskyblue" - | "dimgray" - | "dimgrey" - | "dodgerblue" - | "firebrick" - | "floralwhite" - | "forestgreen" - | "fuchsia" - | "gainsboro" - | "ghostwhite" - | "gold" - | "goldenrod" - | "gray" - | "green" - | "greenyellow" - | "grey" - | "honeydew" - | "hotpink" - | "indianred" - | "indigo" - | "ivory" - | "khaki" - | "lavender" - | "lavenderblush" - | "lawngreen" - | "lemonchiffon" - | "lightblue" - | "lightcoral" - | "lightcyan" - | "lightgoldenrodyellow" - | "lightgray" - | "lightgreen" - | "lightgrey" - | "lightpink" - | "lightsalmon" - | "lightseagreen" - | "lightskyblue" - | "lightslategray" - | "lightslategrey" - | "lightsteelblue" - | "lightyellow" - | "lime" - | "limegreen" - | "linen" - | "magenta" - | "maroon" - | "mediumaquamarine" - | "mediumblue" - | "mediumorchid" - | "mediumpurple" - | "mediumseagreen" - | "mediumslateblue" - | "mediumspringgreen" - | "mediumturquoise" - | "mediumvioletred" - | "midnightblue" - | "mintcream" - | "mistyrose" - | "moccasin" - | "navajowhite" - | "navy" - | "oldlace" - | "olive" - | "olivedrab" - | "orange" - | "orangered" - | "orchid" - | "palegoldenrod" - | "palegreen" - | "paleturquoise" - | "palevioletred" - | "papayawhip" - | "peachpuff" - | "peru" - | "pink" - | "plum" - | "powderblue" - | "purple" - | "rebeccapurple" - | "red" - | "rosybrown" - | "royalblue" - | "saddlebrown" - | "salmon" - | "sandybrown" - | "seagreen" - | "seashell" - | "sienna" - | "silver" - | "skyblue" - | "slateblue" - | "slategray" - | "slategrey" - | "snow" - | "springgreen" - | "steelblue" - | "tan" - | "teal" - | "thistle" - | "tomato" - | "transparent" - | "turquoise" - | "violet" - | "wheat" - | "white" - | "whitesmoke" - | "yellow" - | "yellowgreen"; - - type PageSize = "A3" | "A4" | "A5" | "B4" | "B5" | "JIS-B4" | "JIS-B5" | "ledger" | "legal" | "letter"; - - type Paint = Color | "child" | "context-fill" | "context-stroke" | "none" | (string & {}); - - type Position<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | (string & {}); - - type Quote = "close-quote" | "no-close-quote" | "no-open-quote" | "open-quote"; - - type RepeatStyle = "no-repeat" | "repeat" | "repeat-x" | "repeat-y" | "round" | "space" | (string & {}); - - type SelfPosition = "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start"; - - type SingleAnimation<TTime> = - | EasingFunction - | SingleAnimationDirection - | SingleAnimationFillMode - | SingleAnimationTimeline - | TTime - | "infinite" - | "none" - | "paused" - | "running" - | (string & {}) - | (number & {}); - - type SingleAnimationComposition = "accumulate" | "add" | "replace"; - - type SingleAnimationDirection = "alternate" | "alternate-reverse" | "normal" | "reverse"; - - type SingleAnimationFillMode = "backwards" | "both" | "forwards" | "none"; - - type SingleAnimationTimeline = "auto" | "none" | (string & {}); - - type SingleTransition<TTime> = EasingFunction | TTime | "all" | "allow-discrete" | "none" | "normal" | (string & {}); - - type StepTimingFunction = "step-end" | "step-start" | (string & {}); - - type TimelineRangeName = "contain" | "cover" | "entry" | "entry-crossing" | "exit" | "exit-crossing"; - - type TrackBreadth<TLength> = TLength | "auto" | "max-content" | "min-content" | (string & {}); - - type ViewportLength<TLength> = TLength | "auto" | (string & {}); - - type VisualBox = "border-box" | "content-box" | "padding-box"; -} diff --git a/node_modules/csstype/index.js.flow b/node_modules/csstype/index.js.flow deleted file mode 100644 index 0b45a32..0000000 --- a/node_modules/csstype/index.js.flow +++ /dev/null @@ -1,6612 +0,0 @@ -// @flow strict - -export type StandardLonghandProperties<TLength = string | 0, TTime = string> = {| - accentColor?: Property$AccentColor, - alignContent?: Property$AlignContent, - alignItems?: Property$AlignItems, - alignSelf?: Property$AlignSelf, - alignTracks?: Property$AlignTracks, - animationComposition?: Property$AnimationComposition, - animationDelay?: Property$AnimationDelay<TTime>, - animationDirection?: Property$AnimationDirection, - animationDuration?: Property$AnimationDuration<TTime>, - animationFillMode?: Property$AnimationFillMode, - animationIterationCount?: Property$AnimationIterationCount, - animationName?: Property$AnimationName, - animationPlayState?: Property$AnimationPlayState, - animationRangeEnd?: Property$AnimationRangeEnd<TLength>, - animationRangeStart?: Property$AnimationRangeStart<TLength>, - animationTimeline?: Property$AnimationTimeline, - animationTimingFunction?: Property$AnimationTimingFunction, - appearance?: Property$Appearance, - aspectRatio?: Property$AspectRatio, - backdropFilter?: Property$BackdropFilter, - backfaceVisibility?: Property$BackfaceVisibility, - backgroundAttachment?: Property$BackgroundAttachment, - backgroundBlendMode?: Property$BackgroundBlendMode, - backgroundClip?: Property$BackgroundClip, - backgroundColor?: Property$BackgroundColor, - backgroundImage?: Property$BackgroundImage, - backgroundOrigin?: Property$BackgroundOrigin, - backgroundPositionX?: Property$BackgroundPositionX<TLength>, - backgroundPositionY?: Property$BackgroundPositionY<TLength>, - backgroundRepeat?: Property$BackgroundRepeat, - backgroundSize?: Property$BackgroundSize<TLength>, - blockOverflow?: Property$BlockOverflow, - blockSize?: Property$BlockSize<TLength>, - borderBlockColor?: Property$BorderBlockColor, - borderBlockEndColor?: Property$BorderBlockEndColor, - borderBlockEndStyle?: Property$BorderBlockEndStyle, - borderBlockEndWidth?: Property$BorderBlockEndWidth<TLength>, - borderBlockStartColor?: Property$BorderBlockStartColor, - borderBlockStartStyle?: Property$BorderBlockStartStyle, - borderBlockStartWidth?: Property$BorderBlockStartWidth<TLength>, - borderBlockStyle?: Property$BorderBlockStyle, - borderBlockWidth?: Property$BorderBlockWidth<TLength>, - borderBottomColor?: Property$BorderBottomColor, - borderBottomLeftRadius?: Property$BorderBottomLeftRadius<TLength>, - borderBottomRightRadius?: Property$BorderBottomRightRadius<TLength>, - borderBottomStyle?: Property$BorderBottomStyle, - borderBottomWidth?: Property$BorderBottomWidth<TLength>, - borderCollapse?: Property$BorderCollapse, - borderEndEndRadius?: Property$BorderEndEndRadius<TLength>, - borderEndStartRadius?: Property$BorderEndStartRadius<TLength>, - borderImageOutset?: Property$BorderImageOutset<TLength>, - borderImageRepeat?: Property$BorderImageRepeat, - borderImageSlice?: Property$BorderImageSlice, - borderImageSource?: Property$BorderImageSource, - borderImageWidth?: Property$BorderImageWidth<TLength>, - borderInlineColor?: Property$BorderInlineColor, - borderInlineEndColor?: Property$BorderInlineEndColor, - borderInlineEndStyle?: Property$BorderInlineEndStyle, - borderInlineEndWidth?: Property$BorderInlineEndWidth<TLength>, - borderInlineStartColor?: Property$BorderInlineStartColor, - borderInlineStartStyle?: Property$BorderInlineStartStyle, - borderInlineStartWidth?: Property$BorderInlineStartWidth<TLength>, - borderInlineStyle?: Property$BorderInlineStyle, - borderInlineWidth?: Property$BorderInlineWidth<TLength>, - borderLeftColor?: Property$BorderLeftColor, - borderLeftStyle?: Property$BorderLeftStyle, - borderLeftWidth?: Property$BorderLeftWidth<TLength>, - borderRightColor?: Property$BorderRightColor, - borderRightStyle?: Property$BorderRightStyle, - borderRightWidth?: Property$BorderRightWidth<TLength>, - borderSpacing?: Property$BorderSpacing<TLength>, - borderStartEndRadius?: Property$BorderStartEndRadius<TLength>, - borderStartStartRadius?: Property$BorderStartStartRadius<TLength>, - borderTopColor?: Property$BorderTopColor, - borderTopLeftRadius?: Property$BorderTopLeftRadius<TLength>, - borderTopRightRadius?: Property$BorderTopRightRadius<TLength>, - borderTopStyle?: Property$BorderTopStyle, - borderTopWidth?: Property$BorderTopWidth<TLength>, - bottom?: Property$Bottom<TLength>, - boxDecorationBreak?: Property$BoxDecorationBreak, - boxShadow?: Property$BoxShadow, - boxSizing?: Property$BoxSizing, - breakAfter?: Property$BreakAfter, - breakBefore?: Property$BreakBefore, - breakInside?: Property$BreakInside, - captionSide?: Property$CaptionSide, - caretColor?: Property$CaretColor, - caretShape?: Property$CaretShape, - clear?: Property$Clear, - clipPath?: Property$ClipPath, - color?: Property$Color, - colorAdjust?: Property$PrintColorAdjust, - colorScheme?: Property$ColorScheme, - columnCount?: Property$ColumnCount, - columnFill?: Property$ColumnFill, - columnGap?: Property$ColumnGap<TLength>, - columnRuleColor?: Property$ColumnRuleColor, - columnRuleStyle?: Property$ColumnRuleStyle, - columnRuleWidth?: Property$ColumnRuleWidth<TLength>, - columnSpan?: Property$ColumnSpan, - columnWidth?: Property$ColumnWidth<TLength>, - contain?: Property$Contain, - containIntrinsicBlockSize?: Property$ContainIntrinsicBlockSize<TLength>, - containIntrinsicHeight?: Property$ContainIntrinsicHeight<TLength>, - containIntrinsicInlineSize?: Property$ContainIntrinsicInlineSize<TLength>, - containIntrinsicWidth?: Property$ContainIntrinsicWidth<TLength>, - containerName?: Property$ContainerName, - containerType?: Property$ContainerType, - content?: Property$Content, - contentVisibility?: Property$ContentVisibility, - counterIncrement?: Property$CounterIncrement, - counterReset?: Property$CounterReset, - counterSet?: Property$CounterSet, - cursor?: Property$Cursor, - direction?: Property$Direction, - display?: Property$Display, - emptyCells?: Property$EmptyCells, - filter?: Property$Filter, - flexBasis?: Property$FlexBasis<TLength>, - flexDirection?: Property$FlexDirection, - flexGrow?: Property$FlexGrow, - flexShrink?: Property$FlexShrink, - flexWrap?: Property$FlexWrap, - float?: Property$Float, - fontFamily?: Property$FontFamily, - fontFeatureSettings?: Property$FontFeatureSettings, - fontKerning?: Property$FontKerning, - fontLanguageOverride?: Property$FontLanguageOverride, - fontOpticalSizing?: Property$FontOpticalSizing, - fontPalette?: Property$FontPalette, - fontSize?: Property$FontSize<TLength>, - fontSizeAdjust?: Property$FontSizeAdjust, - fontSmooth?: Property$FontSmooth<TLength>, - fontStretch?: Property$FontStretch, - fontStyle?: Property$FontStyle, - fontSynthesis?: Property$FontSynthesis, - fontSynthesisPosition?: Property$FontSynthesisPosition, - fontSynthesisSmallCaps?: Property$FontSynthesisSmallCaps, - fontSynthesisStyle?: Property$FontSynthesisStyle, - fontSynthesisWeight?: Property$FontSynthesisWeight, - fontVariant?: Property$FontVariant, - fontVariantAlternates?: Property$FontVariantAlternates, - fontVariantCaps?: Property$FontVariantCaps, - fontVariantEastAsian?: Property$FontVariantEastAsian, - fontVariantEmoji?: Property$FontVariantEmoji, - fontVariantLigatures?: Property$FontVariantLigatures, - fontVariantNumeric?: Property$FontVariantNumeric, - fontVariantPosition?: Property$FontVariantPosition, - fontVariationSettings?: Property$FontVariationSettings, - fontWeight?: Property$FontWeight, - forcedColorAdjust?: Property$ForcedColorAdjust, - gridAutoColumns?: Property$GridAutoColumns<TLength>, - gridAutoFlow?: Property$GridAutoFlow, - gridAutoRows?: Property$GridAutoRows<TLength>, - gridColumnEnd?: Property$GridColumnEnd, - gridColumnStart?: Property$GridColumnStart, - gridRowEnd?: Property$GridRowEnd, - gridRowStart?: Property$GridRowStart, - gridTemplateAreas?: Property$GridTemplateAreas, - gridTemplateColumns?: Property$GridTemplateColumns<TLength>, - gridTemplateRows?: Property$GridTemplateRows<TLength>, - hangingPunctuation?: Property$HangingPunctuation, - height?: Property$Height<TLength>, - hyphenateCharacter?: Property$HyphenateCharacter, - hyphenateLimitChars?: Property$HyphenateLimitChars, - hyphens?: Property$Hyphens, - imageOrientation?: Property$ImageOrientation, - imageRendering?: Property$ImageRendering, - imageResolution?: Property$ImageResolution, - initialLetter?: Property$InitialLetter, - inlineSize?: Property$InlineSize<TLength>, - inputSecurity?: Property$InputSecurity, - insetBlockEnd?: Property$InsetBlockEnd<TLength>, - insetBlockStart?: Property$InsetBlockStart<TLength>, - insetInlineEnd?: Property$InsetInlineEnd<TLength>, - insetInlineStart?: Property$InsetInlineStart<TLength>, - isolation?: Property$Isolation, - justifyContent?: Property$JustifyContent, - justifyItems?: Property$JustifyItems, - justifySelf?: Property$JustifySelf, - justifyTracks?: Property$JustifyTracks, - left?: Property$Left<TLength>, - letterSpacing?: Property$LetterSpacing<TLength>, - lineBreak?: Property$LineBreak, - lineHeight?: Property$LineHeight<TLength>, - lineHeightStep?: Property$LineHeightStep<TLength>, - listStyleImage?: Property$ListStyleImage, - listStylePosition?: Property$ListStylePosition, - listStyleType?: Property$ListStyleType, - marginBlockEnd?: Property$MarginBlockEnd<TLength>, - marginBlockStart?: Property$MarginBlockStart<TLength>, - marginBottom?: Property$MarginBottom<TLength>, - marginInlineEnd?: Property$MarginInlineEnd<TLength>, - marginInlineStart?: Property$MarginInlineStart<TLength>, - marginLeft?: Property$MarginLeft<TLength>, - marginRight?: Property$MarginRight<TLength>, - marginTop?: Property$MarginTop<TLength>, - marginTrim?: Property$MarginTrim, - maskBorderMode?: Property$MaskBorderMode, - maskBorderOutset?: Property$MaskBorderOutset<TLength>, - maskBorderRepeat?: Property$MaskBorderRepeat, - maskBorderSlice?: Property$MaskBorderSlice, - maskBorderSource?: Property$MaskBorderSource, - maskBorderWidth?: Property$MaskBorderWidth<TLength>, - maskClip?: Property$MaskClip, - maskComposite?: Property$MaskComposite, - maskImage?: Property$MaskImage, - maskMode?: Property$MaskMode, - maskOrigin?: Property$MaskOrigin, - maskPosition?: Property$MaskPosition<TLength>, - maskRepeat?: Property$MaskRepeat, - maskSize?: Property$MaskSize<TLength>, - maskType?: Property$MaskType, - masonryAutoFlow?: Property$MasonryAutoFlow, - mathDepth?: Property$MathDepth, - mathShift?: Property$MathShift, - mathStyle?: Property$MathStyle, - maxBlockSize?: Property$MaxBlockSize<TLength>, - maxHeight?: Property$MaxHeight<TLength>, - maxInlineSize?: Property$MaxInlineSize<TLength>, - maxLines?: Property$MaxLines, - maxWidth?: Property$MaxWidth<TLength>, - minBlockSize?: Property$MinBlockSize<TLength>, - minHeight?: Property$MinHeight<TLength>, - minInlineSize?: Property$MinInlineSize<TLength>, - minWidth?: Property$MinWidth<TLength>, - mixBlendMode?: Property$MixBlendMode, - motionDistance?: Property$OffsetDistance<TLength>, - motionPath?: Property$OffsetPath, - motionRotation?: Property$OffsetRotate, - objectFit?: Property$ObjectFit, - objectPosition?: Property$ObjectPosition<TLength>, - offsetAnchor?: Property$OffsetAnchor<TLength>, - offsetDistance?: Property$OffsetDistance<TLength>, - offsetPath?: Property$OffsetPath, - offsetPosition?: Property$OffsetPosition<TLength>, - offsetRotate?: Property$OffsetRotate, - offsetRotation?: Property$OffsetRotate, - opacity?: Property$Opacity, - order?: Property$Order, - orphans?: Property$Orphans, - outlineColor?: Property$OutlineColor, - outlineOffset?: Property$OutlineOffset<TLength>, - outlineStyle?: Property$OutlineStyle, - outlineWidth?: Property$OutlineWidth<TLength>, - overflowAnchor?: Property$OverflowAnchor, - overflowBlock?: Property$OverflowBlock, - overflowClipBox?: Property$OverflowClipBox, - overflowClipMargin?: Property$OverflowClipMargin<TLength>, - overflowInline?: Property$OverflowInline, - overflowWrap?: Property$OverflowWrap, - overflowX?: Property$OverflowX, - overflowY?: Property$OverflowY, - overlay?: Property$Overlay, - overscrollBehaviorBlock?: Property$OverscrollBehaviorBlock, - overscrollBehaviorInline?: Property$OverscrollBehaviorInline, - overscrollBehaviorX?: Property$OverscrollBehaviorX, - overscrollBehaviorY?: Property$OverscrollBehaviorY, - paddingBlockEnd?: Property$PaddingBlockEnd<TLength>, - paddingBlockStart?: Property$PaddingBlockStart<TLength>, - paddingBottom?: Property$PaddingBottom<TLength>, - paddingInlineEnd?: Property$PaddingInlineEnd<TLength>, - paddingInlineStart?: Property$PaddingInlineStart<TLength>, - paddingLeft?: Property$PaddingLeft<TLength>, - paddingRight?: Property$PaddingRight<TLength>, - paddingTop?: Property$PaddingTop<TLength>, - page?: Property$Page, - pageBreakAfter?: Property$PageBreakAfter, - pageBreakBefore?: Property$PageBreakBefore, - pageBreakInside?: Property$PageBreakInside, - paintOrder?: Property$PaintOrder, - perspective?: Property$Perspective<TLength>, - perspectiveOrigin?: Property$PerspectiveOrigin<TLength>, - pointerEvents?: Property$PointerEvents, - position?: Property$Position, - printColorAdjust?: Property$PrintColorAdjust, - quotes?: Property$Quotes, - resize?: Property$Resize, - right?: Property$Right<TLength>, - rotate?: Property$Rotate, - rowGap?: Property$RowGap<TLength>, - rubyAlign?: Property$RubyAlign, - rubyMerge?: Property$RubyMerge, - rubyPosition?: Property$RubyPosition, - scale?: Property$Scale, - scrollBehavior?: Property$ScrollBehavior, - scrollMarginBlockEnd?: Property$ScrollMarginBlockEnd<TLength>, - scrollMarginBlockStart?: Property$ScrollMarginBlockStart<TLength>, - scrollMarginBottom?: Property$ScrollMarginBottom<TLength>, - scrollMarginInlineEnd?: Property$ScrollMarginInlineEnd<TLength>, - scrollMarginInlineStart?: Property$ScrollMarginInlineStart<TLength>, - scrollMarginLeft?: Property$ScrollMarginLeft<TLength>, - scrollMarginRight?: Property$ScrollMarginRight<TLength>, - scrollMarginTop?: Property$ScrollMarginTop<TLength>, - scrollPaddingBlockEnd?: Property$ScrollPaddingBlockEnd<TLength>, - scrollPaddingBlockStart?: Property$ScrollPaddingBlockStart<TLength>, - scrollPaddingBottom?: Property$ScrollPaddingBottom<TLength>, - scrollPaddingInlineEnd?: Property$ScrollPaddingInlineEnd<TLength>, - scrollPaddingInlineStart?: Property$ScrollPaddingInlineStart<TLength>, - scrollPaddingLeft?: Property$ScrollPaddingLeft<TLength>, - scrollPaddingRight?: Property$ScrollPaddingRight<TLength>, - scrollPaddingTop?: Property$ScrollPaddingTop<TLength>, - scrollSnapAlign?: Property$ScrollSnapAlign, - scrollSnapMarginBottom?: Property$ScrollMarginBottom<TLength>, - scrollSnapMarginLeft?: Property$ScrollMarginLeft<TLength>, - scrollSnapMarginRight?: Property$ScrollMarginRight<TLength>, - scrollSnapMarginTop?: Property$ScrollMarginTop<TLength>, - scrollSnapStop?: Property$ScrollSnapStop, - scrollSnapType?: Property$ScrollSnapType, - scrollTimelineAxis?: Property$ScrollTimelineAxis, - scrollTimelineName?: Property$ScrollTimelineName, - scrollbarColor?: Property$ScrollbarColor, - scrollbarGutter?: Property$ScrollbarGutter, - scrollbarWidth?: Property$ScrollbarWidth, - shapeImageThreshold?: Property$ShapeImageThreshold, - shapeMargin?: Property$ShapeMargin<TLength>, - shapeOutside?: Property$ShapeOutside, - tabSize?: Property$TabSize<TLength>, - tableLayout?: Property$TableLayout, - textAlign?: Property$TextAlign, - textAlignLast?: Property$TextAlignLast, - textCombineUpright?: Property$TextCombineUpright, - textDecorationColor?: Property$TextDecorationColor, - textDecorationLine?: Property$TextDecorationLine, - textDecorationSkip?: Property$TextDecorationSkip, - textDecorationSkipInk?: Property$TextDecorationSkipInk, - textDecorationStyle?: Property$TextDecorationStyle, - textDecorationThickness?: Property$TextDecorationThickness<TLength>, - textEmphasisColor?: Property$TextEmphasisColor, - textEmphasisPosition?: Property$TextEmphasisPosition, - textEmphasisStyle?: Property$TextEmphasisStyle, - textIndent?: Property$TextIndent<TLength>, - textJustify?: Property$TextJustify, - textOrientation?: Property$TextOrientation, - textOverflow?: Property$TextOverflow, - textRendering?: Property$TextRendering, - textShadow?: Property$TextShadow, - textSizeAdjust?: Property$TextSizeAdjust, - textTransform?: Property$TextTransform, - textUnderlineOffset?: Property$TextUnderlineOffset<TLength>, - textUnderlinePosition?: Property$TextUnderlinePosition, - textWrap?: Property$TextWrap, - timelineScope?: Property$TimelineScope, - top?: Property$Top<TLength>, - touchAction?: Property$TouchAction, - transform?: Property$Transform, - transformBox?: Property$TransformBox, - transformOrigin?: Property$TransformOrigin<TLength>, - transformStyle?: Property$TransformStyle, - transitionBehavior?: Property$TransitionBehavior, - transitionDelay?: Property$TransitionDelay<TTime>, - transitionDuration?: Property$TransitionDuration<TTime>, - transitionProperty?: Property$TransitionProperty, - transitionTimingFunction?: Property$TransitionTimingFunction, - translate?: Property$Translate<TLength>, - unicodeBidi?: Property$UnicodeBidi, - userSelect?: Property$UserSelect, - verticalAlign?: Property$VerticalAlign<TLength>, - viewTimelineAxis?: Property$ViewTimelineAxis, - viewTimelineInset?: Property$ViewTimelineInset<TLength>, - viewTimelineName?: Property$ViewTimelineName, - viewTransitionName?: Property$ViewTransitionName, - visibility?: Property$Visibility, - whiteSpace?: Property$WhiteSpace, - whiteSpaceCollapse?: Property$WhiteSpaceCollapse, - whiteSpaceTrim?: Property$WhiteSpaceTrim, - widows?: Property$Widows, - width?: Property$Width<TLength>, - willChange?: Property$WillChange, - wordBreak?: Property$WordBreak, - wordSpacing?: Property$WordSpacing<TLength>, - wordWrap?: Property$WordWrap, - writingMode?: Property$WritingMode, - zIndex?: Property$ZIndex, - zoom?: Property$Zoom, -|}; - -export type StandardShorthandProperties<TLength = string | 0, TTime = string> = {| - all?: Property$All, - animation?: Property$Animation<TTime>, - animationRange?: Property$AnimationRange<TLength>, - background?: Property$Background<TLength>, - backgroundPosition?: Property$BackgroundPosition<TLength>, - border?: Property$Border<TLength>, - borderBlock?: Property$BorderBlock<TLength>, - borderBlockEnd?: Property$BorderBlockEnd<TLength>, - borderBlockStart?: Property$BorderBlockStart<TLength>, - borderBottom?: Property$BorderBottom<TLength>, - borderColor?: Property$BorderColor, - borderImage?: Property$BorderImage, - borderInline?: Property$BorderInline<TLength>, - borderInlineEnd?: Property$BorderInlineEnd<TLength>, - borderInlineStart?: Property$BorderInlineStart<TLength>, - borderLeft?: Property$BorderLeft<TLength>, - borderRadius?: Property$BorderRadius<TLength>, - borderRight?: Property$BorderRight<TLength>, - borderStyle?: Property$BorderStyle, - borderTop?: Property$BorderTop<TLength>, - borderWidth?: Property$BorderWidth<TLength>, - caret?: Property$Caret, - columnRule?: Property$ColumnRule<TLength>, - columns?: Property$Columns<TLength>, - containIntrinsicSize?: Property$ContainIntrinsicSize<TLength>, - container?: Property$Container, - flex?: Property$Flex<TLength>, - flexFlow?: Property$FlexFlow, - font?: Property$Font, - gap?: Property$Gap<TLength>, - grid?: Property$Grid, - gridArea?: Property$GridArea, - gridColumn?: Property$GridColumn, - gridRow?: Property$GridRow, - gridTemplate?: Property$GridTemplate, - inset?: Property$Inset<TLength>, - insetBlock?: Property$InsetBlock<TLength>, - insetInline?: Property$InsetInline<TLength>, - lineClamp?: Property$LineClamp, - listStyle?: Property$ListStyle, - margin?: Property$Margin<TLength>, - marginBlock?: Property$MarginBlock<TLength>, - marginInline?: Property$MarginInline<TLength>, - mask?: Property$Mask<TLength>, - maskBorder?: Property$MaskBorder, - motion?: Property$Offset<TLength>, - offset?: Property$Offset<TLength>, - outline?: Property$Outline<TLength>, - overflow?: Property$Overflow, - overscrollBehavior?: Property$OverscrollBehavior, - padding?: Property$Padding<TLength>, - paddingBlock?: Property$PaddingBlock<TLength>, - paddingInline?: Property$PaddingInline<TLength>, - placeContent?: Property$PlaceContent, - placeItems?: Property$PlaceItems, - placeSelf?: Property$PlaceSelf, - scrollMargin?: Property$ScrollMargin<TLength>, - scrollMarginBlock?: Property$ScrollMarginBlock<TLength>, - scrollMarginInline?: Property$ScrollMarginInline<TLength>, - scrollPadding?: Property$ScrollPadding<TLength>, - scrollPaddingBlock?: Property$ScrollPaddingBlock<TLength>, - scrollPaddingInline?: Property$ScrollPaddingInline<TLength>, - scrollSnapMargin?: Property$ScrollMargin<TLength>, - scrollTimeline?: Property$ScrollTimeline, - textDecoration?: Property$TextDecoration<TLength>, - textEmphasis?: Property$TextEmphasis, - transition?: Property$Transition<TTime>, - viewTimeline?: Property$ViewTimeline, -|}; - -export type StandardProperties<TLength = string | 0, TTime = string> = {| ...StandardLonghandProperties<TLength, TTime>, ...StandardShorthandProperties<TLength, TTime> |}; - -export type VendorLonghandProperties<TLength = string | 0, TTime = string> = {| - MozAnimationDelay?: Property$AnimationDelay<TTime>, - MozAnimationDirection?: Property$AnimationDirection, - MozAnimationDuration?: Property$AnimationDuration<TTime>, - MozAnimationFillMode?: Property$AnimationFillMode, - MozAnimationIterationCount?: Property$AnimationIterationCount, - MozAnimationName?: Property$AnimationName, - MozAnimationPlayState?: Property$AnimationPlayState, - MozAnimationTimingFunction?: Property$AnimationTimingFunction, - MozAppearance?: Property$MozAppearance, - MozBinding?: Property$MozBinding, - MozBorderBottomColors?: Property$MozBorderBottomColors, - MozBorderEndColor?: Property$BorderInlineEndColor, - MozBorderEndStyle?: Property$BorderInlineEndStyle, - MozBorderEndWidth?: Property$BorderInlineEndWidth<TLength>, - MozBorderLeftColors?: Property$MozBorderLeftColors, - MozBorderRightColors?: Property$MozBorderRightColors, - MozBorderStartColor?: Property$BorderInlineStartColor, - MozBorderStartStyle?: Property$BorderInlineStartStyle, - MozBorderTopColors?: Property$MozBorderTopColors, - MozBoxSizing?: Property$BoxSizing, - MozColumnCount?: Property$ColumnCount, - MozColumnFill?: Property$ColumnFill, - MozColumnRuleColor?: Property$ColumnRuleColor, - MozColumnRuleStyle?: Property$ColumnRuleStyle, - MozColumnRuleWidth?: Property$ColumnRuleWidth<TLength>, - MozColumnWidth?: Property$ColumnWidth<TLength>, - MozContextProperties?: Property$MozContextProperties, - MozFontFeatureSettings?: Property$FontFeatureSettings, - MozFontLanguageOverride?: Property$FontLanguageOverride, - MozHyphens?: Property$Hyphens, - MozImageRegion?: Property$MozImageRegion, - MozMarginEnd?: Property$MarginInlineEnd<TLength>, - MozMarginStart?: Property$MarginInlineStart<TLength>, - MozOrient?: Property$MozOrient, - MozOsxFontSmoothing?: Property$FontSmooth<TLength>, - MozOutlineRadiusBottomleft?: Property$MozOutlineRadiusBottomleft<TLength>, - MozOutlineRadiusBottomright?: Property$MozOutlineRadiusBottomright<TLength>, - MozOutlineRadiusTopleft?: Property$MozOutlineRadiusTopleft<TLength>, - MozOutlineRadiusTopright?: Property$MozOutlineRadiusTopright<TLength>, - MozPaddingEnd?: Property$PaddingInlineEnd<TLength>, - MozPaddingStart?: Property$PaddingInlineStart<TLength>, - MozStackSizing?: Property$MozStackSizing, - MozTabSize?: Property$TabSize<TLength>, - MozTextBlink?: Property$MozTextBlink, - MozTextSizeAdjust?: Property$TextSizeAdjust, - MozUserFocus?: Property$MozUserFocus, - MozUserModify?: Property$MozUserModify, - MozUserSelect?: Property$UserSelect, - MozWindowDragging?: Property$MozWindowDragging, - MozWindowShadow?: Property$MozWindowShadow, - msAccelerator?: Property$MsAccelerator, - msBlockProgression?: Property$MsBlockProgression, - msContentZoomChaining?: Property$MsContentZoomChaining, - msContentZoomLimitMax?: Property$MsContentZoomLimitMax, - msContentZoomLimitMin?: Property$MsContentZoomLimitMin, - msContentZoomSnapPoints?: Property$MsContentZoomSnapPoints, - msContentZoomSnapType?: Property$MsContentZoomSnapType, - msContentZooming?: Property$MsContentZooming, - msFilter?: Property$MsFilter, - msFlexDirection?: Property$FlexDirection, - msFlexPositive?: Property$FlexGrow, - msFlowFrom?: Property$MsFlowFrom, - msFlowInto?: Property$MsFlowInto, - msGridColumns?: Property$MsGridColumns<TLength>, - msGridRows?: Property$MsGridRows<TLength>, - msHighContrastAdjust?: Property$MsHighContrastAdjust, - msHyphenateLimitChars?: Property$MsHyphenateLimitChars, - msHyphenateLimitLines?: Property$MsHyphenateLimitLines, - msHyphenateLimitZone?: Property$MsHyphenateLimitZone<TLength>, - msHyphens?: Property$Hyphens, - msImeAlign?: Property$MsImeAlign, - msLineBreak?: Property$LineBreak, - msOrder?: Property$Order, - msOverflowStyle?: Property$MsOverflowStyle, - msOverflowX?: Property$OverflowX, - msOverflowY?: Property$OverflowY, - msScrollChaining?: Property$MsScrollChaining, - msScrollLimitXMax?: Property$MsScrollLimitXMax<TLength>, - msScrollLimitXMin?: Property$MsScrollLimitXMin<TLength>, - msScrollLimitYMax?: Property$MsScrollLimitYMax<TLength>, - msScrollLimitYMin?: Property$MsScrollLimitYMin<TLength>, - msScrollRails?: Property$MsScrollRails, - msScrollSnapPointsX?: Property$MsScrollSnapPointsX, - msScrollSnapPointsY?: Property$MsScrollSnapPointsY, - msScrollSnapType?: Property$MsScrollSnapType, - msScrollTranslation?: Property$MsScrollTranslation, - msScrollbar3dlightColor?: Property$MsScrollbar3dlightColor, - msScrollbarArrowColor?: Property$MsScrollbarArrowColor, - msScrollbarBaseColor?: Property$MsScrollbarBaseColor, - msScrollbarDarkshadowColor?: Property$MsScrollbarDarkshadowColor, - msScrollbarFaceColor?: Property$MsScrollbarFaceColor, - msScrollbarHighlightColor?: Property$MsScrollbarHighlightColor, - msScrollbarShadowColor?: Property$MsScrollbarShadowColor, - msScrollbarTrackColor?: Property$MsScrollbarTrackColor, - msTextAutospace?: Property$MsTextAutospace, - msTextCombineHorizontal?: Property$TextCombineUpright, - msTextOverflow?: Property$TextOverflow, - msTouchAction?: Property$TouchAction, - msTouchSelect?: Property$MsTouchSelect, - msTransform?: Property$Transform, - msTransformOrigin?: Property$TransformOrigin<TLength>, - msTransitionDelay?: Property$TransitionDelay<TTime>, - msTransitionDuration?: Property$TransitionDuration<TTime>, - msTransitionProperty?: Property$TransitionProperty, - msTransitionTimingFunction?: Property$TransitionTimingFunction, - msUserSelect?: Property$MsUserSelect, - msWordBreak?: Property$WordBreak, - msWrapFlow?: Property$MsWrapFlow, - msWrapMargin?: Property$MsWrapMargin<TLength>, - msWrapThrough?: Property$MsWrapThrough, - msWritingMode?: Property$WritingMode, - WebkitAlignContent?: Property$AlignContent, - WebkitAlignItems?: Property$AlignItems, - WebkitAlignSelf?: Property$AlignSelf, - WebkitAnimationDelay?: Property$AnimationDelay<TTime>, - WebkitAnimationDirection?: Property$AnimationDirection, - WebkitAnimationDuration?: Property$AnimationDuration<TTime>, - WebkitAnimationFillMode?: Property$AnimationFillMode, - WebkitAnimationIterationCount?: Property$AnimationIterationCount, - WebkitAnimationName?: Property$AnimationName, - WebkitAnimationPlayState?: Property$AnimationPlayState, - WebkitAnimationTimingFunction?: Property$AnimationTimingFunction, - WebkitAppearance?: Property$WebkitAppearance, - WebkitBackdropFilter?: Property$BackdropFilter, - WebkitBackfaceVisibility?: Property$BackfaceVisibility, - WebkitBackgroundClip?: Property$BackgroundClip, - WebkitBackgroundOrigin?: Property$BackgroundOrigin, - WebkitBackgroundSize?: Property$BackgroundSize<TLength>, - WebkitBorderBeforeColor?: Property$WebkitBorderBeforeColor, - WebkitBorderBeforeStyle?: Property$WebkitBorderBeforeStyle, - WebkitBorderBeforeWidth?: Property$WebkitBorderBeforeWidth<TLength>, - WebkitBorderBottomLeftRadius?: Property$BorderBottomLeftRadius<TLength>, - WebkitBorderBottomRightRadius?: Property$BorderBottomRightRadius<TLength>, - WebkitBorderImageSlice?: Property$BorderImageSlice, - WebkitBorderTopLeftRadius?: Property$BorderTopLeftRadius<TLength>, - WebkitBorderTopRightRadius?: Property$BorderTopRightRadius<TLength>, - WebkitBoxDecorationBreak?: Property$BoxDecorationBreak, - WebkitBoxReflect?: Property$WebkitBoxReflect<TLength>, - WebkitBoxShadow?: Property$BoxShadow, - WebkitBoxSizing?: Property$BoxSizing, - WebkitClipPath?: Property$ClipPath, - WebkitColumnCount?: Property$ColumnCount, - WebkitColumnFill?: Property$ColumnFill, - WebkitColumnRuleColor?: Property$ColumnRuleColor, - WebkitColumnRuleStyle?: Property$ColumnRuleStyle, - WebkitColumnRuleWidth?: Property$ColumnRuleWidth<TLength>, - WebkitColumnSpan?: Property$ColumnSpan, - WebkitColumnWidth?: Property$ColumnWidth<TLength>, - WebkitFilter?: Property$Filter, - WebkitFlexBasis?: Property$FlexBasis<TLength>, - WebkitFlexDirection?: Property$FlexDirection, - WebkitFlexGrow?: Property$FlexGrow, - WebkitFlexShrink?: Property$FlexShrink, - WebkitFlexWrap?: Property$FlexWrap, - WebkitFontFeatureSettings?: Property$FontFeatureSettings, - WebkitFontKerning?: Property$FontKerning, - WebkitFontSmoothing?: Property$FontSmooth<TLength>, - WebkitFontVariantLigatures?: Property$FontVariantLigatures, - WebkitHyphenateCharacter?: Property$HyphenateCharacter, - WebkitHyphens?: Property$Hyphens, - WebkitInitialLetter?: Property$InitialLetter, - WebkitJustifyContent?: Property$JustifyContent, - WebkitLineBreak?: Property$LineBreak, - WebkitLineClamp?: Property$WebkitLineClamp, - WebkitMarginEnd?: Property$MarginInlineEnd<TLength>, - WebkitMarginStart?: Property$MarginInlineStart<TLength>, - WebkitMaskAttachment?: Property$WebkitMaskAttachment, - WebkitMaskBoxImageOutset?: Property$MaskBorderOutset<TLength>, - WebkitMaskBoxImageRepeat?: Property$MaskBorderRepeat, - WebkitMaskBoxImageSlice?: Property$MaskBorderSlice, - WebkitMaskBoxImageSource?: Property$MaskBorderSource, - WebkitMaskBoxImageWidth?: Property$MaskBorderWidth<TLength>, - WebkitMaskClip?: Property$WebkitMaskClip, - WebkitMaskComposite?: Property$WebkitMaskComposite, - WebkitMaskImage?: Property$WebkitMaskImage, - WebkitMaskOrigin?: Property$WebkitMaskOrigin, - WebkitMaskPosition?: Property$WebkitMaskPosition<TLength>, - WebkitMaskPositionX?: Property$WebkitMaskPositionX<TLength>, - WebkitMaskPositionY?: Property$WebkitMaskPositionY<TLength>, - WebkitMaskRepeat?: Property$WebkitMaskRepeat, - WebkitMaskRepeatX?: Property$WebkitMaskRepeatX, - WebkitMaskRepeatY?: Property$WebkitMaskRepeatY, - WebkitMaskSize?: Property$WebkitMaskSize<TLength>, - WebkitMaxInlineSize?: Property$MaxInlineSize<TLength>, - WebkitOrder?: Property$Order, - WebkitOverflowScrolling?: Property$WebkitOverflowScrolling, - WebkitPaddingEnd?: Property$PaddingInlineEnd<TLength>, - WebkitPaddingStart?: Property$PaddingInlineStart<TLength>, - WebkitPerspective?: Property$Perspective<TLength>, - WebkitPerspectiveOrigin?: Property$PerspectiveOrigin<TLength>, - WebkitPrintColorAdjust?: Property$PrintColorAdjust, - WebkitRubyPosition?: Property$RubyPosition, - WebkitScrollSnapType?: Property$ScrollSnapType, - WebkitShapeMargin?: Property$ShapeMargin<TLength>, - WebkitTapHighlightColor?: Property$WebkitTapHighlightColor, - WebkitTextCombine?: Property$TextCombineUpright, - WebkitTextDecorationColor?: Property$TextDecorationColor, - WebkitTextDecorationLine?: Property$TextDecorationLine, - WebkitTextDecorationSkip?: Property$TextDecorationSkip, - WebkitTextDecorationStyle?: Property$TextDecorationStyle, - WebkitTextEmphasisColor?: Property$TextEmphasisColor, - WebkitTextEmphasisPosition?: Property$TextEmphasisPosition, - WebkitTextEmphasisStyle?: Property$TextEmphasisStyle, - WebkitTextFillColor?: Property$WebkitTextFillColor, - WebkitTextOrientation?: Property$TextOrientation, - WebkitTextSizeAdjust?: Property$TextSizeAdjust, - WebkitTextStrokeColor?: Property$WebkitTextStrokeColor, - WebkitTextStrokeWidth?: Property$WebkitTextStrokeWidth<TLength>, - WebkitTextUnderlinePosition?: Property$TextUnderlinePosition, - WebkitTouchCallout?: Property$WebkitTouchCallout, - WebkitTransform?: Property$Transform, - WebkitTransformOrigin?: Property$TransformOrigin<TLength>, - WebkitTransformStyle?: Property$TransformStyle, - WebkitTransitionDelay?: Property$TransitionDelay<TTime>, - WebkitTransitionDuration?: Property$TransitionDuration<TTime>, - WebkitTransitionProperty?: Property$TransitionProperty, - WebkitTransitionTimingFunction?: Property$TransitionTimingFunction, - WebkitUserModify?: Property$WebkitUserModify, - WebkitUserSelect?: Property$UserSelect, - WebkitWritingMode?: Property$WritingMode, -|}; - -export type VendorShorthandProperties<TLength = string | 0, TTime = string> = {| - MozAnimation?: Property$Animation<TTime>, - MozBorderImage?: Property$BorderImage, - MozColumnRule?: Property$ColumnRule<TLength>, - MozColumns?: Property$Columns<TLength>, - MozOutlineRadius?: Property$MozOutlineRadius<TLength>, - msContentZoomLimit?: Property$MsContentZoomLimit, - msContentZoomSnap?: Property$MsContentZoomSnap, - msFlex?: Property$Flex<TLength>, - msScrollLimit?: Property$MsScrollLimit, - msScrollSnapX?: Property$MsScrollSnapX, - msScrollSnapY?: Property$MsScrollSnapY, - msTransition?: Property$Transition<TTime>, - WebkitAnimation?: Property$Animation<TTime>, - WebkitBorderBefore?: Property$WebkitBorderBefore<TLength>, - WebkitBorderImage?: Property$BorderImage, - WebkitBorderRadius?: Property$BorderRadius<TLength>, - WebkitColumnRule?: Property$ColumnRule<TLength>, - WebkitColumns?: Property$Columns<TLength>, - WebkitFlex?: Property$Flex<TLength>, - WebkitFlexFlow?: Property$FlexFlow, - WebkitMask?: Property$WebkitMask<TLength>, - WebkitMaskBoxImage?: Property$MaskBorder, - WebkitTextEmphasis?: Property$TextEmphasis, - WebkitTextStroke?: Property$WebkitTextStroke<TLength>, - WebkitTransition?: Property$Transition<TTime>, -|}; - -export type VendorProperties<TLength = string | 0, TTime = string> = {| ...VendorLonghandProperties<TLength, TTime>, ...VendorShorthandProperties<TLength, TTime> |}; - -export type ObsoleteProperties<TLength = string | 0, TTime = string> = {| - azimuth?: Property$Azimuth, - boxAlign?: Property$BoxAlign, - boxDirection?: Property$BoxDirection, - boxFlex?: Property$BoxFlex, - boxFlexGroup?: Property$BoxFlexGroup, - boxLines?: Property$BoxLines, - boxOrdinalGroup?: Property$BoxOrdinalGroup, - boxOrient?: Property$BoxOrient, - boxPack?: Property$BoxPack, - clip?: Property$Clip, - gridColumnGap?: Property$GridColumnGap<TLength>, - gridGap?: Property$GridGap<TLength>, - gridRowGap?: Property$GridRowGap<TLength>, - imeMode?: Property$ImeMode, - offsetBlock?: Property$InsetBlock<TLength>, - offsetBlockEnd?: Property$InsetBlockEnd<TLength>, - offsetBlockStart?: Property$InsetBlockStart<TLength>, - offsetInline?: Property$InsetInline<TLength>, - offsetInlineEnd?: Property$InsetInlineEnd<TLength>, - offsetInlineStart?: Property$InsetInlineStart<TLength>, - scrollSnapCoordinate?: Property$ScrollSnapCoordinate<TLength>, - scrollSnapDestination?: Property$ScrollSnapDestination<TLength>, - scrollSnapPointsX?: Property$ScrollSnapPointsX, - scrollSnapPointsY?: Property$ScrollSnapPointsY, - scrollSnapTypeX?: Property$ScrollSnapTypeX, - scrollSnapTypeY?: Property$ScrollSnapTypeY, - KhtmlBoxAlign?: Property$BoxAlign, - KhtmlBoxDirection?: Property$BoxDirection, - KhtmlBoxFlex?: Property$BoxFlex, - KhtmlBoxFlexGroup?: Property$BoxFlexGroup, - KhtmlBoxLines?: Property$BoxLines, - KhtmlBoxOrdinalGroup?: Property$BoxOrdinalGroup, - KhtmlBoxOrient?: Property$BoxOrient, - KhtmlBoxPack?: Property$BoxPack, - KhtmlLineBreak?: Property$LineBreak, - KhtmlOpacity?: Property$Opacity, - KhtmlUserSelect?: Property$UserSelect, - MozBackfaceVisibility?: Property$BackfaceVisibility, - MozBackgroundClip?: Property$BackgroundClip, - MozBackgroundInlinePolicy?: Property$BoxDecorationBreak, - MozBackgroundOrigin?: Property$BackgroundOrigin, - MozBackgroundSize?: Property$BackgroundSize<TLength>, - MozBorderRadius?: Property$BorderRadius<TLength>, - MozBorderRadiusBottomleft?: Property$BorderBottomLeftRadius<TLength>, - MozBorderRadiusBottomright?: Property$BorderBottomRightRadius<TLength>, - MozBorderRadiusTopleft?: Property$BorderTopLeftRadius<TLength>, - MozBorderRadiusTopright?: Property$BorderTopRightRadius<TLength>, - MozBoxAlign?: Property$BoxAlign, - MozBoxDirection?: Property$BoxDirection, - MozBoxFlex?: Property$BoxFlex, - MozBoxOrdinalGroup?: Property$BoxOrdinalGroup, - MozBoxOrient?: Property$BoxOrient, - MozBoxPack?: Property$BoxPack, - MozBoxShadow?: Property$BoxShadow, - MozFloatEdge?: Property$MozFloatEdge, - MozForceBrokenImageIcon?: Property$MozForceBrokenImageIcon, - MozOpacity?: Property$Opacity, - MozOutline?: Property$Outline<TLength>, - MozOutlineColor?: Property$OutlineColor, - MozOutlineStyle?: Property$OutlineStyle, - MozOutlineWidth?: Property$OutlineWidth<TLength>, - MozPerspective?: Property$Perspective<TLength>, - MozPerspectiveOrigin?: Property$PerspectiveOrigin<TLength>, - MozTextAlignLast?: Property$TextAlignLast, - MozTextDecorationColor?: Property$TextDecorationColor, - MozTextDecorationLine?: Property$TextDecorationLine, - MozTextDecorationStyle?: Property$TextDecorationStyle, - MozTransform?: Property$Transform, - MozTransformOrigin?: Property$TransformOrigin<TLength>, - MozTransformStyle?: Property$TransformStyle, - MozTransition?: Property$Transition<TTime>, - MozTransitionDelay?: Property$TransitionDelay<TTime>, - MozTransitionDuration?: Property$TransitionDuration<TTime>, - MozTransitionProperty?: Property$TransitionProperty, - MozTransitionTimingFunction?: Property$TransitionTimingFunction, - MozUserInput?: Property$MozUserInput, - msImeMode?: Property$ImeMode, - OAnimation?: Property$Animation<TTime>, - OAnimationDelay?: Property$AnimationDelay<TTime>, - OAnimationDirection?: Property$AnimationDirection, - OAnimationDuration?: Property$AnimationDuration<TTime>, - OAnimationFillMode?: Property$AnimationFillMode, - OAnimationIterationCount?: Property$AnimationIterationCount, - OAnimationName?: Property$AnimationName, - OAnimationPlayState?: Property$AnimationPlayState, - OAnimationTimingFunction?: Property$AnimationTimingFunction, - OBackgroundSize?: Property$BackgroundSize<TLength>, - OBorderImage?: Property$BorderImage, - OObjectFit?: Property$ObjectFit, - OObjectPosition?: Property$ObjectPosition<TLength>, - OTabSize?: Property$TabSize<TLength>, - OTextOverflow?: Property$TextOverflow, - OTransform?: Property$Transform, - OTransformOrigin?: Property$TransformOrigin<TLength>, - OTransition?: Property$Transition<TTime>, - OTransitionDelay?: Property$TransitionDelay<TTime>, - OTransitionDuration?: Property$TransitionDuration<TTime>, - OTransitionProperty?: Property$TransitionProperty, - OTransitionTimingFunction?: Property$TransitionTimingFunction, - WebkitBoxAlign?: Property$BoxAlign, - WebkitBoxDirection?: Property$BoxDirection, - WebkitBoxFlex?: Property$BoxFlex, - WebkitBoxFlexGroup?: Property$BoxFlexGroup, - WebkitBoxLines?: Property$BoxLines, - WebkitBoxOrdinalGroup?: Property$BoxOrdinalGroup, - WebkitBoxOrient?: Property$BoxOrient, - WebkitBoxPack?: Property$BoxPack, -|}; - -export type SvgProperties<TLength = string | 0, TTime = string> = {| - alignmentBaseline?: Property$AlignmentBaseline, - baselineShift?: Property$BaselineShift<TLength>, - clip?: Property$Clip, - clipPath?: Property$ClipPath, - clipRule?: Property$ClipRule, - color?: Property$Color, - colorInterpolation?: Property$ColorInterpolation, - colorRendering?: Property$ColorRendering, - cursor?: Property$Cursor, - direction?: Property$Direction, - display?: Property$Display, - dominantBaseline?: Property$DominantBaseline, - fill?: Property$Fill, - fillOpacity?: Property$FillOpacity, - fillRule?: Property$FillRule, - filter?: Property$Filter, - floodColor?: Property$FloodColor, - floodOpacity?: Property$FloodOpacity, - font?: Property$Font, - fontFamily?: Property$FontFamily, - fontSize?: Property$FontSize<TLength>, - fontSizeAdjust?: Property$FontSizeAdjust, - fontStretch?: Property$FontStretch, - fontStyle?: Property$FontStyle, - fontVariant?: Property$FontVariant, - fontWeight?: Property$FontWeight, - glyphOrientationVertical?: Property$GlyphOrientationVertical, - imageRendering?: Property$ImageRendering, - letterSpacing?: Property$LetterSpacing<TLength>, - lightingColor?: Property$LightingColor, - lineHeight?: Property$LineHeight<TLength>, - marker?: Property$Marker, - markerEnd?: Property$MarkerEnd, - markerMid?: Property$MarkerMid, - markerStart?: Property$MarkerStart, - mask?: Property$Mask<TLength>, - opacity?: Property$Opacity, - overflow?: Property$Overflow, - paintOrder?: Property$PaintOrder, - pointerEvents?: Property$PointerEvents, - shapeRendering?: Property$ShapeRendering, - stopColor?: Property$StopColor, - stopOpacity?: Property$StopOpacity, - stroke?: Property$Stroke, - strokeDasharray?: Property$StrokeDasharray<TLength>, - strokeDashoffset?: Property$StrokeDashoffset<TLength>, - strokeLinecap?: Property$StrokeLinecap, - strokeLinejoin?: Property$StrokeLinejoin, - strokeMiterlimit?: Property$StrokeMiterlimit, - strokeOpacity?: Property$StrokeOpacity, - strokeWidth?: Property$StrokeWidth<TLength>, - textAnchor?: Property$TextAnchor, - textDecoration?: Property$TextDecoration<TLength>, - textRendering?: Property$TextRendering, - unicodeBidi?: Property$UnicodeBidi, - vectorEffect?: Property$VectorEffect, - visibility?: Property$Visibility, - whiteSpace?: Property$WhiteSpace, - wordSpacing?: Property$WordSpacing<TLength>, - writingMode?: Property$WritingMode, -|}; - -export type Properties<TLength = string | 0, TTime = string> = {| - ...StandardProperties<TLength, TTime>, - ...VendorProperties<TLength, TTime>, - ...ObsoleteProperties<TLength, TTime>, - ...SvgProperties<TLength, TTime>, -|}; - -export type StandardLonghandPropertiesHyphen<TLength = string | 0, TTime = string> = {| - "accent-color"?: Property$AccentColor, - "align-content"?: Property$AlignContent, - "align-items"?: Property$AlignItems, - "align-self"?: Property$AlignSelf, - "align-tracks"?: Property$AlignTracks, - "animation-composition"?: Property$AnimationComposition, - "animation-delay"?: Property$AnimationDelay<TTime>, - "animation-direction"?: Property$AnimationDirection, - "animation-duration"?: Property$AnimationDuration<TTime>, - "animation-fill-mode"?: Property$AnimationFillMode, - "animation-iteration-count"?: Property$AnimationIterationCount, - "animation-name"?: Property$AnimationName, - "animation-play-state"?: Property$AnimationPlayState, - "animation-range-end"?: Property$AnimationRangeEnd<TLength>, - "animation-range-start"?: Property$AnimationRangeStart<TLength>, - "animation-timeline"?: Property$AnimationTimeline, - "animation-timing-function"?: Property$AnimationTimingFunction, - appearance?: Property$Appearance, - "aspect-ratio"?: Property$AspectRatio, - "backdrop-filter"?: Property$BackdropFilter, - "backface-visibility"?: Property$BackfaceVisibility, - "background-attachment"?: Property$BackgroundAttachment, - "background-blend-mode"?: Property$BackgroundBlendMode, - "background-clip"?: Property$BackgroundClip, - "background-color"?: Property$BackgroundColor, - "background-image"?: Property$BackgroundImage, - "background-origin"?: Property$BackgroundOrigin, - "background-position-x"?: Property$BackgroundPositionX<TLength>, - "background-position-y"?: Property$BackgroundPositionY<TLength>, - "background-repeat"?: Property$BackgroundRepeat, - "background-size"?: Property$BackgroundSize<TLength>, - "block-overflow"?: Property$BlockOverflow, - "block-size"?: Property$BlockSize<TLength>, - "border-block-color"?: Property$BorderBlockColor, - "border-block-end-color"?: Property$BorderBlockEndColor, - "border-block-end-style"?: Property$BorderBlockEndStyle, - "border-block-end-width"?: Property$BorderBlockEndWidth<TLength>, - "border-block-start-color"?: Property$BorderBlockStartColor, - "border-block-start-style"?: Property$BorderBlockStartStyle, - "border-block-start-width"?: Property$BorderBlockStartWidth<TLength>, - "border-block-style"?: Property$BorderBlockStyle, - "border-block-width"?: Property$BorderBlockWidth<TLength>, - "border-bottom-color"?: Property$BorderBottomColor, - "border-bottom-left-radius"?: Property$BorderBottomLeftRadius<TLength>, - "border-bottom-right-radius"?: Property$BorderBottomRightRadius<TLength>, - "border-bottom-style"?: Property$BorderBottomStyle, - "border-bottom-width"?: Property$BorderBottomWidth<TLength>, - "border-collapse"?: Property$BorderCollapse, - "border-end-end-radius"?: Property$BorderEndEndRadius<TLength>, - "border-end-start-radius"?: Property$BorderEndStartRadius<TLength>, - "border-image-outset"?: Property$BorderImageOutset<TLength>, - "border-image-repeat"?: Property$BorderImageRepeat, - "border-image-slice"?: Property$BorderImageSlice, - "border-image-source"?: Property$BorderImageSource, - "border-image-width"?: Property$BorderImageWidth<TLength>, - "border-inline-color"?: Property$BorderInlineColor, - "border-inline-end-color"?: Property$BorderInlineEndColor, - "border-inline-end-style"?: Property$BorderInlineEndStyle, - "border-inline-end-width"?: Property$BorderInlineEndWidth<TLength>, - "border-inline-start-color"?: Property$BorderInlineStartColor, - "border-inline-start-style"?: Property$BorderInlineStartStyle, - "border-inline-start-width"?: Property$BorderInlineStartWidth<TLength>, - "border-inline-style"?: Property$BorderInlineStyle, - "border-inline-width"?: Property$BorderInlineWidth<TLength>, - "border-left-color"?: Property$BorderLeftColor, - "border-left-style"?: Property$BorderLeftStyle, - "border-left-width"?: Property$BorderLeftWidth<TLength>, - "border-right-color"?: Property$BorderRightColor, - "border-right-style"?: Property$BorderRightStyle, - "border-right-width"?: Property$BorderRightWidth<TLength>, - "border-spacing"?: Property$BorderSpacing<TLength>, - "border-start-end-radius"?: Property$BorderStartEndRadius<TLength>, - "border-start-start-radius"?: Property$BorderStartStartRadius<TLength>, - "border-top-color"?: Property$BorderTopColor, - "border-top-left-radius"?: Property$BorderTopLeftRadius<TLength>, - "border-top-right-radius"?: Property$BorderTopRightRadius<TLength>, - "border-top-style"?: Property$BorderTopStyle, - "border-top-width"?: Property$BorderTopWidth<TLength>, - bottom?: Property$Bottom<TLength>, - "box-decoration-break"?: Property$BoxDecorationBreak, - "box-shadow"?: Property$BoxShadow, - "box-sizing"?: Property$BoxSizing, - "break-after"?: Property$BreakAfter, - "break-before"?: Property$BreakBefore, - "break-inside"?: Property$BreakInside, - "caption-side"?: Property$CaptionSide, - "caret-color"?: Property$CaretColor, - "caret-shape"?: Property$CaretShape, - clear?: Property$Clear, - "clip-path"?: Property$ClipPath, - color?: Property$Color, - "color-adjust"?: Property$PrintColorAdjust, - "color-scheme"?: Property$ColorScheme, - "column-count"?: Property$ColumnCount, - "column-fill"?: Property$ColumnFill, - "column-gap"?: Property$ColumnGap<TLength>, - "column-rule-color"?: Property$ColumnRuleColor, - "column-rule-style"?: Property$ColumnRuleStyle, - "column-rule-width"?: Property$ColumnRuleWidth<TLength>, - "column-span"?: Property$ColumnSpan, - "column-width"?: Property$ColumnWidth<TLength>, - contain?: Property$Contain, - "contain-intrinsic-block-size"?: Property$ContainIntrinsicBlockSize<TLength>, - "contain-intrinsic-height"?: Property$ContainIntrinsicHeight<TLength>, - "contain-intrinsic-inline-size"?: Property$ContainIntrinsicInlineSize<TLength>, - "contain-intrinsic-width"?: Property$ContainIntrinsicWidth<TLength>, - "container-name"?: Property$ContainerName, - "container-type"?: Property$ContainerType, - content?: Property$Content, - "content-visibility"?: Property$ContentVisibility, - "counter-increment"?: Property$CounterIncrement, - "counter-reset"?: Property$CounterReset, - "counter-set"?: Property$CounterSet, - cursor?: Property$Cursor, - direction?: Property$Direction, - display?: Property$Display, - "empty-cells"?: Property$EmptyCells, - filter?: Property$Filter, - "flex-basis"?: Property$FlexBasis<TLength>, - "flex-direction"?: Property$FlexDirection, - "flex-grow"?: Property$FlexGrow, - "flex-shrink"?: Property$FlexShrink, - "flex-wrap"?: Property$FlexWrap, - float?: Property$Float, - "font-family"?: Property$FontFamily, - "font-feature-settings"?: Property$FontFeatureSettings, - "font-kerning"?: Property$FontKerning, - "font-language-override"?: Property$FontLanguageOverride, - "font-optical-sizing"?: Property$FontOpticalSizing, - "font-palette"?: Property$FontPalette, - "font-size"?: Property$FontSize<TLength>, - "font-size-adjust"?: Property$FontSizeAdjust, - "font-smooth"?: Property$FontSmooth<TLength>, - "font-stretch"?: Property$FontStretch, - "font-style"?: Property$FontStyle, - "font-synthesis"?: Property$FontSynthesis, - "font-synthesis-position"?: Property$FontSynthesisPosition, - "font-synthesis-small-caps"?: Property$FontSynthesisSmallCaps, - "font-synthesis-style"?: Property$FontSynthesisStyle, - "font-synthesis-weight"?: Property$FontSynthesisWeight, - "font-variant"?: Property$FontVariant, - "font-variant-alternates"?: Property$FontVariantAlternates, - "font-variant-caps"?: Property$FontVariantCaps, - "font-variant-east-asian"?: Property$FontVariantEastAsian, - "font-variant-emoji"?: Property$FontVariantEmoji, - "font-variant-ligatures"?: Property$FontVariantLigatures, - "font-variant-numeric"?: Property$FontVariantNumeric, - "font-variant-position"?: Property$FontVariantPosition, - "font-variation-settings"?: Property$FontVariationSettings, - "font-weight"?: Property$FontWeight, - "forced-color-adjust"?: Property$ForcedColorAdjust, - "grid-auto-columns"?: Property$GridAutoColumns<TLength>, - "grid-auto-flow"?: Property$GridAutoFlow, - "grid-auto-rows"?: Property$GridAutoRows<TLength>, - "grid-column-end"?: Property$GridColumnEnd, - "grid-column-start"?: Property$GridColumnStart, - "grid-row-end"?: Property$GridRowEnd, - "grid-row-start"?: Property$GridRowStart, - "grid-template-areas"?: Property$GridTemplateAreas, - "grid-template-columns"?: Property$GridTemplateColumns<TLength>, - "grid-template-rows"?: Property$GridTemplateRows<TLength>, - "hanging-punctuation"?: Property$HangingPunctuation, - height?: Property$Height<TLength>, - "hyphenate-character"?: Property$HyphenateCharacter, - "hyphenate-limit-chars"?: Property$HyphenateLimitChars, - hyphens?: Property$Hyphens, - "image-orientation"?: Property$ImageOrientation, - "image-rendering"?: Property$ImageRendering, - "image-resolution"?: Property$ImageResolution, - "initial-letter"?: Property$InitialLetter, - "inline-size"?: Property$InlineSize<TLength>, - "input-security"?: Property$InputSecurity, - "inset-block-end"?: Property$InsetBlockEnd<TLength>, - "inset-block-start"?: Property$InsetBlockStart<TLength>, - "inset-inline-end"?: Property$InsetInlineEnd<TLength>, - "inset-inline-start"?: Property$InsetInlineStart<TLength>, - isolation?: Property$Isolation, - "justify-content"?: Property$JustifyContent, - "justify-items"?: Property$JustifyItems, - "justify-self"?: Property$JustifySelf, - "justify-tracks"?: Property$JustifyTracks, - left?: Property$Left<TLength>, - "letter-spacing"?: Property$LetterSpacing<TLength>, - "line-break"?: Property$LineBreak, - "line-height"?: Property$LineHeight<TLength>, - "line-height-step"?: Property$LineHeightStep<TLength>, - "list-style-image"?: Property$ListStyleImage, - "list-style-position"?: Property$ListStylePosition, - "list-style-type"?: Property$ListStyleType, - "margin-block-end"?: Property$MarginBlockEnd<TLength>, - "margin-block-start"?: Property$MarginBlockStart<TLength>, - "margin-bottom"?: Property$MarginBottom<TLength>, - "margin-inline-end"?: Property$MarginInlineEnd<TLength>, - "margin-inline-start"?: Property$MarginInlineStart<TLength>, - "margin-left"?: Property$MarginLeft<TLength>, - "margin-right"?: Property$MarginRight<TLength>, - "margin-top"?: Property$MarginTop<TLength>, - "margin-trim"?: Property$MarginTrim, - "mask-border-mode"?: Property$MaskBorderMode, - "mask-border-outset"?: Property$MaskBorderOutset<TLength>, - "mask-border-repeat"?: Property$MaskBorderRepeat, - "mask-border-slice"?: Property$MaskBorderSlice, - "mask-border-source"?: Property$MaskBorderSource, - "mask-border-width"?: Property$MaskBorderWidth<TLength>, - "mask-clip"?: Property$MaskClip, - "mask-composite"?: Property$MaskComposite, - "mask-image"?: Property$MaskImage, - "mask-mode"?: Property$MaskMode, - "mask-origin"?: Property$MaskOrigin, - "mask-position"?: Property$MaskPosition<TLength>, - "mask-repeat"?: Property$MaskRepeat, - "mask-size"?: Property$MaskSize<TLength>, - "mask-type"?: Property$MaskType, - "masonry-auto-flow"?: Property$MasonryAutoFlow, - "math-depth"?: Property$MathDepth, - "math-shift"?: Property$MathShift, - "math-style"?: Property$MathStyle, - "max-block-size"?: Property$MaxBlockSize<TLength>, - "max-height"?: Property$MaxHeight<TLength>, - "max-inline-size"?: Property$MaxInlineSize<TLength>, - "max-lines"?: Property$MaxLines, - "max-width"?: Property$MaxWidth<TLength>, - "min-block-size"?: Property$MinBlockSize<TLength>, - "min-height"?: Property$MinHeight<TLength>, - "min-inline-size"?: Property$MinInlineSize<TLength>, - "min-width"?: Property$MinWidth<TLength>, - "mix-blend-mode"?: Property$MixBlendMode, - "motion-distance"?: Property$OffsetDistance<TLength>, - "motion-path"?: Property$OffsetPath, - "motion-rotation"?: Property$OffsetRotate, - "object-fit"?: Property$ObjectFit, - "object-position"?: Property$ObjectPosition<TLength>, - "offset-anchor"?: Property$OffsetAnchor<TLength>, - "offset-distance"?: Property$OffsetDistance<TLength>, - "offset-path"?: Property$OffsetPath, - "offset-position"?: Property$OffsetPosition<TLength>, - "offset-rotate"?: Property$OffsetRotate, - "offset-rotation"?: Property$OffsetRotate, - opacity?: Property$Opacity, - order?: Property$Order, - orphans?: Property$Orphans, - "outline-color"?: Property$OutlineColor, - "outline-offset"?: Property$OutlineOffset<TLength>, - "outline-style"?: Property$OutlineStyle, - "outline-width"?: Property$OutlineWidth<TLength>, - "overflow-anchor"?: Property$OverflowAnchor, - "overflow-block"?: Property$OverflowBlock, - "overflow-clip-box"?: Property$OverflowClipBox, - "overflow-clip-margin"?: Property$OverflowClipMargin<TLength>, - "overflow-inline"?: Property$OverflowInline, - "overflow-wrap"?: Property$OverflowWrap, - "overflow-x"?: Property$OverflowX, - "overflow-y"?: Property$OverflowY, - overlay?: Property$Overlay, - "overscroll-behavior-block"?: Property$OverscrollBehaviorBlock, - "overscroll-behavior-inline"?: Property$OverscrollBehaviorInline, - "overscroll-behavior-x"?: Property$OverscrollBehaviorX, - "overscroll-behavior-y"?: Property$OverscrollBehaviorY, - "padding-block-end"?: Property$PaddingBlockEnd<TLength>, - "padding-block-start"?: Property$PaddingBlockStart<TLength>, - "padding-bottom"?: Property$PaddingBottom<TLength>, - "padding-inline-end"?: Property$PaddingInlineEnd<TLength>, - "padding-inline-start"?: Property$PaddingInlineStart<TLength>, - "padding-left"?: Property$PaddingLeft<TLength>, - "padding-right"?: Property$PaddingRight<TLength>, - "padding-top"?: Property$PaddingTop<TLength>, - page?: Property$Page, - "page-break-after"?: Property$PageBreakAfter, - "page-break-before"?: Property$PageBreakBefore, - "page-break-inside"?: Property$PageBreakInside, - "paint-order"?: Property$PaintOrder, - perspective?: Property$Perspective<TLength>, - "perspective-origin"?: Property$PerspectiveOrigin<TLength>, - "pointer-events"?: Property$PointerEvents, - position?: Property$Position, - "print-color-adjust"?: Property$PrintColorAdjust, - quotes?: Property$Quotes, - resize?: Property$Resize, - right?: Property$Right<TLength>, - rotate?: Property$Rotate, - "row-gap"?: Property$RowGap<TLength>, - "ruby-align"?: Property$RubyAlign, - "ruby-merge"?: Property$RubyMerge, - "ruby-position"?: Property$RubyPosition, - scale?: Property$Scale, - "scroll-behavior"?: Property$ScrollBehavior, - "scroll-margin-block-end"?: Property$ScrollMarginBlockEnd<TLength>, - "scroll-margin-block-start"?: Property$ScrollMarginBlockStart<TLength>, - "scroll-margin-bottom"?: Property$ScrollMarginBottom<TLength>, - "scroll-margin-inline-end"?: Property$ScrollMarginInlineEnd<TLength>, - "scroll-margin-inline-start"?: Property$ScrollMarginInlineStart<TLength>, - "scroll-margin-left"?: Property$ScrollMarginLeft<TLength>, - "scroll-margin-right"?: Property$ScrollMarginRight<TLength>, - "scroll-margin-top"?: Property$ScrollMarginTop<TLength>, - "scroll-padding-block-end"?: Property$ScrollPaddingBlockEnd<TLength>, - "scroll-padding-block-start"?: Property$ScrollPaddingBlockStart<TLength>, - "scroll-padding-bottom"?: Property$ScrollPaddingBottom<TLength>, - "scroll-padding-inline-end"?: Property$ScrollPaddingInlineEnd<TLength>, - "scroll-padding-inline-start"?: Property$ScrollPaddingInlineStart<TLength>, - "scroll-padding-left"?: Property$ScrollPaddingLeft<TLength>, - "scroll-padding-right"?: Property$ScrollPaddingRight<TLength>, - "scroll-padding-top"?: Property$ScrollPaddingTop<TLength>, - "scroll-snap-align"?: Property$ScrollSnapAlign, - "scroll-snap-margin-bottom"?: Property$ScrollMarginBottom<TLength>, - "scroll-snap-margin-left"?: Property$ScrollMarginLeft<TLength>, - "scroll-snap-margin-right"?: Property$ScrollMarginRight<TLength>, - "scroll-snap-margin-top"?: Property$ScrollMarginTop<TLength>, - "scroll-snap-stop"?: Property$ScrollSnapStop, - "scroll-snap-type"?: Property$ScrollSnapType, - "scroll-timeline-axis"?: Property$ScrollTimelineAxis, - "scroll-timeline-name"?: Property$ScrollTimelineName, - "scrollbar-color"?: Property$ScrollbarColor, - "scrollbar-gutter"?: Property$ScrollbarGutter, - "scrollbar-width"?: Property$ScrollbarWidth, - "shape-image-threshold"?: Property$ShapeImageThreshold, - "shape-margin"?: Property$ShapeMargin<TLength>, - "shape-outside"?: Property$ShapeOutside, - "tab-size"?: Property$TabSize<TLength>, - "table-layout"?: Property$TableLayout, - "text-align"?: Property$TextAlign, - "text-align-last"?: Property$TextAlignLast, - "text-combine-upright"?: Property$TextCombineUpright, - "text-decoration-color"?: Property$TextDecorationColor, - "text-decoration-line"?: Property$TextDecorationLine, - "text-decoration-skip"?: Property$TextDecorationSkip, - "text-decoration-skip-ink"?: Property$TextDecorationSkipInk, - "text-decoration-style"?: Property$TextDecorationStyle, - "text-decoration-thickness"?: Property$TextDecorationThickness<TLength>, - "text-emphasis-color"?: Property$TextEmphasisColor, - "text-emphasis-position"?: Property$TextEmphasisPosition, - "text-emphasis-style"?: Property$TextEmphasisStyle, - "text-indent"?: Property$TextIndent<TLength>, - "text-justify"?: Property$TextJustify, - "text-orientation"?: Property$TextOrientation, - "text-overflow"?: Property$TextOverflow, - "text-rendering"?: Property$TextRendering, - "text-shadow"?: Property$TextShadow, - "text-size-adjust"?: Property$TextSizeAdjust, - "text-transform"?: Property$TextTransform, - "text-underline-offset"?: Property$TextUnderlineOffset<TLength>, - "text-underline-position"?: Property$TextUnderlinePosition, - "text-wrap"?: Property$TextWrap, - "timeline-scope"?: Property$TimelineScope, - top?: Property$Top<TLength>, - "touch-action"?: Property$TouchAction, - transform?: Property$Transform, - "transform-box"?: Property$TransformBox, - "transform-origin"?: Property$TransformOrigin<TLength>, - "transform-style"?: Property$TransformStyle, - "transition-behavior"?: Property$TransitionBehavior, - "transition-delay"?: Property$TransitionDelay<TTime>, - "transition-duration"?: Property$TransitionDuration<TTime>, - "transition-property"?: Property$TransitionProperty, - "transition-timing-function"?: Property$TransitionTimingFunction, - translate?: Property$Translate<TLength>, - "unicode-bidi"?: Property$UnicodeBidi, - "user-select"?: Property$UserSelect, - "vertical-align"?: Property$VerticalAlign<TLength>, - "view-timeline-axis"?: Property$ViewTimelineAxis, - "view-timeline-inset"?: Property$ViewTimelineInset<TLength>, - "view-timeline-name"?: Property$ViewTimelineName, - "view-transition-name"?: Property$ViewTransitionName, - visibility?: Property$Visibility, - "white-space"?: Property$WhiteSpace, - "white-space-collapse"?: Property$WhiteSpaceCollapse, - "white-space-trim"?: Property$WhiteSpaceTrim, - widows?: Property$Widows, - width?: Property$Width<TLength>, - "will-change"?: Property$WillChange, - "word-break"?: Property$WordBreak, - "word-spacing"?: Property$WordSpacing<TLength>, - "word-wrap"?: Property$WordWrap, - "writing-mode"?: Property$WritingMode, - "z-index"?: Property$ZIndex, - zoom?: Property$Zoom, -|}; - -export type StandardShorthandPropertiesHyphen<TLength = string | 0, TTime = string> = {| - all?: Property$All, - animation?: Property$Animation<TTime>, - "animation-range"?: Property$AnimationRange<TLength>, - background?: Property$Background<TLength>, - "background-position"?: Property$BackgroundPosition<TLength>, - border?: Property$Border<TLength>, - "border-block"?: Property$BorderBlock<TLength>, - "border-block-end"?: Property$BorderBlockEnd<TLength>, - "border-block-start"?: Property$BorderBlockStart<TLength>, - "border-bottom"?: Property$BorderBottom<TLength>, - "border-color"?: Property$BorderColor, - "border-image"?: Property$BorderImage, - "border-inline"?: Property$BorderInline<TLength>, - "border-inline-end"?: Property$BorderInlineEnd<TLength>, - "border-inline-start"?: Property$BorderInlineStart<TLength>, - "border-left"?: Property$BorderLeft<TLength>, - "border-radius"?: Property$BorderRadius<TLength>, - "border-right"?: Property$BorderRight<TLength>, - "border-style"?: Property$BorderStyle, - "border-top"?: Property$BorderTop<TLength>, - "border-width"?: Property$BorderWidth<TLength>, - caret?: Property$Caret, - "column-rule"?: Property$ColumnRule<TLength>, - columns?: Property$Columns<TLength>, - "contain-intrinsic-size"?: Property$ContainIntrinsicSize<TLength>, - container?: Property$Container, - flex?: Property$Flex<TLength>, - "flex-flow"?: Property$FlexFlow, - font?: Property$Font, - gap?: Property$Gap<TLength>, - grid?: Property$Grid, - "grid-area"?: Property$GridArea, - "grid-column"?: Property$GridColumn, - "grid-row"?: Property$GridRow, - "grid-template"?: Property$GridTemplate, - inset?: Property$Inset<TLength>, - "inset-block"?: Property$InsetBlock<TLength>, - "inset-inline"?: Property$InsetInline<TLength>, - "line-clamp"?: Property$LineClamp, - "list-style"?: Property$ListStyle, - margin?: Property$Margin<TLength>, - "margin-block"?: Property$MarginBlock<TLength>, - "margin-inline"?: Property$MarginInline<TLength>, - mask?: Property$Mask<TLength>, - "mask-border"?: Property$MaskBorder, - motion?: Property$Offset<TLength>, - offset?: Property$Offset<TLength>, - outline?: Property$Outline<TLength>, - overflow?: Property$Overflow, - "overscroll-behavior"?: Property$OverscrollBehavior, - padding?: Property$Padding<TLength>, - "padding-block"?: Property$PaddingBlock<TLength>, - "padding-inline"?: Property$PaddingInline<TLength>, - "place-content"?: Property$PlaceContent, - "place-items"?: Property$PlaceItems, - "place-self"?: Property$PlaceSelf, - "scroll-margin"?: Property$ScrollMargin<TLength>, - "scroll-margin-block"?: Property$ScrollMarginBlock<TLength>, - "scroll-margin-inline"?: Property$ScrollMarginInline<TLength>, - "scroll-padding"?: Property$ScrollPadding<TLength>, - "scroll-padding-block"?: Property$ScrollPaddingBlock<TLength>, - "scroll-padding-inline"?: Property$ScrollPaddingInline<TLength>, - "scroll-snap-margin"?: Property$ScrollMargin<TLength>, - "scroll-timeline"?: Property$ScrollTimeline, - "text-decoration"?: Property$TextDecoration<TLength>, - "text-emphasis"?: Property$TextEmphasis, - transition?: Property$Transition<TTime>, - "view-timeline"?: Property$ViewTimeline, -|}; - -export type StandardPropertiesHyphen<TLength = string | 0, TTime = string> = {| - ...StandardLonghandPropertiesHyphen<TLength, TTime>, - ...StandardShorthandPropertiesHyphen<TLength, TTime>, -|}; - -export type VendorLonghandPropertiesHyphen<TLength = string | 0, TTime = string> = {| - "-moz-animation-delay"?: Property$AnimationDelay<TTime>, - "-moz-animation-direction"?: Property$AnimationDirection, - "-moz-animation-duration"?: Property$AnimationDuration<TTime>, - "-moz-animation-fill-mode"?: Property$AnimationFillMode, - "-moz-animation-iteration-count"?: Property$AnimationIterationCount, - "-moz-animation-name"?: Property$AnimationName, - "-moz-animation-play-state"?: Property$AnimationPlayState, - "-moz-animation-timing-function"?: Property$AnimationTimingFunction, - "-moz-appearance"?: Property$MozAppearance, - "-moz-binding"?: Property$MozBinding, - "-moz-border-bottom-colors"?: Property$MozBorderBottomColors, - "-moz-border-end-color"?: Property$BorderInlineEndColor, - "-moz-border-end-style"?: Property$BorderInlineEndStyle, - "-moz-border-end-width"?: Property$BorderInlineEndWidth<TLength>, - "-moz-border-left-colors"?: Property$MozBorderLeftColors, - "-moz-border-right-colors"?: Property$MozBorderRightColors, - "-moz-border-start-color"?: Property$BorderInlineStartColor, - "-moz-border-start-style"?: Property$BorderInlineStartStyle, - "-moz-border-top-colors"?: Property$MozBorderTopColors, - "-moz-box-sizing"?: Property$BoxSizing, - "-moz-column-count"?: Property$ColumnCount, - "-moz-column-fill"?: Property$ColumnFill, - "-moz-column-rule-color"?: Property$ColumnRuleColor, - "-moz-column-rule-style"?: Property$ColumnRuleStyle, - "-moz-column-rule-width"?: Property$ColumnRuleWidth<TLength>, - "-moz-column-width"?: Property$ColumnWidth<TLength>, - "-moz-context-properties"?: Property$MozContextProperties, - "-moz-font-feature-settings"?: Property$FontFeatureSettings, - "-moz-font-language-override"?: Property$FontLanguageOverride, - "-moz-hyphens"?: Property$Hyphens, - "-moz-image-region"?: Property$MozImageRegion, - "-moz-margin-end"?: Property$MarginInlineEnd<TLength>, - "-moz-margin-start"?: Property$MarginInlineStart<TLength>, - "-moz-orient"?: Property$MozOrient, - "-moz-osx-font-smoothing"?: Property$FontSmooth<TLength>, - "-moz-outline-radius-bottomleft"?: Property$MozOutlineRadiusBottomleft<TLength>, - "-moz-outline-radius-bottomright"?: Property$MozOutlineRadiusBottomright<TLength>, - "-moz-outline-radius-topleft"?: Property$MozOutlineRadiusTopleft<TLength>, - "-moz-outline-radius-topright"?: Property$MozOutlineRadiusTopright<TLength>, - "-moz-padding-end"?: Property$PaddingInlineEnd<TLength>, - "-moz-padding-start"?: Property$PaddingInlineStart<TLength>, - "-moz-stack-sizing"?: Property$MozStackSizing, - "-moz-tab-size"?: Property$TabSize<TLength>, - "-moz-text-blink"?: Property$MozTextBlink, - "-moz-text-size-adjust"?: Property$TextSizeAdjust, - "-moz-user-focus"?: Property$MozUserFocus, - "-moz-user-modify"?: Property$MozUserModify, - "-moz-user-select"?: Property$UserSelect, - "-moz-window-dragging"?: Property$MozWindowDragging, - "-moz-window-shadow"?: Property$MozWindowShadow, - "-ms-accelerator"?: Property$MsAccelerator, - "-ms-block-progression"?: Property$MsBlockProgression, - "-ms-content-zoom-chaining"?: Property$MsContentZoomChaining, - "-ms-content-zoom-limit-max"?: Property$MsContentZoomLimitMax, - "-ms-content-zoom-limit-min"?: Property$MsContentZoomLimitMin, - "-ms-content-zoom-snap-points"?: Property$MsContentZoomSnapPoints, - "-ms-content-zoom-snap-type"?: Property$MsContentZoomSnapType, - "-ms-content-zooming"?: Property$MsContentZooming, - "-ms-filter"?: Property$MsFilter, - "-ms-flex-direction"?: Property$FlexDirection, - "-ms-flex-positive"?: Property$FlexGrow, - "-ms-flow-from"?: Property$MsFlowFrom, - "-ms-flow-into"?: Property$MsFlowInto, - "-ms-grid-columns"?: Property$MsGridColumns<TLength>, - "-ms-grid-rows"?: Property$MsGridRows<TLength>, - "-ms-high-contrast-adjust"?: Property$MsHighContrastAdjust, - "-ms-hyphenate-limit-chars"?: Property$MsHyphenateLimitChars, - "-ms-hyphenate-limit-lines"?: Property$MsHyphenateLimitLines, - "-ms-hyphenate-limit-zone"?: Property$MsHyphenateLimitZone<TLength>, - "-ms-hyphens"?: Property$Hyphens, - "-ms-ime-align"?: Property$MsImeAlign, - "-ms-line-break"?: Property$LineBreak, - "-ms-order"?: Property$Order, - "-ms-overflow-style"?: Property$MsOverflowStyle, - "-ms-overflow-x"?: Property$OverflowX, - "-ms-overflow-y"?: Property$OverflowY, - "-ms-scroll-chaining"?: Property$MsScrollChaining, - "-ms-scroll-limit-x-max"?: Property$MsScrollLimitXMax<TLength>, - "-ms-scroll-limit-x-min"?: Property$MsScrollLimitXMin<TLength>, - "-ms-scroll-limit-y-max"?: Property$MsScrollLimitYMax<TLength>, - "-ms-scroll-limit-y-min"?: Property$MsScrollLimitYMin<TLength>, - "-ms-scroll-rails"?: Property$MsScrollRails, - "-ms-scroll-snap-points-x"?: Property$MsScrollSnapPointsX, - "-ms-scroll-snap-points-y"?: Property$MsScrollSnapPointsY, - "-ms-scroll-snap-type"?: Property$MsScrollSnapType, - "-ms-scroll-translation"?: Property$MsScrollTranslation, - "-ms-scrollbar-3dlight-color"?: Property$MsScrollbar3dlightColor, - "-ms-scrollbar-arrow-color"?: Property$MsScrollbarArrowColor, - "-ms-scrollbar-base-color"?: Property$MsScrollbarBaseColor, - "-ms-scrollbar-darkshadow-color"?: Property$MsScrollbarDarkshadowColor, - "-ms-scrollbar-face-color"?: Property$MsScrollbarFaceColor, - "-ms-scrollbar-highlight-color"?: Property$MsScrollbarHighlightColor, - "-ms-scrollbar-shadow-color"?: Property$MsScrollbarShadowColor, - "-ms-scrollbar-track-color"?: Property$MsScrollbarTrackColor, - "-ms-text-autospace"?: Property$MsTextAutospace, - "-ms-text-combine-horizontal"?: Property$TextCombineUpright, - "-ms-text-overflow"?: Property$TextOverflow, - "-ms-touch-action"?: Property$TouchAction, - "-ms-touch-select"?: Property$MsTouchSelect, - "-ms-transform"?: Property$Transform, - "-ms-transform-origin"?: Property$TransformOrigin<TLength>, - "-ms-transition-delay"?: Property$TransitionDelay<TTime>, - "-ms-transition-duration"?: Property$TransitionDuration<TTime>, - "-ms-transition-property"?: Property$TransitionProperty, - "-ms-transition-timing-function"?: Property$TransitionTimingFunction, - "-ms-user-select"?: Property$MsUserSelect, - "-ms-word-break"?: Property$WordBreak, - "-ms-wrap-flow"?: Property$MsWrapFlow, - "-ms-wrap-margin"?: Property$MsWrapMargin<TLength>, - "-ms-wrap-through"?: Property$MsWrapThrough, - "-ms-writing-mode"?: Property$WritingMode, - "-webkit-align-content"?: Property$AlignContent, - "-webkit-align-items"?: Property$AlignItems, - "-webkit-align-self"?: Property$AlignSelf, - "-webkit-animation-delay"?: Property$AnimationDelay<TTime>, - "-webkit-animation-direction"?: Property$AnimationDirection, - "-webkit-animation-duration"?: Property$AnimationDuration<TTime>, - "-webkit-animation-fill-mode"?: Property$AnimationFillMode, - "-webkit-animation-iteration-count"?: Property$AnimationIterationCount, - "-webkit-animation-name"?: Property$AnimationName, - "-webkit-animation-play-state"?: Property$AnimationPlayState, - "-webkit-animation-timing-function"?: Property$AnimationTimingFunction, - "-webkit-appearance"?: Property$WebkitAppearance, - "-webkit-backdrop-filter"?: Property$BackdropFilter, - "-webkit-backface-visibility"?: Property$BackfaceVisibility, - "-webkit-background-clip"?: Property$BackgroundClip, - "-webkit-background-origin"?: Property$BackgroundOrigin, - "-webkit-background-size"?: Property$BackgroundSize<TLength>, - "-webkit-border-before-color"?: Property$WebkitBorderBeforeColor, - "-webkit-border-before-style"?: Property$WebkitBorderBeforeStyle, - "-webkit-border-before-width"?: Property$WebkitBorderBeforeWidth<TLength>, - "-webkit-border-bottom-left-radius"?: Property$BorderBottomLeftRadius<TLength>, - "-webkit-border-bottom-right-radius"?: Property$BorderBottomRightRadius<TLength>, - "-webkit-border-image-slice"?: Property$BorderImageSlice, - "-webkit-border-top-left-radius"?: Property$BorderTopLeftRadius<TLength>, - "-webkit-border-top-right-radius"?: Property$BorderTopRightRadius<TLength>, - "-webkit-box-decoration-break"?: Property$BoxDecorationBreak, - "-webkit-box-reflect"?: Property$WebkitBoxReflect<TLength>, - "-webkit-box-shadow"?: Property$BoxShadow, - "-webkit-box-sizing"?: Property$BoxSizing, - "-webkit-clip-path"?: Property$ClipPath, - "-webkit-column-count"?: Property$ColumnCount, - "-webkit-column-fill"?: Property$ColumnFill, - "-webkit-column-rule-color"?: Property$ColumnRuleColor, - "-webkit-column-rule-style"?: Property$ColumnRuleStyle, - "-webkit-column-rule-width"?: Property$ColumnRuleWidth<TLength>, - "-webkit-column-span"?: Property$ColumnSpan, - "-webkit-column-width"?: Property$ColumnWidth<TLength>, - "-webkit-filter"?: Property$Filter, - "-webkit-flex-basis"?: Property$FlexBasis<TLength>, - "-webkit-flex-direction"?: Property$FlexDirection, - "-webkit-flex-grow"?: Property$FlexGrow, - "-webkit-flex-shrink"?: Property$FlexShrink, - "-webkit-flex-wrap"?: Property$FlexWrap, - "-webkit-font-feature-settings"?: Property$FontFeatureSettings, - "-webkit-font-kerning"?: Property$FontKerning, - "-webkit-font-smoothing"?: Property$FontSmooth<TLength>, - "-webkit-font-variant-ligatures"?: Property$FontVariantLigatures, - "-webkit-hyphenate-character"?: Property$HyphenateCharacter, - "-webkit-hyphens"?: Property$Hyphens, - "-webkit-initial-letter"?: Property$InitialLetter, - "-webkit-justify-content"?: Property$JustifyContent, - "-webkit-line-break"?: Property$LineBreak, - "-webkit-line-clamp"?: Property$WebkitLineClamp, - "-webkit-margin-end"?: Property$MarginInlineEnd<TLength>, - "-webkit-margin-start"?: Property$MarginInlineStart<TLength>, - "-webkit-mask-attachment"?: Property$WebkitMaskAttachment, - "-webkit-mask-box-image-outset"?: Property$MaskBorderOutset<TLength>, - "-webkit-mask-box-image-repeat"?: Property$MaskBorderRepeat, - "-webkit-mask-box-image-slice"?: Property$MaskBorderSlice, - "-webkit-mask-box-image-source"?: Property$MaskBorderSource, - "-webkit-mask-box-image-width"?: Property$MaskBorderWidth<TLength>, - "-webkit-mask-clip"?: Property$WebkitMaskClip, - "-webkit-mask-composite"?: Property$WebkitMaskComposite, - "-webkit-mask-image"?: Property$WebkitMaskImage, - "-webkit-mask-origin"?: Property$WebkitMaskOrigin, - "-webkit-mask-position"?: Property$WebkitMaskPosition<TLength>, - "-webkit-mask-position-x"?: Property$WebkitMaskPositionX<TLength>, - "-webkit-mask-position-y"?: Property$WebkitMaskPositionY<TLength>, - "-webkit-mask-repeat"?: Property$WebkitMaskRepeat, - "-webkit-mask-repeat-x"?: Property$WebkitMaskRepeatX, - "-webkit-mask-repeat-y"?: Property$WebkitMaskRepeatY, - "-webkit-mask-size"?: Property$WebkitMaskSize<TLength>, - "-webkit-max-inline-size"?: Property$MaxInlineSize<TLength>, - "-webkit-order"?: Property$Order, - "-webkit-overflow-scrolling"?: Property$WebkitOverflowScrolling, - "-webkit-padding-end"?: Property$PaddingInlineEnd<TLength>, - "-webkit-padding-start"?: Property$PaddingInlineStart<TLength>, - "-webkit-perspective"?: Property$Perspective<TLength>, - "-webkit-perspective-origin"?: Property$PerspectiveOrigin<TLength>, - "-webkit-print-color-adjust"?: Property$PrintColorAdjust, - "-webkit-ruby-position"?: Property$RubyPosition, - "-webkit-scroll-snap-type"?: Property$ScrollSnapType, - "-webkit-shape-margin"?: Property$ShapeMargin<TLength>, - "-webkit-tap-highlight-color"?: Property$WebkitTapHighlightColor, - "-webkit-text-combine"?: Property$TextCombineUpright, - "-webkit-text-decoration-color"?: Property$TextDecorationColor, - "-webkit-text-decoration-line"?: Property$TextDecorationLine, - "-webkit-text-decoration-skip"?: Property$TextDecorationSkip, - "-webkit-text-decoration-style"?: Property$TextDecorationStyle, - "-webkit-text-emphasis-color"?: Property$TextEmphasisColor, - "-webkit-text-emphasis-position"?: Property$TextEmphasisPosition, - "-webkit-text-emphasis-style"?: Property$TextEmphasisStyle, - "-webkit-text-fill-color"?: Property$WebkitTextFillColor, - "-webkit-text-orientation"?: Property$TextOrientation, - "-webkit-text-size-adjust"?: Property$TextSizeAdjust, - "-webkit-text-stroke-color"?: Property$WebkitTextStrokeColor, - "-webkit-text-stroke-width"?: Property$WebkitTextStrokeWidth<TLength>, - "-webkit-text-underline-position"?: Property$TextUnderlinePosition, - "-webkit-touch-callout"?: Property$WebkitTouchCallout, - "-webkit-transform"?: Property$Transform, - "-webkit-transform-origin"?: Property$TransformOrigin<TLength>, - "-webkit-transform-style"?: Property$TransformStyle, - "-webkit-transition-delay"?: Property$TransitionDelay<TTime>, - "-webkit-transition-duration"?: Property$TransitionDuration<TTime>, - "-webkit-transition-property"?: Property$TransitionProperty, - "-webkit-transition-timing-function"?: Property$TransitionTimingFunction, - "-webkit-user-modify"?: Property$WebkitUserModify, - "-webkit-user-select"?: Property$UserSelect, - "-webkit-writing-mode"?: Property$WritingMode, -|}; - -export type VendorShorthandPropertiesHyphen<TLength = string | 0, TTime = string> = {| - "-moz-animation"?: Property$Animation<TTime>, - "-moz-border-image"?: Property$BorderImage, - "-moz-column-rule"?: Property$ColumnRule<TLength>, - "-moz-columns"?: Property$Columns<TLength>, - "-moz-outline-radius"?: Property$MozOutlineRadius<TLength>, - "-ms-content-zoom-limit"?: Property$MsContentZoomLimit, - "-ms-content-zoom-snap"?: Property$MsContentZoomSnap, - "-ms-flex"?: Property$Flex<TLength>, - "-ms-scroll-limit"?: Property$MsScrollLimit, - "-ms-scroll-snap-x"?: Property$MsScrollSnapX, - "-ms-scroll-snap-y"?: Property$MsScrollSnapY, - "-ms-transition"?: Property$Transition<TTime>, - "-webkit-animation"?: Property$Animation<TTime>, - "-webkit-border-before"?: Property$WebkitBorderBefore<TLength>, - "-webkit-border-image"?: Property$BorderImage, - "-webkit-border-radius"?: Property$BorderRadius<TLength>, - "-webkit-column-rule"?: Property$ColumnRule<TLength>, - "-webkit-columns"?: Property$Columns<TLength>, - "-webkit-flex"?: Property$Flex<TLength>, - "-webkit-flex-flow"?: Property$FlexFlow, - "-webkit-mask"?: Property$WebkitMask<TLength>, - "-webkit-mask-box-image"?: Property$MaskBorder, - "-webkit-text-emphasis"?: Property$TextEmphasis, - "-webkit-text-stroke"?: Property$WebkitTextStroke<TLength>, - "-webkit-transition"?: Property$Transition<TTime>, -|}; - -export type VendorPropertiesHyphen<TLength = string | 0, TTime = string> = {| - ...VendorLonghandPropertiesHyphen<TLength, TTime>, - ...VendorShorthandPropertiesHyphen<TLength, TTime>, -|}; - -export type ObsoletePropertiesHyphen<TLength = string | 0, TTime = string> = {| - azimuth?: Property$Azimuth, - "box-align"?: Property$BoxAlign, - "box-direction"?: Property$BoxDirection, - "box-flex"?: Property$BoxFlex, - "box-flex-group"?: Property$BoxFlexGroup, - "box-lines"?: Property$BoxLines, - "box-ordinal-group"?: Property$BoxOrdinalGroup, - "box-orient"?: Property$BoxOrient, - "box-pack"?: Property$BoxPack, - clip?: Property$Clip, - "grid-column-gap"?: Property$GridColumnGap<TLength>, - "grid-gap"?: Property$GridGap<TLength>, - "grid-row-gap"?: Property$GridRowGap<TLength>, - "ime-mode"?: Property$ImeMode, - "offset-block"?: Property$InsetBlock<TLength>, - "offset-block-end"?: Property$InsetBlockEnd<TLength>, - "offset-block-start"?: Property$InsetBlockStart<TLength>, - "offset-inline"?: Property$InsetInline<TLength>, - "offset-inline-end"?: Property$InsetInlineEnd<TLength>, - "offset-inline-start"?: Property$InsetInlineStart<TLength>, - "scroll-snap-coordinate"?: Property$ScrollSnapCoordinate<TLength>, - "scroll-snap-destination"?: Property$ScrollSnapDestination<TLength>, - "scroll-snap-points-x"?: Property$ScrollSnapPointsX, - "scroll-snap-points-y"?: Property$ScrollSnapPointsY, - "scroll-snap-type-x"?: Property$ScrollSnapTypeX, - "scroll-snap-type-y"?: Property$ScrollSnapTypeY, - "-khtml-box-align"?: Property$BoxAlign, - "-khtml-box-direction"?: Property$BoxDirection, - "-khtml-box-flex"?: Property$BoxFlex, - "-khtml-box-flex-group"?: Property$BoxFlexGroup, - "-khtml-box-lines"?: Property$BoxLines, - "-khtml-box-ordinal-group"?: Property$BoxOrdinalGroup, - "-khtml-box-orient"?: Property$BoxOrient, - "-khtml-box-pack"?: Property$BoxPack, - "-khtml-line-break"?: Property$LineBreak, - "-khtml-opacity"?: Property$Opacity, - "-khtml-user-select"?: Property$UserSelect, - "-moz-backface-visibility"?: Property$BackfaceVisibility, - "-moz-background-clip"?: Property$BackgroundClip, - "-moz-background-inline-policy"?: Property$BoxDecorationBreak, - "-moz-background-origin"?: Property$BackgroundOrigin, - "-moz-background-size"?: Property$BackgroundSize<TLength>, - "-moz-border-radius"?: Property$BorderRadius<TLength>, - "-moz-border-radius-bottomleft"?: Property$BorderBottomLeftRadius<TLength>, - "-moz-border-radius-bottomright"?: Property$BorderBottomRightRadius<TLength>, - "-moz-border-radius-topleft"?: Property$BorderTopLeftRadius<TLength>, - "-moz-border-radius-topright"?: Property$BorderTopRightRadius<TLength>, - "-moz-box-align"?: Property$BoxAlign, - "-moz-box-direction"?: Property$BoxDirection, - "-moz-box-flex"?: Property$BoxFlex, - "-moz-box-ordinal-group"?: Property$BoxOrdinalGroup, - "-moz-box-orient"?: Property$BoxOrient, - "-moz-box-pack"?: Property$BoxPack, - "-moz-box-shadow"?: Property$BoxShadow, - "-moz-float-edge"?: Property$MozFloatEdge, - "-moz-force-broken-image-icon"?: Property$MozForceBrokenImageIcon, - "-moz-opacity"?: Property$Opacity, - "-moz-outline"?: Property$Outline<TLength>, - "-moz-outline-color"?: Property$OutlineColor, - "-moz-outline-style"?: Property$OutlineStyle, - "-moz-outline-width"?: Property$OutlineWidth<TLength>, - "-moz-perspective"?: Property$Perspective<TLength>, - "-moz-perspective-origin"?: Property$PerspectiveOrigin<TLength>, - "-moz-text-align-last"?: Property$TextAlignLast, - "-moz-text-decoration-color"?: Property$TextDecorationColor, - "-moz-text-decoration-line"?: Property$TextDecorationLine, - "-moz-text-decoration-style"?: Property$TextDecorationStyle, - "-moz-transform"?: Property$Transform, - "-moz-transform-origin"?: Property$TransformOrigin<TLength>, - "-moz-transform-style"?: Property$TransformStyle, - "-moz-transition"?: Property$Transition<TTime>, - "-moz-transition-delay"?: Property$TransitionDelay<TTime>, - "-moz-transition-duration"?: Property$TransitionDuration<TTime>, - "-moz-transition-property"?: Property$TransitionProperty, - "-moz-transition-timing-function"?: Property$TransitionTimingFunction, - "-moz-user-input"?: Property$MozUserInput, - "-ms-ime-mode"?: Property$ImeMode, - "-o-animation"?: Property$Animation<TTime>, - "-o-animation-delay"?: Property$AnimationDelay<TTime>, - "-o-animation-direction"?: Property$AnimationDirection, - "-o-animation-duration"?: Property$AnimationDuration<TTime>, - "-o-animation-fill-mode"?: Property$AnimationFillMode, - "-o-animation-iteration-count"?: Property$AnimationIterationCount, - "-o-animation-name"?: Property$AnimationName, - "-o-animation-play-state"?: Property$AnimationPlayState, - "-o-animation-timing-function"?: Property$AnimationTimingFunction, - "-o-background-size"?: Property$BackgroundSize<TLength>, - "-o-border-image"?: Property$BorderImage, - "-o-object-fit"?: Property$ObjectFit, - "-o-object-position"?: Property$ObjectPosition<TLength>, - "-o-tab-size"?: Property$TabSize<TLength>, - "-o-text-overflow"?: Property$TextOverflow, - "-o-transform"?: Property$Transform, - "-o-transform-origin"?: Property$TransformOrigin<TLength>, - "-o-transition"?: Property$Transition<TTime>, - "-o-transition-delay"?: Property$TransitionDelay<TTime>, - "-o-transition-duration"?: Property$TransitionDuration<TTime>, - "-o-transition-property"?: Property$TransitionProperty, - "-o-transition-timing-function"?: Property$TransitionTimingFunction, - "-webkit-box-align"?: Property$BoxAlign, - "-webkit-box-direction"?: Property$BoxDirection, - "-webkit-box-flex"?: Property$BoxFlex, - "-webkit-box-flex-group"?: Property$BoxFlexGroup, - "-webkit-box-lines"?: Property$BoxLines, - "-webkit-box-ordinal-group"?: Property$BoxOrdinalGroup, - "-webkit-box-orient"?: Property$BoxOrient, - "-webkit-box-pack"?: Property$BoxPack, -|}; - -export type SvgPropertiesHyphen<TLength = string | 0, TTime = string> = {| - "alignment-baseline"?: Property$AlignmentBaseline, - "baseline-shift"?: Property$BaselineShift<TLength>, - clip?: Property$Clip, - "clip-path"?: Property$ClipPath, - "clip-rule"?: Property$ClipRule, - color?: Property$Color, - "color-interpolation"?: Property$ColorInterpolation, - "color-rendering"?: Property$ColorRendering, - cursor?: Property$Cursor, - direction?: Property$Direction, - display?: Property$Display, - "dominant-baseline"?: Property$DominantBaseline, - fill?: Property$Fill, - "fill-opacity"?: Property$FillOpacity, - "fill-rule"?: Property$FillRule, - filter?: Property$Filter, - "flood-color"?: Property$FloodColor, - "flood-opacity"?: Property$FloodOpacity, - font?: Property$Font, - "font-family"?: Property$FontFamily, - "font-size"?: Property$FontSize<TLength>, - "font-size-adjust"?: Property$FontSizeAdjust, - "font-stretch"?: Property$FontStretch, - "font-style"?: Property$FontStyle, - "font-variant"?: Property$FontVariant, - "font-weight"?: Property$FontWeight, - "glyph-orientation-vertical"?: Property$GlyphOrientationVertical, - "image-rendering"?: Property$ImageRendering, - "letter-spacing"?: Property$LetterSpacing<TLength>, - "lighting-color"?: Property$LightingColor, - "line-height"?: Property$LineHeight<TLength>, - marker?: Property$Marker, - "marker-end"?: Property$MarkerEnd, - "marker-mid"?: Property$MarkerMid, - "marker-start"?: Property$MarkerStart, - mask?: Property$Mask<TLength>, - opacity?: Property$Opacity, - overflow?: Property$Overflow, - "paint-order"?: Property$PaintOrder, - "pointer-events"?: Property$PointerEvents, - "shape-rendering"?: Property$ShapeRendering, - "stop-color"?: Property$StopColor, - "stop-opacity"?: Property$StopOpacity, - stroke?: Property$Stroke, - "stroke-dasharray"?: Property$StrokeDasharray<TLength>, - "stroke-dashoffset"?: Property$StrokeDashoffset<TLength>, - "stroke-linecap"?: Property$StrokeLinecap, - "stroke-linejoin"?: Property$StrokeLinejoin, - "stroke-miterlimit"?: Property$StrokeMiterlimit, - "stroke-opacity"?: Property$StrokeOpacity, - "stroke-width"?: Property$StrokeWidth<TLength>, - "text-anchor"?: Property$TextAnchor, - "text-decoration"?: Property$TextDecoration<TLength>, - "text-rendering"?: Property$TextRendering, - "unicode-bidi"?: Property$UnicodeBidi, - "vector-effect"?: Property$VectorEffect, - visibility?: Property$Visibility, - "white-space"?: Property$WhiteSpace, - "word-spacing"?: Property$WordSpacing<TLength>, - "writing-mode"?: Property$WritingMode, -|}; - -export type PropertiesHyphen<TLength = string | 0, TTime = string> = {| - ...StandardPropertiesHyphen<TLength, TTime>, - ...VendorPropertiesHyphen<TLength, TTime>, - ...ObsoletePropertiesHyphen<TLength, TTime>, - ...SvgPropertiesHyphen<TLength, TTime>, -|}; - -export type StandardLonghandPropertiesFallback<TLength = string | 0, TTime = string> = {| - accentColor?: Property$AccentColor | Array<Property$AccentColor>, - alignContent?: Property$AlignContent | Array<Property$AlignContent>, - alignItems?: Property$AlignItems | Array<Property$AlignItems>, - alignSelf?: Property$AlignSelf | Array<Property$AlignSelf>, - alignTracks?: Property$AlignTracks | Array<Property$AlignTracks>, - animationComposition?: Property$AnimationComposition | Array<Property$AnimationComposition>, - animationDelay?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, - animationDirection?: Property$AnimationDirection | Array<Property$AnimationDirection>, - animationDuration?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, - animationFillMode?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, - animationIterationCount?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, - animationName?: Property$AnimationName | Array<Property$AnimationName>, - animationPlayState?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, - animationRangeEnd?: Property$AnimationRangeEnd<TLength> | Array<Property$AnimationRangeEnd<TLength>>, - animationRangeStart?: Property$AnimationRangeStart<TLength> | Array<Property$AnimationRangeStart<TLength>>, - animationTimeline?: Property$AnimationTimeline | Array<Property$AnimationTimeline>, - animationTimingFunction?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, - appearance?: Property$Appearance | Array<Property$Appearance>, - aspectRatio?: Property$AspectRatio | Array<Property$AspectRatio>, - backdropFilter?: Property$BackdropFilter | Array<Property$BackdropFilter>, - backfaceVisibility?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, - backgroundAttachment?: Property$BackgroundAttachment | Array<Property$BackgroundAttachment>, - backgroundBlendMode?: Property$BackgroundBlendMode | Array<Property$BackgroundBlendMode>, - backgroundClip?: Property$BackgroundClip | Array<Property$BackgroundClip>, - backgroundColor?: Property$BackgroundColor | Array<Property$BackgroundColor>, - backgroundImage?: Property$BackgroundImage | Array<Property$BackgroundImage>, - backgroundOrigin?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, - backgroundPositionX?: Property$BackgroundPositionX<TLength> | Array<Property$BackgroundPositionX<TLength>>, - backgroundPositionY?: Property$BackgroundPositionY<TLength> | Array<Property$BackgroundPositionY<TLength>>, - backgroundRepeat?: Property$BackgroundRepeat | Array<Property$BackgroundRepeat>, - backgroundSize?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, - blockOverflow?: Property$BlockOverflow | Array<Property$BlockOverflow>, - blockSize?: Property$BlockSize<TLength> | Array<Property$BlockSize<TLength>>, - borderBlockColor?: Property$BorderBlockColor | Array<Property$BorderBlockColor>, - borderBlockEndColor?: Property$BorderBlockEndColor | Array<Property$BorderBlockEndColor>, - borderBlockEndStyle?: Property$BorderBlockEndStyle | Array<Property$BorderBlockEndStyle>, - borderBlockEndWidth?: Property$BorderBlockEndWidth<TLength> | Array<Property$BorderBlockEndWidth<TLength>>, - borderBlockStartColor?: Property$BorderBlockStartColor | Array<Property$BorderBlockStartColor>, - borderBlockStartStyle?: Property$BorderBlockStartStyle | Array<Property$BorderBlockStartStyle>, - borderBlockStartWidth?: Property$BorderBlockStartWidth<TLength> | Array<Property$BorderBlockStartWidth<TLength>>, - borderBlockStyle?: Property$BorderBlockStyle | Array<Property$BorderBlockStyle>, - borderBlockWidth?: Property$BorderBlockWidth<TLength> | Array<Property$BorderBlockWidth<TLength>>, - borderBottomColor?: Property$BorderBottomColor | Array<Property$BorderBottomColor>, - borderBottomLeftRadius?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, - borderBottomRightRadius?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, - borderBottomStyle?: Property$BorderBottomStyle | Array<Property$BorderBottomStyle>, - borderBottomWidth?: Property$BorderBottomWidth<TLength> | Array<Property$BorderBottomWidth<TLength>>, - borderCollapse?: Property$BorderCollapse | Array<Property$BorderCollapse>, - borderEndEndRadius?: Property$BorderEndEndRadius<TLength> | Array<Property$BorderEndEndRadius<TLength>>, - borderEndStartRadius?: Property$BorderEndStartRadius<TLength> | Array<Property$BorderEndStartRadius<TLength>>, - borderImageOutset?: Property$BorderImageOutset<TLength> | Array<Property$BorderImageOutset<TLength>>, - borderImageRepeat?: Property$BorderImageRepeat | Array<Property$BorderImageRepeat>, - borderImageSlice?: Property$BorderImageSlice | Array<Property$BorderImageSlice>, - borderImageSource?: Property$BorderImageSource | Array<Property$BorderImageSource>, - borderImageWidth?: Property$BorderImageWidth<TLength> | Array<Property$BorderImageWidth<TLength>>, - borderInlineColor?: Property$BorderInlineColor | Array<Property$BorderInlineColor>, - borderInlineEndColor?: Property$BorderInlineEndColor | Array<Property$BorderInlineEndColor>, - borderInlineEndStyle?: Property$BorderInlineEndStyle | Array<Property$BorderInlineEndStyle>, - borderInlineEndWidth?: Property$BorderInlineEndWidth<TLength> | Array<Property$BorderInlineEndWidth<TLength>>, - borderInlineStartColor?: Property$BorderInlineStartColor | Array<Property$BorderInlineStartColor>, - borderInlineStartStyle?: Property$BorderInlineStartStyle | Array<Property$BorderInlineStartStyle>, - borderInlineStartWidth?: Property$BorderInlineStartWidth<TLength> | Array<Property$BorderInlineStartWidth<TLength>>, - borderInlineStyle?: Property$BorderInlineStyle | Array<Property$BorderInlineStyle>, - borderInlineWidth?: Property$BorderInlineWidth<TLength> | Array<Property$BorderInlineWidth<TLength>>, - borderLeftColor?: Property$BorderLeftColor | Array<Property$BorderLeftColor>, - borderLeftStyle?: Property$BorderLeftStyle | Array<Property$BorderLeftStyle>, - borderLeftWidth?: Property$BorderLeftWidth<TLength> | Array<Property$BorderLeftWidth<TLength>>, - borderRightColor?: Property$BorderRightColor | Array<Property$BorderRightColor>, - borderRightStyle?: Property$BorderRightStyle | Array<Property$BorderRightStyle>, - borderRightWidth?: Property$BorderRightWidth<TLength> | Array<Property$BorderRightWidth<TLength>>, - borderSpacing?: Property$BorderSpacing<TLength> | Array<Property$BorderSpacing<TLength>>, - borderStartEndRadius?: Property$BorderStartEndRadius<TLength> | Array<Property$BorderStartEndRadius<TLength>>, - borderStartStartRadius?: Property$BorderStartStartRadius<TLength> | Array<Property$BorderStartStartRadius<TLength>>, - borderTopColor?: Property$BorderTopColor | Array<Property$BorderTopColor>, - borderTopLeftRadius?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, - borderTopRightRadius?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, - borderTopStyle?: Property$BorderTopStyle | Array<Property$BorderTopStyle>, - borderTopWidth?: Property$BorderTopWidth<TLength> | Array<Property$BorderTopWidth<TLength>>, - bottom?: Property$Bottom<TLength> | Array<Property$Bottom<TLength>>, - boxDecorationBreak?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, - boxShadow?: Property$BoxShadow | Array<Property$BoxShadow>, - boxSizing?: Property$BoxSizing | Array<Property$BoxSizing>, - breakAfter?: Property$BreakAfter | Array<Property$BreakAfter>, - breakBefore?: Property$BreakBefore | Array<Property$BreakBefore>, - breakInside?: Property$BreakInside | Array<Property$BreakInside>, - captionSide?: Property$CaptionSide | Array<Property$CaptionSide>, - caretColor?: Property$CaretColor | Array<Property$CaretColor>, - caretShape?: Property$CaretShape | Array<Property$CaretShape>, - clear?: Property$Clear | Array<Property$Clear>, - clipPath?: Property$ClipPath | Array<Property$ClipPath>, - color?: Property$Color | Array<Property$Color>, - colorAdjust?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, - colorScheme?: Property$ColorScheme | Array<Property$ColorScheme>, - columnCount?: Property$ColumnCount | Array<Property$ColumnCount>, - columnFill?: Property$ColumnFill | Array<Property$ColumnFill>, - columnGap?: Property$ColumnGap<TLength> | Array<Property$ColumnGap<TLength>>, - columnRuleColor?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, - columnRuleStyle?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, - columnRuleWidth?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, - columnSpan?: Property$ColumnSpan | Array<Property$ColumnSpan>, - columnWidth?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, - contain?: Property$Contain | Array<Property$Contain>, - containIntrinsicBlockSize?: Property$ContainIntrinsicBlockSize<TLength> | Array<Property$ContainIntrinsicBlockSize<TLength>>, - containIntrinsicHeight?: Property$ContainIntrinsicHeight<TLength> | Array<Property$ContainIntrinsicHeight<TLength>>, - containIntrinsicInlineSize?: Property$ContainIntrinsicInlineSize<TLength> | Array<Property$ContainIntrinsicInlineSize<TLength>>, - containIntrinsicWidth?: Property$ContainIntrinsicWidth<TLength> | Array<Property$ContainIntrinsicWidth<TLength>>, - containerName?: Property$ContainerName | Array<Property$ContainerName>, - containerType?: Property$ContainerType | Array<Property$ContainerType>, - content?: Property$Content | Array<Property$Content>, - contentVisibility?: Property$ContentVisibility | Array<Property$ContentVisibility>, - counterIncrement?: Property$CounterIncrement | Array<Property$CounterIncrement>, - counterReset?: Property$CounterReset | Array<Property$CounterReset>, - counterSet?: Property$CounterSet | Array<Property$CounterSet>, - cursor?: Property$Cursor | Array<Property$Cursor>, - direction?: Property$Direction | Array<Property$Direction>, - display?: Property$Display | Array<Property$Display>, - emptyCells?: Property$EmptyCells | Array<Property$EmptyCells>, - filter?: Property$Filter | Array<Property$Filter>, - flexBasis?: Property$FlexBasis<TLength> | Array<Property$FlexBasis<TLength>>, - flexDirection?: Property$FlexDirection | Array<Property$FlexDirection>, - flexGrow?: Property$FlexGrow | Array<Property$FlexGrow>, - flexShrink?: Property$FlexShrink | Array<Property$FlexShrink>, - flexWrap?: Property$FlexWrap | Array<Property$FlexWrap>, - float?: Property$Float | Array<Property$Float>, - fontFamily?: Property$FontFamily | Array<Property$FontFamily>, - fontFeatureSettings?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, - fontKerning?: Property$FontKerning | Array<Property$FontKerning>, - fontLanguageOverride?: Property$FontLanguageOverride | Array<Property$FontLanguageOverride>, - fontOpticalSizing?: Property$FontOpticalSizing | Array<Property$FontOpticalSizing>, - fontPalette?: Property$FontPalette | Array<Property$FontPalette>, - fontSize?: Property$FontSize<TLength> | Array<Property$FontSize<TLength>>, - fontSizeAdjust?: Property$FontSizeAdjust | Array<Property$FontSizeAdjust>, - fontSmooth?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, - fontStretch?: Property$FontStretch | Array<Property$FontStretch>, - fontStyle?: Property$FontStyle | Array<Property$FontStyle>, - fontSynthesis?: Property$FontSynthesis | Array<Property$FontSynthesis>, - fontSynthesisPosition?: Property$FontSynthesisPosition | Array<Property$FontSynthesisPosition>, - fontSynthesisSmallCaps?: Property$FontSynthesisSmallCaps | Array<Property$FontSynthesisSmallCaps>, - fontSynthesisStyle?: Property$FontSynthesisStyle | Array<Property$FontSynthesisStyle>, - fontSynthesisWeight?: Property$FontSynthesisWeight | Array<Property$FontSynthesisWeight>, - fontVariant?: Property$FontVariant | Array<Property$FontVariant>, - fontVariantAlternates?: Property$FontVariantAlternates | Array<Property$FontVariantAlternates>, - fontVariantCaps?: Property$FontVariantCaps | Array<Property$FontVariantCaps>, - fontVariantEastAsian?: Property$FontVariantEastAsian | Array<Property$FontVariantEastAsian>, - fontVariantEmoji?: Property$FontVariantEmoji | Array<Property$FontVariantEmoji>, - fontVariantLigatures?: Property$FontVariantLigatures | Array<Property$FontVariantLigatures>, - fontVariantNumeric?: Property$FontVariantNumeric | Array<Property$FontVariantNumeric>, - fontVariantPosition?: Property$FontVariantPosition | Array<Property$FontVariantPosition>, - fontVariationSettings?: Property$FontVariationSettings | Array<Property$FontVariationSettings>, - fontWeight?: Property$FontWeight | Array<Property$FontWeight>, - forcedColorAdjust?: Property$ForcedColorAdjust | Array<Property$ForcedColorAdjust>, - gridAutoColumns?: Property$GridAutoColumns<TLength> | Array<Property$GridAutoColumns<TLength>>, - gridAutoFlow?: Property$GridAutoFlow | Array<Property$GridAutoFlow>, - gridAutoRows?: Property$GridAutoRows<TLength> | Array<Property$GridAutoRows<TLength>>, - gridColumnEnd?: Property$GridColumnEnd | Array<Property$GridColumnEnd>, - gridColumnStart?: Property$GridColumnStart | Array<Property$GridColumnStart>, - gridRowEnd?: Property$GridRowEnd | Array<Property$GridRowEnd>, - gridRowStart?: Property$GridRowStart | Array<Property$GridRowStart>, - gridTemplateAreas?: Property$GridTemplateAreas | Array<Property$GridTemplateAreas>, - gridTemplateColumns?: Property$GridTemplateColumns<TLength> | Array<Property$GridTemplateColumns<TLength>>, - gridTemplateRows?: Property$GridTemplateRows<TLength> | Array<Property$GridTemplateRows<TLength>>, - hangingPunctuation?: Property$HangingPunctuation | Array<Property$HangingPunctuation>, - height?: Property$Height<TLength> | Array<Property$Height<TLength>>, - hyphenateCharacter?: Property$HyphenateCharacter | Array<Property$HyphenateCharacter>, - hyphenateLimitChars?: Property$HyphenateLimitChars | Array<Property$HyphenateLimitChars>, - hyphens?: Property$Hyphens | Array<Property$Hyphens>, - imageOrientation?: Property$ImageOrientation | Array<Property$ImageOrientation>, - imageRendering?: Property$ImageRendering | Array<Property$ImageRendering>, - imageResolution?: Property$ImageResolution | Array<Property$ImageResolution>, - initialLetter?: Property$InitialLetter | Array<Property$InitialLetter>, - inlineSize?: Property$InlineSize<TLength> | Array<Property$InlineSize<TLength>>, - inputSecurity?: Property$InputSecurity | Array<Property$InputSecurity>, - insetBlockEnd?: Property$InsetBlockEnd<TLength> | Array<Property$InsetBlockEnd<TLength>>, - insetBlockStart?: Property$InsetBlockStart<TLength> | Array<Property$InsetBlockStart<TLength>>, - insetInlineEnd?: Property$InsetInlineEnd<TLength> | Array<Property$InsetInlineEnd<TLength>>, - insetInlineStart?: Property$InsetInlineStart<TLength> | Array<Property$InsetInlineStart<TLength>>, - isolation?: Property$Isolation | Array<Property$Isolation>, - justifyContent?: Property$JustifyContent | Array<Property$JustifyContent>, - justifyItems?: Property$JustifyItems | Array<Property$JustifyItems>, - justifySelf?: Property$JustifySelf | Array<Property$JustifySelf>, - justifyTracks?: Property$JustifyTracks | Array<Property$JustifyTracks>, - left?: Property$Left<TLength> | Array<Property$Left<TLength>>, - letterSpacing?: Property$LetterSpacing<TLength> | Array<Property$LetterSpacing<TLength>>, - lineBreak?: Property$LineBreak | Array<Property$LineBreak>, - lineHeight?: Property$LineHeight<TLength> | Array<Property$LineHeight<TLength>>, - lineHeightStep?: Property$LineHeightStep<TLength> | Array<Property$LineHeightStep<TLength>>, - listStyleImage?: Property$ListStyleImage | Array<Property$ListStyleImage>, - listStylePosition?: Property$ListStylePosition | Array<Property$ListStylePosition>, - listStyleType?: Property$ListStyleType | Array<Property$ListStyleType>, - marginBlockEnd?: Property$MarginBlockEnd<TLength> | Array<Property$MarginBlockEnd<TLength>>, - marginBlockStart?: Property$MarginBlockStart<TLength> | Array<Property$MarginBlockStart<TLength>>, - marginBottom?: Property$MarginBottom<TLength> | Array<Property$MarginBottom<TLength>>, - marginInlineEnd?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, - marginInlineStart?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, - marginLeft?: Property$MarginLeft<TLength> | Array<Property$MarginLeft<TLength>>, - marginRight?: Property$MarginRight<TLength> | Array<Property$MarginRight<TLength>>, - marginTop?: Property$MarginTop<TLength> | Array<Property$MarginTop<TLength>>, - marginTrim?: Property$MarginTrim | Array<Property$MarginTrim>, - maskBorderMode?: Property$MaskBorderMode | Array<Property$MaskBorderMode>, - maskBorderOutset?: Property$MaskBorderOutset<TLength> | Array<Property$MaskBorderOutset<TLength>>, - maskBorderRepeat?: Property$MaskBorderRepeat | Array<Property$MaskBorderRepeat>, - maskBorderSlice?: Property$MaskBorderSlice | Array<Property$MaskBorderSlice>, - maskBorderSource?: Property$MaskBorderSource | Array<Property$MaskBorderSource>, - maskBorderWidth?: Property$MaskBorderWidth<TLength> | Array<Property$MaskBorderWidth<TLength>>, - maskClip?: Property$MaskClip | Array<Property$MaskClip>, - maskComposite?: Property$MaskComposite | Array<Property$MaskComposite>, - maskImage?: Property$MaskImage | Array<Property$MaskImage>, - maskMode?: Property$MaskMode | Array<Property$MaskMode>, - maskOrigin?: Property$MaskOrigin | Array<Property$MaskOrigin>, - maskPosition?: Property$MaskPosition<TLength> | Array<Property$MaskPosition<TLength>>, - maskRepeat?: Property$MaskRepeat | Array<Property$MaskRepeat>, - maskSize?: Property$MaskSize<TLength> | Array<Property$MaskSize<TLength>>, - maskType?: Property$MaskType | Array<Property$MaskType>, - masonryAutoFlow?: Property$MasonryAutoFlow | Array<Property$MasonryAutoFlow>, - mathDepth?: Property$MathDepth | Array<Property$MathDepth>, - mathShift?: Property$MathShift | Array<Property$MathShift>, - mathStyle?: Property$MathStyle | Array<Property$MathStyle>, - maxBlockSize?: Property$MaxBlockSize<TLength> | Array<Property$MaxBlockSize<TLength>>, - maxHeight?: Property$MaxHeight<TLength> | Array<Property$MaxHeight<TLength>>, - maxInlineSize?: Property$MaxInlineSize<TLength> | Array<Property$MaxInlineSize<TLength>>, - maxLines?: Property$MaxLines | Array<Property$MaxLines>, - maxWidth?: Property$MaxWidth<TLength> | Array<Property$MaxWidth<TLength>>, - minBlockSize?: Property$MinBlockSize<TLength> | Array<Property$MinBlockSize<TLength>>, - minHeight?: Property$MinHeight<TLength> | Array<Property$MinHeight<TLength>>, - minInlineSize?: Property$MinInlineSize<TLength> | Array<Property$MinInlineSize<TLength>>, - minWidth?: Property$MinWidth<TLength> | Array<Property$MinWidth<TLength>>, - mixBlendMode?: Property$MixBlendMode | Array<Property$MixBlendMode>, - motionDistance?: Property$OffsetDistance<TLength> | Array<Property$OffsetDistance<TLength>>, - motionPath?: Property$OffsetPath | Array<Property$OffsetPath>, - motionRotation?: Property$OffsetRotate | Array<Property$OffsetRotate>, - objectFit?: Property$ObjectFit | Array<Property$ObjectFit>, - objectPosition?: Property$ObjectPosition<TLength> | Array<Property$ObjectPosition<TLength>>, - offsetAnchor?: Property$OffsetAnchor<TLength> | Array<Property$OffsetAnchor<TLength>>, - offsetDistance?: Property$OffsetDistance<TLength> | Array<Property$OffsetDistance<TLength>>, - offsetPath?: Property$OffsetPath | Array<Property$OffsetPath>, - offsetPosition?: Property$OffsetPosition<TLength> | Array<Property$OffsetPosition<TLength>>, - offsetRotate?: Property$OffsetRotate | Array<Property$OffsetRotate>, - offsetRotation?: Property$OffsetRotate | Array<Property$OffsetRotate>, - opacity?: Property$Opacity | Array<Property$Opacity>, - order?: Property$Order | Array<Property$Order>, - orphans?: Property$Orphans | Array<Property$Orphans>, - outlineColor?: Property$OutlineColor | Array<Property$OutlineColor>, - outlineOffset?: Property$OutlineOffset<TLength> | Array<Property$OutlineOffset<TLength>>, - outlineStyle?: Property$OutlineStyle | Array<Property$OutlineStyle>, - outlineWidth?: Property$OutlineWidth<TLength> | Array<Property$OutlineWidth<TLength>>, - overflowAnchor?: Property$OverflowAnchor | Array<Property$OverflowAnchor>, - overflowBlock?: Property$OverflowBlock | Array<Property$OverflowBlock>, - overflowClipBox?: Property$OverflowClipBox | Array<Property$OverflowClipBox>, - overflowClipMargin?: Property$OverflowClipMargin<TLength> | Array<Property$OverflowClipMargin<TLength>>, - overflowInline?: Property$OverflowInline | Array<Property$OverflowInline>, - overflowWrap?: Property$OverflowWrap | Array<Property$OverflowWrap>, - overflowX?: Property$OverflowX | Array<Property$OverflowX>, - overflowY?: Property$OverflowY | Array<Property$OverflowY>, - overlay?: Property$Overlay | Array<Property$Overlay>, - overscrollBehaviorBlock?: Property$OverscrollBehaviorBlock | Array<Property$OverscrollBehaviorBlock>, - overscrollBehaviorInline?: Property$OverscrollBehaviorInline | Array<Property$OverscrollBehaviorInline>, - overscrollBehaviorX?: Property$OverscrollBehaviorX | Array<Property$OverscrollBehaviorX>, - overscrollBehaviorY?: Property$OverscrollBehaviorY | Array<Property$OverscrollBehaviorY>, - paddingBlockEnd?: Property$PaddingBlockEnd<TLength> | Array<Property$PaddingBlockEnd<TLength>>, - paddingBlockStart?: Property$PaddingBlockStart<TLength> | Array<Property$PaddingBlockStart<TLength>>, - paddingBottom?: Property$PaddingBottom<TLength> | Array<Property$PaddingBottom<TLength>>, - paddingInlineEnd?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, - paddingInlineStart?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, - paddingLeft?: Property$PaddingLeft<TLength> | Array<Property$PaddingLeft<TLength>>, - paddingRight?: Property$PaddingRight<TLength> | Array<Property$PaddingRight<TLength>>, - paddingTop?: Property$PaddingTop<TLength> | Array<Property$PaddingTop<TLength>>, - page?: Property$Page | Array<Property$Page>, - pageBreakAfter?: Property$PageBreakAfter | Array<Property$PageBreakAfter>, - pageBreakBefore?: Property$PageBreakBefore | Array<Property$PageBreakBefore>, - pageBreakInside?: Property$PageBreakInside | Array<Property$PageBreakInside>, - paintOrder?: Property$PaintOrder | Array<Property$PaintOrder>, - perspective?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, - perspectiveOrigin?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, - pointerEvents?: Property$PointerEvents | Array<Property$PointerEvents>, - position?: Property$Position | Array<Property$Position>, - printColorAdjust?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, - quotes?: Property$Quotes | Array<Property$Quotes>, - resize?: Property$Resize | Array<Property$Resize>, - right?: Property$Right<TLength> | Array<Property$Right<TLength>>, - rotate?: Property$Rotate | Array<Property$Rotate>, - rowGap?: Property$RowGap<TLength> | Array<Property$RowGap<TLength>>, - rubyAlign?: Property$RubyAlign | Array<Property$RubyAlign>, - rubyMerge?: Property$RubyMerge | Array<Property$RubyMerge>, - rubyPosition?: Property$RubyPosition | Array<Property$RubyPosition>, - scale?: Property$Scale | Array<Property$Scale>, - scrollBehavior?: Property$ScrollBehavior | Array<Property$ScrollBehavior>, - scrollMarginBlockEnd?: Property$ScrollMarginBlockEnd<TLength> | Array<Property$ScrollMarginBlockEnd<TLength>>, - scrollMarginBlockStart?: Property$ScrollMarginBlockStart<TLength> | Array<Property$ScrollMarginBlockStart<TLength>>, - scrollMarginBottom?: Property$ScrollMarginBottom<TLength> | Array<Property$ScrollMarginBottom<TLength>>, - scrollMarginInlineEnd?: Property$ScrollMarginInlineEnd<TLength> | Array<Property$ScrollMarginInlineEnd<TLength>>, - scrollMarginInlineStart?: Property$ScrollMarginInlineStart<TLength> | Array<Property$ScrollMarginInlineStart<TLength>>, - scrollMarginLeft?: Property$ScrollMarginLeft<TLength> | Array<Property$ScrollMarginLeft<TLength>>, - scrollMarginRight?: Property$ScrollMarginRight<TLength> | Array<Property$ScrollMarginRight<TLength>>, - scrollMarginTop?: Property$ScrollMarginTop<TLength> | Array<Property$ScrollMarginTop<TLength>>, - scrollPaddingBlockEnd?: Property$ScrollPaddingBlockEnd<TLength> | Array<Property$ScrollPaddingBlockEnd<TLength>>, - scrollPaddingBlockStart?: Property$ScrollPaddingBlockStart<TLength> | Array<Property$ScrollPaddingBlockStart<TLength>>, - scrollPaddingBottom?: Property$ScrollPaddingBottom<TLength> | Array<Property$ScrollPaddingBottom<TLength>>, - scrollPaddingInlineEnd?: Property$ScrollPaddingInlineEnd<TLength> | Array<Property$ScrollPaddingInlineEnd<TLength>>, - scrollPaddingInlineStart?: Property$ScrollPaddingInlineStart<TLength> | Array<Property$ScrollPaddingInlineStart<TLength>>, - scrollPaddingLeft?: Property$ScrollPaddingLeft<TLength> | Array<Property$ScrollPaddingLeft<TLength>>, - scrollPaddingRight?: Property$ScrollPaddingRight<TLength> | Array<Property$ScrollPaddingRight<TLength>>, - scrollPaddingTop?: Property$ScrollPaddingTop<TLength> | Array<Property$ScrollPaddingTop<TLength>>, - scrollSnapAlign?: Property$ScrollSnapAlign | Array<Property$ScrollSnapAlign>, - scrollSnapMarginBottom?: Property$ScrollMarginBottom<TLength> | Array<Property$ScrollMarginBottom<TLength>>, - scrollSnapMarginLeft?: Property$ScrollMarginLeft<TLength> | Array<Property$ScrollMarginLeft<TLength>>, - scrollSnapMarginRight?: Property$ScrollMarginRight<TLength> | Array<Property$ScrollMarginRight<TLength>>, - scrollSnapMarginTop?: Property$ScrollMarginTop<TLength> | Array<Property$ScrollMarginTop<TLength>>, - scrollSnapStop?: Property$ScrollSnapStop | Array<Property$ScrollSnapStop>, - scrollSnapType?: Property$ScrollSnapType | Array<Property$ScrollSnapType>, - scrollTimelineAxis?: Property$ScrollTimelineAxis | Array<Property$ScrollTimelineAxis>, - scrollTimelineName?: Property$ScrollTimelineName | Array<Property$ScrollTimelineName>, - scrollbarColor?: Property$ScrollbarColor | Array<Property$ScrollbarColor>, - scrollbarGutter?: Property$ScrollbarGutter | Array<Property$ScrollbarGutter>, - scrollbarWidth?: Property$ScrollbarWidth | Array<Property$ScrollbarWidth>, - shapeImageThreshold?: Property$ShapeImageThreshold | Array<Property$ShapeImageThreshold>, - shapeMargin?: Property$ShapeMargin<TLength> | Array<Property$ShapeMargin<TLength>>, - shapeOutside?: Property$ShapeOutside | Array<Property$ShapeOutside>, - tabSize?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, - tableLayout?: Property$TableLayout | Array<Property$TableLayout>, - textAlign?: Property$TextAlign | Array<Property$TextAlign>, - textAlignLast?: Property$TextAlignLast | Array<Property$TextAlignLast>, - textCombineUpright?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, - textDecorationColor?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, - textDecorationLine?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, - textDecorationSkip?: Property$TextDecorationSkip | Array<Property$TextDecorationSkip>, - textDecorationSkipInk?: Property$TextDecorationSkipInk | Array<Property$TextDecorationSkipInk>, - textDecorationStyle?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, - textDecorationThickness?: Property$TextDecorationThickness<TLength> | Array<Property$TextDecorationThickness<TLength>>, - textEmphasisColor?: Property$TextEmphasisColor | Array<Property$TextEmphasisColor>, - textEmphasisPosition?: Property$TextEmphasisPosition | Array<Property$TextEmphasisPosition>, - textEmphasisStyle?: Property$TextEmphasisStyle | Array<Property$TextEmphasisStyle>, - textIndent?: Property$TextIndent<TLength> | Array<Property$TextIndent<TLength>>, - textJustify?: Property$TextJustify | Array<Property$TextJustify>, - textOrientation?: Property$TextOrientation | Array<Property$TextOrientation>, - textOverflow?: Property$TextOverflow | Array<Property$TextOverflow>, - textRendering?: Property$TextRendering | Array<Property$TextRendering>, - textShadow?: Property$TextShadow | Array<Property$TextShadow>, - textSizeAdjust?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, - textTransform?: Property$TextTransform | Array<Property$TextTransform>, - textUnderlineOffset?: Property$TextUnderlineOffset<TLength> | Array<Property$TextUnderlineOffset<TLength>>, - textUnderlinePosition?: Property$TextUnderlinePosition | Array<Property$TextUnderlinePosition>, - textWrap?: Property$TextWrap | Array<Property$TextWrap>, - timelineScope?: Property$TimelineScope | Array<Property$TimelineScope>, - top?: Property$Top<TLength> | Array<Property$Top<TLength>>, - touchAction?: Property$TouchAction | Array<Property$TouchAction>, - transform?: Property$Transform | Array<Property$Transform>, - transformBox?: Property$TransformBox | Array<Property$TransformBox>, - transformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, - transformStyle?: Property$TransformStyle | Array<Property$TransformStyle>, - transitionBehavior?: Property$TransitionBehavior | Array<Property$TransitionBehavior>, - transitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, - transitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, - transitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, - transitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, - translate?: Property$Translate<TLength> | Array<Property$Translate<TLength>>, - unicodeBidi?: Property$UnicodeBidi | Array<Property$UnicodeBidi>, - userSelect?: Property$UserSelect | Array<Property$UserSelect>, - verticalAlign?: Property$VerticalAlign<TLength> | Array<Property$VerticalAlign<TLength>>, - viewTimelineAxis?: Property$ViewTimelineAxis | Array<Property$ViewTimelineAxis>, - viewTimelineInset?: Property$ViewTimelineInset<TLength> | Array<Property$ViewTimelineInset<TLength>>, - viewTimelineName?: Property$ViewTimelineName | Array<Property$ViewTimelineName>, - viewTransitionName?: Property$ViewTransitionName | Array<Property$ViewTransitionName>, - visibility?: Property$Visibility | Array<Property$Visibility>, - whiteSpace?: Property$WhiteSpace | Array<Property$WhiteSpace>, - whiteSpaceCollapse?: Property$WhiteSpaceCollapse | Array<Property$WhiteSpaceCollapse>, - whiteSpaceTrim?: Property$WhiteSpaceTrim | Array<Property$WhiteSpaceTrim>, - widows?: Property$Widows | Array<Property$Widows>, - width?: Property$Width<TLength> | Array<Property$Width<TLength>>, - willChange?: Property$WillChange | Array<Property$WillChange>, - wordBreak?: Property$WordBreak | Array<Property$WordBreak>, - wordSpacing?: Property$WordSpacing<TLength> | Array<Property$WordSpacing<TLength>>, - wordWrap?: Property$WordWrap | Array<Property$WordWrap>, - writingMode?: Property$WritingMode | Array<Property$WritingMode>, - zIndex?: Property$ZIndex | Array<Property$ZIndex>, - zoom?: Property$Zoom | Array<Property$Zoom>, -|}; - -export type StandardShorthandPropertiesFallback<TLength = string | 0, TTime = string> = {| - all?: Property$All | Array<Property$All>, - animation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, - animationRange?: Property$AnimationRange<TLength> | Array<Property$AnimationRange<TLength>>, - background?: Property$Background<TLength> | Array<Property$Background<TLength>>, - backgroundPosition?: Property$BackgroundPosition<TLength> | Array<Property$BackgroundPosition<TLength>>, - border?: Property$Border<TLength> | Array<Property$Border<TLength>>, - borderBlock?: Property$BorderBlock<TLength> | Array<Property$BorderBlock<TLength>>, - borderBlockEnd?: Property$BorderBlockEnd<TLength> | Array<Property$BorderBlockEnd<TLength>>, - borderBlockStart?: Property$BorderBlockStart<TLength> | Array<Property$BorderBlockStart<TLength>>, - borderBottom?: Property$BorderBottom<TLength> | Array<Property$BorderBottom<TLength>>, - borderColor?: Property$BorderColor | Array<Property$BorderColor>, - borderImage?: Property$BorderImage | Array<Property$BorderImage>, - borderInline?: Property$BorderInline<TLength> | Array<Property$BorderInline<TLength>>, - borderInlineEnd?: Property$BorderInlineEnd<TLength> | Array<Property$BorderInlineEnd<TLength>>, - borderInlineStart?: Property$BorderInlineStart<TLength> | Array<Property$BorderInlineStart<TLength>>, - borderLeft?: Property$BorderLeft<TLength> | Array<Property$BorderLeft<TLength>>, - borderRadius?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, - borderRight?: Property$BorderRight<TLength> | Array<Property$BorderRight<TLength>>, - borderStyle?: Property$BorderStyle | Array<Property$BorderStyle>, - borderTop?: Property$BorderTop<TLength> | Array<Property$BorderTop<TLength>>, - borderWidth?: Property$BorderWidth<TLength> | Array<Property$BorderWidth<TLength>>, - caret?: Property$Caret | Array<Property$Caret>, - columnRule?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, - columns?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, - containIntrinsicSize?: Property$ContainIntrinsicSize<TLength> | Array<Property$ContainIntrinsicSize<TLength>>, - container?: Property$Container | Array<Property$Container>, - flex?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, - flexFlow?: Property$FlexFlow | Array<Property$FlexFlow>, - font?: Property$Font | Array<Property$Font>, - gap?: Property$Gap<TLength> | Array<Property$Gap<TLength>>, - grid?: Property$Grid | Array<Property$Grid>, - gridArea?: Property$GridArea | Array<Property$GridArea>, - gridColumn?: Property$GridColumn | Array<Property$GridColumn>, - gridRow?: Property$GridRow | Array<Property$GridRow>, - gridTemplate?: Property$GridTemplate | Array<Property$GridTemplate>, - inset?: Property$Inset<TLength> | Array<Property$Inset<TLength>>, - insetBlock?: Property$InsetBlock<TLength> | Array<Property$InsetBlock<TLength>>, - insetInline?: Property$InsetInline<TLength> | Array<Property$InsetInline<TLength>>, - lineClamp?: Property$LineClamp | Array<Property$LineClamp>, - listStyle?: Property$ListStyle | Array<Property$ListStyle>, - margin?: Property$Margin<TLength> | Array<Property$Margin<TLength>>, - marginBlock?: Property$MarginBlock<TLength> | Array<Property$MarginBlock<TLength>>, - marginInline?: Property$MarginInline<TLength> | Array<Property$MarginInline<TLength>>, - mask?: Property$Mask<TLength> | Array<Property$Mask<TLength>>, - maskBorder?: Property$MaskBorder | Array<Property$MaskBorder>, - motion?: Property$Offset<TLength> | Array<Property$Offset<TLength>>, - offset?: Property$Offset<TLength> | Array<Property$Offset<TLength>>, - outline?: Property$Outline<TLength> | Array<Property$Outline<TLength>>, - overflow?: Property$Overflow | Array<Property$Overflow>, - overscrollBehavior?: Property$OverscrollBehavior | Array<Property$OverscrollBehavior>, - padding?: Property$Padding<TLength> | Array<Property$Padding<TLength>>, - paddingBlock?: Property$PaddingBlock<TLength> | Array<Property$PaddingBlock<TLength>>, - paddingInline?: Property$PaddingInline<TLength> | Array<Property$PaddingInline<TLength>>, - placeContent?: Property$PlaceContent | Array<Property$PlaceContent>, - placeItems?: Property$PlaceItems | Array<Property$PlaceItems>, - placeSelf?: Property$PlaceSelf | Array<Property$PlaceSelf>, - scrollMargin?: Property$ScrollMargin<TLength> | Array<Property$ScrollMargin<TLength>>, - scrollMarginBlock?: Property$ScrollMarginBlock<TLength> | Array<Property$ScrollMarginBlock<TLength>>, - scrollMarginInline?: Property$ScrollMarginInline<TLength> | Array<Property$ScrollMarginInline<TLength>>, - scrollPadding?: Property$ScrollPadding<TLength> | Array<Property$ScrollPadding<TLength>>, - scrollPaddingBlock?: Property$ScrollPaddingBlock<TLength> | Array<Property$ScrollPaddingBlock<TLength>>, - scrollPaddingInline?: Property$ScrollPaddingInline<TLength> | Array<Property$ScrollPaddingInline<TLength>>, - scrollSnapMargin?: Property$ScrollMargin<TLength> | Array<Property$ScrollMargin<TLength>>, - scrollTimeline?: Property$ScrollTimeline | Array<Property$ScrollTimeline>, - textDecoration?: Property$TextDecoration<TLength> | Array<Property$TextDecoration<TLength>>, - textEmphasis?: Property$TextEmphasis | Array<Property$TextEmphasis>, - transition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, - viewTimeline?: Property$ViewTimeline | Array<Property$ViewTimeline>, -|}; - -export type StandardPropertiesFallback<TLength = string | 0, TTime = string> = {| - ...StandardLonghandPropertiesFallback<TLength, TTime>, - ...StandardShorthandPropertiesFallback<TLength, TTime>, -|}; - -export type VendorLonghandPropertiesFallback<TLength = string | 0, TTime = string> = {| - MozAnimationDelay?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, - MozAnimationDirection?: Property$AnimationDirection | Array<Property$AnimationDirection>, - MozAnimationDuration?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, - MozAnimationFillMode?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, - MozAnimationIterationCount?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, - MozAnimationName?: Property$AnimationName | Array<Property$AnimationName>, - MozAnimationPlayState?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, - MozAnimationTimingFunction?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, - MozAppearance?: Property$MozAppearance | Array<Property$MozAppearance>, - MozBinding?: Property$MozBinding | Array<Property$MozBinding>, - MozBorderBottomColors?: Property$MozBorderBottomColors | Array<Property$MozBorderBottomColors>, - MozBorderEndColor?: Property$BorderInlineEndColor | Array<Property$BorderInlineEndColor>, - MozBorderEndStyle?: Property$BorderInlineEndStyle | Array<Property$BorderInlineEndStyle>, - MozBorderEndWidth?: Property$BorderInlineEndWidth<TLength> | Array<Property$BorderInlineEndWidth<TLength>>, - MozBorderLeftColors?: Property$MozBorderLeftColors | Array<Property$MozBorderLeftColors>, - MozBorderRightColors?: Property$MozBorderRightColors | Array<Property$MozBorderRightColors>, - MozBorderStartColor?: Property$BorderInlineStartColor | Array<Property$BorderInlineStartColor>, - MozBorderStartStyle?: Property$BorderInlineStartStyle | Array<Property$BorderInlineStartStyle>, - MozBorderTopColors?: Property$MozBorderTopColors | Array<Property$MozBorderTopColors>, - MozBoxSizing?: Property$BoxSizing | Array<Property$BoxSizing>, - MozColumnCount?: Property$ColumnCount | Array<Property$ColumnCount>, - MozColumnFill?: Property$ColumnFill | Array<Property$ColumnFill>, - MozColumnRuleColor?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, - MozColumnRuleStyle?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, - MozColumnRuleWidth?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, - MozColumnWidth?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, - MozContextProperties?: Property$MozContextProperties | Array<Property$MozContextProperties>, - MozFontFeatureSettings?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, - MozFontLanguageOverride?: Property$FontLanguageOverride | Array<Property$FontLanguageOverride>, - MozHyphens?: Property$Hyphens | Array<Property$Hyphens>, - MozImageRegion?: Property$MozImageRegion | Array<Property$MozImageRegion>, - MozMarginEnd?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, - MozMarginStart?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, - MozOrient?: Property$MozOrient | Array<Property$MozOrient>, - MozOsxFontSmoothing?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, - MozOutlineRadiusBottomleft?: Property$MozOutlineRadiusBottomleft<TLength> | Array<Property$MozOutlineRadiusBottomleft<TLength>>, - MozOutlineRadiusBottomright?: Property$MozOutlineRadiusBottomright<TLength> | Array<Property$MozOutlineRadiusBottomright<TLength>>, - MozOutlineRadiusTopleft?: Property$MozOutlineRadiusTopleft<TLength> | Array<Property$MozOutlineRadiusTopleft<TLength>>, - MozOutlineRadiusTopright?: Property$MozOutlineRadiusTopright<TLength> | Array<Property$MozOutlineRadiusTopright<TLength>>, - MozPaddingEnd?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, - MozPaddingStart?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, - MozStackSizing?: Property$MozStackSizing | Array<Property$MozStackSizing>, - MozTabSize?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, - MozTextBlink?: Property$MozTextBlink | Array<Property$MozTextBlink>, - MozTextSizeAdjust?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, - MozUserFocus?: Property$MozUserFocus | Array<Property$MozUserFocus>, - MozUserModify?: Property$MozUserModify | Array<Property$MozUserModify>, - MozUserSelect?: Property$UserSelect | Array<Property$UserSelect>, - MozWindowDragging?: Property$MozWindowDragging | Array<Property$MozWindowDragging>, - MozWindowShadow?: Property$MozWindowShadow | Array<Property$MozWindowShadow>, - msAccelerator?: Property$MsAccelerator | Array<Property$MsAccelerator>, - msBlockProgression?: Property$MsBlockProgression | Array<Property$MsBlockProgression>, - msContentZoomChaining?: Property$MsContentZoomChaining | Array<Property$MsContentZoomChaining>, - msContentZoomLimitMax?: Property$MsContentZoomLimitMax | Array<Property$MsContentZoomLimitMax>, - msContentZoomLimitMin?: Property$MsContentZoomLimitMin | Array<Property$MsContentZoomLimitMin>, - msContentZoomSnapPoints?: Property$MsContentZoomSnapPoints | Array<Property$MsContentZoomSnapPoints>, - msContentZoomSnapType?: Property$MsContentZoomSnapType | Array<Property$MsContentZoomSnapType>, - msContentZooming?: Property$MsContentZooming | Array<Property$MsContentZooming>, - msFilter?: Property$MsFilter | Array<Property$MsFilter>, - msFlexDirection?: Property$FlexDirection | Array<Property$FlexDirection>, - msFlexPositive?: Property$FlexGrow | Array<Property$FlexGrow>, - msFlowFrom?: Property$MsFlowFrom | Array<Property$MsFlowFrom>, - msFlowInto?: Property$MsFlowInto | Array<Property$MsFlowInto>, - msGridColumns?: Property$MsGridColumns<TLength> | Array<Property$MsGridColumns<TLength>>, - msGridRows?: Property$MsGridRows<TLength> | Array<Property$MsGridRows<TLength>>, - msHighContrastAdjust?: Property$MsHighContrastAdjust | Array<Property$MsHighContrastAdjust>, - msHyphenateLimitChars?: Property$MsHyphenateLimitChars | Array<Property$MsHyphenateLimitChars>, - msHyphenateLimitLines?: Property$MsHyphenateLimitLines | Array<Property$MsHyphenateLimitLines>, - msHyphenateLimitZone?: Property$MsHyphenateLimitZone<TLength> | Array<Property$MsHyphenateLimitZone<TLength>>, - msHyphens?: Property$Hyphens | Array<Property$Hyphens>, - msImeAlign?: Property$MsImeAlign | Array<Property$MsImeAlign>, - msLineBreak?: Property$LineBreak | Array<Property$LineBreak>, - msOrder?: Property$Order | Array<Property$Order>, - msOverflowStyle?: Property$MsOverflowStyle | Array<Property$MsOverflowStyle>, - msOverflowX?: Property$OverflowX | Array<Property$OverflowX>, - msOverflowY?: Property$OverflowY | Array<Property$OverflowY>, - msScrollChaining?: Property$MsScrollChaining | Array<Property$MsScrollChaining>, - msScrollLimitXMax?: Property$MsScrollLimitXMax<TLength> | Array<Property$MsScrollLimitXMax<TLength>>, - msScrollLimitXMin?: Property$MsScrollLimitXMin<TLength> | Array<Property$MsScrollLimitXMin<TLength>>, - msScrollLimitYMax?: Property$MsScrollLimitYMax<TLength> | Array<Property$MsScrollLimitYMax<TLength>>, - msScrollLimitYMin?: Property$MsScrollLimitYMin<TLength> | Array<Property$MsScrollLimitYMin<TLength>>, - msScrollRails?: Property$MsScrollRails | Array<Property$MsScrollRails>, - msScrollSnapPointsX?: Property$MsScrollSnapPointsX | Array<Property$MsScrollSnapPointsX>, - msScrollSnapPointsY?: Property$MsScrollSnapPointsY | Array<Property$MsScrollSnapPointsY>, - msScrollSnapType?: Property$MsScrollSnapType | Array<Property$MsScrollSnapType>, - msScrollTranslation?: Property$MsScrollTranslation | Array<Property$MsScrollTranslation>, - msScrollbar3dlightColor?: Property$MsScrollbar3dlightColor | Array<Property$MsScrollbar3dlightColor>, - msScrollbarArrowColor?: Property$MsScrollbarArrowColor | Array<Property$MsScrollbarArrowColor>, - msScrollbarBaseColor?: Property$MsScrollbarBaseColor | Array<Property$MsScrollbarBaseColor>, - msScrollbarDarkshadowColor?: Property$MsScrollbarDarkshadowColor | Array<Property$MsScrollbarDarkshadowColor>, - msScrollbarFaceColor?: Property$MsScrollbarFaceColor | Array<Property$MsScrollbarFaceColor>, - msScrollbarHighlightColor?: Property$MsScrollbarHighlightColor | Array<Property$MsScrollbarHighlightColor>, - msScrollbarShadowColor?: Property$MsScrollbarShadowColor | Array<Property$MsScrollbarShadowColor>, - msScrollbarTrackColor?: Property$MsScrollbarTrackColor | Array<Property$MsScrollbarTrackColor>, - msTextAutospace?: Property$MsTextAutospace | Array<Property$MsTextAutospace>, - msTextCombineHorizontal?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, - msTextOverflow?: Property$TextOverflow | Array<Property$TextOverflow>, - msTouchAction?: Property$TouchAction | Array<Property$TouchAction>, - msTouchSelect?: Property$MsTouchSelect | Array<Property$MsTouchSelect>, - msTransform?: Property$Transform | Array<Property$Transform>, - msTransformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, - msTransitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, - msTransitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, - msTransitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, - msTransitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, - msUserSelect?: Property$MsUserSelect | Array<Property$MsUserSelect>, - msWordBreak?: Property$WordBreak | Array<Property$WordBreak>, - msWrapFlow?: Property$MsWrapFlow | Array<Property$MsWrapFlow>, - msWrapMargin?: Property$MsWrapMargin<TLength> | Array<Property$MsWrapMargin<TLength>>, - msWrapThrough?: Property$MsWrapThrough | Array<Property$MsWrapThrough>, - msWritingMode?: Property$WritingMode | Array<Property$WritingMode>, - WebkitAlignContent?: Property$AlignContent | Array<Property$AlignContent>, - WebkitAlignItems?: Property$AlignItems | Array<Property$AlignItems>, - WebkitAlignSelf?: Property$AlignSelf | Array<Property$AlignSelf>, - WebkitAnimationDelay?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, - WebkitAnimationDirection?: Property$AnimationDirection | Array<Property$AnimationDirection>, - WebkitAnimationDuration?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, - WebkitAnimationFillMode?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, - WebkitAnimationIterationCount?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, - WebkitAnimationName?: Property$AnimationName | Array<Property$AnimationName>, - WebkitAnimationPlayState?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, - WebkitAnimationTimingFunction?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, - WebkitAppearance?: Property$WebkitAppearance | Array<Property$WebkitAppearance>, - WebkitBackdropFilter?: Property$BackdropFilter | Array<Property$BackdropFilter>, - WebkitBackfaceVisibility?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, - WebkitBackgroundClip?: Property$BackgroundClip | Array<Property$BackgroundClip>, - WebkitBackgroundOrigin?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, - WebkitBackgroundSize?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, - WebkitBorderBeforeColor?: Property$WebkitBorderBeforeColor | Array<Property$WebkitBorderBeforeColor>, - WebkitBorderBeforeStyle?: Property$WebkitBorderBeforeStyle | Array<Property$WebkitBorderBeforeStyle>, - WebkitBorderBeforeWidth?: Property$WebkitBorderBeforeWidth<TLength> | Array<Property$WebkitBorderBeforeWidth<TLength>>, - WebkitBorderBottomLeftRadius?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, - WebkitBorderBottomRightRadius?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, - WebkitBorderImageSlice?: Property$BorderImageSlice | Array<Property$BorderImageSlice>, - WebkitBorderTopLeftRadius?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, - WebkitBorderTopRightRadius?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, - WebkitBoxDecorationBreak?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, - WebkitBoxReflect?: Property$WebkitBoxReflect<TLength> | Array<Property$WebkitBoxReflect<TLength>>, - WebkitBoxShadow?: Property$BoxShadow | Array<Property$BoxShadow>, - WebkitBoxSizing?: Property$BoxSizing | Array<Property$BoxSizing>, - WebkitClipPath?: Property$ClipPath | Array<Property$ClipPath>, - WebkitColumnCount?: Property$ColumnCount | Array<Property$ColumnCount>, - WebkitColumnFill?: Property$ColumnFill | Array<Property$ColumnFill>, - WebkitColumnRuleColor?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, - WebkitColumnRuleStyle?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, - WebkitColumnRuleWidth?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, - WebkitColumnSpan?: Property$ColumnSpan | Array<Property$ColumnSpan>, - WebkitColumnWidth?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, - WebkitFilter?: Property$Filter | Array<Property$Filter>, - WebkitFlexBasis?: Property$FlexBasis<TLength> | Array<Property$FlexBasis<TLength>>, - WebkitFlexDirection?: Property$FlexDirection | Array<Property$FlexDirection>, - WebkitFlexGrow?: Property$FlexGrow | Array<Property$FlexGrow>, - WebkitFlexShrink?: Property$FlexShrink | Array<Property$FlexShrink>, - WebkitFlexWrap?: Property$FlexWrap | Array<Property$FlexWrap>, - WebkitFontFeatureSettings?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, - WebkitFontKerning?: Property$FontKerning | Array<Property$FontKerning>, - WebkitFontSmoothing?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, - WebkitFontVariantLigatures?: Property$FontVariantLigatures | Array<Property$FontVariantLigatures>, - WebkitHyphenateCharacter?: Property$HyphenateCharacter | Array<Property$HyphenateCharacter>, - WebkitHyphens?: Property$Hyphens | Array<Property$Hyphens>, - WebkitInitialLetter?: Property$InitialLetter | Array<Property$InitialLetter>, - WebkitJustifyContent?: Property$JustifyContent | Array<Property$JustifyContent>, - WebkitLineBreak?: Property$LineBreak | Array<Property$LineBreak>, - WebkitLineClamp?: Property$WebkitLineClamp | Array<Property$WebkitLineClamp>, - WebkitMarginEnd?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, - WebkitMarginStart?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, - WebkitMaskAttachment?: Property$WebkitMaskAttachment | Array<Property$WebkitMaskAttachment>, - WebkitMaskBoxImageOutset?: Property$MaskBorderOutset<TLength> | Array<Property$MaskBorderOutset<TLength>>, - WebkitMaskBoxImageRepeat?: Property$MaskBorderRepeat | Array<Property$MaskBorderRepeat>, - WebkitMaskBoxImageSlice?: Property$MaskBorderSlice | Array<Property$MaskBorderSlice>, - WebkitMaskBoxImageSource?: Property$MaskBorderSource | Array<Property$MaskBorderSource>, - WebkitMaskBoxImageWidth?: Property$MaskBorderWidth<TLength> | Array<Property$MaskBorderWidth<TLength>>, - WebkitMaskClip?: Property$WebkitMaskClip | Array<Property$WebkitMaskClip>, - WebkitMaskComposite?: Property$WebkitMaskComposite | Array<Property$WebkitMaskComposite>, - WebkitMaskImage?: Property$WebkitMaskImage | Array<Property$WebkitMaskImage>, - WebkitMaskOrigin?: Property$WebkitMaskOrigin | Array<Property$WebkitMaskOrigin>, - WebkitMaskPosition?: Property$WebkitMaskPosition<TLength> | Array<Property$WebkitMaskPosition<TLength>>, - WebkitMaskPositionX?: Property$WebkitMaskPositionX<TLength> | Array<Property$WebkitMaskPositionX<TLength>>, - WebkitMaskPositionY?: Property$WebkitMaskPositionY<TLength> | Array<Property$WebkitMaskPositionY<TLength>>, - WebkitMaskRepeat?: Property$WebkitMaskRepeat | Array<Property$WebkitMaskRepeat>, - WebkitMaskRepeatX?: Property$WebkitMaskRepeatX | Array<Property$WebkitMaskRepeatX>, - WebkitMaskRepeatY?: Property$WebkitMaskRepeatY | Array<Property$WebkitMaskRepeatY>, - WebkitMaskSize?: Property$WebkitMaskSize<TLength> | Array<Property$WebkitMaskSize<TLength>>, - WebkitMaxInlineSize?: Property$MaxInlineSize<TLength> | Array<Property$MaxInlineSize<TLength>>, - WebkitOrder?: Property$Order | Array<Property$Order>, - WebkitOverflowScrolling?: Property$WebkitOverflowScrolling | Array<Property$WebkitOverflowScrolling>, - WebkitPaddingEnd?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, - WebkitPaddingStart?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, - WebkitPerspective?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, - WebkitPerspectiveOrigin?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, - WebkitPrintColorAdjust?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, - WebkitRubyPosition?: Property$RubyPosition | Array<Property$RubyPosition>, - WebkitScrollSnapType?: Property$ScrollSnapType | Array<Property$ScrollSnapType>, - WebkitShapeMargin?: Property$ShapeMargin<TLength> | Array<Property$ShapeMargin<TLength>>, - WebkitTapHighlightColor?: Property$WebkitTapHighlightColor | Array<Property$WebkitTapHighlightColor>, - WebkitTextCombine?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, - WebkitTextDecorationColor?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, - WebkitTextDecorationLine?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, - WebkitTextDecorationSkip?: Property$TextDecorationSkip | Array<Property$TextDecorationSkip>, - WebkitTextDecorationStyle?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, - WebkitTextEmphasisColor?: Property$TextEmphasisColor | Array<Property$TextEmphasisColor>, - WebkitTextEmphasisPosition?: Property$TextEmphasisPosition | Array<Property$TextEmphasisPosition>, - WebkitTextEmphasisStyle?: Property$TextEmphasisStyle | Array<Property$TextEmphasisStyle>, - WebkitTextFillColor?: Property$WebkitTextFillColor | Array<Property$WebkitTextFillColor>, - WebkitTextOrientation?: Property$TextOrientation | Array<Property$TextOrientation>, - WebkitTextSizeAdjust?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, - WebkitTextStrokeColor?: Property$WebkitTextStrokeColor | Array<Property$WebkitTextStrokeColor>, - WebkitTextStrokeWidth?: Property$WebkitTextStrokeWidth<TLength> | Array<Property$WebkitTextStrokeWidth<TLength>>, - WebkitTextUnderlinePosition?: Property$TextUnderlinePosition | Array<Property$TextUnderlinePosition>, - WebkitTouchCallout?: Property$WebkitTouchCallout | Array<Property$WebkitTouchCallout>, - WebkitTransform?: Property$Transform | Array<Property$Transform>, - WebkitTransformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, - WebkitTransformStyle?: Property$TransformStyle | Array<Property$TransformStyle>, - WebkitTransitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, - WebkitTransitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, - WebkitTransitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, - WebkitTransitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, - WebkitUserModify?: Property$WebkitUserModify | Array<Property$WebkitUserModify>, - WebkitUserSelect?: Property$UserSelect | Array<Property$UserSelect>, - WebkitWritingMode?: Property$WritingMode | Array<Property$WritingMode>, -|}; - -export type VendorShorthandPropertiesFallback<TLength = string | 0, TTime = string> = {| - MozAnimation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, - MozBorderImage?: Property$BorderImage | Array<Property$BorderImage>, - MozColumnRule?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, - MozColumns?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, - MozOutlineRadius?: Property$MozOutlineRadius<TLength> | Array<Property$MozOutlineRadius<TLength>>, - msContentZoomLimit?: Property$MsContentZoomLimit | Array<Property$MsContentZoomLimit>, - msContentZoomSnap?: Property$MsContentZoomSnap | Array<Property$MsContentZoomSnap>, - msFlex?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, - msScrollLimit?: Property$MsScrollLimit | Array<Property$MsScrollLimit>, - msScrollSnapX?: Property$MsScrollSnapX | Array<Property$MsScrollSnapX>, - msScrollSnapY?: Property$MsScrollSnapY | Array<Property$MsScrollSnapY>, - msTransition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, - WebkitAnimation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, - WebkitBorderBefore?: Property$WebkitBorderBefore<TLength> | Array<Property$WebkitBorderBefore<TLength>>, - WebkitBorderImage?: Property$BorderImage | Array<Property$BorderImage>, - WebkitBorderRadius?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, - WebkitColumnRule?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, - WebkitColumns?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, - WebkitFlex?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, - WebkitFlexFlow?: Property$FlexFlow | Array<Property$FlexFlow>, - WebkitMask?: Property$WebkitMask<TLength> | Array<Property$WebkitMask<TLength>>, - WebkitMaskBoxImage?: Property$MaskBorder | Array<Property$MaskBorder>, - WebkitTextEmphasis?: Property$TextEmphasis | Array<Property$TextEmphasis>, - WebkitTextStroke?: Property$WebkitTextStroke<TLength> | Array<Property$WebkitTextStroke<TLength>>, - WebkitTransition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, -|}; - -export type VendorPropertiesFallback<TLength = string | 0, TTime = string> = {| - ...VendorLonghandPropertiesFallback<TLength, TTime>, - ...VendorShorthandPropertiesFallback<TLength, TTime>, -|}; - -export type ObsoletePropertiesFallback<TLength = string | 0, TTime = string> = {| - azimuth?: Property$Azimuth | Array<Property$Azimuth>, - boxAlign?: Property$BoxAlign | Array<Property$BoxAlign>, - boxDirection?: Property$BoxDirection | Array<Property$BoxDirection>, - boxFlex?: Property$BoxFlex | Array<Property$BoxFlex>, - boxFlexGroup?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, - boxLines?: Property$BoxLines | Array<Property$BoxLines>, - boxOrdinalGroup?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, - boxOrient?: Property$BoxOrient | Array<Property$BoxOrient>, - boxPack?: Property$BoxPack | Array<Property$BoxPack>, - clip?: Property$Clip | Array<Property$Clip>, - gridColumnGap?: Property$GridColumnGap<TLength> | Array<Property$GridColumnGap<TLength>>, - gridGap?: Property$GridGap<TLength> | Array<Property$GridGap<TLength>>, - gridRowGap?: Property$GridRowGap<TLength> | Array<Property$GridRowGap<TLength>>, - imeMode?: Property$ImeMode | Array<Property$ImeMode>, - offsetBlock?: Property$InsetBlock<TLength> | Array<Property$InsetBlock<TLength>>, - offsetBlockEnd?: Property$InsetBlockEnd<TLength> | Array<Property$InsetBlockEnd<TLength>>, - offsetBlockStart?: Property$InsetBlockStart<TLength> | Array<Property$InsetBlockStart<TLength>>, - offsetInline?: Property$InsetInline<TLength> | Array<Property$InsetInline<TLength>>, - offsetInlineEnd?: Property$InsetInlineEnd<TLength> | Array<Property$InsetInlineEnd<TLength>>, - offsetInlineStart?: Property$InsetInlineStart<TLength> | Array<Property$InsetInlineStart<TLength>>, - scrollSnapCoordinate?: Property$ScrollSnapCoordinate<TLength> | Array<Property$ScrollSnapCoordinate<TLength>>, - scrollSnapDestination?: Property$ScrollSnapDestination<TLength> | Array<Property$ScrollSnapDestination<TLength>>, - scrollSnapPointsX?: Property$ScrollSnapPointsX | Array<Property$ScrollSnapPointsX>, - scrollSnapPointsY?: Property$ScrollSnapPointsY | Array<Property$ScrollSnapPointsY>, - scrollSnapTypeX?: Property$ScrollSnapTypeX | Array<Property$ScrollSnapTypeX>, - scrollSnapTypeY?: Property$ScrollSnapTypeY | Array<Property$ScrollSnapTypeY>, - KhtmlBoxAlign?: Property$BoxAlign | Array<Property$BoxAlign>, - KhtmlBoxDirection?: Property$BoxDirection | Array<Property$BoxDirection>, - KhtmlBoxFlex?: Property$BoxFlex | Array<Property$BoxFlex>, - KhtmlBoxFlexGroup?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, - KhtmlBoxLines?: Property$BoxLines | Array<Property$BoxLines>, - KhtmlBoxOrdinalGroup?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, - KhtmlBoxOrient?: Property$BoxOrient | Array<Property$BoxOrient>, - KhtmlBoxPack?: Property$BoxPack | Array<Property$BoxPack>, - KhtmlLineBreak?: Property$LineBreak | Array<Property$LineBreak>, - KhtmlOpacity?: Property$Opacity | Array<Property$Opacity>, - KhtmlUserSelect?: Property$UserSelect | Array<Property$UserSelect>, - MozBackfaceVisibility?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, - MozBackgroundClip?: Property$BackgroundClip | Array<Property$BackgroundClip>, - MozBackgroundInlinePolicy?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, - MozBackgroundOrigin?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, - MozBackgroundSize?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, - MozBorderRadius?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, - MozBorderRadiusBottomleft?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, - MozBorderRadiusBottomright?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, - MozBorderRadiusTopleft?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, - MozBorderRadiusTopright?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, - MozBoxAlign?: Property$BoxAlign | Array<Property$BoxAlign>, - MozBoxDirection?: Property$BoxDirection | Array<Property$BoxDirection>, - MozBoxFlex?: Property$BoxFlex | Array<Property$BoxFlex>, - MozBoxOrdinalGroup?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, - MozBoxOrient?: Property$BoxOrient | Array<Property$BoxOrient>, - MozBoxPack?: Property$BoxPack | Array<Property$BoxPack>, - MozBoxShadow?: Property$BoxShadow | Array<Property$BoxShadow>, - MozFloatEdge?: Property$MozFloatEdge | Array<Property$MozFloatEdge>, - MozForceBrokenImageIcon?: Property$MozForceBrokenImageIcon | Array<Property$MozForceBrokenImageIcon>, - MozOpacity?: Property$Opacity | Array<Property$Opacity>, - MozOutline?: Property$Outline<TLength> | Array<Property$Outline<TLength>>, - MozOutlineColor?: Property$OutlineColor | Array<Property$OutlineColor>, - MozOutlineStyle?: Property$OutlineStyle | Array<Property$OutlineStyle>, - MozOutlineWidth?: Property$OutlineWidth<TLength> | Array<Property$OutlineWidth<TLength>>, - MozPerspective?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, - MozPerspectiveOrigin?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, - MozTextAlignLast?: Property$TextAlignLast | Array<Property$TextAlignLast>, - MozTextDecorationColor?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, - MozTextDecorationLine?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, - MozTextDecorationStyle?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, - MozTransform?: Property$Transform | Array<Property$Transform>, - MozTransformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, - MozTransformStyle?: Property$TransformStyle | Array<Property$TransformStyle>, - MozTransition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, - MozTransitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, - MozTransitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, - MozTransitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, - MozTransitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, - MozUserInput?: Property$MozUserInput | Array<Property$MozUserInput>, - msImeMode?: Property$ImeMode | Array<Property$ImeMode>, - OAnimation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, - OAnimationDelay?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, - OAnimationDirection?: Property$AnimationDirection | Array<Property$AnimationDirection>, - OAnimationDuration?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, - OAnimationFillMode?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, - OAnimationIterationCount?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, - OAnimationName?: Property$AnimationName | Array<Property$AnimationName>, - OAnimationPlayState?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, - OAnimationTimingFunction?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, - OBackgroundSize?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, - OBorderImage?: Property$BorderImage | Array<Property$BorderImage>, - OObjectFit?: Property$ObjectFit | Array<Property$ObjectFit>, - OObjectPosition?: Property$ObjectPosition<TLength> | Array<Property$ObjectPosition<TLength>>, - OTabSize?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, - OTextOverflow?: Property$TextOverflow | Array<Property$TextOverflow>, - OTransform?: Property$Transform | Array<Property$Transform>, - OTransformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, - OTransition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, - OTransitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, - OTransitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, - OTransitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, - OTransitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, - WebkitBoxAlign?: Property$BoxAlign | Array<Property$BoxAlign>, - WebkitBoxDirection?: Property$BoxDirection | Array<Property$BoxDirection>, - WebkitBoxFlex?: Property$BoxFlex | Array<Property$BoxFlex>, - WebkitBoxFlexGroup?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, - WebkitBoxLines?: Property$BoxLines | Array<Property$BoxLines>, - WebkitBoxOrdinalGroup?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, - WebkitBoxOrient?: Property$BoxOrient | Array<Property$BoxOrient>, - WebkitBoxPack?: Property$BoxPack | Array<Property$BoxPack>, -|}; - -export type SvgPropertiesFallback<TLength = string | 0, TTime = string> = {| - alignmentBaseline?: Property$AlignmentBaseline | Array<Property$AlignmentBaseline>, - baselineShift?: Property$BaselineShift<TLength> | Array<Property$BaselineShift<TLength>>, - clip?: Property$Clip | Array<Property$Clip>, - clipPath?: Property$ClipPath | Array<Property$ClipPath>, - clipRule?: Property$ClipRule | Array<Property$ClipRule>, - color?: Property$Color | Array<Property$Color>, - colorInterpolation?: Property$ColorInterpolation | Array<Property$ColorInterpolation>, - colorRendering?: Property$ColorRendering | Array<Property$ColorRendering>, - cursor?: Property$Cursor | Array<Property$Cursor>, - direction?: Property$Direction | Array<Property$Direction>, - display?: Property$Display | Array<Property$Display>, - dominantBaseline?: Property$DominantBaseline | Array<Property$DominantBaseline>, - fill?: Property$Fill | Array<Property$Fill>, - fillOpacity?: Property$FillOpacity | Array<Property$FillOpacity>, - fillRule?: Property$FillRule | Array<Property$FillRule>, - filter?: Property$Filter | Array<Property$Filter>, - floodColor?: Property$FloodColor | Array<Property$FloodColor>, - floodOpacity?: Property$FloodOpacity | Array<Property$FloodOpacity>, - font?: Property$Font | Array<Property$Font>, - fontFamily?: Property$FontFamily | Array<Property$FontFamily>, - fontSize?: Property$FontSize<TLength> | Array<Property$FontSize<TLength>>, - fontSizeAdjust?: Property$FontSizeAdjust | Array<Property$FontSizeAdjust>, - fontStretch?: Property$FontStretch | Array<Property$FontStretch>, - fontStyle?: Property$FontStyle | Array<Property$FontStyle>, - fontVariant?: Property$FontVariant | Array<Property$FontVariant>, - fontWeight?: Property$FontWeight | Array<Property$FontWeight>, - glyphOrientationVertical?: Property$GlyphOrientationVertical | Array<Property$GlyphOrientationVertical>, - imageRendering?: Property$ImageRendering | Array<Property$ImageRendering>, - letterSpacing?: Property$LetterSpacing<TLength> | Array<Property$LetterSpacing<TLength>>, - lightingColor?: Property$LightingColor | Array<Property$LightingColor>, - lineHeight?: Property$LineHeight<TLength> | Array<Property$LineHeight<TLength>>, - marker?: Property$Marker | Array<Property$Marker>, - markerEnd?: Property$MarkerEnd | Array<Property$MarkerEnd>, - markerMid?: Property$MarkerMid | Array<Property$MarkerMid>, - markerStart?: Property$MarkerStart | Array<Property$MarkerStart>, - mask?: Property$Mask<TLength> | Array<Property$Mask<TLength>>, - opacity?: Property$Opacity | Array<Property$Opacity>, - overflow?: Property$Overflow | Array<Property$Overflow>, - paintOrder?: Property$PaintOrder | Array<Property$PaintOrder>, - pointerEvents?: Property$PointerEvents | Array<Property$PointerEvents>, - shapeRendering?: Property$ShapeRendering | Array<Property$ShapeRendering>, - stopColor?: Property$StopColor | Array<Property$StopColor>, - stopOpacity?: Property$StopOpacity | Array<Property$StopOpacity>, - stroke?: Property$Stroke | Array<Property$Stroke>, - strokeDasharray?: Property$StrokeDasharray<TLength> | Array<Property$StrokeDasharray<TLength>>, - strokeDashoffset?: Property$StrokeDashoffset<TLength> | Array<Property$StrokeDashoffset<TLength>>, - strokeLinecap?: Property$StrokeLinecap | Array<Property$StrokeLinecap>, - strokeLinejoin?: Property$StrokeLinejoin | Array<Property$StrokeLinejoin>, - strokeMiterlimit?: Property$StrokeMiterlimit | Array<Property$StrokeMiterlimit>, - strokeOpacity?: Property$StrokeOpacity | Array<Property$StrokeOpacity>, - strokeWidth?: Property$StrokeWidth<TLength> | Array<Property$StrokeWidth<TLength>>, - textAnchor?: Property$TextAnchor | Array<Property$TextAnchor>, - textDecoration?: Property$TextDecoration<TLength> | Array<Property$TextDecoration<TLength>>, - textRendering?: Property$TextRendering | Array<Property$TextRendering>, - unicodeBidi?: Property$UnicodeBidi | Array<Property$UnicodeBidi>, - vectorEffect?: Property$VectorEffect | Array<Property$VectorEffect>, - visibility?: Property$Visibility | Array<Property$Visibility>, - whiteSpace?: Property$WhiteSpace | Array<Property$WhiteSpace>, - wordSpacing?: Property$WordSpacing<TLength> | Array<Property$WordSpacing<TLength>>, - writingMode?: Property$WritingMode | Array<Property$WritingMode>, -|}; - -export type PropertiesFallback<TLength = string | 0, TTime = string> = {| - ...StandardPropertiesFallback<TLength, TTime>, - ...VendorPropertiesFallback<TLength, TTime>, - ...ObsoletePropertiesFallback<TLength, TTime>, - ...SvgPropertiesFallback<TLength, TTime>, -|}; - -export type StandardLonghandPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| - "accent-color"?: Property$AccentColor | Array<Property$AccentColor>, - "align-content"?: Property$AlignContent | Array<Property$AlignContent>, - "align-items"?: Property$AlignItems | Array<Property$AlignItems>, - "align-self"?: Property$AlignSelf | Array<Property$AlignSelf>, - "align-tracks"?: Property$AlignTracks | Array<Property$AlignTracks>, - "animation-composition"?: Property$AnimationComposition | Array<Property$AnimationComposition>, - "animation-delay"?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, - "animation-direction"?: Property$AnimationDirection | Array<Property$AnimationDirection>, - "animation-duration"?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, - "animation-fill-mode"?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, - "animation-iteration-count"?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, - "animation-name"?: Property$AnimationName | Array<Property$AnimationName>, - "animation-play-state"?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, - "animation-range-end"?: Property$AnimationRangeEnd<TLength> | Array<Property$AnimationRangeEnd<TLength>>, - "animation-range-start"?: Property$AnimationRangeStart<TLength> | Array<Property$AnimationRangeStart<TLength>>, - "animation-timeline"?: Property$AnimationTimeline | Array<Property$AnimationTimeline>, - "animation-timing-function"?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, - appearance?: Property$Appearance | Array<Property$Appearance>, - "aspect-ratio"?: Property$AspectRatio | Array<Property$AspectRatio>, - "backdrop-filter"?: Property$BackdropFilter | Array<Property$BackdropFilter>, - "backface-visibility"?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, - "background-attachment"?: Property$BackgroundAttachment | Array<Property$BackgroundAttachment>, - "background-blend-mode"?: Property$BackgroundBlendMode | Array<Property$BackgroundBlendMode>, - "background-clip"?: Property$BackgroundClip | Array<Property$BackgroundClip>, - "background-color"?: Property$BackgroundColor | Array<Property$BackgroundColor>, - "background-image"?: Property$BackgroundImage | Array<Property$BackgroundImage>, - "background-origin"?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, - "background-position-x"?: Property$BackgroundPositionX<TLength> | Array<Property$BackgroundPositionX<TLength>>, - "background-position-y"?: Property$BackgroundPositionY<TLength> | Array<Property$BackgroundPositionY<TLength>>, - "background-repeat"?: Property$BackgroundRepeat | Array<Property$BackgroundRepeat>, - "background-size"?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, - "block-overflow"?: Property$BlockOverflow | Array<Property$BlockOverflow>, - "block-size"?: Property$BlockSize<TLength> | Array<Property$BlockSize<TLength>>, - "border-block-color"?: Property$BorderBlockColor | Array<Property$BorderBlockColor>, - "border-block-end-color"?: Property$BorderBlockEndColor | Array<Property$BorderBlockEndColor>, - "border-block-end-style"?: Property$BorderBlockEndStyle | Array<Property$BorderBlockEndStyle>, - "border-block-end-width"?: Property$BorderBlockEndWidth<TLength> | Array<Property$BorderBlockEndWidth<TLength>>, - "border-block-start-color"?: Property$BorderBlockStartColor | Array<Property$BorderBlockStartColor>, - "border-block-start-style"?: Property$BorderBlockStartStyle | Array<Property$BorderBlockStartStyle>, - "border-block-start-width"?: Property$BorderBlockStartWidth<TLength> | Array<Property$BorderBlockStartWidth<TLength>>, - "border-block-style"?: Property$BorderBlockStyle | Array<Property$BorderBlockStyle>, - "border-block-width"?: Property$BorderBlockWidth<TLength> | Array<Property$BorderBlockWidth<TLength>>, - "border-bottom-color"?: Property$BorderBottomColor | Array<Property$BorderBottomColor>, - "border-bottom-left-radius"?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, - "border-bottom-right-radius"?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, - "border-bottom-style"?: Property$BorderBottomStyle | Array<Property$BorderBottomStyle>, - "border-bottom-width"?: Property$BorderBottomWidth<TLength> | Array<Property$BorderBottomWidth<TLength>>, - "border-collapse"?: Property$BorderCollapse | Array<Property$BorderCollapse>, - "border-end-end-radius"?: Property$BorderEndEndRadius<TLength> | Array<Property$BorderEndEndRadius<TLength>>, - "border-end-start-radius"?: Property$BorderEndStartRadius<TLength> | Array<Property$BorderEndStartRadius<TLength>>, - "border-image-outset"?: Property$BorderImageOutset<TLength> | Array<Property$BorderImageOutset<TLength>>, - "border-image-repeat"?: Property$BorderImageRepeat | Array<Property$BorderImageRepeat>, - "border-image-slice"?: Property$BorderImageSlice | Array<Property$BorderImageSlice>, - "border-image-source"?: Property$BorderImageSource | Array<Property$BorderImageSource>, - "border-image-width"?: Property$BorderImageWidth<TLength> | Array<Property$BorderImageWidth<TLength>>, - "border-inline-color"?: Property$BorderInlineColor | Array<Property$BorderInlineColor>, - "border-inline-end-color"?: Property$BorderInlineEndColor | Array<Property$BorderInlineEndColor>, - "border-inline-end-style"?: Property$BorderInlineEndStyle | Array<Property$BorderInlineEndStyle>, - "border-inline-end-width"?: Property$BorderInlineEndWidth<TLength> | Array<Property$BorderInlineEndWidth<TLength>>, - "border-inline-start-color"?: Property$BorderInlineStartColor | Array<Property$BorderInlineStartColor>, - "border-inline-start-style"?: Property$BorderInlineStartStyle | Array<Property$BorderInlineStartStyle>, - "border-inline-start-width"?: Property$BorderInlineStartWidth<TLength> | Array<Property$BorderInlineStartWidth<TLength>>, - "border-inline-style"?: Property$BorderInlineStyle | Array<Property$BorderInlineStyle>, - "border-inline-width"?: Property$BorderInlineWidth<TLength> | Array<Property$BorderInlineWidth<TLength>>, - "border-left-color"?: Property$BorderLeftColor | Array<Property$BorderLeftColor>, - "border-left-style"?: Property$BorderLeftStyle | Array<Property$BorderLeftStyle>, - "border-left-width"?: Property$BorderLeftWidth<TLength> | Array<Property$BorderLeftWidth<TLength>>, - "border-right-color"?: Property$BorderRightColor | Array<Property$BorderRightColor>, - "border-right-style"?: Property$BorderRightStyle | Array<Property$BorderRightStyle>, - "border-right-width"?: Property$BorderRightWidth<TLength> | Array<Property$BorderRightWidth<TLength>>, - "border-spacing"?: Property$BorderSpacing<TLength> | Array<Property$BorderSpacing<TLength>>, - "border-start-end-radius"?: Property$BorderStartEndRadius<TLength> | Array<Property$BorderStartEndRadius<TLength>>, - "border-start-start-radius"?: Property$BorderStartStartRadius<TLength> | Array<Property$BorderStartStartRadius<TLength>>, - "border-top-color"?: Property$BorderTopColor | Array<Property$BorderTopColor>, - "border-top-left-radius"?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, - "border-top-right-radius"?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, - "border-top-style"?: Property$BorderTopStyle | Array<Property$BorderTopStyle>, - "border-top-width"?: Property$BorderTopWidth<TLength> | Array<Property$BorderTopWidth<TLength>>, - bottom?: Property$Bottom<TLength> | Array<Property$Bottom<TLength>>, - "box-decoration-break"?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, - "box-shadow"?: Property$BoxShadow | Array<Property$BoxShadow>, - "box-sizing"?: Property$BoxSizing | Array<Property$BoxSizing>, - "break-after"?: Property$BreakAfter | Array<Property$BreakAfter>, - "break-before"?: Property$BreakBefore | Array<Property$BreakBefore>, - "break-inside"?: Property$BreakInside | Array<Property$BreakInside>, - "caption-side"?: Property$CaptionSide | Array<Property$CaptionSide>, - "caret-color"?: Property$CaretColor | Array<Property$CaretColor>, - "caret-shape"?: Property$CaretShape | Array<Property$CaretShape>, - clear?: Property$Clear | Array<Property$Clear>, - "clip-path"?: Property$ClipPath | Array<Property$ClipPath>, - color?: Property$Color | Array<Property$Color>, - "color-adjust"?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, - "color-scheme"?: Property$ColorScheme | Array<Property$ColorScheme>, - "column-count"?: Property$ColumnCount | Array<Property$ColumnCount>, - "column-fill"?: Property$ColumnFill | Array<Property$ColumnFill>, - "column-gap"?: Property$ColumnGap<TLength> | Array<Property$ColumnGap<TLength>>, - "column-rule-color"?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, - "column-rule-style"?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, - "column-rule-width"?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, - "column-span"?: Property$ColumnSpan | Array<Property$ColumnSpan>, - "column-width"?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, - contain?: Property$Contain | Array<Property$Contain>, - "contain-intrinsic-block-size"?: Property$ContainIntrinsicBlockSize<TLength> | Array<Property$ContainIntrinsicBlockSize<TLength>>, - "contain-intrinsic-height"?: Property$ContainIntrinsicHeight<TLength> | Array<Property$ContainIntrinsicHeight<TLength>>, - "contain-intrinsic-inline-size"?: Property$ContainIntrinsicInlineSize<TLength> | Array<Property$ContainIntrinsicInlineSize<TLength>>, - "contain-intrinsic-width"?: Property$ContainIntrinsicWidth<TLength> | Array<Property$ContainIntrinsicWidth<TLength>>, - "container-name"?: Property$ContainerName | Array<Property$ContainerName>, - "container-type"?: Property$ContainerType | Array<Property$ContainerType>, - content?: Property$Content | Array<Property$Content>, - "content-visibility"?: Property$ContentVisibility | Array<Property$ContentVisibility>, - "counter-increment"?: Property$CounterIncrement | Array<Property$CounterIncrement>, - "counter-reset"?: Property$CounterReset | Array<Property$CounterReset>, - "counter-set"?: Property$CounterSet | Array<Property$CounterSet>, - cursor?: Property$Cursor | Array<Property$Cursor>, - direction?: Property$Direction | Array<Property$Direction>, - display?: Property$Display | Array<Property$Display>, - "empty-cells"?: Property$EmptyCells | Array<Property$EmptyCells>, - filter?: Property$Filter | Array<Property$Filter>, - "flex-basis"?: Property$FlexBasis<TLength> | Array<Property$FlexBasis<TLength>>, - "flex-direction"?: Property$FlexDirection | Array<Property$FlexDirection>, - "flex-grow"?: Property$FlexGrow | Array<Property$FlexGrow>, - "flex-shrink"?: Property$FlexShrink | Array<Property$FlexShrink>, - "flex-wrap"?: Property$FlexWrap | Array<Property$FlexWrap>, - float?: Property$Float | Array<Property$Float>, - "font-family"?: Property$FontFamily | Array<Property$FontFamily>, - "font-feature-settings"?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, - "font-kerning"?: Property$FontKerning | Array<Property$FontKerning>, - "font-language-override"?: Property$FontLanguageOverride | Array<Property$FontLanguageOverride>, - "font-optical-sizing"?: Property$FontOpticalSizing | Array<Property$FontOpticalSizing>, - "font-palette"?: Property$FontPalette | Array<Property$FontPalette>, - "font-size"?: Property$FontSize<TLength> | Array<Property$FontSize<TLength>>, - "font-size-adjust"?: Property$FontSizeAdjust | Array<Property$FontSizeAdjust>, - "font-smooth"?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, - "font-stretch"?: Property$FontStretch | Array<Property$FontStretch>, - "font-style"?: Property$FontStyle | Array<Property$FontStyle>, - "font-synthesis"?: Property$FontSynthesis | Array<Property$FontSynthesis>, - "font-synthesis-position"?: Property$FontSynthesisPosition | Array<Property$FontSynthesisPosition>, - "font-synthesis-small-caps"?: Property$FontSynthesisSmallCaps | Array<Property$FontSynthesisSmallCaps>, - "font-synthesis-style"?: Property$FontSynthesisStyle | Array<Property$FontSynthesisStyle>, - "font-synthesis-weight"?: Property$FontSynthesisWeight | Array<Property$FontSynthesisWeight>, - "font-variant"?: Property$FontVariant | Array<Property$FontVariant>, - "font-variant-alternates"?: Property$FontVariantAlternates | Array<Property$FontVariantAlternates>, - "font-variant-caps"?: Property$FontVariantCaps | Array<Property$FontVariantCaps>, - "font-variant-east-asian"?: Property$FontVariantEastAsian | Array<Property$FontVariantEastAsian>, - "font-variant-emoji"?: Property$FontVariantEmoji | Array<Property$FontVariantEmoji>, - "font-variant-ligatures"?: Property$FontVariantLigatures | Array<Property$FontVariantLigatures>, - "font-variant-numeric"?: Property$FontVariantNumeric | Array<Property$FontVariantNumeric>, - "font-variant-position"?: Property$FontVariantPosition | Array<Property$FontVariantPosition>, - "font-variation-settings"?: Property$FontVariationSettings | Array<Property$FontVariationSettings>, - "font-weight"?: Property$FontWeight | Array<Property$FontWeight>, - "forced-color-adjust"?: Property$ForcedColorAdjust | Array<Property$ForcedColorAdjust>, - "grid-auto-columns"?: Property$GridAutoColumns<TLength> | Array<Property$GridAutoColumns<TLength>>, - "grid-auto-flow"?: Property$GridAutoFlow | Array<Property$GridAutoFlow>, - "grid-auto-rows"?: Property$GridAutoRows<TLength> | Array<Property$GridAutoRows<TLength>>, - "grid-column-end"?: Property$GridColumnEnd | Array<Property$GridColumnEnd>, - "grid-column-start"?: Property$GridColumnStart | Array<Property$GridColumnStart>, - "grid-row-end"?: Property$GridRowEnd | Array<Property$GridRowEnd>, - "grid-row-start"?: Property$GridRowStart | Array<Property$GridRowStart>, - "grid-template-areas"?: Property$GridTemplateAreas | Array<Property$GridTemplateAreas>, - "grid-template-columns"?: Property$GridTemplateColumns<TLength> | Array<Property$GridTemplateColumns<TLength>>, - "grid-template-rows"?: Property$GridTemplateRows<TLength> | Array<Property$GridTemplateRows<TLength>>, - "hanging-punctuation"?: Property$HangingPunctuation | Array<Property$HangingPunctuation>, - height?: Property$Height<TLength> | Array<Property$Height<TLength>>, - "hyphenate-character"?: Property$HyphenateCharacter | Array<Property$HyphenateCharacter>, - "hyphenate-limit-chars"?: Property$HyphenateLimitChars | Array<Property$HyphenateLimitChars>, - hyphens?: Property$Hyphens | Array<Property$Hyphens>, - "image-orientation"?: Property$ImageOrientation | Array<Property$ImageOrientation>, - "image-rendering"?: Property$ImageRendering | Array<Property$ImageRendering>, - "image-resolution"?: Property$ImageResolution | Array<Property$ImageResolution>, - "initial-letter"?: Property$InitialLetter | Array<Property$InitialLetter>, - "inline-size"?: Property$InlineSize<TLength> | Array<Property$InlineSize<TLength>>, - "input-security"?: Property$InputSecurity | Array<Property$InputSecurity>, - "inset-block-end"?: Property$InsetBlockEnd<TLength> | Array<Property$InsetBlockEnd<TLength>>, - "inset-block-start"?: Property$InsetBlockStart<TLength> | Array<Property$InsetBlockStart<TLength>>, - "inset-inline-end"?: Property$InsetInlineEnd<TLength> | Array<Property$InsetInlineEnd<TLength>>, - "inset-inline-start"?: Property$InsetInlineStart<TLength> | Array<Property$InsetInlineStart<TLength>>, - isolation?: Property$Isolation | Array<Property$Isolation>, - "justify-content"?: Property$JustifyContent | Array<Property$JustifyContent>, - "justify-items"?: Property$JustifyItems | Array<Property$JustifyItems>, - "justify-self"?: Property$JustifySelf | Array<Property$JustifySelf>, - "justify-tracks"?: Property$JustifyTracks | Array<Property$JustifyTracks>, - left?: Property$Left<TLength> | Array<Property$Left<TLength>>, - "letter-spacing"?: Property$LetterSpacing<TLength> | Array<Property$LetterSpacing<TLength>>, - "line-break"?: Property$LineBreak | Array<Property$LineBreak>, - "line-height"?: Property$LineHeight<TLength> | Array<Property$LineHeight<TLength>>, - "line-height-step"?: Property$LineHeightStep<TLength> | Array<Property$LineHeightStep<TLength>>, - "list-style-image"?: Property$ListStyleImage | Array<Property$ListStyleImage>, - "list-style-position"?: Property$ListStylePosition | Array<Property$ListStylePosition>, - "list-style-type"?: Property$ListStyleType | Array<Property$ListStyleType>, - "margin-block-end"?: Property$MarginBlockEnd<TLength> | Array<Property$MarginBlockEnd<TLength>>, - "margin-block-start"?: Property$MarginBlockStart<TLength> | Array<Property$MarginBlockStart<TLength>>, - "margin-bottom"?: Property$MarginBottom<TLength> | Array<Property$MarginBottom<TLength>>, - "margin-inline-end"?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, - "margin-inline-start"?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, - "margin-left"?: Property$MarginLeft<TLength> | Array<Property$MarginLeft<TLength>>, - "margin-right"?: Property$MarginRight<TLength> | Array<Property$MarginRight<TLength>>, - "margin-top"?: Property$MarginTop<TLength> | Array<Property$MarginTop<TLength>>, - "margin-trim"?: Property$MarginTrim | Array<Property$MarginTrim>, - "mask-border-mode"?: Property$MaskBorderMode | Array<Property$MaskBorderMode>, - "mask-border-outset"?: Property$MaskBorderOutset<TLength> | Array<Property$MaskBorderOutset<TLength>>, - "mask-border-repeat"?: Property$MaskBorderRepeat | Array<Property$MaskBorderRepeat>, - "mask-border-slice"?: Property$MaskBorderSlice | Array<Property$MaskBorderSlice>, - "mask-border-source"?: Property$MaskBorderSource | Array<Property$MaskBorderSource>, - "mask-border-width"?: Property$MaskBorderWidth<TLength> | Array<Property$MaskBorderWidth<TLength>>, - "mask-clip"?: Property$MaskClip | Array<Property$MaskClip>, - "mask-composite"?: Property$MaskComposite | Array<Property$MaskComposite>, - "mask-image"?: Property$MaskImage | Array<Property$MaskImage>, - "mask-mode"?: Property$MaskMode | Array<Property$MaskMode>, - "mask-origin"?: Property$MaskOrigin | Array<Property$MaskOrigin>, - "mask-position"?: Property$MaskPosition<TLength> | Array<Property$MaskPosition<TLength>>, - "mask-repeat"?: Property$MaskRepeat | Array<Property$MaskRepeat>, - "mask-size"?: Property$MaskSize<TLength> | Array<Property$MaskSize<TLength>>, - "mask-type"?: Property$MaskType | Array<Property$MaskType>, - "masonry-auto-flow"?: Property$MasonryAutoFlow | Array<Property$MasonryAutoFlow>, - "math-depth"?: Property$MathDepth | Array<Property$MathDepth>, - "math-shift"?: Property$MathShift | Array<Property$MathShift>, - "math-style"?: Property$MathStyle | Array<Property$MathStyle>, - "max-block-size"?: Property$MaxBlockSize<TLength> | Array<Property$MaxBlockSize<TLength>>, - "max-height"?: Property$MaxHeight<TLength> | Array<Property$MaxHeight<TLength>>, - "max-inline-size"?: Property$MaxInlineSize<TLength> | Array<Property$MaxInlineSize<TLength>>, - "max-lines"?: Property$MaxLines | Array<Property$MaxLines>, - "max-width"?: Property$MaxWidth<TLength> | Array<Property$MaxWidth<TLength>>, - "min-block-size"?: Property$MinBlockSize<TLength> | Array<Property$MinBlockSize<TLength>>, - "min-height"?: Property$MinHeight<TLength> | Array<Property$MinHeight<TLength>>, - "min-inline-size"?: Property$MinInlineSize<TLength> | Array<Property$MinInlineSize<TLength>>, - "min-width"?: Property$MinWidth<TLength> | Array<Property$MinWidth<TLength>>, - "mix-blend-mode"?: Property$MixBlendMode | Array<Property$MixBlendMode>, - "motion-distance"?: Property$OffsetDistance<TLength> | Array<Property$OffsetDistance<TLength>>, - "motion-path"?: Property$OffsetPath | Array<Property$OffsetPath>, - "motion-rotation"?: Property$OffsetRotate | Array<Property$OffsetRotate>, - "object-fit"?: Property$ObjectFit | Array<Property$ObjectFit>, - "object-position"?: Property$ObjectPosition<TLength> | Array<Property$ObjectPosition<TLength>>, - "offset-anchor"?: Property$OffsetAnchor<TLength> | Array<Property$OffsetAnchor<TLength>>, - "offset-distance"?: Property$OffsetDistance<TLength> | Array<Property$OffsetDistance<TLength>>, - "offset-path"?: Property$OffsetPath | Array<Property$OffsetPath>, - "offset-position"?: Property$OffsetPosition<TLength> | Array<Property$OffsetPosition<TLength>>, - "offset-rotate"?: Property$OffsetRotate | Array<Property$OffsetRotate>, - "offset-rotation"?: Property$OffsetRotate | Array<Property$OffsetRotate>, - opacity?: Property$Opacity | Array<Property$Opacity>, - order?: Property$Order | Array<Property$Order>, - orphans?: Property$Orphans | Array<Property$Orphans>, - "outline-color"?: Property$OutlineColor | Array<Property$OutlineColor>, - "outline-offset"?: Property$OutlineOffset<TLength> | Array<Property$OutlineOffset<TLength>>, - "outline-style"?: Property$OutlineStyle | Array<Property$OutlineStyle>, - "outline-width"?: Property$OutlineWidth<TLength> | Array<Property$OutlineWidth<TLength>>, - "overflow-anchor"?: Property$OverflowAnchor | Array<Property$OverflowAnchor>, - "overflow-block"?: Property$OverflowBlock | Array<Property$OverflowBlock>, - "overflow-clip-box"?: Property$OverflowClipBox | Array<Property$OverflowClipBox>, - "overflow-clip-margin"?: Property$OverflowClipMargin<TLength> | Array<Property$OverflowClipMargin<TLength>>, - "overflow-inline"?: Property$OverflowInline | Array<Property$OverflowInline>, - "overflow-wrap"?: Property$OverflowWrap | Array<Property$OverflowWrap>, - "overflow-x"?: Property$OverflowX | Array<Property$OverflowX>, - "overflow-y"?: Property$OverflowY | Array<Property$OverflowY>, - overlay?: Property$Overlay | Array<Property$Overlay>, - "overscroll-behavior-block"?: Property$OverscrollBehaviorBlock | Array<Property$OverscrollBehaviorBlock>, - "overscroll-behavior-inline"?: Property$OverscrollBehaviorInline | Array<Property$OverscrollBehaviorInline>, - "overscroll-behavior-x"?: Property$OverscrollBehaviorX | Array<Property$OverscrollBehaviorX>, - "overscroll-behavior-y"?: Property$OverscrollBehaviorY | Array<Property$OverscrollBehaviorY>, - "padding-block-end"?: Property$PaddingBlockEnd<TLength> | Array<Property$PaddingBlockEnd<TLength>>, - "padding-block-start"?: Property$PaddingBlockStart<TLength> | Array<Property$PaddingBlockStart<TLength>>, - "padding-bottom"?: Property$PaddingBottom<TLength> | Array<Property$PaddingBottom<TLength>>, - "padding-inline-end"?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, - "padding-inline-start"?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, - "padding-left"?: Property$PaddingLeft<TLength> | Array<Property$PaddingLeft<TLength>>, - "padding-right"?: Property$PaddingRight<TLength> | Array<Property$PaddingRight<TLength>>, - "padding-top"?: Property$PaddingTop<TLength> | Array<Property$PaddingTop<TLength>>, - page?: Property$Page | Array<Property$Page>, - "page-break-after"?: Property$PageBreakAfter | Array<Property$PageBreakAfter>, - "page-break-before"?: Property$PageBreakBefore | Array<Property$PageBreakBefore>, - "page-break-inside"?: Property$PageBreakInside | Array<Property$PageBreakInside>, - "paint-order"?: Property$PaintOrder | Array<Property$PaintOrder>, - perspective?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, - "perspective-origin"?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, - "pointer-events"?: Property$PointerEvents | Array<Property$PointerEvents>, - position?: Property$Position | Array<Property$Position>, - "print-color-adjust"?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, - quotes?: Property$Quotes | Array<Property$Quotes>, - resize?: Property$Resize | Array<Property$Resize>, - right?: Property$Right<TLength> | Array<Property$Right<TLength>>, - rotate?: Property$Rotate | Array<Property$Rotate>, - "row-gap"?: Property$RowGap<TLength> | Array<Property$RowGap<TLength>>, - "ruby-align"?: Property$RubyAlign | Array<Property$RubyAlign>, - "ruby-merge"?: Property$RubyMerge | Array<Property$RubyMerge>, - "ruby-position"?: Property$RubyPosition | Array<Property$RubyPosition>, - scale?: Property$Scale | Array<Property$Scale>, - "scroll-behavior"?: Property$ScrollBehavior | Array<Property$ScrollBehavior>, - "scroll-margin-block-end"?: Property$ScrollMarginBlockEnd<TLength> | Array<Property$ScrollMarginBlockEnd<TLength>>, - "scroll-margin-block-start"?: Property$ScrollMarginBlockStart<TLength> | Array<Property$ScrollMarginBlockStart<TLength>>, - "scroll-margin-bottom"?: Property$ScrollMarginBottom<TLength> | Array<Property$ScrollMarginBottom<TLength>>, - "scroll-margin-inline-end"?: Property$ScrollMarginInlineEnd<TLength> | Array<Property$ScrollMarginInlineEnd<TLength>>, - "scroll-margin-inline-start"?: Property$ScrollMarginInlineStart<TLength> | Array<Property$ScrollMarginInlineStart<TLength>>, - "scroll-margin-left"?: Property$ScrollMarginLeft<TLength> | Array<Property$ScrollMarginLeft<TLength>>, - "scroll-margin-right"?: Property$ScrollMarginRight<TLength> | Array<Property$ScrollMarginRight<TLength>>, - "scroll-margin-top"?: Property$ScrollMarginTop<TLength> | Array<Property$ScrollMarginTop<TLength>>, - "scroll-padding-block-end"?: Property$ScrollPaddingBlockEnd<TLength> | Array<Property$ScrollPaddingBlockEnd<TLength>>, - "scroll-padding-block-start"?: Property$ScrollPaddingBlockStart<TLength> | Array<Property$ScrollPaddingBlockStart<TLength>>, - "scroll-padding-bottom"?: Property$ScrollPaddingBottom<TLength> | Array<Property$ScrollPaddingBottom<TLength>>, - "scroll-padding-inline-end"?: Property$ScrollPaddingInlineEnd<TLength> | Array<Property$ScrollPaddingInlineEnd<TLength>>, - "scroll-padding-inline-start"?: Property$ScrollPaddingInlineStart<TLength> | Array<Property$ScrollPaddingInlineStart<TLength>>, - "scroll-padding-left"?: Property$ScrollPaddingLeft<TLength> | Array<Property$ScrollPaddingLeft<TLength>>, - "scroll-padding-right"?: Property$ScrollPaddingRight<TLength> | Array<Property$ScrollPaddingRight<TLength>>, - "scroll-padding-top"?: Property$ScrollPaddingTop<TLength> | Array<Property$ScrollPaddingTop<TLength>>, - "scroll-snap-align"?: Property$ScrollSnapAlign | Array<Property$ScrollSnapAlign>, - "scroll-snap-margin-bottom"?: Property$ScrollMarginBottom<TLength> | Array<Property$ScrollMarginBottom<TLength>>, - "scroll-snap-margin-left"?: Property$ScrollMarginLeft<TLength> | Array<Property$ScrollMarginLeft<TLength>>, - "scroll-snap-margin-right"?: Property$ScrollMarginRight<TLength> | Array<Property$ScrollMarginRight<TLength>>, - "scroll-snap-margin-top"?: Property$ScrollMarginTop<TLength> | Array<Property$ScrollMarginTop<TLength>>, - "scroll-snap-stop"?: Property$ScrollSnapStop | Array<Property$ScrollSnapStop>, - "scroll-snap-type"?: Property$ScrollSnapType | Array<Property$ScrollSnapType>, - "scroll-timeline-axis"?: Property$ScrollTimelineAxis | Array<Property$ScrollTimelineAxis>, - "scroll-timeline-name"?: Property$ScrollTimelineName | Array<Property$ScrollTimelineName>, - "scrollbar-color"?: Property$ScrollbarColor | Array<Property$ScrollbarColor>, - "scrollbar-gutter"?: Property$ScrollbarGutter | Array<Property$ScrollbarGutter>, - "scrollbar-width"?: Property$ScrollbarWidth | Array<Property$ScrollbarWidth>, - "shape-image-threshold"?: Property$ShapeImageThreshold | Array<Property$ShapeImageThreshold>, - "shape-margin"?: Property$ShapeMargin<TLength> | Array<Property$ShapeMargin<TLength>>, - "shape-outside"?: Property$ShapeOutside | Array<Property$ShapeOutside>, - "tab-size"?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, - "table-layout"?: Property$TableLayout | Array<Property$TableLayout>, - "text-align"?: Property$TextAlign | Array<Property$TextAlign>, - "text-align-last"?: Property$TextAlignLast | Array<Property$TextAlignLast>, - "text-combine-upright"?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, - "text-decoration-color"?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, - "text-decoration-line"?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, - "text-decoration-skip"?: Property$TextDecorationSkip | Array<Property$TextDecorationSkip>, - "text-decoration-skip-ink"?: Property$TextDecorationSkipInk | Array<Property$TextDecorationSkipInk>, - "text-decoration-style"?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, - "text-decoration-thickness"?: Property$TextDecorationThickness<TLength> | Array<Property$TextDecorationThickness<TLength>>, - "text-emphasis-color"?: Property$TextEmphasisColor | Array<Property$TextEmphasisColor>, - "text-emphasis-position"?: Property$TextEmphasisPosition | Array<Property$TextEmphasisPosition>, - "text-emphasis-style"?: Property$TextEmphasisStyle | Array<Property$TextEmphasisStyle>, - "text-indent"?: Property$TextIndent<TLength> | Array<Property$TextIndent<TLength>>, - "text-justify"?: Property$TextJustify | Array<Property$TextJustify>, - "text-orientation"?: Property$TextOrientation | Array<Property$TextOrientation>, - "text-overflow"?: Property$TextOverflow | Array<Property$TextOverflow>, - "text-rendering"?: Property$TextRendering | Array<Property$TextRendering>, - "text-shadow"?: Property$TextShadow | Array<Property$TextShadow>, - "text-size-adjust"?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, - "text-transform"?: Property$TextTransform | Array<Property$TextTransform>, - "text-underline-offset"?: Property$TextUnderlineOffset<TLength> | Array<Property$TextUnderlineOffset<TLength>>, - "text-underline-position"?: Property$TextUnderlinePosition | Array<Property$TextUnderlinePosition>, - "text-wrap"?: Property$TextWrap | Array<Property$TextWrap>, - "timeline-scope"?: Property$TimelineScope | Array<Property$TimelineScope>, - top?: Property$Top<TLength> | Array<Property$Top<TLength>>, - "touch-action"?: Property$TouchAction | Array<Property$TouchAction>, - transform?: Property$Transform | Array<Property$Transform>, - "transform-box"?: Property$TransformBox | Array<Property$TransformBox>, - "transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, - "transform-style"?: Property$TransformStyle | Array<Property$TransformStyle>, - "transition-behavior"?: Property$TransitionBehavior | Array<Property$TransitionBehavior>, - "transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, - "transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, - "transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, - "transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, - translate?: Property$Translate<TLength> | Array<Property$Translate<TLength>>, - "unicode-bidi"?: Property$UnicodeBidi | Array<Property$UnicodeBidi>, - "user-select"?: Property$UserSelect | Array<Property$UserSelect>, - "vertical-align"?: Property$VerticalAlign<TLength> | Array<Property$VerticalAlign<TLength>>, - "view-timeline-axis"?: Property$ViewTimelineAxis | Array<Property$ViewTimelineAxis>, - "view-timeline-inset"?: Property$ViewTimelineInset<TLength> | Array<Property$ViewTimelineInset<TLength>>, - "view-timeline-name"?: Property$ViewTimelineName | Array<Property$ViewTimelineName>, - "view-transition-name"?: Property$ViewTransitionName | Array<Property$ViewTransitionName>, - visibility?: Property$Visibility | Array<Property$Visibility>, - "white-space"?: Property$WhiteSpace | Array<Property$WhiteSpace>, - "white-space-collapse"?: Property$WhiteSpaceCollapse | Array<Property$WhiteSpaceCollapse>, - "white-space-trim"?: Property$WhiteSpaceTrim | Array<Property$WhiteSpaceTrim>, - widows?: Property$Widows | Array<Property$Widows>, - width?: Property$Width<TLength> | Array<Property$Width<TLength>>, - "will-change"?: Property$WillChange | Array<Property$WillChange>, - "word-break"?: Property$WordBreak | Array<Property$WordBreak>, - "word-spacing"?: Property$WordSpacing<TLength> | Array<Property$WordSpacing<TLength>>, - "word-wrap"?: Property$WordWrap | Array<Property$WordWrap>, - "writing-mode"?: Property$WritingMode | Array<Property$WritingMode>, - "z-index"?: Property$ZIndex | Array<Property$ZIndex>, - zoom?: Property$Zoom | Array<Property$Zoom>, -|}; - -export type StandardShorthandPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| - all?: Property$All | Array<Property$All>, - animation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, - "animation-range"?: Property$AnimationRange<TLength> | Array<Property$AnimationRange<TLength>>, - background?: Property$Background<TLength> | Array<Property$Background<TLength>>, - "background-position"?: Property$BackgroundPosition<TLength> | Array<Property$BackgroundPosition<TLength>>, - border?: Property$Border<TLength> | Array<Property$Border<TLength>>, - "border-block"?: Property$BorderBlock<TLength> | Array<Property$BorderBlock<TLength>>, - "border-block-end"?: Property$BorderBlockEnd<TLength> | Array<Property$BorderBlockEnd<TLength>>, - "border-block-start"?: Property$BorderBlockStart<TLength> | Array<Property$BorderBlockStart<TLength>>, - "border-bottom"?: Property$BorderBottom<TLength> | Array<Property$BorderBottom<TLength>>, - "border-color"?: Property$BorderColor | Array<Property$BorderColor>, - "border-image"?: Property$BorderImage | Array<Property$BorderImage>, - "border-inline"?: Property$BorderInline<TLength> | Array<Property$BorderInline<TLength>>, - "border-inline-end"?: Property$BorderInlineEnd<TLength> | Array<Property$BorderInlineEnd<TLength>>, - "border-inline-start"?: Property$BorderInlineStart<TLength> | Array<Property$BorderInlineStart<TLength>>, - "border-left"?: Property$BorderLeft<TLength> | Array<Property$BorderLeft<TLength>>, - "border-radius"?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, - "border-right"?: Property$BorderRight<TLength> | Array<Property$BorderRight<TLength>>, - "border-style"?: Property$BorderStyle | Array<Property$BorderStyle>, - "border-top"?: Property$BorderTop<TLength> | Array<Property$BorderTop<TLength>>, - "border-width"?: Property$BorderWidth<TLength> | Array<Property$BorderWidth<TLength>>, - caret?: Property$Caret | Array<Property$Caret>, - "column-rule"?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, - columns?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, - "contain-intrinsic-size"?: Property$ContainIntrinsicSize<TLength> | Array<Property$ContainIntrinsicSize<TLength>>, - container?: Property$Container | Array<Property$Container>, - flex?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, - "flex-flow"?: Property$FlexFlow | Array<Property$FlexFlow>, - font?: Property$Font | Array<Property$Font>, - gap?: Property$Gap<TLength> | Array<Property$Gap<TLength>>, - grid?: Property$Grid | Array<Property$Grid>, - "grid-area"?: Property$GridArea | Array<Property$GridArea>, - "grid-column"?: Property$GridColumn | Array<Property$GridColumn>, - "grid-row"?: Property$GridRow | Array<Property$GridRow>, - "grid-template"?: Property$GridTemplate | Array<Property$GridTemplate>, - inset?: Property$Inset<TLength> | Array<Property$Inset<TLength>>, - "inset-block"?: Property$InsetBlock<TLength> | Array<Property$InsetBlock<TLength>>, - "inset-inline"?: Property$InsetInline<TLength> | Array<Property$InsetInline<TLength>>, - "line-clamp"?: Property$LineClamp | Array<Property$LineClamp>, - "list-style"?: Property$ListStyle | Array<Property$ListStyle>, - margin?: Property$Margin<TLength> | Array<Property$Margin<TLength>>, - "margin-block"?: Property$MarginBlock<TLength> | Array<Property$MarginBlock<TLength>>, - "margin-inline"?: Property$MarginInline<TLength> | Array<Property$MarginInline<TLength>>, - mask?: Property$Mask<TLength> | Array<Property$Mask<TLength>>, - "mask-border"?: Property$MaskBorder | Array<Property$MaskBorder>, - motion?: Property$Offset<TLength> | Array<Property$Offset<TLength>>, - offset?: Property$Offset<TLength> | Array<Property$Offset<TLength>>, - outline?: Property$Outline<TLength> | Array<Property$Outline<TLength>>, - overflow?: Property$Overflow | Array<Property$Overflow>, - "overscroll-behavior"?: Property$OverscrollBehavior | Array<Property$OverscrollBehavior>, - padding?: Property$Padding<TLength> | Array<Property$Padding<TLength>>, - "padding-block"?: Property$PaddingBlock<TLength> | Array<Property$PaddingBlock<TLength>>, - "padding-inline"?: Property$PaddingInline<TLength> | Array<Property$PaddingInline<TLength>>, - "place-content"?: Property$PlaceContent | Array<Property$PlaceContent>, - "place-items"?: Property$PlaceItems | Array<Property$PlaceItems>, - "place-self"?: Property$PlaceSelf | Array<Property$PlaceSelf>, - "scroll-margin"?: Property$ScrollMargin<TLength> | Array<Property$ScrollMargin<TLength>>, - "scroll-margin-block"?: Property$ScrollMarginBlock<TLength> | Array<Property$ScrollMarginBlock<TLength>>, - "scroll-margin-inline"?: Property$ScrollMarginInline<TLength> | Array<Property$ScrollMarginInline<TLength>>, - "scroll-padding"?: Property$ScrollPadding<TLength> | Array<Property$ScrollPadding<TLength>>, - "scroll-padding-block"?: Property$ScrollPaddingBlock<TLength> | Array<Property$ScrollPaddingBlock<TLength>>, - "scroll-padding-inline"?: Property$ScrollPaddingInline<TLength> | Array<Property$ScrollPaddingInline<TLength>>, - "scroll-snap-margin"?: Property$ScrollMargin<TLength> | Array<Property$ScrollMargin<TLength>>, - "scroll-timeline"?: Property$ScrollTimeline | Array<Property$ScrollTimeline>, - "text-decoration"?: Property$TextDecoration<TLength> | Array<Property$TextDecoration<TLength>>, - "text-emphasis"?: Property$TextEmphasis | Array<Property$TextEmphasis>, - transition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, - "view-timeline"?: Property$ViewTimeline | Array<Property$ViewTimeline>, -|}; - -export type StandardPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| - ...StandardLonghandPropertiesHyphenFallback<TLength, TTime>, - ...StandardShorthandPropertiesHyphenFallback<TLength, TTime>, -|}; - -export type VendorLonghandPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| - "-moz-animation-delay"?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, - "-moz-animation-direction"?: Property$AnimationDirection | Array<Property$AnimationDirection>, - "-moz-animation-duration"?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, - "-moz-animation-fill-mode"?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, - "-moz-animation-iteration-count"?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, - "-moz-animation-name"?: Property$AnimationName | Array<Property$AnimationName>, - "-moz-animation-play-state"?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, - "-moz-animation-timing-function"?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, - "-moz-appearance"?: Property$MozAppearance | Array<Property$MozAppearance>, - "-moz-binding"?: Property$MozBinding | Array<Property$MozBinding>, - "-moz-border-bottom-colors"?: Property$MozBorderBottomColors | Array<Property$MozBorderBottomColors>, - "-moz-border-end-color"?: Property$BorderInlineEndColor | Array<Property$BorderInlineEndColor>, - "-moz-border-end-style"?: Property$BorderInlineEndStyle | Array<Property$BorderInlineEndStyle>, - "-moz-border-end-width"?: Property$BorderInlineEndWidth<TLength> | Array<Property$BorderInlineEndWidth<TLength>>, - "-moz-border-left-colors"?: Property$MozBorderLeftColors | Array<Property$MozBorderLeftColors>, - "-moz-border-right-colors"?: Property$MozBorderRightColors | Array<Property$MozBorderRightColors>, - "-moz-border-start-color"?: Property$BorderInlineStartColor | Array<Property$BorderInlineStartColor>, - "-moz-border-start-style"?: Property$BorderInlineStartStyle | Array<Property$BorderInlineStartStyle>, - "-moz-border-top-colors"?: Property$MozBorderTopColors | Array<Property$MozBorderTopColors>, - "-moz-box-sizing"?: Property$BoxSizing | Array<Property$BoxSizing>, - "-moz-column-count"?: Property$ColumnCount | Array<Property$ColumnCount>, - "-moz-column-fill"?: Property$ColumnFill | Array<Property$ColumnFill>, - "-moz-column-rule-color"?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, - "-moz-column-rule-style"?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, - "-moz-column-rule-width"?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, - "-moz-column-width"?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, - "-moz-context-properties"?: Property$MozContextProperties | Array<Property$MozContextProperties>, - "-moz-font-feature-settings"?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, - "-moz-font-language-override"?: Property$FontLanguageOverride | Array<Property$FontLanguageOverride>, - "-moz-hyphens"?: Property$Hyphens | Array<Property$Hyphens>, - "-moz-image-region"?: Property$MozImageRegion | Array<Property$MozImageRegion>, - "-moz-margin-end"?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, - "-moz-margin-start"?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, - "-moz-orient"?: Property$MozOrient | Array<Property$MozOrient>, - "-moz-osx-font-smoothing"?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, - "-moz-outline-radius-bottomleft"?: Property$MozOutlineRadiusBottomleft<TLength> | Array<Property$MozOutlineRadiusBottomleft<TLength>>, - "-moz-outline-radius-bottomright"?: Property$MozOutlineRadiusBottomright<TLength> | Array<Property$MozOutlineRadiusBottomright<TLength>>, - "-moz-outline-radius-topleft"?: Property$MozOutlineRadiusTopleft<TLength> | Array<Property$MozOutlineRadiusTopleft<TLength>>, - "-moz-outline-radius-topright"?: Property$MozOutlineRadiusTopright<TLength> | Array<Property$MozOutlineRadiusTopright<TLength>>, - "-moz-padding-end"?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, - "-moz-padding-start"?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, - "-moz-stack-sizing"?: Property$MozStackSizing | Array<Property$MozStackSizing>, - "-moz-tab-size"?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, - "-moz-text-blink"?: Property$MozTextBlink | Array<Property$MozTextBlink>, - "-moz-text-size-adjust"?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, - "-moz-user-focus"?: Property$MozUserFocus | Array<Property$MozUserFocus>, - "-moz-user-modify"?: Property$MozUserModify | Array<Property$MozUserModify>, - "-moz-user-select"?: Property$UserSelect | Array<Property$UserSelect>, - "-moz-window-dragging"?: Property$MozWindowDragging | Array<Property$MozWindowDragging>, - "-moz-window-shadow"?: Property$MozWindowShadow | Array<Property$MozWindowShadow>, - "-ms-accelerator"?: Property$MsAccelerator | Array<Property$MsAccelerator>, - "-ms-block-progression"?: Property$MsBlockProgression | Array<Property$MsBlockProgression>, - "-ms-content-zoom-chaining"?: Property$MsContentZoomChaining | Array<Property$MsContentZoomChaining>, - "-ms-content-zoom-limit-max"?: Property$MsContentZoomLimitMax | Array<Property$MsContentZoomLimitMax>, - "-ms-content-zoom-limit-min"?: Property$MsContentZoomLimitMin | Array<Property$MsContentZoomLimitMin>, - "-ms-content-zoom-snap-points"?: Property$MsContentZoomSnapPoints | Array<Property$MsContentZoomSnapPoints>, - "-ms-content-zoom-snap-type"?: Property$MsContentZoomSnapType | Array<Property$MsContentZoomSnapType>, - "-ms-content-zooming"?: Property$MsContentZooming | Array<Property$MsContentZooming>, - "-ms-filter"?: Property$MsFilter | Array<Property$MsFilter>, - "-ms-flex-direction"?: Property$FlexDirection | Array<Property$FlexDirection>, - "-ms-flex-positive"?: Property$FlexGrow | Array<Property$FlexGrow>, - "-ms-flow-from"?: Property$MsFlowFrom | Array<Property$MsFlowFrom>, - "-ms-flow-into"?: Property$MsFlowInto | Array<Property$MsFlowInto>, - "-ms-grid-columns"?: Property$MsGridColumns<TLength> | Array<Property$MsGridColumns<TLength>>, - "-ms-grid-rows"?: Property$MsGridRows<TLength> | Array<Property$MsGridRows<TLength>>, - "-ms-high-contrast-adjust"?: Property$MsHighContrastAdjust | Array<Property$MsHighContrastAdjust>, - "-ms-hyphenate-limit-chars"?: Property$MsHyphenateLimitChars | Array<Property$MsHyphenateLimitChars>, - "-ms-hyphenate-limit-lines"?: Property$MsHyphenateLimitLines | Array<Property$MsHyphenateLimitLines>, - "-ms-hyphenate-limit-zone"?: Property$MsHyphenateLimitZone<TLength> | Array<Property$MsHyphenateLimitZone<TLength>>, - "-ms-hyphens"?: Property$Hyphens | Array<Property$Hyphens>, - "-ms-ime-align"?: Property$MsImeAlign | Array<Property$MsImeAlign>, - "-ms-line-break"?: Property$LineBreak | Array<Property$LineBreak>, - "-ms-order"?: Property$Order | Array<Property$Order>, - "-ms-overflow-style"?: Property$MsOverflowStyle | Array<Property$MsOverflowStyle>, - "-ms-overflow-x"?: Property$OverflowX | Array<Property$OverflowX>, - "-ms-overflow-y"?: Property$OverflowY | Array<Property$OverflowY>, - "-ms-scroll-chaining"?: Property$MsScrollChaining | Array<Property$MsScrollChaining>, - "-ms-scroll-limit-x-max"?: Property$MsScrollLimitXMax<TLength> | Array<Property$MsScrollLimitXMax<TLength>>, - "-ms-scroll-limit-x-min"?: Property$MsScrollLimitXMin<TLength> | Array<Property$MsScrollLimitXMin<TLength>>, - "-ms-scroll-limit-y-max"?: Property$MsScrollLimitYMax<TLength> | Array<Property$MsScrollLimitYMax<TLength>>, - "-ms-scroll-limit-y-min"?: Property$MsScrollLimitYMin<TLength> | Array<Property$MsScrollLimitYMin<TLength>>, - "-ms-scroll-rails"?: Property$MsScrollRails | Array<Property$MsScrollRails>, - "-ms-scroll-snap-points-x"?: Property$MsScrollSnapPointsX | Array<Property$MsScrollSnapPointsX>, - "-ms-scroll-snap-points-y"?: Property$MsScrollSnapPointsY | Array<Property$MsScrollSnapPointsY>, - "-ms-scroll-snap-type"?: Property$MsScrollSnapType | Array<Property$MsScrollSnapType>, - "-ms-scroll-translation"?: Property$MsScrollTranslation | Array<Property$MsScrollTranslation>, - "-ms-scrollbar-3dlight-color"?: Property$MsScrollbar3dlightColor | Array<Property$MsScrollbar3dlightColor>, - "-ms-scrollbar-arrow-color"?: Property$MsScrollbarArrowColor | Array<Property$MsScrollbarArrowColor>, - "-ms-scrollbar-base-color"?: Property$MsScrollbarBaseColor | Array<Property$MsScrollbarBaseColor>, - "-ms-scrollbar-darkshadow-color"?: Property$MsScrollbarDarkshadowColor | Array<Property$MsScrollbarDarkshadowColor>, - "-ms-scrollbar-face-color"?: Property$MsScrollbarFaceColor | Array<Property$MsScrollbarFaceColor>, - "-ms-scrollbar-highlight-color"?: Property$MsScrollbarHighlightColor | Array<Property$MsScrollbarHighlightColor>, - "-ms-scrollbar-shadow-color"?: Property$MsScrollbarShadowColor | Array<Property$MsScrollbarShadowColor>, - "-ms-scrollbar-track-color"?: Property$MsScrollbarTrackColor | Array<Property$MsScrollbarTrackColor>, - "-ms-text-autospace"?: Property$MsTextAutospace | Array<Property$MsTextAutospace>, - "-ms-text-combine-horizontal"?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, - "-ms-text-overflow"?: Property$TextOverflow | Array<Property$TextOverflow>, - "-ms-touch-action"?: Property$TouchAction | Array<Property$TouchAction>, - "-ms-touch-select"?: Property$MsTouchSelect | Array<Property$MsTouchSelect>, - "-ms-transform"?: Property$Transform | Array<Property$Transform>, - "-ms-transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, - "-ms-transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, - "-ms-transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, - "-ms-transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, - "-ms-transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, - "-ms-user-select"?: Property$MsUserSelect | Array<Property$MsUserSelect>, - "-ms-word-break"?: Property$WordBreak | Array<Property$WordBreak>, - "-ms-wrap-flow"?: Property$MsWrapFlow | Array<Property$MsWrapFlow>, - "-ms-wrap-margin"?: Property$MsWrapMargin<TLength> | Array<Property$MsWrapMargin<TLength>>, - "-ms-wrap-through"?: Property$MsWrapThrough | Array<Property$MsWrapThrough>, - "-ms-writing-mode"?: Property$WritingMode | Array<Property$WritingMode>, - "-webkit-align-content"?: Property$AlignContent | Array<Property$AlignContent>, - "-webkit-align-items"?: Property$AlignItems | Array<Property$AlignItems>, - "-webkit-align-self"?: Property$AlignSelf | Array<Property$AlignSelf>, - "-webkit-animation-delay"?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, - "-webkit-animation-direction"?: Property$AnimationDirection | Array<Property$AnimationDirection>, - "-webkit-animation-duration"?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, - "-webkit-animation-fill-mode"?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, - "-webkit-animation-iteration-count"?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, - "-webkit-animation-name"?: Property$AnimationName | Array<Property$AnimationName>, - "-webkit-animation-play-state"?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, - "-webkit-animation-timing-function"?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, - "-webkit-appearance"?: Property$WebkitAppearance | Array<Property$WebkitAppearance>, - "-webkit-backdrop-filter"?: Property$BackdropFilter | Array<Property$BackdropFilter>, - "-webkit-backface-visibility"?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, - "-webkit-background-clip"?: Property$BackgroundClip | Array<Property$BackgroundClip>, - "-webkit-background-origin"?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, - "-webkit-background-size"?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, - "-webkit-border-before-color"?: Property$WebkitBorderBeforeColor | Array<Property$WebkitBorderBeforeColor>, - "-webkit-border-before-style"?: Property$WebkitBorderBeforeStyle | Array<Property$WebkitBorderBeforeStyle>, - "-webkit-border-before-width"?: Property$WebkitBorderBeforeWidth<TLength> | Array<Property$WebkitBorderBeforeWidth<TLength>>, - "-webkit-border-bottom-left-radius"?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, - "-webkit-border-bottom-right-radius"?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, - "-webkit-border-image-slice"?: Property$BorderImageSlice | Array<Property$BorderImageSlice>, - "-webkit-border-top-left-radius"?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, - "-webkit-border-top-right-radius"?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, - "-webkit-box-decoration-break"?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, - "-webkit-box-reflect"?: Property$WebkitBoxReflect<TLength> | Array<Property$WebkitBoxReflect<TLength>>, - "-webkit-box-shadow"?: Property$BoxShadow | Array<Property$BoxShadow>, - "-webkit-box-sizing"?: Property$BoxSizing | Array<Property$BoxSizing>, - "-webkit-clip-path"?: Property$ClipPath | Array<Property$ClipPath>, - "-webkit-column-count"?: Property$ColumnCount | Array<Property$ColumnCount>, - "-webkit-column-fill"?: Property$ColumnFill | Array<Property$ColumnFill>, - "-webkit-column-rule-color"?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, - "-webkit-column-rule-style"?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, - "-webkit-column-rule-width"?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, - "-webkit-column-span"?: Property$ColumnSpan | Array<Property$ColumnSpan>, - "-webkit-column-width"?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, - "-webkit-filter"?: Property$Filter | Array<Property$Filter>, - "-webkit-flex-basis"?: Property$FlexBasis<TLength> | Array<Property$FlexBasis<TLength>>, - "-webkit-flex-direction"?: Property$FlexDirection | Array<Property$FlexDirection>, - "-webkit-flex-grow"?: Property$FlexGrow | Array<Property$FlexGrow>, - "-webkit-flex-shrink"?: Property$FlexShrink | Array<Property$FlexShrink>, - "-webkit-flex-wrap"?: Property$FlexWrap | Array<Property$FlexWrap>, - "-webkit-font-feature-settings"?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, - "-webkit-font-kerning"?: Property$FontKerning | Array<Property$FontKerning>, - "-webkit-font-smoothing"?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, - "-webkit-font-variant-ligatures"?: Property$FontVariantLigatures | Array<Property$FontVariantLigatures>, - "-webkit-hyphenate-character"?: Property$HyphenateCharacter | Array<Property$HyphenateCharacter>, - "-webkit-hyphens"?: Property$Hyphens | Array<Property$Hyphens>, - "-webkit-initial-letter"?: Property$InitialLetter | Array<Property$InitialLetter>, - "-webkit-justify-content"?: Property$JustifyContent | Array<Property$JustifyContent>, - "-webkit-line-break"?: Property$LineBreak | Array<Property$LineBreak>, - "-webkit-line-clamp"?: Property$WebkitLineClamp | Array<Property$WebkitLineClamp>, - "-webkit-margin-end"?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, - "-webkit-margin-start"?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, - "-webkit-mask-attachment"?: Property$WebkitMaskAttachment | Array<Property$WebkitMaskAttachment>, - "-webkit-mask-box-image-outset"?: Property$MaskBorderOutset<TLength> | Array<Property$MaskBorderOutset<TLength>>, - "-webkit-mask-box-image-repeat"?: Property$MaskBorderRepeat | Array<Property$MaskBorderRepeat>, - "-webkit-mask-box-image-slice"?: Property$MaskBorderSlice | Array<Property$MaskBorderSlice>, - "-webkit-mask-box-image-source"?: Property$MaskBorderSource | Array<Property$MaskBorderSource>, - "-webkit-mask-box-image-width"?: Property$MaskBorderWidth<TLength> | Array<Property$MaskBorderWidth<TLength>>, - "-webkit-mask-clip"?: Property$WebkitMaskClip | Array<Property$WebkitMaskClip>, - "-webkit-mask-composite"?: Property$WebkitMaskComposite | Array<Property$WebkitMaskComposite>, - "-webkit-mask-image"?: Property$WebkitMaskImage | Array<Property$WebkitMaskImage>, - "-webkit-mask-origin"?: Property$WebkitMaskOrigin | Array<Property$WebkitMaskOrigin>, - "-webkit-mask-position"?: Property$WebkitMaskPosition<TLength> | Array<Property$WebkitMaskPosition<TLength>>, - "-webkit-mask-position-x"?: Property$WebkitMaskPositionX<TLength> | Array<Property$WebkitMaskPositionX<TLength>>, - "-webkit-mask-position-y"?: Property$WebkitMaskPositionY<TLength> | Array<Property$WebkitMaskPositionY<TLength>>, - "-webkit-mask-repeat"?: Property$WebkitMaskRepeat | Array<Property$WebkitMaskRepeat>, - "-webkit-mask-repeat-x"?: Property$WebkitMaskRepeatX | Array<Property$WebkitMaskRepeatX>, - "-webkit-mask-repeat-y"?: Property$WebkitMaskRepeatY | Array<Property$WebkitMaskRepeatY>, - "-webkit-mask-size"?: Property$WebkitMaskSize<TLength> | Array<Property$WebkitMaskSize<TLength>>, - "-webkit-max-inline-size"?: Property$MaxInlineSize<TLength> | Array<Property$MaxInlineSize<TLength>>, - "-webkit-order"?: Property$Order | Array<Property$Order>, - "-webkit-overflow-scrolling"?: Property$WebkitOverflowScrolling | Array<Property$WebkitOverflowScrolling>, - "-webkit-padding-end"?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, - "-webkit-padding-start"?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, - "-webkit-perspective"?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, - "-webkit-perspective-origin"?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, - "-webkit-print-color-adjust"?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, - "-webkit-ruby-position"?: Property$RubyPosition | Array<Property$RubyPosition>, - "-webkit-scroll-snap-type"?: Property$ScrollSnapType | Array<Property$ScrollSnapType>, - "-webkit-shape-margin"?: Property$ShapeMargin<TLength> | Array<Property$ShapeMargin<TLength>>, - "-webkit-tap-highlight-color"?: Property$WebkitTapHighlightColor | Array<Property$WebkitTapHighlightColor>, - "-webkit-text-combine"?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, - "-webkit-text-decoration-color"?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, - "-webkit-text-decoration-line"?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, - "-webkit-text-decoration-skip"?: Property$TextDecorationSkip | Array<Property$TextDecorationSkip>, - "-webkit-text-decoration-style"?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, - "-webkit-text-emphasis-color"?: Property$TextEmphasisColor | Array<Property$TextEmphasisColor>, - "-webkit-text-emphasis-position"?: Property$TextEmphasisPosition | Array<Property$TextEmphasisPosition>, - "-webkit-text-emphasis-style"?: Property$TextEmphasisStyle | Array<Property$TextEmphasisStyle>, - "-webkit-text-fill-color"?: Property$WebkitTextFillColor | Array<Property$WebkitTextFillColor>, - "-webkit-text-orientation"?: Property$TextOrientation | Array<Property$TextOrientation>, - "-webkit-text-size-adjust"?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, - "-webkit-text-stroke-color"?: Property$WebkitTextStrokeColor | Array<Property$WebkitTextStrokeColor>, - "-webkit-text-stroke-width"?: Property$WebkitTextStrokeWidth<TLength> | Array<Property$WebkitTextStrokeWidth<TLength>>, - "-webkit-text-underline-position"?: Property$TextUnderlinePosition | Array<Property$TextUnderlinePosition>, - "-webkit-touch-callout"?: Property$WebkitTouchCallout | Array<Property$WebkitTouchCallout>, - "-webkit-transform"?: Property$Transform | Array<Property$Transform>, - "-webkit-transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, - "-webkit-transform-style"?: Property$TransformStyle | Array<Property$TransformStyle>, - "-webkit-transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, - "-webkit-transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, - "-webkit-transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, - "-webkit-transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, - "-webkit-user-modify"?: Property$WebkitUserModify | Array<Property$WebkitUserModify>, - "-webkit-user-select"?: Property$UserSelect | Array<Property$UserSelect>, - "-webkit-writing-mode"?: Property$WritingMode | Array<Property$WritingMode>, -|}; - -export type VendorShorthandPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| - "-moz-animation"?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, - "-moz-border-image"?: Property$BorderImage | Array<Property$BorderImage>, - "-moz-column-rule"?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, - "-moz-columns"?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, - "-moz-outline-radius"?: Property$MozOutlineRadius<TLength> | Array<Property$MozOutlineRadius<TLength>>, - "-ms-content-zoom-limit"?: Property$MsContentZoomLimit | Array<Property$MsContentZoomLimit>, - "-ms-content-zoom-snap"?: Property$MsContentZoomSnap | Array<Property$MsContentZoomSnap>, - "-ms-flex"?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, - "-ms-scroll-limit"?: Property$MsScrollLimit | Array<Property$MsScrollLimit>, - "-ms-scroll-snap-x"?: Property$MsScrollSnapX | Array<Property$MsScrollSnapX>, - "-ms-scroll-snap-y"?: Property$MsScrollSnapY | Array<Property$MsScrollSnapY>, - "-ms-transition"?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, - "-webkit-animation"?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, - "-webkit-border-before"?: Property$WebkitBorderBefore<TLength> | Array<Property$WebkitBorderBefore<TLength>>, - "-webkit-border-image"?: Property$BorderImage | Array<Property$BorderImage>, - "-webkit-border-radius"?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, - "-webkit-column-rule"?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, - "-webkit-columns"?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, - "-webkit-flex"?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, - "-webkit-flex-flow"?: Property$FlexFlow | Array<Property$FlexFlow>, - "-webkit-mask"?: Property$WebkitMask<TLength> | Array<Property$WebkitMask<TLength>>, - "-webkit-mask-box-image"?: Property$MaskBorder | Array<Property$MaskBorder>, - "-webkit-text-emphasis"?: Property$TextEmphasis | Array<Property$TextEmphasis>, - "-webkit-text-stroke"?: Property$WebkitTextStroke<TLength> | Array<Property$WebkitTextStroke<TLength>>, - "-webkit-transition"?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, -|}; - -export type VendorPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| - ...VendorLonghandPropertiesHyphenFallback<TLength, TTime>, - ...VendorShorthandPropertiesHyphenFallback<TLength, TTime>, -|}; - -export type ObsoletePropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| - azimuth?: Property$Azimuth | Array<Property$Azimuth>, - "box-align"?: Property$BoxAlign | Array<Property$BoxAlign>, - "box-direction"?: Property$BoxDirection | Array<Property$BoxDirection>, - "box-flex"?: Property$BoxFlex | Array<Property$BoxFlex>, - "box-flex-group"?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, - "box-lines"?: Property$BoxLines | Array<Property$BoxLines>, - "box-ordinal-group"?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, - "box-orient"?: Property$BoxOrient | Array<Property$BoxOrient>, - "box-pack"?: Property$BoxPack | Array<Property$BoxPack>, - clip?: Property$Clip | Array<Property$Clip>, - "grid-column-gap"?: Property$GridColumnGap<TLength> | Array<Property$GridColumnGap<TLength>>, - "grid-gap"?: Property$GridGap<TLength> | Array<Property$GridGap<TLength>>, - "grid-row-gap"?: Property$GridRowGap<TLength> | Array<Property$GridRowGap<TLength>>, - "ime-mode"?: Property$ImeMode | Array<Property$ImeMode>, - "offset-block"?: Property$InsetBlock<TLength> | Array<Property$InsetBlock<TLength>>, - "offset-block-end"?: Property$InsetBlockEnd<TLength> | Array<Property$InsetBlockEnd<TLength>>, - "offset-block-start"?: Property$InsetBlockStart<TLength> | Array<Property$InsetBlockStart<TLength>>, - "offset-inline"?: Property$InsetInline<TLength> | Array<Property$InsetInline<TLength>>, - "offset-inline-end"?: Property$InsetInlineEnd<TLength> | Array<Property$InsetInlineEnd<TLength>>, - "offset-inline-start"?: Property$InsetInlineStart<TLength> | Array<Property$InsetInlineStart<TLength>>, - "scroll-snap-coordinate"?: Property$ScrollSnapCoordinate<TLength> | Array<Property$ScrollSnapCoordinate<TLength>>, - "scroll-snap-destination"?: Property$ScrollSnapDestination<TLength> | Array<Property$ScrollSnapDestination<TLength>>, - "scroll-snap-points-x"?: Property$ScrollSnapPointsX | Array<Property$ScrollSnapPointsX>, - "scroll-snap-points-y"?: Property$ScrollSnapPointsY | Array<Property$ScrollSnapPointsY>, - "scroll-snap-type-x"?: Property$ScrollSnapTypeX | Array<Property$ScrollSnapTypeX>, - "scroll-snap-type-y"?: Property$ScrollSnapTypeY | Array<Property$ScrollSnapTypeY>, - "-khtml-box-align"?: Property$BoxAlign | Array<Property$BoxAlign>, - "-khtml-box-direction"?: Property$BoxDirection | Array<Property$BoxDirection>, - "-khtml-box-flex"?: Property$BoxFlex | Array<Property$BoxFlex>, - "-khtml-box-flex-group"?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, - "-khtml-box-lines"?: Property$BoxLines | Array<Property$BoxLines>, - "-khtml-box-ordinal-group"?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, - "-khtml-box-orient"?: Property$BoxOrient | Array<Property$BoxOrient>, - "-khtml-box-pack"?: Property$BoxPack | Array<Property$BoxPack>, - "-khtml-line-break"?: Property$LineBreak | Array<Property$LineBreak>, - "-khtml-opacity"?: Property$Opacity | Array<Property$Opacity>, - "-khtml-user-select"?: Property$UserSelect | Array<Property$UserSelect>, - "-moz-backface-visibility"?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, - "-moz-background-clip"?: Property$BackgroundClip | Array<Property$BackgroundClip>, - "-moz-background-inline-policy"?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, - "-moz-background-origin"?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, - "-moz-background-size"?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, - "-moz-border-radius"?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, - "-moz-border-radius-bottomleft"?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, - "-moz-border-radius-bottomright"?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, - "-moz-border-radius-topleft"?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, - "-moz-border-radius-topright"?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, - "-moz-box-align"?: Property$BoxAlign | Array<Property$BoxAlign>, - "-moz-box-direction"?: Property$BoxDirection | Array<Property$BoxDirection>, - "-moz-box-flex"?: Property$BoxFlex | Array<Property$BoxFlex>, - "-moz-box-ordinal-group"?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, - "-moz-box-orient"?: Property$BoxOrient | Array<Property$BoxOrient>, - "-moz-box-pack"?: Property$BoxPack | Array<Property$BoxPack>, - "-moz-box-shadow"?: Property$BoxShadow | Array<Property$BoxShadow>, - "-moz-float-edge"?: Property$MozFloatEdge | Array<Property$MozFloatEdge>, - "-moz-force-broken-image-icon"?: Property$MozForceBrokenImageIcon | Array<Property$MozForceBrokenImageIcon>, - "-moz-opacity"?: Property$Opacity | Array<Property$Opacity>, - "-moz-outline"?: Property$Outline<TLength> | Array<Property$Outline<TLength>>, - "-moz-outline-color"?: Property$OutlineColor | Array<Property$OutlineColor>, - "-moz-outline-style"?: Property$OutlineStyle | Array<Property$OutlineStyle>, - "-moz-outline-width"?: Property$OutlineWidth<TLength> | Array<Property$OutlineWidth<TLength>>, - "-moz-perspective"?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, - "-moz-perspective-origin"?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, - "-moz-text-align-last"?: Property$TextAlignLast | Array<Property$TextAlignLast>, - "-moz-text-decoration-color"?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, - "-moz-text-decoration-line"?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, - "-moz-text-decoration-style"?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, - "-moz-transform"?: Property$Transform | Array<Property$Transform>, - "-moz-transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, - "-moz-transform-style"?: Property$TransformStyle | Array<Property$TransformStyle>, - "-moz-transition"?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, - "-moz-transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, - "-moz-transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, - "-moz-transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, - "-moz-transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, - "-moz-user-input"?: Property$MozUserInput | Array<Property$MozUserInput>, - "-ms-ime-mode"?: Property$ImeMode | Array<Property$ImeMode>, - "-o-animation"?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, - "-o-animation-delay"?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, - "-o-animation-direction"?: Property$AnimationDirection | Array<Property$AnimationDirection>, - "-o-animation-duration"?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, - "-o-animation-fill-mode"?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, - "-o-animation-iteration-count"?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, - "-o-animation-name"?: Property$AnimationName | Array<Property$AnimationName>, - "-o-animation-play-state"?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, - "-o-animation-timing-function"?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, - "-o-background-size"?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, - "-o-border-image"?: Property$BorderImage | Array<Property$BorderImage>, - "-o-object-fit"?: Property$ObjectFit | Array<Property$ObjectFit>, - "-o-object-position"?: Property$ObjectPosition<TLength> | Array<Property$ObjectPosition<TLength>>, - "-o-tab-size"?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, - "-o-text-overflow"?: Property$TextOverflow | Array<Property$TextOverflow>, - "-o-transform"?: Property$Transform | Array<Property$Transform>, - "-o-transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, - "-o-transition"?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, - "-o-transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, - "-o-transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, - "-o-transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, - "-o-transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, - "-webkit-box-align"?: Property$BoxAlign | Array<Property$BoxAlign>, - "-webkit-box-direction"?: Property$BoxDirection | Array<Property$BoxDirection>, - "-webkit-box-flex"?: Property$BoxFlex | Array<Property$BoxFlex>, - "-webkit-box-flex-group"?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, - "-webkit-box-lines"?: Property$BoxLines | Array<Property$BoxLines>, - "-webkit-box-ordinal-group"?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, - "-webkit-box-orient"?: Property$BoxOrient | Array<Property$BoxOrient>, - "-webkit-box-pack"?: Property$BoxPack | Array<Property$BoxPack>, -|}; - -export type SvgPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| - "alignment-baseline"?: Property$AlignmentBaseline | Array<Property$AlignmentBaseline>, - "baseline-shift"?: Property$BaselineShift<TLength> | Array<Property$BaselineShift<TLength>>, - clip?: Property$Clip | Array<Property$Clip>, - "clip-path"?: Property$ClipPath | Array<Property$ClipPath>, - "clip-rule"?: Property$ClipRule | Array<Property$ClipRule>, - color?: Property$Color | Array<Property$Color>, - "color-interpolation"?: Property$ColorInterpolation | Array<Property$ColorInterpolation>, - "color-rendering"?: Property$ColorRendering | Array<Property$ColorRendering>, - cursor?: Property$Cursor | Array<Property$Cursor>, - direction?: Property$Direction | Array<Property$Direction>, - display?: Property$Display | Array<Property$Display>, - "dominant-baseline"?: Property$DominantBaseline | Array<Property$DominantBaseline>, - fill?: Property$Fill | Array<Property$Fill>, - "fill-opacity"?: Property$FillOpacity | Array<Property$FillOpacity>, - "fill-rule"?: Property$FillRule | Array<Property$FillRule>, - filter?: Property$Filter | Array<Property$Filter>, - "flood-color"?: Property$FloodColor | Array<Property$FloodColor>, - "flood-opacity"?: Property$FloodOpacity | Array<Property$FloodOpacity>, - font?: Property$Font | Array<Property$Font>, - "font-family"?: Property$FontFamily | Array<Property$FontFamily>, - "font-size"?: Property$FontSize<TLength> | Array<Property$FontSize<TLength>>, - "font-size-adjust"?: Property$FontSizeAdjust | Array<Property$FontSizeAdjust>, - "font-stretch"?: Property$FontStretch | Array<Property$FontStretch>, - "font-style"?: Property$FontStyle | Array<Property$FontStyle>, - "font-variant"?: Property$FontVariant | Array<Property$FontVariant>, - "font-weight"?: Property$FontWeight | Array<Property$FontWeight>, - "glyph-orientation-vertical"?: Property$GlyphOrientationVertical | Array<Property$GlyphOrientationVertical>, - "image-rendering"?: Property$ImageRendering | Array<Property$ImageRendering>, - "letter-spacing"?: Property$LetterSpacing<TLength> | Array<Property$LetterSpacing<TLength>>, - "lighting-color"?: Property$LightingColor | Array<Property$LightingColor>, - "line-height"?: Property$LineHeight<TLength> | Array<Property$LineHeight<TLength>>, - marker?: Property$Marker | Array<Property$Marker>, - "marker-end"?: Property$MarkerEnd | Array<Property$MarkerEnd>, - "marker-mid"?: Property$MarkerMid | Array<Property$MarkerMid>, - "marker-start"?: Property$MarkerStart | Array<Property$MarkerStart>, - mask?: Property$Mask<TLength> | Array<Property$Mask<TLength>>, - opacity?: Property$Opacity | Array<Property$Opacity>, - overflow?: Property$Overflow | Array<Property$Overflow>, - "paint-order"?: Property$PaintOrder | Array<Property$PaintOrder>, - "pointer-events"?: Property$PointerEvents | Array<Property$PointerEvents>, - "shape-rendering"?: Property$ShapeRendering | Array<Property$ShapeRendering>, - "stop-color"?: Property$StopColor | Array<Property$StopColor>, - "stop-opacity"?: Property$StopOpacity | Array<Property$StopOpacity>, - stroke?: Property$Stroke | Array<Property$Stroke>, - "stroke-dasharray"?: Property$StrokeDasharray<TLength> | Array<Property$StrokeDasharray<TLength>>, - "stroke-dashoffset"?: Property$StrokeDashoffset<TLength> | Array<Property$StrokeDashoffset<TLength>>, - "stroke-linecap"?: Property$StrokeLinecap | Array<Property$StrokeLinecap>, - "stroke-linejoin"?: Property$StrokeLinejoin | Array<Property$StrokeLinejoin>, - "stroke-miterlimit"?: Property$StrokeMiterlimit | Array<Property$StrokeMiterlimit>, - "stroke-opacity"?: Property$StrokeOpacity | Array<Property$StrokeOpacity>, - "stroke-width"?: Property$StrokeWidth<TLength> | Array<Property$StrokeWidth<TLength>>, - "text-anchor"?: Property$TextAnchor | Array<Property$TextAnchor>, - "text-decoration"?: Property$TextDecoration<TLength> | Array<Property$TextDecoration<TLength>>, - "text-rendering"?: Property$TextRendering | Array<Property$TextRendering>, - "unicode-bidi"?: Property$UnicodeBidi | Array<Property$UnicodeBidi>, - "vector-effect"?: Property$VectorEffect | Array<Property$VectorEffect>, - visibility?: Property$Visibility | Array<Property$Visibility>, - "white-space"?: Property$WhiteSpace | Array<Property$WhiteSpace>, - "word-spacing"?: Property$WordSpacing<TLength> | Array<Property$WordSpacing<TLength>>, - "writing-mode"?: Property$WritingMode | Array<Property$WritingMode>, -|}; - -export type PropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| - ...StandardPropertiesHyphenFallback<TLength, TTime>, - ...VendorPropertiesHyphenFallback<TLength, TTime>, - ...ObsoletePropertiesHyphenFallback<TLength, TTime>, - ...SvgPropertiesHyphenFallback<TLength, TTime>, -|}; - -export type AtRules = - | "@charset" - | "@counter-style" - | "@document" - | "@font-face" - | "@font-feature-values" - | "@font-palette-values" - | "@import" - | "@keyframes" - | "@layer" - | "@media" - | "@namespace" - | "@page" - | "@property" - | "@scope" - | "@scroll-timeline" - | "@starting-style" - | "@supports" - | "@viewport"; - -export type AdvancedPseudos = - | ":-moz-any()" - | ":-moz-dir" - | ":-webkit-any()" - | "::cue" - | "::cue-region" - | "::part" - | "::slotted" - | "::view-transition-group" - | "::view-transition-image-pair" - | "::view-transition-new" - | "::view-transition-old" - | ":dir" - | ":has" - | ":host" - | ":host-context" - | ":is" - | ":lang" - | ":matches()" - | ":not" - | ":nth-child" - | ":nth-last-child" - | ":nth-last-of-type" - | ":nth-of-type" - | ":where"; - -export type SimplePseudos = - | ":-khtml-any-link" - | ":-moz-any-link" - | ":-moz-focusring" - | ":-moz-full-screen" - | ":-moz-placeholder" - | ":-moz-read-only" - | ":-moz-read-write" - | ":-moz-ui-invalid" - | ":-moz-ui-valid" - | ":-ms-fullscreen" - | ":-ms-input-placeholder" - | ":-webkit-any-link" - | ":-webkit-full-screen" - | "::-moz-placeholder" - | "::-moz-progress-bar" - | "::-moz-range-progress" - | "::-moz-range-thumb" - | "::-moz-range-track" - | "::-moz-selection" - | "::-ms-backdrop" - | "::-ms-browse" - | "::-ms-check" - | "::-ms-clear" - | "::-ms-expand" - | "::-ms-fill" - | "::-ms-fill-lower" - | "::-ms-fill-upper" - | "::-ms-input-placeholder" - | "::-ms-reveal" - | "::-ms-thumb" - | "::-ms-ticks-after" - | "::-ms-ticks-before" - | "::-ms-tooltip" - | "::-ms-track" - | "::-ms-value" - | "::-webkit-backdrop" - | "::-webkit-input-placeholder" - | "::-webkit-progress-bar" - | "::-webkit-progress-inner-value" - | "::-webkit-progress-value" - | "::-webkit-slider-runnable-track" - | "::-webkit-slider-thumb" - | "::after" - | "::backdrop" - | "::before" - | "::cue" - | "::cue-region" - | "::first-letter" - | "::first-line" - | "::grammar-error" - | "::marker" - | "::placeholder" - | "::selection" - | "::spelling-error" - | "::target-text" - | "::view-transition" - | ":active" - | ":after" - | ":any-link" - | ":before" - | ":blank" - | ":checked" - | ":current" - | ":default" - | ":defined" - | ":disabled" - | ":empty" - | ":enabled" - | ":first" - | ":first-child" - | ":first-letter" - | ":first-line" - | ":first-of-type" - | ":focus" - | ":focus-visible" - | ":focus-within" - | ":fullscreen" - | ":future" - | ":hover" - | ":in-range" - | ":indeterminate" - | ":invalid" - | ":last-child" - | ":last-of-type" - | ":left" - | ":link" - | ":local-link" - | ":nth-col" - | ":nth-last-col" - | ":only-child" - | ":only-of-type" - | ":optional" - | ":out-of-range" - | ":past" - | ":paused" - | ":picture-in-picture" - | ":placeholder-shown" - | ":playing" - | ":read-only" - | ":read-write" - | ":required" - | ":right" - | ":root" - | ":scope" - | ":target" - | ":target-within" - | ":user-invalid" - | ":user-valid" - | ":valid" - | ":visited"; - -export type Pseudos = AdvancedPseudos | SimplePseudos; - -export type HtmlAttributes = - | "[abbr]" - | "[accept-charset]" - | "[accept]" - | "[accesskey]" - | "[action]" - | "[align]" - | "[alink]" - | "[allow]" - | "[allowfullscreen]" - | "[allowpaymentrequest]" - | "[alt]" - | "[archive]" - | "[async]" - | "[attributionsrc]" - | "[autobuffer]" - | "[autocapitalize]" - | "[autocomplete]" - | "[autofocus]" - | "[autoplay]" - | "[axis]" - | "[background]" - | "[behavior]" - | "[bgcolor]" - | "[blocking]" - | "[border]" - | "[bottommargin]" - | "[browsingtopics]" - | "[capture]" - | "[cellpadding]" - | "[cellspacing]" - | "[char]" - | "[charoff]" - | "[charset]" - | "[checked]" - | "[cite]" - | "[class]" - | "[classid]" - | "[clear]" - | "[codebase]" - | "[codetype]" - | "[color]" - | "[cols]" - | "[colspan]" - | "[compact]" - | "[content]" - | "[contenteditable]" - | "[contextmenu]" - | "[controls]" - | "[coords]" - | "[credentialless]" - | "[crossorigin]" - | "[data]" - | "[datetime]" - | "[declare]" - | "[decoding]" - | "[default]" - | "[defer]" - | "[dir]" - | "[direction]" - | "[dirname]" - | "[disabled]" - | "[download]" - | "[draggable]" - | "[enctype]" - | "[enterkeyhint]" - | "[exportparts]" - | "[face]" - | "[fetchpriority]" - | "[for]" - | "[form]" - | "[formaction]" - | "[formenctype]" - | "[formmethod]" - | "[formnovalidate]" - | "[formtarget]" - | "[frame]" - | "[frameborder]" - | "[headers]" - | "[height]" - | "[hidden]" - | "[high]" - | "[href]" - | "[hreflang]" - | "[hspace]" - | "[http-equiv]" - | "[id]" - | "[imagesizes]" - | "[imagesrcset]" - | "[inert]" - | "[inputmode]" - | "[integrity]" - | "[is]" - | "[ismap]" - | "[itemid]" - | "[itemprop]" - | "[itemref]" - | "[itemscope]" - | "[itemtype]" - | "[kind]" - | "[label]" - | "[lang]" - | "[language]" - | "[leftmargin]" - | "[link]" - | "[list]" - | "[loading]" - | "[longdesc]" - | "[loop]" - | "[low]" - | "[manifest]" - | "[marginheight]" - | "[marginwidth]" - | "[max]" - | "[maxlength]" - | "[media]" - | "[method]" - | "[methods]" - | "[min]" - | "[minlength]" - | "[moz-opaque]" - | "[mozactionhint]" - | "[mozallowfullscreen]" - | "[msallowfullscreen]" - | "[multiple]" - | "[muted]" - | "[name]" - | "[nohref]" - | "[nomodule]" - | "[nonce]" - | "[noresize]" - | "[noshade]" - | "[novalidate]" - | "[nowrap]" - | "[onerror]" - | "[open]" - | "[optimum]" - | "[part]" - | "[pattern]" - | "[ping]" - | "[placeholder]" - | "[popover]" - | "[popovertarget]" - | "[popovertargetaction]" - | "[poster]" - | "[preload]" - | "[profile]" - | "[readonly]" - | "[referrerpolicy]" - | "[rel]" - | "[required]" - | "[rev]" - | "[reversed]" - | "[rightmargin]" - | "[rows]" - | "[rowspan]" - | "[rules]" - | "[sandbox]" - | "[scope]" - | "[scrollamount]" - | "[scrolldelay]" - | "[scrolling]" - | "[selected]" - | "[shadowroot]" - | "[shadowrootmode]" - | "[shape]" - | "[size]" - | "[sizes]" - | "[slot]" - | "[span]" - | "[spellcheck]" - | "[src]" - | "[srcdoc]" - | "[srclang]" - | "[srcset]" - | "[standby]" - | "[start]" - | "[step]" - | "[style]" - | "[summary]" - | "[tabindex]" - | "[target]" - | "[text]" - | "[title]" - | "[topmargin]" - | "[translate]" - | "[truespeed]" - | "[type]" - | "[usemap]" - | "[valign]" - | "[value]" - | "[valuetype]" - | "[version]" - | "[virtualkeyboardpolicy]" - | "[vlink]" - | "[vspace]" - | "[webkitallowfullscreen]" - | "[width]" - | "[wrap]" - | "[x-moz-errormessage]" - | "[xmlns]"; - -export type SvgAttributes = - | "[accent-height]" - | "[alignment-baseline]" - | "[allowReorder]" - | "[alphabetic]" - | "[animation]" - | "[arabic-form]" - | "[ascent]" - | "[async]" - | "[attributeName]" - | "[attributeType]" - | "[azimuth]" - | "[baseFrequency]" - | "[baseProfile]" - | "[baseline-shift]" - | "[bbox]" - | "[bias]" - | "[by]" - | "[calcMode]" - | "[cap-height]" - | "[class]" - | "[clip-path]" - | "[clip-rule]" - | "[clipPathUnits]" - | "[clip]" - | "[color-interpolation-filters]" - | "[color-interpolation]" - | "[color-profile]" - | "[color]" - | "[contentScriptType]" - | "[contentStyleType]" - | "[crossorigin]" - | "[cursor]" - | "[cx]" - | "[cy]" - | "[d]" - | "[decoding]" - | "[defer]" - | "[descent]" - | "[diffuseConstant]" - | "[direction]" - | "[display]" - | "[divisor]" - | "[document]" - | "[dominant-baseline]" - | "[download]" - | "[dur]" - | "[dx]" - | "[dy]" - | "[edgeMode]" - | "[elevation]" - | "[enable-background]" - | "[fill-opacity]" - | "[fill-rule]" - | "[fill]" - | "[filterRes]" - | "[filterUnits]" - | "[filter]" - | "[flood-color]" - | "[flood-opacity]" - | "[font-family]" - | "[font-size-adjust]" - | "[font-size]" - | "[font-stretch]" - | "[font-style]" - | "[font-variant]" - | "[font-weight]" - | "[format]" - | "[fr]" - | "[from]" - | "[fx]" - | "[fy]" - | "[g1]" - | "[g2]" - | "[global]" - | "[glyph-name]" - | "[glyph-orientation-horizontal]" - | "[glyph-orientation-vertical]" - | "[glyphRef]" - | "[gradientTransform]" - | "[gradientUnits]" - | "[graphical]" - | "[hanging]" - | "[height]" - | "[horiz-adv-x]" - | "[horiz-origin-x]" - | "[horiz-origin-y]" - | "[href]" - | "[hreflang]" - | "[id]" - | "[ideographic]" - | "[image-rendering]" - | "[in2]" - | "[in]" - | "[k1]" - | "[k2]" - | "[k3]" - | "[k4]" - | "[k]" - | "[kernelMatrix]" - | "[kernelUnitLength]" - | "[kerning]" - | "[keyPoints]" - | "[lang]" - | "[lengthAdjust]" - | "[letter-spacing]" - | "[lighting-color]" - | "[limitingConeAngle]" - | "[marker-end]" - | "[marker-mid]" - | "[marker-start]" - | "[markerHeight]" - | "[markerUnits]" - | "[markerWidth]" - | "[maskContentUnits]" - | "[maskUnits]" - | "[mask]" - | "[mathematical]" - | "[media]" - | "[mode]" - | "[name]" - | "[numOctaves]" - | "[offset]" - | "[opacity]" - | "[operator]" - | "[order]" - | "[orient]" - | "[orientation]" - | "[origin]" - | "[overflow]" - | "[overline-position]" - | "[overline-thickness]" - | "[paint-order]" - | "[panose-1]" - | "[path]" - | "[patternContentUnits]" - | "[patternTransform]" - | "[patternUnits]" - | "[ping]" - | "[pointer-events]" - | "[pointsAtX]" - | "[pointsAtY]" - | "[pointsAtZ]" - | "[points]" - | "[preserveAlpha]" - | "[preserveAspectRatio]" - | "[primitiveUnits]" - | "[r]" - | "[radius]" - | "[refX]" - | "[refY]" - | "[referrerpolicy]" - | "[rel]" - | "[repeatCount]" - | "[requiredExtensions]" - | "[requiredFeatures]" - | "[rotate]" - | "[rx]" - | "[ry]" - | "[scale]" - | "[seed]" - | "[shape-rendering]" - | "[side]" - | "[slope]" - | "[solid-color]" - | "[solid-opacity]" - | "[spacing]" - | "[specularConstant]" - | "[specularExponent]" - | "[spreadMethod]" - | "[startOffset]" - | "[stdDeviation]" - | "[stemh]" - | "[stemv]" - | "[stitchTiles]" - | "[stop-color]" - | "[stop-opacity]" - | "[strikethrough-position]" - | "[strikethrough-thickness]" - | "[string]" - | "[stroke-dasharray]" - | "[stroke-dashoffset]" - | "[stroke-linecap]" - | "[stroke-linejoin]" - | "[stroke-miterlimit]" - | "[stroke-opacity]" - | "[stroke-width]" - | "[stroke]" - | "[style]" - | "[surfaceScale]" - | "[systemLanguage]" - | "[tabindex]" - | "[targetX]" - | "[targetY]" - | "[target]" - | "[text-anchor]" - | "[text-decoration]" - | "[text-overflow]" - | "[text-rendering]" - | "[textLength]" - | "[title]" - | "[to]" - | "[transform-origin]" - | "[transform]" - | "[type]" - | "[u1]" - | "[u2]" - | "[underline-position]" - | "[underline-thickness]" - | "[unicode-bidi]" - | "[unicode-range]" - | "[unicode]" - | "[units-per-em]" - | "[v-alphabetic]" - | "[v-hanging]" - | "[v-ideographic]" - | "[v-mathematical]" - | "[values]" - | "[vector-effect]" - | "[version]" - | "[vert-adv-y]" - | "[vert-origin-x]" - | "[vert-origin-y]" - | "[viewBox]" - | "[viewTarget]" - | "[visibility]" - | "[white-space]" - | "[width]" - | "[widths]" - | "[word-spacing]" - | "[writing-mode]" - | "[x-height]" - | "[x1]" - | "[x2]" - | "[xChannelSelector]" - | "[x]" - | "[y1]" - | "[y2]" - | "[yChannelSelector]" - | "[y]" - | "[z]" - | "[zoomAndPan]"; - -export type Globals = "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset"; - -export type Property$AccentColor = Globals | DataType$Color | "auto"; - -export type Property$AlignContent = Globals | DataType$ContentDistribution | DataType$ContentPosition | "baseline" | "normal" | string; - -export type Property$AlignItems = Globals | DataType$SelfPosition | "baseline" | "normal" | "stretch" | string; - -export type Property$AlignSelf = Globals | DataType$SelfPosition | "auto" | "baseline" | "normal" | "stretch" | string; - -export type Property$AlignTracks = Globals | DataType$ContentDistribution | DataType$ContentPosition | "baseline" | "normal" | string; - -export type Property$All = Globals; - -export type Property$Animation<TTime = string> = Globals | DataType$SingleAnimation<TTime> | string; - -export type Property$AnimationComposition = Globals | DataType$SingleAnimationComposition | string; - -export type Property$AnimationDelay<TTime = string> = Globals | TTime | string; - -export type Property$AnimationDirection = Globals | DataType$SingleAnimationDirection | string; - -export type Property$AnimationDuration<TTime = string> = Globals | TTime | string; - -export type Property$AnimationFillMode = Globals | DataType$SingleAnimationFillMode | string; - -export type Property$AnimationIterationCount = Globals | "infinite" | string | number; - -export type Property$AnimationName = Globals | "none" | string; - -export type Property$AnimationPlayState = Globals | "paused" | "running" | string; - -export type Property$AnimationRange<TLength = string | 0> = Globals | DataType$TimelineRangeName | TLength | "normal" | string; - -export type Property$AnimationRangeEnd<TLength = string | 0> = Globals | DataType$TimelineRangeName | TLength | "normal" | string; - -export type Property$AnimationRangeStart<TLength = string | 0> = Globals | DataType$TimelineRangeName | TLength | "normal" | string; - -export type Property$AnimationTimeline = Globals | DataType$SingleAnimationTimeline | string; - -export type Property$AnimationTimingFunction = Globals | DataType$EasingFunction | string; - -export type Property$Appearance = Globals | DataType$CompatAuto | "auto" | "menulist-button" | "none" | "textfield"; - -export type Property$AspectRatio = Globals | "auto" | string | number; - -export type Property$Azimuth = - | Globals - | "behind" - | "center" - | "center-left" - | "center-right" - | "far-left" - | "far-right" - | "left" - | "left-side" - | "leftwards" - | "right" - | "right-side" - | "rightwards" - | string; - -export type Property$BackdropFilter = Globals | "none" | string; - -export type Property$BackfaceVisibility = Globals | "hidden" | "visible"; - -export type Property$Background<TLength = string | 0> = Globals | DataType$FinalBgLayer<TLength> | string; - -export type Property$BackgroundAttachment = Globals | DataType$Attachment | string; - -export type Property$BackgroundBlendMode = Globals | DataType$BlendMode | string; - -export type Property$BackgroundClip = Globals | DataType$Box | string; - -export type Property$BackgroundColor = Globals | DataType$Color; - -export type Property$BackgroundImage = Globals | "none" | string; - -export type Property$BackgroundOrigin = Globals | DataType$Box | string; - -export type Property$BackgroundPosition<TLength = string | 0> = Globals | DataType$BgPosition<TLength> | string; - -export type Property$BackgroundPositionX<TLength = string | 0> = Globals | TLength | "center" | "left" | "right" | "x-end" | "x-start" | string; - -export type Property$BackgroundPositionY<TLength = string | 0> = Globals | TLength | "bottom" | "center" | "top" | "y-end" | "y-start" | string; - -export type Property$BackgroundRepeat = Globals | DataType$RepeatStyle | string; - -export type Property$BackgroundSize<TLength = string | 0> = Globals | DataType$BgSize<TLength> | string; - -export type Property$BlockOverflow = Globals | "clip" | "ellipsis" | string; - -export type Property$BlockSize<TLength = string | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | string; - -export type Property$Border<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; - -export type Property$BorderBlock<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; - -export type Property$BorderBlockColor = Globals | DataType$Color | string; - -export type Property$BorderBlockEnd<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; - -export type Property$BorderBlockEndColor = Globals | DataType$Color; - -export type Property$BorderBlockEndStyle = Globals | DataType$LineStyle; - -export type Property$BorderBlockEndWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; - -export type Property$BorderBlockStart<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; - -export type Property$BorderBlockStartColor = Globals | DataType$Color; - -export type Property$BorderBlockStartStyle = Globals | DataType$LineStyle; - -export type Property$BorderBlockStartWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; - -export type Property$BorderBlockStyle = Globals | DataType$LineStyle; - -export type Property$BorderBlockWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; - -export type Property$BorderBottom<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; - -export type Property$BorderBottomColor = Globals | DataType$Color; - -export type Property$BorderBottomLeftRadius<TLength = string | 0> = Globals | TLength | string; - -export type Property$BorderBottomRightRadius<TLength = string | 0> = Globals | TLength | string; - -export type Property$BorderBottomStyle = Globals | DataType$LineStyle; - -export type Property$BorderBottomWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; - -export type Property$BorderCollapse = Globals | "collapse" | "separate"; - -export type Property$BorderColor = Globals | DataType$Color | string; - -export type Property$BorderEndEndRadius<TLength = string | 0> = Globals | TLength | string; - -export type Property$BorderEndStartRadius<TLength = string | 0> = Globals | TLength | string; - -export type Property$BorderImage = Globals | "none" | "repeat" | "round" | "space" | "stretch" | string | number; - -export type Property$BorderImageOutset<TLength = string | 0> = Globals | TLength | string | number; - -export type Property$BorderImageRepeat = Globals | "repeat" | "round" | "space" | "stretch" | string; - -export type Property$BorderImageSlice = Globals | string | number; - -export type Property$BorderImageSource = Globals | "none" | string; - -export type Property$BorderImageWidth<TLength = string | 0> = Globals | TLength | "auto" | string | number; - -export type Property$BorderInline<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; - -export type Property$BorderInlineColor = Globals | DataType$Color | string; - -export type Property$BorderInlineEnd<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; - -export type Property$BorderInlineEndColor = Globals | DataType$Color; - -export type Property$BorderInlineEndStyle = Globals | DataType$LineStyle; - -export type Property$BorderInlineEndWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; - -export type Property$BorderInlineStart<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; - -export type Property$BorderInlineStartColor = Globals | DataType$Color; - -export type Property$BorderInlineStartStyle = Globals | DataType$LineStyle; - -export type Property$BorderInlineStartWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; - -export type Property$BorderInlineStyle = Globals | DataType$LineStyle; - -export type Property$BorderInlineWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; - -export type Property$BorderLeft<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; - -export type Property$BorderLeftColor = Globals | DataType$Color; - -export type Property$BorderLeftStyle = Globals | DataType$LineStyle; - -export type Property$BorderLeftWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; - -export type Property$BorderRadius<TLength = string | 0> = Globals | TLength | string; - -export type Property$BorderRight<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; - -export type Property$BorderRightColor = Globals | DataType$Color; - -export type Property$BorderRightStyle = Globals | DataType$LineStyle; - -export type Property$BorderRightWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; - -export type Property$BorderSpacing<TLength = string | 0> = Globals | TLength | string; - -export type Property$BorderStartEndRadius<TLength = string | 0> = Globals | TLength | string; - -export type Property$BorderStartStartRadius<TLength = string | 0> = Globals | TLength | string; - -export type Property$BorderStyle = Globals | DataType$LineStyle | string; - -export type Property$BorderTop<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; - -export type Property$BorderTopColor = Globals | DataType$Color; - -export type Property$BorderTopLeftRadius<TLength = string | 0> = Globals | TLength | string; - -export type Property$BorderTopRightRadius<TLength = string | 0> = Globals | TLength | string; - -export type Property$BorderTopStyle = Globals | DataType$LineStyle; - -export type Property$BorderTopWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; - -export type Property$BorderWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | string; - -export type Property$Bottom<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$BoxAlign = Globals | "baseline" | "center" | "end" | "start" | "stretch"; - -export type Property$BoxDecorationBreak = Globals | "clone" | "slice"; - -export type Property$BoxDirection = Globals | "inherit" | "normal" | "reverse"; - -export type Property$BoxFlex = Globals | number; - -export type Property$BoxFlexGroup = Globals | number; - -export type Property$BoxLines = Globals | "multiple" | "single"; - -export type Property$BoxOrdinalGroup = Globals | number; - -export type Property$BoxOrient = Globals | "block-axis" | "horizontal" | "inherit" | "inline-axis" | "vertical"; - -export type Property$BoxPack = Globals | "center" | "end" | "justify" | "start"; - -export type Property$BoxShadow = Globals | "none" | string; - -export type Property$BoxSizing = Globals | "border-box" | "content-box"; - -export type Property$BreakAfter = - | Globals - | "all" - | "always" - | "auto" - | "avoid" - | "avoid-column" - | "avoid-page" - | "avoid-region" - | "column" - | "left" - | "page" - | "recto" - | "region" - | "right" - | "verso"; - -export type Property$BreakBefore = - | Globals - | "all" - | "always" - | "auto" - | "avoid" - | "avoid-column" - | "avoid-page" - | "avoid-region" - | "column" - | "left" - | "page" - | "recto" - | "region" - | "right" - | "verso"; - -export type Property$BreakInside = Globals | "auto" | "avoid" | "avoid-column" | "avoid-page" | "avoid-region"; - -export type Property$CaptionSide = Globals | "block-end" | "block-start" | "bottom" | "inline-end" | "inline-start" | "top"; - -export type Property$Caret = Globals | DataType$Color | "auto" | "bar" | "block" | "underscore" | string; - -export type Property$CaretColor = Globals | DataType$Color | "auto"; - -export type Property$CaretShape = Globals | "auto" | "bar" | "block" | "underscore"; - -export type Property$Clear = Globals | "both" | "inline-end" | "inline-start" | "left" | "none" | "right"; - -export type Property$Clip = Globals | "auto" | string; - -export type Property$ClipPath = Globals | DataType$GeometryBox | "none" | string; - -export type Property$Color = Globals | DataType$Color; - -export type Property$PrintColorAdjust = Globals | "economy" | "exact"; - -export type Property$ColorScheme = Globals | "dark" | "light" | "normal" | string; - -export type Property$ColumnCount = Globals | "auto" | number; - -export type Property$ColumnFill = Globals | "auto" | "balance" | "balance-all"; - -export type Property$ColumnGap<TLength = string | 0> = Globals | TLength | "normal" | string; - -export type Property$ColumnRule<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; - -export type Property$ColumnRuleColor = Globals | DataType$Color; - -export type Property$ColumnRuleStyle = Globals | DataType$LineStyle | string; - -export type Property$ColumnRuleWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | string; - -export type Property$ColumnSpan = Globals | "all" | "none"; - -export type Property$ColumnWidth<TLength = string | 0> = Globals | TLength | "auto"; - -export type Property$Columns<TLength = string | 0> = Globals | TLength | "auto" | string | number; - -export type Property$Contain = Globals | "content" | "inline-size" | "layout" | "none" | "paint" | "size" | "strict" | "style" | string; - -export type Property$ContainIntrinsicBlockSize<TLength = string | 0> = Globals | TLength | "none" | string; - -export type Property$ContainIntrinsicHeight<TLength = string | 0> = Globals | TLength | "none" | string; - -export type Property$ContainIntrinsicInlineSize<TLength = string | 0> = Globals | TLength | "none" | string; - -export type Property$ContainIntrinsicSize<TLength = string | 0> = Globals | TLength | "none" | string; - -export type Property$ContainIntrinsicWidth<TLength = string | 0> = Globals | TLength | "none" | string; - -export type Property$Container = Globals | "none" | string; - -export type Property$ContainerName = Globals | "none" | string; - -export type Property$ContainerType = Globals | "inline-size" | "normal" | "size"; - -export type Property$Content = Globals | DataType$ContentList | "none" | "normal" | string; - -export type Property$ContentVisibility = Globals | "auto" | "hidden" | "visible"; - -export type Property$CounterIncrement = Globals | "none" | string; - -export type Property$CounterReset = Globals | "none" | string; - -export type Property$CounterSet = Globals | "none" | string; - -export type Property$Cursor = - | Globals - | "-moz-grab" - | "-webkit-grab" - | "alias" - | "all-scroll" - | "auto" - | "cell" - | "col-resize" - | "context-menu" - | "copy" - | "crosshair" - | "default" - | "e-resize" - | "ew-resize" - | "grab" - | "grabbing" - | "help" - | "move" - | "n-resize" - | "ne-resize" - | "nesw-resize" - | "no-drop" - | "none" - | "not-allowed" - | "ns-resize" - | "nw-resize" - | "nwse-resize" - | "pointer" - | "progress" - | "row-resize" - | "s-resize" - | "se-resize" - | "sw-resize" - | "text" - | "vertical-text" - | "w-resize" - | "wait" - | "zoom-in" - | "zoom-out" - | string; - -export type Property$Direction = Globals | "ltr" | "rtl"; - -export type Property$Display = - | Globals - | DataType$DisplayOutside - | DataType$DisplayInside - | DataType$DisplayInternal - | DataType$DisplayLegacy - | "contents" - | "list-item" - | "none" - | string; - -export type Property$EmptyCells = Globals | "hide" | "show"; - -export type Property$Filter = Globals | "none" | string; - -export type Property$Flex<TLength = string | 0> = Globals | TLength | "auto" | "content" | "fit-content" | "max-content" | "min-content" | "none" | string | number; - -export type Property$FlexBasis<TLength = string | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-auto" - | "auto" - | "content" - | "fit-content" - | "max-content" - | "min-content" - | string; - -export type Property$FlexDirection = Globals | "column" | "column-reverse" | "row" | "row-reverse"; - -export type Property$FlexFlow = Globals | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | string; - -export type Property$FlexGrow = Globals | number; - -export type Property$FlexShrink = Globals | number; - -export type Property$FlexWrap = Globals | "nowrap" | "wrap" | "wrap-reverse"; - -export type Property$Float = Globals | "inline-end" | "inline-start" | "left" | "none" | "right"; - -export type Property$Font = Globals | "caption" | "icon" | "menu" | "message-box" | "small-caption" | "status-bar" | string; - -export type Property$FontFamily = Globals | DataType$GenericFamily | string; - -export type Property$FontFeatureSettings = Globals | "normal" | string; - -export type Property$FontKerning = Globals | "auto" | "none" | "normal"; - -export type Property$FontLanguageOverride = Globals | "normal" | string; - -export type Property$FontOpticalSizing = Globals | "auto" | "none"; - -export type Property$FontPalette = Globals | "dark" | "light" | "normal" | string; - -export type Property$FontSize<TLength = string | 0> = Globals | DataType$AbsoluteSize | TLength | "larger" | "smaller" | string; - -export type Property$FontSizeAdjust = Globals | "from-font" | "none" | string | number; - -export type Property$FontSmooth<TLength = string | 0> = Globals | DataType$AbsoluteSize | TLength | "always" | "auto" | "never"; - -export type Property$FontStretch = Globals | DataType$FontStretchAbsolute; - -export type Property$FontStyle = Globals | "italic" | "normal" | "oblique" | string; - -export type Property$FontSynthesis = Globals | "none" | "position" | "small-caps" | "style" | "weight" | string; - -export type Property$FontSynthesisPosition = Globals | "auto" | "none"; - -export type Property$FontSynthesisSmallCaps = Globals | "auto" | "none"; - -export type Property$FontSynthesisStyle = Globals | "auto" | "none"; - -export type Property$FontSynthesisWeight = Globals | "auto" | "none"; - -export type Property$FontVariant = - | Globals - | DataType$EastAsianVariantValues - | "all-petite-caps" - | "all-small-caps" - | "common-ligatures" - | "contextual" - | "diagonal-fractions" - | "discretionary-ligatures" - | "full-width" - | "historical-forms" - | "historical-ligatures" - | "lining-nums" - | "no-common-ligatures" - | "no-contextual" - | "no-discretionary-ligatures" - | "no-historical-ligatures" - | "none" - | "normal" - | "oldstyle-nums" - | "ordinal" - | "petite-caps" - | "proportional-nums" - | "proportional-width" - | "ruby" - | "slashed-zero" - | "small-caps" - | "stacked-fractions" - | "tabular-nums" - | "titling-caps" - | "unicase" - | string; - -export type Property$FontVariantAlternates = Globals | "historical-forms" | "normal" | string; - -export type Property$FontVariantCaps = Globals | "all-petite-caps" | "all-small-caps" | "normal" | "petite-caps" | "small-caps" | "titling-caps" | "unicase"; - -export type Property$FontVariantEastAsian = Globals | DataType$EastAsianVariantValues | "full-width" | "normal" | "proportional-width" | "ruby" | string; - -export type Property$FontVariantEmoji = Globals | "emoji" | "normal" | "text" | "unicode"; - -export type Property$FontVariantLigatures = - | Globals - | "common-ligatures" - | "contextual" - | "discretionary-ligatures" - | "historical-ligatures" - | "no-common-ligatures" - | "no-contextual" - | "no-discretionary-ligatures" - | "no-historical-ligatures" - | "none" - | "normal" - | string; - -export type Property$FontVariantNumeric = - | Globals - | "diagonal-fractions" - | "lining-nums" - | "normal" - | "oldstyle-nums" - | "ordinal" - | "proportional-nums" - | "slashed-zero" - | "stacked-fractions" - | "tabular-nums" - | string; - -export type Property$FontVariantPosition = Globals | "normal" | "sub" | "super"; - -export type Property$FontVariationSettings = Globals | "normal" | string; - -export type Property$FontWeight = Globals | DataType$FontWeightAbsolute | "bolder" | "lighter"; - -export type Property$ForcedColorAdjust = Globals | "auto" | "none"; - -export type Property$Gap<TLength = string | 0> = Globals | TLength | "normal" | string; - -export type Property$Grid = Globals | "none" | string; - -export type Property$GridArea = Globals | DataType$GridLine | string; - -export type Property$GridAutoColumns<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | string; - -export type Property$GridAutoFlow = Globals | "column" | "dense" | "row" | string; - -export type Property$GridAutoRows<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | string; - -export type Property$GridColumn = Globals | DataType$GridLine | string; - -export type Property$GridColumnEnd = Globals | DataType$GridLine; - -export type Property$GridColumnGap<TLength = string | 0> = Globals | TLength | string; - -export type Property$GridColumnStart = Globals | DataType$GridLine; - -export type Property$GridGap<TLength = string | 0> = Globals | TLength | string; - -export type Property$GridRow = Globals | DataType$GridLine | string; - -export type Property$GridRowEnd = Globals | DataType$GridLine; - -export type Property$GridRowGap<TLength = string | 0> = Globals | TLength | string; - -export type Property$GridRowStart = Globals | DataType$GridLine; - -export type Property$GridTemplate = Globals | "none" | string; - -export type Property$GridTemplateAreas = Globals | "none" | string; - -export type Property$GridTemplateColumns<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | "none" | "subgrid" | string; - -export type Property$GridTemplateRows<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | "none" | "subgrid" | string; - -export type Property$HangingPunctuation = Globals | "allow-end" | "first" | "force-end" | "last" | "none" | string; - -export type Property$Height<TLength = string | 0> = - | Globals - | TLength - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | string; - -export type Property$HyphenateCharacter = Globals | "auto" | string; - -export type Property$HyphenateLimitChars = Globals | "auto" | string | number; - -export type Property$Hyphens = Globals | "auto" | "manual" | "none"; - -export type Property$ImageOrientation = Globals | "flip" | "from-image" | string; - -export type Property$ImageRendering = Globals | "-moz-crisp-edges" | "-webkit-optimize-contrast" | "auto" | "crisp-edges" | "pixelated"; - -export type Property$ImageResolution = Globals | "from-image" | string; - -export type Property$ImeMode = Globals | "active" | "auto" | "disabled" | "inactive" | "normal"; - -export type Property$InitialLetter = Globals | "normal" | string | number; - -export type Property$InlineSize<TLength = string | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | string; - -export type Property$InputSecurity = Globals | "auto" | "none"; - -export type Property$Inset<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$InsetBlock<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$InsetBlockEnd<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$InsetBlockStart<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$InsetInline<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$InsetInlineEnd<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$InsetInlineStart<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$Isolation = Globals | "auto" | "isolate"; - -export type Property$JustifyContent = Globals | DataType$ContentDistribution | DataType$ContentPosition | "left" | "normal" | "right" | string; - -export type Property$JustifyItems = Globals | DataType$SelfPosition | "baseline" | "left" | "legacy" | "normal" | "right" | "stretch" | string; - -export type Property$JustifySelf = Globals | DataType$SelfPosition | "auto" | "baseline" | "left" | "normal" | "right" | "stretch" | string; - -export type Property$JustifyTracks = Globals | DataType$ContentDistribution | DataType$ContentPosition | "left" | "normal" | "right" | string; - -export type Property$Left<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$LetterSpacing<TLength = string | 0> = Globals | TLength | "normal"; - -export type Property$LineBreak = Globals | "anywhere" | "auto" | "loose" | "normal" | "strict"; - -export type Property$LineClamp = Globals | "none" | number; - -export type Property$LineHeight<TLength = string | 0> = Globals | TLength | "normal" | string | number; - -export type Property$LineHeightStep<TLength = string | 0> = Globals | TLength; - -export type Property$ListStyle = Globals | "inside" | "none" | "outside" | string; - -export type Property$ListStyleImage = Globals | "none" | string; - -export type Property$ListStylePosition = Globals | "inside" | "outside"; - -export type Property$ListStyleType = Globals | "none" | string; - -export type Property$Margin<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$MarginBlock<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$MarginBlockEnd<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$MarginBlockStart<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$MarginBottom<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$MarginInline<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$MarginInlineEnd<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$MarginInlineStart<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$MarginLeft<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$MarginRight<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$MarginTop<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$MarginTrim = Globals | "all" | "in-flow" | "none"; - -export type Property$Mask<TLength = string | 0> = Globals | DataType$MaskLayer<TLength> | string; - -export type Property$MaskBorder = Globals | "alpha" | "luminance" | "none" | "repeat" | "round" | "space" | "stretch" | string | number; - -export type Property$MaskBorderMode = Globals | "alpha" | "luminance"; - -export type Property$MaskBorderOutset<TLength = string | 0> = Globals | TLength | string | number; - -export type Property$MaskBorderRepeat = Globals | "repeat" | "round" | "space" | "stretch" | string; - -export type Property$MaskBorderSlice = Globals | string | number; - -export type Property$MaskBorderSource = Globals | "none" | string; - -export type Property$MaskBorderWidth<TLength = string | 0> = Globals | TLength | "auto" | string | number; - -export type Property$MaskClip = Globals | DataType$GeometryBox | "no-clip" | string; - -export type Property$MaskComposite = Globals | DataType$CompositingOperator | string; - -export type Property$MaskImage = Globals | "none" | string; - -export type Property$MaskMode = Globals | DataType$MaskingMode | string; - -export type Property$MaskOrigin = Globals | DataType$GeometryBox | string; - -export type Property$MaskPosition<TLength = string | 0> = Globals | DataType$Position<TLength> | string; - -export type Property$MaskRepeat = Globals | DataType$RepeatStyle | string; - -export type Property$MaskSize<TLength = string | 0> = Globals | DataType$BgSize<TLength> | string; - -export type Property$MaskType = Globals | "alpha" | "luminance"; - -export type Property$MasonryAutoFlow = Globals | "definite-first" | "next" | "ordered" | "pack" | string; - -export type Property$MathDepth = Globals | "auto-add" | string | number; - -export type Property$MathShift = Globals | "compact" | "normal"; - -export type Property$MathStyle = Globals | "compact" | "normal"; - -export type Property$MaxBlockSize<TLength = string | 0> = - | Globals - | TLength - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "fit-content" - | "max-content" - | "min-content" - | "none" - | string; - -export type Property$MaxHeight<TLength = string | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "-webkit-max-content" - | "-webkit-min-content" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | "none" - | string; - -export type Property$MaxInlineSize<TLength = string | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "fit-content" - | "max-content" - | "min-content" - | "none" - | string; - -export type Property$MaxLines = Globals | "none" | number; - -export type Property$MaxWidth<TLength = string | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "-webkit-max-content" - | "-webkit-min-content" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | "none" - | string; - -export type Property$MinBlockSize<TLength = string | 0> = - | Globals - | TLength - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | string; - -export type Property$MinHeight<TLength = string | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "-webkit-max-content" - | "-webkit-min-content" - | "auto" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | string; - -export type Property$MinInlineSize<TLength = string | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | string; - -export type Property$MinWidth<TLength = string | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "-webkit-fit-content" - | "-webkit-max-content" - | "-webkit-min-content" - | "auto" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | "min-intrinsic" - | string; - -export type Property$MixBlendMode = Globals | DataType$BlendMode | "plus-lighter"; - -export type Property$Offset<TLength = string | 0> = Globals | DataType$Position<TLength> | "auto" | "none" | "normal" | string; - -export type Property$OffsetDistance<TLength = string | 0> = Globals | TLength | string; - -export type Property$OffsetPath = Globals | "none" | string; - -export type Property$OffsetRotate = Globals | "auto" | "reverse" | string; - -export type Property$ObjectFit = Globals | "contain" | "cover" | "fill" | "none" | "scale-down"; - -export type Property$ObjectPosition<TLength = string | 0> = Globals | DataType$Position<TLength>; - -export type Property$OffsetAnchor<TLength = string | 0> = Globals | DataType$Position<TLength> | "auto"; - -export type Property$OffsetPosition<TLength = string | 0> = Globals | DataType$Position<TLength> | "auto" | "normal"; - -export type Property$Opacity = Globals | string | number; - -export type Property$Order = Globals | number; - -export type Property$Orphans = Globals | number; - -export type Property$Outline<TLength = string | 0> = Globals | DataType$Color | DataType$LineStyle | DataType$LineWidth<TLength> | "auto" | "invert" | string; - -export type Property$OutlineColor = Globals | DataType$Color | "invert"; - -export type Property$OutlineOffset<TLength = string | 0> = Globals | TLength; - -export type Property$OutlineStyle = Globals | DataType$LineStyle | "auto" | string; - -export type Property$OutlineWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; - -export type Property$Overflow = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible" | string; - -export type Property$OverflowAnchor = Globals | "auto" | "none"; - -export type Property$OverflowBlock = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; - -export type Property$OverflowClipBox = Globals | "content-box" | "padding-box"; - -export type Property$OverflowClipMargin<TLength = string | 0> = Globals | DataType$VisualBox | TLength | string; - -export type Property$OverflowInline = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; - -export type Property$OverflowWrap = Globals | "anywhere" | "break-word" | "normal"; - -export type Property$OverflowX = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; - -export type Property$OverflowY = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; - -export type Property$Overlay = Globals | "auto" | "none"; - -export type Property$OverscrollBehavior = Globals | "auto" | "contain" | "none" | string; - -export type Property$OverscrollBehaviorBlock = Globals | "auto" | "contain" | "none"; - -export type Property$OverscrollBehaviorInline = Globals | "auto" | "contain" | "none"; - -export type Property$OverscrollBehaviorX = Globals | "auto" | "contain" | "none"; - -export type Property$OverscrollBehaviorY = Globals | "auto" | "contain" | "none"; - -export type Property$Padding<TLength = string | 0> = Globals | TLength | string; - -export type Property$PaddingBlock<TLength = string | 0> = Globals | TLength | string; - -export type Property$PaddingBlockEnd<TLength = string | 0> = Globals | TLength | string; - -export type Property$PaddingBlockStart<TLength = string | 0> = Globals | TLength | string; - -export type Property$PaddingBottom<TLength = string | 0> = Globals | TLength | string; - -export type Property$PaddingInline<TLength = string | 0> = Globals | TLength | string; - -export type Property$PaddingInlineEnd<TLength = string | 0> = Globals | TLength | string; - -export type Property$PaddingInlineStart<TLength = string | 0> = Globals | TLength | string; - -export type Property$PaddingLeft<TLength = string | 0> = Globals | TLength | string; - -export type Property$PaddingRight<TLength = string | 0> = Globals | TLength | string; - -export type Property$PaddingTop<TLength = string | 0> = Globals | TLength | string; - -export type Property$Page = Globals | "auto" | string; - -export type Property$PageBreakAfter = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; - -export type Property$PageBreakBefore = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; - -export type Property$PageBreakInside = Globals | "auto" | "avoid"; - -export type Property$PaintOrder = Globals | "fill" | "markers" | "normal" | "stroke" | string; - -export type Property$Perspective<TLength = string | 0> = Globals | TLength | "none"; - -export type Property$PerspectiveOrigin<TLength = string | 0> = Globals | DataType$Position<TLength>; - -export type Property$PlaceContent = Globals | DataType$ContentDistribution | DataType$ContentPosition | "baseline" | "normal" | string; - -export type Property$PlaceItems = Globals | DataType$SelfPosition | "baseline" | "normal" | "stretch" | string; - -export type Property$PlaceSelf = Globals | DataType$SelfPosition | "auto" | "baseline" | "normal" | "stretch" | string; - -export type Property$PointerEvents = Globals | "all" | "auto" | "fill" | "inherit" | "none" | "painted" | "stroke" | "visible" | "visibleFill" | "visiblePainted" | "visibleStroke"; - -export type Property$Position = Globals | "-webkit-sticky" | "absolute" | "fixed" | "relative" | "static" | "sticky"; - -export type Property$Quotes = Globals | "auto" | "none" | string; - -export type Property$Resize = Globals | "block" | "both" | "horizontal" | "inline" | "none" | "vertical"; - -export type Property$Right<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$Rotate = Globals | "none" | string; - -export type Property$RowGap<TLength = string | 0> = Globals | TLength | "normal" | string; - -export type Property$RubyAlign = Globals | "center" | "space-around" | "space-between" | "start"; - -export type Property$RubyMerge = Globals | "auto" | "collapse" | "separate"; - -export type Property$RubyPosition = Globals | "alternate" | "inter-character" | "over" | "under" | string; - -export type Property$Scale = Globals | "none" | string | number; - -export type Property$ScrollBehavior = Globals | "auto" | "smooth"; - -export type Property$ScrollMargin<TLength = string | 0> = Globals | TLength | string; - -export type Property$ScrollMarginBlock<TLength = string | 0> = Globals | TLength | string; - -export type Property$ScrollMarginBlockEnd<TLength = string | 0> = Globals | TLength; - -export type Property$ScrollMarginBlockStart<TLength = string | 0> = Globals | TLength; - -export type Property$ScrollMarginBottom<TLength = string | 0> = Globals | TLength; - -export type Property$ScrollMarginInline<TLength = string | 0> = Globals | TLength | string; - -export type Property$ScrollMarginInlineEnd<TLength = string | 0> = Globals | TLength; - -export type Property$ScrollMarginInlineStart<TLength = string | 0> = Globals | TLength; - -export type Property$ScrollMarginLeft<TLength = string | 0> = Globals | TLength; - -export type Property$ScrollMarginRight<TLength = string | 0> = Globals | TLength; - -export type Property$ScrollMarginTop<TLength = string | 0> = Globals | TLength; - -export type Property$ScrollPadding<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$ScrollPaddingBlock<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$ScrollPaddingBlockEnd<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$ScrollPaddingBlockStart<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$ScrollPaddingBottom<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$ScrollPaddingInline<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$ScrollPaddingInlineEnd<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$ScrollPaddingInlineStart<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$ScrollPaddingLeft<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$ScrollPaddingRight<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$ScrollPaddingTop<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$ScrollSnapAlign = Globals | "center" | "end" | "none" | "start" | string; - -export type Property$ScrollSnapCoordinate<TLength = string | 0> = Globals | DataType$Position<TLength> | "none" | string; - -export type Property$ScrollSnapDestination<TLength = string | 0> = Globals | DataType$Position<TLength>; - -export type Property$ScrollSnapPointsX = Globals | "none" | string; - -export type Property$ScrollSnapPointsY = Globals | "none" | string; - -export type Property$ScrollSnapStop = Globals | "always" | "normal"; - -export type Property$ScrollSnapType = Globals | "block" | "both" | "inline" | "none" | "x" | "y" | string; - -export type Property$ScrollSnapTypeX = Globals | "mandatory" | "none" | "proximity"; - -export type Property$ScrollSnapTypeY = Globals | "mandatory" | "none" | "proximity"; - -export type Property$ScrollTimeline = Globals | "none" | string; - -export type Property$ScrollTimelineAxis = Globals | "block" | "inline" | "x" | "y" | string; - -export type Property$ScrollTimelineName = Globals | "none" | string; - -export type Property$ScrollbarColor = Globals | "auto" | string; - -export type Property$ScrollbarGutter = Globals | "auto" | "stable" | string; - -export type Property$ScrollbarWidth = Globals | "auto" | "none" | "thin"; - -export type Property$ShapeImageThreshold = Globals | string | number; - -export type Property$ShapeMargin<TLength = string | 0> = Globals | TLength | string; - -export type Property$ShapeOutside = Globals | DataType$Box | "margin-box" | "none" | string; - -export type Property$TabSize<TLength = string | 0> = Globals | TLength | number; - -export type Property$TableLayout = Globals | "auto" | "fixed"; - -export type Property$TextAlign = Globals | "-webkit-match-parent" | "center" | "end" | "justify" | "left" | "match-parent" | "right" | "start"; - -export type Property$TextAlignLast = Globals | "auto" | "center" | "end" | "justify" | "left" | "right" | "start"; - -export type Property$TextCombineUpright = Globals | "all" | "none" | string; - -export type Property$TextDecoration<TLength = string | 0> = - | Globals - | DataType$Color - | TLength - | "auto" - | "blink" - | "dashed" - | "dotted" - | "double" - | "from-font" - | "grammar-error" - | "line-through" - | "none" - | "overline" - | "solid" - | "spelling-error" - | "underline" - | "wavy" - | string; - -export type Property$TextDecorationColor = Globals | DataType$Color; - -export type Property$TextDecorationLine = Globals | "blink" | "grammar-error" | "line-through" | "none" | "overline" | "spelling-error" | "underline" | string; - -export type Property$TextDecorationSkip = Globals | "box-decoration" | "edges" | "leading-spaces" | "none" | "objects" | "spaces" | "trailing-spaces" | string; - -export type Property$TextDecorationSkipInk = Globals | "all" | "auto" | "none"; - -export type Property$TextDecorationStyle = Globals | "dashed" | "dotted" | "double" | "solid" | "wavy"; - -export type Property$TextDecorationThickness<TLength = string | 0> = Globals | TLength | "auto" | "from-font" | string; - -export type Property$TextEmphasis = Globals | DataType$Color | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | string; - -export type Property$TextEmphasisColor = Globals | DataType$Color; - -export type Property$TextEmphasisPosition = Globals | string; - -export type Property$TextEmphasisStyle = Globals | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | string; - -export type Property$TextIndent<TLength = string | 0> = Globals | TLength | string; - -export type Property$TextJustify = Globals | "auto" | "inter-character" | "inter-word" | "none"; - -export type Property$TextOrientation = Globals | "mixed" | "sideways" | "upright"; - -export type Property$TextOverflow = Globals | "clip" | "ellipsis" | string; - -export type Property$TextRendering = Globals | "auto" | "geometricPrecision" | "optimizeLegibility" | "optimizeSpeed"; - -export type Property$TextShadow = Globals | "none" | string; - -export type Property$TextSizeAdjust = Globals | "auto" | "none" | string; - -export type Property$TextTransform = Globals | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "none" | "uppercase"; - -export type Property$TextUnderlineOffset<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$TextUnderlinePosition = Globals | "auto" | "from-font" | "left" | "right" | "under" | string; - -export type Property$TextWrap = Globals | "balance" | "nowrap" | "pretty" | "stable" | "wrap"; - -export type Property$TimelineScope = Globals | "none" | string; - -export type Property$Top<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$TouchAction = - | Globals - | "-ms-manipulation" - | "-ms-none" - | "-ms-pinch-zoom" - | "auto" - | "manipulation" - | "none" - | "pan-down" - | "pan-left" - | "pan-right" - | "pan-up" - | "pan-x" - | "pan-y" - | "pinch-zoom" - | string; - -export type Property$Transform = Globals | "none" | string; - -export type Property$TransformBox = Globals | "border-box" | "content-box" | "fill-box" | "stroke-box" | "view-box"; - -export type Property$TransformOrigin<TLength = string | 0> = Globals | TLength | "bottom" | "center" | "left" | "right" | "top" | string; - -export type Property$TransformStyle = Globals | "flat" | "preserve-3d"; - -export type Property$Transition<TTime = string> = Globals | DataType$SingleTransition<TTime> | string; - -export type Property$TransitionBehavior = Globals | "allow-discrete" | "normal" | string; - -export type Property$TransitionDelay<TTime = string> = Globals | TTime | string; - -export type Property$TransitionDuration<TTime = string> = Globals | TTime | string; - -export type Property$TransitionProperty = Globals | "all" | "none" | string; - -export type Property$TransitionTimingFunction = Globals | DataType$EasingFunction | string; - -export type Property$Translate<TLength = string | 0> = Globals | TLength | "none" | string; - -export type Property$UnicodeBidi = - | Globals - | "-moz-isolate" - | "-moz-isolate-override" - | "-moz-plaintext" - | "-webkit-isolate" - | "-webkit-isolate-override" - | "-webkit-plaintext" - | "bidi-override" - | "embed" - | "isolate" - | "isolate-override" - | "normal" - | "plaintext"; - -export type Property$UserSelect = Globals | "-moz-none" | "all" | "auto" | "contain" | "element" | "none" | "text"; - -export type Property$VerticalAlign<TLength = string | 0> = Globals | TLength | "baseline" | "bottom" | "middle" | "sub" | "super" | "text-bottom" | "text-top" | "top" | string; - -export type Property$ViewTimeline = Globals | "none" | string; - -export type Property$ViewTimelineAxis = Globals | "block" | "inline" | "x" | "y" | string; - -export type Property$ViewTimelineInset<TLength = string | 0> = Globals | TLength | "auto" | string; - -export type Property$ViewTimelineName = Globals | "none" | string; - -export type Property$ViewTransitionName = Globals | "none" | string; - -export type Property$Visibility = Globals | "collapse" | "hidden" | "visible"; - -export type Property$WhiteSpace = - | Globals - | "-moz-pre-wrap" - | "balance" - | "break-spaces" - | "collapse" - | "discard" - | "discard-after" - | "discard-before" - | "discard-inner" - | "none" - | "normal" - | "nowrap" - | "pre" - | "pre-line" - | "pre-wrap" - | "preserve" - | "preserve-breaks" - | "preserve-spaces" - | "pretty" - | "stable" - | "wrap" - | string; - -export type Property$WhiteSpaceCollapse = Globals | "break-spaces" | "collapse" | "discard" | "preserve" | "preserve-breaks" | "preserve-spaces"; - -export type Property$WhiteSpaceTrim = Globals | "discard-after" | "discard-before" | "discard-inner" | "none" | string; - -export type Property$Widows = Globals | number; - -export type Property$Width<TLength = string | 0> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "-webkit-max-content" - | "auto" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | "min-intrinsic" - | string; - -export type Property$WillChange = Globals | DataType$AnimateableFeature | "auto" | string; - -export type Property$WordBreak = Globals | "break-all" | "break-word" | "keep-all" | "normal"; - -export type Property$WordSpacing<TLength = string | 0> = Globals | TLength | "normal"; - -export type Property$WordWrap = Globals | "break-word" | "normal"; - -export type Property$WritingMode = Globals | "horizontal-tb" | "sideways-lr" | "sideways-rl" | "vertical-lr" | "vertical-rl"; - -export type Property$ZIndex = Globals | "auto" | number; - -export type Property$Zoom = Globals | "normal" | "reset" | string | number; - -export type Property$MozAppearance = - | Globals - | "-moz-mac-unified-toolbar" - | "-moz-win-borderless-glass" - | "-moz-win-browsertabbar-toolbox" - | "-moz-win-communications-toolbox" - | "-moz-win-communicationstext" - | "-moz-win-exclude-glass" - | "-moz-win-glass" - | "-moz-win-media-toolbox" - | "-moz-win-mediatext" - | "-moz-window-button-box" - | "-moz-window-button-box-maximized" - | "-moz-window-button-close" - | "-moz-window-button-maximize" - | "-moz-window-button-minimize" - | "-moz-window-button-restore" - | "-moz-window-frame-bottom" - | "-moz-window-frame-left" - | "-moz-window-frame-right" - | "-moz-window-titlebar" - | "-moz-window-titlebar-maximized" - | "button" - | "button-arrow-down" - | "button-arrow-next" - | "button-arrow-previous" - | "button-arrow-up" - | "button-bevel" - | "button-focus" - | "caret" - | "checkbox" - | "checkbox-container" - | "checkbox-label" - | "checkmenuitem" - | "dualbutton" - | "groupbox" - | "listbox" - | "listitem" - | "menuarrow" - | "menubar" - | "menucheckbox" - | "menuimage" - | "menuitem" - | "menuitemtext" - | "menulist" - | "menulist-button" - | "menulist-text" - | "menulist-textfield" - | "menupopup" - | "menuradio" - | "menuseparator" - | "meterbar" - | "meterchunk" - | "none" - | "progressbar" - | "progressbar-vertical" - | "progresschunk" - | "progresschunk-vertical" - | "radio" - | "radio-container" - | "radio-label" - | "radiomenuitem" - | "range" - | "range-thumb" - | "resizer" - | "resizerpanel" - | "scale-horizontal" - | "scale-vertical" - | "scalethumb-horizontal" - | "scalethumb-vertical" - | "scalethumbend" - | "scalethumbstart" - | "scalethumbtick" - | "scrollbarbutton-down" - | "scrollbarbutton-left" - | "scrollbarbutton-right" - | "scrollbarbutton-up" - | "scrollbarthumb-horizontal" - | "scrollbarthumb-vertical" - | "scrollbartrack-horizontal" - | "scrollbartrack-vertical" - | "searchfield" - | "separator" - | "sheet" - | "spinner" - | "spinner-downbutton" - | "spinner-textfield" - | "spinner-upbutton" - | "splitter" - | "statusbar" - | "statusbarpanel" - | "tab" - | "tab-scroll-arrow-back" - | "tab-scroll-arrow-forward" - | "tabpanel" - | "tabpanels" - | "textfield" - | "textfield-multiline" - | "toolbar" - | "toolbarbutton" - | "toolbarbutton-dropdown" - | "toolbargripper" - | "toolbox" - | "tooltip" - | "treeheader" - | "treeheadercell" - | "treeheadersortarrow" - | "treeitem" - | "treeline" - | "treetwisty" - | "treetwistyopen" - | "treeview"; - -export type Property$MozBinding = Globals | "none" | string; - -export type Property$MozBorderBottomColors = Globals | DataType$Color | "none" | string; - -export type Property$MozBorderLeftColors = Globals | DataType$Color | "none" | string; - -export type Property$MozBorderRightColors = Globals | DataType$Color | "none" | string; - -export type Property$MozBorderTopColors = Globals | DataType$Color | "none" | string; - -export type Property$MozContextProperties = Globals | "fill" | "fill-opacity" | "none" | "stroke" | "stroke-opacity" | string; - -export type Property$MozFloatEdge = Globals | "border-box" | "content-box" | "margin-box" | "padding-box"; - -export type Property$MozForceBrokenImageIcon = Globals | 0 | 1; - -export type Property$MozImageRegion = Globals | "auto" | string; - -export type Property$MozOrient = Globals | "block" | "horizontal" | "inline" | "vertical"; - -export type Property$MozOutlineRadius<TLength = string | 0> = Globals | TLength | string; - -export type Property$MozOutlineRadiusBottomleft<TLength = string | 0> = Globals | TLength | string; - -export type Property$MozOutlineRadiusBottomright<TLength = string | 0> = Globals | TLength | string; - -export type Property$MozOutlineRadiusTopleft<TLength = string | 0> = Globals | TLength | string; - -export type Property$MozOutlineRadiusTopright<TLength = string | 0> = Globals | TLength | string; - -export type Property$MozStackSizing = Globals | "ignore" | "stretch-to-fit"; - -export type Property$MozTextBlink = Globals | "blink" | "none"; - -export type Property$MozUserFocus = Globals | "ignore" | "none" | "normal" | "select-after" | "select-all" | "select-before" | "select-menu" | "select-same"; - -export type Property$MozUserInput = Globals | "auto" | "disabled" | "enabled" | "none"; - -export type Property$MozUserModify = Globals | "read-only" | "read-write" | "write-only"; - -export type Property$MozWindowDragging = Globals | "drag" | "no-drag"; - -export type Property$MozWindowShadow = Globals | "default" | "menu" | "none" | "sheet" | "tooltip"; - -export type Property$MsAccelerator = Globals | "false" | "true"; - -export type Property$MsBlockProgression = Globals | "bt" | "lr" | "rl" | "tb"; - -export type Property$MsContentZoomChaining = Globals | "chained" | "none"; - -export type Property$MsContentZoomLimit = Globals | string; - -export type Property$MsContentZoomLimitMax = Globals | string; - -export type Property$MsContentZoomLimitMin = Globals | string; - -export type Property$MsContentZoomSnap = Globals | "mandatory" | "none" | "proximity" | string; - -export type Property$MsContentZoomSnapPoints = Globals | string; - -export type Property$MsContentZoomSnapType = Globals | "mandatory" | "none" | "proximity"; - -export type Property$MsContentZooming = Globals | "none" | "zoom"; - -export type Property$MsFilter = Globals | string; - -export type Property$MsFlowFrom = Globals | "none" | string; - -export type Property$MsFlowInto = Globals | "none" | string; - -export type Property$MsGridColumns<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | "none" | string; - -export type Property$MsGridRows<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | "none" | string; - -export type Property$MsHighContrastAdjust = Globals | "auto" | "none"; - -export type Property$MsHyphenateLimitChars = Globals | "auto" | string | number; - -export type Property$MsHyphenateLimitLines = Globals | "no-limit" | number; - -export type Property$MsHyphenateLimitZone<TLength = string | 0> = Globals | TLength | string; - -export type Property$MsImeAlign = Globals | "after" | "auto"; - -export type Property$MsOverflowStyle = Globals | "-ms-autohiding-scrollbar" | "auto" | "none" | "scrollbar"; - -export type Property$MsScrollChaining = Globals | "chained" | "none"; - -export type Property$MsScrollLimit = Globals | string; - -export type Property$MsScrollLimitXMax<TLength = string | 0> = Globals | TLength | "auto"; - -export type Property$MsScrollLimitXMin<TLength = string | 0> = Globals | TLength; - -export type Property$MsScrollLimitYMax<TLength = string | 0> = Globals | TLength | "auto"; - -export type Property$MsScrollLimitYMin<TLength = string | 0> = Globals | TLength; - -export type Property$MsScrollRails = Globals | "none" | "railed"; - -export type Property$MsScrollSnapPointsX = Globals | string; - -export type Property$MsScrollSnapPointsY = Globals | string; - -export type Property$MsScrollSnapType = Globals | "mandatory" | "none" | "proximity"; - -export type Property$MsScrollSnapX = Globals | string; - -export type Property$MsScrollSnapY = Globals | string; - -export type Property$MsScrollTranslation = Globals | "none" | "vertical-to-horizontal"; - -export type Property$MsScrollbar3dlightColor = Globals | DataType$Color; - -export type Property$MsScrollbarArrowColor = Globals | DataType$Color; - -export type Property$MsScrollbarBaseColor = Globals | DataType$Color; - -export type Property$MsScrollbarDarkshadowColor = Globals | DataType$Color; - -export type Property$MsScrollbarFaceColor = Globals | DataType$Color; - -export type Property$MsScrollbarHighlightColor = Globals | DataType$Color; - -export type Property$MsScrollbarShadowColor = Globals | DataType$Color; - -export type Property$MsScrollbarTrackColor = Globals | DataType$Color; - -export type Property$MsTextAutospace = Globals | "ideograph-alpha" | "ideograph-numeric" | "ideograph-parenthesis" | "ideograph-space" | "none"; - -export type Property$MsTouchSelect = Globals | "grippers" | "none"; - -export type Property$MsUserSelect = Globals | "element" | "none" | "text"; - -export type Property$MsWrapFlow = Globals | "auto" | "both" | "clear" | "end" | "maximum" | "start"; - -export type Property$MsWrapMargin<TLength = string | 0> = Globals | TLength; - -export type Property$MsWrapThrough = Globals | "none" | "wrap"; - -export type Property$WebkitAppearance = - | Globals - | "-apple-pay-button" - | "button" - | "button-bevel" - | "caret" - | "checkbox" - | "default-button" - | "inner-spin-button" - | "listbox" - | "listitem" - | "media-controls-background" - | "media-controls-fullscreen-background" - | "media-current-time-display" - | "media-enter-fullscreen-button" - | "media-exit-fullscreen-button" - | "media-fullscreen-button" - | "media-mute-button" - | "media-overlay-play-button" - | "media-play-button" - | "media-seek-back-button" - | "media-seek-forward-button" - | "media-slider" - | "media-sliderthumb" - | "media-time-remaining-display" - | "media-toggle-closed-captions-button" - | "media-volume-slider" - | "media-volume-slider-container" - | "media-volume-sliderthumb" - | "menulist" - | "menulist-button" - | "menulist-text" - | "menulist-textfield" - | "meter" - | "none" - | "progress-bar" - | "progress-bar-value" - | "push-button" - | "radio" - | "searchfield" - | "searchfield-cancel-button" - | "searchfield-decoration" - | "searchfield-results-button" - | "searchfield-results-decoration" - | "slider-horizontal" - | "slider-vertical" - | "sliderthumb-horizontal" - | "sliderthumb-vertical" - | "square-button" - | "textarea" - | "textfield"; - -export type Property$WebkitBorderBefore<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; - -export type Property$WebkitBorderBeforeColor = Globals | DataType$Color; - -export type Property$WebkitBorderBeforeStyle = Globals | DataType$LineStyle | string; - -export type Property$WebkitBorderBeforeWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | string; - -export type Property$WebkitBoxReflect<TLength = string | 0> = Globals | TLength | "above" | "below" | "left" | "right" | string; - -export type Property$WebkitLineClamp = Globals | "none" | number; - -export type Property$WebkitMask<TLength = string | 0> = - | Globals - | DataType$Position<TLength> - | DataType$RepeatStyle - | DataType$Box - | "border" - | "content" - | "none" - | "padding" - | "text" - | string; - -export type Property$WebkitMaskAttachment = Globals | DataType$Attachment | string; - -export type Property$WebkitMaskClip = Globals | DataType$Box | "border" | "content" | "padding" | "text" | string; - -export type Property$WebkitMaskComposite = Globals | DataType$CompositeStyle | string; - -export type Property$WebkitMaskImage = Globals | "none" | string; - -export type Property$WebkitMaskOrigin = Globals | DataType$Box | "border" | "content" | "padding" | string; - -export type Property$WebkitMaskPosition<TLength = string | 0> = Globals | DataType$Position<TLength> | string; - -export type Property$WebkitMaskPositionX<TLength = string | 0> = Globals | TLength | "center" | "left" | "right" | string; - -export type Property$WebkitMaskPositionY<TLength = string | 0> = Globals | TLength | "bottom" | "center" | "top" | string; - -export type Property$WebkitMaskRepeat = Globals | DataType$RepeatStyle | string; - -export type Property$WebkitMaskRepeatX = Globals | "no-repeat" | "repeat" | "round" | "space"; - -export type Property$WebkitMaskRepeatY = Globals | "no-repeat" | "repeat" | "round" | "space"; - -export type Property$WebkitMaskSize<TLength = string | 0> = Globals | DataType$BgSize<TLength> | string; - -export type Property$WebkitOverflowScrolling = Globals | "auto" | "touch"; - -export type Property$WebkitTapHighlightColor = Globals | DataType$Color; - -export type Property$WebkitTextFillColor = Globals | DataType$Color; - -export type Property$WebkitTextStroke<TLength = string | 0> = Globals | DataType$Color | TLength | string; - -export type Property$WebkitTextStrokeColor = Globals | DataType$Color; - -export type Property$WebkitTextStrokeWidth<TLength = string | 0> = Globals | TLength; - -export type Property$WebkitTouchCallout = Globals | "default" | "none"; - -export type Property$WebkitUserModify = Globals | "read-only" | "read-write" | "read-write-plaintext-only"; - -export type Property$AlignmentBaseline = - | Globals - | "after-edge" - | "alphabetic" - | "auto" - | "baseline" - | "before-edge" - | "central" - | "hanging" - | "ideographic" - | "mathematical" - | "middle" - | "text-after-edge" - | "text-before-edge"; - -export type Property$BaselineShift<TLength = string | 0> = Globals | TLength | "baseline" | "sub" | "super" | string; - -export type Property$ClipRule = Globals | "evenodd" | "nonzero"; - -export type Property$ColorInterpolation = Globals | "auto" | "linearRGB" | "sRGB"; - -export type Property$ColorRendering = Globals | "auto" | "optimizeQuality" | "optimizeSpeed"; - -export type Property$DominantBaseline = - | Globals - | "alphabetic" - | "auto" - | "central" - | "hanging" - | "ideographic" - | "mathematical" - | "middle" - | "no-change" - | "reset-size" - | "text-after-edge" - | "text-before-edge" - | "use-script"; - -export type Property$Fill = Globals | DataType$Paint; - -export type Property$FillOpacity = Globals | number; - -export type Property$FillRule = Globals | "evenodd" | "nonzero"; - -export type Property$FloodColor = Globals | DataType$Color | "currentColor"; - -export type Property$FloodOpacity = Globals | number; - -export type Property$GlyphOrientationVertical = Globals | "auto" | string | number; - -export type Property$LightingColor = Globals | DataType$Color | "currentColor"; - -export type Property$Marker = Globals | "none" | string; - -export type Property$MarkerEnd = Globals | "none" | string; - -export type Property$MarkerMid = Globals | "none" | string; - -export type Property$MarkerStart = Globals | "none" | string; - -export type Property$ShapeRendering = Globals | "auto" | "crispEdges" | "geometricPrecision" | "optimizeSpeed"; - -export type Property$StopColor = Globals | DataType$Color | "currentColor"; - -export type Property$StopOpacity = Globals | number; - -export type Property$Stroke = Globals | DataType$Paint; - -export type Property$StrokeDasharray<TLength = string | 0> = Globals | DataType$Dasharray<TLength> | "none"; - -export type Property$StrokeDashoffset<TLength = string | 0> = Globals | TLength | string; - -export type Property$StrokeLinecap = Globals | "butt" | "round" | "square"; - -export type Property$StrokeLinejoin = Globals | "bevel" | "miter" | "round"; - -export type Property$StrokeMiterlimit = Globals | number; - -export type Property$StrokeOpacity = Globals | number; - -export type Property$StrokeWidth<TLength = string | 0> = Globals | TLength | string; - -export type Property$TextAnchor = Globals | "end" | "middle" | "start"; - -export type Property$VectorEffect = Globals | "non-scaling-stroke" | "none"; - -export type AtRule$CounterStyle<TLength = string | 0, TTime = string> = {| - additiveSymbols?: string, - fallback?: string, - negative?: string, - pad?: string, - prefix?: string, - range?: AtRule$Range, - speakAs?: AtRule$SpeakAs, - suffix?: string, - symbols?: string, - system?: AtRule$System, -|}; - -export type AtRule$CounterStyleHyphen<TLength = string | 0, TTime = string> = {| - "additive-symbols"?: string, - fallback?: string, - negative?: string, - pad?: string, - prefix?: string, - range?: AtRule$Range, - "speak-as"?: AtRule$SpeakAs, - suffix?: string, - symbols?: string, - system?: AtRule$System, -|}; - -export type AtRule$CounterStyleFallback<TLength = string | 0, TTime = string> = {| - additiveSymbols?: string | Array<string>, - fallback?: string | Array<string>, - negative?: string | Array<string>, - pad?: string | Array<string>, - prefix?: string | Array<string>, - range?: AtRule$Range | Array<AtRule$Range>, - speakAs?: AtRule$SpeakAs | Array<AtRule$SpeakAs>, - suffix?: string | Array<string>, - symbols?: string | Array<string>, - system?: AtRule$System | Array<AtRule$System>, -|}; - -export type AtRule$CounterStyleHyphenFallback<TLength = string | 0, TTime = string> = {| - "additive-symbols"?: string | Array<string>, - fallback?: string | Array<string>, - negative?: string | Array<string>, - pad?: string | Array<string>, - prefix?: string | Array<string>, - range?: AtRule$Range | Array<AtRule$Range>, - "speak-as"?: AtRule$SpeakAs | Array<AtRule$SpeakAs>, - suffix?: string | Array<string>, - symbols?: string | Array<string>, - system?: AtRule$System | Array<AtRule$System>, -|}; - -export type AtRule$FontFace<TLength = string | 0, TTime = string> = {| - MozFontFeatureSettings?: AtRule$FontFeatureSettings, - ascentOverride?: AtRule$AscentOverride, - descentOverride?: AtRule$DescentOverride, - fontDisplay?: AtRule$FontDisplay, - fontFamily?: string, - fontFeatureSettings?: AtRule$FontFeatureSettings, - fontStretch?: AtRule$FontStretch, - fontStyle?: AtRule$FontStyle, - fontVariant?: AtRule$FontVariant, - fontVariationSettings?: AtRule$FontVariationSettings, - fontWeight?: AtRule$FontWeight, - lineGapOverride?: AtRule$LineGapOverride, - sizeAdjust?: string, - src?: string, - unicodeRange?: string, -|}; - -export type AtRule$FontFaceHyphen<TLength = string | 0, TTime = string> = {| - "-moz-font-feature-settings"?: AtRule$FontFeatureSettings, - "ascent-override"?: AtRule$AscentOverride, - "descent-override"?: AtRule$DescentOverride, - "font-display"?: AtRule$FontDisplay, - "font-family"?: string, - "font-feature-settings"?: AtRule$FontFeatureSettings, - "font-stretch"?: AtRule$FontStretch, - "font-style"?: AtRule$FontStyle, - "font-variant"?: AtRule$FontVariant, - "font-variation-settings"?: AtRule$FontVariationSettings, - "font-weight"?: AtRule$FontWeight, - "line-gap-override"?: AtRule$LineGapOverride, - "size-adjust"?: string, - src?: string, - "unicode-range"?: string, -|}; - -export type AtRule$FontFaceFallback<TLength = string | 0, TTime = string> = {| - MozFontFeatureSettings?: AtRule$FontFeatureSettings | Array<AtRule$FontFeatureSettings>, - ascentOverride?: AtRule$AscentOverride | Array<AtRule$AscentOverride>, - descentOverride?: AtRule$DescentOverride | Array<AtRule$DescentOverride>, - fontDisplay?: AtRule$FontDisplay | Array<AtRule$FontDisplay>, - fontFamily?: string | Array<string>, - fontFeatureSettings?: AtRule$FontFeatureSettings | Array<AtRule$FontFeatureSettings>, - fontStretch?: AtRule$FontStretch | Array<AtRule$FontStretch>, - fontStyle?: AtRule$FontStyle | Array<AtRule$FontStyle>, - fontVariant?: AtRule$FontVariant | Array<AtRule$FontVariant>, - fontVariationSettings?: AtRule$FontVariationSettings | Array<AtRule$FontVariationSettings>, - fontWeight?: AtRule$FontWeight | Array<AtRule$FontWeight>, - lineGapOverride?: AtRule$LineGapOverride | Array<AtRule$LineGapOverride>, - sizeAdjust?: string | Array<string>, - src?: string | Array<string>, - unicodeRange?: string | Array<string>, -|}; - -export type AtRule$FontFaceHyphenFallback<TLength = string | 0, TTime = string> = {| - "-moz-font-feature-settings"?: AtRule$FontFeatureSettings | Array<AtRule$FontFeatureSettings>, - "ascent-override"?: AtRule$AscentOverride | Array<AtRule$AscentOverride>, - "descent-override"?: AtRule$DescentOverride | Array<AtRule$DescentOverride>, - "font-display"?: AtRule$FontDisplay | Array<AtRule$FontDisplay>, - "font-family"?: string | Array<string>, - "font-feature-settings"?: AtRule$FontFeatureSettings | Array<AtRule$FontFeatureSettings>, - "font-stretch"?: AtRule$FontStretch | Array<AtRule$FontStretch>, - "font-style"?: AtRule$FontStyle | Array<AtRule$FontStyle>, - "font-variant"?: AtRule$FontVariant | Array<AtRule$FontVariant>, - "font-variation-settings"?: AtRule$FontVariationSettings | Array<AtRule$FontVariationSettings>, - "font-weight"?: AtRule$FontWeight | Array<AtRule$FontWeight>, - "line-gap-override"?: AtRule$LineGapOverride | Array<AtRule$LineGapOverride>, - "size-adjust"?: string | Array<string>, - src?: string | Array<string>, - "unicode-range"?: string | Array<string>, -|}; - -export type AtRule$FontPaletteValues<TLength = string | 0, TTime = string> = {| - basePalette?: AtRule$BasePalette, - fontFamily?: string, - overrideColors?: string, -|}; - -export type AtRule$FontPaletteValuesHyphen<TLength = string | 0, TTime = string> = {| - "base-palette"?: AtRule$BasePalette, - "font-family"?: string, - "override-colors"?: string, -|}; - -export type AtRule$FontPaletteValuesFallback<TLength = string | 0, TTime = string> = {| - basePalette?: AtRule$BasePalette | Array<AtRule$BasePalette>, - fontFamily?: string | Array<string>, - overrideColors?: string | Array<string>, -|}; - -export type AtRule$FontPaletteValuesHyphenFallback<TLength = string | 0, TTime = string> = {| - "base-palette"?: AtRule$BasePalette | Array<AtRule$BasePalette>, - "font-family"?: string | Array<string>, - "override-colors"?: string | Array<string>, -|}; - -export type AtRule$Page<TLength = string | 0, TTime = string> = {| - bleed?: AtRule$Bleed<TLength>, - marks?: AtRule$Marks, - pageOrientation?: AtRule$PageOrientation, - size?: AtRule$Size<TLength>, -|}; - -export type AtRule$PageHyphen<TLength = string | 0, TTime = string> = {| - bleed?: AtRule$Bleed<TLength>, - marks?: AtRule$Marks, - "page-orientation"?: AtRule$PageOrientation, - size?: AtRule$Size<TLength>, -|}; - -export type AtRule$PageFallback<TLength = string | 0, TTime = string> = {| - bleed?: AtRule$Bleed<TLength> | Array<AtRule$Bleed<TLength>>, - marks?: AtRule$Marks | Array<AtRule$Marks>, - pageOrientation?: AtRule$PageOrientation | Array<AtRule$PageOrientation>, - size?: AtRule$Size<TLength> | Array<AtRule$Size<TLength>>, -|}; - -export type AtRule$PageHyphenFallback<TLength = string | 0, TTime = string> = {| - bleed?: AtRule$Bleed<TLength> | Array<AtRule$Bleed<TLength>>, - marks?: AtRule$Marks | Array<AtRule$Marks>, - "page-orientation"?: AtRule$PageOrientation | Array<AtRule$PageOrientation>, - size?: AtRule$Size<TLength> | Array<AtRule$Size<TLength>>, -|}; - -export type AtRule$Property<TLength = string | 0, TTime = string> = {| - inherits?: AtRule$Inherits, - initialValue?: string, - syntax?: string, -|}; - -export type AtRule$PropertyHyphen<TLength = string | 0, TTime = string> = {| - inherits?: AtRule$Inherits, - "initial-value"?: string, - syntax?: string, -|}; - -export type AtRule$PropertyFallback<TLength = string | 0, TTime = string> = {| - inherits?: AtRule$Inherits | Array<AtRule$Inherits>, - initialValue?: string | Array<string>, - syntax?: string | Array<string>, -|}; - -export type AtRule$PropertyHyphenFallback<TLength = string | 0, TTime = string> = {| - inherits?: AtRule$Inherits | Array<AtRule$Inherits>, - "initial-value"?: string | Array<string>, - syntax?: string | Array<string>, -|}; - -export type AtRule$Viewport<TLength = string | 0, TTime = string> = {| - height?: AtRule$Height<TLength>, - maxHeight?: AtRule$MaxHeight<TLength>, - maxWidth?: AtRule$MaxWidth<TLength>, - maxZoom?: AtRule$MaxZoom, - minHeight?: AtRule$MinHeight<TLength>, - minWidth?: AtRule$MinWidth<TLength>, - minZoom?: AtRule$MinZoom, - orientation?: AtRule$Orientation, - userZoom?: AtRule$UserZoom, - viewportFit?: AtRule$ViewportFit, - width?: AtRule$Width<TLength>, - zoom?: AtRule$Zoom, -|}; - -export type AtRule$ViewportHyphen<TLength = string | 0, TTime = string> = {| - height?: AtRule$Height<TLength>, - "max-height"?: AtRule$MaxHeight<TLength>, - "max-width"?: AtRule$MaxWidth<TLength>, - "max-zoom"?: AtRule$MaxZoom, - "min-height"?: AtRule$MinHeight<TLength>, - "min-width"?: AtRule$MinWidth<TLength>, - "min-zoom"?: AtRule$MinZoom, - orientation?: AtRule$Orientation, - "user-zoom"?: AtRule$UserZoom, - "viewport-fit"?: AtRule$ViewportFit, - width?: AtRule$Width<TLength>, - zoom?: AtRule$Zoom, -|}; - -export type AtRule$ViewportFallback<TLength = string | 0, TTime = string> = {| - height?: AtRule$Height<TLength> | Array<AtRule$Height<TLength>>, - maxHeight?: AtRule$MaxHeight<TLength> | Array<AtRule$MaxHeight<TLength>>, - maxWidth?: AtRule$MaxWidth<TLength> | Array<AtRule$MaxWidth<TLength>>, - maxZoom?: AtRule$MaxZoom | Array<AtRule$MaxZoom>, - minHeight?: AtRule$MinHeight<TLength> | Array<AtRule$MinHeight<TLength>>, - minWidth?: AtRule$MinWidth<TLength> | Array<AtRule$MinWidth<TLength>>, - minZoom?: AtRule$MinZoom | Array<AtRule$MinZoom>, - orientation?: AtRule$Orientation | Array<AtRule$Orientation>, - userZoom?: AtRule$UserZoom | Array<AtRule$UserZoom>, - viewportFit?: AtRule$ViewportFit | Array<AtRule$ViewportFit>, - width?: AtRule$Width<TLength> | Array<AtRule$Width<TLength>>, - zoom?: AtRule$Zoom | Array<AtRule$Zoom>, -|}; - -export type AtRule$ViewportHyphenFallback<TLength = string | 0, TTime = string> = {| - height?: AtRule$Height<TLength> | Array<AtRule$Height<TLength>>, - "max-height"?: AtRule$MaxHeight<TLength> | Array<AtRule$MaxHeight<TLength>>, - "max-width"?: AtRule$MaxWidth<TLength> | Array<AtRule$MaxWidth<TLength>>, - "max-zoom"?: AtRule$MaxZoom | Array<AtRule$MaxZoom>, - "min-height"?: AtRule$MinHeight<TLength> | Array<AtRule$MinHeight<TLength>>, - "min-width"?: AtRule$MinWidth<TLength> | Array<AtRule$MinWidth<TLength>>, - "min-zoom"?: AtRule$MinZoom | Array<AtRule$MinZoom>, - orientation?: AtRule$Orientation | Array<AtRule$Orientation>, - "user-zoom"?: AtRule$UserZoom | Array<AtRule$UserZoom>, - "viewport-fit"?: AtRule$ViewportFit | Array<AtRule$ViewportFit>, - width?: AtRule$Width<TLength> | Array<AtRule$Width<TLength>>, - zoom?: AtRule$Zoom | Array<AtRule$Zoom>, -|}; - -type AtRule$Range = "auto" | string; - -type AtRule$SpeakAs = "auto" | "bullets" | "numbers" | "spell-out" | "words" | string; - -type AtRule$System = "additive" | "alphabetic" | "cyclic" | "fixed" | "numeric" | "symbolic" | string; - -type AtRule$FontFeatureSettings = "normal" | string; - -type AtRule$AscentOverride = "normal" | string; - -type AtRule$DescentOverride = "normal" | string; - -type AtRule$FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; - -type AtRule$FontStretch = DataType$FontStretchAbsolute | string; - -type AtRule$FontStyle = "italic" | "normal" | "oblique" | string; - -type AtRule$FontVariant = - | DataType$EastAsianVariantValues - | "all-petite-caps" - | "all-small-caps" - | "common-ligatures" - | "contextual" - | "diagonal-fractions" - | "discretionary-ligatures" - | "full-width" - | "historical-forms" - | "historical-ligatures" - | "lining-nums" - | "no-common-ligatures" - | "no-contextual" - | "no-discretionary-ligatures" - | "no-historical-ligatures" - | "none" - | "normal" - | "oldstyle-nums" - | "ordinal" - | "petite-caps" - | "proportional-nums" - | "proportional-width" - | "ruby" - | "slashed-zero" - | "small-caps" - | "stacked-fractions" - | "tabular-nums" - | "titling-caps" - | "unicase" - | string; - -type AtRule$FontVariationSettings = "normal" | string; - -type AtRule$FontWeight = DataType$FontWeightAbsolute | string; - -type AtRule$LineGapOverride = "normal" | string; - -type AtRule$BasePalette = "dark" | "light" | number; - -type AtRule$Bleed<TLength> = TLength | "auto"; - -type AtRule$Marks = "crop" | "cross" | "none" | string; - -type AtRule$PageOrientation = "rotate-left" | "rotate-right" | "upright"; - -type AtRule$Size<TLength> = DataType$PageSize | TLength | "auto" | "landscape" | "portrait" | string; - -type AtRule$Inherits = "false" | "true"; - -type AtRule$Height<TLength> = DataType$ViewportLength<TLength> | string; - -type AtRule$MaxHeight<TLength> = DataType$ViewportLength<TLength>; - -type AtRule$MaxWidth<TLength> = DataType$ViewportLength<TLength>; - -type AtRule$MaxZoom = "auto" | string | number; - -type AtRule$MinHeight<TLength> = DataType$ViewportLength<TLength>; - -type AtRule$MinWidth<TLength> = DataType$ViewportLength<TLength>; - -type AtRule$MinZoom = "auto" | string | number; - -type AtRule$Orientation = "auto" | "landscape" | "portrait"; - -type AtRule$UserZoom = "fixed" | "zoom"; - -type AtRule$ViewportFit = "auto" | "contain" | "cover"; - -type AtRule$Width<TLength> = DataType$ViewportLength<TLength> | string; - -type AtRule$Zoom = "auto" | string | number; - -type DataType$AbsoluteSize = "large" | "medium" | "small" | "x-large" | "x-small" | "xx-large" | "xx-small" | "xxx-large"; - -type DataType$AnimateableFeature = "contents" | "scroll-position" | string; - -type DataType$Attachment = "fixed" | "local" | "scroll"; - -type DataType$BgPosition<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | string; - -type DataType$BgSize<TLength> = TLength | "auto" | "contain" | "cover" | string; - -type DataType$BlendMode = - | "color" - | "color-burn" - | "color-dodge" - | "darken" - | "difference" - | "exclusion" - | "hard-light" - | "hue" - | "lighten" - | "luminosity" - | "multiply" - | "normal" - | "overlay" - | "saturation" - | "screen" - | "soft-light"; - -type DataType$Box = "border-box" | "content-box" | "padding-box"; - -type DataType$Color = DataType$NamedColor | DataType$DeprecatedSystemColor | "currentcolor" | string; - -type DataType$CompatAuto = - | "button" - | "checkbox" - | "listbox" - | "menulist" - | "meter" - | "progress-bar" - | "push-button" - | "radio" - | "searchfield" - | "slider-horizontal" - | "square-button" - | "textarea"; - -type DataType$CompositeStyle = - | "clear" - | "copy" - | "destination-atop" - | "destination-in" - | "destination-out" - | "destination-over" - | "source-atop" - | "source-in" - | "source-out" - | "source-over" - | "xor"; - -type DataType$CompositingOperator = "add" | "exclude" | "intersect" | "subtract"; - -type DataType$ContentDistribution = "space-around" | "space-between" | "space-evenly" | "stretch"; - -type DataType$ContentList = DataType$Quote | "contents" | string; - -type DataType$ContentPosition = "center" | "end" | "flex-end" | "flex-start" | "start"; - -type DataType$CubicBezierTimingFunction = "ease" | "ease-in" | "ease-in-out" | "ease-out" | string; - -type DataType$Dasharray<TLength> = TLength | string | number; - -type DataType$DeprecatedSystemColor = - | "ActiveBorder" - | "ActiveCaption" - | "AppWorkspace" - | "Background" - | "ButtonFace" - | "ButtonHighlight" - | "ButtonShadow" - | "ButtonText" - | "CaptionText" - | "GrayText" - | "Highlight" - | "HighlightText" - | "InactiveBorder" - | "InactiveCaption" - | "InactiveCaptionText" - | "InfoBackground" - | "InfoText" - | "Menu" - | "MenuText" - | "Scrollbar" - | "ThreeDDarkShadow" - | "ThreeDFace" - | "ThreeDHighlight" - | "ThreeDLightShadow" - | "ThreeDShadow" - | "Window" - | "WindowFrame" - | "WindowText"; - -type DataType$DisplayInside = "-ms-flexbox" | "-ms-grid" | "-webkit-flex" | "flex" | "flow" | "flow-root" | "grid" | "ruby" | "table"; - -type DataType$DisplayInternal = - | "ruby-base" - | "ruby-base-container" - | "ruby-text" - | "ruby-text-container" - | "table-caption" - | "table-cell" - | "table-column" - | "table-column-group" - | "table-footer-group" - | "table-header-group" - | "table-row" - | "table-row-group"; - -type DataType$DisplayLegacy = - | "-ms-inline-flexbox" - | "-ms-inline-grid" - | "-webkit-inline-flex" - | "inline-block" - | "inline-flex" - | "inline-grid" - | "inline-list-item" - | "inline-table"; - -type DataType$DisplayOutside = "block" | "inline" | "run-in"; - -type DataType$EasingFunction = DataType$CubicBezierTimingFunction | DataType$StepTimingFunction | "linear"; - -type DataType$EastAsianVariantValues = "jis04" | "jis78" | "jis83" | "jis90" | "simplified" | "traditional"; - -type DataType$FinalBgLayer<TLength> = DataType$Color | DataType$BgPosition<TLength> | DataType$RepeatStyle | DataType$Attachment | DataType$Box | "none" | string; - -type DataType$FontStretchAbsolute = - | "condensed" - | "expanded" - | "extra-condensed" - | "extra-expanded" - | "normal" - | "semi-condensed" - | "semi-expanded" - | "ultra-condensed" - | "ultra-expanded" - | string; - -type DataType$FontWeightAbsolute = "bold" | "normal" | number; - -type DataType$GenericFamily = "cursive" | "fantasy" | "monospace" | "sans-serif" | "serif"; - -type DataType$GeometryBox = DataType$Box | "fill-box" | "margin-box" | "stroke-box" | "view-box"; - -type DataType$GridLine = "auto" | string | number; - -type DataType$LineStyle = "dashed" | "dotted" | "double" | "groove" | "hidden" | "inset" | "none" | "outset" | "ridge" | "solid"; - -type DataType$LineWidth<TLength> = TLength | "medium" | "thick" | "thin"; - -type DataType$MaskLayer<TLength> = - | DataType$Position<TLength> - | DataType$RepeatStyle - | DataType$GeometryBox - | DataType$CompositingOperator - | DataType$MaskingMode - | "no-clip" - | "none" - | string; - -type DataType$MaskingMode = "alpha" | "luminance" | "match-source"; - -type DataType$NamedColor = - | "aliceblue" - | "antiquewhite" - | "aqua" - | "aquamarine" - | "azure" - | "beige" - | "bisque" - | "black" - | "blanchedalmond" - | "blue" - | "blueviolet" - | "brown" - | "burlywood" - | "cadetblue" - | "chartreuse" - | "chocolate" - | "coral" - | "cornflowerblue" - | "cornsilk" - | "crimson" - | "cyan" - | "darkblue" - | "darkcyan" - | "darkgoldenrod" - | "darkgray" - | "darkgreen" - | "darkgrey" - | "darkkhaki" - | "darkmagenta" - | "darkolivegreen" - | "darkorange" - | "darkorchid" - | "darkred" - | "darksalmon" - | "darkseagreen" - | "darkslateblue" - | "darkslategray" - | "darkslategrey" - | "darkturquoise" - | "darkviolet" - | "deeppink" - | "deepskyblue" - | "dimgray" - | "dimgrey" - | "dodgerblue" - | "firebrick" - | "floralwhite" - | "forestgreen" - | "fuchsia" - | "gainsboro" - | "ghostwhite" - | "gold" - | "goldenrod" - | "gray" - | "green" - | "greenyellow" - | "grey" - | "honeydew" - | "hotpink" - | "indianred" - | "indigo" - | "ivory" - | "khaki" - | "lavender" - | "lavenderblush" - | "lawngreen" - | "lemonchiffon" - | "lightblue" - | "lightcoral" - | "lightcyan" - | "lightgoldenrodyellow" - | "lightgray" - | "lightgreen" - | "lightgrey" - | "lightpink" - | "lightsalmon" - | "lightseagreen" - | "lightskyblue" - | "lightslategray" - | "lightslategrey" - | "lightsteelblue" - | "lightyellow" - | "lime" - | "limegreen" - | "linen" - | "magenta" - | "maroon" - | "mediumaquamarine" - | "mediumblue" - | "mediumorchid" - | "mediumpurple" - | "mediumseagreen" - | "mediumslateblue" - | "mediumspringgreen" - | "mediumturquoise" - | "mediumvioletred" - | "midnightblue" - | "mintcream" - | "mistyrose" - | "moccasin" - | "navajowhite" - | "navy" - | "oldlace" - | "olive" - | "olivedrab" - | "orange" - | "orangered" - | "orchid" - | "palegoldenrod" - | "palegreen" - | "paleturquoise" - | "palevioletred" - | "papayawhip" - | "peachpuff" - | "peru" - | "pink" - | "plum" - | "powderblue" - | "purple" - | "rebeccapurple" - | "red" - | "rosybrown" - | "royalblue" - | "saddlebrown" - | "salmon" - | "sandybrown" - | "seagreen" - | "seashell" - | "sienna" - | "silver" - | "skyblue" - | "slateblue" - | "slategray" - | "slategrey" - | "snow" - | "springgreen" - | "steelblue" - | "tan" - | "teal" - | "thistle" - | "tomato" - | "transparent" - | "turquoise" - | "violet" - | "wheat" - | "white" - | "whitesmoke" - | "yellow" - | "yellowgreen"; - -type DataType$PageSize = "A3" | "A4" | "A5" | "B4" | "B5" | "JIS-B4" | "JIS-B5" | "ledger" | "legal" | "letter"; - -type DataType$Paint = DataType$Color | "child" | "context-fill" | "context-stroke" | "none" | string; - -type DataType$Position<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | string; - -type DataType$Quote = "close-quote" | "no-close-quote" | "no-open-quote" | "open-quote"; - -type DataType$RepeatStyle = "no-repeat" | "repeat" | "repeat-x" | "repeat-y" | "round" | "space" | string; - -type DataType$SelfPosition = "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start"; - -type DataType$SingleAnimation<TTime> = - | DataType$EasingFunction - | DataType$SingleAnimationDirection - | DataType$SingleAnimationFillMode - | DataType$SingleAnimationTimeline - | TTime - | "infinite" - | "none" - | "paused" - | "running" - | string - | number; - -type DataType$SingleAnimationComposition = "accumulate" | "add" | "replace"; - -type DataType$SingleAnimationDirection = "alternate" | "alternate-reverse" | "normal" | "reverse"; - -type DataType$SingleAnimationFillMode = "backwards" | "both" | "forwards" | "none"; - -type DataType$SingleAnimationTimeline = "auto" | "none" | string; - -type DataType$SingleTransition<TTime> = DataType$EasingFunction | TTime | "all" | "allow-discrete" | "none" | "normal" | string; - -type DataType$StepTimingFunction = "step-end" | "step-start" | string; - -type DataType$TimelineRangeName = "contain" | "cover" | "entry" | "entry-crossing" | "exit" | "exit-crossing"; - -type DataType$TrackBreadth<TLength> = TLength | "auto" | "max-content" | "min-content" | string; - -type DataType$ViewportLength<TLength> = TLength | "auto" | string; - -type DataType$VisualBox = "border-box" | "content-box" | "padding-box"; diff --git a/node_modules/csstype/package.json b/node_modules/csstype/package.json deleted file mode 100644 index 2400fc3..0000000 --- a/node_modules/csstype/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "csstype", - "version": "3.1.3", - "main": "", - "types": "index.d.ts", - "description": "Strict TypeScript and Flow types for style based on MDN data", - "repository": "https://github.com/frenic/csstype", - "author": "Fredrik Nicol <fredrik.nicol@gmail.com>", - "license": "MIT", - "devDependencies": { - "@types/chokidar": "^2.1.3", - "@types/css-tree": "^2.3.1", - "@types/jest": "^29.5.0", - "@types/jsdom": "^21.1.1", - "@types/node": "^16.18.23", - "@types/prettier": "^2.7.2", - "@types/request": "^2.48.8", - "@types/turndown": "^5.0.1", - "@typescript-eslint/eslint-plugin": "^5.57.0", - "@typescript-eslint/parser": "^5.57.0", - "chalk": "^4.1.2", - "chokidar": "^3.5.3", - "eslint": "^8.37.0", - "css-tree": "^2.3.1", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-prettier": "^4.2.1", - "fast-glob": "^3.2.12", - "flow-bin": "^0.203.1", - "jest": "^29.5.0", - "jsdom": "^21.1.1", - "mdn-browser-compat-data": "git+https://github.com/mdn/browser-compat-data.git#1bf44517bd08de735e9ec20dbfe8e86c96341054", - "mdn-data": "git+https://github.com/mdn/data.git#7f0c865a3c4b5d891285c93308ee5c25cb5cfee8", - "prettier": "^2.8.7", - "request": "^2.88.2", - "ts-jest": "^29.0.5", - "ts-node": "^10.9.1", - "turndown": "^7.1.2", - "typescript": "~5.0.3" - }, - "scripts": { - "prepublish": "npm install --prefix __tests__ && npm install --prefix __tests__/__fixtures__", - "prepublishOnly": "tsc && npm run test:src && npm run build && ts-node --files prepublish.ts", - "update": "ts-node --files update.ts", - "build": "ts-node --files build.ts --start", - "watch": "ts-node --files build.ts --watch", - "lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix", - "pretty": "prettier --write build.ts **/*.{ts,js,json,md}", - "lazy": "tsc && npm run lint", - "test": "jest --runInBand", - "test:src": "jest src.*.ts", - "test:dist": "jest dist.*.ts --runInBand" - }, - "files": [ - "index.d.ts", - "index.js.flow" - ], - "keywords": [ - "css", - "style", - "typescript", - "flow", - "typings", - "types", - "definitions" - ] -} diff --git a/node_modules/debug/CHANGELOG.md b/node_modules/debug/CHANGELOG.md deleted file mode 100644 index 820d21e..0000000 --- a/node_modules/debug/CHANGELOG.md +++ /dev/null @@ -1,395 +0,0 @@ - -3.1.0 / 2017-09-26 -================== - - * Add `DEBUG_HIDE_DATE` env var (#486) - * Remove ReDoS regexp in %o formatter (#504) - * Remove "component" from package.json - * Remove `component.json` - * Ignore package-lock.json - * Examples: fix colors printout - * Fix: browser detection - * Fix: spelling mistake (#496, @EdwardBetts) - -3.0.1 / 2017-08-24 -================== - - * Fix: Disable colors in Edge and Internet Explorer (#489) - -3.0.0 / 2017-08-08 -================== - - * Breaking: Remove DEBUG_FD (#406) - * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418) - * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408) - * Addition: document `enabled` flag (#465) - * Addition: add 256 colors mode (#481) - * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440) - * Update: component: update "ms" to v2.0.0 - * Update: separate the Node and Browser tests in Travis-CI - * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots - * Update: separate Node.js and web browser examples for organization - * Update: update "browserify" to v14.4.0 - * Fix: fix Readme typo (#473) - -2.6.9 / 2017-09-22 -================== - - * remove ReDoS regexp in %o formatter (#504) - -2.6.8 / 2017-05-18 -================== - - * Fix: Check for undefined on browser globals (#462, @marbemac) - -2.6.7 / 2017-05-16 -================== - - * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) - * Fix: Inline extend function in node implementation (#452, @dougwilson) - * Docs: Fix typo (#455, @msasad) - -2.6.5 / 2017-04-27 -================== - - * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) - * Misc: clean up browser reference checks (#447, @thebigredgeek) - * Misc: add npm-debug.log to .gitignore (@thebigredgeek) - - -2.6.4 / 2017-04-20 -================== - - * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) - * Chore: ignore bower.json in npm installations. (#437, @joaovieira) - * Misc: update "ms" to v0.7.3 (@tootallnate) - -2.6.3 / 2017-03-13 -================== - - * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) - * Docs: Changelog fix (@thebigredgeek) - -2.6.2 / 2017-03-10 -================== - - * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) - * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) - * Docs: Add Slackin invite badge (@tootallnate) - -2.6.1 / 2017-02-10 -================== - - * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error - * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) - * Fix: IE8 "Expected identifier" error (#414, @vgoma) - * Fix: Namespaces would not disable once enabled (#409, @musikov) - -2.6.0 / 2016-12-28 -================== - - * Fix: added better null pointer checks for browser useColors (@thebigredgeek) - * Improvement: removed explicit `window.debug` export (#404, @tootallnate) - * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) - -2.5.2 / 2016-12-25 -================== - - * Fix: reference error on window within webworkers (#393, @KlausTrainer) - * Docs: fixed README typo (#391, @lurch) - * Docs: added notice about v3 api discussion (@thebigredgeek) - -2.5.1 / 2016-12-20 -================== - - * Fix: babel-core compatibility - -2.5.0 / 2016-12-20 -================== - - * Fix: wrong reference in bower file (@thebigredgeek) - * Fix: webworker compatibility (@thebigredgeek) - * Fix: output formatting issue (#388, @kribblo) - * Fix: babel-loader compatibility (#383, @escwald) - * Misc: removed built asset from repo and publications (@thebigredgeek) - * Misc: moved source files to /src (#378, @yamikuronue) - * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) - * Test: coveralls integration (#378, @yamikuronue) - * Docs: simplified language in the opening paragraph (#373, @yamikuronue) - -2.4.5 / 2016-12-17 -================== - - * Fix: `navigator` undefined in Rhino (#376, @jochenberger) - * Fix: custom log function (#379, @hsiliev) - * Improvement: bit of cleanup + linting fixes (@thebigredgeek) - * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) - * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) - -2.4.4 / 2016-12-14 -================== - - * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) - -2.4.3 / 2016-12-14 -================== - - * Fix: navigation.userAgent error for react native (#364, @escwald) - -2.4.2 / 2016-12-14 -================== - - * Fix: browser colors (#367, @tootallnate) - * Misc: travis ci integration (@thebigredgeek) - * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) - -2.4.1 / 2016-12-13 -================== - - * Fix: typo that broke the package (#356) - -2.4.0 / 2016-12-13 -================== - - * Fix: bower.json references unbuilt src entry point (#342, @justmatt) - * Fix: revert "handle regex special characters" (@tootallnate) - * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) - * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) - * Improvement: allow colors in workers (#335, @botverse) - * Improvement: use same color for same namespace. (#338, @lchenay) - -2.3.3 / 2016-11-09 -================== - - * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) - * Fix: Returning `localStorage` saved values (#331, Levi Thomason) - * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) - -2.3.2 / 2016-11-09 -================== - - * Fix: be super-safe in index.js as well (@TooTallNate) - * Fix: should check whether process exists (Tom Newby) - -2.3.1 / 2016-11-09 -================== - - * Fix: Added electron compatibility (#324, @paulcbetts) - * Improvement: Added performance optimizations (@tootallnate) - * Readme: Corrected PowerShell environment variable example (#252, @gimre) - * Misc: Removed yarn lock file from source control (#321, @fengmk2) - -2.3.0 / 2016-11-07 -================== - - * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) - * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) - * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) - * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) - * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) - * Package: Update "ms" to 0.7.2 (#315, @DevSide) - * Package: removed superfluous version property from bower.json (#207 @kkirsche) - * Readme: fix USE_COLORS to DEBUG_COLORS - * Readme: Doc fixes for format string sugar (#269, @mlucool) - * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) - * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) - * Readme: better docs for browser support (#224, @matthewmueller) - * Tooling: Added yarn integration for development (#317, @thebigredgeek) - * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) - * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) - * Misc: Updated contributors (@thebigredgeek) - -2.2.0 / 2015-05-09 -================== - - * package: update "ms" to v0.7.1 (#202, @dougwilson) - * README: add logging to file example (#193, @DanielOchoa) - * README: fixed a typo (#191, @amir-s) - * browser: expose `storage` (#190, @stephenmathieson) - * Makefile: add a `distclean` target (#189, @stephenmathieson) - -2.1.3 / 2015-03-13 -================== - - * Updated stdout/stderr example (#186) - * Updated example/stdout.js to match debug current behaviour - * Renamed example/stderr.js to stdout.js - * Update Readme.md (#184) - * replace high intensity foreground color for bold (#182, #183) - -2.1.2 / 2015-03-01 -================== - - * dist: recompile - * update "ms" to v0.7.0 - * package: update "browserify" to v9.0.3 - * component: fix "ms.js" repo location - * changed bower package name - * updated documentation about using debug in a browser - * fix: security error on safari (#167, #168, @yields) - -2.1.1 / 2014-12-29 -================== - - * browser: use `typeof` to check for `console` existence - * browser: check for `console.log` truthiness (fix IE 8/9) - * browser: add support for Chrome apps - * Readme: added Windows usage remarks - * Add `bower.json` to properly support bower install - -2.1.0 / 2014-10-15 -================== - - * node: implement `DEBUG_FD` env variable support - * package: update "browserify" to v6.1.0 - * package: add "license" field to package.json (#135, @panuhorsmalahti) - -2.0.0 / 2014-09-01 -================== - - * package: update "browserify" to v5.11.0 - * node: use stderr rather than stdout for logging (#29, @stephenmathieson) - -1.0.4 / 2014-07-15 -================== - - * dist: recompile - * example: remove `console.info()` log usage - * example: add "Content-Type" UTF-8 header to browser example - * browser: place %c marker after the space character - * browser: reset the "content" color via `color: inherit` - * browser: add colors support for Firefox >= v31 - * debug: prefer an instance `log()` function over the global one (#119) - * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) - -1.0.3 / 2014-07-09 -================== - - * Add support for multiple wildcards in namespaces (#122, @seegno) - * browser: fix lint - -1.0.2 / 2014-06-10 -================== - - * browser: update color palette (#113, @gscottolson) - * common: make console logging function configurable (#108, @timoxley) - * node: fix %o colors on old node <= 0.8.x - * Makefile: find node path using shell/which (#109, @timoxley) - -1.0.1 / 2014-06-06 -================== - - * browser: use `removeItem()` to clear localStorage - * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) - * package: add "contributors" section - * node: fix comment typo - * README: list authors - -1.0.0 / 2014-06-04 -================== - - * make ms diff be global, not be scope - * debug: ignore empty strings in enable() - * node: make DEBUG_COLORS able to disable coloring - * *: export the `colors` array - * npmignore: don't publish the `dist` dir - * Makefile: refactor to use browserify - * package: add "browserify" as a dev dependency - * Readme: add Web Inspector Colors section - * node: reset terminal color for the debug content - * node: map "%o" to `util.inspect()` - * browser: map "%j" to `JSON.stringify()` - * debug: add custom "formatters" - * debug: use "ms" module for humanizing the diff - * Readme: add "bash" syntax highlighting - * browser: add Firebug color support - * browser: add colors for WebKit browsers - * node: apply log to `console` - * rewrite: abstract common logic for Node & browsers - * add .jshintrc file - -0.8.1 / 2014-04-14 -================== - - * package: re-add the "component" section - -0.8.0 / 2014-03-30 -================== - - * add `enable()` method for nodejs. Closes #27 - * change from stderr to stdout - * remove unnecessary index.js file - -0.7.4 / 2013-11-13 -================== - - * remove "browserify" key from package.json (fixes something in browserify) - -0.7.3 / 2013-10-30 -================== - - * fix: catch localStorage security error when cookies are blocked (Chrome) - * add debug(err) support. Closes #46 - * add .browser prop to package.json. Closes #42 - -0.7.2 / 2013-02-06 -================== - - * fix package.json - * fix: Mobile Safari (private mode) is broken with debug - * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript - -0.7.1 / 2013-02-05 -================== - - * add repository URL to package.json - * add DEBUG_COLORED to force colored output - * add browserify support - * fix component. Closes #24 - -0.7.0 / 2012-05-04 -================== - - * Added .component to package.json - * Added debug.component.js build - -0.6.0 / 2012-03-16 -================== - - * Added support for "-" prefix in DEBUG [Vinay Pulim] - * Added `.enabled` flag to the node version [TooTallNate] - -0.5.0 / 2012-02-02 -================== - - * Added: humanize diffs. Closes #8 - * Added `debug.disable()` to the CS variant - * Removed padding. Closes #10 - * Fixed: persist client-side variant again. Closes #9 - -0.4.0 / 2012-02-01 -================== - - * Added browser variant support for older browsers [TooTallNate] - * Added `debug.enable('project:*')` to browser variant [TooTallNate] - * Added padding to diff (moved it to the right) - -0.3.0 / 2012-01-26 -================== - - * Added millisecond diff when isatty, otherwise UTC string - -0.2.0 / 2012-01-22 -================== - - * Added wildcard support - -0.1.0 / 2011-12-02 -================== - - * Added: remove colors unless stderr isatty [TooTallNate] - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/debug/LICENSE b/node_modules/debug/LICENSE deleted file mode 100644 index 658c933..0000000 --- a/node_modules/debug/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca> - -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/node_modules/debug/README.md b/node_modules/debug/README.md deleted file mode 100644 index 0ee7634..0000000 --- a/node_modules/debug/README.md +++ /dev/null @@ -1,437 +0,0 @@ -# debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - -<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png"> - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example [_app.js_](./examples/node/app.js): - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %o', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example [_worker.js_](./examples/node/worker.js): - -```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); - -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); -``` - -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. - -Here are some examples: - -<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png"> -<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png"> -<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png"> - -#### Windows command prompt notes - -##### CMD - -On Windows the environment variable is set using the `set` command. - -```cmd -set DEBUG=*,-not_this -``` - -Example: - -```cmd -set DEBUG=* & node app.js -``` - -##### PowerShell (VS Code default) - -PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Example: - -```cmd -$env:DEBUG='app';node app.js -``` - -Then, run the program to be debugged as usual. - -npm script example: -```js - "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", -``` - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - -<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png"> - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - -<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png"> - - -## Millisecond diff - -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - -<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png"> - -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: - -<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png"> - - -## Conventions - -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. - -## Wildcards - -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". - -## Environment Variables - -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. - -## Formatters - -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - - -### Custom formatters - -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - - -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example [_stdout.js_](./examples/node/stdout.js): - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - -## Extend -You can simply extend debugger -```js -const log = require('debug')('auth'); - -//creates new debug instance with extended namespace -const logSign = log.extend('sign'); -const logLogin = log.extend('login'); - -log('hello'); // auth hello -logSign('hello'); //auth:sign hello -logLogin('hello'); //auth:login hello -``` - -## Set dynamically - -You can also enable debug dynamically by calling the `enable()` method : - -```js -let debug = require('debug'); - -console.log(1, debug.enabled('test')); - -debug.enable('test'); -console.log(2, debug.enabled('test')); - -debug.disable(); -console.log(3, debug.enabled('test')); - -``` - -print : -``` -1 false -2 true -3 false -``` - -Usage : -`enable(namespaces)` -`namespaces` can include modes separated by a colon and wildcards. - -Note that calling `enable()` completely overrides previously set DEBUG variable : - -``` -$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' -=> false -``` - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - -<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a> -<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a> - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - -<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a> -<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a> - -## License - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> - -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/node_modules/debug/node.js b/node_modules/debug/node.js deleted file mode 100644 index 7fc36fe..0000000 --- a/node_modules/debug/node.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./src/node'); diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json deleted file mode 100644 index 191c815..0000000 --- a/node_modules/debug/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "debug", - "version": "3.2.7", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" - ], - "files": [ - "src", - "node.js", - "dist/debug.js", - "LICENSE", - "README.md" - ], - "author": "TJ Holowaychuk <tj@vision-media.ca>", - "contributors": [ - "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)", - "Andrew Rhyne <rhyneandrew@gmail.com>" - ], - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - }, - "devDependencies": { - "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "browserify": "14.4.0", - "chai": "^3.5.0", - "concurrently": "^3.1.0", - "coveralls": "^3.0.2", - "istanbul": "^0.4.5", - "karma": "^3.0.0", - "karma-chai": "^0.1.0", - "karma-mocha": "^1.3.0", - "karma-phantomjs-launcher": "^1.0.2", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "rimraf": "^2.5.4", - "xo": "^0.23.0" - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "unpkg": "./dist/debug.js" -} diff --git a/node_modules/debug/src/browser.js b/node_modules/debug/src/browser.js deleted file mode 100644 index c924b0a..0000000 --- a/node_modules/debug/src/browser.js +++ /dev/null @@ -1,180 +0,0 @@ -"use strict"; - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -/** - * Colors. - */ - -exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ -// eslint-disable-next-line complexity - -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } // Internet Explorer and Edge do not support colors. - - - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - - - return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 - typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker - typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); -} -/** - * Colorize log arguments if enabled. - * - * @api public - */ - - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function (match) { - if (match === '%%') { - return; - } - - index++; - - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - args.splice(lastC, 0, c); -} -/** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - - -function log() { - var _console; - - // This hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); -} -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - - -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) {// Swallow - // XXX (@Qix-) should we be logging these? - } -} -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - - -function load() { - var r; - - try { - r = exports.storage.getItem('debug'); - } catch (error) {} // Swallow - // XXX (@Qix-) should we be logging these? - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - - - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) {// Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = require('./common')(exports); -var formatters = module.exports.formatters; -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; - diff --git a/node_modules/debug/src/common.js b/node_modules/debug/src/common.js deleted file mode 100644 index e0de3fb..0000000 --- a/node_modules/debug/src/common.js +++ /dev/null @@ -1,249 +0,0 @@ -"use strict"; - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - Object.keys(env).forEach(function (key) { - createDebug[key] = env[key]; - }); - /** - * Active `debug` instances. - */ - - createDebug.instances = []; - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - - createDebug.formatters = {}; - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - - function selectColor(namespace) { - var hash = 0; - - for (var i = 0; i < namespace.length; i++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - - createDebug.selectColor = selectColor; - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - - function createDebug(namespace) { - var prevTime; - - function debug() { - // Disabled? - if (!debug.enabled) { - return; - } - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var self = debug; // Set `diff` timestamp - - var curr = Number(new Date()); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } // Apply any `formatters` transformations - - - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return match; - } - - index++; - var formatter = createDebug.formatters[format]; - - if (typeof formatter === 'function') { - var val = args[index]; - match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` - - args.splice(index, 1); - index--; - } - - return match; - }); // Apply env-specific formatting (colors, etc.) - - createDebug.formatArgs.call(self, args); - var logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = createDebug.enabled(namespace); - debug.useColors = createDebug.useColors(); - debug.color = selectColor(namespace); - debug.destroy = destroy; - debug.extend = extend; // Debug.formatArgs = formatArgs; - // debug.rawLog = rawLog; - // env-specific initialization logic for debug instances - - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - createDebug.instances.push(debug); - return debug; - } - - function destroy() { - var index = createDebug.instances.indexOf(this); - - if (index !== -1) { - createDebug.instances.splice(index, 1); - return true; - } - - return false; - } - - function extend(namespace, delimiter) { - return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - } - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - - - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.names = []; - createDebug.skips = []; - var i; - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - - for (i = 0; i < createDebug.instances.length; i++) { - var instance = createDebug.instances[i]; - instance.enabled = createDebug.enabled(instance.namespace); - } - } - /** - * Disable debug output. - * - * @api public - */ - - - function disable() { - createDebug.enable(''); - } - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - - - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - - var i; - var len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - - - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - - return val; - } - - createDebug.enable(createDebug.load()); - return createDebug; -} - -module.exports = setup; - diff --git a/node_modules/debug/src/index.js b/node_modules/debug/src/index.js deleted file mode 100644 index 0217315..0000000 --- a/node_modules/debug/src/index.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} - diff --git a/node_modules/debug/src/node.js b/node_modules/debug/src/node.js deleted file mode 100644 index 1e6a5f1..0000000 --- a/node_modules/debug/src/node.js +++ /dev/null @@ -1,177 +0,0 @@ -"use strict"; - -/** - * Module dependencies. - */ -var tty = require('tty'); - -var util = require('util'); -/** - * This is the Node.js implementation of `debug()`. - */ - - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - var supportsColor = require('supports-color'); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221]; - } -} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be. - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - - -exports.inspectOpts = Object.keys(process.env).filter(function (key) { - return /^debug_/i.test(key); -}).reduce(function (obj, key) { - // Camel-case - var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) { - return k.toUpperCase(); - }); // Coerce string value into JS value - - var val = process.env[key]; - - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); -} -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - - -function formatArgs(args) { - var name = this.namespace, - useColors = this.useColors; - - if (useColors) { - var c = this.color; - var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c); - var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m"); - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m"); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - - return new Date().toISOString() + ' '; -} -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ - - -function log() { - return process.stderr.write(util.format.apply(util, arguments) + '\n'); -} -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - - -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - - -function load() { - return process.env.DEBUG; -} -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - - -function init(debug) { - debug.inspectOpts = {}; - var keys = Object.keys(exports.inspectOpts); - - for (var i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); -var formatters = module.exports.formatters; -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(function (str) { return str.trim(); }) - .join(' '); -}; -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; - diff --git a/node_modules/dunder-proto/.eslintrc b/node_modules/dunder-proto/.eslintrc deleted file mode 100644 index 3b5d9e9..0000000 --- a/node_modules/dunder-proto/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", -} diff --git a/node_modules/dunder-proto/.github/FUNDING.yml b/node_modules/dunder-proto/.github/FUNDING.yml deleted file mode 100644 index 8a1d7b0..0000000 --- a/node_modules/dunder-proto/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/dunder-proto -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/dunder-proto/.nycrc b/node_modules/dunder-proto/.nycrc deleted file mode 100644 index 1826526..0000000 --- a/node_modules/dunder-proto/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/dunder-proto/CHANGELOG.md b/node_modules/dunder-proto/CHANGELOG.md deleted file mode 100644 index 9b8b2f8..0000000 --- a/node_modules/dunder-proto/CHANGELOG.md +++ /dev/null @@ -1,24 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.1](https://github.com/es-shims/dunder-proto/compare/v1.0.0...v1.0.1) - 2024-12-16 - -### Commits - -- [Fix] do not crash when `--disable-proto=throw` [`6c367d9`](https://github.com/es-shims/dunder-proto/commit/6c367d919bc1604778689a297bbdbfea65752847) -- [Tests] ensure noproto tests only use the current version of dunder-proto [`b02365b`](https://github.com/es-shims/dunder-proto/commit/b02365b9cf889c4a2cac7be0c3cfc90a789af36c) -- [Dev Deps] update `@arethetypeswrong/cli`, `@types/tape` [`e3c5c3b`](https://github.com/es-shims/dunder-proto/commit/e3c5c3bd81cf8cef7dff2eca19e558f0e307f666) -- [Deps] update `call-bind-apply-helpers` [`19f1da0`](https://github.com/es-shims/dunder-proto/commit/19f1da028b8dd0d05c85bfd8f7eed2819b686450) - -## v1.0.0 - 2024-12-06 - -### Commits - -- Initial implementation, tests, readme, types [`a5b74b0`](https://github.com/es-shims/dunder-proto/commit/a5b74b0082f5270cb0905cd9a2e533cee7498373) -- Initial commit [`73fb5a3`](https://github.com/es-shims/dunder-proto/commit/73fb5a353b51ac2ab00c9fdeb0114daffd4c07a8) -- npm init [`80152dc`](https://github.com/es-shims/dunder-proto/commit/80152dc98155da4eb046d9f67a87ed96e8280a1d) -- Only apps should have lockfiles [`03e6660`](https://github.com/es-shims/dunder-proto/commit/03e6660a1d70dc401f3e217a031475ec537243dd) diff --git a/node_modules/dunder-proto/LICENSE b/node_modules/dunder-proto/LICENSE deleted file mode 100644 index 34995e7..0000000 --- a/node_modules/dunder-proto/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 ECMAScript Shims - -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/node_modules/dunder-proto/README.md b/node_modules/dunder-proto/README.md deleted file mode 100644 index 44b80a2..0000000 --- a/node_modules/dunder-proto/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# dunder-proto <sup>[![Version Badge][npm-version-svg]][package-url]</sup> - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -If available, the `Object.prototype.__proto__` accessor and mutator, call-bound. - -## Getting started - -```sh -npm install --save dunder-proto -``` - -## Usage/Examples - -```js -const assert = require('assert'); -const getDunder = require('dunder-proto/get'); -const setDunder = require('dunder-proto/set'); - -const obj = {}; - -assert.equal('toString' in obj, true); -assert.equal(getDunder(obj), Object.prototype); - -setDunder(obj, null); - -assert.equal('toString' in obj, false); -assert.equal(getDunder(obj), null); -``` - -## Tests - -Clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/dunder-proto -[npm-version-svg]: https://versionbadg.es/es-shims/dunder-proto.svg -[deps-svg]: https://david-dm.org/es-shims/dunder-proto.svg -[deps-url]: https://david-dm.org/es-shims/dunder-proto -[dev-deps-svg]: https://david-dm.org/es-shims/dunder-proto/dev-status.svg -[dev-deps-url]: https://david-dm.org/es-shims/dunder-proto#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/dunder-proto.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/dunder-proto.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/dunder-proto.svg -[downloads-url]: https://npm-stat.com/charts.html?package=dunder-proto -[codecov-image]: https://codecov.io/gh/es-shims/dunder-proto/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/es-shims/dunder-proto/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/dunder-proto -[actions-url]: https://github.com/es-shims/dunder-proto/actions diff --git a/node_modules/dunder-proto/get.d.ts b/node_modules/dunder-proto/get.d.ts deleted file mode 100644 index c7e14d2..0000000 --- a/node_modules/dunder-proto/get.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function getDunderProto(target: {}): object | null; - -declare const x: false | typeof getDunderProto; - -export = x; \ No newline at end of file diff --git a/node_modules/dunder-proto/get.js b/node_modules/dunder-proto/get.js deleted file mode 100644 index 45093df..0000000 --- a/node_modules/dunder-proto/get.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var callBind = require('call-bind-apply-helpers'); -var gOPD = require('gopd'); - -var hasProtoAccessor; -try { - // eslint-disable-next-line no-extra-parens, no-proto - hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; -} catch (e) { - if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { - throw e; - } -} - -// eslint-disable-next-line no-extra-parens -var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); - -var $Object = Object; -var $getPrototypeOf = $Object.getPrototypeOf; - -/** @type {import('./get')} */ -module.exports = desc && typeof desc.get === 'function' - ? callBind([desc.get]) - : typeof $getPrototypeOf === 'function' - ? /** @type {import('./get')} */ function getDunder(value) { - // eslint-disable-next-line eqeqeq - return $getPrototypeOf(value == null ? value : $Object(value)); - } - : false; diff --git a/node_modules/dunder-proto/package.json b/node_modules/dunder-proto/package.json deleted file mode 100644 index 04a4036..0000000 --- a/node_modules/dunder-proto/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "dunder-proto", - "version": "1.0.1", - "description": "If available, the `Object.prototype.__proto__` accessor and mutator, call-bound", - "main": false, - "exports": { - "./get": "./get.js", - "./set": "./set.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=.js,.mjs .", - "postlint": "tsc -p . && attw -P", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>= 10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/es-shims/dunder-proto.git" - }, - "author": "Jordan Harband <ljharb@gmail.com>", - "license": "MIT", - "bugs": { - "url": "https://github.com/es-shims/dunder-proto/issues" - }, - "homepage": "https://github.com/es-shims/dunder-proto#readme", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.1", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.2", - "@types/tape": "^5.7.0", - "auto-changelog": "^2.5.0", - "encoding": "^0.1.13", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "testling": { - "files": "test/index.js" - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/dunder-proto/set.d.ts b/node_modules/dunder-proto/set.d.ts deleted file mode 100644 index 16bfdfe..0000000 --- a/node_modules/dunder-proto/set.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function setDunderProto<P extends null | object>(target: {}, proto: P): P; - -declare const x: false | typeof setDunderProto; - -export = x; \ No newline at end of file diff --git a/node_modules/dunder-proto/set.js b/node_modules/dunder-proto/set.js deleted file mode 100644 index 6085b6e..0000000 --- a/node_modules/dunder-proto/set.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var callBind = require('call-bind-apply-helpers'); -var gOPD = require('gopd'); -var $TypeError = require('es-errors/type'); - -/** @type {{ __proto__?: object | null }} */ -var obj = {}; -try { - obj.__proto__ = null; // eslint-disable-line no-proto -} catch (e) { - if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { - throw e; - } -} - -var hasProtoMutator = !('toString' in obj); - -// eslint-disable-next-line no-extra-parens -var desc = gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); - -/** @type {import('./set')} */ -module.exports = hasProtoMutator && ( -// eslint-disable-next-line no-extra-parens - (!!desc && typeof desc.set === 'function' && /** @type {import('./set')} */ (callBind([desc.set]))) - || /** @type {import('./set')} */ function setDunder(object, proto) { - // this is node v0.10 or older, which doesn't have Object.setPrototypeOf and has undeniable __proto__ - if (object == null) { // eslint-disable-line eqeqeq - throw new $TypeError('set Object.prototype.__proto__ called on null or undefined'); - } - // eslint-disable-next-line no-proto, no-param-reassign, no-extra-parens - /** @type {{ __proto__?: object | null }} */ (object).__proto__ = proto; - return proto; - } -); diff --git a/node_modules/dunder-proto/test/get.js b/node_modules/dunder-proto/test/get.js deleted file mode 100644 index 253f183..0000000 --- a/node_modules/dunder-proto/test/get.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var getDunderProto = require('../get'); - -test('getDunderProto', { skip: !getDunderProto }, function (t) { - if (!getDunderProto) { - throw 'should never happen; this is just for type narrowing'; // eslint-disable-line no-throw-literal - } - - // @ts-expect-error - t['throws'](function () { getDunderProto(); }, TypeError, 'throws if no argument'); - // @ts-expect-error - t['throws'](function () { getDunderProto(undefined); }, TypeError, 'throws with undefined'); - // @ts-expect-error - t['throws'](function () { getDunderProto(null); }, TypeError, 'throws with null'); - - t.equal(getDunderProto({}), Object.prototype); - t.equal(getDunderProto([]), Array.prototype); - t.equal(getDunderProto(function () {}), Function.prototype); - t.equal(getDunderProto(/./g), RegExp.prototype); - t.equal(getDunderProto(42), Number.prototype); - t.equal(getDunderProto(true), Boolean.prototype); - t.equal(getDunderProto('foo'), String.prototype); - - t.end(); -}); - -test('no dunder proto', { skip: !!getDunderProto }, function (t) { - t.notOk('__proto__' in Object.prototype, 'no __proto__ in Object.prototype'); - - t.end(); -}); diff --git a/node_modules/dunder-proto/test/index.js b/node_modules/dunder-proto/test/index.js deleted file mode 100644 index 08ff36f..0000000 --- a/node_modules/dunder-proto/test/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -require('./get'); -require('./set'); diff --git a/node_modules/dunder-proto/test/set.js b/node_modules/dunder-proto/test/set.js deleted file mode 100644 index c3bfe4d..0000000 --- a/node_modules/dunder-proto/test/set.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var setDunderProto = require('../set'); - -test('setDunderProto', { skip: !setDunderProto }, function (t) { - if (!setDunderProto) { - throw 'should never happen; this is just for type narrowing'; // eslint-disable-line no-throw-literal - } - - // @ts-expect-error - t['throws'](function () { setDunderProto(); }, TypeError, 'throws if no arguments'); - // @ts-expect-error - t['throws'](function () { setDunderProto(undefined); }, TypeError, 'throws with undefined and nothing'); - // @ts-expect-error - t['throws'](function () { setDunderProto(undefined, undefined); }, TypeError, 'throws with undefined and undefined'); - // @ts-expect-error - t['throws'](function () { setDunderProto(null); }, TypeError, 'throws with null and undefined'); - // @ts-expect-error - t['throws'](function () { setDunderProto(null, undefined); }, TypeError, 'throws with null and undefined'); - - /** @type {{ inherited?: boolean }} */ - var obj = {}; - t.ok('toString' in obj, 'object initially has toString'); - - setDunderProto(obj, null); - t.notOk('toString' in obj, 'object no longer has toString'); - - t.notOk('inherited' in obj, 'object lacks inherited property'); - setDunderProto(obj, { inherited: true }); - t.equal(obj.inherited, true, 'object has inherited property'); - - t.end(); -}); - -test('no dunder proto', { skip: !!setDunderProto }, function (t) { - if ('__proto__' in Object.prototype) { - t['throws']( - // @ts-expect-error - function () { ({}).__proto__ = null; }, // eslint-disable-line no-proto - Error, - 'throws when setting Object.prototype.__proto__' - ); - } else { - t.notOk('__proto__' in Object.prototype, 'no __proto__ in Object.prototype'); - } - - t.end(); -}); diff --git a/node_modules/dunder-proto/tsconfig.json b/node_modules/dunder-proto/tsconfig.json deleted file mode 100644 index dabbe23..0000000 --- a/node_modules/dunder-proto/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "ES2021", - }, - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/entities/LICENSE b/node_modules/entities/LICENSE deleted file mode 100644 index c464f86..0000000 --- a/node_modules/entities/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright (c) Felix Böhm -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/entities/lib/decode.d.ts b/node_modules/entities/lib/decode.d.ts deleted file mode 100644 index ccfd9fb..0000000 --- a/node_modules/entities/lib/decode.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -import htmlDecodeTree from "./generated/decode-data-html.js"; -import xmlDecodeTree from "./generated/decode-data-xml.js"; -import decodeCodePoint from "./decode_codepoint.js"; -export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint }; -export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js"; -export declare enum BinTrieFlags { - VALUE_LENGTH = 49152, - BRANCH_LENGTH = 16256, - JUMP_TABLE = 127 -} -export declare enum DecodingMode { - /** Entities in text nodes that can end with any character. */ - Legacy = 0, - /** Only allow entities terminated with a semicolon. */ - Strict = 1, - /** Entities in attributes have limitations on ending characters. */ - Attribute = 2 -} -/** - * Producers for character reference errors as defined in the HTML spec. - */ -export interface EntityErrorProducer { - missingSemicolonAfterCharacterReference(): void; - absenceOfDigitsInNumericCharacterReference(consumedCharacters: number): void; - validateNumericCharacterReference(code: number): void; -} -/** - * Token decoder with support of writing partial entities. - */ -export declare class EntityDecoder { - /** The tree used to decode entities. */ - private readonly decodeTree; - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - private readonly emitCodePoint; - /** An object that is used to produce errors. */ - private readonly errors?; - constructor( - /** The tree used to decode entities. */ - decodeTree: Uint16Array, - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - emitCodePoint: (cp: number, consumed: number) => void, - /** An object that is used to produce errors. */ - errors?: EntityErrorProducer | undefined); - /** The current state of the decoder. */ - private state; - /** Characters that were consumed while parsing an entity. */ - private consumed; - /** - * The result of the entity. - * - * Either the result index of a numeric entity, or the codepoint of a - * numeric entity. - */ - private result; - /** The current index in the decode tree. */ - private treeIndex; - /** The number of characters that were consumed in excess. */ - private excess; - /** The mode in which the decoder is operating. */ - private decodeMode; - /** Resets the instance to make it reusable. */ - startEntity(decodeMode: DecodingMode): void; - /** - * Write an entity to the decoder. This can be called multiple times with partial entities. - * If the entity is incomplete, the decoder will return -1. - * - * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the - * entity is incomplete, and resume when the next string is written. - * - * @param string The string containing the entity (or a continuation of the entity). - * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - write(str: string, offset: number): number; - /** - * Switches between the numeric decimal and hexadecimal states. - * - * Equivalent to the `Numeric character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNumericStart; - private addToNumericResult; - /** - * Parses a hexadecimal numeric entity. - * - * Equivalent to the `Hexademical character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNumericHex; - /** - * Parses a decimal numeric entity. - * - * Equivalent to the `Decimal character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNumericDecimal; - /** - * Validate and emit a numeric entity. - * - * Implements the logic from the `Hexademical character reference start - * state` and `Numeric character reference end state` in the HTML spec. - * - * @param lastCp The last code point of the entity. Used to see if the - * entity was terminated with a semicolon. - * @param expectedLength The minimum number of characters that should be - * consumed. Used to validate that at least one digit - * was consumed. - * @returns The number of characters that were consumed. - */ - private emitNumericEntity; - /** - * Parses a named entity. - * - * Equivalent to the `Named character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNamedEntity; - /** - * Emit a named entity that was not terminated with a semicolon. - * - * @returns The number of characters consumed. - */ - private emitNotTerminatedNamedEntity; - /** - * Emit a named entity. - * - * @param result The index of the entity in the decode tree. - * @param valueLength The number of bytes in the entity. - * @param consumed The number of characters consumed. - * - * @returns The number of characters consumed. - */ - private emitNamedEntityData; - /** - * Signal to the parser that the end of the input was reached. - * - * Remaining data will be emitted and relevant errors will be produced. - * - * @returns The number of characters consumed. - */ - end(): number; -} -/** - * Determines the branch of the current node that is taken given the current - * character. This function is used to traverse the trie. - * - * @param decodeTree The trie. - * @param current The current node. - * @param nodeIdx The index right after the current node and its value. - * @param char The current character. - * @returns The index of the next node, or -1 if no branch is taken. - */ -export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIdx: number, char: number): number; -/** - * Decodes an HTML string. - * - * @param str The string to decode. - * @param mode The decoding mode. - * @returns The decoded string. - */ -export declare function decodeHTML(str: string, mode?: DecodingMode): string; -/** - * Decodes an HTML string in an attribute. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export declare function decodeHTMLAttribute(str: string): string; -/** - * Decodes an HTML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export declare function decodeHTMLStrict(str: string): string; -/** - * Decodes an XML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export declare function decodeXML(str: string): string; -//# sourceMappingURL=decode.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/decode.d.ts.map b/node_modules/entities/lib/decode.d.ts.map deleted file mode 100644 index 4c0b4b4..0000000 --- a/node_modules/entities/lib/decode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAGN,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAoBxE,oBAAY,YAAY;IACpB,YAAY,QAAwB;IACpC,aAAa,QAAwB;IACrC,UAAU,MAAwB;CACrC;AAuCD,oBAAY,YAAY;IACpB,8DAA8D;IAC9D,MAAM,IAAI;IACV,uDAAuD;IACvD,MAAM,IAAI;IACV,oEAAoE;IACpE,SAAS,IAAI;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,uCAAuC,IAAI,IAAI,CAAC;IAChD,0CAA0C,CACtC,kBAAkB,EAAE,MAAM,GAC3B,IAAI,CAAC;IACR,iCAAiC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACzD;AAED;;GAEG;AACH,qBAAa,aAAa;IAElB,wCAAwC;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B;;;;;;;;OAQG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,gDAAgD;IAChD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;;IAbxB,wCAAwC;IACvB,UAAU,EAAE,WAAW;IACxC;;;;;;;;OAQG;IACc,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI;IACtE,gDAAgD;IAC/B,MAAM,CAAC,iCAAqB;IAGjD,wCAAwC;IACxC,OAAO,CAAC,KAAK,CAAkC;IAC/C,6DAA6D;IAC7D,OAAO,CAAC,QAAQ,CAAK;IACrB;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAK;IAEnB,4CAA4C;IAC5C,OAAO,CAAC,SAAS,CAAK;IACtB,6DAA6D;IAC7D,OAAO,CAAC,MAAM,CAAK;IACnB,kDAAkD;IAClD,OAAO,CAAC,UAAU,CAAuB;IAEzC,+CAA+C;IAC/C,WAAW,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI;IAS3C;;;;;;;;;;OAUG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IA8B1C;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,kBAAkB;IAe1B;;;;;;;;OAQG;IACH,OAAO,CAAC,eAAe;IAkBvB;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAkB3B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,iBAAiB;IA6BzB;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAsDxB;;;;OAIG;IACH,OAAO,CAAC,4BAA4B;IAYpC;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAqB3B;;;;;;OAMG;IACH,GAAG,IAAI,MAAM;CA6BhB;AAoDD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC3B,UAAU,EAAE,WAAW,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GACb,MAAM,CAsCR;AAKD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,eAAsB,GAAG,MAAM,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C"} \ No newline at end of file diff --git a/node_modules/entities/lib/decode.js b/node_modules/entities/lib/decode.js deleted file mode 100644 index aa4a42c..0000000 --- a/node_modules/entities/lib/decode.js +++ /dev/null @@ -1,536 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTMLAttribute = exports.decodeHTML = exports.determineBranch = exports.EntityDecoder = exports.DecodingMode = exports.BinTrieFlags = exports.fromCodePoint = exports.replaceCodePoint = exports.decodeCodePoint = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0; -var decode_data_html_js_1 = __importDefault(require("./generated/decode-data-html.js")); -exports.htmlDecodeTree = decode_data_html_js_1.default; -var decode_data_xml_js_1 = __importDefault(require("./generated/decode-data-xml.js")); -exports.xmlDecodeTree = decode_data_xml_js_1.default; -var decode_codepoint_js_1 = __importStar(require("./decode_codepoint.js")); -exports.decodeCodePoint = decode_codepoint_js_1.default; -var decode_codepoint_js_2 = require("./decode_codepoint.js"); -Object.defineProperty(exports, "replaceCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.replaceCodePoint; } }); -Object.defineProperty(exports, "fromCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.fromCodePoint; } }); -var CharCodes; -(function (CharCodes) { - CharCodes[CharCodes["NUM"] = 35] = "NUM"; - CharCodes[CharCodes["SEMI"] = 59] = "SEMI"; - CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS"; - CharCodes[CharCodes["ZERO"] = 48] = "ZERO"; - CharCodes[CharCodes["NINE"] = 57] = "NINE"; - CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A"; - CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F"; - CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X"; - CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z"; - CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A"; - CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F"; - CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z"; -})(CharCodes || (CharCodes = {})); -/** Bit that needs to be set to convert an upper case ASCII character to lower case */ -var TO_LOWER_BIT = 32; -var BinTrieFlags; -(function (BinTrieFlags) { - BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; - BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; - BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE"; -})(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {})); -function isNumber(code) { - return code >= CharCodes.ZERO && code <= CharCodes.NINE; -} -function isHexadecimalCharacter(code) { - return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) || - (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F)); -} -function isAsciiAlphaNumeric(code) { - return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) || - (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) || - isNumber(code)); -} -/** - * Checks if the given character is a valid end character for an entity in an attribute. - * - * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error. - * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state - */ -function isEntityInAttributeInvalidEnd(code) { - return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); -} -var EntityDecoderState; -(function (EntityDecoderState) { - EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart"; - EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart"; - EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal"; - EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex"; - EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity"; -})(EntityDecoderState || (EntityDecoderState = {})); -var DecodingMode; -(function (DecodingMode) { - /** Entities in text nodes that can end with any character. */ - DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy"; - /** Only allow entities terminated with a semicolon. */ - DecodingMode[DecodingMode["Strict"] = 1] = "Strict"; - /** Entities in attributes have limitations on ending characters. */ - DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute"; -})(DecodingMode = exports.DecodingMode || (exports.DecodingMode = {})); -/** - * Token decoder with support of writing partial entities. - */ -var EntityDecoder = /** @class */ (function () { - function EntityDecoder( - /** The tree used to decode entities. */ - decodeTree, - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - emitCodePoint, - /** An object that is used to produce errors. */ - errors) { - this.decodeTree = decodeTree; - this.emitCodePoint = emitCodePoint; - this.errors = errors; - /** The current state of the decoder. */ - this.state = EntityDecoderState.EntityStart; - /** Characters that were consumed while parsing an entity. */ - this.consumed = 1; - /** - * The result of the entity. - * - * Either the result index of a numeric entity, or the codepoint of a - * numeric entity. - */ - this.result = 0; - /** The current index in the decode tree. */ - this.treeIndex = 0; - /** The number of characters that were consumed in excess. */ - this.excess = 1; - /** The mode in which the decoder is operating. */ - this.decodeMode = DecodingMode.Strict; - } - /** Resets the instance to make it reusable. */ - EntityDecoder.prototype.startEntity = function (decodeMode) { - this.decodeMode = decodeMode; - this.state = EntityDecoderState.EntityStart; - this.result = 0; - this.treeIndex = 0; - this.excess = 1; - this.consumed = 1; - }; - /** - * Write an entity to the decoder. This can be called multiple times with partial entities. - * If the entity is incomplete, the decoder will return -1. - * - * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the - * entity is incomplete, and resume when the next string is written. - * - * @param string The string containing the entity (or a continuation of the entity). - * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.write = function (str, offset) { - switch (this.state) { - case EntityDecoderState.EntityStart: { - if (str.charCodeAt(offset) === CharCodes.NUM) { - this.state = EntityDecoderState.NumericStart; - this.consumed += 1; - return this.stateNumericStart(str, offset + 1); - } - this.state = EntityDecoderState.NamedEntity; - return this.stateNamedEntity(str, offset); - } - case EntityDecoderState.NumericStart: { - return this.stateNumericStart(str, offset); - } - case EntityDecoderState.NumericDecimal: { - return this.stateNumericDecimal(str, offset); - } - case EntityDecoderState.NumericHex: { - return this.stateNumericHex(str, offset); - } - case EntityDecoderState.NamedEntity: { - return this.stateNamedEntity(str, offset); - } - } - }; - /** - * Switches between the numeric decimal and hexadecimal states. - * - * Equivalent to the `Numeric character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.stateNumericStart = function (str, offset) { - if (offset >= str.length) { - return -1; - } - if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { - this.state = EntityDecoderState.NumericHex; - this.consumed += 1; - return this.stateNumericHex(str, offset + 1); - } - this.state = EntityDecoderState.NumericDecimal; - return this.stateNumericDecimal(str, offset); - }; - EntityDecoder.prototype.addToNumericResult = function (str, start, end, base) { - if (start !== end) { - var digitCount = end - start; - this.result = - this.result * Math.pow(base, digitCount) + - parseInt(str.substr(start, digitCount), base); - this.consumed += digitCount; - } - }; - /** - * Parses a hexadecimal numeric entity. - * - * Equivalent to the `Hexademical character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.stateNumericHex = function (str, offset) { - var startIdx = offset; - while (offset < str.length) { - var char = str.charCodeAt(offset); - if (isNumber(char) || isHexadecimalCharacter(char)) { - offset += 1; - } - else { - this.addToNumericResult(str, startIdx, offset, 16); - return this.emitNumericEntity(char, 3); - } - } - this.addToNumericResult(str, startIdx, offset, 16); - return -1; - }; - /** - * Parses a decimal numeric entity. - * - * Equivalent to the `Decimal character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.stateNumericDecimal = function (str, offset) { - var startIdx = offset; - while (offset < str.length) { - var char = str.charCodeAt(offset); - if (isNumber(char)) { - offset += 1; - } - else { - this.addToNumericResult(str, startIdx, offset, 10); - return this.emitNumericEntity(char, 2); - } - } - this.addToNumericResult(str, startIdx, offset, 10); - return -1; - }; - /** - * Validate and emit a numeric entity. - * - * Implements the logic from the `Hexademical character reference start - * state` and `Numeric character reference end state` in the HTML spec. - * - * @param lastCp The last code point of the entity. Used to see if the - * entity was terminated with a semicolon. - * @param expectedLength The minimum number of characters that should be - * consumed. Used to validate that at least one digit - * was consumed. - * @returns The number of characters that were consumed. - */ - EntityDecoder.prototype.emitNumericEntity = function (lastCp, expectedLength) { - var _a; - // Ensure we consumed at least one digit. - if (this.consumed <= expectedLength) { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - // Figure out if this is a legit end of the entity - if (lastCp === CharCodes.SEMI) { - this.consumed += 1; - } - else if (this.decodeMode === DecodingMode.Strict) { - return 0; - } - this.emitCodePoint((0, decode_codepoint_js_1.replaceCodePoint)(this.result), this.consumed); - if (this.errors) { - if (lastCp !== CharCodes.SEMI) { - this.errors.missingSemicolonAfterCharacterReference(); - } - this.errors.validateNumericCharacterReference(this.result); - } - return this.consumed; - }; - /** - * Parses a named entity. - * - * Equivalent to the `Named character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.stateNamedEntity = function (str, offset) { - var decodeTree = this.decodeTree; - var current = decodeTree[this.treeIndex]; - // The mask is the number of bytes of the value, including the current byte. - var valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - for (; offset < str.length; offset++, this.excess++) { - var char = str.charCodeAt(offset); - this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); - if (this.treeIndex < 0) { - return this.result === 0 || - // If we are parsing an attribute - (this.decodeMode === DecodingMode.Attribute && - // We shouldn't have consumed any characters after the entity, - (valueLength === 0 || - // And there should be no invalid characters. - isEntityInAttributeInvalidEnd(char))) - ? 0 - : this.emitNotTerminatedNamedEntity(); - } - current = decodeTree[this.treeIndex]; - valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - // If the branch is a value, store it and continue - if (valueLength !== 0) { - // If the entity is terminated by a semicolon, we are done. - if (char === CharCodes.SEMI) { - return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); - } - // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it. - if (this.decodeMode !== DecodingMode.Strict) { - this.result = this.treeIndex; - this.consumed += this.excess; - this.excess = 0; - } - } - } - return -1; - }; - /** - * Emit a named entity that was not terminated with a semicolon. - * - * @returns The number of characters consumed. - */ - EntityDecoder.prototype.emitNotTerminatedNamedEntity = function () { - var _a; - var _b = this, result = _b.result, decodeTree = _b.decodeTree; - var valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; - this.emitNamedEntityData(result, valueLength, this.consumed); - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); - return this.consumed; - }; - /** - * Emit a named entity. - * - * @param result The index of the entity in the decode tree. - * @param valueLength The number of bytes in the entity. - * @param consumed The number of characters consumed. - * - * @returns The number of characters consumed. - */ - EntityDecoder.prototype.emitNamedEntityData = function (result, valueLength, consumed) { - var decodeTree = this.decodeTree; - this.emitCodePoint(valueLength === 1 - ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH - : decodeTree[result + 1], consumed); - if (valueLength === 3) { - // For multi-byte values, we need to emit the second byte. - this.emitCodePoint(decodeTree[result + 2], consumed); - } - return consumed; - }; - /** - * Signal to the parser that the end of the input was reached. - * - * Remaining data will be emitted and relevant errors will be produced. - * - * @returns The number of characters consumed. - */ - EntityDecoder.prototype.end = function () { - var _a; - switch (this.state) { - case EntityDecoderState.NamedEntity: { - // Emit a named entity if we have one. - return this.result !== 0 && - (this.decodeMode !== DecodingMode.Attribute || - this.result === this.treeIndex) - ? this.emitNotTerminatedNamedEntity() - : 0; - } - // Otherwise, emit a numeric entity if we have one. - case EntityDecoderState.NumericDecimal: { - return this.emitNumericEntity(0, 2); - } - case EntityDecoderState.NumericHex: { - return this.emitNumericEntity(0, 3); - } - case EntityDecoderState.NumericStart: { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - case EntityDecoderState.EntityStart: { - // Return 0 if we have no entity. - return 0; - } - } - }; - return EntityDecoder; -}()); -exports.EntityDecoder = EntityDecoder; -/** - * Creates a function that decodes entities in a string. - * - * @param decodeTree The decode tree. - * @returns A function that decodes entities in a string. - */ -function getDecoder(decodeTree) { - var ret = ""; - var decoder = new EntityDecoder(decodeTree, function (str) { return (ret += (0, decode_codepoint_js_1.fromCodePoint)(str)); }); - return function decodeWithTrie(str, decodeMode) { - var lastIndex = 0; - var offset = 0; - while ((offset = str.indexOf("&", offset)) >= 0) { - ret += str.slice(lastIndex, offset); - decoder.startEntity(decodeMode); - var len = decoder.write(str, - // Skip the "&" - offset + 1); - if (len < 0) { - lastIndex = offset + decoder.end(); - break; - } - lastIndex = offset + len; - // If `len` is 0, skip the current `&` and continue. - offset = len === 0 ? lastIndex + 1 : lastIndex; - } - var result = ret + str.slice(lastIndex); - // Make sure we don't keep a reference to the final string. - ret = ""; - return result; - }; -} -/** - * Determines the branch of the current node that is taken given the current - * character. This function is used to traverse the trie. - * - * @param decodeTree The trie. - * @param current The current node. - * @param nodeIdx The index right after the current node and its value. - * @param char The current character. - * @returns The index of the next node, or -1 if no branch is taken. - */ -function determineBranch(decodeTree, current, nodeIdx, char) { - var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; - var jumpOffset = current & BinTrieFlags.JUMP_TABLE; - // Case 1: Single branch encoded in jump offset - if (branchCount === 0) { - return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; - } - // Case 2: Multiple branches encoded in jump table - if (jumpOffset) { - var value = char - jumpOffset; - return value < 0 || value >= branchCount - ? -1 - : decodeTree[nodeIdx + value] - 1; - } - // Case 3: Multiple branches encoded in dictionary - // Binary search for the character. - var lo = nodeIdx; - var hi = lo + branchCount - 1; - while (lo <= hi) { - var mid = (lo + hi) >>> 1; - var midVal = decodeTree[mid]; - if (midVal < char) { - lo = mid + 1; - } - else if (midVal > char) { - hi = mid - 1; - } - else { - return decodeTree[mid + branchCount]; - } - } - return -1; -} -exports.determineBranch = determineBranch; -var htmlDecoder = getDecoder(decode_data_html_js_1.default); -var xmlDecoder = getDecoder(decode_data_xml_js_1.default); -/** - * Decodes an HTML string. - * - * @param str The string to decode. - * @param mode The decoding mode. - * @returns The decoded string. - */ -function decodeHTML(str, mode) { - if (mode === void 0) { mode = DecodingMode.Legacy; } - return htmlDecoder(str, mode); -} -exports.decodeHTML = decodeHTML; -/** - * Decodes an HTML string in an attribute. - * - * @param str The string to decode. - * @returns The decoded string. - */ -function decodeHTMLAttribute(str) { - return htmlDecoder(str, DecodingMode.Attribute); -} -exports.decodeHTMLAttribute = decodeHTMLAttribute; -/** - * Decodes an HTML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -function decodeHTMLStrict(str) { - return htmlDecoder(str, DecodingMode.Strict); -} -exports.decodeHTMLStrict = decodeHTMLStrict; -/** - * Decodes an XML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -function decodeXML(str) { - return xmlDecoder(str, DecodingMode.Strict); -} -exports.decodeXML = decodeXML; -//# sourceMappingURL=decode.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/decode.js.map b/node_modules/entities/lib/decode.js.map deleted file mode 100644 index afcad7e..0000000 --- a/node_modules/entities/lib/decode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wFAA6D;AAQpD,yBARF,6BAAc,CAQE;AAPvB,sFAA2D;AAOlC,wBAPlB,4BAAa,CAOkB;AANtC,2EAG+B;AAGS,0BANjC,6BAAe,CAMiC;AACvD,6DAAwE;AAA/D,uHAAA,gBAAgB,OAAA;AAAE,oHAAA,aAAa,OAAA;AAExC,IAAW,SAaV;AAbD,WAAW,SAAS;IAChB,wCAAQ,CAAA;IACR,0CAAS,CAAA;IACT,8CAAW,CAAA;IACX,0CAAS,CAAA;IACT,0CAAS,CAAA;IACT,gDAAY,CAAA;IACZ,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,gDAAY,CAAA;IACZ,gDAAY,CAAA;IACZ,gDAAY,CAAA;AAChB,CAAC,EAbU,SAAS,KAAT,SAAS,QAanB;AAED,sFAAsF;AACtF,IAAM,YAAY,GAAG,EAAQ,CAAC;AAE9B,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,mEAAoC,CAAA;IACpC,qEAAqC,CAAA;IACrC,6DAAkC,CAAA;AACtC,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB;AAED,SAAS,QAAQ,CAAC,IAAY;IAC1B,OAAO,IAAI,IAAI,SAAS,CAAC,IAAI,IAAI,IAAI,IAAI,SAAS,CAAC,IAAI,CAAC;AAC5D,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAY;IACxC,OAAO,CACH,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC,CAC3D,CAAC;AACN,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAY;IACrC,OAAO,CACH,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,SAAS,6BAA6B,CAAC,IAAY;IAC/C,OAAO,IAAI,KAAK,SAAS,CAAC,MAAM,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;AAClE,CAAC;AAED,IAAW,kBAMV;AAND,WAAW,kBAAkB;IACzB,yEAAW,CAAA;IACX,2EAAY,CAAA;IACZ,+EAAc,CAAA;IACd,uEAAU,CAAA;IACV,yEAAW,CAAA;AACf,CAAC,EANU,kBAAkB,KAAlB,kBAAkB,QAM5B;AAED,IAAY,YAOX;AAPD,WAAY,YAAY;IACpB,8DAA8D;IAC9D,mDAAU,CAAA;IACV,uDAAuD;IACvD,mDAAU,CAAA;IACV,oEAAoE;IACpE,yDAAa,CAAA;AACjB,CAAC,EAPW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAOvB;AAaD;;GAEG;AACH;IACI;IACI,wCAAwC;IACvB,UAAuB;IACxC;;;;;;;;OAQG;IACc,aAAqD;IACtE,gDAAgD;IAC/B,MAA4B;QAZ5B,eAAU,GAAV,UAAU,CAAa;QAUvB,kBAAa,GAAb,aAAa,CAAwC;QAErD,WAAM,GAAN,MAAM,CAAsB;QAGjD,wCAAwC;QAChC,UAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;QAC/C,6DAA6D;QACrD,aAAQ,GAAG,CAAC,CAAC;QACrB;;;;;WAKG;QACK,WAAM,GAAG,CAAC,CAAC;QAEnB,4CAA4C;QACpC,cAAS,GAAG,CAAC,CAAC;QACtB,6DAA6D;QACrD,WAAM,GAAG,CAAC,CAAC;QACnB,kDAAkD;QAC1C,eAAU,GAAG,YAAY,CAAC,MAAM,CAAC;IAnBtC,CAAC;IAqBJ,+CAA+C;IAC/C,mCAAW,GAAX,UAAY,UAAwB;QAChC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;QAC5C,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IACtB,CAAC;IAED;;;;;;;;;;OAUG;IACH,6BAAK,GAAL,UAAM,GAAW,EAAE,MAAc;QAC7B,QAAQ,IAAI,CAAC,KAAK,EAAE;YAChB,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC,GAAG,EAAE;oBAC1C,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,YAAY,CAAC;oBAC7C,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;oBACnB,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;iBAClD;gBACD,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;gBAC5C,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC7C;YAED,KAAK,kBAAkB,CAAC,YAAY,CAAC,CAAC;gBAClC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC9C;YAED,KAAK,kBAAkB,CAAC,cAAc,CAAC,CAAC;gBACpC,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAChD;YAED,KAAK,kBAAkB,CAAC,UAAU,CAAC,CAAC;gBAChC,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC5C;YAED,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC7C;SACJ;IACL,CAAC;IAED;;;;;;;;OAQG;IACK,yCAAiB,GAAzB,UAA0B,GAAW,EAAE,MAAc;QACjD,IAAI,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE;YACtB,OAAO,CAAC,CAAC,CAAC;SACb;QAED,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,KAAK,SAAS,CAAC,OAAO,EAAE;YAC/D,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC;YAC3C,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;YACnB,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;SAChD;QAED,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,cAAc,CAAC;QAC/C,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IAEO,0CAAkB,GAA1B,UACI,GAAW,EACX,KAAa,EACb,GAAW,EACX,IAAY;QAEZ,IAAI,KAAK,KAAK,GAAG,EAAE;YACf,IAAM,UAAU,GAAG,GAAG,GAAG,KAAK,CAAC;YAC/B,IAAI,CAAC,MAAM;gBACP,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC;oBACxC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;YAClD,IAAI,CAAC,QAAQ,IAAI,UAAU,CAAC;SAC/B;IACL,CAAC;IAED;;;;;;;;OAQG;IACK,uCAAe,GAAvB,UAAwB,GAAW,EAAE,MAAc;QAC/C,IAAM,QAAQ,GAAG,MAAM,CAAC;QAExB,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE;YACxB,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACpC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,sBAAsB,CAAC,IAAI,CAAC,EAAE;gBAChD,MAAM,IAAI,CAAC,CAAC;aACf;iBAAM;gBACH,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;gBACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;aAC1C;SACJ;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAEnD,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;;;;;OAQG;IACK,2CAAmB,GAA3B,UAA4B,GAAW,EAAE,MAAc;QACnD,IAAM,QAAQ,GAAG,MAAM,CAAC;QAExB,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE;YACxB,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACpC,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAChB,MAAM,IAAI,CAAC,CAAC;aACf;iBAAM;gBACH,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;gBACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;aAC1C;SACJ;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAEnD,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;OAYG;IACK,yCAAiB,GAAzB,UAA0B,MAAc,EAAE,cAAsB;;QAC5D,yCAAyC;QACzC,IAAI,IAAI,CAAC,QAAQ,IAAI,cAAc,EAAE;YACjC,MAAA,IAAI,CAAC,MAAM,0CAAE,0CAA0C,CACnD,IAAI,CAAC,QAAQ,CAChB,CAAC;YACF,OAAO,CAAC,CAAC;SACZ;QAED,kDAAkD;QAClD,IAAI,MAAM,KAAK,SAAS,CAAC,IAAI,EAAE;YAC3B,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;SACtB;aAAM,IAAI,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,MAAM,EAAE;YAChD,OAAO,CAAC,CAAC;SACZ;QAED,IAAI,CAAC,aAAa,CAAC,IAAA,sCAAgB,EAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEjE,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,IAAI,MAAM,KAAK,SAAS,CAAC,IAAI,EAAE;gBAC3B,IAAI,CAAC,MAAM,CAAC,uCAAuC,EAAE,CAAC;aACzD;YAED,IAAI,CAAC,MAAM,CAAC,iCAAiC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC9D;QAED,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACK,wCAAgB,GAAxB,UAAyB,GAAW,EAAE,MAAc;QACxC,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;QAC5B,IAAI,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACzC,4EAA4E;QAC5E,IAAI,WAAW,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAE9D,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE;YACjD,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YAEpC,IAAI,CAAC,SAAS,GAAG,eAAe,CAC5B,UAAU,EACV,OAAO,EACP,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,EACzC,IAAI,CACP,CAAC;YAEF,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC,EAAE;gBACpB,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC;oBACpB,iCAAiC;oBACjC,CAAC,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,SAAS;wBACvC,8DAA8D;wBAC9D,CAAC,WAAW,KAAK,CAAC;4BACd,6CAA6C;4BAC7C,6BAA6B,CAAC,IAAI,CAAC,CAAC,CAAC;oBAC7C,CAAC,CAAC,CAAC;oBACH,CAAC,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC;aAC7C;YAED,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACrC,WAAW,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;YAE1D,kDAAkD;YAClD,IAAI,WAAW,KAAK,CAAC,EAAE;gBACnB,2DAA2D;gBAC3D,IAAI,IAAI,KAAK,SAAS,CAAC,IAAI,EAAE;oBACzB,OAAO,IAAI,CAAC,mBAAmB,CAC3B,IAAI,CAAC,SAAS,EACd,WAAW,EACX,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAC9B,CAAC;iBACL;gBAED,2FAA2F;gBAC3F,IAAI,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,MAAM,EAAE;oBACzC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC;oBAC7B,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC;oBAC7B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;iBACnB;aACJ;SACJ;QAED,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;OAIG;IACK,oDAA4B,GAApC;;QACU,IAAA,KAAyB,IAAI,EAA3B,MAAM,YAAA,EAAE,UAAU,gBAAS,CAAC;QAEpC,IAAM,WAAW,GACb,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAE3D,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7D,MAAA,IAAI,CAAC,MAAM,0CAAE,uCAAuC,EAAE,CAAC;QAEvD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACK,2CAAmB,GAA3B,UACI,MAAc,EACd,WAAmB,EACnB,QAAgB;QAER,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;QAE5B,IAAI,CAAC,aAAa,CACd,WAAW,KAAK,CAAC;YACb,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,YAAY;YACjD,CAAC,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAC5B,QAAQ,CACX,CAAC;QACF,IAAI,WAAW,KAAK,CAAC,EAAE;YACnB,0DAA0D;YAC1D,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;SACxD;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACH,2BAAG,GAAH;;QACI,QAAQ,IAAI,CAAC,KAAK,EAAE;YAChB,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,sCAAsC;gBACtC,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC;oBACpB,CAAC,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,SAAS;wBACvC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,SAAS,CAAC;oBACnC,CAAC,CAAC,IAAI,CAAC,4BAA4B,EAAE;oBACrC,CAAC,CAAC,CAAC,CAAC;aACX;YACD,mDAAmD;YACnD,KAAK,kBAAkB,CAAC,cAAc,CAAC,CAAC;gBACpC,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACvC;YACD,KAAK,kBAAkB,CAAC,UAAU,CAAC,CAAC;gBAChC,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACvC;YACD,KAAK,kBAAkB,CAAC,YAAY,CAAC,CAAC;gBAClC,MAAA,IAAI,CAAC,MAAM,0CAAE,0CAA0C,CACnD,IAAI,CAAC,QAAQ,CAChB,CAAC;gBACF,OAAO,CAAC,CAAC;aACZ;YACD,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,iCAAiC;gBACjC,OAAO,CAAC,CAAC;aACZ;SACJ;IACL,CAAC;IACL,oBAAC;AAAD,CAAC,AAjXD,IAiXC;AAjXY,sCAAa;AAmX1B;;;;;GAKG;AACH,SAAS,UAAU,CAAC,UAAuB;IACvC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAM,OAAO,GAAG,IAAI,aAAa,CAC7B,UAAU,EACV,UAAC,GAAG,IAAK,OAAA,CAAC,GAAG,IAAI,IAAA,mCAAa,EAAC,GAAG,CAAC,CAAC,EAA3B,CAA2B,CACvC,CAAC;IAEF,OAAO,SAAS,cAAc,CAC1B,GAAW,EACX,UAAwB;QAExB,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,IAAI,MAAM,GAAG,CAAC,CAAC;QAEf,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE;YAC7C,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAEpC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAEhC,IAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CACrB,GAAG;YACH,eAAe;YACf,MAAM,GAAG,CAAC,CACb,CAAC;YAEF,IAAI,GAAG,GAAG,CAAC,EAAE;gBACT,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;gBACnC,MAAM;aACT;YAED,SAAS,GAAG,MAAM,GAAG,GAAG,CAAC;YACzB,oDAAoD;YACpD,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;SAClD;QAED,IAAM,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAE1C,2DAA2D;QAC3D,GAAG,GAAG,EAAE,CAAC;QAET,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;AACN,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,eAAe,CAC3B,UAAuB,EACvB,OAAe,EACf,OAAe,EACf,IAAY;IAEZ,IAAM,WAAW,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAChE,IAAM,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC,UAAU,CAAC;IAErD,+CAA+C;IAC/C,IAAI,WAAW,KAAK,CAAC,EAAE;QACnB,OAAO,UAAU,KAAK,CAAC,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACjE;IAED,kDAAkD;IAClD,IAAI,UAAU,EAAE;QACZ,IAAM,KAAK,GAAG,IAAI,GAAG,UAAU,CAAC;QAEhC,OAAO,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,WAAW;YACpC,CAAC,CAAC,CAAC,CAAC;YACJ,CAAC,CAAC,UAAU,CAAC,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;KACzC;IAED,kDAAkD;IAElD,mCAAmC;IACnC,IAAI,EAAE,GAAG,OAAO,CAAC;IACjB,IAAI,EAAE,GAAG,EAAE,GAAG,WAAW,GAAG,CAAC,CAAC;IAE9B,OAAO,EAAE,IAAI,EAAE,EAAE;QACb,IAAM,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;QAE/B,IAAI,MAAM,GAAG,IAAI,EAAE;YACf,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;SAChB;aAAM,IAAI,MAAM,GAAG,IAAI,EAAE;YACtB,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;SAChB;aAAM;YACH,OAAO,UAAU,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC;SACxC;KACJ;IAED,OAAO,CAAC,CAAC,CAAC;AACd,CAAC;AA3CD,0CA2CC;AAED,IAAM,WAAW,GAAG,UAAU,CAAC,6BAAc,CAAC,CAAC;AAC/C,IAAM,UAAU,GAAG,UAAU,CAAC,4BAAa,CAAC,CAAC;AAE7C;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,GAAW,EAAE,IAA0B;IAA1B,qBAAA,EAAA,OAAO,YAAY,CAAC,MAAM;IAC9D,OAAO,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,gCAEC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,GAAW;IAC3C,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AACpD,CAAC;AAFD,kDAEC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,GAAW;IACxC,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC;AAFD,4CAEC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,GAAW;IACjC,OAAO,UAAU,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/entities/lib/decode_codepoint.d.ts b/node_modules/entities/lib/decode_codepoint.d.ts deleted file mode 100644 index 84ae206..0000000 --- a/node_modules/entities/lib/decode_codepoint.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. - */ -export declare const fromCodePoint: (...codePoints: number[]) => string; -/** - * Replace the given code point with a replacement character if it is a - * surrogate or is outside the valid range. Otherwise return the code - * point unchanged. - */ -export declare function replaceCodePoint(codePoint: number): number; -/** - * Replace the code point if relevant, then convert it to a string. - * - * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. - * @param codePoint The code point to decode. - * @returns The decoded code point. - */ -export default function decodeCodePoint(codePoint: number): string; -//# sourceMappingURL=decode_codepoint.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/decode_codepoint.d.ts.map b/node_modules/entities/lib/decode_codepoint.d.ts.map deleted file mode 100644 index 38a8dea..0000000 --- a/node_modules/entities/lib/decode_codepoint.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode_codepoint.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":"AAkCA;;GAEG;AACH,eAAO,MAAM,aAAa,qCAgBrB,CAAC;AAEN;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,UAMjD;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE"} \ No newline at end of file diff --git a/node_modules/entities/lib/decode_codepoint.js b/node_modules/entities/lib/decode_codepoint.js deleted file mode 100644 index 1205346..0000000 --- a/node_modules/entities/lib/decode_codepoint.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134 -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.replaceCodePoint = exports.fromCodePoint = void 0; -var decodeMap = new Map([ - [0, 65533], - // C1 Unicode control character reference replacements - [128, 8364], - [130, 8218], - [131, 402], - [132, 8222], - [133, 8230], - [134, 8224], - [135, 8225], - [136, 710], - [137, 8240], - [138, 352], - [139, 8249], - [140, 338], - [142, 381], - [145, 8216], - [146, 8217], - [147, 8220], - [148, 8221], - [149, 8226], - [150, 8211], - [151, 8212], - [152, 732], - [153, 8482], - [154, 353], - [155, 8250], - [156, 339], - [158, 382], - [159, 376], -]); -/** - * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. - */ -exports.fromCodePoint = -// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins -(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) { - var output = ""; - if (codePoint > 0xffff) { - codePoint -= 0x10000; - output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); - codePoint = 0xdc00 | (codePoint & 0x3ff); - } - output += String.fromCharCode(codePoint); - return output; -}; -/** - * Replace the given code point with a replacement character if it is a - * surrogate or is outside the valid range. Otherwise return the code - * point unchanged. - */ -function replaceCodePoint(codePoint) { - var _a; - if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { - return 0xfffd; - } - return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; -} -exports.replaceCodePoint = replaceCodePoint; -/** - * Replace the code point if relevant, then convert it to a string. - * - * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. - * @param codePoint The code point to decode. - * @returns The decoded code point. - */ -function decodeCodePoint(codePoint) { - return (0, exports.fromCodePoint)(replaceCodePoint(codePoint)); -} -exports.default = decodeCodePoint; -//# sourceMappingURL=decode_codepoint.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/decode_codepoint.js.map b/node_modules/entities/lib/decode_codepoint.js.map deleted file mode 100644 index 2747865..0000000 --- a/node_modules/entities/lib/decode_codepoint.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode_codepoint.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":";AAAA,qHAAqH;;;;AAErH,IAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACtB,CAAC,CAAC,EAAE,KAAK,CAAC;IACV,sDAAsD;IACtD,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;CACb,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,aAAa;AACtB,iHAAiH;AACjH,MAAA,MAAM,CAAC,aAAa,mCACpB,UAAU,SAAiB;IACvB,IAAI,MAAM,GAAG,EAAE,CAAC;IAEhB,IAAI,SAAS,GAAG,MAAM,EAAE;QACpB,SAAS,IAAI,OAAO,CAAC;QACrB,MAAM,IAAI,MAAM,CAAC,YAAY,CACzB,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CACxC,CAAC;QACF,SAAS,GAAG,MAAM,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;KAC5C;IAED,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEN;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,SAAiB;;IAC9C,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,SAAS,IAAI,MAAM,CAAC,IAAI,SAAS,GAAG,QAAQ,EAAE;QACtE,OAAO,MAAM,CAAC;KACjB;IAED,OAAO,MAAA,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAI,SAAS,CAAC;AACjD,CAAC;AAND,4CAMC;AAED;;;;;;GAMG;AACH,SAAwB,eAAe,CAAC,SAAiB;IACrD,OAAO,IAAA,qBAAa,EAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;AACtD,CAAC;AAFD,kCAEC"} \ No newline at end of file diff --git a/node_modules/entities/lib/encode.d.ts b/node_modules/entities/lib/encode.d.ts deleted file mode 100644 index f09c4ee..0000000 --- a/node_modules/entities/lib/encode.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Encodes all characters in the input using HTML entities. This includes - * characters that are valid ASCII characters in HTML documents, such as `#`. - * - * To get a more compact output, consider using the `encodeNonAsciiHTML` - * function, which will only encode characters that are not valid in HTML - * documents, as well as non-ASCII characters. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -export declare function encodeHTML(data: string): string; -/** - * Encodes all non-ASCII characters, as well as characters not valid in HTML - * documents using HTML entities. This function will not encode characters that - * are valid in HTML documents, such as `#`. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -export declare function encodeNonAsciiHTML(data: string): string; -//# sourceMappingURL=encode.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/encode.d.ts.map b/node_modules/entities/lib/encode.d.ts.map deleted file mode 100644 index e24c05b..0000000 --- a/node_modules/entities/lib/encode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AACD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD"} \ No newline at end of file diff --git a/node_modules/entities/lib/encode.js b/node_modules/entities/lib/encode.js deleted file mode 100644 index 4786a03..0000000 --- a/node_modules/entities/lib/encode.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.encodeNonAsciiHTML = exports.encodeHTML = void 0; -var encode_html_js_1 = __importDefault(require("./generated/encode-html.js")); -var escape_js_1 = require("./escape.js"); -var htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g; -/** - * Encodes all characters in the input using HTML entities. This includes - * characters that are valid ASCII characters in HTML documents, such as `#`. - * - * To get a more compact output, consider using the `encodeNonAsciiHTML` - * function, which will only encode characters that are not valid in HTML - * documents, as well as non-ASCII characters. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -function encodeHTML(data) { - return encodeHTMLTrieRe(htmlReplacer, data); -} -exports.encodeHTML = encodeHTML; -/** - * Encodes all non-ASCII characters, as well as characters not valid in HTML - * documents using HTML entities. This function will not encode characters that - * are valid in HTML documents, such as `#`. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -function encodeNonAsciiHTML(data) { - return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data); -} -exports.encodeNonAsciiHTML = encodeNonAsciiHTML; -function encodeHTMLTrieRe(regExp, str) { - var ret = ""; - var lastIdx = 0; - var match; - while ((match = regExp.exec(str)) !== null) { - var i = match.index; - ret += str.substring(lastIdx, i); - var char = str.charCodeAt(i); - var next = encode_html_js_1.default.get(char); - if (typeof next === "object") { - // We are in a branch. Try to match the next char. - if (i + 1 < str.length) { - var nextChar = str.charCodeAt(i + 1); - var value = typeof next.n === "number" - ? next.n === nextChar - ? next.o - : undefined - : next.n.get(nextChar); - if (value !== undefined) { - ret += value; - lastIdx = regExp.lastIndex += 1; - continue; - } - } - next = next.v; - } - // We might have a tree node without a value; skip and use a numeric entity. - if (next !== undefined) { - ret += next; - lastIdx = i + 1; - } - else { - var cp = (0, escape_js_1.getCodePoint)(str, i); - ret += "&#x".concat(cp.toString(16), ";"); - // Increase by 1 if we have a surrogate pair - lastIdx = regExp.lastIndex += Number(cp !== char); - } - } - return ret + str.substr(lastIdx); -} -//# sourceMappingURL=encode.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/encode.js.map b/node_modules/entities/lib/encode.js.map deleted file mode 100644 index 9d47162..0000000 --- a/node_modules/entities/lib/encode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":";;;;;;AAAA,8EAAkD;AAClD,yCAAwD;AAExD,IAAM,YAAY,GAAG,qCAAqC,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,SAAgB,UAAU,CAAC,IAAY;IACnC,OAAO,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC;AAFD,gCAEC;AACD;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC3C,OAAO,gBAAgB,CAAC,uBAAW,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAFD,gDAEC;AAED,SAAS,gBAAgB,CAAC,MAAc,EAAE,GAAW;IACjD,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;QACxC,IAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;QACtB,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACjC,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAI,IAAI,GAAG,wBAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAE9B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC1B,kDAAkD;YAClD,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE;gBACpB,IAAM,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACvC,IAAM,KAAK,GACP,OAAO,IAAI,CAAC,CAAC,KAAK,QAAQ;oBACtB,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,QAAQ;wBACjB,CAAC,CAAC,IAAI,CAAC,CAAC;wBACR,CAAC,CAAC,SAAS;oBACf,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;gBAE/B,IAAI,KAAK,KAAK,SAAS,EAAE;oBACrB,GAAG,IAAI,KAAK,CAAC;oBACb,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC;oBAChC,SAAS;iBACZ;aACJ;YAED,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;SACjB;QAED,4EAA4E;QAC5E,IAAI,IAAI,KAAK,SAAS,EAAE;YACpB,GAAG,IAAI,IAAI,CAAC;YACZ,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;SACnB;aAAM;YACH,IAAM,EAAE,GAAG,IAAA,wBAAY,EAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAChC,GAAG,IAAI,aAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAG,CAAC;YAChC,4CAA4C;YAC5C,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;SACrD;KACJ;IAED,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/escape.d.ts b/node_modules/entities/lib/escape.d.ts deleted file mode 100644 index c07ecdc..0000000 --- a/node_modules/entities/lib/escape.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -export declare const xmlReplacer: RegExp; -export declare const getCodePoint: (str: string, index: number) => number; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using XML entities. - * - * If a character has no equivalent entity, a - * numeric hexadecimal reference (eg. `ü`) will be used. - */ -export declare function encodeXML(str: string): string; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using numeric hexadecimal reference (eg. `ü`). - * - * Have a look at `escapeUTF8` if you want a more concise output at the expense - * of reduced transportability. - * - * @param data String to escape. - */ -export declare const escape: typeof encodeXML; -/** - * Encodes all characters not valid in XML documents using XML entities. - * - * Note that the output will be character-set dependent. - * - * @param data String to escape. - */ -export declare const escapeUTF8: (data: string) => string; -/** - * Encodes all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -export declare const escapeAttribute: (data: string) => string; -/** - * Encodes all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -export declare const escapeText: (data: string) => string; -//# sourceMappingURL=escape.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/escape.d.ts.map b/node_modules/entities/lib/escape.d.ts.map deleted file mode 100644 index fa19825..0000000 --- a/node_modules/entities/lib/escape.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"escape.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAyB,CAAC;AAWlD,eAAO,MAAM,YAAY,QAGT,MAAM,SAAS,MAAM,KAAG,MAQD,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA0B7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,kBAAY,CAAC;AAqChC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,SA7Bb,MAAM,KAAK,MA6BuC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SArClB,MAAM,KAAK,MA4CpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SApDb,MAAM,KAAK,MA4DpB,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/escape.js b/node_modules/entities/lib/escape.js deleted file mode 100644 index 9f36272..0000000 --- a/node_modules/entities/lib/escape.js +++ /dev/null @@ -1,122 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.getCodePoint = exports.xmlReplacer = void 0; -exports.xmlReplacer = /["&'<>$\x80-\uFFFF]/g; -var xmlCodeMap = new Map([ - [34, """], - [38, "&"], - [39, "'"], - [60, "<"], - [62, ">"], -]); -// For compatibility with node < 4, we wrap `codePointAt` -exports.getCodePoint = -// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -String.prototype.codePointAt != null - ? function (str, index) { return str.codePointAt(index); } - : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - function (c, index) { - return (c.charCodeAt(index) & 0xfc00) === 0xd800 - ? (c.charCodeAt(index) - 0xd800) * 0x400 + - c.charCodeAt(index + 1) - - 0xdc00 + - 0x10000 - : c.charCodeAt(index); - }; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using XML entities. - * - * If a character has no equivalent entity, a - * numeric hexadecimal reference (eg. `ü`) will be used. - */ -function encodeXML(str) { - var ret = ""; - var lastIdx = 0; - var match; - while ((match = exports.xmlReplacer.exec(str)) !== null) { - var i = match.index; - var char = str.charCodeAt(i); - var next = xmlCodeMap.get(char); - if (next !== undefined) { - ret += str.substring(lastIdx, i) + next; - lastIdx = i + 1; - } - else { - ret += "".concat(str.substring(lastIdx, i), "&#x").concat((0, exports.getCodePoint)(str, i).toString(16), ";"); - // Increase by 1 if we have a surrogate pair - lastIdx = exports.xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800); - } - } - return ret + str.substr(lastIdx); -} -exports.encodeXML = encodeXML; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using numeric hexadecimal reference (eg. `ü`). - * - * Have a look at `escapeUTF8` if you want a more concise output at the expense - * of reduced transportability. - * - * @param data String to escape. - */ -exports.escape = encodeXML; -/** - * Creates a function that escapes all characters matched by the given regular - * expression using the given map of characters to escape to their entities. - * - * @param regex Regular expression to match characters to escape. - * @param map Map of characters to escape to their entities. - * - * @returns Function that escapes all characters matched by the given regular - * expression using the given map of characters to escape to their entities. - */ -function getEscaper(regex, map) { - return function escape(data) { - var match; - var lastIdx = 0; - var result = ""; - while ((match = regex.exec(data))) { - if (lastIdx !== match.index) { - result += data.substring(lastIdx, match.index); - } - // We know that this character will be in the map. - result += map.get(match[0].charCodeAt(0)); - // Every match will be of length 1 - lastIdx = match.index + 1; - } - return result + data.substring(lastIdx); - }; -} -/** - * Encodes all characters not valid in XML documents using XML entities. - * - * Note that the output will be character-set dependent. - * - * @param data String to escape. - */ -exports.escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap); -/** - * Encodes all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -exports.escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([ - [34, """], - [38, "&"], - [160, " "], -])); -/** - * Encodes all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -exports.escapeText = getEscaper(/[&<>\u00A0]/g, new Map([ - [38, "&"], - [60, "<"], - [62, ">"], - [160, " "], -])); -//# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/escape.js.map b/node_modules/entities/lib/escape.js.map deleted file mode 100644 index f96d022..0000000 --- a/node_modules/entities/lib/escape.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"escape.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,sBAAsB,CAAC;AAElD,IAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACvB,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,yDAAyD;AAC5C,QAAA,YAAY;AACrB,uEAAuE;AACvE,MAAM,CAAC,SAAS,CAAC,WAAW,IAAI,IAAI;IAChC,CAAC,CAAC,UAAC,GAAW,EAAE,KAAa,IAAa,OAAA,GAAG,CAAC,WAAW,CAAC,KAAK,CAAE,EAAvB,CAAuB;IACjE,CAAC,CAAC,uEAAuE;QACvE,UAAC,CAAS,EAAE,KAAa;YACrB,OAAA,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,MAAM;gBACrC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK;oBACtC,CAAC,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC;oBACvB,MAAM;oBACN,OAAO;gBACT,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC;QALzB,CAKyB,CAAC;AAExC;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,GAAW;IACjC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,mBAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;QAC7C,IAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;QACtB,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAElC,IAAI,IAAI,KAAK,SAAS,EAAE;YACpB,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;YACxC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;SACnB;aAAM;YACH,GAAG,IAAI,UAAG,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,gBAAM,IAAA,oBAAY,EACjD,GAAG,EACH,CAAC,CACJ,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAG,CAAC;YAClB,4CAA4C;YAC5C,OAAO,GAAG,mBAAW,CAAC,SAAS,IAAI,MAAM,CACrC,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,MAAM,CAC7B,CAAC;SACL;KACJ;IAED,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AA1BD,8BA0BC;AAED;;;;;;;;GAQG;AACU,QAAA,MAAM,GAAG,SAAS,CAAC;AAEhC;;;;;;;;;GASG;AACH,SAAS,UAAU,CACf,KAAa,EACb,GAAwB;IAExB,OAAO,SAAS,MAAM,CAAC,IAAY;QAC/B,IAAI,KAAK,CAAC;QACV,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,IAAI,MAAM,GAAG,EAAE,CAAC;QAEhB,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;YAC/B,IAAI,OAAO,KAAK,KAAK,CAAC,KAAK,EAAE;gBACzB,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;aAClD;YAED,kDAAkD;YAClD,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAE,CAAC;YAE3C,kCAAkC;YAClC,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;SAC7B;QAED,OAAO,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACU,QAAA,UAAU,GAAG,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAE7D;;;;;GAKG;AACU,QAAA,eAAe,GAAG,UAAU,CACrC,aAAa,EACb,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC;AAEF;;;;;GAKG;AACU,QAAA,UAAU,GAAG,UAAU,CAChC,cAAc,EACd,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode.d.ts b/node_modules/entities/lib/esm/decode.d.ts deleted file mode 100644 index ccfd9fb..0000000 --- a/node_modules/entities/lib/esm/decode.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -import htmlDecodeTree from "./generated/decode-data-html.js"; -import xmlDecodeTree from "./generated/decode-data-xml.js"; -import decodeCodePoint from "./decode_codepoint.js"; -export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint }; -export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js"; -export declare enum BinTrieFlags { - VALUE_LENGTH = 49152, - BRANCH_LENGTH = 16256, - JUMP_TABLE = 127 -} -export declare enum DecodingMode { - /** Entities in text nodes that can end with any character. */ - Legacy = 0, - /** Only allow entities terminated with a semicolon. */ - Strict = 1, - /** Entities in attributes have limitations on ending characters. */ - Attribute = 2 -} -/** - * Producers for character reference errors as defined in the HTML spec. - */ -export interface EntityErrorProducer { - missingSemicolonAfterCharacterReference(): void; - absenceOfDigitsInNumericCharacterReference(consumedCharacters: number): void; - validateNumericCharacterReference(code: number): void; -} -/** - * Token decoder with support of writing partial entities. - */ -export declare class EntityDecoder { - /** The tree used to decode entities. */ - private readonly decodeTree; - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - private readonly emitCodePoint; - /** An object that is used to produce errors. */ - private readonly errors?; - constructor( - /** The tree used to decode entities. */ - decodeTree: Uint16Array, - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - emitCodePoint: (cp: number, consumed: number) => void, - /** An object that is used to produce errors. */ - errors?: EntityErrorProducer | undefined); - /** The current state of the decoder. */ - private state; - /** Characters that were consumed while parsing an entity. */ - private consumed; - /** - * The result of the entity. - * - * Either the result index of a numeric entity, or the codepoint of a - * numeric entity. - */ - private result; - /** The current index in the decode tree. */ - private treeIndex; - /** The number of characters that were consumed in excess. */ - private excess; - /** The mode in which the decoder is operating. */ - private decodeMode; - /** Resets the instance to make it reusable. */ - startEntity(decodeMode: DecodingMode): void; - /** - * Write an entity to the decoder. This can be called multiple times with partial entities. - * If the entity is incomplete, the decoder will return -1. - * - * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the - * entity is incomplete, and resume when the next string is written. - * - * @param string The string containing the entity (or a continuation of the entity). - * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - write(str: string, offset: number): number; - /** - * Switches between the numeric decimal and hexadecimal states. - * - * Equivalent to the `Numeric character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNumericStart; - private addToNumericResult; - /** - * Parses a hexadecimal numeric entity. - * - * Equivalent to the `Hexademical character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNumericHex; - /** - * Parses a decimal numeric entity. - * - * Equivalent to the `Decimal character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNumericDecimal; - /** - * Validate and emit a numeric entity. - * - * Implements the logic from the `Hexademical character reference start - * state` and `Numeric character reference end state` in the HTML spec. - * - * @param lastCp The last code point of the entity. Used to see if the - * entity was terminated with a semicolon. - * @param expectedLength The minimum number of characters that should be - * consumed. Used to validate that at least one digit - * was consumed. - * @returns The number of characters that were consumed. - */ - private emitNumericEntity; - /** - * Parses a named entity. - * - * Equivalent to the `Named character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNamedEntity; - /** - * Emit a named entity that was not terminated with a semicolon. - * - * @returns The number of characters consumed. - */ - private emitNotTerminatedNamedEntity; - /** - * Emit a named entity. - * - * @param result The index of the entity in the decode tree. - * @param valueLength The number of bytes in the entity. - * @param consumed The number of characters consumed. - * - * @returns The number of characters consumed. - */ - private emitNamedEntityData; - /** - * Signal to the parser that the end of the input was reached. - * - * Remaining data will be emitted and relevant errors will be produced. - * - * @returns The number of characters consumed. - */ - end(): number; -} -/** - * Determines the branch of the current node that is taken given the current - * character. This function is used to traverse the trie. - * - * @param decodeTree The trie. - * @param current The current node. - * @param nodeIdx The index right after the current node and its value. - * @param char The current character. - * @returns The index of the next node, or -1 if no branch is taken. - */ -export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIdx: number, char: number): number; -/** - * Decodes an HTML string. - * - * @param str The string to decode. - * @param mode The decoding mode. - * @returns The decoded string. - */ -export declare function decodeHTML(str: string, mode?: DecodingMode): string; -/** - * Decodes an HTML string in an attribute. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export declare function decodeHTMLAttribute(str: string): string; -/** - * Decodes an HTML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export declare function decodeHTMLStrict(str: string): string; -/** - * Decodes an XML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export declare function decodeXML(str: string): string; -//# sourceMappingURL=decode.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode.d.ts.map b/node_modules/entities/lib/esm/decode.d.ts.map deleted file mode 100644 index 4c0b4b4..0000000 --- a/node_modules/entities/lib/esm/decode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAGN,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAoBxE,oBAAY,YAAY;IACpB,YAAY,QAAwB;IACpC,aAAa,QAAwB;IACrC,UAAU,MAAwB;CACrC;AAuCD,oBAAY,YAAY;IACpB,8DAA8D;IAC9D,MAAM,IAAI;IACV,uDAAuD;IACvD,MAAM,IAAI;IACV,oEAAoE;IACpE,SAAS,IAAI;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,uCAAuC,IAAI,IAAI,CAAC;IAChD,0CAA0C,CACtC,kBAAkB,EAAE,MAAM,GAC3B,IAAI,CAAC;IACR,iCAAiC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACzD;AAED;;GAEG;AACH,qBAAa,aAAa;IAElB,wCAAwC;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B;;;;;;;;OAQG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,gDAAgD;IAChD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;;IAbxB,wCAAwC;IACvB,UAAU,EAAE,WAAW;IACxC;;;;;;;;OAQG;IACc,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI;IACtE,gDAAgD;IAC/B,MAAM,CAAC,iCAAqB;IAGjD,wCAAwC;IACxC,OAAO,CAAC,KAAK,CAAkC;IAC/C,6DAA6D;IAC7D,OAAO,CAAC,QAAQ,CAAK;IACrB;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAK;IAEnB,4CAA4C;IAC5C,OAAO,CAAC,SAAS,CAAK;IACtB,6DAA6D;IAC7D,OAAO,CAAC,MAAM,CAAK;IACnB,kDAAkD;IAClD,OAAO,CAAC,UAAU,CAAuB;IAEzC,+CAA+C;IAC/C,WAAW,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI;IAS3C;;;;;;;;;;OAUG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IA8B1C;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,kBAAkB;IAe1B;;;;;;;;OAQG;IACH,OAAO,CAAC,eAAe;IAkBvB;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAkB3B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,iBAAiB;IA6BzB;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAsDxB;;;;OAIG;IACH,OAAO,CAAC,4BAA4B;IAYpC;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAqB3B;;;;;;OAMG;IACH,GAAG,IAAI,MAAM;CA6BhB;AAoDD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC3B,UAAU,EAAE,WAAW,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GACb,MAAM,CAsCR;AAKD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,eAAsB,GAAG,MAAM,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode.js b/node_modules/entities/lib/esm/decode.js deleted file mode 100644 index de225ec..0000000 --- a/node_modules/entities/lib/esm/decode.js +++ /dev/null @@ -1,496 +0,0 @@ -import htmlDecodeTree from "./generated/decode-data-html.js"; -import xmlDecodeTree from "./generated/decode-data-xml.js"; -import decodeCodePoint, { replaceCodePoint, fromCodePoint, } from "./decode_codepoint.js"; -// Re-export for use by eg. htmlparser2 -export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint }; -export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js"; -var CharCodes; -(function (CharCodes) { - CharCodes[CharCodes["NUM"] = 35] = "NUM"; - CharCodes[CharCodes["SEMI"] = 59] = "SEMI"; - CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS"; - CharCodes[CharCodes["ZERO"] = 48] = "ZERO"; - CharCodes[CharCodes["NINE"] = 57] = "NINE"; - CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A"; - CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F"; - CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X"; - CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z"; - CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A"; - CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F"; - CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z"; -})(CharCodes || (CharCodes = {})); -/** Bit that needs to be set to convert an upper case ASCII character to lower case */ -const TO_LOWER_BIT = 0b100000; -export var BinTrieFlags; -(function (BinTrieFlags) { - BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; - BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; - BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE"; -})(BinTrieFlags || (BinTrieFlags = {})); -function isNumber(code) { - return code >= CharCodes.ZERO && code <= CharCodes.NINE; -} -function isHexadecimalCharacter(code) { - return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) || - (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F)); -} -function isAsciiAlphaNumeric(code) { - return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) || - (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) || - isNumber(code)); -} -/** - * Checks if the given character is a valid end character for an entity in an attribute. - * - * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error. - * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state - */ -function isEntityInAttributeInvalidEnd(code) { - return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); -} -var EntityDecoderState; -(function (EntityDecoderState) { - EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart"; - EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart"; - EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal"; - EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex"; - EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity"; -})(EntityDecoderState || (EntityDecoderState = {})); -export var DecodingMode; -(function (DecodingMode) { - /** Entities in text nodes that can end with any character. */ - DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy"; - /** Only allow entities terminated with a semicolon. */ - DecodingMode[DecodingMode["Strict"] = 1] = "Strict"; - /** Entities in attributes have limitations on ending characters. */ - DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute"; -})(DecodingMode || (DecodingMode = {})); -/** - * Token decoder with support of writing partial entities. - */ -export class EntityDecoder { - constructor( - /** The tree used to decode entities. */ - decodeTree, - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - emitCodePoint, - /** An object that is used to produce errors. */ - errors) { - this.decodeTree = decodeTree; - this.emitCodePoint = emitCodePoint; - this.errors = errors; - /** The current state of the decoder. */ - this.state = EntityDecoderState.EntityStart; - /** Characters that were consumed while parsing an entity. */ - this.consumed = 1; - /** - * The result of the entity. - * - * Either the result index of a numeric entity, or the codepoint of a - * numeric entity. - */ - this.result = 0; - /** The current index in the decode tree. */ - this.treeIndex = 0; - /** The number of characters that were consumed in excess. */ - this.excess = 1; - /** The mode in which the decoder is operating. */ - this.decodeMode = DecodingMode.Strict; - } - /** Resets the instance to make it reusable. */ - startEntity(decodeMode) { - this.decodeMode = decodeMode; - this.state = EntityDecoderState.EntityStart; - this.result = 0; - this.treeIndex = 0; - this.excess = 1; - this.consumed = 1; - } - /** - * Write an entity to the decoder. This can be called multiple times with partial entities. - * If the entity is incomplete, the decoder will return -1. - * - * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the - * entity is incomplete, and resume when the next string is written. - * - * @param string The string containing the entity (or a continuation of the entity). - * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - write(str, offset) { - switch (this.state) { - case EntityDecoderState.EntityStart: { - if (str.charCodeAt(offset) === CharCodes.NUM) { - this.state = EntityDecoderState.NumericStart; - this.consumed += 1; - return this.stateNumericStart(str, offset + 1); - } - this.state = EntityDecoderState.NamedEntity; - return this.stateNamedEntity(str, offset); - } - case EntityDecoderState.NumericStart: { - return this.stateNumericStart(str, offset); - } - case EntityDecoderState.NumericDecimal: { - return this.stateNumericDecimal(str, offset); - } - case EntityDecoderState.NumericHex: { - return this.stateNumericHex(str, offset); - } - case EntityDecoderState.NamedEntity: { - return this.stateNamedEntity(str, offset); - } - } - } - /** - * Switches between the numeric decimal and hexadecimal states. - * - * Equivalent to the `Numeric character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - stateNumericStart(str, offset) { - if (offset >= str.length) { - return -1; - } - if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { - this.state = EntityDecoderState.NumericHex; - this.consumed += 1; - return this.stateNumericHex(str, offset + 1); - } - this.state = EntityDecoderState.NumericDecimal; - return this.stateNumericDecimal(str, offset); - } - addToNumericResult(str, start, end, base) { - if (start !== end) { - const digitCount = end - start; - this.result = - this.result * Math.pow(base, digitCount) + - parseInt(str.substr(start, digitCount), base); - this.consumed += digitCount; - } - } - /** - * Parses a hexadecimal numeric entity. - * - * Equivalent to the `Hexademical character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - stateNumericHex(str, offset) { - const startIdx = offset; - while (offset < str.length) { - const char = str.charCodeAt(offset); - if (isNumber(char) || isHexadecimalCharacter(char)) { - offset += 1; - } - else { - this.addToNumericResult(str, startIdx, offset, 16); - return this.emitNumericEntity(char, 3); - } - } - this.addToNumericResult(str, startIdx, offset, 16); - return -1; - } - /** - * Parses a decimal numeric entity. - * - * Equivalent to the `Decimal character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - stateNumericDecimal(str, offset) { - const startIdx = offset; - while (offset < str.length) { - const char = str.charCodeAt(offset); - if (isNumber(char)) { - offset += 1; - } - else { - this.addToNumericResult(str, startIdx, offset, 10); - return this.emitNumericEntity(char, 2); - } - } - this.addToNumericResult(str, startIdx, offset, 10); - return -1; - } - /** - * Validate and emit a numeric entity. - * - * Implements the logic from the `Hexademical character reference start - * state` and `Numeric character reference end state` in the HTML spec. - * - * @param lastCp The last code point of the entity. Used to see if the - * entity was terminated with a semicolon. - * @param expectedLength The minimum number of characters that should be - * consumed. Used to validate that at least one digit - * was consumed. - * @returns The number of characters that were consumed. - */ - emitNumericEntity(lastCp, expectedLength) { - var _a; - // Ensure we consumed at least one digit. - if (this.consumed <= expectedLength) { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - // Figure out if this is a legit end of the entity - if (lastCp === CharCodes.SEMI) { - this.consumed += 1; - } - else if (this.decodeMode === DecodingMode.Strict) { - return 0; - } - this.emitCodePoint(replaceCodePoint(this.result), this.consumed); - if (this.errors) { - if (lastCp !== CharCodes.SEMI) { - this.errors.missingSemicolonAfterCharacterReference(); - } - this.errors.validateNumericCharacterReference(this.result); - } - return this.consumed; - } - /** - * Parses a named entity. - * - * Equivalent to the `Named character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - stateNamedEntity(str, offset) { - const { decodeTree } = this; - let current = decodeTree[this.treeIndex]; - // The mask is the number of bytes of the value, including the current byte. - let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - for (; offset < str.length; offset++, this.excess++) { - const char = str.charCodeAt(offset); - this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); - if (this.treeIndex < 0) { - return this.result === 0 || - // If we are parsing an attribute - (this.decodeMode === DecodingMode.Attribute && - // We shouldn't have consumed any characters after the entity, - (valueLength === 0 || - // And there should be no invalid characters. - isEntityInAttributeInvalidEnd(char))) - ? 0 - : this.emitNotTerminatedNamedEntity(); - } - current = decodeTree[this.treeIndex]; - valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - // If the branch is a value, store it and continue - if (valueLength !== 0) { - // If the entity is terminated by a semicolon, we are done. - if (char === CharCodes.SEMI) { - return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); - } - // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it. - if (this.decodeMode !== DecodingMode.Strict) { - this.result = this.treeIndex; - this.consumed += this.excess; - this.excess = 0; - } - } - } - return -1; - } - /** - * Emit a named entity that was not terminated with a semicolon. - * - * @returns The number of characters consumed. - */ - emitNotTerminatedNamedEntity() { - var _a; - const { result, decodeTree } = this; - const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; - this.emitNamedEntityData(result, valueLength, this.consumed); - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); - return this.consumed; - } - /** - * Emit a named entity. - * - * @param result The index of the entity in the decode tree. - * @param valueLength The number of bytes in the entity. - * @param consumed The number of characters consumed. - * - * @returns The number of characters consumed. - */ - emitNamedEntityData(result, valueLength, consumed) { - const { decodeTree } = this; - this.emitCodePoint(valueLength === 1 - ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH - : decodeTree[result + 1], consumed); - if (valueLength === 3) { - // For multi-byte values, we need to emit the second byte. - this.emitCodePoint(decodeTree[result + 2], consumed); - } - return consumed; - } - /** - * Signal to the parser that the end of the input was reached. - * - * Remaining data will be emitted and relevant errors will be produced. - * - * @returns The number of characters consumed. - */ - end() { - var _a; - switch (this.state) { - case EntityDecoderState.NamedEntity: { - // Emit a named entity if we have one. - return this.result !== 0 && - (this.decodeMode !== DecodingMode.Attribute || - this.result === this.treeIndex) - ? this.emitNotTerminatedNamedEntity() - : 0; - } - // Otherwise, emit a numeric entity if we have one. - case EntityDecoderState.NumericDecimal: { - return this.emitNumericEntity(0, 2); - } - case EntityDecoderState.NumericHex: { - return this.emitNumericEntity(0, 3); - } - case EntityDecoderState.NumericStart: { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - case EntityDecoderState.EntityStart: { - // Return 0 if we have no entity. - return 0; - } - } - } -} -/** - * Creates a function that decodes entities in a string. - * - * @param decodeTree The decode tree. - * @returns A function that decodes entities in a string. - */ -function getDecoder(decodeTree) { - let ret = ""; - const decoder = new EntityDecoder(decodeTree, (str) => (ret += fromCodePoint(str))); - return function decodeWithTrie(str, decodeMode) { - let lastIndex = 0; - let offset = 0; - while ((offset = str.indexOf("&", offset)) >= 0) { - ret += str.slice(lastIndex, offset); - decoder.startEntity(decodeMode); - const len = decoder.write(str, - // Skip the "&" - offset + 1); - if (len < 0) { - lastIndex = offset + decoder.end(); - break; - } - lastIndex = offset + len; - // If `len` is 0, skip the current `&` and continue. - offset = len === 0 ? lastIndex + 1 : lastIndex; - } - const result = ret + str.slice(lastIndex); - // Make sure we don't keep a reference to the final string. - ret = ""; - return result; - }; -} -/** - * Determines the branch of the current node that is taken given the current - * character. This function is used to traverse the trie. - * - * @param decodeTree The trie. - * @param current The current node. - * @param nodeIdx The index right after the current node and its value. - * @param char The current character. - * @returns The index of the next node, or -1 if no branch is taken. - */ -export function determineBranch(decodeTree, current, nodeIdx, char) { - const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; - const jumpOffset = current & BinTrieFlags.JUMP_TABLE; - // Case 1: Single branch encoded in jump offset - if (branchCount === 0) { - return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; - } - // Case 2: Multiple branches encoded in jump table - if (jumpOffset) { - const value = char - jumpOffset; - return value < 0 || value >= branchCount - ? -1 - : decodeTree[nodeIdx + value] - 1; - } - // Case 3: Multiple branches encoded in dictionary - // Binary search for the character. - let lo = nodeIdx; - let hi = lo + branchCount - 1; - while (lo <= hi) { - const mid = (lo + hi) >>> 1; - const midVal = decodeTree[mid]; - if (midVal < char) { - lo = mid + 1; - } - else if (midVal > char) { - hi = mid - 1; - } - else { - return decodeTree[mid + branchCount]; - } - } - return -1; -} -const htmlDecoder = getDecoder(htmlDecodeTree); -const xmlDecoder = getDecoder(xmlDecodeTree); -/** - * Decodes an HTML string. - * - * @param str The string to decode. - * @param mode The decoding mode. - * @returns The decoded string. - */ -export function decodeHTML(str, mode = DecodingMode.Legacy) { - return htmlDecoder(str, mode); -} -/** - * Decodes an HTML string in an attribute. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export function decodeHTMLAttribute(str) { - return htmlDecoder(str, DecodingMode.Attribute); -} -/** - * Decodes an HTML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export function decodeHTMLStrict(str) { - return htmlDecoder(str, DecodingMode.Strict); -} -/** - * Decodes an XML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export function decodeXML(str) { - return xmlDecoder(str, DecodingMode.Strict); -} -//# sourceMappingURL=decode.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode.js.map b/node_modules/entities/lib/esm/decode.js.map deleted file mode 100644 index 2db1510..0000000 --- a/node_modules/entities/lib/esm/decode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAAe,EAAE,EACpB,gBAAgB,EAChB,aAAa,GAChB,MAAM,uBAAuB,CAAC;AAE/B,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAExE,IAAW,SAaV;AAbD,WAAW,SAAS;IAChB,wCAAQ,CAAA;IACR,0CAAS,CAAA;IACT,8CAAW,CAAA;IACX,0CAAS,CAAA;IACT,0CAAS,CAAA;IACT,gDAAY,CAAA;IACZ,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,gDAAY,CAAA;IACZ,gDAAY,CAAA;IACZ,gDAAY,CAAA;AAChB,CAAC,EAbU,SAAS,KAAT,SAAS,QAanB;AAED,sFAAsF;AACtF,MAAM,YAAY,GAAG,QAAQ,CAAC;AAE9B,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,mEAAoC,CAAA;IACpC,qEAAqC,CAAA;IACrC,6DAAkC,CAAA;AACtC,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAED,SAAS,QAAQ,CAAC,IAAY;IAC1B,OAAO,IAAI,IAAI,SAAS,CAAC,IAAI,IAAI,IAAI,IAAI,SAAS,CAAC,IAAI,CAAC;AAC5D,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAY;IACxC,OAAO,CACH,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC,CAC3D,CAAC;AACN,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAY;IACrC,OAAO,CACH,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,SAAS,6BAA6B,CAAC,IAAY;IAC/C,OAAO,IAAI,KAAK,SAAS,CAAC,MAAM,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;AAClE,CAAC;AAED,IAAW,kBAMV;AAND,WAAW,kBAAkB;IACzB,yEAAW,CAAA;IACX,2EAAY,CAAA;IACZ,+EAAc,CAAA;IACd,uEAAU,CAAA;IACV,yEAAW,CAAA;AACf,CAAC,EANU,kBAAkB,KAAlB,kBAAkB,QAM5B;AAED,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACpB,8DAA8D;IAC9D,mDAAU,CAAA;IACV,uDAAuD;IACvD,mDAAU,CAAA;IACV,oEAAoE;IACpE,yDAAa,CAAA;AACjB,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAaD;;GAEG;AACH,MAAM,OAAO,aAAa;IACtB;IACI,wCAAwC;IACvB,UAAuB;IACxC;;;;;;;;OAQG;IACc,aAAqD;IACtE,gDAAgD;IAC/B,MAA4B;QAZ5B,eAAU,GAAV,UAAU,CAAa;QAUvB,kBAAa,GAAb,aAAa,CAAwC;QAErD,WAAM,GAAN,MAAM,CAAsB;QAGjD,wCAAwC;QAChC,UAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;QAC/C,6DAA6D;QACrD,aAAQ,GAAG,CAAC,CAAC;QACrB;;;;;WAKG;QACK,WAAM,GAAG,CAAC,CAAC;QAEnB,4CAA4C;QACpC,cAAS,GAAG,CAAC,CAAC;QACtB,6DAA6D;QACrD,WAAM,GAAG,CAAC,CAAC;QACnB,kDAAkD;QAC1C,eAAU,GAAG,YAAY,CAAC,MAAM,CAAC;IAnBtC,CAAC;IAqBJ,+CAA+C;IAC/C,WAAW,CAAC,UAAwB;QAChC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;QAC5C,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IACtB,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,GAAW,EAAE,MAAc;QAC7B,QAAQ,IAAI,CAAC,KAAK,EAAE;YAChB,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC,GAAG,EAAE;oBAC1C,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,YAAY,CAAC;oBAC7C,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;oBACnB,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;iBAClD;gBACD,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;gBAC5C,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC7C;YAED,KAAK,kBAAkB,CAAC,YAAY,CAAC,CAAC;gBAClC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC9C;YAED,KAAK,kBAAkB,CAAC,cAAc,CAAC,CAAC;gBACpC,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAChD;YAED,KAAK,kBAAkB,CAAC,UAAU,CAAC,CAAC;gBAChC,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC5C;YAED,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC7C;SACJ;IACL,CAAC;IAED;;;;;;;;OAQG;IACK,iBAAiB,CAAC,GAAW,EAAE,MAAc;QACjD,IAAI,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE;YACtB,OAAO,CAAC,CAAC,CAAC;SACb;QAED,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,KAAK,SAAS,CAAC,OAAO,EAAE;YAC/D,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC;YAC3C,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;YACnB,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;SAChD;QAED,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,cAAc,CAAC;QAC/C,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IAEO,kBAAkB,CACtB,GAAW,EACX,KAAa,EACb,GAAW,EACX,IAAY;QAEZ,IAAI,KAAK,KAAK,GAAG,EAAE;YACf,MAAM,UAAU,GAAG,GAAG,GAAG,KAAK,CAAC;YAC/B,IAAI,CAAC,MAAM;gBACP,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC;oBACxC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;YAClD,IAAI,CAAC,QAAQ,IAAI,UAAU,CAAC;SAC/B;IACL,CAAC;IAED;;;;;;;;OAQG;IACK,eAAe,CAAC,GAAW,EAAE,MAAc;QAC/C,MAAM,QAAQ,GAAG,MAAM,CAAC;QAExB,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE;YACxB,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACpC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,sBAAsB,CAAC,IAAI,CAAC,EAAE;gBAChD,MAAM,IAAI,CAAC,CAAC;aACf;iBAAM;gBACH,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;gBACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;aAC1C;SACJ;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAEnD,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;;;;;OAQG;IACK,mBAAmB,CAAC,GAAW,EAAE,MAAc;QACnD,MAAM,QAAQ,GAAG,MAAM,CAAC;QAExB,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE;YACxB,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACpC,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAChB,MAAM,IAAI,CAAC,CAAC;aACf;iBAAM;gBACH,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;gBACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;aAC1C;SACJ;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAEnD,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;OAYG;IACK,iBAAiB,CAAC,MAAc,EAAE,cAAsB;;QAC5D,yCAAyC;QACzC,IAAI,IAAI,CAAC,QAAQ,IAAI,cAAc,EAAE;YACjC,MAAA,IAAI,CAAC,MAAM,0CAAE,0CAA0C,CACnD,IAAI,CAAC,QAAQ,CAChB,CAAC;YACF,OAAO,CAAC,CAAC;SACZ;QAED,kDAAkD;QAClD,IAAI,MAAM,KAAK,SAAS,CAAC,IAAI,EAAE;YAC3B,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;SACtB;aAAM,IAAI,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,MAAM,EAAE;YAChD,OAAO,CAAC,CAAC;SACZ;QAED,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEjE,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,IAAI,MAAM,KAAK,SAAS,CAAC,IAAI,EAAE;gBAC3B,IAAI,CAAC,MAAM,CAAC,uCAAuC,EAAE,CAAC;aACzD;YAED,IAAI,CAAC,MAAM,CAAC,iCAAiC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC9D;QAED,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACK,gBAAgB,CAAC,GAAW,EAAE,MAAc;QAChD,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAC5B,IAAI,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACzC,4EAA4E;QAC5E,IAAI,WAAW,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAE9D,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE;YACjD,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YAEpC,IAAI,CAAC,SAAS,GAAG,eAAe,CAC5B,UAAU,EACV,OAAO,EACP,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,EACzC,IAAI,CACP,CAAC;YAEF,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC,EAAE;gBACpB,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC;oBACpB,iCAAiC;oBACjC,CAAC,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,SAAS;wBACvC,8DAA8D;wBAC9D,CAAC,WAAW,KAAK,CAAC;4BACd,6CAA6C;4BAC7C,6BAA6B,CAAC,IAAI,CAAC,CAAC,CAAC;oBAC7C,CAAC,CAAC,CAAC;oBACH,CAAC,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC;aAC7C;YAED,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACrC,WAAW,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;YAE1D,kDAAkD;YAClD,IAAI,WAAW,KAAK,CAAC,EAAE;gBACnB,2DAA2D;gBAC3D,IAAI,IAAI,KAAK,SAAS,CAAC,IAAI,EAAE;oBACzB,OAAO,IAAI,CAAC,mBAAmB,CAC3B,IAAI,CAAC,SAAS,EACd,WAAW,EACX,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAC9B,CAAC;iBACL;gBAED,2FAA2F;gBAC3F,IAAI,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,MAAM,EAAE;oBACzC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC;oBAC7B,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC;oBAC7B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;iBACnB;aACJ;SACJ;QAED,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;OAIG;IACK,4BAA4B;;QAChC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAEpC,MAAM,WAAW,GACb,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAE3D,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7D,MAAA,IAAI,CAAC,MAAM,0CAAE,uCAAuC,EAAE,CAAC;QAEvD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACK,mBAAmB,CACvB,MAAc,EACd,WAAmB,EACnB,QAAgB;QAEhB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAE5B,IAAI,CAAC,aAAa,CACd,WAAW,KAAK,CAAC;YACb,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,YAAY;YACjD,CAAC,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAC5B,QAAQ,CACX,CAAC;QACF,IAAI,WAAW,KAAK,CAAC,EAAE;YACnB,0DAA0D;YAC1D,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;SACxD;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACH,GAAG;;QACC,QAAQ,IAAI,CAAC,KAAK,EAAE;YAChB,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,sCAAsC;gBACtC,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC;oBACpB,CAAC,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,SAAS;wBACvC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,SAAS,CAAC;oBACnC,CAAC,CAAC,IAAI,CAAC,4BAA4B,EAAE;oBACrC,CAAC,CAAC,CAAC,CAAC;aACX;YACD,mDAAmD;YACnD,KAAK,kBAAkB,CAAC,cAAc,CAAC,CAAC;gBACpC,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACvC;YACD,KAAK,kBAAkB,CAAC,UAAU,CAAC,CAAC;gBAChC,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACvC;YACD,KAAK,kBAAkB,CAAC,YAAY,CAAC,CAAC;gBAClC,MAAA,IAAI,CAAC,MAAM,0CAAE,0CAA0C,CACnD,IAAI,CAAC,QAAQ,CAChB,CAAC;gBACF,OAAO,CAAC,CAAC;aACZ;YACD,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,iCAAiC;gBACjC,OAAO,CAAC,CAAC;aACZ;SACJ;IACL,CAAC;CACJ;AAED;;;;;GAKG;AACH,SAAS,UAAU,CAAC,UAAuB;IACvC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,MAAM,OAAO,GAAG,IAAI,aAAa,CAC7B,UAAU,EACV,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC,CACvC,CAAC;IAEF,OAAO,SAAS,cAAc,CAC1B,GAAW,EACX,UAAwB;QAExB,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,IAAI,MAAM,GAAG,CAAC,CAAC;QAEf,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE;YAC7C,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAEpC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAEhC,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CACrB,GAAG;YACH,eAAe;YACf,MAAM,GAAG,CAAC,CACb,CAAC;YAEF,IAAI,GAAG,GAAG,CAAC,EAAE;gBACT,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;gBACnC,MAAM;aACT;YAED,SAAS,GAAG,MAAM,GAAG,GAAG,CAAC;YACzB,oDAAoD;YACpD,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;SAClD;QAED,MAAM,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAE1C,2DAA2D;QAC3D,GAAG,GAAG,EAAE,CAAC;QAET,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;AACN,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAC3B,UAAuB,EACvB,OAAe,EACf,OAAe,EACf,IAAY;IAEZ,MAAM,WAAW,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAChE,MAAM,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC,UAAU,CAAC;IAErD,+CAA+C;IAC/C,IAAI,WAAW,KAAK,CAAC,EAAE;QACnB,OAAO,UAAU,KAAK,CAAC,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACjE;IAED,kDAAkD;IAClD,IAAI,UAAU,EAAE;QACZ,MAAM,KAAK,GAAG,IAAI,GAAG,UAAU,CAAC;QAEhC,OAAO,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,WAAW;YACpC,CAAC,CAAC,CAAC,CAAC;YACJ,CAAC,CAAC,UAAU,CAAC,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;KACzC;IAED,kDAAkD;IAElD,mCAAmC;IACnC,IAAI,EAAE,GAAG,OAAO,CAAC;IACjB,IAAI,EAAE,GAAG,EAAE,GAAG,WAAW,GAAG,CAAC,CAAC;IAE9B,OAAO,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;QAE/B,IAAI,MAAM,GAAG,IAAI,EAAE;YACf,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;SAChB;aAAM,IAAI,MAAM,GAAG,IAAI,EAAE;YACtB,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;SAChB;aAAM;YACH,OAAO,UAAU,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC;SACxC;KACJ;IAED,OAAO,CAAC,CAAC,CAAC;AACd,CAAC;AAED,MAAM,WAAW,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;AAC/C,MAAM,UAAU,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW,EAAE,IAAI,GAAG,YAAY,CAAC,MAAM;IAC9D,OAAO,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAW;IAC3C,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AACpD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IACxC,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACjC,OAAO,UAAU,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode_codepoint.d.ts b/node_modules/entities/lib/esm/decode_codepoint.d.ts deleted file mode 100644 index 84ae206..0000000 --- a/node_modules/entities/lib/esm/decode_codepoint.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. - */ -export declare const fromCodePoint: (...codePoints: number[]) => string; -/** - * Replace the given code point with a replacement character if it is a - * surrogate or is outside the valid range. Otherwise return the code - * point unchanged. - */ -export declare function replaceCodePoint(codePoint: number): number; -/** - * Replace the code point if relevant, then convert it to a string. - * - * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. - * @param codePoint The code point to decode. - * @returns The decoded code point. - */ -export default function decodeCodePoint(codePoint: number): string; -//# sourceMappingURL=decode_codepoint.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode_codepoint.d.ts.map b/node_modules/entities/lib/esm/decode_codepoint.d.ts.map deleted file mode 100644 index 38a8dea..0000000 --- a/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode_codepoint.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":"AAkCA;;GAEG;AACH,eAAO,MAAM,aAAa,qCAgBrB,CAAC;AAEN;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,UAMjD;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode_codepoint.js b/node_modules/entities/lib/esm/decode_codepoint.js deleted file mode 100644 index 4d8281e..0000000 --- a/node_modules/entities/lib/esm/decode_codepoint.js +++ /dev/null @@ -1,71 +0,0 @@ -// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134 -var _a; -const decodeMap = new Map([ - [0, 65533], - // C1 Unicode control character reference replacements - [128, 8364], - [130, 8218], - [131, 402], - [132, 8222], - [133, 8230], - [134, 8224], - [135, 8225], - [136, 710], - [137, 8240], - [138, 352], - [139, 8249], - [140, 338], - [142, 381], - [145, 8216], - [146, 8217], - [147, 8220], - [148, 8221], - [149, 8226], - [150, 8211], - [151, 8212], - [152, 732], - [153, 8482], - [154, 353], - [155, 8250], - [156, 339], - [158, 382], - [159, 376], -]); -/** - * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. - */ -export const fromCodePoint = -// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins -(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) { - let output = ""; - if (codePoint > 0xffff) { - codePoint -= 0x10000; - output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); - codePoint = 0xdc00 | (codePoint & 0x3ff); - } - output += String.fromCharCode(codePoint); - return output; -}; -/** - * Replace the given code point with a replacement character if it is a - * surrogate or is outside the valid range. Otherwise return the code - * point unchanged. - */ -export function replaceCodePoint(codePoint) { - var _a; - if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { - return 0xfffd; - } - return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; -} -/** - * Replace the code point if relevant, then convert it to a string. - * - * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. - * @param codePoint The code point to decode. - * @returns The decoded code point. - */ -export default function decodeCodePoint(codePoint) { - return fromCodePoint(replaceCodePoint(codePoint)); -} -//# sourceMappingURL=decode_codepoint.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode_codepoint.js.map b/node_modules/entities/lib/esm/decode_codepoint.js.map deleted file mode 100644 index 53a32b6..0000000 --- a/node_modules/entities/lib/esm/decode_codepoint.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode_codepoint.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":"AAAA,qHAAqH;;AAErH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACtB,CAAC,CAAC,EAAE,KAAK,CAAC;IACV,sDAAsD;IACtD,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;CACb,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa;AACtB,iHAAiH;AACjH,MAAA,MAAM,CAAC,aAAa,mCACpB,UAAU,SAAiB;IACvB,IAAI,MAAM,GAAG,EAAE,CAAC;IAEhB,IAAI,SAAS,GAAG,MAAM,EAAE;QACpB,SAAS,IAAI,OAAO,CAAC;QACrB,MAAM,IAAI,MAAM,CAAC,YAAY,CACzB,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CACxC,CAAC;QACF,SAAS,GAAG,MAAM,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;KAC5C;IAED,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEN;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAAiB;;IAC9C,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,SAAS,IAAI,MAAM,CAAC,IAAI,SAAS,GAAG,QAAQ,EAAE;QACtE,OAAO,MAAM,CAAC;KACjB;IAED,OAAO,MAAA,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAI,SAAS,CAAC;AACjD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAiB;IACrD,OAAO,aAAa,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;AACtD,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/encode.d.ts b/node_modules/entities/lib/esm/encode.d.ts deleted file mode 100644 index f09c4ee..0000000 --- a/node_modules/entities/lib/esm/encode.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Encodes all characters in the input using HTML entities. This includes - * characters that are valid ASCII characters in HTML documents, such as `#`. - * - * To get a more compact output, consider using the `encodeNonAsciiHTML` - * function, which will only encode characters that are not valid in HTML - * documents, as well as non-ASCII characters. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -export declare function encodeHTML(data: string): string; -/** - * Encodes all non-ASCII characters, as well as characters not valid in HTML - * documents using HTML entities. This function will not encode characters that - * are valid in HTML documents, such as `#`. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -export declare function encodeNonAsciiHTML(data: string): string; -//# sourceMappingURL=encode.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/encode.d.ts.map b/node_modules/entities/lib/esm/encode.d.ts.map deleted file mode 100644 index e24c05b..0000000 --- a/node_modules/entities/lib/esm/encode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AACD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/encode.js b/node_modules/entities/lib/esm/encode.js deleted file mode 100644 index 9c2364f..0000000 --- a/node_modules/entities/lib/esm/encode.js +++ /dev/null @@ -1,69 +0,0 @@ -import htmlTrie from "./generated/encode-html.js"; -import { xmlReplacer, getCodePoint } from "./escape.js"; -const htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g; -/** - * Encodes all characters in the input using HTML entities. This includes - * characters that are valid ASCII characters in HTML documents, such as `#`. - * - * To get a more compact output, consider using the `encodeNonAsciiHTML` - * function, which will only encode characters that are not valid in HTML - * documents, as well as non-ASCII characters. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -export function encodeHTML(data) { - return encodeHTMLTrieRe(htmlReplacer, data); -} -/** - * Encodes all non-ASCII characters, as well as characters not valid in HTML - * documents using HTML entities. This function will not encode characters that - * are valid in HTML documents, such as `#`. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -export function encodeNonAsciiHTML(data) { - return encodeHTMLTrieRe(xmlReplacer, data); -} -function encodeHTMLTrieRe(regExp, str) { - let ret = ""; - let lastIdx = 0; - let match; - while ((match = regExp.exec(str)) !== null) { - const i = match.index; - ret += str.substring(lastIdx, i); - const char = str.charCodeAt(i); - let next = htmlTrie.get(char); - if (typeof next === "object") { - // We are in a branch. Try to match the next char. - if (i + 1 < str.length) { - const nextChar = str.charCodeAt(i + 1); - const value = typeof next.n === "number" - ? next.n === nextChar - ? next.o - : undefined - : next.n.get(nextChar); - if (value !== undefined) { - ret += value; - lastIdx = regExp.lastIndex += 1; - continue; - } - } - next = next.v; - } - // We might have a tree node without a value; skip and use a numeric entity. - if (next !== undefined) { - ret += next; - lastIdx = i + 1; - } - else { - const cp = getCodePoint(str, i); - ret += `&#x${cp.toString(16)};`; - // Increase by 1 if we have a surrogate pair - lastIdx = regExp.lastIndex += Number(cp !== char); - } - } - return ret + str.substr(lastIdx); -} -//# sourceMappingURL=encode.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/encode.js.map b/node_modules/entities/lib/esm/encode.js.map deleted file mode 100644 index 14ac068..0000000 --- a/node_modules/entities/lib/esm/encode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,YAAY,GAAG,qCAAqC,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACnC,OAAO,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC;AACD;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC3C,OAAO,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAc,EAAE,GAAW;IACjD,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;QACxC,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;QACtB,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACjC,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAI,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAE9B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC1B,kDAAkD;YAClD,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE;gBACpB,MAAM,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACvC,MAAM,KAAK,GACP,OAAO,IAAI,CAAC,CAAC,KAAK,QAAQ;oBACtB,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,QAAQ;wBACjB,CAAC,CAAC,IAAI,CAAC,CAAC;wBACR,CAAC,CAAC,SAAS;oBACf,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;gBAE/B,IAAI,KAAK,KAAK,SAAS,EAAE;oBACrB,GAAG,IAAI,KAAK,CAAC;oBACb,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC;oBAChC,SAAS;iBACZ;aACJ;YAED,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;SACjB;QAED,4EAA4E;QAC5E,IAAI,IAAI,KAAK,SAAS,EAAE;YACpB,GAAG,IAAI,IAAI,CAAC;YACZ,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;SACnB;aAAM;YACH,MAAM,EAAE,GAAG,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAChC,GAAG,IAAI,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC;YAChC,4CAA4C;YAC5C,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;SACrD;KACJ;IAED,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/escape.d.ts b/node_modules/entities/lib/esm/escape.d.ts deleted file mode 100644 index c07ecdc..0000000 --- a/node_modules/entities/lib/esm/escape.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -export declare const xmlReplacer: RegExp; -export declare const getCodePoint: (str: string, index: number) => number; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using XML entities. - * - * If a character has no equivalent entity, a - * numeric hexadecimal reference (eg. `ü`) will be used. - */ -export declare function encodeXML(str: string): string; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using numeric hexadecimal reference (eg. `ü`). - * - * Have a look at `escapeUTF8` if you want a more concise output at the expense - * of reduced transportability. - * - * @param data String to escape. - */ -export declare const escape: typeof encodeXML; -/** - * Encodes all characters not valid in XML documents using XML entities. - * - * Note that the output will be character-set dependent. - * - * @param data String to escape. - */ -export declare const escapeUTF8: (data: string) => string; -/** - * Encodes all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -export declare const escapeAttribute: (data: string) => string; -/** - * Encodes all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -export declare const escapeText: (data: string) => string; -//# sourceMappingURL=escape.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/escape.d.ts.map b/node_modules/entities/lib/esm/escape.d.ts.map deleted file mode 100644 index fa19825..0000000 --- a/node_modules/entities/lib/esm/escape.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"escape.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAyB,CAAC;AAWlD,eAAO,MAAM,YAAY,QAGT,MAAM,SAAS,MAAM,KAAG,MAQD,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA0B7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,kBAAY,CAAC;AAqChC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,SA7Bb,MAAM,KAAK,MA6BuC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SArClB,MAAM,KAAK,MA4CpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SApDb,MAAM,KAAK,MA4DpB,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/escape.js b/node_modules/entities/lib/esm/escape.js deleted file mode 100644 index c64da6e..0000000 --- a/node_modules/entities/lib/esm/escape.js +++ /dev/null @@ -1,116 +0,0 @@ -export const xmlReplacer = /["&'<>$\x80-\uFFFF]/g; -const xmlCodeMap = new Map([ - [34, """], - [38, "&"], - [39, "'"], - [60, "<"], - [62, ">"], -]); -// For compatibility with node < 4, we wrap `codePointAt` -export const getCodePoint = -// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -String.prototype.codePointAt != null - ? (str, index) => str.codePointAt(index) - : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - (c, index) => (c.charCodeAt(index) & 0xfc00) === 0xd800 - ? (c.charCodeAt(index) - 0xd800) * 0x400 + - c.charCodeAt(index + 1) - - 0xdc00 + - 0x10000 - : c.charCodeAt(index); -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using XML entities. - * - * If a character has no equivalent entity, a - * numeric hexadecimal reference (eg. `ü`) will be used. - */ -export function encodeXML(str) { - let ret = ""; - let lastIdx = 0; - let match; - while ((match = xmlReplacer.exec(str)) !== null) { - const i = match.index; - const char = str.charCodeAt(i); - const next = xmlCodeMap.get(char); - if (next !== undefined) { - ret += str.substring(lastIdx, i) + next; - lastIdx = i + 1; - } - else { - ret += `${str.substring(lastIdx, i)}&#x${getCodePoint(str, i).toString(16)};`; - // Increase by 1 if we have a surrogate pair - lastIdx = xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800); - } - } - return ret + str.substr(lastIdx); -} -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using numeric hexadecimal reference (eg. `ü`). - * - * Have a look at `escapeUTF8` if you want a more concise output at the expense - * of reduced transportability. - * - * @param data String to escape. - */ -export const escape = encodeXML; -/** - * Creates a function that escapes all characters matched by the given regular - * expression using the given map of characters to escape to their entities. - * - * @param regex Regular expression to match characters to escape. - * @param map Map of characters to escape to their entities. - * - * @returns Function that escapes all characters matched by the given regular - * expression using the given map of characters to escape to their entities. - */ -function getEscaper(regex, map) { - return function escape(data) { - let match; - let lastIdx = 0; - let result = ""; - while ((match = regex.exec(data))) { - if (lastIdx !== match.index) { - result += data.substring(lastIdx, match.index); - } - // We know that this character will be in the map. - result += map.get(match[0].charCodeAt(0)); - // Every match will be of length 1 - lastIdx = match.index + 1; - } - return result + data.substring(lastIdx); - }; -} -/** - * Encodes all characters not valid in XML documents using XML entities. - * - * Note that the output will be character-set dependent. - * - * @param data String to escape. - */ -export const escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap); -/** - * Encodes all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -export const escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([ - [34, """], - [38, "&"], - [160, " "], -])); -/** - * Encodes all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -export const escapeText = getEscaper(/[&<>\u00A0]/g, new Map([ - [38, "&"], - [60, "<"], - [62, ">"], - [160, " "], -])); -//# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/escape.js.map b/node_modules/entities/lib/esm/escape.js.map deleted file mode 100644 index 164301c..0000000 --- a/node_modules/entities/lib/esm/escape.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"escape.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAElD,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACvB,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,YAAY;AACrB,uEAAuE;AACvE,MAAM,CAAC,SAAS,CAAC,WAAW,IAAI,IAAI;IAChC,CAAC,CAAC,CAAC,GAAW,EAAE,KAAa,EAAU,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAE;IACjE,CAAC,CAAC,uEAAuE;QACvE,CAAC,CAAS,EAAE,KAAa,EAAU,EAAE,CACjC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,MAAM;YACrC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK;gBACtC,CAAC,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC;gBACvB,MAAM;gBACN,OAAO;YACT,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACjC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;QAC7C,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;QACtB,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAElC,IAAI,IAAI,KAAK,SAAS,EAAE;YACpB,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;YACxC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;SACnB;aAAM;YACH,GAAG,IAAI,GAAG,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,YAAY,CACjD,GAAG,EACH,CAAC,CACJ,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC;YAClB,4CAA4C;YAC5C,OAAO,GAAG,WAAW,CAAC,SAAS,IAAI,MAAM,CACrC,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,MAAM,CAC7B,CAAC;SACL;KACJ;IAED,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC;AAEhC;;;;;;;;;GASG;AACH,SAAS,UAAU,CACf,KAAa,EACb,GAAwB;IAExB,OAAO,SAAS,MAAM,CAAC,IAAY;QAC/B,IAAI,KAAK,CAAC;QACV,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,IAAI,MAAM,GAAG,EAAE,CAAC;QAEhB,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;YAC/B,IAAI,OAAO,KAAK,KAAK,CAAC,KAAK,EAAE;gBACzB,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;aAClD;YAED,kDAAkD;YAClD,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAE,CAAC;YAE3C,kCAAkC;YAClC,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;SAC7B;QAED,OAAO,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CACrC,aAAa,EACb,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAChC,cAAc,EACd,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-html.d.ts b/node_modules/entities/lib/esm/generated/decode-data-html.d.ts deleted file mode 100644 index 9cfc4f4..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const _default: Uint16Array; -export default _default; -//# sourceMappingURL=decode-data-html.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map b/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map deleted file mode 100644 index 6d4d64b..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-html.js b/node_modules/entities/lib/esm/generated/decode-data-html.js deleted file mode 100644 index 0791b55..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-html.js +++ /dev/null @@ -1,7 +0,0 @@ -// Generated using scripts/write-decode-map.ts -export default new Uint16Array( -// prettier-ignore -"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c" - .split("") - .map((c) => c.charCodeAt(0))); -//# sourceMappingURL=decode-data-html.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-html.js.map b/node_modules/entities/lib/esm/generated/decode-data-html.js.map deleted file mode 100644 index c4b1e6b..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-html.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,eAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,268CAA268C;KACt68C,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts b/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts deleted file mode 100644 index 4a3f533..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const _default: Uint16Array; -export default _default; -//# sourceMappingURL=decode-data-xml.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map b/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map deleted file mode 100644 index be2a9a2..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-xml.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-xml.js b/node_modules/entities/lib/esm/generated/decode-data-xml.js deleted file mode 100644 index b01dec7..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-xml.js +++ /dev/null @@ -1,7 +0,0 @@ -// Generated using scripts/write-decode-map.ts -export default new Uint16Array( -// prettier-ignore -"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022" - .split("") - .map((c) => c.charCodeAt(0))); -//# sourceMappingURL=decode-data-xml.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-xml.js.map b/node_modules/entities/lib/esm/generated/decode-data-xml.js.map deleted file mode 100644 index 86f7150..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-xml.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,eAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,uFAAuF;KAClF,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/encode-html.d.ts b/node_modules/entities/lib/esm/generated/encode-html.d.ts deleted file mode 100644 index 0704827..0000000 --- a/node_modules/entities/lib/esm/generated/encode-html.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -type EncodeTrieNode = string | { - v?: string; - n: number | Map<number, EncodeTrieNode>; - o?: string; -}; -declare const _default: Map<number, EncodeTrieNode>; -export default _default; -//# sourceMappingURL=encode-html.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/encode-html.d.ts.map b/node_modules/entities/lib/esm/generated/encode-html.d.ts.map deleted file mode 100644 index e665a6e..0000000 --- a/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GACb,MAAM,GACN;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;;AAY1E,wBAAo+tB"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/encode-html.js b/node_modules/entities/lib/esm/generated/encode-html.js deleted file mode 100644 index 9f1858b..0000000 --- a/node_modules/entities/lib/esm/generated/encode-html.js +++ /dev/null @@ -1,10 +0,0 @@ -// Generated using scripts/write-encode-map.ts -function restoreDiff(arr) { - for (let i = 1; i < arr.length; i++) { - arr[i][0] += arr[i - 1][0] + 1; - } - return arr; -} -// prettier-ignore -export default new Map(/* #__PURE__ */ restoreDiff([[9, " "], [0, " "], [22, "!"], [0, """], [0, "#"], [0, "$"], [0, "%"], [0, "&"], [0, "'"], [0, "("], [0, ")"], [0, "*"], [0, "+"], [0, ","], [1, "."], [0, "/"], [10, ":"], [0, ";"], [0, { v: "<", n: 8402, o: "<⃒" }], [0, { v: "=", n: 8421, o: "=⃥" }], [0, { v: ">", n: 8402, o: ">⃒" }], [0, "?"], [0, "@"], [26, "["], [0, "\"], [0, "]"], [0, "^"], [0, "_"], [0, "`"], [5, { n: 106, o: "fj" }], [20, "{"], [0, "|"], [0, "}"], [34, " "], [0, "¡"], [0, "¢"], [0, "£"], [0, "¤"], [0, "¥"], [0, "¦"], [0, "§"], [0, "¨"], [0, "©"], [0, "ª"], [0, "«"], [0, "¬"], [0, "­"], [0, "®"], [0, "¯"], [0, "°"], [0, "±"], [0, "²"], [0, "³"], [0, "´"], [0, "µ"], [0, "¶"], [0, "·"], [0, "¸"], [0, "¹"], [0, "º"], [0, "»"], [0, "¼"], [0, "½"], [0, "¾"], [0, "¿"], [0, "À"], [0, "Á"], [0, "Â"], [0, "Ã"], [0, "Ä"], [0, "Å"], [0, "Æ"], [0, "Ç"], [0, "È"], [0, "É"], [0, "Ê"], [0, "Ë"], [0, "Ì"], [0, "Í"], [0, "Î"], [0, "Ï"], [0, "Ð"], [0, "Ñ"], [0, "Ò"], [0, "Ó"], [0, "Ô"], [0, "Õ"], [0, "Ö"], [0, "×"], [0, "Ø"], [0, "Ù"], [0, "Ú"], [0, "Û"], [0, "Ü"], [0, "Ý"], [0, "Þ"], [0, "ß"], [0, "à"], [0, "á"], [0, "â"], [0, "ã"], [0, "ä"], [0, "å"], [0, "æ"], [0, "ç"], [0, "è"], [0, "é"], [0, "ê"], [0, "ë"], [0, "ì"], [0, "í"], [0, "î"], [0, "ï"], [0, "ð"], [0, "ñ"], [0, "ò"], [0, "ó"], [0, "ô"], [0, "õ"], [0, "ö"], [0, "÷"], [0, "ø"], [0, "ù"], [0, "ú"], [0, "û"], [0, "ü"], [0, "ý"], [0, "þ"], [0, "ÿ"], [0, "Ā"], [0, "ā"], [0, "Ă"], [0, "ă"], [0, "Ą"], [0, "ą"], [0, "Ć"], [0, "ć"], [0, "Ĉ"], [0, "ĉ"], [0, "Ċ"], [0, "ċ"], [0, "Č"], [0, "č"], [0, "Ď"], [0, "ď"], [0, "Đ"], [0, "đ"], [0, "Ē"], [0, "ē"], [2, "Ė"], [0, "ė"], [0, "Ę"], [0, "ę"], [0, "Ě"], [0, "ě"], [0, "Ĝ"], [0, "ĝ"], [0, "Ğ"], [0, "ğ"], [0, "Ġ"], [0, "ġ"], [0, "Ģ"], [1, "Ĥ"], [0, "ĥ"], [0, "Ħ"], [0, "ħ"], [0, "Ĩ"], [0, "ĩ"], [0, "Ī"], [0, "ī"], [2, "Į"], [0, "į"], [0, "İ"], [0, "ı"], [0, "IJ"], [0, "ij"], [0, "Ĵ"], [0, "ĵ"], [0, "Ķ"], [0, "ķ"], [0, "ĸ"], [0, "Ĺ"], [0, "ĺ"], [0, "Ļ"], [0, "ļ"], [0, "Ľ"], [0, "ľ"], [0, "Ŀ"], [0, "ŀ"], [0, "Ł"], [0, "ł"], [0, "Ń"], [0, "ń"], [0, "Ņ"], [0, "ņ"], [0, "Ň"], [0, "ň"], [0, "ʼn"], [0, "Ŋ"], [0, "ŋ"], [0, "Ō"], [0, "ō"], [2, "Ő"], [0, "ő"], [0, "Œ"], [0, "œ"], [0, "Ŕ"], [0, "ŕ"], [0, "Ŗ"], [0, "ŗ"], [0, "Ř"], [0, "ř"], [0, "Ś"], [0, "ś"], [0, "Ŝ"], [0, "ŝ"], [0, "Ş"], [0, "ş"], [0, "Š"], [0, "š"], [0, "Ţ"], [0, "ţ"], [0, "Ť"], [0, "ť"], [0, "Ŧ"], [0, "ŧ"], [0, "Ũ"], [0, "ũ"], [0, "Ū"], [0, "ū"], [0, "Ŭ"], [0, "ŭ"], [0, "Ů"], [0, "ů"], [0, "Ű"], [0, "ű"], [0, "Ų"], [0, "ų"], [0, "Ŵ"], [0, "ŵ"], [0, "Ŷ"], [0, "ŷ"], [0, "Ÿ"], [0, "Ź"], [0, "ź"], [0, "Ż"], [0, "ż"], [0, "Ž"], [0, "ž"], [19, "ƒ"], [34, "Ƶ"], [63, "ǵ"], [65, "ȷ"], [142, "ˆ"], [0, "ˇ"], [16, "˘"], [0, "˙"], [0, "˚"], [0, "˛"], [0, "˜"], [0, "˝"], [51, "̑"], [127, "Α"], [0, "Β"], [0, "Γ"], [0, "Δ"], [0, "Ε"], [0, "Ζ"], [0, "Η"], [0, "Θ"], [0, "Ι"], [0, "Κ"], [0, "Λ"], [0, "Μ"], [0, "Ν"], [0, "Ξ"], [0, "Ο"], [0, "Π"], [0, "Ρ"], [1, "Σ"], [0, "Τ"], [0, "Υ"], [0, "Φ"], [0, "Χ"], [0, "Ψ"], [0, "Ω"], [7, "α"], [0, "β"], [0, "γ"], [0, "δ"], [0, "ε"], [0, "ζ"], [0, "η"], [0, "θ"], [0, "ι"], [0, "κ"], [0, "λ"], [0, "μ"], [0, "ν"], [0, "ξ"], [0, "ο"], [0, "π"], [0, "ρ"], [0, "ς"], [0, "σ"], [0, "τ"], [0, "υ"], [0, "φ"], [0, "χ"], [0, "ψ"], [0, "ω"], [7, "ϑ"], [0, "ϒ"], [2, "ϕ"], [0, "ϖ"], [5, "Ϝ"], [0, "ϝ"], [18, "ϰ"], [0, "ϱ"], [3, "ϵ"], [0, "϶"], [10, "Ё"], [0, "Ђ"], [0, "Ѓ"], [0, "Є"], [0, "Ѕ"], [0, "І"], [0, "Ї"], [0, "Ј"], [0, "Љ"], [0, "Њ"], [0, "Ћ"], [0, "Ќ"], [1, "Ў"], [0, "Џ"], [0, "А"], [0, "Б"], [0, "В"], [0, "Г"], [0, "Д"], [0, "Е"], [0, "Ж"], [0, "З"], [0, "И"], [0, "Й"], [0, "К"], [0, "Л"], [0, "М"], [0, "Н"], [0, "О"], [0, "П"], [0, "Р"], [0, "С"], [0, "Т"], [0, "У"], [0, "Ф"], [0, "Х"], [0, "Ц"], [0, "Ч"], [0, "Ш"], [0, "Щ"], [0, "Ъ"], [0, "Ы"], [0, "Ь"], [0, "Э"], [0, "Ю"], [0, "Я"], [0, "а"], [0, "б"], [0, "в"], [0, "г"], [0, "д"], [0, "е"], [0, "ж"], [0, "з"], [0, "и"], [0, "й"], [0, "к"], [0, "л"], [0, "м"], [0, "н"], [0, "о"], [0, "п"], [0, "р"], [0, "с"], [0, "т"], [0, "у"], [0, "ф"], [0, "х"], [0, "ц"], [0, "ч"], [0, "ш"], [0, "щ"], [0, "ъ"], [0, "ы"], [0, "ь"], [0, "э"], [0, "ю"], [0, "я"], [1, "ё"], [0, "ђ"], [0, "ѓ"], [0, "є"], [0, "ѕ"], [0, "і"], [0, "ї"], [0, "ј"], [0, "љ"], [0, "њ"], [0, "ћ"], [0, "ќ"], [1, "ў"], [0, "џ"], [7074, " "], [0, " "], [0, " "], [0, " "], [1, " "], [0, " "], [0, " "], [0, " "], [0, "​"], [0, "‌"], [0, "‍"], [0, "‎"], [0, "‏"], [0, "‐"], [2, "–"], [0, "—"], [0, "―"], [0, "‖"], [1, "‘"], [0, "’"], [0, "‚"], [1, "“"], [0, "”"], [0, "„"], [1, "†"], [0, "‡"], [0, "•"], [2, "‥"], [0, "…"], [9, "‰"], [0, "‱"], [0, "′"], [0, "″"], [0, "‴"], [0, "‵"], [3, "‹"], [0, "›"], [3, "‾"], [2, "⁁"], [1, "⁃"], [0, "⁄"], [10, "⁏"], [7, "⁗"], [7, { v: " ", n: 8202, o: "  " }], [0, "⁠"], [0, "⁡"], [0, "⁢"], [0, "⁣"], [72, "€"], [46, "⃛"], [0, "⃜"], [37, "ℂ"], [2, "℅"], [4, "ℊ"], [0, "ℋ"], [0, "ℌ"], [0, "ℍ"], [0, "ℎ"], [0, "ℏ"], [0, "ℐ"], [0, "ℑ"], [0, "ℒ"], [0, "ℓ"], [1, "ℕ"], [0, "№"], [0, "℗"], [0, "℘"], [0, "ℙ"], [0, "ℚ"], [0, "ℛ"], [0, "ℜ"], [0, "ℝ"], [0, "℞"], [3, "™"], [1, "ℤ"], [2, "℧"], [0, "ℨ"], [0, "℩"], [2, "ℬ"], [0, "ℭ"], [1, "ℯ"], [0, "ℰ"], [0, "ℱ"], [1, "ℳ"], [0, "ℴ"], [0, "ℵ"], [0, "ℶ"], [0, "ℷ"], [0, "ℸ"], [12, "ⅅ"], [0, "ⅆ"], [0, "ⅇ"], [0, "ⅈ"], [10, "⅓"], [0, "⅔"], [0, "⅕"], [0, "⅖"], [0, "⅗"], [0, "⅘"], [0, "⅙"], [0, "⅚"], [0, "⅛"], [0, "⅜"], [0, "⅝"], [0, "⅞"], [49, "←"], [0, "↑"], [0, "→"], [0, "↓"], [0, "↔"], [0, "↕"], [0, "↖"], [0, "↗"], [0, "↘"], [0, "↙"], [0, "↚"], [0, "↛"], [1, { v: "↝", n: 824, o: "↝̸" }], [0, "↞"], [0, "↟"], [0, "↠"], [0, "↡"], [0, "↢"], [0, "↣"], [0, "↤"], [0, "↥"], [0, "↦"], [0, "↧"], [1, "↩"], [0, "↪"], [0, "↫"], [0, "↬"], [0, "↭"], [0, "↮"], [1, "↰"], [0, "↱"], [0, "↲"], [0, "↳"], [1, "↵"], [0, "↶"], [0, "↷"], [2, "↺"], [0, "↻"], [0, "↼"], [0, "↽"], [0, "↾"], [0, "↿"], [0, "⇀"], [0, "⇁"], [0, "⇂"], [0, "⇃"], [0, "⇄"], [0, "⇅"], [0, "⇆"], [0, "⇇"], [0, "⇈"], [0, "⇉"], [0, "⇊"], [0, "⇋"], [0, "⇌"], [0, "⇍"], [0, "⇎"], [0, "⇏"], [0, "⇐"], [0, "⇑"], [0, "⇒"], [0, "⇓"], [0, "⇔"], [0, "⇕"], [0, "⇖"], [0, "⇗"], [0, "⇘"], [0, "⇙"], [0, "⇚"], [0, "⇛"], [1, "⇝"], [6, "⇤"], [0, "⇥"], [15, "⇵"], [7, "⇽"], [0, "⇾"], [0, "⇿"], [0, "∀"], [0, "∁"], [0, { v: "∂", n: 824, o: "∂̸" }], [0, "∃"], [0, "∄"], [0, "∅"], [1, "∇"], [0, "∈"], [0, "∉"], [1, "∋"], [0, "∌"], [2, "∏"], [0, "∐"], [0, "∑"], [0, "−"], [0, "∓"], [0, "∔"], [1, "∖"], [0, "∗"], [0, "∘"], [1, "√"], [2, "∝"], [0, "∞"], [0, "∟"], [0, { v: "∠", n: 8402, o: "∠⃒" }], [0, "∡"], [0, "∢"], [0, "∣"], [0, "∤"], [0, "∥"], [0, "∦"], [0, "∧"], [0, "∨"], [0, { v: "∩", n: 65024, o: "∩︀" }], [0, { v: "∪", n: 65024, o: "∪︀" }], [0, "∫"], [0, "∬"], [0, "∭"], [0, "∮"], [0, "∯"], [0, "∰"], [0, "∱"], [0, "∲"], [0, "∳"], [0, "∴"], [0, "∵"], [0, "∶"], [0, "∷"], [0, "∸"], [1, "∺"], [0, "∻"], [0, { v: "∼", n: 8402, o: "∼⃒" }], [0, { v: "∽", n: 817, o: "∽̱" }], [0, { v: "∾", n: 819, o: "∾̳" }], [0, "∿"], [0, "≀"], [0, "≁"], [0, { v: "≂", n: 824, o: "≂̸" }], [0, "≃"], [0, "≄"], [0, "≅"], [0, "≆"], [0, "≇"], [0, "≈"], [0, "≉"], [0, "≊"], [0, { v: "≋", n: 824, o: "≋̸" }], [0, "≌"], [0, { v: "≍", n: 8402, o: "≍⃒" }], [0, { v: "≎", n: 824, o: "≎̸" }], [0, { v: "≏", n: 824, o: "≏̸" }], [0, { v: "≐", n: 824, o: "≐̸" }], [0, "≑"], [0, "≒"], [0, "≓"], [0, "≔"], [0, "≕"], [0, "≖"], [0, "≗"], [1, "≙"], [0, "≚"], [1, "≜"], [2, "≟"], [0, "≠"], [0, { v: "≡", n: 8421, o: "≡⃥" }], [0, "≢"], [1, { v: "≤", n: 8402, o: "≤⃒" }], [0, { v: "≥", n: 8402, o: "≥⃒" }], [0, { v: "≦", n: 824, o: "≦̸" }], [0, { v: "≧", n: 824, o: "≧̸" }], [0, { v: "≨", n: 65024, o: "≨︀" }], [0, { v: "≩", n: 65024, o: "≩︀" }], [0, { v: "≪", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≪̸"], [7577, "≪⃒"]])) }], [0, { v: "≫", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≫̸"], [7577, "≫⃒"]])) }], [0, "≬"], [0, "≭"], [0, "≮"], [0, "≯"], [0, "≰"], [0, "≱"], [0, "≲"], [0, "≳"], [0, "≴"], [0, "≵"], [0, "≶"], [0, "≷"], [0, "≸"], [0, "≹"], [0, "≺"], [0, "≻"], [0, "≼"], [0, "≽"], [0, "≾"], [0, { v: "≿", n: 824, o: "≿̸" }], [0, "⊀"], [0, "⊁"], [0, { v: "⊂", n: 8402, o: "⊂⃒" }], [0, { v: "⊃", n: 8402, o: "⊃⃒" }], [0, "⊄"], [0, "⊅"], [0, "⊆"], [0, "⊇"], [0, "⊈"], [0, "⊉"], [0, { v: "⊊", n: 65024, o: "⊊︀" }], [0, { v: "⊋", n: 65024, o: "⊋︀" }], [1, "⊍"], [0, "⊎"], [0, { v: "⊏", n: 824, o: "⊏̸" }], [0, { v: "⊐", n: 824, o: "⊐̸" }], [0, "⊑"], [0, "⊒"], [0, { v: "⊓", n: 65024, o: "⊓︀" }], [0, { v: "⊔", n: 65024, o: "⊔︀" }], [0, "⊕"], [0, "⊖"], [0, "⊗"], [0, "⊘"], [0, "⊙"], [0, "⊚"], [0, "⊛"], [1, "⊝"], [0, "⊞"], [0, "⊟"], [0, "⊠"], [0, "⊡"], [0, "⊢"], [0, "⊣"], [0, "⊤"], [0, "⊥"], [1, "⊧"], [0, "⊨"], [0, "⊩"], [0, "⊪"], [0, "⊫"], [0, "⊬"], [0, "⊭"], [0, "⊮"], [0, "⊯"], [0, "⊰"], [1, "⊲"], [0, "⊳"], [0, { v: "⊴", n: 8402, o: "⊴⃒" }], [0, { v: "⊵", n: 8402, o: "⊵⃒" }], [0, "⊶"], [0, "⊷"], [0, "⊸"], [0, "⊹"], [0, "⊺"], [0, "⊻"], [1, "⊽"], [0, "⊾"], [0, "⊿"], [0, "⋀"], [0, "⋁"], [0, "⋂"], [0, "⋃"], [0, "⋄"], [0, "⋅"], [0, "⋆"], [0, "⋇"], [0, "⋈"], [0, "⋉"], [0, "⋊"], [0, "⋋"], [0, "⋌"], [0, "⋍"], [0, "⋎"], [0, "⋏"], [0, "⋐"], [0, "⋑"], [0, "⋒"], [0, "⋓"], [0, "⋔"], [0, "⋕"], [0, "⋖"], [0, "⋗"], [0, { v: "⋘", n: 824, o: "⋘̸" }], [0, { v: "⋙", n: 824, o: "⋙̸" }], [0, { v: "⋚", n: 65024, o: "⋚︀" }], [0, { v: "⋛", n: 65024, o: "⋛︀" }], [2, "⋞"], [0, "⋟"], [0, "⋠"], [0, "⋡"], [0, "⋢"], [0, "⋣"], [2, "⋦"], [0, "⋧"], [0, "⋨"], [0, "⋩"], [0, "⋪"], [0, "⋫"], [0, "⋬"], [0, "⋭"], [0, "⋮"], [0, "⋯"], [0, "⋰"], [0, "⋱"], [0, "⋲"], [0, "⋳"], [0, "⋴"], [0, { v: "⋵", n: 824, o: "⋵̸" }], [0, "⋶"], [0, "⋷"], [1, { v: "⋹", n: 824, o: "⋹̸" }], [0, "⋺"], [0, "⋻"], [0, "⋼"], [0, "⋽"], [0, "⋾"], [6, "⌅"], [0, "⌆"], [1, "⌈"], [0, "⌉"], [0, "⌊"], [0, "⌋"], [0, "⌌"], [0, "⌍"], [0, "⌎"], [0, "⌏"], [0, "⌐"], [1, "⌒"], [0, "⌓"], [1, "⌕"], [0, "⌖"], [5, "⌜"], [0, "⌝"], [0, "⌞"], [0, "⌟"], [2, "⌢"], [0, "⌣"], [9, "⌭"], [0, "⌮"], [7, "⌶"], [6, "⌽"], [1, "⌿"], [60, "⍼"], [51, "⎰"], [0, "⎱"], [2, "⎴"], [0, "⎵"], [0, "⎶"], [37, "⏜"], [0, "⏝"], [0, "⏞"], [0, "⏟"], [2, "⏢"], [4, "⏧"], [59, "␣"], [164, "Ⓢ"], [55, "─"], [1, "│"], [9, "┌"], [3, "┐"], [3, "└"], [3, "┘"], [3, "├"], [7, "┤"], [7, "┬"], [7, "┴"], [7, "┼"], [19, "═"], [0, "║"], [0, "╒"], [0, "╓"], [0, "╔"], [0, "╕"], [0, "╖"], [0, "╗"], [0, "╘"], [0, "╙"], [0, "╚"], [0, "╛"], [0, "╜"], [0, "╝"], [0, "╞"], [0, "╟"], [0, "╠"], [0, "╡"], [0, "╢"], [0, "╣"], [0, "╤"], [0, "╥"], [0, "╦"], [0, "╧"], [0, "╨"], [0, "╩"], [0, "╪"], [0, "╫"], [0, "╬"], [19, "▀"], [3, "▄"], [3, "█"], [8, "░"], [0, "▒"], [0, "▓"], [13, "□"], [8, "▪"], [0, "▫"], [1, "▭"], [0, "▮"], [2, "▱"], [1, "△"], [0, "▴"], [0, "▵"], [2, "▸"], [0, "▹"], [3, "▽"], [0, "▾"], [0, "▿"], [2, "◂"], [0, "◃"], [6, "◊"], [0, "○"], [32, "◬"], [2, "◯"], [8, "◸"], [0, "◹"], [0, "◺"], [0, "◻"], [0, "◼"], [8, "★"], [0, "☆"], [7, "☎"], [49, "♀"], [1, "♂"], [29, "♠"], [2, "♣"], [1, "♥"], [0, "♦"], [3, "♪"], [2, "♭"], [0, "♮"], [0, "♯"], [163, "✓"], [3, "✗"], [8, "✠"], [21, "✶"], [33, "❘"], [25, "❲"], [0, "❳"], [84, "⟈"], [0, "⟉"], [28, "⟦"], [0, "⟧"], [0, "⟨"], [0, "⟩"], [0, "⟪"], [0, "⟫"], [0, "⟬"], [0, "⟭"], [7, "⟵"], [0, "⟶"], [0, "⟷"], [0, "⟸"], [0, "⟹"], [0, "⟺"], [1, "⟼"], [2, "⟿"], [258, "⤂"], [0, "⤃"], [0, "⤄"], [0, "⤅"], [6, "⤌"], [0, "⤍"], [0, "⤎"], [0, "⤏"], [0, "⤐"], [0, "⤑"], [0, "⤒"], [0, "⤓"], [2, "⤖"], [2, "⤙"], [0, "⤚"], [0, "⤛"], [0, "⤜"], [0, "⤝"], [0, "⤞"], [0, "⤟"], [0, "⤠"], [2, "⤣"], [0, "⤤"], [0, "⤥"], [0, "⤦"], [0, "⤧"], [0, "⤨"], [0, "⤩"], [0, "⤪"], [8, { v: "⤳", n: 824, o: "⤳̸" }], [1, "⤵"], [0, "⤶"], [0, "⤷"], [0, "⤸"], [0, "⤹"], [2, "⤼"], [0, "⤽"], [7, "⥅"], [2, "⥈"], [0, "⥉"], [0, "⥊"], [0, "⥋"], [2, "⥎"], [0, "⥏"], [0, "⥐"], [0, "⥑"], [0, "⥒"], [0, "⥓"], [0, "⥔"], [0, "⥕"], [0, "⥖"], [0, "⥗"], [0, "⥘"], [0, "⥙"], [0, "⥚"], [0, "⥛"], [0, "⥜"], [0, "⥝"], [0, "⥞"], [0, "⥟"], [0, "⥠"], [0, "⥡"], [0, "⥢"], [0, "⥣"], [0, "⥤"], [0, "⥥"], [0, "⥦"], [0, "⥧"], [0, "⥨"], [0, "⥩"], [0, "⥪"], [0, "⥫"], [0, "⥬"], [0, "⥭"], [0, "⥮"], [0, "⥯"], [0, "⥰"], [0, "⥱"], [0, "⥲"], [0, "⥳"], [0, "⥴"], [0, "⥵"], [0, "⥶"], [1, "⥸"], [0, "⥹"], [1, "⥻"], [0, "⥼"], [0, "⥽"], [0, "⥾"], [0, "⥿"], [5, "⦅"], [0, "⦆"], [4, "⦋"], [0, "⦌"], [0, "⦍"], [0, "⦎"], [0, "⦏"], [0, "⦐"], [0, "⦑"], [0, "⦒"], [0, "⦓"], [0, "⦔"], [0, "⦕"], [0, "⦖"], [3, "⦚"], [1, "⦜"], [0, "⦝"], [6, "⦤"], [0, "⦥"], [0, "⦦"], [0, "⦧"], [0, "⦨"], [0, "⦩"], [0, "⦪"], [0, "⦫"], [0, "⦬"], [0, "⦭"], [0, "⦮"], [0, "⦯"], [0, "⦰"], [0, "⦱"], [0, "⦲"], [0, "⦳"], [0, "⦴"], [0, "⦵"], [0, "⦶"], [0, "⦷"], [1, "⦹"], [1, "⦻"], [0, "⦼"], [1, "⦾"], [0, "⦿"], [0, "⧀"], [0, "⧁"], [0, "⧂"], [0, "⧃"], [0, "⧄"], [0, "⧅"], [3, "⧉"], [3, "⧍"], [0, "⧎"], [0, { v: "⧏", n: 824, o: "⧏̸" }], [0, { v: "⧐", n: 824, o: "⧐̸" }], [11, "⧜"], [0, "⧝"], [0, "⧞"], [4, "⧣"], [0, "⧤"], [0, "⧥"], [5, "⧫"], [8, "⧴"], [1, "⧶"], [9, "⨀"], [0, "⨁"], [0, "⨂"], [1, "⨄"], [1, "⨆"], [5, "⨌"], [0, "⨍"], [2, "⨐"], [0, "⨑"], [0, "⨒"], [0, "⨓"], [0, "⨔"], [0, "⨕"], [0, "⨖"], [0, "⨗"], [10, "⨢"], [0, "⨣"], [0, "⨤"], [0, "⨥"], [0, "⨦"], [0, "⨧"], [1, "⨩"], [0, "⨪"], [2, "⨭"], [0, "⨮"], [0, "⨯"], [0, "⨰"], [0, "⨱"], [1, "⨳"], [0, "⨴"], [0, "⨵"], [0, "⨶"], [0, "⨷"], [0, "⨸"], [0, "⨹"], [0, "⨺"], [0, "⨻"], [0, "⨼"], [2, "⨿"], [0, "⩀"], [1, "⩂"], [0, "⩃"], [0, "⩄"], [0, "⩅"], [0, "⩆"], [0, "⩇"], [0, "⩈"], [0, "⩉"], [0, "⩊"], [0, "⩋"], [0, "⩌"], [0, "⩍"], [2, "⩐"], [2, "⩓"], [0, "⩔"], [0, "⩕"], [0, "⩖"], [0, "⩗"], [0, "⩘"], [1, "⩚"], [0, "⩛"], [0, "⩜"], [0, "⩝"], [1, "⩟"], [6, "⩦"], [3, "⩪"], [2, { v: "⩭", n: 824, o: "⩭̸" }], [0, "⩮"], [0, "⩯"], [0, { v: "⩰", n: 824, o: "⩰̸" }], [0, "⩱"], [0, "⩲"], [0, "⩳"], [0, "⩴"], [0, "⩵"], [1, "⩷"], [0, "⩸"], [0, "⩹"], [0, "⩺"], [0, "⩻"], [0, "⩼"], [0, { v: "⩽", n: 824, o: "⩽̸" }], [0, { v: "⩾", n: 824, o: "⩾̸" }], [0, "⩿"], [0, "⪀"], [0, "⪁"], [0, "⪂"], [0, "⪃"], [0, "⪄"], [0, "⪅"], [0, "⪆"], [0, "⪇"], [0, "⪈"], [0, "⪉"], [0, "⪊"], [0, "⪋"], [0, "⪌"], [0, "⪍"], [0, "⪎"], [0, "⪏"], [0, "⪐"], [0, "⪑"], [0, "⪒"], [0, "⪓"], [0, "⪔"], [0, "⪕"], [0, "⪖"], [0, "⪗"], [0, "⪘"], [0, "⪙"], [0, "⪚"], [2, "⪝"], [0, "⪞"], [0, "⪟"], [0, "⪠"], [0, { v: "⪡", n: 824, o: "⪡̸" }], [0, { v: "⪢", n: 824, o: "⪢̸" }], [1, "⪤"], [0, "⪥"], [0, "⪦"], [0, "⪧"], [0, "⪨"], [0, "⪩"], [0, "⪪"], [0, "⪫"], [0, { v: "⪬", n: 65024, o: "⪬︀" }], [0, { v: "⪭", n: 65024, o: "⪭︀" }], [0, "⪮"], [0, { v: "⪯", n: 824, o: "⪯̸" }], [0, { v: "⪰", n: 824, o: "⪰̸" }], [2, "⪳"], [0, "⪴"], [0, "⪵"], [0, "⪶"], [0, "⪷"], [0, "⪸"], [0, "⪹"], [0, "⪺"], [0, "⪻"], [0, "⪼"], [0, "⪽"], [0, "⪾"], [0, "⪿"], [0, "⫀"], [0, "⫁"], [0, "⫂"], [0, "⫃"], [0, "⫄"], [0, { v: "⫅", n: 824, o: "⫅̸" }], [0, { v: "⫆", n: 824, o: "⫆̸" }], [0, "⫇"], [0, "⫈"], [2, { v: "⫋", n: 65024, o: "⫋︀" }], [0, { v: "⫌", n: 65024, o: "⫌︀" }], [2, "⫏"], [0, "⫐"], [0, "⫑"], [0, "⫒"], [0, "⫓"], [0, "⫔"], [0, "⫕"], [0, "⫖"], [0, "⫗"], [0, "⫘"], [0, "⫙"], [0, "⫚"], [0, "⫛"], [8, "⫤"], [1, "⫦"], [0, "⫧"], [0, "⫨"], [0, "⫩"], [1, "⫫"], [0, "⫬"], [0, "⫭"], [0, "⫮"], [0, "⫯"], [0, "⫰"], [0, "⫱"], [0, "⫲"], [0, "⫳"], [9, { v: "⫽", n: 8421, o: "⫽⃥" }], [44343, { n: new Map(/* #__PURE__ */ restoreDiff([[56476, "𝒜"], [1, "𝒞"], [0, "𝒟"], [2, "𝒢"], [2, "𝒥"], [0, "𝒦"], [2, "𝒩"], [0, "𝒪"], [0, "𝒫"], [0, "𝒬"], [1, "𝒮"], [0, "𝒯"], [0, "𝒰"], [0, "𝒱"], [0, "𝒲"], [0, "𝒳"], [0, "𝒴"], [0, "𝒵"], [0, "𝒶"], [0, "𝒷"], [0, "𝒸"], [0, "𝒹"], [1, "𝒻"], [1, "𝒽"], [0, "𝒾"], [0, "𝒿"], [0, "𝓀"], [0, "𝓁"], [0, "𝓂"], [0, "𝓃"], [1, "𝓅"], [0, "𝓆"], [0, "𝓇"], [0, "𝓈"], [0, "𝓉"], [0, "𝓊"], [0, "𝓋"], [0, "𝓌"], [0, "𝓍"], [0, "𝓎"], [0, "𝓏"], [52, "𝔄"], [0, "𝔅"], [1, "𝔇"], [0, "𝔈"], [0, "𝔉"], [0, "𝔊"], [2, "𝔍"], [0, "𝔎"], [0, "𝔏"], [0, "𝔐"], [0, "𝔑"], [0, "𝔒"], [0, "𝔓"], [0, "𝔔"], [1, "𝔖"], [0, "𝔗"], [0, "𝔘"], [0, "𝔙"], [0, "𝔚"], [0, "𝔛"], [0, "𝔜"], [1, "𝔞"], [0, "𝔟"], [0, "𝔠"], [0, "𝔡"], [0, "𝔢"], [0, "𝔣"], [0, "𝔤"], [0, "𝔥"], [0, "𝔦"], [0, "𝔧"], [0, "𝔨"], [0, "𝔩"], [0, "𝔪"], [0, "𝔫"], [0, "𝔬"], [0, "𝔭"], [0, "𝔮"], [0, "𝔯"], [0, "𝔰"], [0, "𝔱"], [0, "𝔲"], [0, "𝔳"], [0, "𝔴"], [0, "𝔵"], [0, "𝔶"], [0, "𝔷"], [0, "𝔸"], [0, "𝔹"], [1, "𝔻"], [0, "𝔼"], [0, "𝔽"], [0, "𝔾"], [1, "𝕀"], [0, "𝕁"], [0, "𝕂"], [0, "𝕃"], [0, "𝕄"], [1, "𝕆"], [3, "𝕊"], [0, "𝕋"], [0, "𝕌"], [0, "𝕍"], [0, "𝕎"], [0, "𝕏"], [0, "𝕐"], [1, "𝕒"], [0, "𝕓"], [0, "𝕔"], [0, "𝕕"], [0, "𝕖"], [0, "𝕗"], [0, "𝕘"], [0, "𝕙"], [0, "𝕚"], [0, "𝕛"], [0, "𝕜"], [0, "𝕝"], [0, "𝕞"], [0, "𝕟"], [0, "𝕠"], [0, "𝕡"], [0, "𝕢"], [0, "𝕣"], [0, "𝕤"], [0, "𝕥"], [0, "𝕦"], [0, "𝕧"], [0, "𝕨"], [0, "𝕩"], [0, "𝕪"], [0, "𝕫"]])) }], [8906, "ff"], [0, "fi"], [0, "fl"], [0, "ffi"], [0, "ffl"]])); -//# sourceMappingURL=encode-html.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/encode-html.js.map b/node_modules/entities/lib/esm/generated/encode-html.js.map deleted file mode 100644 index 8906ff8..0000000 --- a/node_modules/entities/lib/esm/generated/encode-html.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAM9C,SAAS,WAAW,CAChB,GAAM;IAEN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;KAClC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,kBAAkB;AAClB,eAAe,IAAI,GAAG,CAAwB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,GAAG,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,aAAa,CAAC,EAAC,CAAC,GAAG,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,IAAI,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,eAAe,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,cAAc,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,4BAA4B,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,GAAG,CAAgB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,GAAG,EAAC,QAAQ,CAAC,EAAC,CAAC,IAAI,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,GAAG,CAAgB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,GAAG,EAAC,QAAQ,CAAC,EAAC,CAAC,IAAI,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,eAAe,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,gBAAgB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,gBAAgB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,mBAAmB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,qBAAqB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,qBAAqB,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,sBAAsB,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,0BAA0B,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,GAAG,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,GAAG,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,qBAAqB,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,4BAA4B,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,GAAG,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,mBAAmB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,sBAAsB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,uBAAuB,EAAC,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,qBAAqB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,kBAAkB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,2BAA2B,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,iBAAiB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,iBAAiB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,iBAAiB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,KAAK,EAAC,EAAC,CAAC,EAAC,IAAI,GAAG,CAAgB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,KAAK,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,IAAI,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/index.d.ts b/node_modules/entities/lib/esm/index.d.ts deleted file mode 100644 index dd4eb11..0000000 --- a/node_modules/entities/lib/esm/index.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { DecodingMode } from "./decode.js"; -/** The level of entities to support. */ -export declare enum EntityLevel { - /** Support only XML entities. */ - XML = 0, - /** Support HTML entities, which are a superset of XML entities. */ - HTML = 1 -} -export declare enum EncodingMode { - /** - * The output is UTF-8 encoded. Only characters that need escaping within - * XML will be escaped. - */ - UTF8 = 0, - /** - * The output consists only of ASCII characters. Characters that need - * escaping within HTML, and characters that aren't ASCII characters will - * be escaped. - */ - ASCII = 1, - /** - * Encode all characters that have an equivalent entity, as well as all - * characters that are not ASCII characters. - */ - Extensive = 2, - /** - * Encode all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - Attribute = 3, - /** - * Encode all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - Text = 4 -} -export interface DecodingOptions { - /** - * The level of entities to support. - * @default {@link EntityLevel.XML} - */ - level?: EntityLevel; - /** - * Decoding mode. If `Legacy`, will support legacy entities not terminated - * with a semicolon (`;`). - * - * Always `Strict` for XML. For HTML, set this to `true` if you are parsing - * an attribute value. - * - * The deprecated `decodeStrict` function defaults this to `Strict`. - * - * @default {@link DecodingMode.Legacy} - */ - mode?: DecodingMode | undefined; -} -/** - * Decodes a string with entities. - * - * @param data String to decode. - * @param options Decoding options. - */ -export declare function decode(data: string, options?: DecodingOptions | EntityLevel): string; -/** - * Decodes a string with entities. Does not allow missing trailing semicolons for entities. - * - * @param data String to decode. - * @param options Decoding options. - * @deprecated Use `decode` with the `mode` set to `Strict`. - */ -export declare function decodeStrict(data: string, options?: DecodingOptions | EntityLevel): string; -/** - * Options for `encode`. - */ -export interface EncodingOptions { - /** - * The level of entities to support. - * @default {@link EntityLevel.XML} - */ - level?: EntityLevel; - /** - * Output format. - * @default {@link EncodingMode.Extensive} - */ - mode?: EncodingMode; -} -/** - * Encodes a string with entities. - * - * @param data String to encode. - * @param options Encoding options. - */ -export declare function encode(data: string, options?: EncodingOptions | EntityLevel): string; -export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; -export { encodeHTML, encodeNonAsciiHTML, encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js"; -export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/index.d.ts.map b/node_modules/entities/lib/esm/index.d.ts.map deleted file mode 100644 index cfeef9f..0000000 --- a/node_modules/entities/lib/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,YAAY,EAAE,MAAM,aAAa,CAAC;AASlE,wCAAwC;AACxC,oBAAY,WAAW;IACnB,iCAAiC;IACjC,GAAG,IAAI;IACP,mEAAmE;IACnE,IAAI,IAAI;CACX;AAED,oBAAY,YAAY;IACpB;;;OAGG;IACH,IAAI,IAAA;IACJ;;;;OAIG;IACH,KAAK,IAAA;IACL;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,IAAI,IAAA;CACP;AAED,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CASR;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAKR;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAkBR;AAED,OAAO,EACH,SAAS,EACT,MAAM,EACN,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,UAAU,EACV,kBAAkB,EAElB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,GAC5B,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EAEnB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,GAC/B,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/index.js b/node_modules/entities/lib/esm/index.js deleted file mode 100644 index acc6dbe..0000000 --- a/node_modules/entities/lib/esm/index.js +++ /dev/null @@ -1,99 +0,0 @@ -import { decodeXML, decodeHTML, DecodingMode } from "./decode.js"; -import { encodeHTML, encodeNonAsciiHTML } from "./encode.js"; -import { encodeXML, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; -/** The level of entities to support. */ -export var EntityLevel; -(function (EntityLevel) { - /** Support only XML entities. */ - EntityLevel[EntityLevel["XML"] = 0] = "XML"; - /** Support HTML entities, which are a superset of XML entities. */ - EntityLevel[EntityLevel["HTML"] = 1] = "HTML"; -})(EntityLevel || (EntityLevel = {})); -export var EncodingMode; -(function (EncodingMode) { - /** - * The output is UTF-8 encoded. Only characters that need escaping within - * XML will be escaped. - */ - EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8"; - /** - * The output consists only of ASCII characters. Characters that need - * escaping within HTML, and characters that aren't ASCII characters will - * be escaped. - */ - EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII"; - /** - * Encode all characters that have an equivalent entity, as well as all - * characters that are not ASCII characters. - */ - EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive"; - /** - * Encode all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute"; - /** - * Encode all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - EncodingMode[EncodingMode["Text"] = 4] = "Text"; -})(EncodingMode || (EncodingMode = {})); -/** - * Decodes a string with entities. - * - * @param data String to decode. - * @param options Decoding options. - */ -export function decode(data, options = EntityLevel.XML) { - const level = typeof options === "number" ? options : options.level; - if (level === EntityLevel.HTML) { - const mode = typeof options === "object" ? options.mode : undefined; - return decodeHTML(data, mode); - } - return decodeXML(data); -} -/** - * Decodes a string with entities. Does not allow missing trailing semicolons for entities. - * - * @param data String to decode. - * @param options Decoding options. - * @deprecated Use `decode` with the `mode` set to `Strict`. - */ -export function decodeStrict(data, options = EntityLevel.XML) { - var _a; - const opts = typeof options === "number" ? { level: options } : options; - (_a = opts.mode) !== null && _a !== void 0 ? _a : (opts.mode = DecodingMode.Strict); - return decode(data, opts); -} -/** - * Encodes a string with entities. - * - * @param data String to encode. - * @param options Encoding options. - */ -export function encode(data, options = EntityLevel.XML) { - const opts = typeof options === "number" ? { level: options } : options; - // Mode `UTF8` just escapes XML entities - if (opts.mode === EncodingMode.UTF8) - return escapeUTF8(data); - if (opts.mode === EncodingMode.Attribute) - return escapeAttribute(data); - if (opts.mode === EncodingMode.Text) - return escapeText(data); - if (opts.level === EntityLevel.HTML) { - if (opts.mode === EncodingMode.ASCII) { - return encodeNonAsciiHTML(data); - } - return encodeHTML(data); - } - // ASCII and Extensive are equivalent - return encodeXML(data); -} -export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; -export { encodeHTML, encodeNonAsciiHTML, -// Legacy aliases (deprecated) -encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js"; -export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, -// Legacy aliases (deprecated) -decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/index.js.map b/node_modules/entities/lib/esm/index.js.map deleted file mode 100644 index 5f634fc..0000000 --- a/node_modules/entities/lib/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACH,SAAS,EACT,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,wCAAwC;AACxC,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,iCAAiC;IACjC,2CAAO,CAAA;IACP,mEAAmE;IACnE,6CAAQ,CAAA;AACZ,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED,MAAM,CAAN,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACpB;;;OAGG;IACH,+CAAI,CAAA;IACJ;;;;OAIG;IACH,iDAAK,CAAA;IACL;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,+CAAI,CAAA;AACR,CAAC,EA3BW,YAAY,KAAZ,YAAY,QA2BvB;AAsBD;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAClB,IAAY,EACZ,UAAyC,WAAW,CAAC,GAAG;IAExD,MAAM,KAAK,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAEpE,IAAI,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE;QAC5B,MAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QACpE,OAAO,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACjC;IAED,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CACxB,IAAY,EACZ,UAAyC,WAAW,CAAC,GAAG;;IAExD,MAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IACxE,MAAA,IAAI,CAAC,IAAI,oCAAT,IAAI,CAAC,IAAI,GAAK,YAAY,CAAC,MAAM,EAAC;IAElC,OAAO,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC9B,CAAC;AAkBD;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAClB,IAAY,EACZ,UAAyC,WAAW,CAAC,GAAG;IAExD,MAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IAExE,wCAAwC;IACxC,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI;QAAE,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;IAC7D,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,SAAS;QAAE,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;IACvE,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI;QAAE,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;IAE7D,IAAI,IAAI,CAAC,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE;QACjC,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,KAAK,EAAE;YAClC,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;SACnC;QAED,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;KAC3B;IAED,qCAAqC;IACrC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,OAAO,EACH,SAAS,EACT,MAAM,EACN,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,UAAU,EACV,kBAAkB;AAClB,8BAA8B;AAC9B,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,GAC5B,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,mBAAmB;AACnB,8BAA8B;AAC9B,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,GAC/B,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/package.json b/node_modules/entities/lib/esm/package.json deleted file mode 100644 index 089153b..0000000 --- a/node_modules/entities/lib/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} diff --git a/node_modules/entities/lib/generated/decode-data-html.d.ts b/node_modules/entities/lib/generated/decode-data-html.d.ts deleted file mode 100644 index 9cfc4f4..0000000 --- a/node_modules/entities/lib/generated/decode-data-html.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const _default: Uint16Array; -export default _default; -//# sourceMappingURL=decode-data-html.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-html.d.ts.map b/node_modules/entities/lib/generated/decode-data-html.d.ts.map deleted file mode 100644 index 6d4d64b..0000000 --- a/node_modules/entities/lib/generated/decode-data-html.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-html.js b/node_modules/entities/lib/generated/decode-data-html.js deleted file mode 100644 index 295cd9b..0000000 --- a/node_modules/entities/lib/generated/decode-data-html.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -// Generated using scripts/write-decode-map.ts -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = new Uint16Array( -// prettier-ignore -"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c" - .split("") - .map(function (c) { return c.charCodeAt(0); })); -//# sourceMappingURL=decode-data-html.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-html.js.map b/node_modules/entities/lib/generated/decode-data-html.js.map deleted file mode 100644 index 5732f6f..0000000 --- a/node_modules/entities/lib/generated/decode-data-html.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAE9C,kBAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,268CAA268C;KACt68C,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-xml.d.ts b/node_modules/entities/lib/generated/decode-data-xml.d.ts deleted file mode 100644 index 4a3f533..0000000 --- a/node_modules/entities/lib/generated/decode-data-xml.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const _default: Uint16Array; -export default _default; -//# sourceMappingURL=decode-data-xml.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-xml.d.ts.map b/node_modules/entities/lib/generated/decode-data-xml.d.ts.map deleted file mode 100644 index be2a9a2..0000000 --- a/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-xml.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-xml.js b/node_modules/entities/lib/generated/decode-data-xml.js deleted file mode 100644 index 8fee783..0000000 --- a/node_modules/entities/lib/generated/decode-data-xml.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -// Generated using scripts/write-decode-map.ts -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = new Uint16Array( -// prettier-ignore -"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022" - .split("") - .map(function (c) { return c.charCodeAt(0); })); -//# sourceMappingURL=decode-data-xml.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-xml.js.map b/node_modules/entities/lib/generated/decode-data-xml.js.map deleted file mode 100644 index 569fef4..0000000 --- a/node_modules/entities/lib/generated/decode-data-xml.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-xml.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAE9C,kBAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,uFAAuF;KAClF,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/encode-html.d.ts b/node_modules/entities/lib/generated/encode-html.d.ts deleted file mode 100644 index 0704827..0000000 --- a/node_modules/entities/lib/generated/encode-html.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -type EncodeTrieNode = string | { - v?: string; - n: number | Map<number, EncodeTrieNode>; - o?: string; -}; -declare const _default: Map<number, EncodeTrieNode>; -export default _default; -//# sourceMappingURL=encode-html.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/encode-html.d.ts.map b/node_modules/entities/lib/generated/encode-html.d.ts.map deleted file mode 100644 index e665a6e..0000000 --- a/node_modules/entities/lib/generated/encode-html.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GACb,MAAM,GACN;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;;AAY1E,wBAAo+tB"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/encode-html.js b/node_modules/entities/lib/generated/encode-html.js deleted file mode 100644 index 071e853..0000000 --- a/node_modules/entities/lib/generated/encode-html.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -// Generated using scripts/write-encode-map.ts -Object.defineProperty(exports, "__esModule", { value: true }); -function restoreDiff(arr) { - for (var i = 1; i < arr.length; i++) { - arr[i][0] += arr[i - 1][0] + 1; - } - return arr; -} -// prettier-ignore -exports.default = new Map(/* #__PURE__ */ restoreDiff([[9, " "], [0, " "], [22, "!"], [0, """], [0, "#"], [0, "$"], [0, "%"], [0, "&"], [0, "'"], [0, "("], [0, ")"], [0, "*"], [0, "+"], [0, ","], [1, "."], [0, "/"], [10, ":"], [0, ";"], [0, { v: "<", n: 8402, o: "<⃒" }], [0, { v: "=", n: 8421, o: "=⃥" }], [0, { v: ">", n: 8402, o: ">⃒" }], [0, "?"], [0, "@"], [26, "["], [0, "\"], [0, "]"], [0, "^"], [0, "_"], [0, "`"], [5, { n: 106, o: "fj" }], [20, "{"], [0, "|"], [0, "}"], [34, " "], [0, "¡"], [0, "¢"], [0, "£"], [0, "¤"], [0, "¥"], [0, "¦"], [0, "§"], [0, "¨"], [0, "©"], [0, "ª"], [0, "«"], [0, "¬"], [0, "­"], [0, "®"], [0, "¯"], [0, "°"], [0, "±"], [0, "²"], [0, "³"], [0, "´"], [0, "µ"], [0, "¶"], [0, "·"], [0, "¸"], [0, "¹"], [0, "º"], [0, "»"], [0, "¼"], [0, "½"], [0, "¾"], [0, "¿"], [0, "À"], [0, "Á"], [0, "Â"], [0, "Ã"], [0, "Ä"], [0, "Å"], [0, "Æ"], [0, "Ç"], [0, "È"], [0, "É"], [0, "Ê"], [0, "Ë"], [0, "Ì"], [0, "Í"], [0, "Î"], [0, "Ï"], [0, "Ð"], [0, "Ñ"], [0, "Ò"], [0, "Ó"], [0, "Ô"], [0, "Õ"], [0, "Ö"], [0, "×"], [0, "Ø"], [0, "Ù"], [0, "Ú"], [0, "Û"], [0, "Ü"], [0, "Ý"], [0, "Þ"], [0, "ß"], [0, "à"], [0, "á"], [0, "â"], [0, "ã"], [0, "ä"], [0, "å"], [0, "æ"], [0, "ç"], [0, "è"], [0, "é"], [0, "ê"], [0, "ë"], [0, "ì"], [0, "í"], [0, "î"], [0, "ï"], [0, "ð"], [0, "ñ"], [0, "ò"], [0, "ó"], [0, "ô"], [0, "õ"], [0, "ö"], [0, "÷"], [0, "ø"], [0, "ù"], [0, "ú"], [0, "û"], [0, "ü"], [0, "ý"], [0, "þ"], [0, "ÿ"], [0, "Ā"], [0, "ā"], [0, "Ă"], [0, "ă"], [0, "Ą"], [0, "ą"], [0, "Ć"], [0, "ć"], [0, "Ĉ"], [0, "ĉ"], [0, "Ċ"], [0, "ċ"], [0, "Č"], [0, "č"], [0, "Ď"], [0, "ď"], [0, "Đ"], [0, "đ"], [0, "Ē"], [0, "ē"], [2, "Ė"], [0, "ė"], [0, "Ę"], [0, "ę"], [0, "Ě"], [0, "ě"], [0, "Ĝ"], [0, "ĝ"], [0, "Ğ"], [0, "ğ"], [0, "Ġ"], [0, "ġ"], [0, "Ģ"], [1, "Ĥ"], [0, "ĥ"], [0, "Ħ"], [0, "ħ"], [0, "Ĩ"], [0, "ĩ"], [0, "Ī"], [0, "ī"], [2, "Į"], [0, "į"], [0, "İ"], [0, "ı"], [0, "IJ"], [0, "ij"], [0, "Ĵ"], [0, "ĵ"], [0, "Ķ"], [0, "ķ"], [0, "ĸ"], [0, "Ĺ"], [0, "ĺ"], [0, "Ļ"], [0, "ļ"], [0, "Ľ"], [0, "ľ"], [0, "Ŀ"], [0, "ŀ"], [0, "Ł"], [0, "ł"], [0, "Ń"], [0, "ń"], [0, "Ņ"], [0, "ņ"], [0, "Ň"], [0, "ň"], [0, "ʼn"], [0, "Ŋ"], [0, "ŋ"], [0, "Ō"], [0, "ō"], [2, "Ő"], [0, "ő"], [0, "Œ"], [0, "œ"], [0, "Ŕ"], [0, "ŕ"], [0, "Ŗ"], [0, "ŗ"], [0, "Ř"], [0, "ř"], [0, "Ś"], [0, "ś"], [0, "Ŝ"], [0, "ŝ"], [0, "Ş"], [0, "ş"], [0, "Š"], [0, "š"], [0, "Ţ"], [0, "ţ"], [0, "Ť"], [0, "ť"], [0, "Ŧ"], [0, "ŧ"], [0, "Ũ"], [0, "ũ"], [0, "Ū"], [0, "ū"], [0, "Ŭ"], [0, "ŭ"], [0, "Ů"], [0, "ů"], [0, "Ű"], [0, "ű"], [0, "Ų"], [0, "ų"], [0, "Ŵ"], [0, "ŵ"], [0, "Ŷ"], [0, "ŷ"], [0, "Ÿ"], [0, "Ź"], [0, "ź"], [0, "Ż"], [0, "ż"], [0, "Ž"], [0, "ž"], [19, "ƒ"], [34, "Ƶ"], [63, "ǵ"], [65, "ȷ"], [142, "ˆ"], [0, "ˇ"], [16, "˘"], [0, "˙"], [0, "˚"], [0, "˛"], [0, "˜"], [0, "˝"], [51, "̑"], [127, "Α"], [0, "Β"], [0, "Γ"], [0, "Δ"], [0, "Ε"], [0, "Ζ"], [0, "Η"], [0, "Θ"], [0, "Ι"], [0, "Κ"], [0, "Λ"], [0, "Μ"], [0, "Ν"], [0, "Ξ"], [0, "Ο"], [0, "Π"], [0, "Ρ"], [1, "Σ"], [0, "Τ"], [0, "Υ"], [0, "Φ"], [0, "Χ"], [0, "Ψ"], [0, "Ω"], [7, "α"], [0, "β"], [0, "γ"], [0, "δ"], [0, "ε"], [0, "ζ"], [0, "η"], [0, "θ"], [0, "ι"], [0, "κ"], [0, "λ"], [0, "μ"], [0, "ν"], [0, "ξ"], [0, "ο"], [0, "π"], [0, "ρ"], [0, "ς"], [0, "σ"], [0, "τ"], [0, "υ"], [0, "φ"], [0, "χ"], [0, "ψ"], [0, "ω"], [7, "ϑ"], [0, "ϒ"], [2, "ϕ"], [0, "ϖ"], [5, "Ϝ"], [0, "ϝ"], [18, "ϰ"], [0, "ϱ"], [3, "ϵ"], [0, "϶"], [10, "Ё"], [0, "Ђ"], [0, "Ѓ"], [0, "Є"], [0, "Ѕ"], [0, "І"], [0, "Ї"], [0, "Ј"], [0, "Љ"], [0, "Њ"], [0, "Ћ"], [0, "Ќ"], [1, "Ў"], [0, "Џ"], [0, "А"], [0, "Б"], [0, "В"], [0, "Г"], [0, "Д"], [0, "Е"], [0, "Ж"], [0, "З"], [0, "И"], [0, "Й"], [0, "К"], [0, "Л"], [0, "М"], [0, "Н"], [0, "О"], [0, "П"], [0, "Р"], [0, "С"], [0, "Т"], [0, "У"], [0, "Ф"], [0, "Х"], [0, "Ц"], [0, "Ч"], [0, "Ш"], [0, "Щ"], [0, "Ъ"], [0, "Ы"], [0, "Ь"], [0, "Э"], [0, "Ю"], [0, "Я"], [0, "а"], [0, "б"], [0, "в"], [0, "г"], [0, "д"], [0, "е"], [0, "ж"], [0, "з"], [0, "и"], [0, "й"], [0, "к"], [0, "л"], [0, "м"], [0, "н"], [0, "о"], [0, "п"], [0, "р"], [0, "с"], [0, "т"], [0, "у"], [0, "ф"], [0, "х"], [0, "ц"], [0, "ч"], [0, "ш"], [0, "щ"], [0, "ъ"], [0, "ы"], [0, "ь"], [0, "э"], [0, "ю"], [0, "я"], [1, "ё"], [0, "ђ"], [0, "ѓ"], [0, "є"], [0, "ѕ"], [0, "і"], [0, "ї"], [0, "ј"], [0, "љ"], [0, "њ"], [0, "ћ"], [0, "ќ"], [1, "ў"], [0, "џ"], [7074, " "], [0, " "], [0, " "], [0, " "], [1, " "], [0, " "], [0, " "], [0, " "], [0, "​"], [0, "‌"], [0, "‍"], [0, "‎"], [0, "‏"], [0, "‐"], [2, "–"], [0, "—"], [0, "―"], [0, "‖"], [1, "‘"], [0, "’"], [0, "‚"], [1, "“"], [0, "”"], [0, "„"], [1, "†"], [0, "‡"], [0, "•"], [2, "‥"], [0, "…"], [9, "‰"], [0, "‱"], [0, "′"], [0, "″"], [0, "‴"], [0, "‵"], [3, "‹"], [0, "›"], [3, "‾"], [2, "⁁"], [1, "⁃"], [0, "⁄"], [10, "⁏"], [7, "⁗"], [7, { v: " ", n: 8202, o: "  " }], [0, "⁠"], [0, "⁡"], [0, "⁢"], [0, "⁣"], [72, "€"], [46, "⃛"], [0, "⃜"], [37, "ℂ"], [2, "℅"], [4, "ℊ"], [0, "ℋ"], [0, "ℌ"], [0, "ℍ"], [0, "ℎ"], [0, "ℏ"], [0, "ℐ"], [0, "ℑ"], [0, "ℒ"], [0, "ℓ"], [1, "ℕ"], [0, "№"], [0, "℗"], [0, "℘"], [0, "ℙ"], [0, "ℚ"], [0, "ℛ"], [0, "ℜ"], [0, "ℝ"], [0, "℞"], [3, "™"], [1, "ℤ"], [2, "℧"], [0, "ℨ"], [0, "℩"], [2, "ℬ"], [0, "ℭ"], [1, "ℯ"], [0, "ℰ"], [0, "ℱ"], [1, "ℳ"], [0, "ℴ"], [0, "ℵ"], [0, "ℶ"], [0, "ℷ"], [0, "ℸ"], [12, "ⅅ"], [0, "ⅆ"], [0, "ⅇ"], [0, "ⅈ"], [10, "⅓"], [0, "⅔"], [0, "⅕"], [0, "⅖"], [0, "⅗"], [0, "⅘"], [0, "⅙"], [0, "⅚"], [0, "⅛"], [0, "⅜"], [0, "⅝"], [0, "⅞"], [49, "←"], [0, "↑"], [0, "→"], [0, "↓"], [0, "↔"], [0, "↕"], [0, "↖"], [0, "↗"], [0, "↘"], [0, "↙"], [0, "↚"], [0, "↛"], [1, { v: "↝", n: 824, o: "↝̸" }], [0, "↞"], [0, "↟"], [0, "↠"], [0, "↡"], [0, "↢"], [0, "↣"], [0, "↤"], [0, "↥"], [0, "↦"], [0, "↧"], [1, "↩"], [0, "↪"], [0, "↫"], [0, "↬"], [0, "↭"], [0, "↮"], [1, "↰"], [0, "↱"], [0, "↲"], [0, "↳"], [1, "↵"], [0, "↶"], [0, "↷"], [2, "↺"], [0, "↻"], [0, "↼"], [0, "↽"], [0, "↾"], [0, "↿"], [0, "⇀"], [0, "⇁"], [0, "⇂"], [0, "⇃"], [0, "⇄"], [0, "⇅"], [0, "⇆"], [0, "⇇"], [0, "⇈"], [0, "⇉"], [0, "⇊"], [0, "⇋"], [0, "⇌"], [0, "⇍"], [0, "⇎"], [0, "⇏"], [0, "⇐"], [0, "⇑"], [0, "⇒"], [0, "⇓"], [0, "⇔"], [0, "⇕"], [0, "⇖"], [0, "⇗"], [0, "⇘"], [0, "⇙"], [0, "⇚"], [0, "⇛"], [1, "⇝"], [6, "⇤"], [0, "⇥"], [15, "⇵"], [7, "⇽"], [0, "⇾"], [0, "⇿"], [0, "∀"], [0, "∁"], [0, { v: "∂", n: 824, o: "∂̸" }], [0, "∃"], [0, "∄"], [0, "∅"], [1, "∇"], [0, "∈"], [0, "∉"], [1, "∋"], [0, "∌"], [2, "∏"], [0, "∐"], [0, "∑"], [0, "−"], [0, "∓"], [0, "∔"], [1, "∖"], [0, "∗"], [0, "∘"], [1, "√"], [2, "∝"], [0, "∞"], [0, "∟"], [0, { v: "∠", n: 8402, o: "∠⃒" }], [0, "∡"], [0, "∢"], [0, "∣"], [0, "∤"], [0, "∥"], [0, "∦"], [0, "∧"], [0, "∨"], [0, { v: "∩", n: 65024, o: "∩︀" }], [0, { v: "∪", n: 65024, o: "∪︀" }], [0, "∫"], [0, "∬"], [0, "∭"], [0, "∮"], [0, "∯"], [0, "∰"], [0, "∱"], [0, "∲"], [0, "∳"], [0, "∴"], [0, "∵"], [0, "∶"], [0, "∷"], [0, "∸"], [1, "∺"], [0, "∻"], [0, { v: "∼", n: 8402, o: "∼⃒" }], [0, { v: "∽", n: 817, o: "∽̱" }], [0, { v: "∾", n: 819, o: "∾̳" }], [0, "∿"], [0, "≀"], [0, "≁"], [0, { v: "≂", n: 824, o: "≂̸" }], [0, "≃"], [0, "≄"], [0, "≅"], [0, "≆"], [0, "≇"], [0, "≈"], [0, "≉"], [0, "≊"], [0, { v: "≋", n: 824, o: "≋̸" }], [0, "≌"], [0, { v: "≍", n: 8402, o: "≍⃒" }], [0, { v: "≎", n: 824, o: "≎̸" }], [0, { v: "≏", n: 824, o: "≏̸" }], [0, { v: "≐", n: 824, o: "≐̸" }], [0, "≑"], [0, "≒"], [0, "≓"], [0, "≔"], [0, "≕"], [0, "≖"], [0, "≗"], [1, "≙"], [0, "≚"], [1, "≜"], [2, "≟"], [0, "≠"], [0, { v: "≡", n: 8421, o: "≡⃥" }], [0, "≢"], [1, { v: "≤", n: 8402, o: "≤⃒" }], [0, { v: "≥", n: 8402, o: "≥⃒" }], [0, { v: "≦", n: 824, o: "≦̸" }], [0, { v: "≧", n: 824, o: "≧̸" }], [0, { v: "≨", n: 65024, o: "≨︀" }], [0, { v: "≩", n: 65024, o: "≩︀" }], [0, { v: "≪", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≪̸"], [7577, "≪⃒"]])) }], [0, { v: "≫", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≫̸"], [7577, "≫⃒"]])) }], [0, "≬"], [0, "≭"], [0, "≮"], [0, "≯"], [0, "≰"], [0, "≱"], [0, "≲"], [0, "≳"], [0, "≴"], [0, "≵"], [0, "≶"], [0, "≷"], [0, "≸"], [0, "≹"], [0, "≺"], [0, "≻"], [0, "≼"], [0, "≽"], [0, "≾"], [0, { v: "≿", n: 824, o: "≿̸" }], [0, "⊀"], [0, "⊁"], [0, { v: "⊂", n: 8402, o: "⊂⃒" }], [0, { v: "⊃", n: 8402, o: "⊃⃒" }], [0, "⊄"], [0, "⊅"], [0, "⊆"], [0, "⊇"], [0, "⊈"], [0, "⊉"], [0, { v: "⊊", n: 65024, o: "⊊︀" }], [0, { v: "⊋", n: 65024, o: "⊋︀" }], [1, "⊍"], [0, "⊎"], [0, { v: "⊏", n: 824, o: "⊏̸" }], [0, { v: "⊐", n: 824, o: "⊐̸" }], [0, "⊑"], [0, "⊒"], [0, { v: "⊓", n: 65024, o: "⊓︀" }], [0, { v: "⊔", n: 65024, o: "⊔︀" }], [0, "⊕"], [0, "⊖"], [0, "⊗"], [0, "⊘"], [0, "⊙"], [0, "⊚"], [0, "⊛"], [1, "⊝"], [0, "⊞"], [0, "⊟"], [0, "⊠"], [0, "⊡"], [0, "⊢"], [0, "⊣"], [0, "⊤"], [0, "⊥"], [1, "⊧"], [0, "⊨"], [0, "⊩"], [0, "⊪"], [0, "⊫"], [0, "⊬"], [0, "⊭"], [0, "⊮"], [0, "⊯"], [0, "⊰"], [1, "⊲"], [0, "⊳"], [0, { v: "⊴", n: 8402, o: "⊴⃒" }], [0, { v: "⊵", n: 8402, o: "⊵⃒" }], [0, "⊶"], [0, "⊷"], [0, "⊸"], [0, "⊹"], [0, "⊺"], [0, "⊻"], [1, "⊽"], [0, "⊾"], [0, "⊿"], [0, "⋀"], [0, "⋁"], [0, "⋂"], [0, "⋃"], [0, "⋄"], [0, "⋅"], [0, "⋆"], [0, "⋇"], [0, "⋈"], [0, "⋉"], [0, "⋊"], [0, "⋋"], [0, "⋌"], [0, "⋍"], [0, "⋎"], [0, "⋏"], [0, "⋐"], [0, "⋑"], [0, "⋒"], [0, "⋓"], [0, "⋔"], [0, "⋕"], [0, "⋖"], [0, "⋗"], [0, { v: "⋘", n: 824, o: "⋘̸" }], [0, { v: "⋙", n: 824, o: "⋙̸" }], [0, { v: "⋚", n: 65024, o: "⋚︀" }], [0, { v: "⋛", n: 65024, o: "⋛︀" }], [2, "⋞"], [0, "⋟"], [0, "⋠"], [0, "⋡"], [0, "⋢"], [0, "⋣"], [2, "⋦"], [0, "⋧"], [0, "⋨"], [0, "⋩"], [0, "⋪"], [0, "⋫"], [0, "⋬"], [0, "⋭"], [0, "⋮"], [0, "⋯"], [0, "⋰"], [0, "⋱"], [0, "⋲"], [0, "⋳"], [0, "⋴"], [0, { v: "⋵", n: 824, o: "⋵̸" }], [0, "⋶"], [0, "⋷"], [1, { v: "⋹", n: 824, o: "⋹̸" }], [0, "⋺"], [0, "⋻"], [0, "⋼"], [0, "⋽"], [0, "⋾"], [6, "⌅"], [0, "⌆"], [1, "⌈"], [0, "⌉"], [0, "⌊"], [0, "⌋"], [0, "⌌"], [0, "⌍"], [0, "⌎"], [0, "⌏"], [0, "⌐"], [1, "⌒"], [0, "⌓"], [1, "⌕"], [0, "⌖"], [5, "⌜"], [0, "⌝"], [0, "⌞"], [0, "⌟"], [2, "⌢"], [0, "⌣"], [9, "⌭"], [0, "⌮"], [7, "⌶"], [6, "⌽"], [1, "⌿"], [60, "⍼"], [51, "⎰"], [0, "⎱"], [2, "⎴"], [0, "⎵"], [0, "⎶"], [37, "⏜"], [0, "⏝"], [0, "⏞"], [0, "⏟"], [2, "⏢"], [4, "⏧"], [59, "␣"], [164, "Ⓢ"], [55, "─"], [1, "│"], [9, "┌"], [3, "┐"], [3, "└"], [3, "┘"], [3, "├"], [7, "┤"], [7, "┬"], [7, "┴"], [7, "┼"], [19, "═"], [0, "║"], [0, "╒"], [0, "╓"], [0, "╔"], [0, "╕"], [0, "╖"], [0, "╗"], [0, "╘"], [0, "╙"], [0, "╚"], [0, "╛"], [0, "╜"], [0, "╝"], [0, "╞"], [0, "╟"], [0, "╠"], [0, "╡"], [0, "╢"], [0, "╣"], [0, "╤"], [0, "╥"], [0, "╦"], [0, "╧"], [0, "╨"], [0, "╩"], [0, "╪"], [0, "╫"], [0, "╬"], [19, "▀"], [3, "▄"], [3, "█"], [8, "░"], [0, "▒"], [0, "▓"], [13, "□"], [8, "▪"], [0, "▫"], [1, "▭"], [0, "▮"], [2, "▱"], [1, "△"], [0, "▴"], [0, "▵"], [2, "▸"], [0, "▹"], [3, "▽"], [0, "▾"], [0, "▿"], [2, "◂"], [0, "◃"], [6, "◊"], [0, "○"], [32, "◬"], [2, "◯"], [8, "◸"], [0, "◹"], [0, "◺"], [0, "◻"], [0, "◼"], [8, "★"], [0, "☆"], [7, "☎"], [49, "♀"], [1, "♂"], [29, "♠"], [2, "♣"], [1, "♥"], [0, "♦"], [3, "♪"], [2, "♭"], [0, "♮"], [0, "♯"], [163, "✓"], [3, "✗"], [8, "✠"], [21, "✶"], [33, "❘"], [25, "❲"], [0, "❳"], [84, "⟈"], [0, "⟉"], [28, "⟦"], [0, "⟧"], [0, "⟨"], [0, "⟩"], [0, "⟪"], [0, "⟫"], [0, "⟬"], [0, "⟭"], [7, "⟵"], [0, "⟶"], [0, "⟷"], [0, "⟸"], [0, "⟹"], [0, "⟺"], [1, "⟼"], [2, "⟿"], [258, "⤂"], [0, "⤃"], [0, "⤄"], [0, "⤅"], [6, "⤌"], [0, "⤍"], [0, "⤎"], [0, "⤏"], [0, "⤐"], [0, "⤑"], [0, "⤒"], [0, "⤓"], [2, "⤖"], [2, "⤙"], [0, "⤚"], [0, "⤛"], [0, "⤜"], [0, "⤝"], [0, "⤞"], [0, "⤟"], [0, "⤠"], [2, "⤣"], [0, "⤤"], [0, "⤥"], [0, "⤦"], [0, "⤧"], [0, "⤨"], [0, "⤩"], [0, "⤪"], [8, { v: "⤳", n: 824, o: "⤳̸" }], [1, "⤵"], [0, "⤶"], [0, "⤷"], [0, "⤸"], [0, "⤹"], [2, "⤼"], [0, "⤽"], [7, "⥅"], [2, "⥈"], [0, "⥉"], [0, "⥊"], [0, "⥋"], [2, "⥎"], [0, "⥏"], [0, "⥐"], [0, "⥑"], [0, "⥒"], [0, "⥓"], [0, "⥔"], [0, "⥕"], [0, "⥖"], [0, "⥗"], [0, "⥘"], [0, "⥙"], [0, "⥚"], [0, "⥛"], [0, "⥜"], [0, "⥝"], [0, "⥞"], [0, "⥟"], [0, "⥠"], [0, "⥡"], [0, "⥢"], [0, "⥣"], [0, "⥤"], [0, "⥥"], [0, "⥦"], [0, "⥧"], [0, "⥨"], [0, "⥩"], [0, "⥪"], [0, "⥫"], [0, "⥬"], [0, "⥭"], [0, "⥮"], [0, "⥯"], [0, "⥰"], [0, "⥱"], [0, "⥲"], [0, "⥳"], [0, "⥴"], [0, "⥵"], [0, "⥶"], [1, "⥸"], [0, "⥹"], [1, "⥻"], [0, "⥼"], [0, "⥽"], [0, "⥾"], [0, "⥿"], [5, "⦅"], [0, "⦆"], [4, "⦋"], [0, "⦌"], [0, "⦍"], [0, "⦎"], [0, "⦏"], [0, "⦐"], [0, "⦑"], [0, "⦒"], [0, "⦓"], [0, "⦔"], [0, "⦕"], [0, "⦖"], [3, "⦚"], [1, "⦜"], [0, "⦝"], [6, "⦤"], [0, "⦥"], [0, "⦦"], [0, "⦧"], [0, "⦨"], [0, "⦩"], [0, "⦪"], [0, "⦫"], [0, "⦬"], [0, "⦭"], [0, "⦮"], [0, "⦯"], [0, "⦰"], [0, "⦱"], [0, "⦲"], [0, "⦳"], [0, "⦴"], [0, "⦵"], [0, "⦶"], [0, "⦷"], [1, "⦹"], [1, "⦻"], [0, "⦼"], [1, "⦾"], [0, "⦿"], [0, "⧀"], [0, "⧁"], [0, "⧂"], [0, "⧃"], [0, "⧄"], [0, "⧅"], [3, "⧉"], [3, "⧍"], [0, "⧎"], [0, { v: "⧏", n: 824, o: "⧏̸" }], [0, { v: "⧐", n: 824, o: "⧐̸" }], [11, "⧜"], [0, "⧝"], [0, "⧞"], [4, "⧣"], [0, "⧤"], [0, "⧥"], [5, "⧫"], [8, "⧴"], [1, "⧶"], [9, "⨀"], [0, "⨁"], [0, "⨂"], [1, "⨄"], [1, "⨆"], [5, "⨌"], [0, "⨍"], [2, "⨐"], [0, "⨑"], [0, "⨒"], [0, "⨓"], [0, "⨔"], [0, "⨕"], [0, "⨖"], [0, "⨗"], [10, "⨢"], [0, "⨣"], [0, "⨤"], [0, "⨥"], [0, "⨦"], [0, "⨧"], [1, "⨩"], [0, "⨪"], [2, "⨭"], [0, "⨮"], [0, "⨯"], [0, "⨰"], [0, "⨱"], [1, "⨳"], [0, "⨴"], [0, "⨵"], [0, "⨶"], [0, "⨷"], [0, "⨸"], [0, "⨹"], [0, "⨺"], [0, "⨻"], [0, "⨼"], [2, "⨿"], [0, "⩀"], [1, "⩂"], [0, "⩃"], [0, "⩄"], [0, "⩅"], [0, "⩆"], [0, "⩇"], [0, "⩈"], [0, "⩉"], [0, "⩊"], [0, "⩋"], [0, "⩌"], [0, "⩍"], [2, "⩐"], [2, "⩓"], [0, "⩔"], [0, "⩕"], [0, "⩖"], [0, "⩗"], [0, "⩘"], [1, "⩚"], [0, "⩛"], [0, "⩜"], [0, "⩝"], [1, "⩟"], [6, "⩦"], [3, "⩪"], [2, { v: "⩭", n: 824, o: "⩭̸" }], [0, "⩮"], [0, "⩯"], [0, { v: "⩰", n: 824, o: "⩰̸" }], [0, "⩱"], [0, "⩲"], [0, "⩳"], [0, "⩴"], [0, "⩵"], [1, "⩷"], [0, "⩸"], [0, "⩹"], [0, "⩺"], [0, "⩻"], [0, "⩼"], [0, { v: "⩽", n: 824, o: "⩽̸" }], [0, { v: "⩾", n: 824, o: "⩾̸" }], [0, "⩿"], [0, "⪀"], [0, "⪁"], [0, "⪂"], [0, "⪃"], [0, "⪄"], [0, "⪅"], [0, "⪆"], [0, "⪇"], [0, "⪈"], [0, "⪉"], [0, "⪊"], [0, "⪋"], [0, "⪌"], [0, "⪍"], [0, "⪎"], [0, "⪏"], [0, "⪐"], [0, "⪑"], [0, "⪒"], [0, "⪓"], [0, "⪔"], [0, "⪕"], [0, "⪖"], [0, "⪗"], [0, "⪘"], [0, "⪙"], [0, "⪚"], [2, "⪝"], [0, "⪞"], [0, "⪟"], [0, "⪠"], [0, { v: "⪡", n: 824, o: "⪡̸" }], [0, { v: "⪢", n: 824, o: "⪢̸" }], [1, "⪤"], [0, "⪥"], [0, "⪦"], [0, "⪧"], [0, "⪨"], [0, "⪩"], [0, "⪪"], [0, "⪫"], [0, { v: "⪬", n: 65024, o: "⪬︀" }], [0, { v: "⪭", n: 65024, o: "⪭︀" }], [0, "⪮"], [0, { v: "⪯", n: 824, o: "⪯̸" }], [0, { v: "⪰", n: 824, o: "⪰̸" }], [2, "⪳"], [0, "⪴"], [0, "⪵"], [0, "⪶"], [0, "⪷"], [0, "⪸"], [0, "⪹"], [0, "⪺"], [0, "⪻"], [0, "⪼"], [0, "⪽"], [0, "⪾"], [0, "⪿"], [0, "⫀"], [0, "⫁"], [0, "⫂"], [0, "⫃"], [0, "⫄"], [0, { v: "⫅", n: 824, o: "⫅̸" }], [0, { v: "⫆", n: 824, o: "⫆̸" }], [0, "⫇"], [0, "⫈"], [2, { v: "⫋", n: 65024, o: "⫋︀" }], [0, { v: "⫌", n: 65024, o: "⫌︀" }], [2, "⫏"], [0, "⫐"], [0, "⫑"], [0, "⫒"], [0, "⫓"], [0, "⫔"], [0, "⫕"], [0, "⫖"], [0, "⫗"], [0, "⫘"], [0, "⫙"], [0, "⫚"], [0, "⫛"], [8, "⫤"], [1, "⫦"], [0, "⫧"], [0, "⫨"], [0, "⫩"], [1, "⫫"], [0, "⫬"], [0, "⫭"], [0, "⫮"], [0, "⫯"], [0, "⫰"], [0, "⫱"], [0, "⫲"], [0, "⫳"], [9, { v: "⫽", n: 8421, o: "⫽⃥" }], [44343, { n: new Map(/* #__PURE__ */ restoreDiff([[56476, "𝒜"], [1, "𝒞"], [0, "𝒟"], [2, "𝒢"], [2, "𝒥"], [0, "𝒦"], [2, "𝒩"], [0, "𝒪"], [0, "𝒫"], [0, "𝒬"], [1, "𝒮"], [0, "𝒯"], [0, "𝒰"], [0, "𝒱"], [0, "𝒲"], [0, "𝒳"], [0, "𝒴"], [0, "𝒵"], [0, "𝒶"], [0, "𝒷"], [0, "𝒸"], [0, "𝒹"], [1, "𝒻"], [1, "𝒽"], [0, "𝒾"], [0, "𝒿"], [0, "𝓀"], [0, "𝓁"], [0, "𝓂"], [0, "𝓃"], [1, "𝓅"], [0, "𝓆"], [0, "𝓇"], [0, "𝓈"], [0, "𝓉"], [0, "𝓊"], [0, "𝓋"], [0, "𝓌"], [0, "𝓍"], [0, "𝓎"], [0, "𝓏"], [52, "𝔄"], [0, "𝔅"], [1, "𝔇"], [0, "𝔈"], [0, "𝔉"], [0, "𝔊"], [2, "𝔍"], [0, "𝔎"], [0, "𝔏"], [0, "𝔐"], [0, "𝔑"], [0, "𝔒"], [0, "𝔓"], [0, "𝔔"], [1, "𝔖"], [0, "𝔗"], [0, "𝔘"], [0, "𝔙"], [0, "𝔚"], [0, "𝔛"], [0, "𝔜"], [1, "𝔞"], [0, "𝔟"], [0, "𝔠"], [0, "𝔡"], [0, "𝔢"], [0, "𝔣"], [0, "𝔤"], [0, "𝔥"], [0, "𝔦"], [0, "𝔧"], [0, "𝔨"], [0, "𝔩"], [0, "𝔪"], [0, "𝔫"], [0, "𝔬"], [0, "𝔭"], [0, "𝔮"], [0, "𝔯"], [0, "𝔰"], [0, "𝔱"], [0, "𝔲"], [0, "𝔳"], [0, "𝔴"], [0, "𝔵"], [0, "𝔶"], [0, "𝔷"], [0, "𝔸"], [0, "𝔹"], [1, "𝔻"], [0, "𝔼"], [0, "𝔽"], [0, "𝔾"], [1, "𝕀"], [0, "𝕁"], [0, "𝕂"], [0, "𝕃"], [0, "𝕄"], [1, "𝕆"], [3, "𝕊"], [0, "𝕋"], [0, "𝕌"], [0, "𝕍"], [0, "𝕎"], [0, "𝕏"], [0, "𝕐"], [1, "𝕒"], [0, "𝕓"], [0, "𝕔"], [0, "𝕕"], [0, "𝕖"], [0, "𝕗"], [0, "𝕘"], [0, "𝕙"], [0, "𝕚"], [0, "𝕛"], [0, "𝕜"], [0, "𝕝"], [0, "𝕞"], [0, "𝕟"], [0, "𝕠"], [0, "𝕡"], [0, "𝕢"], [0, "𝕣"], [0, "𝕤"], [0, "𝕥"], [0, "𝕦"], [0, "𝕧"], [0, "𝕨"], [0, "𝕩"], [0, "𝕪"], [0, "𝕫"]])) }], [8906, "ff"], [0, "fi"], [0, "fl"], [0, "ffi"], [0, "ffl"]])); -//# sourceMappingURL=encode-html.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/encode-html.js.map b/node_modules/entities/lib/generated/encode-html.js.map deleted file mode 100644 index 2d2d9be..0000000 --- a/node_modules/entities/lib/generated/encode-html.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAM9C,SAAS,WAAW,CAChB,GAAM;IAEN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;KAClC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,kBAAkB;AAClB,kBAAe,IAAI,GAAG,CAAwB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,GAAG,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,aAAa,CAAC,EAAC,CAAC,GAAG,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,IAAI,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,eAAe,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,cAAc,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,4BAA4B,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,GAAG,CAAgB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,GAAG,EAAC,QAAQ,CAAC,EAAC,CAAC,IAAI,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,GAAG,CAAgB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,GAAG,EAAC,QAAQ,CAAC,EAAC,CAAC,IAAI,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,eAAe,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,gBAAgB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,gBAAgB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,mBAAmB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,qBAAqB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,qBAAqB,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,sBAAsB,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,0BAA0B,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,GAAG,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,GAAG,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,qBAAqB,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,4BAA4B,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,GAAG,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,mBAAmB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,sBAAsB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,uBAAuB,EAAC,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,qBAAqB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,kBAAkB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,2BAA2B,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,iBAAiB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,iBAAiB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,iBAAiB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,KAAK,EAAC,EAAC,CAAC,EAAC,IAAI,GAAG,CAAgB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,KAAK,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,IAAI,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/index.d.ts b/node_modules/entities/lib/index.d.ts deleted file mode 100644 index dd4eb11..0000000 --- a/node_modules/entities/lib/index.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { DecodingMode } from "./decode.js"; -/** The level of entities to support. */ -export declare enum EntityLevel { - /** Support only XML entities. */ - XML = 0, - /** Support HTML entities, which are a superset of XML entities. */ - HTML = 1 -} -export declare enum EncodingMode { - /** - * The output is UTF-8 encoded. Only characters that need escaping within - * XML will be escaped. - */ - UTF8 = 0, - /** - * The output consists only of ASCII characters. Characters that need - * escaping within HTML, and characters that aren't ASCII characters will - * be escaped. - */ - ASCII = 1, - /** - * Encode all characters that have an equivalent entity, as well as all - * characters that are not ASCII characters. - */ - Extensive = 2, - /** - * Encode all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - Attribute = 3, - /** - * Encode all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - Text = 4 -} -export interface DecodingOptions { - /** - * The level of entities to support. - * @default {@link EntityLevel.XML} - */ - level?: EntityLevel; - /** - * Decoding mode. If `Legacy`, will support legacy entities not terminated - * with a semicolon (`;`). - * - * Always `Strict` for XML. For HTML, set this to `true` if you are parsing - * an attribute value. - * - * The deprecated `decodeStrict` function defaults this to `Strict`. - * - * @default {@link DecodingMode.Legacy} - */ - mode?: DecodingMode | undefined; -} -/** - * Decodes a string with entities. - * - * @param data String to decode. - * @param options Decoding options. - */ -export declare function decode(data: string, options?: DecodingOptions | EntityLevel): string; -/** - * Decodes a string with entities. Does not allow missing trailing semicolons for entities. - * - * @param data String to decode. - * @param options Decoding options. - * @deprecated Use `decode` with the `mode` set to `Strict`. - */ -export declare function decodeStrict(data: string, options?: DecodingOptions | EntityLevel): string; -/** - * Options for `encode`. - */ -export interface EncodingOptions { - /** - * The level of entities to support. - * @default {@link EntityLevel.XML} - */ - level?: EntityLevel; - /** - * Output format. - * @default {@link EncodingMode.Extensive} - */ - mode?: EncodingMode; -} -/** - * Encodes a string with entities. - * - * @param data String to encode. - * @param options Encoding options. - */ -export declare function encode(data: string, options?: EncodingOptions | EntityLevel): string; -export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; -export { encodeHTML, encodeNonAsciiHTML, encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js"; -export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/index.d.ts.map b/node_modules/entities/lib/index.d.ts.map deleted file mode 100644 index cfeef9f..0000000 --- a/node_modules/entities/lib/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,YAAY,EAAE,MAAM,aAAa,CAAC;AASlE,wCAAwC;AACxC,oBAAY,WAAW;IACnB,iCAAiC;IACjC,GAAG,IAAI;IACP,mEAAmE;IACnE,IAAI,IAAI;CACX;AAED,oBAAY,YAAY;IACpB;;;OAGG;IACH,IAAI,IAAA;IACJ;;;;OAIG;IACH,KAAK,IAAA;IACL;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,IAAI,IAAA;CACP;AAED,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CASR;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAKR;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAkBR;AAED,OAAO,EACH,SAAS,EACT,MAAM,EACN,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,UAAU,EACV,kBAAkB,EAElB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,GAC5B,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EAEnB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,GAC/B,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/index.js b/node_modules/entities/lib/index.js deleted file mode 100644 index f809b1b..0000000 --- a/node_modules/entities/lib/index.js +++ /dev/null @@ -1,126 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLAttribute = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.DecodingMode = exports.EntityDecoder = exports.encodeHTML5 = exports.encodeHTML4 = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = exports.EncodingMode = exports.EntityLevel = void 0; -var decode_js_1 = require("./decode.js"); -var encode_js_1 = require("./encode.js"); -var escape_js_1 = require("./escape.js"); -/** The level of entities to support. */ -var EntityLevel; -(function (EntityLevel) { - /** Support only XML entities. */ - EntityLevel[EntityLevel["XML"] = 0] = "XML"; - /** Support HTML entities, which are a superset of XML entities. */ - EntityLevel[EntityLevel["HTML"] = 1] = "HTML"; -})(EntityLevel = exports.EntityLevel || (exports.EntityLevel = {})); -var EncodingMode; -(function (EncodingMode) { - /** - * The output is UTF-8 encoded. Only characters that need escaping within - * XML will be escaped. - */ - EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8"; - /** - * The output consists only of ASCII characters. Characters that need - * escaping within HTML, and characters that aren't ASCII characters will - * be escaped. - */ - EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII"; - /** - * Encode all characters that have an equivalent entity, as well as all - * characters that are not ASCII characters. - */ - EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive"; - /** - * Encode all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute"; - /** - * Encode all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - EncodingMode[EncodingMode["Text"] = 4] = "Text"; -})(EncodingMode = exports.EncodingMode || (exports.EncodingMode = {})); -/** - * Decodes a string with entities. - * - * @param data String to decode. - * @param options Decoding options. - */ -function decode(data, options) { - if (options === void 0) { options = EntityLevel.XML; } - var level = typeof options === "number" ? options : options.level; - if (level === EntityLevel.HTML) { - var mode = typeof options === "object" ? options.mode : undefined; - return (0, decode_js_1.decodeHTML)(data, mode); - } - return (0, decode_js_1.decodeXML)(data); -} -exports.decode = decode; -/** - * Decodes a string with entities. Does not allow missing trailing semicolons for entities. - * - * @param data String to decode. - * @param options Decoding options. - * @deprecated Use `decode` with the `mode` set to `Strict`. - */ -function decodeStrict(data, options) { - var _a; - if (options === void 0) { options = EntityLevel.XML; } - var opts = typeof options === "number" ? { level: options } : options; - (_a = opts.mode) !== null && _a !== void 0 ? _a : (opts.mode = decode_js_1.DecodingMode.Strict); - return decode(data, opts); -} -exports.decodeStrict = decodeStrict; -/** - * Encodes a string with entities. - * - * @param data String to encode. - * @param options Encoding options. - */ -function encode(data, options) { - if (options === void 0) { options = EntityLevel.XML; } - var opts = typeof options === "number" ? { level: options } : options; - // Mode `UTF8` just escapes XML entities - if (opts.mode === EncodingMode.UTF8) - return (0, escape_js_1.escapeUTF8)(data); - if (opts.mode === EncodingMode.Attribute) - return (0, escape_js_1.escapeAttribute)(data); - if (opts.mode === EncodingMode.Text) - return (0, escape_js_1.escapeText)(data); - if (opts.level === EntityLevel.HTML) { - if (opts.mode === EncodingMode.ASCII) { - return (0, encode_js_1.encodeNonAsciiHTML)(data); - } - return (0, encode_js_1.encodeHTML)(data); - } - // ASCII and Extensive are equivalent - return (0, escape_js_1.encodeXML)(data); -} -exports.encode = encode; -var escape_js_2 = require("./escape.js"); -Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function () { return escape_js_2.encodeXML; } }); -Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } }); -Object.defineProperty(exports, "escapeUTF8", { enumerable: true, get: function () { return escape_js_2.escapeUTF8; } }); -Object.defineProperty(exports, "escapeAttribute", { enumerable: true, get: function () { return escape_js_2.escapeAttribute; } }); -Object.defineProperty(exports, "escapeText", { enumerable: true, get: function () { return escape_js_2.escapeText; } }); -var encode_js_2 = require("./encode.js"); -Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } }); -Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: true, get: function () { return encode_js_2.encodeNonAsciiHTML; } }); -// Legacy aliases (deprecated) -Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } }); -Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } }); -var decode_js_2 = require("./decode.js"); -Object.defineProperty(exports, "EntityDecoder", { enumerable: true, get: function () { return decode_js_2.EntityDecoder; } }); -Object.defineProperty(exports, "DecodingMode", { enumerable: true, get: function () { return decode_js_2.DecodingMode; } }); -Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function () { return decode_js_2.decodeXML; } }); -Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } }); -Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } }); -Object.defineProperty(exports, "decodeHTMLAttribute", { enumerable: true, get: function () { return decode_js_2.decodeHTMLAttribute; } }); -// Legacy aliases (deprecated) -Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } }); -Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } }); -Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } }); -Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } }); -Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function () { return decode_js_2.decodeXML; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/index.js.map b/node_modules/entities/lib/index.js.map deleted file mode 100644 index 2ef7751..0000000 --- a/node_modules/entities/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":";;;AAAA,yCAAkE;AAClE,yCAA6D;AAC7D,yCAKqB;AAErB,wCAAwC;AACxC,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,iCAAiC;IACjC,2CAAO,CAAA;IACP,mEAAmE;IACnE,6CAAQ,CAAA;AACZ,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAED,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACpB;;;OAGG;IACH,+CAAI,CAAA;IACJ;;;;OAIG;IACH,iDAAK,CAAA;IACL;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,+CAAI,CAAA;AACR,CAAC,EA3BW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QA2BvB;AAsBD;;;;;GAKG;AACH,SAAgB,MAAM,CAClB,IAAY,EACZ,OAAwD;IAAxD,wBAAA,EAAA,UAAyC,WAAW,CAAC,GAAG;IAExD,IAAM,KAAK,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAEpE,IAAI,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE;QAC5B,IAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QACpE,OAAO,IAAA,sBAAU,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACjC;IAED,OAAO,IAAA,qBAAS,EAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAZD,wBAYC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CACxB,IAAY,EACZ,OAAwD;;IAAxD,wBAAA,EAAA,UAAyC,WAAW,CAAC,GAAG;IAExD,IAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IACxE,MAAA,IAAI,CAAC,IAAI,oCAAT,IAAI,CAAC,IAAI,GAAK,wBAAY,CAAC,MAAM,EAAC;IAElC,OAAO,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC9B,CAAC;AARD,oCAQC;AAkBD;;;;;GAKG;AACH,SAAgB,MAAM,CAClB,IAAY,EACZ,OAAwD;IAAxD,wBAAA,EAAA,UAAyC,WAAW,CAAC,GAAG;IAExD,IAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IAExE,wCAAwC;IACxC,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI;QAAE,OAAO,IAAA,sBAAU,EAAC,IAAI,CAAC,CAAC;IAC7D,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,SAAS;QAAE,OAAO,IAAA,2BAAe,EAAC,IAAI,CAAC,CAAC;IACvE,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI;QAAE,OAAO,IAAA,sBAAU,EAAC,IAAI,CAAC,CAAC;IAE7D,IAAI,IAAI,CAAC,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE;QACjC,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,KAAK,EAAE;YAClC,OAAO,IAAA,8BAAkB,EAAC,IAAI,CAAC,CAAC;SACnC;QAED,OAAO,IAAA,sBAAU,EAAC,IAAI,CAAC,CAAC;KAC3B;IAED,qCAAqC;IACrC,OAAO,IAAA,qBAAS,EAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AArBD,wBAqBC;AAED,yCAMqB;AALjB,sGAAA,SAAS,OAAA;AACT,mGAAA,MAAM,OAAA;AACN,uGAAA,UAAU,OAAA;AACV,4GAAA,eAAe,OAAA;AACf,uGAAA,UAAU,OAAA;AAGd,yCAMqB;AALjB,uGAAA,UAAU,OAAA;AACV,+GAAA,kBAAkB,OAAA;AAClB,8BAA8B;AAC9B,wGAAA,UAAU,OAAe;AACzB,wGAAA,UAAU,OAAe;AAG7B,yCAaqB;AAZjB,0GAAA,aAAa,OAAA;AACb,yGAAA,YAAY,OAAA;AACZ,sGAAA,SAAS,OAAA;AACT,uGAAA,UAAU,OAAA;AACV,6GAAA,gBAAgB,OAAA;AAChB,gHAAA,mBAAmB,OAAA;AACnB,8BAA8B;AAC9B,wGAAA,UAAU,OAAe;AACzB,wGAAA,UAAU,OAAe;AACzB,8GAAA,gBAAgB,OAAqB;AACrC,8GAAA,gBAAgB,OAAqB;AACrC,4GAAA,SAAS,OAAmB"} \ No newline at end of file diff --git a/node_modules/entities/package.json b/node_modules/entities/package.json deleted file mode 100644 index 2e857f8..0000000 --- a/node_modules/entities/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "name": "entities", - "version": "4.5.0", - "description": "Encode & decode XML and HTML entities with ease & speed", - "author": "Felix Boehm <me@feedic.com>", - "funding": "https://github.com/fb55/entities?sponsor=1", - "sideEffects": false, - "keywords": [ - "entity", - "decoding", - "encoding", - "html", - "xml", - "html entities" - ], - "directories": { - "lib": "lib/" - }, - "main": "lib/index.js", - "types": "lib/index.d.ts", - "module": "lib/esm/index.js", - "exports": { - ".": { - "require": "./lib/index.js", - "import": "./lib/esm/index.js" - }, - "./lib/decode.js": { - "require": "./lib/decode.js", - "import": "./lib/esm/decode.js" - }, - "./lib/escape.js": { - "require": "./lib/escape.js", - "import": "./lib/esm/escape.js" - } - }, - "files": [ - "lib/**/*" - ], - "engines": { - "node": ">=0.12" - }, - "devDependencies": { - "@types/jest": "^28.1.8", - "@types/node": "^18.15.11", - "@typescript-eslint/eslint-plugin": "^5.58.0", - "@typescript-eslint/parser": "^5.58.0", - "eslint": "^8.38.0", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-node": "^11.1.0", - "jest": "^28.1.3", - "prettier": "^2.8.7", - "ts-jest": "^28.0.8", - "typedoc": "^0.24.1", - "typescript": "^5.0.4" - }, - "scripts": { - "test": "npm run test:jest && npm run lint", - "test:jest": "jest", - "lint": "npm run lint:es && npm run lint:prettier", - "lint:es": "eslint .", - "lint:prettier": "npm run prettier -- --check", - "format": "npm run format:es && npm run format:prettier", - "format:es": "npm run lint:es -- --fix", - "format:prettier": "npm run prettier -- --write", - "prettier": "prettier '**/*.{ts,md,json,yml}'", - "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc --sourceRoot https://raw.githubusercontent.com/fb55/entities/$(git rev-parse HEAD)/src/", - "build:esm": "npm run build:cjs -- --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json", - "build:docs": "typedoc --hideGenerator src/index.ts", - "build:trie": "ts-node scripts/write-decode-map.ts", - "build:encode-trie": "ts-node scripts/write-encode-map.ts", - "prepare": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/fb55/entities.git" - }, - "license": "BSD-2-Clause", - "jest": { - "preset": "ts-jest", - "coverageProvider": "v8", - "moduleNameMapper": { - "^(.*)\\.js$": "$1" - } - }, - "prettier": { - "tabWidth": 4, - "proseWrap": "always" - } -} diff --git a/node_modules/entities/readme.md b/node_modules/entities/readme.md deleted file mode 100644 index 731d90c..0000000 --- a/node_modules/entities/readme.md +++ /dev/null @@ -1,122 +0,0 @@ -# entities [![NPM version](https://img.shields.io/npm/v/entities.svg)](https://npmjs.org/package/entities) [![Downloads](https://img.shields.io/npm/dm/entities.svg)](https://npmjs.org/package/entities) [![Node.js CI](https://github.com/fb55/entities/actions/workflows/nodejs-test.yml/badge.svg)](https://github.com/fb55/entities/actions/workflows/nodejs-test.yml) - -Encode & decode HTML & XML entities with ease & speed. - -## Features - -- 😇 Tried and true: `entities` is used by many popular libraries; eg. - [`htmlparser2`](https://github.com/fb55/htmlparser2), the official - [AWS SDK](https://github.com/aws/aws-sdk-js-v3) and - [`commonmark`](https://github.com/commonmark/commonmark.js) use it to - process HTML entities. -- ⚡️ Fast: `entities` is the fastest library for decoding HTML entities (as - of April 2022); see [performance](#performance). -- 🎛 Configurable: Get an output tailored for your needs. You are fine with - UTF8? That'll save you some bytes. Prefer to only have ASCII characters? We - can do that as well! - -## How to… - -### …install `entities` - - npm install entities - -### …use `entities` - -```javascript -const entities = require("entities"); - -// Encoding -entities.escapeUTF8("& ü"); // "&#38; ü" -entities.encodeXML("& ü"); // "&#38; ü" -entities.encodeHTML("& ü"); // "&#38; ü" - -// Decoding -entities.decodeXML("asdf & ÿ ü '"); // "asdf & ÿ ü '" -entities.decodeHTML("asdf & ÿ ü '"); // "asdf & ÿ ü '" -``` - -## Performance - -This is how `entities` compares to other libraries on a very basic benchmark -(see `scripts/benchmark.ts`, for 10,000,000 iterations; **lower is better**): - -| Library | Version | `decode` perf | `encode` perf | `escape` perf | -| -------------- | ------- | ------------- | ------------- | ------------- | -| entities | `3.0.1` | 1.418s | 6.786s | 2.196s | -| html-entities | `2.3.2` | 2.530s | 6.829s | 2.415s | -| he | `1.2.0` | 5.800s | 24.237s | 3.624s | -| parse-entities | `3.0.0` | 9.660s | N/A | N/A | - ---- - -## FAQ - -> What methods should I actually use to encode my documents? - -If your target supports UTF-8, the `escapeUTF8` method is going to be your best -choice. Otherwise, use either `encodeHTML` or `encodeXML` based on whether -you're dealing with an HTML or an XML document. - -You can have a look at the options for the `encode` and `decode` methods to see -everything you can configure. - -> When should I use strict decoding? - -When strict decoding, entities not terminated with a semicolon will be ignored. -This is helpful for decoding entities in legacy environments. - -> Why should I use `entities` instead of alternative modules? - -As of April 2022, `entities` is a bit faster than other modules. Still, this is -not a very differentiated space and other modules can catch up. - -**More importantly**, you might already have `entities` in your dependency graph -(as a dependency of eg. `cheerio`, or `htmlparser2`), and including it directly -might not even increase your bundle size. The same is true for other entity -libraries, so have a look through your `node_modules` directory! - -> Does `entities` support tree shaking? - -Yes! `entities` ships as both a CommonJS and a ES module. Note that for best -results, you should not use the `encode` and `decode` functions, as they wrap -around a number of other functions, all of which will remain in the bundle. -Instead, use the functions that you need directly. - ---- - -## Acknowledgements - -This library wouldn't be possible without the work of these individuals. Thanks -to - -- [@mathiasbynens](https://github.com/mathiasbynens) for his explanations - about character encodings, and his library `he`, which was one of the - inspirations for `entities` -- [@inikulin](https://github.com/inikulin) for his work on optimized tries for - decoding HTML entities for the `parse5` project -- [@mdevils](https://github.com/mdevils) for taking on the challenge of - producing a quick entity library with his `html-entities` library. - `entities` would be quite a bit slower if there wasn't any competition. - Right now `entities` is on top, but we'll see how long that lasts! - ---- - -License: BSD-2-Clause - -## 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. - -## `entities` for enterprise - -Available as part of the Tidelift Subscription - -The maintainers of `entities` and thousands of other packages are working with -Tidelift to deliver commercial support and maintenance for the open source -dependencies you use to build your applications. Save time, reduce risk, and -improve code health, while paying the maintainers of the exact dependencies you -use. -[Learn more.](https://tidelift.com/subscription/pkg/npm-entities?utm_source=npm-entities&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/es-define-property/.eslintrc b/node_modules/es-define-property/.eslintrc deleted file mode 100644 index 46f3b12..0000000 --- a/node_modules/es-define-property/.eslintrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "new-cap": ["error", { - "capIsNewExceptions": [ - "GetIntrinsic", - ], - }], - }, -} diff --git a/node_modules/es-define-property/.github/FUNDING.yml b/node_modules/es-define-property/.github/FUNDING.yml deleted file mode 100644 index 4445451..0000000 --- a/node_modules/es-define-property/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/es-define-property -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-define-property/.nycrc b/node_modules/es-define-property/.nycrc deleted file mode 100644 index bdd626c..0000000 --- a/node_modules/es-define-property/.nycrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/es-define-property/CHANGELOG.md b/node_modules/es-define-property/CHANGELOG.md deleted file mode 100644 index 5f60cc0..0000000 --- a/node_modules/es-define-property/CHANGELOG.md +++ /dev/null @@ -1,29 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.1](https://github.com/ljharb/es-define-property/compare/v1.0.0...v1.0.1) - 2024-12-06 - -### Commits - -- [types] use shared tsconfig [`954a663`](https://github.com/ljharb/es-define-property/commit/954a66360326e508a0e5daa4b07493d58f5e110e) -- [actions] split out node 10-20, and 20+ [`3a8e84b`](https://github.com/ljharb/es-define-property/commit/3a8e84b23883f26ff37b3e82ff283834228e18c6) -- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/get-intrinsic`, `@types/tape`, `auto-changelog`, `gopd`, `tape` [`86ae27b`](https://github.com/ljharb/es-define-property/commit/86ae27bb8cc857b23885136fad9cbe965ae36612) -- [Refactor] avoid using `get-intrinsic` [`02480c0`](https://github.com/ljharb/es-define-property/commit/02480c0353ef6118965282977c3864aff53d98b1) -- [Tests] replace `aud` with `npm audit` [`f6093ff`](https://github.com/ljharb/es-define-property/commit/f6093ff74ab51c98015c2592cd393bd42478e773) -- [Tests] configure testling [`7139e66`](https://github.com/ljharb/es-define-property/commit/7139e66959247a56086d9977359caef27c6849e7) -- [Dev Deps] update `tape` [`b901b51`](https://github.com/ljharb/es-define-property/commit/b901b511a75e001a40ce1a59fef7d9ffcfc87482) -- [Tests] fix types in tests [`469d269`](https://github.com/ljharb/es-define-property/commit/469d269fd141b1e773ec053a9fa35843493583e0) -- [Dev Deps] add missing peer dep [`733acfb`](https://github.com/ljharb/es-define-property/commit/733acfb0c4c96edf337e470b89a25a5b3724c352) - -## v1.0.0 - 2024-02-12 - -### Commits - -- Initial implementation, tests, readme, types [`3e154e1`](https://github.com/ljharb/es-define-property/commit/3e154e11a2fee09127220f5e503bf2c0a31dd480) -- Initial commit [`07d98de`](https://github.com/ljharb/es-define-property/commit/07d98de34a4dc31ff5e83a37c0c3f49e0d85cd50) -- npm init [`c4eb634`](https://github.com/ljharb/es-define-property/commit/c4eb6348b0d3886aac36cef34ad2ee0665ea6f3e) -- Only apps should have lockfiles [`7af86ec`](https://github.com/ljharb/es-define-property/commit/7af86ec1d311ec0b17fdfe616a25f64276903856) diff --git a/node_modules/es-define-property/LICENSE b/node_modules/es-define-property/LICENSE deleted file mode 100644 index f82f389..0000000 --- a/node_modules/es-define-property/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Jordan Harband - -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/node_modules/es-define-property/README.md b/node_modules/es-define-property/README.md deleted file mode 100644 index 9b291bd..0000000 --- a/node_modules/es-define-property/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# es-define-property <sup>[![Version Badge][npm-version-svg]][package-url]</sup> - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -`Object.defineProperty`, but not IE 8's broken one. - -## Example - -```js -const assert = require('assert'); - -const $defineProperty = require('es-define-property'); - -if ($defineProperty) { - assert.equal($defineProperty, Object.defineProperty); -} else if (Object.defineProperty) { - assert.equal($defineProperty, false, 'this is IE 8'); -} else { - assert.equal($defineProperty, false, 'this is an ES3 engine'); -} -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -[package-url]: https://npmjs.org/package/es-define-property -[npm-version-svg]: https://versionbadg.es/ljharb/es-define-property.svg -[deps-svg]: https://david-dm.org/ljharb/es-define-property.svg -[deps-url]: https://david-dm.org/ljharb/es-define-property -[dev-deps-svg]: https://david-dm.org/ljharb/es-define-property/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/es-define-property#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/es-define-property.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/es-define-property.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/es-define-property.svg -[downloads-url]: https://npm-stat.com/charts.html?package=es-define-property -[codecov-image]: https://codecov.io/gh/ljharb/es-define-property/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/es-define-property/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-define-property -[actions-url]: https://github.com/ljharb/es-define-property/actions diff --git a/node_modules/es-define-property/index.d.ts b/node_modules/es-define-property/index.d.ts deleted file mode 100644 index 6012247..0000000 --- a/node_modules/es-define-property/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const defineProperty: false | typeof Object.defineProperty; - -export = defineProperty; \ No newline at end of file diff --git a/node_modules/es-define-property/index.js b/node_modules/es-define-property/index.js deleted file mode 100644 index e0a2925..0000000 --- a/node_modules/es-define-property/index.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -/** @type {import('.')} */ -var $defineProperty = Object.defineProperty || false; -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = false; - } -} - -module.exports = $defineProperty; diff --git a/node_modules/es-define-property/package.json b/node_modules/es-define-property/package.json deleted file mode 100644 index fbed187..0000000 --- a/node_modules/es-define-property/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "es-define-property", - "version": "1.0.1", - "description": "`Object.defineProperty`, but not IE 8's broken one.", - "main": "index.js", - "types": "./index.d.ts", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>= 10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/es-define-property.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "object", - "define", - "property", - "defineProperty", - "Object.defineProperty" - ], - "author": "Jordan Harband <ljharb@gmail.com>", - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/es-define-property/issues" - }, - "homepage": "https://github.com/ljharb/es-define-property#readme", - "devDependencies": { - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.2", - "@types/gopd": "^1.0.3", - "@types/tape": "^5.6.5", - "auto-changelog": "^2.5.0", - "encoding": "^0.1.13", - "eslint": "^8.8.0", - "evalmd": "^0.0.19", - "gopd": "^1.2.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "engines": { - "node": ">= 0.4" - }, - "testling": { - "files": "test/index.js" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } -} diff --git a/node_modules/es-define-property/test/index.js b/node_modules/es-define-property/test/index.js deleted file mode 100644 index b4b4688..0000000 --- a/node_modules/es-define-property/test/index.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -var $defineProperty = require('../'); - -var test = require('tape'); -var gOPD = require('gopd'); - -test('defineProperty: supported', { skip: !$defineProperty }, function (t) { - t.plan(4); - - t.equal(typeof $defineProperty, 'function', 'defineProperty is supported'); - if ($defineProperty && gOPD) { // this `if` check is just to shut TS up - /** @type {{ a: number, b?: number, c?: number }} */ - var o = { a: 1 }; - - $defineProperty(o, 'b', { enumerable: true, value: 2 }); - t.deepEqual( - gOPD(o, 'b'), - { - configurable: false, - enumerable: true, - value: 2, - writable: false - }, - 'property descriptor is as expected' - ); - - $defineProperty(o, 'c', { enumerable: false, value: 3, writable: true }); - t.deepEqual( - gOPD(o, 'c'), - { - configurable: false, - enumerable: false, - value: 3, - writable: true - }, - 'property descriptor is as expected' - ); - } - - t.equal($defineProperty, Object.defineProperty, 'defineProperty is Object.defineProperty'); - - t.end(); -}); - -test('defineProperty: not supported', { skip: !!$defineProperty }, function (t) { - t.notOk($defineProperty, 'defineProperty is not supported'); - - t.match( - typeof $defineProperty, - /^(?:undefined|boolean)$/, - '`typeof defineProperty` is `undefined` or `boolean`' - ); - - t.end(); -}); diff --git a/node_modules/es-define-property/tsconfig.json b/node_modules/es-define-property/tsconfig.json deleted file mode 100644 index 5a49992..0000000 --- a/node_modules/es-define-property/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "es2022", - }, - "exclude": [ - "coverage", - "test/list-exports" - ], -} diff --git a/node_modules/es-errors/.eslintrc b/node_modules/es-errors/.eslintrc deleted file mode 100644 index 3b5d9e9..0000000 --- a/node_modules/es-errors/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", -} diff --git a/node_modules/es-errors/.github/FUNDING.yml b/node_modules/es-errors/.github/FUNDING.yml deleted file mode 100644 index f1b8805..0000000 --- a/node_modules/es-errors/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/es-errors -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-errors/CHANGELOG.md b/node_modules/es-errors/CHANGELOG.md deleted file mode 100644 index 204a9e9..0000000 --- a/node_modules/es-errors/CHANGELOG.md +++ /dev/null @@ -1,40 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.3.0](https://github.com/ljharb/es-errors/compare/v1.2.1...v1.3.0) - 2024-02-05 - -### Commits - -- [New] add `EvalError` and `URIError` [`1927627`](https://github.com/ljharb/es-errors/commit/1927627ba68cb6c829d307231376c967db53acdf) - -## [v1.2.1](https://github.com/ljharb/es-errors/compare/v1.2.0...v1.2.1) - 2024-02-04 - -### Commits - -- [Fix] add missing `exports` entry [`5bb5f28`](https://github.com/ljharb/es-errors/commit/5bb5f280f98922701109d6ebb82eea2257cecc7e) - -## [v1.2.0](https://github.com/ljharb/es-errors/compare/v1.1.0...v1.2.0) - 2024-02-04 - -### Commits - -- [New] add `ReferenceError` [`6d8cf5b`](https://github.com/ljharb/es-errors/commit/6d8cf5bbb6f3f598d02cf6f30e468ba2caa8e143) - -## [v1.1.0](https://github.com/ljharb/es-errors/compare/v1.0.0...v1.1.0) - 2024-02-04 - -### Commits - -- [New] add base Error [`2983ab6`](https://github.com/ljharb/es-errors/commit/2983ab65f7bc5441276cb021dc3aa03c78881698) - -## v1.0.0 - 2024-02-03 - -### Commits - -- Initial implementation, tests, readme, type [`8f47631`](https://github.com/ljharb/es-errors/commit/8f476317e9ad76f40ad648081829b1a1a3a1288b) -- Initial commit [`ea5d099`](https://github.com/ljharb/es-errors/commit/ea5d099ef18e550509ab9e2be000526afd81c385) -- npm init [`6f5ebf9`](https://github.com/ljharb/es-errors/commit/6f5ebf9cead474dadd72b9e63dad315820a089ae) -- Only apps should have lockfiles [`e1a0aeb`](https://github.com/ljharb/es-errors/commit/e1a0aeb7b80f5cfc56be54d6b2100e915d47def8) -- [meta] add `sideEffects` flag [`a9c7d46`](https://github.com/ljharb/es-errors/commit/a9c7d460a492f1d8a241c836bc25a322a19cc043) diff --git a/node_modules/es-errors/LICENSE b/node_modules/es-errors/LICENSE deleted file mode 100644 index f82f389..0000000 --- a/node_modules/es-errors/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Jordan Harband - -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/node_modules/es-errors/README.md b/node_modules/es-errors/README.md deleted file mode 100644 index 8dbfacf..0000000 --- a/node_modules/es-errors/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# es-errors <sup>[![Version Badge][npm-version-svg]][package-url]</sup> - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -A simple cache for a few of the JS Error constructors. - -## Example - -```js -const assert = require('assert'); - -const Base = require('es-errors'); -const Eval = require('es-errors/eval'); -const Range = require('es-errors/range'); -const Ref = require('es-errors/ref'); -const Syntax = require('es-errors/syntax'); -const Type = require('es-errors/type'); -const URI = require('es-errors/uri'); - -assert.equal(Base, Error); -assert.equal(Eval, EvalError); -assert.equal(Range, RangeError); -assert.equal(Ref, ReferenceError); -assert.equal(Syntax, SyntaxError); -assert.equal(Type, TypeError); -assert.equal(URI, URIError); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -[package-url]: https://npmjs.org/package/es-errors -[npm-version-svg]: https://versionbadg.es/ljharb/es-errors.svg -[deps-svg]: https://david-dm.org/ljharb/es-errors.svg -[deps-url]: https://david-dm.org/ljharb/es-errors -[dev-deps-svg]: https://david-dm.org/ljharb/es-errors/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/es-errors#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/es-errors.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/es-errors.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/es-errors.svg -[downloads-url]: https://npm-stat.com/charts.html?package=es-errors -[codecov-image]: https://codecov.io/gh/ljharb/es-errors/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/es-errors/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-errors -[actions-url]: https://github.com/ljharb/es-errors/actions diff --git a/node_modules/es-errors/eval.d.ts b/node_modules/es-errors/eval.d.ts deleted file mode 100644 index e4210e0..0000000 --- a/node_modules/es-errors/eval.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const EvalError: EvalErrorConstructor; - -export = EvalError; diff --git a/node_modules/es-errors/eval.js b/node_modules/es-errors/eval.js deleted file mode 100644 index 725ccb6..0000000 --- a/node_modules/es-errors/eval.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./eval')} */ -module.exports = EvalError; diff --git a/node_modules/es-errors/index.d.ts b/node_modules/es-errors/index.d.ts deleted file mode 100644 index 69bdbc9..0000000 --- a/node_modules/es-errors/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const Error: ErrorConstructor; - -export = Error; diff --git a/node_modules/es-errors/index.js b/node_modules/es-errors/index.js deleted file mode 100644 index cc0c521..0000000 --- a/node_modules/es-errors/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('.')} */ -module.exports = Error; diff --git a/node_modules/es-errors/package.json b/node_modules/es-errors/package.json deleted file mode 100644 index ff8c2a5..0000000 --- a/node_modules/es-errors/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "es-errors", - "version": "1.3.0", - "description": "A simple cache for a few of the JS Error constructors.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./eval": "./eval.js", - "./range": "./range.js", - "./ref": "./ref.js", - "./syntax": "./syntax.js", - "./type": "./type.js", - "./uri": "./uri.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "nyc tape 'test/**/*.js'", - "posttest": "aud --production", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/es-errors.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "error", - "typeerror", - "syntaxerror", - "rangeerror" - ], - "author": "Jordan Harband <ljharb@gmail.com>", - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/es-errors/issues" - }, - "homepage": "https://github.com/ljharb/es-errors#readme", - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "@types/tape": "^5.6.4", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "eclint": "^2.8.1", - "eslint": "^8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.4", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/es-errors/range.d.ts b/node_modules/es-errors/range.d.ts deleted file mode 100644 index 3a12e86..0000000 --- a/node_modules/es-errors/range.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const RangeError: RangeErrorConstructor; - -export = RangeError; diff --git a/node_modules/es-errors/range.js b/node_modules/es-errors/range.js deleted file mode 100644 index 2044fe0..0000000 --- a/node_modules/es-errors/range.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./range')} */ -module.exports = RangeError; diff --git a/node_modules/es-errors/ref.d.ts b/node_modules/es-errors/ref.d.ts deleted file mode 100644 index a13107e..0000000 --- a/node_modules/es-errors/ref.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const ReferenceError: ReferenceErrorConstructor; - -export = ReferenceError; diff --git a/node_modules/es-errors/ref.js b/node_modules/es-errors/ref.js deleted file mode 100644 index d7c430f..0000000 --- a/node_modules/es-errors/ref.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./ref')} */ -module.exports = ReferenceError; diff --git a/node_modules/es-errors/syntax.d.ts b/node_modules/es-errors/syntax.d.ts deleted file mode 100644 index 6a0c53c..0000000 --- a/node_modules/es-errors/syntax.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const SyntaxError: SyntaxErrorConstructor; - -export = SyntaxError; diff --git a/node_modules/es-errors/syntax.js b/node_modules/es-errors/syntax.js deleted file mode 100644 index 5f5fdde..0000000 --- a/node_modules/es-errors/syntax.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./syntax')} */ -module.exports = SyntaxError; diff --git a/node_modules/es-errors/test/index.js b/node_modules/es-errors/test/index.js deleted file mode 100644 index 1ff0277..0000000 --- a/node_modules/es-errors/test/index.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var E = require('../'); -var R = require('../range'); -var Ref = require('../ref'); -var S = require('../syntax'); -var T = require('../type'); - -test('errors', function (t) { - t.equal(E, Error); - t.equal(R, RangeError); - t.equal(Ref, ReferenceError); - t.equal(S, SyntaxError); - t.equal(T, TypeError); - - t.end(); -}); diff --git a/node_modules/es-errors/tsconfig.json b/node_modules/es-errors/tsconfig.json deleted file mode 100644 index 99dfeb6..0000000 --- a/node_modules/es-errors/tsconfig.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - - /* Projects */ - - /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": ["types"], /* Specify multiple folders that act like `./node_modules/@types`. */ - "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - - /* JavaScript Support */ - "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ - "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ - - /* Emit */ - "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - "declarationMap": true, /* Create sourcemaps for d.ts files. */ - "noEmit": true, /* Disable emitting files from a compilation. */ - - /* Interop Constraints */ - "allowSyntheticDefaultImports": true, /* Allow `import x from y` when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - - /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ - - /* Completeness */ - // "skipLibCheck": true /* Skip type checking all .d.ts files. */ - }, - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/es-errors/type.d.ts b/node_modules/es-errors/type.d.ts deleted file mode 100644 index 576fb51..0000000 --- a/node_modules/es-errors/type.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const TypeError: TypeErrorConstructor - -export = TypeError; diff --git a/node_modules/es-errors/type.js b/node_modules/es-errors/type.js deleted file mode 100644 index 9769e44..0000000 --- a/node_modules/es-errors/type.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./type')} */ -module.exports = TypeError; diff --git a/node_modules/es-errors/uri.d.ts b/node_modules/es-errors/uri.d.ts deleted file mode 100644 index c3261c9..0000000 --- a/node_modules/es-errors/uri.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const URIError: URIErrorConstructor; - -export = URIError; diff --git a/node_modules/es-errors/uri.js b/node_modules/es-errors/uri.js deleted file mode 100644 index e9cd1c7..0000000 --- a/node_modules/es-errors/uri.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./uri')} */ -module.exports = URIError; diff --git a/node_modules/es-object-atoms/.eslintrc b/node_modules/es-object-atoms/.eslintrc deleted file mode 100644 index d90a1bc..0000000 --- a/node_modules/es-object-atoms/.eslintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "eqeqeq": ["error", "allow-null"], - "id-length": "off", - "new-cap": ["error", { - "capIsNewExceptions": [ - "RequireObjectCoercible", - "ToObject", - ], - }], - }, -} diff --git a/node_modules/es-object-atoms/.github/FUNDING.yml b/node_modules/es-object-atoms/.github/FUNDING.yml deleted file mode 100644 index 352bfda..0000000 --- a/node_modules/es-object-atoms/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/es-object -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-object-atoms/CHANGELOG.md b/node_modules/es-object-atoms/CHANGELOG.md deleted file mode 100644 index fdd2abe..0000000 --- a/node_modules/es-object-atoms/CHANGELOG.md +++ /dev/null @@ -1,37 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.1.1](https://github.com/ljharb/es-object-atoms/compare/v1.1.0...v1.1.1) - 2025-01-14 - -### Commits - -- [types] `ToObject`: improve types [`cfe8c8a`](https://github.com/ljharb/es-object-atoms/commit/cfe8c8a105c44820cb22e26f62d12ef0ad9715c8) - -## [v1.1.0](https://github.com/ljharb/es-object-atoms/compare/v1.0.1...v1.1.0) - 2025-01-14 - -### Commits - -- [New] add `isObject` [`51e4042`](https://github.com/ljharb/es-object-atoms/commit/51e4042df722eb3165f40dc5f4bf33d0197ecb07) - -## [v1.0.1](https://github.com/ljharb/es-object-atoms/compare/v1.0.0...v1.0.1) - 2025-01-13 - -### Commits - -- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `auto-changelog`, `tape` [`38ab9eb`](https://github.com/ljharb/es-object-atoms/commit/38ab9eb00b62c2f4668644f5e513d9b414ebd595) -- [types] improve types [`7d1beb8`](https://github.com/ljharb/es-object-atoms/commit/7d1beb887958b78b6a728a210a1c8370ab7e2aa1) -- [Tests] replace `aud` with `npm audit` [`25863ba`](https://github.com/ljharb/es-object-atoms/commit/25863baf99178f1d1ad33d1120498db28631907e) -- [Dev Deps] add missing peer dep [`c012309`](https://github.com/ljharb/es-object-atoms/commit/c0123091287e6132d6f4240496340c427433df28) - -## v1.0.0 - 2024-03-16 - -### Commits - -- Initial implementation, tests, readme, types [`f1499db`](https://github.com/ljharb/es-object-atoms/commit/f1499db7d3e1741e64979c61d645ab3137705e82) -- Initial commit [`99eedc7`](https://github.com/ljharb/es-object-atoms/commit/99eedc7b5fde38a50a28d3c8b724706e3e4c5f6a) -- [meta] rename repo [`fc851fa`](https://github.com/ljharb/es-object-atoms/commit/fc851fa70616d2d182aaf0bd02c2ed7084dea8fa) -- npm init [`b909377`](https://github.com/ljharb/es-object-atoms/commit/b909377c50049bd0ec575562d20b0f9ebae8947f) -- Only apps should have lockfiles [`7249edd`](https://github.com/ljharb/es-object-atoms/commit/7249edd2178c1b9ddfc66ffcc6d07fdf0d28efc1) diff --git a/node_modules/es-object-atoms/LICENSE b/node_modules/es-object-atoms/LICENSE deleted file mode 100644 index f82f389..0000000 --- a/node_modules/es-object-atoms/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Jordan Harband - -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/node_modules/es-object-atoms/README.md b/node_modules/es-object-atoms/README.md deleted file mode 100644 index 447695b..0000000 --- a/node_modules/es-object-atoms/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# es-object-atoms <sup>[![Version Badge][npm-version-svg]][package-url]</sup> - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -ES Object-related atoms: Object, ToObject, RequireObjectCoercible. - -## Example - -```js -const assert = require('assert'); - -const $Object = require('es-object-atoms'); -const isObject = require('es-object-atoms/isObject'); -const ToObject = require('es-object-atoms/ToObject'); -const RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); - -assert.equal($Object, Object); -assert.throws(() => ToObject(null), TypeError); -assert.throws(() => ToObject(undefined), TypeError); -assert.throws(() => RequireObjectCoercible(null), TypeError); -assert.throws(() => RequireObjectCoercible(undefined), TypeError); - -assert.equal(isObject(undefined), false); -assert.equal(isObject(null), false); -assert.equal(isObject({}), true); -assert.equal(isObject([]), true); -assert.equal(isObject(function () {}), true); - -assert.deepEqual(RequireObjectCoercible(true), true); -assert.deepEqual(ToObject(true), Object(true)); - -const obj = {}; -assert.equal(RequireObjectCoercible(obj), obj); -assert.equal(ToObject(obj), obj); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -[package-url]: https://npmjs.org/package/es-object-atoms -[npm-version-svg]: https://versionbadg.es/ljharb/es-object-atoms.svg -[deps-svg]: https://david-dm.org/ljharb/es-object-atoms.svg -[deps-url]: https://david-dm.org/ljharb/es-object-atoms -[dev-deps-svg]: https://david-dm.org/ljharb/es-object-atoms/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/es-object-atoms#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/es-object-atoms.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/es-object-atoms.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/es-object.svg -[downloads-url]: https://npm-stat.com/charts.html?package=es-object-atoms -[codecov-image]: https://codecov.io/gh/ljharb/es-object-atoms/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/es-object-atoms/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-object-atoms -[actions-url]: https://github.com/ljharb/es-object-atoms/actions diff --git a/node_modules/es-object-atoms/RequireObjectCoercible.d.ts b/node_modules/es-object-atoms/RequireObjectCoercible.d.ts deleted file mode 100644 index 7e26c45..0000000 --- a/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function RequireObjectCoercible<T extends {}>(value: T, optMessage?: string): T; - -export = RequireObjectCoercible; diff --git a/node_modules/es-object-atoms/RequireObjectCoercible.js b/node_modules/es-object-atoms/RequireObjectCoercible.js deleted file mode 100644 index 8e191c6..0000000 --- a/node_modules/es-object-atoms/RequireObjectCoercible.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var $TypeError = require('es-errors/type'); - -/** @type {import('./RequireObjectCoercible')} */ -module.exports = function RequireObjectCoercible(value) { - if (value == null) { - throw new $TypeError((arguments.length > 0 && arguments[1]) || ('Cannot call method on ' + value)); - } - return value; -}; diff --git a/node_modules/es-object-atoms/ToObject.d.ts b/node_modules/es-object-atoms/ToObject.d.ts deleted file mode 100644 index d6dd302..0000000 --- a/node_modules/es-object-atoms/ToObject.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare function ToObject<T extends object>(value: number): Number; -declare function ToObject<T extends object>(value: boolean): Boolean; -declare function ToObject<T extends object>(value: string): String; -declare function ToObject<T extends object>(value: bigint): BigInt; -declare function ToObject<T extends object>(value: T): T; - -export = ToObject; diff --git a/node_modules/es-object-atoms/ToObject.js b/node_modules/es-object-atoms/ToObject.js deleted file mode 100644 index 2b99a7d..0000000 --- a/node_modules/es-object-atoms/ToObject.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var $Object = require('./'); -var RequireObjectCoercible = require('./RequireObjectCoercible'); - -/** @type {import('./ToObject')} */ -module.exports = function ToObject(value) { - RequireObjectCoercible(value); - return $Object(value); -}; diff --git a/node_modules/es-object-atoms/index.d.ts b/node_modules/es-object-atoms/index.d.ts deleted file mode 100644 index 8bdbfc8..0000000 --- a/node_modules/es-object-atoms/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const Object: ObjectConstructor; - -export = Object; diff --git a/node_modules/es-object-atoms/index.js b/node_modules/es-object-atoms/index.js deleted file mode 100644 index 1d33cef..0000000 --- a/node_modules/es-object-atoms/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('.')} */ -module.exports = Object; diff --git a/node_modules/es-object-atoms/isObject.d.ts b/node_modules/es-object-atoms/isObject.d.ts deleted file mode 100644 index 43bee3b..0000000 --- a/node_modules/es-object-atoms/isObject.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function isObject(x: unknown): x is object; - -export = isObject; diff --git a/node_modules/es-object-atoms/isObject.js b/node_modules/es-object-atoms/isObject.js deleted file mode 100644 index ec49bf1..0000000 --- a/node_modules/es-object-atoms/isObject.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -/** @type {import('./isObject')} */ -module.exports = function isObject(x) { - return !!x && (typeof x === 'function' || typeof x === 'object'); -}; diff --git a/node_modules/es-object-atoms/package.json b/node_modules/es-object-atoms/package.json deleted file mode 100644 index f4cec71..0000000 --- a/node_modules/es-object-atoms/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "es-object-atoms", - "version": "1.1.1", - "description": "ES Object-related atoms: Object, ToObject, RequireObjectCoercible", - "main": "index.js", - "exports": { - ".": "./index.js", - "./RequireObjectCoercible": "./RequireObjectCoercible.js", - "./isObject": "./isObject.js", - "./ToObject": "./ToObject.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "nyc tape 'test/**/*.js'", - "posttest": "npx npm@\">= 10.2\" audit --production", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/es-object-atoms.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "object", - "toobject", - "coercible" - ], - "author": "Jordan Harband <ljharb@gmail.com>", - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/es-object-atoms/issues" - }, - "homepage": "https://github.com/ljharb/es-object-atoms#readme", - "dependencies": { - "es-errors": "^1.3.0" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.3", - "@types/tape": "^5.8.1", - "auto-changelog": "^2.5.0", - "eclint": "^2.8.1", - "encoding": "^0.1.13", - "eslint": "^8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/es-object-atoms/test/index.js b/node_modules/es-object-atoms/test/index.js deleted file mode 100644 index 430b705..0000000 --- a/node_modules/es-object-atoms/test/index.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var $Object = require('../'); -var isObject = require('../isObject'); -var ToObject = require('../ToObject'); -var RequireObjectCoercible = require('..//RequireObjectCoercible'); - -test('errors', function (t) { - t.equal($Object, Object); - // @ts-expect-error - t['throws'](function () { ToObject(null); }, TypeError); - // @ts-expect-error - t['throws'](function () { ToObject(undefined); }, TypeError); - // @ts-expect-error - t['throws'](function () { RequireObjectCoercible(null); }, TypeError); - // @ts-expect-error - t['throws'](function () { RequireObjectCoercible(undefined); }, TypeError); - - t.deepEqual(RequireObjectCoercible(true), true); - t.deepEqual(ToObject(true), Object(true)); - t.deepEqual(ToObject(42), Object(42)); - var f = function () {}; - t.equal(ToObject(f), f); - - t.equal(isObject(undefined), false); - t.equal(isObject(null), false); - t.equal(isObject({}), true); - t.equal(isObject([]), true); - t.equal(isObject(function () {}), true); - - var obj = {}; - t.equal(RequireObjectCoercible(obj), obj); - t.equal(ToObject(obj), obj); - - t.end(); -}); diff --git a/node_modules/es-object-atoms/tsconfig.json b/node_modules/es-object-atoms/tsconfig.json deleted file mode 100644 index 1f73cb7..0000000 --- a/node_modules/es-object-atoms/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "es5", - }, -} diff --git a/node_modules/esbuild/LICENSE.md b/node_modules/esbuild/LICENSE.md deleted file mode 100644 index 2027e8d..0000000 --- a/node_modules/esbuild/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Evan Wallace - -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/node_modules/esbuild/README.md b/node_modules/esbuild/README.md deleted file mode 100644 index 93863d1..0000000 --- a/node_modules/esbuild/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# esbuild - -This is a JavaScript bundler and minifier. See https://github.com/evanw/esbuild and the [JavaScript API documentation](https://esbuild.github.io/api/) for details. diff --git a/node_modules/esbuild/bin/esbuild b/node_modules/esbuild/bin/esbuild deleted file mode 100644 index 0113238..0000000 --- a/node_modules/esbuild/bin/esbuild +++ /dev/null @@ -1,222 +0,0 @@ -#!/usr/bin/env node -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); - -// lib/npm/node-platform.ts -var fs = require("fs"); -var os = require("os"); -var path = require("path"); -var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; -var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; -var packageDarwin_arm64 = "@esbuild/darwin-arm64"; -var packageDarwin_x64 = "@esbuild/darwin-x64"; -var knownWindowsPackages = { - "win32 arm64 LE": "@esbuild/win32-arm64", - "win32 ia32 LE": "@esbuild/win32-ia32", - "win32 x64 LE": "@esbuild/win32-x64" -}; -var knownUnixlikePackages = { - "aix ppc64 BE": "@esbuild/aix-ppc64", - "android arm64 LE": "@esbuild/android-arm64", - "darwin arm64 LE": "@esbuild/darwin-arm64", - "darwin x64 LE": "@esbuild/darwin-x64", - "freebsd arm64 LE": "@esbuild/freebsd-arm64", - "freebsd x64 LE": "@esbuild/freebsd-x64", - "linux arm LE": "@esbuild/linux-arm", - "linux arm64 LE": "@esbuild/linux-arm64", - "linux ia32 LE": "@esbuild/linux-ia32", - "linux mips64el LE": "@esbuild/linux-mips64el", - "linux ppc64 LE": "@esbuild/linux-ppc64", - "linux riscv64 LE": "@esbuild/linux-riscv64", - "linux s390x BE": "@esbuild/linux-s390x", - "linux x64 LE": "@esbuild/linux-x64", - "linux loong64 LE": "@esbuild/linux-loong64", - "netbsd arm64 LE": "@esbuild/netbsd-arm64", - "netbsd x64 LE": "@esbuild/netbsd-x64", - "openbsd arm64 LE": "@esbuild/openbsd-arm64", - "openbsd x64 LE": "@esbuild/openbsd-x64", - "sunos x64 LE": "@esbuild/sunos-x64" -}; -var knownWebAssemblyFallbackPackages = { - "android arm LE": "@esbuild/android-arm", - "android x64 LE": "@esbuild/android-x64" -}; -function pkgAndSubpathForCurrentPlatform() { - let pkg; - let subpath; - let isWASM2 = false; - let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; - if (platformKey in knownWindowsPackages) { - pkg = knownWindowsPackages[platformKey]; - subpath = "esbuild.exe"; - } else if (platformKey in knownUnixlikePackages) { - pkg = knownUnixlikePackages[platformKey]; - subpath = "bin/esbuild"; - } else if (platformKey in knownWebAssemblyFallbackPackages) { - pkg = knownWebAssemblyFallbackPackages[platformKey]; - subpath = "bin/esbuild"; - isWASM2 = true; - } else { - throw new Error(`Unsupported platform: ${platformKey}`); - } - return { pkg, subpath, isWASM: isWASM2 }; -} -function pkgForSomeOtherPlatform() { - const libMainJS = require.resolve("esbuild"); - const nodeModulesDirectory = path.dirname(path.dirname(path.dirname(libMainJS))); - if (path.basename(nodeModulesDirectory) === "node_modules") { - for (const unixKey in knownUnixlikePackages) { - try { - const pkg = knownUnixlikePackages[unixKey]; - if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; - } catch { - } - } - for (const windowsKey in knownWindowsPackages) { - try { - const pkg = knownWindowsPackages[windowsKey]; - if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; - } catch { - } - } - } - return null; -} -function downloadedBinPath(pkg, subpath) { - const esbuildLibDir = path.dirname(require.resolve("esbuild")); - return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); -} -function generateBinPath() { - if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { - if (!fs.existsSync(ESBUILD_BINARY_PATH)) { - console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); - } else { - return { binPath: ESBUILD_BINARY_PATH, isWASM: false }; - } - } - const { pkg, subpath, isWASM: isWASM2 } = pkgAndSubpathForCurrentPlatform(); - let binPath2; - try { - binPath2 = require.resolve(`${pkg}/${subpath}`); - } catch (e) { - binPath2 = downloadedBinPath(pkg, subpath); - if (!fs.existsSync(binPath2)) { - try { - require.resolve(pkg); - } catch { - const otherPkg = pkgForSomeOtherPlatform(); - if (otherPkg) { - let suggestions = ` -Specifically the "${otherPkg}" package is present but this platform -needs the "${pkg}" package instead. People often get into this -situation by installing esbuild on Windows or macOS and copying "node_modules" -into a Docker image that runs Linux, or by copying "node_modules" between -Windows and WSL environments. - -If you are installing with npm, you can try not copying the "node_modules" -directory when you copy the files over, and running "npm ci" or "npm install" -on the destination platform after the copy. Or you could consider using yarn -instead of npm which has built-in support for installing a package on multiple -platforms simultaneously. - -If you are installing with yarn, you can try listing both this platform and the -other platform in your ".yarnrc.yml" file using the "supportedArchitectures" -feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures -Keep in mind that this means multiple copies of esbuild will be present. -`; - if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) { - suggestions = ` -Specifically the "${otherPkg}" package is present but this platform -needs the "${pkg}" package instead. People often get into this -situation by installing esbuild with npm running inside of Rosetta 2 and then -trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta -2 is Apple's on-the-fly x86_64-to-arm64 translation service). - -If you are installing with npm, you can try ensuring that both npm and node are -not running under Rosetta 2 and then reinstalling esbuild. This likely involves -changing how you installed npm and/or node. For example, installing node with -the universal installer here should work: https://nodejs.org/en/download/. Or -you could consider using yarn instead of npm which has built-in support for -installing a package on multiple platforms simultaneously. - -If you are installing with yarn, you can try listing both "arm64" and "x64" -in your ".yarnrc.yml" file using the "supportedArchitectures" feature: -https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures -Keep in mind that this means multiple copies of esbuild will be present. -`; - } - throw new Error(` -You installed esbuild for another platform than the one you're currently using. -This won't work because esbuild is written with native code and needs to -install a platform-specific binary executable. -${suggestions} -Another alternative is to use the "esbuild-wasm" package instead, which works -the same way on all platforms. But it comes with a heavy performance cost and -can sometimes be 10x slower than the "esbuild" package, so you may also not -want to do that. -`); - } - throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild. - -If you are installing esbuild with npm, make sure that you don't specify the -"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature -of "package.json" is used by esbuild to install the correct binary executable -for your current platform.`); - } - throw e; - } - } - if (/\.zip\//.test(binPath2)) { - let pnpapi; - try { - pnpapi = require("pnpapi"); - } catch (e) { - } - if (pnpapi) { - const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation; - const binTargetPath = path.join( - root, - "node_modules", - ".cache", - "esbuild", - `pnpapi-${pkg.replace("/", "-")}-${"0.24.2"}-${path.basename(subpath)}` - ); - if (!fs.existsSync(binTargetPath)) { - fs.mkdirSync(path.dirname(binTargetPath), { recursive: true }); - fs.copyFileSync(binPath2, binTargetPath); - fs.chmodSync(binTargetPath, 493); - } - return { binPath: binTargetPath, isWASM: isWASM2 }; - } - } - return { binPath: binPath2, isWASM: isWASM2 }; -} - -// lib/npm/node-shim.ts -var { binPath, isWASM } = generateBinPath(); -if (isWASM) { - require("child_process").execFileSync("node", [binPath].concat(process.argv.slice(2)), { stdio: "inherit" }); -} else { - require("child_process").execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" }); -} diff --git a/node_modules/esbuild/install.js b/node_modules/esbuild/install.js deleted file mode 100644 index 5954864..0000000 --- a/node_modules/esbuild/install.js +++ /dev/null @@ -1,287 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); - -// lib/npm/node-platform.ts -var fs = require("fs"); -var os = require("os"); -var path = require("path"); -var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; -var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; -var knownWindowsPackages = { - "win32 arm64 LE": "@esbuild/win32-arm64", - "win32 ia32 LE": "@esbuild/win32-ia32", - "win32 x64 LE": "@esbuild/win32-x64" -}; -var knownUnixlikePackages = { - "aix ppc64 BE": "@esbuild/aix-ppc64", - "android arm64 LE": "@esbuild/android-arm64", - "darwin arm64 LE": "@esbuild/darwin-arm64", - "darwin x64 LE": "@esbuild/darwin-x64", - "freebsd arm64 LE": "@esbuild/freebsd-arm64", - "freebsd x64 LE": "@esbuild/freebsd-x64", - "linux arm LE": "@esbuild/linux-arm", - "linux arm64 LE": "@esbuild/linux-arm64", - "linux ia32 LE": "@esbuild/linux-ia32", - "linux mips64el LE": "@esbuild/linux-mips64el", - "linux ppc64 LE": "@esbuild/linux-ppc64", - "linux riscv64 LE": "@esbuild/linux-riscv64", - "linux s390x BE": "@esbuild/linux-s390x", - "linux x64 LE": "@esbuild/linux-x64", - "linux loong64 LE": "@esbuild/linux-loong64", - "netbsd arm64 LE": "@esbuild/netbsd-arm64", - "netbsd x64 LE": "@esbuild/netbsd-x64", - "openbsd arm64 LE": "@esbuild/openbsd-arm64", - "openbsd x64 LE": "@esbuild/openbsd-x64", - "sunos x64 LE": "@esbuild/sunos-x64" -}; -var knownWebAssemblyFallbackPackages = { - "android arm LE": "@esbuild/android-arm", - "android x64 LE": "@esbuild/android-x64" -}; -function pkgAndSubpathForCurrentPlatform() { - let pkg; - let subpath; - let isWASM = false; - let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; - if (platformKey in knownWindowsPackages) { - pkg = knownWindowsPackages[platformKey]; - subpath = "esbuild.exe"; - } else if (platformKey in knownUnixlikePackages) { - pkg = knownUnixlikePackages[platformKey]; - subpath = "bin/esbuild"; - } else if (platformKey in knownWebAssemblyFallbackPackages) { - pkg = knownWebAssemblyFallbackPackages[platformKey]; - subpath = "bin/esbuild"; - isWASM = true; - } else { - throw new Error(`Unsupported platform: ${platformKey}`); - } - return { pkg, subpath, isWASM }; -} -function downloadedBinPath(pkg, subpath) { - const esbuildLibDir = path.dirname(require.resolve("esbuild")); - return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); -} - -// lib/npm/node-install.ts -var fs2 = require("fs"); -var os2 = require("os"); -var path2 = require("path"); -var zlib = require("zlib"); -var https = require("https"); -var child_process = require("child_process"); -var versionFromPackageJSON = require(path2.join(__dirname, "package.json")).version; -var toPath = path2.join(__dirname, "bin", "esbuild"); -var isToPathJS = true; -function validateBinaryVersion(...command) { - command.push("--version"); - let stdout; - try { - stdout = child_process.execFileSync(command.shift(), command, { - // Without this, this install script strangely crashes with the error - // "EACCES: permission denied, write" but only on Ubuntu Linux when node is - // installed from the Snap Store. This is not a problem when you download - // the official version of node. The problem appears to be that stderr - // (i.e. file descriptor 2) isn't writable? - // - // More info: - // - https://snapcraft.io/ (what the Snap Store is) - // - https://nodejs.org/dist/ (download the official version of node) - // - https://github.com/evanw/esbuild/issues/1711#issuecomment-1027554035 - // - stdio: "pipe" - }).toString().trim(); - } catch (err) { - if (os2.platform() === "darwin" && /_SecTrustEvaluateWithError/.test(err + "")) { - let os3 = "this version of macOS"; - try { - os3 = "macOS " + child_process.execFileSync("sw_vers", ["-productVersion"]).toString().trim(); - } catch { - } - throw new Error(`The "esbuild" package cannot be installed because ${os3} is too outdated. - -The Go compiler (which esbuild relies on) no longer supports ${os3}, -which means the "esbuild" binary executable can't be run. You can either: - - * Update your version of macOS to one that the Go compiler supports - * Use the "esbuild-wasm" package instead of the "esbuild" package - * Build esbuild yourself using an older version of the Go compiler -`); - } - throw err; - } - if (stdout !== versionFromPackageJSON) { - throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`); - } -} -function isYarn() { - const { npm_config_user_agent } = process.env; - if (npm_config_user_agent) { - return /\byarn\//.test(npm_config_user_agent); - } - return false; -} -function fetch(url) { - return new Promise((resolve, reject) => { - https.get(url, (res) => { - if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location) - return fetch(res.headers.location).then(resolve, reject); - if (res.statusCode !== 200) - return reject(new Error(`Server responded with ${res.statusCode}`)); - let chunks = []; - res.on("data", (chunk) => chunks.push(chunk)); - res.on("end", () => resolve(Buffer.concat(chunks))); - }).on("error", reject); - }); -} -function extractFileFromTarGzip(buffer, subpath) { - try { - buffer = zlib.unzipSync(buffer); - } catch (err) { - throw new Error(`Invalid gzip data in archive: ${err && err.message || err}`); - } - let str = (i, n) => String.fromCharCode(...buffer.subarray(i, i + n)).replace(/\0.*$/, ""); - let offset = 0; - subpath = `package/${subpath}`; - while (offset < buffer.length) { - let name = str(offset, 100); - let size = parseInt(str(offset + 124, 12), 8); - offset += 512; - if (!isNaN(size)) { - if (name === subpath) return buffer.subarray(offset, offset + size); - offset += size + 511 & ~511; - } - } - throw new Error(`Could not find ${JSON.stringify(subpath)} in archive`); -} -function installUsingNPM(pkg, subpath, binPath) { - const env = { ...process.env, npm_config_global: void 0 }; - const esbuildLibDir = path2.dirname(require.resolve("esbuild")); - const installDir = path2.join(esbuildLibDir, "npm-install"); - fs2.mkdirSync(installDir); - try { - fs2.writeFileSync(path2.join(installDir, "package.json"), "{}"); - child_process.execSync( - `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${versionFromPackageJSON}`, - { cwd: installDir, stdio: "pipe", env } - ); - const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath); - fs2.renameSync(installedBinPath, binPath); - } finally { - try { - removeRecursive(installDir); - } catch { - } - } -} -function removeRecursive(dir) { - for (const entry of fs2.readdirSync(dir)) { - const entryPath = path2.join(dir, entry); - let stats; - try { - stats = fs2.lstatSync(entryPath); - } catch { - continue; - } - if (stats.isDirectory()) removeRecursive(entryPath); - else fs2.unlinkSync(entryPath); - } - fs2.rmdirSync(dir); -} -function applyManualBinaryPathOverride(overridePath) { - const pathString = JSON.stringify(overridePath); - fs2.writeFileSync(toPath, `#!/usr/bin/env node -require('child_process').execFileSync(${pathString}, process.argv.slice(2), { stdio: 'inherit' }); -`); - const libMain = path2.join(__dirname, "lib", "main.js"); - const code = fs2.readFileSync(libMain, "utf8"); - fs2.writeFileSync(libMain, `var ESBUILD_BINARY_PATH = ${pathString}; -${code}`); -} -function maybeOptimizePackage(binPath) { - if (os2.platform() !== "win32" && !isYarn()) { - const tempPath = path2.join(__dirname, "bin-esbuild"); - try { - fs2.linkSync(binPath, tempPath); - fs2.renameSync(tempPath, toPath); - isToPathJS = false; - fs2.unlinkSync(tempPath); - } catch { - } - } -} -async function downloadDirectlyFromNPM(pkg, subpath, binPath) { - const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${versionFromPackageJSON}.tgz`; - console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`); - try { - fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath)); - fs2.chmodSync(binPath, 493); - } catch (e) { - console.error(`[esbuild] Failed to download ${JSON.stringify(url)}: ${e && e.message || e}`); - throw e; - } -} -async function checkAndPreparePackage() { - if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { - if (!fs2.existsSync(ESBUILD_BINARY_PATH)) { - console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); - } else { - applyManualBinaryPathOverride(ESBUILD_BINARY_PATH); - return; - } - } - const { pkg, subpath } = pkgAndSubpathForCurrentPlatform(); - let binPath; - try { - binPath = require.resolve(`${pkg}/${subpath}`); - } catch (e) { - console.error(`[esbuild] Failed to find package "${pkg}" on the file system - -This can happen if you use the "--no-optional" flag. The "optionalDependencies" -package.json feature is used by esbuild to install the correct binary executable -for your current platform. This install script will now attempt to work around -this. If that fails, you need to remove the "--no-optional" flag to use esbuild. -`); - binPath = downloadedBinPath(pkg, subpath); - try { - console.error(`[esbuild] Trying to install package "${pkg}" using npm`); - installUsingNPM(pkg, subpath, binPath); - } catch (e2) { - console.error(`[esbuild] Failed to install package "${pkg}" using npm: ${e2 && e2.message || e2}`); - try { - await downloadDirectlyFromNPM(pkg, subpath, binPath); - } catch (e3) { - throw new Error(`Failed to install package "${pkg}"`); - } - } - } - maybeOptimizePackage(binPath); -} -checkAndPreparePackage().then(() => { - if (isToPathJS) { - validateBinaryVersion(process.execPath, toPath); - } else { - validateBinaryVersion(toPath); - } -}); diff --git a/node_modules/esbuild/lib/main.d.ts b/node_modules/esbuild/lib/main.d.ts deleted file mode 100644 index c705307..0000000 --- a/node_modules/esbuild/lib/main.d.ts +++ /dev/null @@ -1,705 +0,0 @@ -export type Platform = 'browser' | 'node' | 'neutral' -export type Format = 'iife' | 'cjs' | 'esm' -export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx' -export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent' -export type Charset = 'ascii' | 'utf8' -export type Drop = 'console' | 'debugger' - -interface CommonOptions { - /** Documentation: https://esbuild.github.io/api/#sourcemap */ - sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both' - /** Documentation: https://esbuild.github.io/api/#legal-comments */ - legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external' - /** Documentation: https://esbuild.github.io/api/#source-root */ - sourceRoot?: string - /** Documentation: https://esbuild.github.io/api/#sources-content */ - sourcesContent?: boolean - - /** Documentation: https://esbuild.github.io/api/#format */ - format?: Format - /** Documentation: https://esbuild.github.io/api/#global-name */ - globalName?: string - /** Documentation: https://esbuild.github.io/api/#target */ - target?: string | string[] - /** Documentation: https://esbuild.github.io/api/#supported */ - supported?: Record<string, boolean> - /** Documentation: https://esbuild.github.io/api/#platform */ - platform?: Platform - - /** Documentation: https://esbuild.github.io/api/#mangle-props */ - mangleProps?: RegExp - /** Documentation: https://esbuild.github.io/api/#mangle-props */ - reserveProps?: RegExp - /** Documentation: https://esbuild.github.io/api/#mangle-props */ - mangleQuoted?: boolean - /** Documentation: https://esbuild.github.io/api/#mangle-props */ - mangleCache?: Record<string, string | false> - /** Documentation: https://esbuild.github.io/api/#drop */ - drop?: Drop[] - /** Documentation: https://esbuild.github.io/api/#drop-labels */ - dropLabels?: string[] - /** Documentation: https://esbuild.github.io/api/#minify */ - minify?: boolean - /** Documentation: https://esbuild.github.io/api/#minify */ - minifyWhitespace?: boolean - /** Documentation: https://esbuild.github.io/api/#minify */ - minifyIdentifiers?: boolean - /** Documentation: https://esbuild.github.io/api/#minify */ - minifySyntax?: boolean - /** Documentation: https://esbuild.github.io/api/#line-limit */ - lineLimit?: number - /** Documentation: https://esbuild.github.io/api/#charset */ - charset?: Charset - /** Documentation: https://esbuild.github.io/api/#tree-shaking */ - treeShaking?: boolean - /** Documentation: https://esbuild.github.io/api/#ignore-annotations */ - ignoreAnnotations?: boolean - - /** Documentation: https://esbuild.github.io/api/#jsx */ - jsx?: 'transform' | 'preserve' | 'automatic' - /** Documentation: https://esbuild.github.io/api/#jsx-factory */ - jsxFactory?: string - /** Documentation: https://esbuild.github.io/api/#jsx-fragment */ - jsxFragment?: string - /** Documentation: https://esbuild.github.io/api/#jsx-import-source */ - jsxImportSource?: string - /** Documentation: https://esbuild.github.io/api/#jsx-development */ - jsxDev?: boolean - /** Documentation: https://esbuild.github.io/api/#jsx-side-effects */ - jsxSideEffects?: boolean - - /** Documentation: https://esbuild.github.io/api/#define */ - define?: { [key: string]: string } - /** Documentation: https://esbuild.github.io/api/#pure */ - pure?: string[] - /** Documentation: https://esbuild.github.io/api/#keep-names */ - keepNames?: boolean - - /** Documentation: https://esbuild.github.io/api/#color */ - color?: boolean - /** Documentation: https://esbuild.github.io/api/#log-level */ - logLevel?: LogLevel - /** Documentation: https://esbuild.github.io/api/#log-limit */ - logLimit?: number - /** Documentation: https://esbuild.github.io/api/#log-override */ - logOverride?: Record<string, LogLevel> - - /** Documentation: https://esbuild.github.io/api/#tsconfig-raw */ - tsconfigRaw?: string | TsconfigRaw -} - -export interface TsconfigRaw { - compilerOptions?: { - alwaysStrict?: boolean - baseUrl?: string - experimentalDecorators?: boolean - importsNotUsedAsValues?: 'remove' | 'preserve' | 'error' - jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev' - jsxFactory?: string - jsxFragmentFactory?: string - jsxImportSource?: string - paths?: Record<string, string[]> - preserveValueImports?: boolean - strict?: boolean - target?: string - useDefineForClassFields?: boolean - verbatimModuleSyntax?: boolean - } -} - -export interface BuildOptions extends CommonOptions { - /** Documentation: https://esbuild.github.io/api/#bundle */ - bundle?: boolean - /** Documentation: https://esbuild.github.io/api/#splitting */ - splitting?: boolean - /** Documentation: https://esbuild.github.io/api/#preserve-symlinks */ - preserveSymlinks?: boolean - /** Documentation: https://esbuild.github.io/api/#outfile */ - outfile?: string - /** Documentation: https://esbuild.github.io/api/#metafile */ - metafile?: boolean - /** Documentation: https://esbuild.github.io/api/#outdir */ - outdir?: string - /** Documentation: https://esbuild.github.io/api/#outbase */ - outbase?: string - /** Documentation: https://esbuild.github.io/api/#external */ - external?: string[] - /** Documentation: https://esbuild.github.io/api/#packages */ - packages?: 'bundle' | 'external' - /** Documentation: https://esbuild.github.io/api/#alias */ - alias?: Record<string, string> - /** Documentation: https://esbuild.github.io/api/#loader */ - loader?: { [ext: string]: Loader } - /** Documentation: https://esbuild.github.io/api/#resolve-extensions */ - resolveExtensions?: string[] - /** Documentation: https://esbuild.github.io/api/#main-fields */ - mainFields?: string[] - /** Documentation: https://esbuild.github.io/api/#conditions */ - conditions?: string[] - /** Documentation: https://esbuild.github.io/api/#write */ - write?: boolean - /** Documentation: https://esbuild.github.io/api/#allow-overwrite */ - allowOverwrite?: boolean - /** Documentation: https://esbuild.github.io/api/#tsconfig */ - tsconfig?: string - /** Documentation: https://esbuild.github.io/api/#out-extension */ - outExtension?: { [ext: string]: string } - /** Documentation: https://esbuild.github.io/api/#public-path */ - publicPath?: string - /** Documentation: https://esbuild.github.io/api/#entry-names */ - entryNames?: string - /** Documentation: https://esbuild.github.io/api/#chunk-names */ - chunkNames?: string - /** Documentation: https://esbuild.github.io/api/#asset-names */ - assetNames?: string - /** Documentation: https://esbuild.github.io/api/#inject */ - inject?: string[] - /** Documentation: https://esbuild.github.io/api/#banner */ - banner?: { [type: string]: string } - /** Documentation: https://esbuild.github.io/api/#footer */ - footer?: { [type: string]: string } - /** Documentation: https://esbuild.github.io/api/#entry-points */ - entryPoints?: string[] | Record<string, string> | { in: string, out: string }[] - /** Documentation: https://esbuild.github.io/api/#stdin */ - stdin?: StdinOptions - /** Documentation: https://esbuild.github.io/plugins/ */ - plugins?: Plugin[] - /** Documentation: https://esbuild.github.io/api/#working-directory */ - absWorkingDir?: string - /** Documentation: https://esbuild.github.io/api/#node-paths */ - nodePaths?: string[]; // The "NODE_PATH" variable from Node.js -} - -export interface StdinOptions { - contents: string | Uint8Array - resolveDir?: string - sourcefile?: string - loader?: Loader -} - -export interface Message { - id: string - pluginName: string - text: string - location: Location | null - notes: Note[] - - /** - * Optional user-specified data that is passed through unmodified. You can - * use this to stash the original error, for example. - */ - detail: any -} - -export interface Note { - text: string - location: Location | null -} - -export interface Location { - file: string - namespace: string - /** 1-based */ - line: number - /** 0-based, in bytes */ - column: number - /** in bytes */ - length: number - lineText: string - suggestion: string -} - -export interface OutputFile { - path: string - contents: Uint8Array - hash: string - /** "contents" as text (changes automatically with "contents") */ - readonly text: string -} - -export interface BuildResult<ProvidedOptions extends BuildOptions = BuildOptions> { - errors: Message[] - warnings: Message[] - /** Only when "write: false" */ - outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined) - /** Only when "metafile: true" */ - metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined) - /** Only when "mangleCache" is present */ - mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined) -} - -export interface BuildFailure extends Error { - errors: Message[] - warnings: Message[] -} - -/** Documentation: https://esbuild.github.io/api/#serve-arguments */ -export interface ServeOptions { - port?: number - host?: string - servedir?: string - keyfile?: string - certfile?: string - fallback?: string - onRequest?: (args: ServeOnRequestArgs) => void -} - -export interface ServeOnRequestArgs { - remoteAddress: string - method: string - path: string - status: number - /** The time to generate the response, not to send it */ - timeInMS: number -} - -/** Documentation: https://esbuild.github.io/api/#serve-return-values */ -export interface ServeResult { - port: number - host: string -} - -export interface TransformOptions extends CommonOptions { - /** Documentation: https://esbuild.github.io/api/#sourcefile */ - sourcefile?: string - /** Documentation: https://esbuild.github.io/api/#loader */ - loader?: Loader - /** Documentation: https://esbuild.github.io/api/#banner */ - banner?: string - /** Documentation: https://esbuild.github.io/api/#footer */ - footer?: string -} - -export interface TransformResult<ProvidedOptions extends TransformOptions = TransformOptions> { - code: string - map: string - warnings: Message[] - /** Only when "mangleCache" is present */ - mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined) - /** Only when "legalComments" is "external" */ - legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined) -} - -export interface TransformFailure extends Error { - errors: Message[] - warnings: Message[] -} - -export interface Plugin { - name: string - setup: (build: PluginBuild) => (void | Promise<void>) -} - -export interface PluginBuild { - /** Documentation: https://esbuild.github.io/plugins/#build-options */ - initialOptions: BuildOptions - - /** Documentation: https://esbuild.github.io/plugins/#resolve */ - resolve(path: string, options?: ResolveOptions): Promise<ResolveResult> - - /** Documentation: https://esbuild.github.io/plugins/#on-start */ - onStart(callback: () => - (OnStartResult | null | void | Promise<OnStartResult | null | void>)): void - - /** Documentation: https://esbuild.github.io/plugins/#on-end */ - onEnd(callback: (result: BuildResult) => - (OnEndResult | null | void | Promise<OnEndResult | null | void>)): void - - /** Documentation: https://esbuild.github.io/plugins/#on-resolve */ - onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) => - (OnResolveResult | null | undefined | Promise<OnResolveResult | null | undefined>)): void - - /** Documentation: https://esbuild.github.io/plugins/#on-load */ - onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) => - (OnLoadResult | null | undefined | Promise<OnLoadResult | null | undefined>)): void - - /** Documentation: https://esbuild.github.io/plugins/#on-dispose */ - onDispose(callback: () => void): void - - // This is a full copy of the esbuild library in case you need it - esbuild: { - context: typeof context, - build: typeof build, - buildSync: typeof buildSync, - transform: typeof transform, - transformSync: typeof transformSync, - formatMessages: typeof formatMessages, - formatMessagesSync: typeof formatMessagesSync, - analyzeMetafile: typeof analyzeMetafile, - analyzeMetafileSync: typeof analyzeMetafileSync, - initialize: typeof initialize, - version: typeof version, - } -} - -/** Documentation: https://esbuild.github.io/plugins/#resolve-options */ -export interface ResolveOptions { - pluginName?: string - importer?: string - namespace?: string - resolveDir?: string - kind?: ImportKind - pluginData?: any - with?: Record<string, string> -} - -/** Documentation: https://esbuild.github.io/plugins/#resolve-results */ -export interface ResolveResult { - errors: Message[] - warnings: Message[] - - path: string - external: boolean - sideEffects: boolean - namespace: string - suffix: string - pluginData: any -} - -export interface OnStartResult { - errors?: PartialMessage[] - warnings?: PartialMessage[] -} - -export interface OnEndResult { - errors?: PartialMessage[] - warnings?: PartialMessage[] -} - -/** Documentation: https://esbuild.github.io/plugins/#on-resolve-options */ -export interface OnResolveOptions { - filter: RegExp - namespace?: string -} - -/** Documentation: https://esbuild.github.io/plugins/#on-resolve-arguments */ -export interface OnResolveArgs { - path: string - importer: string - namespace: string - resolveDir: string - kind: ImportKind - pluginData: any - with: Record<string, string> -} - -export type ImportKind = - | 'entry-point' - - // JS - | 'import-statement' - | 'require-call' - | 'dynamic-import' - | 'require-resolve' - - // CSS - | 'import-rule' - | 'composes-from' - | 'url-token' - -/** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */ -export interface OnResolveResult { - pluginName?: string - - errors?: PartialMessage[] - warnings?: PartialMessage[] - - path?: string - external?: boolean - sideEffects?: boolean - namespace?: string - suffix?: string - pluginData?: any - - watchFiles?: string[] - watchDirs?: string[] -} - -/** Documentation: https://esbuild.github.io/plugins/#on-load-options */ -export interface OnLoadOptions { - filter: RegExp - namespace?: string -} - -/** Documentation: https://esbuild.github.io/plugins/#on-load-arguments */ -export interface OnLoadArgs { - path: string - namespace: string - suffix: string - pluginData: any - with: Record<string, string> -} - -/** Documentation: https://esbuild.github.io/plugins/#on-load-results */ -export interface OnLoadResult { - pluginName?: string - - errors?: PartialMessage[] - warnings?: PartialMessage[] - - contents?: string | Uint8Array - resolveDir?: string - loader?: Loader - pluginData?: any - - watchFiles?: string[] - watchDirs?: string[] -} - -export interface PartialMessage { - id?: string - pluginName?: string - text?: string - location?: Partial<Location> | null - notes?: PartialNote[] - detail?: any -} - -export interface PartialNote { - text?: string - location?: Partial<Location> | null -} - -/** Documentation: https://esbuild.github.io/api/#metafile */ -export interface Metafile { - inputs: { - [path: string]: { - bytes: number - imports: { - path: string - kind: ImportKind - external?: boolean - original?: string - with?: Record<string, string> - }[] - format?: 'cjs' | 'esm' - with?: Record<string, string> - } - } - outputs: { - [path: string]: { - bytes: number - inputs: { - [path: string]: { - bytesInOutput: number - } - } - imports: { - path: string - kind: ImportKind | 'file-loader' - external?: boolean - }[] - exports: string[] - entryPoint?: string - cssBundle?: string - } - } -} - -export interface FormatMessagesOptions { - kind: 'error' | 'warning' - color?: boolean - terminalWidth?: number -} - -export interface AnalyzeMetafileOptions { - color?: boolean - verbose?: boolean -} - -export interface WatchOptions { -} - -export interface BuildContext<ProvidedOptions extends BuildOptions = BuildOptions> { - /** Documentation: https://esbuild.github.io/api/#rebuild */ - rebuild(): Promise<BuildResult<ProvidedOptions>> - - /** Documentation: https://esbuild.github.io/api/#watch */ - watch(options?: WatchOptions): Promise<void> - - /** Documentation: https://esbuild.github.io/api/#serve */ - serve(options?: ServeOptions): Promise<ServeResult> - - cancel(): Promise<void> - dispose(): Promise<void> -} - -// This is a TypeScript type-level function which replaces any keys in "In" -// that aren't in "Out" with "never". We use this to reject properties with -// typos in object literals. See: https://stackoverflow.com/questions/49580725 -type SameShape<Out, In extends Out> = In & { [Key in Exclude<keyof In, keyof Out>]: never } - -/** - * This function invokes the "esbuild" command-line tool for you. It returns a - * promise that either resolves with a "BuildResult" object or rejects with a - * "BuildFailure" object. - * - * - Works in node: yes - * - Works in browser: yes - * - * Documentation: https://esbuild.github.io/api/#build - */ -export declare function build<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildResult<T>> - -/** - * This is the advanced long-running form of "build" that supports additional - * features such as watch mode and a local development server. - * - * - Works in node: yes - * - Works in browser: no - * - * Documentation: https://esbuild.github.io/api/#build - */ -export declare function context<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildContext<T>> - -/** - * This function transforms a single JavaScript file. It can be used to minify - * JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript - * to older JavaScript. It returns a promise that is either resolved with a - * "TransformResult" object or rejected with a "TransformFailure" object. - * - * - Works in node: yes - * - Works in browser: yes - * - * Documentation: https://esbuild.github.io/api/#transform - */ -export declare function transform<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): Promise<TransformResult<T>> - -/** - * Converts log messages to formatted message strings suitable for printing in - * the terminal. This allows you to reuse the built-in behavior of esbuild's - * log message formatter. This is a batch-oriented API for efficiency. - * - * - Works in node: yes - * - Works in browser: yes - */ -export declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise<string[]> - -/** - * Pretty-prints an analysis of the metafile JSON to a string. This is just for - * convenience to be able to match esbuild's pretty-printing exactly. If you want - * to customize it, you can just inspect the data in the metafile yourself. - * - * - Works in node: yes - * - Works in browser: yes - * - * Documentation: https://esbuild.github.io/api/#analyze - */ -export declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise<string> - -/** - * A synchronous version of "build". - * - * - Works in node: yes - * - Works in browser: no - * - * Documentation: https://esbuild.github.io/api/#build - */ -export declare function buildSync<T extends BuildOptions>(options: SameShape<BuildOptions, T>): BuildResult<T> - -/** - * A synchronous version of "transform". - * - * - Works in node: yes - * - Works in browser: no - * - * Documentation: https://esbuild.github.io/api/#transform - */ -export declare function transformSync<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): TransformResult<T> - -/** - * A synchronous version of "formatMessages". - * - * - Works in node: yes - * - Works in browser: no - */ -export declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[] - -/** - * A synchronous version of "analyzeMetafile". - * - * - Works in node: yes - * - Works in browser: no - * - * Documentation: https://esbuild.github.io/api/#analyze - */ -export declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string - -/** - * This configures the browser-based version of esbuild. It is necessary to - * call this first and wait for the returned promise to be resolved before - * making other API calls when using esbuild in the browser. - * - * - Works in node: yes - * - Works in browser: yes ("options" is required) - * - * Documentation: https://esbuild.github.io/api/#browser - */ -export declare function initialize(options: InitializeOptions): Promise<void> - -export interface InitializeOptions { - /** - * The URL of the "esbuild.wasm" file. This must be provided when running - * esbuild in the browser. - */ - wasmURL?: string | URL - - /** - * The result of calling "new WebAssembly.Module(buffer)" where "buffer" - * is a typed array or ArrayBuffer containing the binary code of the - * "esbuild.wasm" file. - * - * You can use this as an alternative to "wasmURL" for environments where it's - * not possible to download the WebAssembly module. - */ - wasmModule?: WebAssembly.Module - - /** - * By default esbuild runs the WebAssembly-based browser API in a web worker - * to avoid blocking the UI thread. This can be disabled by setting "worker" - * to false. - */ - worker?: boolean -} - -export let version: string - -// Call this function to terminate esbuild's child process. The child process -// is not terminated and re-created after each API call because it's more -// efficient to keep it around when there are multiple API calls. -// -// In node this happens automatically before the parent node process exits. So -// you only need to call this if you know you will not make any more esbuild -// API calls and you want to clean up resources. -// -// Unlike node, Deno lacks the necessary APIs to clean up child processes -// automatically. You must manually call stop() in Deno when you're done -// using esbuild or Deno will continue running forever. -// -// Another reason you might want to call this is if you are using esbuild from -// within a Deno test. Deno fails tests that create a child process without -// killing it before the test ends, so you have to call this function (and -// await the returned promise) in every Deno test that uses esbuild. -export declare function stop(): Promise<void> - -// Note: These declarations exist to avoid type errors when you omit "dom" from -// "lib" in your "tsconfig.json" file. TypeScript confusingly declares the -// global "WebAssembly" type in "lib.dom.d.ts" even though it has nothing to do -// with the browser DOM and is present in many non-browser JavaScript runtimes -// (e.g. node and deno). Declaring it here allows esbuild's API to be used in -// these scenarios. -// -// There's an open issue about getting this problem corrected (although these -// declarations will need to remain even if this is fixed for backward -// compatibility with older TypeScript versions): -// -// https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/826 -// -declare global { - namespace WebAssembly { - interface Module { - } - } - interface URL { - } -} diff --git a/node_modules/esbuild/lib/main.js b/node_modules/esbuild/lib/main.js deleted file mode 100644 index 45daeda..0000000 --- a/node_modules/esbuild/lib/main.js +++ /dev/null @@ -1,2245 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// lib/npm/node.ts -var node_exports = {}; -__export(node_exports, { - analyzeMetafile: () => analyzeMetafile, - analyzeMetafileSync: () => analyzeMetafileSync, - build: () => build, - buildSync: () => buildSync, - context: () => context, - default: () => node_default, - formatMessages: () => formatMessages, - formatMessagesSync: () => formatMessagesSync, - initialize: () => initialize, - stop: () => stop, - transform: () => transform, - transformSync: () => transformSync, - version: () => version -}); -module.exports = __toCommonJS(node_exports); - -// lib/shared/stdio_protocol.ts -function encodePacket(packet) { - let visit = (value) => { - if (value === null) { - bb.write8(0); - } else if (typeof value === "boolean") { - bb.write8(1); - bb.write8(+value); - } else if (typeof value === "number") { - bb.write8(2); - bb.write32(value | 0); - } else if (typeof value === "string") { - bb.write8(3); - bb.write(encodeUTF8(value)); - } else if (value instanceof Uint8Array) { - bb.write8(4); - bb.write(value); - } else if (value instanceof Array) { - bb.write8(5); - bb.write32(value.length); - for (let item of value) { - visit(item); - } - } else { - let keys = Object.keys(value); - bb.write8(6); - bb.write32(keys.length); - for (let key of keys) { - bb.write(encodeUTF8(key)); - visit(value[key]); - } - } - }; - let bb = new ByteBuffer(); - bb.write32(0); - bb.write32(packet.id << 1 | +!packet.isRequest); - visit(packet.value); - writeUInt32LE(bb.buf, bb.len - 4, 0); - return bb.buf.subarray(0, bb.len); -} -function decodePacket(bytes) { - let visit = () => { - switch (bb.read8()) { - case 0: - return null; - case 1: - return !!bb.read8(); - case 2: - return bb.read32(); - case 3: - return decodeUTF8(bb.read()); - case 4: - return bb.read(); - case 5: { - let count = bb.read32(); - let value2 = []; - for (let i = 0; i < count; i++) { - value2.push(visit()); - } - return value2; - } - case 6: { - let count = bb.read32(); - let value2 = {}; - for (let i = 0; i < count; i++) { - value2[decodeUTF8(bb.read())] = visit(); - } - return value2; - } - default: - throw new Error("Invalid packet"); - } - }; - let bb = new ByteBuffer(bytes); - let id = bb.read32(); - let isRequest = (id & 1) === 0; - id >>>= 1; - let value = visit(); - if (bb.ptr !== bytes.length) { - throw new Error("Invalid packet"); - } - return { id, isRequest, value }; -} -var ByteBuffer = class { - constructor(buf = new Uint8Array(1024)) { - this.buf = buf; - this.len = 0; - this.ptr = 0; - } - _write(delta) { - if (this.len + delta > this.buf.length) { - let clone = new Uint8Array((this.len + delta) * 2); - clone.set(this.buf); - this.buf = clone; - } - this.len += delta; - return this.len - delta; - } - write8(value) { - let offset = this._write(1); - this.buf[offset] = value; - } - write32(value) { - let offset = this._write(4); - writeUInt32LE(this.buf, value, offset); - } - write(bytes) { - let offset = this._write(4 + bytes.length); - writeUInt32LE(this.buf, bytes.length, offset); - this.buf.set(bytes, offset + 4); - } - _read(delta) { - if (this.ptr + delta > this.buf.length) { - throw new Error("Invalid packet"); - } - this.ptr += delta; - return this.ptr - delta; - } - read8() { - return this.buf[this._read(1)]; - } - read32() { - return readUInt32LE(this.buf, this._read(4)); - } - read() { - let length = this.read32(); - let bytes = new Uint8Array(length); - let ptr = this._read(bytes.length); - bytes.set(this.buf.subarray(ptr, ptr + length)); - return bytes; - } -}; -var encodeUTF8; -var decodeUTF8; -var encodeInvariant; -if (typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined") { - let encoder = new TextEncoder(); - let decoder = new TextDecoder(); - encodeUTF8 = (text) => encoder.encode(text); - decodeUTF8 = (bytes) => decoder.decode(bytes); - encodeInvariant = 'new TextEncoder().encode("")'; -} else if (typeof Buffer !== "undefined") { - encodeUTF8 = (text) => Buffer.from(text); - decodeUTF8 = (bytes) => { - let { buffer, byteOffset, byteLength } = bytes; - return Buffer.from(buffer, byteOffset, byteLength).toString(); - }; - encodeInvariant = 'Buffer.from("")'; -} else { - throw new Error("No UTF-8 codec found"); -} -if (!(encodeUTF8("") instanceof Uint8Array)) - throw new Error(`Invariant violation: "${encodeInvariant} instanceof Uint8Array" is incorrectly false - -This indicates that your JavaScript environment is broken. You cannot use -esbuild in this environment because esbuild relies on this invariant. This -is not a problem with esbuild. You need to fix your environment instead. -`); -function readUInt32LE(buffer, offset) { - return buffer[offset++] | buffer[offset++] << 8 | buffer[offset++] << 16 | buffer[offset++] << 24; -} -function writeUInt32LE(buffer, value, offset) { - buffer[offset++] = value; - buffer[offset++] = value >> 8; - buffer[offset++] = value >> 16; - buffer[offset++] = value >> 24; -} - -// lib/shared/common.ts -var quote = JSON.stringify; -var buildLogLevelDefault = "warning"; -var transformLogLevelDefault = "silent"; -function validateTarget(target) { - validateStringValue(target, "target"); - if (target.indexOf(",") >= 0) throw new Error(`Invalid target: ${target}`); - return target; -} -var canBeAnything = () => null; -var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean"; -var mustBeString = (value) => typeof value === "string" ? null : "a string"; -var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object"; -var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer"; -var mustBeFunction = (value) => typeof value === "function" ? null : "a function"; -var mustBeArray = (value) => Array.isArray(value) ? null : "an array"; -var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object"; -var mustBeEntryPoints = (value) => typeof value === "object" && value !== null ? null : "an array or an object"; -var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module"; -var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null"; -var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean"; -var mustBeStringOrObject = (value) => typeof value === "string" || typeof value === "object" && value !== null && !Array.isArray(value) ? null : "a string or an object"; -var mustBeStringOrArray = (value) => typeof value === "string" || Array.isArray(value) ? null : "a string or an array"; -var mustBeStringOrUint8Array = (value) => typeof value === "string" || value instanceof Uint8Array ? null : "a string or a Uint8Array"; -var mustBeStringOrURL = (value) => typeof value === "string" || value instanceof URL ? null : "a string or a URL"; -function getFlag(object, keys, key, mustBeFn) { - let value = object[key]; - keys[key + ""] = true; - if (value === void 0) return void 0; - let mustBe = mustBeFn(value); - if (mustBe !== null) throw new Error(`${quote(key)} must be ${mustBe}`); - return value; -} -function checkForInvalidFlags(object, keys, where) { - for (let key in object) { - if (!(key in keys)) { - throw new Error(`Invalid option ${where}: ${quote(key)}`); - } - } -} -function validateInitializeOptions(options) { - let keys = /* @__PURE__ */ Object.create(null); - let wasmURL = getFlag(options, keys, "wasmURL", mustBeStringOrURL); - let wasmModule = getFlag(options, keys, "wasmModule", mustBeWebAssemblyModule); - let worker = getFlag(options, keys, "worker", mustBeBoolean); - checkForInvalidFlags(options, keys, "in initialize() call"); - return { - wasmURL, - wasmModule, - worker - }; -} -function validateMangleCache(mangleCache) { - let validated; - if (mangleCache !== void 0) { - validated = /* @__PURE__ */ Object.create(null); - for (let key in mangleCache) { - let value = mangleCache[key]; - if (typeof value === "string" || value === false) { - validated[key] = value; - } else { - throw new Error(`Expected ${quote(key)} in mangle cache to map to either a string or false`); - } - } - } - return validated; -} -function pushLogFlags(flags, options, keys, isTTY2, logLevelDefault) { - let color = getFlag(options, keys, "color", mustBeBoolean); - let logLevel = getFlag(options, keys, "logLevel", mustBeString); - let logLimit = getFlag(options, keys, "logLimit", mustBeInteger); - if (color !== void 0) flags.push(`--color=${color}`); - else if (isTTY2) flags.push(`--color=true`); - flags.push(`--log-level=${logLevel || logLevelDefault}`); - flags.push(`--log-limit=${logLimit || 0}`); -} -function validateStringValue(value, what, key) { - if (typeof value !== "string") { - throw new Error(`Expected value for ${what}${key !== void 0 ? " " + quote(key) : ""} to be a string, got ${typeof value} instead`); - } - return value; -} -function pushCommonFlags(flags, options, keys) { - let legalComments = getFlag(options, keys, "legalComments", mustBeString); - let sourceRoot = getFlag(options, keys, "sourceRoot", mustBeString); - let sourcesContent = getFlag(options, keys, "sourcesContent", mustBeBoolean); - let target = getFlag(options, keys, "target", mustBeStringOrArray); - let format = getFlag(options, keys, "format", mustBeString); - let globalName = getFlag(options, keys, "globalName", mustBeString); - let mangleProps = getFlag(options, keys, "mangleProps", mustBeRegExp); - let reserveProps = getFlag(options, keys, "reserveProps", mustBeRegExp); - let mangleQuoted = getFlag(options, keys, "mangleQuoted", mustBeBoolean); - let minify = getFlag(options, keys, "minify", mustBeBoolean); - let minifySyntax = getFlag(options, keys, "minifySyntax", mustBeBoolean); - let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean); - let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean); - let lineLimit = getFlag(options, keys, "lineLimit", mustBeInteger); - let drop = getFlag(options, keys, "drop", mustBeArray); - let dropLabels = getFlag(options, keys, "dropLabels", mustBeArray); - let charset = getFlag(options, keys, "charset", mustBeString); - let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean); - let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean); - let jsx = getFlag(options, keys, "jsx", mustBeString); - let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString); - let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString); - let jsxImportSource = getFlag(options, keys, "jsxImportSource", mustBeString); - let jsxDev = getFlag(options, keys, "jsxDev", mustBeBoolean); - let jsxSideEffects = getFlag(options, keys, "jsxSideEffects", mustBeBoolean); - let define = getFlag(options, keys, "define", mustBeObject); - let logOverride = getFlag(options, keys, "logOverride", mustBeObject); - let supported = getFlag(options, keys, "supported", mustBeObject); - let pure = getFlag(options, keys, "pure", mustBeArray); - let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean); - let platform = getFlag(options, keys, "platform", mustBeString); - let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject); - if (legalComments) flags.push(`--legal-comments=${legalComments}`); - if (sourceRoot !== void 0) flags.push(`--source-root=${sourceRoot}`); - if (sourcesContent !== void 0) flags.push(`--sources-content=${sourcesContent}`); - if (target) { - if (Array.isArray(target)) flags.push(`--target=${Array.from(target).map(validateTarget).join(",")}`); - else flags.push(`--target=${validateTarget(target)}`); - } - if (format) flags.push(`--format=${format}`); - if (globalName) flags.push(`--global-name=${globalName}`); - if (platform) flags.push(`--platform=${platform}`); - if (tsconfigRaw) flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`); - if (minify) flags.push("--minify"); - if (minifySyntax) flags.push("--minify-syntax"); - if (minifyWhitespace) flags.push("--minify-whitespace"); - if (minifyIdentifiers) flags.push("--minify-identifiers"); - if (lineLimit) flags.push(`--line-limit=${lineLimit}`); - if (charset) flags.push(`--charset=${charset}`); - if (treeShaking !== void 0) flags.push(`--tree-shaking=${treeShaking}`); - if (ignoreAnnotations) flags.push(`--ignore-annotations`); - if (drop) for (let what of drop) flags.push(`--drop:${validateStringValue(what, "drop")}`); - if (dropLabels) flags.push(`--drop-labels=${Array.from(dropLabels).map((what) => validateStringValue(what, "dropLabels")).join(",")}`); - if (mangleProps) flags.push(`--mangle-props=${mangleProps.source}`); - if (reserveProps) flags.push(`--reserve-props=${reserveProps.source}`); - if (mangleQuoted !== void 0) flags.push(`--mangle-quoted=${mangleQuoted}`); - if (jsx) flags.push(`--jsx=${jsx}`); - if (jsxFactory) flags.push(`--jsx-factory=${jsxFactory}`); - if (jsxFragment) flags.push(`--jsx-fragment=${jsxFragment}`); - if (jsxImportSource) flags.push(`--jsx-import-source=${jsxImportSource}`); - if (jsxDev) flags.push(`--jsx-dev`); - if (jsxSideEffects) flags.push(`--jsx-side-effects`); - if (define) { - for (let key in define) { - if (key.indexOf("=") >= 0) throw new Error(`Invalid define: ${key}`); - flags.push(`--define:${key}=${validateStringValue(define[key], "define", key)}`); - } - } - if (logOverride) { - for (let key in logOverride) { - if (key.indexOf("=") >= 0) throw new Error(`Invalid log override: ${key}`); - flags.push(`--log-override:${key}=${validateStringValue(logOverride[key], "log override", key)}`); - } - } - if (supported) { - for (let key in supported) { - if (key.indexOf("=") >= 0) throw new Error(`Invalid supported: ${key}`); - const value = supported[key]; - if (typeof value !== "boolean") throw new Error(`Expected value for supported ${quote(key)} to be a boolean, got ${typeof value} instead`); - flags.push(`--supported:${key}=${value}`); - } - } - if (pure) for (let fn of pure) flags.push(`--pure:${validateStringValue(fn, "pure")}`); - if (keepNames) flags.push(`--keep-names`); -} -function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeDefault) { - var _a2; - let flags = []; - let entries = []; - let keys = /* @__PURE__ */ Object.create(null); - let stdinContents = null; - let stdinResolveDir = null; - pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); - pushCommonFlags(flags, options, keys); - let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); - let bundle = getFlag(options, keys, "bundle", mustBeBoolean); - let splitting = getFlag(options, keys, "splitting", mustBeBoolean); - let preserveSymlinks = getFlag(options, keys, "preserveSymlinks", mustBeBoolean); - let metafile = getFlag(options, keys, "metafile", mustBeBoolean); - let outfile = getFlag(options, keys, "outfile", mustBeString); - let outdir = getFlag(options, keys, "outdir", mustBeString); - let outbase = getFlag(options, keys, "outbase", mustBeString); - let tsconfig = getFlag(options, keys, "tsconfig", mustBeString); - let resolveExtensions = getFlag(options, keys, "resolveExtensions", mustBeArray); - let nodePathsInput = getFlag(options, keys, "nodePaths", mustBeArray); - let mainFields = getFlag(options, keys, "mainFields", mustBeArray); - let conditions = getFlag(options, keys, "conditions", mustBeArray); - let external = getFlag(options, keys, "external", mustBeArray); - let packages = getFlag(options, keys, "packages", mustBeString); - let alias = getFlag(options, keys, "alias", mustBeObject); - let loader = getFlag(options, keys, "loader", mustBeObject); - let outExtension = getFlag(options, keys, "outExtension", mustBeObject); - let publicPath = getFlag(options, keys, "publicPath", mustBeString); - let entryNames = getFlag(options, keys, "entryNames", mustBeString); - let chunkNames = getFlag(options, keys, "chunkNames", mustBeString); - let assetNames = getFlag(options, keys, "assetNames", mustBeString); - let inject = getFlag(options, keys, "inject", mustBeArray); - let banner = getFlag(options, keys, "banner", mustBeObject); - let footer = getFlag(options, keys, "footer", mustBeObject); - let entryPoints = getFlag(options, keys, "entryPoints", mustBeEntryPoints); - let absWorkingDir = getFlag(options, keys, "absWorkingDir", mustBeString); - let stdin = getFlag(options, keys, "stdin", mustBeObject); - let write = (_a2 = getFlag(options, keys, "write", mustBeBoolean)) != null ? _a2 : writeDefault; - let allowOverwrite = getFlag(options, keys, "allowOverwrite", mustBeBoolean); - let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); - keys.plugins = true; - checkForInvalidFlags(options, keys, `in ${callName}() call`); - if (sourcemap) flags.push(`--sourcemap${sourcemap === true ? "" : `=${sourcemap}`}`); - if (bundle) flags.push("--bundle"); - if (allowOverwrite) flags.push("--allow-overwrite"); - if (splitting) flags.push("--splitting"); - if (preserveSymlinks) flags.push("--preserve-symlinks"); - if (metafile) flags.push(`--metafile`); - if (outfile) flags.push(`--outfile=${outfile}`); - if (outdir) flags.push(`--outdir=${outdir}`); - if (outbase) flags.push(`--outbase=${outbase}`); - if (tsconfig) flags.push(`--tsconfig=${tsconfig}`); - if (packages) flags.push(`--packages=${packages}`); - if (resolveExtensions) { - let values = []; - for (let value of resolveExtensions) { - validateStringValue(value, "resolve extension"); - if (value.indexOf(",") >= 0) throw new Error(`Invalid resolve extension: ${value}`); - values.push(value); - } - flags.push(`--resolve-extensions=${values.join(",")}`); - } - if (publicPath) flags.push(`--public-path=${publicPath}`); - if (entryNames) flags.push(`--entry-names=${entryNames}`); - if (chunkNames) flags.push(`--chunk-names=${chunkNames}`); - if (assetNames) flags.push(`--asset-names=${assetNames}`); - if (mainFields) { - let values = []; - for (let value of mainFields) { - validateStringValue(value, "main field"); - if (value.indexOf(",") >= 0) throw new Error(`Invalid main field: ${value}`); - values.push(value); - } - flags.push(`--main-fields=${values.join(",")}`); - } - if (conditions) { - let values = []; - for (let value of conditions) { - validateStringValue(value, "condition"); - if (value.indexOf(",") >= 0) throw new Error(`Invalid condition: ${value}`); - values.push(value); - } - flags.push(`--conditions=${values.join(",")}`); - } - if (external) for (let name of external) flags.push(`--external:${validateStringValue(name, "external")}`); - if (alias) { - for (let old in alias) { - if (old.indexOf("=") >= 0) throw new Error(`Invalid package name in alias: ${old}`); - flags.push(`--alias:${old}=${validateStringValue(alias[old], "alias", old)}`); - } - } - if (banner) { - for (let type in banner) { - if (type.indexOf("=") >= 0) throw new Error(`Invalid banner file type: ${type}`); - flags.push(`--banner:${type}=${validateStringValue(banner[type], "banner", type)}`); - } - } - if (footer) { - for (let type in footer) { - if (type.indexOf("=") >= 0) throw new Error(`Invalid footer file type: ${type}`); - flags.push(`--footer:${type}=${validateStringValue(footer[type], "footer", type)}`); - } - } - if (inject) for (let path3 of inject) flags.push(`--inject:${validateStringValue(path3, "inject")}`); - if (loader) { - for (let ext in loader) { - if (ext.indexOf("=") >= 0) throw new Error(`Invalid loader extension: ${ext}`); - flags.push(`--loader:${ext}=${validateStringValue(loader[ext], "loader", ext)}`); - } - } - if (outExtension) { - for (let ext in outExtension) { - if (ext.indexOf("=") >= 0) throw new Error(`Invalid out extension: ${ext}`); - flags.push(`--out-extension:${ext}=${validateStringValue(outExtension[ext], "out extension", ext)}`); - } - } - if (entryPoints) { - if (Array.isArray(entryPoints)) { - for (let i = 0, n = entryPoints.length; i < n; i++) { - let entryPoint = entryPoints[i]; - if (typeof entryPoint === "object" && entryPoint !== null) { - let entryPointKeys = /* @__PURE__ */ Object.create(null); - let input = getFlag(entryPoint, entryPointKeys, "in", mustBeString); - let output = getFlag(entryPoint, entryPointKeys, "out", mustBeString); - checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i); - if (input === void 0) throw new Error('Missing property "in" for entry point at index ' + i); - if (output === void 0) throw new Error('Missing property "out" for entry point at index ' + i); - entries.push([output, input]); - } else { - entries.push(["", validateStringValue(entryPoint, "entry point at index " + i)]); - } - } - } else { - for (let key in entryPoints) { - entries.push([key, validateStringValue(entryPoints[key], "entry point", key)]); - } - } - } - if (stdin) { - let stdinKeys = /* @__PURE__ */ Object.create(null); - let contents = getFlag(stdin, stdinKeys, "contents", mustBeStringOrUint8Array); - let resolveDir = getFlag(stdin, stdinKeys, "resolveDir", mustBeString); - let sourcefile = getFlag(stdin, stdinKeys, "sourcefile", mustBeString); - let loader2 = getFlag(stdin, stdinKeys, "loader", mustBeString); - checkForInvalidFlags(stdin, stdinKeys, 'in "stdin" object'); - if (sourcefile) flags.push(`--sourcefile=${sourcefile}`); - if (loader2) flags.push(`--loader=${loader2}`); - if (resolveDir) stdinResolveDir = resolveDir; - if (typeof contents === "string") stdinContents = encodeUTF8(contents); - else if (contents instanceof Uint8Array) stdinContents = contents; - } - let nodePaths = []; - if (nodePathsInput) { - for (let value of nodePathsInput) { - value += ""; - nodePaths.push(value); - } - } - return { - entries, - flags, - write, - stdinContents, - stdinResolveDir, - absWorkingDir, - nodePaths, - mangleCache: validateMangleCache(mangleCache) - }; -} -function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) { - let flags = []; - let keys = /* @__PURE__ */ Object.create(null); - pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); - pushCommonFlags(flags, options, keys); - let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); - let sourcefile = getFlag(options, keys, "sourcefile", mustBeString); - let loader = getFlag(options, keys, "loader", mustBeString); - let banner = getFlag(options, keys, "banner", mustBeString); - let footer = getFlag(options, keys, "footer", mustBeString); - let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); - checkForInvalidFlags(options, keys, `in ${callName}() call`); - if (sourcemap) flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`); - if (sourcefile) flags.push(`--sourcefile=${sourcefile}`); - if (loader) flags.push(`--loader=${loader}`); - if (banner) flags.push(`--banner=${banner}`); - if (footer) flags.push(`--footer=${footer}`); - return { - flags, - mangleCache: validateMangleCache(mangleCache) - }; -} -function createChannel(streamIn) { - const requestCallbacksByKey = {}; - const closeData = { didClose: false, reason: "" }; - let responseCallbacks = {}; - let nextRequestID = 0; - let nextBuildKey = 0; - let stdout = new Uint8Array(16 * 1024); - let stdoutUsed = 0; - let readFromStdout = (chunk) => { - let limit = stdoutUsed + chunk.length; - if (limit > stdout.length) { - let swap = new Uint8Array(limit * 2); - swap.set(stdout); - stdout = swap; - } - stdout.set(chunk, stdoutUsed); - stdoutUsed += chunk.length; - let offset = 0; - while (offset + 4 <= stdoutUsed) { - let length = readUInt32LE(stdout, offset); - if (offset + 4 + length > stdoutUsed) { - break; - } - offset += 4; - handleIncomingPacket(stdout.subarray(offset, offset + length)); - offset += length; - } - if (offset > 0) { - stdout.copyWithin(0, offset, stdoutUsed); - stdoutUsed -= offset; - } - }; - let afterClose = (error) => { - closeData.didClose = true; - if (error) closeData.reason = ": " + (error.message || error); - const text = "The service was stopped" + closeData.reason; - for (let id in responseCallbacks) { - responseCallbacks[id](text, null); - } - responseCallbacks = {}; - }; - let sendRequest = (refs, value, callback) => { - if (closeData.didClose) return callback("The service is no longer running" + closeData.reason, null); - let id = nextRequestID++; - responseCallbacks[id] = (error, response) => { - try { - callback(error, response); - } finally { - if (refs) refs.unref(); - } - }; - if (refs) refs.ref(); - streamIn.writeToStdin(encodePacket({ id, isRequest: true, value })); - }; - let sendResponse = (id, value) => { - if (closeData.didClose) throw new Error("The service is no longer running" + closeData.reason); - streamIn.writeToStdin(encodePacket({ id, isRequest: false, value })); - }; - let handleRequest = async (id, request) => { - try { - if (request.command === "ping") { - sendResponse(id, {}); - return; - } - if (typeof request.key === "number") { - const requestCallbacks = requestCallbacksByKey[request.key]; - if (!requestCallbacks) { - return; - } - const callback = requestCallbacks[request.command]; - if (callback) { - await callback(id, request); - return; - } - } - throw new Error(`Invalid command: ` + request.command); - } catch (e) { - const errors = [extractErrorMessageV8(e, streamIn, null, void 0, "")]; - try { - sendResponse(id, { errors }); - } catch { - } - } - }; - let isFirstPacket = true; - let handleIncomingPacket = (bytes) => { - if (isFirstPacket) { - isFirstPacket = false; - let binaryVersion = String.fromCharCode(...bytes); - if (binaryVersion !== "0.24.2") { - throw new Error(`Cannot start service: Host version "${"0.24.2"}" does not match binary version ${quote(binaryVersion)}`); - } - return; - } - let packet = decodePacket(bytes); - if (packet.isRequest) { - handleRequest(packet.id, packet.value); - } else { - let callback = responseCallbacks[packet.id]; - delete responseCallbacks[packet.id]; - if (packet.value.error) callback(packet.value.error, {}); - else callback(null, packet.value); - } - }; - let buildOrContext = ({ callName, refs, options, isTTY: isTTY2, defaultWD: defaultWD2, callback }) => { - let refCount = 0; - const buildKey = nextBuildKey++; - const requestCallbacks = {}; - const buildRefs = { - ref() { - if (++refCount === 1) { - if (refs) refs.ref(); - } - }, - unref() { - if (--refCount === 0) { - delete requestCallbacksByKey[buildKey]; - if (refs) refs.unref(); - } - } - }; - requestCallbacksByKey[buildKey] = requestCallbacks; - buildRefs.ref(); - buildOrContextImpl( - callName, - buildKey, - sendRequest, - sendResponse, - buildRefs, - streamIn, - requestCallbacks, - options, - isTTY2, - defaultWD2, - (err, res) => { - try { - callback(err, res); - } finally { - buildRefs.unref(); - } - } - ); - }; - let transform2 = ({ callName, refs, input, options, isTTY: isTTY2, fs: fs3, callback }) => { - const details = createObjectStash(); - let start = (inputPath) => { - try { - if (typeof input !== "string" && !(input instanceof Uint8Array)) - throw new Error('The input to "transform" must be a string or a Uint8Array'); - let { - flags, - mangleCache - } = flagsForTransformOptions(callName, options, isTTY2, transformLogLevelDefault); - let request = { - command: "transform", - flags, - inputFS: inputPath !== null, - input: inputPath !== null ? encodeUTF8(inputPath) : typeof input === "string" ? encodeUTF8(input) : input - }; - if (mangleCache) request.mangleCache = mangleCache; - sendRequest(refs, request, (error, response) => { - if (error) return callback(new Error(error), null); - let errors = replaceDetailsInMessages(response.errors, details); - let warnings = replaceDetailsInMessages(response.warnings, details); - let outstanding = 1; - let next = () => { - if (--outstanding === 0) { - let result = { - warnings, - code: response.code, - map: response.map, - mangleCache: void 0, - legalComments: void 0 - }; - if ("legalComments" in response) result.legalComments = response == null ? void 0 : response.legalComments; - if (response.mangleCache) result.mangleCache = response == null ? void 0 : response.mangleCache; - callback(null, result); - } - }; - if (errors.length > 0) return callback(failureErrorWithLog("Transform failed", errors, warnings), null); - if (response.codeFS) { - outstanding++; - fs3.readFile(response.code, (err, contents) => { - if (err !== null) { - callback(err, null); - } else { - response.code = contents; - next(); - } - }); - } - if (response.mapFS) { - outstanding++; - fs3.readFile(response.map, (err, contents) => { - if (err !== null) { - callback(err, null); - } else { - response.map = contents; - next(); - } - }); - } - next(); - }); - } catch (e) { - let flags = []; - try { - pushLogFlags(flags, options, {}, isTTY2, transformLogLevelDefault); - } catch { - } - const error = extractErrorMessageV8(e, streamIn, details, void 0, ""); - sendRequest(refs, { command: "error", flags, error }, () => { - error.detail = details.load(error.detail); - callback(failureErrorWithLog("Transform failed", [error], []), null); - }); - } - }; - if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) { - let next = start; - start = () => fs3.writeFile(input, next); - } - start(null); - }; - let formatMessages2 = ({ callName, refs, messages, options, callback }) => { - if (!options) throw new Error(`Missing second argument in ${callName}() call`); - let keys = {}; - let kind = getFlag(options, keys, "kind", mustBeString); - let color = getFlag(options, keys, "color", mustBeBoolean); - let terminalWidth = getFlag(options, keys, "terminalWidth", mustBeInteger); - checkForInvalidFlags(options, keys, `in ${callName}() call`); - if (kind === void 0) throw new Error(`Missing "kind" in ${callName}() call`); - if (kind !== "error" && kind !== "warning") throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`); - let request = { - command: "format-msgs", - messages: sanitizeMessages(messages, "messages", null, "", terminalWidth), - isWarning: kind === "warning" - }; - if (color !== void 0) request.color = color; - if (terminalWidth !== void 0) request.terminalWidth = terminalWidth; - sendRequest(refs, request, (error, response) => { - if (error) return callback(new Error(error), null); - callback(null, response.messages); - }); - }; - let analyzeMetafile2 = ({ callName, refs, metafile, options, callback }) => { - if (options === void 0) options = {}; - let keys = {}; - let color = getFlag(options, keys, "color", mustBeBoolean); - let verbose = getFlag(options, keys, "verbose", mustBeBoolean); - checkForInvalidFlags(options, keys, `in ${callName}() call`); - let request = { - command: "analyze-metafile", - metafile - }; - if (color !== void 0) request.color = color; - if (verbose !== void 0) request.verbose = verbose; - sendRequest(refs, request, (error, response) => { - if (error) return callback(new Error(error), null); - callback(null, response.result); - }); - }; - return { - readFromStdout, - afterClose, - service: { - buildOrContext, - transform: transform2, - formatMessages: formatMessages2, - analyzeMetafile: analyzeMetafile2 - } - }; -} -function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, options, isTTY2, defaultWD2, callback) { - const details = createObjectStash(); - const isContext = callName === "context"; - const handleError = (e, pluginName) => { - const flags = []; - try { - pushLogFlags(flags, options, {}, isTTY2, buildLogLevelDefault); - } catch { - } - const message = extractErrorMessageV8(e, streamIn, details, void 0, pluginName); - sendRequest(refs, { command: "error", flags, error: message }, () => { - message.detail = details.load(message.detail); - callback(failureErrorWithLog(isContext ? "Context failed" : "Build failed", [message], []), null); - }); - }; - let plugins; - if (typeof options === "object") { - const value = options.plugins; - if (value !== void 0) { - if (!Array.isArray(value)) return handleError(new Error(`"plugins" must be an array`), ""); - plugins = value; - } - } - if (plugins && plugins.length > 0) { - if (streamIn.isSync) return handleError(new Error("Cannot use plugins in synchronous API calls"), ""); - handlePlugins( - buildKey, - sendRequest, - sendResponse, - refs, - streamIn, - requestCallbacks, - options, - plugins, - details - ).then( - (result) => { - if (!result.ok) return handleError(result.error, result.pluginName); - try { - buildOrContextContinue(result.requestPlugins, result.runOnEndCallbacks, result.scheduleOnDisposeCallbacks); - } catch (e) { - handleError(e, ""); - } - }, - (e) => handleError(e, "") - ); - return; - } - try { - buildOrContextContinue(null, (result, done) => done([], []), () => { - }); - } catch (e) { - handleError(e, ""); - } - function buildOrContextContinue(requestPlugins, runOnEndCallbacks, scheduleOnDisposeCallbacks) { - const writeDefault = streamIn.hasFS; - const { - entries, - flags, - write, - stdinContents, - stdinResolveDir, - absWorkingDir, - nodePaths, - mangleCache - } = flagsForBuildOptions(callName, options, isTTY2, buildLogLevelDefault, writeDefault); - if (write && !streamIn.hasFS) throw new Error(`The "write" option is unavailable in this environment`); - const request = { - command: "build", - key: buildKey, - entries, - flags, - write, - stdinContents, - stdinResolveDir, - absWorkingDir: absWorkingDir || defaultWD2, - nodePaths, - context: isContext - }; - if (requestPlugins) request.plugins = requestPlugins; - if (mangleCache) request.mangleCache = mangleCache; - const buildResponseToResult = (response, callback2) => { - const result = { - errors: replaceDetailsInMessages(response.errors, details), - warnings: replaceDetailsInMessages(response.warnings, details), - outputFiles: void 0, - metafile: void 0, - mangleCache: void 0 - }; - const originalErrors = result.errors.slice(); - const originalWarnings = result.warnings.slice(); - if (response.outputFiles) result.outputFiles = response.outputFiles.map(convertOutputFiles); - if (response.metafile) result.metafile = JSON.parse(response.metafile); - if (response.mangleCache) result.mangleCache = response.mangleCache; - if (response.writeToStdout !== void 0) console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, "")); - runOnEndCallbacks(result, (onEndErrors, onEndWarnings) => { - if (originalErrors.length > 0 || onEndErrors.length > 0) { - const error = failureErrorWithLog("Build failed", originalErrors.concat(onEndErrors), originalWarnings.concat(onEndWarnings)); - return callback2(error, null, onEndErrors, onEndWarnings); - } - callback2(null, result, onEndErrors, onEndWarnings); - }); - }; - let latestResultPromise; - let provideLatestResult; - if (isContext) - requestCallbacks["on-end"] = (id, request2) => new Promise((resolve) => { - buildResponseToResult(request2, (err, result, onEndErrors, onEndWarnings) => { - const response = { - errors: onEndErrors, - warnings: onEndWarnings - }; - if (provideLatestResult) provideLatestResult(err, result); - latestResultPromise = void 0; - provideLatestResult = void 0; - sendResponse(id, response); - resolve(); - }); - }); - sendRequest(refs, request, (error, response) => { - if (error) return callback(new Error(error), null); - if (!isContext) { - return buildResponseToResult(response, (err, res) => { - scheduleOnDisposeCallbacks(); - return callback(err, res); - }); - } - if (response.errors.length > 0) { - return callback(failureErrorWithLog("Context failed", response.errors, response.warnings), null); - } - let didDispose = false; - const result = { - rebuild: () => { - if (!latestResultPromise) latestResultPromise = new Promise((resolve, reject) => { - let settlePromise; - provideLatestResult = (err, result2) => { - if (!settlePromise) settlePromise = () => err ? reject(err) : resolve(result2); - }; - const triggerAnotherBuild = () => { - const request2 = { - command: "rebuild", - key: buildKey - }; - sendRequest(refs, request2, (error2, response2) => { - if (error2) { - reject(new Error(error2)); - } else if (settlePromise) { - settlePromise(); - } else { - triggerAnotherBuild(); - } - }); - }; - triggerAnotherBuild(); - }); - return latestResultPromise; - }, - watch: (options2 = {}) => new Promise((resolve, reject) => { - if (!streamIn.hasFS) throw new Error(`Cannot use the "watch" API in this environment`); - const keys = {}; - checkForInvalidFlags(options2, keys, `in watch() call`); - const request2 = { - command: "watch", - key: buildKey - }; - sendRequest(refs, request2, (error2) => { - if (error2) reject(new Error(error2)); - else resolve(void 0); - }); - }), - serve: (options2 = {}) => new Promise((resolve, reject) => { - if (!streamIn.hasFS) throw new Error(`Cannot use the "serve" API in this environment`); - const keys = {}; - const port = getFlag(options2, keys, "port", mustBeInteger); - const host = getFlag(options2, keys, "host", mustBeString); - const servedir = getFlag(options2, keys, "servedir", mustBeString); - const keyfile = getFlag(options2, keys, "keyfile", mustBeString); - const certfile = getFlag(options2, keys, "certfile", mustBeString); - const fallback = getFlag(options2, keys, "fallback", mustBeString); - const onRequest = getFlag(options2, keys, "onRequest", mustBeFunction); - checkForInvalidFlags(options2, keys, `in serve() call`); - const request2 = { - command: "serve", - key: buildKey, - onRequest: !!onRequest - }; - if (port !== void 0) request2.port = port; - if (host !== void 0) request2.host = host; - if (servedir !== void 0) request2.servedir = servedir; - if (keyfile !== void 0) request2.keyfile = keyfile; - if (certfile !== void 0) request2.certfile = certfile; - if (fallback !== void 0) request2.fallback = fallback; - sendRequest(refs, request2, (error2, response2) => { - if (error2) return reject(new Error(error2)); - if (onRequest) { - requestCallbacks["serve-request"] = (id, request3) => { - onRequest(request3.args); - sendResponse(id, {}); - }; - } - resolve(response2); - }); - }), - cancel: () => new Promise((resolve) => { - if (didDispose) return resolve(); - const request2 = { - command: "cancel", - key: buildKey - }; - sendRequest(refs, request2, () => { - resolve(); - }); - }), - dispose: () => new Promise((resolve) => { - if (didDispose) return resolve(); - didDispose = true; - const request2 = { - command: "dispose", - key: buildKey - }; - sendRequest(refs, request2, () => { - resolve(); - scheduleOnDisposeCallbacks(); - refs.unref(); - }); - }) - }; - refs.ref(); - callback(null, result); - }); - } -} -var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, initialOptions, plugins, details) => { - let onStartCallbacks = []; - let onEndCallbacks = []; - let onResolveCallbacks = {}; - let onLoadCallbacks = {}; - let onDisposeCallbacks = []; - let nextCallbackID = 0; - let i = 0; - let requestPlugins = []; - let isSetupDone = false; - plugins = [...plugins]; - for (let item of plugins) { - let keys = {}; - if (typeof item !== "object") throw new Error(`Plugin at index ${i} must be an object`); - const name = getFlag(item, keys, "name", mustBeString); - if (typeof name !== "string" || name === "") throw new Error(`Plugin at index ${i} is missing a name`); - try { - let setup = getFlag(item, keys, "setup", mustBeFunction); - if (typeof setup !== "function") throw new Error(`Plugin is missing a setup function`); - checkForInvalidFlags(item, keys, `on plugin ${quote(name)}`); - let plugin = { - name, - onStart: false, - onEnd: false, - onResolve: [], - onLoad: [] - }; - i++; - let resolve = (path3, options = {}) => { - if (!isSetupDone) throw new Error('Cannot call "resolve" before plugin setup has completed'); - if (typeof path3 !== "string") throw new Error(`The path to resolve must be a string`); - let keys2 = /* @__PURE__ */ Object.create(null); - let pluginName = getFlag(options, keys2, "pluginName", mustBeString); - let importer = getFlag(options, keys2, "importer", mustBeString); - let namespace = getFlag(options, keys2, "namespace", mustBeString); - let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString); - let kind = getFlag(options, keys2, "kind", mustBeString); - let pluginData = getFlag(options, keys2, "pluginData", canBeAnything); - let importAttributes = getFlag(options, keys2, "with", mustBeObject); - checkForInvalidFlags(options, keys2, "in resolve() call"); - return new Promise((resolve2, reject) => { - const request = { - command: "resolve", - path: path3, - key: buildKey, - pluginName: name - }; - if (pluginName != null) request.pluginName = pluginName; - if (importer != null) request.importer = importer; - if (namespace != null) request.namespace = namespace; - if (resolveDir != null) request.resolveDir = resolveDir; - if (kind != null) request.kind = kind; - else throw new Error(`Must specify "kind" when calling "resolve"`); - if (pluginData != null) request.pluginData = details.store(pluginData); - if (importAttributes != null) request.with = sanitizeStringMap(importAttributes, "with"); - sendRequest(refs, request, (error, response) => { - if (error !== null) reject(new Error(error)); - else resolve2({ - errors: replaceDetailsInMessages(response.errors, details), - warnings: replaceDetailsInMessages(response.warnings, details), - path: response.path, - external: response.external, - sideEffects: response.sideEffects, - namespace: response.namespace, - suffix: response.suffix, - pluginData: details.load(response.pluginData) - }); - }); - }); - }; - let promise = setup({ - initialOptions, - resolve, - onStart(callback) { - let registeredText = `This error came from the "onStart" callback registered here:`; - let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart"); - onStartCallbacks.push({ name, callback, note: registeredNote }); - plugin.onStart = true; - }, - onEnd(callback) { - let registeredText = `This error came from the "onEnd" callback registered here:`; - let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd"); - onEndCallbacks.push({ name, callback, note: registeredNote }); - plugin.onEnd = true; - }, - onResolve(options, callback) { - let registeredText = `This error came from the "onResolve" callback registered here:`; - let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve"); - let keys2 = {}; - let filter = getFlag(options, keys2, "filter", mustBeRegExp); - let namespace = getFlag(options, keys2, "namespace", mustBeString); - checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${quote(name)}`); - if (filter == null) throw new Error(`onResolve() call is missing a filter`); - let id = nextCallbackID++; - onResolveCallbacks[id] = { name, callback, note: registeredNote }; - plugin.onResolve.push({ id, filter: filter.source, namespace: namespace || "" }); - }, - onLoad(options, callback) { - let registeredText = `This error came from the "onLoad" callback registered here:`; - let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad"); - let keys2 = {}; - let filter = getFlag(options, keys2, "filter", mustBeRegExp); - let namespace = getFlag(options, keys2, "namespace", mustBeString); - checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${quote(name)}`); - if (filter == null) throw new Error(`onLoad() call is missing a filter`); - let id = nextCallbackID++; - onLoadCallbacks[id] = { name, callback, note: registeredNote }; - plugin.onLoad.push({ id, filter: filter.source, namespace: namespace || "" }); - }, - onDispose(callback) { - onDisposeCallbacks.push(callback); - }, - esbuild: streamIn.esbuild - }); - if (promise) await promise; - requestPlugins.push(plugin); - } catch (e) { - return { ok: false, error: e, pluginName: name }; - } - } - requestCallbacks["on-start"] = async (id, request) => { - details.clear(); - let response = { errors: [], warnings: [] }; - await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => { - try { - let result = await callback(); - if (result != null) { - if (typeof result !== "object") throw new Error(`Expected onStart() callback in plugin ${quote(name)} to return an object`); - let keys = {}; - let errors = getFlag(result, keys, "errors", mustBeArray); - let warnings = getFlag(result, keys, "warnings", mustBeArray); - checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${quote(name)}`); - if (errors != null) response.errors.push(...sanitizeMessages(errors, "errors", details, name, void 0)); - if (warnings != null) response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name, void 0)); - } - } catch (e) { - response.errors.push(extractErrorMessageV8(e, streamIn, details, note && note(), name)); - } - })); - sendResponse(id, response); - }; - requestCallbacks["on-resolve"] = async (id, request) => { - let response = {}, name = "", callback, note; - for (let id2 of request.ids) { - try { - ({ name, callback, note } = onResolveCallbacks[id2]); - let result = await callback({ - path: request.path, - importer: request.importer, - namespace: request.namespace, - resolveDir: request.resolveDir, - kind: request.kind, - pluginData: details.load(request.pluginData), - with: request.with - }); - if (result != null) { - if (typeof result !== "object") throw new Error(`Expected onResolve() callback in plugin ${quote(name)} to return an object`); - let keys = {}; - let pluginName = getFlag(result, keys, "pluginName", mustBeString); - let path3 = getFlag(result, keys, "path", mustBeString); - let namespace = getFlag(result, keys, "namespace", mustBeString); - let suffix = getFlag(result, keys, "suffix", mustBeString); - let external = getFlag(result, keys, "external", mustBeBoolean); - let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean); - let pluginData = getFlag(result, keys, "pluginData", canBeAnything); - let errors = getFlag(result, keys, "errors", mustBeArray); - let warnings = getFlag(result, keys, "warnings", mustBeArray); - let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray); - let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray); - checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${quote(name)}`); - response.id = id2; - if (pluginName != null) response.pluginName = pluginName; - if (path3 != null) response.path = path3; - if (namespace != null) response.namespace = namespace; - if (suffix != null) response.suffix = suffix; - if (external != null) response.external = external; - if (sideEffects != null) response.sideEffects = sideEffects; - if (pluginData != null) response.pluginData = details.store(pluginData); - if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0); - if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); - if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); - if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); - break; - } - } catch (e) { - response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; - break; - } - } - sendResponse(id, response); - }; - requestCallbacks["on-load"] = async (id, request) => { - let response = {}, name = "", callback, note; - for (let id2 of request.ids) { - try { - ({ name, callback, note } = onLoadCallbacks[id2]); - let result = await callback({ - path: request.path, - namespace: request.namespace, - suffix: request.suffix, - pluginData: details.load(request.pluginData), - with: request.with - }); - if (result != null) { - if (typeof result !== "object") throw new Error(`Expected onLoad() callback in plugin ${quote(name)} to return an object`); - let keys = {}; - let pluginName = getFlag(result, keys, "pluginName", mustBeString); - let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array); - let resolveDir = getFlag(result, keys, "resolveDir", mustBeString); - let pluginData = getFlag(result, keys, "pluginData", canBeAnything); - let loader = getFlag(result, keys, "loader", mustBeString); - let errors = getFlag(result, keys, "errors", mustBeArray); - let warnings = getFlag(result, keys, "warnings", mustBeArray); - let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray); - let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray); - checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${quote(name)}`); - response.id = id2; - if (pluginName != null) response.pluginName = pluginName; - if (contents instanceof Uint8Array) response.contents = contents; - else if (contents != null) response.contents = encodeUTF8(contents); - if (resolveDir != null) response.resolveDir = resolveDir; - if (pluginData != null) response.pluginData = details.store(pluginData); - if (loader != null) response.loader = loader; - if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0); - if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); - if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); - if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); - break; - } - } catch (e) { - response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; - break; - } - } - sendResponse(id, response); - }; - let runOnEndCallbacks = (result, done) => done([], []); - if (onEndCallbacks.length > 0) { - runOnEndCallbacks = (result, done) => { - (async () => { - const onEndErrors = []; - const onEndWarnings = []; - for (const { name, callback, note } of onEndCallbacks) { - let newErrors; - let newWarnings; - try { - const value = await callback(result); - if (value != null) { - if (typeof value !== "object") throw new Error(`Expected onEnd() callback in plugin ${quote(name)} to return an object`); - let keys = {}; - let errors = getFlag(value, keys, "errors", mustBeArray); - let warnings = getFlag(value, keys, "warnings", mustBeArray); - checkForInvalidFlags(value, keys, `from onEnd() callback in plugin ${quote(name)}`); - if (errors != null) newErrors = sanitizeMessages(errors, "errors", details, name, void 0); - if (warnings != null) newWarnings = sanitizeMessages(warnings, "warnings", details, name, void 0); - } - } catch (e) { - newErrors = [extractErrorMessageV8(e, streamIn, details, note && note(), name)]; - } - if (newErrors) { - onEndErrors.push(...newErrors); - try { - result.errors.push(...newErrors); - } catch { - } - } - if (newWarnings) { - onEndWarnings.push(...newWarnings); - try { - result.warnings.push(...newWarnings); - } catch { - } - } - } - done(onEndErrors, onEndWarnings); - })(); - }; - } - let scheduleOnDisposeCallbacks = () => { - for (const cb of onDisposeCallbacks) { - setTimeout(() => cb(), 0); - } - }; - isSetupDone = true; - return { - ok: true, - requestPlugins, - runOnEndCallbacks, - scheduleOnDisposeCallbacks - }; -}; -function createObjectStash() { - const map = /* @__PURE__ */ new Map(); - let nextID = 0; - return { - clear() { - map.clear(); - }, - load(id) { - return map.get(id); - }, - store(value) { - if (value === void 0) return -1; - const id = nextID++; - map.set(id, value); - return id; - } - }; -} -function extractCallerV8(e, streamIn, ident) { - let note; - let tried = false; - return () => { - if (tried) return note; - tried = true; - try { - let lines = (e.stack + "").split("\n"); - lines.splice(1, 1); - let location = parseStackLinesV8(streamIn, lines, ident); - if (location) { - note = { text: e.message, location }; - return note; - } - } catch { - } - }; -} -function extractErrorMessageV8(e, streamIn, stash, note, pluginName) { - let text = "Internal error"; - let location = null; - try { - text = (e && e.message || e) + ""; - } catch { - } - try { - location = parseStackLinesV8(streamIn, (e.stack + "").split("\n"), ""); - } catch { - } - return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 }; -} -function parseStackLinesV8(streamIn, lines, ident) { - let at = " at "; - if (streamIn.readFileSync && !lines[0].startsWith(at) && lines[1].startsWith(at)) { - for (let i = 1; i < lines.length; i++) { - let line = lines[i]; - if (!line.startsWith(at)) continue; - line = line.slice(at.length); - while (true) { - let match = /^(?:new |async )?\S+ \((.*)\)$/.exec(line); - if (match) { - line = match[1]; - continue; - } - match = /^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(line); - if (match) { - line = match[1]; - continue; - } - match = /^(\S+):(\d+):(\d+)$/.exec(line); - if (match) { - let contents; - try { - contents = streamIn.readFileSync(match[1], "utf8"); - } catch { - break; - } - let lineText = contents.split(/\r\n|\r|\n|\u2028|\u2029/)[+match[2] - 1] || ""; - let column = +match[3] - 1; - let length = lineText.slice(column, column + ident.length) === ident ? ident.length : 0; - return { - file: match[1], - namespace: "file", - line: +match[2], - column: encodeUTF8(lineText.slice(0, column)).length, - length: encodeUTF8(lineText.slice(column, column + length)).length, - lineText: lineText + "\n" + lines.slice(1).join("\n"), - suggestion: "" - }; - } - break; - } - } - } - return null; -} -function failureErrorWithLog(text, errors, warnings) { - let limit = 5; - text += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => { - if (i === limit) return "\n..."; - if (!e.location) return ` -error: ${e.text}`; - let { file, line, column } = e.location; - let pluginText = e.pluginName ? `[plugin: ${e.pluginName}] ` : ""; - return ` -${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`; - }).join(""); - let error = new Error(text); - for (const [key, value] of [["errors", errors], ["warnings", warnings]]) { - Object.defineProperty(error, key, { - configurable: true, - enumerable: true, - get: () => value, - set: (value2) => Object.defineProperty(error, key, { - configurable: true, - enumerable: true, - value: value2 - }) - }); - } - return error; -} -function replaceDetailsInMessages(messages, stash) { - for (const message of messages) { - message.detail = stash.load(message.detail); - } - return messages; -} -function sanitizeLocation(location, where, terminalWidth) { - if (location == null) return null; - let keys = {}; - let file = getFlag(location, keys, "file", mustBeString); - let namespace = getFlag(location, keys, "namespace", mustBeString); - let line = getFlag(location, keys, "line", mustBeInteger); - let column = getFlag(location, keys, "column", mustBeInteger); - let length = getFlag(location, keys, "length", mustBeInteger); - let lineText = getFlag(location, keys, "lineText", mustBeString); - let suggestion = getFlag(location, keys, "suggestion", mustBeString); - checkForInvalidFlags(location, keys, where); - if (lineText) { - const relevantASCII = lineText.slice( - 0, - (column && column > 0 ? column : 0) + (length && length > 0 ? length : 0) + (terminalWidth && terminalWidth > 0 ? terminalWidth : 80) - ); - if (!/[\x7F-\uFFFF]/.test(relevantASCII) && !/\n/.test(lineText)) { - lineText = relevantASCII; - } - } - return { - file: file || "", - namespace: namespace || "", - line: line || 0, - column: column || 0, - length: length || 0, - lineText: lineText || "", - suggestion: suggestion || "" - }; -} -function sanitizeMessages(messages, property, stash, fallbackPluginName, terminalWidth) { - let messagesClone = []; - let index = 0; - for (const message of messages) { - let keys = {}; - let id = getFlag(message, keys, "id", mustBeString); - let pluginName = getFlag(message, keys, "pluginName", mustBeString); - let text = getFlag(message, keys, "text", mustBeString); - let location = getFlag(message, keys, "location", mustBeObjectOrNull); - let notes = getFlag(message, keys, "notes", mustBeArray); - let detail = getFlag(message, keys, "detail", canBeAnything); - let where = `in element ${index} of "${property}"`; - checkForInvalidFlags(message, keys, where); - let notesClone = []; - if (notes) { - for (const note of notes) { - let noteKeys = {}; - let noteText = getFlag(note, noteKeys, "text", mustBeString); - let noteLocation = getFlag(note, noteKeys, "location", mustBeObjectOrNull); - checkForInvalidFlags(note, noteKeys, where); - notesClone.push({ - text: noteText || "", - location: sanitizeLocation(noteLocation, where, terminalWidth) - }); - } - } - messagesClone.push({ - id: id || "", - pluginName: pluginName || fallbackPluginName, - text: text || "", - location: sanitizeLocation(location, where, terminalWidth), - notes: notesClone, - detail: stash ? stash.store(detail) : -1 - }); - index++; - } - return messagesClone; -} -function sanitizeStringArray(values, property) { - const result = []; - for (const value of values) { - if (typeof value !== "string") throw new Error(`${quote(property)} must be an array of strings`); - result.push(value); - } - return result; -} -function sanitizeStringMap(map, property) { - const result = /* @__PURE__ */ Object.create(null); - for (const key in map) { - const value = map[key]; - if (typeof value !== "string") throw new Error(`key ${quote(key)} in object ${quote(property)} must be a string`); - result[key] = value; - } - return result; -} -function convertOutputFiles({ path: path3, contents, hash }) { - let text = null; - return { - path: path3, - contents, - hash, - get text() { - const binary = this.contents; - if (text === null || binary !== contents) { - contents = binary; - text = decodeUTF8(binary); - } - return text; - } - }; -} - -// lib/npm/node-platform.ts -var fs = require("fs"); -var os = require("os"); -var path = require("path"); -var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; -var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; -var packageDarwin_arm64 = "@esbuild/darwin-arm64"; -var packageDarwin_x64 = "@esbuild/darwin-x64"; -var knownWindowsPackages = { - "win32 arm64 LE": "@esbuild/win32-arm64", - "win32 ia32 LE": "@esbuild/win32-ia32", - "win32 x64 LE": "@esbuild/win32-x64" -}; -var knownUnixlikePackages = { - "aix ppc64 BE": "@esbuild/aix-ppc64", - "android arm64 LE": "@esbuild/android-arm64", - "darwin arm64 LE": "@esbuild/darwin-arm64", - "darwin x64 LE": "@esbuild/darwin-x64", - "freebsd arm64 LE": "@esbuild/freebsd-arm64", - "freebsd x64 LE": "@esbuild/freebsd-x64", - "linux arm LE": "@esbuild/linux-arm", - "linux arm64 LE": "@esbuild/linux-arm64", - "linux ia32 LE": "@esbuild/linux-ia32", - "linux mips64el LE": "@esbuild/linux-mips64el", - "linux ppc64 LE": "@esbuild/linux-ppc64", - "linux riscv64 LE": "@esbuild/linux-riscv64", - "linux s390x BE": "@esbuild/linux-s390x", - "linux x64 LE": "@esbuild/linux-x64", - "linux loong64 LE": "@esbuild/linux-loong64", - "netbsd arm64 LE": "@esbuild/netbsd-arm64", - "netbsd x64 LE": "@esbuild/netbsd-x64", - "openbsd arm64 LE": "@esbuild/openbsd-arm64", - "openbsd x64 LE": "@esbuild/openbsd-x64", - "sunos x64 LE": "@esbuild/sunos-x64" -}; -var knownWebAssemblyFallbackPackages = { - "android arm LE": "@esbuild/android-arm", - "android x64 LE": "@esbuild/android-x64" -}; -function pkgAndSubpathForCurrentPlatform() { - let pkg; - let subpath; - let isWASM = false; - let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; - if (platformKey in knownWindowsPackages) { - pkg = knownWindowsPackages[platformKey]; - subpath = "esbuild.exe"; - } else if (platformKey in knownUnixlikePackages) { - pkg = knownUnixlikePackages[platformKey]; - subpath = "bin/esbuild"; - } else if (platformKey in knownWebAssemblyFallbackPackages) { - pkg = knownWebAssemblyFallbackPackages[platformKey]; - subpath = "bin/esbuild"; - isWASM = true; - } else { - throw new Error(`Unsupported platform: ${platformKey}`); - } - return { pkg, subpath, isWASM }; -} -function pkgForSomeOtherPlatform() { - const libMainJS = require.resolve("esbuild"); - const nodeModulesDirectory = path.dirname(path.dirname(path.dirname(libMainJS))); - if (path.basename(nodeModulesDirectory) === "node_modules") { - for (const unixKey in knownUnixlikePackages) { - try { - const pkg = knownUnixlikePackages[unixKey]; - if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; - } catch { - } - } - for (const windowsKey in knownWindowsPackages) { - try { - const pkg = knownWindowsPackages[windowsKey]; - if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; - } catch { - } - } - } - return null; -} -function downloadedBinPath(pkg, subpath) { - const esbuildLibDir = path.dirname(require.resolve("esbuild")); - return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); -} -function generateBinPath() { - if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { - if (!fs.existsSync(ESBUILD_BINARY_PATH)) { - console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); - } else { - return { binPath: ESBUILD_BINARY_PATH, isWASM: false }; - } - } - const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform(); - let binPath; - try { - binPath = require.resolve(`${pkg}/${subpath}`); - } catch (e) { - binPath = downloadedBinPath(pkg, subpath); - if (!fs.existsSync(binPath)) { - try { - require.resolve(pkg); - } catch { - const otherPkg = pkgForSomeOtherPlatform(); - if (otherPkg) { - let suggestions = ` -Specifically the "${otherPkg}" package is present but this platform -needs the "${pkg}" package instead. People often get into this -situation by installing esbuild on Windows or macOS and copying "node_modules" -into a Docker image that runs Linux, or by copying "node_modules" between -Windows and WSL environments. - -If you are installing with npm, you can try not copying the "node_modules" -directory when you copy the files over, and running "npm ci" or "npm install" -on the destination platform after the copy. Or you could consider using yarn -instead of npm which has built-in support for installing a package on multiple -platforms simultaneously. - -If you are installing with yarn, you can try listing both this platform and the -other platform in your ".yarnrc.yml" file using the "supportedArchitectures" -feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures -Keep in mind that this means multiple copies of esbuild will be present. -`; - if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) { - suggestions = ` -Specifically the "${otherPkg}" package is present but this platform -needs the "${pkg}" package instead. People often get into this -situation by installing esbuild with npm running inside of Rosetta 2 and then -trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta -2 is Apple's on-the-fly x86_64-to-arm64 translation service). - -If you are installing with npm, you can try ensuring that both npm and node are -not running under Rosetta 2 and then reinstalling esbuild. This likely involves -changing how you installed npm and/or node. For example, installing node with -the universal installer here should work: https://nodejs.org/en/download/. Or -you could consider using yarn instead of npm which has built-in support for -installing a package on multiple platforms simultaneously. - -If you are installing with yarn, you can try listing both "arm64" and "x64" -in your ".yarnrc.yml" file using the "supportedArchitectures" feature: -https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures -Keep in mind that this means multiple copies of esbuild will be present. -`; - } - throw new Error(` -You installed esbuild for another platform than the one you're currently using. -This won't work because esbuild is written with native code and needs to -install a platform-specific binary executable. -${suggestions} -Another alternative is to use the "esbuild-wasm" package instead, which works -the same way on all platforms. But it comes with a heavy performance cost and -can sometimes be 10x slower than the "esbuild" package, so you may also not -want to do that. -`); - } - throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild. - -If you are installing esbuild with npm, make sure that you don't specify the -"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature -of "package.json" is used by esbuild to install the correct binary executable -for your current platform.`); - } - throw e; - } - } - if (/\.zip\//.test(binPath)) { - let pnpapi; - try { - pnpapi = require("pnpapi"); - } catch (e) { - } - if (pnpapi) { - const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation; - const binTargetPath = path.join( - root, - "node_modules", - ".cache", - "esbuild", - `pnpapi-${pkg.replace("/", "-")}-${"0.24.2"}-${path.basename(subpath)}` - ); - if (!fs.existsSync(binTargetPath)) { - fs.mkdirSync(path.dirname(binTargetPath), { recursive: true }); - fs.copyFileSync(binPath, binTargetPath); - fs.chmodSync(binTargetPath, 493); - } - return { binPath: binTargetPath, isWASM }; - } - } - return { binPath, isWASM }; -} - -// lib/npm/node.ts -var child_process = require("child_process"); -var crypto = require("crypto"); -var path2 = require("path"); -var fs2 = require("fs"); -var os2 = require("os"); -var tty = require("tty"); -var worker_threads; -if (process.env.ESBUILD_WORKER_THREADS !== "0") { - try { - worker_threads = require("worker_threads"); - } catch { - } - let [major, minor] = process.versions.node.split("."); - if ( - // <v12.17.0 does not work - +major < 12 || +major === 12 && +minor < 17 || +major === 13 && +minor < 13 - ) { - worker_threads = void 0; - } -} -var _a; -var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.24.2"; -var esbuildCommandAndArgs = () => { - if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) { - throw new Error( - `The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle. - -More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.` - ); - } - if (false) { - return ["node", [path2.join(__dirname, "..", "bin", "esbuild")]]; - } else { - const { binPath, isWASM } = generateBinPath(); - if (isWASM) { - return ["node", [binPath]]; - } else { - return [binPath, []]; - } - } -}; -var isTTY = () => tty.isatty(2); -var fsSync = { - readFile(tempFile, callback) { - try { - let contents = fs2.readFileSync(tempFile, "utf8"); - try { - fs2.unlinkSync(tempFile); - } catch { - } - callback(null, contents); - } catch (err) { - callback(err, null); - } - }, - writeFile(contents, callback) { - try { - let tempFile = randomFileName(); - fs2.writeFileSync(tempFile, contents); - callback(tempFile); - } catch { - callback(null); - } - } -}; -var fsAsync = { - readFile(tempFile, callback) { - try { - fs2.readFile(tempFile, "utf8", (err, contents) => { - try { - fs2.unlink(tempFile, () => callback(err, contents)); - } catch { - callback(err, contents); - } - }); - } catch (err) { - callback(err, null); - } - }, - writeFile(contents, callback) { - try { - let tempFile = randomFileName(); - fs2.writeFile(tempFile, contents, (err) => err !== null ? callback(null) : callback(tempFile)); - } catch { - callback(null); - } - } -}; -var version = "0.24.2"; -var build = (options) => ensureServiceIsRunning().build(options); -var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions); -var transform = (input, options) => ensureServiceIsRunning().transform(input, options); -var formatMessages = (messages, options) => ensureServiceIsRunning().formatMessages(messages, options); -var analyzeMetafile = (messages, options) => ensureServiceIsRunning().analyzeMetafile(messages, options); -var buildSync = (options) => { - if (worker_threads && !isInternalWorkerThread) { - if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); - return workerThreadService.buildSync(options); - } - let result; - runServiceSync((service) => service.buildOrContext({ - callName: "buildSync", - refs: null, - options, - isTTY: isTTY(), - defaultWD, - callback: (err, res) => { - if (err) throw err; - result = res; - } - })); - return result; -}; -var transformSync = (input, options) => { - if (worker_threads && !isInternalWorkerThread) { - if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); - return workerThreadService.transformSync(input, options); - } - let result; - runServiceSync((service) => service.transform({ - callName: "transformSync", - refs: null, - input, - options: options || {}, - isTTY: isTTY(), - fs: fsSync, - callback: (err, res) => { - if (err) throw err; - result = res; - } - })); - return result; -}; -var formatMessagesSync = (messages, options) => { - if (worker_threads && !isInternalWorkerThread) { - if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); - return workerThreadService.formatMessagesSync(messages, options); - } - let result; - runServiceSync((service) => service.formatMessages({ - callName: "formatMessagesSync", - refs: null, - messages, - options, - callback: (err, res) => { - if (err) throw err; - result = res; - } - })); - return result; -}; -var analyzeMetafileSync = (metafile, options) => { - if (worker_threads && !isInternalWorkerThread) { - if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); - return workerThreadService.analyzeMetafileSync(metafile, options); - } - let result; - runServiceSync((service) => service.analyzeMetafile({ - callName: "analyzeMetafileSync", - refs: null, - metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), - options, - callback: (err, res) => { - if (err) throw err; - result = res; - } - })); - return result; -}; -var stop = () => { - if (stopService) stopService(); - if (workerThreadService) workerThreadService.stop(); - return Promise.resolve(); -}; -var initializeWasCalled = false; -var initialize = (options) => { - options = validateInitializeOptions(options || {}); - if (options.wasmURL) throw new Error(`The "wasmURL" option only works in the browser`); - if (options.wasmModule) throw new Error(`The "wasmModule" option only works in the browser`); - if (options.worker) throw new Error(`The "worker" option only works in the browser`); - if (initializeWasCalled) throw new Error('Cannot call "initialize" more than once'); - ensureServiceIsRunning(); - initializeWasCalled = true; - return Promise.resolve(); -}; -var defaultWD = process.cwd(); -var longLivedService; -var stopService; -var ensureServiceIsRunning = () => { - if (longLivedService) return longLivedService; - let [command, args] = esbuildCommandAndArgs(); - let child = child_process.spawn(command, args.concat(`--service=${"0.24.2"}`, "--ping"), { - windowsHide: true, - stdio: ["pipe", "pipe", "inherit"], - cwd: defaultWD - }); - let { readFromStdout, afterClose, service } = createChannel({ - writeToStdin(bytes) { - child.stdin.write(bytes, (err) => { - if (err) afterClose(err); - }); - }, - readFileSync: fs2.readFileSync, - isSync: false, - hasFS: true, - esbuild: node_exports - }); - child.stdin.on("error", afterClose); - child.on("error", afterClose); - const stdin = child.stdin; - const stdout = child.stdout; - stdout.on("data", readFromStdout); - stdout.on("end", afterClose); - stopService = () => { - stdin.destroy(); - stdout.destroy(); - child.kill(); - initializeWasCalled = false; - longLivedService = void 0; - stopService = void 0; - }; - let refCount = 0; - child.unref(); - if (stdin.unref) { - stdin.unref(); - } - if (stdout.unref) { - stdout.unref(); - } - const refs = { - ref() { - if (++refCount === 1) child.ref(); - }, - unref() { - if (--refCount === 0) child.unref(); - } - }; - longLivedService = { - build: (options) => new Promise((resolve, reject) => { - service.buildOrContext({ - callName: "build", - refs, - options, - isTTY: isTTY(), - defaultWD, - callback: (err, res) => err ? reject(err) : resolve(res) - }); - }), - context: (options) => new Promise((resolve, reject) => service.buildOrContext({ - callName: "context", - refs, - options, - isTTY: isTTY(), - defaultWD, - callback: (err, res) => err ? reject(err) : resolve(res) - })), - transform: (input, options) => new Promise((resolve, reject) => service.transform({ - callName: "transform", - refs, - input, - options: options || {}, - isTTY: isTTY(), - fs: fsAsync, - callback: (err, res) => err ? reject(err) : resolve(res) - })), - formatMessages: (messages, options) => new Promise((resolve, reject) => service.formatMessages({ - callName: "formatMessages", - refs, - messages, - options, - callback: (err, res) => err ? reject(err) : resolve(res) - })), - analyzeMetafile: (metafile, options) => new Promise((resolve, reject) => service.analyzeMetafile({ - callName: "analyzeMetafile", - refs, - metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), - options, - callback: (err, res) => err ? reject(err) : resolve(res) - })) - }; - return longLivedService; -}; -var runServiceSync = (callback) => { - let [command, args] = esbuildCommandAndArgs(); - let stdin = new Uint8Array(); - let { readFromStdout, afterClose, service } = createChannel({ - writeToStdin(bytes) { - if (stdin.length !== 0) throw new Error("Must run at most one command"); - stdin = bytes; - }, - isSync: true, - hasFS: true, - esbuild: node_exports - }); - callback(service); - let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.24.2"}`), { - cwd: defaultWD, - windowsHide: true, - input: stdin, - // We don't know how large the output could be. If it's too large, the - // command will fail with ENOBUFS. Reserve 16mb for now since that feels - // like it should be enough. Also allow overriding this with an environment - // variable. - maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024 - }); - readFromStdout(stdout); - afterClose(null); -}; -var randomFileName = () => { - return path2.join(os2.tmpdir(), `esbuild-${crypto.randomBytes(32).toString("hex")}`); -}; -var workerThreadService = null; -var startWorkerThreadService = (worker_threads2) => { - let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel(); - let worker = new worker_threads2.Worker(__filename, { - workerData: { workerPort, defaultWD, esbuildVersion: "0.24.2" }, - transferList: [workerPort], - // From node's documentation: https://nodejs.org/api/worker_threads.html - // - // Take care when launching worker threads from preload scripts (scripts loaded - // and run using the `-r` command line flag). Unless the `execArgv` option is - // explicitly set, new Worker threads automatically inherit the command line flags - // from the running process and will preload the same preload scripts as the main - // thread. If the preload script unconditionally launches a worker thread, every - // thread spawned will spawn another until the application crashes. - // - execArgv: [] - }); - let nextID = 0; - let fakeBuildError = (text) => { - let error = new Error(`Build failed with 1 error: -error: ${text}`); - let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }]; - error.errors = errors; - error.warnings = []; - return error; - }; - let validateBuildSyncOptions = (options) => { - if (!options) return; - let plugins = options.plugins; - if (plugins && plugins.length > 0) throw fakeBuildError(`Cannot use plugins in synchronous API calls`); - }; - let applyProperties = (object, properties) => { - for (let key in properties) { - object[key] = properties[key]; - } - }; - let runCallSync = (command, args) => { - let id = nextID++; - let sharedBuffer = new SharedArrayBuffer(8); - let sharedBufferView = new Int32Array(sharedBuffer); - let msg = { sharedBuffer, id, command, args }; - worker.postMessage(msg); - let status = Atomics.wait(sharedBufferView, 0, 0); - if (status !== "ok" && status !== "not-equal") throw new Error("Internal error: Atomics.wait() failed: " + status); - let { message: { id: id2, resolve, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort); - if (id !== id2) throw new Error(`Internal error: Expected id ${id} but got id ${id2}`); - if (reject) { - applyProperties(reject, properties); - throw reject; - } - return resolve; - }; - worker.unref(); - return { - buildSync(options) { - validateBuildSyncOptions(options); - return runCallSync("build", [options]); - }, - transformSync(input, options) { - return runCallSync("transform", [input, options]); - }, - formatMessagesSync(messages, options) { - return runCallSync("formatMessages", [messages, options]); - }, - analyzeMetafileSync(metafile, options) { - return runCallSync("analyzeMetafile", [metafile, options]); - }, - stop() { - worker.terminate(); - workerThreadService = null; - } - }; -}; -var startSyncServiceWorker = () => { - let workerPort = worker_threads.workerData.workerPort; - let parentPort = worker_threads.parentPort; - let extractProperties = (object) => { - let properties = {}; - if (object && typeof object === "object") { - for (let key in object) { - properties[key] = object[key]; - } - } - return properties; - }; - try { - let service = ensureServiceIsRunning(); - defaultWD = worker_threads.workerData.defaultWD; - parentPort.on("message", (msg) => { - (async () => { - let { sharedBuffer, id, command, args } = msg; - let sharedBufferView = new Int32Array(sharedBuffer); - try { - switch (command) { - case "build": - workerPort.postMessage({ id, resolve: await service.build(args[0]) }); - break; - case "transform": - workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) }); - break; - case "formatMessages": - workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) }); - break; - case "analyzeMetafile": - workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) }); - break; - default: - throw new Error(`Invalid command: ${command}`); - } - } catch (reject) { - workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); - } - Atomics.add(sharedBufferView, 0, 1); - Atomics.notify(sharedBufferView, 0, Infinity); - })(); - }); - } catch (reject) { - parentPort.on("message", (msg) => { - let { sharedBuffer, id } = msg; - let sharedBufferView = new Int32Array(sharedBuffer); - workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); - Atomics.add(sharedBufferView, 0, 1); - Atomics.notify(sharedBufferView, 0, Infinity); - }); - } -}; -if (isInternalWorkerThread) { - startSyncServiceWorker(); -} -var node_default = node_exports; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - analyzeMetafile, - analyzeMetafileSync, - build, - buildSync, - context, - formatMessages, - formatMessagesSync, - initialize, - stop, - transform, - transformSync, - version -}); diff --git a/node_modules/esbuild/package.json b/node_modules/esbuild/package.json deleted file mode 100644 index 163880f..0000000 --- a/node_modules/esbuild/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "esbuild", - "version": "0.24.2", - "description": "An extremely fast JavaScript and CSS bundler and minifier.", - "repository": { - "type": "git", - "url": "git+https://github.com/evanw/esbuild.git" - }, - "scripts": { - "postinstall": "node install.js" - }, - "main": "lib/main.js", - "types": "lib/main.d.ts", - "engines": { - "node": ">=18" - }, - "bin": { - "esbuild": "bin/esbuild" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.2", - "@esbuild/android-arm": "0.24.2", - "@esbuild/android-arm64": "0.24.2", - "@esbuild/android-x64": "0.24.2", - "@esbuild/darwin-arm64": "0.24.2", - "@esbuild/darwin-x64": "0.24.2", - "@esbuild/freebsd-arm64": "0.24.2", - "@esbuild/freebsd-x64": "0.24.2", - "@esbuild/linux-arm": "0.24.2", - "@esbuild/linux-arm64": "0.24.2", - "@esbuild/linux-ia32": "0.24.2", - "@esbuild/linux-loong64": "0.24.2", - "@esbuild/linux-mips64el": "0.24.2", - "@esbuild/linux-ppc64": "0.24.2", - "@esbuild/linux-riscv64": "0.24.2", - "@esbuild/linux-s390x": "0.24.2", - "@esbuild/linux-x64": "0.24.2", - "@esbuild/netbsd-arm64": "0.24.2", - "@esbuild/netbsd-x64": "0.24.2", - "@esbuild/openbsd-arm64": "0.24.2", - "@esbuild/openbsd-x64": "0.24.2", - "@esbuild/sunos-x64": "0.24.2", - "@esbuild/win32-arm64": "0.24.2", - "@esbuild/win32-ia32": "0.24.2", - "@esbuild/win32-x64": "0.24.2" - }, - "license": "MIT" -} diff --git a/node_modules/estree-walker/CHANGELOG.md b/node_modules/estree-walker/CHANGELOG.md deleted file mode 100644 index 20e8c7e..0000000 --- a/node_modules/estree-walker/CHANGELOG.md +++ /dev/null @@ -1,92 +0,0 @@ -# changelog - -## 2.0.2 - -* Internal tidying up (change test runner, convert to JS) - -## 2.0.1 - -* Robustify `this.remove()`, pass current index to walker functions ([#18](https://github.com/Rich-Harris/estree-walker/pull/18)) - -## 2.0.0 - -* Add an `asyncWalk` export ([#20](https://github.com/Rich-Harris/estree-walker/pull/20)) -* Internal rewrite - -## 1.0.1 - -* Relax node type to `BaseNode` ([#17](https://github.com/Rich-Harris/estree-walker/pull/17)) - -## 1.0.0 - -* Don't cache child keys - -## 0.9.0 - -* Add `this.remove()` method - -## 0.8.1 - -* Fix pkg.files - -## 0.8.0 - -* Adopt `estree` types - -## 0.7.0 - -* Add a `this.replace(node)` method - -## 0.6.1 - -* Only traverse nodes that exist and have a type ([#9](https://github.com/Rich-Harris/estree-walker/pull/9)) -* Only cache keys for nodes with a type ([#8](https://github.com/Rich-Harris/estree-walker/pull/8)) - -## 0.6.0 - -* Fix walker context type -* Update deps, remove unncessary Bublé transformation - -## 0.5.2 - -* Add types to package - -## 0.5.1 - -* Prevent context corruption when `walk()` is called during a walk - -## 0.5.0 - -* Export `childKeys`, for manually fixing in case of malformed ASTs - -## 0.4.0 - -* Add TypeScript typings ([#3](https://github.com/Rich-Harris/estree-walker/pull/3)) - -## 0.3.1 - -* Include `pkg.repository` ([#2](https://github.com/Rich-Harris/estree-walker/pull/2)) - -## 0.3.0 - -* More predictable ordering - -## 0.2.1 - -* Keep `context` shape - -## 0.2.0 - -* Add ES6 build - -## 0.1.3 - -* npm snafu - -## 0.1.2 - -* Pass current prop and index to `enter`/`leave` callbacks - -## 0.1.1 - -* First release diff --git a/node_modules/estree-walker/LICENSE b/node_modules/estree-walker/LICENSE deleted file mode 100644 index 63b6209..0000000 --- a/node_modules/estree-walker/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (c) 2015-20 [these people](https://github.com/Rich-Harris/estree-walker/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. \ No newline at end of file diff --git a/node_modules/estree-walker/README.md b/node_modules/estree-walker/README.md deleted file mode 100644 index d877af3..0000000 --- a/node_modules/estree-walker/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# estree-walker - -Simple utility for walking an [ESTree](https://github.com/estree/estree)-compliant AST, such as one generated by [acorn](https://github.com/marijnh/acorn). - - -## Installation - -```bash -npm i estree-walker -``` - - -## Usage - -```js -var walk = require( 'estree-walker' ).walk; -var acorn = require( 'acorn' ); - -ast = acorn.parse( sourceCode, options ); // https://github.com/acornjs/acorn - -walk( ast, { - enter: function ( node, parent, prop, index ) { - // some code happens - }, - leave: function ( node, parent, prop, index ) { - // some code happens - } -}); -``` - -Inside the `enter` function, calling `this.skip()` will prevent the node's children being walked, or the `leave` function (which is optional) being called. - -Call `this.replace(new_node)` in either `enter` or `leave` to replace the current node with a new one. - -Call `this.remove()` in either `enter` or `leave` to remove the current node. - -## Why not use estraverse? - -The ESTree spec is evolving to accommodate ES6/7. I've had a couple of experiences where [estraverse](https://github.com/estools/estraverse) was unable to handle an AST generated by recent versions of acorn, because it hard-codes visitor keys. - -estree-walker, by contrast, simply enumerates a node's properties to find child nodes (and child lists of nodes), and is therefore resistant to spec changes. It's also much smaller. (The performance, if you're wondering, is basically identical.) - -None of which should be taken as criticism of estraverse, which has more features and has been battle-tested in many more situations, and for which I'm very grateful. - - -## License - -MIT diff --git a/node_modules/estree-walker/dist/esm/estree-walker.js b/node_modules/estree-walker/dist/esm/estree-walker.js deleted file mode 100644 index a0beeeb..0000000 --- a/node_modules/estree-walker/dist/esm/estree-walker.js +++ /dev/null @@ -1,333 +0,0 @@ -// @ts-check -/** @typedef { import('estree').BaseNode} BaseNode */ - -/** @typedef {{ - skip: () => void; - remove: () => void; - replace: (node: BaseNode) => void; -}} WalkerContext */ - -class WalkerBase { - constructor() { - /** @type {boolean} */ - this.should_skip = false; - - /** @type {boolean} */ - this.should_remove = false; - - /** @type {BaseNode | null} */ - this.replacement = null; - - /** @type {WalkerContext} */ - this.context = { - skip: () => (this.should_skip = true), - remove: () => (this.should_remove = true), - replace: (node) => (this.replacement = node) - }; - } - - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - * @param {BaseNode} node - */ - replace(parent, prop, index, node) { - if (parent) { - if (index !== null) { - parent[prop][index] = node; - } else { - parent[prop] = node; - } - } - } - - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - */ - remove(parent, prop, index) { - if (parent) { - if (index !== null) { - parent[prop].splice(index, 1); - } else { - delete parent[prop]; - } - } - } -} - -// @ts-check - -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./walker.js').WalkerContext} WalkerContext */ - -/** @typedef {( - * this: WalkerContext, - * node: BaseNode, - * parent: BaseNode, - * key: string, - * index: number - * ) => void} SyncHandler */ - -class SyncWalker extends WalkerBase { - /** - * - * @param {SyncHandler} enter - * @param {SyncHandler} leave - */ - constructor(enter, leave) { - super(); - - /** @type {SyncHandler} */ - this.enter = enter; - - /** @type {SyncHandler} */ - this.leave = leave; - } - - /** - * - * @param {BaseNode} node - * @param {BaseNode} parent - * @param {string} [prop] - * @param {number} [index] - * @returns {BaseNode} - */ - visit(node, parent, prop, index) { - if (node) { - if (this.enter) { - const _should_skip = this.should_skip; - const _should_remove = this.should_remove; - const _replacement = this.replacement; - this.should_skip = false; - this.should_remove = false; - this.replacement = null; - - this.enter.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const skipped = this.should_skip; - const removed = this.should_remove; - - this.should_skip = _should_skip; - this.should_remove = _should_remove; - this.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 i = 0; i < value.length; i += 1) { - if (value[i] !== null && typeof value[i].type === 'string') { - if (!this.visit(value[i], node, key, i)) { - // removed - i--; - } - } - } - } else if (value !== null && typeof value.type === "string") { - this.visit(value, node, key, null); - } - } - - if (this.leave) { - const _replacement = this.replacement; - const _should_remove = this.should_remove; - this.replacement = null; - this.should_remove = false; - - this.leave.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const removed = this.should_remove; - - this.replacement = _replacement; - this.should_remove = _should_remove; - - if (removed) return null; - } - } - - return node; - } -} - -// @ts-check - -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./walker').WalkerContext} WalkerContext */ - -/** @typedef {( - * this: WalkerContext, - * node: BaseNode, - * parent: BaseNode, - * key: string, - * index: number - * ) => Promise<void>} AsyncHandler */ - -class AsyncWalker extends WalkerBase { - /** - * - * @param {AsyncHandler} enter - * @param {AsyncHandler} leave - */ - constructor(enter, leave) { - super(); - - /** @type {AsyncHandler} */ - this.enter = enter; - - /** @type {AsyncHandler} */ - this.leave = leave; - } - - /** - * - * @param {BaseNode} node - * @param {BaseNode} parent - * @param {string} [prop] - * @param {number} [index] - * @returns {Promise<BaseNode>} - */ - async visit(node, parent, prop, index) { - if (node) { - if (this.enter) { - const _should_skip = this.should_skip; - const _should_remove = this.should_remove; - const _replacement = this.replacement; - this.should_skip = false; - this.should_remove = false; - this.replacement = null; - - await this.enter.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const skipped = this.should_skip; - const removed = this.should_remove; - - this.should_skip = _should_skip; - this.should_remove = _should_remove; - this.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 i = 0; i < value.length; i += 1) { - if (value[i] !== null && typeof value[i].type === 'string') { - if (!(await this.visit(value[i], node, key, i))) { - // removed - i--; - } - } - } - } else if (value !== null && typeof value.type === "string") { - await this.visit(value, node, key, null); - } - } - - if (this.leave) { - const _replacement = this.replacement; - const _should_remove = this.should_remove; - this.replacement = null; - this.should_remove = false; - - await this.leave.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const removed = this.should_remove; - - this.replacement = _replacement; - this.should_remove = _should_remove; - - if (removed) return null; - } - } - - return node; - } -} - -// @ts-check - -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./sync.js').SyncHandler} SyncHandler */ -/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ - -/** - * - * @param {BaseNode} ast - * @param {{ - * enter?: SyncHandler - * leave?: SyncHandler - * }} walker - * @returns {BaseNode} - */ -function walk(ast, { enter, leave }) { - const instance = new SyncWalker(enter, leave); - return instance.visit(ast, null); -} - -/** - * - * @param {BaseNode} ast - * @param {{ - * enter?: AsyncHandler - * leave?: AsyncHandler - * }} walker - * @returns {Promise<BaseNode>} - */ -async function asyncWalk(ast, { enter, leave }) { - const instance = new AsyncWalker(enter, leave); - return await instance.visit(ast, null); -} - -export { asyncWalk, walk }; diff --git a/node_modules/estree-walker/dist/esm/package.json b/node_modules/estree-walker/dist/esm/package.json deleted file mode 100644 index 7c34deb..0000000 --- a/node_modules/estree-walker/dist/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} \ No newline at end of file diff --git a/node_modules/estree-walker/dist/umd/estree-walker.js b/node_modules/estree-walker/dist/umd/estree-walker.js deleted file mode 100644 index 46fed0f..0000000 --- a/node_modules/estree-walker/dist/umd/estree-walker.js +++ /dev/null @@ -1,344 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = global || self, factory(global.estreeWalker = {})); -}(this, (function (exports) { 'use strict'; - - // @ts-check - /** @typedef { import('estree').BaseNode} BaseNode */ - - /** @typedef {{ - skip: () => void; - remove: () => void; - replace: (node: BaseNode) => void; - }} WalkerContext */ - - class WalkerBase { - constructor() { - /** @type {boolean} */ - this.should_skip = false; - - /** @type {boolean} */ - this.should_remove = false; - - /** @type {BaseNode | null} */ - this.replacement = null; - - /** @type {WalkerContext} */ - this.context = { - skip: () => (this.should_skip = true), - remove: () => (this.should_remove = true), - replace: (node) => (this.replacement = node) - }; - } - - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - * @param {BaseNode} node - */ - replace(parent, prop, index, node) { - if (parent) { - if (index !== null) { - parent[prop][index] = node; - } else { - parent[prop] = node; - } - } - } - - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - */ - remove(parent, prop, index) { - if (parent) { - if (index !== null) { - parent[prop].splice(index, 1); - } else { - delete parent[prop]; - } - } - } - } - - // @ts-check - - /** @typedef { import('estree').BaseNode} BaseNode */ - /** @typedef { import('./walker.js').WalkerContext} WalkerContext */ - - /** @typedef {( - * this: WalkerContext, - * node: BaseNode, - * parent: BaseNode, - * key: string, - * index: number - * ) => void} SyncHandler */ - - class SyncWalker extends WalkerBase { - /** - * - * @param {SyncHandler} enter - * @param {SyncHandler} leave - */ - constructor(enter, leave) { - super(); - - /** @type {SyncHandler} */ - this.enter = enter; - - /** @type {SyncHandler} */ - this.leave = leave; - } - - /** - * - * @param {BaseNode} node - * @param {BaseNode} parent - * @param {string} [prop] - * @param {number} [index] - * @returns {BaseNode} - */ - visit(node, parent, prop, index) { - if (node) { - if (this.enter) { - const _should_skip = this.should_skip; - const _should_remove = this.should_remove; - const _replacement = this.replacement; - this.should_skip = false; - this.should_remove = false; - this.replacement = null; - - this.enter.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const skipped = this.should_skip; - const removed = this.should_remove; - - this.should_skip = _should_skip; - this.should_remove = _should_remove; - this.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 i = 0; i < value.length; i += 1) { - if (value[i] !== null && typeof value[i].type === 'string') { - if (!this.visit(value[i], node, key, i)) { - // removed - i--; - } - } - } - } else if (value !== null && typeof value.type === "string") { - this.visit(value, node, key, null); - } - } - - if (this.leave) { - const _replacement = this.replacement; - const _should_remove = this.should_remove; - this.replacement = null; - this.should_remove = false; - - this.leave.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const removed = this.should_remove; - - this.replacement = _replacement; - this.should_remove = _should_remove; - - if (removed) return null; - } - } - - return node; - } - } - - // @ts-check - - /** @typedef { import('estree').BaseNode} BaseNode */ - /** @typedef { import('./walker').WalkerContext} WalkerContext */ - - /** @typedef {( - * this: WalkerContext, - * node: BaseNode, - * parent: BaseNode, - * key: string, - * index: number - * ) => Promise<void>} AsyncHandler */ - - class AsyncWalker extends WalkerBase { - /** - * - * @param {AsyncHandler} enter - * @param {AsyncHandler} leave - */ - constructor(enter, leave) { - super(); - - /** @type {AsyncHandler} */ - this.enter = enter; - - /** @type {AsyncHandler} */ - this.leave = leave; - } - - /** - * - * @param {BaseNode} node - * @param {BaseNode} parent - * @param {string} [prop] - * @param {number} [index] - * @returns {Promise<BaseNode>} - */ - async visit(node, parent, prop, index) { - if (node) { - if (this.enter) { - const _should_skip = this.should_skip; - const _should_remove = this.should_remove; - const _replacement = this.replacement; - this.should_skip = false; - this.should_remove = false; - this.replacement = null; - - await this.enter.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const skipped = this.should_skip; - const removed = this.should_remove; - - this.should_skip = _should_skip; - this.should_remove = _should_remove; - this.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 i = 0; i < value.length; i += 1) { - if (value[i] !== null && typeof value[i].type === 'string') { - if (!(await this.visit(value[i], node, key, i))) { - // removed - i--; - } - } - } - } else if (value !== null && typeof value.type === "string") { - await this.visit(value, node, key, null); - } - } - - if (this.leave) { - const _replacement = this.replacement; - const _should_remove = this.should_remove; - this.replacement = null; - this.should_remove = false; - - await this.leave.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const removed = this.should_remove; - - this.replacement = _replacement; - this.should_remove = _should_remove; - - if (removed) return null; - } - } - - return node; - } - } - - // @ts-check - - /** @typedef { import('estree').BaseNode} BaseNode */ - /** @typedef { import('./sync.js').SyncHandler} SyncHandler */ - /** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ - - /** - * - * @param {BaseNode} ast - * @param {{ - * enter?: SyncHandler - * leave?: SyncHandler - * }} walker - * @returns {BaseNode} - */ - function walk(ast, { enter, leave }) { - const instance = new SyncWalker(enter, leave); - return instance.visit(ast, null); - } - - /** - * - * @param {BaseNode} ast - * @param {{ - * enter?: AsyncHandler - * leave?: AsyncHandler - * }} walker - * @returns {Promise<BaseNode>} - */ - async function asyncWalk(ast, { enter, leave }) { - const instance = new AsyncWalker(enter, leave); - return await instance.visit(ast, null); - } - - exports.asyncWalk = asyncWalk; - exports.walk = walk; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/node_modules/estree-walker/package.json b/node_modules/estree-walker/package.json deleted file mode 100644 index f646eb5..0000000 --- a/node_modules/estree-walker/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "estree-walker", - "description": "Traverse an ESTree-compliant AST", - "version": "2.0.2", - "private": false, - "author": "Rich Harris", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/Rich-Harris/estree-walker" - }, - "type": "commonjs", - "main": "./dist/umd/estree-walker.js", - "module": "./dist/esm/estree-walker.js", - "exports": { - "require": "./dist/umd/estree-walker.js", - "import": "./dist/esm/estree-walker.js" - }, - "types": "types/index.d.ts", - "scripts": { - "prepublishOnly": "npm run build && npm test", - "build": "tsc && rollup -c", - "test": "uvu test" - }, - "devDependencies": { - "@types/estree": "0.0.42", - "rollup": "^2.10.9", - "typescript": "^3.7.5", - "uvu": "^0.5.1" - }, - "files": [ - "src", - "dist", - "types", - "README.md" - ] -} diff --git a/node_modules/estree-walker/src/async.js b/node_modules/estree-walker/src/async.js deleted file mode 100644 index 54276b5..0000000 --- a/node_modules/estree-walker/src/async.js +++ /dev/null @@ -1,118 +0,0 @@ -// @ts-check -import { WalkerBase } from './walker.js'; - -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./walker').WalkerContext} WalkerContext */ - -/** @typedef {( - * this: WalkerContext, - * node: BaseNode, - * parent: BaseNode, - * key: string, - * index: number - * ) => Promise<void>} AsyncHandler */ - -export class AsyncWalker extends WalkerBase { - /** - * - * @param {AsyncHandler} enter - * @param {AsyncHandler} leave - */ - constructor(enter, leave) { - super(); - - /** @type {AsyncHandler} */ - this.enter = enter; - - /** @type {AsyncHandler} */ - this.leave = leave; - } - - /** - * - * @param {BaseNode} node - * @param {BaseNode} parent - * @param {string} [prop] - * @param {number} [index] - * @returns {Promise<BaseNode>} - */ - async visit(node, parent, prop, index) { - if (node) { - if (this.enter) { - const _should_skip = this.should_skip; - const _should_remove = this.should_remove; - const _replacement = this.replacement; - this.should_skip = false; - this.should_remove = false; - this.replacement = null; - - await this.enter.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const skipped = this.should_skip; - const removed = this.should_remove; - - this.should_skip = _should_skip; - this.should_remove = _should_remove; - this.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 i = 0; i < value.length; i += 1) { - if (value[i] !== null && typeof value[i].type === 'string') { - if (!(await this.visit(value[i], node, key, i))) { - // removed - i--; - } - } - } - } else if (value !== null && typeof value.type === "string") { - await this.visit(value, node, key, null); - } - } - - if (this.leave) { - const _replacement = this.replacement; - const _should_remove = this.should_remove; - this.replacement = null; - this.should_remove = false; - - await this.leave.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const removed = this.should_remove; - - this.replacement = _replacement; - this.should_remove = _should_remove; - - if (removed) return null; - } - } - - return node; - } -} diff --git a/node_modules/estree-walker/src/index.js b/node_modules/estree-walker/src/index.js deleted file mode 100644 index dcf4c72..0000000 --- a/node_modules/estree-walker/src/index.js +++ /dev/null @@ -1,35 +0,0 @@ -// @ts-check -import { SyncWalker } from './sync.js'; -import { AsyncWalker } from './async.js'; - -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./sync.js').SyncHandler} SyncHandler */ -/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ - -/** - * - * @param {BaseNode} ast - * @param {{ - * enter?: SyncHandler - * leave?: SyncHandler - * }} walker - * @returns {BaseNode} - */ -export function walk(ast, { enter, leave }) { - const instance = new SyncWalker(enter, leave); - return instance.visit(ast, null); -} - -/** - * - * @param {BaseNode} ast - * @param {{ - * enter?: AsyncHandler - * leave?: AsyncHandler - * }} walker - * @returns {Promise<BaseNode>} - */ -export async function asyncWalk(ast, { enter, leave }) { - const instance = new AsyncWalker(enter, leave); - return await instance.visit(ast, null); -} diff --git a/node_modules/estree-walker/src/package.json b/node_modules/estree-walker/src/package.json deleted file mode 100644 index 1632c2c..0000000 --- a/node_modules/estree-walker/src/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type": "module"} \ No newline at end of file diff --git a/node_modules/estree-walker/src/sync.js b/node_modules/estree-walker/src/sync.js deleted file mode 100644 index b3cea40..0000000 --- a/node_modules/estree-walker/src/sync.js +++ /dev/null @@ -1,118 +0,0 @@ -// @ts-check -import { WalkerBase } from './walker.js'; - -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./walker.js').WalkerContext} WalkerContext */ - -/** @typedef {( - * this: WalkerContext, - * node: BaseNode, - * parent: BaseNode, - * key: string, - * index: number - * ) => void} SyncHandler */ - -export class SyncWalker extends WalkerBase { - /** - * - * @param {SyncHandler} enter - * @param {SyncHandler} leave - */ - constructor(enter, leave) { - super(); - - /** @type {SyncHandler} */ - this.enter = enter; - - /** @type {SyncHandler} */ - this.leave = leave; - } - - /** - * - * @param {BaseNode} node - * @param {BaseNode} parent - * @param {string} [prop] - * @param {number} [index] - * @returns {BaseNode} - */ - visit(node, parent, prop, index) { - if (node) { - if (this.enter) { - const _should_skip = this.should_skip; - const _should_remove = this.should_remove; - const _replacement = this.replacement; - this.should_skip = false; - this.should_remove = false; - this.replacement = null; - - this.enter.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const skipped = this.should_skip; - const removed = this.should_remove; - - this.should_skip = _should_skip; - this.should_remove = _should_remove; - this.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 i = 0; i < value.length; i += 1) { - if (value[i] !== null && typeof value[i].type === 'string') { - if (!this.visit(value[i], node, key, i)) { - // removed - i--; - } - } - } - } else if (value !== null && typeof value.type === "string") { - this.visit(value, node, key, null); - } - } - - if (this.leave) { - const _replacement = this.replacement; - const _should_remove = this.should_remove; - this.replacement = null; - this.should_remove = false; - - this.leave.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const removed = this.should_remove; - - this.replacement = _replacement; - this.should_remove = _should_remove; - - if (removed) return null; - } - } - - return node; - } -} diff --git a/node_modules/estree-walker/src/walker.js b/node_modules/estree-walker/src/walker.js deleted file mode 100644 index 3555d88..0000000 --- a/node_modules/estree-walker/src/walker.js +++ /dev/null @@ -1,61 +0,0 @@ -// @ts-check -/** @typedef { import('estree').BaseNode} BaseNode */ - -/** @typedef {{ - skip: () => void; - remove: () => void; - replace: (node: BaseNode) => void; -}} WalkerContext */ - -export class WalkerBase { - constructor() { - /** @type {boolean} */ - this.should_skip = false; - - /** @type {boolean} */ - this.should_remove = false; - - /** @type {BaseNode | null} */ - this.replacement = null; - - /** @type {WalkerContext} */ - this.context = { - skip: () => (this.should_skip = true), - remove: () => (this.should_remove = true), - replace: (node) => (this.replacement = node) - }; - } - - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - * @param {BaseNode} node - */ - replace(parent, prop, index, node) { - if (parent) { - if (index !== null) { - parent[prop][index] = node; - } else { - parent[prop] = node; - } - } - } - - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - */ - remove(parent, prop, index) { - if (parent) { - if (index !== null) { - parent[prop].splice(index, 1); - } else { - delete parent[prop]; - } - } - } -} diff --git a/node_modules/estree-walker/types/async.d.ts b/node_modules/estree-walker/types/async.d.ts deleted file mode 100644 index c85bfdc..0000000 --- a/node_modules/estree-walker/types/async.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./walker').WalkerContext} WalkerContext */ -/** @typedef {( - * this: WalkerContext, - * node: BaseNode, - * parent: BaseNode, - * key: string, - * index: number - * ) => Promise<void>} AsyncHandler */ -export class AsyncWalker extends WalkerBase { - /** - * - * @param {AsyncHandler} enter - * @param {AsyncHandler} leave - */ - constructor(enter: (this: { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; - }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => Promise<void>, leave: (this: { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; - }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => Promise<void>); - /** @type {AsyncHandler} */ - enter: AsyncHandler; - /** @type {AsyncHandler} */ - leave: AsyncHandler; - /** - * - * @param {BaseNode} node - * @param {BaseNode} parent - * @param {string} [prop] - * @param {number} [index] - * @returns {Promise<BaseNode>} - */ - visit(node: import("estree").BaseNode, parent: import("estree").BaseNode, prop?: string, index?: number): Promise<import("estree").BaseNode>; - should_skip: any; - should_remove: any; - replacement: any; -} -export type BaseNode = import("estree").BaseNode; -export type WalkerContext = { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; -}; -export type AsyncHandler = (this: { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; -}, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => Promise<void>; -import { WalkerBase } from "./walker.js"; diff --git a/node_modules/estree-walker/types/index.d.ts b/node_modules/estree-walker/types/index.d.ts deleted file mode 100644 index dfc3277..0000000 --- a/node_modules/estree-walker/types/index.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./sync.js').SyncHandler} SyncHandler */ -/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ -/** - * - * @param {BaseNode} ast - * @param {{ - * enter?: SyncHandler - * leave?: SyncHandler - * }} walker - * @returns {BaseNode} - */ -export function walk(ast: import("estree").BaseNode, { enter, leave }: { - enter?: (this: { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; - }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void; - leave?: (this: { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; - }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void; -}): import("estree").BaseNode; -/** - * - * @param {BaseNode} ast - * @param {{ - * enter?: AsyncHandler - * leave?: AsyncHandler - * }} walker - * @returns {Promise<BaseNode>} - */ -export function asyncWalk(ast: import("estree").BaseNode, { enter, leave }: { - enter?: (this: { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; - }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => Promise<void>; - leave?: (this: { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; - }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => Promise<void>; -}): Promise<import("estree").BaseNode>; -export type BaseNode = import("estree").BaseNode; -export type SyncHandler = (this: { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; -}, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void; -export type AsyncHandler = (this: { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; -}, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => Promise<void>; diff --git a/node_modules/estree-walker/types/sync.d.ts b/node_modules/estree-walker/types/sync.d.ts deleted file mode 100644 index e9e4cc1..0000000 --- a/node_modules/estree-walker/types/sync.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./walker.js').WalkerContext} WalkerContext */ -/** @typedef {( - * this: WalkerContext, - * node: BaseNode, - * parent: BaseNode, - * key: string, - * index: number - * ) => void} SyncHandler */ -export class SyncWalker extends WalkerBase { - /** - * - * @param {SyncHandler} enter - * @param {SyncHandler} leave - */ - constructor(enter: (this: { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; - }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void, leave: (this: { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; - }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void); - /** @type {SyncHandler} */ - enter: SyncHandler; - /** @type {SyncHandler} */ - leave: SyncHandler; - /** - * - * @param {BaseNode} node - * @param {BaseNode} parent - * @param {string} [prop] - * @param {number} [index] - * @returns {BaseNode} - */ - visit(node: import("estree").BaseNode, parent: import("estree").BaseNode, prop?: string, index?: number): import("estree").BaseNode; - should_skip: any; - should_remove: any; - replacement: any; -} -export type BaseNode = import("estree").BaseNode; -export type WalkerContext = { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; -}; -export type SyncHandler = (this: { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; -}, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void; -import { WalkerBase } from "./walker.js"; diff --git a/node_modules/estree-walker/types/tsconfig.tsbuildinfo b/node_modules/estree-walker/types/tsconfig.tsbuildinfo deleted file mode 100644 index 799022f..0000000 --- a/node_modules/estree-walker/types/tsconfig.tsbuildinfo +++ /dev/null @@ -1,345 +0,0 @@ -{ - "program": { - "fileInfos": { - "../node_modules/typescript/lib/lib.es5.d.ts": { - "version": "fc43680ad3a1a4ec8c7b8d908af1ec9ddff87845346de5f02c735c9171fa98ea", - "signature": "fc43680ad3a1a4ec8c7b8d908af1ec9ddff87845346de5f02c735c9171fa98ea" - }, - "../node_modules/typescript/lib/lib.es2015.d.ts": { - "version": "7994d44005046d1413ea31d046577cdda33b8b2470f30281fd9c8b3c99fe2d96", - "signature": "7994d44005046d1413ea31d046577cdda33b8b2470f30281fd9c8b3c99fe2d96" - }, - "../node_modules/typescript/lib/lib.es2016.d.ts": { - "version": "5f217838d25704474d9ef93774f04164889169ca31475fe423a9de6758f058d1", - "signature": "5f217838d25704474d9ef93774f04164889169ca31475fe423a9de6758f058d1" - }, - "../node_modules/typescript/lib/lib.es2017.d.ts": { - "version": "459097c7bdd88fc5731367e56591e4f465f2c9de81a35427a7bd473165c34743", - "signature": "459097c7bdd88fc5731367e56591e4f465f2c9de81a35427a7bd473165c34743" - }, - "../node_modules/typescript/lib/lib.dom.d.ts": { - "version": "d93de5e8a7275cb9d47481410e13b3b1debb997e216490954b5d106e37e086de", - "signature": "d93de5e8a7275cb9d47481410e13b3b1debb997e216490954b5d106e37e086de" - }, - "../node_modules/typescript/lib/lib.dom.iterable.d.ts": { - "version": "8329c3401aa8708426c7760f14219170f69a2cb77e4519758cec6f5027270faf", - "signature": "8329c3401aa8708426c7760f14219170f69a2cb77e4519758cec6f5027270faf" - }, - "../node_modules/typescript/lib/lib.webworker.importscripts.d.ts": { - "version": "fe4e59403e34c7ff747abe4ff6abbc7718229556d7c1a5b93473fb53156c913b", - "signature": "fe4e59403e34c7ff747abe4ff6abbc7718229556d7c1a5b93473fb53156c913b" - }, - "../node_modules/typescript/lib/lib.scripthost.d.ts": { - "version": "b9faa17292f17d2ad75e34fac77dd63a6403af1dba02d39cd0cbb9ffdf3de8b9", - "signature": "b9faa17292f17d2ad75e34fac77dd63a6403af1dba02d39cd0cbb9ffdf3de8b9" - }, - "../node_modules/typescript/lib/lib.es2015.core.d.ts": { - "version": "734ddc145e147fbcd55f07d034f50ccff1086f5a880107665ec326fb368876f6", - "signature": "734ddc145e147fbcd55f07d034f50ccff1086f5a880107665ec326fb368876f6" - }, - "../node_modules/typescript/lib/lib.es2015.collection.d.ts": { - "version": "4a0862a21f4700de873db3b916f70e41570e2f558da77d2087c9490f5a0615d8", - "signature": "4a0862a21f4700de873db3b916f70e41570e2f558da77d2087c9490f5a0615d8" - }, - "../node_modules/typescript/lib/lib.es2015.generator.d.ts": { - "version": "765e0e9c9d74cf4d031ca8b0bdb269a853e7d81eda6354c8510218d03db12122", - "signature": "765e0e9c9d74cf4d031ca8b0bdb269a853e7d81eda6354c8510218d03db12122" - }, - "../node_modules/typescript/lib/lib.es2015.iterable.d.ts": { - "version": "285958e7699f1babd76d595830207f18d719662a0c30fac7baca7df7162a9210", - "signature": "285958e7699f1babd76d595830207f18d719662a0c30fac7baca7df7162a9210" - }, - "../node_modules/typescript/lib/lib.es2015.promise.d.ts": { - "version": "d4deaafbb18680e3143e8b471acd650ed6f72a408a33137f0a0dd104fbe7f8ca", - "signature": "d4deaafbb18680e3143e8b471acd650ed6f72a408a33137f0a0dd104fbe7f8ca" - }, - "../node_modules/typescript/lib/lib.es2015.proxy.d.ts": { - "version": "5e72f949a89717db444e3bd9433468890068bb21a5638d8ab15a1359e05e54fe", - "signature": "5e72f949a89717db444e3bd9433468890068bb21a5638d8ab15a1359e05e54fe" - }, - "../node_modules/typescript/lib/lib.es2015.reflect.d.ts": { - "version": "f5b242136ae9bfb1cc99a5971cccc44e99947ae6b5ef6fd8aa54b5ade553b976", - "signature": "f5b242136ae9bfb1cc99a5971cccc44e99947ae6b5ef6fd8aa54b5ade553b976" - }, - "../node_modules/typescript/lib/lib.es2015.symbol.d.ts": { - "version": "9ae2860252d6b5f16e2026d8a2c2069db7b2a3295e98b6031d01337b96437230", - "signature": "9ae2860252d6b5f16e2026d8a2c2069db7b2a3295e98b6031d01337b96437230" - }, - "../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts": { - "version": "3e0a459888f32b42138d5a39f706ff2d55d500ab1031e0988b5568b0f67c2303", - "signature": "3e0a459888f32b42138d5a39f706ff2d55d500ab1031e0988b5568b0f67c2303" - }, - "../node_modules/typescript/lib/lib.es2016.array.include.d.ts": { - "version": "3f96f1e570aedbd97bf818c246727151e873125d0512e4ae904330286c721bc0", - "signature": "3f96f1e570aedbd97bf818c246727151e873125d0512e4ae904330286c721bc0" - }, - "../node_modules/typescript/lib/lib.es2017.object.d.ts": { - "version": "c2d60b2e558d44384e4704b00e6b3d154334721a911f094d3133c35f0917b408", - "signature": "c2d60b2e558d44384e4704b00e6b3d154334721a911f094d3133c35f0917b408" - }, - "../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts": { - "version": "b8667586a618c5cf64523d4e500ae39e781428abfb28f3de441fc66b56144b6f", - "signature": "b8667586a618c5cf64523d4e500ae39e781428abfb28f3de441fc66b56144b6f" - }, - "../node_modules/typescript/lib/lib.es2017.string.d.ts": { - "version": "21df2e0059f14dcb4c3a0e125859f6b6ff01332ee24b0065a741d121250bc71c", - "signature": "21df2e0059f14dcb4c3a0e125859f6b6ff01332ee24b0065a741d121250bc71c" - }, - "../node_modules/typescript/lib/lib.es2017.intl.d.ts": { - "version": "c1759cb171c7619af0d2234f2f8fb2a871ee88e956e2ed91bb61778e41f272c6", - "signature": "c1759cb171c7619af0d2234f2f8fb2a871ee88e956e2ed91bb61778e41f272c6" - }, - "../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts": { - "version": "28569d59e07d4378cb3d54979c4c60f9f06305c9bb6999ffe6cab758957adc46", - "signature": "28569d59e07d4378cb3d54979c4c60f9f06305c9bb6999ffe6cab758957adc46" - }, - "../node_modules/typescript/lib/lib.es2017.full.d.ts": { - "version": "873c09f1c309389742d98b7b67419a8e0a5fa6f10ce59fd5149ecd31a2818594", - "signature": "873c09f1c309389742d98b7b67419a8e0a5fa6f10ce59fd5149ecd31a2818594" - }, - "../node_modules/@types/estree/index.d.ts": { - "version": "c2efad8a2f2d7fb931ff15c7959fb45340e74684cd665ddf0cbf9b3977be1644", - "signature": "c2efad8a2f2d7fb931ff15c7959fb45340e74684cd665ddf0cbf9b3977be1644" - }, - "../src/walker.js": { - "version": "4cc9d0e334d83a4cebeeac502de37a1aeeb953f6d4145a886d9eecea1f2142a7", - "signature": "075872468ccc19c83b03fd717fc9305b5f8ec09592210cf60279cb13eca2bd70" - }, - "../src/async.js": { - "version": "904efd145090ac40c3c98f29cc928332898a62ab642dd5921db2ae249bfe014a", - "signature": "da428f781d6dc6dfd4f4afd0dd5f25a780897dc8b57e5b30462491b7d08f32c0" - }, - "../src/sync.js": { - "version": "85bb22b85042f0a3717d8fac2fc8f62af16894652be34d1e08eb3e63785535f5", - "signature": "5b131a727db18c956611a5e33d08217df96d0f2e0f26d98b804d1ec2407e59ae" - }, - "../src/index.js": { - "version": "99128f4c6cb79cb1e3abf3f2ba96faedd2b820aab4fd7f743aab0b8d710a73af", - "signature": "c52be5c79280bfcfcf359c084c6f2f70f405b0ad14dde96b6703dbc5ef2261f5" - } - }, - "options": { - "allowJs": true, - "target": 4, - "module": 99, - "types": [ - "estree" - ], - "declaration": true, - "declarationDir": "./", - "emitDeclarationOnly": true, - "outDir": "./", - "newLine": 1, - "noImplicitAny": true, - "noImplicitThis": true, - "incremental": true, - "configFilePath": "../tsconfig.json" - }, - "referencedMap": { - "../src/walker.js": [ - "../node_modules/@types/estree/index.d.ts" - ], - "../src/async.js": [ - "../src/walker.js", - "../node_modules/@types/estree/index.d.ts" - ], - "../src/sync.js": [ - "../src/walker.js", - "../node_modules/@types/estree/index.d.ts" - ], - "../src/index.js": [ - "../src/sync.js", - "../src/async.js", - "../node_modules/@types/estree/index.d.ts" - ] - }, - "exportedModulesMap": { - "../src/walker.js": [ - "../node_modules/@types/estree/index.d.ts" - ], - "../src/async.js": [ - "../node_modules/@types/estree/index.d.ts" - ], - "../src/sync.js": [ - "../node_modules/@types/estree/index.d.ts" - ], - "../src/index.js": [ - "../node_modules/@types/estree/index.d.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../node_modules/typescript/lib/lib.es5.d.ts", - "../node_modules/typescript/lib/lib.es2015.d.ts", - "../node_modules/typescript/lib/lib.es2016.d.ts", - "../node_modules/typescript/lib/lib.es2017.d.ts", - "../node_modules/typescript/lib/lib.dom.d.ts", - "../node_modules/typescript/lib/lib.dom.iterable.d.ts", - "../node_modules/typescript/lib/lib.webworker.importscripts.d.ts", - "../node_modules/typescript/lib/lib.scripthost.d.ts", - "../node_modules/typescript/lib/lib.es2015.core.d.ts", - "../node_modules/typescript/lib/lib.es2015.collection.d.ts", - "../node_modules/typescript/lib/lib.es2015.generator.d.ts", - "../node_modules/typescript/lib/lib.es2015.iterable.d.ts", - "../node_modules/typescript/lib/lib.es2015.promise.d.ts", - "../node_modules/typescript/lib/lib.es2015.proxy.d.ts", - "../node_modules/typescript/lib/lib.es2015.reflect.d.ts", - "../node_modules/typescript/lib/lib.es2015.symbol.d.ts", - "../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts", - "../node_modules/typescript/lib/lib.es2016.array.include.d.ts", - "../node_modules/typescript/lib/lib.es2017.object.d.ts", - "../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts", - "../node_modules/typescript/lib/lib.es2017.string.d.ts", - "../node_modules/typescript/lib/lib.es2017.intl.d.ts", - "../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts", - "../node_modules/typescript/lib/lib.es2017.full.d.ts", - "../node_modules/@types/estree/index.d.ts", - "../src/walker.js", - [ - "../src/async.js", - [ - { - "file": "../src/async.js", - "start": 864, - "length": 12, - "messageText": "'_should_skip' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", - "category": 1, - "code": 7022 - }, - { - "file": "../src/async.js", - "start": 907, - "length": 14, - "messageText": "'_should_remove' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", - "category": 1, - "code": 7022 - }, - { - "file": "../src/async.js", - "start": 954, - "length": 12, - "messageText": "'_replacement' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", - "category": 1, - "code": 7022 - }, - { - "file": "../src/async.js", - "start": 991, - "length": 24, - "messageText": "'should_skip' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", - "category": 1, - "code": 7022 - }, - { - "file": "../src/async.js", - "start": 1021, - "length": 26, - "messageText": "'should_remove' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", - "category": 1, - "code": 7022 - }, - { - "file": "../src/async.js", - "start": 1053, - "length": 23, - "messageText": "'replacement' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", - "category": 1, - "code": 7022 - }, - { - "file": "../src/async.js", - "start": 1643, - "length": 9, - "code": 7053, - "category": 1, - "messageText": { - "messageText": "Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'BaseNode'.", - "category": 1, - "code": 7053, - "next": [ - { - "messageText": "No index signature with a parameter of type 'string' was found on type 'BaseNode'.", - "category": 1, - "code": 7054 - } - ] - } - } - ] - ], - [ - "../src/sync.js", - [ - { - "file": "../src/sync.js", - "start": 837, - "length": 12, - "messageText": "'_should_skip' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", - "category": 1, - "code": 7022 - }, - { - "file": "../src/sync.js", - "start": 880, - "length": 14, - "messageText": "'_should_remove' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", - "category": 1, - "code": 7022 - }, - { - "file": "../src/sync.js", - "start": 927, - "length": 12, - "messageText": "'_replacement' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", - "category": 1, - "code": 7022 - }, - { - "file": "../src/sync.js", - "start": 964, - "length": 24, - "messageText": "'should_skip' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", - "category": 1, - "code": 7022 - }, - { - "file": "../src/sync.js", - "start": 994, - "length": 26, - "messageText": "'should_remove' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", - "category": 1, - "code": 7022 - }, - { - "file": "../src/sync.js", - "start": 1026, - "length": 23, - "messageText": "'replacement' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", - "category": 1, - "code": 7022 - }, - { - "file": "../src/sync.js", - "start": 1610, - "length": 9, - "code": 7053, - "category": 1, - "messageText": { - "messageText": "Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'BaseNode'.", - "category": 1, - "code": 7053, - "next": [ - { - "messageText": "No index signature with a parameter of type 'string' was found on type 'BaseNode'.", - "category": 1, - "code": 7054 - } - ] - } - } - ] - ], - "../src/index.js" - ] - }, - "version": "3.7.5" -} \ No newline at end of file diff --git a/node_modules/estree-walker/types/walker.d.ts b/node_modules/estree-walker/types/walker.d.ts deleted file mode 100644 index 49d8441..0000000 --- a/node_modules/estree-walker/types/walker.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef {{ - skip: () => void; - remove: () => void; - replace: (node: BaseNode) => void; -}} WalkerContext */ -export class WalkerBase { - /** @type {boolean} */ - should_skip: boolean; - /** @type {boolean} */ - should_remove: boolean; - /** @type {BaseNode | null} */ - replacement: BaseNode | null; - /** @type {WalkerContext} */ - context: WalkerContext; - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - * @param {BaseNode} node - */ - replace(parent: any, prop: string, index: number, node: import("estree").BaseNode): void; - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - */ - remove(parent: any, prop: string, index: number): void; -} -export type BaseNode = import("estree").BaseNode; -export type WalkerContext = { - skip: () => void; - remove: () => void; - replace: (node: import("estree").BaseNode) => void; -}; diff --git a/node_modules/eventemitter3/LICENSE b/node_modules/eventemitter3/LICENSE deleted file mode 100644 index abcbd54..0000000 --- a/node_modules/eventemitter3/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Arnout Kazemier - -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/node_modules/eventemitter3/README.md b/node_modules/eventemitter3/README.md deleted file mode 100644 index aba7e18..0000000 --- a/node_modules/eventemitter3/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# EventEmitter3 - -[![Version npm](https://img.shields.io/npm/v/eventemitter3.svg?style=flat-square)](https://www.npmjs.com/package/eventemitter3)[![Build Status](https://img.shields.io/travis/primus/eventemitter3/master.svg?style=flat-square)](https://travis-ci.org/primus/eventemitter3)[![Dependencies](https://img.shields.io/david/primus/eventemitter3.svg?style=flat-square)](https://david-dm.org/primus/eventemitter3)[![Coverage Status](https://img.shields.io/coveralls/primus/eventemitter3/master.svg?style=flat-square)](https://coveralls.io/r/primus/eventemitter3?branch=master)[![IRC channel](https://img.shields.io/badge/IRC-irc.freenode.net%23primus-00a8ff.svg?style=flat-square)](https://webchat.freenode.net/?channels=primus) - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/eventemitter3.svg)](https://saucelabs.com/u/eventemitter3) - -EventEmitter3 is a high performance EventEmitter. It has been micro-optimized -for various of code paths making this, one of, if not the fastest EventEmitter -available for Node.js and browsers. The module is API compatible with the -EventEmitter that ships by default with Node.js but there are some slight -differences: - -- Domain support has been removed. -- We do not `throw` an error when you emit an `error` event and nobody is - listening. -- The `newListener` and `removeListener` events have been removed as they - are useful only in some uncommon use-cases. -- The `setMaxListeners`, `getMaxListeners`, `prependListener` and - `prependOnceListener` methods are not available. -- Support for custom context for events so there is no need to use `fn.bind`. -- The `removeListener` method removes all matching listeners, not only the - first. - -It's a drop in replacement for existing EventEmitters, but just faster. Free -performance, who wouldn't want that? The EventEmitter is written in EcmaScript 3 -so it will work in the oldest browsers and node versions that you need to -support. - -## Installation - -```bash -$ npm install --save eventemitter3 -``` - -## CDN - -Recommended CDN: - -```text -https://unpkg.com/eventemitter3@latest/umd/eventemitter3.min.js -``` - -## Usage - -After installation the only thing you need to do is require the module: - -```js -var EventEmitter = require('eventemitter3'); -``` - -And you're ready to create your own EventEmitter instances. For the API -documentation, please follow the official Node.js documentation: - -http://nodejs.org/api/events.html - -### Contextual emits - -We've upgraded the API of the `EventEmitter.on`, `EventEmitter.once` and -`EventEmitter.removeListener` to accept an extra argument which is the `context` -or `this` value that should be set for the emitted events. This means you no -longer have the overhead of an event that required `fn.bind` in order to get a -custom `this` value. - -```js -var EE = new EventEmitter() - , context = { foo: 'bar' }; - -function emitted() { - console.log(this === context); // true -} - -EE.once('event-name', emitted, context); -EE.on('another-event', emitted, context); -EE.removeListener('another-event', emitted, context); -``` - -### Tests and benchmarks - -This module is well tested. You can run: - -- `npm test` to run the tests under Node.js. -- `npm run test-browser` to run the tests in real browsers via Sauce Labs. - -We also have a set of benchmarks to compare EventEmitter3 with some available -alternatives. To run the benchmarks run `npm run benchmark`. - -Tests and benchmarks are not included in the npm package. If you want to play -with them you have to clone the GitHub repository. -Note that you will have to run an additional `npm i` in the benchmarks folder -before `npm run benchmark`. - -## License - -[MIT](LICENSE) diff --git a/node_modules/eventemitter3/index.d.ts b/node_modules/eventemitter3/index.d.ts deleted file mode 100644 index 118f68b..0000000 --- a/node_modules/eventemitter3/index.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Minimal `EventEmitter` interface that is molded against the Node.js - * `EventEmitter` interface. - */ -declare class EventEmitter< - EventTypes extends EventEmitter.ValidEventTypes = string | symbol, - Context extends any = any -> { - static prefixed: string | boolean; - - /** - * Return an array listing the events for which the emitter has registered - * listeners. - */ - eventNames(): Array<EventEmitter.EventNames<EventTypes>>; - - /** - * Return the listeners registered for a given event. - */ - listeners<T extends EventEmitter.EventNames<EventTypes>>( - event: T - ): Array<EventEmitter.EventListener<EventTypes, T>>; - - /** - * Return the number of listeners listening to a given event. - */ - listenerCount(event: EventEmitter.EventNames<EventTypes>): number; - - /** - * Calls each of the listeners registered for a given event. - */ - emit<T extends EventEmitter.EventNames<EventTypes>>( - event: T, - ...args: EventEmitter.EventArgs<EventTypes, T> - ): boolean; - - /** - * Add a listener for a given event. - */ - on<T extends EventEmitter.EventNames<EventTypes>>( - event: T, - fn: EventEmitter.EventListener<EventTypes, T>, - context?: Context - ): this; - addListener<T extends EventEmitter.EventNames<EventTypes>>( - event: T, - fn: EventEmitter.EventListener<EventTypes, T>, - context?: Context - ): this; - - /** - * Add a one-time listener for a given event. - */ - once<T extends EventEmitter.EventNames<EventTypes>>( - event: T, - fn: EventEmitter.EventListener<EventTypes, T>, - context?: Context - ): this; - - /** - * Remove the listeners of a given event. - */ - removeListener<T extends EventEmitter.EventNames<EventTypes>>( - event: T, - fn?: EventEmitter.EventListener<EventTypes, T>, - context?: Context, - once?: boolean - ): this; - off<T extends EventEmitter.EventNames<EventTypes>>( - event: T, - fn?: EventEmitter.EventListener<EventTypes, T>, - context?: Context, - once?: boolean - ): this; - - /** - * Remove all listeners, or those of the specified event. - */ - removeAllListeners(event?: EventEmitter.EventNames<EventTypes>): this; -} - -declare namespace EventEmitter { - export interface ListenerFn<Args extends any[] = any[]> { - (...args: Args): void; - } - - export interface EventEmitterStatic { - new < - EventTypes extends ValidEventTypes = string | symbol, - Context = any - >(): EventEmitter<EventTypes, Context>; - } - - /** - * `object` should be in either of the following forms: - * ``` - * interface EventTypes { - * 'event-with-parameters': any[] - * 'event-with-example-handler': (...args: any[]) => void - * } - * ``` - */ - export type ValidEventTypes = string | symbol | object; - - export type EventNames<T extends ValidEventTypes> = T extends string | symbol - ? T - : keyof T; - - export type ArgumentMap<T extends object> = { - [K in keyof T]: T[K] extends (...args: any[]) => void - ? Parameters<T[K]> - : T[K] extends any[] - ? T[K] - : any[]; - }; - - export type EventListener< - T extends ValidEventTypes, - K extends EventNames<T> - > = T extends string | symbol - ? (...args: any[]) => void - : ( - ...args: ArgumentMap<Exclude<T, string | symbol>>[Extract<K, keyof T>] - ) => void; - - export type EventArgs< - T extends ValidEventTypes, - K extends EventNames<T> - > = Parameters<EventListener<T, K>>; - - export const EventEmitter: EventEmitterStatic; -} - -export = EventEmitter; diff --git a/node_modules/eventemitter3/index.js b/node_modules/eventemitter3/index.js deleted file mode 100644 index 6ea485c..0000000 --- a/node_modules/eventemitter3/index.js +++ /dev/null @@ -1,336 +0,0 @@ -'use strict'; - -var has = Object.prototype.hasOwnProperty - , prefix = '~'; - -/** - * Constructor to create a storage for our `EE` objects. - * An `Events` instance is a plain object whose properties are event names. - * - * @constructor - * @private - */ -function Events() {} - -// -// We try to not inherit from `Object.prototype`. In some engines creating an -// instance in this way is faster than calling `Object.create(null)` directly. -// If `Object.create(null)` is not supported we prefix the event names with a -// character to make sure that the built-in object properties are not -// overridden or used as an attack vector. -// -if (Object.create) { - Events.prototype = Object.create(null); - - // - // This hack is needed because the `__proto__` property is still inherited in - // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. - // - if (!new Events().__proto__) prefix = false; -} - -/** - * Representation of a single event listener. - * - * @param {Function} fn The listener function. - * @param {*} context The context to invoke the listener with. - * @param {Boolean} [once=false] Specify if the listener is a one-time listener. - * @constructor - * @private - */ -function EE(fn, context, once) { - this.fn = fn; - this.context = context; - this.once = once || false; -} - -/** - * Add a listener for a given event. - * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} context The context to invoke the listener with. - * @param {Boolean} once Specify if the listener is a one-time listener. - * @returns {EventEmitter} - * @private - */ -function addListener(emitter, event, fn, context, once) { - if (typeof fn !== 'function') { - throw new TypeError('The listener must be a function'); - } - - var listener = new EE(fn, context || emitter, once) - , evt = prefix ? prefix + event : event; - - if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; - else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); - else emitter._events[evt] = [emitter._events[evt], listener]; - - return emitter; -} - -/** - * Clear event by name. - * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} evt The Event name. - * @private - */ -function clearEvent(emitter, evt) { - if (--emitter._eventsCount === 0) emitter._events = new Events(); - else delete emitter._events[evt]; -} - -/** - * Minimal `EventEmitter` interface that is molded against the Node.js - * `EventEmitter` interface. - * - * @constructor - * @public - */ -function EventEmitter() { - this._events = new Events(); - this._eventsCount = 0; -} - -/** - * Return an array listing the events for which the emitter has registered - * listeners. - * - * @returns {Array} - * @public - */ -EventEmitter.prototype.eventNames = function eventNames() { - var names = [] - , events - , name; - - if (this._eventsCount === 0) return names; - - for (name in (events = this._events)) { - if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); - } - - if (Object.getOwnPropertySymbols) { - return names.concat(Object.getOwnPropertySymbols(events)); - } - - return names; -}; - -/** - * Return the listeners registered for a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Array} The registered listeners. - * @public - */ -EventEmitter.prototype.listeners = function listeners(event) { - var evt = prefix ? prefix + event : event - , handlers = this._events[evt]; - - if (!handlers) return []; - if (handlers.fn) return [handlers.fn]; - - for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { - ee[i] = handlers[i].fn; - } - - return ee; -}; - -/** - * Return the number of listeners listening to a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Number} The number of listeners. - * @public - */ -EventEmitter.prototype.listenerCount = function listenerCount(event) { - var evt = prefix ? prefix + event : event - , listeners = this._events[evt]; - - if (!listeners) return 0; - if (listeners.fn) return 1; - return listeners.length; -}; - -/** - * Calls each of the listeners registered for a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Boolean} `true` if the event had listeners, else `false`. - * @public - */ -EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { - var evt = prefix ? prefix + event : event; - - if (!this._events[evt]) return false; - - var listeners = this._events[evt] - , len = arguments.length - , args - , i; - - if (listeners.fn) { - if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); - - switch (len) { - case 1: return listeners.fn.call(listeners.context), true; - case 2: return listeners.fn.call(listeners.context, a1), true; - case 3: return listeners.fn.call(listeners.context, a1, a2), true; - case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; - case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; - case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; - } - - for (i = 1, args = new Array(len -1); i < len; i++) { - args[i - 1] = arguments[i]; - } - - listeners.fn.apply(listeners.context, args); - } else { - var length = listeners.length - , j; - - for (i = 0; i < length; i++) { - if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); - - switch (len) { - case 1: listeners[i].fn.call(listeners[i].context); break; - case 2: listeners[i].fn.call(listeners[i].context, a1); break; - case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; - case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; - default: - if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { - args[j - 1] = arguments[j]; - } - - listeners[i].fn.apply(listeners[i].context, args); - } - } - } - - return true; -}; - -/** - * Add a listener for a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} [context=this] The context to invoke the listener with. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.on = function on(event, fn, context) { - return addListener(this, event, fn, context, false); -}; - -/** - * Add a one-time listener for a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} [context=this] The context to invoke the listener with. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.once = function once(event, fn, context) { - return addListener(this, event, fn, context, true); -}; - -/** - * Remove the listeners of a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn Only remove the listeners that match this function. - * @param {*} context Only remove the listeners that have this context. - * @param {Boolean} once Only remove one-time listeners. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { - var evt = prefix ? prefix + event : event; - - if (!this._events[evt]) return this; - if (!fn) { - clearEvent(this, evt); - return this; - } - - var listeners = this._events[evt]; - - if (listeners.fn) { - if ( - listeners.fn === fn && - (!once || listeners.once) && - (!context || listeners.context === context) - ) { - clearEvent(this, evt); - } - } else { - for (var i = 0, events = [], length = listeners.length; i < length; i++) { - if ( - listeners[i].fn !== fn || - (once && !listeners[i].once) || - (context && listeners[i].context !== context) - ) { - events.push(listeners[i]); - } - } - - // - // Reset the array, or remove it completely if we have no more listeners. - // - if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; - else clearEvent(this, evt); - } - - return this; -}; - -/** - * Remove all listeners, or those of the specified event. - * - * @param {(String|Symbol)} [event] The event name. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { - var evt; - - if (event) { - evt = prefix ? prefix + event : event; - if (this._events[evt]) clearEvent(this, evt); - } else { - this._events = new Events(); - this._eventsCount = 0; - } - - return this; -}; - -// -// Alias methods names because people roll like that. -// -EventEmitter.prototype.off = EventEmitter.prototype.removeListener; -EventEmitter.prototype.addListener = EventEmitter.prototype.on; - -// -// Expose the prefix. -// -EventEmitter.prefixed = prefix; - -// -// Allow `EventEmitter` to be imported as module namespace. -// -EventEmitter.EventEmitter = EventEmitter; - -// -// Expose the module. -// -if ('undefined' !== typeof module) { - module.exports = EventEmitter; -} diff --git a/node_modules/eventemitter3/package.json b/node_modules/eventemitter3/package.json deleted file mode 100644 index 3c575b4..0000000 --- a/node_modules/eventemitter3/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "eventemitter3", - "version": "4.0.7", - "description": "EventEmitter3 focuses on performance while maintaining a Node.js AND browser compatible interface.", - "main": "index.js", - "typings": "index.d.ts", - "scripts": { - "browserify": "rm -rf umd && mkdir umd && browserify index.js -s EventEmitter3 -o umd/eventemitter3.js", - "minify": "uglifyjs umd/eventemitter3.js --source-map -cm -o umd/eventemitter3.min.js", - "benchmark": "find benchmarks/run -name '*.js' -exec benchmarks/start.sh {} \\;", - "test": "nyc --reporter=html --reporter=text mocha test/test.js", - "prepublishOnly": "npm run browserify && npm run minify", - "test-browser": "node test/browser.js" - }, - "files": [ - "index.js", - "index.d.ts", - "umd" - ], - "repository": { - "type": "git", - "url": "git://github.com/primus/eventemitter3.git" - }, - "keywords": [ - "EventEmitter", - "EventEmitter2", - "EventEmitter3", - "Events", - "addEventListener", - "addListener", - "emit", - "emits", - "emitter", - "event", - "once", - "pub/sub", - "publish", - "reactor", - "subscribe" - ], - "author": "Arnout Kazemier", - "license": "MIT", - "bugs": { - "url": "https://github.com/primus/eventemitter3/issues" - }, - "devDependencies": { - "assume": "^2.2.0", - "browserify": "^16.5.0", - "mocha": "^8.0.1", - "nyc": "^15.1.0", - "pre-commit": "^1.2.0", - "sauce-browsers": "^2.0.0", - "sauce-test": "^1.3.3", - "uglify-js": "^3.9.0" - } -} diff --git a/node_modules/eventemitter3/umd/eventemitter3.js b/node_modules/eventemitter3/umd/eventemitter3.js deleted file mode 100644 index 888fcb8..0000000 --- a/node_modules/eventemitter3/umd/eventemitter3.js +++ /dev/null @@ -1,340 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.EventEmitter3 = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ -'use strict'; - -var has = Object.prototype.hasOwnProperty - , prefix = '~'; - -/** - * Constructor to create a storage for our `EE` objects. - * An `Events` instance is a plain object whose properties are event names. - * - * @constructor - * @private - */ -function Events() {} - -// -// We try to not inherit from `Object.prototype`. In some engines creating an -// instance in this way is faster than calling `Object.create(null)` directly. -// If `Object.create(null)` is not supported we prefix the event names with a -// character to make sure that the built-in object properties are not -// overridden or used as an attack vector. -// -if (Object.create) { - Events.prototype = Object.create(null); - - // - // This hack is needed because the `__proto__` property is still inherited in - // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. - // - if (!new Events().__proto__) prefix = false; -} - -/** - * Representation of a single event listener. - * - * @param {Function} fn The listener function. - * @param {*} context The context to invoke the listener with. - * @param {Boolean} [once=false] Specify if the listener is a one-time listener. - * @constructor - * @private - */ -function EE(fn, context, once) { - this.fn = fn; - this.context = context; - this.once = once || false; -} - -/** - * Add a listener for a given event. - * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} context The context to invoke the listener with. - * @param {Boolean} once Specify if the listener is a one-time listener. - * @returns {EventEmitter} - * @private - */ -function addListener(emitter, event, fn, context, once) { - if (typeof fn !== 'function') { - throw new TypeError('The listener must be a function'); - } - - var listener = new EE(fn, context || emitter, once) - , evt = prefix ? prefix + event : event; - - if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; - else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); - else emitter._events[evt] = [emitter._events[evt], listener]; - - return emitter; -} - -/** - * Clear event by name. - * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} evt The Event name. - * @private - */ -function clearEvent(emitter, evt) { - if (--emitter._eventsCount === 0) emitter._events = new Events(); - else delete emitter._events[evt]; -} - -/** - * Minimal `EventEmitter` interface that is molded against the Node.js - * `EventEmitter` interface. - * - * @constructor - * @public - */ -function EventEmitter() { - this._events = new Events(); - this._eventsCount = 0; -} - -/** - * Return an array listing the events for which the emitter has registered - * listeners. - * - * @returns {Array} - * @public - */ -EventEmitter.prototype.eventNames = function eventNames() { - var names = [] - , events - , name; - - if (this._eventsCount === 0) return names; - - for (name in (events = this._events)) { - if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); - } - - if (Object.getOwnPropertySymbols) { - return names.concat(Object.getOwnPropertySymbols(events)); - } - - return names; -}; - -/** - * Return the listeners registered for a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Array} The registered listeners. - * @public - */ -EventEmitter.prototype.listeners = function listeners(event) { - var evt = prefix ? prefix + event : event - , handlers = this._events[evt]; - - if (!handlers) return []; - if (handlers.fn) return [handlers.fn]; - - for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { - ee[i] = handlers[i].fn; - } - - return ee; -}; - -/** - * Return the number of listeners listening to a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Number} The number of listeners. - * @public - */ -EventEmitter.prototype.listenerCount = function listenerCount(event) { - var evt = prefix ? prefix + event : event - , listeners = this._events[evt]; - - if (!listeners) return 0; - if (listeners.fn) return 1; - return listeners.length; -}; - -/** - * Calls each of the listeners registered for a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Boolean} `true` if the event had listeners, else `false`. - * @public - */ -EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { - var evt = prefix ? prefix + event : event; - - if (!this._events[evt]) return false; - - var listeners = this._events[evt] - , len = arguments.length - , args - , i; - - if (listeners.fn) { - if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); - - switch (len) { - case 1: return listeners.fn.call(listeners.context), true; - case 2: return listeners.fn.call(listeners.context, a1), true; - case 3: return listeners.fn.call(listeners.context, a1, a2), true; - case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; - case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; - case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; - } - - for (i = 1, args = new Array(len -1); i < len; i++) { - args[i - 1] = arguments[i]; - } - - listeners.fn.apply(listeners.context, args); - } else { - var length = listeners.length - , j; - - for (i = 0; i < length; i++) { - if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); - - switch (len) { - case 1: listeners[i].fn.call(listeners[i].context); break; - case 2: listeners[i].fn.call(listeners[i].context, a1); break; - case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; - case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; - default: - if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { - args[j - 1] = arguments[j]; - } - - listeners[i].fn.apply(listeners[i].context, args); - } - } - } - - return true; -}; - -/** - * Add a listener for a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} [context=this] The context to invoke the listener with. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.on = function on(event, fn, context) { - return addListener(this, event, fn, context, false); -}; - -/** - * Add a one-time listener for a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} [context=this] The context to invoke the listener with. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.once = function once(event, fn, context) { - return addListener(this, event, fn, context, true); -}; - -/** - * Remove the listeners of a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn Only remove the listeners that match this function. - * @param {*} context Only remove the listeners that have this context. - * @param {Boolean} once Only remove one-time listeners. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { - var evt = prefix ? prefix + event : event; - - if (!this._events[evt]) return this; - if (!fn) { - clearEvent(this, evt); - return this; - } - - var listeners = this._events[evt]; - - if (listeners.fn) { - if ( - listeners.fn === fn && - (!once || listeners.once) && - (!context || listeners.context === context) - ) { - clearEvent(this, evt); - } - } else { - for (var i = 0, events = [], length = listeners.length; i < length; i++) { - if ( - listeners[i].fn !== fn || - (once && !listeners[i].once) || - (context && listeners[i].context !== context) - ) { - events.push(listeners[i]); - } - } - - // - // Reset the array, or remove it completely if we have no more listeners. - // - if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; - else clearEvent(this, evt); - } - - return this; -}; - -/** - * Remove all listeners, or those of the specified event. - * - * @param {(String|Symbol)} [event] The event name. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { - var evt; - - if (event) { - evt = prefix ? prefix + event : event; - if (this._events[evt]) clearEvent(this, evt); - } else { - this._events = new Events(); - this._eventsCount = 0; - } - - return this; -}; - -// -// Alias methods names because people roll like that. -// -EventEmitter.prototype.off = EventEmitter.prototype.removeListener; -EventEmitter.prototype.addListener = EventEmitter.prototype.on; - -// -// Expose the prefix. -// -EventEmitter.prefixed = prefix; - -// -// Allow `EventEmitter` to be imported as module namespace. -// -EventEmitter.EventEmitter = EventEmitter; - -// -// Expose the module. -// -if ('undefined' !== typeof module) { - module.exports = EventEmitter; -} - -},{}]},{},[1])(1) -}); diff --git a/node_modules/eventemitter3/umd/eventemitter3.min.js b/node_modules/eventemitter3/umd/eventemitter3.min.js deleted file mode 100644 index 2b1d2fb..0000000 --- a/node_modules/eventemitter3/umd/eventemitter3.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EventEmitter3=e()}(function(){return function i(s,f,c){function u(t,e){if(!f[t]){if(!s[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(a)return a(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=f[t]={exports:{}};s[t][0].call(o.exports,function(e){return u(s[t][1][e]||e)},o,o.exports,i,s,f,c)}return f[t].exports}for(var a="function"==typeof require&&require,e=0;e<c.length;e++)u(c[e]);return u}({1:[function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,v="~";function o(){}function f(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var i=new f(n,r||e,o),s=v?v+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function u(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function s(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(v=!1)),s.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(v?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},s.prototype.listeners=function(e){var t=v?v+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,i=new Array(o);r<o;r++)i[r]=n[r].fn;return i},s.prototype.listenerCount=function(e){var t=v?v+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,r,o,i){var s=v?v+e:e;if(!this._events[s])return!1;var f,c=this._events[s],u=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,r),!0;case 5:return c.fn.call(c.context,t,n,r,o),!0;case 6:return c.fn.call(c.context,t,n,r,o,i),!0}for(p=1,f=new Array(u-1);p<u;p++)f[p-1]=arguments[p];c.fn.apply(c.context,f)}else for(var a,l=c.length,p=0;p<l;p++)switch(c[p].once&&this.removeListener(e,c[p].fn,void 0,!0),u){case 1:c[p].fn.call(c[p].context);break;case 2:c[p].fn.call(c[p].context,t);break;case 3:c[p].fn.call(c[p].context,t,n);break;case 4:c[p].fn.call(c[p].context,t,n,r);break;default:if(!f)for(a=1,f=new Array(u-1);a<u;a++)f[a-1]=arguments[a];c[p].fn.apply(c[p].context,f)}return!0},s.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,n,r){var o=v?v+e:e;if(!this._events[o])return this;if(!t)return u(this,o),this;var i=this._events[o];if(i.fn)i.fn!==t||r&&!i.once||n&&i.context!==n||u(this,o);else{for(var s=0,f=[],c=i.length;s<c;s++)(i[s].fn!==t||r&&!i[s].once||n&&i[s].context!==n)&&f.push(i[s]);f.length?this._events[o]=1===f.length?f[0]:f:u(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=v?v+e:e,this._events[t]&&u(this,t)):(this._events=new o,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=v,s.EventEmitter=s,void 0!==t&&(t.exports=s)},{}]},{},[1])(1)}); \ No newline at end of file diff --git a/node_modules/eventemitter3/umd/eventemitter3.min.js.map b/node_modules/eventemitter3/umd/eventemitter3.min.js.map deleted file mode 100644 index 4c3ef34..0000000 --- a/node_modules/eventemitter3/umd/eventemitter3.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["umd/eventemitter3.js"],"names":["f","exports","module","define","amd","window","global","self","this","EventEmitter3","r","e","n","t","o","i","c","require","u","a","Error","code","p","call","length","1","has","Object","prototype","hasOwnProperty","prefix","Events","EE","fn","context","once","addListener","emitter","event","TypeError","listener","evt","_events","push","_eventsCount","clearEvent","EventEmitter","create","__proto__","eventNames","events","name","names","slice","getOwnPropertySymbols","concat","listeners","handlers","l","ee","Array","listenerCount","emit","a1","a2","a3","a4","a5","args","len","arguments","removeListener","undefined","apply","j","on","removeAllListeners","off","prefixed"],"mappings":"CAAA,SAAUA,GAAuB,iBAAVC,SAAoC,oBAATC,OAAsBA,OAAOD,QAAQD,IAA4B,mBAATG,QAAqBA,OAAOC,IAAKD,OAAO,GAAGH,IAAiC,oBAATK,OAAwBA,OAA+B,oBAATC,OAAwBA,OAA6B,oBAAPC,KAAsBA,KAAYC,MAAOC,cAAgBT,IAAlU,CAAyU,WAAqC,OAAmB,SAASU,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEf,GAAG,IAAIY,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIC,EAAE,mBAAmBC,SAASA,QAAQ,IAAIjB,GAAGgB,EAAE,OAAOA,EAAED,GAAE,GAAI,GAAGG,EAAE,OAAOA,EAAEH,GAAE,GAAI,IAAII,EAAE,IAAIC,MAAM,uBAAuBL,EAAE,KAAK,MAAMI,EAAEE,KAAK,mBAAmBF,EAAE,IAAIG,EAAEV,EAAEG,GAAG,CAACd,QAAQ,IAAIU,EAAEI,GAAG,GAAGQ,KAAKD,EAAErB,QAAQ,SAASS,GAAoB,OAAOI,EAAlBH,EAAEI,GAAG,GAAGL,IAAeA,IAAIY,EAAEA,EAAErB,QAAQS,EAAEC,EAAEC,EAAEC,GAAG,OAAOD,EAAEG,GAAGd,QAAQ,IAAI,IAAIiB,EAAE,mBAAmBD,SAASA,QAAQF,EAAE,EAAEA,EAAEF,EAAEW,OAAOT,IAAID,EAAED,EAAEE,IAAI,OAAOD,EAA7b,CAA4c,CAACW,EAAE,CAAC,SAASR,EAAQf,EAAOD,gBAG71B,IAAIyB,EAAMC,OAAOC,UAAUC,eACvBC,EAAS,IASb,SAASC,KA4BT,SAASC,EAAGC,EAAIC,EAASC,GACvB3B,KAAKyB,GAAKA,EACVzB,KAAK0B,QAAUA,EACf1B,KAAK2B,KAAOA,IAAQ,EActB,SAASC,EAAYC,EAASC,EAAOL,EAAIC,EAASC,GAChD,GAAkB,mBAAPF,EACT,MAAM,IAAIM,UAAU,mCAGtB,IAAIC,EAAW,IAAIR,EAAGC,EAAIC,GAAWG,EAASF,GAC1CM,EAAMX,EAASA,EAASQ,EAAQA,EAMpC,OAJKD,EAAQK,QAAQD,GACXJ,EAAQK,QAAQD,GAAKR,GAC1BI,EAAQK,QAAQD,GAAO,CAACJ,EAAQK,QAAQD,GAAMD,GADhBH,EAAQK,QAAQD,GAAKE,KAAKH,IADlCH,EAAQK,QAAQD,GAAOD,EAAUH,EAAQO,gBAI7DP,EAUT,SAASQ,EAAWR,EAASI,GACI,KAAzBJ,EAAQO,aAAoBP,EAAQK,QAAU,IAAIX,SAC5CM,EAAQK,QAAQD,GAU9B,SAASK,IACPtC,KAAKkC,QAAU,IAAIX,EACnBvB,KAAKoC,aAAe,EAxElBjB,OAAOoB,SACThB,EAAOH,UAAYD,OAAOoB,OAAO,OAM5B,IAAIhB,GAASiB,YAAWlB,GAAS,IA2ExCgB,EAAalB,UAAUqB,WAAa,WAClC,IACIC,EACAC,EAFAC,EAAQ,GAIZ,GAA0B,IAAtB5C,KAAKoC,aAAoB,OAAOQ,EAEpC,IAAKD,KAASD,EAAS1C,KAAKkC,QACtBhB,EAAIH,KAAK2B,EAAQC,IAAOC,EAAMT,KAAKb,EAASqB,EAAKE,MAAM,GAAKF,GAGlE,OAAIxB,OAAO2B,sBACFF,EAAMG,OAAO5B,OAAO2B,sBAAsBJ,IAG5CE,GAUTN,EAAalB,UAAU4B,UAAY,SAAmBlB,GACpD,IAAIG,EAAMX,EAASA,EAASQ,EAAQA,EAChCmB,EAAWjD,KAAKkC,QAAQD,GAE5B,IAAKgB,EAAU,MAAO,GACtB,GAAIA,EAASxB,GAAI,MAAO,CAACwB,EAASxB,IAElC,IAAK,IAAIlB,EAAI,EAAG2C,EAAID,EAASjC,OAAQmC,EAAK,IAAIC,MAAMF,GAAI3C,EAAI2C,EAAG3C,IAC7D4C,EAAG5C,GAAK0C,EAAS1C,GAAGkB,GAGtB,OAAO0B,GAUTb,EAAalB,UAAUiC,cAAgB,SAAuBvB,GAC5D,IAAIG,EAAMX,EAASA,EAASQ,EAAQA,EAChCkB,EAAYhD,KAAKkC,QAAQD,GAE7B,OAAKe,EACDA,EAAUvB,GAAW,EAClBuB,EAAUhC,OAFM,GAYzBsB,EAAalB,UAAUkC,KAAO,SAAcxB,EAAOyB,EAAIC,EAAIC,EAAIC,EAAIC,GACjE,IAAI1B,EAAMX,EAASA,EAASQ,EAAQA,EAEpC,IAAK9B,KAAKkC,QAAQD,GAAM,OAAO,EAE/B,IAEI2B,EAFAZ,EAAYhD,KAAKkC,QAAQD,GACzB4B,EAAMC,UAAU9C,OAIpB,GAAIgC,EAAUvB,GAAI,CAGhB,OAFIuB,EAAUrB,MAAM3B,KAAK+D,eAAejC,EAAOkB,EAAUvB,QAAIuC,GAAW,GAEhEH,GACN,KAAK,EAAG,OAAOb,EAAUvB,GAAGV,KAAKiC,EAAUtB,UAAU,EACrD,KAAK,EAAG,OAAOsB,EAAUvB,GAAGV,KAAKiC,EAAUtB,QAAS6B,IAAK,EACzD,KAAK,EAAG,OAAOP,EAAUvB,GAAGV,KAAKiC,EAAUtB,QAAS6B,EAAIC,IAAK,EAC7D,KAAK,EAAG,OAAOR,EAAUvB,GAAGV,KAAKiC,EAAUtB,QAAS6B,EAAIC,EAAIC,IAAK,EACjE,KAAK,EAAG,OAAOT,EAAUvB,GAAGV,KAAKiC,EAAUtB,QAAS6B,EAAIC,EAAIC,EAAIC,IAAK,EACrE,KAAK,EAAG,OAAOV,EAAUvB,GAAGV,KAAKiC,EAAUtB,QAAS6B,EAAIC,EAAIC,EAAIC,EAAIC,IAAK,EAG3E,IAAKpD,EAAI,EAAGqD,EAAO,IAAIR,MAAMS,EAAK,GAAItD,EAAIsD,EAAKtD,IAC7CqD,EAAKrD,EAAI,GAAKuD,UAAUvD,GAG1ByC,EAAUvB,GAAGwC,MAAMjB,EAAUtB,QAASkC,QAKtC,IAHA,IACIM,EADAlD,EAASgC,EAAUhC,OAGlBT,EAAI,EAAGA,EAAIS,EAAQT,IAGtB,OAFIyC,EAAUzC,GAAGoB,MAAM3B,KAAK+D,eAAejC,EAAOkB,EAAUzC,GAAGkB,QAAIuC,GAAW,GAEtEH,GACN,KAAK,EAAGb,EAAUzC,GAAGkB,GAAGV,KAAKiC,EAAUzC,GAAGmB,SAAU,MACpD,KAAK,EAAGsB,EAAUzC,GAAGkB,GAAGV,KAAKiC,EAAUzC,GAAGmB,QAAS6B,GAAK,MACxD,KAAK,EAAGP,EAAUzC,GAAGkB,GAAGV,KAAKiC,EAAUzC,GAAGmB,QAAS6B,EAAIC,GAAK,MAC5D,KAAK,EAAGR,EAAUzC,GAAGkB,GAAGV,KAAKiC,EAAUzC,GAAGmB,QAAS6B,EAAIC,EAAIC,GAAK,MAChE,QACE,IAAKG,EAAM,IAAKM,EAAI,EAAGN,EAAO,IAAIR,MAAMS,EAAK,GAAIK,EAAIL,EAAKK,IACxDN,EAAKM,EAAI,GAAKJ,UAAUI,GAG1BlB,EAAUzC,GAAGkB,GAAGwC,MAAMjB,EAAUzC,GAAGmB,QAASkC,GAKpD,OAAO,GAYTtB,EAAalB,UAAU+C,GAAK,SAAYrC,EAAOL,EAAIC,GACjD,OAAOE,EAAY5B,KAAM8B,EAAOL,EAAIC,GAAS,IAY/CY,EAAalB,UAAUO,KAAO,SAAcG,EAAOL,EAAIC,GACrD,OAAOE,EAAY5B,KAAM8B,EAAOL,EAAIC,GAAS,IAa/CY,EAAalB,UAAU2C,eAAiB,SAAwBjC,EAAOL,EAAIC,EAASC,GAClF,IAAIM,EAAMX,EAASA,EAASQ,EAAQA,EAEpC,IAAK9B,KAAKkC,QAAQD,GAAM,OAAOjC,KAC/B,IAAKyB,EAEH,OADAY,EAAWrC,KAAMiC,GACVjC,KAGT,IAAIgD,EAAYhD,KAAKkC,QAAQD,GAE7B,GAAIe,EAAUvB,GAEVuB,EAAUvB,KAAOA,GACfE,IAAQqB,EAAUrB,MAClBD,GAAWsB,EAAUtB,UAAYA,GAEnCW,EAAWrC,KAAMiC,OAEd,CACL,IAAK,IAAI1B,EAAI,EAAGmC,EAAS,GAAI1B,EAASgC,EAAUhC,OAAQT,EAAIS,EAAQT,KAEhEyC,EAAUzC,GAAGkB,KAAOA,GACnBE,IAASqB,EAAUzC,GAAGoB,MACtBD,GAAWsB,EAAUzC,GAAGmB,UAAYA,IAErCgB,EAAOP,KAAKa,EAAUzC,IAOtBmC,EAAO1B,OAAQhB,KAAKkC,QAAQD,GAAyB,IAAlBS,EAAO1B,OAAe0B,EAAO,GAAKA,EACpEL,EAAWrC,KAAMiC,GAGxB,OAAOjC,MAUTsC,EAAalB,UAAUgD,mBAAqB,SAA4BtC,GACtE,IAAIG,EAUJ,OARIH,GACFG,EAAMX,EAASA,EAASQ,EAAQA,EAC5B9B,KAAKkC,QAAQD,IAAMI,EAAWrC,KAAMiC,KAExCjC,KAAKkC,QAAU,IAAIX,EACnBvB,KAAKoC,aAAe,GAGfpC,MAMTsC,EAAalB,UAAUiD,IAAM/B,EAAalB,UAAU2C,eACpDzB,EAAalB,UAAUQ,YAAcU,EAAalB,UAAU+C,GAK5D7B,EAAagC,SAAWhD,EAKxBgB,EAAaA,aAAeA,OAKxB,IAAuB5C,IACzBA,EAAOD,QAAU6C,IAGjB,KAAK,GAAG,CAAC,GAlV0W,CAkVtW"} \ No newline at end of file diff --git a/node_modules/follow-redirects/LICENSE b/node_modules/follow-redirects/LICENSE deleted file mode 100644 index 742cbad..0000000 --- a/node_modules/follow-redirects/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright 2014–present Olivier Lalonde <olalonde@gmail.com>, James Talmage <james@talmage.io>, Ruben Verborgh - -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/node_modules/follow-redirects/README.md b/node_modules/follow-redirects/README.md deleted file mode 100644 index eb869a6..0000000 --- a/node_modules/follow-redirects/README.md +++ /dev/null @@ -1,155 +0,0 @@ -## Follow Redirects - -Drop-in replacement for Node's `http` and `https` modules that automatically follows redirects. - -[![npm version](https://img.shields.io/npm/v/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) -[![Build Status](https://github.com/follow-redirects/follow-redirects/workflows/CI/badge.svg)](https://github.com/follow-redirects/follow-redirects/actions) -[![Coverage Status](https://coveralls.io/repos/follow-redirects/follow-redirects/badge.svg?branch=master)](https://coveralls.io/r/follow-redirects/follow-redirects?branch=master) -[![npm downloads](https://img.shields.io/npm/dm/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) -[![Sponsor on GitHub](https://img.shields.io/static/v1?label=Sponsor&message=%F0%9F%92%96&logo=GitHub)](https://github.com/sponsors/RubenVerborgh) - -`follow-redirects` provides [request](https://nodejs.org/api/http.html#http_http_request_options_callback) and [get](https://nodejs.org/api/http.html#http_http_get_options_callback) - methods that behave identically to those found on the native [http](https://nodejs.org/api/http.html#http_http_request_options_callback) and [https](https://nodejs.org/api/https.html#https_https_request_options_callback) - modules, with the exception that they will seamlessly follow redirects. - -```javascript -const { http, https } = require('follow-redirects'); - -http.get('http://bit.ly/900913', response => { - response.on('data', chunk => { - console.log(chunk); - }); -}).on('error', err => { - console.error(err); -}); -``` - -You can inspect the final redirected URL through the `responseUrl` property on the `response`. -If no redirection happened, `responseUrl` is the original request URL. - -```javascript -const request = https.request({ - host: 'bitly.com', - path: '/UHfDGO', -}, response => { - console.log(response.responseUrl); - // 'http://duckduckgo.com/robots.txt' -}); -request.end(); -``` - -## Options -### Global options -Global options are set directly on the `follow-redirects` module: - -```javascript -const followRedirects = require('follow-redirects'); -followRedirects.maxRedirects = 10; -followRedirects.maxBodyLength = 20 * 1024 * 1024; // 20 MB -``` - -The following global options are supported: - -- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted. - -- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted. - -### Per-request options -Per-request options are set by passing an `options` object: - -```javascript -const url = require('url'); -const { http, https } = require('follow-redirects'); - -const options = url.parse('http://bit.ly/900913'); -options.maxRedirects = 10; -options.beforeRedirect = (options, response, request) => { - // Use this to adjust the request options upon redirecting, - // to inspect the latest response headers, - // or to cancel the request by throwing an error - - // response.headers = the redirect response headers - // response.statusCode = the redirect response code (eg. 301, 307, etc.) - - // request.url = the requested URL that resulted in a redirect - // request.headers = the headers in the request that resulted in a redirect - // request.method = the method of the request that resulted in a redirect - if (options.hostname === "example.com") { - options.auth = "user:password"; - } -}; -http.request(options); -``` - -In addition to the [standard HTTP](https://nodejs.org/api/http.html#http_http_request_options_callback) and [HTTPS options](https://nodejs.org/api/https.html#https_https_request_options_callback), -the following per-request options are supported: -- `followRedirects` (default: `true`) – whether redirects should be followed. - -- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted. - -- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted. - -- `beforeRedirect` (default: `undefined`) – optionally change the request `options` on redirects, or abort the request by throwing an error. - -- `agents` (default: `undefined`) – sets the `agent` option per protocol, since HTTP and HTTPS use different agents. Example value: `{ http: new http.Agent(), https: new https.Agent() }` - -- `trackRedirects` (default: `false`) – whether to store the redirected response details into the `redirects` array on the response object. - - -### Advanced usage -By default, `follow-redirects` will use the Node.js default implementations -of [`http`](https://nodejs.org/api/http.html) -and [`https`](https://nodejs.org/api/https.html). -To enable features such as caching and/or intermediate request tracking, -you might instead want to wrap `follow-redirects` around custom protocol implementations: - -```javascript -const { http, https } = require('follow-redirects').wrap({ - http: require('your-custom-http'), - https: require('your-custom-https'), -}); -``` - -Such custom protocols only need an implementation of the `request` method. - -## Browser Usage - -Due to the way the browser works, -the `http` and `https` browser equivalents perform redirects by default. - -By requiring `follow-redirects` this way: -```javascript -const http = require('follow-redirects/http'); -const https = require('follow-redirects/https'); -``` -you can easily tell webpack and friends to replace -`follow-redirect` by the built-in versions: - -```json -{ - "follow-redirects/http" : "http", - "follow-redirects/https" : "https" -} -``` - -## Contributing - -Pull Requests are always welcome. Please [file an issue](https://github.com/follow-redirects/follow-redirects/issues) - detailing your proposal before you invest your valuable time. Additional features and bug fixes should be accompanied - by tests. You can run the test suite locally with a simple `npm test` command. - -## Debug Logging - -`follow-redirects` uses the excellent [debug](https://www.npmjs.com/package/debug) for logging. To turn on logging - set the environment variable `DEBUG=follow-redirects` for debug output from just this module. When running the test - suite it is sometimes advantageous to set `DEBUG=*` to see output from the express server as well. - -## Authors - -- [Ruben Verborgh](https://ruben.verborgh.org/) -- [Olivier Lalonde](mailto:olalonde@gmail.com) -- [James Talmage](mailto:james@talmage.io) - -## License - -[MIT License](https://github.com/follow-redirects/follow-redirects/blob/master/LICENSE) diff --git a/node_modules/follow-redirects/debug.js b/node_modules/follow-redirects/debug.js deleted file mode 100644 index decb77d..0000000 --- a/node_modules/follow-redirects/debug.js +++ /dev/null @@ -1,15 +0,0 @@ -var debug; - -module.exports = function () { - if (!debug) { - try { - /* eslint global-require: off */ - debug = require("debug")("follow-redirects"); - } - catch (error) { /* */ } - if (typeof debug !== "function") { - debug = function () { /* */ }; - } - } - debug.apply(null, arguments); -}; diff --git a/node_modules/follow-redirects/http.js b/node_modules/follow-redirects/http.js deleted file mode 100644 index 695e356..0000000 --- a/node_modules/follow-redirects/http.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./").http; diff --git a/node_modules/follow-redirects/https.js b/node_modules/follow-redirects/https.js deleted file mode 100644 index d21c921..0000000 --- a/node_modules/follow-redirects/https.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./").https; diff --git a/node_modules/follow-redirects/index.js b/node_modules/follow-redirects/index.js deleted file mode 100644 index a30b32c..0000000 --- a/node_modules/follow-redirects/index.js +++ /dev/null @@ -1,686 +0,0 @@ -var url = require("url"); -var URL = url.URL; -var http = require("http"); -var https = require("https"); -var Writable = require("stream").Writable; -var assert = require("assert"); -var debug = require("./debug"); - -// Preventive platform detection -// istanbul ignore next -(function detectUnsupportedEnvironment() { - var looksLikeNode = typeof process !== "undefined"; - var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; - var looksLikeV8 = isFunction(Error.captureStackTrace); - if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) { - console.warn("The follow-redirects package should be excluded from browser builds."); - } -}()); - -// Whether to use the native URL object or the legacy url module -var useNativeURL = false; -try { - assert(new URL("")); -} -catch (error) { - useNativeURL = error.code === "ERR_INVALID_URL"; -} - -// URL fields to preserve in copy operations -var preservedUrlFields = [ - "auth", - "host", - "hostname", - "href", - "path", - "pathname", - "port", - "protocol", - "query", - "search", - "hash", -]; - -// Create handlers that pass events from native requests -var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; -var eventHandlers = Object.create(null); -events.forEach(function (event) { - eventHandlers[event] = function (arg1, arg2, arg3) { - this._redirectable.emit(event, arg1, arg2, arg3); - }; -}); - -// Error types with codes -var InvalidUrlError = createErrorType( - "ERR_INVALID_URL", - "Invalid URL", - TypeError -); -var RedirectionError = createErrorType( - "ERR_FR_REDIRECTION_FAILURE", - "Redirected request failed" -); -var TooManyRedirectsError = createErrorType( - "ERR_FR_TOO_MANY_REDIRECTS", - "Maximum number of redirects exceeded", - RedirectionError -); -var MaxBodyLengthExceededError = createErrorType( - "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", - "Request body larger than maxBodyLength limit" -); -var WriteAfterEndError = createErrorType( - "ERR_STREAM_WRITE_AFTER_END", - "write after end" -); - -// istanbul ignore next -var destroy = Writable.prototype.destroy || noop; - -// An HTTP(S) request that can be redirected -function RedirectableRequest(options, responseCallback) { - // Initialize the request - Writable.call(this); - this._sanitizeOptions(options); - this._options = options; - this._ended = false; - this._ending = false; - this._redirectCount = 0; - this._redirects = []; - this._requestBodyLength = 0; - this._requestBodyBuffers = []; - - // Attach a callback if passed - if (responseCallback) { - this.on("response", responseCallback); - } - - // React to responses of native requests - var self = this; - this._onNativeResponse = function (response) { - try { - self._processResponse(response); - } - catch (cause) { - self.emit("error", cause instanceof RedirectionError ? - cause : new RedirectionError({ cause: cause })); - } - }; - - // Perform the first request - this._performRequest(); -} -RedirectableRequest.prototype = Object.create(Writable.prototype); - -RedirectableRequest.prototype.abort = function () { - destroyRequest(this._currentRequest); - this._currentRequest.abort(); - this.emit("abort"); -}; - -RedirectableRequest.prototype.destroy = function (error) { - destroyRequest(this._currentRequest, error); - destroy.call(this, error); - return this; -}; - -// Writes buffered data to the current native request -RedirectableRequest.prototype.write = function (data, encoding, callback) { - // Writing is not allowed if end has been called - if (this._ending) { - throw new WriteAfterEndError(); - } - - // Validate input and shift parameters if necessary - if (!isString(data) && !isBuffer(data)) { - throw new TypeError("data should be a string, Buffer or Uint8Array"); - } - if (isFunction(encoding)) { - callback = encoding; - encoding = null; - } - - // Ignore empty buffers, since writing them doesn't invoke the callback - // https://github.com/nodejs/node/issues/22066 - if (data.length === 0) { - if (callback) { - callback(); - } - return; - } - // Only write when we don't exceed the maximum body length - if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { - this._requestBodyLength += data.length; - this._requestBodyBuffers.push({ data: data, encoding: encoding }); - this._currentRequest.write(data, encoding, callback); - } - // Error when we exceed the maximum body length - else { - this.emit("error", new MaxBodyLengthExceededError()); - this.abort(); - } -}; - -// Ends the current native request -RedirectableRequest.prototype.end = function (data, encoding, callback) { - // Shift parameters if necessary - if (isFunction(data)) { - callback = data; - data = encoding = null; - } - else if (isFunction(encoding)) { - callback = encoding; - encoding = null; - } - - // Write data if needed and end - if (!data) { - this._ended = this._ending = true; - this._currentRequest.end(null, null, callback); - } - else { - var self = this; - var currentRequest = this._currentRequest; - this.write(data, encoding, function () { - self._ended = true; - currentRequest.end(null, null, callback); - }); - this._ending = true; - } -}; - -// Sets a header value on the current native request -RedirectableRequest.prototype.setHeader = function (name, value) { - this._options.headers[name] = value; - this._currentRequest.setHeader(name, value); -}; - -// Clears a header value on the current native request -RedirectableRequest.prototype.removeHeader = function (name) { - delete this._options.headers[name]; - this._currentRequest.removeHeader(name); -}; - -// Global timeout for all underlying requests -RedirectableRequest.prototype.setTimeout = function (msecs, callback) { - var self = this; - - // Destroys the socket on timeout - function destroyOnTimeout(socket) { - socket.setTimeout(msecs); - socket.removeListener("timeout", socket.destroy); - socket.addListener("timeout", socket.destroy); - } - - // Sets up a timer to trigger a timeout event - function startTimer(socket) { - if (self._timeout) { - clearTimeout(self._timeout); - } - self._timeout = setTimeout(function () { - self.emit("timeout"); - clearTimer(); - }, msecs); - destroyOnTimeout(socket); - } - - // Stops a timeout from triggering - function clearTimer() { - // Clear the timeout - if (self._timeout) { - clearTimeout(self._timeout); - self._timeout = null; - } - - // Clean up all attached listeners - self.removeListener("abort", clearTimer); - self.removeListener("error", clearTimer); - self.removeListener("response", clearTimer); - self.removeListener("close", clearTimer); - if (callback) { - self.removeListener("timeout", callback); - } - if (!self.socket) { - self._currentRequest.removeListener("socket", startTimer); - } - } - - // Attach callback if passed - if (callback) { - this.on("timeout", callback); - } - - // Start the timer if or when the socket is opened - if (this.socket) { - startTimer(this.socket); - } - else { - this._currentRequest.once("socket", startTimer); - } - - // Clean up on events - this.on("socket", destroyOnTimeout); - this.on("abort", clearTimer); - this.on("error", clearTimer); - this.on("response", clearTimer); - this.on("close", clearTimer); - - return this; -}; - -// Proxy all other public ClientRequest methods -[ - "flushHeaders", "getHeader", - "setNoDelay", "setSocketKeepAlive", -].forEach(function (method) { - RedirectableRequest.prototype[method] = function (a, b) { - return this._currentRequest[method](a, b); - }; -}); - -// Proxy all public ClientRequest properties -["aborted", "connection", "socket"].forEach(function (property) { - Object.defineProperty(RedirectableRequest.prototype, property, { - get: function () { return this._currentRequest[property]; }, - }); -}); - -RedirectableRequest.prototype._sanitizeOptions = function (options) { - // Ensure headers are always present - if (!options.headers) { - options.headers = {}; - } - - // Since http.request treats host as an alias of hostname, - // but the url module interprets host as hostname plus port, - // eliminate the host property to avoid confusion. - if (options.host) { - // Use hostname if set, because it has precedence - if (!options.hostname) { - options.hostname = options.host; - } - delete options.host; - } - - // Complete the URL object when necessary - if (!options.pathname && options.path) { - var searchPos = options.path.indexOf("?"); - if (searchPos < 0) { - options.pathname = options.path; - } - else { - options.pathname = options.path.substring(0, searchPos); - options.search = options.path.substring(searchPos); - } - } -}; - - -// Executes the next native request (initial or redirect) -RedirectableRequest.prototype._performRequest = function () { - // Load the native protocol - var protocol = this._options.protocol; - var nativeProtocol = this._options.nativeProtocols[protocol]; - if (!nativeProtocol) { - throw new TypeError("Unsupported protocol " + protocol); - } - - // If specified, use the agent corresponding to the protocol - // (HTTP and HTTPS use different types of agents) - if (this._options.agents) { - var scheme = protocol.slice(0, -1); - this._options.agent = this._options.agents[scheme]; - } - - // Create the native request and set up its event handlers - var request = this._currentRequest = - nativeProtocol.request(this._options, this._onNativeResponse); - request._redirectable = this; - for (var event of events) { - request.on(event, eventHandlers[event]); - } - - // RFC7230§5.3.1: When making a request directly to an origin server, […] - // a client MUST send only the absolute path […] as the request-target. - this._currentUrl = /^\//.test(this._options.path) ? - url.format(this._options) : - // When making a request to a proxy, […] - // a client MUST send the target URI in absolute-form […]. - this._options.path; - - // End a redirected request - // (The first request must be ended explicitly with RedirectableRequest#end) - if (this._isRedirect) { - // Write the request entity and end - var i = 0; - var self = this; - var buffers = this._requestBodyBuffers; - (function writeNext(error) { - // Only write if this request has not been redirected yet - // istanbul ignore else - if (request === self._currentRequest) { - // Report any write errors - // istanbul ignore if - if (error) { - self.emit("error", error); - } - // Write the next buffer if there are still left - else if (i < buffers.length) { - var buffer = buffers[i++]; - // istanbul ignore else - if (!request.finished) { - request.write(buffer.data, buffer.encoding, writeNext); - } - } - // End the request if `end` has been called on us - else if (self._ended) { - request.end(); - } - } - }()); - } -}; - -// Processes a response from the current native request -RedirectableRequest.prototype._processResponse = function (response) { - // Store the redirected response - var statusCode = response.statusCode; - if (this._options.trackRedirects) { - this._redirects.push({ - url: this._currentUrl, - headers: response.headers, - statusCode: statusCode, - }); - } - - // RFC7231§6.4: The 3xx (Redirection) class of status code indicates - // that further action needs to be taken by the user agent in order to - // fulfill the request. If a Location header field is provided, - // the user agent MAY automatically redirect its request to the URI - // referenced by the Location field value, - // even if the specific status code is not understood. - - // If the response is not a redirect; return it as-is - var location = response.headers.location; - if (!location || this._options.followRedirects === false || - statusCode < 300 || statusCode >= 400) { - response.responseUrl = this._currentUrl; - response.redirects = this._redirects; - this.emit("response", response); - - // Clean up - this._requestBodyBuffers = []; - return; - } - - // The response is a redirect, so abort the current request - destroyRequest(this._currentRequest); - // Discard the remainder of the response to avoid waiting for data - response.destroy(); - - // RFC7231§6.4: A client SHOULD detect and intervene - // in cyclical redirections (i.e., "infinite" redirection loops). - if (++this._redirectCount > this._options.maxRedirects) { - throw new TooManyRedirectsError(); - } - - // Store the request headers if applicable - var requestHeaders; - var beforeRedirect = this._options.beforeRedirect; - if (beforeRedirect) { - requestHeaders = Object.assign({ - // The Host header was set by nativeProtocol.request - Host: response.req.getHeader("host"), - }, this._options.headers); - } - - // RFC7231§6.4: Automatic redirection needs to done with - // care for methods not known to be safe, […] - // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change - // the request method from POST to GET for the subsequent request. - var method = this._options.method; - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || - // RFC7231§6.4.4: The 303 (See Other) status code indicates that - // the server is redirecting the user agent to a different resource […] - // A user agent can perform a retrieval request targeting that URI - // (a GET or HEAD request if using HTTP) […] - (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { - this._options.method = "GET"; - // Drop a possible entity and headers related to it - this._requestBodyBuffers = []; - removeMatchingHeaders(/^content-/i, this._options.headers); - } - - // Drop the Host header, as the redirect might lead to a different host - var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); - - // If the redirect is relative, carry over the host of the last request - var currentUrlParts = parseUrl(this._currentUrl); - var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : - url.format(Object.assign(currentUrlParts, { host: currentHost })); - - // Create the redirected request - var redirectUrl = resolveUrl(location, currentUrl); - debug("redirecting to", redirectUrl.href); - this._isRedirect = true; - spreadUrlObject(redirectUrl, this._options); - - // Drop confidential headers when redirecting to a less secure protocol - // or to a different domain that is not a superdomain - if (redirectUrl.protocol !== currentUrlParts.protocol && - redirectUrl.protocol !== "https:" || - redirectUrl.host !== currentHost && - !isSubdomain(redirectUrl.host, currentHost)) { - removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers); - } - - // Evaluate the beforeRedirect callback - if (isFunction(beforeRedirect)) { - var responseDetails = { - headers: response.headers, - statusCode: statusCode, - }; - var requestDetails = { - url: currentUrl, - method: method, - headers: requestHeaders, - }; - beforeRedirect(this._options, responseDetails, requestDetails); - this._sanitizeOptions(this._options); - } - - // Perform the redirected request - this._performRequest(); -}; - -// Wraps the key/value object of protocols with redirect functionality -function wrap(protocols) { - // Default settings - var exports = { - maxRedirects: 21, - maxBodyLength: 10 * 1024 * 1024, - }; - - // Wrap each protocol - var nativeProtocols = {}; - Object.keys(protocols).forEach(function (scheme) { - var protocol = scheme + ":"; - var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); - - // Executes a request, following redirects - function request(input, options, callback) { - // Parse parameters, ensuring that input is an object - if (isURL(input)) { - input = spreadUrlObject(input); - } - else if (isString(input)) { - input = spreadUrlObject(parseUrl(input)); - } - else { - callback = options; - options = validateUrl(input); - input = { protocol: protocol }; - } - if (isFunction(options)) { - callback = options; - options = null; - } - - // Set defaults - options = Object.assign({ - maxRedirects: exports.maxRedirects, - maxBodyLength: exports.maxBodyLength, - }, input, options); - options.nativeProtocols = nativeProtocols; - if (!isString(options.host) && !isString(options.hostname)) { - options.hostname = "::1"; - } - - assert.equal(options.protocol, protocol, "protocol mismatch"); - debug("options", options); - return new RedirectableRequest(options, callback); - } - - // Executes a GET request, following redirects - function get(input, options, callback) { - var wrappedRequest = wrappedProtocol.request(input, options, callback); - wrappedRequest.end(); - return wrappedRequest; - } - - // Expose the properties on the wrapped protocol - Object.defineProperties(wrappedProtocol, { - request: { value: request, configurable: true, enumerable: true, writable: true }, - get: { value: get, configurable: true, enumerable: true, writable: true }, - }); - }); - return exports; -} - -function noop() { /* empty */ } - -function parseUrl(input) { - var parsed; - // istanbul ignore else - if (useNativeURL) { - parsed = new URL(input); - } - else { - // Ensure the URL is valid and absolute - parsed = validateUrl(url.parse(input)); - if (!isString(parsed.protocol)) { - throw new InvalidUrlError({ input }); - } - } - return parsed; -} - -function resolveUrl(relative, base) { - // istanbul ignore next - return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative)); -} - -function validateUrl(input) { - if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { - throw new InvalidUrlError({ input: input.href || input }); - } - if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) { - throw new InvalidUrlError({ input: input.href || input }); - } - return input; -} - -function spreadUrlObject(urlObject, target) { - var spread = target || {}; - for (var key of preservedUrlFields) { - spread[key] = urlObject[key]; - } - - // Fix IPv6 hostname - if (spread.hostname.startsWith("[")) { - spread.hostname = spread.hostname.slice(1, -1); - } - // Ensure port is a number - if (spread.port !== "") { - spread.port = Number(spread.port); - } - // Concatenate path - spread.path = spread.search ? spread.pathname + spread.search : spread.pathname; - - return spread; -} - -function removeMatchingHeaders(regex, headers) { - var lastValue; - for (var header in headers) { - if (regex.test(header)) { - lastValue = headers[header]; - delete headers[header]; - } - } - return (lastValue === null || typeof lastValue === "undefined") ? - undefined : String(lastValue).trim(); -} - -function createErrorType(code, message, baseClass) { - // Create constructor - function CustomError(properties) { - // istanbul ignore else - if (isFunction(Error.captureStackTrace)) { - Error.captureStackTrace(this, this.constructor); - } - Object.assign(this, properties || {}); - this.code = code; - this.message = this.cause ? message + ": " + this.cause.message : message; - } - - // Attach constructor and set default properties - CustomError.prototype = new (baseClass || Error)(); - Object.defineProperties(CustomError.prototype, { - constructor: { - value: CustomError, - enumerable: false, - }, - name: { - value: "Error [" + code + "]", - enumerable: false, - }, - }); - return CustomError; -} - -function destroyRequest(request, error) { - for (var event of events) { - request.removeListener(event, eventHandlers[event]); - } - request.on("error", noop); - request.destroy(error); -} - -function isSubdomain(subdomain, domain) { - assert(isString(subdomain) && isString(domain)); - var dot = subdomain.length - domain.length - 1; - return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); -} - -function isString(value) { - return typeof value === "string" || value instanceof String; -} - -function isFunction(value) { - return typeof value === "function"; -} - -function isBuffer(value) { - return typeof value === "object" && ("length" in value); -} - -function isURL(value) { - return URL && value instanceof URL; -} - -// Exports -module.exports = wrap({ http: http, https: https }); -module.exports.wrap = wrap; diff --git a/node_modules/follow-redirects/package.json b/node_modules/follow-redirects/package.json deleted file mode 100644 index 6f491e1..0000000 --- a/node_modules/follow-redirects/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "follow-redirects", - "version": "1.15.9", - "description": "HTTP and HTTPS modules that follow redirects.", - "license": "MIT", - "main": "index.js", - "files": [ - "*.js" - ], - "engines": { - "node": ">=4.0" - }, - "scripts": { - "lint": "eslint *.js test", - "test": "nyc mocha" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/follow-redirects/follow-redirects.git" - }, - "homepage": "https://github.com/follow-redirects/follow-redirects", - "bugs": { - "url": "https://github.com/follow-redirects/follow-redirects/issues" - }, - "keywords": [ - "http", - "https", - "url", - "redirect", - "client", - "location", - "utility" - ], - "author": "Ruben Verborgh <ruben@verborgh.org> (https://ruben.verborgh.org/)", - "contributors": [ - "Olivier Lalonde <olalonde@gmail.com> (http://www.syskall.com)", - "James Talmage <james@talmage.io>" - ], - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "peerDependenciesMeta": { - "debug": { - "optional": true - } - }, - "devDependencies": { - "concat-stream": "^2.0.0", - "eslint": "^5.16.0", - "express": "^4.16.4", - "lolex": "^3.1.0", - "mocha": "^6.0.2", - "nyc": "^14.1.1" - } -} diff --git a/node_modules/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc deleted file mode 100644 index 71a054f..0000000 --- a/node_modules/function-bind/.eslintrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "func-name-matching": 0, - "indent": [2, 4], - "no-new-func": [1], - }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "max-lines-per-function": 0, - "strict": [0] - }, - }, - ], -} diff --git a/node_modules/function-bind/.github/FUNDING.yml b/node_modules/function-bind/.github/FUNDING.yml deleted file mode 100644 index 7448219..0000000 --- a/node_modules/function-bind/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/function-bind -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/function-bind/.github/SECURITY.md b/node_modules/function-bind/.github/SECURITY.md deleted file mode 100644 index 82e4285..0000000 --- a/node_modules/function-bind/.github/SECURITY.md +++ /dev/null @@ -1,3 +0,0 @@ -# Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. diff --git a/node_modules/function-bind/.nycrc b/node_modules/function-bind/.nycrc deleted file mode 100644 index 1826526..0000000 --- a/node_modules/function-bind/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/function-bind/CHANGELOG.md b/node_modules/function-bind/CHANGELOG.md deleted file mode 100644 index f9e6cc0..0000000 --- a/node_modules/function-bind/CHANGELOG.md +++ /dev/null @@ -1,136 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.1.2](https://github.com/ljharb/function-bind/compare/v1.1.1...v1.1.2) - 2023-10-12 - -### Merged - -- Point to the correct file [`#16`](https://github.com/ljharb/function-bind/pull/16) - -### Commits - -- [Tests] migrate tests to Github Actions [`4f8b57c`](https://github.com/ljharb/function-bind/commit/4f8b57c02f2011fe9ae353d5e74e8745f0988af8) -- [Tests] remove `jscs` [`90eb2ed`](https://github.com/ljharb/function-bind/commit/90eb2edbeefd5b76cd6c3a482ea3454db169b31f) -- [meta] update `.gitignore` [`53fcdc3`](https://github.com/ljharb/function-bind/commit/53fcdc371cd66634d6e9b71c836a50f437e89fed) -- [Tests] up to `node` `v11.10`, `v10.15`, `v9.11`, `v8.15`, `v6.16`, `v4.9`; use `nvm install-latest-npm`; run audit script in tests [`1fe8f6e`](https://github.com/ljharb/function-bind/commit/1fe8f6e9aed0dfa8d8b3cdbd00c7f5ea0cd2b36e) -- [meta] add `auto-changelog` [`1921fcb`](https://github.com/ljharb/function-bind/commit/1921fcb5b416b63ffc4acad051b6aad5722f777d) -- [Robustness] remove runtime dependency on all builtins except `.apply` [`f743e61`](https://github.com/ljharb/function-bind/commit/f743e61aa6bb2360358c04d4884c9db853d118b7) -- Docs: enable badges; update wording [`503cb12`](https://github.com/ljharb/function-bind/commit/503cb12d998b5f91822776c73332c7adcd6355dd) -- [readme] update badges [`290c5db`](https://github.com/ljharb/function-bind/commit/290c5dbbbda7264efaeb886552a374b869a4bb48) -- [Tests] switch to nyc for coverage [`ea360ba`](https://github.com/ljharb/function-bind/commit/ea360ba907fc2601ed18d01a3827fa2d3533cdf8) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`cae5e9e`](https://github.com/ljharb/function-bind/commit/cae5e9e07a5578dc6df26c03ee22851ce05b943c) -- [meta] add `funding` field; create FUNDING.yml [`c9f4274`](https://github.com/ljharb/function-bind/commit/c9f4274aa80ea3aae9657a3938fdba41a3b04ca6) -- [Tests] fix eslint errors from #15 [`f69aaa2`](https://github.com/ljharb/function-bind/commit/f69aaa2beb2fdab4415bfb885760a699d0b9c964) -- [actions] fix permissions [`99a0cd9`](https://github.com/ljharb/function-bind/commit/99a0cd9f3b5bac223a0d572f081834cd73314be7) -- [meta] use `npmignore` to autogenerate an npmignore file [`f03b524`](https://github.com/ljharb/function-bind/commit/f03b524ca91f75a109a5d062f029122c86ecd1ae) -- [Dev Deps] update `@ljharb/eslint‑config`, `eslint`, `tape` [`7af9300`](https://github.com/ljharb/function-bind/commit/7af930023ae2ce7645489532821e4fbbcd7a2280) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`64a9127`](https://github.com/ljharb/function-bind/commit/64a9127ab0bd331b93d6572eaf6e9971967fc08c) -- [Tests] use `aud` instead of `npm audit` [`e75069c`](https://github.com/ljharb/function-bind/commit/e75069c50010a8fcce2a9ce2324934c35fdb4386) -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`d03555c`](https://github.com/ljharb/function-bind/commit/d03555ca59dea3b71ce710045e4303b9e2619e28) -- [meta] add `safe-publish-latest` [`9c8f809`](https://github.com/ljharb/function-bind/commit/9c8f8092aed027d7e80c94f517aa892385b64f09) -- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`baf6893`](https://github.com/ljharb/function-bind/commit/baf6893e27f5b59abe88bc1995e6f6ed1e527397) -- [meta] create SECURITY.md [`4db1779`](https://github.com/ljharb/function-bind/commit/4db17799f1f28ae294cb95e0081ca2b591c3911b) -- [Tests] add `npm run audit` [`c8b38ec`](https://github.com/ljharb/function-bind/commit/c8b38ec40ed3f85dabdee40ed4148f1748375bc2) -- Revert "Point to the correct file" [`05cdf0f`](https://github.com/ljharb/function-bind/commit/05cdf0fa205c6a3c5ba40bbedd1dfa9874f915c9) - -## [v1.1.1](https://github.com/ljharb/function-bind/compare/v1.1.0...v1.1.1) - 2017-08-28 - -### Commits - -- [Tests] up to `node` `v8`; newer npm breaks on older node; fix scripts [`817f7d2`](https://github.com/ljharb/function-bind/commit/817f7d28470fdbff8ef608d4d565dd4d1430bc5e) -- [Dev Deps] update `eslint`, `jscs`, `tape`, `@ljharb/eslint-config` [`854288b`](https://github.com/ljharb/function-bind/commit/854288b1b6f5c555f89aceb9eff1152510262084) -- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`83e639f`](https://github.com/ljharb/function-bind/commit/83e639ff74e6cd6921285bccec22c1bcf72311bd) -- Only apps should have lockfiles [`5ed97f5`](https://github.com/ljharb/function-bind/commit/5ed97f51235c17774e0832e122abda0f3229c908) -- Use a SPDX-compliant “license” field. [`5feefea`](https://github.com/ljharb/function-bind/commit/5feefea0dc0193993e83e5df01ded424403a5381) - -## [v1.1.0](https://github.com/ljharb/function-bind/compare/v1.0.2...v1.1.0) - 2016-02-14 - -### Commits - -- Update `eslint`, `tape`; use my personal shared `eslint` config [`9c9062a`](https://github.com/ljharb/function-bind/commit/9c9062abbe9dd70b59ea2c3a3c3a81f29b457097) -- Add `npm run eslint` [`dd96c56`](https://github.com/ljharb/function-bind/commit/dd96c56720034a3c1ffee10b8a59a6f7c53e24ad) -- [New] return the native `bind` when available. [`82186e0`](https://github.com/ljharb/function-bind/commit/82186e03d73e580f95ff167e03f3582bed90ed72) -- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a3dd767`](https://github.com/ljharb/function-bind/commit/a3dd76720c795cb7f4586b0544efabf8aa107b8b) -- Update `eslint` [`3dae2f7`](https://github.com/ljharb/function-bind/commit/3dae2f7423de30a2d20313ddb1edc19660142fe9) -- Update `tape`, `covert`, `jscs` [`a181eee`](https://github.com/ljharb/function-bind/commit/a181eee0cfa24eb229c6e843a971f36e060a2f6a) -- [Tests] up to `node` `v5.6`, `v4.3` [`964929a`](https://github.com/ljharb/function-bind/commit/964929a6a4ddb36fb128de2bcc20af5e4f22e1ed) -- Test up to `io.js` `v2.1` [`2be7310`](https://github.com/ljharb/function-bind/commit/2be7310f2f74886a7124ca925be411117d41d5ea) -- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`45f3d68`](https://github.com/ljharb/function-bind/commit/45f3d6865c6ca93726abcef54febe009087af101) -- [Dev Deps] update `tape`, `jscs` [`6e1340d`](https://github.com/ljharb/function-bind/commit/6e1340d94642deaecad3e717825db641af4f8b1f) -- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`d9bad2b`](https://github.com/ljharb/function-bind/commit/d9bad2b778b1b3a6dd2876087b88b3acf319f8cc) -- Update `eslint` [`935590c`](https://github.com/ljharb/function-bind/commit/935590caa024ab356102e4858e8fc315b2ccc446) -- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`8c9a1ef`](https://github.com/ljharb/function-bind/commit/8c9a1efd848e5167887aa8501857a0940a480c57) -- Test on `io.js` `v2.2` [`9a3a38c`](https://github.com/ljharb/function-bind/commit/9a3a38c92013aed6e108666e7bd40969b84ac86e) -- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`69afc26`](https://github.com/ljharb/function-bind/commit/69afc2617405b147dd2a8d8ae73ca9e9283f18b4) -- [Dev Deps] Update `tape`, `eslint` [`36c1be0`](https://github.com/ljharb/function-bind/commit/36c1be0ab12b45fe5df6b0fdb01a5d5137fd0115) -- Update `tape`, `jscs` [`98d8303`](https://github.com/ljharb/function-bind/commit/98d8303cd5ca1c6b8f985469f86b0d44d7d45f6e) -- Update `jscs` [`9633a4e`](https://github.com/ljharb/function-bind/commit/9633a4e9fbf82051c240855166e468ba8ba0846f) -- Update `tape`, `jscs` [`c80ef0f`](https://github.com/ljharb/function-bind/commit/c80ef0f46efc9791e76fa50de4414092ac147831) -- Test up to `io.js` `v3.0` [`7e2c853`](https://github.com/ljharb/function-bind/commit/7e2c8537d52ab9cf5a655755561d8917684c0df4) -- Test on `io.js` `v2.4` [`5a199a2`](https://github.com/ljharb/function-bind/commit/5a199a27ba46795ba5eaf0845d07d4b8232895c9) -- Test on `io.js` `v2.3` [`a511b88`](https://github.com/ljharb/function-bind/commit/a511b8896de0bddf3b56862daa416c701f4d0453) -- Fixing a typo from 822b4e1938db02dc9584aa434fd3a45cb20caf43 [`732d6b6`](https://github.com/ljharb/function-bind/commit/732d6b63a9b33b45230e630dbcac7a10855d3266) -- Update `jscs` [`da52a48`](https://github.com/ljharb/function-bind/commit/da52a4886c06d6490f46ae30b15e4163ba08905d) -- Lock covert to v1.0.0. [`d6150fd`](https://github.com/ljharb/function-bind/commit/d6150fda1e6f486718ebdeff823333d9e48e7430) - -## [v1.0.2](https://github.com/ljharb/function-bind/compare/v1.0.1...v1.0.2) - 2014-10-04 - -## [v1.0.1](https://github.com/ljharb/function-bind/compare/v1.0.0...v1.0.1) - 2014-10-03 - -### Merged - -- make CI build faster [`#3`](https://github.com/ljharb/function-bind/pull/3) - -### Commits - -- Using my standard jscs.json [`d8ee94c`](https://github.com/ljharb/function-bind/commit/d8ee94c993eff0a84cf5744fe6a29627f5cffa1a) -- Adding `npm run lint` [`7571ab7`](https://github.com/ljharb/function-bind/commit/7571ab7dfdbd99b25a1dbb2d232622bd6f4f9c10) -- Using consistent indentation [`e91a1b1`](https://github.com/ljharb/function-bind/commit/e91a1b13a61e99ec1e530e299b55508f74218a95) -- Updating jscs [`7e17892`](https://github.com/ljharb/function-bind/commit/7e1789284bc629bc9c1547a61c9b227bbd8c7a65) -- Using consistent quotes [`c50b57f`](https://github.com/ljharb/function-bind/commit/c50b57fcd1c5ec38320979c837006069ebe02b77) -- Adding keywords [`cb94631`](https://github.com/ljharb/function-bind/commit/cb946314eed35f21186a25fb42fc118772f9ee00) -- Directly export a function expression instead of using a declaration, and relying on hoisting. [`5a33c5f`](https://github.com/ljharb/function-bind/commit/5a33c5f45642de180e0d207110bf7d1843ceb87c) -- Naming npm URL and badge in README; use SVG [`2aef8fc`](https://github.com/ljharb/function-bind/commit/2aef8fcb79d54e63a58ae557c4e60949e05d5e16) -- Naming deps URLs in README [`04228d7`](https://github.com/ljharb/function-bind/commit/04228d766670ee45ca24e98345c1f6a7621065b5) -- Naming travis-ci URLs in README; using SVG [`62c810c`](https://github.com/ljharb/function-bind/commit/62c810c2f54ced956cd4d4ab7b793055addfe36e) -- Make sure functions are invoked correctly (also passing coverage tests) [`2b289b4`](https://github.com/ljharb/function-bind/commit/2b289b4dfbf037ffcfa4dc95eb540f6165e9e43a) -- Removing the strict mode pragmas; they make tests fail. [`1aa701d`](https://github.com/ljharb/function-bind/commit/1aa701d199ddc3782476e8f7eef82679be97b845) -- Adding myself as a contributor [`85fd57b`](https://github.com/ljharb/function-bind/commit/85fd57b0860e5a7af42de9a287f3f265fc6d72fc) -- Adding strict mode pragmas [`915b08e`](https://github.com/ljharb/function-bind/commit/915b08e084c86a722eafe7245e21db74aa21ca4c) -- Adding devDeps URLs to README [`4ccc731`](https://github.com/ljharb/function-bind/commit/4ccc73112c1769859e4ca3076caf4086b3cba2cd) -- Fixing the description. [`a7a472c`](https://github.com/ljharb/function-bind/commit/a7a472cf649af515c635cf560fc478fbe48999c8) -- Using a function expression instead of a function declaration. [`b5d3e4e`](https://github.com/ljharb/function-bind/commit/b5d3e4ea6aaffc63888953eeb1fbc7ff45f1fa14) -- Updating tape [`f086be6`](https://github.com/ljharb/function-bind/commit/f086be6029fb56dde61a258c1340600fa174d1e0) -- Updating jscs [`5f9bdb3`](https://github.com/ljharb/function-bind/commit/5f9bdb375ab13ba48f30852aab94029520c54d71) -- Updating jscs [`9b409ba`](https://github.com/ljharb/function-bind/commit/9b409ba6118e23395a4e5d83ef39152aab9d3bfc) -- Run coverage as part of tests. [`8e1b6d4`](https://github.com/ljharb/function-bind/commit/8e1b6d459f047d1bd4fee814e01247c984c80bd0) -- Run linter as part of tests [`c1ca83f`](https://github.com/ljharb/function-bind/commit/c1ca83f832df94587d09e621beba682fabfaa987) -- Updating covert [`701e837`](https://github.com/ljharb/function-bind/commit/701e83774b57b4d3ef631e1948143f43a72f4bb9) - -## [v1.0.0](https://github.com/ljharb/function-bind/compare/v0.2.0...v1.0.0) - 2014-08-09 - -### Commits - -- Make sure old and unstable nodes don't fail Travis [`27adca3`](https://github.com/ljharb/function-bind/commit/27adca34a4ab6ad67b6dfde43942a1b103ce4d75) -- Fixing an issue when the bound function is called as a constructor in ES3. [`e20122d`](https://github.com/ljharb/function-bind/commit/e20122d267d92ce553859b280cbbea5d27c07731) -- Adding `npm run coverage` [`a2e29c4`](https://github.com/ljharb/function-bind/commit/a2e29c4ecaef9e2f6cd1603e868c139073375502) -- Updating tape [`b741168`](https://github.com/ljharb/function-bind/commit/b741168b12b235b1717ff696087645526b69213c) -- Upgrading tape [`63631a0`](https://github.com/ljharb/function-bind/commit/63631a04c7fbe97cc2fa61829cc27246d6986f74) -- Updating tape [`363cb46`](https://github.com/ljharb/function-bind/commit/363cb46dafb23cb3e347729a22f9448051d78464) - -## v0.2.0 - 2014-03-23 - -### Commits - -- Updating test coverage to match es5-shim. [`aa94d44`](https://github.com/ljharb/function-bind/commit/aa94d44b8f9d7f69f10e060db7709aa7a694e5d4) -- initial [`942ee07`](https://github.com/ljharb/function-bind/commit/942ee07e94e542d91798137bc4b80b926137e066) -- Setting the bound function's length properly. [`079f46a`](https://github.com/ljharb/function-bind/commit/079f46a2d3515b7c0b308c2c13fceb641f97ca25) -- Ensuring that some older browsers will throw when given a regex. [`36ac55b`](https://github.com/ljharb/function-bind/commit/36ac55b87f460d4330253c92870aa26fbfe8227f) -- Removing npm scripts that don't have dependencies [`9d2be60`](https://github.com/ljharb/function-bind/commit/9d2be600002cb8bc8606f8f3585ad3e05868c750) -- Updating tape [`297a4ac`](https://github.com/ljharb/function-bind/commit/297a4acc5464db381940aafb194d1c88f4e678f3) -- Skipping length tests for now. [`d9891ea`](https://github.com/ljharb/function-bind/commit/d9891ea4d2aaffa69f408339cdd61ff740f70565) -- don't take my tea [`dccd930`](https://github.com/ljharb/function-bind/commit/dccd930bfd60ea10cb178d28c97550c3bc8c1e07) diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE deleted file mode 100644 index 62d6d23..0000000 --- a/node_modules/function-bind/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Raynos. - -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/node_modules/function-bind/README.md b/node_modules/function-bind/README.md deleted file mode 100644 index 814c20b..0000000 --- a/node_modules/function-bind/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# function-bind <sup>[![Version Badge][npm-version-svg]][package-url]</sup> - -[![github actions][actions-image]][actions-url] -<!--[![coverage][codecov-image]][codecov-url]--> -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Implementation of function.prototype.bind - -Old versions of phantomjs, Internet Explorer < 9, and node < 0.6 don't support `Function.prototype.bind`. - -## Example - -```js -Function.prototype.bind = require("function-bind") -``` - -## Installation - -`npm install function-bind` - -## Contributors - - - Raynos - -## MIT Licenced - -[package-url]: https://npmjs.org/package/function-bind -[npm-version-svg]: https://versionbadg.es/Raynos/function-bind.svg -[deps-svg]: https://david-dm.org/Raynos/function-bind.svg -[deps-url]: https://david-dm.org/Raynos/function-bind -[dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg -[dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/function-bind.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/function-bind.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/function-bind.svg -[downloads-url]: https://npm-stat.com/charts.html?package=function-bind -[codecov-image]: https://codecov.io/gh/Raynos/function-bind/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/Raynos/function-bind/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/Raynos/function-bind -[actions-url]: https://github.com/Raynos/function-bind/actions diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js deleted file mode 100644 index fd4384c..0000000 --- a/node_modules/function-bind/implementation.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var toStr = Object.prototype.toString; -var max = Math.max; -var funcType = '[object Function]'; - -var concatty = function concatty(a, b) { - var arr = []; - - for (var i = 0; i < a.length; i += 1) { - arr[i] = a[i]; - } - for (var j = 0; j < b.length; j += 1) { - arr[j + a.length] = b[j]; - } - - return arr; -}; - -var slicy = function slicy(arrLike, offset) { - var arr = []; - for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { - arr[j] = arrLike[i]; - } - return arr; -}; - -var joiny = function (arr, joiner) { - var str = ''; - for (var i = 0; i < arr.length; i += 1) { - str += arr[i]; - if (i + 1 < arr.length) { - str += joiner; - } - } - return str; -}; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.apply(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slicy(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - concatty(args, arguments) - ); - if (Object(result) === result) { - return result; - } - return this; - } - return target.apply( - that, - concatty(args, arguments) - ); - - }; - - var boundLength = max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs[i] = '$' + i; - } - - bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js deleted file mode 100644 index 3bb6b96..0000000 --- a/node_modules/function-bind/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var implementation = require('./implementation'); - -module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json deleted file mode 100644 index 6185963..0000000 --- a/node_modules/function-bind/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "function-bind", - "version": "1.1.2", - "description": "Implementation of Function.prototype.bind", - "keywords": [ - "function", - "bind", - "shim", - "es5" - ], - "author": "Raynos <raynos2@gmail.com>", - "repository": { - "type": "git", - "url": "https://github.com/Raynos/function-bind.git" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "main": "index", - "homepage": "https://github.com/Raynos/function-bind", - "contributors": [ - { - "name": "Raynos" - }, - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "bugs": { - "url": "https://github.com/Raynos/function-bind/issues", - "email": "raynos2@gmail.com" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "aud": "^2.0.3", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.1" - }, - "license": "MIT", - "scripts": { - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepack": "npmignore --auto --commentLines=autogenerated", - "pretest": "npm run lint", - "test": "npm run tests-only", - "posttest": "aud --production", - "tests-only": "nyc tape 'test/**/*.js'", - "lint": "eslint --ext=js,mjs .", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..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" - ] - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } -} diff --git a/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc deleted file mode 100644 index 8a56d5b..0000000 --- a/node_modules/function-bind/test/.eslintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "max-statements-per-line": [2, { "max": 2 }], - "no-invalid-this": 0, - "no-magic-numbers": 0, - } -} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js deleted file mode 100644 index 2edecce..0000000 --- a/node_modules/function-bind/test/index.js +++ /dev/null @@ -1,252 +0,0 @@ -// jscs:disable requireUseStrict - -var test = require('tape'); - -var functionBind = require('../implementation'); -var getCurrentContext = function () { return this; }; - -test('functionBind is a function', function (t) { - t.equal(typeof functionBind, 'function'); - t.end(); -}); - -test('non-functions', function (t) { - var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; - t.plan(nonFunctions.length); - for (var i = 0; i < nonFunctions.length; ++i) { - try { functionBind.call(nonFunctions[i]); } catch (ex) { - t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); - } - } - t.end(); -}); - -test('without a context', function (t) { - t.test('binds properly', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }) - }; - namespace.func(1, 2, 3); - st.deepEqual(args, [1, 2, 3]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('binds properly, and still supplies bound arguments', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, undefined, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.deepEqual(args, [1, 2, 3, 4, 5, 6]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('returns properly', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('called as a constructor', function (st) { - var thunkify = function (value) { - return function () { return value; }; - }; - st.test('returns object value', function (sst) { - var expectedReturnValue = [1, 2, 3]; - var Constructor = functionBind.call(thunkify(expectedReturnValue), null); - var result = new Constructor(); - sst.equal(result, expectedReturnValue); - sst.end(); - }); - - st.test('does not return primitive value', function (sst) { - var Constructor = functionBind.call(thunkify(42), null); - var result = new Constructor(); - sst.notEqual(result, 42); - sst.end(); - }); - - st.test('object from bound constructor is instance of original and bound constructor', function (sst) { - var A = function (x) { - this.name = x || 'A'; - }; - var B = functionBind.call(A, null, 'B'); - - var result = new B(); - sst.ok(result instanceof B, 'result is instance of bound constructor'); - sst.ok(result instanceof A, 'result is instance of original constructor'); - sst.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('with a context', function (t) { - t.test('with no bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext) - }; - namespace.func(1, 2, 3); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); - st.end(); - }); - - t.test('with bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); - st.end(); - }); - - t.test('returns properly', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('passes the correct arguments when called as a constructor', function (st) { - var expected = { name: 'Correct' }; - var namespace = { - Func: functionBind.call(function (arg) { - return arg; - }, { name: 'Incorrect' }) - }; - var returned = new namespace.Func(expected); - st.equal(returned, expected, 'returns the right arg when called as a constructor'); - st.end(); - }); - - t.test('has the new instance\'s context when called as a constructor', function (st) { - var actualContext; - var expectedContext = { foo: 'bar' }; - var namespace = { - Func: functionBind.call(function () { - actualContext = this; - }, expectedContext) - }; - var result = new namespace.Func(); - st.equal(result instanceof namespace.Func, true); - st.notEqual(actualContext, expectedContext); - st.end(); - }); - - t.end(); -}); - -test('bound function length', function (t) { - t.test('sets a correct length without thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); -}); diff --git a/node_modules/get-intrinsic/.eslintrc b/node_modules/get-intrinsic/.eslintrc deleted file mode 100644 index 8376636..0000000 --- a/node_modules/get-intrinsic/.eslintrc +++ /dev/null @@ -1,38 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "env": { - "es6": true, - "es2017": true, - "es2020": true, - "es2021": true, - "es2022": true, - }, - - "rules": { - "array-bracket-newline": 0, - "complexity": 0, - "eqeqeq": [2, "allow-null"], - "func-name-matching": 0, - "id-length": 0, - "max-lines": 0, - "max-lines-per-function": [2, 90], - "max-params": [2, 4], - "max-statements": 0, - "max-statements-per-line": [2, { "max": 2 }], - "multiline-comment-style": 0, - "no-magic-numbers": 0, - "sort-keys": 0, - }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "new-cap": 0, - }, - }, - ], -} diff --git a/node_modules/get-intrinsic/.github/FUNDING.yml b/node_modules/get-intrinsic/.github/FUNDING.yml deleted file mode 100644 index 8e8da0d..0000000 --- a/node_modules/get-intrinsic/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/get-intrinsic -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/get-intrinsic/.nycrc b/node_modules/get-intrinsic/.nycrc deleted file mode 100644 index bdd626c..0000000 --- a/node_modules/get-intrinsic/.nycrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/get-intrinsic/CHANGELOG.md b/node_modules/get-intrinsic/CHANGELOG.md deleted file mode 100644 index 5b4d214..0000000 --- a/node_modules/get-intrinsic/CHANGELOG.md +++ /dev/null @@ -1,178 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.2.7](https://github.com/ljharb/get-intrinsic/compare/v1.2.6...v1.2.7) - 2025-01-02 - -### Commits - -- [Refactor] use `get-proto` directly [`00ab955`](https://github.com/ljharb/get-intrinsic/commit/00ab95546a0980c8ad42a84253daaa8d2adcedf9) -- [Deps] update `math-intrinsics` [`c716cdd`](https://github.com/ljharb/get-intrinsic/commit/c716cdd6bbe36b438057025561b8bb5a879ac8a0) -- [Dev Deps] update `call-bound`, `es-abstract` [`dc648a6`](https://github.com/ljharb/get-intrinsic/commit/dc648a67eb359037dff8d8619bfa71d86debccb1) - -## [v1.2.6](https://github.com/ljharb/get-intrinsic/compare/v1.2.5...v1.2.6) - 2024-12-11 - -### Commits - -- [Refactor] use `math-intrinsics` [`841be86`](https://github.com/ljharb/get-intrinsic/commit/841be8641a9254c4c75483b30c8871b5d5065926) -- [Refactor] use `es-object-atoms` [`42057df`](https://github.com/ljharb/get-intrinsic/commit/42057dfa16f66f64787e66482af381cc6f31d2c1) -- [Deps] update `call-bind-apply-helpers` [`45afa24`](https://github.com/ljharb/get-intrinsic/commit/45afa24a9ee4d6d3c172db1f555b16cb27843ef4) -- [Dev Deps] update `call-bound` [`9cba9c6`](https://github.com/ljharb/get-intrinsic/commit/9cba9c6e70212bc163b7a5529cb25df46071646f) - -## [v1.2.5](https://github.com/ljharb/get-intrinsic/compare/v1.2.4...v1.2.5) - 2024-12-06 - -### Commits - -- [actions] split out node 10-20, and 20+ [`6e2b9dd`](https://github.com/ljharb/get-intrinsic/commit/6e2b9dd23902665681ebe453256ccfe21d7966f0) -- [Refactor] use `dunder-proto` and `call-bind-apply-helpers` instead of `has-proto` [`c095d17`](https://github.com/ljharb/get-intrinsic/commit/c095d179ad0f4fbfff20c8a3e0cb4fe668018998) -- [Refactor] use `gopd` [`9841d5b`](https://github.com/ljharb/get-intrinsic/commit/9841d5b35f7ab4fd2d193f0c741a50a077920e90) -- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `es-abstract`, `es-value-fixtures`, `gopd`, `mock-property`, `object-inspect`, `tape` [`2d07e01`](https://github.com/ljharb/get-intrinsic/commit/2d07e01310cee2cbaedfead6903df128b1f5d425) -- [Deps] update `gopd`, `has-proto`, `has-symbols`, `hasown` [`974d8bf`](https://github.com/ljharb/get-intrinsic/commit/974d8bf5baad7939eef35c25cc1dd88c10a30fa6) -- [Dev Deps] update `call-bind`, `es-abstract`, `tape` [`df9dde1`](https://github.com/ljharb/get-intrinsic/commit/df9dde178186631ab8a3165ede056549918ce4bc) -- [Refactor] cache `es-define-property` as well [`43ef543`](https://github.com/ljharb/get-intrinsic/commit/43ef543cb02194401420e3a914a4ca9168691926) -- [Deps] update `has-proto`, `has-symbols`, `hasown` [`ad4949d`](https://github.com/ljharb/get-intrinsic/commit/ad4949d5467316505aad89bf75f9417ed782f7af) -- [Tests] use `call-bound` directly [`ad5c406`](https://github.com/ljharb/get-intrinsic/commit/ad5c4069774bfe90e520a35eead5fe5ca9d69e80) -- [Deps] update `has-proto`, `hasown` [`45414ca`](https://github.com/ljharb/get-intrinsic/commit/45414caa312333a2798953682c68f85c550627dd) -- [Tests] replace `aud` with `npm audit` [`18d3509`](https://github.com/ljharb/get-intrinsic/commit/18d3509f79460e7924da70409ee81e5053087523) -- [Deps] update `es-define-property` [`aadaa3b`](https://github.com/ljharb/get-intrinsic/commit/aadaa3b2188d77ad9bff394ce5d4249c49eb21f5) -- [Dev Deps] add missing peer dep [`c296a16`](https://github.com/ljharb/get-intrinsic/commit/c296a16246d0c9a5981944f4cc5cf61fbda0cf6a) - -## [v1.2.4](https://github.com/ljharb/get-intrinsic/compare/v1.2.3...v1.2.4) - 2024-02-05 - -### Commits - -- [Refactor] use all 7 <+ ES6 Errors from `es-errors` [`bcac811`](https://github.com/ljharb/get-intrinsic/commit/bcac811abdc1c982e12abf848a410d6aae148d14) - -## [v1.2.3](https://github.com/ljharb/get-intrinsic/compare/v1.2.2...v1.2.3) - 2024-02-03 - -### Commits - -- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`f11db9c`](https://github.com/ljharb/get-intrinsic/commit/f11db9c4fb97d87bbd53d3c73ac6b3db3613ad3b) -- [Dev Deps] update `aud`, `es-abstract`, `mock-property`, `npmignore` [`b7ac7d1`](https://github.com/ljharb/get-intrinsic/commit/b7ac7d1616fefb03877b1aed0c8f8d61aad32b6c) -- [meta] simplify `exports` [`faa0cc6`](https://github.com/ljharb/get-intrinsic/commit/faa0cc618e2830ffb51a8202490b0c215d965cbc) -- [meta] add missing `engines.node` [`774dd0b`](https://github.com/ljharb/get-intrinsic/commit/774dd0b3e8f741c3f05a6322d124d6087f146af1) -- [Dev Deps] update `tape` [`5828e8e`](https://github.com/ljharb/get-intrinsic/commit/5828e8e4a04e69312e87a36c0ea39428a7a4c3d8) -- [Robustness] use null objects for lookups [`eb9a11f`](https://github.com/ljharb/get-intrinsic/commit/eb9a11fa9eb3e13b193fcc05a7fb814341b1a7b7) -- [meta] add `sideEffects` flag [`89bcc7a`](https://github.com/ljharb/get-intrinsic/commit/89bcc7a42e19bf07b7c21e3094d5ab177109e6d2) - -## [v1.2.2](https://github.com/ljharb/get-intrinsic/compare/v1.2.1...v1.2.2) - 2023-10-20 - -### Commits - -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `call-bind`, `es-abstract`, `mock-property`, `object-inspect`, `tape` [`f51bcf2`](https://github.com/ljharb/get-intrinsic/commit/f51bcf26412d58d17ce17c91c9afd0ad271f0762) -- [Refactor] use `hasown` instead of `has` [`18d14b7`](https://github.com/ljharb/get-intrinsic/commit/18d14b799bea6b5765e1cec91890830cbcdb0587) -- [Deps] update `function-bind` [`6e109c8`](https://github.com/ljharb/get-intrinsic/commit/6e109c81e03804cc5e7824fb64353cdc3d8ee2c7) - -## [v1.2.1](https://github.com/ljharb/get-intrinsic/compare/v1.2.0...v1.2.1) - 2023-05-13 - -### Commits - -- [Fix] avoid a crash in envs without `__proto__` [`7bad8d0`](https://github.com/ljharb/get-intrinsic/commit/7bad8d061bf8721733b58b73a2565af2b6756b64) -- [Dev Deps] update `es-abstract` [`c60e6b7`](https://github.com/ljharb/get-intrinsic/commit/c60e6b7b4cf9660c7f27ed970970fd55fac48dc5) - -## [v1.2.0](https://github.com/ljharb/get-intrinsic/compare/v1.1.3...v1.2.0) - 2023-01-19 - -### Commits - -- [actions] update checkout action [`ca6b12f`](https://github.com/ljharb/get-intrinsic/commit/ca6b12f31eaacea4ea3b055e744cd61623385ffb) -- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `tape` [`41a3727`](https://github.com/ljharb/get-intrinsic/commit/41a3727d0026fa04273ae216a5f8e12eefd72da8) -- [Fix] ensure `Error.prototype` is undeniable [`c511e97`](https://github.com/ljharb/get-intrinsic/commit/c511e97ae99c764c4524b540dee7a70757af8da3) -- [Dev Deps] update `aud`, `es-abstract`, `tape` [`1bef8a8`](https://github.com/ljharb/get-intrinsic/commit/1bef8a8fd439ebb80863199b6189199e0851ac67) -- [Dev Deps] update `aud`, `es-abstract` [`0d41f16`](https://github.com/ljharb/get-intrinsic/commit/0d41f16bcd500bc28b7bfc98043ebf61ea081c26) -- [New] add `BigInt64Array` and `BigUint64Array` [`a6cca25`](https://github.com/ljharb/get-intrinsic/commit/a6cca25f29635889b7e9bd669baf9e04be90e48c) -- [Tests] use `gopd` [`ecf7722`](https://github.com/ljharb/get-intrinsic/commit/ecf7722240d15cfd16edda06acf63359c10fb9bd) - -## [v1.1.3](https://github.com/ljharb/get-intrinsic/compare/v1.1.2...v1.1.3) - 2022-09-12 - -### Commits - -- [Dev Deps] update `es-abstract`, `es-value-fixtures`, `tape` [`07ff291`](https://github.com/ljharb/get-intrinsic/commit/07ff291816406ebe5a12d7f16965bde0942dd688) -- [Fix] properly check for % signs [`50ac176`](https://github.com/ljharb/get-intrinsic/commit/50ac1760fe99c227e64eabde76e9c0e44cd881b5) - -## [v1.1.2](https://github.com/ljharb/get-intrinsic/compare/v1.1.1...v1.1.2) - 2022-06-08 - -### Fixed - -- [Fix] properly validate against extra % signs [`#16`](https://github.com/ljharb/get-intrinsic/issues/16) - -### Commits - -- [actions] reuse common workflows [`0972547`](https://github.com/ljharb/get-intrinsic/commit/0972547efd0abc863fe4c445a6ca7eb4f8c6901d) -- [meta] use `npmignore` to autogenerate an npmignore file [`5ba0b51`](https://github.com/ljharb/get-intrinsic/commit/5ba0b51d8d8d4f1c31d426d74abc0770fd106bad) -- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c364492`](https://github.com/ljharb/get-intrinsic/commit/c364492af4af51333e6f81c0bf21fd3d602c3661) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es-abstract`, `object-inspect`, `tape` [`dc04dad`](https://github.com/ljharb/get-intrinsic/commit/dc04dad86f6e5608775a2640cb0db5927ae29ed9) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `safe-publish-latest`, `tape` [`1c14059`](https://github.com/ljharb/get-intrinsic/commit/1c1405984e86dd2dc9366c15d8a0294a96a146a5) -- [Tests] use `mock-property` [`b396ef0`](https://github.com/ljharb/get-intrinsic/commit/b396ef05bb73b1d699811abd64b0d9b97997fdda) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c2c758d`](https://github.com/ljharb/get-intrinsic/commit/c2c758d3b90af4fef0a76910d8d3c292ec8d1d3e) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`29e3c09`](https://github.com/ljharb/get-intrinsic/commit/29e3c091c2bf3e17099969847e8729d0e46896de) -- [actions] update codecov uploader [`8cbc141`](https://github.com/ljharb/get-intrinsic/commit/8cbc1418940d7a8941f3a7985cbc4ac095c5e13d) -- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`10b6f5c`](https://github.com/ljharb/get-intrinsic/commit/10b6f5c02593fb3680c581d696ac124e30652932) -- [readme] add github actions/codecov badges [`4e25400`](https://github.com/ljharb/get-intrinsic/commit/4e25400d9f51ae9eb059cbe22d9144e70ea214e8) -- [Tests] use `for-each` instead of `foreach` [`c05b957`](https://github.com/ljharb/get-intrinsic/commit/c05b957ad9a7bc7721af7cc9e9be1edbfe057496) -- [Dev Deps] update `es-abstract` [`29b05ae`](https://github.com/ljharb/get-intrinsic/commit/29b05aec3e7330e9ad0b8e0f685a9112c20cdd97) -- [meta] use `prepublishOnly` script for npm 7+ [`95c285d`](https://github.com/ljharb/get-intrinsic/commit/95c285da810516057d3bbfa871176031af38f05d) -- [Deps] update `has-symbols` [`593cb4f`](https://github.com/ljharb/get-intrinsic/commit/593cb4fb38e7922e40e42c183f45274b636424cd) -- [readme] fix repo URLs [`1c8305b`](https://github.com/ljharb/get-intrinsic/commit/1c8305b5365827c9b6fc785434aac0e1328ff2f5) -- [Deps] update `has-symbols` [`c7138b6`](https://github.com/ljharb/get-intrinsic/commit/c7138b6c6d73132d859471fb8c13304e1e7c8b20) -- [Dev Deps] remove unused `has-bigints` [`bd63aff`](https://github.com/ljharb/get-intrinsic/commit/bd63aff6ad8f3a986c557fcda2914187bdaab359) - -## [v1.1.1](https://github.com/ljharb/get-intrinsic/compare/v1.1.0...v1.1.1) - 2021-02-03 - -### Fixed - -- [meta] export `./package.json` [`#9`](https://github.com/ljharb/get-intrinsic/issues/9) - -### Commits - -- [readme] flesh out the readme; use `evalmd` [`d12f12c`](https://github.com/ljharb/get-intrinsic/commit/d12f12c15345a0a0772cc65a7c64369529abd614) -- [eslint] set up proper globals config [`5a8c098`](https://github.com/ljharb/get-intrinsic/commit/5a8c0984e3319d1ac0e64b102f8ec18b64e79f36) -- [Dev Deps] update `eslint` [`7b9a5c0`](https://github.com/ljharb/get-intrinsic/commit/7b9a5c0d31a90ca1a1234181c74988fb046701cd) - -## [v1.1.0](https://github.com/ljharb/get-intrinsic/compare/v1.0.2...v1.1.0) - 2021-01-25 - -### Fixed - -- [Refactor] delay `Function` eval until syntax-derived values are requested [`#3`](https://github.com/ljharb/get-intrinsic/issues/3) - -### Commits - -- [Tests] migrate tests to Github Actions [`2ab762b`](https://github.com/ljharb/get-intrinsic/commit/2ab762b48164aea8af37a40ba105bbc8246ab8c4) -- [meta] do not publish github action workflow files [`5e7108e`](https://github.com/ljharb/get-intrinsic/commit/5e7108e4768b244d48d9567ba4f8a6cab9c65b8e) -- [Tests] add some coverage [`01ac7a8`](https://github.com/ljharb/get-intrinsic/commit/01ac7a87ac29738567e8524cd8c9e026b1fa8cb3) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `call-bind`, `es-abstract`, `tape`; add `call-bind` [`911b672`](https://github.com/ljharb/get-intrinsic/commit/911b672fbffae433a96924c6ce013585e425f4b7) -- [Refactor] rearrange evalled constructors a bit [`7e7e4bf`](https://github.com/ljharb/get-intrinsic/commit/7e7e4bf583f3799c8ac1c6c5e10d2cb553957347) -- [meta] add Automatic Rebase and Require Allow Edits workflows [`0199968`](https://github.com/ljharb/get-intrinsic/commit/01999687a263ffce0a3cb011dfbcb761754aedbc) - -## [v1.0.2](https://github.com/ljharb/get-intrinsic/compare/v1.0.1...v1.0.2) - 2020-12-17 - -### Commits - -- [Fix] Throw for non‑existent intrinsics [`68f873b`](https://github.com/ljharb/get-intrinsic/commit/68f873b013c732a05ad6f5fc54f697e55515461b) -- [Fix] Throw for non‑existent segments in the intrinsic path [`8325dee`](https://github.com/ljharb/get-intrinsic/commit/8325deee43128f3654d3399aa9591741ebe17b21) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-bigints`, `object-inspect` [`0c227a7`](https://github.com/ljharb/get-intrinsic/commit/0c227a7d8b629166f25715fd242553892e458525) -- [meta] do not lint coverage output [`70d2419`](https://github.com/ljharb/get-intrinsic/commit/70d24199b620043cd9110fc5f426d214ebe21dc9) - -## [v1.0.1](https://github.com/ljharb/get-intrinsic/compare/v1.0.0...v1.0.1) - 2020-10-30 - -### Commits - -- [Tests] gather coverage data on every job [`d1d280d`](https://github.com/ljharb/get-intrinsic/commit/d1d280dec714e3f0519cc877dbcb193057d9cac6) -- [Fix] add missing dependencies [`5031771`](https://github.com/ljharb/get-intrinsic/commit/5031771bb1095b38be88ce7c41d5de88718e432e) -- [Tests] use `es-value-fixtures` [`af48765`](https://github.com/ljharb/get-intrinsic/commit/af48765a23c5323fb0b6b38dbf00eb5099c7bebc) - -## v1.0.0 - 2020-10-29 - -### Commits - -- Implementation [`bbce57c`](https://github.com/ljharb/get-intrinsic/commit/bbce57c6f33d05b2d8d3efa273ceeb3ee01127bb) -- Tests [`17b4f0d`](https://github.com/ljharb/get-intrinsic/commit/17b4f0d56dea6b4059b56fc30ef3ee4d9500ebc2) -- Initial commit [`3153294`](https://github.com/ljharb/get-intrinsic/commit/31532948de363b0a27dd9fd4649e7b7028ec4b44) -- npm init [`fb326c4`](https://github.com/ljharb/get-intrinsic/commit/fb326c4d2817c8419ec31de1295f06bb268a7902) -- [meta] add Automatic Rebase and Require Allow Edits workflows [`48862fb`](https://github.com/ljharb/get-intrinsic/commit/48862fb2508c8f6a57968e6d08b7c883afc9d550) -- [meta] add `auto-changelog` [`5f28ad0`](https://github.com/ljharb/get-intrinsic/commit/5f28ad019e060a353d8028f9f2591a9cc93074a1) -- [meta] add "funding"; create `FUNDING.yml` [`c2bbdde`](https://github.com/ljharb/get-intrinsic/commit/c2bbddeba73a875be61484ee4680b129a6d4e0a1) -- [Tests] add `npm run lint` [`0a84b98`](https://github.com/ljharb/get-intrinsic/commit/0a84b98b22b7cf7a748666f705b0003a493c35fd) -- Only apps should have lockfiles [`9586c75`](https://github.com/ljharb/get-intrinsic/commit/9586c75866c1ee678e4d5d4dbbdef6997e511b05) diff --git a/node_modules/get-intrinsic/LICENSE b/node_modules/get-intrinsic/LICENSE deleted file mode 100644 index 48f05d0..0000000 --- a/node_modules/get-intrinsic/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Jordan Harband - -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/node_modules/get-intrinsic/README.md b/node_modules/get-intrinsic/README.md deleted file mode 100644 index 3aa0bba..0000000 --- a/node_modules/get-intrinsic/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# get-intrinsic <sup>[![Version Badge][npm-version-svg]][package-url]</sup> - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Get and robustly cache all JS language-level intrinsics at first require time. - -See the syntax described [in the JS spec](https://tc39.es/ecma262/#sec-well-known-intrinsic-objects) for reference. - -## Example - -```js -var GetIntrinsic = require('get-intrinsic'); -var assert = require('assert'); - -// static methods -assert.equal(GetIntrinsic('%Math.pow%'), Math.pow); -assert.equal(Math.pow(2, 3), 8); -assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); -delete Math.pow; -assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); - -// instance methods -var arr = [1]; -assert.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push); -assert.deepEqual(arr, [1]); - -arr.push(2); -assert.deepEqual(arr, [1, 2]); - -GetIntrinsic('%Array.prototype.push%').call(arr, 3); -assert.deepEqual(arr, [1, 2, 3]); - -delete Array.prototype.push; -GetIntrinsic('%Array.prototype.push%').call(arr, 4); -assert.deepEqual(arr, [1, 2, 3, 4]); - -// missing features -delete JSON.parse; // to simulate a real intrinsic that is missing in the environment -assert.throws(() => GetIntrinsic('%JSON.parse%')); -assert.equal(undefined, GetIntrinsic('%JSON.parse%', true)); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -[package-url]: https://npmjs.org/package/get-intrinsic -[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg -[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg -[deps-url]: https://david-dm.org/ljharb/get-intrinsic -[dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/get-intrinsic#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/get-intrinsic.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/get-intrinsic.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg -[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic -[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic -[actions-url]: https://github.com/ljharb/get-intrinsic/actions diff --git a/node_modules/get-intrinsic/index.js b/node_modules/get-intrinsic/index.js deleted file mode 100644 index 7f618f5..0000000 --- a/node_modules/get-intrinsic/index.js +++ /dev/null @@ -1,377 +0,0 @@ -'use strict'; - -var undefined; - -var $Object = require('es-object-atoms'); - -var $Error = require('es-errors'); -var $EvalError = require('es-errors/eval'); -var $RangeError = require('es-errors/range'); -var $ReferenceError = require('es-errors/ref'); -var $SyntaxError = require('es-errors/syntax'); -var $TypeError = require('es-errors/type'); -var $URIError = require('es-errors/uri'); - -var abs = require('math-intrinsics/abs'); -var floor = require('math-intrinsics/floor'); -var max = require('math-intrinsics/max'); -var min = require('math-intrinsics/min'); -var pow = require('math-intrinsics/pow'); -var round = require('math-intrinsics/round'); -var sign = require('math-intrinsics/sign'); - -var $Function = Function; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; - -var $gOPD = require('gopd'); -var $defineProperty = require('es-define-property'); - -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = require('has-symbols')(); - -var getProto = require('get-proto'); -var $ObjectGPO = require('get-proto/Object.getPrototypeOf'); -var $ReflectGPO = require('get-proto/Reflect.getPrototypeOf'); - -var $apply = require('call-bind-apply-helpers/functionApply'); -var $call = require('call-bind-apply-helpers/functionCall'); - -var needsEval = {}; - -var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - __proto__: null, - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': needsEval, - '%AsyncGenerator%': needsEval, - '%AsyncGeneratorFunction%': needsEval, - '%AsyncIteratorPrototype%': needsEval, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, - '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': $Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': $EvalError, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': needsEval, - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': $Object, - '%Object.getOwnPropertyDescriptor%': $gOPD, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': $RangeError, - '%ReferenceError%': $ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': $URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, - - '%Function.prototype.call%': $call, - '%Function.prototype.apply%': $apply, - '%Object.defineProperty%': $defineProperty, - '%Object.getPrototypeOf%': $ObjectGPO, - '%Math.abs%': abs, - '%Math.floor%': floor, - '%Math.max%': max, - '%Math.min%': min, - '%Math.pow%': pow, - '%Math.round%': round, - '%Math.sign%': sign, - '%Reflect.getPrototypeOf%': $ReflectGPO -}; - -if (getProto) { - try { - null.error; // eslint-disable-line no-unused-expressions - } catch (e) { - // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 - var errorProto = getProto(getProto(e)); - INTRINSICS['%Error.prototype%'] = errorProto; - } -} - -var doEval = function doEval(name) { - var value; - if (name === '%AsyncFunction%') { - value = getEvalledConstructor('async function () {}'); - } else if (name === '%GeneratorFunction%') { - value = getEvalledConstructor('function* () {}'); - } else if (name === '%AsyncGeneratorFunction%') { - value = getEvalledConstructor('async function* () {}'); - } else if (name === '%AsyncGenerator%') { - var fn = doEval('%AsyncGeneratorFunction%'); - if (fn) { - value = fn.prototype; - } - } else if (name === '%AsyncIteratorPrototype%') { - var gen = doEval('%AsyncGenerator%'); - if (gen && getProto) { - value = getProto(gen.prototype); - } - } - - INTRINSICS[name] = value; - - return value; -}; - -var LEGACY_ALIASES = { - __proto__: null, - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; - -var bind = require('function-bind'); -var hasOwn = require('hasown'); -var $concat = bind.call($call, Array.prototype.concat); -var $spliceApply = bind.call($apply, Array.prototype.splice); -var $replace = bind.call($call, String.prototype.replace); -var $strSlice = bind.call($call, String.prototype.slice); -var $exec = bind.call($call, RegExp.prototype.exec); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === '%' && last !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - } else if (last === '%' && first !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - } - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval) { - value = doEval(intrinsicName); - } - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - - if ($exec(/^%?[^%]*%?$/, name) === null) { - throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); - } - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } - - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ( - ( - (first === '"' || first === "'" || first === '`') - || (last === '"' || last === "'" || last === '`') - ) - && first !== last - ) { - throw new $SyntaxError('property names with quotes must have matching quotes'); - } - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - return void undefined; - } - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; diff --git a/node_modules/get-intrinsic/package.json b/node_modules/get-intrinsic/package.json deleted file mode 100644 index f941bfe..0000000 --- a/node_modules/get-intrinsic/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "get-intrinsic", - "version": "1.2.7", - "description": "Get and robustly cache all JS language-level intrinsics at first require time", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=.js,.mjs .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>= 10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/get-intrinsic.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "es", - "js", - "intrinsic", - "getintrinsic", - "es-abstract" - ], - "author": "Jordan Harband <ljharb@gmail.com>", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/get-intrinsic/issues" - }, - "homepage": "https://github.com/ljharb/get-intrinsic#readme", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "function-bind": "^1.1.2", - "get-proto": "^1.0.0", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.1", - "auto-changelog": "^2.5.0", - "call-bound": "^1.0.3", - "encoding": "^0.1.13", - "es-abstract": "^1.23.8", - "es-value-fixtures": "^1.5.0", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "for-each": "^0.3.3", - "make-async-function": "^1.0.0", - "make-async-generator-function": "^1.0.0", - "make-generator-function": "^2.0.0", - "mock-property": "^1.1.0", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "object-inspect": "^1.13.3", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "testling": { - "files": "test/GetIntrinsic.js" - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/get-intrinsic/test/GetIntrinsic.js b/node_modules/get-intrinsic/test/GetIntrinsic.js deleted file mode 100644 index d9c0f30..0000000 --- a/node_modules/get-intrinsic/test/GetIntrinsic.js +++ /dev/null @@ -1,274 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../'); - -var test = require('tape'); -var forEach = require('for-each'); -var debug = require('object-inspect'); -var generatorFns = require('make-generator-function')(); -var asyncFns = require('make-async-function').list(); -var asyncGenFns = require('make-async-generator-function')(); -var mockProperty = require('mock-property'); - -var callBound = require('call-bound'); -var v = require('es-value-fixtures'); -var $gOPD = require('gopd'); -var DefinePropertyOrThrow = require('es-abstract/2023/DefinePropertyOrThrow'); - -var $isProto = callBound('%Object.prototype.isPrototypeOf%'); - -test('export', function (t) { - t.equal(typeof GetIntrinsic, 'function', 'it is a function'); - t.equal(GetIntrinsic.length, 2, 'function has length of 2'); - - t.end(); -}); - -test('throws', function (t) { - t['throws']( - function () { GetIntrinsic('not an intrinsic'); }, - SyntaxError, - 'nonexistent intrinsic throws a syntax error' - ); - - t['throws']( - function () { GetIntrinsic(''); }, - TypeError, - 'empty string intrinsic throws a type error' - ); - - t['throws']( - function () { GetIntrinsic('.'); }, - SyntaxError, - '"just a dot" intrinsic throws a syntax error' - ); - - t['throws']( - function () { GetIntrinsic('%String'); }, - SyntaxError, - 'Leading % without trailing % throws a syntax error' - ); - - t['throws']( - function () { GetIntrinsic('String%'); }, - SyntaxError, - 'Trailing % without leading % throws a syntax error' - ); - - t['throws']( - function () { GetIntrinsic("String['prototype]"); }, - SyntaxError, - 'Dynamic property access is disallowed for intrinsics (unterminated string)' - ); - - t['throws']( - function () { GetIntrinsic('%Proxy.prototype.undefined%'); }, - TypeError, - "Throws when middle part doesn't exist (%Proxy.prototype.undefined%)" - ); - - t['throws']( - function () { GetIntrinsic('%Array.prototype%garbage%'); }, - SyntaxError, - 'Throws with extra percent signs' - ); - - t['throws']( - function () { GetIntrinsic('%Array.prototype%push%'); }, - SyntaxError, - 'Throws with extra percent signs, even on an existing intrinsic' - ); - - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { GetIntrinsic(nonString); }, - TypeError, - debug(nonString) + ' is not a String' - ); - }); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { GetIntrinsic('%', nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - forEach([ - 'toString', - 'propertyIsEnumerable', - 'hasOwnProperty' - ], function (objectProtoMember) { - t['throws']( - function () { GetIntrinsic(objectProtoMember); }, - SyntaxError, - debug(objectProtoMember) + ' is not an intrinsic' - ); - }); - - t.end(); -}); - -test('base intrinsics', function (t) { - t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object'); - t.equal(GetIntrinsic('Object'), Object, 'Object yields Object'); - t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array'); - t.equal(GetIntrinsic('Array'), Array, 'Array yields Array'); - - t.end(); -}); - -test('dotted paths', function (t) { - t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString'); - t.equal(GetIntrinsic('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString yields Object.prototype.toString'); - t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push'); - t.equal(GetIntrinsic('Array.prototype.push'), Array.prototype.push, 'Array.prototype.push yields Array.prototype.push'); - - test('underscore paths are aliases for dotted paths', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { - var original = GetIntrinsic('%ObjProto_toString%'); - - forEach([ - '%Object.prototype.toString%', - 'Object.prototype.toString', - '%ObjectPrototype.toString%', - 'ObjectPrototype.toString', - '%ObjProto_toString%', - 'ObjProto_toString' - ], function (name) { - DefinePropertyOrThrow(Object.prototype, 'toString', { - '[[Value]]': function toString() { - return original.apply(this, arguments); - } - }); - st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString'); - }); - - DefinePropertyOrThrow(Object.prototype, 'toString', { '[[Value]]': original }); - st.end(); - }); - - test('dotted paths cache', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { - var original = GetIntrinsic('%Object.prototype.propertyIsEnumerable%'); - - forEach([ - '%Object.prototype.propertyIsEnumerable%', - 'Object.prototype.propertyIsEnumerable', - '%ObjectPrototype.propertyIsEnumerable%', - 'ObjectPrototype.propertyIsEnumerable' - ], function (name) { - var restore = mockProperty(Object.prototype, 'propertyIsEnumerable', { - value: function propertyIsEnumerable() { - return original.apply(this, arguments); - } - }); - st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable'); - - restore(); - }); - - st.end(); - }); - - test('dotted path reports correct error', function (st) { - st['throws'](function () { - GetIntrinsic('%NonExistentIntrinsic.prototype.property%'); - }, /%NonExistentIntrinsic%/, 'The base intrinsic of %NonExistentIntrinsic.prototype.property% is %NonExistentIntrinsic%'); - - st['throws'](function () { - GetIntrinsic('%NonExistentIntrinsicPrototype.property%'); - }, /%NonExistentIntrinsicPrototype%/, 'The base intrinsic of %NonExistentIntrinsicPrototype.property% is %NonExistentIntrinsicPrototype%'); - - st.end(); - }); - - t.end(); -}); - -test('accessors', { skip: !$gOPD || typeof Map !== 'function' }, function (t) { - var actual = $gOPD(Map.prototype, 'size'); - t.ok(actual, 'Map.prototype.size has a descriptor'); - t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function'); - t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it'); - t.equal(GetIntrinsic('Map.prototype.size'), actual.get, 'Map.prototype.size yields the getter for it'); - - t.end(); -}); - -test('generator functions', { skip: !generatorFns.length }, function (t) { - var $GeneratorFunction = GetIntrinsic('%GeneratorFunction%'); - var $GeneratorFunctionPrototype = GetIntrinsic('%Generator%'); - var $GeneratorPrototype = GetIntrinsic('%GeneratorPrototype%'); - - forEach(generatorFns, function (genFn) { - var fnName = genFn.name; - fnName = fnName ? "'" + fnName + "'" : 'genFn'; - - t.ok(genFn instanceof $GeneratorFunction, fnName + ' instanceof %GeneratorFunction%'); - t.ok($isProto($GeneratorFunctionPrototype, genFn), '%Generator% is prototype of ' + fnName); - t.ok($isProto($GeneratorPrototype, genFn.prototype), '%GeneratorPrototype% is prototype of ' + fnName + '.prototype'); - }); - - t.end(); -}); - -test('async functions', { skip: !asyncFns.length }, function (t) { - var $AsyncFunction = GetIntrinsic('%AsyncFunction%'); - var $AsyncFunctionPrototype = GetIntrinsic('%AsyncFunctionPrototype%'); - - forEach(asyncFns, function (asyncFn) { - var fnName = asyncFn.name; - fnName = fnName ? "'" + fnName + "'" : 'asyncFn'; - - t.ok(asyncFn instanceof $AsyncFunction, fnName + ' instanceof %AsyncFunction%'); - t.ok($isProto($AsyncFunctionPrototype, asyncFn), '%AsyncFunctionPrototype% is prototype of ' + fnName); - }); - - t.end(); -}); - -test('async generator functions', { skip: asyncGenFns.length === 0 }, function (t) { - var $AsyncGeneratorFunction = GetIntrinsic('%AsyncGeneratorFunction%'); - var $AsyncGeneratorFunctionPrototype = GetIntrinsic('%AsyncGenerator%'); - var $AsyncGeneratorPrototype = GetIntrinsic('%AsyncGeneratorPrototype%'); - - forEach(asyncGenFns, function (asyncGenFn) { - var fnName = asyncGenFn.name; - fnName = fnName ? "'" + fnName + "'" : 'asyncGenFn'; - - t.ok(asyncGenFn instanceof $AsyncGeneratorFunction, fnName + ' instanceof %AsyncGeneratorFunction%'); - t.ok($isProto($AsyncGeneratorFunctionPrototype, asyncGenFn), '%AsyncGenerator% is prototype of ' + fnName); - t.ok($isProto($AsyncGeneratorPrototype, asyncGenFn.prototype), '%AsyncGeneratorPrototype% is prototype of ' + fnName + '.prototype'); - }); - - t.end(); -}); - -test('%ThrowTypeError%', function (t) { - var $ThrowTypeError = GetIntrinsic('%ThrowTypeError%'); - - t.equal(typeof $ThrowTypeError, 'function', 'is a function'); - t['throws']( - $ThrowTypeError, - TypeError, - '%ThrowTypeError% throws a TypeError' - ); - - t.end(); -}); - -test('allowMissing', { skip: asyncGenFns.length > 0 }, function (t) { - t['throws']( - function () { GetIntrinsic('%AsyncGeneratorPrototype%'); }, - TypeError, - 'throws when missing' - ); - - t.equal( - GetIntrinsic('%AsyncGeneratorPrototype%', true), - undefined, - 'does not throw when allowMissing' - ); - - t.end(); -}); diff --git a/node_modules/get-proto/.eslintrc b/node_modules/get-proto/.eslintrc deleted file mode 100644 index 1d21a8a..0000000 --- a/node_modules/get-proto/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "id-length": "off", - "sort-keys": "off", - }, -} diff --git a/node_modules/get-proto/.github/FUNDING.yml b/node_modules/get-proto/.github/FUNDING.yml deleted file mode 100644 index 93183ef..0000000 --- a/node_modules/get-proto/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/get-proto -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/get-proto/.nycrc b/node_modules/get-proto/.nycrc deleted file mode 100644 index bdd626c..0000000 --- a/node_modules/get-proto/.nycrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/get-proto/CHANGELOG.md b/node_modules/get-proto/CHANGELOG.md deleted file mode 100644 index 5860229..0000000 --- a/node_modules/get-proto/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.1](https://github.com/ljharb/get-proto/compare/v1.0.0...v1.0.1) - 2025-01-02 - -### Commits - -- [Fix] for the `Object.getPrototypeOf` window, throw for non-objects [`7fe6508`](https://github.com/ljharb/get-proto/commit/7fe6508b71419ebe1976bedb86001d1feaeaa49a) - -## v1.0.0 - 2025-01-01 - -### Commits - -- Initial implementation, tests, readme, types [`5c70775`](https://github.com/ljharb/get-proto/commit/5c707751e81c3deeb2cf980d185fc7fd43611415) -- Initial commit [`7c65c2a`](https://github.com/ljharb/get-proto/commit/7c65c2ad4e33d5dae2f219ebe1a046ae2256972c) -- npm init [`0b8cf82`](https://github.com/ljharb/get-proto/commit/0b8cf824c9634e4a34ef7dd2a2cdc5be6ac79518) -- Only apps should have lockfiles [`a6d1bff`](https://github.com/ljharb/get-proto/commit/a6d1bffc364f5828377cea7194558b2dbef7aea2) diff --git a/node_modules/get-proto/LICENSE b/node_modules/get-proto/LICENSE deleted file mode 100644 index eeabd1c..0000000 --- a/node_modules/get-proto/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025 Jordan Harband - -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/node_modules/get-proto/Object.getPrototypeOf.d.ts b/node_modules/get-proto/Object.getPrototypeOf.d.ts deleted file mode 100644 index 028b3ff..0000000 --- a/node_modules/get-proto/Object.getPrototypeOf.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function getProto<O extends object>(object: O): object | null; - -declare const x: typeof getProto | null; - -export = x; \ No newline at end of file diff --git a/node_modules/get-proto/Object.getPrototypeOf.js b/node_modules/get-proto/Object.getPrototypeOf.js deleted file mode 100644 index c2cbbdf..0000000 --- a/node_modules/get-proto/Object.getPrototypeOf.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -var $Object = require('es-object-atoms'); - -/** @type {import('./Object.getPrototypeOf')} */ -module.exports = $Object.getPrototypeOf || null; diff --git a/node_modules/get-proto/README.md b/node_modules/get-proto/README.md deleted file mode 100644 index f8b4cce..0000000 --- a/node_modules/get-proto/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# get-proto <sup>[![Version Badge][npm-version-svg]][package-url]</sup> - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Robustly get the [[Prototype]] of an object. Uses the best available method. - -## Getting started - -```sh -npm install --save get-proto -``` - -## Usage/Examples - -```js -const assert = require('assert'); -const getProto = require('get-proto'); - -const a = { a: 1, b: 2, [Symbol.toStringTag]: 'foo' }; -const b = { c: 3, __proto__: a }; - -assert.equal(getProto(b), a); -assert.equal(getProto(a), Object.prototype); -assert.equal(getProto({ __proto__: null }), null); -``` - -## Tests - -Clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/get-proto -[npm-version-svg]: https://versionbadg.es/ljharb/get-proto.svg -[deps-svg]: https://david-dm.org/ljharb/get-proto.svg -[deps-url]: https://david-dm.org/ljharb/get-proto -[dev-deps-svg]: https://david-dm.org/ljharb/get-proto/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/get-proto#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/get-proto.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/get-proto.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/get-proto.svg -[downloads-url]: https://npm-stat.com/charts.html?package=get-proto -[codecov-image]: https://codecov.io/gh/ljharb/get-proto/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/get-proto/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-proto -[actions-url]: https://github.com/ljharb/get-proto/actions diff --git a/node_modules/get-proto/Reflect.getPrototypeOf.d.ts b/node_modules/get-proto/Reflect.getPrototypeOf.d.ts deleted file mode 100644 index 2388fe0..0000000 --- a/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const x: typeof Reflect.getPrototypeOf | null; - -export = x; \ No newline at end of file diff --git a/node_modules/get-proto/Reflect.getPrototypeOf.js b/node_modules/get-proto/Reflect.getPrototypeOf.js deleted file mode 100644 index e6c51be..0000000 --- a/node_modules/get-proto/Reflect.getPrototypeOf.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./Reflect.getPrototypeOf')} */ -module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; diff --git a/node_modules/get-proto/index.d.ts b/node_modules/get-proto/index.d.ts deleted file mode 100644 index 2c021f3..0000000 --- a/node_modules/get-proto/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function getProto<O extends object>(object: O): object | null; - -declare const x: typeof getProto | null; - -export = x; diff --git a/node_modules/get-proto/index.js b/node_modules/get-proto/index.js deleted file mode 100644 index 7e5747b..0000000 --- a/node_modules/get-proto/index.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -var reflectGetProto = require('./Reflect.getPrototypeOf'); -var originalGetProto = require('./Object.getPrototypeOf'); - -var getDunderProto = require('dunder-proto/get'); - -/** @type {import('.')} */ -module.exports = reflectGetProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return reflectGetProto(O); - } - : originalGetProto - ? function getProto(O) { - if (!O || (typeof O !== 'object' && typeof O !== 'function')) { - throw new TypeError('getProto: not an object'); - } - // @ts-expect-error TS can't narrow inside a closure, for some reason - return originalGetProto(O); - } - : getDunderProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return getDunderProto(O); - } - : null; diff --git a/node_modules/get-proto/package.json b/node_modules/get-proto/package.json deleted file mode 100644 index 9c35cec..0000000 --- a/node_modules/get-proto/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "get-proto", - "version": "1.0.1", - "description": "Robustly get the [[Prototype]] of an object", - "main": "index.js", - "exports": { - ".": "./index.js", - "./Reflect.getPrototypeOf": "./Reflect.getPrototypeOf.js", - "./Object.getPrototypeOf": "./Object.getPrototypeOf.js", - "./package.json": "./package.json" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "pretest": "npm run --silent lint", - "test": "npm run tests-only", - "posttest": "npx npm@\">=10.2\" audit --production", - "tests-only": "nyc tape 'test/**/*.js'", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc && attw -P", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/get-proto.git" - }, - "keywords": [ - "get", - "proto", - "prototype", - "getPrototypeOf", - "[[Prototype]]" - ], - "author": "Jordan Harband <ljharb@gmail.com>", - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/get-proto/issues" - }, - "homepage": "https://github.com/ljharb/get-proto#readme", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.2", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.3", - "@types/tape": "^5.8.0", - "auto-changelog": "^2.5.0", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "testling": { - "files": "test/index.js" - } -} diff --git a/node_modules/get-proto/test/index.js b/node_modules/get-proto/test/index.js deleted file mode 100644 index 5a2ece2..0000000 --- a/node_modules/get-proto/test/index.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var getProto = require('../'); - -test('getProto', function (t) { - t.equal(typeof getProto, 'function', 'is a function'); - - t.test('can get', { skip: !getProto }, function (st) { - if (getProto) { // TS doesn't understand tape's skip - var proto = { b: 2 }; - st.equal(getProto(proto), Object.prototype, 'proto: returns the [[Prototype]]'); - - st.test('nullish value', function (s2t) { - // @ts-expect-error - s2t['throws'](function () { return getProto(undefined); }, TypeError, 'undefined is not an object'); - // @ts-expect-error - s2t['throws'](function () { return getProto(null); }, TypeError, 'null is not an object'); - s2t.end(); - }); - - // @ts-expect-error - st['throws'](function () { getProto(true); }, 'throws for true'); - // @ts-expect-error - st['throws'](function () { getProto(false); }, 'throws for false'); - // @ts-expect-error - st['throws'](function () { getProto(42); }, 'throws for 42'); - // @ts-expect-error - st['throws'](function () { getProto(NaN); }, 'throws for NaN'); - // @ts-expect-error - st['throws'](function () { getProto(0); }, 'throws for +0'); - // @ts-expect-error - st['throws'](function () { getProto(-0); }, 'throws for -0'); - // @ts-expect-error - st['throws'](function () { getProto(Infinity); }, 'throws for ∞'); - // @ts-expect-error - st['throws'](function () { getProto(-Infinity); }, 'throws for -∞'); - // @ts-expect-error - st['throws'](function () { getProto(''); }, 'throws for empty string'); - // @ts-expect-error - st['throws'](function () { getProto('foo'); }, 'throws for non-empty string'); - st.equal(getProto(/a/g), RegExp.prototype); - st.equal(getProto(new Date()), Date.prototype); - st.equal(getProto(function () {}), Function.prototype); - st.equal(getProto([]), Array.prototype); - st.equal(getProto({}), Object.prototype); - - var nullObject = { __proto__: null }; - if ('toString' in nullObject) { - st.comment('no null objects in this engine'); - st.equal(getProto(nullObject), Object.prototype, '"null" object has Object.prototype as [[Prototype]]'); - } else { - st.equal(getProto(nullObject), null, 'null object has null [[Prototype]]'); - } - } - - st.end(); - }); - - t.test('can not get', { skip: !!getProto }, function (st) { - st.equal(getProto, null); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/get-proto/tsconfig.json b/node_modules/get-proto/tsconfig.json deleted file mode 100644 index 60fb90e..0000000 --- a/node_modules/get-proto/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - //"target": "es2021", - }, - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/gopd/.eslintrc b/node_modules/gopd/.eslintrc deleted file mode 100644 index e2550c0..0000000 --- a/node_modules/gopd/.eslintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "func-style": [2, "declaration"], - "id-length": 0, - "multiline-comment-style": 0, - "new-cap": [2, { - "capIsNewExceptions": [ - "GetIntrinsic", - ], - }], - }, -} diff --git a/node_modules/gopd/.github/FUNDING.yml b/node_modules/gopd/.github/FUNDING.yml deleted file mode 100644 index 94a44a8..0000000 --- a/node_modules/gopd/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/gopd -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/gopd/CHANGELOG.md b/node_modules/gopd/CHANGELOG.md deleted file mode 100644 index 87f5727..0000000 --- a/node_modules/gopd/CHANGELOG.md +++ /dev/null @@ -1,45 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.2.0](https://github.com/ljharb/gopd/compare/v1.1.0...v1.2.0) - 2024-12-03 - -### Commits - -- [New] add `gOPD` entry point; remove `get-intrinsic` [`5b61232`](https://github.com/ljharb/gopd/commit/5b61232dedea4591a314bcf16101b1961cee024e) - -## [v1.1.0](https://github.com/ljharb/gopd/compare/v1.0.1...v1.1.0) - 2024-11-29 - -### Commits - -- [New] add types [`f585e39`](https://github.com/ljharb/gopd/commit/f585e397886d270e4ba84e53d226e4f9ca2eb0e6) -- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `tape` [`0b8e4fd`](https://github.com/ljharb/gopd/commit/0b8e4fded64397a7726a9daa144a6cc9a5e2edfa) -- [Dev Deps] update `aud`, `npmignore`, `tape` [`48378b2`](https://github.com/ljharb/gopd/commit/48378b2443f09a4f7efbd0fb6c3ee845a6cabcf3) -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`78099ee`](https://github.com/ljharb/gopd/commit/78099eeed41bfdc134c912280483689cc8861c31) -- [Tests] replace `aud` with `npm audit` [`4e0d0ac`](https://github.com/ljharb/gopd/commit/4e0d0ac47619d24a75318a8e1f543ee04b2a2632) -- [meta] add missing `engines.node` [`1443316`](https://github.com/ljharb/gopd/commit/14433165d07835c680155b3dfd62d9217d735eca) -- [Deps] update `get-intrinsic` [`eee5f51`](https://github.com/ljharb/gopd/commit/eee5f51769f3dbaf578b70e2a3199116b01aa670) -- [Deps] update `get-intrinsic` [`550c378`](https://github.com/ljharb/gopd/commit/550c3780e3a9c77b62565712a001b4ed64ea61f5) -- [Dev Deps] add missing peer dep [`8c2ecf8`](https://github.com/ljharb/gopd/commit/8c2ecf848122e4e30abfc5b5086fb48b390dce75) - -## [v1.0.1](https://github.com/ljharb/gopd/compare/v1.0.0...v1.0.1) - 2022-11-01 - -### Commits - -- [Fix] actually export gOPD instead of dP [`4b624bf`](https://github.com/ljharb/gopd/commit/4b624bfbeff788c5e3ff16d9443a83627847234f) - -## v1.0.0 - 2022-11-01 - -### Commits - -- Initial implementation, tests, readme [`0911e01`](https://github.com/ljharb/gopd/commit/0911e012cd642092bd88b732c161c58bf4f20bea) -- Initial commit [`b84e33f`](https://github.com/ljharb/gopd/commit/b84e33f5808a805ac57ff88d4247ad935569acbe) -- [actions] add reusable workflows [`12ae28a`](https://github.com/ljharb/gopd/commit/12ae28ae5f50f86e750215b6e2188901646d0119) -- npm init [`280118b`](https://github.com/ljharb/gopd/commit/280118badb45c80b4483836b5cb5315bddf6e582) -- [meta] add `auto-changelog` [`bb78de5`](https://github.com/ljharb/gopd/commit/bb78de5639a180747fb290c28912beaaf1615709) -- [meta] create FUNDING.yml; add `funding` in package.json [`11c22e6`](https://github.com/ljharb/gopd/commit/11c22e6355bb01f24e7fac4c9bb3055eb5b25002) -- [meta] use `npmignore` to autogenerate an npmignore file [`4f4537a`](https://github.com/ljharb/gopd/commit/4f4537a843b39f698c52f072845092e6fca345bb) -- Only apps should have lockfiles [`c567022`](https://github.com/ljharb/gopd/commit/c567022a18573aa7951cf5399445d9840e23e98b) diff --git a/node_modules/gopd/LICENSE b/node_modules/gopd/LICENSE deleted file mode 100644 index 6abfe14..0000000 --- a/node_modules/gopd/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 Jordan Harband - -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/node_modules/gopd/README.md b/node_modules/gopd/README.md deleted file mode 100644 index 784e56a..0000000 --- a/node_modules/gopd/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# gopd <sup>[![Version Badge][npm-version-svg]][package-url]</sup> - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation. - -## Usage - -```javascript -var gOPD = require('gopd'); -var assert = require('assert'); - -if (gOPD) { - assert.equal(typeof gOPD, 'function', 'descriptors supported'); - // use gOPD like Object.getOwnPropertyDescriptor here -} else { - assert.ok(!gOPD, 'descriptors not supported'); -} -``` - -[package-url]: https://npmjs.org/package/gopd -[npm-version-svg]: https://versionbadg.es/ljharb/gopd.svg -[deps-svg]: https://david-dm.org/ljharb/gopd.svg -[deps-url]: https://david-dm.org/ljharb/gopd -[dev-deps-svg]: https://david-dm.org/ljharb/gopd/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/gopd#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/gopd.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/gopd.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/gopd.svg -[downloads-url]: https://npm-stat.com/charts.html?package=gopd -[codecov-image]: https://codecov.io/gh/ljharb/gopd/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/gopd/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/gopd -[actions-url]: https://github.com/ljharb/gopd/actions diff --git a/node_modules/gopd/gOPD.d.ts b/node_modules/gopd/gOPD.d.ts deleted file mode 100644 index def48a3..0000000 --- a/node_modules/gopd/gOPD.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Object.getOwnPropertyDescriptor; diff --git a/node_modules/gopd/gOPD.js b/node_modules/gopd/gOPD.js deleted file mode 100644 index cf9616c..0000000 --- a/node_modules/gopd/gOPD.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./gOPD')} */ -module.exports = Object.getOwnPropertyDescriptor; diff --git a/node_modules/gopd/index.d.ts b/node_modules/gopd/index.d.ts deleted file mode 100644 index e228065..0000000 --- a/node_modules/gopd/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function gOPD<O extends object, K extends keyof O>(obj: O, prop: K): PropertyDescriptor | undefined; - -declare const fn: typeof gOPD | undefined | null; - -export = fn; \ No newline at end of file diff --git a/node_modules/gopd/index.js b/node_modules/gopd/index.js deleted file mode 100644 index a4081b0..0000000 --- a/node_modules/gopd/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -/** @type {import('.')} */ -var $gOPD = require('./gOPD'); - -if ($gOPD) { - try { - $gOPD([], 'length'); - } catch (e) { - // IE 8 has a broken gOPD - $gOPD = null; - } -} - -module.exports = $gOPD; diff --git a/node_modules/gopd/package.json b/node_modules/gopd/package.json deleted file mode 100644 index 01c5ffa..0000000 --- a/node_modules/gopd/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "gopd", - "version": "1.2.0", - "description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./gOPD": "./gOPD.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prelint": "tsc -p . && attw -P", - "lint": "eslint --ext=js,mjs .", - "postlint": "evalmd README.md", - "pretest": "npm run lint", - "tests-only": "tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>=10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/gopd.git" - }, - "keywords": [ - "ecmascript", - "javascript", - "getownpropertydescriptor", - "property", - "descriptor" - ], - "author": "Jordan Harband <ljharb@gmail.com>", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/gopd/issues" - }, - "homepage": "https://github.com/ljharb/gopd#readme", - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.0", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.0", - "@types/tape": "^5.6.5", - "auto-changelog": "^2.5.0", - "encoding": "^0.1.13", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/gopd/test/index.js b/node_modules/gopd/test/index.js deleted file mode 100644 index 6f43453..0000000 --- a/node_modules/gopd/test/index.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -var test = require('tape'); -var gOPD = require('../'); - -test('gOPD', function (t) { - t.test('supported', { skip: !gOPD }, function (st) { - st.equal(typeof gOPD, 'function', 'is a function'); - - var obj = { x: 1 }; - st.ok('x' in obj, 'property exists'); - - // @ts-expect-error TS can't figure out narrowing from `skip` - var desc = gOPD(obj, 'x'); - st.deepEqual( - desc, - { - configurable: true, - enumerable: true, - value: 1, - writable: true - }, - 'descriptor is as expected' - ); - - st.end(); - }); - - t.test('not supported', { skip: !!gOPD }, function (st) { - st.notOk(gOPD, 'is falsy'); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/gopd/tsconfig.json b/node_modules/gopd/tsconfig.json deleted file mode 100644 index d9a6668..0000000 --- a/node_modules/gopd/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "es2021", - }, - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/has-flag/index.d.ts b/node_modules/has-flag/index.d.ts deleted file mode 100644 index a0a48c8..0000000 --- a/node_modules/has-flag/index.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** -Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag. - -@param flag - CLI flag to look for. The `--` prefix is optional. -@param argv - CLI arguments. Default: `process.argv`. -@returns Whether the flag exists. - -@example -``` -// $ ts-node foo.ts -f --unicorn --foo=bar -- --rainbow - -// foo.ts -import hasFlag = require('has-flag'); - -hasFlag('unicorn'); -//=> true - -hasFlag('--unicorn'); -//=> true - -hasFlag('f'); -//=> true - -hasFlag('-f'); -//=> true - -hasFlag('foo=bar'); -//=> true - -hasFlag('foo'); -//=> false - -hasFlag('rainbow'); -//=> false -``` -*/ -declare function hasFlag(flag: string, argv?: string[]): boolean; - -export = hasFlag; diff --git a/node_modules/has-flag/index.js b/node_modules/has-flag/index.js deleted file mode 100644 index b6f80b1..0000000 --- a/node_modules/has-flag/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -module.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf('--'); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -}; diff --git a/node_modules/has-flag/license b/node_modules/has-flag/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/has-flag/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/node_modules/has-flag/package.json b/node_modules/has-flag/package.json deleted file mode 100644 index a9cba4b..0000000 --- a/node_modules/has-flag/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "has-flag", - "version": "4.0.0", - "description": "Check if argv has a specific flag", - "license": "MIT", - "repository": "sindresorhus/has-flag", - "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" - ], - "keywords": [ - "has", - "check", - "detect", - "contains", - "find", - "flag", - "cli", - "command-line", - "argv", - "process", - "arg", - "args", - "argument", - "arguments", - "getopt", - "minimist", - "optimist" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} diff --git a/node_modules/has-flag/readme.md b/node_modules/has-flag/readme.md deleted file mode 100644 index 3f72dff..0000000 --- a/node_modules/has-flag/readme.md +++ /dev/null @@ -1,89 +0,0 @@ -# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag) - -> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag - -Correctly stops looking after an `--` argument terminator. - ---- - -<div align="center"> - <b> - <a href="https://tidelift.com/subscription/pkg/npm-has-flag?utm_source=npm-has-flag&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> - </b> - <br> - <sub> - Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. - </sub> -</div> - ---- - - -## Install - -``` -$ npm install has-flag -``` - - -## Usage - -```js -// foo.js -const hasFlag = require('has-flag'); - -hasFlag('unicorn'); -//=> true - -hasFlag('--unicorn'); -//=> true - -hasFlag('f'); -//=> true - -hasFlag('-f'); -//=> true - -hasFlag('foo=bar'); -//=> true - -hasFlag('foo'); -//=> false - -hasFlag('rainbow'); -//=> false -``` - -``` -$ node foo.js -f --unicorn --foo=bar -- --rainbow -``` - - -## API - -### hasFlag(flag, [argv]) - -Returns a boolean for whether the flag exists. - -#### flag - -Type: `string` - -CLI flag to look for. The `--` prefix is optional. - -#### argv - -Type: `string[]`<br> -Default: `process.argv` - -CLI arguments. - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/has-symbols/.eslintrc b/node_modules/has-symbols/.eslintrc deleted file mode 100644 index 2d9a66a..0000000 --- a/node_modules/has-symbols/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "max-statements-per-line": [2, { "max": 2 }], - "no-magic-numbers": 0, - "multiline-comment-style": 0, - } -} diff --git a/node_modules/has-symbols/.github/FUNDING.yml b/node_modules/has-symbols/.github/FUNDING.yml deleted file mode 100644 index 04cf87e..0000000 --- a/node_modules/has-symbols/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/has-symbols -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-symbols/.nycrc b/node_modules/has-symbols/.nycrc deleted file mode 100644 index bdd626c..0000000 --- a/node_modules/has-symbols/.nycrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-symbols/CHANGELOG.md deleted file mode 100644 index cc3cf83..0000000 --- a/node_modules/has-symbols/CHANGELOG.md +++ /dev/null @@ -1,91 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.1.0](https://github.com/inspect-js/has-symbols/compare/v1.0.3...v1.1.0) - 2024-12-02 - -### Commits - -- [actions] update workflows [`548c0bf`](https://github.com/inspect-js/has-symbols/commit/548c0bf8c9b1235458df7a1c0490b0064647a282) -- [actions] further shard; update action deps [`bec56bb`](https://github.com/inspect-js/has-symbols/commit/bec56bb0fb44b43a786686b944875a3175cf3ff3) -- [meta] use `npmignore` to autogenerate an npmignore file [`ac81032`](https://github.com/inspect-js/has-symbols/commit/ac81032809157e0a079e5264e9ce9b6f1275777e) -- [New] add types [`6469cbf`](https://github.com/inspect-js/has-symbols/commit/6469cbff1866cfe367b2b3d181d9296ec14b2a3d) -- [actions] update rebase action to use reusable workflow [`9c9d4d0`](https://github.com/inspect-js/has-symbols/commit/9c9d4d0d8938e4b267acdf8e421f4e92d1716d72) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`adb5887`](https://github.com/inspect-js/has-symbols/commit/adb5887ca9444849b08beb5caaa9e1d42320cdfb) -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`13ec198`](https://github.com/inspect-js/has-symbols/commit/13ec198ec80f1993a87710af1606a1970b22c7cb) -- [Dev Deps] update `auto-changelog`, `core-js`, `tape` [`941be52`](https://github.com/inspect-js/has-symbols/commit/941be5248387cab1da72509b22acf3fdb223f057) -- [Tests] replace `aud` with `npm audit` [`74f49e9`](https://github.com/inspect-js/has-symbols/commit/74f49e9a9d17a443020784234a1c53ce765b3559) -- [Dev Deps] update `npmignore` [`9c0ac04`](https://github.com/inspect-js/has-symbols/commit/9c0ac0452a834f4c2a4b54044f2d6a89f17e9a70) -- [Dev Deps] add missing peer dep [`52337a5`](https://github.com/inspect-js/has-symbols/commit/52337a5621cced61f846f2afdab7707a8132cc12) - -## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01 - -### Commits - -- [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693) -- [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744) -- [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07) -- [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab) -- [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc) -- [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e) -- [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f) -- [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d) -- [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03) - -## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 - -### Fixed - -- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11) - -### Commits - -- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3) -- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4) -- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae) -- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a) -- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839) -- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d) -- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0) -- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b) -- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da) -- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc) -- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1) -- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76) - -## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16 - -### Commits - -- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) -- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) -- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c) -- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91) -- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4) -- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa) -- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193) -- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0) -- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0) - -## v1.0.0 - 2016-09-19 - -### Commits - -- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d) -- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a) -- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c) -- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb) -- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c) diff --git a/node_modules/has-symbols/LICENSE b/node_modules/has-symbols/LICENSE deleted file mode 100644 index df31cbf..0000000 --- a/node_modules/has-symbols/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Jordan Harband - -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/node_modules/has-symbols/README.md b/node_modules/has-symbols/README.md deleted file mode 100644 index 33905f0..0000000 --- a/node_modules/has-symbols/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# has-symbols <sup>[![Version Badge][2]][1]</sup> - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -Determine if the JS environment has Symbol support. Supports spec, or shams. - -## Example - -```js -var hasSymbols = require('has-symbols'); - -hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. - -var hasSymbolsKinda = require('has-symbols/shams'); -hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. -``` - -## Supported Symbol shams - - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) - - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/has-symbols -[2]: https://versionbadg.es/inspect-js/has-symbols.svg -[5]: https://david-dm.org/inspect-js/has-symbols.svg -[6]: https://david-dm.org/inspect-js/has-symbols -[7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg -[8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies -[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/has-symbols.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg -[downloads-url]: https://npm-stat.com/charts.html?package=has-symbols -[codecov-image]: https://codecov.io/gh/inspect-js/has-symbols/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/inspect-js/has-symbols/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-symbols -[actions-url]: https://github.com/inspect-js/has-symbols/actions diff --git a/node_modules/has-symbols/index.d.ts b/node_modules/has-symbols/index.d.ts deleted file mode 100644 index 9b98595..0000000 --- a/node_modules/has-symbols/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function hasNativeSymbols(): boolean; - -export = hasNativeSymbols; \ No newline at end of file diff --git a/node_modules/has-symbols/index.js b/node_modules/has-symbols/index.js deleted file mode 100644 index fa65265..0000000 --- a/node_modules/has-symbols/index.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var origSymbol = typeof Symbol !== 'undefined' && Symbol; -var hasSymbolSham = require('./shams'); - -/** @type {import('.')} */ -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json deleted file mode 100644 index d835e20..0000000 --- a/node_modules/has-symbols/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "name": "has-symbols", - "version": "1.1.0", - "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", - "main": "index.js", - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run --silent lint", - "test": "npm run tests-only", - "posttest": "npx npm@'>=10.2' audit --production", - "tests-only": "npm run test:stock && npm run test:shams", - "test:stock": "nyc node test", - "test:staging": "nyc node --harmony --es-staging test", - "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", - "test:shams:corejs": "nyc node test/shams/core-js.js", - "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p . && attw -P", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git://github.com/inspect-js/has-symbols.git" - }, - "keywords": [ - "Symbol", - "symbols", - "typeof", - "sham", - "polyfill", - "native", - "core-js", - "ES6" - ], - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/has-symbols/issues" - }, - "homepage": "https://github.com/ljharb/has-symbols#readme", - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.0", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.0", - "@types/core-js": "^2.5.8", - "@types/tape": "^5.6.5", - "auto-changelog": "^2.5.0", - "core-js": "^2.6.12", - "encoding": "^0.1.13", - "eslint": "=8.8.0", - "get-own-property-symbols": "^0.9.5", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows", - "types" - ] - } -} diff --git a/node_modules/has-symbols/shams.d.ts b/node_modules/has-symbols/shams.d.ts deleted file mode 100644 index 8d0bf24..0000000 --- a/node_modules/has-symbols/shams.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function hasSymbolShams(): boolean; - -export = hasSymbolShams; \ No newline at end of file diff --git a/node_modules/has-symbols/shams.js b/node_modules/has-symbols/shams.js deleted file mode 100644 index f97b474..0000000 --- a/node_modules/has-symbols/shams.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -/** @type {import('./shams')} */ -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - /** @type {{ [k in symbol]?: unknown }} */ - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - // eslint-disable-next-line no-extra-parens - var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; diff --git a/node_modules/has-symbols/test/index.js b/node_modules/has-symbols/test/index.js deleted file mode 100644 index 352129c..0000000 --- a/node_modules/has-symbols/test/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var test = require('tape'); -var hasSymbols = require('../'); -var runSymbolTests = require('./tests'); - -test('interface', function (t) { - t.equal(typeof hasSymbols, 'function', 'is a function'); - t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); - t.end(); -}); - -test('Symbols are supported', { skip: !hasSymbols() }, function (t) { - runSymbolTests(t); - t.end(); -}); - -test('Symbols are not supported', { skip: hasSymbols() }, function (t) { - t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); - t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); - t.end(); -}); diff --git a/node_modules/has-symbols/test/shams/core-js.js b/node_modules/has-symbols/test/shams/core-js.js deleted file mode 100644 index 1a29024..0000000 --- a/node_modules/has-symbols/test/shams/core-js.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var test = require('tape'); - -if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { - test('has native Symbol support', function (t) { - t.equal(typeof Symbol, 'function'); - t.equal(typeof Symbol(), 'symbol'); - t.end(); - }); - // @ts-expect-error TS is stupid and doesn't know about top level return - return; -} - -var hasSymbols = require('../../shams'); - -test('polyfilled Symbols', function (t) { - /* eslint-disable global-require */ - t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); - require('core-js/fn/symbol'); - require('core-js/fn/symbol/to-string-tag'); - - require('../tests')(t); - - var hasSymbolsAfter = hasSymbols(); - t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); - /* eslint-enable global-require */ - t.end(); -}); diff --git a/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/has-symbols/test/shams/get-own-property-symbols.js deleted file mode 100644 index e0296f8..0000000 --- a/node_modules/has-symbols/test/shams/get-own-property-symbols.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var test = require('tape'); - -if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { - test('has native Symbol support', function (t) { - t.equal(typeof Symbol, 'function'); - t.equal(typeof Symbol(), 'symbol'); - t.end(); - }); - // @ts-expect-error TS is stupid and doesn't know about top level return - return; -} - -var hasSymbols = require('../../shams'); - -test('polyfilled Symbols', function (t) { - /* eslint-disable global-require */ - t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); - - require('get-own-property-symbols'); - - require('../tests')(t); - - var hasSymbolsAfter = hasSymbols(); - t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); - /* eslint-enable global-require */ - t.end(); -}); diff --git a/node_modules/has-symbols/test/tests.js b/node_modules/has-symbols/test/tests.js deleted file mode 100644 index 66a2cb8..0000000 --- a/node_modules/has-symbols/test/tests.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -/** @type {(t: import('tape').Test) => false | void} */ -// eslint-disable-next-line consistent-return -module.exports = function runSymbolTests(t) { - t.equal(typeof Symbol, 'function', 'global Symbol is a function'); - - if (typeof Symbol !== 'function') { return false; } - - t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); - - /* - t.equal( - Symbol.prototype.toString.call(Symbol('foo')), - Symbol.prototype.toString.call(Symbol('foo')), - 'two symbols with the same description stringify the same' - ); - */ - - /* - var foo = Symbol('foo'); - - t.notEqual( - String(foo), - String(Symbol('bar')), - 'two symbols with different descriptions do not stringify the same' - ); - */ - - t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); - // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); - - t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); - - /** @type {{ [k in symbol]?: unknown }} */ - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - t.notEqual(typeof sym, 'string', 'Symbol is not a string'); - t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); - t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); - - var symVal = 42; - obj[sym] = symVal; - // eslint-disable-next-line no-restricted-syntax, no-unused-vars - for (var _ in obj) { t.fail('symbol property key was found in for..in of object'); } - - t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); - t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); - t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); - t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { - configurable: true, - enumerable: true, - value: 42, - writable: true - }, 'property descriptor is correct'); -}; diff --git a/node_modules/has-symbols/tsconfig.json b/node_modules/has-symbols/tsconfig.json deleted file mode 100644 index ba99af4..0000000 --- a/node_modules/has-symbols/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "ES2021", - "maxNodeModuleJsDepth": 0, - }, - "exclude": [ - "coverage" - ] -} diff --git a/node_modules/hasown/.eslintrc b/node_modules/hasown/.eslintrc deleted file mode 100644 index 3b5d9e9..0000000 --- a/node_modules/hasown/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", -} diff --git a/node_modules/hasown/.github/FUNDING.yml b/node_modules/hasown/.github/FUNDING.yml deleted file mode 100644 index d68c8b7..0000000 --- a/node_modules/hasown/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/hasown -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/hasown/.nycrc b/node_modules/hasown/.nycrc deleted file mode 100644 index 1826526..0000000 --- a/node_modules/hasown/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/hasown/CHANGELOG.md b/node_modules/hasown/CHANGELOG.md deleted file mode 100644 index 2b0a980..0000000 --- a/node_modules/hasown/CHANGELOG.md +++ /dev/null @@ -1,40 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v2.0.2](https://github.com/inspect-js/hasOwn/compare/v2.0.1...v2.0.2) - 2024-03-10 - -### Commits - -- [types] use shared config [`68e9d4d`](https://github.com/inspect-js/hasOwn/commit/68e9d4dab6facb4f05f02c6baea94a3f2a4e44b2) -- [actions] remove redundant finisher; use reusable workflow [`241a68e`](https://github.com/inspect-js/hasOwn/commit/241a68e13ea1fe52bec5ba7f74144befc31fae7b) -- [Tests] increase coverage [`4125c0d`](https://github.com/inspect-js/hasOwn/commit/4125c0d6121db56ae30e38346dfb0c000b04f0a7) -- [Tests] skip `npm ls` in old node due to TS [`01b9282`](https://github.com/inspect-js/hasOwn/commit/01b92822f9971dea031eafdd14767df41d61c202) -- [types] improve predicate type [`d340f85`](https://github.com/inspect-js/hasOwn/commit/d340f85ce02e286ef61096cbbb6697081d40a12b) -- [Dev Deps] update `tape` [`70089fc`](https://github.com/inspect-js/hasOwn/commit/70089fcf544e64acc024cbe60f5a9b00acad86de) -- [Tests] use `@arethetypeswrong/cli` [`50b272c`](https://github.com/inspect-js/hasOwn/commit/50b272c829f40d053a3dd91c9796e0ac0b2af084) - -## [v2.0.1](https://github.com/inspect-js/hasOwn/compare/v2.0.0...v2.0.1) - 2024-02-10 - -### Commits - -- [types] use a handwritten d.ts file; fix exported type [`012b989`](https://github.com/inspect-js/hasOwn/commit/012b9898ccf91dc441e2ebf594ff70270a5fda58) -- [Dev Deps] update `@types/function-bind`, `@types/mock-property`, `@types/tape`, `aud`, `mock-property`, `npmignore`, `tape`, `typescript` [`977a56f`](https://github.com/inspect-js/hasOwn/commit/977a56f51a1f8b20566f3c471612137894644025) -- [meta] add `sideEffects` flag [`3a60b7b`](https://github.com/inspect-js/hasOwn/commit/3a60b7bf42fccd8c605e5f145a6fcc83b13cb46f) - -## [v2.0.0](https://github.com/inspect-js/hasOwn/compare/v1.0.1...v2.0.0) - 2023-10-19 - -### Commits - -- revamped implementation, tests, readme [`72bf8b3`](https://github.com/inspect-js/hasOwn/commit/72bf8b338e77a638f0a290c63ffaed18339c36b4) -- [meta] revamp package.json [`079775f`](https://github.com/inspect-js/hasOwn/commit/079775fb1ec72c1c6334069593617a0be3847458) -- Only apps should have lockfiles [`6640e23`](https://github.com/inspect-js/hasOwn/commit/6640e233d1bb8b65260880f90787637db157d215) - -## v1.0.1 - 2023-10-10 - -### Commits - -- Initial commit [`8dbfde6`](https://github.com/inspect-js/hasOwn/commit/8dbfde6e8fb0ebb076fab38d138f2984eb340a62) diff --git a/node_modules/hasown/LICENSE b/node_modules/hasown/LICENSE deleted file mode 100644 index 0314929..0000000 --- a/node_modules/hasown/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Jordan Harband and 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/node_modules/hasown/README.md b/node_modules/hasown/README.md deleted file mode 100644 index f759b8a..0000000 --- a/node_modules/hasown/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# hasown <sup>[![Version Badge][npm-version-svg]][package-url]</sup> - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -A robust, ES3 compatible, "has own property" predicate. - -## Example - -```js -const assert = require('assert'); -const hasOwn = require('hasown'); - -assert.equal(hasOwn({}, 'toString'), false); -assert.equal(hasOwn([], 'length'), true); -assert.equal(hasOwn({ a: 42 }, 'a'), true); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/hasown -[npm-version-svg]: https://versionbadg.es/inspect-js/hasown.svg -[deps-svg]: https://david-dm.org/inspect-js/hasOwn.svg -[deps-url]: https://david-dm.org/inspect-js/hasOwn -[dev-deps-svg]: https://david-dm.org/inspect-js/hasOwn/dev-status.svg -[dev-deps-url]: https://david-dm.org/inspect-js/hasOwn#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/hasown.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/hasown.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/hasown.svg -[downloads-url]: https://npm-stat.com/charts.html?package=hasown -[codecov-image]: https://codecov.io/gh/inspect-js/hasOwn/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/inspect-js/hasOwn/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/hasOwn -[actions-url]: https://github.com/inspect-js/hasOwn/actions diff --git a/node_modules/hasown/index.d.ts b/node_modules/hasown/index.d.ts deleted file mode 100644 index aafdf3b..0000000 --- a/node_modules/hasown/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function hasOwn<O, K extends PropertyKey, V = unknown>(o: O, p: K): o is O & Record<K, V>; - -export = hasOwn; diff --git a/node_modules/hasown/index.js b/node_modules/hasown/index.js deleted file mode 100644 index 34e6059..0000000 --- a/node_modules/hasown/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var call = Function.prototype.call; -var $hasOwn = Object.prototype.hasOwnProperty; -var bind = require('function-bind'); - -/** @type {import('.')} */ -module.exports = bind.call(call, $hasOwn); diff --git a/node_modules/hasown/package.json b/node_modules/hasown/package.json deleted file mode 100644 index 8502e13..0000000 --- a/node_modules/hasown/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "name": "hasown", - "version": "2.0.2", - "description": "A robust, ES3 compatible, \"has own property\" predicate.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "types": "index.d.ts", - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "npm run tsc", - "pretest": "npm run lint", - "tsc": "tsc -p .", - "posttsc": "attw -P", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/inspect-js/hasOwn.git" - }, - "keywords": [ - "has", - "hasOwnProperty", - "hasOwn", - "has-own", - "own", - "has", - "property", - "in", - "javascript", - "ecmascript" - ], - "author": "Jordan Harband <ljharb@gmail.com>", - "license": "MIT", - "bugs": { - "url": "https://github.com/inspect-js/hasOwn/issues" - }, - "homepage": "https://github.com/inspect-js/hasOwn#readme", - "dependencies": { - "function-bind": "^1.1.2" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.15.1", - "@ljharb/eslint-config": "^21.1.0", - "@ljharb/tsconfig": "^0.2.0", - "@types/function-bind": "^1.1.10", - "@types/mock-property": "^1.0.2", - "@types/tape": "^5.6.4", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "mock-property": "^1.0.3", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.5", - "typescript": "next" - }, - "engines": { - "node": ">= 0.4" - }, - "testling": { - "files": "test/index.js" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows", - "test" - ] - } -} diff --git a/node_modules/hasown/tsconfig.json b/node_modules/hasown/tsconfig.json deleted file mode 100644 index 0930c56..0000000 --- a/node_modules/hasown/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/he/LICENSE-MIT.txt b/node_modules/he/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7..0000000 --- a/node_modules/he/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens <https://mathiasbynens.be/> - -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/node_modules/he/README.md b/node_modules/he/README.md deleted file mode 100644 index b2223a9..0000000 --- a/node_modules/he/README.md +++ /dev/null @@ -1,379 +0,0 @@ -# he [![Build status](https://travis-ci.org/mathiasbynens/he.svg?branch=master)](https://travis-ci.org/mathiasbynens/he) [![Code coverage status](https://codecov.io/github/mathiasbynens/he/coverage.svg?branch=master)](https://codecov.io/github/mathiasbynens/he?branch=master) [![Dependency status](https://gemnasium.com/mathiasbynens/he.svg)](https://gemnasium.com/mathiasbynens/he) - -_he_ (for “HTML entities”) is a robust HTML entity encoder/decoder written in JavaScript. It supports [all standardized named character references as per HTML](https://html.spec.whatwg.org/multipage/syntax.html#named-character-references), handles [ambiguous ampersands](https://mathiasbynens.be/notes/ambiguous-ampersands) and other edge cases [just like a browser would](https://html.spec.whatwg.org/multipage/syntax.html#tokenizing-character-references), has an extensive test suite, and — contrary to many other JavaScript solutions — _he_ handles astral Unicode symbols just fine. [An online demo is available.](https://mothereff.in/html-entities) - -## Installation - -Via [npm](https://www.npmjs.com/): - -```bash -npm install he -``` - -Via [Bower](http://bower.io/): - -```bash -bower install he -``` - -Via [Component](https://github.com/component/component): - -```bash -component install mathiasbynens/he -``` - -In a browser: - -```html -<script src="he.js"></script> -``` - -In [Node.js](https://nodejs.org/), [io.js](https://iojs.org/), [Narwhal](http://narwhaljs.org/), and [RingoJS](http://ringojs.org/): - -```js -var he = require('he'); -``` - -In [Rhino](http://www.mozilla.org/rhino/): - -```js -load('he.js'); -``` - -Using an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require( - { - 'paths': { - 'he': 'path/to/he' - } - }, - ['he'], - function(he) { - console.log(he); - } -); -``` - -## API - -### `he.version` - -A string representing the semantic version number. - -### `he.encode(text, options)` - -This function takes a string of text and encodes (by default) any symbols that aren’t printable ASCII symbols and `&`, `<`, `>`, `"`, `'`, and `` ` ``, replacing them with character references. - -```js -he.encode('foo © bar ≠ baz 𝌆 qux'); -// → 'foo © bar ≠ baz 𝌆 qux' -``` - -As long as the input string contains [allowed code points](https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream) only, the return value of this function is always valid HTML. Any [(invalid) code points that cannot be represented using a character reference](https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides) in the input are not encoded: - -```js -he.encode('foo \0 bar'); -// → 'foo \0 bar' -``` - -However, enabling [the `strict` option](https://github.com/mathiasbynens/he#strict) causes invalid code points to throw an exception. With `strict` enabled, `he.encode` either throws (if the input contains invalid code points) or returns a string of valid HTML. - -The `options` object is optional. It recognizes the following properties: - -#### `useNamedReferences` - -The default value for the `useNamedReferences` option is `false`. This means that `encode()` will not use any named character references (e.g. `©`) in the output — hexadecimal escapes (e.g. `©`) will be used instead. Set it to `true` to enable the use of named references. - -**Note that if compatibility with older browsers is a concern, this option should remain disabled.** - -```js -// Using the global default setting (defaults to `false`): -he.encode('foo © bar ≠ baz 𝌆 qux'); -// → 'foo © bar ≠ baz 𝌆 qux' - -// Passing an `options` object to `encode`, to explicitly disallow named references: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'useNamedReferences': false -}); -// → 'foo © bar ≠ baz 𝌆 qux' - -// Passing an `options` object to `encode`, to explicitly allow named references: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'useNamedReferences': true -}); -// → 'foo © bar ≠ baz 𝌆 qux' -``` - -#### `decimal` - -The default value for the `decimal` option is `false`. If the option is enabled, `encode` will generally use decimal escapes (e.g. `©`) rather than hexadecimal escapes (e.g. `©`). Beside of this replacement, the basic behavior remains the same when combined with other options. For example: if both options `useNamedReferences` and `decimal` are enabled, named references (e.g. `©`) are used over decimal escapes. HTML entities without a named reference are encoded using decimal escapes. - -```js -// Using the global default setting (defaults to `false`): -he.encode('foo © bar ≠ baz 𝌆 qux'); -// → 'foo © bar ≠ baz 𝌆 qux' - -// Passing an `options` object to `encode`, to explicitly disable decimal escapes: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'decimal': false -}); -// → 'foo © bar ≠ baz 𝌆 qux' - -// Passing an `options` object to `encode`, to explicitly enable decimal escapes: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'decimal': true -}); -// → 'foo © bar ≠ baz 𝌆 qux' - -// Passing an `options` object to `encode`, to explicitly allow named references and decimal escapes: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'useNamedReferences': true, - 'decimal': true -}); -// → 'foo © bar ≠ baz 𝌆 qux' -``` - -#### `encodeEverything` - -The default value for the `encodeEverything` option is `false`. This means that `encode()` will not use any character references for printable ASCII symbols that don’t need escaping. Set it to `true` to encode every symbol in the input string. When set to `true`, this option takes precedence over `allowUnsafeSymbols` (i.e. setting the latter to `true` in such a case has no effect). - -```js -// Using the global default setting (defaults to `false`): -he.encode('foo © bar ≠ baz 𝌆 qux'); -// → 'foo © bar ≠ baz 𝌆 qux' - -// Passing an `options` object to `encode`, to explicitly encode all symbols: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'encodeEverything': true -}); -// → 'foo © bar ≠ baz 𝌆 qux' - -// This setting can be combined with the `useNamedReferences` option: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'encodeEverything': true, - 'useNamedReferences': true -}); -// → 'foo © bar ≠ baz 𝌆 qux' -``` - -#### `strict` - -The default value for the `strict` option is `false`. This means that `encode()` will encode any HTML text content you feed it, even if it contains any symbols that cause [parse errors](https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream). To throw an error when such invalid HTML is encountered, set the `strict` option to `true`. This option makes it possible to use _he_ as part of HTML parsers and HTML validators. - -```js -// Using the global default setting (defaults to `false`, i.e. error-tolerant mode): -he.encode('\x01'); -// → '' - -// Passing an `options` object to `encode`, to explicitly enable error-tolerant mode: -he.encode('\x01', { - 'strict': false -}); -// → '' - -// Passing an `options` object to `encode`, to explicitly enable strict mode: -he.encode('\x01', { - 'strict': true -}); -// → Parse error -``` - -#### `allowUnsafeSymbols` - -The default value for the `allowUnsafeSymbols` option is `false`. This means that characters that are unsafe for use in HTML content (`&`, `<`, `>`, `"`, `'`, and `` ` ``) will be encoded. When set to `true`, only non-ASCII characters will be encoded. If the `encodeEverything` option is set to `true`, this option will be ignored. - -```js -he.encode('foo © and & ampersand', { - 'allowUnsafeSymbols': true -}); -// → 'foo © and & ampersand' -``` - -#### Overriding default `encode` options globally - -The global default setting can be overridden by modifying the `he.encode.options` object. This saves you from passing in an `options` object for every call to `encode` if you want to use the non-default setting. - -```js -// Read the global default setting: -he.encode.options.useNamedReferences; -// → `false` by default - -// Override the global default setting: -he.encode.options.useNamedReferences = true; - -// Using the global default setting, which is now `true`: -he.encode('foo © bar ≠ baz 𝌆 qux'); -// → 'foo © bar ≠ baz 𝌆 qux' -``` - -### `he.decode(html, options)` - -This function takes a string of HTML and decodes any named and numerical character references in it using [the algorithm described in section 12.2.4.69 of the HTML spec](https://html.spec.whatwg.org/multipage/syntax.html#tokenizing-character-references). - -```js -he.decode('foo © bar ≠ baz 𝌆 qux'); -// → 'foo © bar ≠ baz 𝌆 qux' -``` - -The `options` object is optional. It recognizes the following properties: - -#### `isAttributeValue` - -The default value for the `isAttributeValue` option is `false`. This means that `decode()` will decode the string as if it were used in [a text context in an HTML document](https://html.spec.whatwg.org/multipage/syntax.html#data-state). HTML has different rules for [parsing character references in attribute values](https://html.spec.whatwg.org/multipage/syntax.html#character-reference-in-attribute-value-state) — set this option to `true` to treat the input string as if it were used as an attribute value. - -```js -// Using the global default setting (defaults to `false`, i.e. HTML text context): -he.decode('foo&bar'); -// → 'foo&bar' - -// Passing an `options` object to `decode`, to explicitly assume an HTML text context: -he.decode('foo&bar', { - 'isAttributeValue': false -}); -// → 'foo&bar' - -// Passing an `options` object to `decode`, to explicitly assume an HTML attribute value context: -he.decode('foo&bar', { - 'isAttributeValue': true -}); -// → 'foo&bar' -``` - -#### `strict` - -The default value for the `strict` option is `false`. This means that `decode()` will decode any HTML text content you feed it, even if it contains any entities that cause [parse errors](https://html.spec.whatwg.org/multipage/syntax.html#tokenizing-character-references). To throw an error when such invalid HTML is encountered, set the `strict` option to `true`. This option makes it possible to use _he_ as part of HTML parsers and HTML validators. - -```js -// Using the global default setting (defaults to `false`, i.e. error-tolerant mode): -he.decode('foo&bar'); -// → 'foo&bar' - -// Passing an `options` object to `decode`, to explicitly enable error-tolerant mode: -he.decode('foo&bar', { - 'strict': false -}); -// → 'foo&bar' - -// Passing an `options` object to `decode`, to explicitly enable strict mode: -he.decode('foo&bar', { - 'strict': true -}); -// → Parse error -``` - -#### Overriding default `decode` options globally - -The global default settings for the `decode` function can be overridden by modifying the `he.decode.options` object. This saves you from passing in an `options` object for every call to `decode` if you want to use a non-default setting. - -```js -// Read the global default setting: -he.decode.options.isAttributeValue; -// → `false` by default - -// Override the global default setting: -he.decode.options.isAttributeValue = true; - -// Using the global default setting, which is now `true`: -he.decode('foo&bar'); -// → 'foo&bar' -``` - -### `he.escape(text)` - -This function takes a string of text and escapes it for use in text contexts in XML or HTML documents. Only the following characters are escaped: `&`, `<`, `>`, `"`, `'`, and `` ` ``. - -```js -he.escape('<img src=\'x\' onerror="prompt(1)">'); -// → '<img src='x' onerror="prompt(1)">' -``` - -### `he.unescape(html, options)` - -`he.unescape` is an alias for `he.decode`. It takes a string of HTML and decodes any named and numerical character references in it. - -### Using the `he` binary - -To use the `he` binary in your shell, simply install _he_ globally using npm: - -```bash -npm install -g he -``` - -After that you will be able to encode/decode HTML entities from the command line: - -```bash -$ he --encode 'föo ♥ bår 𝌆 baz' -föo ♥ bår 𝌆 baz - -$ he --encode --use-named-refs 'föo ♥ bår 𝌆 baz' -föo ♥ bår 𝌆 baz - -$ he --decode 'föo ♥ bår 𝌆 baz' -föo ♥ bår 𝌆 baz -``` - -Read a local text file, encode it for use in an HTML text context, and save the result to a new file: - -```bash -$ he --encode < foo.txt > foo-escaped.html -``` - -Or do the same with an online text file: - -```bash -$ curl -sL "http://git.io/HnfEaw" | he --encode > escaped.html -``` - -Or, the opposite — read a local file containing a snippet of HTML in a text context, decode it back to plain text, and save the result to a new file: - -```bash -$ he --decode < foo-escaped.html > foo.txt -``` - -Or do the same with an online HTML snippet: - -```bash -$ curl -sL "http://git.io/HnfEaw" | he --decode > decoded.txt -``` - -See `he --help` for the full list of options. - -## Support - -_he_ has been tested in at least: - -* Chrome 27-50 -* Firefox 3-45 -* Safari 4-9 -* Opera 10-12, 15–37 -* IE 6–11 -* Edge -* Narwhal 0.3.2 -* Node.js v0.10, v0.12, v4, v5 -* PhantomJS 1.9.0 -* Rhino 1.7RC4 -* RingoJS 0.8-0.11 - -## Unit tests & code coverage - -After cloning this repository, run `npm install` to install the dependencies needed for he development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`. - -Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, and web browsers as well, use `grunt test`. - -To generate the code coverage report, use `grunt cover`. - -## Acknowledgements - -Thanks to [Simon Pieters](https://simon.html5.org/) ([@zcorpan](https://twitter.com/zcorpan)) for the many suggestions. - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## License - -_he_ is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/he/bin/he b/node_modules/he/bin/he deleted file mode 100644 index cfdfd6c..0000000 --- a/node_modules/he/bin/he +++ /dev/null @@ -1,148 +0,0 @@ -#!/usr/bin/env node -(function() { - - var fs = require('fs'); - var he = require('../he.js'); - var strings = process.argv.splice(2); - var stdin = process.stdin; - var data; - var timeout; - var action; - var options = {}; - var log = console.log; - - var main = function() { - var option = strings[0]; - var count = 0; - - if (/^(?:-h|--help|undefined)$/.test(option)) { - log( - 'he v%s - https://mths.be/he', - he.version - ); - log([ - '\nUsage:\n', - '\the [--escape] string', - '\the [--encode] [--use-named-refs] [--everything] [--allow-unsafe] [--decimal] string', - '\the [--decode] [--attribute] [--strict] string', - '\the [-v | --version]', - '\the [-h | --help]', - '\nExamples:\n', - '\the --escape \\<img\\ src\\=\\\'x\\\'\\ onerror\\=\\"prompt\\(1\\)\\"\\>', - '\techo \'© 𝌆\' | he --decode' - ].join('\n')); - return process.exit(option ? 0 : 1); - } - - if (/^(?:-v|--version)$/.test(option)) { - log('v%s', he.version); - return process.exit(0); - } - - strings.forEach(function(string) { - // Process options - if (string == '--escape') { - action = 'escape'; - return; - } - if (string == '--encode') { - action = 'encode'; - return; - } - if (string == '--use-named-refs') { - action = 'encode'; - options.useNamedReferences = true; - return; - } - if (string == '--everything') { - action = 'encode'; - options.encodeEverything = true; - return; - } - if (string == '--allow-unsafe') { - action = 'encode'; - options.allowUnsafeSymbols = true; - return; - } - if (string == '--decimal') { - action = 'encode'; - options.decimal = true; - return; - } - if (string == '--decode') { - action = 'decode'; - return; - } - if (string == '--attribute') { - action = 'decode'; - options.isAttributeValue = true; - return; - } - if (string == '--strict') { - action = 'decode'; - options.strict = true; - return; - } - // Process string(s) - var result; - if (!action) { - log('Error: he requires at least one option and a string argument.'); - log('Try `he --help` for more information.'); - return process.exit(1); - } - try { - result = he[action](string, options); - log(result); - count++; - } catch(error) { - log(error.message + '\n'); - log('Error: failed to %s.', action); - log('If you think this is a bug in he, please report it:'); - log('https://github.com/mathiasbynens/he/issues/new'); - log( - '\nStack trace using he@%s:\n', - he.version - ); - log(error.stack); - return process.exit(1); - } - }); - if (!count) { - log('Error: he requires a string argument.'); - log('Try `he --help` for more information.'); - return process.exit(1); - } - // Return with exit status 0 outside of the `forEach` loop, in case - // multiple strings were passed in. - return process.exit(0); - }; - - if (stdin.isTTY) { - // handle shell arguments - main(); - } else { - // Either the script is called from within a non-TTY context, or `stdin` - // content is being piped in. - if (!process.stdout.isTTY) { - // The script was called from a non-TTY context. This is a rather uncommon - // use case we don’t actively support. However, we don’t want the script - // to wait forever in such cases, so… - timeout = setTimeout(function() { - // …if no piped data arrived after a whole minute, handle shell - // arguments instead. - main(); - }, 60000); - } - data = ''; - stdin.on('data', function(chunk) { - clearTimeout(timeout); - data += chunk; - }); - stdin.on('end', function() { - strings.push(data.trim()); - main(); - }); - stdin.resume(); - } - -}()); diff --git a/node_modules/he/he.js b/node_modules/he/he.js deleted file mode 100644 index 14a58e9..0000000 --- a/node_modules/he/he.js +++ /dev/null @@ -1,345 +0,0 @@ -/*! https://mths.be/he v1.2.0 by @mathias | MIT license */ -;(function(root) { - - // Detect free variables `exports`. - var freeExports = typeof exports == 'object' && exports; - - // Detect free variable `module`. - var freeModule = typeof module == 'object' && module && - module.exports == freeExports && module; - - // Detect free variable `global`, from Node.js or Browserified code, - // and use it as `root`. - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - - /*--------------------------------------------------------------------------*/ - - // All astral symbols. - var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; - // All ASCII symbols (not just printable ASCII) except those listed in the - // first column of the overrides table. - // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides - var regexAsciiWhitelist = /[\x01-\x7F]/g; - // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or - // code points listed in the first column of the overrides table on - // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides. - var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g; - - var regexEncodeNonAscii = /<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g; - var encodeMap = {'\xAD':'shy','\u200C':'zwnj','\u200D':'zwj','\u200E':'lrm','\u2063':'ic','\u2062':'it','\u2061':'af','\u200F':'rlm','\u200B':'ZeroWidthSpace','\u2060':'NoBreak','\u0311':'DownBreve','\u20DB':'tdot','\u20DC':'DotDot','\t':'Tab','\n':'NewLine','\u2008':'puncsp','\u205F':'MediumSpace','\u2009':'thinsp','\u200A':'hairsp','\u2004':'emsp13','\u2002':'ensp','\u2005':'emsp14','\u2003':'emsp','\u2007':'numsp','\xA0':'nbsp','\u205F\u200A':'ThickSpace','\u203E':'oline','_':'lowbar','\u2010':'dash','\u2013':'ndash','\u2014':'mdash','\u2015':'horbar',',':'comma',';':'semi','\u204F':'bsemi',':':'colon','\u2A74':'Colone','!':'excl','\xA1':'iexcl','?':'quest','\xBF':'iquest','.':'period','\u2025':'nldr','\u2026':'mldr','\xB7':'middot','\'':'apos','\u2018':'lsquo','\u2019':'rsquo','\u201A':'sbquo','\u2039':'lsaquo','\u203A':'rsaquo','"':'quot','\u201C':'ldquo','\u201D':'rdquo','\u201E':'bdquo','\xAB':'laquo','\xBB':'raquo','(':'lpar',')':'rpar','[':'lsqb',']':'rsqb','{':'lcub','}':'rcub','\u2308':'lceil','\u2309':'rceil','\u230A':'lfloor','\u230B':'rfloor','\u2985':'lopar','\u2986':'ropar','\u298B':'lbrke','\u298C':'rbrke','\u298D':'lbrkslu','\u298E':'rbrksld','\u298F':'lbrksld','\u2990':'rbrkslu','\u2991':'langd','\u2992':'rangd','\u2993':'lparlt','\u2994':'rpargt','\u2995':'gtlPar','\u2996':'ltrPar','\u27E6':'lobrk','\u27E7':'robrk','\u27E8':'lang','\u27E9':'rang','\u27EA':'Lang','\u27EB':'Rang','\u27EC':'loang','\u27ED':'roang','\u2772':'lbbrk','\u2773':'rbbrk','\u2016':'Vert','\xA7':'sect','\xB6':'para','@':'commat','*':'ast','/':'sol','undefined':null,'&':'amp','#':'num','%':'percnt','\u2030':'permil','\u2031':'pertenk','\u2020':'dagger','\u2021':'Dagger','\u2022':'bull','\u2043':'hybull','\u2032':'prime','\u2033':'Prime','\u2034':'tprime','\u2057':'qprime','\u2035':'bprime','\u2041':'caret','`':'grave','\xB4':'acute','\u02DC':'tilde','^':'Hat','\xAF':'macr','\u02D8':'breve','\u02D9':'dot','\xA8':'die','\u02DA':'ring','\u02DD':'dblac','\xB8':'cedil','\u02DB':'ogon','\u02C6':'circ','\u02C7':'caron','\xB0':'deg','\xA9':'copy','\xAE':'reg','\u2117':'copysr','\u2118':'wp','\u211E':'rx','\u2127':'mho','\u2129':'iiota','\u2190':'larr','\u219A':'nlarr','\u2192':'rarr','\u219B':'nrarr','\u2191':'uarr','\u2193':'darr','\u2194':'harr','\u21AE':'nharr','\u2195':'varr','\u2196':'nwarr','\u2197':'nearr','\u2198':'searr','\u2199':'swarr','\u219D':'rarrw','\u219D\u0338':'nrarrw','\u219E':'Larr','\u219F':'Uarr','\u21A0':'Rarr','\u21A1':'Darr','\u21A2':'larrtl','\u21A3':'rarrtl','\u21A4':'mapstoleft','\u21A5':'mapstoup','\u21A6':'map','\u21A7':'mapstodown','\u21A9':'larrhk','\u21AA':'rarrhk','\u21AB':'larrlp','\u21AC':'rarrlp','\u21AD':'harrw','\u21B0':'lsh','\u21B1':'rsh','\u21B2':'ldsh','\u21B3':'rdsh','\u21B5':'crarr','\u21B6':'cularr','\u21B7':'curarr','\u21BA':'olarr','\u21BB':'orarr','\u21BC':'lharu','\u21BD':'lhard','\u21BE':'uharr','\u21BF':'uharl','\u21C0':'rharu','\u21C1':'rhard','\u21C2':'dharr','\u21C3':'dharl','\u21C4':'rlarr','\u21C5':'udarr','\u21C6':'lrarr','\u21C7':'llarr','\u21C8':'uuarr','\u21C9':'rrarr','\u21CA':'ddarr','\u21CB':'lrhar','\u21CC':'rlhar','\u21D0':'lArr','\u21CD':'nlArr','\u21D1':'uArr','\u21D2':'rArr','\u21CF':'nrArr','\u21D3':'dArr','\u21D4':'iff','\u21CE':'nhArr','\u21D5':'vArr','\u21D6':'nwArr','\u21D7':'neArr','\u21D8':'seArr','\u21D9':'swArr','\u21DA':'lAarr','\u21DB':'rAarr','\u21DD':'zigrarr','\u21E4':'larrb','\u21E5':'rarrb','\u21F5':'duarr','\u21FD':'loarr','\u21FE':'roarr','\u21FF':'hoarr','\u2200':'forall','\u2201':'comp','\u2202':'part','\u2202\u0338':'npart','\u2203':'exist','\u2204':'nexist','\u2205':'empty','\u2207':'Del','\u2208':'in','\u2209':'notin','\u220B':'ni','\u220C':'notni','\u03F6':'bepsi','\u220F':'prod','\u2210':'coprod','\u2211':'sum','+':'plus','\xB1':'pm','\xF7':'div','\xD7':'times','<':'lt','\u226E':'nlt','<\u20D2':'nvlt','=':'equals','\u2260':'ne','=\u20E5':'bne','\u2A75':'Equal','>':'gt','\u226F':'ngt','>\u20D2':'nvgt','\xAC':'not','|':'vert','\xA6':'brvbar','\u2212':'minus','\u2213':'mp','\u2214':'plusdo','\u2044':'frasl','\u2216':'setmn','\u2217':'lowast','\u2218':'compfn','\u221A':'Sqrt','\u221D':'prop','\u221E':'infin','\u221F':'angrt','\u2220':'ang','\u2220\u20D2':'nang','\u2221':'angmsd','\u2222':'angsph','\u2223':'mid','\u2224':'nmid','\u2225':'par','\u2226':'npar','\u2227':'and','\u2228':'or','\u2229':'cap','\u2229\uFE00':'caps','\u222A':'cup','\u222A\uFE00':'cups','\u222B':'int','\u222C':'Int','\u222D':'tint','\u2A0C':'qint','\u222E':'oint','\u222F':'Conint','\u2230':'Cconint','\u2231':'cwint','\u2232':'cwconint','\u2233':'awconint','\u2234':'there4','\u2235':'becaus','\u2236':'ratio','\u2237':'Colon','\u2238':'minusd','\u223A':'mDDot','\u223B':'homtht','\u223C':'sim','\u2241':'nsim','\u223C\u20D2':'nvsim','\u223D':'bsim','\u223D\u0331':'race','\u223E':'ac','\u223E\u0333':'acE','\u223F':'acd','\u2240':'wr','\u2242':'esim','\u2242\u0338':'nesim','\u2243':'sime','\u2244':'nsime','\u2245':'cong','\u2247':'ncong','\u2246':'simne','\u2248':'ap','\u2249':'nap','\u224A':'ape','\u224B':'apid','\u224B\u0338':'napid','\u224C':'bcong','\u224D':'CupCap','\u226D':'NotCupCap','\u224D\u20D2':'nvap','\u224E':'bump','\u224E\u0338':'nbump','\u224F':'bumpe','\u224F\u0338':'nbumpe','\u2250':'doteq','\u2250\u0338':'nedot','\u2251':'eDot','\u2252':'efDot','\u2253':'erDot','\u2254':'colone','\u2255':'ecolon','\u2256':'ecir','\u2257':'cire','\u2259':'wedgeq','\u225A':'veeeq','\u225C':'trie','\u225F':'equest','\u2261':'equiv','\u2262':'nequiv','\u2261\u20E5':'bnequiv','\u2264':'le','\u2270':'nle','\u2264\u20D2':'nvle','\u2265':'ge','\u2271':'nge','\u2265\u20D2':'nvge','\u2266':'lE','\u2266\u0338':'nlE','\u2267':'gE','\u2267\u0338':'ngE','\u2268\uFE00':'lvnE','\u2268':'lnE','\u2269':'gnE','\u2269\uFE00':'gvnE','\u226A':'ll','\u226A\u0338':'nLtv','\u226A\u20D2':'nLt','\u226B':'gg','\u226B\u0338':'nGtv','\u226B\u20D2':'nGt','\u226C':'twixt','\u2272':'lsim','\u2274':'nlsim','\u2273':'gsim','\u2275':'ngsim','\u2276':'lg','\u2278':'ntlg','\u2277':'gl','\u2279':'ntgl','\u227A':'pr','\u2280':'npr','\u227B':'sc','\u2281':'nsc','\u227C':'prcue','\u22E0':'nprcue','\u227D':'sccue','\u22E1':'nsccue','\u227E':'prsim','\u227F':'scsim','\u227F\u0338':'NotSucceedsTilde','\u2282':'sub','\u2284':'nsub','\u2282\u20D2':'vnsub','\u2283':'sup','\u2285':'nsup','\u2283\u20D2':'vnsup','\u2286':'sube','\u2288':'nsube','\u2287':'supe','\u2289':'nsupe','\u228A\uFE00':'vsubne','\u228A':'subne','\u228B\uFE00':'vsupne','\u228B':'supne','\u228D':'cupdot','\u228E':'uplus','\u228F':'sqsub','\u228F\u0338':'NotSquareSubset','\u2290':'sqsup','\u2290\u0338':'NotSquareSuperset','\u2291':'sqsube','\u22E2':'nsqsube','\u2292':'sqsupe','\u22E3':'nsqsupe','\u2293':'sqcap','\u2293\uFE00':'sqcaps','\u2294':'sqcup','\u2294\uFE00':'sqcups','\u2295':'oplus','\u2296':'ominus','\u2297':'otimes','\u2298':'osol','\u2299':'odot','\u229A':'ocir','\u229B':'oast','\u229D':'odash','\u229E':'plusb','\u229F':'minusb','\u22A0':'timesb','\u22A1':'sdotb','\u22A2':'vdash','\u22AC':'nvdash','\u22A3':'dashv','\u22A4':'top','\u22A5':'bot','\u22A7':'models','\u22A8':'vDash','\u22AD':'nvDash','\u22A9':'Vdash','\u22AE':'nVdash','\u22AA':'Vvdash','\u22AB':'VDash','\u22AF':'nVDash','\u22B0':'prurel','\u22B2':'vltri','\u22EA':'nltri','\u22B3':'vrtri','\u22EB':'nrtri','\u22B4':'ltrie','\u22EC':'nltrie','\u22B4\u20D2':'nvltrie','\u22B5':'rtrie','\u22ED':'nrtrie','\u22B5\u20D2':'nvrtrie','\u22B6':'origof','\u22B7':'imof','\u22B8':'mumap','\u22B9':'hercon','\u22BA':'intcal','\u22BB':'veebar','\u22BD':'barvee','\u22BE':'angrtvb','\u22BF':'lrtri','\u22C0':'Wedge','\u22C1':'Vee','\u22C2':'xcap','\u22C3':'xcup','\u22C4':'diam','\u22C5':'sdot','\u22C6':'Star','\u22C7':'divonx','\u22C8':'bowtie','\u22C9':'ltimes','\u22CA':'rtimes','\u22CB':'lthree','\u22CC':'rthree','\u22CD':'bsime','\u22CE':'cuvee','\u22CF':'cuwed','\u22D0':'Sub','\u22D1':'Sup','\u22D2':'Cap','\u22D3':'Cup','\u22D4':'fork','\u22D5':'epar','\u22D6':'ltdot','\u22D7':'gtdot','\u22D8':'Ll','\u22D8\u0338':'nLl','\u22D9':'Gg','\u22D9\u0338':'nGg','\u22DA\uFE00':'lesg','\u22DA':'leg','\u22DB':'gel','\u22DB\uFE00':'gesl','\u22DE':'cuepr','\u22DF':'cuesc','\u22E6':'lnsim','\u22E7':'gnsim','\u22E8':'prnsim','\u22E9':'scnsim','\u22EE':'vellip','\u22EF':'ctdot','\u22F0':'utdot','\u22F1':'dtdot','\u22F2':'disin','\u22F3':'isinsv','\u22F4':'isins','\u22F5':'isindot','\u22F5\u0338':'notindot','\u22F6':'notinvc','\u22F7':'notinvb','\u22F9':'isinE','\u22F9\u0338':'notinE','\u22FA':'nisd','\u22FB':'xnis','\u22FC':'nis','\u22FD':'notnivc','\u22FE':'notnivb','\u2305':'barwed','\u2306':'Barwed','\u230C':'drcrop','\u230D':'dlcrop','\u230E':'urcrop','\u230F':'ulcrop','\u2310':'bnot','\u2312':'profline','\u2313':'profsurf','\u2315':'telrec','\u2316':'target','\u231C':'ulcorn','\u231D':'urcorn','\u231E':'dlcorn','\u231F':'drcorn','\u2322':'frown','\u2323':'smile','\u232D':'cylcty','\u232E':'profalar','\u2336':'topbot','\u233D':'ovbar','\u233F':'solbar','\u237C':'angzarr','\u23B0':'lmoust','\u23B1':'rmoust','\u23B4':'tbrk','\u23B5':'bbrk','\u23B6':'bbrktbrk','\u23DC':'OverParenthesis','\u23DD':'UnderParenthesis','\u23DE':'OverBrace','\u23DF':'UnderBrace','\u23E2':'trpezium','\u23E7':'elinters','\u2423':'blank','\u2500':'boxh','\u2502':'boxv','\u250C':'boxdr','\u2510':'boxdl','\u2514':'boxur','\u2518':'boxul','\u251C':'boxvr','\u2524':'boxvl','\u252C':'boxhd','\u2534':'boxhu','\u253C':'boxvh','\u2550':'boxH','\u2551':'boxV','\u2552':'boxdR','\u2553':'boxDr','\u2554':'boxDR','\u2555':'boxdL','\u2556':'boxDl','\u2557':'boxDL','\u2558':'boxuR','\u2559':'boxUr','\u255A':'boxUR','\u255B':'boxuL','\u255C':'boxUl','\u255D':'boxUL','\u255E':'boxvR','\u255F':'boxVr','\u2560':'boxVR','\u2561':'boxvL','\u2562':'boxVl','\u2563':'boxVL','\u2564':'boxHd','\u2565':'boxhD','\u2566':'boxHD','\u2567':'boxHu','\u2568':'boxhU','\u2569':'boxHU','\u256A':'boxvH','\u256B':'boxVh','\u256C':'boxVH','\u2580':'uhblk','\u2584':'lhblk','\u2588':'block','\u2591':'blk14','\u2592':'blk12','\u2593':'blk34','\u25A1':'squ','\u25AA':'squf','\u25AB':'EmptyVerySmallSquare','\u25AD':'rect','\u25AE':'marker','\u25B1':'fltns','\u25B3':'xutri','\u25B4':'utrif','\u25B5':'utri','\u25B8':'rtrif','\u25B9':'rtri','\u25BD':'xdtri','\u25BE':'dtrif','\u25BF':'dtri','\u25C2':'ltrif','\u25C3':'ltri','\u25CA':'loz','\u25CB':'cir','\u25EC':'tridot','\u25EF':'xcirc','\u25F8':'ultri','\u25F9':'urtri','\u25FA':'lltri','\u25FB':'EmptySmallSquare','\u25FC':'FilledSmallSquare','\u2605':'starf','\u2606':'star','\u260E':'phone','\u2640':'female','\u2642':'male','\u2660':'spades','\u2663':'clubs','\u2665':'hearts','\u2666':'diams','\u266A':'sung','\u2713':'check','\u2717':'cross','\u2720':'malt','\u2736':'sext','\u2758':'VerticalSeparator','\u27C8':'bsolhsub','\u27C9':'suphsol','\u27F5':'xlarr','\u27F6':'xrarr','\u27F7':'xharr','\u27F8':'xlArr','\u27F9':'xrArr','\u27FA':'xhArr','\u27FC':'xmap','\u27FF':'dzigrarr','\u2902':'nvlArr','\u2903':'nvrArr','\u2904':'nvHarr','\u2905':'Map','\u290C':'lbarr','\u290D':'rbarr','\u290E':'lBarr','\u290F':'rBarr','\u2910':'RBarr','\u2911':'DDotrahd','\u2912':'UpArrowBar','\u2913':'DownArrowBar','\u2916':'Rarrtl','\u2919':'latail','\u291A':'ratail','\u291B':'lAtail','\u291C':'rAtail','\u291D':'larrfs','\u291E':'rarrfs','\u291F':'larrbfs','\u2920':'rarrbfs','\u2923':'nwarhk','\u2924':'nearhk','\u2925':'searhk','\u2926':'swarhk','\u2927':'nwnear','\u2928':'toea','\u2929':'tosa','\u292A':'swnwar','\u2933':'rarrc','\u2933\u0338':'nrarrc','\u2935':'cudarrr','\u2936':'ldca','\u2937':'rdca','\u2938':'cudarrl','\u2939':'larrpl','\u293C':'curarrm','\u293D':'cularrp','\u2945':'rarrpl','\u2948':'harrcir','\u2949':'Uarrocir','\u294A':'lurdshar','\u294B':'ldrushar','\u294E':'LeftRightVector','\u294F':'RightUpDownVector','\u2950':'DownLeftRightVector','\u2951':'LeftUpDownVector','\u2952':'LeftVectorBar','\u2953':'RightVectorBar','\u2954':'RightUpVectorBar','\u2955':'RightDownVectorBar','\u2956':'DownLeftVectorBar','\u2957':'DownRightVectorBar','\u2958':'LeftUpVectorBar','\u2959':'LeftDownVectorBar','\u295A':'LeftTeeVector','\u295B':'RightTeeVector','\u295C':'RightUpTeeVector','\u295D':'RightDownTeeVector','\u295E':'DownLeftTeeVector','\u295F':'DownRightTeeVector','\u2960':'LeftUpTeeVector','\u2961':'LeftDownTeeVector','\u2962':'lHar','\u2963':'uHar','\u2964':'rHar','\u2965':'dHar','\u2966':'luruhar','\u2967':'ldrdhar','\u2968':'ruluhar','\u2969':'rdldhar','\u296A':'lharul','\u296B':'llhard','\u296C':'rharul','\u296D':'lrhard','\u296E':'udhar','\u296F':'duhar','\u2970':'RoundImplies','\u2971':'erarr','\u2972':'simrarr','\u2973':'larrsim','\u2974':'rarrsim','\u2975':'rarrap','\u2976':'ltlarr','\u2978':'gtrarr','\u2979':'subrarr','\u297B':'suplarr','\u297C':'lfisht','\u297D':'rfisht','\u297E':'ufisht','\u297F':'dfisht','\u299A':'vzigzag','\u299C':'vangrt','\u299D':'angrtvbd','\u29A4':'ange','\u29A5':'range','\u29A6':'dwangle','\u29A7':'uwangle','\u29A8':'angmsdaa','\u29A9':'angmsdab','\u29AA':'angmsdac','\u29AB':'angmsdad','\u29AC':'angmsdae','\u29AD':'angmsdaf','\u29AE':'angmsdag','\u29AF':'angmsdah','\u29B0':'bemptyv','\u29B1':'demptyv','\u29B2':'cemptyv','\u29B3':'raemptyv','\u29B4':'laemptyv','\u29B5':'ohbar','\u29B6':'omid','\u29B7':'opar','\u29B9':'operp','\u29BB':'olcross','\u29BC':'odsold','\u29BE':'olcir','\u29BF':'ofcir','\u29C0':'olt','\u29C1':'ogt','\u29C2':'cirscir','\u29C3':'cirE','\u29C4':'solb','\u29C5':'bsolb','\u29C9':'boxbox','\u29CD':'trisb','\u29CE':'rtriltri','\u29CF':'LeftTriangleBar','\u29CF\u0338':'NotLeftTriangleBar','\u29D0':'RightTriangleBar','\u29D0\u0338':'NotRightTriangleBar','\u29DC':'iinfin','\u29DD':'infintie','\u29DE':'nvinfin','\u29E3':'eparsl','\u29E4':'smeparsl','\u29E5':'eqvparsl','\u29EB':'lozf','\u29F4':'RuleDelayed','\u29F6':'dsol','\u2A00':'xodot','\u2A01':'xoplus','\u2A02':'xotime','\u2A04':'xuplus','\u2A06':'xsqcup','\u2A0D':'fpartint','\u2A10':'cirfnint','\u2A11':'awint','\u2A12':'rppolint','\u2A13':'scpolint','\u2A14':'npolint','\u2A15':'pointint','\u2A16':'quatint','\u2A17':'intlarhk','\u2A22':'pluscir','\u2A23':'plusacir','\u2A24':'simplus','\u2A25':'plusdu','\u2A26':'plussim','\u2A27':'plustwo','\u2A29':'mcomma','\u2A2A':'minusdu','\u2A2D':'loplus','\u2A2E':'roplus','\u2A2F':'Cross','\u2A30':'timesd','\u2A31':'timesbar','\u2A33':'smashp','\u2A34':'lotimes','\u2A35':'rotimes','\u2A36':'otimesas','\u2A37':'Otimes','\u2A38':'odiv','\u2A39':'triplus','\u2A3A':'triminus','\u2A3B':'tritime','\u2A3C':'iprod','\u2A3F':'amalg','\u2A40':'capdot','\u2A42':'ncup','\u2A43':'ncap','\u2A44':'capand','\u2A45':'cupor','\u2A46':'cupcap','\u2A47':'capcup','\u2A48':'cupbrcap','\u2A49':'capbrcup','\u2A4A':'cupcup','\u2A4B':'capcap','\u2A4C':'ccups','\u2A4D':'ccaps','\u2A50':'ccupssm','\u2A53':'And','\u2A54':'Or','\u2A55':'andand','\u2A56':'oror','\u2A57':'orslope','\u2A58':'andslope','\u2A5A':'andv','\u2A5B':'orv','\u2A5C':'andd','\u2A5D':'ord','\u2A5F':'wedbar','\u2A66':'sdote','\u2A6A':'simdot','\u2A6D':'congdot','\u2A6D\u0338':'ncongdot','\u2A6E':'easter','\u2A6F':'apacir','\u2A70':'apE','\u2A70\u0338':'napE','\u2A71':'eplus','\u2A72':'pluse','\u2A73':'Esim','\u2A77':'eDDot','\u2A78':'equivDD','\u2A79':'ltcir','\u2A7A':'gtcir','\u2A7B':'ltquest','\u2A7C':'gtquest','\u2A7D':'les','\u2A7D\u0338':'nles','\u2A7E':'ges','\u2A7E\u0338':'nges','\u2A7F':'lesdot','\u2A80':'gesdot','\u2A81':'lesdoto','\u2A82':'gesdoto','\u2A83':'lesdotor','\u2A84':'gesdotol','\u2A85':'lap','\u2A86':'gap','\u2A87':'lne','\u2A88':'gne','\u2A89':'lnap','\u2A8A':'gnap','\u2A8B':'lEg','\u2A8C':'gEl','\u2A8D':'lsime','\u2A8E':'gsime','\u2A8F':'lsimg','\u2A90':'gsiml','\u2A91':'lgE','\u2A92':'glE','\u2A93':'lesges','\u2A94':'gesles','\u2A95':'els','\u2A96':'egs','\u2A97':'elsdot','\u2A98':'egsdot','\u2A99':'el','\u2A9A':'eg','\u2A9D':'siml','\u2A9E':'simg','\u2A9F':'simlE','\u2AA0':'simgE','\u2AA1':'LessLess','\u2AA1\u0338':'NotNestedLessLess','\u2AA2':'GreaterGreater','\u2AA2\u0338':'NotNestedGreaterGreater','\u2AA4':'glj','\u2AA5':'gla','\u2AA6':'ltcc','\u2AA7':'gtcc','\u2AA8':'lescc','\u2AA9':'gescc','\u2AAA':'smt','\u2AAB':'lat','\u2AAC':'smte','\u2AAC\uFE00':'smtes','\u2AAD':'late','\u2AAD\uFE00':'lates','\u2AAE':'bumpE','\u2AAF':'pre','\u2AAF\u0338':'npre','\u2AB0':'sce','\u2AB0\u0338':'nsce','\u2AB3':'prE','\u2AB4':'scE','\u2AB5':'prnE','\u2AB6':'scnE','\u2AB7':'prap','\u2AB8':'scap','\u2AB9':'prnap','\u2ABA':'scnap','\u2ABB':'Pr','\u2ABC':'Sc','\u2ABD':'subdot','\u2ABE':'supdot','\u2ABF':'subplus','\u2AC0':'supplus','\u2AC1':'submult','\u2AC2':'supmult','\u2AC3':'subedot','\u2AC4':'supedot','\u2AC5':'subE','\u2AC5\u0338':'nsubE','\u2AC6':'supE','\u2AC6\u0338':'nsupE','\u2AC7':'subsim','\u2AC8':'supsim','\u2ACB\uFE00':'vsubnE','\u2ACB':'subnE','\u2ACC\uFE00':'vsupnE','\u2ACC':'supnE','\u2ACF':'csub','\u2AD0':'csup','\u2AD1':'csube','\u2AD2':'csupe','\u2AD3':'subsup','\u2AD4':'supsub','\u2AD5':'subsub','\u2AD6':'supsup','\u2AD7':'suphsub','\u2AD8':'supdsub','\u2AD9':'forkv','\u2ADA':'topfork','\u2ADB':'mlcp','\u2AE4':'Dashv','\u2AE6':'Vdashl','\u2AE7':'Barv','\u2AE8':'vBar','\u2AE9':'vBarv','\u2AEB':'Vbar','\u2AEC':'Not','\u2AED':'bNot','\u2AEE':'rnmid','\u2AEF':'cirmid','\u2AF0':'midcir','\u2AF1':'topcir','\u2AF2':'nhpar','\u2AF3':'parsim','\u2AFD':'parsl','\u2AFD\u20E5':'nparsl','\u266D':'flat','\u266E':'natur','\u266F':'sharp','\xA4':'curren','\xA2':'cent','$':'dollar','\xA3':'pound','\xA5':'yen','\u20AC':'euro','\xB9':'sup1','\xBD':'half','\u2153':'frac13','\xBC':'frac14','\u2155':'frac15','\u2159':'frac16','\u215B':'frac18','\xB2':'sup2','\u2154':'frac23','\u2156':'frac25','\xB3':'sup3','\xBE':'frac34','\u2157':'frac35','\u215C':'frac38','\u2158':'frac45','\u215A':'frac56','\u215D':'frac58','\u215E':'frac78','\uD835\uDCB6':'ascr','\uD835\uDD52':'aopf','\uD835\uDD1E':'afr','\uD835\uDD38':'Aopf','\uD835\uDD04':'Afr','\uD835\uDC9C':'Ascr','\xAA':'ordf','\xE1':'aacute','\xC1':'Aacute','\xE0':'agrave','\xC0':'Agrave','\u0103':'abreve','\u0102':'Abreve','\xE2':'acirc','\xC2':'Acirc','\xE5':'aring','\xC5':'angst','\xE4':'auml','\xC4':'Auml','\xE3':'atilde','\xC3':'Atilde','\u0105':'aogon','\u0104':'Aogon','\u0101':'amacr','\u0100':'Amacr','\xE6':'aelig','\xC6':'AElig','\uD835\uDCB7':'bscr','\uD835\uDD53':'bopf','\uD835\uDD1F':'bfr','\uD835\uDD39':'Bopf','\u212C':'Bscr','\uD835\uDD05':'Bfr','\uD835\uDD20':'cfr','\uD835\uDCB8':'cscr','\uD835\uDD54':'copf','\u212D':'Cfr','\uD835\uDC9E':'Cscr','\u2102':'Copf','\u0107':'cacute','\u0106':'Cacute','\u0109':'ccirc','\u0108':'Ccirc','\u010D':'ccaron','\u010C':'Ccaron','\u010B':'cdot','\u010A':'Cdot','\xE7':'ccedil','\xC7':'Ccedil','\u2105':'incare','\uD835\uDD21':'dfr','\u2146':'dd','\uD835\uDD55':'dopf','\uD835\uDCB9':'dscr','\uD835\uDC9F':'Dscr','\uD835\uDD07':'Dfr','\u2145':'DD','\uD835\uDD3B':'Dopf','\u010F':'dcaron','\u010E':'Dcaron','\u0111':'dstrok','\u0110':'Dstrok','\xF0':'eth','\xD0':'ETH','\u2147':'ee','\u212F':'escr','\uD835\uDD22':'efr','\uD835\uDD56':'eopf','\u2130':'Escr','\uD835\uDD08':'Efr','\uD835\uDD3C':'Eopf','\xE9':'eacute','\xC9':'Eacute','\xE8':'egrave','\xC8':'Egrave','\xEA':'ecirc','\xCA':'Ecirc','\u011B':'ecaron','\u011A':'Ecaron','\xEB':'euml','\xCB':'Euml','\u0117':'edot','\u0116':'Edot','\u0119':'eogon','\u0118':'Eogon','\u0113':'emacr','\u0112':'Emacr','\uD835\uDD23':'ffr','\uD835\uDD57':'fopf','\uD835\uDCBB':'fscr','\uD835\uDD09':'Ffr','\uD835\uDD3D':'Fopf','\u2131':'Fscr','\uFB00':'fflig','\uFB03':'ffilig','\uFB04':'ffllig','\uFB01':'filig','fj':'fjlig','\uFB02':'fllig','\u0192':'fnof','\u210A':'gscr','\uD835\uDD58':'gopf','\uD835\uDD24':'gfr','\uD835\uDCA2':'Gscr','\uD835\uDD3E':'Gopf','\uD835\uDD0A':'Gfr','\u01F5':'gacute','\u011F':'gbreve','\u011E':'Gbreve','\u011D':'gcirc','\u011C':'Gcirc','\u0121':'gdot','\u0120':'Gdot','\u0122':'Gcedil','\uD835\uDD25':'hfr','\u210E':'planckh','\uD835\uDCBD':'hscr','\uD835\uDD59':'hopf','\u210B':'Hscr','\u210C':'Hfr','\u210D':'Hopf','\u0125':'hcirc','\u0124':'Hcirc','\u210F':'hbar','\u0127':'hstrok','\u0126':'Hstrok','\uD835\uDD5A':'iopf','\uD835\uDD26':'ifr','\uD835\uDCBE':'iscr','\u2148':'ii','\uD835\uDD40':'Iopf','\u2110':'Iscr','\u2111':'Im','\xED':'iacute','\xCD':'Iacute','\xEC':'igrave','\xCC':'Igrave','\xEE':'icirc','\xCE':'Icirc','\xEF':'iuml','\xCF':'Iuml','\u0129':'itilde','\u0128':'Itilde','\u0130':'Idot','\u012F':'iogon','\u012E':'Iogon','\u012B':'imacr','\u012A':'Imacr','\u0133':'ijlig','\u0132':'IJlig','\u0131':'imath','\uD835\uDCBF':'jscr','\uD835\uDD5B':'jopf','\uD835\uDD27':'jfr','\uD835\uDCA5':'Jscr','\uD835\uDD0D':'Jfr','\uD835\uDD41':'Jopf','\u0135':'jcirc','\u0134':'Jcirc','\u0237':'jmath','\uD835\uDD5C':'kopf','\uD835\uDCC0':'kscr','\uD835\uDD28':'kfr','\uD835\uDCA6':'Kscr','\uD835\uDD42':'Kopf','\uD835\uDD0E':'Kfr','\u0137':'kcedil','\u0136':'Kcedil','\uD835\uDD29':'lfr','\uD835\uDCC1':'lscr','\u2113':'ell','\uD835\uDD5D':'lopf','\u2112':'Lscr','\uD835\uDD0F':'Lfr','\uD835\uDD43':'Lopf','\u013A':'lacute','\u0139':'Lacute','\u013E':'lcaron','\u013D':'Lcaron','\u013C':'lcedil','\u013B':'Lcedil','\u0142':'lstrok','\u0141':'Lstrok','\u0140':'lmidot','\u013F':'Lmidot','\uD835\uDD2A':'mfr','\uD835\uDD5E':'mopf','\uD835\uDCC2':'mscr','\uD835\uDD10':'Mfr','\uD835\uDD44':'Mopf','\u2133':'Mscr','\uD835\uDD2B':'nfr','\uD835\uDD5F':'nopf','\uD835\uDCC3':'nscr','\u2115':'Nopf','\uD835\uDCA9':'Nscr','\uD835\uDD11':'Nfr','\u0144':'nacute','\u0143':'Nacute','\u0148':'ncaron','\u0147':'Ncaron','\xF1':'ntilde','\xD1':'Ntilde','\u0146':'ncedil','\u0145':'Ncedil','\u2116':'numero','\u014B':'eng','\u014A':'ENG','\uD835\uDD60':'oopf','\uD835\uDD2C':'ofr','\u2134':'oscr','\uD835\uDCAA':'Oscr','\uD835\uDD12':'Ofr','\uD835\uDD46':'Oopf','\xBA':'ordm','\xF3':'oacute','\xD3':'Oacute','\xF2':'ograve','\xD2':'Ograve','\xF4':'ocirc','\xD4':'Ocirc','\xF6':'ouml','\xD6':'Ouml','\u0151':'odblac','\u0150':'Odblac','\xF5':'otilde','\xD5':'Otilde','\xF8':'oslash','\xD8':'Oslash','\u014D':'omacr','\u014C':'Omacr','\u0153':'oelig','\u0152':'OElig','\uD835\uDD2D':'pfr','\uD835\uDCC5':'pscr','\uD835\uDD61':'popf','\u2119':'Popf','\uD835\uDD13':'Pfr','\uD835\uDCAB':'Pscr','\uD835\uDD62':'qopf','\uD835\uDD2E':'qfr','\uD835\uDCC6':'qscr','\uD835\uDCAC':'Qscr','\uD835\uDD14':'Qfr','\u211A':'Qopf','\u0138':'kgreen','\uD835\uDD2F':'rfr','\uD835\uDD63':'ropf','\uD835\uDCC7':'rscr','\u211B':'Rscr','\u211C':'Re','\u211D':'Ropf','\u0155':'racute','\u0154':'Racute','\u0159':'rcaron','\u0158':'Rcaron','\u0157':'rcedil','\u0156':'Rcedil','\uD835\uDD64':'sopf','\uD835\uDCC8':'sscr','\uD835\uDD30':'sfr','\uD835\uDD4A':'Sopf','\uD835\uDD16':'Sfr','\uD835\uDCAE':'Sscr','\u24C8':'oS','\u015B':'sacute','\u015A':'Sacute','\u015D':'scirc','\u015C':'Scirc','\u0161':'scaron','\u0160':'Scaron','\u015F':'scedil','\u015E':'Scedil','\xDF':'szlig','\uD835\uDD31':'tfr','\uD835\uDCC9':'tscr','\uD835\uDD65':'topf','\uD835\uDCAF':'Tscr','\uD835\uDD17':'Tfr','\uD835\uDD4B':'Topf','\u0165':'tcaron','\u0164':'Tcaron','\u0163':'tcedil','\u0162':'Tcedil','\u2122':'trade','\u0167':'tstrok','\u0166':'Tstrok','\uD835\uDCCA':'uscr','\uD835\uDD66':'uopf','\uD835\uDD32':'ufr','\uD835\uDD4C':'Uopf','\uD835\uDD18':'Ufr','\uD835\uDCB0':'Uscr','\xFA':'uacute','\xDA':'Uacute','\xF9':'ugrave','\xD9':'Ugrave','\u016D':'ubreve','\u016C':'Ubreve','\xFB':'ucirc','\xDB':'Ucirc','\u016F':'uring','\u016E':'Uring','\xFC':'uuml','\xDC':'Uuml','\u0171':'udblac','\u0170':'Udblac','\u0169':'utilde','\u0168':'Utilde','\u0173':'uogon','\u0172':'Uogon','\u016B':'umacr','\u016A':'Umacr','\uD835\uDD33':'vfr','\uD835\uDD67':'vopf','\uD835\uDCCB':'vscr','\uD835\uDD19':'Vfr','\uD835\uDD4D':'Vopf','\uD835\uDCB1':'Vscr','\uD835\uDD68':'wopf','\uD835\uDCCC':'wscr','\uD835\uDD34':'wfr','\uD835\uDCB2':'Wscr','\uD835\uDD4E':'Wopf','\uD835\uDD1A':'Wfr','\u0175':'wcirc','\u0174':'Wcirc','\uD835\uDD35':'xfr','\uD835\uDCCD':'xscr','\uD835\uDD69':'xopf','\uD835\uDD4F':'Xopf','\uD835\uDD1B':'Xfr','\uD835\uDCB3':'Xscr','\uD835\uDD36':'yfr','\uD835\uDCCE':'yscr','\uD835\uDD6A':'yopf','\uD835\uDCB4':'Yscr','\uD835\uDD1C':'Yfr','\uD835\uDD50':'Yopf','\xFD':'yacute','\xDD':'Yacute','\u0177':'ycirc','\u0176':'Ycirc','\xFF':'yuml','\u0178':'Yuml','\uD835\uDCCF':'zscr','\uD835\uDD37':'zfr','\uD835\uDD6B':'zopf','\u2128':'Zfr','\u2124':'Zopf','\uD835\uDCB5':'Zscr','\u017A':'zacute','\u0179':'Zacute','\u017E':'zcaron','\u017D':'Zcaron','\u017C':'zdot','\u017B':'Zdot','\u01B5':'imped','\xFE':'thorn','\xDE':'THORN','\u0149':'napos','\u03B1':'alpha','\u0391':'Alpha','\u03B2':'beta','\u0392':'Beta','\u03B3':'gamma','\u0393':'Gamma','\u03B4':'delta','\u0394':'Delta','\u03B5':'epsi','\u03F5':'epsiv','\u0395':'Epsilon','\u03DD':'gammad','\u03DC':'Gammad','\u03B6':'zeta','\u0396':'Zeta','\u03B7':'eta','\u0397':'Eta','\u03B8':'theta','\u03D1':'thetav','\u0398':'Theta','\u03B9':'iota','\u0399':'Iota','\u03BA':'kappa','\u03F0':'kappav','\u039A':'Kappa','\u03BB':'lambda','\u039B':'Lambda','\u03BC':'mu','\xB5':'micro','\u039C':'Mu','\u03BD':'nu','\u039D':'Nu','\u03BE':'xi','\u039E':'Xi','\u03BF':'omicron','\u039F':'Omicron','\u03C0':'pi','\u03D6':'piv','\u03A0':'Pi','\u03C1':'rho','\u03F1':'rhov','\u03A1':'Rho','\u03C3':'sigma','\u03A3':'Sigma','\u03C2':'sigmaf','\u03C4':'tau','\u03A4':'Tau','\u03C5':'upsi','\u03A5':'Upsilon','\u03D2':'Upsi','\u03C6':'phi','\u03D5':'phiv','\u03A6':'Phi','\u03C7':'chi','\u03A7':'Chi','\u03C8':'psi','\u03A8':'Psi','\u03C9':'omega','\u03A9':'ohm','\u0430':'acy','\u0410':'Acy','\u0431':'bcy','\u0411':'Bcy','\u0432':'vcy','\u0412':'Vcy','\u0433':'gcy','\u0413':'Gcy','\u0453':'gjcy','\u0403':'GJcy','\u0434':'dcy','\u0414':'Dcy','\u0452':'djcy','\u0402':'DJcy','\u0435':'iecy','\u0415':'IEcy','\u0451':'iocy','\u0401':'IOcy','\u0454':'jukcy','\u0404':'Jukcy','\u0436':'zhcy','\u0416':'ZHcy','\u0437':'zcy','\u0417':'Zcy','\u0455':'dscy','\u0405':'DScy','\u0438':'icy','\u0418':'Icy','\u0456':'iukcy','\u0406':'Iukcy','\u0457':'yicy','\u0407':'YIcy','\u0439':'jcy','\u0419':'Jcy','\u0458':'jsercy','\u0408':'Jsercy','\u043A':'kcy','\u041A':'Kcy','\u045C':'kjcy','\u040C':'KJcy','\u043B':'lcy','\u041B':'Lcy','\u0459':'ljcy','\u0409':'LJcy','\u043C':'mcy','\u041C':'Mcy','\u043D':'ncy','\u041D':'Ncy','\u045A':'njcy','\u040A':'NJcy','\u043E':'ocy','\u041E':'Ocy','\u043F':'pcy','\u041F':'Pcy','\u0440':'rcy','\u0420':'Rcy','\u0441':'scy','\u0421':'Scy','\u0442':'tcy','\u0422':'Tcy','\u045B':'tshcy','\u040B':'TSHcy','\u0443':'ucy','\u0423':'Ucy','\u045E':'ubrcy','\u040E':'Ubrcy','\u0444':'fcy','\u0424':'Fcy','\u0445':'khcy','\u0425':'KHcy','\u0446':'tscy','\u0426':'TScy','\u0447':'chcy','\u0427':'CHcy','\u045F':'dzcy','\u040F':'DZcy','\u0448':'shcy','\u0428':'SHcy','\u0449':'shchcy','\u0429':'SHCHcy','\u044A':'hardcy','\u042A':'HARDcy','\u044B':'ycy','\u042B':'Ycy','\u044C':'softcy','\u042C':'SOFTcy','\u044D':'ecy','\u042D':'Ecy','\u044E':'yucy','\u042E':'YUcy','\u044F':'yacy','\u042F':'YAcy','\u2135':'aleph','\u2136':'beth','\u2137':'gimel','\u2138':'daleth'}; - - var regexEscape = /["&'<>`]/g; - var escapeMap = { - '"': '"', - '&': '&', - '\'': ''', - '<': '<', - // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the - // following is not strictly necessary unless it’s part of a tag or an - // unquoted attribute value. We’re only escaping it to support those - // situations, and for XML support. - '>': '>', - // In Internet Explorer ≤ 8, the backtick character can be used - // to break out of (un)quoted attribute values or HTML comments. - // See http://html5sec.org/#102, http://html5sec.org/#108, and - // http://html5sec.org/#133. - '`': '`' - }; - - var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/; - var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; - var regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g; - var decodeMap = {'aacute':'\xE1','Aacute':'\xC1','abreve':'\u0103','Abreve':'\u0102','ac':'\u223E','acd':'\u223F','acE':'\u223E\u0333','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','acy':'\u0430','Acy':'\u0410','aelig':'\xE6','AElig':'\xC6','af':'\u2061','afr':'\uD835\uDD1E','Afr':'\uD835\uDD04','agrave':'\xE0','Agrave':'\xC0','alefsym':'\u2135','aleph':'\u2135','alpha':'\u03B1','Alpha':'\u0391','amacr':'\u0101','Amacr':'\u0100','amalg':'\u2A3F','amp':'&','AMP':'&','and':'\u2227','And':'\u2A53','andand':'\u2A55','andd':'\u2A5C','andslope':'\u2A58','andv':'\u2A5A','ang':'\u2220','ange':'\u29A4','angle':'\u2220','angmsd':'\u2221','angmsdaa':'\u29A8','angmsdab':'\u29A9','angmsdac':'\u29AA','angmsdad':'\u29AB','angmsdae':'\u29AC','angmsdaf':'\u29AD','angmsdag':'\u29AE','angmsdah':'\u29AF','angrt':'\u221F','angrtvb':'\u22BE','angrtvbd':'\u299D','angsph':'\u2222','angst':'\xC5','angzarr':'\u237C','aogon':'\u0105','Aogon':'\u0104','aopf':'\uD835\uDD52','Aopf':'\uD835\uDD38','ap':'\u2248','apacir':'\u2A6F','ape':'\u224A','apE':'\u2A70','apid':'\u224B','apos':'\'','ApplyFunction':'\u2061','approx':'\u2248','approxeq':'\u224A','aring':'\xE5','Aring':'\xC5','ascr':'\uD835\uDCB6','Ascr':'\uD835\uDC9C','Assign':'\u2254','ast':'*','asymp':'\u2248','asympeq':'\u224D','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','awconint':'\u2233','awint':'\u2A11','backcong':'\u224C','backepsilon':'\u03F6','backprime':'\u2035','backsim':'\u223D','backsimeq':'\u22CD','Backslash':'\u2216','Barv':'\u2AE7','barvee':'\u22BD','barwed':'\u2305','Barwed':'\u2306','barwedge':'\u2305','bbrk':'\u23B5','bbrktbrk':'\u23B6','bcong':'\u224C','bcy':'\u0431','Bcy':'\u0411','bdquo':'\u201E','becaus':'\u2235','because':'\u2235','Because':'\u2235','bemptyv':'\u29B0','bepsi':'\u03F6','bernou':'\u212C','Bernoullis':'\u212C','beta':'\u03B2','Beta':'\u0392','beth':'\u2136','between':'\u226C','bfr':'\uD835\uDD1F','Bfr':'\uD835\uDD05','bigcap':'\u22C2','bigcirc':'\u25EF','bigcup':'\u22C3','bigodot':'\u2A00','bigoplus':'\u2A01','bigotimes':'\u2A02','bigsqcup':'\u2A06','bigstar':'\u2605','bigtriangledown':'\u25BD','bigtriangleup':'\u25B3','biguplus':'\u2A04','bigvee':'\u22C1','bigwedge':'\u22C0','bkarow':'\u290D','blacklozenge':'\u29EB','blacksquare':'\u25AA','blacktriangle':'\u25B4','blacktriangledown':'\u25BE','blacktriangleleft':'\u25C2','blacktriangleright':'\u25B8','blank':'\u2423','blk12':'\u2592','blk14':'\u2591','blk34':'\u2593','block':'\u2588','bne':'=\u20E5','bnequiv':'\u2261\u20E5','bnot':'\u2310','bNot':'\u2AED','bopf':'\uD835\uDD53','Bopf':'\uD835\uDD39','bot':'\u22A5','bottom':'\u22A5','bowtie':'\u22C8','boxbox':'\u29C9','boxdl':'\u2510','boxdL':'\u2555','boxDl':'\u2556','boxDL':'\u2557','boxdr':'\u250C','boxdR':'\u2552','boxDr':'\u2553','boxDR':'\u2554','boxh':'\u2500','boxH':'\u2550','boxhd':'\u252C','boxhD':'\u2565','boxHd':'\u2564','boxHD':'\u2566','boxhu':'\u2534','boxhU':'\u2568','boxHu':'\u2567','boxHU':'\u2569','boxminus':'\u229F','boxplus':'\u229E','boxtimes':'\u22A0','boxul':'\u2518','boxuL':'\u255B','boxUl':'\u255C','boxUL':'\u255D','boxur':'\u2514','boxuR':'\u2558','boxUr':'\u2559','boxUR':'\u255A','boxv':'\u2502','boxV':'\u2551','boxvh':'\u253C','boxvH':'\u256A','boxVh':'\u256B','boxVH':'\u256C','boxvl':'\u2524','boxvL':'\u2561','boxVl':'\u2562','boxVL':'\u2563','boxvr':'\u251C','boxvR':'\u255E','boxVr':'\u255F','boxVR':'\u2560','bprime':'\u2035','breve':'\u02D8','Breve':'\u02D8','brvbar':'\xA6','bscr':'\uD835\uDCB7','Bscr':'\u212C','bsemi':'\u204F','bsim':'\u223D','bsime':'\u22CD','bsol':'\\','bsolb':'\u29C5','bsolhsub':'\u27C8','bull':'\u2022','bullet':'\u2022','bump':'\u224E','bumpe':'\u224F','bumpE':'\u2AAE','bumpeq':'\u224F','Bumpeq':'\u224E','cacute':'\u0107','Cacute':'\u0106','cap':'\u2229','Cap':'\u22D2','capand':'\u2A44','capbrcup':'\u2A49','capcap':'\u2A4B','capcup':'\u2A47','capdot':'\u2A40','CapitalDifferentialD':'\u2145','caps':'\u2229\uFE00','caret':'\u2041','caron':'\u02C7','Cayleys':'\u212D','ccaps':'\u2A4D','ccaron':'\u010D','Ccaron':'\u010C','ccedil':'\xE7','Ccedil':'\xC7','ccirc':'\u0109','Ccirc':'\u0108','Cconint':'\u2230','ccups':'\u2A4C','ccupssm':'\u2A50','cdot':'\u010B','Cdot':'\u010A','cedil':'\xB8','Cedilla':'\xB8','cemptyv':'\u29B2','cent':'\xA2','centerdot':'\xB7','CenterDot':'\xB7','cfr':'\uD835\uDD20','Cfr':'\u212D','chcy':'\u0447','CHcy':'\u0427','check':'\u2713','checkmark':'\u2713','chi':'\u03C7','Chi':'\u03A7','cir':'\u25CB','circ':'\u02C6','circeq':'\u2257','circlearrowleft':'\u21BA','circlearrowright':'\u21BB','circledast':'\u229B','circledcirc':'\u229A','circleddash':'\u229D','CircleDot':'\u2299','circledR':'\xAE','circledS':'\u24C8','CircleMinus':'\u2296','CirclePlus':'\u2295','CircleTimes':'\u2297','cire':'\u2257','cirE':'\u29C3','cirfnint':'\u2A10','cirmid':'\u2AEF','cirscir':'\u29C2','ClockwiseContourIntegral':'\u2232','CloseCurlyDoubleQuote':'\u201D','CloseCurlyQuote':'\u2019','clubs':'\u2663','clubsuit':'\u2663','colon':':','Colon':'\u2237','colone':'\u2254','Colone':'\u2A74','coloneq':'\u2254','comma':',','commat':'@','comp':'\u2201','compfn':'\u2218','complement':'\u2201','complexes':'\u2102','cong':'\u2245','congdot':'\u2A6D','Congruent':'\u2261','conint':'\u222E','Conint':'\u222F','ContourIntegral':'\u222E','copf':'\uD835\uDD54','Copf':'\u2102','coprod':'\u2210','Coproduct':'\u2210','copy':'\xA9','COPY':'\xA9','copysr':'\u2117','CounterClockwiseContourIntegral':'\u2233','crarr':'\u21B5','cross':'\u2717','Cross':'\u2A2F','cscr':'\uD835\uDCB8','Cscr':'\uD835\uDC9E','csub':'\u2ACF','csube':'\u2AD1','csup':'\u2AD0','csupe':'\u2AD2','ctdot':'\u22EF','cudarrl':'\u2938','cudarrr':'\u2935','cuepr':'\u22DE','cuesc':'\u22DF','cularr':'\u21B6','cularrp':'\u293D','cup':'\u222A','Cup':'\u22D3','cupbrcap':'\u2A48','cupcap':'\u2A46','CupCap':'\u224D','cupcup':'\u2A4A','cupdot':'\u228D','cupor':'\u2A45','cups':'\u222A\uFE00','curarr':'\u21B7','curarrm':'\u293C','curlyeqprec':'\u22DE','curlyeqsucc':'\u22DF','curlyvee':'\u22CE','curlywedge':'\u22CF','curren':'\xA4','curvearrowleft':'\u21B6','curvearrowright':'\u21B7','cuvee':'\u22CE','cuwed':'\u22CF','cwconint':'\u2232','cwint':'\u2231','cylcty':'\u232D','dagger':'\u2020','Dagger':'\u2021','daleth':'\u2138','darr':'\u2193','dArr':'\u21D3','Darr':'\u21A1','dash':'\u2010','dashv':'\u22A3','Dashv':'\u2AE4','dbkarow':'\u290F','dblac':'\u02DD','dcaron':'\u010F','Dcaron':'\u010E','dcy':'\u0434','Dcy':'\u0414','dd':'\u2146','DD':'\u2145','ddagger':'\u2021','ddarr':'\u21CA','DDotrahd':'\u2911','ddotseq':'\u2A77','deg':'\xB0','Del':'\u2207','delta':'\u03B4','Delta':'\u0394','demptyv':'\u29B1','dfisht':'\u297F','dfr':'\uD835\uDD21','Dfr':'\uD835\uDD07','dHar':'\u2965','dharl':'\u21C3','dharr':'\u21C2','DiacriticalAcute':'\xB4','DiacriticalDot':'\u02D9','DiacriticalDoubleAcute':'\u02DD','DiacriticalGrave':'`','DiacriticalTilde':'\u02DC','diam':'\u22C4','diamond':'\u22C4','Diamond':'\u22C4','diamondsuit':'\u2666','diams':'\u2666','die':'\xA8','DifferentialD':'\u2146','digamma':'\u03DD','disin':'\u22F2','div':'\xF7','divide':'\xF7','divideontimes':'\u22C7','divonx':'\u22C7','djcy':'\u0452','DJcy':'\u0402','dlcorn':'\u231E','dlcrop':'\u230D','dollar':'$','dopf':'\uD835\uDD55','Dopf':'\uD835\uDD3B','dot':'\u02D9','Dot':'\xA8','DotDot':'\u20DC','doteq':'\u2250','doteqdot':'\u2251','DotEqual':'\u2250','dotminus':'\u2238','dotplus':'\u2214','dotsquare':'\u22A1','doublebarwedge':'\u2306','DoubleContourIntegral':'\u222F','DoubleDot':'\xA8','DoubleDownArrow':'\u21D3','DoubleLeftArrow':'\u21D0','DoubleLeftRightArrow':'\u21D4','DoubleLeftTee':'\u2AE4','DoubleLongLeftArrow':'\u27F8','DoubleLongLeftRightArrow':'\u27FA','DoubleLongRightArrow':'\u27F9','DoubleRightArrow':'\u21D2','DoubleRightTee':'\u22A8','DoubleUpArrow':'\u21D1','DoubleUpDownArrow':'\u21D5','DoubleVerticalBar':'\u2225','downarrow':'\u2193','Downarrow':'\u21D3','DownArrow':'\u2193','DownArrowBar':'\u2913','DownArrowUpArrow':'\u21F5','DownBreve':'\u0311','downdownarrows':'\u21CA','downharpoonleft':'\u21C3','downharpoonright':'\u21C2','DownLeftRightVector':'\u2950','DownLeftTeeVector':'\u295E','DownLeftVector':'\u21BD','DownLeftVectorBar':'\u2956','DownRightTeeVector':'\u295F','DownRightVector':'\u21C1','DownRightVectorBar':'\u2957','DownTee':'\u22A4','DownTeeArrow':'\u21A7','drbkarow':'\u2910','drcorn':'\u231F','drcrop':'\u230C','dscr':'\uD835\uDCB9','Dscr':'\uD835\uDC9F','dscy':'\u0455','DScy':'\u0405','dsol':'\u29F6','dstrok':'\u0111','Dstrok':'\u0110','dtdot':'\u22F1','dtri':'\u25BF','dtrif':'\u25BE','duarr':'\u21F5','duhar':'\u296F','dwangle':'\u29A6','dzcy':'\u045F','DZcy':'\u040F','dzigrarr':'\u27FF','eacute':'\xE9','Eacute':'\xC9','easter':'\u2A6E','ecaron':'\u011B','Ecaron':'\u011A','ecir':'\u2256','ecirc':'\xEA','Ecirc':'\xCA','ecolon':'\u2255','ecy':'\u044D','Ecy':'\u042D','eDDot':'\u2A77','edot':'\u0117','eDot':'\u2251','Edot':'\u0116','ee':'\u2147','efDot':'\u2252','efr':'\uD835\uDD22','Efr':'\uD835\uDD08','eg':'\u2A9A','egrave':'\xE8','Egrave':'\xC8','egs':'\u2A96','egsdot':'\u2A98','el':'\u2A99','Element':'\u2208','elinters':'\u23E7','ell':'\u2113','els':'\u2A95','elsdot':'\u2A97','emacr':'\u0113','Emacr':'\u0112','empty':'\u2205','emptyset':'\u2205','EmptySmallSquare':'\u25FB','emptyv':'\u2205','EmptyVerySmallSquare':'\u25AB','emsp':'\u2003','emsp13':'\u2004','emsp14':'\u2005','eng':'\u014B','ENG':'\u014A','ensp':'\u2002','eogon':'\u0119','Eogon':'\u0118','eopf':'\uD835\uDD56','Eopf':'\uD835\uDD3C','epar':'\u22D5','eparsl':'\u29E3','eplus':'\u2A71','epsi':'\u03B5','epsilon':'\u03B5','Epsilon':'\u0395','epsiv':'\u03F5','eqcirc':'\u2256','eqcolon':'\u2255','eqsim':'\u2242','eqslantgtr':'\u2A96','eqslantless':'\u2A95','Equal':'\u2A75','equals':'=','EqualTilde':'\u2242','equest':'\u225F','Equilibrium':'\u21CC','equiv':'\u2261','equivDD':'\u2A78','eqvparsl':'\u29E5','erarr':'\u2971','erDot':'\u2253','escr':'\u212F','Escr':'\u2130','esdot':'\u2250','esim':'\u2242','Esim':'\u2A73','eta':'\u03B7','Eta':'\u0397','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','euro':'\u20AC','excl':'!','exist':'\u2203','Exists':'\u2203','expectation':'\u2130','exponentiale':'\u2147','ExponentialE':'\u2147','fallingdotseq':'\u2252','fcy':'\u0444','Fcy':'\u0424','female':'\u2640','ffilig':'\uFB03','fflig':'\uFB00','ffllig':'\uFB04','ffr':'\uD835\uDD23','Ffr':'\uD835\uDD09','filig':'\uFB01','FilledSmallSquare':'\u25FC','FilledVerySmallSquare':'\u25AA','fjlig':'fj','flat':'\u266D','fllig':'\uFB02','fltns':'\u25B1','fnof':'\u0192','fopf':'\uD835\uDD57','Fopf':'\uD835\uDD3D','forall':'\u2200','ForAll':'\u2200','fork':'\u22D4','forkv':'\u2AD9','Fouriertrf':'\u2131','fpartint':'\u2A0D','frac12':'\xBD','frac13':'\u2153','frac14':'\xBC','frac15':'\u2155','frac16':'\u2159','frac18':'\u215B','frac23':'\u2154','frac25':'\u2156','frac34':'\xBE','frac35':'\u2157','frac38':'\u215C','frac45':'\u2158','frac56':'\u215A','frac58':'\u215D','frac78':'\u215E','frasl':'\u2044','frown':'\u2322','fscr':'\uD835\uDCBB','Fscr':'\u2131','gacute':'\u01F5','gamma':'\u03B3','Gamma':'\u0393','gammad':'\u03DD','Gammad':'\u03DC','gap':'\u2A86','gbreve':'\u011F','Gbreve':'\u011E','Gcedil':'\u0122','gcirc':'\u011D','Gcirc':'\u011C','gcy':'\u0433','Gcy':'\u0413','gdot':'\u0121','Gdot':'\u0120','ge':'\u2265','gE':'\u2267','gel':'\u22DB','gEl':'\u2A8C','geq':'\u2265','geqq':'\u2267','geqslant':'\u2A7E','ges':'\u2A7E','gescc':'\u2AA9','gesdot':'\u2A80','gesdoto':'\u2A82','gesdotol':'\u2A84','gesl':'\u22DB\uFE00','gesles':'\u2A94','gfr':'\uD835\uDD24','Gfr':'\uD835\uDD0A','gg':'\u226B','Gg':'\u22D9','ggg':'\u22D9','gimel':'\u2137','gjcy':'\u0453','GJcy':'\u0403','gl':'\u2277','gla':'\u2AA5','glE':'\u2A92','glj':'\u2AA4','gnap':'\u2A8A','gnapprox':'\u2A8A','gne':'\u2A88','gnE':'\u2269','gneq':'\u2A88','gneqq':'\u2269','gnsim':'\u22E7','gopf':'\uD835\uDD58','Gopf':'\uD835\uDD3E','grave':'`','GreaterEqual':'\u2265','GreaterEqualLess':'\u22DB','GreaterFullEqual':'\u2267','GreaterGreater':'\u2AA2','GreaterLess':'\u2277','GreaterSlantEqual':'\u2A7E','GreaterTilde':'\u2273','gscr':'\u210A','Gscr':'\uD835\uDCA2','gsim':'\u2273','gsime':'\u2A8E','gsiml':'\u2A90','gt':'>','Gt':'\u226B','GT':'>','gtcc':'\u2AA7','gtcir':'\u2A7A','gtdot':'\u22D7','gtlPar':'\u2995','gtquest':'\u2A7C','gtrapprox':'\u2A86','gtrarr':'\u2978','gtrdot':'\u22D7','gtreqless':'\u22DB','gtreqqless':'\u2A8C','gtrless':'\u2277','gtrsim':'\u2273','gvertneqq':'\u2269\uFE00','gvnE':'\u2269\uFE00','Hacek':'\u02C7','hairsp':'\u200A','half':'\xBD','hamilt':'\u210B','hardcy':'\u044A','HARDcy':'\u042A','harr':'\u2194','hArr':'\u21D4','harrcir':'\u2948','harrw':'\u21AD','Hat':'^','hbar':'\u210F','hcirc':'\u0125','Hcirc':'\u0124','hearts':'\u2665','heartsuit':'\u2665','hellip':'\u2026','hercon':'\u22B9','hfr':'\uD835\uDD25','Hfr':'\u210C','HilbertSpace':'\u210B','hksearow':'\u2925','hkswarow':'\u2926','hoarr':'\u21FF','homtht':'\u223B','hookleftarrow':'\u21A9','hookrightarrow':'\u21AA','hopf':'\uD835\uDD59','Hopf':'\u210D','horbar':'\u2015','HorizontalLine':'\u2500','hscr':'\uD835\uDCBD','Hscr':'\u210B','hslash':'\u210F','hstrok':'\u0127','Hstrok':'\u0126','HumpDownHump':'\u224E','HumpEqual':'\u224F','hybull':'\u2043','hyphen':'\u2010','iacute':'\xED','Iacute':'\xCD','ic':'\u2063','icirc':'\xEE','Icirc':'\xCE','icy':'\u0438','Icy':'\u0418','Idot':'\u0130','iecy':'\u0435','IEcy':'\u0415','iexcl':'\xA1','iff':'\u21D4','ifr':'\uD835\uDD26','Ifr':'\u2111','igrave':'\xEC','Igrave':'\xCC','ii':'\u2148','iiiint':'\u2A0C','iiint':'\u222D','iinfin':'\u29DC','iiota':'\u2129','ijlig':'\u0133','IJlig':'\u0132','Im':'\u2111','imacr':'\u012B','Imacr':'\u012A','image':'\u2111','ImaginaryI':'\u2148','imagline':'\u2110','imagpart':'\u2111','imath':'\u0131','imof':'\u22B7','imped':'\u01B5','Implies':'\u21D2','in':'\u2208','incare':'\u2105','infin':'\u221E','infintie':'\u29DD','inodot':'\u0131','int':'\u222B','Int':'\u222C','intcal':'\u22BA','integers':'\u2124','Integral':'\u222B','intercal':'\u22BA','Intersection':'\u22C2','intlarhk':'\u2A17','intprod':'\u2A3C','InvisibleComma':'\u2063','InvisibleTimes':'\u2062','iocy':'\u0451','IOcy':'\u0401','iogon':'\u012F','Iogon':'\u012E','iopf':'\uD835\uDD5A','Iopf':'\uD835\uDD40','iota':'\u03B9','Iota':'\u0399','iprod':'\u2A3C','iquest':'\xBF','iscr':'\uD835\uDCBE','Iscr':'\u2110','isin':'\u2208','isindot':'\u22F5','isinE':'\u22F9','isins':'\u22F4','isinsv':'\u22F3','isinv':'\u2208','it':'\u2062','itilde':'\u0129','Itilde':'\u0128','iukcy':'\u0456','Iukcy':'\u0406','iuml':'\xEF','Iuml':'\xCF','jcirc':'\u0135','Jcirc':'\u0134','jcy':'\u0439','Jcy':'\u0419','jfr':'\uD835\uDD27','Jfr':'\uD835\uDD0D','jmath':'\u0237','jopf':'\uD835\uDD5B','Jopf':'\uD835\uDD41','jscr':'\uD835\uDCBF','Jscr':'\uD835\uDCA5','jsercy':'\u0458','Jsercy':'\u0408','jukcy':'\u0454','Jukcy':'\u0404','kappa':'\u03BA','Kappa':'\u039A','kappav':'\u03F0','kcedil':'\u0137','Kcedil':'\u0136','kcy':'\u043A','Kcy':'\u041A','kfr':'\uD835\uDD28','Kfr':'\uD835\uDD0E','kgreen':'\u0138','khcy':'\u0445','KHcy':'\u0425','kjcy':'\u045C','KJcy':'\u040C','kopf':'\uD835\uDD5C','Kopf':'\uD835\uDD42','kscr':'\uD835\uDCC0','Kscr':'\uD835\uDCA6','lAarr':'\u21DA','lacute':'\u013A','Lacute':'\u0139','laemptyv':'\u29B4','lagran':'\u2112','lambda':'\u03BB','Lambda':'\u039B','lang':'\u27E8','Lang':'\u27EA','langd':'\u2991','langle':'\u27E8','lap':'\u2A85','Laplacetrf':'\u2112','laquo':'\xAB','larr':'\u2190','lArr':'\u21D0','Larr':'\u219E','larrb':'\u21E4','larrbfs':'\u291F','larrfs':'\u291D','larrhk':'\u21A9','larrlp':'\u21AB','larrpl':'\u2939','larrsim':'\u2973','larrtl':'\u21A2','lat':'\u2AAB','latail':'\u2919','lAtail':'\u291B','late':'\u2AAD','lates':'\u2AAD\uFE00','lbarr':'\u290C','lBarr':'\u290E','lbbrk':'\u2772','lbrace':'{','lbrack':'[','lbrke':'\u298B','lbrksld':'\u298F','lbrkslu':'\u298D','lcaron':'\u013E','Lcaron':'\u013D','lcedil':'\u013C','Lcedil':'\u013B','lceil':'\u2308','lcub':'{','lcy':'\u043B','Lcy':'\u041B','ldca':'\u2936','ldquo':'\u201C','ldquor':'\u201E','ldrdhar':'\u2967','ldrushar':'\u294B','ldsh':'\u21B2','le':'\u2264','lE':'\u2266','LeftAngleBracket':'\u27E8','leftarrow':'\u2190','Leftarrow':'\u21D0','LeftArrow':'\u2190','LeftArrowBar':'\u21E4','LeftArrowRightArrow':'\u21C6','leftarrowtail':'\u21A2','LeftCeiling':'\u2308','LeftDoubleBracket':'\u27E6','LeftDownTeeVector':'\u2961','LeftDownVector':'\u21C3','LeftDownVectorBar':'\u2959','LeftFloor':'\u230A','leftharpoondown':'\u21BD','leftharpoonup':'\u21BC','leftleftarrows':'\u21C7','leftrightarrow':'\u2194','Leftrightarrow':'\u21D4','LeftRightArrow':'\u2194','leftrightarrows':'\u21C6','leftrightharpoons':'\u21CB','leftrightsquigarrow':'\u21AD','LeftRightVector':'\u294E','LeftTee':'\u22A3','LeftTeeArrow':'\u21A4','LeftTeeVector':'\u295A','leftthreetimes':'\u22CB','LeftTriangle':'\u22B2','LeftTriangleBar':'\u29CF','LeftTriangleEqual':'\u22B4','LeftUpDownVector':'\u2951','LeftUpTeeVector':'\u2960','LeftUpVector':'\u21BF','LeftUpVectorBar':'\u2958','LeftVector':'\u21BC','LeftVectorBar':'\u2952','leg':'\u22DA','lEg':'\u2A8B','leq':'\u2264','leqq':'\u2266','leqslant':'\u2A7D','les':'\u2A7D','lescc':'\u2AA8','lesdot':'\u2A7F','lesdoto':'\u2A81','lesdotor':'\u2A83','lesg':'\u22DA\uFE00','lesges':'\u2A93','lessapprox':'\u2A85','lessdot':'\u22D6','lesseqgtr':'\u22DA','lesseqqgtr':'\u2A8B','LessEqualGreater':'\u22DA','LessFullEqual':'\u2266','LessGreater':'\u2276','lessgtr':'\u2276','LessLess':'\u2AA1','lesssim':'\u2272','LessSlantEqual':'\u2A7D','LessTilde':'\u2272','lfisht':'\u297C','lfloor':'\u230A','lfr':'\uD835\uDD29','Lfr':'\uD835\uDD0F','lg':'\u2276','lgE':'\u2A91','lHar':'\u2962','lhard':'\u21BD','lharu':'\u21BC','lharul':'\u296A','lhblk':'\u2584','ljcy':'\u0459','LJcy':'\u0409','ll':'\u226A','Ll':'\u22D8','llarr':'\u21C7','llcorner':'\u231E','Lleftarrow':'\u21DA','llhard':'\u296B','lltri':'\u25FA','lmidot':'\u0140','Lmidot':'\u013F','lmoust':'\u23B0','lmoustache':'\u23B0','lnap':'\u2A89','lnapprox':'\u2A89','lne':'\u2A87','lnE':'\u2268','lneq':'\u2A87','lneqq':'\u2268','lnsim':'\u22E6','loang':'\u27EC','loarr':'\u21FD','lobrk':'\u27E6','longleftarrow':'\u27F5','Longleftarrow':'\u27F8','LongLeftArrow':'\u27F5','longleftrightarrow':'\u27F7','Longleftrightarrow':'\u27FA','LongLeftRightArrow':'\u27F7','longmapsto':'\u27FC','longrightarrow':'\u27F6','Longrightarrow':'\u27F9','LongRightArrow':'\u27F6','looparrowleft':'\u21AB','looparrowright':'\u21AC','lopar':'\u2985','lopf':'\uD835\uDD5D','Lopf':'\uD835\uDD43','loplus':'\u2A2D','lotimes':'\u2A34','lowast':'\u2217','lowbar':'_','LowerLeftArrow':'\u2199','LowerRightArrow':'\u2198','loz':'\u25CA','lozenge':'\u25CA','lozf':'\u29EB','lpar':'(','lparlt':'\u2993','lrarr':'\u21C6','lrcorner':'\u231F','lrhar':'\u21CB','lrhard':'\u296D','lrm':'\u200E','lrtri':'\u22BF','lsaquo':'\u2039','lscr':'\uD835\uDCC1','Lscr':'\u2112','lsh':'\u21B0','Lsh':'\u21B0','lsim':'\u2272','lsime':'\u2A8D','lsimg':'\u2A8F','lsqb':'[','lsquo':'\u2018','lsquor':'\u201A','lstrok':'\u0142','Lstrok':'\u0141','lt':'<','Lt':'\u226A','LT':'<','ltcc':'\u2AA6','ltcir':'\u2A79','ltdot':'\u22D6','lthree':'\u22CB','ltimes':'\u22C9','ltlarr':'\u2976','ltquest':'\u2A7B','ltri':'\u25C3','ltrie':'\u22B4','ltrif':'\u25C2','ltrPar':'\u2996','lurdshar':'\u294A','luruhar':'\u2966','lvertneqq':'\u2268\uFE00','lvnE':'\u2268\uFE00','macr':'\xAF','male':'\u2642','malt':'\u2720','maltese':'\u2720','map':'\u21A6','Map':'\u2905','mapsto':'\u21A6','mapstodown':'\u21A7','mapstoleft':'\u21A4','mapstoup':'\u21A5','marker':'\u25AE','mcomma':'\u2A29','mcy':'\u043C','Mcy':'\u041C','mdash':'\u2014','mDDot':'\u223A','measuredangle':'\u2221','MediumSpace':'\u205F','Mellintrf':'\u2133','mfr':'\uD835\uDD2A','Mfr':'\uD835\uDD10','mho':'\u2127','micro':'\xB5','mid':'\u2223','midast':'*','midcir':'\u2AF0','middot':'\xB7','minus':'\u2212','minusb':'\u229F','minusd':'\u2238','minusdu':'\u2A2A','MinusPlus':'\u2213','mlcp':'\u2ADB','mldr':'\u2026','mnplus':'\u2213','models':'\u22A7','mopf':'\uD835\uDD5E','Mopf':'\uD835\uDD44','mp':'\u2213','mscr':'\uD835\uDCC2','Mscr':'\u2133','mstpos':'\u223E','mu':'\u03BC','Mu':'\u039C','multimap':'\u22B8','mumap':'\u22B8','nabla':'\u2207','nacute':'\u0144','Nacute':'\u0143','nang':'\u2220\u20D2','nap':'\u2249','napE':'\u2A70\u0338','napid':'\u224B\u0338','napos':'\u0149','napprox':'\u2249','natur':'\u266E','natural':'\u266E','naturals':'\u2115','nbsp':'\xA0','nbump':'\u224E\u0338','nbumpe':'\u224F\u0338','ncap':'\u2A43','ncaron':'\u0148','Ncaron':'\u0147','ncedil':'\u0146','Ncedil':'\u0145','ncong':'\u2247','ncongdot':'\u2A6D\u0338','ncup':'\u2A42','ncy':'\u043D','Ncy':'\u041D','ndash':'\u2013','ne':'\u2260','nearhk':'\u2924','nearr':'\u2197','neArr':'\u21D7','nearrow':'\u2197','nedot':'\u2250\u0338','NegativeMediumSpace':'\u200B','NegativeThickSpace':'\u200B','NegativeThinSpace':'\u200B','NegativeVeryThinSpace':'\u200B','nequiv':'\u2262','nesear':'\u2928','nesim':'\u2242\u0338','NestedGreaterGreater':'\u226B','NestedLessLess':'\u226A','NewLine':'\n','nexist':'\u2204','nexists':'\u2204','nfr':'\uD835\uDD2B','Nfr':'\uD835\uDD11','nge':'\u2271','ngE':'\u2267\u0338','ngeq':'\u2271','ngeqq':'\u2267\u0338','ngeqslant':'\u2A7E\u0338','nges':'\u2A7E\u0338','nGg':'\u22D9\u0338','ngsim':'\u2275','ngt':'\u226F','nGt':'\u226B\u20D2','ngtr':'\u226F','nGtv':'\u226B\u0338','nharr':'\u21AE','nhArr':'\u21CE','nhpar':'\u2AF2','ni':'\u220B','nis':'\u22FC','nisd':'\u22FA','niv':'\u220B','njcy':'\u045A','NJcy':'\u040A','nlarr':'\u219A','nlArr':'\u21CD','nldr':'\u2025','nle':'\u2270','nlE':'\u2266\u0338','nleftarrow':'\u219A','nLeftarrow':'\u21CD','nleftrightarrow':'\u21AE','nLeftrightarrow':'\u21CE','nleq':'\u2270','nleqq':'\u2266\u0338','nleqslant':'\u2A7D\u0338','nles':'\u2A7D\u0338','nless':'\u226E','nLl':'\u22D8\u0338','nlsim':'\u2274','nlt':'\u226E','nLt':'\u226A\u20D2','nltri':'\u22EA','nltrie':'\u22EC','nLtv':'\u226A\u0338','nmid':'\u2224','NoBreak':'\u2060','NonBreakingSpace':'\xA0','nopf':'\uD835\uDD5F','Nopf':'\u2115','not':'\xAC','Not':'\u2AEC','NotCongruent':'\u2262','NotCupCap':'\u226D','NotDoubleVerticalBar':'\u2226','NotElement':'\u2209','NotEqual':'\u2260','NotEqualTilde':'\u2242\u0338','NotExists':'\u2204','NotGreater':'\u226F','NotGreaterEqual':'\u2271','NotGreaterFullEqual':'\u2267\u0338','NotGreaterGreater':'\u226B\u0338','NotGreaterLess':'\u2279','NotGreaterSlantEqual':'\u2A7E\u0338','NotGreaterTilde':'\u2275','NotHumpDownHump':'\u224E\u0338','NotHumpEqual':'\u224F\u0338','notin':'\u2209','notindot':'\u22F5\u0338','notinE':'\u22F9\u0338','notinva':'\u2209','notinvb':'\u22F7','notinvc':'\u22F6','NotLeftTriangle':'\u22EA','NotLeftTriangleBar':'\u29CF\u0338','NotLeftTriangleEqual':'\u22EC','NotLess':'\u226E','NotLessEqual':'\u2270','NotLessGreater':'\u2278','NotLessLess':'\u226A\u0338','NotLessSlantEqual':'\u2A7D\u0338','NotLessTilde':'\u2274','NotNestedGreaterGreater':'\u2AA2\u0338','NotNestedLessLess':'\u2AA1\u0338','notni':'\u220C','notniva':'\u220C','notnivb':'\u22FE','notnivc':'\u22FD','NotPrecedes':'\u2280','NotPrecedesEqual':'\u2AAF\u0338','NotPrecedesSlantEqual':'\u22E0','NotReverseElement':'\u220C','NotRightTriangle':'\u22EB','NotRightTriangleBar':'\u29D0\u0338','NotRightTriangleEqual':'\u22ED','NotSquareSubset':'\u228F\u0338','NotSquareSubsetEqual':'\u22E2','NotSquareSuperset':'\u2290\u0338','NotSquareSupersetEqual':'\u22E3','NotSubset':'\u2282\u20D2','NotSubsetEqual':'\u2288','NotSucceeds':'\u2281','NotSucceedsEqual':'\u2AB0\u0338','NotSucceedsSlantEqual':'\u22E1','NotSucceedsTilde':'\u227F\u0338','NotSuperset':'\u2283\u20D2','NotSupersetEqual':'\u2289','NotTilde':'\u2241','NotTildeEqual':'\u2244','NotTildeFullEqual':'\u2247','NotTildeTilde':'\u2249','NotVerticalBar':'\u2224','npar':'\u2226','nparallel':'\u2226','nparsl':'\u2AFD\u20E5','npart':'\u2202\u0338','npolint':'\u2A14','npr':'\u2280','nprcue':'\u22E0','npre':'\u2AAF\u0338','nprec':'\u2280','npreceq':'\u2AAF\u0338','nrarr':'\u219B','nrArr':'\u21CF','nrarrc':'\u2933\u0338','nrarrw':'\u219D\u0338','nrightarrow':'\u219B','nRightarrow':'\u21CF','nrtri':'\u22EB','nrtrie':'\u22ED','nsc':'\u2281','nsccue':'\u22E1','nsce':'\u2AB0\u0338','nscr':'\uD835\uDCC3','Nscr':'\uD835\uDCA9','nshortmid':'\u2224','nshortparallel':'\u2226','nsim':'\u2241','nsime':'\u2244','nsimeq':'\u2244','nsmid':'\u2224','nspar':'\u2226','nsqsube':'\u22E2','nsqsupe':'\u22E3','nsub':'\u2284','nsube':'\u2288','nsubE':'\u2AC5\u0338','nsubset':'\u2282\u20D2','nsubseteq':'\u2288','nsubseteqq':'\u2AC5\u0338','nsucc':'\u2281','nsucceq':'\u2AB0\u0338','nsup':'\u2285','nsupe':'\u2289','nsupE':'\u2AC6\u0338','nsupset':'\u2283\u20D2','nsupseteq':'\u2289','nsupseteqq':'\u2AC6\u0338','ntgl':'\u2279','ntilde':'\xF1','Ntilde':'\xD1','ntlg':'\u2278','ntriangleleft':'\u22EA','ntrianglelefteq':'\u22EC','ntriangleright':'\u22EB','ntrianglerighteq':'\u22ED','nu':'\u03BD','Nu':'\u039D','num':'#','numero':'\u2116','numsp':'\u2007','nvap':'\u224D\u20D2','nvdash':'\u22AC','nvDash':'\u22AD','nVdash':'\u22AE','nVDash':'\u22AF','nvge':'\u2265\u20D2','nvgt':'>\u20D2','nvHarr':'\u2904','nvinfin':'\u29DE','nvlArr':'\u2902','nvle':'\u2264\u20D2','nvlt':'<\u20D2','nvltrie':'\u22B4\u20D2','nvrArr':'\u2903','nvrtrie':'\u22B5\u20D2','nvsim':'\u223C\u20D2','nwarhk':'\u2923','nwarr':'\u2196','nwArr':'\u21D6','nwarrow':'\u2196','nwnear':'\u2927','oacute':'\xF3','Oacute':'\xD3','oast':'\u229B','ocir':'\u229A','ocirc':'\xF4','Ocirc':'\xD4','ocy':'\u043E','Ocy':'\u041E','odash':'\u229D','odblac':'\u0151','Odblac':'\u0150','odiv':'\u2A38','odot':'\u2299','odsold':'\u29BC','oelig':'\u0153','OElig':'\u0152','ofcir':'\u29BF','ofr':'\uD835\uDD2C','Ofr':'\uD835\uDD12','ogon':'\u02DB','ograve':'\xF2','Ograve':'\xD2','ogt':'\u29C1','ohbar':'\u29B5','ohm':'\u03A9','oint':'\u222E','olarr':'\u21BA','olcir':'\u29BE','olcross':'\u29BB','oline':'\u203E','olt':'\u29C0','omacr':'\u014D','Omacr':'\u014C','omega':'\u03C9','Omega':'\u03A9','omicron':'\u03BF','Omicron':'\u039F','omid':'\u29B6','ominus':'\u2296','oopf':'\uD835\uDD60','Oopf':'\uD835\uDD46','opar':'\u29B7','OpenCurlyDoubleQuote':'\u201C','OpenCurlyQuote':'\u2018','operp':'\u29B9','oplus':'\u2295','or':'\u2228','Or':'\u2A54','orarr':'\u21BB','ord':'\u2A5D','order':'\u2134','orderof':'\u2134','ordf':'\xAA','ordm':'\xBA','origof':'\u22B6','oror':'\u2A56','orslope':'\u2A57','orv':'\u2A5B','oS':'\u24C8','oscr':'\u2134','Oscr':'\uD835\uDCAA','oslash':'\xF8','Oslash':'\xD8','osol':'\u2298','otilde':'\xF5','Otilde':'\xD5','otimes':'\u2297','Otimes':'\u2A37','otimesas':'\u2A36','ouml':'\xF6','Ouml':'\xD6','ovbar':'\u233D','OverBar':'\u203E','OverBrace':'\u23DE','OverBracket':'\u23B4','OverParenthesis':'\u23DC','par':'\u2225','para':'\xB6','parallel':'\u2225','parsim':'\u2AF3','parsl':'\u2AFD','part':'\u2202','PartialD':'\u2202','pcy':'\u043F','Pcy':'\u041F','percnt':'%','period':'.','permil':'\u2030','perp':'\u22A5','pertenk':'\u2031','pfr':'\uD835\uDD2D','Pfr':'\uD835\uDD13','phi':'\u03C6','Phi':'\u03A6','phiv':'\u03D5','phmmat':'\u2133','phone':'\u260E','pi':'\u03C0','Pi':'\u03A0','pitchfork':'\u22D4','piv':'\u03D6','planck':'\u210F','planckh':'\u210E','plankv':'\u210F','plus':'+','plusacir':'\u2A23','plusb':'\u229E','pluscir':'\u2A22','plusdo':'\u2214','plusdu':'\u2A25','pluse':'\u2A72','PlusMinus':'\xB1','plusmn':'\xB1','plussim':'\u2A26','plustwo':'\u2A27','pm':'\xB1','Poincareplane':'\u210C','pointint':'\u2A15','popf':'\uD835\uDD61','Popf':'\u2119','pound':'\xA3','pr':'\u227A','Pr':'\u2ABB','prap':'\u2AB7','prcue':'\u227C','pre':'\u2AAF','prE':'\u2AB3','prec':'\u227A','precapprox':'\u2AB7','preccurlyeq':'\u227C','Precedes':'\u227A','PrecedesEqual':'\u2AAF','PrecedesSlantEqual':'\u227C','PrecedesTilde':'\u227E','preceq':'\u2AAF','precnapprox':'\u2AB9','precneqq':'\u2AB5','precnsim':'\u22E8','precsim':'\u227E','prime':'\u2032','Prime':'\u2033','primes':'\u2119','prnap':'\u2AB9','prnE':'\u2AB5','prnsim':'\u22E8','prod':'\u220F','Product':'\u220F','profalar':'\u232E','profline':'\u2312','profsurf':'\u2313','prop':'\u221D','Proportion':'\u2237','Proportional':'\u221D','propto':'\u221D','prsim':'\u227E','prurel':'\u22B0','pscr':'\uD835\uDCC5','Pscr':'\uD835\uDCAB','psi':'\u03C8','Psi':'\u03A8','puncsp':'\u2008','qfr':'\uD835\uDD2E','Qfr':'\uD835\uDD14','qint':'\u2A0C','qopf':'\uD835\uDD62','Qopf':'\u211A','qprime':'\u2057','qscr':'\uD835\uDCC6','Qscr':'\uD835\uDCAC','quaternions':'\u210D','quatint':'\u2A16','quest':'?','questeq':'\u225F','quot':'"','QUOT':'"','rAarr':'\u21DB','race':'\u223D\u0331','racute':'\u0155','Racute':'\u0154','radic':'\u221A','raemptyv':'\u29B3','rang':'\u27E9','Rang':'\u27EB','rangd':'\u2992','range':'\u29A5','rangle':'\u27E9','raquo':'\xBB','rarr':'\u2192','rArr':'\u21D2','Rarr':'\u21A0','rarrap':'\u2975','rarrb':'\u21E5','rarrbfs':'\u2920','rarrc':'\u2933','rarrfs':'\u291E','rarrhk':'\u21AA','rarrlp':'\u21AC','rarrpl':'\u2945','rarrsim':'\u2974','rarrtl':'\u21A3','Rarrtl':'\u2916','rarrw':'\u219D','ratail':'\u291A','rAtail':'\u291C','ratio':'\u2236','rationals':'\u211A','rbarr':'\u290D','rBarr':'\u290F','RBarr':'\u2910','rbbrk':'\u2773','rbrace':'}','rbrack':']','rbrke':'\u298C','rbrksld':'\u298E','rbrkslu':'\u2990','rcaron':'\u0159','Rcaron':'\u0158','rcedil':'\u0157','Rcedil':'\u0156','rceil':'\u2309','rcub':'}','rcy':'\u0440','Rcy':'\u0420','rdca':'\u2937','rdldhar':'\u2969','rdquo':'\u201D','rdquor':'\u201D','rdsh':'\u21B3','Re':'\u211C','real':'\u211C','realine':'\u211B','realpart':'\u211C','reals':'\u211D','rect':'\u25AD','reg':'\xAE','REG':'\xAE','ReverseElement':'\u220B','ReverseEquilibrium':'\u21CB','ReverseUpEquilibrium':'\u296F','rfisht':'\u297D','rfloor':'\u230B','rfr':'\uD835\uDD2F','Rfr':'\u211C','rHar':'\u2964','rhard':'\u21C1','rharu':'\u21C0','rharul':'\u296C','rho':'\u03C1','Rho':'\u03A1','rhov':'\u03F1','RightAngleBracket':'\u27E9','rightarrow':'\u2192','Rightarrow':'\u21D2','RightArrow':'\u2192','RightArrowBar':'\u21E5','RightArrowLeftArrow':'\u21C4','rightarrowtail':'\u21A3','RightCeiling':'\u2309','RightDoubleBracket':'\u27E7','RightDownTeeVector':'\u295D','RightDownVector':'\u21C2','RightDownVectorBar':'\u2955','RightFloor':'\u230B','rightharpoondown':'\u21C1','rightharpoonup':'\u21C0','rightleftarrows':'\u21C4','rightleftharpoons':'\u21CC','rightrightarrows':'\u21C9','rightsquigarrow':'\u219D','RightTee':'\u22A2','RightTeeArrow':'\u21A6','RightTeeVector':'\u295B','rightthreetimes':'\u22CC','RightTriangle':'\u22B3','RightTriangleBar':'\u29D0','RightTriangleEqual':'\u22B5','RightUpDownVector':'\u294F','RightUpTeeVector':'\u295C','RightUpVector':'\u21BE','RightUpVectorBar':'\u2954','RightVector':'\u21C0','RightVectorBar':'\u2953','ring':'\u02DA','risingdotseq':'\u2253','rlarr':'\u21C4','rlhar':'\u21CC','rlm':'\u200F','rmoust':'\u23B1','rmoustache':'\u23B1','rnmid':'\u2AEE','roang':'\u27ED','roarr':'\u21FE','robrk':'\u27E7','ropar':'\u2986','ropf':'\uD835\uDD63','Ropf':'\u211D','roplus':'\u2A2E','rotimes':'\u2A35','RoundImplies':'\u2970','rpar':')','rpargt':'\u2994','rppolint':'\u2A12','rrarr':'\u21C9','Rrightarrow':'\u21DB','rsaquo':'\u203A','rscr':'\uD835\uDCC7','Rscr':'\u211B','rsh':'\u21B1','Rsh':'\u21B1','rsqb':']','rsquo':'\u2019','rsquor':'\u2019','rthree':'\u22CC','rtimes':'\u22CA','rtri':'\u25B9','rtrie':'\u22B5','rtrif':'\u25B8','rtriltri':'\u29CE','RuleDelayed':'\u29F4','ruluhar':'\u2968','rx':'\u211E','sacute':'\u015B','Sacute':'\u015A','sbquo':'\u201A','sc':'\u227B','Sc':'\u2ABC','scap':'\u2AB8','scaron':'\u0161','Scaron':'\u0160','sccue':'\u227D','sce':'\u2AB0','scE':'\u2AB4','scedil':'\u015F','Scedil':'\u015E','scirc':'\u015D','Scirc':'\u015C','scnap':'\u2ABA','scnE':'\u2AB6','scnsim':'\u22E9','scpolint':'\u2A13','scsim':'\u227F','scy':'\u0441','Scy':'\u0421','sdot':'\u22C5','sdotb':'\u22A1','sdote':'\u2A66','searhk':'\u2925','searr':'\u2198','seArr':'\u21D8','searrow':'\u2198','sect':'\xA7','semi':';','seswar':'\u2929','setminus':'\u2216','setmn':'\u2216','sext':'\u2736','sfr':'\uD835\uDD30','Sfr':'\uD835\uDD16','sfrown':'\u2322','sharp':'\u266F','shchcy':'\u0449','SHCHcy':'\u0429','shcy':'\u0448','SHcy':'\u0428','ShortDownArrow':'\u2193','ShortLeftArrow':'\u2190','shortmid':'\u2223','shortparallel':'\u2225','ShortRightArrow':'\u2192','ShortUpArrow':'\u2191','shy':'\xAD','sigma':'\u03C3','Sigma':'\u03A3','sigmaf':'\u03C2','sigmav':'\u03C2','sim':'\u223C','simdot':'\u2A6A','sime':'\u2243','simeq':'\u2243','simg':'\u2A9E','simgE':'\u2AA0','siml':'\u2A9D','simlE':'\u2A9F','simne':'\u2246','simplus':'\u2A24','simrarr':'\u2972','slarr':'\u2190','SmallCircle':'\u2218','smallsetminus':'\u2216','smashp':'\u2A33','smeparsl':'\u29E4','smid':'\u2223','smile':'\u2323','smt':'\u2AAA','smte':'\u2AAC','smtes':'\u2AAC\uFE00','softcy':'\u044C','SOFTcy':'\u042C','sol':'/','solb':'\u29C4','solbar':'\u233F','sopf':'\uD835\uDD64','Sopf':'\uD835\uDD4A','spades':'\u2660','spadesuit':'\u2660','spar':'\u2225','sqcap':'\u2293','sqcaps':'\u2293\uFE00','sqcup':'\u2294','sqcups':'\u2294\uFE00','Sqrt':'\u221A','sqsub':'\u228F','sqsube':'\u2291','sqsubset':'\u228F','sqsubseteq':'\u2291','sqsup':'\u2290','sqsupe':'\u2292','sqsupset':'\u2290','sqsupseteq':'\u2292','squ':'\u25A1','square':'\u25A1','Square':'\u25A1','SquareIntersection':'\u2293','SquareSubset':'\u228F','SquareSubsetEqual':'\u2291','SquareSuperset':'\u2290','SquareSupersetEqual':'\u2292','SquareUnion':'\u2294','squarf':'\u25AA','squf':'\u25AA','srarr':'\u2192','sscr':'\uD835\uDCC8','Sscr':'\uD835\uDCAE','ssetmn':'\u2216','ssmile':'\u2323','sstarf':'\u22C6','star':'\u2606','Star':'\u22C6','starf':'\u2605','straightepsilon':'\u03F5','straightphi':'\u03D5','strns':'\xAF','sub':'\u2282','Sub':'\u22D0','subdot':'\u2ABD','sube':'\u2286','subE':'\u2AC5','subedot':'\u2AC3','submult':'\u2AC1','subne':'\u228A','subnE':'\u2ACB','subplus':'\u2ABF','subrarr':'\u2979','subset':'\u2282','Subset':'\u22D0','subseteq':'\u2286','subseteqq':'\u2AC5','SubsetEqual':'\u2286','subsetneq':'\u228A','subsetneqq':'\u2ACB','subsim':'\u2AC7','subsub':'\u2AD5','subsup':'\u2AD3','succ':'\u227B','succapprox':'\u2AB8','succcurlyeq':'\u227D','Succeeds':'\u227B','SucceedsEqual':'\u2AB0','SucceedsSlantEqual':'\u227D','SucceedsTilde':'\u227F','succeq':'\u2AB0','succnapprox':'\u2ABA','succneqq':'\u2AB6','succnsim':'\u22E9','succsim':'\u227F','SuchThat':'\u220B','sum':'\u2211','Sum':'\u2211','sung':'\u266A','sup':'\u2283','Sup':'\u22D1','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','supdot':'\u2ABE','supdsub':'\u2AD8','supe':'\u2287','supE':'\u2AC6','supedot':'\u2AC4','Superset':'\u2283','SupersetEqual':'\u2287','suphsol':'\u27C9','suphsub':'\u2AD7','suplarr':'\u297B','supmult':'\u2AC2','supne':'\u228B','supnE':'\u2ACC','supplus':'\u2AC0','supset':'\u2283','Supset':'\u22D1','supseteq':'\u2287','supseteqq':'\u2AC6','supsetneq':'\u228B','supsetneqq':'\u2ACC','supsim':'\u2AC8','supsub':'\u2AD4','supsup':'\u2AD6','swarhk':'\u2926','swarr':'\u2199','swArr':'\u21D9','swarrow':'\u2199','swnwar':'\u292A','szlig':'\xDF','Tab':'\t','target':'\u2316','tau':'\u03C4','Tau':'\u03A4','tbrk':'\u23B4','tcaron':'\u0165','Tcaron':'\u0164','tcedil':'\u0163','Tcedil':'\u0162','tcy':'\u0442','Tcy':'\u0422','tdot':'\u20DB','telrec':'\u2315','tfr':'\uD835\uDD31','Tfr':'\uD835\uDD17','there4':'\u2234','therefore':'\u2234','Therefore':'\u2234','theta':'\u03B8','Theta':'\u0398','thetasym':'\u03D1','thetav':'\u03D1','thickapprox':'\u2248','thicksim':'\u223C','ThickSpace':'\u205F\u200A','thinsp':'\u2009','ThinSpace':'\u2009','thkap':'\u2248','thksim':'\u223C','thorn':'\xFE','THORN':'\xDE','tilde':'\u02DC','Tilde':'\u223C','TildeEqual':'\u2243','TildeFullEqual':'\u2245','TildeTilde':'\u2248','times':'\xD7','timesb':'\u22A0','timesbar':'\u2A31','timesd':'\u2A30','tint':'\u222D','toea':'\u2928','top':'\u22A4','topbot':'\u2336','topcir':'\u2AF1','topf':'\uD835\uDD65','Topf':'\uD835\uDD4B','topfork':'\u2ADA','tosa':'\u2929','tprime':'\u2034','trade':'\u2122','TRADE':'\u2122','triangle':'\u25B5','triangledown':'\u25BF','triangleleft':'\u25C3','trianglelefteq':'\u22B4','triangleq':'\u225C','triangleright':'\u25B9','trianglerighteq':'\u22B5','tridot':'\u25EC','trie':'\u225C','triminus':'\u2A3A','TripleDot':'\u20DB','triplus':'\u2A39','trisb':'\u29CD','tritime':'\u2A3B','trpezium':'\u23E2','tscr':'\uD835\uDCC9','Tscr':'\uD835\uDCAF','tscy':'\u0446','TScy':'\u0426','tshcy':'\u045B','TSHcy':'\u040B','tstrok':'\u0167','Tstrok':'\u0166','twixt':'\u226C','twoheadleftarrow':'\u219E','twoheadrightarrow':'\u21A0','uacute':'\xFA','Uacute':'\xDA','uarr':'\u2191','uArr':'\u21D1','Uarr':'\u219F','Uarrocir':'\u2949','ubrcy':'\u045E','Ubrcy':'\u040E','ubreve':'\u016D','Ubreve':'\u016C','ucirc':'\xFB','Ucirc':'\xDB','ucy':'\u0443','Ucy':'\u0423','udarr':'\u21C5','udblac':'\u0171','Udblac':'\u0170','udhar':'\u296E','ufisht':'\u297E','ufr':'\uD835\uDD32','Ufr':'\uD835\uDD18','ugrave':'\xF9','Ugrave':'\xD9','uHar':'\u2963','uharl':'\u21BF','uharr':'\u21BE','uhblk':'\u2580','ulcorn':'\u231C','ulcorner':'\u231C','ulcrop':'\u230F','ultri':'\u25F8','umacr':'\u016B','Umacr':'\u016A','uml':'\xA8','UnderBar':'_','UnderBrace':'\u23DF','UnderBracket':'\u23B5','UnderParenthesis':'\u23DD','Union':'\u22C3','UnionPlus':'\u228E','uogon':'\u0173','Uogon':'\u0172','uopf':'\uD835\uDD66','Uopf':'\uD835\uDD4C','uparrow':'\u2191','Uparrow':'\u21D1','UpArrow':'\u2191','UpArrowBar':'\u2912','UpArrowDownArrow':'\u21C5','updownarrow':'\u2195','Updownarrow':'\u21D5','UpDownArrow':'\u2195','UpEquilibrium':'\u296E','upharpoonleft':'\u21BF','upharpoonright':'\u21BE','uplus':'\u228E','UpperLeftArrow':'\u2196','UpperRightArrow':'\u2197','upsi':'\u03C5','Upsi':'\u03D2','upsih':'\u03D2','upsilon':'\u03C5','Upsilon':'\u03A5','UpTee':'\u22A5','UpTeeArrow':'\u21A5','upuparrows':'\u21C8','urcorn':'\u231D','urcorner':'\u231D','urcrop':'\u230E','uring':'\u016F','Uring':'\u016E','urtri':'\u25F9','uscr':'\uD835\uDCCA','Uscr':'\uD835\uDCB0','utdot':'\u22F0','utilde':'\u0169','Utilde':'\u0168','utri':'\u25B5','utrif':'\u25B4','uuarr':'\u21C8','uuml':'\xFC','Uuml':'\xDC','uwangle':'\u29A7','vangrt':'\u299C','varepsilon':'\u03F5','varkappa':'\u03F0','varnothing':'\u2205','varphi':'\u03D5','varpi':'\u03D6','varpropto':'\u221D','varr':'\u2195','vArr':'\u21D5','varrho':'\u03F1','varsigma':'\u03C2','varsubsetneq':'\u228A\uFE00','varsubsetneqq':'\u2ACB\uFE00','varsupsetneq':'\u228B\uFE00','varsupsetneqq':'\u2ACC\uFE00','vartheta':'\u03D1','vartriangleleft':'\u22B2','vartriangleright':'\u22B3','vBar':'\u2AE8','Vbar':'\u2AEB','vBarv':'\u2AE9','vcy':'\u0432','Vcy':'\u0412','vdash':'\u22A2','vDash':'\u22A8','Vdash':'\u22A9','VDash':'\u22AB','Vdashl':'\u2AE6','vee':'\u2228','Vee':'\u22C1','veebar':'\u22BB','veeeq':'\u225A','vellip':'\u22EE','verbar':'|','Verbar':'\u2016','vert':'|','Vert':'\u2016','VerticalBar':'\u2223','VerticalLine':'|','VerticalSeparator':'\u2758','VerticalTilde':'\u2240','VeryThinSpace':'\u200A','vfr':'\uD835\uDD33','Vfr':'\uD835\uDD19','vltri':'\u22B2','vnsub':'\u2282\u20D2','vnsup':'\u2283\u20D2','vopf':'\uD835\uDD67','Vopf':'\uD835\uDD4D','vprop':'\u221D','vrtri':'\u22B3','vscr':'\uD835\uDCCB','Vscr':'\uD835\uDCB1','vsubne':'\u228A\uFE00','vsubnE':'\u2ACB\uFE00','vsupne':'\u228B\uFE00','vsupnE':'\u2ACC\uFE00','Vvdash':'\u22AA','vzigzag':'\u299A','wcirc':'\u0175','Wcirc':'\u0174','wedbar':'\u2A5F','wedge':'\u2227','Wedge':'\u22C0','wedgeq':'\u2259','weierp':'\u2118','wfr':'\uD835\uDD34','Wfr':'\uD835\uDD1A','wopf':'\uD835\uDD68','Wopf':'\uD835\uDD4E','wp':'\u2118','wr':'\u2240','wreath':'\u2240','wscr':'\uD835\uDCCC','Wscr':'\uD835\uDCB2','xcap':'\u22C2','xcirc':'\u25EF','xcup':'\u22C3','xdtri':'\u25BD','xfr':'\uD835\uDD35','Xfr':'\uD835\uDD1B','xharr':'\u27F7','xhArr':'\u27FA','xi':'\u03BE','Xi':'\u039E','xlarr':'\u27F5','xlArr':'\u27F8','xmap':'\u27FC','xnis':'\u22FB','xodot':'\u2A00','xopf':'\uD835\uDD69','Xopf':'\uD835\uDD4F','xoplus':'\u2A01','xotime':'\u2A02','xrarr':'\u27F6','xrArr':'\u27F9','xscr':'\uD835\uDCCD','Xscr':'\uD835\uDCB3','xsqcup':'\u2A06','xuplus':'\u2A04','xutri':'\u25B3','xvee':'\u22C1','xwedge':'\u22C0','yacute':'\xFD','Yacute':'\xDD','yacy':'\u044F','YAcy':'\u042F','ycirc':'\u0177','Ycirc':'\u0176','ycy':'\u044B','Ycy':'\u042B','yen':'\xA5','yfr':'\uD835\uDD36','Yfr':'\uD835\uDD1C','yicy':'\u0457','YIcy':'\u0407','yopf':'\uD835\uDD6A','Yopf':'\uD835\uDD50','yscr':'\uD835\uDCCE','Yscr':'\uD835\uDCB4','yucy':'\u044E','YUcy':'\u042E','yuml':'\xFF','Yuml':'\u0178','zacute':'\u017A','Zacute':'\u0179','zcaron':'\u017E','Zcaron':'\u017D','zcy':'\u0437','Zcy':'\u0417','zdot':'\u017C','Zdot':'\u017B','zeetrf':'\u2128','ZeroWidthSpace':'\u200B','zeta':'\u03B6','Zeta':'\u0396','zfr':'\uD835\uDD37','Zfr':'\u2128','zhcy':'\u0436','ZHcy':'\u0416','zigrarr':'\u21DD','zopf':'\uD835\uDD6B','Zopf':'\u2124','zscr':'\uD835\uDCCF','Zscr':'\uD835\uDCB5','zwj':'\u200D','zwnj':'\u200C'}; - var decodeMapLegacy = {'aacute':'\xE1','Aacute':'\xC1','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','aelig':'\xE6','AElig':'\xC6','agrave':'\xE0','Agrave':'\xC0','amp':'&','AMP':'&','aring':'\xE5','Aring':'\xC5','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','brvbar':'\xA6','ccedil':'\xE7','Ccedil':'\xC7','cedil':'\xB8','cent':'\xA2','copy':'\xA9','COPY':'\xA9','curren':'\xA4','deg':'\xB0','divide':'\xF7','eacute':'\xE9','Eacute':'\xC9','ecirc':'\xEA','Ecirc':'\xCA','egrave':'\xE8','Egrave':'\xC8','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','frac12':'\xBD','frac14':'\xBC','frac34':'\xBE','gt':'>','GT':'>','iacute':'\xED','Iacute':'\xCD','icirc':'\xEE','Icirc':'\xCE','iexcl':'\xA1','igrave':'\xEC','Igrave':'\xCC','iquest':'\xBF','iuml':'\xEF','Iuml':'\xCF','laquo':'\xAB','lt':'<','LT':'<','macr':'\xAF','micro':'\xB5','middot':'\xB7','nbsp':'\xA0','not':'\xAC','ntilde':'\xF1','Ntilde':'\xD1','oacute':'\xF3','Oacute':'\xD3','ocirc':'\xF4','Ocirc':'\xD4','ograve':'\xF2','Ograve':'\xD2','ordf':'\xAA','ordm':'\xBA','oslash':'\xF8','Oslash':'\xD8','otilde':'\xF5','Otilde':'\xD5','ouml':'\xF6','Ouml':'\xD6','para':'\xB6','plusmn':'\xB1','pound':'\xA3','quot':'"','QUOT':'"','raquo':'\xBB','reg':'\xAE','REG':'\xAE','sect':'\xA7','shy':'\xAD','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','szlig':'\xDF','thorn':'\xFE','THORN':'\xDE','times':'\xD7','uacute':'\xFA','Uacute':'\xDA','ucirc':'\xFB','Ucirc':'\xDB','ugrave':'\xF9','Ugrave':'\xD9','uml':'\xA8','uuml':'\xFC','Uuml':'\xDC','yacute':'\xFD','Yacute':'\xDD','yen':'\xA5','yuml':'\xFF'}; - var decodeMapNumeric = {'0':'\uFFFD','128':'\u20AC','130':'\u201A','131':'\u0192','132':'\u201E','133':'\u2026','134':'\u2020','135':'\u2021','136':'\u02C6','137':'\u2030','138':'\u0160','139':'\u2039','140':'\u0152','142':'\u017D','145':'\u2018','146':'\u2019','147':'\u201C','148':'\u201D','149':'\u2022','150':'\u2013','151':'\u2014','152':'\u02DC','153':'\u2122','154':'\u0161','155':'\u203A','156':'\u0153','158':'\u017E','159':'\u0178'}; - var invalidReferenceCodePoints = [1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65000,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]; - - /*--------------------------------------------------------------------------*/ - - var stringFromCharCode = String.fromCharCode; - - var object = {}; - var hasOwnProperty = object.hasOwnProperty; - var has = function(object, propertyName) { - return hasOwnProperty.call(object, propertyName); - }; - - var contains = function(array, value) { - var index = -1; - var length = array.length; - while (++index < length) { - if (array[index] == value) { - return true; - } - } - return false; - }; - - var merge = function(options, defaults) { - if (!options) { - return defaults; - } - var result = {}; - var key; - for (key in defaults) { - // A `hasOwnProperty` check is not needed here, since only recognized - // option names are used anyway. Any others are ignored. - result[key] = has(options, key) ? options[key] : defaults[key]; - } - return result; - }; - - // Modified version of `ucs2encode`; see https://mths.be/punycode. - var codePointToSymbol = function(codePoint, strict) { - var output = ''; - if ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) { - // See issue #4: - // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is - // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD - // REPLACEMENT CHARACTER.” - if (strict) { - parseError('character reference outside the permissible Unicode range'); - } - return '\uFFFD'; - } - if (has(decodeMapNumeric, codePoint)) { - if (strict) { - parseError('disallowed character reference'); - } - return decodeMapNumeric[codePoint]; - } - if (strict && contains(invalidReferenceCodePoints, codePoint)) { - parseError('disallowed character reference'); - } - if (codePoint > 0xFFFF) { - codePoint -= 0x10000; - output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800); - codePoint = 0xDC00 | codePoint & 0x3FF; - } - output += stringFromCharCode(codePoint); - return output; - }; - - var hexEscape = function(codePoint) { - return '&#x' + codePoint.toString(16).toUpperCase() + ';'; - }; - - var decEscape = function(codePoint) { - return '&#' + codePoint + ';'; - }; - - var parseError = function(message) { - throw Error('Parse error: ' + message); - }; - - /*--------------------------------------------------------------------------*/ - - var encode = function(string, options) { - options = merge(options, encode.options); - var strict = options.strict; - if (strict && regexInvalidRawCodePoint.test(string)) { - parseError('forbidden code point'); - } - var encodeEverything = options.encodeEverything; - var useNamedReferences = options.useNamedReferences; - var allowUnsafeSymbols = options.allowUnsafeSymbols; - var escapeCodePoint = options.decimal ? decEscape : hexEscape; - - var escapeBmpSymbol = function(symbol) { - return escapeCodePoint(symbol.charCodeAt(0)); - }; - - if (encodeEverything) { - // Encode ASCII symbols. - string = string.replace(regexAsciiWhitelist, function(symbol) { - // Use named references if requested & possible. - if (useNamedReferences && has(encodeMap, symbol)) { - return '&' + encodeMap[symbol] + ';'; - } - return escapeBmpSymbol(symbol); - }); - // Shorten a few escapes that represent two symbols, of which at least one - // is within the ASCII range. - if (useNamedReferences) { - string = string - .replace(/>\u20D2/g, '>⃒') - .replace(/<\u20D2/g, '<⃒') - .replace(/fj/g, 'fj'); - } - // Encode non-ASCII symbols. - if (useNamedReferences) { - // Encode non-ASCII symbols that can be replaced with a named reference. - string = string.replace(regexEncodeNonAscii, function(string) { - // Note: there is no need to check `has(encodeMap, string)` here. - return '&' + encodeMap[string] + ';'; - }); - } - // Note: any remaining non-ASCII symbols are handled outside of the `if`. - } else if (useNamedReferences) { - // Apply named character references. - // Encode `<>"'&` using named character references. - if (!allowUnsafeSymbols) { - string = string.replace(regexEscape, function(string) { - return '&' + encodeMap[string] + ';'; // no need to check `has()` here - }); - } - // Shorten escapes that represent two symbols, of which at least one is - // `<>"'&`. - string = string - .replace(/>\u20D2/g, '>⃒') - .replace(/<\u20D2/g, '<⃒'); - // Encode non-ASCII symbols that can be replaced with a named reference. - string = string.replace(regexEncodeNonAscii, function(string) { - // Note: there is no need to check `has(encodeMap, string)` here. - return '&' + encodeMap[string] + ';'; - }); - } else if (!allowUnsafeSymbols) { - // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled - // using named character references. - string = string.replace(regexEscape, escapeBmpSymbol); - } - return string - // Encode astral symbols. - .replace(regexAstralSymbols, function($0) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - var high = $0.charCodeAt(0); - var low = $0.charCodeAt(1); - var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000; - return escapeCodePoint(codePoint); - }) - // Encode any remaining BMP symbols that are not printable ASCII symbols - // using a hexadecimal escape. - .replace(regexBmpWhitelist, escapeBmpSymbol); - }; - // Expose default options (so they can be overridden globally). - encode.options = { - 'allowUnsafeSymbols': false, - 'encodeEverything': false, - 'strict': false, - 'useNamedReferences': false, - 'decimal' : false - }; - - var decode = function(html, options) { - options = merge(options, decode.options); - var strict = options.strict; - if (strict && regexInvalidEntity.test(html)) { - parseError('malformed character reference'); - } - return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) { - var codePoint; - var semicolon; - var decDigits; - var hexDigits; - var reference; - var next; - - if ($1) { - reference = $1; - // Note: there is no need to check `has(decodeMap, reference)`. - return decodeMap[reference]; - } - - if ($2) { - // Decode named character references without trailing `;`, e.g. `&`. - // This is only a parse error if it gets converted to `&`, or if it is - // followed by `=` in an attribute context. - reference = $2; - next = $3; - if (next && options.isAttributeValue) { - if (strict && next == '=') { - parseError('`&` did not start a character reference'); - } - return $0; - } else { - if (strict) { - parseError( - 'named character reference was not terminated by a semicolon' - ); - } - // Note: there is no need to check `has(decodeMapLegacy, reference)`. - return decodeMapLegacy[reference] + (next || ''); - } - } - - if ($4) { - // Decode decimal escapes, e.g. `𝌆`. - decDigits = $4; - semicolon = $5; - if (strict && !semicolon) { - parseError('character reference was not terminated by a semicolon'); - } - codePoint = parseInt(decDigits, 10); - return codePointToSymbol(codePoint, strict); - } - - if ($6) { - // Decode hexadecimal escapes, e.g. `𝌆`. - hexDigits = $6; - semicolon = $7; - if (strict && !semicolon) { - parseError('character reference was not terminated by a semicolon'); - } - codePoint = parseInt(hexDigits, 16); - return codePointToSymbol(codePoint, strict); - } - - // If we’re still here, `if ($7)` is implied; it’s an ambiguous - // ampersand for sure. https://mths.be/notes/ambiguous-ampersands - if (strict) { - parseError( - 'named character reference was not terminated by a semicolon' - ); - } - return $0; - }); - }; - // Expose default options (so they can be overridden globally). - decode.options = { - 'isAttributeValue': false, - 'strict': false - }; - - var escape = function(string) { - return string.replace(regexEscape, function($0) { - // Note: there is no need to check `has(escapeMap, $0)` here. - return escapeMap[$0]; - }); - }; - - /*--------------------------------------------------------------------------*/ - - var he = { - 'version': '1.2.0', - 'encode': encode, - 'decode': decode, - 'escape': escape, - 'unescape': decode - }; - - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define(function() { - return he; - }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = he; - } else { // in Narwhal or RingoJS v0.7.0- - for (var key in he) { - has(he, key) && (freeExports[key] = he[key]); - } - } - } else { // in Rhino or a web browser - root.he = he; - } - -}(this)); diff --git a/node_modules/he/man/he.1 b/node_modules/he/man/he.1 deleted file mode 100644 index 7696628..0000000 --- a/node_modules/he/man/he.1 +++ /dev/null @@ -1,78 +0,0 @@ -.Dd April 5, 2016 -.Dt he 1 -.Sh NAME -.Nm he -.Nd encode/decode HTML entities just like a browser would -.Sh SYNOPSIS -.Nm -.Op Fl -escape Ar string -.br -.Op Fl -encode Ar string -.br -.Op Fl -encode Fl -use-named-refs Fl -everything Fl -allow-unsafe Ar string -.br -.Op Fl -decode Ar string -.br -.Op Fl -decode Fl -attribute Ar string -.br -.Op Fl -decode Fl -strict Ar string -.br -.Op Fl v | -version -.br -.Op Fl h | -help -.Sh DESCRIPTION -.Nm -encodes/decodes HTML entities in strings just like a browser would. -.Sh OPTIONS -.Bl -ohang -offset -.It Sy "--escape" -Take a string of text and escape it for use in text contexts in XML or HTML documents. Only the following characters are escaped: `&`, `<`, `>`, `"`, and `'`. -.It Sy "--encode" -Take a string of text and encode any symbols that aren't printable ASCII symbols and that can be replaced with character references. For example, it would turn `©` into `©`, but it wouldn't turn `+` into `+` since there is no point in doing so. Additionally, it replaces any remaining non-ASCII symbols with a hexadecimal escape sequence (e.g. `𝌆`). The return value of this function is always valid HTML. -.It Sy "--encode --use-named-refs" -Enable the use of named character references (like `©`) in the output. If compatibility with older browsers is a concern, don't use this option. -.It Sy "--encode --everything" -Encode every symbol in the input string, even safe printable ASCII symbols. -.It Sy "--encode --allow-unsafe" -Encode non-ASCII characters only. This leaves unsafe HTML/XML symbols like `&`, `<`, `>`, `"`, and `'` intact. -.It Sy "--encode --decimal" -Use decimal digits rather than hexadecimal digits for encoded character references, e.g. output `©` instead of `©`. -.It Sy "--decode" -Takes a string of HTML and decode any named and numerical character references in it using the algorithm described in the HTML spec. -.It Sy "--decode --attribute" -Parse the input as if it was an HTML attribute value rather than a string in an HTML text content. -.It Sy "--decode --strict" -Throw an error if an invalid character reference is encountered. -.It Sy "-v, --version" -Print he's version. -.It Sy "-h, --help" -Show the help screen. -.El -.Sh EXIT STATUS -The -.Nm he -utility exits with one of the following values: -.Pp -.Bl -tag -width flag -compact -.It Li 0 -.Nm -did what it was instructed to do successfully; either it encoded/decoded the input and printed the result, or it printed the version or usage message. -.It Li 1 -.Nm -encountered an error. -.El -.Sh EXAMPLES -.Bl -ohang -offset -.It Sy "he --escape '<script>alert(1)</script>'" -Print an escaped version of the given string that is safe for use in HTML text contexts, escaping only `&`, `<`, `>`, `"`, and `'`. -.It Sy "he --decode '©𝌆'" -Print the decoded version of the given HTML string. -.It Sy "echo\ '©𝌆'\ |\ he --decode" -Print the decoded version of the HTML string that gets piped in. -.El -.Sh BUGS -he's bug tracker is located at <https://github.com/mathiasbynens/he/issues>. -.Sh AUTHOR -Mathias Bynens <https://mathiasbynens.be/> -.Sh WWW -<https://mths.be/he> diff --git a/node_modules/he/package.json b/node_modules/he/package.json deleted file mode 100644 index 76eff31..0000000 --- a/node_modules/he/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "he", - "version": "1.2.0", - "description": "A robust HTML entities encoder/decoder with full Unicode support.", - "homepage": "https://mths.be/he", - "main": "he.js", - "bin": "bin/he", - "keywords": [ - "string", - "entities", - "entity", - "html", - "encode", - "decode", - "unicode" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/he.git" - }, - "bugs": "https://github.com/mathiasbynens/he/issues", - "files": [ - "LICENSE-MIT.txt", - "he.js", - "bin/", - "man/" - ], - "directories": { - "bin": "bin", - "man": "man", - "test": "tests" - }, - "scripts": { - "test": "node tests/tests.js", - "build": "grunt build" - }, - "devDependencies": { - "codecov.io": "^0.1.6", - "grunt": "^0.4.5", - "grunt-cli": "^1.3.1", - "grunt-shell": "^1.1.1", - "grunt-template": "^0.2.3", - "istanbul": "^0.4.2", - "jsesc": "^1.0.0", - "lodash": "^4.8.2", - "qunit-extras": "^1.4.5", - "qunitjs": "~1.11.0", - "regenerate": "^1.2.1", - "regexgen": "^1.3.0", - "requirejs": "^2.1.22", - "sort-object": "^3.0.2" - } -} diff --git a/node_modules/html-encoding-sniffer/LICENSE.txt b/node_modules/html-encoding-sniffer/LICENSE.txt deleted file mode 100644 index 4220dea..0000000 --- a/node_modules/html-encoding-sniffer/LICENSE.txt +++ /dev/null @@ -1,7 +0,0 @@ -Copyright © Domenic Denicola <d@domenic.me> - -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/node_modules/html-encoding-sniffer/README.md b/node_modules/html-encoding-sniffer/README.md deleted file mode 100644 index 73338ea..0000000 --- a/node_modules/html-encoding-sniffer/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Determine the Encoding of a HTML Byte Stream - -This package implements the HTML Standard's [encoding sniffing algorithm](https://html.spec.whatwg.org/multipage/syntax.html#encoding-sniffing-algorithm) in all its glory. The most interesting part of this is how it pre-scans the first 1024 bytes in order to search for certain `<meta charset>`-related patterns. - -```js -const htmlEncodingSniffer = require("html-encoding-sniffer"); -const fs = require("fs"); - -const htmlBytes = fs.readFileSync("./html-page.html"); -const sniffedEncoding = htmlEncodingSniffer(htmlBytes); -``` - -The passed bytes are given as a `Uint8Array`; the Node.js `Buffer` subclass of `Uint8Array` will also work, as shown above. - -The returned value will be a canonical [encoding name](https://encoding.spec.whatwg.org/#names-and-labels) (not a label). You might then combine this with the [whatwg-encoding](https://github.com/jsdom/whatwg-encoding) package to decode the result: - -```js -const whatwgEncoding = require("whatwg-encoding"); -const htmlString = whatwgEncoding.decode(htmlBytes, sniffedEncoding); -``` - -## Options - -You can pass two potential options to `htmlEncodingSniffer`: - -```js -const sniffedEncoding = htmlEncodingSniffer(htmlBytes, { - transportLayerEncodingLabel, - defaultEncoding -}); -``` - -These represent two possible inputs into the [encoding sniffing algorithm](https://html.spec.whatwg.org/multipage/syntax.html#encoding-sniffing-algorithm): - -- `transportLayerEncodingLabel` is an encoding label that is obtained from the "transport layer" (probably a HTTP `Content-Type` header), which overrides everything but a BOM. -- `defaultEncoding` is the ultimate fallback encoding used if no valid encoding is supplied by the transport layer, and no encoding is sniffed from the bytes. It defaults to `"windows-1252"`, as recommended by the algorithm's table of suggested defaults for "All other locales" (including the `en` locale). - -## Credits - -This package was originally based on the excellent work of [@nicolashenry](https://github.com/nicolashenry), [in jsdom](https://github.com/tmpvar/jsdom/blob/16fd85618f2705d181232f6552125872a37164bc/lib/jsdom/living/helpers/encoding.js). It has since been pulled out into this separate package. diff --git a/node_modules/html-encoding-sniffer/lib/html-encoding-sniffer.js b/node_modules/html-encoding-sniffer/lib/html-encoding-sniffer.js deleted file mode 100644 index 3603410..0000000 --- a/node_modules/html-encoding-sniffer/lib/html-encoding-sniffer.js +++ /dev/null @@ -1,295 +0,0 @@ -"use strict"; -const whatwgEncoding = require("whatwg-encoding"); - -// https://html.spec.whatwg.org/#encoding-sniffing-algorithm -module.exports = (uint8Array, { transportLayerEncodingLabel, defaultEncoding = "windows-1252" } = {}) => { - let encoding = whatwgEncoding.getBOMEncoding(uint8Array); - - if (encoding === null && transportLayerEncodingLabel !== undefined) { - encoding = whatwgEncoding.labelToName(transportLayerEncodingLabel); - } - - if (encoding === null) { - encoding = prescanMetaCharset(uint8Array); - } - - if (encoding === null) { - encoding = defaultEncoding; - } - - return encoding; -}; - -// https://html.spec.whatwg.org/multipage/syntax.html#prescan-a-byte-stream-to-determine-its-encoding -function prescanMetaCharset(uint8Array) { - const l = Math.min(uint8Array.byteLength, 1024); - for (let i = 0; i < l; i++) { - let c = uint8Array[i]; - if (c === 0x3C) { - // "<" - const c1 = uint8Array[i + 1]; - const c2 = uint8Array[i + 2]; - const c3 = uint8Array[i + 3]; - const c4 = uint8Array[i + 4]; - const c5 = uint8Array[i + 5]; - // !-- (comment start) - if (c1 === 0x21 && c2 === 0x2D && c3 === 0x2D) { - i += 4; - for (; i < l; i++) { - c = uint8Array[i]; - const cMinus1 = uint8Array[i - 1]; - const cMinus2 = uint8Array[i - 2]; - // --> (comment end) - if (c === 0x3E && cMinus1 === 0x2D && cMinus2 === 0x2D) { - break; - } - } - } else if ((c1 === 0x4D || c1 === 0x6D) && - (c2 === 0x45 || c2 === 0x65) && - (c3 === 0x54 || c3 === 0x74) && - (c4 === 0x41 || c4 === 0x61) && - (isSpaceCharacter(c5) || c5 === 0x2F)) { - // "meta" + space or / - i += 6; - const attributeList = new Set(); - let gotPragma = false; - let needPragma = null; - let charset = null; - - let attrRes; - do { - attrRes = getAttribute(uint8Array, i, l); - if (attrRes.attr && !attributeList.has(attrRes.attr.name)) { - attributeList.add(attrRes.attr.name); - if (attrRes.attr.name === "http-equiv") { - gotPragma = attrRes.attr.value === "content-type"; - } else if (attrRes.attr.name === "content" && !charset) { - charset = extractCharacterEncodingFromMeta(attrRes.attr.value); - if (charset !== null) { - needPragma = true; - } - } else if (attrRes.attr.name === "charset") { - charset = whatwgEncoding.labelToName(attrRes.attr.value); - needPragma = false; - } - } - i = attrRes.i; - } while (attrRes.attr); - - if (needPragma === null) { - continue; - } - if (needPragma === true && gotPragma === false) { - continue; - } - if (charset === null) { - continue; - } - - if (charset === "UTF-16LE" || charset === "UTF-16BE") { - charset = "UTF-8"; - } - if (charset === "x-user-defined") { - charset = "windows-1252"; - } - - return charset; - } else if ((c1 >= 0x41 && c1 <= 0x5A) || (c1 >= 0x61 && c1 <= 0x7A)) { - // a-z or A-Z - for (i += 2; i < l; i++) { - c = uint8Array[i]; - // space or > - if (isSpaceCharacter(c) || c === 0x3E) { - break; - } - } - let attrRes; - do { - attrRes = getAttribute(uint8Array, i, l); - i = attrRes.i; - } while (attrRes.attr); - } else if (c1 === 0x21 || c1 === 0x2F || c1 === 0x3F) { - // ! or / or ? - for (i += 2; i < l; i++) { - c = uint8Array[i]; - // > - if (c === 0x3E) { - break; - } - } - } - } - } - return null; -} - -// https://html.spec.whatwg.org/multipage/syntax.html#concept-get-attributes-when-sniffing -function getAttribute(uint8Array, i, l) { - for (; i < l; i++) { - let c = uint8Array[i]; - // space or / - if (isSpaceCharacter(c) || c === 0x2F) { - continue; - } - // ">" - if (c === 0x3E) { - break; - } - let name = ""; - let value = ""; - nameLoop:for (; i < l; i++) { - c = uint8Array[i]; - // "=" - if (c === 0x3D && name !== "") { - i++; - break; - } - // space - if (isSpaceCharacter(c)) { - for (i++; i < l; i++) { - c = uint8Array[i]; - // space - if (isSpaceCharacter(c)) { - continue; - } - // not "=" - if (c !== 0x3D) { - return { attr: { name, value }, i }; - } - - i++; - break nameLoop; - } - break; - } - // / or > - if (c === 0x2F || c === 0x3E) { - return { attr: { name, value }, i }; - } - // A-Z - if (c >= 0x41 && c <= 0x5A) { - name += String.fromCharCode(c + 0x20); // lowercase - } else { - name += String.fromCharCode(c); - } - } - c = uint8Array[i]; - // space - if (isSpaceCharacter(c)) { - for (i++; i < l; i++) { - c = uint8Array[i]; - // space - if (isSpaceCharacter(c)) { - continue; - } else { - break; - } - } - } - // " or ' - if (c === 0x22 || c === 0x27) { - const quote = c; - for (i++; i < l; i++) { - c = uint8Array[i]; - - if (c === quote) { - i++; - return { attr: { name, value }, i }; - } - - // A-Z - if (c >= 0x41 && c <= 0x5A) { - value += String.fromCharCode(c + 0x20); // lowercase - } else { - value += String.fromCharCode(c); - } - } - } - - // > - if (c === 0x3E) { - return { attr: { name, value }, i }; - } - - // A-Z - if (c >= 0x41 && c <= 0x5A) { - value += String.fromCharCode(c + 0x20); // lowercase - } else { - value += String.fromCharCode(c); - } - - for (i++; i < l; i++) { - c = uint8Array[i]; - - // space or > - if (isSpaceCharacter(c) || c === 0x3E) { - return { attr: { name, value }, i }; - } - - // A-Z - if (c >= 0x41 && c <= 0x5A) { - value += String.fromCharCode(c + 0x20); // lowercase - } else { - value += String.fromCharCode(c); - } - } - } - return { i }; -} - -function extractCharacterEncodingFromMeta(string) { - let position = 0; - - while (true) { - const indexOfCharset = string.substring(position).search(/charset/ui); - - if (indexOfCharset === -1) { - return null; - } - let subPosition = position + indexOfCharset + "charset".length; - - while (isSpaceCharacter(string[subPosition].charCodeAt(0))) { - ++subPosition; - } - - if (string[subPosition] !== "=") { - position = subPosition - 1; - continue; - } - - ++subPosition; - - while (isSpaceCharacter(string[subPosition].charCodeAt(0))) { - ++subPosition; - } - - position = subPosition; - break; - } - - if (string[position] === "\"" || string[position] === "'") { - const nextIndex = string.indexOf(string[position], position + 1); - - if (nextIndex !== -1) { - return whatwgEncoding.labelToName(string.substring(position + 1, nextIndex)); - } - - // It is an unmatched quotation mark - return null; - } - - if (string.length === position + 1) { - return null; - } - - const indexOfASCIIWhitespaceOrSemicolon = string.substring(position + 1).search(/\x09|\x0A|\x0C|\x0D|\x20|;/u); - const end = indexOfASCIIWhitespaceOrSemicolon === -1 ? - string.length : - position + indexOfASCIIWhitespaceOrSemicolon + 1; - - return whatwgEncoding.labelToName(string.substring(position, end)); -} - -function isSpaceCharacter(c) { - return c === 0x09 || c === 0x0A || c === 0x0C || c === 0x0D || c === 0x20; -} diff --git a/node_modules/html-encoding-sniffer/package.json b/node_modules/html-encoding-sniffer/package.json deleted file mode 100644 index 0049e2b..0000000 --- a/node_modules/html-encoding-sniffer/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "html-encoding-sniffer", - "description": "Sniff the encoding from a HTML byte stream", - "keywords": [ - "encoding", - "html" - ], - "version": "3.0.0", - "author": "Domenic Denicola <d@domenic.me> (https://domenic.me/)", - "license": "MIT", - "repository": "jsdom/html-encoding-sniffer", - "main": "lib/html-encoding-sniffer.js", - "files": [ - "lib/" - ], - "scripts": { - "test": "mocha", - "lint": "eslint ." - }, - "dependencies": { - "whatwg-encoding": "^2.0.0" - }, - "devDependencies": { - "@domenic/eslint-config": "^1.4.0", - "eslint": "^7.32.0", - "mocha": "^9.1.1" - }, - "engines": { - "node": ">=12" - } -} diff --git a/node_modules/http-proxy/.auto-changelog b/node_modules/http-proxy/.auto-changelog deleted file mode 100644 index 98e4a98..0000000 --- a/node_modules/http-proxy/.auto-changelog +++ /dev/null @@ -1,6 +0,0 @@ -{ - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": true, - "commitLimit": false -} \ No newline at end of file diff --git a/node_modules/http-proxy/.gitattributes b/node_modules/http-proxy/.gitattributes deleted file mode 100644 index 1a6bd45..0000000 --- a/node_modules/http-proxy/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -package-lock.json binary diff --git a/node_modules/http-proxy/CHANGELOG.md b/node_modules/http-proxy/CHANGELOG.md deleted file mode 100644 index 6c80d84..0000000 --- a/node_modules/http-proxy/CHANGELOG.md +++ /dev/null @@ -1,1872 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - -## [v1.18.1](https://github.com/http-party/node-http-proxy/compare/1.18.0...v1.18.1) - 2020-05-17 - -### Merged - -- Skip sending the proxyReq event when the expect header is present [`#1447`](https://github.com/http-party/node-http-proxy/pull/1447) -- Remove node6 support, add node12 to build [`#1397`](https://github.com/http-party/node-http-proxy/pull/1397) - -## [1.18.0](https://github.com/http-party/node-http-proxy/compare/1.17.0...1.18.0) - 2019-09-18 - -### Merged - -- Added in auto-changelog module set to keepachangelog format [`#1373`](https://github.com/http-party/node-http-proxy/pull/1373) -- fix 'Modify Response' readme section to avoid unnecessary array copying [`#1300`](https://github.com/http-party/node-http-proxy/pull/1300) -- Fix incorrect target name for reverse proxy example [`#1135`](https://github.com/http-party/node-http-proxy/pull/1135) -- Fix modify response middleware example [`#1139`](https://github.com/http-party/node-http-proxy/pull/1139) -- [dist] Update dependency async to v3 [`#1359`](https://github.com/http-party/node-http-proxy/pull/1359) -- Fix path to local http-proxy in examples. [`#1072`](https://github.com/http-party/node-http-proxy/pull/1072) -- fix reverse-proxy example require path [`#1067`](https://github.com/http-party/node-http-proxy/pull/1067) -- Update README.md [`#970`](https://github.com/http-party/node-http-proxy/pull/970) -- [dist] Update dependency request to ~2.88.0 [SECURITY] [`#1357`](https://github.com/http-party/node-http-proxy/pull/1357) -- [dist] Update dependency eventemitter3 to v4 [`#1365`](https://github.com/http-party/node-http-proxy/pull/1365) -- [dist] Update dependency colors to v1 [`#1360`](https://github.com/http-party/node-http-proxy/pull/1360) -- [dist] Update all non-major dependencies [`#1356`](https://github.com/http-party/node-http-proxy/pull/1356) -- [dist] Update dependency agentkeepalive to v4 [`#1358`](https://github.com/http-party/node-http-proxy/pull/1358) -- [dist] Update dependency nyc to v14 [`#1367`](https://github.com/http-party/node-http-proxy/pull/1367) -- [dist] Update dependency concat-stream to v2 [`#1363`](https://github.com/http-party/node-http-proxy/pull/1363) -- x-forwarded-host overwrite for mutli level proxies [`#1267`](https://github.com/http-party/node-http-proxy/pull/1267) -- [refactor doc] Complete rename to http-party org. [`#1362`](https://github.com/http-party/node-http-proxy/pull/1362) -- Highlight correct lines for createProxyServer [`#1117`](https://github.com/http-party/node-http-proxy/pull/1117) -- Fix docs for rewrite options - 201 also handled [`#1147`](https://github.com/http-party/node-http-proxy/pull/1147) -- Update .nyc_output [`#1339`](https://github.com/http-party/node-http-proxy/pull/1339) -- Configure Renovate [`#1355`](https://github.com/http-party/node-http-proxy/pull/1355) -- [examples] Restream body before proxying, support for Content-Type of application/x-www-form-urlencoded [`#1264`](https://github.com/http-party/node-http-proxy/pull/1264) - -### Commits - -- [dist] New test fixtures. [`7e4a0e5`](https://github.com/http-party/node-http-proxy/commit/7e4a0e511bc30c059216860153301de2cdd1e97f) -- [dist] End of an era. [`a9b09cc`](https://github.com/http-party/node-http-proxy/commit/a9b09cce43f072db99fb5170030a05536177ccb7) -- [dist] Version bump. 1.18.0 [`9bbe486`](https://github.com/http-party/node-http-proxy/commit/9bbe486c5efcc356fb4d189ef38eee275bbde345) -- [fix] Latest versions. [`59c4403`](https://github.com/http-party/node-http-proxy/commit/59c4403e9dc15ab9b19ee2a3f4aecbfc6c3d94c4) -- [fix test] Update tests. [`dd1d08b`](https://github.com/http-party/node-http-proxy/commit/dd1d08b6319d1def729554446a5b0176978a8dad) -- [dist] Update dependency ws to v3 [SECURITY] [`b00911c`](https://github.com/http-party/node-http-proxy/commit/b00911c93740a00c5cfbacbb91565cb6912ed255) -- [dist] .gitattributes all the things. [`fc93520`](https://github.com/http-party/node-http-proxy/commit/fc93520d741ec80be8ae31ca005f3e9c199e330e) -- [dist] Regenerate package-lock.json. [`16d4f8a`](https://github.com/http-party/node-http-proxy/commit/16d4f8a95162b2e2e4ee6657c500f1208c044b2d) - -## [1.17.0](https://github.com/http-party/node-http-proxy/compare/1.16.2...1.17.0) - 2018-04-20 - -### Merged - -- Fix overwriting of global options [`#1074`](https://github.com/http-party/node-http-proxy/pull/1074) -- Update README.md [`#1131`](https://github.com/http-party/node-http-proxy/pull/1131) -- Update README.md with CoC link [`#1120`](https://github.com/http-party/node-http-proxy/pull/1120) -- Add Code Of Conduct [`#1119`](https://github.com/http-party/node-http-proxy/pull/1119) -- [deps] Update eventemitter3 to version 2.0.x [`#1109`](https://github.com/http-party/node-http-proxy/pull/1109) - -### Fixed - -- Fix "Can't set headers after they are sent" errors [`#930`](https://github.com/http-party/node-http-proxy/issues/930) -- Include websocket non-upgrade response [`#890`](https://github.com/http-party/node-http-proxy/issues/890) - -### Commits - -- Add followRedirects option [`c9a556c`](https://github.com/http-party/node-http-proxy/commit/c9a556cfa57c7ce0b877e16f2c2e1448d8cc278d) -- [test] add test for selfHandleRequest and remove modifyResponse as selfHandleRequest is the only way that functionality works [`4a37175`](https://github.com/http-party/node-http-proxy/commit/4a37175a5296d2ea2da0fc15a3f8fe08599bb592) -- Adding ability to set cookie path [`2c98416`](https://github.com/http-party/node-http-proxy/commit/2c98416ac2bf17bb5f515b9e10ee4485f5913846) -- Updating docs and adding more tests. [`f5c2381`](https://github.com/http-party/node-http-proxy/commit/f5c2381395e01bf8d6655cc70e14032c8f0aaa67) -- [dist] make tests work reliably, add package-lock.json [`09dcb98`](https://github.com/http-party/node-http-proxy/commit/09dcb984565dabb159a01a75a188b974f8c176ad) -- add support for modify response [`e5c02b8`](https://github.com/http-party/node-http-proxy/commit/e5c02b8a8a902e204eee886acafbbfe46c4a3aef) -- [wip] proper tests and reporting [`f4ff100`](https://github.com/http-party/node-http-proxy/commit/f4ff1006b9e71eb4185a3edf03333dbe514a84c9) -- Add detail about "buffer" option [`6f88caf`](https://github.com/http-party/node-http-proxy/commit/6f88caf6e46d84a809910c591e138250b333b39f) -- Add use case for proxy to HTTPS using a PKCS12 client certificate [`d2f9db8`](https://github.com/http-party/node-http-proxy/commit/d2f9db824136358a06dc3dd566644f3a016f24e2) -- [test] for override method feature [`81d58c5`](https://github.com/http-party/node-http-proxy/commit/81d58c531be3f61efb56d2489a66c73a7b2325fe) -- [dist] doc updates [`e94d529`](https://github.com/http-party/node-http-proxy/commit/e94d52973a26cf817a9de12d97e5ae603093f70d) -- feat: 添加response自处理参数 [`89f9ef8`](https://github.com/http-party/node-http-proxy/commit/89f9ef87e0532d54d086719c5ace1a968a42e51b) -- [dist][test] codecov config [`a4bccc3`](https://github.com/http-party/node-http-proxy/commit/a4bccc332d36d7db93db984674cd7e51b43a1b99) -- Removing unnecessary check since this is a private API [`bc6a237`](https://github.com/http-party/node-http-proxy/commit/bc6a23709c37c65b5b16cc802d05cb57f099b0ce) -- issue #953: stop using writeHead [`2c44039`](https://github.com/http-party/node-http-proxy/commit/2c44039a7c30b190043da654ee7e5aed0304e979) -- [fix] move badges [`543636d`](https://github.com/http-party/node-http-proxy/commit/543636d0f662308ec8c9afdbf641f4036f002bfd) -- fix small typos in README [`8231984`](https://github.com/http-party/node-http-proxy/commit/8231984fb02dca331b4ef77e089db50855eea4f5) -- Added timeout option to docs [`107c187`](https://github.com/http-party/node-http-proxy/commit/107c18720c3906f9049cc14d075b31910c0ccf55) -- [dist] document the feature [`d533a1b`](https://github.com/http-party/node-http-proxy/commit/d533a1be437b37fed5bd25f5e58298eea819f974) -- [fix] slightly more tolerant [`de1b808`](https://github.com/http-party/node-http-proxy/commit/de1b80851ab1b1251b5eaeaf0beab164024f09b6) -- Forgot 'i' flag when changing from regex shorthand to string. [`50f58b4`](https://github.com/http-party/node-http-proxy/commit/50f58b4cd9b4422a11512a6a065432159b5bc806) -- Update common.js [`c5d8466`](https://github.com/http-party/node-http-proxy/commit/c5d846648304f2e36a172b25d9fb8300d8131f8c) -- [fix] rm newline [`e6f24ba`](https://github.com/http-party/node-http-proxy/commit/e6f24ba6173c4fdd26089b3c729de5dbdd71ad74) -- [dist] update package-lock.json [`abf882e`](https://github.com/http-party/node-http-proxy/commit/abf882e03c92cf1665d5b7d4dbdaf87feb50a677) - -## [1.16.2](https://github.com/http-party/node-http-proxy/compare/1.16.1...1.16.2) - 2016-12-06 - -### Merged - -- [WIP] Revert default behavior of writeHeaders method [`#1104`](https://github.com/http-party/node-http-proxy/pull/1104) - -## [1.16.1](https://github.com/http-party/node-http-proxy/compare/1.16.0...1.16.1) - 2016-12-04 - -### Commits - -- Enable proxy response to have multiple Set-Cookie raw headers #1101 [`8cb451f`](https://github.com/http-party/node-http-proxy/commit/8cb451f20cff0a19fc9576fc2558307fb17a5710) -- [dist] Version bump. 1.16.1 [`ac1a01b`](https://github.com/http-party/node-http-proxy/commit/ac1a01b1f3caa3a2a9433341bf5e7a95072d6612) - -## [1.16.0](https://github.com/http-party/node-http-proxy/compare/1.15.2...1.16.0) - 2016-12-02 - -### Merged - -- Fix newly introduced error in error handler for ECONNREFUSED in forward proxy [`#1100`](https://github.com/http-party/node-http-proxy/pull/1100) -- Keep original letter case of response header keys [`#1098`](https://github.com/http-party/node-http-proxy/pull/1098) -- Handle errors for forward request, add test case [`#1099`](https://github.com/http-party/node-http-proxy/pull/1099) - -### Commits - -- add node 6 to travis [`2f7f037`](https://github.com/http-party/node-http-proxy/commit/2f7f03778cfb94396acf0d778061ea197212fbb5) - -## [1.15.2](https://github.com/http-party/node-http-proxy/compare/1.15.1...1.15.2) - 2016-10-22 - -### Merged - -- Add proxy-timeout option to documentation [`#1075`](https://github.com/http-party/node-http-proxy/pull/1075) - -### Commits - -- Do not rely on func.name (no scope) [`61c2889`](https://github.com/http-party/node-http-proxy/commit/61c28891093b256bbc0dae78e45e2c5f0acf2101) -- Do not rely on func.name (no scope) [`d48f67e`](https://github.com/http-party/node-http-proxy/commit/d48f67eb90d8af66211093e91efdd6638859e0bf) -- Expose full callback names [`220f5fb`](https://github.com/http-party/node-http-proxy/commit/220f5fb795d2977c5a68ae59d7db65089efed50c) -- test case added [`f5217d6`](https://github.com/http-party/node-http-proxy/commit/f5217d6c20c164ed412a3b20f660786b6f88b35b) -- [fix] style nits [`d0f1dfe`](https://github.com/http-party/node-http-proxy/commit/d0f1dfeb8277d46a057017cd888b50e85f6725d6) -- With a comment [`fbc2668`](https://github.com/http-party/node-http-proxy/commit/fbc266809c289fbdb59d7944345816a858303c96) -- Fix browserification [`8eddf45`](https://github.com/http-party/node-http-proxy/commit/8eddf45f2a043e4e1b3f6e33c304e68fe7e1c406) -- not setting connection header in case of http2 as it is deprecated [`2d01edc`](https://github.com/http-party/node-http-proxy/commit/2d01edc5a5ace591784022b85860a3bbc48c5e12) - -## [1.15.1](https://github.com/http-party/node-http-proxy/compare/1.15.0...1.15.1) - 2016-09-14 - -### Merged - -- Properly write response header optionally including statusMessage [`#1061`](https://github.com/http-party/node-http-proxy/pull/1061) - -### Commits - -- [dist] Version bump. 1.15.1 [`912cd3a`](https://github.com/http-party/node-http-proxy/commit/912cd3acaef484f7ea08affc9339250082e04058) - -## [1.15.0](https://github.com/http-party/node-http-proxy/compare/1.14.0...1.15.0) - 2016-09-14 - -### Merged - -- Made it not to crash with omited Host http header [`#1050`](https://github.com/http-party/node-http-proxy/pull/1050) -- README.md: fix typo: 'ingoing' should be 'incoming' [`#1060`](https://github.com/http-party/node-http-proxy/pull/1060) -- Fix for Reason-Phrase being overwritten on proxy response. [`#1051`](https://github.com/http-party/node-http-proxy/pull/1051) -- cookieDomainRewrite option [`#1009`](https://github.com/http-party/node-http-proxy/pull/1009) -- Update ntlm-authentication.js [`#1025`](https://github.com/http-party/node-http-proxy/pull/1025) -- Restream body before proxying [`#1027`](https://github.com/http-party/node-http-proxy/pull/1027) -- Location rewriting for responses with status 201 [`#1024`](https://github.com/http-party/node-http-proxy/pull/1024) -- #866 Copy CA from options into outbound proxy [`#1042`](https://github.com/http-party/node-http-proxy/pull/1042) - -### Fixed - -- Restream body before proxying (#1027) [`#955`](https://github.com/http-party/node-http-proxy/issues/955) - -### Commits - -- [dist] Version bump. 1.15.0 [`b98c75b`](https://github.com/http-party/node-http-proxy/commit/b98c75b1ff3ebdf7f78224eb0d9aa857af2db1d9) - -## [1.14.0](https://github.com/http-party/node-http-proxy/compare/1.13.3...1.14.0) - 2016-06-15 - -### Merged - -- Emit disconnected event instead of error when ECONNRESET [`#966`](https://github.com/http-party/node-http-proxy/pull/966) -- fix test for node 0.10 + socket.io-client@1.4.6 (engine.io-client@1.6.9) [`#1010`](https://github.com/http-party/node-http-proxy/pull/1010) - -### Commits - -- [dist] Version bump. 1.14.0 [`fcfb0b3`](https://github.com/http-party/node-http-proxy/commit/fcfb0b37f6ac61369565507446377f91d955cf29) - -## [1.13.3](https://github.com/http-party/node-http-proxy/compare/1.13.2...1.13.3) - 2016-05-16 - -### Merged - -- fix browserify compatibility [`#975`](https://github.com/http-party/node-http-proxy/pull/975) -- alter message error [`#998`](https://github.com/http-party/node-http-proxy/pull/998) -- Sanitize header keys before setting them [`#997`](https://github.com/http-party/node-http-proxy/pull/997) -- Update ntlm-authentication.js [`#989`](https://github.com/http-party/node-http-proxy/pull/989) -- Add expected datatype to readme [`#983`](https://github.com/http-party/node-http-proxy/pull/983) -- Update README [`#982`](https://github.com/http-party/node-http-proxy/pull/982) -- Fix formatting of the `headers` option [`#974`](https://github.com/http-party/node-http-proxy/pull/974) -- Set the x-forwarded-host flag when xfwd is enabled [`#967`](https://github.com/http-party/node-http-proxy/pull/967) - -### Fixed - -- Sanitize header keys before setting them (#997) [`#996`](https://github.com/http-party/node-http-proxy/issues/996) - -### Commits - -- [dist] Update LICENSE to reflect 2015 changes. [`f345a1a`](https://github.com/http-party/node-http-proxy/commit/f345a1ac2dde1884e72b952a685a0a1796059f14) -- [dist] Version bump. 1.13.3 [`5082acc`](https://github.com/http-party/node-http-proxy/commit/5082acc067bbf287f503bbd5b776f798ab169db1) - -## [1.13.2](https://github.com/http-party/node-http-proxy/compare/1.13.1...1.13.2) - 2016-02-17 - -### Merged - -- Fixed missing documentation: #options.headers [`#806`](https://github.com/http-party/node-http-proxy/pull/806) -- #949 Proxy example using req instead res on README [`#950`](https://github.com/http-party/node-http-proxy/pull/950) -- mocha: Use default reporter [`#962`](https://github.com/http-party/node-http-proxy/pull/962) -- Remove "transfer-encoding" header if "content-length" is set to zero [`#961`](https://github.com/http-party/node-http-proxy/pull/961) - -### Commits - -- [dist] Version bump. 1.13.2 [`e1b2f4c`](https://github.com/http-party/node-http-proxy/commit/e1b2f4c31b34464431db251b3b6169689dadf518) - -## [1.13.1](https://github.com/http-party/node-http-proxy/compare/1.13.0...1.13.1) - 2016-02-02 - -### Merged - -- README.md: summary to specify reverse proxy [`#932`](https://github.com/http-party/node-http-proxy/pull/932) -- fix(common) urlJoin replace: ":/" -> "http?s:/" [`#947`](https://github.com/http-party/node-http-proxy/pull/947) -- Update README.md [`#948`](https://github.com/http-party/node-http-proxy/pull/948) - -### Commits - -- [dist] Version bump. 1.13.1 [`9d9fa94`](https://github.com/http-party/node-http-proxy/commit/9d9fa940cff3aa6134c60732c23aea8171fc7296) - -## [1.13.0](https://github.com/http-party/node-http-proxy/compare/1.12.1...1.13.0) - 2016-01-26 - -### Merged - -- Fix for #839 (Ignore path and the trailing slash) [`#934`](https://github.com/http-party/node-http-proxy/pull/934) -- Update license year range to 2016 [`#943`](https://github.com/http-party/node-http-proxy/pull/943) - -### Commits - -- [dist] Version bump. 1.13.0 [`268994e`](https://github.com/http-party/node-http-proxy/commit/268994ea45d9f8737343001ab9542e03023a5c96) - -## [1.12.1](https://github.com/http-party/node-http-proxy/compare/1.12.0...1.12.1) - 2016-01-24 - -### Merged - -- Bump version for npm publish [`#942`](https://github.com/http-party/node-http-proxy/pull/942) -- Added check to passes/web-outgoing.js to make sure the header being s… [`#940`](https://github.com/http-party/node-http-proxy/pull/940) -- Created reverse-proxy.js example. [`#825`](https://github.com/http-party/node-http-proxy/pull/825) -- SSE example and test [`#922`](https://github.com/http-party/node-http-proxy/pull/922) -- More structured readme [`#912`](https://github.com/http-party/node-http-proxy/pull/912) -- Updated markdown docs to mention proxy rules module [`#910`](https://github.com/http-party/node-http-proxy/pull/910) -- Add tests for forwarding of continuation frames [`#901`](https://github.com/http-party/node-http-proxy/pull/901) -- Bump requires-port, server and ws [`#904`](https://github.com/http-party/node-http-proxy/pull/904) -- [example] add an example for NTLM authentication [`#903`](https://github.com/http-party/node-http-proxy/pull/903) - -### Commits - -- Organized README more [`cd1d777`](https://github.com/http-party/node-http-proxy/commit/cd1d7776e8fb5d67e2c52b9ef27d8c932e7b72e2) -- Add tests for testing forwarding of continuation frames [`64fa520`](https://github.com/http-party/node-http-proxy/commit/64fa52078913c6d4fe95673f182aac4924961e8b) -- Added back to top helpers [`6106d4c`](https://github.com/http-party/node-http-proxy/commit/6106d4c32f7c7960f0391591661e6f0d229db52d) -- [ci] use node 4.2 to test and do not allow failures [`f82ce18`](https://github.com/http-party/node-http-proxy/commit/f82ce18d2f187b085c2c4f49d857755d21c582b1) -- [fix] bump requires-port, server and ws [`9ea1e89`](https://github.com/http-party/node-http-proxy/commit/9ea1e89a2fd9c392cd40265bdb13494a3614e290) -- Updated markdown docs to mention proxy rules [`eea79ca`](https://github.com/http-party/node-http-proxy/commit/eea79cab53f27371cad387a524ee3aaefa742c48) -- Fixed tests depending on ignorePath [`f9540de`](https://github.com/http-party/node-http-proxy/commit/f9540de7b13f41091be2dcb68d8f23be65ad3885) -- Added check to passes/web-outgoing.js to make sure the header being set is not undefined, which should be the only falsey value that could accidently show up and break that call. This fixes windows NTLM auth issues behind http-proxy. [`3b39d2c`](https://github.com/http-party/node-http-proxy/commit/3b39d2c3dcb1785cc06043fcb226c652f554941e) -- No longer appends / to path if ignorePath is set [`f2093b5`](https://github.com/http-party/node-http-proxy/commit/f2093b5313c855cd6309cc0ddebb31f369e525ed) -- README.md: introduction to specify reverse proxy [`41414a5`](https://github.com/http-party/node-http-proxy/commit/41414a56a11ddfac3a337711ac4c64124eb62377) -- Added note for appending trailing / when using ignorePath [`0cb1d3c`](https://github.com/http-party/node-http-proxy/commit/0cb1d3c68e793fed9aa4a7624c32a018e796aa95) - -## [1.12.0](https://github.com/http-party/node-http-proxy/compare/1.11.3...1.12.0) - 2015-10-22 - -### Merged - -- Issue #896: provide a "proxyReq" event also for websocket connections. [`#897`](https://github.com/http-party/node-http-proxy/pull/897) - -### Commits - -- Provide a "proxyReq" event also for websocket connections. [`a05fc2d`](https://github.com/http-party/node-http-proxy/commit/a05fc2d1692d038f1eaad6d9b26c174039bc1949) -- fixes after PR review [`9752652`](https://github.com/http-party/node-http-proxy/commit/9752652e76da3bcfb6a635620e4162518ca43203) -- [dist] Version bump. 1.12.0 [`b5a6d0e`](https://github.com/http-party/node-http-proxy/commit/b5a6d0e58396363f4c457f6d1654614bdfcfcb73) - -## [1.11.3](https://github.com/http-party/node-http-proxy/compare/1.11.2...1.11.3) - 2015-10-19 - -### Merged - -- Removed unspecified trailing slash in proxy url [`#893`](https://github.com/http-party/node-http-proxy/pull/893) -- Updating the upgrading doc [`#892`](https://github.com/http-party/node-http-proxy/pull/892) - -### Commits - -- [dist] Update .travis.yml to be more modern. [`302d981`](https://github.com/http-party/node-http-proxy/commit/302d981dd2cf06dbf751b1f64e3dfea08d0f9476) -- [dist] Version bump. 1.11.3 [`60baca5`](https://github.com/http-party/node-http-proxy/commit/60baca5aed4f45ef1d7b3f7edd909375853d344b) -- docs: options.headers [`c86ae51`](https://github.com/http-party/node-http-proxy/commit/c86ae51bb9658309a9628f4f5182d4c45c803b84) - -## [1.11.2](https://github.com/http-party/node-http-proxy/compare/v1.11.1...1.11.2) - 2015-08-30 - -### Merged - -- Update gzip-middleware.js [`#870`](https://github.com/http-party/node-http-proxy/pull/870) -- Fix broken option list indentation [`#863`](https://github.com/http-party/node-http-proxy/pull/863) -- Added missing configuration options [`#852`](https://github.com/http-party/node-http-proxy/pull/852) -- Added installation instructions [`#823`](https://github.com/http-party/node-http-proxy/pull/823) -- fixes comment [`#817`](https://github.com/http-party/node-http-proxy/pull/817) - -### Commits - -- Created reverse-proxy.js example. [`38864d0`](https://github.com/http-party/node-http-proxy/commit/38864d016794b9ff3d8d1d1cb81a730b40a1bf9c) -- Added websocket set-cookie headers test [`855cebd`](https://github.com/http-party/node-http-proxy/commit/855cebdac4d33ef5f2fab4c4c78fdc07cdb61402) -- [fix] make more functional [`cea0e86`](https://github.com/http-party/node-http-proxy/commit/cea0e8676b3e609828320bb03051eaf78cc43b54) -- Modify the set-cookie header fix to work with node 0.10.x. [`da674ec`](https://github.com/http-party/node-http-proxy/commit/da674ec4df2b371f09e912f3b376c48581090a0f) -- Use raw headers instead parsed. [`8bfd90c`](https://github.com/http-party/node-http-proxy/commit/8bfd90c4d9331fd129f17a788ef9fc733654b7e0) -- Replaced Object.keys().map with for in loop. [`3d2350c`](https://github.com/http-party/node-http-proxy/commit/3d2350c54ff0fb9271f5fcfea1d23f22ad97c47c) -- [dist] Version bump. 1.11.2 [`30e3b37`](https://github.com/http-party/node-http-proxy/commit/30e3b371de0116e40e15156394f31c7e0b0aa9f1) -- Websocket key was unnecessary long. [`ca73208`](https://github.com/http-party/node-http-proxy/commit/ca732087498582df01ab78fb7da77912dab8f138) - -## [v1.11.1](https://github.com/http-party/node-http-proxy/compare/v1.11.0...v1.11.1) - 2015-04-22 - -### Commits - -- [dist] Version bump. 1.11.1 [`7e6c66a`](https://github.com/http-party/node-http-proxy/commit/7e6c66a7e485a6c0ec3a1c567bbe800fdc56c9fd) -- [fix] dont use bind in the one case we do [`d26ef56`](https://github.com/http-party/node-http-proxy/commit/d26ef56e1bc2a1232b06c01b4740e3bf35d63eda) -- [dist] update to new version of EE3 [`607f96c`](https://github.com/http-party/node-http-proxy/commit/607f96c00cbda2a6b881b8ff1db05437dbf4ce77) -- [fix] use the main export for EE3 [`18c77ca`](https://github.com/http-party/node-http-proxy/commit/18c77cafc7d5479502cf5c4d2b663d8f85cfd6d4) - -## [v1.11.0](https://github.com/http-party/node-http-proxy/compare/v1.10.1...v1.11.0) - 2015-04-20 - -### Merged - -- [api] add an ignorePath option if you want to disregard the path of the ... [`#759`](https://github.com/http-party/node-http-proxy/pull/759) - -### Commits - -- [dist] Version bump. 1.11.0 [`934e6c4`](https://github.com/http-party/node-http-proxy/commit/934e6c4d54292a1b961452074e02fb5d45da729a) - -## [v1.10.1](https://github.com/http-party/node-http-proxy/compare/v1.10.0...v1.10.1) - 2015-04-02 - -### Merged - -- Fix default port detection with node 0.12.x [`#799`](https://github.com/http-party/node-http-proxy/pull/799) - -### Commits - -- [dist] add semver and normalize package.json with --save-dev [`1b89bc9`](https://github.com/http-party/node-http-proxy/commit/1b89bc9a76c229070ff2572f7a0e1b969c4b4701) -- fix protocol and default port detection on node 0.12.x, compatible with 0.10.x [`5f14bca`](https://github.com/http-party/node-http-proxy/commit/5f14bcaa704fe8a5e6f59d3a89722f22958cade9) -- fix expected error message when node 0.12.x [`0ee314c`](https://github.com/http-party/node-http-proxy/commit/0ee314c436226391318b9a1b623cb3f7e8bf4df7) -- force cipher AES128-GCM-SHA256 in https tests [`c33d161`](https://github.com/http-party/node-http-proxy/commit/c33d1616cdbd60587ca2eb326c48b8a87ac56092) -- [fix] properly support iojs with test checking for HTTPS [`c6dfb04`](https://github.com/http-party/node-http-proxy/commit/c6dfb04a67f3b5ac9a402b7b08c1b8baf29f89e6) -- [dist] Version bump. 1.10.1 [`0bd446c`](https://github.com/http-party/node-http-proxy/commit/0bd446c680e9991accfaa3a6a70e411fdac79164) -- [ci] add 0.12 and iojs to travis [`a6ae6c4`](https://github.com/http-party/node-http-proxy/commit/a6ae6c499743ddade9db12b9f7404d980c79f683) - -## [v1.10.0](https://github.com/http-party/node-http-proxy/compare/v1.9.1...v1.10.0) - 2015-04-01 - -### Merged - -- Fixes / additions to URL rewriting [`#787`](https://github.com/http-party/node-http-proxy/pull/787) - -### Commits - -- [dist] Version bump. 1.10.0 [`1dabda2`](https://github.com/http-party/node-http-proxy/commit/1dabda241f3b93eb9195134042e7a3b84fd0ef57) - -## [v1.9.1](https://github.com/http-party/node-http-proxy/compare/v1.9.0...v1.9.1) - 2015-04-01 - -### Merged - -- Fix #747 [`#798`](https://github.com/http-party/node-http-proxy/pull/798) - -### Fixed - -- Merge pull request #798 from damonmcminn/master [`#747`](https://github.com/http-party/node-http-proxy/issues/747) -- Fix https://github.com/nodejitsu/node-http-proxy/issues/747 [`#747`](https://github.com/nodejitsu/node-http-proxy/issues/747) - -### Commits - -- Add test for https://github.com/nodejitsu/node-http-proxy/issues/747 [`d145152`](https://github.com/http-party/node-http-proxy/commit/d145152655a69479348b0ebc726d4dc19720a12b) -- [dist] Version bump. 1.9.1 [`21b30b7`](https://github.com/http-party/node-http-proxy/commit/21b30b754db4f6410c3d2052bc123b3fdae57c46) - -## [v1.9.0](https://github.com/http-party/node-http-proxy/compare/v1.8.1...v1.9.0) - 2015-03-12 - -### Merged - -- Adding the nodejs0.12 auth option [`#792`](https://github.com/http-party/node-http-proxy/pull/792) -- fix "x-forwarded-proto" in node 0.12 and iojs [`#789`](https://github.com/http-party/node-http-proxy/pull/789) -- Add support for auto host rewriting and protocol rewriting [`#1`](https://github.com/http-party/node-http-proxy/pull/1) -- changed highlighted part - very minor [`#756`](https://github.com/http-party/node-http-proxy/pull/756) -- Update README.md for benchmarks [`#625`](https://github.com/http-party/node-http-proxy/pull/625) - -### Fixed - -- fix "x-forwarded-proto" in node 0.12 and iojs [`#772`](https://github.com/http-party/node-http-proxy/issues/772) -- [api] add an ignorePath option if you want to disregard the path of the incoming request when proxying to the target server fixes #758 [`#758`](https://github.com/http-party/node-http-proxy/issues/758) - -### Commits - -- added auth header test [`df158bf`](https://github.com/http-party/node-http-proxy/commit/df158bfc53e35e62609d8169f3883f6dcf12b73c) -- added auth header test [`ff1626f`](https://github.com/http-party/node-http-proxy/commit/ff1626f0719652c92895cf80f9aacc22ededadad) -- refactor some tests for greater readability [`14415a5`](https://github.com/http-party/node-http-proxy/commit/14415a50741d1f258da884686455d87d68eb8121) -- only rewrite redirect urls when it matches target [`26029ba`](https://github.com/http-party/node-http-proxy/commit/26029ba7ac948b5dc0befb2091cc9a5862d0641c) -- auth header added [`ab5c3e5`](https://github.com/http-party/node-http-proxy/commit/ab5c3e5c819ca993e0616d178bc1d282af539508) -- [dist] Version bump. 1.9.0 [`87a92a7`](https://github.com/http-party/node-http-proxy/commit/87a92a72802a27f817fcba87382d55831fd04ddb) -- end of file line space [`e907d7b`](https://github.com/http-party/node-http-proxy/commit/e907d7bb2aa2825b43d9355cb1ee25bec47b15ad) -- space instead of tabs [`7298510`](https://github.com/http-party/node-http-proxy/commit/7298510e9170d74ff057487085bc1e898f044177) -- space instead of tabs [`63c9262`](https://github.com/http-party/node-http-proxy/commit/63c9262df5bd04d83432db44fce2a4d5b19a59ea) -- auth header added tests [`f55ffa3`](https://github.com/http-party/node-http-proxy/commit/f55ffa356a259c09685c6b768a404e4b73f674ce) - -## [v1.8.1](https://github.com/http-party/node-http-proxy/compare/v1.8.0...v1.8.1) - 2014-12-17 - -### Commits - -- Pass HTTPS client parameters. [`402ab05`](https://github.com/http-party/node-http-proxy/commit/402ab057340a29db7a521ff239c5e21ac0c12be8) -- [dist] Version bump. 1.8.1 [`3311106`](https://github.com/http-party/node-http-proxy/commit/3311106c2c2346f3ac1ffe402b80bca3c7c59275) - -## [v1.8.0](https://github.com/http-party/node-http-proxy/compare/v1.7.3...v1.8.0) - 2014-12-17 - -### Merged - -- Fix variables scope in test [`#752`](https://github.com/http-party/node-http-proxy/pull/752) -- Fix typo [`#751`](https://github.com/http-party/node-http-proxy/pull/751) - -### Commits - -- Added websocket close event test [`8bff3dd`](https://github.com/http-party/node-http-proxy/commit/8bff3ddc1276e3ba18fd68c34d8982148cd21455) -- Deprecated proxySocket event in favor to open event. [`c62610e`](https://github.com/http-party/node-http-proxy/commit/c62610e8e4d59e8ba4642370ff3fb933c6ddb4eb) -- Update README.md [`05d18a4`](https://github.com/http-party/node-http-proxy/commit/05d18a4e1ba6c2de41b0b803cd1793357979384d) -- [fix] style spacing wtf [`ea0a4de`](https://github.com/http-party/node-http-proxy/commit/ea0a4ded803b30144e442344ad5a38a0d34bb3ba) -- [api] add close event in ws-incoming.js [`2653786`](https://github.com/http-party/node-http-proxy/commit/26537866b3ca522927aa4604a958f90774c0c0c0) -- [minor] grammar [`f304861`](https://github.com/http-party/node-http-proxy/commit/f30486195cfa6cfcf6400ac445975d5adada72e4) -- Changed proxyServer and destiny to local variables. [`8a8a894`](https://github.com/http-party/node-http-proxy/commit/8a8a894092ddbec8f0365ced0e94a75b1307ecf1) -- [dist] Version bump. 1.8.0 [`f0db5b3`](https://github.com/http-party/node-http-proxy/commit/f0db5b3f708b0858f617d472dfdd0ba211b774ef) - -## [v1.7.3](https://github.com/http-party/node-http-proxy/compare/v1.7.2...v1.7.3) - 2014-12-09 - -### Fixed - -- [fix] use simple regex instead of indexOf to check the protocol to support without the colon fixes #711 [`#711`](https://github.com/http-party/node-http-proxy/issues/711) - -### Commits - -- [test] show that we support protocol without the colon [`89f9ca1`](https://github.com/http-party/node-http-proxy/commit/89f9ca1e89d679b2b85a8f85b65e8b0878694207) -- [dist] Version bump. 1.7.3 [`6a330ff`](https://github.com/http-party/node-http-proxy/commit/6a330ff904d02a41f9a1cac338a98da1849c54ca) - -## [v1.7.2](https://github.com/http-party/node-http-proxy/compare/v1.7.1...v1.7.2) - 2014-12-08 - -### Merged - -- Fix grammar in README.md [`#749`](https://github.com/http-party/node-http-proxy/pull/749) - -### Fixed - -- [fix] properly include port in host header with changeOrigin in all cases fixes #750 [`#750`](https://github.com/http-party/node-http-proxy/issues/750) - -### Commits - -- [test] add tests for the changeOrigin cases in properly setting the host header [`71a06aa`](https://github.com/http-party/node-http-proxy/commit/71a06aab0249487ff650c8a47906cc8281561664) -- [dist] pin down deps and add requires-port [`81874f7`](https://github.com/http-party/node-http-proxy/commit/81874f795b7df7929e03d9d4cb98a947b1ef114b) -- [dist] Version bump. 1.7.2 [`2086e49`](https://github.com/http-party/node-http-proxy/commit/2086e4917c97f347f84c54b166799bc8db9f4162) - -## [v1.7.1](https://github.com/http-party/node-http-proxy/compare/v1.7.0...v1.7.1) - 2014-12-02 - -### Merged - -- Adding harmon to the README [`#716`](https://github.com/http-party/node-http-proxy/pull/716) - -### Fixed - -- [fix] fix #738 [`#738`](https://github.com/http-party/node-http-proxy/issues/738) -- [fix] simple fixes #748 #744 #746 [`#748`](https://github.com/http-party/node-http-proxy/issues/748) - -### Commits - -- [test] add proper failing test case for #738 [`410a8ce`](https://github.com/http-party/node-http-proxy/commit/410a8ce94ccea566a8e50daf3b78e633b82875cb) -- [Bugfix] Allow for multiple ? in outgoing urls. [`70ed1c4`](https://github.com/http-party/node-http-proxy/commit/70ed1c4273bc64500e8bae9b60d7fd6a19135246) -- [dist] Version bump. 1.7.1 [`56a7b77`](https://github.com/http-party/node-http-proxy/commit/56a7b77645b13d337c1a2f879460193d310454c8) - -## [v1.7.0](https://github.com/http-party/node-http-proxy/compare/v1.6.2...v1.7.0) - 2014-11-25 - -### Merged - -- Allow optional redirect host rewriting. [`#741`](https://github.com/http-party/node-http-proxy/pull/741) -- Set `Content-Length` header for OPTIONS requests [`#742`](https://github.com/http-party/node-http-proxy/pull/742) -- copy headers instead of referencing them so they don't unexpectedly get overwritten [`#736`](https://github.com/http-party/node-http-proxy/pull/736) -- Updated to support error callback on proxy.web and start/proxyReq/end co... [`#735`](https://github.com/http-party/node-http-proxy/pull/735) - -### Commits - -- :pencil: Add host rewrite docs and specs. [`add8133`](https://github.com/http-party/node-http-proxy/commit/add81338a90dae132f9e74fd5a5905fbcef030b7) -- [minor] style consistency [`48ae5d8`](https://github.com/http-party/node-http-proxy/commit/48ae5d828c23d6f19c9e2dd8c922d88a09f5ed0f) -- Updated to support error callback on proxy.web and start/proxyReq/end continue working. [`9ba8311`](https://github.com/http-party/node-http-proxy/commit/9ba8311343fd01b32505b8607ecf4294200f9dde) -- style changes [`84036e9`](https://github.com/http-party/node-http-proxy/commit/84036e9ddd1d4d925006c5438b3bcc0f17ba7a48) -- [fix] be defensive and ensure location is in headers before running url.parse() [`8d68ac0`](https://github.com/http-party/node-http-proxy/commit/8d68ac0e0fa3080b31580aa08e92a46cc1f27696) -- [dist] Version bump. 1.7.0 [`276f65a`](https://github.com/http-party/node-http-proxy/commit/276f65a3b810ded01757ec4bfd4fe2b00a1e66a8) - -## [v1.6.2](https://github.com/http-party/node-http-proxy/compare/v1.6.1...v1.6.2) - 2014-11-11 - -### Merged - -- do not modify the query string [`#733`](https://github.com/http-party/node-http-proxy/pull/733) - -### Commits - -- [fix] style changes [`7c5e40a`](https://github.com/http-party/node-http-proxy/commit/7c5e40a429fbc0c538f38d29d74acb633cb9b8d4) -- [minor] this shouldnt be in var block [`3f19e6e`](https://github.com/http-party/node-http-proxy/commit/3f19e6e178e168a16beee74186691f3e0e54d517) -- [dist] Version bump. 1.6.2 [`709b3e9`](https://github.com/http-party/node-http-proxy/commit/709b3e96560d619fab2617f9ddb902b4982b4103) - -## [v1.6.1](https://github.com/http-party/node-http-proxy/compare/v1.6.0...v1.6.1) - 2014-11-04 - -### Merged - -- websocket needs to respect `options.secure` too [`#729`](https://github.com/http-party/node-http-proxy/pull/729) -- changeOrigin option docs fix [`#724`](https://github.com/http-party/node-http-proxy/pull/724) - -### Commits - -- [dist] Version bump. 1.6.1 [`fa797fc`](https://github.com/http-party/node-http-proxy/commit/fa797fca900c10ebc848a2b445204b47da799483) - -## [v1.6.0](https://github.com/http-party/node-http-proxy/compare/v1.5.3...v1.6.0) - 2014-10-29 - -### Merged - -- Added changeOrigin option with test and docs [`#723`](https://github.com/http-party/node-http-proxy/pull/723) -- I presume you mean couchdb here [`#717`](https://github.com/http-party/node-http-proxy/pull/717) -- update modify request body eg [`#712`](https://github.com/http-party/node-http-proxy/pull/712) - -### Commits - -- harmon notes [`9f684d0`](https://github.com/http-party/node-http-proxy/commit/9f684d0439174d889d7b9a4ef6e2353e09481b2d) -- [dist] Version bump. 1.6.0 [`43641b0`](https://github.com/http-party/node-http-proxy/commit/43641b00b34ccc05bdf09f904695061d7c857aeb) - -## [v1.5.3](https://github.com/http-party/node-http-proxy/compare/v1.5.2...v1.5.3) - 2014-10-01 - -### Merged - -- close socket if upstream request fails [`#709`](https://github.com/http-party/node-http-proxy/pull/709) - -### Commits - -- [dist] Version bump. 1.5.3 [`9577a0f`](https://github.com/http-party/node-http-proxy/commit/9577a0faf2b78af606168673407ac47a851c084c) - -## [v1.5.2](https://github.com/http-party/node-http-proxy/compare/v1.5.1...v1.5.2) - 2014-10-01 - -### Merged - -- close websocket if proxyReq is closed before upgrade [`#708`](https://github.com/http-party/node-http-proxy/pull/708) - -### Commits - -- test closing upstream socket prior to upgrade [`7730548`](https://github.com/http-party/node-http-proxy/commit/77305489d9b88d283802477e155340e5dacfcc2c) -- [dist] Version bump. 1.5.2 [`43c6f0c`](https://github.com/http-party/node-http-proxy/commit/43c6f0c7c06d25a670c410500a8623531df458b1) - -## [v1.5.1](https://github.com/http-party/node-http-proxy/compare/v1.5.0...v1.5.1) - 2014-09-30 - -### Commits - -- [fix] do a check to make sure the server exists before we try and emit [`10a294a`](https://github.com/http-party/node-http-proxy/commit/10a294af4d4baac30b98ea9bec683a974443b83d) -- [dist] Version bump. 1.5.1 [`f0bf741`](https://github.com/http-party/node-http-proxy/commit/f0bf7418156db2cb87a616b0a34bb1f028db9142) - -## [v1.5.0](https://github.com/http-party/node-http-proxy/compare/v1.4.3...v1.5.0) - 2014-09-30 - -### Merged - -- exposing proxySocket on socket to support sniffing messages coming from proxy target [`#706`](https://github.com/http-party/node-http-proxy/pull/706) -- Fixed misleading documentation [`#705`](https://github.com/http-party/node-http-proxy/pull/705) -- Fix typo in README.md [`#702`](https://github.com/http-party/node-http-proxy/pull/702) -- handle 'upgrade' in comma-separated connection header [`#691`](https://github.com/http-party/node-http-proxy/pull/691) - -### Commits - -- test new detection of connection: upgrade [`ec683b9`](https://github.com/http-party/node-http-proxy/commit/ec683b924b1ef8cbdd2cd2bfb7e141b502773163) -- emitting proxySocket on proxyServer [`000eb53`](https://github.com/http-party/node-http-proxy/commit/000eb533de144cad01cfd97edf9ab6c350593d3c) -- [fix] perf optimization so we have a precompiled regexp [`c0a796b`](https://github.com/http-party/node-http-proxy/commit/c0a796b3e31de4f22eef00d93164e7238d9aa3ba) -- use regex to check for upgrade header [`65a21bc`](https://github.com/http-party/node-http-proxy/commit/65a21bce6dbbc6142a851dc959e237c0ef2b1091) -- [dist] Version bump. 1.5.0 [`232258b`](https://github.com/http-party/node-http-proxy/commit/232258b6ec2229497fe557454a121d917968f5e8) -- [minor] extra space [`e7d50b1`](https://github.com/http-party/node-http-proxy/commit/e7d50b1a376035a50c82db38605e99feb30afd36) - -## [v1.4.3](https://github.com/http-party/node-http-proxy/compare/v1.4.2...v1.4.3) - 2014-09-12 - -### Merged - -- Urgent: Fix breaking bug on url joining resulting in paths like `///path`. [`#699`](https://github.com/http-party/node-http-proxy/pull/699) - -### Commits - -- [minor] Added missing JSDoc comments [`73e8a4c`](https://github.com/http-party/node-http-proxy/commit/73e8a4cdd576868bf61d0848cc51f083a75454f9) -- Fix breaking bug on url joining resulting in paths like `///path`. [`73d865b`](https://github.com/http-party/node-http-proxy/commit/73d865bc9f8940f61c1ad4812f220920ead553b5) -- [minor] Code style adjustment. [`3ab6e95`](https://github.com/http-party/node-http-proxy/commit/3ab6e9591e66c203647605b4f275d374472c9d5f) -- Bump version v1.4.3 [`554f59c`](https://github.com/http-party/node-http-proxy/commit/554f59c5182d58b359df0159a29ff5ea35dd3830) -- [ignore] Ignore npm-debug.log [`a934cb6`](https://github.com/http-party/node-http-proxy/commit/a934cb6a46298c380e9bc794f18873576cf73c4c) - -## [v1.4.2](https://github.com/http-party/node-http-proxy/compare/v1.4.1...v1.4.2) - 2014-09-12 - -### Commits - -- [fix] ensure path works on windows because path.join doesnt like URLs [`ed73f06`](https://github.com/http-party/node-http-proxy/commit/ed73f06ed307ad2204e565781cc3154047941a8c) -- [dist] Version bump. 1.4.2 [`df12aeb`](https://github.com/http-party/node-http-proxy/commit/df12aeb12de79de1157898d45f4347fd0037dd70) - -## [v1.4.1](https://github.com/http-party/node-http-proxy/compare/v1.3.1...v1.4.1) - 2014-09-11 - -### Merged - -- Trimming contents of distributed npm package. [`#644`](https://github.com/http-party/node-http-proxy/pull/644) -- Remove changelog - it was not maintained [`#669`](https://github.com/http-party/node-http-proxy/pull/669) -- Removed duplicated imported dependencies [`#695`](https://github.com/http-party/node-http-proxy/pull/695) - -### Commits - -- [test] add test for prependPath option [`e44fabe`](https://github.com/http-party/node-http-proxy/commit/e44fabe58a233b367d42f26f15113e2022f71d7b) -- [api] add prependPath option to go with path change [`9a534c6`](https://github.com/http-party/node-http-proxy/commit/9a534c6ff63d776140918bc839801d247affd18d) -- [dist] Version bump. 1.4.1 [`d5c656b`](https://github.com/http-party/node-http-proxy/commit/d5c656bceb50dc9008ef223bc58b918adcf05352) -- [dist] Version bump. 1.4.0 [`dceef40`](https://github.com/http-party/node-http-proxy/commit/dceef407a1130033679e7e836c6753b76187ce5f) - -## [v1.3.1](https://github.com/http-party/node-http-proxy/compare/v1.3.0...v1.3.1) - 2014-09-09 - -### Merged - -- Allow proxy to maintain the original target path [`#693`](https://github.com/http-party/node-http-proxy/pull/693) -- Clarify usable parameters for 'proxyRes' event [`#686`](https://github.com/http-party/node-http-proxy/pull/686) - -### Commits - -- fix tests for maintaining proxy path [`a65021d`](https://github.com/http-party/node-http-proxy/commit/a65021d52b0ee039486819b5a95f442229458776) -- Fix proxy path [`511b7b3`](https://github.com/http-party/node-http-proxy/commit/511b7b3d4743636de9d9fbe8ff409730d221d273) -- Clarify usable parameters for proxyRes event. [`49a0de1`](https://github.com/http-party/node-http-proxy/commit/49a0de1e7cdcec9b555695605ab914038f99d66b) -- [dist] Version bump. 1.3.1 [`fc73828`](https://github.com/http-party/node-http-proxy/commit/fc73828035baf3cea3664560f8964f2a2a200d0a) -- [ci] remove 0.11.x to avoid failing builds caused by TLS errors [`6b83ae4`](https://github.com/http-party/node-http-proxy/commit/6b83ae47bbf2d5eab8ac94b4d6130e09a21ac85b) - -## [v1.3.0](https://github.com/http-party/node-http-proxy/compare/v1.2.1...v1.3.0) - 2014-08-14 - -### Merged - -- Added functionality to close proxy. [`#679`](https://github.com/http-party/node-http-proxy/pull/679) - -### Commits - -- [fix] cleanup and stylize close function [`261742a`](https://github.com/http-party/node-http-proxy/commit/261742a4295268ef93f45aa0f1e3a04208a2aed3) -- updated close function for safety [`8be9d94`](https://github.com/http-party/node-http-proxy/commit/8be9d945d03169056bbf84d702292b5763b015dc) -- [dist] Version bump. 1.3.0 [`05f0b89`](https://github.com/http-party/node-http-proxy/commit/05f0b891a610fb7779f90916fcd9ed750df818b2) - -## [v1.2.1](https://github.com/http-party/node-http-proxy/compare/v1.2.0...v1.2.1) - 2014-08-14 - -### Commits - -- Added close method to proxy server. [`a3d0219`](https://github.com/http-party/node-http-proxy/commit/a3d02196c5e62cd58bc0ebe8a66afcdb905d96b3) -- [fix] emit an error if proper URL is not passed in as a target [`37036dd`](https://github.com/http-party/node-http-proxy/commit/37036dd32565f72ad5777e47509293db18b60ed3) -- [dist] Version bump. 1.2.1 [`0a6b424`](https://github.com/http-party/node-http-proxy/commit/0a6b424e2c3b6cef68362a71f0e56740b2605af7) - -## [v1.2.0](https://github.com/http-party/node-http-proxy/compare/v1.1.6...v1.2.0) - 2014-08-05 - -### Merged - -- [api] Add event-based ability to modify pre-flight proxy requests. [`#673`](https://github.com/http-party/node-http-proxy/pull/673) - -### Commits - -- [dist] Version bump. 1.2.0 [`63c53a1`](https://github.com/http-party/node-http-proxy/commit/63c53a177217283ec14e4f7c2e891db48842ab4b) - -## [v1.1.6](https://github.com/http-party/node-http-proxy/compare/v1.1.5...v1.1.6) - 2014-07-17 - -### Fixed - -- do proper checking for a pass not existing. fixes #671 [`#671`](https://github.com/http-party/node-http-proxy/issues/671) - -### Commits - -- Remove changelog - it was not maintained [`e336b52`](https://github.com/http-party/node-http-proxy/commit/e336b52629276e647abeee300d7091db44e5b885) -- [dist] Version bump. 1.1.6 [`ed9e12b`](https://github.com/http-party/node-http-proxy/commit/ed9e12b0edb0fc206610e94bd696425619868474) - -## [v1.1.5](https://github.com/http-party/node-http-proxy/compare/v1.1.4...v1.1.5) - 2014-07-10 - -### Merged - -- Fix simple-balancer example [`#666`](https://github.com/http-party/node-http-proxy/pull/666) -- Added proxyTimeout option and two tests for timeout [`#658`](https://github.com/http-party/node-http-proxy/pull/658) - -### Fixed - -- Fix #657 [`#657`](https://github.com/http-party/node-http-proxy/issues/657) -- Fix #657 [`#657`](https://github.com/http-party/node-http-proxy/issues/657) - -### Commits - -- Added targetTimeout option and two tests for timeout [`0f24351`](https://github.com/http-party/node-http-proxy/commit/0f243516e1c6737b95fba220a5028439264b5de6) -- Change name targetTimeout to proxyTimeout [`7b79a74`](https://github.com/http-party/node-http-proxy/commit/7b79a7409ade7a8c79b2ae5761abc4843529063a) -- Trimming contents of distributed npm package. [`431aba7`](https://github.com/http-party/node-http-proxy/commit/431aba79d8d521e228c1403aaf4fd4a26fba03c3) -- [api] also emit the target on a proxy error [`d1baa36`](https://github.com/http-party/node-http-proxy/commit/d1baa3684e449610a2aae270816a7b8a907e588e) -- [dist] Version bump. 1.1.5 [`7104a7c`](https://github.com/http-party/node-http-proxy/commit/7104a7c023073a49091969f825738c79ae036123) -- fix balancer example [`9df4bc1`](https://github.com/http-party/node-http-proxy/commit/9df4bc1e1216a8e53675f0be16fb9081c11da225) - -## [v1.1.4](https://github.com/http-party/node-http-proxy/compare/v1.1.3...v1.1.4) - 2014-05-11 - -### Merged - -- `proxyRes` event, provide access to the req and res objects [`#642`](https://github.com/http-party/node-http-proxy/pull/642) - -### Commits - -- Add a test for the proxyRes event [`1385635`](https://github.com/http-party/node-http-proxy/commit/1385635e18f081af759c8e088f2f6b0219df83db) -- [dist] Version bump. 1.1.4 [`7cb98a4`](https://github.com/http-party/node-http-proxy/commit/7cb98a4e417312f01cf4432b52dbb3773aca60a0) -- Add the req and res objects to the proxyRes event [`1213e46`](https://github.com/http-party/node-http-proxy/commit/1213e46b1b0975ad1d5c5d0aaeace40a0811118f) - -## [v1.1.3](https://github.com/http-party/node-http-proxy/compare/v1.1.2...v1.1.3) - 2014-05-11 - -### Merged - -- Don't override connection header if Upgrading [`#640`](https://github.com/http-party/node-http-proxy/pull/640) - -### Commits - -- Adding test cases on preventing upgrade override [`8aa7c51`](https://github.com/http-party/node-http-proxy/commit/8aa7c519b15f734af7db34d2102781adbeae10aa) -- Update README.md for benchmarks [`4947484`](https://github.com/http-party/node-http-proxy/commit/4947484806f839d5e0a1b615b56a1bc847b8f534) -- [minor] style [`ccad177`](https://github.com/http-party/node-http-proxy/commit/ccad17795417de74bea2bcb6d6c559a4601af76d) -- [dist] Version bump. 1.1.3 [`c472527`](https://github.com/http-party/node-http-proxy/commit/c472527ea60da8b2f737d5742bc61ad2772b7e0b) - -## [v1.1.2](https://github.com/http-party/node-http-proxy/compare/v1.1.1...v1.1.2) - 2014-04-14 - -### Commits - -- [fix test] handle proxy error since we are properly aborting the proxy Request [`61c8734`](https://github.com/http-party/node-http-proxy/commit/61c8734e8b1115fab0e0db23fd8eeccbae61eee0) -- [fix] handle error on incoming request as well and properly abort proxy if client request is aborted [`77a1cff`](https://github.com/http-party/node-http-proxy/commit/77a1cff9bcf697eab27819eef054024bdc0a2ba3) -- [dist] Version bump. 1.1.2 [`c54278b`](https://github.com/http-party/node-http-proxy/commit/c54278bd3b00e82f4253393b6f6beb1d5a1b19e5) - -## [v1.1.1](https://github.com/http-party/node-http-proxy/compare/v1.1.0...v1.1.1) - 2014-04-11 - -### Commits - -- [dist] Version bump. 1.1.1 [`d908e2a`](https://github.com/http-party/node-http-proxy/commit/d908e2ad61013ed1f6e2f80c4b67a6dce7d0f504) -- [fix] let user make the decision on what to do with the buffer [`4f07dc2`](https://github.com/http-party/node-http-proxy/commit/4f07dc220d700ac90bd8405f7cb0724bdae4b430) - -## [v1.1.0](https://github.com/http-party/node-http-proxy/compare/v1.0.3...v1.1.0) - 2014-04-09 - -### Merged - -- Update UPGRADING.md [`#616`](https://github.com/http-party/node-http-proxy/pull/616) - -### Fixed - -- [fix] always be an eventemitter for consistency fixes #606 [`#606`](https://github.com/http-party/node-http-proxy/issues/606) - -### Commits - -- [api] emit a start an an end event [`8b48a9f`](https://github.com/http-party/node-http-proxy/commit/8b48a9fdab01624f7249c53f25919b1295eefb10) -- [dist] Version bump. 1.1.0 [`97ceeb3`](https://github.com/http-party/node-http-proxy/commit/97ceeb37d04e5d2195352365985165866323c4d7) -- [minor] missing angle bracket [`eca765a`](https://github.com/http-party/node-http-proxy/commit/eca765a856164c077ff9128949019552cdaf9a67) - -## [v1.0.3](https://github.com/http-party/node-http-proxy/compare/v1.0.2...v1.0.3) - 2014-03-27 - -### Merged - -- Fix for #591 [`#592`](https://github.com/http-party/node-http-proxy/pull/592) -- Add Repository field to package.json [`#578`](https://github.com/http-party/node-http-proxy/pull/578) -- Fix doc: option lines [`#575`](https://github.com/http-party/node-http-proxy/pull/575) - -### Fixed - -- [api] add toProxy method to allow absolute URLs to be sent when sending to another proxy fixes #603 [`#603`](https://github.com/http-party/node-http-proxy/issues/603) - -### Commits - -- [doc] update docs with toProxy option [`ece85b4`](https://github.com/http-party/node-http-proxy/commit/ece85b4e1ba379b3ed084bd8f606e285c14d4db3) -- [fix] set connection to CLOSE in cases where the agent is false. [`89a22bc`](https://github.com/http-party/node-http-proxy/commit/89a22bc00396f069eeb054ce30891a204077d16d) -- @xtreme-topher-bullock - update package.json to have proper repository key and formatting [`68fa17b`](https://github.com/http-party/node-http-proxy/commit/68fa17bbcaa73ae2d9539cba6f6ddff29f9e30d5) -- [dist] Version bump. 1.0.3 [`07fceb7`](https://github.com/http-party/node-http-proxy/commit/07fceb7c7aed25a8991d0295db4b4a7e50d79cf9) -- Add support for localAddress [`e633b0f`](https://github.com/http-party/node-http-proxy/commit/e633b0f7e4fd719d809eaeb4725e589f79c271ab) - -## [v1.0.2](https://github.com/http-party/node-http-proxy/compare/v1.0.1...v1.0.2) - 2014-01-28 - -### Merged - -- Update README.md [`#566`](https://github.com/http-party/node-http-proxy/pull/566) -- Fix argument order for ws stream pass [`#560`](https://github.com/http-party/node-http-proxy/pull/560) -- Extend listen to enable IPv6 support. [`#558`](https://github.com/http-party/node-http-proxy/pull/558) -- Fix before and after type check [`#556`](https://github.com/http-party/node-http-proxy/pull/556) - -### Fixed - -- Close outgoing ws if incoming ws emits error [`#559`](https://github.com/http-party/node-http-proxy/issues/559) -- [fix] closes #555 [`#555`](https://github.com/http-party/node-http-proxy/issues/555) - -### Commits - -- [fix] replicate node core behavior and throw an error if the user does not add their own error listener [`daad470`](https://github.com/http-party/node-http-proxy/commit/daad4703f3a80014936c89f4d67affdc3246f478) -- [dist] Version bump. 1.0.2 [`4bdc3e4`](https://github.com/http-party/node-http-proxy/commit/4bdc3e4f455b2749c03961404db74e3112a3e9e8) -- [doc] Fix broken image in npm by using an absolute link [`8004f4e`](https://github.com/http-party/node-http-proxy/commit/8004f4e5fc0f535806e92ec4e1bd973a45367dac) - -## [v1.0.1](https://github.com/http-party/node-http-proxy/compare/v1.0.0...v1.0.1) - 2014-01-17 - -### Fixed - -- [fix] closes #553 [`#553`](https://github.com/http-party/node-http-proxy/issues/553) - -### Commits - -- [dist] bump v1.0.1 [`68c5512`](https://github.com/http-party/node-http-proxy/commit/68c55123039369cdf8a55a64b36b719c96b672cf) -- typo [`689459f`](https://github.com/http-party/node-http-proxy/commit/689459fe46885a1b3b8e32a4df55f2d1339143e5) - -## [v1.0.0](https://github.com/http-party/node-http-proxy/compare/v0.10.4...v1.0.0) - 2014-01-16 - -### Merged - -- Http proxy 1.0 [`#552`](https://github.com/http-party/node-http-proxy/pull/552) -- Caronte [`#551`](https://github.com/http-party/node-http-proxy/pull/551) -- Only emit response if a valid server is present [`#549`](https://github.com/http-party/node-http-proxy/pull/549) -- [fix] add `type` to before and after to grab correct `passes`, fixes #537 [`#539`](https://github.com/http-party/node-http-proxy/pull/539) -- export the proxy itself from the main require [`#536`](https://github.com/http-party/node-http-proxy/pull/536) - -### Fixed - -- [fix] closes #547 [`#547`](https://github.com/http-party/node-http-proxy/issues/547) -- Merge pull request #539 from nodejitsu/fix-before-after [`#537`](https://github.com/http-party/node-http-proxy/issues/537) -- [fix] add `type` to before and after to grab correct `passes`, fixes #537 [`#537`](https://github.com/http-party/node-http-proxy/issues/537) - -### Commits - -- [nuke] old files [`a4ee8f9`](https://github.com/http-party/node-http-proxy/commit/a4ee8f9d82f71ef423c401b1f5e9f712b13cbc98) -- [docs] upgrade UPGRADING.md [`e599151`](https://github.com/http-party/node-http-proxy/commit/e5991519dbc7838aa4b8aeb5077d1c1ec5a13813) -- [api] export the httpProxy.Server as the main export but preserve the createServer factory [`182c76c`](https://github.com/http-party/node-http-proxy/commit/182c76cd2322d4d4c041c2a964d51db396c5c96b) -- [fix] remove caronte [`d6d2d0c`](https://github.com/http-party/node-http-proxy/commit/d6d2d0c8821bba9888eee7c3881fc408b3b2008e) -- [fix] ee3 error handling [`d23353d`](https://github.com/http-party/node-http-proxy/commit/d23353d980d8aa1b2606e3d36a83d27432952bef) -- [fix] comments [`6fa23e1`](https://github.com/http-party/node-http-proxy/commit/6fa23e11f6dc0b9c09766b268611ade919bfaa08) - -## [v0.10.4](https://github.com/http-party/node-http-proxy/compare/v0.10.3...v0.10.4) - 2013-12-27 - -### Merged - -- Update README.md [`#521`](https://github.com/http-party/node-http-proxy/pull/521) -- Better examples [`#520`](https://github.com/http-party/node-http-proxy/pull/520) -- Send path in req.path and not the url [`#416`](https://github.com/http-party/node-http-proxy/pull/416) -- Fix websocket error handing [`#518`](https://github.com/http-party/node-http-proxy/pull/518) -- attempting to fix links to 2 source locations in README.md [`#502`](https://github.com/http-party/node-http-proxy/pull/502) -- [merge] rename codename to actual project name [`#492`](https://github.com/http-party/node-http-proxy/pull/492) -- [merge] Added error handling example [`#484`](https://github.com/http-party/node-http-proxy/pull/484) -- [merge] https & agent [`#482`](https://github.com/http-party/node-http-proxy/pull/482) -- [merge] caronte tests [`#476`](https://github.com/http-party/node-http-proxy/pull/476) -- FIX: ws error event [`#475`](https://github.com/http-party/node-http-proxy/pull/475) -- Fix accidental write to global variable. [`#472`](https://github.com/http-party/node-http-proxy/pull/472) -- [fix] 2 spelling mistakes [`#14`](https://github.com/http-party/node-http-proxy/pull/14) -- [fix] add ability to proxy websockets over HTTPS [`#11`](https://github.com/http-party/node-http-proxy/pull/11) -- Tests [`#3`](https://github.com/http-party/node-http-proxy/pull/3) - -### Fixed - -- determine x-forwarded-port from host header [`#341`](https://github.com/http-party/node-http-proxy/issues/341) -- [fix] closes #529 [`#529`](https://github.com/http-party/node-http-proxy/issues/529) -- [fix] fixes #341 [`#341`](https://github.com/http-party/node-http-proxy/issues/341) -- [tests] https test pass, fix #511. Exposed the rejectUnauthorized flag [`#511`](https://github.com/http-party/node-http-proxy/issues/511) -- [fix] pass proper options object that extend the global options and parse the per proxy args into options. fixes #510 [`#510`](https://github.com/http-party/node-http-proxy/issues/510) -- [readme] add links to badges on readme, fix #483 [`#483`](https://github.com/http-party/node-http-proxy/issues/483) -- [fix] pooled connections, closes #478 [`#478`](https://github.com/http-party/node-http-proxy/issues/478) -- [fix] add 0.10 link, fixes #459 [`#459`](https://github.com/http-party/node-http-proxy/issues/459) -- [fix] closes #473 [`#473`](https://github.com/http-party/node-http-proxy/issues/473) -- [fix] add 0.10 compatibily.. closes #474 [`#474`](https://github.com/http-party/node-http-proxy/issues/474) -- [fix] headers, closes #469 [`#469`](https://github.com/http-party/node-http-proxy/issues/469) -- [fix] headers, fixes #467 [`#467`](https://github.com/http-party/node-http-proxy/issues/467) -- [fix] yawnt baaaka .. fixes #8 [`#8`](https://github.com/http-party/node-http-proxy/issues/8) - -### Commits - -- [fix] more jshint intendation [`17399e7`](https://github.com/http-party/node-http-proxy/commit/17399e7c3ef9addf9dd8f7c628b273e693f128a1) -- [fix] tests [`a255f98`](https://github.com/http-party/node-http-proxy/commit/a255f984fecf24c9290f3ad58d1b68e54a7509eb) -- [minor] remove coverage [`335af81`](https://github.com/http-party/node-http-proxy/commit/335af81d0244e62ecb501690bd15bc5a04ec51a3) -- [examples] updated websockets examples [`ed8c9ee`](https://github.com/http-party/node-http-proxy/commit/ed8c9eeba99d60f39f5c36c4f34ed1a781d2cfd8) -- [tests] removed unused tests [`7e25bde`](https://github.com/http-party/node-http-proxy/commit/7e25bded27effc1b3d47121ce21465a4e2ec7c0b) -- [tests] Added a test case for run all the examples [`bc236d7`](https://github.com/http-party/node-http-proxy/commit/bc236d7e95ef10bc17cf551eea2cd2fb9bf265eb) -- [tests] drop the test of own streams, moved the usable tests [`dc9d7e5`](https://github.com/http-party/node-http-proxy/commit/dc9d7e5452c7d39ae1d242cb8021ca75e4f736d4) -- [fix] default port [`d166354`](https://github.com/http-party/node-http-proxy/commit/d1663549ec070e7ae8bc45ffb148f40ee903192f) -- [tests] added the ws passes test and the streams webscokets test [`8b3fe32`](https://github.com/http-party/node-http-proxy/commit/8b3fe32f6ae60ae067bc5e40cdc43015e689467f) -- [refactor minor] s/caronte/http-proxy/ or s/caronte/httpProxy/ where appropriate. [`bb0d28c`](https://github.com/http-party/node-http-proxy/commit/bb0d28c58729e2cc70e8446f7fbf1113a6fa9310) -- [examples] updated bodyDecoder middleware example [`c82ff2c`](https://github.com/http-party/node-http-proxy/commit/c82ff2c3c0c0165421fbc4e7e94fa3f59d59aa38) -- [dist] first [`4d13156`](https://github.com/http-party/node-http-proxy/commit/4d131567211bcefc6ef0b0592d374fef7bd5abd8) -- [examples] update forward and custom error examples [`b726116`](https://github.com/http-party/node-http-proxy/commit/b7261161343c3471201d6de36ba1030aced26425) -- [refactor docs] add descriptions [`d05af4a`](https://github.com/http-party/node-http-proxy/commit/d05af4af60a5f3d308aa68bf09ab0cf9e5528c52) -- [tests] make the tests run with the last refactor [`5bb83b9`](https://github.com/http-party/node-http-proxy/commit/5bb83b967edb514402698eecfe3db7ab5fe60b06) -- [examples] deleted this examples [`bdeabb7`](https://github.com/http-party/node-http-proxy/commit/bdeabb767a537bcb9f98ef74f6efe9762a9b1c34) -- websocket draft [`07551c6`](https://github.com/http-party/node-http-proxy/commit/07551c63e428551e5d6e52362efd9620a14c71b4) -- [fix] naming [`2a59366`](https://github.com/http-party/node-http-proxy/commit/2a593664a5768c90d9b2edf4c298460416b38926) -- [dist doc] Added documentation for consistent benchmarking of node-http-proxy [`f7f5fa7`](https://github.com/http-party/node-http-proxy/commit/f7f5fa727e8f1d3f4946e61ad03830dab1da01a5) -- [examples] update old examples [`7e44d36`](https://github.com/http-party/node-http-proxy/commit/7e44d3669bbd1b13e6452f265d52b22396f68b5d) -- [docs] more short examples to the Readme [`0393b5d`](https://github.com/http-party/node-http-proxy/commit/0393b5da990bb45e873bb80d87a0bc9e4dd6a477) -- [examples] updated old proxy examples [`e02317c`](https://github.com/http-party/node-http-proxy/commit/e02317ce86ff2dabd496cf7e2741e219a22ac817) -- [wip] Initial HTTPS->HTTP test, updated https-secure example. Work in progress, need to add more https tests [`33a2462`](https://github.com/http-party/node-http-proxy/commit/33a2462d28c7d1fa26b03bcf290242ff7cd83e7a) -- [docs] readme [`886a870`](https://github.com/http-party/node-http-proxy/commit/886a8707078f59d0467b34686455bb5bdfadbc0c) -- [examples] added error-handling using callbacks and HTTP-to-HTTPS examples [`d7064f2`](https://github.com/http-party/node-http-proxy/commit/d7064f2e1e149fe870cbb158932cb99f9f192fce) -- [examples] updated old examples [`588327c`](https://github.com/http-party/node-http-proxy/commit/588327c2c4392618b515164989f08ef20a30842b) -- stuff [`e45bfd6`](https://github.com/http-party/node-http-proxy/commit/e45bfd66a21a2470c5a4a4cc1d6095494bbc0f6b) -- [doc] added some documentation to functions and comments to understand better the code [`5dcdf2b`](https://github.com/http-party/node-http-proxy/commit/5dcdf2b36c24a9584f044b7529265b9ac861d8c7) -- Fixed issue where error callback would not invoke, including new test cases. Added req/res values to error events. [`0bfb9be`](https://github.com/http-party/node-http-proxy/commit/0bfb9be418926f2113489e92504038127d4c04bb) -- [examples] updated balancer examples [`831a44b`](https://github.com/http-party/node-http-proxy/commit/831a44b3c8c3acf6c046c47703a07cd6362a0d1c) -- socket.io stuff [`a74cd85`](https://github.com/http-party/node-http-proxy/commit/a74cd85c8a5aae2851acf7139648fefd6a02a57b) -- [tests] move contributions of @mmoulton to correct place [`7c72f3b`](https://github.com/http-party/node-http-proxy/commit/7c72f3b407a084a896e420c23ababc3e9357feca) -- [tests] this file is not necessary anymore [`881c7e6`](https://github.com/http-party/node-http-proxy/commit/881c7e62e0bef7b4b9f81b6fd121f7ad6641bd77) -- [refactor] move to leaner architecture [`8273cb6`](https://github.com/http-party/node-http-proxy/commit/8273cb6461e4d33f36e583b0354d1bea038d0a56) -- [fix] remove trailing whitespaces [`0aeaba7`](https://github.com/http-party/node-http-proxy/commit/0aeaba7fe6c51f150d0322eb90a77c1701ed88f5) -- [test] added tests for web-outgoing.js [`16a4d9d`](https://github.com/http-party/node-http-proxy/commit/16a4d9da1136b79f40ad80482d3fd17dc74274b1) -- [fix] some stuff start debugging proxystream [`d4f0da8`](https://github.com/http-party/node-http-proxy/commit/d4f0da898e5e8a2d6740e50a7fc34576435e1132) -- [tests] now each test use a different port to avoid some slow opening and closing ports [`c75d06c`](https://github.com/http-party/node-http-proxy/commit/c75d06c5f92eb7c814deb49bb33cf9fffc632d97) -- [tests] fixed inherits problem and listen for the correct event [`c65ffbb`](https://github.com/http-party/node-http-proxy/commit/c65ffbb976467dc1768983dcffe111d18e8f2db1) -- [fix] ProxyStraem now works [`356f43d`](https://github.com/http-party/node-http-proxy/commit/356f43d719998d135e0fc404ac8508e330cf1e5b) -- [examples] fix the copyright header of example files [`e592c53`](https://github.com/http-party/node-http-proxy/commit/e592c53d1a23b7920d603a9e9ac294fc0e841f6d) -- [feature] start working on the new server [`b79bd29`](https://github.com/http-party/node-http-proxy/commit/b79bd29d5e984f34b9c07fbdc803aed83b3fd0bb) -- ENH: updated examples [`f566a42`](https://github.com/http-party/node-http-proxy/commit/f566a42e511f4a6a8f3620f64e05df209e61b64f) -- [examples] add example of gzip using the connect.compress() middleware [`2142c50`](https://github.com/http-party/node-http-proxy/commit/2142c506e08f56d52e1995da5506c3e032f19c3c) -- [fix] refactor error handling [`601dbcb`](https://github.com/http-party/node-http-proxy/commit/601dbcbfe929af31995568b4f36b877245809058) -- [tests] fixed according new refactor and added test to common.setupSocket() [`1cb967b`](https://github.com/http-party/node-http-proxy/commit/1cb967b90aaa5b9da57727b8acbd95108437797a) -- [feature] websocket support [`79a14ac`](https://github.com/http-party/node-http-proxy/commit/79a14acfd2b2bf03f5ae2b334e7a37e619da6bb9) -- keepalive sockets [`dad211e`](https://github.com/http-party/node-http-proxy/commit/dad211e71c9ac3b32eba1ea3755edb688053b9d3) -- [tests] Using target field, tests now pass. We are missing the tests using forward field [`8085178`](https://github.com/http-party/node-http-proxy/commit/8085178dc2c24567adfb872a583863709ce60b5b) -- [fix] callback as optional error handler [`c7924e0`](https://github.com/http-party/node-http-proxy/commit/c7924e01f92aeec07333273f0882c1dd5e9521ae) -- ENH: added new https example, needs to be simplified before merge [`427d8d8`](https://github.com/http-party/node-http-proxy/commit/427d8d85369b0cd1d38afa0dd0f28ac98fa16001) -- [test] proxystream test [`c961279`](https://github.com/http-party/node-http-proxy/commit/c9612798f1207a4c40b616608bf6274d79ad0e4d) -- [lib] initial draft to websockets passes [`79f7f99`](https://github.com/http-party/node-http-proxy/commit/79f7f99528661162ae4153856888f078f666e017) -- [fix] minor [`7599cee`](https://github.com/http-party/node-http-proxy/commit/7599cee3fd03a5ce645e313f35557a41c9ac1aee) -- [tests] added HTTPS to HTTPS test [`31d919b`](https://github.com/http-party/node-http-proxy/commit/31d919b0a3d0b7f574e88fc5eed093c6b1a53548) -- [feature] started working on error propagation, kinda sucks, gotta think it over [`9ab8749`](https://github.com/http-party/node-http-proxy/commit/9ab8749a9bec33b49c495975e8364336ad7be1a3) -- [test] testing the onResponse proxy method [`27df8d7`](https://github.com/http-party/node-http-proxy/commit/27df8d72ad86d02cfce00a6e5c183d93dd50f97e) -- [fix] remove duplicate [`10c0f11`](https://github.com/http-party/node-http-proxy/commit/10c0f11b68e39552051e508c7bf20d65d2d59177) -- [tests] add more tests [`cedc5c4`](https://github.com/http-party/node-http-proxy/commit/cedc5c4bd2059585e1222ec4f03f09e8bcc808fc) -- [docs] Update readme with more how to [`ae0faef`](https://github.com/http-party/node-http-proxy/commit/ae0faef5aa0080d742a9740f9cb38bfd54b7d97e) -- [tests] added test for socket.io proxying [`10a0db4`](https://github.com/http-party/node-http-proxy/commit/10a0db4f0dd4594839f9098b9d67130085a067bc) -- [tests] added test HTTPS to HTTP using own server [`bbe3bfd`](https://github.com/http-party/node-http-proxy/commit/bbe3bfdf98255b82a185a798ff9f29e74615b6ca) -- [examples] update the error-handling example using the new error handle way [`a1b25a1`](https://github.com/http-party/node-http-proxy/commit/a1b25a123b4ff71e731f9beb27c5e078acfead65) -- [fix] quote [`c4ddc4e`](https://github.com/http-party/node-http-proxy/commit/c4ddc4edd324d9910a11eea14561a0e3b953f29c) -- ENH: updated README and added examples file. [`07091b5`](https://github.com/http-party/node-http-proxy/commit/07091b5077a40dfee29f6fd33ecb38d3fa25b801) -- [test] passes/web.js (first 2 funcs) [`d40e4be`](https://github.com/http-party/node-http-proxy/commit/d40e4beb62381b962b6cf3254451de0a39f182b1) -- [test] add test for forwardstream [`8fc3389`](https://github.com/http-party/node-http-proxy/commit/8fc33893672d26013c2b2ff396b777bcf1751527) -- [tests] fixing tests, fixed some typos and changed how passes are stored [`a704213`](https://github.com/http-party/node-http-proxy/commit/a7042132c881656dd32f915d9b0b962f0ef92efb) -- [test] added the lib/caronte/streams/forward.js initial test, one test pending [`2fac7b9`](https://github.com/http-party/node-http-proxy/commit/2fac7b9b009b12a940efb22de3af6db55ee686a9) -- [api] add draft for proxystream [`4f24664`](https://github.com/http-party/node-http-proxy/commit/4f24664e8a50aa9b9a3ea155d067b85f94a8c81b) -- [experiment] new api for proxying [`07cfa6b`](https://github.com/http-party/node-http-proxy/commit/07cfa6b981ff54d8d96eea6c9aa4b560ee3867ec) -- [tests] the options got a problem and this test probe that timeout is not being set [`1d1ee88`](https://github.com/http-party/node-http-proxy/commit/1d1ee8858283d7c8984f1c1d6c5185b6822f9235) -- new error propagation [`3a39e44`](https://github.com/http-party/node-http-proxy/commit/3a39e444ff68a74f6b586f0736bbd3f8a2511ca5) -- [fix] docs [`ec981c5`](https://github.com/http-party/node-http-proxy/commit/ec981c5b74bf43dd36c8ca89833b751f59f01d38) -- [examples] added concurrent proxy example [`04c1011`](https://github.com/http-party/node-http-proxy/commit/04c10113f7a3b568fb95b18f30e4aca3e059d961) -- [fix] closes number #487 [`cde08fb`](https://github.com/http-party/node-http-proxy/commit/cde08fb2ee2df03c9457678d8e6776a5d89165b2) -- [test] started writing tests [`16eacfa`](https://github.com/http-party/node-http-proxy/commit/16eacfa961d2a2d80534e95eba83010ed6ab01b4) -- [tests] added tests for websockets [`02007ed`](https://github.com/http-party/node-http-proxy/commit/02007ed0fb38f798436ae5669bb18d4f27496667) -- Revert "[fix] fixed options and server reference to can access them from passes functions" [`babdf53`](https://github.com/http-party/node-http-proxy/commit/babdf531fecd32f9af0963902909fcfa2cd374f1) -- mm test file [`1a7bef0`](https://github.com/http-party/node-http-proxy/commit/1a7bef0cda58243416a263075dc6eb51f22b6dec) -- [fix] fixed options and server reference to can access them from passes functions [`90fb01d`](https://github.com/http-party/node-http-proxy/commit/90fb01d38ac5af7ef395547b24e985b6f63b4abc) -- [examples] added forward example [`7a3f6df`](https://github.com/http-party/node-http-proxy/commit/7a3f6dfbcc80ba32fa81004438c637e8d29eb029) -- [docs] add UPGRADING.md [`db12f6c`](https://github.com/http-party/node-http-proxy/commit/db12f6c24e22c034c698457cc28ff60c990b55a5) -- DOC: Added error handling example [`32a4088`](https://github.com/http-party/node-http-proxy/commit/32a40889cedfd6b0d92224aa921700a7b7271c68) -- [examples] updated the modifyResponse-middleware example [`de3ff11`](https://github.com/http-party/node-http-proxy/commit/de3ff11656b4a847de3a63b28feed39b6c816480) -- [test] test onError part, proxying to no where [`b85aa16`](https://github.com/http-party/node-http-proxy/commit/b85aa16e75401a223a947cde444d42cf7eeafb67) -- ENH: updated agent options in `common.setupOutgoing` [`12cda56`](https://github.com/http-party/node-http-proxy/commit/12cda561afe534427a5f84da9d7e0beb64a8ecbc) -- [fix] minor and short fixes [`e0faaaf`](https://github.com/http-party/node-http-proxy/commit/e0faaaf81152203b96f0313c68706468e7ee7357) -- support websockets [`4a4607d`](https://github.com/http-party/node-http-proxy/commit/4a4607d075a912746386d1751fd6b0fc98cf6b20) -- [test] COVERAGE [`004a46c`](https://github.com/http-party/node-http-proxy/commit/004a46c09df2f0f7b15d8e8f7119bc6039e0c01c) -- [misc] add a LICENSE file [`584ce76`](https://github.com/http-party/node-http-proxy/commit/584ce76e7576c906e25cdd04a2e079f97bcf86ff) -- ENH: updated https and agent option [`13741a8`](https://github.com/http-party/node-http-proxy/commit/13741a823f1c1c884d4a37e597e4b188598b0e25) -- [fix] write connection header [`2c10f25`](https://github.com/http-party/node-http-proxy/commit/2c10f256b658bc0e906c20f29d94ab7eaf653055) -- [fix] merge #495, thanks @glasser [`d0862af`](https://github.com/http-party/node-http-proxy/commit/d0862aff0c693366dcb11649b6abe1d011268953) -- support forward [`8c8c455`](https://github.com/http-party/node-http-proxy/commit/8c8c455541f21ad9a9ac7ca19d1f37368206a2e2) -- [tests] fix tests set correct host headers [`cfd417d`](https://github.com/http-party/node-http-proxy/commit/cfd417de2352b0f05535b979dc15abff60c1fb96) -- [fix] Optimize fix for `x-forwarded-for-port`. [`2d42709`](https://github.com/http-party/node-http-proxy/commit/2d42709c3283637de16a49e815b03e63432bbd29) -- ENH: updated readme with an example [`edd8e2f`](https://github.com/http-party/node-http-proxy/commit/edd8e2f04e4b39391b062fa6437d61b4ebde8748) -- [doc] update README.md [`dcb873a`](https://github.com/http-party/node-http-proxy/commit/dcb873ad9992b1534615d59b8a0a70e8b87d7884) -- [test] passes/web.js XHeaders func [`c02b721`](https://github.com/http-party/node-http-proxy/commit/c02b721321c455bc287c3fed6b9b21392ce2fc70) -- [fix] fixed passes functions, now 'this' can be used and options are stored on 'this.options' [`9b3e1eb`](https://github.com/http-party/node-http-proxy/commit/9b3e1eb247df29d18ea299ff4ebb2f10eeb71269) -- Revert "[fix] fixed passes functions, now 'this' can be used and options are stored on 'this.options'" [`5e130de`](https://github.com/http-party/node-http-proxy/commit/5e130de8548ad41b821da49299b4fd1c9536c5f0) -- [minor] Remove duplicate dependencies and cleanup of the scripts [`a51b062`](https://github.com/http-party/node-http-proxy/commit/a51b0622780f48160001f9e74340f7d720cbfce6) -- TEST: added agent and header tests [`39b0c46`](https://github.com/http-party/node-http-proxy/commit/39b0c46a6967fda5329760ad93a8ec01bc4a6f14) -- [examples] fix styling and bad spaces [`6a6dfbb`](https://github.com/http-party/node-http-proxy/commit/6a6dfbb79dc156679f75dd519344d19a5b61613b) -- ENH: added error events [`1b867a7`](https://github.com/http-party/node-http-proxy/commit/1b867a7f594f7dfe49fc17ff53451a353ec509d9) -- [test] remove chunked on http1.0 [`ca09263`](https://github.com/http-party/node-http-proxy/commit/ca092635e7ac4d967b554e3b94a16a931946d464) -- [tests] fix test to use the new way to pass options [`52ecd52`](https://github.com/http-party/node-http-proxy/commit/52ecd52ee5aa78603e44ba8d5ff9187410351622) -- [examples] fixed https examples [`a467b7b`](https://github.com/http-party/node-http-proxy/commit/a467b7b4a9614a7cbfdc256524e1495616e3d4d9) -- Revert "[tests] fix test to use the new way to pass options" [`2bf20d6`](https://github.com/http-party/node-http-proxy/commit/2bf20d61d53201e9820c5f9215e641fcf88f5172) -- [fix] better code [`3d8e538`](https://github.com/http-party/node-http-proxy/commit/3d8e5383cd9d527825f95d9071a87865fcebca05) -- [feature] implement _write and _read [`6a4294c`](https://github.com/http-party/node-http-proxy/commit/6a4294cbdfe85fa162969b1393032adc9d418441) -- [fix] use the correct arguments order [`cc09ae6`](https://github.com/http-party/node-http-proxy/commit/cc09ae6a345cfde1689e1d8731c5822675c59d4d) -- [fix] fix the correct order of arguments in ws-incoming passes [`02df9a3`](https://github.com/http-party/node-http-proxy/commit/02df9a33c5cce17ea32a892017acbe5ce57ab2e5) -- [fix] write status [`e08d4ed`](https://github.com/http-party/node-http-proxy/commit/e08d4edad339d0f7f55900b3e6e6a0e770960215) -- [fix] finished jshint fixes [`455f97e`](https://github.com/http-party/node-http-proxy/commit/455f97e14cb4929e0a3a5c746471e9c5e76436fc) -- Update the README to describe middleware err handler. [`25bb3bf`](https://github.com/http-party/node-http-proxy/commit/25bb3bfa7012e0f975e10f0311cae8c39183fa41) -- Prevent headers to be sent twice [`8332e74`](https://github.com/http-party/node-http-proxy/commit/8332e744202ed9de94288d8f1c822cd9fe788983) -- [examples] added package.json with the dependencies needed by examples [`d85ccdd`](https://github.com/http-party/node-http-proxy/commit/d85ccdd333edcfc7551bcf8e0ffd7dc166e38e61) -- [tests] added .travis.yml file [`0602500`](https://github.com/http-party/node-http-proxy/commit/06025002303f351f71d9e5f78a93895257f0d283) -- [dist minor] 2 space indents next time @samalba [`7e8041d`](https://github.com/http-party/node-http-proxy/commit/7e8041d2b687b8375a1d0fe45270029c6e8ddee6) -- [fix] naming [`8931009`](https://github.com/http-party/node-http-proxy/commit/893100972c22febbf133134394bc0bcef47d9e12) -- Fix for #458. Host header may cause some sites not to be proxyable with changeOrigin enabled [`781c038`](https://github.com/http-party/node-http-proxy/commit/781c038f2b4d14a01cc9297e1e0dba6ce39dd6cb) -- [docs] typos, typos everywhere... [`03880d8`](https://github.com/http-party/node-http-proxy/commit/03880d8d069e9e17ca7d7aea6eb760f6626a869c) -- ENH: updated `ws` and `web` functions to use the global options object as a base [`268afe3`](https://github.com/http-party/node-http-proxy/commit/268afe34bb51448d511c9cd73c03e97d1c1baee0) -- [fix] make @mmalecki a happy camper [`c9cd6d2`](https://github.com/http-party/node-http-proxy/commit/c9cd6d2ad324e0e6222932c8f29f27621071e045) -- write [`f97c0c6`](https://github.com/http-party/node-http-proxy/commit/f97c0c6167371c5ff92e6361b1df02e3fd5506d7) -- [fix] [`a9f9e21`](https://github.com/http-party/node-http-proxy/commit/a9f9e21eda2f8e912523e6b62abb0101c0353505) -- [fix] coveralls.. will it work? [`f36cb4d`](https://github.com/http-party/node-http-proxy/commit/f36cb4d5a110fc86272e878278f103f313c86f56) -- ENH: updated target and forward options so that a string may be specified [`ef946a7`](https://github.com/http-party/node-http-proxy/commit/ef946a7697b38b13178881b3d1ebde63681dd4a1) -- added option for eventlistenerCount(max) [`8eb6780`](https://github.com/http-party/node-http-proxy/commit/8eb6780f8705caff13a5375446539b0621d497d7) -- [fix] support buffer [`1204a35`](https://github.com/http-party/node-http-proxy/commit/1204a35e467c6c1855ba0dac8f55d79f899148a6) -- DOC: updated readme with options [`1b5fb1d`](https://github.com/http-party/node-http-proxy/commit/1b5fb1d8fc21421b8383919d93e4149b586b211b) -- ENH: added 'headers' to available options, to add or overwrite existing headers [`7d840d3`](https://github.com/http-party/node-http-proxy/commit/7d840d35151be1aac612798754af47368594781d) -- [fix] move logo [`57abb7f`](https://github.com/http-party/node-http-proxy/commit/57abb7f26c14e281c3be07a8b84e3c79e066f59f) -- FIX: tests. still need to add more tests tho [`a350fad`](https://github.com/http-party/node-http-proxy/commit/a350fadea6bace293131581487f8c66948009449) -- [fix] move logo [`aaff196`](https://github.com/http-party/node-http-proxy/commit/aaff1966e4e2eb42c9890e57737f57a64e8d964a) -- [docs] add travis build status [`6b61878`](https://github.com/http-party/node-http-proxy/commit/6b618787598a2a37850898dbdb3b4fe8f3c3414d) -- [fix] do not send chunked responses to http1.0 clients [`8663ac1`](https://github.com/http-party/node-http-proxy/commit/8663ac1c43505f0081d906c3cd8e702d4b5ddeb0) -- [dist] Bump dependencies. [`a81dd8d`](https://github.com/http-party/node-http-proxy/commit/a81dd8d53e1595cba9acf5cc3ca9517165dcc4aa) -- [fix] readme [`4d3a4e1`](https://github.com/http-party/node-http-proxy/commit/4d3a4e1ee7370347898d1863ab73aa68ed345d8d) -- [fix] proxying to https [`26c4c43`](https://github.com/http-party/node-http-proxy/commit/26c4c43a06263ec6721bc0e8a90644297d0cf217) -- [fix] new logo [`ee3cc38`](https://github.com/http-party/node-http-proxy/commit/ee3cc380665a31ec6af28ddb73dfc543f430d3f8) -- [fix] naming convention [`7d71a86`](https://github.com/http-party/node-http-proxy/commit/7d71a867a8bdc375f7577cec3905cca89bbf415c) -- fix docs [`9243444`](https://github.com/http-party/node-http-proxy/commit/9243444ac006f73c00b0f1f78c4a77f342b0b4e4) -- [fix] short circuit [`a6256ca`](https://github.com/http-party/node-http-proxy/commit/a6256cac1df1739e3da78fe5f0cf122ef7ce6b14) -- [tests] this test is already in web-incoming tests [`920f1e7`](https://github.com/http-party/node-http-proxy/commit/920f1e7707aa1751577533cd368529f8a704d7af) -- Emit middlewareError when on middleware error. [`bc12ca3`](https://github.com/http-party/node-http-proxy/commit/bc12ca39394f9aeed3e3047f59035ba48afa2885) -- DOC: updated readme [`7ad5c0f`](https://github.com/http-party/node-http-proxy/commit/7ad5c0f993294c9e2e7650e15fbc62d11a2cb062) -- [docs] add logo [`8b05626`](https://github.com/http-party/node-http-proxy/commit/8b05626eed5e45e72cf9b1f14a4c4dca1dd2ed0f) -- [fix] making @stoke a happy camper [`34f16e7`](https://github.com/http-party/node-http-proxy/commit/34f16e74647095199f84ab61e10c8dafd60b505a) -- [feature] add buffer support [`e3f8d5f`](https://github.com/http-party/node-http-proxy/commit/e3f8d5fdbe1ebc4f04188d95bbef768d09718d2c) -- [Fix] 2 spelling mistakes [`5823842`](https://github.com/http-party/node-http-proxy/commit/58238421945bcc4236e280ebca7799b831ae29a4) -- [fix] do not call .end [`6e77cd3`](https://github.com/http-party/node-http-proxy/commit/6e77cd390929842088ae9f6deb922a6627ddfecd) -- attempting to fix link to valid options properties [`bbe2b27`](https://github.com/http-party/node-http-proxy/commit/bbe2b2788a7ee3c74fd44fe88b6dcf213264436f) -- [fix] slimmer proxying [`031aa0f`](https://github.com/http-party/node-http-proxy/commit/031aa0fbf30bd377696c4efa508f6fc769bf1070) -- [fix] use agent pool [`abf1d90`](https://github.com/http-party/node-http-proxy/commit/abf1d90fdf05a17ebe05a3e90d464a592e0aee69) -- [tests] fix test using undefined url [`c4d56a5`](https://github.com/http-party/node-http-proxy/commit/c4d56a5faf1e89cdeb911f0ece0efe065eb58c45) -- [fix] legacy [`162a42f`](https://github.com/http-party/node-http-proxy/commit/162a42f58f515c5418ccfac0b68f4c928103b1e1) -- [tests] fixing minor typos [`b333e63`](https://github.com/http-party/node-http-proxy/commit/b333e63648aa67ea1b1aaf17ba684e5fc6f751a6) -- Updated readme [`bd106d6`](https://github.com/http-party/node-http-proxy/commit/bd106d69f074a1c7018e685a4e144e23a17beb8c) -- [misc] use the local mocha instead the global [`f1aeb05`](https://github.com/http-party/node-http-proxy/commit/f1aeb0500cde39b63e570323e0e478530d1222ab) -- added unlimited listeners to the reverproxy event obj. [`1333c0c`](https://github.com/http-party/node-http-proxy/commit/1333c0cc62e7b590843f9b00326fe80137163c5e) -- [tests] throw error when no options, ALL TESTS PASSING! YAY [`86750c7`](https://github.com/http-party/node-http-proxy/commit/86750c7e594c419dfae957aaf7e44e61e1d480e8) -- ENH: updated example [`1c7ace2`](https://github.com/http-party/node-http-proxy/commit/1c7ace26c5a36fb63497f1ab67793c5b75495063) -- [merge] PR #470 [`38e6d7c`](https://github.com/http-party/node-http-proxy/commit/38e6d7cd5449a7264dcf5244b3dfd07b2dda60e1) -- [fix] remove stuff [`6a03e5f`](https://github.com/http-party/node-http-proxy/commit/6a03e5f7cf356416ea13584e279f5bfa3791c058) -- [test][misc] remove node@0.8 to test on travis [`8eff1a1`](https://github.com/http-party/node-http-proxy/commit/8eff1a1f26bb739dfc5a1ad90b140ff2a18921d5) -- merge with @cronopio [`0fb3381`](https://github.com/http-party/node-http-proxy/commit/0fb33810f5e70b714bd9868557d85a531b8e11e3) -- [merge] text [`98f29bd`](https://github.com/http-party/node-http-proxy/commit/98f29bdcfca9b818ffe107b09578539fdf379c8a) -- [fix] woops [`bd3df45`](https://github.com/http-party/node-http-proxy/commit/bd3df45010f282997cae3a699c7ecb885c01bdf8) -- [test] Test on newer version of node [`ebbba73`](https://github.com/http-party/node-http-proxy/commit/ebbba73eda49563ade09f38bdc8aef13d1cf6c00) -- new error propagation - follows [`1993faf`](https://github.com/http-party/node-http-proxy/commit/1993faf8a4227acda3423d46cf2cf13b4d9861e7) -- [fix] minor typo [`5a1504f`](https://github.com/http-party/node-http-proxy/commit/5a1504f0764b7747b53cc0d92a69ff3093e85ade) -- [fix] proxy to http(s) [`3c91ed3`](https://github.com/http-party/node-http-proxy/commit/3c91ed3d26d9af640d0c7a09fb9cdaf80ad673ca) -- Put the arguments the right way around in the README. [`1457980`](https://github.com/http-party/node-http-proxy/commit/145798062e332ac2aed7f8e8e3240e38464c870a) -- [fix] use some [`4480699`](https://github.com/http-party/node-http-proxy/commit/4480699d3a2a5080c051e7b8a100689fd1f58657) -- [fix] layout [`d7078e2`](https://github.com/http-party/node-http-proxy/commit/d7078e2fdd16d23d0b5f8f1d8a7ab3e9011fea4f) -- [docs] logo [`dd0f7b8`](https://github.com/http-party/node-http-proxy/commit/dd0f7b8876ae5b57fffab8857735b25b159f2bdb) -- [fix] url [`0637322`](https://github.com/http-party/node-http-proxy/commit/0637322d96e54bbcf5a14bf009dd73314cada4ce) -- [fix] opts [`adc5be0`](https://github.com/http-party/node-http-proxy/commit/adc5be020c7fff09a1c05ac771d5c5ab61002c23) -- [docs] fix syntax highlighting [`da9de70`](https://github.com/http-party/node-http-proxy/commit/da9de7034a452d1281217a349bc9403fddcc2b7f) -- [fix] typo [`275a519`](https://github.com/http-party/node-http-proxy/commit/275a5192fa257f78287a954b347e65023795487d) -- [tests] fix code coverage, changed pattern on blanket options [`4090250`](https://github.com/http-party/node-http-proxy/commit/40902506af3361b642b8798350b48404fe0a4e78) -- Put the arguments the right way around in emitter. [`7c8ecc8`](https://github.com/http-party/node-http-proxy/commit/7c8ecc8ea85b59fc16b55b9a142372b6ac168b2a) -- [fix] link [`72a89ea`](https://github.com/http-party/node-http-proxy/commit/72a89eab8bafef3742d78e8de8631094f961f427) -- [fix] space [`69f126b`](https://github.com/http-party/node-http-proxy/commit/69f126b34cbd190be8541a854d21f13bfb5a61bf) -- [fix] tests [`8269eca`](https://github.com/http-party/node-http-proxy/commit/8269eca2bb34d08336b8889e06e53d3522fa79fe) -- [fix] console [`18341d5`](https://github.com/http-party/node-http-proxy/commit/18341d559717e0a86f5ee4da024109e4b5a595a7) -- Set travis to run `npm test` while we fix coveralss.io integration [`e2a5d51`](https://github.com/http-party/node-http-proxy/commit/e2a5d513cac3ebceff446787fa106c7f00caf785) -- [fix] making @jcrugzz a happy camper [`2e7343d`](https://github.com/http-party/node-http-proxy/commit/2e7343d728a3187d48821b88ec2e2d4699bb2afe) -- [fix] minor typo [`5d66ce1`](https://github.com/http-party/node-http-proxy/commit/5d66ce11bb7eef7e704a2de2c0ef3b5f754843e9) -- [tests] tests fixed [`d60353f`](https://github.com/http-party/node-http-proxy/commit/d60353f80bbbcba128a2c51066e107365270e878) -- [tests] disabled the examples-test by now [`d83fdf6`](https://github.com/http-party/node-http-proxy/commit/d83fdf69a1121bfcfba72bbffcd3105ae5852c56) -- [fix] _ because it is unused [`590bb60`](https://github.com/http-party/node-http-proxy/commit/590bb604dae11223a0ae80469b59d6d341488f1f) -- [tests] disable test, by now is not throwing without options [`a2b1f0a`](https://github.com/http-party/node-http-proxy/commit/a2b1f0a4c9079342db6255c5f92db4a0cb992707) -- [fix] support target and forward [`961d2f9`](https://github.com/http-party/node-http-proxy/commit/961d2f9400b4cfd236c3c8ccbf401d37f8e871b8) -- [dist] Version bump. 0.10.4 [`840f6d8`](https://github.com/http-party/node-http-proxy/commit/840f6d8d29dffc11d3726123c2d400940ca2bdda) -- [fix] remove old reminescence [`4d65280`](https://github.com/http-party/node-http-proxy/commit/4d65280ea313438a94589bacf55f7a09cc107888) -- [feature] add emit proxyRes [`dda6f7a`](https://github.com/http-party/node-http-proxy/commit/dda6f7a45a46d2bf63e482d0b47b7c36ae548546) -- [docs] test badge [`1ceea3e`](https://github.com/http-party/node-http-proxy/commit/1ceea3e5f9b6232d60d673946bbccb7d8ccb4beb) -- [tests] remove caronte and use http-proxy for file names [`c9f5772`](https://github.com/http-party/node-http-proxy/commit/c9f5772fc18226aca31471bc96c44a6dbff5cbea) -- [logo] [`4c2f2f3`](https://github.com/http-party/node-http-proxy/commit/4c2f2f3b9a5ba65f97403e778a670f14301d52c1) - -## [v0.10.3](https://github.com/http-party/node-http-proxy/compare/v0.10.2...v0.10.3) - 2013-06-20 - -### Merged - -- Pass default certs to SNICallback example [`#419`](https://github.com/http-party/node-http-proxy/pull/419) - -### Fixed - -- Pass default certs to SNICallback example [`#399`](https://github.com/http-party/node-http-proxy/issues/399) - -### Commits - -- [dist] Bump version to 0.10.3 [`2fd748f`](https://github.com/http-party/node-http-proxy/commit/2fd748fb61dac7de0daa50aabbface7033c6a222) -- [fix] Respect `maxSockets` from `target` options in `RoutingProxy` [`e1d384e`](https://github.com/http-party/node-http-proxy/commit/e1d384e769e9f4adc5a06c516cfb721ff24b4b6d) -- Send path in req.path and not the url [`0c75323`](https://github.com/http-party/node-http-proxy/commit/0c753234c0c85333f909bdbef034ffb6e192bad5) - -## [v0.10.2](https://github.com/http-party/node-http-proxy/compare/v0.10.1...v0.10.2) - 2013-04-21 - -### Merged - -- Correct keep-alive responses to HTTP 1.0 clients [`#407`](https://github.com/http-party/node-http-proxy/pull/407) - -### Fixed - -- [minor] Style compliance. Fixes #402. [`#402`](https://github.com/http-party/node-http-proxy/issues/402) - -### Commits - -- Correct keep-alive responses to HTTP 1.0 clients. [`a29b5e8`](https://github.com/http-party/node-http-proxy/commit/a29b5e8e289c34c00d2b450e5fb9dd1969db4b97) -- [minor] Strip trailing whitespace. [`7fc39d7`](https://github.com/http-party/node-http-proxy/commit/7fc39d77f47311b82c24ab05f8e1a45a2733305c) -- Add headers on 'handshake' [`985025c`](https://github.com/http-party/node-http-proxy/commit/985025c90f3b2fafede64d8b17c318326f2423d9) -- Don't test raw HTTP 1.0 requests over HTTPS. [`daf53bd`](https://github.com/http-party/node-http-proxy/commit/daf53bd753879223dc84a49c92d0efaf576c1fd3) -- [dist] Version bump. 0.10.2 [`de0928f`](https://github.com/http-party/node-http-proxy/commit/de0928f616dd62165e8a22c00d091cabf31e1e87) - -## [v0.10.1](https://github.com/http-party/node-http-proxy/compare/v0.10.0...v0.10.1) - 2013-04-12 - -### Merged - -- Fix for slab buffer retention, leading to large memory consumption [`#370`](https://github.com/http-party/node-http-proxy/pull/370) - -### Commits - -- [dist] Version bump. 0.10.1 [`9c13ad4`](https://github.com/http-party/node-http-proxy/commit/9c13ad46e416125373d6604f3954ec3df1f55449) - -## [v0.10.0](https://github.com/http-party/node-http-proxy/compare/v0.9.1...v0.10.0) - 2013-03-18 - -### Merged - -- Change the emitter of the `proxyResponse` event [`#385`](https://github.com/http-party/node-http-proxy/pull/385) -- Fixing a bug that generates an unexpected TypeError [`#383`](https://github.com/http-party/node-http-proxy/pull/383) -- Mention Harmon used for response modifications in the readme [`#384`](https://github.com/http-party/node-http-proxy/pull/384) - -### Commits - -- [dist] Update CHANGELOG.md [`8665f3c`](https://github.com/http-party/node-http-proxy/commit/8665f3cc600feecbb4c8229699823149c69a144f) -- Harmon messsage [`35ba0db`](https://github.com/http-party/node-http-proxy/commit/35ba0db554c6bace21b1bacfa8f5fb6df4228db0) -- [fix breaking] Emit the `proxyResponse` event on the HttpProxy instance to reduce listener churn and reference counts. [`2620f06`](https://github.com/http-party/node-http-proxy/commit/2620f06e2db9a267945566f10837c4c2a5df753d) -- [dist] Version bump. 0.10.0 [`71183bf`](https://github.com/http-party/node-http-proxy/commit/71183bf30bc2b9ad2eaf57c51980eeb0bc7edff0) -- Fixing the if statement as it lead to 'TypeError: Parameter 'url' must be a string, not undefined' in certain cases [`c9b6895`](https://github.com/http-party/node-http-proxy/commit/c9b6895c5e14add6aba4f826a2173458a1896a5f) -- Harmon messsage [`4e42354`](https://github.com/http-party/node-http-proxy/commit/4e42354e77d5731a383d516fc0b249d5d0eda745) - -## [v0.9.1](https://github.com/http-party/node-http-proxy/compare/v0.9.0...v0.9.1) - 2013-03-09 - -### Commits - -- [dist doc] Updated CHANGELOG.md for `v0.9.1` [`ea5e214`](https://github.com/http-party/node-http-proxy/commit/ea5e214522d8ac34d1129b28ff188c0f232ce63f) -- [dist] Version bump. 0.9.1 [`701dc69`](https://github.com/http-party/node-http-proxy/commit/701dc698e3eb39ca6836a02611d8dce750f4e212) -- [breaking] Ensure that `webSocketProxyError` also receives the error to be consistent with `proxyError` events. [`c78356e`](https://github.com/http-party/node-http-proxy/commit/c78356e9cf27a21c57e4c98ef7dd3c22abe864c2) - -## [v0.9.0](https://github.com/http-party/node-http-proxy/compare/v0.8.7...v0.9.0) - 2013-03-09 - -### Merged - -- If HTTP 1.1 is used and backend doesn't return 'Connection' header, expicitly return Connection: keep-alive. [`#298`](https://github.com/http-party/node-http-proxy/pull/298) -- add "with custom server logic" to the "Proxying WebSockets" section of the readme [`#332`](https://github.com/http-party/node-http-proxy/pull/332) -- routing proxy 'this' reference bug? [`#365`](https://github.com/http-party/node-http-proxy/pull/365) -- fixed issue #364 'proxyError' event emitted twice [`#374`](https://github.com/http-party/node-http-proxy/pull/374) -- Misleading documentation for Websockets via .createServer [`#349`](https://github.com/http-party/node-http-proxy/pull/349) - -### Fixed - -- [api test] Manually merge #195 from @tglines since that fork was deleted. Update tests to use new macros. Fixes #195. Fixes #60. [`#195`](https://github.com/http-party/node-http-proxy/issues/195) [`#60`](https://github.com/http-party/node-http-proxy/issues/60) -- [fix] Set "content-length" header to "0" if it is not already set on DELETE requests. Fixes #338. [`#338`](https://github.com/http-party/node-http-proxy/issues/338) -- [fix] Do not use "Transfer-Encoding: chunked" header for proxied DELETE requests with no "Content-Length" header. Fixes #373. [`#373`](https://github.com/http-party/node-http-proxy/issues/373) -- [fix] http-proxy should not modify the protocol in redirect request for external sites. Fixes #359. [`#359`](https://github.com/http-party/node-http-proxy/issues/359) -- [fix] Emit `notFound` event when ProxyTable location does not exist. Fixes #355. Fixes #333. [`#355`](https://github.com/http-party/node-http-proxy/issues/355) [`#333`](https://github.com/http-party/node-http-proxy/issues/333) -- [fix] Make options immutable in `RoutingProxy`. Fixes #248. [`#248`](https://github.com/http-party/node-http-proxy/issues/248) -- [fix] Remove special case handling of `304` responses since it was fixed in 182dcd3. Fixes #322. [`#322`](https://github.com/http-party/node-http-proxy/issues/322) -- [fix] Ensure `response.headers.location` is defined. Fixes #276. [`#276`](https://github.com/http-party/node-http-proxy/issues/276) - -### Commits - -- [minor] s/function(/function (/ s/){/) {/ [`9cecd97`](https://github.com/http-party/node-http-proxy/commit/9cecd97153ccce4f81c5eda35a49079e651fb27a) -- working on x-forwarded-for [`1332409`](https://github.com/http-party/node-http-proxy/commit/133240937dc63aca0007388327837bc24808f79a) -- Routing Proxy was not sending x-forward-*. Fixing It... [`916d44e`](https://github.com/http-party/node-http-proxy/commit/916d44e3d2a17bb9d5178f347ddad9796b988e05) -- Added timeout option and test to test new timeout parameter, added requestFail assertion. [`89d43c2`](https://github.com/http-party/node-http-proxy/commit/89d43c20dd0dec1dda1fd70e57f3f250b9e3b431) -- Add tests for headers bug fixes [`ecb5472`](https://github.com/http-party/node-http-proxy/commit/ecb547223f3f1d9bf551842c2026ee2f1a18638a) -- Added simple round robin example with websocket support [`83fbd42`](https://github.com/http-party/node-http-proxy/commit/83fbd4250660f41de1ab2b5490a3bf58200ae148) -- - support unix donain sockets and windows named pipes (socketPath) on node 0.8.x. On node 0.6.x the support was opaque via port, but on the new node, socketPath should be set explicitely. [`ffe74ed`](https://github.com/http-party/node-http-proxy/commit/ffe74ed299f81206b898147dbcc985519b2921f8) -- pathnameOnly flag added. Ignores hostname and applies routing table to the paths being requested. [`46b078a`](https://github.com/http-party/node-http-proxy/commit/46b078a98d10de7726a3bbca89121acc57ad7625) -- [doc] added comments to pathnameOnly block. [`5e6be6c`](https://github.com/http-party/node-http-proxy/commit/5e6be6ccf5a39ff450e57d7b24e374a83569fa85) -- remove offending code, final fix for issue #364 [`3b84e27`](https://github.com/http-party/node-http-proxy/commit/3b84e27ab4efd5ce3b8ac837d699d4ff6661c7e7) -- memory leak fix in closing of the scokets [`2055d0c`](https://github.com/http-party/node-http-proxy/commit/2055d0c8ec16699ffb06adf6d64d9506920b2071) -- Fix truncated chunked responses [`ef66833`](https://github.com/http-party/node-http-proxy/commit/ef66833c4d7f07ae9f42026f2bcc0fbca2440579) -- Re-added previous description [`603106a`](https://github.com/http-party/node-http-proxy/commit/603106a13d28c0199fa4456cc9aee1692eb2588c) -- pathnameOnly option documented in the Readme.md [`a1607c1`](https://github.com/http-party/node-http-proxy/commit/a1607c1684a7d7617e5148a0dca882eb08a9f03b) -- [fix minor] Prevent crashes from attempting to remove listeners more than once when proxying websocket requests. [`a681493`](https://github.com/http-party/node-http-proxy/commit/a681493371ae63f026e869bf58b6fea682dc5de3) -- Added comments [`64efa7f`](https://github.com/http-party/node-http-proxy/commit/64efa7f9291a2377a32e942a247700b71b107993) -- Revert "[fix minor] Prevent crashes from attempting to remove listeners more than once when proxying websocket requests." [`c6da760`](https://github.com/http-party/node-http-proxy/commit/c6da760ca9f375025229fe3fc174aca943362f38) -- [doc dist] Update CHANGELOG.md for `v0.9.0`. [`133115c`](https://github.com/http-party/node-http-proxy/commit/133115c9760130dcef447efbd18c470c08795c90) -- add support for loading CA bundles [`10f6b05`](https://github.com/http-party/node-http-proxy/commit/10f6b0577518bdfcb6b43c1f516dc988bdcade53) -- problem: don't want to run my server as root to bind to privileged ports (e.g. 80, 443). [`2c36507`](https://github.com/http-party/node-http-proxy/commit/2c3650746cd90fed63b140a8d393e18bd35cd8f9) -- Add 'proxyResponse' event so observer can modify response headers or abort response. [`3b86a7a`](https://github.com/http-party/node-http-proxy/commit/3b86a7aae3fc366c5fa8645285a4368dbac7a0dc) -- [minor] Move private helper to end of file. [`476cbe7`](https://github.com/http-party/node-http-proxy/commit/476cbe741fc41b7f1eb269d841d922784e8b3c6b) -- Fix for retaining large slab buffers in node core [`d2888c8`](https://github.com/http-party/node-http-proxy/commit/d2888c83f5eab3fb82425ef4fd51e62621bf2764) -- [dist] Update `devDependencies` [`ad21310`](https://github.com/http-party/node-http-proxy/commit/ad213106d06cfc79004841f04b8e73fe7d7ef67a) -- [minor] Small whitespace compliance. [`ea0587a`](https://github.com/http-party/node-http-proxy/commit/ea0587a8f98b1eedc38c66b69293ae091e24be6e) -- [doc fix] Add undefined var in example. [`deca756`](https://github.com/http-party/node-http-proxy/commit/deca7565c51fd678354d26eaae7fe2481e36e2c3) -- working on x-forwarded-for [`31fc94a`](https://github.com/http-party/node-http-proxy/commit/31fc94aa5e43c54033d5384caaf104eebf3889bd) -- Allow event observers to access upstream response headers and data. [`4c130f5`](https://github.com/http-party/node-http-proxy/commit/4c130f5dac5f2cfbfc2618446b86244aff4cb04f) -- [fix doc] Fix bad variable reference in `README.md`. [`440013c`](https://github.com/http-party/node-http-proxy/commit/440013c263a96c6681bfe92a8f56db93b58efa8d) -- Change wording for handling websocket proxy events [`ee6bbe0`](https://github.com/http-party/node-http-proxy/commit/ee6bbe00244c90bd532b11ff1c796aea8c7372f8) -- [dist] Version bump. 0.9.0 [`c68e038`](https://github.com/http-party/node-http-proxy/commit/c68e0389120d8530e578e20496d8ee091e69a580) -- fix 'this' reference in routing proxy listener bindings [`15afc23`](https://github.com/http-party/node-http-proxy/commit/15afc23a275f3fa16653fff6179368122661a0af) -- cleanning [`8d87399`](https://github.com/http-party/node-http-proxy/commit/8d8739999fcaf4cdd8f2471046f6f036c44dc8f7) -- cleanning [`9672b99`](https://github.com/http-party/node-http-proxy/commit/9672b9927156a0dfe3ce4539f380aaf3172f6267) -- Fix typo which slipped in during patch clean-up [`ba65a48`](https://github.com/http-party/node-http-proxy/commit/ba65a485fcf7230e85cee77f6eefcd17e46c8f86) -- Remove data event that is not needed after-all. [`b1c4bd6`](https://github.com/http-party/node-http-proxy/commit/b1c4bd61e8ae5705d4cc97bf719c381554671967) - -## [v0.8.7](https://github.com/http-party/node-http-proxy/compare/v0.8.6...v0.8.7) - 2012-12-22 - -### Commits - -- [fix] Handle errors on request object [`edfe869`](https://github.com/http-party/node-http-proxy/commit/edfe86915941e465a06c1d0a3330ee32e5834aa6) -- [dist] Bump version to 0.8.7 [`26d3646`](https://github.com/http-party/node-http-proxy/commit/26d3646ff252129f35525ab0540a31f5617a31d2) -- [fix] Don't remove `error` listener after response ends [`223eacd`](https://github.com/http-party/node-http-proxy/commit/223eacda85a4267f2860f6c46f7dedfa9db8c224) - -## [v0.8.6](https://github.com/http-party/node-http-proxy/compare/v0.8.5...v0.8.6) - 2012-12-21 - -### Merged - -- http-proxy: 304 responses should emit 'end' too [`#337`](https://github.com/http-party/node-http-proxy/pull/337) - -### Commits - -- [bench] Remove silly "benchmarks" [`2bd9cd9`](https://github.com/http-party/node-http-proxy/commit/2bd9cd9adb6cea6763930468d22cb56fffab6218) -- [bench] Add a benchmark for websockets throughput [`6797a27`](https://github.com/http-party/node-http-proxy/commit/6797a2705a309d19a655ab468bcc80ba2e43cf41) -- [fix] Handle socket errors [`2a61ec8`](https://github.com/http-party/node-http-proxy/commit/2a61ec85bdaeed9a5fca2a117efb36a7f76becc4) -- [dist] Update `devDependencies` [`b81d9b7`](https://github.com/http-party/node-http-proxy/commit/b81d9b71daa32a571384cff29d81227993299236) -- [dist] Bump version to 0.8.6 [`6cd78f6`](https://github.com/http-party/node-http-proxy/commit/6cd78f6af9ca08b8797c409896eea2ae6bb6d835) -- [bench] More exact size display [`7bc1a62`](https://github.com/http-party/node-http-proxy/commit/7bc1a628feab78f8931e9e6481737dd871debfeb) - -## [v0.8.5](https://github.com/http-party/node-http-proxy/compare/v0.8.4...v0.8.5) - 2012-11-16 - -### Merged - -- lib: allow overriding maxSockets [`#323`](https://github.com/http-party/node-http-proxy/pull/323) - -### Fixed - -- [fix] Convert strings to numbers if possible in `.createServer` [`#321`](https://github.com/http-party/node-http-proxy/issues/321) - -### Commits - -- [test] Delete invalid core test [`886a395`](https://github.com/http-party/node-http-proxy/commit/886a395429f20163992ca76e7b0d059256f56ba6) -- [test] Upgrade `common.js` from node core [`fefbf04`](https://github.com/http-party/node-http-proxy/commit/fefbf04ac03126858bdad07df7b10131a46e17d6) -- add "with custom server logic" to the "Proxying WebSockets" section of the readme.md [`03dbe11`](https://github.com/http-party/node-http-proxy/commit/03dbe115c2b088737e5b9abcadf91a8298f56f1f) -- [test] Kill child process when exiting test runner [`74ec175`](https://github.com/http-party/node-http-proxy/commit/74ec1757153c503ce57eb552031648fe79731d48) -- [fix] Correctly kill test processes [`b8c27ed`](https://github.com/http-party/node-http-proxy/commit/b8c27ed565e416827b7c4bb123aa9ee119d008e6) -- [test] Make global detection work with older node versions [`3531fd6`](https://github.com/http-party/node-http-proxy/commit/3531fd609a8ce156d27c27ca38ac912a73aebfeb) -- [dist] Bump version to 0.8.5 [`22639b3`](https://github.com/http-party/node-http-proxy/commit/22639b378189ec78f9962dde64337df050e29a6f) -- [test] Run core tests on `npm test` [`41c9a9c`](https://github.com/http-party/node-http-proxy/commit/41c9a9caad679221b8f1d4dcfb74f9b2bdb8270b) -- [test] Stop testing on `node v0.9`, tests timeout [`9042665`](https://github.com/http-party/node-http-proxy/commit/9042665ea98a6587e1d6800e51d3c354c0a1b20a) - -## [v0.8.4](https://github.com/http-party/node-http-proxy/compare/v0.8.2...v0.8.4) - 2012-10-23 - -### Merged - -- Events patch [`#320`](https://github.com/http-party/node-http-proxy/pull/320) -- documentation for options [`#315`](https://github.com/http-party/node-http-proxy/pull/315) -- Added travis build status [`#308`](https://github.com/http-party/node-http-proxy/pull/308) -- Fix installation instructions: s/http/https/ [`#302`](https://github.com/http-party/node-http-proxy/pull/302) -- If supplied pass changeOrigin option through to HttpProxy instance if set in RoutingProxy [`#285`](https://github.com/http-party/node-http-proxy/pull/285) - -### Commits - -- [fix test] Fix examples to use newest version of socket.io and helpers. Added tests for ensuring that examples require as expected with no errors. [`fd648a5`](https://github.com/http-party/node-http-proxy/commit/fd648a529090cefc202613fff3fdfec9ba0e6a72) -- [fix] spdy should look like https when forwarding (until we get a client) [`698b01d`](https://github.com/http-party/node-http-proxy/commit/698b01da8e1fe6195b00e5006032d262a0a86f4e) -- [docs] options [`4c8e1d9`](https://github.com/http-party/node-http-proxy/commit/4c8e1d96a36523a548959415903bc669ebcc138d) -- http-proxy: emit websocket:start [`5df6e7b`](https://github.com/http-party/node-http-proxy/commit/5df6e7bdb8d4685a18e94ff1bf117ce8eff8d1c9) -- [fix] `destroy()` websockets in case of an error [`0d00b06`](https://github.com/http-party/node-http-proxy/commit/0d00b06af307dc5c70c36e89617a08486eb665e2) -- [fix] Suppress EADDRINUSE errors from `test/examples-test.js` since we are just looking for require-time errors. Isolate tests to ensure idempotency of ports [`c4a7b15`](https://github.com/http-party/node-http-proxy/commit/c4a7b1584302fe12a8fc06b6774db5ff602c3607) -- [docs] more options [`d4cb9da`](https://github.com/http-party/node-http-proxy/commit/d4cb9dad6ce36a823c9e8970e0bb3266d844e536) -- If HTTP 1.1 is used and backend doesn't return 'Connection' header, explicitly [`850171c`](https://github.com/http-party/node-http-proxy/commit/850171cdc41cb93343f7c31f650ac908a8d2dacb) -- [refactor] Pass all options to `Agent` constructor [`eafdc74`](https://github.com/http-party/node-http-proxy/commit/eafdc744b67b33b5ed3cfc80de84dafcd850bdd0) -- Fix socket leaks when FIN packet isn't responded to [`24b8406`](https://github.com/http-party/node-http-proxy/commit/24b84068eac1c704d9f8df3dc833b976850c328f) -- [fix] Partial fix for rejecting self-signed certs in tests [`2e7d8a8`](https://github.com/http-party/node-http-proxy/commit/2e7d8a88f4b470dcc9da1639fe2a69e03251036c) -- [fix] Dont use `-i` when running vows because it supresses `--target=` and `--proxy=` CLI arguments [`1783ab0`](https://github.com/http-party/node-http-proxy/commit/1783ab0625743355eecc11f5cfd57469c429daa0) -- [test] Add `node v0.9` testing, test all branches [`4f6387c`](https://github.com/http-party/node-http-proxy/commit/4f6387c17f55c23da4aac161cf2e5a4dd2a25c40) -- [minor] Remove `setEncoding` on incoming socket [`812868d`](https://github.com/http-party/node-http-proxy/commit/812868ddfc720b6c4fd26603c2fe4d5ae68f2492) -- [dist] v0.8.3 [`a89a5b8`](https://github.com/http-party/node-http-proxy/commit/a89a5b80889a56dd31634096bc6546b6b7b26da2) -- [fix] Ignore npm version errors when installing dependencies for examples [`a454666`](https://github.com/http-party/node-http-proxy/commit/a454666e7a0465ed65b7bbd29cf1b0c6c126d153) -- [fix] function [`213e03c`](https://github.com/http-party/node-http-proxy/commit/213e03c99844c5c984fbf857bae32095165a1e8f) -- [dist] Bump version to 0.8.4 [`4d7e8a8`](https://github.com/http-party/node-http-proxy/commit/4d7e8a808d83d3db1b729820aba5f481ab3d18f4) -- [minor doc] Correct comment [`cee27fe`](https://github.com/http-party/node-http-proxy/commit/cee27feeddf9b4db06917dfa9e59e6bcd7e14c27) - -## [v0.8.2](https://github.com/http-party/node-http-proxy/compare/v0.8.1...v0.8.2) - 2012-07-22 - -### Merged - -- Add example for gzip middleware using a proxy table. [`#221`](https://github.com/http-party/node-http-proxy/pull/221) -- Implement RoutingProxy.prototype.remove [`#246`](https://github.com/http-party/node-http-proxy/pull/246) -- prefer `target.hostname` over `target.host` [`#235`](https://github.com/http-party/node-http-proxy/pull/235) -- add "Using two certificiates" to the https section of the readme.md [`#275`](https://github.com/http-party/node-http-proxy/pull/275) -- Add support for setting the host in the executable [`#268`](https://github.com/http-party/node-http-proxy/pull/268) -- Hi! I fixed some calls to "sys" for you! [`#270`](https://github.com/http-party/node-http-proxy/pull/270) -- Fix bug: x-forwarded-proto set incorrectly as httphttps or wswss [`#266`](https://github.com/http-party/node-http-proxy/pull/266) - -### Commits - -- [refactor] Rewrite tests to use saner vows idioms. Update tests to use latest socket.io [`4ae7a5b`](https://github.com/http-party/node-http-proxy/commit/4ae7a5b84011bb5b9ec3a36ded4c5e5b3330db80) -- [dist] Remove out-dated docco docs [`2d75510`](https://github.com/http-party/node-http-proxy/commit/2d75510d827c770c30a7292c31ef0f2007da7086) -- [refactor test] Finish removing old test code. [`e2dc7f9`](https://github.com/http-party/node-http-proxy/commit/e2dc7f96937e5d565fea16c9f56b9f5d3e427de2) -- [dist] Complete JSHint compliance except for `too many var statements` [`36226da`](https://github.com/http-party/node-http-proxy/commit/36226daa2e4cbc65fae80d2d09fd64c0e7ce36ba) -- [refactor test] Add support for `http*-to-http*` testing from CLI arguments [`828dbeb`](https://github.com/http-party/node-http-proxy/commit/828dbebcaaf11e338a7727bf9d2fff8bfbd3726e) -- [fix api] Optimize lookups in the ProxyTable. Ensure that RoutingProxy can proxy to `https` by default. [`55286a7`](https://github.com/http-party/node-http-proxy/commit/55286a7c499c0fe267f75d8e8441ff89f1e65f99) -- Whitespace fixes. [`04ce49c`](https://github.com/http-party/node-http-proxy/commit/04ce49c5b289acb6ad72303e9ac70c637ea490b2) -- [refactor tests] Finished refactoring tests to support `ws*-to-ws*` tests based on CLI arguments [`7e854d7`](https://github.com/http-party/node-http-proxy/commit/7e854d778b89201f7cb933e8bbda66316b98b0b4) -- [doc] Minor formatting updates to README.md [`6753951`](https://github.com/http-party/node-http-proxy/commit/67539519faf1f32073fdb562404bd897072e24ee) -- [fix] Changed require('util') to require('util') for compatibility with node v0.8 [`bf7e328`](https://github.com/http-party/node-http-proxy/commit/bf7e328fb837de69455c42f41822b0caae2777b6) -- [test] Add .travis.yml file for Travis CI. [`29e6e74`](https://github.com/http-party/node-http-proxy/commit/29e6e748f780629d05635eebb421e8ee1d125058) -- Use changeOrigin for proxyRequest. [`0273958`](https://github.com/http-party/node-http-proxy/commit/0273958b0a5c7823c6212cb6ce6e4f801a215d3b) -- adding support for setting the host [`06e78f2`](https://github.com/http-party/node-http-proxy/commit/06e78f27475165d023fd66afbe5dd626a6a548af) -- match style requested by @cronopio [`415d4ed`](https://github.com/http-party/node-http-proxy/commit/415d4ed908e45332421d683eb45e0d6873b85ae7) -- Fix bug: x-forwarded-proto set incorrectly [`0933f1c`](https://github.com/http-party/node-http-proxy/commit/0933f1c598c1b62a75e040c3ed3ccb262612d3c9) -- [dist] Version bump. 0.8.2 [`13c34d0`](https://github.com/http-party/node-http-proxy/commit/13c34d09b2f8be14fbbe4be77c49b23066667f1b) - -## [v0.8.1](https://github.com/http-party/node-http-proxy/compare/v0.8.0...v0.8.1) - 2012-06-05 - -### Merged - -- [misc] Updating the changelog. Close #137 [`#256`](https://github.com/http-party/node-http-proxy/pull/256) -- Fix problem with req.url not being not properly replaced. [`#218`](https://github.com/http-party/node-http-proxy/pull/218) -- Re-emit 'start', 'forward' and 'end' events in RoutingProxy, and fix some hanging issues. [`#216`](https://github.com/http-party/node-http-proxy/pull/216) -- Fixes to make the websockets example work. [`#225`](https://github.com/http-party/node-http-proxy/pull/225) -- [minor] Syntax error [`#222`](https://github.com/http-party/node-http-proxy/pull/222) -- [docs] Making README links consistent with latest project structure. [`#208`](https://github.com/http-party/node-http-proxy/pull/208) -- [docs] improved grammar [`#205`](https://github.com/http-party/node-http-proxy/pull/205) -- proposed doc addition for #180 [`#189`](https://github.com/http-party/node-http-proxy/pull/189) - -### Fixed - -- Merge pull request #256 from nodejitsu/changelog [`#137`](https://github.com/http-party/node-http-proxy/issues/137) -- [misc] Updating the changelog. Close #137 [`#137`](https://github.com/http-party/node-http-proxy/issues/137) - -### Commits - -- Whitespace fixes [`e9fd3f4`](https://github.com/http-party/node-http-proxy/commit/e9fd3f43d7e890f0164b5a03a34f196dd162d043) -- Added example for gzip middleware using a ProxyTable. [`6201328`](https://github.com/http-party/node-http-proxy/commit/62013281b8a980c53a38362f10d746bfbf36c52e) -- [examples] Added simple load balancer example [`fd7fcd8`](https://github.com/http-party/node-http-proxy/commit/fd7fcd8decbf0c7ab00cab84e151991e380b8fae) -- [dist] Update author field for consistency [`27316e2`](https://github.com/http-party/node-http-proxy/commit/27316e22e8e7786252583cdb9131cfd8cacb07c1) -- Add documentation for listening for proxy events to prevent a common mistake. [`4f2bc58`](https://github.com/http-party/node-http-proxy/commit/4f2bc58431c7f44d486ee8c1ee3136b3637f9405) -- Fix RoutingProxy hanging when there is an error [`b26b434`](https://github.com/http-party/node-http-proxy/commit/b26b434e9fc501f7e0c4a966dbee6220c355bc7c) -- prefer `target.hostname` over `target.host` [`c4d185d`](https://github.com/http-party/node-http-proxy/commit/c4d185dca9696c77d5c38d24d897c2679f6762a0) -- [doc] Fix style in websockets example [`ed06af9`](https://github.com/http-party/node-http-proxy/commit/ed06af97efe406ea2533009be64a6b568f9d0601) -- Add tests for remapping URL properly. [`5d839dd`](https://github.com/http-party/node-http-proxy/commit/5d839dd5f8890c6d2af96807b96d1bd5bb0f7276) -- fixed comment typos in examples/http/proxy-https-to-http.js and proxy-https-to-https.js, lines 37 and 46 [`868f7e7`](https://github.com/http-party/node-http-proxy/commit/868f7e7a287c4709c541c077f3e2303f45b1f072) -- [misc] changelog updated to version 0.8.1 [`e9a3a30`](https://github.com/http-party/node-http-proxy/commit/e9a3a3012c5507dff46afd3e5cececf43b1717ae) -- Implement RoutingProxy.prototype.remove [`0532995`](https://github.com/http-party/node-http-proxy/commit/0532995dfa0be53d285c886a9922b8915f297d36) -- Making README links consistent with latest project structure. [`7fa6599`](https://github.com/http-party/node-http-proxy/commit/7fa6599f4f2c92bb29bc5fc8a9ba06d704652c5e) -- Address ticket #180 here since that problem is so hard to discover when you run into it. If there was an error, people would search for the error text, but there isn't. [`73e415a`](https://github.com/http-party/node-http-proxy/commit/73e415a22634bfc9e5993377902f67ac3212714a) -- [tests] used socket.io 0.6.17 fixed version for tests [`45d67f4`](https://github.com/http-party/node-http-proxy/commit/45d67f42cba373db4f47765d6a3dd38a7d19dae6) -- [fix] x-forwarded-proto sets properly [`ca37ad7`](https://github.com/http-party/node-http-proxy/commit/ca37ad74367764cca479a1af63bd7491dc79606b) -- [doc] add missing {} to make an object [`843901e`](https://github.com/http-party/node-http-proxy/commit/843901eeeb24611ad24889f13edcbfd5dee4314d) -- fix the broken english and clarified the sentence (I hope) [`e15db4f`](https://github.com/http-party/node-http-proxy/commit/e15db4fb50db3e2191f3ebd30e12eeed9c376bc2) -- Re-emit 'start', 'forward' and 'end' events in RoutingProxy. [`99ee542`](https://github.com/http-party/node-http-proxy/commit/99ee54259eae70c0c680ee82efc7dd184313f182) -- [doc] call listen() to get the server started [`4fc1ee8`](https://github.com/http-party/node-http-proxy/commit/4fc1ee85d35d9feb468f808ddd11aaf186eaedd4) -- syntax error fixed [`5842d0e`](https://github.com/http-party/node-http-proxy/commit/5842d0ee7de875378d9b8ae240748dd2af567be9) -- [dist] Version bump 0.8.1 [`81f6095`](https://github.com/http-party/node-http-proxy/commit/81f6095cf08f84a84ae2bbda7ca0315729638fe0) -- finally removed hidden char [`4358a4c`](https://github.com/http-party/node-http-proxy/commit/4358a4c1225acf8c13536fd742b845166f3a65a6) -- [minor fix] delete white space [`df650d1`](https://github.com/http-party/node-http-proxy/commit/df650d11dd0a47653a4905f871d8d3d6c327d600) - -## [v0.8.0](https://github.com/http-party/node-http-proxy/compare/v0.7.3...v0.8.0) - 2011-12-23 - -### Merged - -- Fix issue where front-end is HTTPS, back-end is HTTP, and server issues a redirect. [`#165`](https://github.com/http-party/node-http-proxy/pull/165) -- Modified the ad-hoc proxy lookup to use _getKey(), rather than the error-prone in-line method. [`#164`](https://github.com/http-party/node-http-proxy/pull/164) -- Allows node-http-proxy to append new values to existing headers for incoming "x-forward-for","x-forward-proto" and "x-forward-port" [`#163`](https://github.com/http-party/node-http-proxy/pull/163) -- [fix] only set one drain listener while paused [`#136`](https://github.com/http-party/node-http-proxy/pull/136) -- [docs] grammar correction [`#134`](https://github.com/http-party/node-http-proxy/pull/134) - -### Fixed - -- [fix] Avoid `Transfer-Encoding: chunked` for HTTP/1.0 client, closes #59. [`#59`](https://github.com/http-party/node-http-proxy/issues/59) - -### Commits - -- [refactor minor] Update vendor/websocket.js to be compatible with node@0.6.x [`ea7fea6`](https://github.com/http-party/node-http-proxy/commit/ea7fea627255ed34d39902438b55e740c7c9b08c) -- [test] Add common.js file from core [`543f214`](https://github.com/http-party/node-http-proxy/commit/543f214361605cffdbee7b233029edf343c358c1) -- [test] Add core `test-http-proxy` test [`feb324b`](https://github.com/http-party/node-http-proxy/commit/feb324b0d4c0a2307493b35be944ed08ffc9187a) -- [test] Add core `test-http` test [`25a9e2d`](https://github.com/http-party/node-http-proxy/commit/25a9e2d217cabef07d6f161f5d6ded49342dbb2f) -- [test] Add core `test-http-host-headers` test [`f298411`](https://github.com/http-party/node-http-proxy/commit/f298411f76a106791f34dd4d31ea033a7bdca9c7) -- [test] Add core `test-http-extra-response` test [`c26ab5e`](https://github.com/http-party/node-http-proxy/commit/c26ab5e46ff2649f0ea6585f20d8f58b7d0cadef) -- [test] Add core `test-http-set-cookies` test [`b3b5cce`](https://github.com/http-party/node-http-proxy/commit/b3b5cce3aee98a7fd5b50fb8e1bd6bd5e1c7512f) -- [test] Add core `test-http-client-abort` test [`7bf8d4a`](https://github.com/http-party/node-http-proxy/commit/7bf8d4a7be668591b350144b4546559abf9a0b5f) -- [test] Add core `test-http-client-upload` test [`7648fe5`](https://github.com/http-party/node-http-proxy/commit/7648fe50c1859597dc390e9e628db938372483e7) -- [test] Add core `test-http-client-upload-buf` test [`5ac9878`](https://github.com/http-party/node-http-proxy/commit/5ac987857c934d07073b853f5243d2d8fc6d8c2b) -- [test] Add core `test-http-upgrade-server2` test [`bc98c0d`](https://github.com/http-party/node-http-proxy/commit/bc98c0dbce154ef266eef83d3c2f737a2d60f0e6) -- [test] Implement basic runner for multiple tests [`a4079c6`](https://github.com/http-party/node-http-proxy/commit/a4079c6a1c8b87334d12d47d67f060cbb1214696) -- [test] Add core `test-http-upload-timeout` test [`60ff181`](https://github.com/http-party/node-http-proxy/commit/60ff181af9c22405d3822ce5955f178ab13de79d) -- [test] Add core `test-http-status-code` test [`82060a5`](https://github.com/http-party/node-http-proxy/commit/82060a53430de05f2dc95450d8487bc8139544d5) -- [test] Add core `test-http-many-keep-alive-connections` test [`4e1ca6e`](https://github.com/http-party/node-http-proxy/commit/4e1ca6e61899b11cad1b437cc9d9490b9d856665) -- [test] Add core `test-http-chunked` test [`d7461f3`](https://github.com/http-party/node-http-proxy/commit/d7461f3206cca0691fbd438545ff325589770627) -- [test] Add core `test-http-head-response-has-no-body-end` test [`13389db`](https://github.com/http-party/node-http-proxy/commit/13389db1bef38a7fc7ddc3ada479a608f033020c) -- [test] Add core `test-http-server-multiheaders` test [`d7f15d0`](https://github.com/http-party/node-http-proxy/commit/d7f15d02f7477c76529fc76daddee5029079eb2d) -- [test] Add core `test-http-multi-line-headers` test [`35d2088`](https://github.com/http-party/node-http-proxy/commit/35d2088c96bacb44b17755176b6e9451ed0299dd) -- [test] Add core `test-http-head-response-has-no-body` test [`f79f3ad`](https://github.com/http-party/node-http-proxy/commit/f79f3adf0295ec5bb7fb9f6525b48ba5209d04c6) -- [refactor] Improved event handler cleanup [`9f92332`](https://github.com/http-party/node-http-proxy/commit/9f923325d08ac018a3325beaa9e0805b5eda61e6) -- [fix minor] Correctly set x-forwarded-proto in WebSocket requests [`c81bae2`](https://github.com/http-party/node-http-proxy/commit/c81bae2fdde3bf0087fe71a39855c61c43ffb145) -- Revert "[refactor] Improved event handler cleanup " [`c83d88e`](https://github.com/http-party/node-http-proxy/commit/c83d88ee88faac10b53cd4296165ed85f26036b4) -- Allowing the common proxy headers' value to be appended in proxy chain scenarios. [`621f9b4`](https://github.com/http-party/node-http-proxy/commit/621f9b425a272421de98a674f1679f0c47912733) -- [test] Add basic test runner [`87999d0`](https://github.com/http-party/node-http-proxy/commit/87999d028880dfccca349c9c44f9e66a613c4d38) -- [examples] Add some hand-crafted middleware [`6e65c20`](https://github.com/http-party/node-http-proxy/commit/6e65c20017a2e1a87dc6d58e847bc6db16440f3c) -- [test] Add core `test-http-malformed-request` test [`a635389`](https://github.com/http-party/node-http-proxy/commit/a6353897cdbe8c380d52a060f5e66784f67ad98e) -- [example] Response modification middleware [`dd83199`](https://github.com/http-party/node-http-proxy/commit/dd8319972c1c2f9421a90a21dce9560fd5ca199f) -- [test] Add core `test-http-head-request` test [`c0857f2`](https://github.com/http-party/node-http-proxy/commit/c0857f2d59c33d91cb3e0c131c44ec1667f592fa) -- [test] Add core `test-http-response-close` test [`f1c0be3`](https://github.com/http-party/node-http-proxy/commit/f1c0be3f0bd2c5e87d44a37ba4f29aafd9903ad4) -- [refactor] core proxy logic. all tests should be passing. [`63ac925`](https://github.com/http-party/node-http-proxy/commit/63ac9252606d23e2003696da1fb34a539abee7ca) -- [test] Add core `test-http-contentLength0` test [`275109b`](https://github.com/http-party/node-http-proxy/commit/275109b2f8c8519c56ca9f456096d4002698fab1) -- [test] Add core `test-http-client-abort2` test [`98bbe54`](https://github.com/http-party/node-http-proxy/commit/98bbe541e4fa581f1b9e2eadb821c0609da6ab81) -- adding tests for url segment proxytable routing [`91e9bb9`](https://github.com/http-party/node-http-proxy/commit/91e9bb90709cc8a361066d6f6b8f51f58bfd7e36) -- [test] Add core `test-http-eof-on-connect` test [`80c216d`](https://github.com/http-party/node-http-proxy/commit/80c216df0cc59b88c6934f795c03ea16a737af34) -- [example] Replace `sys` usages with `util` [`8d701bb`](https://github.com/http-party/node-http-proxy/commit/8d701bb20b593c6cdf0ff1bc35cf83051b21a35e) -- [refactor] Updates to support http2 from @mikeal [`5b52c89`](https://github.com/http-party/node-http-proxy/commit/5b52c896947db42ac01e6038c9170d8859d33aea) -- [refactor] Listen for `socket` events since reverseProxy.socket is no longer set synchronously [`3828616`](https://github.com/http-party/node-http-proxy/commit/38286168161d4f4ad24d2ad95ccd8335e9ed08a4) -- [test] Run tests in `test/core/simple` by default [`68cebbe`](https://github.com/http-party/node-http-proxy/commit/68cebbe0e79ea283eea8a1ca850ab462c66c611a) -- simplify proxytable path segment rewrite logic [`c03a450`](https://github.com/http-party/node-http-proxy/commit/c03a450d9b952e1463ae2609303029e317ff5da2) -- change proxytable routing to route one level shallower [`4d50915`](https://github.com/http-party/node-http-proxy/commit/4d50915373b6afaafc7857a3e9366e8e77315683) -- [docs] Little explanation for test/core directory [`8ca5d83`](https://github.com/http-party/node-http-proxy/commit/8ca5d83497cc106a2456ff7f2ebe3db5c8634d69) -- [minor] Allow user to set `colors.mode` [`48d4a8b`](https://github.com/http-party/node-http-proxy/commit/48d4a8b263faa9acda06651bceeff50881f21b26) -- [minor] Indentation fix [`9e630da`](https://github.com/http-party/node-http-proxy/commit/9e630daf81d10485206ec136c3e1a07fe065ffeb) -- [v0.6] `http.Agent` uses different structure for sockets [`86b4122`](https://github.com/http-party/node-http-proxy/commit/86b4122323ca32d455714b1149b99acce49a9e45) -- [minor] Nicer output from test runner [`5c3d41b`](https://github.com/http-party/node-http-proxy/commit/5c3d41bf4e101d0250fb0b3db4a8dc078104dcad) -- Modified the ad-hoc proxy lookup to use _getKey(), rather than the [`553e7fb`](https://github.com/http-party/node-http-proxy/commit/553e7fbc335a9befd166d472f057aa50452a9d40) -- [fix] When client request is aborted, abort server request [`4d43d81`](https://github.com/http-party/node-http-proxy/commit/4d43d81e5c2d7c8088716d4fd574019f43ebb5ce) -- Fixes memory leak when clients abort connections [`c98ccb4`](https://github.com/http-party/node-http-proxy/commit/c98ccb40e9fe5c5198a1605fa8835efc3ff1856c) -- [fix test] Make test runner exit after test exits [`31a8c68`](https://github.com/http-party/node-http-proxy/commit/31a8c6800ddf8d91b477d980605a4c19284a1648) -- [test dist] Run core tests on `npm test` [`8358ef8`](https://github.com/http-party/node-http-proxy/commit/8358ef8a2bdf817c8ed515be7bc9cec0a9b5f486) -- don't add upgrade handler if a custom handler is passed in [`d6ea3a4`](https://github.com/http-party/node-http-proxy/commit/d6ea3a425c203695394eaba4ce8abd57f7809e98) -- always emit end in 0.4 [`182dcd3`](https://github.com/http-party/node-http-proxy/commit/182dcd34555f361c1bb2b8d2777689e64ce32f87) -- [fix] Fix incorrect depth check. [`3ab02f3`](https://github.com/http-party/node-http-proxy/commit/3ab02f3ad7f2c59d73c621695eb238233c16d09c) -- [minor] Everybody loves Unicode [`38bd906`](https://github.com/http-party/node-http-proxy/commit/38bd906f2bc9322b156b92c47457bb7904f0d23a) -- [test minor] Update copyright notice on test runner [`2ccc5c7`](https://github.com/http-party/node-http-proxy/commit/2ccc5c73eaef30ab5a2af7e456bfcc270583c460) -- [minor] When running tests output only basename [`e109eba`](https://github.com/http-party/node-http-proxy/commit/e109eba9724494737021579938c1094c9dfbc8ee) -- [dist] Version bump. 0.8.0 [`5055689`](https://github.com/http-party/node-http-proxy/commit/5055689a11f3b990f848bf2699e0111d9e708d5f) -- Revert "[dist] Adjusted engines field to allow for 0.6; version bump 0.7.7" [`1e33434`](https://github.com/http-party/node-http-proxy/commit/1e33434fcc4772c233825b5aada7472113c0be50) -- changeOrigin option: set the host header to the proxy destination [`f27d26f`](https://github.com/http-party/node-http-proxy/commit/f27d26f4515c900ea4cf1756ef279257a189e308) -- [dist] Adjusted engines field to allow for 0.6; version bump 0.7.7 [`30dac89`](https://github.com/http-party/node-http-proxy/commit/30dac898f30a8508b4c4b4236e9438987f320167) -- [fix] In routing proxy, match line beginning [`63dfc7f`](https://github.com/http-party/node-http-proxy/commit/63dfc7f1757fc9a1a9bceeb3b035e97be6504692) -- [v0.6] Don't use `agent.appendMessage()` [`6655e01`](https://github.com/http-party/node-http-proxy/commit/6655e0164216449a97090651230266da8ced0150) -- bump version 0.7.4 [`3dfba2b`](https://github.com/http-party/node-http-proxy/commit/3dfba2ba4591e0fcd65ff0bfd012b3ab749a0a02) -- bump version 0.7.6 [`c5dc929`](https://github.com/http-party/node-http-proxy/commit/c5dc9295c711177c165bfb34c67407e1a5a0ed06) -- Revert "update outgoing.headers.host incase the destination does proxying" [`2061c71`](https://github.com/http-party/node-http-proxy/commit/2061c713664b044852fdf67aa5e173e5c3b6d874) -- update outgoing.headers.host incase the destination does proxying [`65b7872`](https://github.com/http-party/node-http-proxy/commit/65b7872e6ad433deae4de823c63629cb341bd649) -- bump version 0.7.5 [`b4d41c3`](https://github.com/http-party/node-http-proxy/commit/b4d41c3628ade82792eb361b095ab014a88d537a) -- [minor] Fix indent on timeout notice [`c4124da`](https://github.com/http-party/node-http-proxy/commit/c4124da4f25860497790fc06c97dde6e8985ab73) -- [minor] Change test runner output order [`b76680b`](https://github.com/http-party/node-http-proxy/commit/b76680b045f69e03759bc119f4827f337a8f395d) -- grammar correction [`729496d`](https://github.com/http-party/node-http-proxy/commit/729496d2898612969f5369e7f1c313cb4034f96c) -- [dist] Test runner depends on `async` [`219b0ff`](https://github.com/http-party/node-http-proxy/commit/219b0ff8f8780cde4714267273b0a1637c84679f) -- [test fix] Remove unnecessary console.log in tests/websocket/websocket-proxy-test.js [`f188f4f`](https://github.com/http-party/node-http-proxy/commit/f188f4ffd8c47b6312cd88c28de7e5ac63565047) -- [test refactor] `test/core/{run => run-single}` [`004be38`](https://github.com/http-party/node-http-proxy/commit/004be38048792d6f1d3efb361a5e7e66d5dbee8d) - -## [v0.7.3](https://github.com/http-party/node-http-proxy/compare/v0.7.2...v0.7.3) - 2011-10-03 - -### Commits - -- added what is necessary for having proxyError on Routing proxywq [`b7adf86`](https://github.com/http-party/node-http-proxy/commit/b7adf866b595f0d64a3ef6bde19271276450e723) -- [dist] Version bump. 0.7.3 [`db185bb`](https://github.com/http-party/node-http-proxy/commit/db185bb303ce9c413b2abccbc885f8ec43b61202) - -## [v0.7.2](https://github.com/http-party/node-http-proxy/compare/v0.7.1...v0.7.2) - 2011-09-30 - -### Merged - -- [fix] Examples have working require paths now. [`#118`](https://github.com/http-party/node-http-proxy/pull/118) - -### Commits - -- [fix] Fixed require paths in examples [`2e8d4c6`](https://github.com/http-party/node-http-proxy/commit/2e8d4c6e49e2e9b27443c0b9ae2b96331715402b) -- [websockets] add latest websockets support [`45ef87e`](https://github.com/http-party/node-http-proxy/commit/45ef87e71bc9cccefe5fb6afc3121fb09b8efbc3) -- [dist] Version bump. 0.7.2 [`ccccc45`](https://github.com/http-party/node-http-proxy/commit/ccccc45f11fbe535017b1806fad43578f143649d) - -## [v0.7.1](https://github.com/http-party/node-http-proxy/compare/v0.7.0...v0.7.1) - 2011-09-21 - -### Merged - -- Readme fixes [`#114`](https://github.com/http-party/node-http-proxy/pull/114) -- #107: Set x-forwarded-for header (amongst others) [`#110`](https://github.com/http-party/node-http-proxy/pull/110) -- command line tool - make sure targetPort is an integer [`#109`](https://github.com/http-party/node-http-proxy/pull/109) - -### Fixed - -- [dist] Version bump v0.7.1, closes #107 #112 [`#107`](https://github.com/http-party/node-http-proxy/issues/107) - -### Commits - -- [test] Added a test for the "x-forwarded-for" header [`66e9820`](https://github.com/http-party/node-http-proxy/commit/66e982060c6c41ad7dfadce1403c8e13d267781a) -- [docs] Updated examples in README.md for 0.7.x API. [`24ef919`](https://github.com/http-party/node-http-proxy/commit/24ef9194953c27fb11a8f1ceb499e5feca11c30c) -- [examples] Updated examples to v0.7.x API. [`8fc8d96`](https://github.com/http-party/node-http-proxy/commit/8fc8d966c4681d514af00516b348105608e13382) -- [examples] More fixes to examples. [`549360a`](https://github.com/http-party/node-http-proxy/commit/549360a462c134cc2b02301070209084ec94c393) -- [fix] x-forwarded http headers should set properly. [`2677bb6`](https://github.com/http-party/node-http-proxy/commit/2677bb6c44244ea0b584db744955bedf7aee2c62) -- [fix] connection.socket -> socket for source of x-forwarded-for data [`1f33943`](https://github.com/http-party/node-http-proxy/commit/1f33943b231cdf2cb619977801c7b0d4e98ab6df) -- Make sure the target port is an integer [`5ba25aa`](https://github.com/http-party/node-http-proxy/commit/5ba25aa3451f131b6c6c8892848a4f236f5b859e) - -## [v0.7.0](https://github.com/http-party/node-http-proxy/compare/v0.6.6...v0.7.0) - 2011-09-10 - -### Fixed - -- [fix] Add `x-forward-*` headers for WebSocket requests. Closes #74 [`#74`](https://github.com/http-party/node-http-proxy/issues/74) -- [doc] Document `setMaxSockets`. Fixes #81 [`#81`](https://github.com/http-party/node-http-proxy/issues/81) - -### Commits - -- [api test dist] Stubbed out the API for the higher-level `RoutingProxy` object to be exposed by `node-http-proxy` [`5927ecd`](https://github.com/http-party/node-http-proxy/commit/5927ecd62a082269c3b6a0ae4f5b4a673784bcdb) -- [api] Finalized the RoutingProxy API [`f765f90`](https://github.com/http-party/node-http-proxy/commit/f765f90ec37defaa2b493f859a982add51e25b76) -- [minor] Move private methods to the bottom of file(s) [`ec03d72`](https://github.com/http-party/node-http-proxy/commit/ec03d72c5d8749aee835f571869f69816be02265) -- [test] Updated tests to reflect finalized API of the RoutingProxy [`734769f`](https://github.com/http-party/node-http-proxy/commit/734769fa9b2c3054d45e33c3e552af80ce3f4740) -- [api doc] Rebuilt httpProxy.createServer() with the newer high-level RoutingProxy API [`598fe2e`](https://github.com/http-party/node-http-proxy/commit/598fe2e38def56518a1f0a8196b2fcb7f1bc569e) -- [minor] Remove commented out debug statements. [`5575bcf`](https://github.com/http-party/node-http-proxy/commit/5575bcf60c87def74d1755b2e5cc73e085dbf8c3) -- [doc] Updated examples [`13eaec5`](https://github.com/http-party/node-http-proxy/commit/13eaec55dc50e2aae164cb8adaa0f1a3c5a66c68) -- Add flow control [`6a7fd14`](https://github.com/http-party/node-http-proxy/commit/6a7fd14bfa9f25694d75cf490e32817ff15a94fe) -- Add flow control [`2b9e09b`](https://github.com/http-party/node-http-proxy/commit/2b9e09b00ac40e6c6de2b68754df7b8e8c1e3878) -- Emit drain if it doesn't happen on its own in 100ms [`37e2541`](https://github.com/http-party/node-http-proxy/commit/37e25418916a31e4a513ee5866d6013858d579cf) -- resume() can throw [`558a8a4`](https://github.com/http-party/node-http-proxy/commit/558a8a4f79716496dbdee13759c8641606458c05) -- [fix] Memory leak hunting. [`ca1d12c`](https://github.com/http-party/node-http-proxy/commit/ca1d12cf1bbfbe98b5159f9c02e2f6c818a1c749) -- Emit drain if it doesn't happen on its own in 100ms [`84be9f2`](https://github.com/http-party/node-http-proxy/commit/84be9f2c3a244c7dbfe2c6320fa26d85cf80ec31) -- resume() can throw [`0c71119`](https://github.com/http-party/node-http-proxy/commit/0c71119ee58ee84068120be72308ecb28cb3e532) -- [dist] Update examples/package.json to conform to nodejitsu style guidelines [`2937229`](https://github.com/http-party/node-http-proxy/commit/29372298208135f571538cc29dcc05f41f79b01c) -- Fixed large DoS vector in the middleware implementation [`0e36912`](https://github.com/http-party/node-http-proxy/commit/0e36912906640fdb007e0492b75c3f6a7b580ec6) -- [api] Added new `close()` method which cleans up sockets from HttpProxy instances [`0eae2a9`](https://github.com/http-party/node-http-proxy/commit/0eae2a913a2173d85478f8c9deec929388284ee2) -- Fixed large DoS vector in the middleware implementation [`07c8d2e`](https://github.com/http-party/node-http-proxy/commit/07c8d2ee6017264c3d4deac9f42ca264a3740b48) -- [minor] More contextual errors when middleware(s) error [`38315f6`](https://github.com/http-party/node-http-proxy/commit/38315f6b1f7b01bc6e55587878a57590135945c0) -- [dist] Update scripts in package.json [`6e1ade0`](https://github.com/http-party/node-http-proxy/commit/6e1ade0bb8174b744abb58df72b098bd96134ca4) -- [dist] Version bump. 0.7.0 [`0182ba3`](https://github.com/http-party/node-http-proxy/commit/0182ba37cd4c618cd50947ea2addef823349e49f) -- [merge] Merge from significant internal refactor in v0.7.x. No external API changes [`f7010e5`](https://github.com/http-party/node-http-proxy/commit/f7010e5169ac23114b9b35da272e9a041743fbb9) -- [minor] Small update to bin/node-http-proxy [`2cd8256`](https://github.com/http-party/node-http-proxy/commit/2cd8256c4d6089409f603655ea3b3a5ccf1fb065) -- [dist] Update .gitignore [`6c1c554`](https://github.com/http-party/node-http-proxy/commit/6c1c5544515bf17f0e6ed3588e16ae1a75f8a25b) -- [doc] Update README.md [`0ba5023`](https://github.com/http-party/node-http-proxy/commit/0ba5023e82fe8a08ed55194644d147c323368f41) -- [doc] Drop version number from README.md. [`bdf48be`](https://github.com/http-party/node-http-proxy/commit/bdf48bea36eae441c775e9321ab6e17db470bf27) -- [dist] Version bump. 0.7.0 [`00e34a1`](https://github.com/http-party/node-http-proxy/commit/00e34a10bd9ffca9e636b2e5aebb4f18ff6765ec) -- [test] Whitespace fix [`3a4d312`](https://github.com/http-party/node-http-proxy/commit/3a4d312eda08e7a5cecb3c82b04023e22f368e2b) -- [dist] Reorganize examples based on classification(s): http, websocket, or middleware [`81d6c31`](https://github.com/http-party/node-http-proxy/commit/81d6c318758231f77a52fab7de174fcc63b7a243) - -## [v0.6.6](https://github.com/http-party/node-http-proxy/compare/v0.6.5...v0.6.6) - 2011-08-31 - -### Commits - -- Memory leak hunting. [`f4fcf93`](https://github.com/http-party/node-http-proxy/commit/f4fcf934030e84c15cceca620e974aafc35f1691) -- [fix] Add guards to every throw-able res.end call [`e1c41d0`](https://github.com/http-party/node-http-proxy/commit/e1c41d06942b56f6cd65a079ae78b54456a8bbe1) -- [fix] Only set `x-forward-*` headers if req.connection and req.connection.socket [`de4a6fe`](https://github.com/http-party/node-http-proxy/commit/de4a6fe8a5f78460b030e635e5f4a63312cd4a76) -- [dist] Version bump. 0.6.6 [`967884c`](https://github.com/http-party/node-http-proxy/commit/967884c5de311f21b8405a5030730ef8db912531) - -## [v0.6.5](https://github.com/http-party/node-http-proxy/compare/v0.6.4...v0.6.5) - 2011-08-29 - -### Commits - -- [fix] Use `req.connection` for all x-forward-* headers [`f6dc12a`](https://github.com/http-party/node-http-proxy/commit/f6dc12a971fdd892614b32d2a4fb2ff39ddc0e67) -- [dist] Version bump. 0.6.5 [`7beead5`](https://github.com/http-party/node-http-proxy/commit/7beead54654bdc7f9ab4ed0c17000118a3e7b4fc) - -## [v0.6.4](https://github.com/http-party/node-http-proxy/compare/v0.6.3...v0.6.4) - 2011-08-28 - -### Fixed - -- Fix #95 Don't look on req.connection if it's not set. [`#95`](https://github.com/http-party/node-http-proxy/issues/95) - -### Commits - -- [api breaking] Begin refactor to optimize node-http-proxy by managing one instance of HttpProxy per `host:port` location [`d2b0e43`](https://github.com/http-party/node-http-proxy/commit/d2b0e4399e8026d3e2ece78ac8fdb1def6649950) -- [api test] Updated httpProxy.createServer() for new API exposed by simplified HttpProxy object. [`be4562d`](https://github.com/http-party/node-http-proxy/commit/be4562da9fafef8b26856f7f73f6c5a2c4e389b0) -- [test fix] A few minor fixes to ensure basic WebSocket tests are working. Better scope tests by supported protocol [`daf9231`](https://github.com/http-party/node-http-proxy/commit/daf9231a66f10a25782d2227df1b1501099ac5d1) -- [test] Updates for readability [`db10c4a`](https://github.com/http-party/node-http-proxy/commit/db10c4af918c3e4bc448163f4b9e9b9267145d47) -- Add guards to every throw-able res.end call [`7bda25b`](https://github.com/http-party/node-http-proxy/commit/7bda25b1c60d082f0f2fd12fc61b45a33b74f13d) -- [minor] Dont use `.bind()` [`340be42`](https://github.com/http-party/node-http-proxy/commit/340be42797e87fcc11859a771200075e7fe0c5f1) -- [dist] Version bump. 0.6.4 [`216d46d`](https://github.com/http-party/node-http-proxy/commit/216d46dc81bda1aeb0feb1318e34f37bee38c8fb) - -## [v0.6.3](https://github.com/http-party/node-http-proxy/compare/v0.5.11...v0.6.3) - 2011-08-28 - -### Merged - -- This adds a flag to ProxyRequest to disable the setting of x-forwarded-[for|port|proto] [`#73`](https://github.com/http-party/node-http-proxy/pull/73) - -### Fixed - -- Merge branch 'patch-1' of https://github.com/KimSchneider/node-http-proxy [`#80`](https://github.com/http-party/node-http-proxy/issues/80) - -### Commits - -- [minor] Style updates and whitespace cleaning for consistency [`f0917a3`](https://github.com/http-party/node-http-proxy/commit/f0917a3f97e8df2d58252f14c15ec54369c969ae) -- [api] refactor out middlewares from examples. [`2cf4e0a`](https://github.com/http-party/node-http-proxy/commit/2cf4e0a9e6c78dfd093c098fc87100ae71bc9450) -- [docs] add middleware examples (first draft) [`020290a`](https://github.com/http-party/node-http-proxy/commit/020290a162146c4996831f4f13d71c1dc949f508) -- [fix] use routing table mhen proxying WebSockets. [`efa17ef`](https://github.com/http-party/node-http-proxy/commit/efa17ef6cf614b763fc3b76570a24e750e2ddd31) -- Tested & fixed url middleware example, added comments. [`4cc18f4`](https://github.com/http-party/node-http-proxy/commit/4cc18f4217739b0bd1b3ac88287cc8a23d486b6b) -- [minor] add middleware to node-http-proxy [`b54666f`](https://github.com/http-party/node-http-proxy/commit/b54666ff69c574d842ce1349700c6b6248484d24) -- [minor] add middleware to node-http-proxy [`c773eed`](https://github.com/http-party/node-http-proxy/commit/c773eedeb6d0b22e2b41ab9215cfdc064a8095e3) -- [minor] add url-proxying middleware example [`45f3df8`](https://github.com/http-party/node-http-proxy/commit/45f3df80937ffd5854727c91ea6b0e09cf77e160) -- [fix] Removed bad example. [`2626308`](https://github.com/http-party/node-http-proxy/commit/2626308cd845982c82a284b0d0bc064090aaf116) -- [minor] add example to test concurrency [`6ec8d6c`](https://github.com/http-party/node-http-proxy/commit/6ec8d6caace3797841c0447feb081aa7920aa0dd) -- [minor] add example of using middleware to gzip response [`d3c0697`](https://github.com/http-party/node-http-proxy/commit/d3c06973a1bf1f1c54ca55a5d7f93b77133ef9a2) -- support old (port,host) and (options) style when using middlewares [`7976de1`](https://github.com/http-party/node-http-proxy/commit/7976de1121a40f963e18ea0a4673d185f847df4c) -- [minor] Added body decoder middleware example. Needs fixing. [`8eaec35`](https://github.com/http-party/node-http-proxy/commit/8eaec3507456731c1138c0b8ebb4e51dedc7c300) -- [minor dist] Use `pkginfo`. Minor updates to variable scoping in `.createServer()` [`5d0bbb3`](https://github.com/http-party/node-http-proxy/commit/5d0bbb38c3af14907567e2dc7c4f84a915b60ce5) -- [doc] add comments to examples/url-middleware.js [`f6484de`](https://github.com/http-party/node-http-proxy/commit/f6484de4112463c74105db82d27f131d64478f1d) -- Handle cases where res.write throws [`be3a0d8`](https://github.com/http-party/node-http-proxy/commit/be3a0d84a1e75b45bc1fc63fe63cdabd9844eb59) -- [minor] code style changes [`8b48b7e`](https://github.com/http-party/node-http-proxy/commit/8b48b7e0af656fdbd6da2b16ec6365beec47c302) -- [doc] note in readme about middleware [`b5d5eaa`](https://github.com/http-party/node-http-proxy/commit/b5d5eaababa276f7d197e4b6a8a771b364b73139) -- Allow forwarding for x-forwarded-[for|port|proto] to enabled layering of http-proxies. [`404818b`](https://github.com/http-party/node-http-proxy/commit/404818b1dce9e77a917ce9f0c187772eb8c18042) -- [style] tidy [`0f8fe8e`](https://github.com/http-party/node-http-proxy/commit/0f8fe8e2460fd27edfba44989b78aa6b8c9a38e2) -- [fix] do not use middleware code if it's not needed [`2012588`](https://github.com/http-party/node-http-proxy/commit/20125889b362c61c85924810de446e1e7b18d079) -- [minor] minor fixes to gzip middleware example [`caa1f49`](https://github.com/http-party/node-http-proxy/commit/caa1f494ab4effabad6d08272c3606c1d82005ea) -- [minor] default enableXForwarded to true [`e3d95ec`](https://github.com/http-party/node-http-proxy/commit/e3d95ecab24700535184df32f3a97e8699099b7f) -- Updating to enableXForwarded [`ee3506a`](https://github.com/http-party/node-http-proxy/commit/ee3506a8e7262f780eeada331898d42ca0e9838a) -- [api] Expose adapted version of `stack` so it can be used with HttpProxy instances not created by `httpProxy.createServer()` [`5d6e6b9`](https://github.com/http-party/node-http-proxy/commit/5d6e6b9f78eb98b28db01490a36b23c1aade133f) -- The number of maxSockets has to be set after the agent is created. Setting the property in the constructor does not work. [`2caa5d2`](https://github.com/http-party/node-http-proxy/commit/2caa5d2b0d55898c133a0bf3a0048ee969efb121) -- [fix] Dont use res.* in proxyWebSocketRequest [`f7452bc`](https://github.com/http-party/node-http-proxy/commit/f7452bc42d963406f7ee19dfa353d72ce3252dd6) -- [fix] fix syntax errors. close issue #86 [`b8f8499`](https://github.com/http-party/node-http-proxy/commit/b8f84994b0515e12c9d87f89f81a8601be47a6ff) -- [api] merge middleware branch [`e6ff8d6`](https://github.com/http-party/node-http-proxy/commit/e6ff8d6597a977baf0caf4f69c75bfa93d7281f3) -- [dist] Version bump. 0.6.3 [`1389b70`](https://github.com/http-party/node-http-proxy/commit/1389b706b5c1d857c571c2947b7c758b5cc70ca3) -- merged [`5ba0f89`](https://github.com/http-party/node-http-proxy/commit/5ba0f89aa356b2e76f5cf64c16e8578d71c45d8a) -- [fix] handler variable in createServer was global (!) [`25c06a3`](https://github.com/http-party/node-http-proxy/commit/25c06a3a952068de6a24c643cb0c872f7b9a0846) -- [dist] bump version 6.0 [`03475a5`](https://github.com/http-party/node-http-proxy/commit/03475a59445a1c1c1029d0673aafabe63af1e711) -- [dist] bump version 0.6.2 [`d8068a8`](https://github.com/http-party/node-http-proxy/commit/d8068a832d437790ce8680b9b34a9f171d75786c) -- [dist] bump version 5.12 [`5d33ad7`](https://github.com/http-party/node-http-proxy/commit/5d33ad711895b2afcbd6dd5e1c0449cee1ceae7b) -- [dist] bump version 0.6.1 [`fea371d`](https://github.com/http-party/node-http-proxy/commit/fea371dc0a47dfb4f84427e5740e8756f4e5b285) -- [fix] broken RegExp [`549bfea`](https://github.com/http-party/node-http-proxy/commit/549bfeac233888ec84edeec350ed5a7377f3773e) -- [doc] add note on middleware to Using node-http-proxy section of the README [`5bf2d59`](https://github.com/http-party/node-http-proxy/commit/5bf2d59241a7695f43bb89e5cb41ade2ab7a0ad2) - -## [v0.5.11](https://github.com/http-party/node-http-proxy/compare/v0.5.10...v0.5.11) - 2011-06-26 - -### Fixed - -- [api] Simplify the usage for the `.changeHeaders` option. Fixes #34 [`#34`](https://github.com/http-party/node-http-proxy/issues/34) - -### Commits - -- [api doc test] node-http-proxy now emits `websocket:*` on important WebSocket events. Added tests for these features and updated some code docs [`4f85ca0`](https://github.com/http-party/node-http-proxy/commit/4f85ca04e425a7d4df1e46c9cadd6026eeed32f6) -- [doc] Updated docco docs [`f0649d8`](https://github.com/http-party/node-http-proxy/commit/f0649d8d6a9f84ac61d5f173c585fa4307ffb3c3) -- [doc] Added examples/latent-websocket-proxy.js [`fcfe846`](https://github.com/http-party/node-http-proxy/commit/fcfe84626fff15be21ac83ccd69b96bf3ca1f7a2) -- [doc] Added sample for custom error messages using the `proxyError` event [`4cdbf0e`](https://github.com/http-party/node-http-proxy/commit/4cdbf0e8729a0665904b577376240c00e56ad876) -- [doc] Add examples/standalone-websocket-proxy.js [`1ee8ae7`](https://github.com/http-party/node-http-proxy/commit/1ee8ae710497e239716f72d45e2f61ead3995dc3) -- [dist] Version bump. 0.5.11 [`baf0b9e`](https://github.com/http-party/node-http-proxy/commit/baf0b9e25af53e2738812ff78614cc12966e99e3) -- [doc] Small update to code docs [`9d9509f`](https://github.com/http-party/node-http-proxy/commit/9d9509f791c4c566629c2e323259885f1c3db7ed) -- [minor] Add missing space [`b608a02`](https://github.com/http-party/node-http-proxy/commit/b608a029f8aa26f1a74a917e0bec0ac37e4615a0) - -## [v0.5.10](https://github.com/http-party/node-http-proxy/compare/v0.5.9...v0.5.10) - 2011-06-13 - -### Commits - -- [refactor] Manage our own internal list of Agent instances [`887c580`](https://github.com/http-party/node-http-proxy/commit/887c5808c90b7128c040e510e237ddb4d034fe3e) -- [doc] Update docco docs for 0.5.9 [`b4ac4d4`](https://github.com/http-party/node-http-proxy/commit/b4ac4d441fe4fb84d463bd889a5ce8d7f4d596ca) -- [test] Update tests to use `localhost` [`a1cdf00`](https://github.com/http-party/node-http-proxy/commit/a1cdf005b98c422c777c88a7d7baf2eeb91f732d) -- [dist] Version bump. 0.5.10 [`7b574d3`](https://github.com/http-party/node-http-proxy/commit/7b574d3d3e52b09a6445c011b8f2ae0d78282111) -- [doc] Bump version in README.md [`653c6ca`](https://github.com/http-party/node-http-proxy/commit/653c6ca1af607623b653d3148b1bb45a304aab87) - -## [v0.5.9](https://github.com/http-party/node-http-proxy/compare/v0.5.8...v0.5.9) - 2011-05-23 - -### Commits - -- [fix] Change sec-websocket-location header when proxying WSS --> WS. Added test coverage for this scenario [`028d204`](https://github.com/http-party/node-http-proxy/commit/028d2044e71d70b7bc21d339de29e2275c3be5c2) -- [dist] Version bump. 0.5.9 [`57ca62c`](https://github.com/http-party/node-http-proxy/commit/57ca62c878c9a953f2344719556e05492ece3435) - -## [v0.5.8](https://github.com/http-party/node-http-proxy/compare/v0.5.7...v0.5.8) - 2011-05-21 - -### Commits - -- [doc] Regenerate docco docs [`c5fd368`](https://github.com/http-party/node-http-proxy/commit/c5fd368a8d803b6ab47e32e744a6fd6a6ca5361f) -- [doc] Update docco docs [`74120d8`](https://github.com/http-party/node-http-proxy/commit/74120d8988627bb0686d3a26cb8ec1408cc41287) -- [doc] Update to v0.5.7 in code and README.md [`6fd272a`](https://github.com/http-party/node-http-proxy/commit/6fd272ac18240811d8a8a39c85ee483557c414b3) -- [dist] Version bump. 0.5.8. Forwards compatible with new versions of nodejs [`76ecb51`](https://github.com/http-party/node-http-proxy/commit/76ecb51e7b41a23288f922c9c5df3ce40f67bf80) -- [fix] Dont force `Connection: close` now that Keep-Alive is supported [`a86d18b`](https://github.com/http-party/node-http-proxy/commit/a86d18bc7f93d013df715d1f4d88e651846f645d) -- [test] Update to vows description for web-socket-proxy-test.js [`a865fe6`](https://github.com/http-party/node-http-proxy/commit/a865fe662ff04a4badcc90ce2af80d2380c40a85) - -## [v0.5.7](https://github.com/http-party/node-http-proxy/compare/v0.5.6...v0.5.7) - 2011-05-19 - -### Commits - -- [api] Add `x-forwarded-proto` and `x-forwarded-port` to proxied HTTP requests [`421895f`](https://github.com/http-party/node-http-proxy/commit/421895fa308d49628bbbb546d542efa96769c3f4) -- [dist] Version bump. v0.5.7. Only good on node v0.4.7. See issue #48. [`0911c17`](https://github.com/http-party/node-http-proxy/commit/0911c1719e641c6e4342027e8d5d82c47c6f310e) -- [fix] Set `x-forwarded-for` from req.connection.socket.remoteAddress if req.connection.remoteAddress is not defined [`e9b3ec9`](https://github.com/http-party/node-http-proxy/commit/e9b3ec9b1d0ebf427e138176b28af44f0f973670) - -## [v0.5.6](https://github.com/http-party/node-http-proxy/compare/v0.5.5...v0.5.6) - 2011-05-19 - -### Commits - -- [fix doc] Add `error` handler to reverseProxy request when proxying WebSockets to prevent unhandled ParseError. Rename some variables in proxyWebSocketRequest to make the code more readable [`76580c2`](https://github.com/http-party/node-http-proxy/commit/76580c292a152c0007352a9d383f59e48993cd03) -- [doc] Regenerate docco docs [`bd45216`](https://github.com/http-party/node-http-proxy/commit/bd45216bc9207e5016f394a4bfee2bdffcc669c7) -- [api minor] Small refactor to emit `webSocketProxyError` from a single helper function on any of the various `error` events in the proxy chain [`5d2192e`](https://github.com/http-party/node-http-proxy/commit/5d2192e654f23e1b76e0b66554debe1590a3af64) -- [api] Manual merge of #46: add custom `proxyError` event and enable production error handling. [`652cca3`](https://github.com/http-party/node-http-proxy/commit/652cca37ea321ec9d1d55125217df0214c8090b6) -- [dist] Version bump. v0.5.6 Only good on node v0.4.7. See issue #48. [`f1c0f64`](https://github.com/http-party/node-http-proxy/commit/f1c0f641aa14dc3c267de37370a7369c3131c636) - -## [v0.5.5](https://github.com/http-party/node-http-proxy/compare/v0.5.4...v0.5.5) - 2011-05-19 - -### Commits - -- [fix] Change variable references for Websockets, bugs found from using wsbench [`7bf0cae`](https://github.com/http-party/node-http-proxy/commit/7bf0caef9fae86a34719f04f7b9926095fb6a146) -- [dist] Version bump. 0.5.5. Only good on node v0.4.7. See issue #48. [`acacc05`](https://github.com/http-party/node-http-proxy/commit/acacc0561f2efabc0a7859b9a410e954f2dca6fd) - -## [v0.5.4](https://github.com/http-party/node-http-proxy/compare/v0.5.3...v0.5.4) - 2011-05-19 - -### Commits - -- [doc] Update docco docs [`faf2618`](https://github.com/http-party/node-http-proxy/commit/faf2618cf3b53a972779514842bc4264ec9541fa) -- [doc] Update README.md to reflect the new HTTPS to HTTP proxy capabilities [`abc01bc`](https://github.com/http-party/node-http-proxy/commit/abc01bce293f7c1a88f9be08b0540407d2b0f4a1) -- [doc test api] Improve node-http-proxy API to allow for HTTPS to HTTP proxying scenarios. Update tests accordingly. [`895f577`](https://github.com/http-party/node-http-proxy/commit/895f577744e3cbcbb5f479c4aacec5323bb001f7) -- [doc] Update examples for HTTPS to HTTP proxying [`91737fa`](https://github.com/http-party/node-http-proxy/commit/91737fadb640f30d3cd959f29069537473207efd) -- [dist] Version bump. 0.5.4. Only good on node v0.4.7. See issue #48. [`c04eec1`](https://github.com/http-party/node-http-proxy/commit/c04eec1c370ca0eb212c96c0896c27b349f7ea97) -- [minor] Update README.md to conform to Github flavored markdown [`32a15dd`](https://github.com/http-party/node-http-proxy/commit/32a15dd79d860343453c38a7eef8339d7b99718b) -- [minor] Update README.md to conform to Github flavored markdown [`521fe27`](https://github.com/http-party/node-http-proxy/commit/521fe271853632563143fb4b76c032f7afa7831a) - -## [v0.5.3](https://github.com/http-party/node-http-proxy/compare/v0.5.2...v0.5.3) - 2011-05-18 - -### Commits - -- [test] Continued work around Origin mismatch tests [`44a8566`](https://github.com/http-party/node-http-proxy/commit/44a85664a80fd67e20bbc36d280816dbd1a796c5) -- [doc] Regenerate docco docs [`9e36d2d`](https://github.com/http-party/node-http-proxy/commit/9e36d2d2e619be322bb73092db2a9d72ef6709e8) -- [fix test api] Only change Origin headers in WebSocket requests when the `changeOrigin` option is set explicitly. Added tests to ensure Origin and sec-websocket-origin headers match when proxying websockets. [`9c6c4b9`](https://github.com/http-party/node-http-proxy/commit/9c6c4b908b7d6ce67144ba9d41702b5694254099) -- [test] Improve websocket tests to inspect outgoing and incoming HTTP headers to test origin mismatch bugs [`6e679c8`](https://github.com/http-party/node-http-proxy/commit/6e679c8019e1eb62b2b1da48628f89b8046203fd) -- [test] Refined tests to begin checking Origin == Sec-Websocket-Origin [`9ab54ab`](https://github.com/http-party/node-http-proxy/commit/9ab54ab47fc43d98f3182da9c41487f524933783) -- [doc minor] Update docs and code docs for v0.5.3 release [`03b9087`](https://github.com/http-party/node-http-proxy/commit/03b908744612faed82d9233f3b6d4af70368cf3c) -- [dist] Version bump. v0.5.3. Only good on node v0.4.7. See issue #48. [`d9fa261`](https://github.com/http-party/node-http-proxy/commit/d9fa261cdc97aee71279064e536a4a22edbe3b5b) - -## [v0.5.2](https://github.com/http-party/node-http-proxy/compare/v0.5.1...v0.5.2) - 2011-05-17 - -### Merged - -- Readme: fix syntax error, reformat code blocks [`#52`](https://github.com/http-party/node-http-proxy/pull/52) - -### Commits - -- format markdown for syntax highlighting on GitHub [`28f6dc1`](https://github.com/http-party/node-http-proxy/commit/28f6dc153a7d9fa9b6a08637c90765cf3a07fd3e) -- [doc] Regenerate docco docs [`a5e1e3e`](https://github.com/http-party/node-http-proxy/commit/a5e1e3e70d02f32ab86b711ec4b262df5955a1a9) -- [test] Fix tests in https mode [`1ee6bef`](https://github.com/http-party/node-http-proxy/commit/1ee6beff6aa3087e332701fd3cfda70b4e968ce8) -- [fix] Manage bookkeeping for incoming requests to the underlying sockets behind reverse proxied websocket events. Only use the appropriate variables in the closure scope of the `upgrade` event from this bookkeeping [`85223ea`](https://github.com/http-party/node-http-proxy/commit/85223ea0800ad63ea82783c9dc2dc4a0e3345ae8) -- [minor] Fix syntax in examples/ [`ff82946`](https://github.com/http-party/node-http-proxy/commit/ff829467d33d326c588861a46acc2bf9adbdddd2) -- add spacing around code blocks to fix README rendering [`ab8c264`](https://github.com/http-party/node-http-proxy/commit/ab8c264e6d729de81c93982f97875006e52240f0) -- [dist] Use devDependencies in package.json [`e6c52d4`](https://github.com/http-party/node-http-proxy/commit/e6c52d431f8a32e11cd347fbabeb7a03d0d40790) -- don't highlight non-javascript as javascript [`d5b9ba7`](https://github.com/http-party/node-http-proxy/commit/d5b9ba7180376b8a67b9cbfebe9acf7399cab3ed) -- fix syntax error in README example [`332d2d7`](https://github.com/http-party/node-http-proxy/commit/332d2d780ab62ccc996157dacd2498c568816ffc) -- [minor] Ignore npm modules and debug logs [`e90cbd6`](https://github.com/http-party/node-http-proxy/commit/e90cbd6f148633ef7d3e2de06aaabe1cc493cc37) -- [dist] Include docco module as a dev dependency [`d08c2bb`](https://github.com/http-party/node-http-proxy/commit/d08c2bb525ec661c0c8e6539e28605972b1ae9b8) -- [dist] Version bump. 0.5.2. Only good on node v0.4.7. See issue #48. [`360e79a`](https://github.com/http-party/node-http-proxy/commit/360e79a005d298f40f36ee0e25c34fe534311b09) - -## [v0.5.1](https://github.com/http-party/node-http-proxy/compare/v0.5.0...v0.5.1) - 2011-05-10 - -### Commits - -- [dist] Version bump. 0.5.1. Only good on node v0.4.7. See issue #48. [`6c80177`](https://github.com/http-party/node-http-proxy/commit/6c8017734053bc683f32a2b9f0ba18ba0c014855) -- Revert "Fixed "Invalid argument to getAgent" when proxying HTTP" [`40dc9de`](https://github.com/http-party/node-http-proxy/commit/40dc9dee2d1e617af7f85a056d281b4f220f2802) -- [fix] Fix typo in bin/node-http-proxy [`57127a3`](https://github.com/http-party/node-http-proxy/commit/57127a367193bcf12be2b367e1e01cbc57d685fe) -- Merged pull request #39 from timmattison/master. [`ac425d7`](https://github.com/http-party/node-http-proxy/commit/ac425d70ef63b847fe6eb17dbfc4b084d0dd2d20) -- Fixed "Invalid argument to getAgent" when proxying HTTP [`642e158`](https://github.com/http-party/node-http-proxy/commit/642e15805dbd572835bb4fee9527e4f2da658833) - -## [v0.5.0](https://github.com/http-party/node-http-proxy/compare/v0.4.2...v0.5.0) - 2011-04-17 - -### Commits - -- [doc] Breakout demo.js into files in example/. Add web-socket-proxy.js example [`6e4bf6a`](https://github.com/http-party/node-http-proxy/commit/6e4bf6a9cbc400fcd2be420649ce08936417dd83) -- [api test doc] Improve HTTPS support. Update minor documentation. Change tests accordingly. [`bf68dc3`](https://github.com/http-party/node-http-proxy/commit/bf68dc30a5c508bc8f533f52c083206b87963811) -- [api] Update WebSocket support to use http.Agent APIs [`b0b0183`](https://github.com/http-party/node-http-proxy/commit/b0b0183c2b54fa63bd2a6f9c92475c7f56d811a3) -- [api] Update `.proxyRequest()` and `.proxyWebSocketRequest()` APIs to take an options hash instead of a set of arguments. Add HTTPS support. [`cfddd12`](https://github.com/http-party/node-http-proxy/commit/cfddd12e821bd6b07ff2dbf0aa543ddfc3664dca) -- [doc api] Update README.md and CHANGELOG.md for v0.5.0. Update bin/node-http-proxy to read files specified in `config.https` [`212009d`](https://github.com/http-party/node-http-proxy/commit/212009df6b08de3c0c97a4e9ec43f60f6bf49ea6) -- [test] Add WebSocket tests [`4d18ac1`](https://github.com/http-party/node-http-proxy/commit/4d18ac1ae611f84e5e0cc599234124d183d81ffd) -- [doc] Regenerate docco docs [`c485c87`](https://github.com/http-party/node-http-proxy/commit/c485c8742c86b504823020d2cf6c1342a1bcce48) -- [doc test] Small updates to README.md. Update to try require socket.io [`12064d8`](https://github.com/http-party/node-http-proxy/commit/12064d8e5debf674cd5d367e563b699f10a4325e) -- [api] Remove winston logging in favor of custom events [`a89b397`](https://github.com/http-party/node-http-proxy/commit/a89b3976b25516db9b601c0327948f3d90fab006) -- [doc] Update README.md [`bd6a262`](https://github.com/http-party/node-http-proxy/commit/bd6a2622ad67b8c7ec15868037a48048207ce0df) -- [dist] Version bump. v0.5.0 [`ddf31b2`](https://github.com/http-party/node-http-proxy/commit/ddf31b22ec71ef9dacca9c178ee26b6314d9fdf4) -- [api] Update `request` event to be consistent by emitting both `req` and `res`. Add `x-forwarded-for` header. [`a3cb527`](https://github.com/http-party/node-http-proxy/commit/a3cb527be5e42d5192400933bf32a361b8c707c4) -- [api] Emit `end` event when done proxying [`5681fc1`](https://github.com/http-party/node-http-proxy/commit/5681fc1a28ff06dfa91d9bf5512c688235cafac4) -- [minor] Small update to README.md [`40c51a7`](https://github.com/http-party/node-http-proxy/commit/40c51a703baaf050b35f60131d3e78b42e7b0858) -- [dist] Move pgriess' websocket client into vendor/* [`7cbf447`](https://github.com/http-party/node-http-proxy/commit/7cbf44732068dc788d31432553b3bdfcfb39f743) - -## [v0.4.2](https://github.com/http-party/node-http-proxy/compare/v0.4.1...v0.4.2) - 2011-04-13 - -### Commits - -- [dist] Version bump. 0.4.2. Remove `eyes` dependency. [`a5d88aa`](https://github.com/http-party/node-http-proxy/commit/a5d88aaacc209bdceaf0799e99ff82bdce1bdc10) - -## [v0.4.1](https://github.com/http-party/node-http-proxy/compare/v0.4.0...v0.4.1) - 2011-03-20 - -### Commits - -- [dist] Version bump. 0.4.1. Fix package.json [`0d1a3fe`](https://github.com/http-party/node-http-proxy/commit/0d1a3fe99511dda1ac949536a9eb4a045db39979) - -## [v0.4.0](https://github.com/http-party/node-http-proxy/compare/v0.3.1...v0.4.0) - 2011-03-20 - -### Commits - -- [api] Further work on refactor for node 0.4.0 [`e39a9f9`](https://github.com/http-party/node-http-proxy/commit/e39a9f93d2f9ab6ea769fad5e9dda25d022d8a1a) -- [doc] Added docco generated literate coding documentation [`3bc7d16`](https://github.com/http-party/node-http-proxy/commit/3bc7d16adc48ad1aa1161bb02bd0c27d4fb20639) -- [doc api test] Wrap things up for v0.4.0 release: Add hostnameOnly routing to ProxyTable, add more documentation, fix edge-cases until they can be further investigated in node.js core [`5715318`](https://github.com/http-party/node-http-proxy/commit/571531820e2233b0d2f7268a1d4db8510fcabf91) -- [api] First pass at removing pool and working with node v0.4.0 [`9faa924`](https://github.com/http-party/node-http-proxy/commit/9faa924a29544cfd84c28cb1c45489f495e3806a) -- [doc api test] Rename HttpProxy.pause to HttpProxy.resume. Update documentation and tests accordingly [`4110448`](https://github.com/http-party/node-http-proxy/commit/4110448046dd945afe3e092968d9382d573a369a) -- [doc] Added more documentation [`973f19f`](https://github.com/http-party/node-http-proxy/commit/973f19fd5a14e3bfad5f67e54710a4076a469fe0) -- [doc] Regenerate docco docs [`6c42f04`](https://github.com/http-party/node-http-proxy/commit/6c42f045241194061c3786ba5827aebf88070201) -- [api] Force connection header to be `close` until keep-alive is replemented [`3fd3c96`](https://github.com/http-party/node-http-proxy/commit/3fd3c96fa05fda45c7ef9ff44594644ac54f4a1e) -- [dist] Version bump. 0.4.0 [`cbb5fbc`](https://github.com/http-party/node-http-proxy/commit/cbb5fbccd0e65c51eba14e75ef44184714cc8971) -- [api test] All tests are passing when run as individual files [`389159d`](https://github.com/http-party/node-http-proxy/commit/389159da1b91ab60b8de3c379d84e76c703e6b59) -- [minor doc] Update demo and small fix to node-http-proxy [`d8c5406`](https://github.com/http-party/node-http-proxy/commit/d8c54063dc5961fa619f7c04fa2d225da9aa1439) -- [fix] Fixed cli parsing issue when --argument=value is not used [`34cba38`](https://github.com/http-party/node-http-proxy/commit/34cba38c297d6dcb845e95b9e1ce0271da1631d2) -- [test] Small update to proxy-table-test.js [`3588687`](https://github.com/http-party/node-http-proxy/commit/3588687874eb691fe59407a207d38efa418211d0) -- [minor] Expose version on module [`1dd9b3b`](https://github.com/http-party/node-http-proxy/commit/1dd9b3b15088a3c4595faae64822969014a61d52) -- [doc] Update to v0.3.1 in README.md [`8ef2e1f`](https://github.com/http-party/node-http-proxy/commit/8ef2e1fe33e0fca2b80c0d6474dba994e625f094) -- [dist] Change package.json for npm version bump [`0e7f362`](https://github.com/http-party/node-http-proxy/commit/0e7f3626718ecf108f3cafa814b0f4ffb3e6faa2) - -## [v0.3.1](https://github.com/http-party/node-http-proxy/compare/v0.3.0...v0.3.1) - 2010-11-22 - -### Commits - -- [api test doc] Updated tests. Added ProxyTable functionality [`bedc7a3`](https://github.com/http-party/node-http-proxy/commit/bedc7a3ae57d5ec07b372a550fa69772f9fbc19e) -- [test] Simplified tests. Added tests for experimental websocket support [`8c3e993`](https://github.com/http-party/node-http-proxy/commit/8c3e993833e2a09376fdb5e7c847ff00b53e70d8) -- [test doc api] Added forward proxy functionality with tests [`c06f4bf`](https://github.com/http-party/node-http-proxy/commit/c06f4bf7fe50f29677dc5a5aad596193fc893018) -- [dist minor] Removed vendored pool. Changed all references of sys to util [`8251296`](https://github.com/http-party/node-http-proxy/commit/8251296d7f5c472ec523316e905d678042b043d3) -- WebSocket proxy support, fixed 304 code halting [`7249ef3`](https://github.com/http-party/node-http-proxy/commit/7249ef3ee776c66acc95036dc76a2d08dc3f6350) -- [api] pseduo-vendor pool until pull request is finalized [`7c2eb5d`](https://github.com/http-party/node-http-proxy/commit/7c2eb5de3531f20ea92c99dd8ab207d26be9dce8) -- No-server fix [`f84880f`](https://github.com/http-party/node-http-proxy/commit/f84880fcd946e55585d8e901e5bc32933f629837) -- [api test bin doc] Added bin script and simple logging [`00014d6`](https://github.com/http-party/node-http-proxy/commit/00014d624c052e7404ce96c7e06769440c4eae2a) -- [debug] Removed pool as a dependency for stress test [`73381cf`](https://github.com/http-party/node-http-proxy/commit/73381cf71ae92b9ed1c2da5986aa7ca31a7cf2e8) -- 'end' event becomes 'close', added more try-catch handling [`cd78af5`](https://github.com/http-party/node-http-proxy/commit/cd78af5feaa67c5005df921a8d1a61575a58fca2) -- Added support of automatic websocket tunneling, added test for it [`56003b5`](https://github.com/http-party/node-http-proxy/commit/56003b527625b2d83a191f3172005c87856aa87d) -- [debug] Better debug messages to try to determine if pool is slowly losing clients to forever busy [`dd1918d`](https://github.com/http-party/node-http-proxy/commit/dd1918dc360dc0f9553c35c82f3f0f93ac3bfb46) -- [doc dist] Version bump. Added CHANGELOG.md [`de53d5e`](https://github.com/http-party/node-http-proxy/commit/de53d5eb2c3d671be0ad0e736a6435c3bf5f55f4) -- Moved error handling to response.on('end'), fixed error handling in websocket's part [`7e61f0c`](https://github.com/http-party/node-http-proxy/commit/7e61f0cf5725dedf37b956545639c2d6129855d3) -- [minor] Pushing hot-fix from Mikeal for vendored pool repo [`60791f3`](https://github.com/http-party/node-http-proxy/commit/60791f361f8a11f9d1bad2c6366bf0ce72b40f66) -- [api] Integrated commits from donnerjack and worked on pool changes [`3bb458e`](https://github.com/http-party/node-http-proxy/commit/3bb458e115037bc27691705d255b0d2e2504a9f1) -- [doc] Updated Copyright ... added Fedor [`9128a8c`](https://github.com/http-party/node-http-proxy/commit/9128a8c5a15d0f64a0bae946f3e741ea708bc56f) -- [minor] Listen to error event on pool so we dont fail out unexpectedly anymore [`711258e`](https://github.com/http-party/node-http-proxy/commit/711258ef469d064cc0dbe0f0320ed1047ed0bd54) -- adding more debugging messages [`5d54ea5`](https://github.com/http-party/node-http-proxy/commit/5d54ea58c93c26635e0de96871e824baffea34dd) -- adding some debug messages for live testing [`4069a7e`](https://github.com/http-party/node-http-proxy/commit/4069a7e98c22a48bae7fd57ad5f315d0e5006dfc) -- [minor] Listen to error events re-emitted by pool into the ClientRequest [`f8bff4c`](https://github.com/http-party/node-http-proxy/commit/f8bff4c618ab2a6b6185ac973cd0e21cea19c23a) -- [minor] Updated max clients for pool [`32aaf74`](https://github.com/http-party/node-http-proxy/commit/32aaf74e95f8a39d847b352ca984145e7abe89a6) -- [debug] Trying to repair pool busy client growth [`7b0ea85`](https://github.com/http-party/node-http-proxy/commit/7b0ea85e2ac58d5f711f64b855f746fb2423a276) -- [debug] Roll back last commit ... connection = close was ineffective [`266e524`](https://github.com/http-party/node-http-proxy/commit/266e5246eacb4877bb6ab557e6e6b9b8434ad612) - -## [v0.3.0](https://github.com/http-party/node-http-proxy/compare/v0.2.0...v0.3.0) - 2010-09-10 - -### Commits - -- [api] Revert to old 0.1.x codebase for bug testing and performance comparison [`66afb2a`](https://github.com/http-party/node-http-proxy/commit/66afb2a2a35a479512ce2601c89b82f13596fc9f) -- [api test dist doc] Updated for 0.3.0 release [`a9084b9`](https://github.com/http-party/node-http-proxy/commit/a9084b923afa66c3004abec4951ff02e031631da) -- [api] Object creation is cheap for HttpProxy, so lets take advantage [`9f0aeac`](https://github.com/http-party/node-http-proxy/commit/9f0aeacab1a632136f5905a0d03ad04be9f93f51) -- [doc] Update contributors for 0.3.0 [`6d47d98`](https://github.com/http-party/node-http-proxy/commit/6d47d98f5345b7f335c3b93f8e4a31dd90235dda) - -## [v0.2.0](https://github.com/http-party/node-http-proxy/compare/v0.1.5...v0.2.0) - 2010-09-07 - -### Commits - -- [dist] Version bump and update to README + LICENCE. Word to Mikeal for coming thru for 0.2.0 [`69c162d`](https://github.com/http-party/node-http-proxy/commit/69c162dc3da334b2ece0a19be5ea4c8da7e0fe87) -- [api dist] Merge of branch 0.2.0 [`fd61828`](https://github.com/http-party/node-http-proxy/commit/fd618289338ca2d7595f695c0b8531b40145bbca) -- [api] Completely refactored node-http-proxy with help from Mikeal [`1221939`](https://github.com/http-party/node-http-proxy/commit/1221939accf00467adb25f8908e991e984043c85) -- [api minor debug] Remove debug code, set Connection header if not set [`6d08f24`](https://github.com/http-party/node-http-proxy/commit/6d08f24c863e071eb4a0d3ede15656e5e7c27c4b) -- [debug] Added some debugging to figure out why AB wont complete a test with v0.2.0 [`9715ebd`](https://github.com/http-party/node-http-proxy/commit/9715ebd40bdbbe883eb383676d5b0df24968dd72) -- [api] Integrated a little more from Mikeal to make our return headers consistent [`eb39018`](https://github.com/http-party/node-http-proxy/commit/eb39018fd0b5751dd90fabce905997e52f2ffecd) -- [doc] Updated README.md [`f291efb`](https://github.com/http-party/node-http-proxy/commit/f291efbaa4360d6e7ff4004cc11f8df0d737c1d0) - -## v0.1.5 - 2010-09-02 - -### Commits - -- [api] More changes for createServer api [`5d94ae2`](https://github.com/http-party/node-http-proxy/commit/5d94ae27bc2d56d1f817b0cf1dfdb01dcc376393) -- added colors and asciimo [`d490b50`](https://github.com/http-party/node-http-proxy/commit/d490b50ada8c1024cb785335966b71d69fae3407) -- [api] First commit of http-proxy [`30b68c1`](https://github.com/http-party/node-http-proxy/commit/30b68c153270619119ec36615bb54ee7a2816ecc) -- updating demo [`c4b7c0d`](https://github.com/http-party/node-http-proxy/commit/c4b7c0d8a0cc5fd7f43257594bd0a71c7bd12a63) -- initial release v0.1.0, sure to have many updates coming. [`85f7372`](https://github.com/http-party/node-http-proxy/commit/85f73723415ec54539721777e77d5d10de383469) -- fleshing out demo [`994f748`](https://github.com/http-party/node-http-proxy/commit/994f7481ce07c15afa5ab993b79d920b8220be44) -- [docs] added benchmarks [`bbed176`](https://github.com/http-party/node-http-proxy/commit/bbed17640f84e56aaea06c6d4eb7d04952957fce) -- updated paths to use npm [`972c8c0`](https://github.com/http-party/node-http-proxy/commit/972c8c05274c72c7320291389f88b0694ac290ca) -- added spark demo [`d0ad931`](https://github.com/http-party/node-http-proxy/commit/d0ad93176d8430301a8a42f8c2b817674ce7ba32) -- [test] Updated tests to include support for latent requests [`095e86a`](https://github.com/http-party/node-http-proxy/commit/095e86aa653c1c8e07cd1403697e0e4b638b8294) -- started to flesh out simple demo based on tests [`2fb5ffb`](https://github.com/http-party/node-http-proxy/commit/2fb5ffba7765462e95badd0f7243e65395a3fd2e) -- added createServer but hated it, gonna remove [`b1eb13e`](https://github.com/http-party/node-http-proxy/commit/b1eb13eb70b67ea76f5ab720d566894677a53ca2) -- [test] Updated node-http-proxy tests [`2f265a2`](https://github.com/http-party/node-http-proxy/commit/2f265a23e4a10971495d0bd7b324b7ba786e5065) -- [api] Updated request hashes to use a unique identifier [`c887a75`](https://github.com/http-party/node-http-proxy/commit/c887a757623f5a3d7d1e0fafeb00b96731c89872) -- [api] Updated http-proxy to work with vows [`ead7567`](https://github.com/http-party/node-http-proxy/commit/ead7567db8099264a2001fd876cded84bc4f111f) -- [dist] Renamed node-proxy to node-http-proxy, updated package.json [`2f49810`](https://github.com/http-party/node-http-proxy/commit/2f49810ef86f49927991f32ae42605f1118b0c25) -- updating docs, almost there [`6e651f4`](https://github.com/http-party/node-http-proxy/commit/6e651f420f4d1e15dbbf823a8e3b311e9533c805) -- changed api to better reflect nodes api. updated demos, tests, docs [`bde98f4`](https://github.com/http-party/node-http-proxy/commit/bde98f489234fe22f49468011b7e342cd108603f) -- updating docs [`341bbd4`](https://github.com/http-party/node-http-proxy/commit/341bbd404f3fd81e65197b3830c3fa9e544bc1e7) -- fixed npm package, i think. bumped version 0.1.1 [`fca40da`](https://github.com/http-party/node-http-proxy/commit/fca40da694d8df17ed6140265e374c0ceabd1167) -- updated demo [`b622702`](https://github.com/http-party/node-http-proxy/commit/b62270210e7ad3c54fd6b2c86bde9f9942328a67) -- added readme [`d6a2f8a`](https://github.com/http-party/node-http-proxy/commit/d6a2f8aa7dae3f6721b9607a702c68b1ad7fc692) -- [api] Corrected chain of argument passing [`da55777`](https://github.com/http-party/node-http-proxy/commit/da55777a92d100a5ddb7a8267e56ba26bd8c2270) -- updated demo [`e9511ea`](https://github.com/http-party/node-http-proxy/commit/e9511eafdf9ada6a0ce6defb3c5f2299411633b1) -- [deploy] Added package.json [`dce80b9`](https://github.com/http-party/node-http-proxy/commit/dce80b9b4546064da1943e0e396e19b41390588a) -- updated readme [`76d0649`](https://github.com/http-party/node-http-proxy/commit/76d0649abcafd80509af922503c5544e646bcebb) -- update to docs and package.json [`d15bba4`](https://github.com/http-party/node-http-proxy/commit/d15bba4c1d2cbdaf0af27f3adcaa1db9b534d968) -- [minor] Removed eyes dependency [`eaeed83`](https://github.com/http-party/node-http-proxy/commit/eaeed8306d6dc6e1b30223cf6d59cda6d5bb76de) -- merge [`93505a4`](https://github.com/http-party/node-http-proxy/commit/93505a422c688b7f41fdaf304270c893ef4cf09a) -- fixed additional port / server mismatches for new api [`15c18b6`](https://github.com/http-party/node-http-proxy/commit/15c18b612d6cd5a1f3ae46b5590dda1fc586fb35) -- [doc] added nodejitsu.com link to ReadMe. http-proxy is used in our front facing load-balancers. look for bugs...try to improve benchmarks.... ^_^ [`6661753`](https://github.com/http-party/node-http-proxy/commit/6661753f07dcf4e5ae684df4d1709f3c238346c9) -- removed extra self, updated colors requirement, bumped to version 0.1.3 [`9bc5b6f`](https://github.com/http-party/node-http-proxy/commit/9bc5b6f8621fb2a37e84524c3e5b91aab9b45675) -- fixed pathing issue, bumped version 0.1.3 [`ede6490`](https://github.com/http-party/node-http-proxy/commit/ede649037e08b615a8995179f46bc701550354d6) -- updated docs [`07d96bb`](https://github.com/http-party/node-http-proxy/commit/07d96bb8887a7880a21a739e0a8f495698e7e79e) -- updated docs [`1594367`](https://github.com/http-party/node-http-proxy/commit/15943675edef490d9b8732345a750bc5ab1f5d7e) -- updated readme [`fb8c5ab`](https://github.com/http-party/node-http-proxy/commit/fb8c5abd3c2a722c1c18046dcf2fffea4fa7d050) -- updated docs [`17b6c69`](https://github.com/http-party/node-http-proxy/commit/17b6c6998544572300fc9d4faa63af1aee4c3d88) -- updated docs [`c8dd8c4`](https://github.com/http-party/node-http-proxy/commit/c8dd8c4e28e09f25c161980316b259d81d5a4e91) -- updated package.json again [`ddba155`](https://github.com/http-party/node-http-proxy/commit/ddba155377942259554842f37de98c508130fe11) -- initial release v0.1.0, sure to have many updates coming. [`6a1baa2`](https://github.com/http-party/node-http-proxy/commit/6a1baa25ccf9fc3a3fc4d1a4764c968993e48cab) -- bumped to version 0.1.5 [`b195a16`](https://github.com/http-party/node-http-proxy/commit/b195a16406534912161671448a53d6633a1f2458) -- updated readme [`9aa2216`](https://github.com/http-party/node-http-proxy/commit/9aa22162f139ab2fa6df6b11e2a96336ee1d2612) -- added spark demo [`d408e39`](https://github.com/http-party/node-http-proxy/commit/d408e39ed6dbd44709d0164a95ad9bc67f76ba13) -- bumped to version 0.1.4. improved on api [`82b8228`](https://github.com/http-party/node-http-proxy/commit/82b822827d35a54501068f9880111473e19c72f9) -- initial release v0.1.0, sure to have many updates coming. [`1e04552`](https://github.com/http-party/node-http-proxy/commit/1e04552bd8f39e3dcba36bbf7fb36674e5c0c9ff) -- updated readme [`0a2eaaa`](https://github.com/http-party/node-http-proxy/commit/0a2eaaa7db690f86aca8c0b952f745e806ad818c) -- updating docs [`198000f`](https://github.com/http-party/node-http-proxy/commit/198000feefd525125a2031557b3556978a057bde) -- [api] Added createServer api to node-http-proxy [`2e2b55f`](https://github.com/http-party/node-http-proxy/commit/2e2b55f113eb3bc81c43717c0db5de695fb694c1) diff --git a/node_modules/http-proxy/CODE_OF_CONDUCT.md b/node_modules/http-proxy/CODE_OF_CONDUCT.md deleted file mode 100644 index 29238b7..0000000 --- a/node_modules/http-proxy/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,74 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -nationality, personal appearance, race, religion, or sexual identity and -orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or -advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at <https://github.com/http-party/node-http-proxy>. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/node_modules/http-proxy/LICENSE b/node_modules/http-proxy/LICENSE deleted file mode 100644 index 84820c0..0000000 --- a/node_modules/http-proxy/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ - - node-http-proxy - - Copyright (c) 2010-2016 Charlie Robbins, Jarrett Cruger & the 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/node_modules/http-proxy/README.md b/node_modules/http-proxy/README.md deleted file mode 100644 index 5b2d0b3..0000000 --- a/node_modules/http-proxy/README.md +++ /dev/null @@ -1,568 +0,0 @@ -<p align="center"> - <img src="https://raw.github.com/http-party/node-http-proxy/master/doc/logo.png"/> -</p> - -# node-http-proxy [![Build Status](https://travis-ci.org/http-party/node-http-proxy.svg?branch=master)](https://travis-ci.org/http-party/node-http-proxy) [![codecov](https://codecov.io/gh/http-party/node-http-proxy/branch/master/graph/badge.svg)](https://codecov.io/gh/http-party/node-http-proxy) - -`node-http-proxy` is an HTTP programmable proxying library that supports -websockets. It is suitable for implementing components such as reverse -proxies and load balancers. - -### Table of Contents - * [Installation](#installation) - * [Upgrading from 0.8.x ?](#upgrading-from-08x-) - * [Core Concept](#core-concept) - * [Use Cases](#use-cases) - * [Setup a basic stand-alone proxy server](#setup-a-basic-stand-alone-proxy-server) - * [Setup a stand-alone proxy server with custom server logic](#setup-a-stand-alone-proxy-server-with-custom-server-logic) - * [Setup a stand-alone proxy server with proxy request header re-writing](#setup-a-stand-alone-proxy-server-with-proxy-request-header-re-writing) - * [Modify a response from a proxied server](#modify-a-response-from-a-proxied-server) - * [Setup a stand-alone proxy server with latency](#setup-a-stand-alone-proxy-server-with-latency) - * [Using HTTPS](#using-https) - * [Proxying WebSockets](#proxying-websockets) - * [Options](#options) - * [Listening for proxy events](#listening-for-proxy-events) - * [Shutdown](#shutdown) - * [Miscellaneous](#miscellaneous) - * [Test](#test) - * [ProxyTable API](#proxytable-api) - * [Logo](#logo) - * [Contributing and Issues](#contributing-and-issues) - * [License](#license) - -### Installation - -`npm install http-proxy --save` - -**[Back to top](#table-of-contents)** - -### Upgrading from 0.8.x ? - -Click [here](UPGRADING.md) - -**[Back to top](#table-of-contents)** - -### Core Concept - -A new proxy is created by calling `createProxyServer` and passing -an `options` object as argument ([valid properties are available here](lib/http-proxy.js#L26-L42)) - -```javascript -var httpProxy = require('http-proxy'); - -var proxy = httpProxy.createProxyServer(options); // See (†) -``` -†Unless listen(..) is invoked on the object, this does not create a webserver. See below. - -An object will be returned with four methods: - -* web `req, res, [options]` (used for proxying regular HTTP(S) requests) -* ws `req, socket, head, [options]` (used for proxying WS(S) requests) -* listen `port` (a function that wraps the object in a webserver, for your convenience) -* close `[callback]` (a function that closes the inner webserver and stops listening on given port) - -It is then possible to proxy requests by calling these functions - -```javascript -http.createServer(function(req, res) { - proxy.web(req, res, { target: 'http://mytarget.com:8080' }); -}); -``` - -Errors can be listened on either using the Event Emitter API - -```javascript -proxy.on('error', function(e) { - ... -}); -``` - -or using the callback API - -```javascript -proxy.web(req, res, { target: 'http://mytarget.com:8080' }, function(e) { ... }); -``` - -When a request is proxied it follows two different pipelines ([available here](lib/http-proxy/passes)) -which apply transformations to both the `req` and `res` object. -The first pipeline (incoming) is responsible for the creation and manipulation of the stream that connects your client to the target. -The second pipeline (outgoing) is responsible for the creation and manipulation of the stream that, from your target, returns data -to the client. - -**[Back to top](#table-of-contents)** - -### Use Cases - -#### Setup a basic stand-alone proxy server - -```js -var http = require('http'), - httpProxy = require('http-proxy'); -// -// Create your proxy server and set the target in the options. -// -httpProxy.createProxyServer({target:'http://localhost:9000'}).listen(8000); // See (†) - -// -// Create your target server -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied!' + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); -``` -†Invoking listen(..) triggers the creation of a web server. Otherwise, just the proxy instance is created. - -**[Back to top](#table-of-contents)** - -#### Setup a stand-alone proxy server with custom server logic -This example shows how you can proxy a request using your own HTTP server -and also you can put your own logic to handle the request. - -```js -var http = require('http'), - httpProxy = require('http-proxy'); - -// -// Create a proxy server with custom application logic -// -var proxy = httpProxy.createProxyServer({}); - -// -// Create your custom server and just call `proxy.web()` to proxy -// a web request to the target passed in the options -// also you can use `proxy.ws()` to proxy a websockets request -// -var server = http.createServer(function(req, res) { - // You can define here your custom logic to handle the request - // and then proxy the request. - proxy.web(req, res, { target: 'http://127.0.0.1:5050' }); -}); - -console.log("listening on port 5050") -server.listen(5050); -``` - -**[Back to top](#table-of-contents)** - -#### Setup a stand-alone proxy server with proxy request header re-writing -This example shows how you can proxy a request using your own HTTP server that -modifies the outgoing proxy request by adding a special header. - -```js -var http = require('http'), - httpProxy = require('http-proxy'); - -// -// Create a proxy server with custom application logic -// -var proxy = httpProxy.createProxyServer({}); - -// To modify the proxy connection before data is sent, you can listen -// for the 'proxyReq' event. When the event is fired, you will receive -// the following arguments: -// (http.ClientRequest proxyReq, http.IncomingMessage req, -// http.ServerResponse res, Object options). This mechanism is useful when -// you need to modify the proxy request before the proxy connection -// is made to the target. -// -proxy.on('proxyReq', function(proxyReq, req, res, options) { - proxyReq.setHeader('X-Special-Proxy-Header', 'foobar'); -}); - -var server = http.createServer(function(req, res) { - // You can define here your custom logic to handle the request - // and then proxy the request. - proxy.web(req, res, { - target: 'http://127.0.0.1:5050' - }); -}); - -console.log("listening on port 5050") -server.listen(5050); -``` - -**[Back to top](#table-of-contents)** - -#### Modify a response from a proxied server -Sometimes when you have received a HTML/XML document from the server of origin you would like to modify it before forwarding it on. - -[Harmon](https://github.com/No9/harmon) allows you to do this in a streaming style so as to keep the pressure on the proxy to a minimum. - -**[Back to top](#table-of-contents)** - -#### Setup a stand-alone proxy server with latency - -```js -var http = require('http'), - httpProxy = require('http-proxy'); - -// -// Create a proxy server with latency -// -var proxy = httpProxy.createProxyServer(); - -// -// Create your server that makes an operation that waits a while -// and then proxies the request -// -http.createServer(function (req, res) { - // This simulates an operation that takes 500ms to execute - setTimeout(function () { - proxy.web(req, res, { - target: 'http://localhost:9008' - }); - }, 500); -}).listen(8008); - -// -// Create your target server -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9008); -``` - -**[Back to top](#table-of-contents)** - -#### Using HTTPS -You can activate the validation of a secure SSL certificate to the target connection (avoid self-signed certs), just set `secure: true` in the options. - -##### HTTPS -> HTTP - -```js -// -// Create the HTTPS proxy server in front of a HTTP server -// -httpProxy.createServer({ - target: { - host: 'localhost', - port: 9009 - }, - ssl: { - key: fs.readFileSync('valid-ssl-key.pem', 'utf8'), - cert: fs.readFileSync('valid-ssl-cert.pem', 'utf8') - } -}).listen(8009); -``` - -##### HTTPS -> HTTPS - -```js -// -// Create the proxy server listening on port 443 -// -httpProxy.createServer({ - ssl: { - key: fs.readFileSync('valid-ssl-key.pem', 'utf8'), - cert: fs.readFileSync('valid-ssl-cert.pem', 'utf8') - }, - target: 'https://localhost:9010', - secure: true // Depends on your needs, could be false. -}).listen(443); -``` - -##### HTTP -> HTTPS (using a PKCS12 client certificate) - -```js -// -// Create an HTTP proxy server with an HTTPS target -// -httpProxy.createProxyServer({ - target: { - protocol: 'https:', - host: 'my-domain-name', - port: 443, - pfx: fs.readFileSync('path/to/certificate.p12'), - passphrase: 'password', - }, - changeOrigin: true, -}).listen(8000); -``` - -**[Back to top](#table-of-contents)** - -#### Proxying WebSockets -You can activate the websocket support for the proxy using `ws:true` in the options. - -```js -// -// Create a proxy server for websockets -// -httpProxy.createServer({ - target: 'ws://localhost:9014', - ws: true -}).listen(8014); -``` - -Also you can proxy the websocket requests just calling the `ws(req, socket, head)` method. - -```js -// -// Setup our server to proxy standard HTTP requests -// -var proxy = new httpProxy.createProxyServer({ - target: { - host: 'localhost', - port: 9015 - } -}); -var proxyServer = http.createServer(function (req, res) { - proxy.web(req, res); -}); - -// -// Listen to the `upgrade` event and proxy the -// WebSocket requests as well. -// -proxyServer.on('upgrade', function (req, socket, head) { - proxy.ws(req, socket, head); -}); - -proxyServer.listen(8015); -``` - -**[Back to top](#table-of-contents)** - -### Options - -`httpProxy.createProxyServer` supports the following options: - -* **target**: url string to be parsed with the url module -* **forward**: url string to be parsed with the url module -* **agent**: object to be passed to http(s).request (see Node's [https agent](http://nodejs.org/api/https.html#https_class_https_agent) and [http agent](http://nodejs.org/api/http.html#http_class_http_agent) objects) -* **ssl**: object to be passed to https.createServer() -* **ws**: true/false, if you want to proxy websockets -* **xfwd**: true/false, adds x-forward headers -* **secure**: true/false, if you want to verify the SSL Certs -* **toProxy**: true/false, passes the absolute URL as the `path` (useful for proxying to proxies) -* **prependPath**: true/false, Default: true - specify whether you want to prepend the target's path to the proxy path -* **ignorePath**: true/false, Default: false - specify whether you want to ignore the proxy path of the incoming request (note: you will have to append / manually if required). -* **localAddress**: Local interface string to bind for outgoing connections -* **changeOrigin**: true/false, Default: false - changes the origin of the host header to the target URL -* **preserveHeaderKeyCase**: true/false, Default: false - specify whether you want to keep letter case of response header key -* **auth**: Basic authentication i.e. 'user:password' to compute an Authorization header. -* **hostRewrite**: rewrites the location hostname on (201/301/302/307/308) redirects. -* **autoRewrite**: rewrites the location host/port on (201/301/302/307/308) redirects based on requested host/port. Default: false. -* **protocolRewrite**: rewrites the location protocol on (201/301/302/307/308) redirects to 'http' or 'https'. Default: null. -* **cookieDomainRewrite**: rewrites domain of `set-cookie` headers. Possible values: - * `false` (default): disable cookie rewriting - * String: new domain, for example `cookieDomainRewrite: "new.domain"`. To remove the domain, use `cookieDomainRewrite: ""`. - * Object: mapping of domains to new domains, use `"*"` to match all domains. - For example keep one domain unchanged, rewrite one domain and remove other domains: - ``` - cookieDomainRewrite: { - "unchanged.domain": "unchanged.domain", - "old.domain": "new.domain", - "*": "" - } - ``` -* **cookiePathRewrite**: rewrites path of `set-cookie` headers. Possible values: - * `false` (default): disable cookie rewriting - * String: new path, for example `cookiePathRewrite: "/newPath/"`. To remove the path, use `cookiePathRewrite: ""`. To set path to root use `cookiePathRewrite: "/"`. - * Object: mapping of paths to new paths, use `"*"` to match all paths. - For example, to keep one path unchanged, rewrite one path and remove other paths: - ``` - cookiePathRewrite: { - "/unchanged.path/": "/unchanged.path/", - "/old.path/": "/new.path/", - "*": "" - } - ``` -* **headers**: object with extra headers to be added to target requests. -* **proxyTimeout**: timeout (in millis) for outgoing proxy requests -* **timeout**: timeout (in millis) for incoming requests -* **followRedirects**: true/false, Default: false - specify whether you want to follow redirects -* **selfHandleResponse** true/false, if set to true, none of the webOutgoing passes are called and it's your responsibility to appropriately return the response by listening and acting on the `proxyRes` event -* **buffer**: stream of data to send as the request body. Maybe you have some middleware that consumes the request stream before proxying it on e.g. If you read the body of a request into a field called 'req.rawbody' you could restream this field in the buffer option: - - ``` - 'use strict'; - - const streamify = require('stream-array'); - const HttpProxy = require('http-proxy'); - const proxy = new HttpProxy(); - - module.exports = (req, res, next) => { - - proxy.web(req, res, { - target: 'http://localhost:4003/', - buffer: streamify(req.rawBody) - }, next); - - }; - ``` - -**NOTE:** -`options.ws` and `options.ssl` are optional. -`options.target` and `options.forward` cannot both be missing - -If you are using the `proxyServer.listen` method, the following options are also applicable: - - * **ssl**: object to be passed to https.createServer() - * **ws**: true/false, if you want to proxy websockets - - -**[Back to top](#table-of-contents)** - -### Listening for proxy events - -* `error`: The error event is emitted if the request to the target fail. **We do not do any error handling of messages passed between client and proxy, and messages passed between proxy and target, so it is recommended that you listen on errors and handle them.** -* `proxyReq`: This event is emitted before the data is sent. It gives you a chance to alter the proxyReq request object. Applies to "web" connections -* `proxyReqWs`: This event is emitted before the data is sent. It gives you a chance to alter the proxyReq request object. Applies to "websocket" connections -* `proxyRes`: This event is emitted if the request to the target got a response. -* `open`: This event is emitted once the proxy websocket was created and piped into the target websocket. -* `close`: This event is emitted once the proxy websocket was closed. -* (DEPRECATED) `proxySocket`: Deprecated in favor of `open`. - -```js -var httpProxy = require('http-proxy'); -// Error example -// -// Http Proxy Server with bad target -// -var proxy = httpProxy.createServer({ - target:'http://localhost:9005' -}); - -proxy.listen(8005); - -// -// Listen for the `error` event on `proxy`. -proxy.on('error', function (err, req, res) { - res.writeHead(500, { - 'Content-Type': 'text/plain' - }); - - res.end('Something went wrong. And we are reporting a custom error message.'); -}); - -// -// Listen for the `proxyRes` event on `proxy`. -// -proxy.on('proxyRes', function (proxyRes, req, res) { - console.log('RAW Response from the target', JSON.stringify(proxyRes.headers, true, 2)); -}); - -// -// Listen for the `open` event on `proxy`. -// -proxy.on('open', function (proxySocket) { - // listen for messages coming FROM the target here - proxySocket.on('data', hybiParseAndLogMessage); -}); - -// -// Listen for the `close` event on `proxy`. -// -proxy.on('close', function (res, socket, head) { - // view disconnected websocket connections - console.log('Client disconnected'); -}); -``` - -**[Back to top](#table-of-contents)** - -### Shutdown - -* When testing or running server within another program it may be necessary to close the proxy. -* This will stop the proxy from accepting new connections. - -```js -var proxy = new httpProxy.createProxyServer({ - target: { - host: 'localhost', - port: 1337 - } -}); - -proxy.close(); -``` - -**[Back to top](#table-of-contents)** - -### Miscellaneous - -If you want to handle your own response after receiving the `proxyRes`, you can do -so with `selfHandleResponse`. As you can see below, if you use this option, you -are able to intercept and read the `proxyRes` but you must also make sure to -reply to the `res` itself otherwise the original client will never receive any -data. - -### Modify response - -```js - - var option = { - target: target, - selfHandleResponse : true - }; - proxy.on('proxyRes', function (proxyRes, req, res) { - var body = []; - proxyRes.on('data', function (chunk) { - body.push(chunk); - }); - proxyRes.on('end', function () { - body = Buffer.concat(body).toString(); - console.log("res from proxied server:", body); - res.end("my response to cli"); - }); - }); - proxy.web(req, res, option); - - -``` - -#### ProxyTable API - -A proxy table API is available through this add-on [module](https://github.com/donasaur/http-proxy-rules), which lets you define a set of rules to translate matching routes to target routes that the reverse proxy will talk to. - -#### Test - -``` -$ npm test -``` - -#### Logo - -Logo created by [Diego Pasquali](http://dribbble.com/diegopq) - -**[Back to top](#table-of-contents)** - -### Contributing and Issues - -* Read carefully our [Code Of Conduct](https://github.com/http-party/node-http-proxy/blob/master/CODE_OF_CONDUCT.md) -* Search on Google/Github -* If you can't find anything, open an issue -* If you feel comfortable about fixing the issue, fork the repo -* Commit to your local branch (which must be different from `master`) -* Submit your Pull Request (be sure to include tests and update documentation) - -**[Back to top](#table-of-contents)** - -### License - ->The MIT License (MIT) -> ->Copyright (c) 2010 - 2016 Charlie Robbins, Jarrett Cruger & the 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/node_modules/http-proxy/codecov.yml b/node_modules/http-proxy/codecov.yml deleted file mode 100644 index cafdd1c..0000000 --- a/node_modules/http-proxy/codecov.yml +++ /dev/null @@ -1,10 +0,0 @@ -coverage: - parsers: - javascript: - enable_partials: yes - status: - project: - default: - target: "70%" - patch: - enabled: false diff --git a/node_modules/http-proxy/index.js b/node_modules/http-proxy/index.js deleted file mode 100644 index e6fac85..0000000 --- a/node_modules/http-proxy/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/*! - * Caron dimonio, con occhi di bragia - * loro accennando, tutte le raccoglie; - * batte col remo qualunque s’adagia - * - * Charon the demon, with the eyes of glede, - * Beckoning to them, collects them all together, - * Beats with his oar whoever lags behind - * - * Dante - The Divine Comedy (Canto III) - */ - -module.exports = require('./lib/http-proxy'); \ No newline at end of file diff --git a/node_modules/http-proxy/lib/http-proxy.js b/node_modules/http-proxy/lib/http-proxy.js deleted file mode 100644 index 8ea2789..0000000 --- a/node_modules/http-proxy/lib/http-proxy.js +++ /dev/null @@ -1,66 +0,0 @@ - // Use explicit /index.js to help browserify negociation in require '/lib/http-proxy' (!) -var ProxyServer = require('./http-proxy/index.js').Server; - - -/** - * Creates the proxy server. - * - * Examples: - * - * httpProxy.createProxyServer({ .. }, 8000) - * // => '{ web: [Function], ws: [Function] ... }' - * - * @param {Object} Options Config object passed to the proxy - * - * @return {Object} Proxy Proxy object with handlers for `ws` and `web` requests - * - * @api public - */ - - -function createProxyServer(options) { - /* - * `options` is needed and it must have the following layout: - * - * { - * target : <url string to be parsed with the url module> - * forward: <url string to be parsed with the url module> - * agent : <object to be passed to http(s).request> - * ssl : <object to be passed to https.createServer()> - * ws : <true/false, if you want to proxy websockets> - * xfwd : <true/false, adds x-forward headers> - * secure : <true/false, verify SSL certificate> - * toProxy: <true/false, explicitly specify if we are proxying to another proxy> - * prependPath: <true/false, Default: true - specify whether you want to prepend the target's path to the proxy path> - * ignorePath: <true/false, Default: false - specify whether you want to ignore the proxy path of the incoming request> - * localAddress : <Local interface string to bind for outgoing connections> - * changeOrigin: <true/false, Default: false - changes the origin of the host header to the target URL> - * preserveHeaderKeyCase: <true/false, Default: false - specify whether you want to keep letter case of response header key > - * auth : Basic authentication i.e. 'user:password' to compute an Authorization header. - * hostRewrite: rewrites the location hostname on (201/301/302/307/308) redirects, Default: null. - * autoRewrite: rewrites the location host/port on (201/301/302/307/308) redirects based on requested host/port. Default: false. - * protocolRewrite: rewrites the location protocol on (201/301/302/307/308) redirects to 'http' or 'https'. Default: null. - * } - * - * NOTE: `options.ws` and `options.ssl` are optional. - * `options.target and `options.forward` cannot be - * both missing - * } - */ - - return new ProxyServer(options); -} - - -ProxyServer.createProxyServer = createProxyServer; -ProxyServer.createServer = createProxyServer; -ProxyServer.createProxy = createProxyServer; - - - - -/** - * Export the proxy "Server" as the main export. - */ -module.exports = ProxyServer; - diff --git a/node_modules/http-proxy/lib/http-proxy/common.js b/node_modules/http-proxy/lib/http-proxy/common.js deleted file mode 100644 index 6513e81..0000000 --- a/node_modules/http-proxy/lib/http-proxy/common.js +++ /dev/null @@ -1,248 +0,0 @@ -var common = exports, - url = require('url'), - extend = require('util')._extend, - required = require('requires-port'); - -var upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i, - isSSL = /^https|wss/; - -/** - * Simple Regex for testing if protocol is https - */ -common.isSSL = isSSL; -/** - * Copies the right headers from `options` and `req` to - * `outgoing` which is then used to fire the proxied - * request. - * - * Examples: - * - * common.setupOutgoing(outgoing, options, req) - * // => { host: ..., hostname: ...} - * - * @param {Object} Outgoing Base object to be filled with required properties - * @param {Object} Options Config object passed to the proxy - * @param {ClientRequest} Req Request Object - * @param {String} Forward String to select forward or target - *  - * @return {Object} Outgoing Object with all required properties set - * - * @api private - */ - -common.setupOutgoing = function(outgoing, options, req, forward) { - outgoing.port = options[forward || 'target'].port || - (isSSL.test(options[forward || 'target'].protocol) ? 443 : 80); - - ['host', 'hostname', 'socketPath', 'pfx', 'key', - 'passphrase', 'cert', 'ca', 'ciphers', 'secureProtocol'].forEach( - function(e) { outgoing[e] = options[forward || 'target'][e]; } - ); - - outgoing.method = options.method || req.method; - outgoing.headers = extend({}, req.headers); - - if (options.headers){ - extend(outgoing.headers, options.headers); - } - - if (options.auth) { - outgoing.auth = options.auth; - } - - if (options.ca) { - outgoing.ca = options.ca; - } - - if (isSSL.test(options[forward || 'target'].protocol)) { - outgoing.rejectUnauthorized = (typeof options.secure === "undefined") ? true : options.secure; - } - - - outgoing.agent = options.agent || false; - outgoing.localAddress = options.localAddress; - - // - // Remark: If we are false and not upgrading, set the connection: close. This is the right thing to do - // as node core doesn't handle this COMPLETELY properly yet. - // - if (!outgoing.agent) { - outgoing.headers = outgoing.headers || {}; - if (typeof outgoing.headers.connection !== 'string' - || !upgradeHeader.test(outgoing.headers.connection) - ) { outgoing.headers.connection = 'close'; } - } - - - // the final path is target path + relative path requested by user: - var target = options[forward || 'target']; - var targetPath = target && options.prependPath !== false - ? (target.path || '') - : ''; - - // - // Remark: Can we somehow not use url.parse as a perf optimization? - // - var outgoingPath = !options.toProxy - ? (url.parse(req.url).path || '') - : req.url; - - // - // Remark: ignorePath will just straight up ignore whatever the request's - // path is. This can be labeled as FOOT-GUN material if you do not know what - // you are doing and are using conflicting options. - // - outgoingPath = !options.ignorePath ? outgoingPath : ''; - - outgoing.path = common.urlJoin(targetPath, outgoingPath); - - if (options.changeOrigin) { - outgoing.headers.host = - required(outgoing.port, options[forward || 'target'].protocol) && !hasPort(outgoing.host) - ? outgoing.host + ':' + outgoing.port - : outgoing.host; - } - return outgoing; -}; - -/** - * Set the proper configuration for sockets, - * set no delay and set keep alive, also set - * the timeout to 0. - * - * Examples: - * - * common.setupSocket(socket) - * // => Socket - * - * @param {Socket} Socket instance to setup - *  - * @return {Socket} Return the configured socket. - * - * @api private - */ - -common.setupSocket = function(socket) { - socket.setTimeout(0); - socket.setNoDelay(true); - - socket.setKeepAlive(true, 0); - - return socket; -}; - -/** - * Get the port number from the host. Or guess it based on the connection type. - * - * @param {Request} req Incoming HTTP request. - * - * @return {String} The port number. - * - * @api private - */ -common.getPort = function(req) { - var res = req.headers.host ? req.headers.host.match(/:(\d+)/) : ''; - - return res ? - res[1] : - common.hasEncryptedConnection(req) ? '443' : '80'; -}; - -/** - * Check if the request has an encrypted connection. - * - * @param {Request} req Incoming HTTP request. - * - * @return {Boolean} Whether the connection is encrypted or not. - * - * @api private - */ -common.hasEncryptedConnection = function(req) { - return Boolean(req.connection.encrypted || req.connection.pair); -}; - -/** - * OS-agnostic join (doesn't break on URLs like path.join does on Windows)> - * - * @return {String} The generated path. - * - * @api private - */ - -common.urlJoin = function() { - // - // We do not want to mess with the query string. All we want to touch is the path. - // - var args = Array.prototype.slice.call(arguments), - lastIndex = args.length - 1, - last = args[lastIndex], - lastSegs = last.split('?'), - retSegs; - - args[lastIndex] = lastSegs.shift(); - - // - // Join all strings, but remove empty strings so we don't get extra slashes from - // joining e.g. ['', 'am'] - // - retSegs = [ - args.filter(Boolean).join('/') - .replace(/\/+/g, '/') - .replace('http:/', 'http://') - .replace('https:/', 'https://') - ]; - - // Only join the query string if it exists so we don't have trailing a '?' - // on every request - - // Handle case where there could be multiple ? in the URL. - retSegs.push.apply(retSegs, lastSegs); - - return retSegs.join('?') -}; - -/** - * Rewrites or removes the domain of a cookie header - * - * @param {String|Array} Header - * @param {Object} Config, mapping of domain to rewritten domain. - * '*' key to match any domain, null value to remove the domain. - * - * @api private - */ -common.rewriteCookieProperty = function rewriteCookieProperty(header, config, property) { - if (Array.isArray(header)) { - return header.map(function (headerElement) { - return rewriteCookieProperty(headerElement, config, property); - }); - } - return header.replace(new RegExp("(;\\s*" + property + "=)([^;]+)", 'i'), function(match, prefix, previousValue) { - var newValue; - if (previousValue in config) { - newValue = config[previousValue]; - } else if ('*' in config) { - newValue = config['*']; - } else { - //no match, return previous value - return match; - } - if (newValue) { - //replace value - return prefix + newValue; - } else { - //remove value - return ''; - } - }); -}; - -/** - * Check the host and see if it potentially has a port in it (keep it simple) - * - * @returns {Boolean} Whether we have one or not - * - * @api private - */ -function hasPort(host) { - return !!~host.indexOf(':'); -}; diff --git a/node_modules/http-proxy/lib/http-proxy/index.js b/node_modules/http-proxy/lib/http-proxy/index.js deleted file mode 100644 index 977a4b3..0000000 --- a/node_modules/http-proxy/lib/http-proxy/index.js +++ /dev/null @@ -1,185 +0,0 @@ -var httpProxy = module.exports, - extend = require('util')._extend, - parse_url = require('url').parse, - EE3 = require('eventemitter3'), - http = require('http'), - https = require('https'), - web = require('./passes/web-incoming'), - ws = require('./passes/ws-incoming'); - -httpProxy.Server = ProxyServer; - -/** - * Returns a function that creates the loader for - * either `ws` or `web`'s passes. - * - * Examples: - * - * httpProxy.createRightProxy('ws') - * // => [Function] - * - * @param {String} Type Either 'ws' or 'web' - *  - * @return {Function} Loader Function that when called returns an iterator for the right passes - * - * @api private - */ - -function createRightProxy(type) { - - return function(options) { - return function(req, res /*, [head], [opts] */) { - var passes = (type === 'ws') ? this.wsPasses : this.webPasses, - args = [].slice.call(arguments), - cntr = args.length - 1, - head, cbl; - - /* optional args parse begin */ - if(typeof args[cntr] === 'function') { - cbl = args[cntr]; - - cntr--; - } - - var requestOptions = options; - if( - !(args[cntr] instanceof Buffer) && - args[cntr] !== res - ) { - //Copy global options - requestOptions = extend({}, options); - //Overwrite with request options - extend(requestOptions, args[cntr]); - - cntr--; - } - - if(args[cntr] instanceof Buffer) { - head = args[cntr]; - } - - /* optional args parse end */ - - ['target', 'forward'].forEach(function(e) { - if (typeof requestOptions[e] === 'string') - requestOptions[e] = parse_url(requestOptions[e]); - }); - - if (!requestOptions.target && !requestOptions.forward) { - return this.emit('error', new Error('Must provide a proper URL as target')); - } - - for(var i=0; i < passes.length; i++) { - /** - * Call of passes functions - * pass(req, res, options, head) - * - * In WebSockets case the `res` variable - * refer to the connection socket - * pass(req, socket, options, head) - */ - if(passes[i](req, res, requestOptions, head, this, cbl)) { // passes can return a truthy value to halt the loop - break; - } - } - }; - }; -} -httpProxy.createRightProxy = createRightProxy; - -function ProxyServer(options) { - EE3.call(this); - - options = options || {}; - options.prependPath = options.prependPath === false ? false : true; - - this.web = this.proxyRequest = createRightProxy('web')(options); - this.ws = this.proxyWebsocketRequest = createRightProxy('ws')(options); - this.options = options; - - this.webPasses = Object.keys(web).map(function(pass) { - return web[pass]; - }); - - this.wsPasses = Object.keys(ws).map(function(pass) { - return ws[pass]; - }); - - this.on('error', this.onError, this); - -} - -require('util').inherits(ProxyServer, EE3); - -ProxyServer.prototype.onError = function (err) { - // - // Remark: Replicate node core behavior using EE3 - // so we force people to handle their own errors - // - if(this.listeners('error').length === 1) { - throw err; - } -}; - -ProxyServer.prototype.listen = function(port, hostname) { - var self = this, - closure = function(req, res) { self.web(req, res); }; - - this._server = this.options.ssl ? - https.createServer(this.options.ssl, closure) : - http.createServer(closure); - - if(this.options.ws) { - this._server.on('upgrade', function(req, socket, head) { self.ws(req, socket, head); }); - } - - this._server.listen(port, hostname); - - return this; -}; - -ProxyServer.prototype.close = function(callback) { - var self = this; - if (this._server) { - this._server.close(done); - } - - // Wrap callback to nullify server after all open connections are closed. - function done() { - self._server = null; - if (callback) { - callback.apply(null, arguments); - } - }; -}; - -ProxyServer.prototype.before = function(type, passName, callback) { - if (type !== 'ws' && type !== 'web') { - throw new Error('type must be `web` or `ws`'); - } - var passes = (type === 'ws') ? this.wsPasses : this.webPasses, - i = false; - - passes.forEach(function(v, idx) { - if(v.name === passName) i = idx; - }) - - if(i === false) throw new Error('No such pass'); - - passes.splice(i, 0, callback); -}; -ProxyServer.prototype.after = function(type, passName, callback) { - if (type !== 'ws' && type !== 'web') { - throw new Error('type must be `web` or `ws`'); - } - var passes = (type === 'ws') ? this.wsPasses : this.webPasses, - i = false; - - passes.forEach(function(v, idx) { - if(v.name === passName) i = idx; - }) - - if(i === false) throw new Error('No such pass'); - - passes.splice(i++, 0, callback); -}; diff --git a/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js b/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js deleted file mode 100644 index 7ae7355..0000000 --- a/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js +++ /dev/null @@ -1,194 +0,0 @@ -var httpNative = require('http'), - httpsNative = require('https'), - web_o = require('./web-outgoing'), - common = require('../common'), - followRedirects = require('follow-redirects'); - -web_o = Object.keys(web_o).map(function(pass) { - return web_o[pass]; -}); - -var nativeAgents = { http: httpNative, https: httpsNative }; - -/*! - * Array of passes. - * - * A `pass` is just a function that is executed on `req, res, options` - * so that you can easily add new checks while still keeping the base - * flexible. - */ - - -module.exports = { - - /** - * Sets `content-length` to '0' if request is of DELETE type. - * - * @param {ClientRequest} Req Request object - * @param {IncomingMessage} Res Response object - * @param {Object} Options Config object passed to the proxy - * - * @api private - */ - - deleteLength: function deleteLength(req, res, options) { - if((req.method === 'DELETE' || req.method === 'OPTIONS') - && !req.headers['content-length']) { - req.headers['content-length'] = '0'; - delete req.headers['transfer-encoding']; - } - }, - - /** - * Sets timeout in request socket if it was specified in options. - * - * @param {ClientRequest} Req Request object - * @param {IncomingMessage} Res Response object - * @param {Object} Options Config object passed to the proxy - * - * @api private - */ - - timeout: function timeout(req, res, options) { - if(options.timeout) { - req.socket.setTimeout(options.timeout); - } - }, - - /** - * Sets `x-forwarded-*` headers if specified in config. - * - * @param {ClientRequest} Req Request object - * @param {IncomingMessage} Res Response object - * @param {Object} Options Config object passed to the proxy - * - * @api private - */ - - XHeaders: function XHeaders(req, res, options) { - if(!options.xfwd) return; - - var encrypted = req.isSpdy || common.hasEncryptedConnection(req); - var values = { - for : req.connection.remoteAddress || req.socket.remoteAddress, - port : common.getPort(req), - proto: encrypted ? 'https' : 'http' - }; - - ['for', 'port', 'proto'].forEach(function(header) { - req.headers['x-forwarded-' + header] = - (req.headers['x-forwarded-' + header] || '') + - (req.headers['x-forwarded-' + header] ? ',' : '') + - values[header]; - }); - - req.headers['x-forwarded-host'] = req.headers['x-forwarded-host'] || req.headers['host'] || ''; - }, - - /** - * Does the actual proxying. If `forward` is enabled fires up - * a ForwardStream, same happens for ProxyStream. The request - * just dies otherwise. - * - * @param {ClientRequest} Req Request object - * @param {IncomingMessage} Res Response object - * @param {Object} Options Config object passed to the proxy - * - * @api private - */ - - stream: function stream(req, res, options, _, server, clb) { - - // And we begin! - server.emit('start', req, res, options.target || options.forward); - - var agents = options.followRedirects ? followRedirects : nativeAgents; - var http = agents.http; - var https = agents.https; - - if(options.forward) { - // If forward enable, so just pipe the request - var forwardReq = (options.forward.protocol === 'https:' ? https : http).request( - common.setupOutgoing(options.ssl || {}, options, req, 'forward') - ); - - // error handler (e.g. ECONNRESET, ECONNREFUSED) - // Handle errors on incoming request as well as it makes sense to - var forwardError = createErrorHandler(forwardReq, options.forward); - req.on('error', forwardError); - forwardReq.on('error', forwardError); - - (options.buffer || req).pipe(forwardReq); - if(!options.target) { return res.end(); } - } - - // Request initalization - var proxyReq = (options.target.protocol === 'https:' ? https : http).request( - common.setupOutgoing(options.ssl || {}, options, req) - ); - - // Enable developers to modify the proxyReq before headers are sent - proxyReq.on('socket', function(socket) { - if(server && !proxyReq.getHeader('expect')) { - server.emit('proxyReq', proxyReq, req, res, options); - } - }); - - // allow outgoing socket to timeout so that we could - // show an error page at the initial request - if(options.proxyTimeout) { - proxyReq.setTimeout(options.proxyTimeout, function() { - proxyReq.abort(); - }); - } - - // Ensure we abort proxy if request is aborted - req.on('aborted', function () { - proxyReq.abort(); - }); - - // handle errors in proxy and incoming request, just like for forward proxy - var proxyError = createErrorHandler(proxyReq, options.target); - req.on('error', proxyError); - proxyReq.on('error', proxyError); - - function createErrorHandler(proxyReq, url) { - return function proxyError(err) { - if (req.socket.destroyed && err.code === 'ECONNRESET') { - server.emit('econnreset', err, req, res, url); - return proxyReq.abort(); - } - - if (clb) { - clb(err, req, res, url); - } else { - server.emit('error', err, req, res, url); - } - } - } - - (options.buffer || req).pipe(proxyReq); - - proxyReq.on('response', function(proxyRes) { - if(server) { server.emit('proxyRes', proxyRes, req, res); } - - if(!res.headersSent && !options.selfHandleResponse) { - for(var i=0; i < web_o.length; i++) { - if(web_o[i](req, res, proxyRes, options)) { break; } - } - } - - if (!res.finished) { - // Allow us to listen when the proxy has completed - proxyRes.on('end', function () { - if (server) server.emit('end', req, res, proxyRes); - }); - // We pipe to the response unless its expected to be handled by the user - if (!options.selfHandleResponse) proxyRes.pipe(res); - } else { - if (server) server.emit('end', req, res, proxyRes); - } - }); - } - -}; diff --git a/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js b/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js deleted file mode 100644 index 46352f6..0000000 --- a/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js +++ /dev/null @@ -1,147 +0,0 @@ -var url = require('url'), - common = require('../common'); - - -var redirectRegex = /^201|30(1|2|7|8)$/; - -/*! - * Array of passes. - * - * A `pass` is just a function that is executed on `req, res, options` - * so that you can easily add new checks while still keeping the base - * flexible. - */ - -module.exports = { // <-- - - /** - * If is a HTTP 1.0 request, remove chunk headers - * - * @param {ClientRequest} Req Request object - * @param {IncomingMessage} Res Response object - * @param {proxyResponse} Res Response object from the proxy request - * - * @api private - */ - removeChunked: function removeChunked(req, res, proxyRes) { - if (req.httpVersion === '1.0') { - delete proxyRes.headers['transfer-encoding']; - } - }, - - /** - * If is a HTTP 1.0 request, set the correct connection header - * or if connection header not present, then use `keep-alive` - * - * @param {ClientRequest} Req Request object - * @param {IncomingMessage} Res Response object - * @param {proxyResponse} Res Response object from the proxy request - * - * @api private - */ - setConnection: function setConnection(req, res, proxyRes) { - if (req.httpVersion === '1.0') { - proxyRes.headers.connection = req.headers.connection || 'close'; - } else if (req.httpVersion !== '2.0' && !proxyRes.headers.connection) { - proxyRes.headers.connection = req.headers.connection || 'keep-alive'; - } - }, - - setRedirectHostRewrite: function setRedirectHostRewrite(req, res, proxyRes, options) { - if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite) - && proxyRes.headers['location'] - && redirectRegex.test(proxyRes.statusCode)) { - var target = url.parse(options.target); - var u = url.parse(proxyRes.headers['location']); - - // make sure the redirected host matches the target host before rewriting - if (target.host != u.host) { - return; - } - - if (options.hostRewrite) { - u.host = options.hostRewrite; - } else if (options.autoRewrite) { - u.host = req.headers['host']; - } - if (options.protocolRewrite) { - u.protocol = options.protocolRewrite; - } - - proxyRes.headers['location'] = u.format(); - } - }, - /** - * Copy headers from proxyResponse to response - * set each header in response object. - * - * @param {ClientRequest} Req Request object - * @param {IncomingMessage} Res Response object - * @param {proxyResponse} Res Response object from the proxy request - * @param {Object} Options options.cookieDomainRewrite: Config to rewrite cookie domain - * - * @api private - */ - writeHeaders: function writeHeaders(req, res, proxyRes, options) { - var rewriteCookieDomainConfig = options.cookieDomainRewrite, - rewriteCookiePathConfig = options.cookiePathRewrite, - preserveHeaderKeyCase = options.preserveHeaderKeyCase, - rawHeaderKeyMap, - setHeader = function(key, header) { - if (header == undefined) return; - if (rewriteCookieDomainConfig && key.toLowerCase() === 'set-cookie') { - header = common.rewriteCookieProperty(header, rewriteCookieDomainConfig, 'domain'); - } - if (rewriteCookiePathConfig && key.toLowerCase() === 'set-cookie') { - header = common.rewriteCookieProperty(header, rewriteCookiePathConfig, 'path'); - } - res.setHeader(String(key).trim(), header); - }; - - if (typeof rewriteCookieDomainConfig === 'string') { //also test for '' - rewriteCookieDomainConfig = { '*': rewriteCookieDomainConfig }; - } - - if (typeof rewriteCookiePathConfig === 'string') { //also test for '' - rewriteCookiePathConfig = { '*': rewriteCookiePathConfig }; - } - - // message.rawHeaders is added in: v0.11.6 - // https://nodejs.org/api/http.html#http_message_rawheaders - if (preserveHeaderKeyCase && proxyRes.rawHeaders != undefined) { - rawHeaderKeyMap = {}; - for (var i = 0; i < proxyRes.rawHeaders.length; i += 2) { - var key = proxyRes.rawHeaders[i]; - rawHeaderKeyMap[key.toLowerCase()] = key; - } - } - - Object.keys(proxyRes.headers).forEach(function(key) { - var header = proxyRes.headers[key]; - if (preserveHeaderKeyCase && rawHeaderKeyMap) { - key = rawHeaderKeyMap[key] || key; - } - setHeader(key, header); - }); - }, - - /** - * Set the statusCode from the proxyResponse - * - * @param {ClientRequest} Req Request object - * @param {IncomingMessage} Res Response object - * @param {proxyResponse} Res Response object from the proxy request - * - * @api private - */ - writeStatusCode: function writeStatusCode(req, res, proxyRes) { - // From Node.js docs: response.writeHead(statusCode[, statusMessage][, headers]) - if(proxyRes.statusMessage) { - res.statusCode = proxyRes.statusCode; - res.statusMessage = proxyRes.statusMessage; - } else { - res.statusCode = proxyRes.statusCode; - } - } - -}; diff --git a/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js b/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js deleted file mode 100644 index 270f23f..0000000 --- a/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js +++ /dev/null @@ -1,162 +0,0 @@ -var http = require('http'), - https = require('https'), - common = require('../common'); - -/*! - * Array of passes. - * - * A `pass` is just a function that is executed on `req, socket, options` - * so that you can easily add new checks while still keeping the base - * flexible. - */ - -/* - * Websockets Passes - * - */ - - -module.exports = { - /** - * WebSocket requests must have the `GET` method and - * the `upgrade:websocket` header - * - * @param {ClientRequest} Req Request object - * @param {Socket} Websocket - * - * @api private - */ - - checkMethodAndHeader : function checkMethodAndHeader(req, socket) { - if (req.method !== 'GET' || !req.headers.upgrade) { - socket.destroy(); - return true; - } - - if (req.headers.upgrade.toLowerCase() !== 'websocket') { - socket.destroy(); - return true; - } - }, - - /** - * Sets `x-forwarded-*` headers if specified in config. - * - * @param {ClientRequest} Req Request object - * @param {Socket} Websocket - * @param {Object} Options Config object passed to the proxy - * - * @api private - */ - - XHeaders : function XHeaders(req, socket, options) { - if(!options.xfwd) return; - - var values = { - for : req.connection.remoteAddress || req.socket.remoteAddress, - port : common.getPort(req), - proto: common.hasEncryptedConnection(req) ? 'wss' : 'ws' - }; - - ['for', 'port', 'proto'].forEach(function(header) { - req.headers['x-forwarded-' + header] = - (req.headers['x-forwarded-' + header] || '') + - (req.headers['x-forwarded-' + header] ? ',' : '') + - values[header]; - }); - }, - - /** - * Does the actual proxying. Make the request and upgrade it - * send the Switching Protocols request and pipe the sockets. - * - * @param {ClientRequest} Req Request object - * @param {Socket} Websocket - * @param {Object} Options Config object passed to the proxy - * - * @api private - */ - stream : function stream(req, socket, options, head, server, clb) { - - var createHttpHeader = function(line, headers) { - return Object.keys(headers).reduce(function (head, key) { - var value = headers[key]; - - if (!Array.isArray(value)) { - head.push(key + ': ' + value); - return head; - } - - for (var i = 0; i < value.length; i++) { - head.push(key + ': ' + value[i]); - } - return head; - }, [line]) - .join('\r\n') + '\r\n\r\n'; - } - - common.setupSocket(socket); - - if (head && head.length) socket.unshift(head); - - - var proxyReq = (common.isSSL.test(options.target.protocol) ? https : http).request( - common.setupOutgoing(options.ssl || {}, options, req) - ); - - // Enable developers to modify the proxyReq before headers are sent - if (server) { server.emit('proxyReqWs', proxyReq, req, socket, options, head); } - - // Error Handler - proxyReq.on('error', onOutgoingError); - proxyReq.on('response', function (res) { - // if upgrade event isn't going to happen, close the socket - if (!res.upgrade) { - socket.write(createHttpHeader('HTTP/' + res.httpVersion + ' ' + res.statusCode + ' ' + res.statusMessage, res.headers)); - res.pipe(socket); - } - }); - - proxyReq.on('upgrade', function(proxyRes, proxySocket, proxyHead) { - proxySocket.on('error', onOutgoingError); - - // Allow us to listen when the websocket has completed - proxySocket.on('end', function () { - server.emit('close', proxyRes, proxySocket, proxyHead); - }); - - // The pipe below will end proxySocket if socket closes cleanly, but not - // if it errors (eg, vanishes from the net and starts returning - // EHOSTUNREACH). We need to do that explicitly. - socket.on('error', function () { - proxySocket.end(); - }); - - common.setupSocket(proxySocket); - - if (proxyHead && proxyHead.length) proxySocket.unshift(proxyHead); - - // - // Remark: Handle writing the headers to the socket when switching protocols - // Also handles when a header is an array - // - socket.write(createHttpHeader('HTTP/1.1 101 Switching Protocols', proxyRes.headers)); - - proxySocket.pipe(socket).pipe(proxySocket); - - server.emit('open', proxySocket); - server.emit('proxySocket', proxySocket); //DEPRECATED. - }); - - return proxyReq.end(); // XXX: CHECK IF THIS IS THIS CORRECT - - function onOutgoingError(err) { - if (clb) { - clb(err, req, socket); - } else { - server.emit('error', err, req, socket); - } - socket.end(); - } - } -}; diff --git a/node_modules/http-proxy/package.json b/node_modules/http-proxy/package.json deleted file mode 100644 index 9fe81a2..0000000 --- a/node_modules/http-proxy/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "http-proxy", - "version": "1.18.1", - "repository": { - "type": "git", - "url": "https://github.com/http-party/node-http-proxy.git" - }, - "description": "HTTP proxying for the masses", - "author": "Charlie Robbins <charlie.robbins@gmail.com>", - "maintainers": [ - "jcrugzz <jcrugzz@gmail.com>" - ], - "main": "index.js", - "dependencies": { - "eventemitter3": "^4.0.0", - "requires-port": "^1.0.0", - "follow-redirects": "^1.0.0" - }, - "devDependencies": { - "async": "^3.0.0", - "auto-changelog": "^1.15.0", - "concat-stream": "^2.0.0", - "expect.js": "~0.3.1", - "mocha": "^3.5.3", - "nyc": "^14.0.0", - "semver": "^5.0.3", - "socket.io": "^2.1.0", - "socket.io-client": "^2.1.0", - "sse": "0.0.8", - "ws": "^3.0.0" - }, - "scripts": { - "mocha": "mocha test/*-test.js", - "test": "nyc --reporter=text --reporter=lcov npm run mocha", - "version": "auto-changelog -p && git add CHANGELOG.md" - }, - "engines": { - "node": ">=8.0.0" - }, - "license": "MIT" -} diff --git a/node_modules/http-proxy/renovate.json b/node_modules/http-proxy/renovate.json deleted file mode 100644 index fc1d2aa..0000000 --- a/node_modules/http-proxy/renovate.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "platform": "github", - "autodiscover": false, - "requireConfig": true, - "ignoreNpmrcFile": true, - "rangeStrategy": "replace", - "packageRules": [ - { - "packagePatterns": [ - "*" - ], - "minor": { - "groupName": "all non-major dependencies", - "groupSlug": "all-minor-patch" - } - } - ], - "commitMessagePrefix": "[dist]" -} diff --git a/node_modules/http-server/LICENSE b/node_modules/http-server/LICENSE deleted file mode 100644 index d918093..0000000 --- a/node_modules/http-server/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2011-2022 Charlie Robbins, Marak Squires, Jade Michael Thornton and the 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/node_modules/http-server/README.md b/node_modules/http-server/README.md deleted file mode 100644 index 0ffbbc1..0000000 --- a/node_modules/http-server/README.md +++ /dev/null @@ -1,149 +0,0 @@ -[![GitHub Workflow Status (master)](https://img.shields.io/github/workflow/status/http-party/http-server/Node.js%20CI/master?style=flat-square)](https://github.com/http-party/http-server/actions) -[![npm](https://img.shields.io/npm/v/http-server.svg?style=flat-square)](https://www.npmjs.com/package/http-server) [![homebrew](https://img.shields.io/homebrew/v/http-server?style=flat-square)](https://formulae.brew.sh/formula/http-server) [![npm downloads](https://img.shields.io/npm/dm/http-server?color=blue&label=npm%20downloads&style=flat-square)](https://www.npmjs.com/package/http-server) -[![license](https://img.shields.io/github/license/http-party/http-server.svg?style=flat-square)](https://github.com/http-party/http-server) - -# http-server: a simple static HTTP server - -`http-server` is a simple, zero-configuration command-line static HTTP server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development and learning. - -![Example of running http-server](https://github.com/http-party/http-server/raw/master/screenshots/public.png) - -## Installation: - -#### Running on-demand: - -Using `npx` you can run the script without installing it first: - - npx http-server [path] [options] - -#### Globally via `npm` - - npm install --global http-server - -This will install `http-server` globally so that it may be run from the command line anywhere. - -#### Globally via Homebrew - - brew install http-server - -#### As a dependency in your `npm` package: - - npm install http-server - -## Usage: - - http-server [path] [options] - -`[path]` defaults to `./public` if the folder exists, and `./` otherwise. - -*Now you can visit http://localhost:8080 to view your server* - -**Note:** Caching is on by default. Add `-c-1` as an option to disable caching. - -## Available Options: - -| Command | Description | Defaults | -| ------------- |-------------|-------------| -|`-p` or `--port` |Port to use. Use `-p 0` to look for an open port, starting at 8080. It will also read from `process.env.PORT`. |8080 | -|`-a` |Address to use |0.0.0.0| -|`-d` |Show directory listings |`true` | -|`-i` | Display autoIndex | `true` | -|`-g` or `--gzip` |When enabled it will serve `./public/some-file.js.gz` in place of `./public/some-file.js` when a gzipped version of the file exists and the request accepts gzip encoding. If brotli is also enabled, it will try to serve brotli first.|`false`| -|`-b` or `--brotli`|When enabled it will serve `./public/some-file.js.br` in place of `./public/some-file.js` when a brotli compressed version of the file exists and the request accepts `br` encoding. If gzip is also enabled, it will try to serve brotli first. |`false`| -|`-e` or `--ext` |Default file extension if none supplied |`html` | -|`-s` or `--silent` |Suppress log messages from output | | -|`--cors` |Enable CORS via the `Access-Control-Allow-Origin` header | | -|`-o [path]` |Open browser window after starting the server. Optionally provide a URL path to open. e.g.: -o /other/dir/ | | -|`-c` |Set cache time (in seconds) for cache-control max-age header, e.g. `-c10` for 10 seconds. To disable caching, use `-c-1`.|`3600` | -|`-U` or `--utc` |Use UTC time format in log messages.| | -|`--log-ip` |Enable logging of the client's IP address |`false` | -|`-P` or `--proxy` |Proxies all requests which can't be resolved locally to the given url. e.g.: -P http://someurl.com | | -|`--proxy-options` |Pass proxy [options](https://github.com/http-party/node-http-proxy#options) using nested dotted objects. e.g.: --proxy-options.secure false | -|`--username` |Username for basic authentication | | -|`--password` |Password for basic authentication | | -|`-S`, `--tls` or `--ssl` |Enable secure request serving with TLS/SSL (HTTPS)|`false`| -|`-C` or `--cert` |Path to ssl cert file |`cert.pem` | -|`-K` or `--key` |Path to ssl key file |`key.pem` | -|`-r` or `--robots` | Automatically provide a /robots.txt (The content of which defaults to `User-agent: *\nDisallow: /`) | `false` | -|`--no-dotfiles` |Do not show dotfiles| | -|`--mimetypes` |Path to a .types file for custom mimetype definition| | -|`-h` or `--help` |Print this list and exit. | | -|`-v` or `--version`|Print the version and exit. | | - -## Magic Files - -- `index.html` will be served as the default file to any directory requests. -- `404.html` will be served if a file is not found. This can be used for Single-Page App (SPA) hosting to serve the entry page. - -## Catch-all redirect - -To implement a catch-all redirect, use the index page itself as the proxy with: - -``` -http-server --proxy http://localhost:8080? -``` - -Note the `?` at the end of the proxy URL. Thanks to [@houston3](https://github.com/houston3) for this clever hack! - -## TLS/SSL - -First, you need to make sure that [openssl](https://github.com/openssl/openssl) is installed correctly, and you have `key.pem` and `cert.pem` files. You can generate them using this command: - -``` sh -openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem -``` - -You will be prompted with a few questions after entering the command. Use `127.0.0.1` as value for `Common name` if you want to be able to install the certificate in your OS's root certificate store or browser so that it is trusted. - -This generates a cert-key pair and it will be valid for 3650 days (about 10 years). - -Then you need to run the server with `-S` for enabling SSL and `-C` for your certificate file. - -``` sh -http-server -S -C cert.pem -``` - -If you wish to use a passphrase with your private key you can include one in the openssl command via the -passout parameter (using password of foobar) - - -e.g. -`openssl req -newkey rsa:2048 -passout pass:foobar -keyout key.pem -x509 -days 365 -out cert.pem` - -For security reasons, the passphrase will only be read from the `NODE_HTTP_SERVER_SSL_PASSPHRASE` environment variable. - - -This is what should be output if successful: - -``` sh -Starting up http-server, serving ./ through https - -http-server settings: -CORS: disabled -Cache: 3600 seconds -Connection Timeout: 120 seconds -Directory Listings: visible -AutoIndex: visible -Serve GZIP Files: false -Serve Brotli Files: false -Default File Extension: none - -Available on: - https://127.0.0.1:8080 - https://192.168.1.101:8080 - https://192.168.1.104:8080 -Hit CTRL-C to stop the server -``` - -# Development - -Checkout this repository locally, then: - -```sh -$ npm i -$ npm start -``` - -*Now you can visit http://localhost:8080 to view your server* - -You should see the turtle image in the screenshot above hosted at that URL. See -the `./public` folder for demo content. diff --git a/node_modules/http-server/bin/http-server b/node_modules/http-server/bin/http-server deleted file mode 100644 index 7c597fa..0000000 --- a/node_modules/http-server/bin/http-server +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - -var chalk = require('chalk'), - os = require('os'), - httpServer = require('../lib/http-server'), - portfinder = require('portfinder'), - opener = require('opener'), - - fs = require('fs'), - url = require('url'); -var argv = require('minimist')(process.argv.slice(2), { - alias: { - tls: 'ssl' - } -}); -var ifaces = os.networkInterfaces(); - -process.title = 'http-server'; - -if (argv.h || argv.help) { - console.log([ - 'usage: http-server [path] [options]', - '', - 'options:', - ' -p --port Port to use. If 0, look for open port. [8080]', - ' -a Address to use [0.0.0.0]', - ' -d Show directory listings [true]', - ' -i Display autoIndex [true]', - ' -g --gzip Serve gzip files when possible [false]', - ' -b --brotli Serve brotli files when possible [false]', - ' If both brotli and gzip are enabled, brotli takes precedence', - ' -e --ext Default file extension if none supplied [none]', - ' -s --silent Suppress log messages from output', - ' --cors[=headers] Enable CORS via the "Access-Control-Allow-Origin" header', - ' Optionally provide CORS headers list separated by commas', - ' -o [path] Open browser window after starting the server.', - ' Optionally provide a URL path to open the browser window to.', - ' -c Cache time (max-age) in seconds [3600], e.g. -c10 for 10 seconds.', - ' To disable caching, use -c-1.', - ' -t Connections timeout in seconds [120], e.g. -t60 for 1 minute.', - ' To disable timeout, use -t0', - ' -U --utc Use UTC time format in log messages.', - ' --log-ip Enable logging of the client\'s IP address', - '', - ' -P --proxy Fallback proxy if the request cannot be resolved. e.g.: http://someurl.com', - ' --proxy-options Pass options to proxy using nested dotted objects. e.g.: --proxy-options.secure false', - '', - ' --username Username for basic authentication [none]', - ' Can also be specified with the env variable NODE_HTTP_SERVER_USERNAME', - ' --password Password for basic authentication [none]', - ' Can also be specified with the env variable NODE_HTTP_SERVER_PASSWORD', - '', - ' -S --tls --ssl Enable secure request serving with TLS/SSL (HTTPS)', - ' -C --cert Path to TLS cert file (default: cert.pem)', - ' -K --key Path to TLS key file (default: key.pem)', - '', - ' -r --robots Respond to /robots.txt [User-agent: *\\nDisallow: /]', - ' --no-dotfiles Do not show dotfiles', - ' --mimetypes Path to a .types file for custom mimetype definition', - ' -h --help Print this list and exit.', - ' -v --version Print the version and exit.' - ].join('\n')); - process.exit(); -} - -var port = argv.p || argv.port || parseInt(process.env.PORT, 10), - host = argv.a || '0.0.0.0', - tls = argv.S || argv.tls, - sslPassphrase = process.env.NODE_HTTP_SERVER_SSL_PASSPHRASE, - proxy = argv.P || argv.proxy, - proxyOptions = argv['proxy-options'], - utc = argv.U || argv.utc, - version = argv.v || argv.version, - logger; - -var proxyOptionsBooleanProps = [ - 'ws', 'xfwd', 'secure', 'toProxy', 'prependPath', 'ignorePath', 'changeOrigin', - 'preserveHeaderKeyCase', 'followRedirects', 'selfHandleResponse' -]; - -if (proxyOptions) { - Object.keys(proxyOptions).forEach(function (key) { - if (proxyOptionsBooleanProps.indexOf(key) > -1) { - proxyOptions[key] = proxyOptions[key].toLowerCase() === 'true'; - } - }); -} - -if (!argv.s && !argv.silent) { - logger = { - info: console.log, - request: function (req, res, error) { - var date = utc ? new Date().toUTCString() : new Date(); - var ip = argv['log-ip'] - ? req.headers['x-forwarded-for'] || '' + req.connection.remoteAddress - : ''; - if (error) { - logger.info( - '[%s] %s "%s %s" Error (%s): "%s"', - date, ip, chalk.red(req.method), chalk.red(req.url), - chalk.red(error.status.toString()), chalk.red(error.message) - ); - } - else { - logger.info( - '[%s] %s "%s %s" "%s"', - date, ip, chalk.cyan(req.method), chalk.cyan(req.url), - req.headers['user-agent'] - ); - } - } - }; -} -else if (chalk) { - logger = { - info: function () {}, - request: function () {} - }; -} - -if (version) { - logger.info('v' + require('../package.json').version); - process.exit(); -} - -if (!port) { - portfinder.basePort = 8080; - portfinder.getPort(function (err, port) { - if (err) { throw err; } - listen(port); - }); -} -else { - listen(port); -} - -function listen(port) { - var options = { - root: argv._[0], - cache: argv.c, - timeout: argv.t, - showDir: argv.d, - autoIndex: argv.i, - gzip: argv.g || argv.gzip, - brotli: argv.b || argv.brotli, - robots: argv.r || argv.robots, - ext: argv.e || argv.ext, - logFn: logger.request, - proxy: proxy, - proxyOptions: proxyOptions, - showDotfiles: argv.dotfiles, - mimetypes: argv.mimetypes, - username: argv.username || process.env.NODE_HTTP_SERVER_USERNAME, - password: argv.password || process.env.NODE_HTTP_SERVER_PASSWORD - }; - - if (argv.cors) { - options.cors = true; - if (typeof argv.cors === 'string') { - options.corsHeaders = argv.cors; - } - } - - if (proxy) { - try { - new url.URL(proxy) - } - catch (err) { - logger.info(chalk.red('Error: Invalid proxy url')); - process.exit(1); - } - } - - if (tls) { - options.https = { - cert: argv.C || argv.cert || 'cert.pem', - key: argv.K || argv.key || 'key.pem', - passphrase: sslPassphrase, - }; - try { - fs.lstatSync(options.https.cert); - } - catch (err) { - logger.info(chalk.red('Error: Could not find certificate ' + options.https.cert)); - process.exit(1); - } - try { - fs.lstatSync(options.https.key); - } - catch (err) { - logger.info(chalk.red('Error: Could not find private key ' + options.https.key)); - process.exit(1); - } - } - - var server = httpServer.createServer(options); - server.listen(port, host, function () { - var protocol = tls ? 'https://' : 'http://'; - - logger.info([ - chalk.yellow('Starting up http-server, serving '), - chalk.cyan(server.root), - tls ? (chalk.yellow(' through') + chalk.cyan(' https')) : '' - ].join('')); - - logger.info([chalk.yellow('\nhttp-server version: '), chalk.cyan(require('../package.json').version)].join('')); - - logger.info([ - chalk.yellow('\nhttp-server settings: '), - ([chalk.yellow('CORS: '), argv.cors ? chalk.cyan(argv.cors) : chalk.red('disabled')].join('')), - ([chalk.yellow('Cache: '), argv.c ? (argv.c === '-1' ? chalk.red('disabled') : chalk.cyan(argv.c + ' seconds')) : chalk.cyan('3600 seconds')].join('')), - ([chalk.yellow('Connection Timeout: '), argv.t === '0' ? chalk.red('disabled') : (argv.t ? chalk.cyan(argv.t + ' seconds') : chalk.cyan('120 seconds'))].join('')), - ([chalk.yellow('Directory Listings: '), argv.d ? chalk.red('not visible') : chalk.cyan('visible')].join('')), - ([chalk.yellow('AutoIndex: '), argv.i ? chalk.red('not visible') : chalk.cyan('visible')].join('')), - ([chalk.yellow('Serve GZIP Files: '), argv.g || argv.gzip ? chalk.cyan('true') : chalk.red('false')].join('')), - ([chalk.yellow('Serve Brotli Files: '), argv.b || argv.brotli ? chalk.cyan('true') : chalk.red('false')].join('')), - ([chalk.yellow('Default File Extension: '), argv.e ? chalk.cyan(argv.e) : (argv.ext ? chalk.cyan(argv.ext) : chalk.red('none'))].join('')) - ].join('\n')); - - logger.info(chalk.yellow('\nAvailable on:')); - - if (argv.a && host !== '0.0.0.0') { - logger.info(` ${protocol}${host}:${chalk.green(port.toString())}`); - } else { - Object.keys(ifaces).forEach(function (dev) { - ifaces[dev].forEach(function (details) { - if (details.family === 'IPv4') { - logger.info((' ' + protocol + details.address + ':' + chalk.green(port.toString()))); - } - }); - }); - } - - if (typeof proxy === 'string') { - if (proxyOptions) { - logger.info('Unhandled requests will be served from: ' + proxy + '. Options: ' + JSON.stringify(proxyOptions)); - } - else { - logger.info('Unhandled requests will be served from: ' + proxy); - } - } - - logger.info('Hit CTRL-C to stop the server'); - if (argv.o) { - const openHost = host === '0.0.0.0' ? '127.0.0.1' : host; - let openUrl = `${protocol}${openHost}:${port}`; - if (typeof argv.o === 'string') { - openUrl += argv.o[0] === '/' ? argv.o : '/' + argv.o; - } - logger.info('Open: ' + openUrl); - opener(openUrl); - } - - // Spacing before logs - if (!argv.s) logger.info(); - }); -} - -if (process.platform === 'win32') { - require('readline').createInterface({ - input: process.stdin, - output: process.stdout - }).on('SIGINT', function () { - process.emit('SIGINT'); - }); -} - -process.on('SIGINT', function () { - logger.info(chalk.red('http-server stopped.')); - process.exit(); -}); - -process.on('SIGTERM', function () { - logger.info(chalk.red('http-server stopped.')); - process.exit(); -}); diff --git a/node_modules/http-server/doc/http-server.1 b/node_modules/http-server/doc/http-server.1 deleted file mode 100644 index 8e2796e..0000000 --- a/node_modules/http-server/doc/http-server.1 +++ /dev/null @@ -1,165 +0,0 @@ -.TH http-server 1 "April 2020" GNU "http-server man page" - -.SH NAME -http-server \- a simple zero-configuration command-line http server - -.SH SYNOPSIS -.B http-server -[\fIPATH\fR] -[\fIOPTIONS\fR] - -.SH DESCRIPTION -\fBhttp-server\fR is a simple, zero-configuration command-line http server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning. - -.SH OPTIONS - -.TP -.BI [\fIPATH\fR] -The directory to serve. -Defaults to ./public if it exists, and ./ otherwise. - -.TP -.BI \-p ", " \-\-port " " \fIPORT\fR -Port to use. If 0, look for the first available port, starting at 8080. -Default is 8080. - -.TP -.BI \-a " " \fIADDRESS\fR -Address to use. -Default is 0.0.0.0. - -.TP -.BI \-d -Show directory listings. -Default is true. - -.TP -.BI \-i -Display autoIndex. -Default is true. - -.TP -.BI \-g ", " \-\-gzip -Serve gzip files when possible. -Default is false. - -.TP -.BI \-b ", " \-\-brotli -Serve brotli files when possible. -If both brotli and gzip are enabled, brotli takes precedence. -Default is false. - -.TP -.BI \-e ", " \-\-ext " " \fIEXTENSION\fR -Default file extension is none is provided. - -.TP -.BI \-s ", " \-\-silent -Suppress log messages from output. - -.TP -.BI \-\-cors " " [\fIHEADERS\fR] -Enable CORS via the "Access-Control-Allow-Origin" header. -Optionally provide CORS headers list separated by commas. - -.TP -.BI \-o " " [\fIPATH\fR] -Open default browser window after starting the server. -Optionally provide a URL path to open the browser window to. - -.TP -.BI \-c " " \fITIME\fR -Cache time (max-age) in seconds. -To disable caching, use \-c \-1. -Default is 3600. - -.TP -.BI \-U ", " \-\-utc -Use UTC time format in log messages. - -.TP -.BI \-\-log\-ip -Enable logging of the client IP address. - -.TP -.BI \-P ", " \-\-proxy -Fallback proxy if the request cannot be resolved. - -.TP -.BI \-\-proxy\-options -Pass proxy options using nested dotted objects. - -.TP -.BI \-\-username " " \fIUSERNAME\fR -Username for basic authentication. -Can also be specified with the environment variable NODE_HTTP_SERVER_USERNAME. -Defaults to none. - -.TP -.BI \-\-password " " \fIPASSWORD\fR -Password for basic authentication. -Can also be specified with the environment variable NODE_HTTP_SERVER_PASSWORD. -Defaults to none. - -.TP -.BI \-S ", " \-\-tls ", " \-\-ssl -Enable https. - -.TP -.BI \-C ", " \-\-cert " " [\fIFILE\fR] -Path to SSL certificate file. -If not specified, uses cert.pem. - -.TP -.BI \-K ", " \-\-key " " [\fIFILE\fR] -Path to SSL key file. -If not specified, uses key.pem. -Passphrase will be read from NODE_HTTP_SERVER_SSL_PASSPHRASE (if set) - -.TP -.BI \-r ", " \-\-robots " " [\fIUSER\-AGENT\fR] -Respond to /robots.txt request. -If not specified, uses "User-agent: *\\nDisallow: /]" - -.TP -.BI \-\-no\-dotfiles -Do not show dotfiles. - -.TP -.BI \-h ", " \-\-help -Print usage and exit. - -.TP -.BI \-v ", " \-\-version -Print version and exit. - -.SH FILES -.B index.html -will be served as the default file to any directory requests. - -.B 404.html -will be served if a file is not found. This can be used for SPA hosting to serve the entry page. - -.SH COPYING -Copyright (c) 2011-2022 Charlie Robbins, Marak Squires, and the 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. - -.SH VERSION -Version 0.12.2 diff --git a/node_modules/http-server/lib/core/aliases.json b/node_modules/http-server/lib/core/aliases.json deleted file mode 100644 index 53a22a5..0000000 --- a/node_modules/http-server/lib/core/aliases.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "autoIndex": [ "autoIndex", "autoindex" ], - "showDir": [ "showDir", "showdir" ], - "showDotfiles": ["showDotfiles", "showdotfiles"], - "humanReadable": [ "humanReadable", "humanreadable", "human-readable" ], - "hidePermissions": ["hidePermissions", "hidepermissions", "hide-permissions"], - "si": [ "si", "index" ], - "handleError": [ "handleError", "handleerror" ], - "cors": [ "cors", "CORS" ], - "headers": [ "H", "header", "headers" ], - "contentType": [ "contentType", "contenttype", "content-type" ], - "mimeType": [ - "mimetype", - "mimetypes", - "mimeType", - "mimeTypes", - "mime-type", - "mime-types", - "mime-Type", - "mime-Types" - ], - "weakEtags": [ "weakEtags", "weaketags", "weak-etags" ], - "weakCompare": [ - "weakcompare", - "weakCompare", - "weak-compare", - "weak-Compare" - ], - "handleOptionsMethod": [ - "handleOptionsMethod", - "handleoptionsmethod", - "handle-options-method" - ] -} diff --git a/node_modules/http-server/lib/core/defaults.json b/node_modules/http-server/lib/core/defaults.json deleted file mode 100644 index d919f29..0000000 --- a/node_modules/http-server/lib/core/defaults.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "autoIndex": true, - "showDir": true, - "showDotfiles": true, - "humanReadable": true, - "hidePermissions": false, - "si": false, - "cache": "max-age=3600", - "cors": false, - "gzip": true, - "brotli": false, - "defaultExt": ".html", - "handleError": true, - "contentType": "application/octet-stream", - "weakEtags": true, - "weakCompare": true, - "handleOptionsMethod": false -} diff --git a/node_modules/http-server/lib/core/etag.js b/node_modules/http-server/lib/core/etag.js deleted file mode 100644 index d3cdded..0000000 --- a/node_modules/http-server/lib/core/etag.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -module.exports = (stat, weakEtag) => { - let etag = `"${[stat.ino, stat.size, stat.mtime.toISOString()].join('-')}"`; - if (weakEtag) { - etag = `W/${etag}`; - } - return etag; -}; diff --git a/node_modules/http-server/lib/core/index.js b/node_modules/http-server/lib/core/index.js deleted file mode 100644 index 920e55b..0000000 --- a/node_modules/http-server/lib/core/index.js +++ /dev/null @@ -1,487 +0,0 @@ -#! /usr/bin/env node - -'use strict'; - -const path = require('path'); -const fs = require('fs'); -const url = require('url'); -const { Readable } = require('stream'); -const buffer = require('buffer'); -const mime = require('mime'); -const urlJoin = require('url-join'); -const showDir = require('./show-dir'); -const version = require('../../package.json').version; -const status = require('./status-handlers'); -const generateEtag = require('./etag'); -const optsParser = require('./opts'); -const htmlEncodingSniffer = require('html-encoding-sniffer'); - -let httpServerCore = null; - -function decodePathname(pathname) { - const pieces = pathname.replace(/\\/g, '/').split('/'); - - const normalized = path.normalize(pieces.map((rawPiece) => { - const piece = decodeURIComponent(rawPiece); - - if (process.platform === 'win32' && /\\/.test(piece)) { - throw new Error('Invalid forward slash character'); - } - - return piece; - }).join('/')); - return process.platform === 'win32' - ? normalized.replace(/\\/g, '/') : normalized; -} - -const nonUrlSafeCharsRgx = /[\x00-\x1F\x20\x7F-\uFFFF]+/g; -function ensureUriEncoded(text) { - return text - return String(text).replace(nonUrlSafeCharsRgx, encodeURIComponent); -} - -// Check to see if we should try to compress a file with gzip. -function shouldCompressGzip(req) { - const headers = req.headers; - - return headers && headers['accept-encoding'] && - headers['accept-encoding'] - .split(',') - .some(el => ['*', 'compress', 'gzip', 'deflate'].indexOf(el.trim()) !== -1) - ; -} - -function shouldCompressBrotli(req) { - const headers = req.headers; - - return headers && headers['accept-encoding'] && - headers['accept-encoding'] - .split(',') - .some(el => ['*', 'br'].indexOf(el.trim()) !== -1) - ; -} - -function hasGzipId12(gzipped, cb) { - const stream = fs.createReadStream(gzipped, { start: 0, end: 1 }); - let buffer = Buffer.from(''); - let hasBeenCalled = false; - - stream.on('data', (chunk) => { - buffer = Buffer.concat([buffer, chunk], 2); - }); - - stream.on('error', (err) => { - if (hasBeenCalled) { - throw err; - } - - hasBeenCalled = true; - cb(err); - }); - - stream.on('close', () => { - if (hasBeenCalled) { - return; - } - - hasBeenCalled = true; - cb(null, buffer[0] === 31 && buffer[1] === 139); - }); -} - - -module.exports = function createMiddleware(_dir, _options) { - let dir; - let options; - if (typeof _dir === 'string') { - dir = _dir; - options = _options; - } else { - options = _dir; - dir = options.root; - } - - const root = path.join(path.resolve(dir), '/'); - const opts = optsParser(options); - const cache = opts.cache; - const autoIndex = opts.autoIndex; - const baseDir = opts.baseDir; - let defaultExt = opts.defaultExt; - const handleError = opts.handleError; - const headers = opts.headers; - const weakEtags = opts.weakEtags; - const handleOptionsMethod = opts.handleOptionsMethod; - - opts.root = dir; - if (defaultExt && /^\./.test(defaultExt)) { - defaultExt = defaultExt.replace(/^\./, ''); - } - - // Support hashes and .types files in mimeTypes @since 0.8 - if (opts.mimeTypes) { - try { - // You can pass a JSON blob here---useful for CLI use - opts.mimeTypes = JSON.parse(opts.mimeTypes); - } catch (e) { - // swallow parse errors, treat this as a string mimetype input - } - if (typeof opts.mimeTypes === 'string') { - mime.load(opts.mimeTypes); - } else if (typeof opts.mimeTypes === 'object') { - mime.define(opts.mimeTypes); - } - } - - function shouldReturn304(req, serverLastModified, serverEtag) { - if (!req || !req.headers) { - return false; - } - - const clientModifiedSince = req.headers['if-modified-since']; - const clientEtag = req.headers['if-none-match']; - let clientModifiedDate; - - if (!clientModifiedSince && !clientEtag) { - // Client did not provide any conditional caching headers - return false; - } - - if (clientModifiedSince) { - // Catch "illegal access" dates that will crash v8 - try { - clientModifiedDate = new Date(Date.parse(clientModifiedSince)); - } catch (err) { - return false; - } - - if (clientModifiedDate.toString() === 'Invalid Date') { - return false; - } - // If the client's copy is older than the server's, don't return 304 - if (clientModifiedDate < new Date(serverLastModified)) { - return false; - } - } - - if (clientEtag) { - // Do a strong or weak etag comparison based on setting - // https://www.ietf.org/rfc/rfc2616.txt Section 13.3.3 - if (opts.weakCompare && clientEtag !== serverEtag - && clientEtag !== `W/${serverEtag}` && `W/${clientEtag}` !== serverEtag) { - return false; - } - if (!opts.weakCompare && (clientEtag !== serverEtag || clientEtag.indexOf('W/') === 0)) { - return false; - } - } - - return true; - } - - return function middleware(req, res, next) { - // Figure out the path for the file from the given url - const parsed = url.parse(req.url); - let pathname = null; - let file = null; - let gzippedFile = null; - let brotliFile = null; - - try { - decodeURIComponent(req.url); // check validity of url - pathname = decodePathname(parsed.pathname); - } catch (err) { - status[400](res, next, { error: err }); - return; - } - - file = path.normalize( - path.join( - root, - path.relative(path.join('/', baseDir), pathname) - ) - ); - // determine compressed forms if they were to exist - gzippedFile = `${file}.gz`; - brotliFile = `${file}.br`; - - Object.keys(headers).forEach((key) => { - res.setHeader(key, headers[key]); - }); - - if (req.method === 'OPTIONS' && handleOptionsMethod) { - res.end(); - return; - } - - // TODO: This check is broken, which causes the 403 on the - // expected 404. - if (file.slice(0, root.length) !== root) { - status[403](res, next); - return; - } - - if (req.method && (req.method !== 'GET' && req.method !== 'HEAD')) { - status[405](res, next); - return; - } - - - function serve(stat) { - // Do a MIME lookup, fall back to octet-stream and handle gzip - // and brotli special case. - const defaultType = opts.contentType || 'application/octet-stream'; - let contentType = mime.lookup(file, defaultType); - const range = (req.headers && req.headers.range); - const lastModified = (new Date(stat.mtime)).toUTCString(); - const etag = generateEtag(stat, weakEtags); - let cacheControl = cache; - let stream = null; - if (contentType && isTextFile(contentType)) { - if (stat.size < buffer.constants.MAX_LENGTH) { - const bytes = fs.readFileSync(file); - const sniffedEncoding = htmlEncodingSniffer(bytes, { - defaultEncoding: 'UTF-8' - }); - contentType += `; charset=${sniffedEncoding}`; - stream = Readable.from(bytes) - } else { - // Assume text types are utf8 - contentType += '; charset=UTF-8'; - } - } - - if (file === gzippedFile) { // is .gz picked up - res.setHeader('Content-Encoding', 'gzip'); - // strip gz ending and lookup mime type - contentType = mime.lookup(path.basename(file, '.gz'), defaultType); - } else if (file === brotliFile) { // is .br picked up - res.setHeader('Content-Encoding', 'br'); - // strip br ending and lookup mime type - contentType = mime.lookup(path.basename(file, '.br'), defaultType); - } - - if (typeof cacheControl === 'function') { - cacheControl = cache(pathname); - } - if (typeof cacheControl === 'number') { - cacheControl = `max-age=${cacheControl}`; - } - - if (range) { - const total = stat.size; - const parts = range.trim().replace(/bytes=/, '').split('-'); - const partialstart = parts[0]; - const partialend = parts[1]; - const start = parseInt(partialstart, 10); - const end = Math.min( - total - 1, - partialend ? parseInt(partialend, 10) : total - 1 - ); - const chunksize = (end - start) + 1; - let fstream = null; - - if (start > end || isNaN(start) || isNaN(end)) { - status['416'](res, next); - return; - } - - fstream = fs.createReadStream(file, { start, end }); - fstream.on('error', (err) => { - status['500'](res, next, { error: err }); - }); - res.on('close', () => { - fstream.destroy(); - }); - res.writeHead(206, { - 'Content-Range': `bytes ${start}-${end}/${total}`, - 'Accept-Ranges': 'bytes', - 'Content-Length': chunksize, - 'Content-Type': contentType, - 'cache-control': cacheControl, - 'last-modified': lastModified, - etag, - }); - fstream.pipe(res); - return; - } - - // TODO: Helper for this, with default headers. - res.setHeader('cache-control', cacheControl); - res.setHeader('last-modified', lastModified); - res.setHeader('etag', etag); - - // Return a 304 if necessary - if (shouldReturn304(req, lastModified, etag)) { - status[304](res, next); - return; - } - - res.setHeader('content-length', stat.size); - res.setHeader('content-type', contentType); - - // set the response statusCode if we have a request statusCode. - // This only can happen if we have a 404 with some kind of 404.html - // In all other cases where we have a file we serve the 200 - res.statusCode = req.statusCode || 200; - - if (req.method === 'HEAD') { - res.end(); - return; - } - - // stream may already have been assigned during encoding sniffing. - if (stream === null) { - stream = fs.createReadStream(file); - } - - stream.pipe(res); - stream.on('error', (err) => { - status['500'](res, next, { error: err }); - }); - stream.on('close', () => { - stream.destroy(); - }) - } - - - function statFile() { - try { - fs.stat(file, (err, stat) => { - if (err && (err.code === 'ENOENT' || err.code === 'ENOTDIR')) { - if (req.statusCode === 404) { - // This means we're already trying ./404.html and can not find it. - // So send plain text response with 404 status code - status[404](res, next); - } else if (!path.extname(parsed.pathname).length && defaultExt) { - // If there is no file extension in the path and we have a default - // extension try filename and default extension combination before rendering 404.html. - middleware({ - url: `${parsed.pathname}.${defaultExt}${(parsed.search) ? parsed.search : ''}`, - headers: req.headers, - }, res, next); - } else { - // Try to serve default ./404.html - const rawUrl = (handleError ? `/${path.join(baseDir, `404.${defaultExt}`)}` : req.url); - const encodedUrl = ensureUriEncoded(rawUrl); - middleware({ - url: encodedUrl, - headers: req.headers, - statusCode: 404, - }, res, next); - } - } else if (err) { - status[500](res, next, { error: err }); - } else if (stat.isDirectory()) { - if (!autoIndex && !opts.showDir) { - status[404](res, next); - return; - } - - - // 302 to / if necessary - if (!pathname.match(/\/$/)) { - res.statusCode = 302; - const q = parsed.query ? `?${parsed.query}` : ''; - res.setHeader( - 'location', - ensureUriEncoded(`${parsed.pathname}/${q}`) - ); - res.end(); - return; - } - - if (autoIndex) { - middleware({ - url: urlJoin( - encodeURIComponent(pathname), - `/index.${defaultExt}` - ), - headers: req.headers, - }, res, (autoIndexError) => { - if (autoIndexError) { - status[500](res, next, { error: autoIndexError }); - return; - } - if (opts.showDir) { - showDir(opts, stat)(req, res); - return; - } - - status[403](res, next); - }); - return; - } - - if (opts.showDir) { - showDir(opts, stat)(req, res); - } - } else { - serve(stat); - } - }); - } catch (err) { - status[500](res, next, { error: err.message }); - } - } - - function isTextFile(mimeType) { - return (/^text\/|^application\/(javascript|json)/).test(mimeType); - } - - // serve gzip file if exists and is valid - function tryServeWithGzip() { - try { - fs.stat(gzippedFile, (err, stat) => { - if (!err && stat.isFile()) { - hasGzipId12(gzippedFile, (gzipErr, isGzip) => { - if (!gzipErr && isGzip) { - file = gzippedFile; - serve(stat); - } else { - statFile(); - } - }); - } else { - statFile(); - } - }); - } catch (err) { - status[500](res, next, { error: err.message }); - } - } - - // serve brotli file if exists, otherwise try gzip - function tryServeWithBrotli(shouldTryGzip) { - try { - fs.stat(brotliFile, (err, stat) => { - if (!err && stat.isFile()) { - file = brotliFile; - serve(stat); - } else if (shouldTryGzip) { - tryServeWithGzip(); - } else { - statFile(); - } - }); - } catch (err) { - status[500](res, next, { error: err.message }); - } - } - - const shouldTryBrotli = opts.brotli && shouldCompressBrotli(req); - const shouldTryGzip = opts.gzip && shouldCompressGzip(req); - // always try brotli first, next try gzip, finally serve without compression - if (shouldTryBrotli) { - tryServeWithBrotli(shouldTryGzip); - } else if (shouldTryGzip) { - tryServeWithGzip(); - } else { - statFile(); - } - }; -}; - - -httpServerCore = module.exports; -httpServerCore.version = version; -httpServerCore.showDir = showDir; diff --git a/node_modules/http-server/lib/core/opts.js b/node_modules/http-server/lib/core/opts.js deleted file mode 100644 index ec1b2cb..0000000 --- a/node_modules/http-server/lib/core/opts.js +++ /dev/null @@ -1,203 +0,0 @@ -'use strict'; - -// This is so you can have options aliasing and defaults in one place. - -const defaults = require('./defaults.json'); -const aliases = require('./aliases.json'); - -module.exports = (opts) => { - let autoIndex = defaults.autoIndex; - let showDir = defaults.showDir; - let showDotfiles = defaults.showDotfiles; - let humanReadable = defaults.humanReadable; - let hidePermissions = defaults.hidePermissions; - let si = defaults.si; - let cache = defaults.cache; - let gzip = defaults.gzip; - let brotli = defaults.brotli; - let defaultExt = defaults.defaultExt; - let handleError = defaults.handleError; - const headers = {}; - let contentType = defaults.contentType; - let mimeTypes; - let weakEtags = defaults.weakEtags; - let weakCompare = defaults.weakCompare; - let handleOptionsMethod = defaults.handleOptionsMethod; - - function isDeclared(k) { - return typeof opts[k] !== 'undefined' && opts[k] !== null; - } - - function setHeader(str) { - const m = /^(.+?)\s*:\s*(.*)$/.exec(str); - if (!m) { - headers[str] = true; - } else { - headers[m[1]] = m[2]; - } - } - - - if (opts) { - aliases.autoIndex.some((k) => { - if (isDeclared(k)) { - autoIndex = opts[k]; - return true; - } - return false; - }); - - aliases.showDir.some((k) => { - if (isDeclared(k)) { - showDir = opts[k]; - return true; - } - return false; - }); - - aliases.showDotfiles.some((k) => { - if (isDeclared(k)) { - showDotfiles = opts[k]; - return true; - } - return false; - }); - - aliases.humanReadable.some((k) => { - if (isDeclared(k)) { - humanReadable = opts[k]; - return true; - } - return false; - }); - - aliases.hidePermissions.some((k) => { - if (isDeclared(k)) { - hidePermissions = opts[k]; - return true; - } - return false; - }); - - aliases.si.some((k) => { - if (isDeclared(k)) { - si = opts[k]; - return true; - } - return false; - }); - - if (opts.defaultExt && typeof opts.defaultExt === 'string') { - defaultExt = opts.defaultExt; - } - - if (typeof opts.cache !== 'undefined' && opts.cache !== null) { - if (typeof opts.cache === 'string') { - cache = opts.cache; - } else if (typeof opts.cache === 'number') { - cache = `max-age=${opts.cache}`; - } else if (typeof opts.cache === 'function') { - cache = opts.cache; - } - } - - if (typeof opts.gzip !== 'undefined' && opts.gzip !== null) { - gzip = opts.gzip; - } - - if (typeof opts.brotli !== 'undefined' && opts.brotli !== null) { - brotli = opts.brotli; - } - - aliases.handleError.some((k) => { - if (isDeclared(k)) { - handleError = opts[k]; - return true; - } - return false; - }); - - aliases.cors.forEach((k) => { - if (isDeclared(k) && opts[k]) { - handleOptionsMethod = true; - headers['Access-Control-Allow-Origin'] = '*'; - headers['Access-Control-Allow-Headers'] = 'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since'; - } - }); - - aliases.headers.forEach((k) => { - if (isDeclared(k)) { - if (Array.isArray(opts[k])) { - opts[k].forEach(setHeader); - } else if (opts[k] && typeof opts[k] === 'object') { - Object.keys(opts[k]).forEach((key) => { - headers[key] = opts[k][key]; - }); - } else { - setHeader(opts[k]); - } - } - }); - - aliases.contentType.some((k) => { - if (isDeclared(k)) { - contentType = opts[k]; - return true; - } - return false; - }); - - aliases.mimeType.some((k) => { - if (isDeclared(k)) { - mimeTypes = opts[k]; - return true; - } - return false; - }); - - aliases.weakEtags.some((k) => { - if (isDeclared(k)) { - weakEtags = opts[k]; - return true; - } - return false; - }); - - aliases.weakCompare.some((k) => { - if (isDeclared(k)) { - weakCompare = opts[k]; - return true; - } - return false; - }); - - aliases.handleOptionsMethod.some((k) => { - if (isDeclared(k)) { - handleOptionsMethod = handleOptionsMethod || opts[k]; - return true; - } - return false; - }); - } - - return { - cache, - autoIndex, - showDir, - showDotfiles, - humanReadable, - hidePermissions, - si, - defaultExt, - baseDir: (opts && opts.baseDir) || '/', - gzip, - brotli, - handleError, - headers, - contentType, - mimeTypes, - weakEtags, - weakCompare, - handleOptionsMethod, - }; -}; diff --git a/node_modules/http-server/lib/core/show-dir/icons.json b/node_modules/http-server/lib/core/show-dir/icons.json deleted file mode 100644 index afac0a0..0000000 --- a/node_modules/http-server/lib/core/show-dir/icons.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_blank": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWBJREFUeNqEUj1LxEAQnd1MVA4lyIEWx6UIKEGUExGsbC3tLfwJ/hT/g7VlCnubqxXBwg/Q4hQP/LhKL5nZuBsvuGfW5MGyuzM7jzdvVuR5DgYnZ+f99ai7Vt5t9K9unu4HLweI3qWYxI6PDosdy0fhcntxO44CcOBzPA7mfEyuHwf7ntQk4jcnywOxIlfxOCNYaLVgb6cXbkTdhJXq2SIlNMC0xIqhHczDbi8OVzpLSUa0WebRfmigLHqj1EcPZnwf7gbDIrYVRyEinurj6jTBHyI7pqVrFQqEbt6TEmZ9v1NRAJNC1xTYxIQh/MmRUlmFQE3qWOW1nqB2TWk1/3tgJV0waVvkFIEeZbHq4ElyKzAmEXOx6gnEVJuWBzmkRJBRPYGZBDsVaOlpSgVJE2yVaAe/0kx/3azBRO0VsbMFZE3CDSZKweZfYIVg+DZ6v7h9GDVOwZPw/PoxKu/fAgwALbDAXf7DdQkAAAAASUVORK5CYII=", - "_page": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmhJREFUeNpsUztv01AYPfdhOy/XTZ80VV1VoCqlA2zQqUgwMEErWBALv4GJDfEDmOEHsFTqVCTExAiiSI2QEKJKESVFFBWo04TESRzfy2c7LY/kLtf2d8+555zvM9NaI1ora5svby9OnbUEBxgDlIKiWjXQeLy19/X17sEtcPY2rtHS96/Hu0RvXXLz+cUzM87zShsI29DpHCYt4E6Box4IZzTnbDx7V74GjhOSfwgE0H2638K9h08A3iHGVbjTw7g6YmAyw/BgecHNGGJjvfQhIfmfIFDAXJpjuugi7djIFVI4P0plctgJQ0xnFe5eOO02OwEp2VkhSCnC8WOCdqgwnzFx4/IyppwRVN+XYXsecqZA1pB48ekAnw9/4GZx3L04N/GoTwEjX4cNH5vlPfjtAIYp8cWrQutxrC5Mod3VsXVTMFSqtaE+gl9dhaUxE2tXZiF7nYiiatJ3v5s8R/1yOCNLOuwjkELiTbmC9dJHpIaGASsDkoFQGJQwHWMcHWJYOmUj1OjvQotuytt5nHMLEGkCyx6QU384jwkUAd2sxJbS/QShZtg/8rHzzQOzSaFhxQrA6YgQMQHojCUlgnCAAvKFBoXXaHfArSCZDE0gyWJgFIKmvUFKO4MUNIk2a4+hODtDUVuJ/J732AKS6ZtImdTyAQQB3bZN8l9t75IFh0JMUdVKsohsUPqRgnka0tYgggYpCHkKGTsHI5NOMojB4iTICCepvX53AIEfQta1iUCmoTiBmdEri2RgddKFhuJoqb/af/yw/d3zTNM6UkaOfis62aUgddAbnz+rXuPY+Vnzjt9/CzAAbmLjCrfBiRgAAAAASUVORK5CYII=", - "aac": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnhJREFUeNp0Uk1PE0EYftruVlvAUkhVEPoBcsEoLRJBY01MPHjCs3cvogcT/4qJJN5NvHhoohcOnPw4YEGIkCh+oLGBKm3Z7nZ3dme2vjOhTcjiJJvZzPvOM8/HG2q325Dr3kLp7Y1ibpIxjs4KhQBZfvV6s7K5Vb0bjeof5ZlcGysP1a51mifODybvzE8mzCbrAoTDIThMoGXZiZ4YSiurf+Z1XeuCqJ7Oj+sK3jQcNAmg8xkGQ71mYejcAB49vpmeuzJccl0+dUj6KIAvfHCPg3N+uAv4vg9BOxcCmfEzuP/genpmeqhEMgude10Jwm+DuUIyUdTlqu2byoMfX/dRermBeExHsTiWNi3+lMpzRwDki8zxCIATmzbevfmClukiP5NFhJgwkjeRTeLShdOoVJqnAgwkgCAZ6+UdLC9twjQZ8pdzioFkZBHY3q6B3l4dJEEEPOCeD4cYVH7Xsf15F+FImC775INAJBJSkVoWo0QY9YqgiR4ZZzRaGBkdwK3bFxGLRZUfB3Rm2x4x9CGtsUxH9QYkKICDFuLxKAozGZwdTqBRs2FbLlXbiPdECMCHadj/AaDXZNFqedCIvnRcS4UpRo7+hC5zUmw8Ope9wUFinvpmZ7NKt2RTmB4hKZo6n8qP4Oq1HBkKlVYAQBrUlziB0XQSif4YmQhksgNIJk9iaLhPaV9b/Um+uJSCdzyDbGZQRSkvjo+n4JNxubGUSsCj+ZCpODYjkGMAND2k7exUsfhkCd+29yguB88Wl7FW/o6tT7/gcXqAgGv7hhx1LWBireHVn79YP6ChQ3njb/eFlfWqGqT3H3ZlGIhGI2i2UO/U/wkwAAmoalcxlNA1AAAAAElFTkSuQmCC", - "ai": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk5JREFUeNpsU01vElEUPTPzZqBAQaSFQiJYUmlKYhoTF41L3Tbu/Q/+AvsX3Bp/gPsuWLrqyqQ7TUxMtAvF1tYGoXwNw7wv7zwYgtKX3Lw379575p5z77O01ohW+/DVh8zj7aYKhflGdG9ZsGwLNydffgVfr19YHvsEa+Zu/nxndob5StQK+dyzvZzyw/gKlmMj7IygFM+xvNcanp4/t5dAomXHBy2UUBOO2MAl/B9/cPb6PULuoHx0WM0e3GvpUOxD3wZAJWutZqYUYmqpSg5OMgH3YQObL59W0/ullpryR3HegkKEqiWBSGV4R3vQ7sIhScTZFTpHx3A215B5sluVY/WWMg7+ATB/lcLsKpTonHzD+OMFEuTz8ikkt9Kwt9YJZB38cpBdoQAZJdLvCGByfoPB6Xdk90pYy6Xg3c/DaWwArg09DaG5lCsUFN0pckZAojdC8m4auBqaALuSgez7VB1RtDSUWOQvUaBLFUzJBMJ2DwmPgd1Jwm0WoSgJfjDvrTKxtwAIyEkAOQ5hU//Zdg5uowDlUNMnwZLW0sSuUuACYhwQRwFvJxupCjEYUUccOkoaKmdOlZnY1TkgAcXAhxhOwLsDsHoN3u4O5JTDfVCH6I9nfjId3gIgSUATFJk/hVevGtOMwS0XwQ3AzB/FrlKg8Q27I2javVoZrFgwD4qVipAEyMlnaFArzaj/D0DiMXlJAFQyK2r8fnMMRZp4lQ1MaSL5tU/1kqAkMCh2tYI+7+kh70cjPbr4bEZ51jZr8TJnB9PJXpz3V4ABAPOQVJn2Q60GAAAAAElFTkSuQmCC", - "aiff": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAohJREFUeNpkU9tqE1EUXZmZpE3aTBLbJFPTtFURtSCthr7UCyKKFJ/9An3og6Ag/oXfoUj7og9asCBYKT6UIPHaWtpq7NU2aZK5z5wZ9xxMpMwZDuewz9prr32ZiO/7CNaDx3OLt6fOjBqGg/aKRCIInp8+KzfKH7fudnVF58nE16el+/yU2mBFSWZKpWJKVc0OgUBo02K4NDmU6o75Mx+Wdu9IUXFeiOA/pn1xHeYaugVDdzpbp91qGlAKGTx8dC19/Wpxhjnsxj/RRwk85hGJC9d1O6fneWAuoztDYSSLe9OT6SuXB2ccx73Z9uukwDwfls1g0xZIY/Ad/Gnyt/XVfbyYrSDRE8PExHB6/8B6QuaxIwRBFMt0iIAiMx+LCys8jfGJEUik2WpZOD2SQf9oDtVqQwopCAiY66FS/om3b75CVS2MlU7AJ2WiJBCZjZ2dJuRkDJZFwFAR7UCBja3fNfxY2YEoCtRCj9em3Tpds6FpJseGCBxS0GgYGBzqw62p84gnYnAI2CSbSbPhEpFAaE2zODaUAlWWwDoS5DheGqbWpVE/0CmqCY9qkEyINBceb2uADRNQ8bSWAVVzIFKomCQim+0luS4yKYlsHlRyZo7EsSEC23K5vAsXh/H92zZkuRvxeBS5nEx2yp2KqhxPoV5TYS/8CtdApylM9sZQKKSQzyeRTseRV2QoAzIYY8jme5DN9fI0dQoUIjANGydP9VM7PZw9p/AiBpNYrdbw/t0yTJqRtdU9UrfJCUMpSJIgbWzsYe51BcViHzLHeqCRqhZ1YX1tFwNfZBxS9O3NWkAcHqR606k/n/3coKAoV/Y7vQ/OYCZevlrmv3c0GsFh06u3/f4KMABvSWfDHmbK2gAAAABJRU5ErkJggg==", - "avi": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAm1JREFUeNpsU8tu00AUPXZcN0nzTpq2KQ3pAwkIAnWHqCoeexBb+AQ+ABZ8A2s+AIkdm266QUJIFWKBkHg1KpRHi5omJGkbJ3bGHj+4M1EQrTvSyGPPueeec++1EgQBxHp+/9mbyuriRZdxjJaiKBD3W+u1+p9a856max+gDO8ebT+WT20Ezi9NZi/crqadvn2MQBAGfpCOpqNru2937vxPIpY6Onjccx3Twck9MBiSU0ncfHirXFmZX3Md9wqCUwiEVN/zaQfHt0vfbBe5uQyuPVgpl5Zn11ybL4/i/lkICOw5niQRGQShoiqI6Bo43W2ub8n3hRtLZT7gTynk6gkCX9gAOxpAnxhHZDwC1/aI1EViJolu/QhKRMHZ1UX0Gr1USIEn5FPWHy+/wTokkrQOq2vBaHZBN4hmY9Jwfr4An/teiEB45ZZDwDiMhoExT0N+sYDCuUkkplLIlXP4/XEXdo+RUhdhBSSfUwtVTUG8MIHK9QVqI7D/uY6vr2pwmCPrkz+Tk9gwARWQ9WxppbXZhNnpw+ya4A5HZi6L4lIR8WyCcL6sTZiAWjWgAmpxkn5+kqTamK6WkCwmERmLDLvjB0ML9ikWXPLFuozYOap3L8HYN6DHdbS/d5CeTVBndBz87FCBLYkNTyIjBQemnIEsSY5lYrK1+UoWcToLMjEHAyIQ2BCBSx/NVh+ZUhrqmEqBebS3WyhdLg0zt/ugAaIklsSGLHCLa6zDMGhZ2HjyGsnpFPqNHnY2fmHv3R5SMymYbROszSQ2ROAY9qHiofvlxSc5xsKKqqnY3diRE9h4X5d/pzg7lnM4ivsrwADe9Wg/CQJgFAAAAABJRU5ErkJggg==", - "bmp": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmZJREFUeNp0U+1rUlEY/13v9YV0vq2wttI5CdpL9aEGBZUDv0df668I6n+or0UQ/RuuD0EgVDAZrsKF4AR1a6COKW5qXvXec27PuVeda3bgcF6e8/ye5/d7niMZhgExnK9fbTrm5pbBGMZDkgCyq+VyhTUaT6Eo2ZHJePPWXJXRhez3B1yxmM/QdctXUSCgtV4Py4CvY3cky4e1x5DlLCaGbbzjXDcousG5OQe5HPRSCQPK4PpsEM/XH4WvhS4noeu3JwHGGRiULhsMoKZS4I0GtEIB9mgULJGA0+9DPBpBT7sffvf1W/Lg6OgJufw8C0CRGEXWazUwiiyFQjA8bsjVKjaJzovMD/Q5gxyJhG2cvyeXe2cAuADQNGBmBvLaGuTFRaDfh31lBTWi9pumjbK0B4JQul3vOQpM8JdskOLrdCvDcDjAsjtg5TIkoiKLaokMNR2cnZbqNAMycqG7XbHKR2fMzwO/dsxSwu0BiBJsNsv2LwAJAJCI5ux2gXYbqNetcz5PoORI1cDS0n8AxGW7A+zvEYBKZ2ZlcsEtJLbedMjePBaCTQMghx45ulyWkzxMVUQ2RMQhLfFO16YAqCrixPnm6iqKrRb2W23EfF4cUNSrHg90cr7hDyB33MTnSmUKALVs4uIlROjxg+AsPhGVl3fuIl2tIOB0Ya91gkOi9mxhAal0ekork1ic/kGLBORMxy2K1qS9V1ZQbNThIj2EGh+2tsyOnSai8r1UxMNIBB+LRTTULr4Uds0K1tU/uOLxIrmbNz8XXSrnASSpubG9fbKRyVh1n/zSw29t9oC1b47MfwUYAAUsLiWr4QUJAAAAAElFTkSuQmCC", - "c": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcxJREFUeNqEUk1rE0EYfmZnkgoJCaGNCehuJTalhJZSUZB66a0HwXsP/Qn+FM+9+hty0LNYCr2I7UVLIW0Fc0hpQpSS7O7MrO9MspuvVV8YMnk/nn2e5x0WRRFMvP/w6WSz5jbi/9NxfP693Wp3DrJCnMW5d28P7a+IE15lufR8o1ZEStwPhkWHsWbrZ+eNEPxsuubEF6m0TBv2Q4liPofXuzveulttSqW2UwH+GjqC0horpSL2njU89+FyMwjlTlxOJMTa9ZQHzDQIjgwdom9zLzfXPc75kbnOAswBJTlC2XrqQRMLxhi442DgB4UFBhgPpm3B5pgBHNUUxQKAHs8pHf3TEuFMetM9IKr/i2mWMwC0SnuSFTG2YKyppwKYVdGO7TFhzBqGIenVeLCUtfURgErucx5ECKREKBU4d3B718PHz6cICGT/1Qs8qpQtGOdyhtGEARWDQFqQJSeDL98u4VbLaKw9IRAJPwjtoJGlVAoDQ800+fRFTTYXcjlcXN2g++s36p5Lzzlve1iEROa8BGH1EbrSAeqrjxEqicHQt8/YSDHMpaNs7wJAp9vvfb287idboAVkRAa5fBYXP9rxO4Mgf0xvPPdHgAEA8OoGd40i1j0AAAAASUVORK5CYII=", - "cpp": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfJJREFUeNqEUs9PE0EU/mZ2WgqpXX+QIDFdalVslh8NlAOQaOKFAwfvHvwT/FM8e/U/MOnBmwcj8WD0ACEGghIkbU0baaEthe3OTJ0ZWV26q37JZt68ee/b9733yGAwgMbL12/fz+azbnAPY2Nrt7Zfqz9JMrYZ+J4/e2pOFjiciRvXlgp5GzHonXk2o6S8V6k/TjBrM/xGA4MLyeOSPZ8jkx7D+uqCU3Amy1yIYizB36AlCSkwfjWDR4uu40yMl/s+XwjeWThQQ4Z6QNSnSkYykcDXasP4lmfvOZTSF9q8TDBEFPbN5bOqCglCCCxK0TvvZyIV4CIxbgpC+4gm/PUmFCIE8iJPyME/e8Lon9j4HvyHYLjKSwRCSEUgf9+15mFbx8QS6CZJMzJ9SlBCwX3fJDLG4PX7ykcwkmQmJtpEhWa7g1dvNlSwjwelebz7tAXLolh0p/Fxe9fErK2WDFGEgKjxfNjegX0lDTc/heNuF99/HGEslcKXwyoazWNDdlCr6+DoJgrBzdI0T9rYO6yg2zszMlaKM3Dv5OBzbuyZuzm1B16U4Nzz2f3cFOx0Gq12F9cztpExncsqYoaHpSIKtx0zJdVIFpHQ6py29muNk1uTN829o/6SHEnh80HFaE6NjmLnWxUJy1LyTltB3k8BBgBeEeQTiWRskAAAAABJRU5ErkJggg==", - "css": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk1JREFUeNpsUktvUlEQ/u5DoCLl/RAKKKUvWmIxjYntQtcu3LvwJ/hTXLt16coFC2PsojEaMKZtCqFaTdGmjbS0CG3By+vei3OOBSGXSU7uzNyZ78z3zRF6vR6YvXzzPrMUCyf68bB9zO+VfpROn5hkOdfPPX/2lH/lfiLidztX5mN2jLGG0rKLENIE8liWpdzwP7HvqJqujmvudFU4bFY8Wk1FZsOBtKppd8YCDNu77CZevd3gflfTUFcUhP0ePLibiIR9rjSBpgwAfe4dVcV6dhtep4PH5msylGYLrzeybErcT85FYiH/CyPAf74gObC2vMhzsiRhPhpC6eQUM+EA1pJzILEnjRSuJsju7MJqsUCSRei6Dp3yXqcdGlHZ/rLPazQWGCn8+6YW4pAkEW0SjzUzanWlCa/LgcR0lNfovTEi6lcIkzesnM/R8RlN0INGp3h4DHoDsE5YRvQyiKiRSMzikRAOS2WoqoZWu41K7RwzlOOAVDMMMHhIGvFlRxJFrKYW0ep0IYgC3SDh4b1lTJjNfENsrazOAMAw680mPuW+8lFno1P4XDigRhOiwQAyJK7TbsNS/PaA7giAIAhYz2yRgBIfsVA8wIetPG6FAqhdNrC5u0f+TUyHgyMTDDToEt/ftQsEvW4EPG5OZcrvw0mlimarTXkPfpXPcNlQoGtjACgpryQXsPNtH/nvRXqBJpoKHMzGNkNB0Odls7LNyAYKpUq1dt1iuvB7fRDp9kr9D1xOFwkpoksXusmXaZWFn0coV89r/b6/AgwAkUENaQaRxswAAAAASUVORK5CYII=", - "dat": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfVJREFUeNqMU01PE1EUPe/Na0uptmlASg3MoiZgCA3hQ8PHAjbqwsS9C3+CP8W1W/+BSReyYUPwI4QAVkAgUEgIbVIg1FZb2pl5b3zv2cHBjsaTTOa+e989OffcGeK6LhTevFv+OJoZHPHOfrz/sl86KpWfhxnLe7lXL1/oN/MSZqonOXU/k0AA6lfNhEFIrlAsP2PMyPtr1AscLpyg5pbtIHErhqez4+awmc45nI8FEvwNaiQuBHqTcSxMjJhmX0/Osp1xr878FxWEzwMinxAzEA4xFIpnOjedHTKpYbxW4U2CP4j8uWxmUKsghMCgFI2mFe9QgHZj0Ba4yhFF+KvGJToIRLuPC/efnjD6+26wB1Lq/xgbSCBXKeWJG/OTdky8cWTdT3C9RmWSGk2XCLlWo4xTNbfN5qh7PpXM72GjZeHt0gpq9QbmH4whGb+NpU/reDQ7hcWVVXxvXOHxzCQopQEKXKEbL6o1ZIcy+LC5g62DY2zsHeC0fA4zndIrHOjvg2XbAQRSfsuy9XxC2qzi/H5B6/68W0AsGkW0KyJPBLbDO0fg3JX/CUM81i0bD6WKe6j9qOPJ3EMcF0tSNsFA6g6alqW+VtZBUL78Vtk+Oqne7U9rs5qOQCjSheJFBeFIFOfVujSUYu3rIc4uqxWv76cAAwCwbvRb3SgYxQAAAABJRU5ErkJggg==", - "dmg": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAn9JREFUeNpsU01rE1EUPe9lkk47yWTStCmtNhFSWxos2EXVhSsRcasuxYV05V8Qf4DgD/AvCK5EV1oFI7iUBqmCNdDvppq2mWSSzEzy3vPOpFFq+uDNfR/3nnvueXeYUgrBWH1/9/NE7k5BKRnuRcfF2qdnmJq9DeF9tQ+2isuMsxXGWHh/a1mEVsPJSI5fSU3OPEj291IIlN49RXz0KqzEQjIeZS/L5Y/3wPGhDxIM/i/A7fZWgVG0t5EaG0ZUa0JGM8gvPrZmLt58QYwv91mfAqCIE0sAqgumBFITGQzpUYhuF0KfRa7waDyXXXolpVrsh/0tgSLDr5I+wUZo1UHCSkAficPzY6juFSmbRPrC/azjq+fkcO00gAqoU7B0ETKkfWbuCTjTYeq5oESAauexcTScX+ZACWFm0YQSLZKhHdr67+/wW0e0dgjYo3sCEXXybYtBDVSHLp2es3IpsILS24c42lkBg6DzRjgRzCDZ/xr0GNRJwwYiWgzt+hYMawleu0V3wbkT+kUirOc7IGJAz68R/Qak1BAlx3hqASPGBJRXpXOv58dkz3eAgQoOm4hyj57NgZm0MHvpBmK6QdUdg/DAg9cRkhicBSDaKJdeo1bdxmR2DtWDDUxl51HZ+QHTysD3XdQO95Gfv06aeGcAdBrY3Chi8lwO3768QWX7J5q1XWyVSxgajiOXLyBG2hzurRKV9lmt7ISNkkjo6HhNyjoK+2gXRsKE57ZIE2ot10Z1fz0Ue4ABVw3NMjnW14rInh8jTYywoTg3EOFpOM4mXNfH9PQUfGlrAwBOs3I8ljbtuMWhRWzIIPrkn+GcYcgIWEowbZ+0qB334/4IMADESjqbnHbH0gAAAABJRU5ErkJggg==", - "doc": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAppJREFUeNpsU79PFEEU/mZ39vZu77g7DokcP04BBSUmiEKCSCxs7Ei00JAYO2NlTKyMrX+CJhaGwopSQ0dMtFEsbDRBgiZEQIF4IHcg+2t2Z8eZ5QDlnM1mZ9+8973vfe8NEUJArfSNhzPG0VIfeIiDRSDkw1cWVt3N8rhG6SdSO2Gvn8dfuueqZwuNZqk3Jxg7iNcIfBbgXD6ZC8u5qffzX8eoYeyDxC77uygKhcouovgVUQj1H4YB2ovNuD9+tTTU0zMVBmG/+C8AIYh8F361DL/yE5HnADKYlVdg6MDAmW7cuz5WGuw+PsWDYGAvbL8ECFUt4K7/AHd/I9c7BLaxinD2Ld5Zo7g78RLuRhlBS2cpWbGfStfhfwCEpK0nUjCbWuGsLciSOELPhkq/YgdY3l6HsLfRcLYf+pHNbH0JigEPkLAyMsiEJ7NrqQzM1i7wyhoMZqOhvQs6Z0ovXgdAJACRoulEg5HOwrOroKk0zOY2BDtVpTF0CU6kLkQJXa+BNEoG0lMSsBBKQXWNQktmoGcaYeSaQCIVWOvUYQAiWZFQtk5mSMoSzEILtBrTfEcviC5bwVwQmoh96wA0ic5dB57ngeoaTIPCdb34zDITYNLOOIeVSsW+dQC+7+NSWx6jJ4tY/rWNV7PfcGv0tBoPTM7M4eKJVgx2FTE9u4QPS6x+kHzfw/mOAjarW2hJG3hy8zIceweuY+PRtREMdzbjzcd5WBqPB6xeRGUMGRzHjWvMmxQ7tiOF1JBN6FiTd6Sy9RuFbHpX7MMMqOD088Ii+op5OUAO7jyeRGfBwrF8Cg8mXuDL4neMXzgFwhwZz+hf7a9d5yu3Z6DTPjVQIY9k7erO7Y63Lvc8ErEeyq6JaM6efjai4v4IMABI0DEPqPKkigAAAABJRU5ErkJggg==", - "dotx": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAndJREFUeNpsU01rE1EUPTPzJk0y+WhMStW2qdVWxUVEQUF0I+4ELQiC7lz4N9z0T+hG9wrdZKUgLqulhrbSag1CKpT0g7RpYjqZmffle5NEKdMHlzfvvXvPPffcO4aUEno9f3Vt4dTp+BXOe+fB0u/NbVpv7h89NU1j1TCM8H7+xY9wJwPHZMbOjRadLAvE/2gToJTiTPx89k+OlVd/LT+0TPIPpO/SzyQk40xCMxBSZ9Z3CoAx5DOjeHT7SbE0XSpzwa8OWB9jINELolQg8AR0EgUKn1PIlIWpkUt4cPNxkTOU12trs8p95RiAXpqaztqou8q6SKQJJmZSqGwsodFsIJk1kcyLYv7IeafcLx4HUNkFF4jFTExMZ0B9DrfD4HUEusYhWs4GPEJg5wly/tBYRIOeDhpEwlS34xcyajdQr3UwOT2MlJOEBRuGNHWp9AQRVXDfQiFV/U5GBSiQ5p6ngBEa5z3fiIhC6g6IMDBwOdoHPkYnHPVyhN0tF7E4QSpr94CEOKELffq+y9Bq+DCJ7rWBoQQBVbPR2O6G4OlsLASJMtCZfQqm0NP5IVWnamdAkUxbyuIYtD7wWegb0YAzAVMkkI6NwPM9xEwHloyDGAmk7AKS9rAS0FKOdugbYeAHPu7OPEM+MY7q3hIKqTFQHmC3XcONc/fxdfMDrk/ew/edzyhvvTmBAddocVRqH3Frahau56qpZDho7+PnTgXffi/gbHYmLEvPSIQBp5JU62sYz13G609zKBXvoOMdYn2zgm7Xg2MVML/4Eu3uPgxhk2gXmNl8v/i2pcXTP8tKdTEcbWLZqDQXwu/l6pfwbEnSGsT9FWAA4mdHv2/9YJ4AAAAASUVORK5CYII=", - "dwg": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAoFJREFUeNpsU0tPE2EUPfOg006hD4rQh8WgbCSwkKgbF2owujaCiQsXxpX+D6MmbtXEsHCLmIAbE6NLo8YlGIxREIshIqVl+mQ6j8/zFVCb4UtuZua795577rl3FCEE5Bl79vPd5LHYiOP7cH1AUWi85ytmvlas1bJ9E5ryBntH3BpuP/X9i7ovkluuiE8N9SDepaLpCcRCCqa/VDCaMuIjSWP25Upl6n+QDoCz6Yh7KKzh3sI2LuUimPtRRyaqodj0MDloYiITSTi+mH29Wu0AUf9CsZPJoW5czJl48LmCc5kIKo5Al67B9gUGYxrun+5NnMlFZ+GKiQADj2a7AquseLIvjMv5KMaSBu4sWVir+3i8VIVKYSby0UTdFU8Znu8AYBHQgVOJEN5uOXi4UsdawwU0FSf6TaSoyw6DRvukPkgGWpDKy4F8a3jImCrqFDFn6rhKPR4VGnhvOTAY3WLcjifcQAsqRfhUc/Gq1MKNbBh9nIAMDjEppocxs9HCMktfGTCwP/oOBkUKNk/qF3pDYC6Ktk8RfWzyaaoKrqdDaBDwya8W1m0/CPCR3kFy7CcnmWQRUJqcRJFUKtTnPCeR71LwoeYF92CYyVnCFZpCTrRtCv5to2St8SOrKxiPqEEA4fkYT+mI0rdoeUiH1XZVuQPpsIKqw2QmfifTsnOABiWySlH9uU0Hh2MqjsZV5LtpPSoGeN9rKnhBX7ehoOSLIIPfnGONXGMMWN7xUfVldYDbjM3mrh5HCDgS17DhHgDQcIU+XbBxnDTn1x1UuQcJ9iv7l5Q5e1zLGri92EDJFnoAgHtcfr6wbbVXUqq193+0z97n3UJt1+d51n7aHwEGAAHXJoAuZNlzAAAAAElFTkSuQmCC", - "dxf": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAo5JREFUeNpsU0trE1EYPfNMmtdoH2kDNmJbaVFcaBVFpAsREQpFwY0bu3HjQnTj1mVd+ANcuC3qQixmry6E0kWFVIQ+bKy2tbFJm3emyXTujGca+4DkwsedfLnn3POd77uS67rw1vC79ek7fZEzpu3AYUqS9tKQGZPLpa3VXP0uFCmJ/8t9OLC3q/uJbcs5bkIybvdHoMsSbLKENRmvU2WcNnTjRFD7ML1WGSPJHI6sA4KRWMAWVDPxLYex3iCmfpuIh1QsFSyMxQO4GvXHHwOJ6XWSyIck8v6HQsnjAxFc7vTj2VwBg4aG78VdBHQFCk+dbVcxMdwev9gTSEC455sIBOu2KLsoJFzqasP9vjCeDBlYqzn4VXXwarGKZN7Crd5QfLDT/7KpBM84c9fFUFjFp2wdk6smflRsKKqMa7EgfJJ3Ac2OKlit2pEmBTQfngdpnupoU7BUtRGiiTe7fXiRqmK+KuDn6TpvYogmBRJcrOwIJLIWxmM+dOsyLKryQAaJpjJ1/AxrGO3SqdZt7kKZJrzJWBg5piHENuY8vV6e0UOye1TyftvC5l+gZB8SHJTwpSx4q4JeTUKaxhXoR57h7Rn+3iFolJ3xvPhab6HgJG/pJ7jsNP4sUX+jZiCgEsWd/DjH5IrSYpBUAr0yHpzSoXKOP25a6OBhndh0zcX1qIYM2RIbu6i0KiHD5B/GTMHG03kTGpEL7H80wHFOWwhqDZ+SpkBOtCDYJDhZE4gRcKNbYynAqbCMbXpwpVPFbEng0aKJGbYzK1p4wIegLlcEPmdt+DjXbzcsxFlCynRwwVAwW6hjqeg0Zt521SYCWCJvbe0Un29UDx7Hgrs3IEitHXkw3jOv2fl92D8BBgAJeyqBh90ENQAAAABJRU5ErkJggg==", - "eps": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNp0U01vElEUPfMFCEVArdoSqEA0KV246UJdUJM2Lo2JK/9FjXu3utJqTNz4D9worrsQExbFpAFT0TYp0CZ8pIAiyMfMvBnvm2Foa9uX3Lw7c98979x77hNM0wRf7ufPsq7Z2SQYw2QJAkDxQalUZa3WI8hy3gmZr15bu+z8kILBkCeRCJi6bufKMji0NhwiCQR6iitdatTvQ5LyOLLEiWcYukm3m4Zhmbq1BX13FyoxuH7xAlbvpqKRK1fT0PWbRwEmDEyiy1QVg/V1GO02tO1tKLEY2PIy3KEAlmJRDLXb0TeZL+n9g4MHlLJ5HIBuYnSzXq+DlcsQLk/D9Hoh1WrIUjlPcpsYGQzS3LWoaBhvKeXWMQCDA1D9pt8PaXERUjwOjEZQFhZQp9L2yERiqYRCkPt/z58ogTGqHQLE1BLgUmC6XGD5AlipBIFKkbhanKHGYLBDqQ4ZED0OAbfLlo8OIxwGvhVgyTHlA3xkomjH/gegBgDURMv6faDbBZpN+/tHkUApkdTA/PwZAPxntwdUyjYA/+ZMqJHjLgM9iv/6zRt2GgMaIE21aVIjnSm0DGPfmhzyde0UAE2Dj+p7urKCPvkZku9eJILOSMUnkvVhIo7GYIB3xSKYdhoA1erXGVKXpvFxZwdBonnD68PQ7YEwM4O4xwMPxc8RYE87g4FIcz+kvfmnA0YzIJIy77/m0OCqsTkkCTysKPjJG3viLei63Gm3kCO6UWqcMejjxecMPmxsoFKtYop6UNirYL9Wtc5OHqzznIXHq1na7OfMJROcK8a6O7MjW7nfzZdrd7jzT4ABACh3NGsh3GcdAAAAAElFTkSuQmCC", - "exe": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAo1JREFUeNp0k8tPE1EUxr+ZzvRJO62lUAQaKIQ0FVJFjBBdoIkrDDHuXJi4NnHtX+HCjW408Q/QmHTRaCRRohIJifgiiBICTQu29mHfnc7MHc+MlECKdxZz595zf+c737nD6boOYzxJLC6Nhwej7e/24HkO779s7G6mMjcEwfKZ21+/d+em+RbagaFev28qEpZwzKg3ZckqCPH1nfS8hScIdyhBe6JqTG3PfyTTeLrwFhvbKdy9/xi5QglXL0yGJsKDccZY7LDIAwWHpSferWBh+RN8ni4UylVER8MY6PHj0uSpUK0hxzfTmWsUtnoEwO3rer64jEyxim6/Hy67DXaHExvJX3jw7CX8XjfORUdDlOohhU4fAVjILCPbm9V1yIqK2FgYt+ZmsZcv4lH8Nb5upXD7+hVMjIRQa8qeDg8UTYPU5cTcxSk4nS709XTD53ZhpD+IYMAPj+TBz93fZiz5oHV4AP1fGdlyHZIkIZkrI7GyhnK9CZXy+Aig6p1+HQAY003AcF8AVtGGfLWG9XTO4MLZ5cL0WAixoT4zVmPHADSiMo3hzHA/xgeDWFjbNg8H3A7kKnX0koEcPdTu/ylgRGZgOjNv38zoSXC8BZJDRKOlwGEV0VJVGM0y4joAPO1spXbx6sNHeD1uRIYGUCxVSRlDt1fC8rfvcDnsmJ+dOaLgoAs6AVLZPJJ7WdhEkUyT8GJpBflSBcVKDTvpDBw2GzQqQT1OgaZqUOhtFQUTUKnVTVWNpgy51YLVKph7sqKYkA4A1ScEfT66vm5kC3+ofh6Xz59FQ5bpkvE4QW3M5Apoyorhl9ABIKnFgNdTOh2NkJG6WSf9eRBJtmFwLDJmriUzeaOkYvvcXwEGAIVNH6cDA1DkAAAAAElFTkSuQmCC", - "flv": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmtJREFUeNpsUl1PE0EUPbssLYUCXdpaC9gWoSTgAyFigiRGY+KjvuuTr/4A44MP/gx/gMYfwIsan0RjIjGiJIZgSIGFIoXSD0t3Z3dnd70zpITazuZmJzP3nnvumaMEQQCx3jx69SV3a3KWMxetpSgKxP3m242Do43SQy2k/YRydvds67n8a63k+FRSn7l/bdg5tdsAuM3he/5weDC8vLdqPLgIIpba2niux52mg//DqlsYSg3iztO7mczN3DJ3+ByCLgCBH4hOFEF7cDpzPCRyOpaeLGXSc2PL3HbnW3XaRQCPEgWI2MsRVAVqrwbX9bHxbhOKpiJ/bzpDOr2k68V2BtRNzMtqDEqPejY/4zSGjb54BM0mQ8k4xsDoIMauXxnqYOD7PmwScP31d0SS/eAuh1lrolFpIBQNQw2pqJdqsAlIceB1AJCIkkE/FZskXDQVRXw6IYHiE0nBEcaPXSSvJnGwWkQXAE4acAhbxPMJpOdHweoMhc9b2F8zwKizbdlyPLVH7QLg+JKBYzoorxzjz3oRzUoToaEw9KyO8XQW5AE5jrFT6AbAYVVNxCZ0Ka3So+DSTAoDiej5ywTySbls1OEDobhFlMcXxrHw+AbINEjNXgb7y6BndLhk8cRkHHbD7g4gEhiJFxsdhrDqaamBaDKKerGGSKwPI9kR9EZCaNA5ubE7A5s8IFhsrxQkgJhZoa/06xC5xRz2v+3BOjFlbqcGlquxsondT9vY+2pAJdeZR6fI355CgQCN2A4O1w7gkQ7cdLUOAKdhV6uFSv3kd/n8mT68eC8dKWLnY4FsfeZQh7nVVt0/AQYAsf5g+SvepeQAAAAASUVORK5CYII=", - "gif": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmVJREFUeNp0U0tPE1EU/trplAqlL0laiw40xASByEJIZFGVnSvj1j+gWxNXJq7VrbrwF7h10cSNhMRHojEuACVBKmH6SJQyJeXRxzzv9dyZPiCtN5lMe8853znf953xcc4hztDzZ1+C6fQMHAfd4/MBFG+p6h/n4OAeAoGNToi/eOm+A50LKRaLh6amoty2vVpZdotNXccMEK3LwZxa2bsDSdrAqePv/mLM5tSdMwYBYqyvw9zdhUn/L59P4OGtG8qlZCoH254/DdCdQBCxqZu+ugqnWoW9swN5ehp2NotgIo6bGQWGtaS8+vQ5V9a0u5S+1gfABEilAqdUgm98HDwUQkDT8JXoPPq+BoM5kCYmFT9jryn1+hkAt7heBx8dhbSwACmTAUwTgdlZ/CVKJaLnI1GD8TikZiPSR8Gxib8chH95mZTxgwWHwH7+gFMswqcokIRbjMO2HDCnZ1VvArpjEmnKZc8+cZJJYGsLsMiZ8AgwEqaY6Mb6RQR33JFhGECzCRyfAFXNu9v+RVNRZWIMuDJNuYMAaDycUFGhCOgtuAtFVDA83G5A8TrFDw+F5QMAxAKJJxz2xnW3RPJGbm+rCyjotZetH4DGzaSSeDA3h4Zl4R0JOEZWTpIzF4n/m995bNdqZwB6m0gFft3Ak6vz+KYWwFsGlqIxXItEcDt1ARMEtKdVgZb+fwA0G2C2hXM0ZTZNRcSf0b1pmXi7uYnjI+Lfanm5fRQsK8BIxKcrK7i/uIgP+Tw+FlREqHN5fx/vyU4uHBE6UO4gDWqk/JFaLuMxcXeFk6TuJ90V0HOk1in7J8AAjmgkPfjU+isAAAAASUVORK5CYII=", - "h": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAbRJREFUeNqMUk1Lw0AQnf0woK0ttVqp0hwqVCl+UBERT94F7x78Cf4Uz179DT14F8WbYHtRkBYRLNqDtdaPZLObuLs1NGlXcWDJZGbey+x7QUEQgIqT07PL5WKhHL5H46J+22q22vsWpbWwdnR4oJ80LNiz2czGUjENhvj4ctIE4Wrj8XmPUlKL9nCYcOFzE9j1OKSTCdjdrtiLdr7KhVgzEvwW6krC92E6k4Kd9bJt57JV5vFK2KfRQRV+RAMkzxglYI1RaDy2dW1rpWRjQo5VGicYIorWVooFvQVCCAjG8Omw1MgG8AM0uSBUDSnCfk/IGCHwf3DCD/7UhOLBrFkDuep/hDUSSCv1iYo4rIfqGwmUSNJjfYbBcQKhZw0aBMA4B48LwBhBt/cON80HmM9NQ6fXg/Wlku4TwmNWDzaQqzHG+0PSKod5cH5Vh2RiAhYKc8DlV1UPSyuFMGygVlMg1/P6BC6DqXQK8jNZDXAYA1f21V34wMXYFaiyVw0rJyzLgs3VMkxOjGtix/V0XWChZ0cI2i/dzvXdfTd0Qf91BMPrhyNzgKfOmxaWypqaDXHfAgwAtCL8XOfF47gAAAAASUVORK5CYII=", - "hpp": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAehJREFUeNqEUk1v00AUHK/XKf1yZdESVRBXjRSRFqMQVBA5Ic5I3DnwE/gpnLnyG3LgXglx4UDDLZS0RWkDLiRxSusk9u6GXSembmLgWZbX7+2bnZl92mg0goo3b3ffO/ncdvyfjHef6q2Dlvs8Q2ktzr16+SL60jhhZ69bO8X8ClLC7w9XdKJVG8fuM0r1WrJG4gXjgqU1D0MGc2kBTytl+7a9XmWcl1IB/hZKEhccq5aJJ/e3bTu7Wg1CVo7rNLlRhUh4oMnXoDoyhoHGyWmUe+QUbELIa7W8CjAFlMzdzeckCwFN06ATAn8QmDMMMGlMuwWucpoCHNe4jBkAMenjYvRPTyi53JvuwX8AplleAeBcRFrH6rXIxLim9I/pi3QA1RhKaYxdjkN8IwalCMIwWs9ljMkh0wzk+9M7w179C3LZNXxve2h+c3Hu91HeKmD/6zHOLnw83ilB1/V0CeqU3Q81LC/O41b2Btx2N2JVP2riR8eTUxmi0TzBwrKZMsqMoz8MsDh/DWuWhUBKURLKxQIeOMWoptYPnS1c+INZBkwISomOSsmBZS7B+3WOzZvrKGzkMAiGqNy7g+LmRkRfekBnANy2163PZXrSbrQ6vch19Xz8fPDHyL39QzkHBKedXjfu+y3AAGU37INBJto1AAAAAElFTkSuQmCC", - "html": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmBJREFUeNqEUktPE1EU/mY605a+hhZTBNKRDApNrWIRA4nEBUZdmCgLNi4MK5f+FNdu3bFv1J1EXODCR1JJSMTwpqUP6NiCpe10Zjz3hj5Mm3iSybl37jnf+c53jmDbNpi9eb+6Ftcisea909bWNzNb6dwzSXKkhIt/r14+515qBqmDA8HpqKagh53XaopblpIbe+knDpFAhPab2Dw0TKvRK7lmNODzePBgZlK9oUWSpmVNdpIU8T+jaMsyMaD4MDcZVa+NhJMN00w0n6V2nN3yQgdHWZag+LzYPTomIAtT0THVtPGanmb/BbjwLFkvn2IttYGYplKyDzsHh7gdmyAWfh5zVq0Guhg4RAHFUhmfvq3j134aXo8bd+ITnMFOOovU5jbGRoZwNxFn1cxuAIcDW/sZDjA/c4u+BNxOJyxqaenpI3z88gMfPn9Hv98HQZS6RazW6kjExvFi8TGdDSy/W0Emf4LS6R8sv11BmfzSwkPcm74Jo9Ei0GZgmkw8QCOao8OXcaz/5vSZnPdnp3ApqBBLkWJE0Ci7ASzbIhCLLQ1E0iOkBDh9NpUgiUejo8oNuJwyn0YPABtn51UYFFivG3yBGCNZkuDtc/MW+ZQI3OrYpBaARCKufk3B5XIiWyhiL5ODp8+FfFHH+KiKSqWKUL8fC/NznGlPBmz+24dZjKnD0CJDcMoyW0SqXuMtHBFw7rhIAD1ErNUNafxKBNevapwu65NpEQ4FqXIA+RMd6VwBP3cPSERb6gLIFIq61+UqGWaFdcrVt/lmAuWjAi2aiMFwmOYuIJ/N6M28vwIMAMoNDyg4rcU9AAAAAElFTkSuQmCC", - "ics": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAhRJREFUeNqEUkFPE0EU/mZ2dra7bLNpi2AxQFKalkJrohICiYkXPagXrx78Df4K48GDBzmQePLMhUODNxQ5ciEkJVqDtJGmMWrCATRbd2ecoS5u3aovmezsvu9973vfPiKlhI4XL7c2r5YL81LIELEghLA3u/udxmHnPmfGW/Wuv+LpwwdneRYBx7PeWK0wOYYhcXxyckGV1fdbnbuMsXcklqPRJQxFMKz4RxDCtVO4s3xlRjWoB0FYjlQPEEBieChwKCRGMx5uLtaKs1P5ei8IKlGa/YkXMXYtlTEDlsnw/mMXhBJcqxSK6vlcpa4PEpCooUyIqs5M6hG1o2CUwqA091cFcYLf/sjzcX75EiQIojI9779CTYR4jwTBf+r7GAwh0AxCiL6JMT/04vQ79u8aI2O/7Jzg69o6Go8ewycUahtBpADhHKLnK/eVbkMdtROWIv80NQ2sPhncA9Htwn+9hZG0rY6DzFwJl+7dhs0ZstUy8rduwPS/wd/ehmi3kwq4zTHiWUgXp+EuL8FvNvFl5Rn4xAS86iyI2kY3n0Mv48ByrOQmancdi8I0Kcj3U5iuA29xAelKCUHrEIayzltagG2E4IwkFaQgSC6lYI09iN0d8It5uNV5nG5sgJdKYC0G8WoTOZvBISFNEBxnsuzD3GX4vfDsszzqAu0jkJQDedCGbB6AWg54pYbPo+NGVPdTgAEAqQq70PytIL0AAAAASUVORK5CYII=", - "iso": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjlJREFUeNp0kstrU0EUxr/k5qbJzdPYpGkpsUJoA2q1oLjTdiGiIC5cuXHlxv9BEOrStTvBnQvRrSAIsejCrlqpsURq2hCJNQ+TNLm5uc/x3MmzJh34mDNnvvnNzOE4GGOwx8+t9XQkfn0VE0Y5/7Z+kHm+dvOhtd3P9c/xwNZh7nWaMYtNUmX/Fct/vlN7/8J5aRRgyzm8xzpRDjGE2aVH4VTqdnoUYg/XkEhmy+Cx3DhA5tMzdFolvg5Mx3Fx9SmH0JIg79Zo3j4GADMIokJTKtjbfAKXU4Y/2NvSfyH75TFOxa9Cmr0XnlPFl5ReOQ6wNMDsoFX6AElqQlNV1KsOuNwS/AGFjEUIDhmn5+/DMM16/9igBowAzFKIswPJr6MjlxFP3sV04gaP7RzMPe6xvWM1gNUBM2UKYlBau3QghGphg29J3gDlLLilWNdD3gkvIIDRhD9yGe2mCV0V4HFXuCxT5Dlv8Dz3sIkAs03FalDxBMQSt9BRBMhNncuO7dyU28c9tnf8C/Q0ZtR4GImeQSj8APLRH772BWcgiFODffCv/t8H9tO0v3RjV7VqkeeXLlzDfvYjj88uXhl4JwIsrYxmLY/M1gYclIvGE9jZfNPrSCD3/QgLyeWTADV6wW9AryIcCkB0u1Aq/oCPumlufoF72vIheaLDr4wCLIOqrYnULA14PSoqpSJEAUilZrD77Sv3LK+cI0+Be8cAbbmAOrob0agtD491LYfkoqvnyZLsWRkA/gkwABL4S3L78XYyAAAAAElFTkSuQmCC", - "java": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjxJREFUeNp8U01v00AUnNiOEyepQyhQobRBSlVIoRCBEPTAjQsSEneE+An8FM5cuXLNoQduIAE3qopKNJAIIppA2jrOR93aa6/N8yZuUxyxkrXr3ffmzczbTQRBgHC83nj3ca28dD36nx6fvnzrNNrdp4oibyUmey9fPBezEgWVFuYLdyvlPGaMY4fl1aRS+9pqP5ElAkmcnknRwuO+Nyt5u/ETYfyj9WrpZnmpxn2/Ok1Swn/GvtnH5k4TLue4kNfxoFoprRQv1TzOb8cAIu3+ZD7oD/Hm7XuxzqRUNDtdkuLiTmW5tFxceBXlnXgQTAORSMt2oGezUJJJrK9dFWdEH7Ik4dB29LiESeUEJXd7/dAT3L+1ivlCHr8NEzutXTBvbJPPSdO/AH5wysChwM/1HzCGlmAzOrKxu2eCud6Z2Jke2MwThpUXL6Nn2ZAVFTlNw70bK0iRnGAq9qwHtOmTRpsx1NsHyKRVnNPnoMoK9kc2BjbD4vk5JGV5NkBoEPM4FFnCteJFWOS4ntHEfphQyKaFTWFLw704AJ26ZFx/ZEEi3YyY0O1Dmr4EKTUHA8hUnS6siI0DEHLYog+b28RCRuNXR/iQUpPUEQ+NVht6Lodnjx+GXYgDSFRnq97Ed2pXSlXhUSeGhxYc5sKlNXM5DGLR2TMwfZVPAIi+otGNWy1fEZUKeo4qc4ysI+F8VksLIJfYcD9QYgB/DNPMptWBlsnBIS86xmDMTBo/PWd0LB6VZfdEbJT3V4ABAA5HIzlv9dtdAAAAAElFTkSuQmCC", - "jpg": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNpsU8luUlEY/s4dmMpkWxRopGJNNbiwhk1tItbGtXHr0hcwmvgOdWld6Bu4coXumtREE3ZKu8FgOlC1kIoXtC3jPfdc/8PUIpzkBM7wf+f/hsts24YczuerGUc0moBlYTAYA+i8sbdXtAzjITRtq39kr73s/Gr9DTUYPOeamwvYnHdrdR0SnDebuCbswJGqpX+Uf92Hqm7hzFAG/4TgNr1uCwEJ0trcBC8U0Kb1/PQkHt9JxSLnL6TB+Y2zAIMOJBGLXmtsbEAYBsx8HnqCGKVScAX8uHf5EpqmGXv18VO6VDEe0PXsKABN8+AAgiabmYFNNJTDQ2RUFc8+Z9G0OPR4PKYwvKari0MAgiY/OQGCAajhMNR4nDZMaInrKBGl70SPMScck1NQG3X/CAWLE3/dAWV5hRRVIJxOWNksrP19sFgMqqAebUGYHMI6teq0A9oTVAhqu2sfbYYjsL7lCZ3683gA70T3TK7/B4BNoO020GwB9TpwfAz8LgMtWn/NkV8EHgoB81c7nYwCyBZlEVkHcqMTKFnkmehJTOPvEfCnKi0fAyADJKfXC/h83TaZTJjaa5lANLpOFqAXtlEAorAwO9u5syT5UxLfU0e3o1FMu1x4u7ODYq02BKAMAVSrSNLrK1MhLPj8mNF0vFm+C1ZvwKBwXXE4AGn1WAASazESwUW3BzUSMeJ2o1Aq4sPurvQYSRLwlhRR6mSaYyi0WlpAJrFRx3ouh5/lMt5lv8BLwXp0M4lSpYL17e2uK5wP6lj/c2ZPn2RI+YT8fDvqoyegVLyfG5kBKaQQOfvF2pLc+ifAABiQH3PEc1i/AAAAAElFTkSuQmCC", - "js": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RUQ5ODY5Q0NGMTE4MTFFMTlDRjlDN0VBQTY3QTk0MTEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RUQ5ODY5Q0RGMTE4MTFFMTlDRjlDN0VBQTY3QTk0MTEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFRDk4NjlDQUYxMTgxMUUxOUNGOUM3RUFBNjdBOTQxMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFRDk4NjlDQkYxMTgxMUUxOUNGOUM3RUFBNjdBOTQxMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoT8zQ8AAAJdSURBVHjadFNbTxNREP52t7S0bktbKFAvTUVaw60YqkExUTD6oD74qC/yD/wp/gh885XEEI0RAyYQUiMpIBGMkYR6o23abi+73e2uc04v1LROMtnZPTPffvPNHMGyLDB7sbJ2ciUSli3U35smkK9t7x9v7n2dD/g8KUkUwWqeP3vKz23NxJGzgwOx0RC6mSgIo+WKuvP56MeUzy2nJEk8PWsGJVVTuhWbpgmHw47FB7d98Wg4mVWK52o1sxOg3Va3PmFp+Q2PdUquaFUM9/vw+O6cP3bxwm46Xwh1ALR3/vL1e+hGjcc9koScUsTSq3coVDQsXJ3wzo5HEs3clgZNMTVdx1T0Ep7cn6//QRQwMhzA6uZHLD5cIFEFSKIU+G8LK+tb0KsGZKcTJoEyP08AbpcLy6sbPKdQrigdAGaDwWxsDH1uGbliCYIgcM8WFPg8Mq5Pjzdyu4jYbCE44EepXMHuwXe+A8x3KKYxYsjvbUzmlPGpBmYdgI1oYjSMbL4Ao1YXMkcM2Dd2xnbAamPQAqg1GORLZdycmYTdJqFKk2DPR3fmwI4zBDrg9RADqxPAbPBif2WTSB584/3/TGegEOit+DRcvQ4OZJi1LgwIQKVCg2i6nb1I7H3Br3QWqT9pBAP9uDY5xjdSM3RqxeoUkfVnEOW8UkLykERTNXjkM7h3Iw6NNvHw6JjuhAhVrba0+QeALozcI9nQR0VvNxJc/ZmxCNGvIBQcpDG6udA22kyW29HC72wu8yG579ZoiSYuR/ly2+y9CA4NceWLmo717T1i5ULqJNtapL8CDACskxPFZRxLwQAAAABJRU5ErkJggg==", - "key": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlZJREFUeNpsU11PE0EUPbM7u/2AtJUWU6qiiSYYo5EmmPDCD9AH46sx8cEnja/+CB989z+Y+MKPgMiDsYQACcbaWBBogYD92t2Zud7ZlQZsbzKZ3bl3zj3n3IwgItjYeDO3MlWme0bjUth8e8/fO2tHzx3XqUEk50uft+Ndnhdmc3SlfNPkVZT8Cy600DoIISvVfKYtlvfX1p66XmoIYsMZdjJQWvEFbbsC/S5g2QhSkKUK7rx6OzvzqLpsovAhaAxA3DUBQn2TUFsl7KwTfm4Z9DoO5LW7uPXi9Wxpfn7ZKF09vyPxX2iWcNRkKGZz0mQWKoNs8AVB6x1yRY2pYnc2LLofuXTxMgAlmlXIfngCxNxEzM+DPv6NQa2BygLgZyX6JT83ngHTN5GAL0WSoUQkSQnXkyBh/k0GegTAaldM20sTKvet+yyhIZApECamL0jUSe3oFChx3TopM4TeEQP2gc6BgGIwb4KGNXRhCkMGxgg2kJeybRiZM45D8W61qEAknSmpHStBhywu0nFVupSCTAcM4ECwqapv+NQ6LS9JGALoMIIoPYDjZiEL1xHtbyO39AQUDaA7R1AH23DSeSA4hv5RG/VAhxomPYP8sw9A4TaC9iHkjUWmrtGvbyC18BLe3GP0m3WW4I5hEBEnPIStXzyuFIxb4EkMEJ79Qa/xHbKxCdM7xeCwzUZOjgEwnuzt7qLz6T3cySmQP43uzjeIiTJM6io6W19B/NLCKMVGCzkCoLR/0lrfOI2fNy/huKC1FTsK/rbGNeMRC8dHpHByfu+vAAMAL/0jvAVZQl0AAAAASUVORK5CYII=", - "less": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjZERjZENTJGMTE4MTFFMUIwOEVERjQ5MTZEMkVBREUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjZERjZENTNGMTE4MTFFMUIwOEVERjQ5MTZEMkVBREUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGNkRGNkQ1MEYxMTgxMUUxQjA4RURGNDkxNkQyRUFERSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNkRGNkQ1MUYxMTgxMUUxQjA4RURGNDkxNkQyRUFERSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pl1w97IAAAJhSURBVHjahJNLbxJRFMf/wPAIMIxMkUI7tS0VYqlGDLGhjdKkqyZ24cJFN925de+XcONHaHRj4k7TND6SGo1VWwmp2kSLhlqMDbQ87gzPYcY7k4GgoJ6bmdw598zvnvM/95pUVYVma+svcovx8yMnFZHAMJPJBJfDzq5vpX6+/vD5qo/z7DOMBdo/d26t6jFMJ3iY51jBz4M+LP6wxEw40Gy23qYzB3HO7fpmpZCOmfEfa7Xb4NxOrC4lvbPToe2yKE3K1PdPwNOtHdx79ESfq4qKkijB5/XgevIyHxEC24USmewDqD2ABxubaLRkfW6zMqjWGlh7/ByyAtxYnOPnL0Q2+gGGmKRaw8zUBJaTiS5QOO1FJnuIAM8hciaIWHgi8NcSNt+loVDY8JBXh2ojJAR1HbTSNFMUpV8Dxcjg0nSYBrtBxdLbqI1iheCUh9XXNGurAwCdEkb9QyBSFam9TDfoPZ1LUg1BH28IiwEARTVAQOzcFKRaHZpLoa9avY6L1Gfs0c32t4PU6W2lWsV8LAorw0Cs1nXftYWE3qZGqwWHzYp2zzlgetuolVFvtiDLbRRKFTAWCxx2G/KlMtXFhWPqOzsWHJwBx7rxKv2R7mwFz3lw9/5DLC/M4Us2RwV0g3U58XJnF7dvrsBOoX0Abbej/DFKRMKI30fTVGC32WA2m5H9cQQvhYi0vE/7Wdgczn6ARA9QPBrBszcp/XvpyqxebzQ0Tlsq6llxLhe9bD4cFMr9XdjLHpLv+SLGBYHAYiVu1kNOpAaRTWbCejgiw0zGhFGSK1aw+zXbvfK/BBgAPwADAs5GpGsAAAAASUVORK5CYII=", - "mid": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnhJREFUeNpsU01PE1EUPdOZKWUotKUKFLEWkQ1EASGGxGBi4sIVrt27IixN/Cn+CxfVnQsXJiz8IAoqRBGEaMUUWzofnXkz781436QDkjKTyXuZe96595x3rxJFEeTzaKW6dmdpfIoxjuRRFECGn7/4Utvarj/syWgflU5s891qvGoJePJasfBgeSpnW+yEIJVS4DEBx3FzGT2qfvh0tJxOE4mCU0yy8X3BLdODRQTJZ5oMzYaD0UuDePzkbnnx1mjV9/lMp+izBKEIwQMOzvnJGoYhhBDgFKtMjmBl9XZ54WapSjLnknMnEkQYgflCVhKXLt+/dRMy2d5OHdVnPoxeHUtLV8u2w5/S78UzBJwLMC8gAsosIqy9/ga37WNmvgKVKmEkb7JSwI3pIdRq1kBXBZJAUKkb6wd49fIzbJthdn6cIhE0XUWbyP4cmshmdZAE0eUBD6gCN0DtZwM7Xw+RUlVEJCui7CmyPaS94zC06ZMedREERNA6djBWHsS9+9fRS3p9AraOXbhELMlUQju2G2O7JAQENk0XhpHG3MIVlEZzaDbdOKO8jWy/TraGsMmL4L8KTgnIfcfy4JBWeQNp0j10MQtB4EJOg6qFMI/bEH3pGNtF4LOAjHMxO1dGvW4jXzDi7Iw60TB0jJRyONhv4MdunbDneMA6BMPDA6iMFzExcQH9AxkUiwby+QzevtnF2OU8lBT1i8fOa2UO1/FwdGTHE2STHM/14+vlPOz0RxibKPfn9AHXZHBzYx866ZdTKkuVndhHuqenS1h/v4ffvxqyvbUuAtPizZ0Dp7X1fTs+FA9cMnWd4ZG90NOjomVFzeTcPwEGACDGeYddZX86AAAAAElFTkSuQmCC", - "mp3": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnxJREFUeNp0U89PE0EU/ra7XWxpSsFYIbVQf9REFBHkYBRIPJh4wrN3DsZ4MPGP8b/wUCIHEw5EY0w04o9ILcREGmwVgaXbbXdnd2bXNxPahGyczebtzrz3ve99740WRRHkWn5cebu4cH6SMY7e0jRAHr9c3WxsVvcemmbys9yT6+uHJ8oaPefypdPDD5Ymh5w26wMkEho8JtDtuEOZFCrvN/4uJZNGH0T59D58X/C27aFNAL3Xthmsww5GCyN4+uzu+OLtQsUPxPQx6ZMAoQjBAw7O+bEVCMMQgqygs+LFs1h+dGd8bna0QmXO9OL6JYgwAvOFZKKoy3V44CgNfv7Yx8oLH+lUEgvzF8Ydhz+n41snAGRG5gUEwClzhHdvttFxfNyYK0EnJozKK5eGcf1qHo1GOxtjwI+pfvm4g/W1qtJgerYE2SXJSIL9+W0jk0mCShAxDXgQKgbNXxZq35vQKCiKQkSUXdc1+gcch1FHGPmKuIgBCdc66qJQHMG9+1NIpUylxxHtuW6gEiTIu+N4yjdWgty0yTmdNjFzcwKjY0MU7MLt+IjoSad16FoIx3b/A0DZ7FYXnsdpAjUMDOjI5zPgfoBsRodhhGhZHfBBU/nGAGRtxWIOg5lT2NtrI5dL0SB5KJzLodloqXaOEatPGztKq5gG3S5DNjuAK5NjKJfPYKI0okBkSdemCiSgS/rkQNLSePtxBj4LSCwfFtE0krqqX7ZVMnu9XlMXy2l7ME0dzA3iANQyY6vWxC61UY41zTyNcYh6/QCNXQvzi5dR39nHVq1BUyuMGAARsF6tbbe4iKD1r7Om5iFBdmW1SsDflLiuB6sX90+AAQDHAW7dW0YnzgAAAABJRU5ErkJggg==", - "mp4": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnBJREFUeNpsk99r01AUx79psrTrujVtbceabnZs4DYRHSoMh6Dgq77rn+AfoA/+If4Bok+C0CfxVRDBh+I2NqZzrpS1DVvbtU3SJPcm8SSlsJlecsn9dT73nO85V/B9H0H78OLdt/LDlQ1uMYybIAgI9n99OWxoe83nkiz9hDDae330JvxL48O51Xxm/enNtKPbVwAh0Ec6kYpXat9Pnl2GBC02HrjM5Y7h4P8+7FtIFVJ49OrxUnl7ucIdfhv+BIDv+fBcj7p/tXMPrs2RXVTw4OX2UnFTrXCbbY7tpMsA13FDSDAOQ4gJEGUJLs0PPh9CkESsPrmxxEz2lra3rnpAt3G6adgdQhBpmeLkFodNmsjpOPoXBrQTDcmFFNS7i3MRDzzPCw/vva8ikU+COQxm14BBhvJcHLGpGPTOAJxxeLbrRgAkYujBdH4G5oWJWXUW19YL4XqunAMFhnq1BqWYgaY1MAHASQOiU96zKzkU76mwehaOvx6h9uMv7KFN3RopL4oTAI4HRh4wSl399xla+00YbR3yrIzM9SzSqgJJnoKcklGrH08CcJjnBtLLCsSEGGpSWJvHtDKNoFippsJ0ulIsDDUCCATMlBQkNuahEyiZTcLsmFBKaQxaOk53TlHeKkM70AjAooCghBOk9sKtIvqtPqS4FBaRnJSRX8tj2DOh3lFB5Qw2ZNFK5LRo6w4sKt2ggAzywidAMN/9uIPSZglBLDO5FF3mRD3wHE9qVRvoHrUpfn+UEQK0/7ShtwboHJ6jdH8RZxSC57hSVETb7e5/2u0FxqPHJow+8iZ4lYY2QGu3idhIxO7Y7p8AAwALCGZKEPBGCgAAAABJRU5ErkJggg==", - "mpg": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnxJREFUeNpsU0tPE1EU/ubRdlqmnUBboa0UeUQDiUGCC1+JmrhxoXt/gBvXJi74If4AV0Y3sNKF0YUaICqoIfjgVShEiGF4tDOdO/fOeOaSKtie5GZu7pzz3e/c7ztKGIaI4vn9p+/P3h4e4a6Pv6EoQBDiy7P5rc1P1Xt6XP8M5ejXo6UJ+dWbuemeTGdpvNdiNe9YvQLe4Bi4PmTpRmyq8m71rp74BxKF2twIHvAo+f/l1T2Yp0zceHizfOZa/xRnfBRhG4CQqAYioBWeXDyA8Di6ei1ceXC1XBwrTXHPH2vW6ccBBBMI6BsSUEQzakGL6xB0tvjyBxRNxdCtc2Xf8R9TyaWTDOg2TjfVdw6hqIoE9B2GxkEDWlLH7s4ette2kSp0oDRezrQwCIIA3oGHr0/mKMmE53qo23W4+w5S+Q5ohob9X3tgHgO8ULQACC7gMx9mKQP30EW6mEHpYi8xcJEdzMucjfkKcrTfmqmiFYBxCF/Id+gayKJwoQjHdrA5v4HK7Cq44KjZNWpagaqp7QACks0H9znW365ia24DzoEDozOJbH8eVtGShXHTwNracnsG7q6LzsEuaAlNPm9h7DSSVjLyCMkppDI+GS2StQWA1RlKo0X56n2X+6QHkmkDakxF9WMVqWyK+s/BrthYfvWz1Ug+zUDcjMPMm0h3pxEjFma3CbIuCud7oMc0LL1ZgmElpGJtW3B+15HIGNITrMYIlOH7i0U41NrInREylYbu4R5qQbQBaAh95fVKZCnpQCnb9DrWZyrRERS6NDeUw+yHaXh7rt4C4B8y+9vkwn7kwKNRpDoa9aiFKBYnF+RcREqQ2e1m3R8BBgAy9kz9ysCE6QAAAABJRU5ErkJggg==", - "odf": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAi5JREFUeNp0UktrU0EU/mbu3FfE1KRRUpWYheALNBURUVy7cy9UkO6KW/+Lbt0IPsFui4gLBbUqFaUuXETUKCYa0jS5yZ2ZO557b5MmTXpgmDPnfOc7jznMGINYPi0de5UvmpORxpjE/kbNqW005DVu8TWw1H758ZfkFgNgJmtyxSPRjJIj0QTW/RDiYGXGb7Dl32/eXrVsd0gSCx9miqC0ooCdp69g5Q/h6OLN0ty5ynIkwzMwUwh2FwMdcbDiCZQXlkqFCpEoPT/wih1YjLInANcD+/Ua9bu3wJlGvrBZCmet2+S6ME5g4oGlZ9A/I70XCDhhDexPNTFmswJBwcnuXkF86VSNZxVu0ukLSGnBcqlnN4HoCQIaIuIv7LUooMOgQ7q75LAAb59B9gCBHSKgqemRr94mMKmD24CfM8nb7THYGQNLpAkUkcb66JyGBFFEWRVL57gFEH5qj8Lxwca2qS3EZaugmzAw24dR/XQgwtsCSBjPIdWbUoE2UJLBnV8Ac/ciWHsK9/glWLnD6K2vgPszsOdOQdfeQ1c/ThKoTgDn9A3KUED/52d45xchZsvorD6Bf/Z60riV3Q9Z/0bbGU1uopYGkfERSQ3VbsMwl0qlqoIARmSoPYXWy0dor79LfBMEEd8jGs/uQ3Yl7PJFNFbuEXiV2riCf88fovXhBbo/vqP3t02/ZYmJFqTkzY160Go9uEMbFK8hR/NrdXtFuUVmnmySVGgO4v4LMAAjRgmO+SJJiQAAAABJRU5ErkJggg==", - "ods": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAetJREFUeNqMUj1IHEEU/i7u7Z23e8tGgneGQPw3hZDkkhQiSuwMQREba4uUgpVlCrvEQhurkCoWqcQQ0oTAaYKNqJygGEwgHCSB6Knn7eXcdX/GmdHVPWYFP3gw78173/vmvYkQQsAwNvckq96UnyIEh7/d4t7uUd/8y+85P+bXSX4grkhI6nJYPW7LrXpBK2YxiSoShhu4Buq1NPofDeqdrZ3Z4cl7D4J3UtA5VyVAlmJoru9Af2ZAp1lcCQ3nqgiuKmbY3l/BH+MnHM9GVLP0Ww3KNA33CQoQQnL834Fj74PUGkANEIkCSSsa8gQqgYTIcB0PVsXB318GInRiCVWCkpRFAs+j5gKlA4t29Ggh4d0t04FKt9PQqF4UFgumSEA8ApeaElilWbYRVy/lsns/N1QBkxtENF4jxPxcgcB1CZVOrvMteK5IQDtJJIGh++PcX9iYwWjXK37+vP0WdYk0Ht99jtX8JywWFkQChw4tc+cZcvlF7rMze+ubbxN40fMalRMDP/6twaiUeK7wlZ0TD0a5hLTWxo2d45KKprqHKJslTsy209s2wnMFBTYNZjc/oLt9gPvLOx+hxVJIKS2YW5pCbSyJTGMK775O8VyBwDJd2LTDl/X5i8v3S7NVw9vJb51tITDEUwEGANCx2/rXEEFFAAAAAElFTkSuQmCC", - "odt": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAepJREFUeNqMkz1II1EQx/+7Ca6JkqyYiJ8cKEpAQbBQFDm0sVOsFBS9wt5KOTgEG5twxVlZ+XEnKNiIghYKxx5nwEpIIXaiSAgKGmMi0d23u8+3T7OaZJEMLG9mmPnN/w1vBUopLPNNhRWXHOyDg0nx82TiJtZPlPVoNpftc2cTotcHtxx06kdXpSQ/BvzKESZzIDmAz6y+NojOjpDMZiqRPIgNoFyWM8DrKUV7axO+gcp4g7AzmquAdVNqOgL2z2I4id1B0wgeygOyt/rLL5buLwAIDgA9dY+L+DkuDQOCrkMgBsRglcMOqAGwIstMg8AkGsuZMNUMRMkLqE+QGloglvlA7uIOAKvZajR0qJkUj/XHe0BTIclVKKlrfKsj9qA8gA6wqSJzPaXlr7ky//tdLEUfawsBjExUFGVWbT7AxSa42H2LMfODmvd3wKb7RAMLYwM8nts8xJ/pEe7/3PmP2eGv3D+9usb35W0bINoA7RmjXSHsH0f5Z/mUSZ0Ir2JmsBtD80s8/rGyzWsLFTD5yUQCbfUBHl9d38LvkdDTXIuHVBo0k+bbt06qO+yAPGXwe/cA4wO9PN44jKDG70GougIzi2tQ00ms7/3lpwnBBgjZ37Kkd1Shht5XzBIFl/ufFtniT/lFgAEAU//g6kvdGBMAAAAASUVORK5CYII=", - "otp": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcJJREFUeNqMkssvA1EUxr+ZjkdbrfFKVD12ErYSRELY2fkH+BMsLcQaSwsrSzZi47EjJEQkEhYkFlhYSVtFpdqOqpk717l3jKZmiC+5mZlzv/s795wzCuccQncz3YeRBj4KHz0/RrOZe2NsZPP20o255zQ3EAxzEAC+6uzTw13G4TFQAakA/CWtIYbY0KBOrx7IvwDQqlHV1o3YxKTOvyAUvfQCfqmA3e4ikyS/zRAKvOot7eoSHEgZIHrCfQAfBqBaKQQDKScQAExd8emBANg+2U2CvNMkkgSqBmrCxFB8mujeoJBWwEqARcssKTAJEGrmaGrjqK1zvNknH4BtyxKl2VUpRxmj5W+x73q9AEaZrR/ND1EJluIpS3i9JQiA+a+hSq8HwJjTsLrRaWitPTCOlhEZn5N75sM1qigmlN+dB3u++Qao5W4TtbEXXIsiszGL4PA00itTsu6XnQWo0TjMTAJqfMDx/ryBJcaVzSNSH4fW0Q+rkIf5rsjRiid7yyN7uoXS3Zn0egE0NiORAN9bQ017D1Lri7CLlP2EDr3Rf7C/itzV2bfXA/igLDaRixfngFhSCooH2xVPCWBlwKcAAwBX1suA6te+hAAAAABJRU5ErkJggg==", - "ots": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfZJREFUeNqMUk1rE1EUPS8zmabJdDKB2glEwY9ExJYiBUEQpV25qgtBXfgbpEtXuujKf+AfEKRddOdOGHClbYVCvyKWaijT2mhjphk7Sd7Me76ZONp0EsiBYWbOvfe88+69hHOOAE9f3zTVnDKNHvhlsfqPw/rM0ovyWsRFdXJEpDIyRnSlVz0KSkmvabaJeXSJBEhgAJzTDNybmtUnS5Pmg/lrN07H5NM/f13FoMgpXDSuhiIiK3Qi6LUugX7FAbaPPsJqfIHHKCStqRsXVFPQuZgD9BBxjikSiRq41AAkgCQBzVf0+BWEBX7GBm0xgHHUqk1UbBuEcIydzyCZlOI9YEGuDxwduCCitS3Xh3viCZ4jrcq4PJ6DLHd67tjtuAAXib54dCPVEfQ5XIcik/0/2iDeOYz3ceCxrisMi904y0XiMQFfkB7lg6xFHwFxEqUMV0anUNBLWKm8xd3i4zBWOzmASx0UsiW831mA59Xjm+h7HCOygduXHqJatzA7Poey9QnXjTuoVD/j/sRcmDOWLgqnLC5A2wwST+Pn8T629lahSCo291bwu9XA7vcy3m2+gTaUR14thrk9BXasbdiOjSe3nmPpwys0xSi/HpbDd3bIQC6dx/q3ZbRb/j8BEi3Po5cTJpHI9CBNDEa++GyDBN9/BBgAwfDlCVUQaNAAAAAASUVORK5CYII=", - "ott": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAdFJREFUeNqMU89r02AYfpJ0iVm7EqhVOxw7dDBEdpiCE1RoEZRddvUgbIex/Rs7eehppyF4LOzQu4MxwYp0HgShIuwwUVSCVtl0s13afl+SzzcpyZYmyF74eN583/s+PO+PSEIIeJZdrtQVI19Cgmk/Ph39bpllXq82g7sgLxVcyKNZpIx8Uj5u5zSjc9Gov8ZihCRC8D+7On4JczevGeTGSEIC4ctKJtB1DTPXi1iCCEkIm1EFlC2Em0iwtWfinXkIzjiO0jljtDC5TtflGIGUQMB+mfja/oPv2Rx9MMjpMdJxOXyXTwkcwIkewfqQ1QtQNB385zcI14FrtQexsSb6SRysZ4Fbf+F6eHwATc9gJGNAm5iCTL5n/LCVRGADNoeaGoHqyaXj5gqQlTODovcwNk5Aj6wXqV8eCo7EDhMonEHpW+dZC7gUG98D3geo7vkb01h9cAvPdt76OGy1xntUd3bjUxAk3+l2sHJ/FgtrT0MUJNfDSm0bjQ/72Hzxxo+NK+h3B7XRNO4UrwymQtMIkdTBU0m+sBOayLsn8Ka78mQDjx/e87HXPkb1+UsfP37+AmZ1fP/suknBb6nefVQXjl06TxMlJfWKNWr+Kv8TYAAkUueexJF47QAAAABJRU5ErkJggg==", - "pdf": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmhJREFUeNp0U0trU0EYPTP35qYxaW6TlDapNKWGbgo2FkF8rARB6rboXusf0F/hyq2U4krFqugqSBeuAyL4SERBstHa0iR9JKZJ7mvu+M0tqZGkH3x8987jzDnnm2FSSqh4ns0VU1ybFzj674Wa3uWiWbfsFQb+jrGj8Xvbm0HlvYVRxhJprpmTlGmum+OMm5uNPZNbtjk3l82ey8++8oW4Jv/H/wdA456g2kvH99FyHNiuAz2dwflbN8YW8zMK5Go/CMfQkAhpGsyQgRCtlpE4jIULyC9fHzu7MPPEl/5ib6WOE0JJNRiHHg6j86mMjw/2gG4bkbY4PW4Yj2j64skA5FTHdaEMPiAJszt1sK0d4suJmY4k0+IDDGRfqmh0u5gejQc+fG8eYCIahRQCEfgQnIuhEkgtONE+dGxYxEDj1DhiEycZ+1YXdUpHCqTMJIYyEES5aXXQsi2kYlGEia5GtHVKn+amPBeCutPgfLALPuVu+xDVPw2EQyFEjHDghbpYNm1yKVVnYjTOerepn4E6XQmLGSPkPkOXWATMSDcjQEkAaqOu6+i/rccALtFL53LI3r0Nq1ZD4/MXZJaWYFer+PXiJc6s3IEgY3+uPYZHTAcAHM+DTE8gnM1CSyaCulv+GrRy8uYyElcu4XfhLVpkpNtn/DGA5Uu0abFH36WnzzCayWAkmYJvWeCkfb9SwY+NDbSoOx4bYqJF8rZqVRRXV/HhzWtUSmWwmWl0RmN4v76OUqGASrmMOkntSHF8MOs954dT08W248wzYsJDOujRBAaqqikTpRo/qqd0/dv97c3Lat9fAQYA4z8bX9nTsb8AAAAASUVORK5CYII=", - "php": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAhNJREFUeNqMkltrE0EUx//ZbDaXNrvZzdIkbYOXGgxYQlCK2IIY6EufxGdB8Av44AdR8AP44JOPBR+Ego0PClUKTTXQSmkTYtOkmubSJrQ1e3H2yJSEJNIDs3PmP+f89pyZcdm2DcdWvn7LzkxFHmCIra7nm9ulg8yLZ09yXON55Dgjt1PM2iPs0+aW/frdh8bzV2/SvQBnCLiEqcFxLKSSodlrU9leiGPihWePBkgeEZO6ShC2dCAZNuf6ADb+ldQ5PUPx4BCFcgXfdwq4Ph1Dtd5CZi4Nw7SQiMdCXkl6yVIy/QBWgcU+yx/XsLK2cdHndqlK/lZxH/OpJO7fnsWY3z/YAq+g0TmHpoUH2vB5PXi8RD9Fo10aAmDJTgWyIuOupmK38rsPcOvqJO33XWEvwLJsmKxHRVEwf/MKWl/yUMf8mIloWN8rw+sP0D6PHQmYuzGNgCRiMZVA17IQV4OIaTI8buH/AJMFd02Tkp05PO4jnWvc57EDAINt7u1X8Pb9KgI+Lxbv3cFR8xjx6AQ+b+Txs/qL9KePlih2CMBCq92hg2qzt1AoV7H5YxdhdqhHzRbgcpFeqdUplpvQW4FhmAixZ/sws4BoWCM/qmsE5XqE3dDQCrqGAYWdejqZgK6GUD8+IV9VghBFN1RZJv3sT5diBwC15gncggCPJKF0WCPN8dun55jQdVpz3Ynl9leAAQAJhiGatD9AOgAAAABJRU5ErkJggg==", - "png": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmtJREFUeNpsU9tOE1EUXXPp0CAUWmJbC04xBANNTF+kKhG8fID6aqL/gPEj9E0lIf6Dj30HL03wxQtVIC0QKrWxNG1Dk9Z2Oj1zxn1m0oIZTnIyZ8/ee+211z5Hsm0bYg29fLGpxWIJWBYGS5IA8ncKhT9Wvf4Yqprtu+w3q85X7f9QxseD/pmZMZsxN9fnc5JNw0ACGGv6tPSvyvEDKEoWZ5Y8OHHObKpucw4B0t3agnl4CJPs2YkQVu4s61ORaBqMJc8CDBiIRhhVM9bXYdVqYAcH8M3NgS0tQQsFcfdKHEbvlr6WyaR/V6uPKPy7B4DT7lUq4MUipMlJ2MPDUKtVfKZ2nn/5BoNbkONxXeb8LYXe/A9AJLNWCxgdhZJagDI9DZg9qIkEytRSkdqTSFQtGILSbgc8LViM+tc0yPfukzIyOJ359k9YR0eQdB2KmBbpwXoM3Dod1SkD+scpEapCI5DdpsJhIJcjajQZagcjI+5oLe4VkeQnyiZgdIH2X6BJ7dSqQLfrggjw0AQwP+/GegCIHppNoFAgEMO1RZKo7BQgRi3yN05cnwdA0BQMAgF3C6pnbuNg92M9AFT1diSCh6kb+FGvo2MxnBB9ocZxp4Mns1cde213B81e7xwAcl4jkaa0IUSjUdLJwkL0Ej6VSvArCt7l81iku6GrKnYEU89VJlSJRmR0Dax+fI9suYxSo4HlWIw6M3FBlnD9YhiXabyOsOeIqG7TzDeIYo6EDGp+ZPb2kKKqH8h+mkxiI5/D1/19J3bwYPvPWXq2skkiJVxesqt0XzghpKM8nRVV2Lv2q9eLIvSfAAMAaacnllcFBmYAAAAASUVORK5CYII=", - "ppt": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAkhJREFUeNpsU11rE0EUPTM7ySZpmzT9DNamWAtFfSiCigr+AxF9zKtv/hvf/Aki+FEi6ov4ItWHPGiwiBUKoUqqTUJImmR3M7Mz3t0kNe1m4LIwc+65595zlxljEJzdR5uf5nLmsvZx6gSvtd9W9bjhF7jg5dH9nRc/wq8YXaTSJptb0xklx7IZoKUEz1zJ2DUU69/37vFYrDxegJ9U0lC+AoIIVGg9CL+vIObP48KDQn7x0sWiVnJrnEDg7KGk+i/Ac4iUM/R7BsmrSSxtXMfa3X7el8+Kjf3KfUJ+iRJQw4w0Tc8BRyWGRAZY3rBR/VlC+XED2ayDhZyXl03+hNA3TxNQshlGLAnE44zCIL1goXZwiMNvB1i6zbC0KuAsxNITWwgNMYPeLVJiFEO9ArjHAivrAjNzBr4f4vwIgdGD4YUACsZCE8AtYGWT5jCsGQw5wEYJzP/pj5RwYTA1b07eQmfZ8P0sgdaM2FlYwWkMgMpl6NQAO33GKM0wsQWflkh1uqGVmVWblsiDkQyqxwfag35SqcktaEWTUTHYNx4iGU/C29+BvX4Lpu/C7zYgFjegSY63WySsHyXwpYHU00ieu0bAOuJbBTArBkiXKiaAmTzcvRJUV9E8rOgqBwqlY8ASs/AadbRLb8CzeTjVClqft6FdB17tL7yeCbFRBYoLr6vR/PiSEl5BZJaBD0/R2nkOZqfQ2fsKt+0SEQ+GLSIEUvJm+6jbah2+pS2aon+4g/afd4SYJVuA7vvXdC/IHQtSoTnK+yfAAIEaId1m+vudAAAAAElFTkSuQmCC", - "psd": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAqxJREFUeNpsU01ME0EYfbtdKKWGtoItRWgJHApCBE2I0YuoiSaaeDJeOJh41YN3TfTixcRwMfEk8eDJGA+Eg0YTTRRMg02KKFooCBbTlkJLS7f7P+u3K9Xo8iWT3Zn55s173/uGM00TVlwZfzJztD92iKO5ouvQGQPHcQDN380vlDPr65fdLj4Oa41i9sFt+ytgN7o7woGOrqgvvpLBaF8vWj1NUAwGTVNRM3mf5vU/zaU+XySQuTqIFXz9hxmGLkoS7r+YxvVnrzGzlgXPDOzUZPT4m3Dt/KlIuH9oUjXYEHZZ/wOgGQZi4TZcGI5hLb+FO++TSOSKcLtcMA0dI0EPrp4+HtnfG5skiUecDGwQE2MjAwiGWlFVNDz+tIyCokJhPKYSX7Gdz2I01hOJdnY9rJ/7UwPGTEiqjtbmJtw4MYx78S/4Wa3h5UoOYwPdIOp2Xi/t18rlFgcDw6o+ydiWVRwOBnCpL0oOAMmNEhLZIgSeoxwGSWcERon/M9DoBknTIdNQNAMnO4PIVGpIFXcwndlA2OtGc4MAxml27p4AIulWSIa9QVadiYSoJxhqBJivKgh5ad3k9gaw6JdlDaqq7q5wINY4F22HaLHSDZQkBW72O9cBYFEviBIURQH7a7MN0uDisUW12ZZcaGlmdq4DwCqeTo1zNtZuW7hUqGIw7MNqSUS2ImNsKEpSdEwt5lGhfQdAkQBEoub3NNrDJfAIeBuRrcrY5xGQ2RFJAjl00I8PCckJUCB9q1URBnk38XEJEuk41tmGwZAf66s1VOh2keqwoUnYpFxHH4iKIixkN3HzVQKP3iQR/5GDKMuYmE3h+fx3MHqh1sMafztHLuiCg0FAk0uFdLqcpGY5QEXbTC/j7mIaVjc18DxufUtBJ/vcggs+3ijVz/0SYABsJHPUtu/OYwAAAABJRU5ErkJggg==", - "py": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlVJREFUeNpsUktvEmEUPTPzTUFmgJK2UqXQFG3pA6OBLrQxamJcaYwuu3Dp0l9iXLvVtRuDpgt3JIYaTVSaxtRHsJq2xEJBHgXmifebMhECXzKZme+ee+65516h2+2Cn2cb2VwyHl12//vP2/zOQaF4uD7GWN69e/LogfNm7kUsPBFaXYwHMeK0OlpQEJApHJTuykzK98dE98O0bLM/UNgr4v32Dj1fwSQRt9dSsfmZcMa0rIv9ODaqYrPVxuPnL1Cu1aEbJu7fvIZUIo4bqeVYRzcyv/8c3SPYpwECt/dmu4ON3Ed4TymI+hQc1ZqoE+F+uQLDsnHlwkKMscJTgl4eJOi9fxZLePNhGx6ZQRRFqH4VjZaGSv0Y6cQcJLpra0ZguIWegqDiw7lYBBZV6xiGk9DQDLzK5bEyF4Hi9VLMsoYI7J6Es5PjeHjnOl5ubqHaaJGBEkzbxplQAKIgDmBHekDTgI+qKKqKLvNApgmEgyquLs1CoFn2Y4cIeLJpkjoCLkWnUSIF3JxISIUsCjAoxhWNJLBIJs3YeXj/08oYZkOKY65HllE/bkMmY504YUd40HUq2JSSyW6iVPmLiXE/ZMYQCU+hXK3h1toqdNN0sEObyKtqtDQ6kXDwcadDS2TBryp4nX2HxXjsJK6bDnZIAZem6Tp5YMMmicn5OC4lztNWtvB9cg+hQABtWjKL2jH/T3GgBcYDXEE6mcDM6SlaJAGMWkivLBC54ZgniZaDHSI4rNSqn7/t1vgkGJPwZXffSeCjk2iUWz9+nSTQN8e6ef8EGAClUi/qoiOc3wAAAABJRU5ErkJggg==", - "qt": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnVJREFUeNpsU8tu00AUPU5sp41NkzRxpfSZqi0VIIQqEEJUZYXECvbwCWxYsuBD+ABUFrDrCnWBQEJdIWigBSr6pqRJ1ebhxrE9M7aZmSrQ4o505fHMnXPPPWdGiaIIYrx89GKpNDdxmXkU3aEoCsT+z8W1Sm21+jCpJctQTvaerj+TX7WbnJ+0cpfuX8mQtn8GgJ4AZtIFY2Hz3foDVRcgyt+cRHcS0IARh+D/8G0PpmVi7smd0dLs+AIjwTVEiANEYYQwCHlEZyJgIQKfoX84g9uPZ0cHZ4YWmE9nuufU0wABCSSImMsWEgqSuoqA/39/swZFTWLy7vQo7dDnfPvWWQa8GuOV3IYLJXmyzDzG2/ChZ3pwbHdQ267BKJoYuj7SF2MQhiF8LuDK/Gf0DKTBKINz1IbTbEMzU1ANDW7LAfEIQKIgBsBFlAx6LYOz6MAcvoDCtAVGGPKlAiIu/F55F33FDA6W93EOAOMaMOl7biKPwRtD8Foetj5sYPfTDtxjl1f3Ubo5jkQieQ4ACSUD2iE4XDpAdbUiW9D7UsiN9WNkZgxajwbd0LGzt3keAJPUc1N5SVeENT0Ao2BKV6QzwlZeRBSKAYhe3aYHcZWn7l1EfjyPypcK9LQGa8qCvW9j9+MvaasQOHaRhGWdhsNLR8hwodYWf6B4tYjDjSOovRqq32rSYq/lytw4A77o1V2ERiAtzY5kkUrrsH+3QF2KY87ArTtQuQ6nAf4x6FCV1D001+vYersBM2vA4y1Rm2D7/Rac/TZIw4d/6MrcGAPf9htN0miJh7Lyuoyvr8rQeP9iVJcrSKgJ+TrFcyYebXTP/RFgAFQobmIOBxbsAAAAAElFTkSuQmCC", - "rar": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnpJREFUeNpsUktPE1EU/u68OgylZXi0hZACQU1LEKKCMcat7jTRnQsXxsQtv4E/4M74P1iriUaNCw1FgxpjCJQKKAU60+m8mJnrmSll4XCTc8+959zz3e88GOcc8aq9evChOHl/lvMoubvWX/z4+BwTlbvw7bXdg8b7h6LE1gGW+O88CRMt4XTlR6/rYxce5Xv3jlHH19fPkBu+gWy5mlcFb3Wn/umeKOEMJF5C7xCFbtA9dRXjFoYKGiTRAlPGUV1aKU9O3VwNQ74A8DQAIZxqAuAhBPIMFYpQVAVB4CPSZjEzv1weH5tbDQN+JQ2Abu488mnzIbAAA3o/VK2PwDJo7r5Fy7ZRuvi4PFS6+qIXdVYD8Jg6BUcuOD8BozSLlRWyicgVKkTMQWwUlFF0Ooe5FIPk57BD7G0SiywyjD8bCDyHsOkeeeR3SUxEkROmU6BfQYFJMHfhWXV8efkUrb13VPMTsrcTQSzxZ/+n0GVA6EGbSGdgG9vo15fg2nFgbO8k70SRdd+mahDT81vUxTZRlJBRMsjq89C0EXCvSf7TIBZ136YZUJEiE7LgJ2dN01BZuE0dkIhxE7KcQTK1QUj+cwAEyrPZ+IydzRoyah+mLy2isbWBweESJEnB9q+1RM9Ub9GQOWkABg8HjRr2d9Yh0hTlBlRsfn+D4vg0BvUC9rZqECUJuk7Tzr1zahCYlB6HJAREPwfbbMBzLBzsbUKVI0qBgQkc+SxgWUYaIAqOpKwKXJ6bgGlaaDV/YvHaFNrtDsKTfVSrJeqIg/bRNwjclFIALeP3saybhu8SC4VBHwnhBXXIKocYRXD9QzBi4Xgchmkd9+L+CTAAMqwy+ZzluBgAAAAASUVORK5CYII=", - "rb": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAixJREFUeNqEUktvElEU/mag5f2yJhXLwxIt0kiqsVEXujP+A925cu1Pce3WtXVtYuJCF7KtTY0NrVQIpRVKeXTkMcO9F8+9ZVooJJ5kcmbmfOe733fO1YbDIWS8+/g1dycVX7W/xyO3vdsuVKqvnE7HZ230783rlyo7bVBicSGyfjsVwozomVbIPe/c+FmsPHfoRKJd1HT7hXHBZjVbA4aA14NnD9bC2VR8gwuxPi5Sx39Cp+M0XUP0ahhP1jLhW7HFD4zze3b93ILtXYyyVKlR8/5hFbnvO9gtlrGSjOF+OpXkYviWyo8mCS4R6bqO4p86vm3v4fC4DrPfw4unj1XN6JvBaQtjChzUXK43sVU4wNFJA43Tv/B73edQwTmfIhAjCVL6UdPAj1IVFSKhCdAcAI9rnjBiAjtBYEu3GEeh1sKJ0YXR68sVIujzIhzwY8DEBHZqiLRKkicQDfvABxaiQTc4Y/C65pCOXwcjcmlvJgHtlwi4epYifiQWgmoLZwPW6HQG07LgcOgKO0UglAKOTt/E+09fwAiUWU7QAE9xUK3jbvomsispZVHMVEDSZdHo9rCZ/4VIMKAu0XGjpU7d2S8hk0pCELHEzrjKnCQOYJoD+Dxu1RyiwUm5LaMDo9NFt2cqDLvY4oQFp/QpfT/MrmI5FkWebt+NpWto0j2QmQkOjZ9hpwhqjXZzM/+7LU+cc7lRrjXh8/lVLRK5ovLWXglOsiOxdt8/AQYAzv8qbmu6vgEAAAAASUVORK5CYII=", - "rtf": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAe5JREFUeNqEU01PE0EYfnZmd5FSvgLYFuwWt9EgHyEaox68eDJevHvwJ/hTPHv1N/QgZ2NC4g3kUAQKFKGhjVKqRrvbnRlnht262FHfy+y8877PPM8z71pCCKh4/ebt+rJfXEz26Vjf2mnsN5rPKKWbVpx7+eK5Xu2kyMtNTd5d8MdhiJ9BOO7atFI9ajy1UyAqSPIRMR6ZmoNehNHMMB7fX/UWvEKFMbYKE8DfQnAhwRmmJkbx6M6S5+WmK2Evup2c9yUk2nnKA0XVcSiGXAe1k5beP1i+4RFCXqnPywB/AKVzK34RjHNYlgVKCH50w7EBBogbTa/AVM5SgBdn0gc2AMDjPsbFPz2xye9asweS6n+NTbG8BCCfUtLjff2WoVnVpAH6z6hMUtJE3EykYfpF4vUiL3QNS7FMeSAQRBHW3r1Hq91B+VoBQRji4+ExFsvz6Hz7jm7Yw5OH92AcJKW9G4SoHhzhy/lXbB98Qmm2oCXN5WawsV2TACEoJXqwTKOsb3BtR2ucmZxANpPB8JUhyPnHWDaDpfJ1eZFALzJJ4MKO5MEtv4TSXB7V/br8iQLMz+almRZWbvoo5q9qRlxwewCgeXbe3qrVO5ZkUD/9jJGRLPaOm6COi92TU1DbxYe9umRD0DrrtJO+XwIMABWp9nS+FgaoAAAAAElFTkSuQmCC", - "sass": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDNDMTBBM0JGMTE5MTFFMTg3N0NFOTIyMTQ2QzhBNkQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDNDMTBBM0NGMTE5MTFFMTg3N0NFOTIyMTQ2QzhBNkQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowM0MxMEEzOUYxMTkxMUUxODc3Q0U5MjIxNDZDOEE2RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowM0MxMEEzQUYxMTkxMUUxODc3Q0U5MjIxNDZDOEE2RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po72XUcAAAJcSURBVHjahFJdTxNBFD1bykc/ttvdtttWGgI0bYrUgDZoNYqRJ014kMRXHvwB/hQTH/wFhMREJfFBQxBjhMRIFEQSCAlQxKYGggiU3e3HbnfX2bFt1EU9k9m9mblz5p4zlzFNExYmpue/jmTSZw5PZAl1MAwDT0c7O72wvPdudeNakPNtOZ0tsM7cvzdOc5yN5LDAsTFRAJks/kC2PxFRVe39Si6f4byez62EpAEH/gNN18F53Ri/Ocxf7OtdLMpKT42s/ZPg1cISJp/P0tg0TBzLCoK8D7eHh4RkLLJ4cCz12AjMXwgez8yhqtVo3NbqRKlcxcSL16gZwJ2Ry8KVc8kZO0HdTKlURn+8G6PD2SZhLMQj96WAiMAh2RXFYKI78lcJcx9WYBCycICnpNbojUWpD5Y0C4Zh2D0w6hWc70uQZC+IWfQZrXF0IsHvY+meBd08haAhoVMMQFJKWF7PNZM+klhRyogGhbqxOIXAMOtEwGAqDqVcgbVkkE+5UsEAWavf0az2t0ZqvK2qabh6IU3joizDwTgwej1LdVfJXkdbK8mt2QkayO99A0/0trQ46I1lVcX+UREhnsP34yLp1AD1xibBMuntpzU8mJyi3Tc1O4+l9U06n7x8Q/8PHz1DrrALt8tlr0CrkbJMHTop9Sk5sLa1g8L+ARJdnShKClY3tunN69t5iGLYTlCtakjFY7gxNABdN3B37BaqqoYT8pyX0in4ORbRkIA46YlDRbUTbBZ2Jb/Pw4qiKFnapcpPo9pdbrg8DjAOBsFgELJmsGs7eWkkc5bu/xBgAHkWC6UPADTOAAAAAElFTkSuQmCC", - "scss": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RkM4QjYyNDVGMTE4MTFFMTlBREZCNDNEM0ExMTk0MUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RkM4QjYyNDZGMTE4MTFFMTlBREZCNDNEM0ExMTk0MUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGQzhCNjI0M0YxMTgxMUUxOUFERkI0M0QzQTExOTQxQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGQzhCNjI0NEYxMTgxMUUxOUFERkI0M0QzQTExOTQxQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pkf1yeMAAAJbSURBVHjahFNdTxNBFD0tLULpB91uodVWPmorUIxo0VSiNSExMYYHE33l0Ud/in+C+OSjYgjRGDBRCKJIUkIEWi0WKlja0ul22+5219lJ26gLeiezuXvn7rnnnrlrUFUVms3Mvd2bjIyezRVLBA0zGAzo6jhjm1te+7EU37rFO+w7JlMbtG+ePJ5mOaZmci/nsPl6ONBtw18WDQc9tZq0sp7YjTisXV/NFKRpRvzHpHodDqsF03djzuvDg6vHJWFAprF/Arxe/oins6+YryoqCiUBvNOO+7FrXMjnWc0WyIAOQP0N4Nn8IqqSzPx2swllsYqZl28gK8DDyRvcxKXQvB6gISYpiwgH+jEVi7YAfW4nEqk0PJwDofNejAX7Pae2sPhhHQoF63U5Gai2Bn1epoPWmmaKoug1UBoMrgwHabIVVCx2jdrKFwm67TZ2plldPQGg2cK5HheIUMbaZqKV9In6giDCy3MNYXECgKI2gICxoQAEsQItpNCHWKngMo01arTY/jFIzbutShJuXh1Fm9FImYiM7tTtKOtbO+toN9Nc+fQ5SGUOIVYl7HzPIH2YRZ0y2KZ+sVzBHn2v1mpMGx0DTaR3nzfwfGEJdybGkdo/wEigDyvxLzg4yiESvojZhfd49OAeLJ2degaSLIPOO6vwgiYaaRErTRREEdn8MeJbSVZ5M7nLdNExqFLaQwEfFfACQn1+HBWKSKb3MT4Sgstuh9vVDa+bQ4DORE6o6RlspzMk9TOPfr+fiLJCLFYr3TZSKNcI7+aJwWQmPM+TkqRg49tu65f/JcAAMwMas6WUKd8AAAAASUVORK5CYII=", - "sql": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAh5JREFUeNp8kctrE1EUxr+ZyXMkoa1NBROaSkpTBE23PhZ25cql2y5duvAPUdGFS1FxIRRBXZlFQ9GVdDENIhGJxkDsw2mneZnM83ruNZlOmNoDhzlzz3d/9zv3Sowx8Ch/qlYK2XM3cEJsbH0+qjV/rd6/u6aN18b7RMFT+9aosP/Ex+0ae/puw7j36PlKEMAzctKJ3aGFamMHjV0d+wcGitkMrpWWp6hVIciEk2MAOwbUWjosx0UiFoWqJpGMx5DNzODq5aIPoa82AWBg/lyKLMH1PMp/a9XvLXLzG1cuFlBaWpiKxaIPSLY6CaC93ggQjyiQZRkeQSzLRovGaPciWLt5faSWEBoh6KBvOhiaNga0+Y9pwaFxvu7rfp8F5pWDt+qNMp2IijHGwddWCvN+33/CoAOP5nVdT9SdoQ1JkggiQ6Yvr7V60+9z7akA2gfH9cRF8hO5F5Ve4lQAF9uuK+qFsylkzsQxrcaQm04hdWkR83Mzfp9rQ3fAFzu9Ph6+WMfjl6/pGBdb2jbKmx8QlRjWy5vkyhUZBPgOeGNHN9AbDLGUz6He2hVj3Ll9C8/evsdgaMK0HV8bcmDTU0UUBYXcedR+NLGnH0I3jvDk1Rsy46FP4C/1BtrdntCGHNiOAzWZgEKQ5Qt5lIqLojbaXSQTcRy2OwT4SZqk0IYAOgkVWUE+lxX/zb0DpFNpkTzmZmfFtzewhHYcfwUYAMZmVaZQlLFHAAAAAElFTkSuQmCC", - "tga": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnxJREFUeNp0U89PE0EU/ra725K22ILRGipb22pMG6JcSEQTbUIwnozxpBcvepeEP0KPogcT/wlNT17kIKbEmChFUYKGVtL0R2gLtNCl3Z1Z3+zSAlonmezOe/O+973vvZEsy4JYnqdPMu6RkSQYQ29JEkB+PZcrslrtPhQl23VZc8/tr9I1yMHg0EA8HrBM04lVFAhoY38fSSDQVN3pfKV8G7KcxZHl6v1xblqU3eLc3p2VFZjr6+gQgwsnhzGTuq6Nhs6kYZqXjwL0GFhEl3U60OfnwWs1GGtrUKNRsKkpeIIBpKIRtI1J7cX7hXRhc/MOhXw5DkCZGG2zXAajzFIoBMvng1ypIKOqmP30GW3OIEcimovzlxRy5RgAFwDEAIODkCcmIMdiQLsNdWwMZdJlg8pzEUt1aBhKq3XinxKYqF9yQbqRIqsMy+0Gyy47bKgUWXSLtDENE5wdtuqQATm50F1VnPbRGeEw8HXZbiV8fsDvI9ldju9vADAyihLEbrWAZhOoVp3z6iqBUiB1A4nEfwCEsbkL/M4TgE5n5jDx+oTEzp1d8m9tC8H6MaAB0imzx0NU/WKUYE+loEyawDBo2ui6TGfT6ANAxrvx87gYCGCxXEKVJvCWFsG3eh1vN/J4OD6Od4UC8o0G3TX7TGLHwI9iEQmvF9X6Fh7F4/iYy+GcLOMSlfEgGsP0qdNOmX0BiGKpVkV1bw/1nW2b/gCpf1PTcI+Y7eg6ps+G4bG4PR99SjAVo9HE4q+fKNE0vl5awuSohjeijbRefVjAtUgEQRK7Yhi9OKn7nKWZxxlSPWl3QwgnaIrW8QMhD542vUbx/W49m7sq4v4IMABOqi3Ej7bAEAAAAABJRU5ErkJggg==", - "tgz": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnhJREFUeNpsU1trE0EYPbMzSTfdtInFtkkpiaXVWou2FRUEn/so6JugL/oH/Af+B1988if40jcFERQURNBSQdDWlLQN2lsue8neZsZvc7FoOrDszM75znfOmVmmtUYyvry++36yfOeS1qqzDtvH2P76ApPlW3Drb2sHex/uccHWAdbZX30kO2+B3siN3zhTnHuQ66+95i423jzFzOVljBdKOZNHazvVT7e5wF+SZBj9iZJ+3J11mbW2kR8T4LwFli5i4fqTUvnczTUp9RLtDhKgJx0q4dEwWAxrREKICHEsoYYXMXvlcWmquLgmY71yCkG/c0AkARgLMZpnMDMpGNzEYe0dGp6HwvmHpbHC1Wf9MnFCkHQOyYEPzSJwQ2B65Tm5NZG3Fshim6wbMNJn4bpHowMKtIqo2COgR2IcAptwjvcgo6i77igjEmVDqbY8xQJ1VwRULhiBI6+G9Zf3cbTziuzIDkmHSNqECTFgQScEcYuc2NA8TcdYwXD+GkK/TYVN+u72WrIudiAD8o6oAR2RRCmQMjis3CIy1iSpPySCXhFTXeyAgh4BR+JVw8pauLi0Cp4yCX9A90FQhnSBYtnF/k+Q+HYam9itfIZB3QvT8zj8XSW5EhNTs9ivbSLwPUzPLNPJBIMEKnaQYg6aB9+RGR5F5VsNgnNKXMI1NdJGG5WfHzFVLJ7k8c8xUngpVodlDSGbFYj8Y4yMpOG09lHf3yIFPzA3fwHZTAQVtU4JUTeFDrdgDdlI8wAz5Qy2KxswReI7QODZcOr0ZH3q2hIDBI7zq16tuk3FNPxAI4wN+pkoccYoE4YJU5EdUtM4Qst26v26PwIMAKj3P/2YUKgYAAAAAElFTkSuQmCC", - "tiff": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmRJREFUeNp0UktPE1EU/qYzHWstlrYJNcWUElyUJsaNGh9B0g1Lo0v9Ey78EbrVxBhXuHShm25YGBJRQpAYBDEWpaEPEhksdVpbyjzveO4MfZDCTWbauefc736PIziOA77OPH2yJCcSGdg2uksQAKofFou/7VrtASRpvVNynj13f6XOhjg8HAlMTIQdy/LO+v3uYUPTkAHCTb+cK+0pdyGK6+hbvu4/xiyHbncYAwfR19ZgbG/DoO9LsSgeTd9JXoxfyMG2rvQDdBlwIZauQ5ufh12twioU4E+nYU1NIRCNIDs+Bt28mXzx8VNuZ796j9q/DgAwomwqClilAmF0FE4wCInAlkjO4y+r0JgNX2os6XPYS2q/cQyAcQatFjA0BPH6NYipccAwIGUy2CVJFZInkKlyJAqx3T4/IMGmJkeWIWSz5KgI5pdhb3yDXS5DSCYh8rTID8s0wexeVD0GtMd85KkkefFxUfE47M1NokbJkByEQl6tL+ouAI+MUwbFhnYbaJKc/Sqg0x4H4eDRGDA56fUOABA9/GsCpaIHwr8FOhQ823O5RfW66tUGADhNy3RNRDjcN41HLxdQ8J6jYTsOQLfOJBK4f+s2/uoathoNGKT1MtFeVHZxdWTEZfEq/wMKl3rCJOIzTV6ADs2R5ulYDDNkYjp0DhrF+zCVgkw31+v1UxjQZkNV0SADd2o1MIuc9gmY+/kLxb0/UFoHePd9A1qzeUoKpilx9xcLWzgg+u/zeVfuQqkM9bCN1ysrWKXxdtPgvScwUAm58XZ52W16QyPtifRUzi588GbEi1ztHPsvwAC4uC9qhnsZvwAAAABJRU5ErkJggg==", - "txt": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAeJJREFUeNp8UrtOG1EQPfsyXiyzBguIJSyChZBBEFCKpKHLo6egpErNn8CHgH8gkZIiTSIXLhJAWCgkoMgRMSiRBSK29z4y9+I1d/HCrFb3MTPnnjkzlpQSynY+fP70fGF2gQuByCz6lfdd9Uurfvrrjes6762eb3tzQ69uFJwPsqOPC+MBEmxxphi4tlU5OGmsOzaBWLc+O9oIIVhScidkyGZ8vH62nHtSKlaI4cse6TjAfSaFBBcco0EWqyvzubmpyQrj/FXk75cQaSEMeMXU8xykPA/Hjd/6/LRcyjEpt2i7HAe4A2TeLZWKUOJaVLxj27j813EHGKCXaAJExu/4BOdiAED08riQD2riOrexyRoYc3CvsAbLGAAjZga7vgZG23WMCdBvoxKJc36TRBlMiaa2JByjNqqD8qkYc1pjDK7abey+/YhrWlfKswhpiCR96aEU9o5+QE3g2ovVWDm2Sc22bBQm8vrVpbkS9r+doPr1EOWZaQ0yFoxg2PcREosEAI4uvZhJpzFMP+cSXRbq+043RManez+tNWKMI6GN0g0Z04HFR+NoNC/0yx717efZOSbzY3AcR4Op2AGA5p/W31r9e0vNgSrh9OwCrpeCkqvZuqTybnpRqx/r2CjvvwADAJC/7lzAzQmwAAAAAElFTkSuQmCC", - "wav": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAApFJREFUeNpsU1tPE0EYPXtpKbX0wqUQKVQMFdIXQBNCQBs06KP+B8ODGh+Mf4b/4IsGE54kxhcMBrkp7YOQgBRvSKG73fvsrt8Otoask0xmd+b7zpxzvm8E3/cRjPkniyulW0NFy2JoDkEAguOlpXJ9p3L8MBqVl4O9YHxae8pXuRlcGO7KPLhfTDVUqwUgigJMy4Whm6lEXHjxYf3XnByRN0QB/2KaH7btMlUxoRJAcyqKhdOaht7+DJ49n+2cvTnwynXcsb+kLwJ4rgfmMDDGWqvneXCZS9ND7mov5h9ND85M9y86Dpto5rUkuJ4Py3YDJpy6QGJPayqB+Njf+43XL220t0cwOZkfrNXsBUqZugDA6CbLdAiAwaek1ZU9LmP8Rh6S78GsGxjOp9FdzKJaVZIhBgGASzK21w/wbrnCk8euX+EMAjaaZuPHdwUdHVFYluuGPGCORwwYjg5rqOwccRk+3Ux0IEvntmsNG4ZmUayL/wAwKHUNfZfTKN0ZRaw9Cof8qJ/pMAyHy5KkAMTksSEJtnMenM7EMVMawbejMzJRh67bXEYiIXEAVTW50SEAhzqwfqrBcXx4VOhYm4RsNgHbsJFOyZTsQ1MN+hcohoUlkFiMT+TQFpMwXOjGpXgE+XwGk1N5pFJtKNCequgYGupCRBbCDOp0KBJc4VoP3dyBONW8uydBgBHUThqQKCk3mEZ/LoUG+RBioJO7VarAwEAntjYPiUUW9Hh4b2R7k9j98hN37xWx8fGAt3eIAdVMLn+uUv+b2KReSCZjZJiB9bV9jIz2ofr1BKvvd7G9dRC80lae0HzOt+cWVnrSKDrMJykifwNBpCgE/UAllEXufmDu8Zlffvvm8XSQ90eAAQA0pF7c08o4PAAAAABJRU5ErkJggg==", - "xls": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmxJREFUeNpsU0trFEEQ/mamZ3Y2+0zIC2MmITEkUYgERFQErx5E8KTi1b/h79A/4SW3nCNeYggBYZVEMU/y3N3Z7M7OTD/G6lk2ruw20zRdU/XV91VVG0mSQK/3n1a/jky6d6Xs3G8WXS+Pw5N6LXjLLGuna/78oZKerGsYKtrDE16uJGL1L9gEOOcYd2dL1fNwrbL//aXN7J1efPMmkUqEFAk0A0VZNbFEaQCBscIkXj975y3NLq9xye8PBkAniHOFph+j2eC4rsdoB4LsFubGl/Hq8RtvYWpxTQi52o1jvWiGYaRZL0/auDgOkC/Z8BYL2Pqxidp1FZkhoDxpeaXA/Ujuj/4HoOxKKjiOiek7RUShRNQWaNYFQuMafrYCxiw4ozZKfqbYJ0EvRdl1DQyyTs8XCNTA6UELMwvDyLpZWIZNNlNLlQOK2LMJRJ+5AkuZ1S7CFFzJzk56GnUjQWlYkqCoBWFbonEVYcLLA4dNnB624GQsDBWIgfZJEgxkoChzSFWvn4VpQemDm2VwXQsXJwF1h6c+gxlQ5jgSiEUEt0wdIe7tMES+nEG2aCLiJMOIIWIr9e0DEELAMUrwRuchVAyTKimUwO75Jm6VF3Bv7imOaj+xd7UFKVS/BPJF1b/E4tgTrE49J60O5kceoNqowiuuYKa8ghHXA48U9MT2AQgyRvTThE30bQiaSGa4yLMJNFo+Dq/2cHt4CYlwyFf2S6BHwwrMw/avDbR5C1k7h1YQ4KH3Amf+AcZyEbZPv9CItzQD1l9EbtYOjv74v/d3O9RMPTDrsEwGIWN8q2yk7XNYRs9JrRv3V4ABADSGR6eQ0/NQAAAAAElFTkSuQmCC", - "xlsx": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNpsU8tqFEEUPVXdPY/ueWZIoiYZiSYKYhJc6EbduHOhgijo3t/wH1z6B0JAhOyMILhxo4kJGk1ASTAxwWF0Mpp5dHc9vFUzYwidaoqmq+8959xzbzGtNcx69PTS26ETmQtS9r4Hy/xv7MW7jV+th5yzVcaYPX/++It9u4NAv+CVR6tBUUTqMJsDcRzjZOZM8W9ZLKx+/XDb4e5/kH5In0lpIYWGUaC0YTZnBCAEKoVR3L36oDo7NbsglZwbqD6iQKOXFMcKUVfBkBAoQhlD5xxMDp/HrSv3q1JgYW3z0x0KXzkCYJaRZljru23aHWTzLiamAyytv0O9UYdf5PArqlppBfMUfu4oALErqZBKcUxMFRCHEp0DgW5Lo4N9NIN1dF0XXsVFOUyPJTzo+WBANDidjp8tgHGG3c0DnJ4uIRf4cOCBaW5KjY8xkZL72xpJ9QcFz5bVqHUJGHZL2YtNmKi06YCyiVFb4s/vEKMTAf1p4edOG6mMi1zR6wEpdUwX+vLDtkCzHoK7ptcM6ayLmGajvtex4PliyoIkFRjmUEASelB2rXQRSfjUCT9PlWpmW21iTGzCAyEkUixPRqXhe2V4zKczbdmybgkpJ0cGOuA6Y2MTCsKoi5HsNK7N3MN+uwYaWbxYfoLLkzdxcew6lrYWaZhm8PHHG3zffp1UwJSHz9vvkU8PodbcQYYYS5lxYkxTkGdVDQdV1Js1qPgYD6JIuIE7gsXVefIhIuM05k7dwMbeMmh87a18ufIMaVYyprrJLgje2Nr+1tzYXANnDnr3zRhHj37Vvy2wpXHtNAd5/wQYAD6WMuT2CwoVAAAAAElFTkSuQmCC", - "xml": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAilJREFUeNqMks1PE0EYxh+g3W2t1G0sEqyISynUFJsSOShNwCamiYZED3LgIkcuxoN/iCZePZiYGD2aGD+i0F5KMChxlVaakAK2ykcAt+WzdLu7zkxo3WZL4pu8mXfmeeY3885ug67roPFh5nvc62m9hjoR+5LMp7MrkYf370qVtco+VtCUFpbj+jGR+JbWn76OyQ8ePwsZATQb8R/hanZgINgj9IqeuBFCw1Kt9OMBnNWCs24XwkG/QKYUEiGjVAPQof/rq0783pShET3ULQo8xz0iS5FaANmrHQH2DoqY+DSLSz6RzecWlnD9ymU47LYjd4O5BXqDTG4FM3NpTEkpdJ5rw0AowLRMbhUfp58gTOaD/UHmNQPI6YmvKWRX1zESHUJ/oBs2nmPa+Mgw0ZIM3tZyGoJwygzQNB2jNyJIZX7iB0lpPoM70UGmPX8zCU+rG8NDVxHwdiC5mKsPUFUN/gvtLLf39sFzVqaN3YrC6TjBauqhXhNA1TQoqloV7Da+pjZq1FsXUCamF29j6LvYhf3iISamZ3Fv9DZevouhRzzPfOG+3hpA9U9UyioOlTJ7pFeTCQS6RGzIebyf+oz5pSzWtmSW1EO9phvQ00slBRt/8qR3DoWdXbiczUiTzd52D+tdLmyTB14mx1rMAKVcRpEATjrsuElee/HXGmnFRyBOGD30C/nEDjNgs7CDpsYmnHG3YPegBCvHs9oYfm8nG9dJa5X4K8AAQzQX4KSN3wcAAAAASUVORK5CYII=", - "yml": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAdxJREFUeNqMUl1rE0EUPbM7m5Y0Zptu21AwWwhYpfSDFh+kvvRd8N0Hf4I/xWdf/Q158F0QoQ+CVsFKaLSQpt/dpmvztTOzzky6cetOpWcZZvbO3MO5514SxzEU3r57/3GpWllM/tP4sL3TarROXuSo/SWJvX71Uu80Cfhlr/T4UdWFAVfdnmsTUtvdP35OUyQKVnJgXDBTcj9icAsTeLax7j/052qM81UjwW1QJXEhMF0qYnN90fdnvdogYmvJPU0/VBApD4hcDrWRcyikfB17srzgW7b9Rh1vEvxDlI4tVytaBSEEtmWh0xsUMwpwnWjqAlcxogiHd1wiQyCu87iI/+sJtf6+NXsgpd7FWCMB50KvkYMGMbLdZgLlfj+K9K4+FnFQ2x7WntIs50AbmiGwLILt+k+EvzvSNIHzdigdJ/AmXQRhiHv5POSwYmG+cqPVo0HqDxj8uTK2vn1Hfa+JmdIkvtZ/4fOPXU3WPDpFeNWVyUKryCiIGMN4zsH98gym3CIcOTwT+XHdXrdQQHAZotE8kBPpSqPNHtBOr48HUmLOcXRJT9dWNMGYJFby91pHOAvaykSaITg+bwefdhrteDRTMSwyrFCgI88E056Hy+4Ah2cXQZL3R4ABALUe7fqXWFN6AAAAAElFTkSuQmCC", - "zip": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAm9JREFUeNpsk0tv00AUhc+MY6dOmgeFJg1FoVVpUWlFC0s2IFF1jxBbhKj4BSxYdscPYcEmQmIDq0gsERIViy4TpD7VFzF1Ho5je2a4thOqNhlp5Mz4zudzzp0wpRTC8fPrk0/TC6+fDtYicLH97T1Kc2vQDcs+rH3eUAxVznn0fn1DRM8E+iOdv5ct3XmZG6yVlNj6solUbgVTt0q5FGtX6vXqC6VklTE+KAO/OODHSIQPRQpsXC+kkEz2ELA0ystv84tLzyucsbWByisAGf+QAS2CCDRRLMJMmxC+i8C4jdLCm/zM7OOKFGptcO6/BTpJ0yeQB0Y+mfKQuZZG0jQgeRbW8Xdomobs9LN8scc+UPHNy4Dwq8IljotIIQEm59/RoSyM1CKkXKZNBm7kIVgyM6wgAnSgRK9vqQfHPiMFDHqyFVsLR9Cm0o4YzoAASrSjCelQfRPb1Vc4qn0EY5L2W9GEaBLcxQgFHpGbkMIDJ69e+wjJ8VXqRgKid0r7ftQdxkRs9SqA2kgAm14SSIQh9uhuLGPMnKJs/5KquL1x0N0RCsizigoDaLqBdHoMiyvrlBsHVx1wphD4BCewoqxGKKDwAgtOy8JufYuk+5golGGaGZwc1sIGoDz3AOPZSVLaHgVwydoJDM1H4DbQODughB3YpOD44HfoHgnu4e7So0uAi0stHLJ3Aud8B9bpHu6vPoSu9TtDl6tUuoFiIYOgu0+158MKmOxomtyD3Qi/3MTR7i8K0EDG1GHO5DE3X4DvNahZlJOwEkOATvdPc2//hx3mXJ5lFJaF8K8bStd0YGfnOJbMGex21x6c+yfAAOlIPDJzr7cLAAAAAElFTkSuQmCC" -} diff --git a/node_modules/http-server/lib/core/show-dir/index.js b/node_modules/http-server/lib/core/show-dir/index.js deleted file mode 100644 index 9a6891c..0000000 --- a/node_modules/http-server/lib/core/show-dir/index.js +++ /dev/null @@ -1,173 +0,0 @@ -'use strict'; - -const styles = require('./styles'); -const lastModifiedToString = require('./last-modified-to-string'); -const permsToString = require('./perms-to-string'); -const sizeToString = require('./size-to-string'); -const sortFiles = require('./sort-files'); -const fs = require('fs'); -const path = require('path'); -const he = require('he'); -const etag = require('../etag'); -const url = require('url'); -const status = require('../status-handlers'); - -const supportedIcons = styles.icons; -const css = styles.css; - -module.exports = (opts) => { - // opts are parsed by opts.js, defaults already applied - const cache = opts.cache; - const root = path.resolve(opts.root); - const baseDir = opts.baseDir; - const humanReadable = opts.humanReadable; - const hidePermissions = opts.hidePermissions; - const handleError = opts.handleError; - const showDotfiles = opts.showDotfiles; - const si = opts.si; - const weakEtags = opts.weakEtags; - - return function middleware(req, res, next) { - // Figure out the path for the file from the given url - const parsed = url.parse(req.url); - const pathname = decodeURIComponent(parsed.pathname); - const dir = path.normalize( - path.join( - root, - path.relative( - path.join('/', baseDir), - pathname - ) - ) - ); - - fs.stat(dir, (statErr, stat) => { - if (statErr) { - if (handleError) { - status[500](res, next, { error: statErr }); - } else { - next(); - } - return; - } - - // files are the listing of dir - fs.readdir(dir, (readErr, _files) => { - let files = _files; - - if (readErr) { - if (handleError) { - status[500](res, next, { error: readErr }); - } else { - next(); - } - return; - } - - // Optionally exclude dotfiles from directory listing. - if (!showDotfiles) { - files = files.filter(filename => filename.slice(0, 1) !== '.'); - } - - res.setHeader('content-type', 'text/html'); - res.setHeader('etag', etag(stat, weakEtags)); - res.setHeader('last-modified', (new Date(stat.mtime)).toUTCString()); - res.setHeader('cache-control', cache); - - function render(dirs, renderFiles, lolwuts) { - // each entry in the array is a [name, stat] tuple - - let html = `${[ - '<!doctype html>', - '<html>', - ' <head>', - ' <meta charset="utf-8">', - ' <meta name="viewport" content="width=device-width">', - ` <title>Index of ${he.encode(pathname)}`, - ` `, - ' ', - ' ', - `

Index of ${he.encode(pathname)}

`, - ].join('\n')}\n`; - - html += ''; - - const failed = false; - const writeRow = (file) => { - // render a row given a [name, stat] tuple - const isDir = file[1].isDirectory && file[1].isDirectory(); - let href = `./${encodeURIComponent(file[0])}`; - - // append trailing slash and query for dir entry - if (isDir) { - href += `/${he.encode((parsed.search) ? parsed.search : '')}`; - } - - const displayName = he.encode(file[0]) + ((isDir) ? '/' : ''); - const ext = file[0].split('.').pop(); - const classForNonDir = supportedIcons[ext] ? ext : '_page'; - const iconClass = `icon-${isDir ? '_blank' : classForNonDir}`; - - // TODO: use stylessheets? - html += `${'' + - '`; - if (!hidePermissions) { - html += ``; - } - html += - `` + - `` + - `` + - '\n'; - }; - - dirs.sort((a, b) => a[0].toString().localeCompare(b[0].toString())).forEach(writeRow); - renderFiles.sort((a, b) => a.toString().localeCompare(b.toString())).forEach(writeRow); - lolwuts.sort((a, b) => a[0].toString().localeCompare(b[0].toString())).forEach(writeRow); - - html += '
(${permsToString(file[1])})${lastModifiedToString(file[1])}${sizeToString(file[1], humanReadable, si)}${displayName}
\n'; - html += `
Node.js ${ - process.version - }/ http-server ` + - `server running @ ${ - he.encode(req.headers.host || '')}
\n` + - '' - ; - - if (!failed) { - res.writeHead(200, { 'Content-Type': 'text/html' }); - res.end(html); - } - } - - sortFiles(dir, files, (lolwuts, dirs, sortedFiles) => { - // It's possible to get stat errors for all sorts of reasons here. - // Unfortunately, our two choices are to either bail completely, - // or just truck along as though everything's cool. In this case, - // I decided to just tack them on as "??!?" items along with dirs - // and files. - // - // Whatever. - - // if it makes sense to, add a .. link - if (path.resolve(dir, '..').slice(0, root.length) === root) { - fs.stat(path.join(dir, '..'), (err, s) => { - if (err) { - if (handleError) { - status[500](res, next, { error: err }); - } else { - next(); - } - return; - } - dirs.unshift(['..', s]); - render(dirs, sortedFiles, lolwuts); - }); - } else { - render(dirs, sortedFiles, lolwuts); - } - }); - }); - }); - }; -}; diff --git a/node_modules/http-server/lib/core/show-dir/last-modified-to-string.js b/node_modules/http-server/lib/core/show-dir/last-modified-to-string.js deleted file mode 100644 index 917d380..0000000 --- a/node_modules/http-server/lib/core/show-dir/last-modified-to-string.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = function lastModifiedToString(stat) { - const t = new Date(stat.mtime); - return (('0' + (t.getDate())).slice(-2) + '-' + - t.toLocaleString('default', { month: 'short' }) + '-' + - t.getFullYear() + ' ' + - ('0' + t.getHours()).slice(-2) + ':' + - ('0' + t.getMinutes()).slice(-2)); -}; diff --git a/node_modules/http-server/lib/core/show-dir/perms-to-string.js b/node_modules/http-server/lib/core/show-dir/perms-to-string.js deleted file mode 100644 index 9e65821..0000000 --- a/node_modules/http-server/lib/core/show-dir/perms-to-string.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -module.exports = function permsToString(stat) { - if (!stat.isDirectory || !stat.mode) { - return '???!!!???'; - } - - const dir = stat.isDirectory() ? 'd' : '-'; - const mode = stat.mode.toString(8); - - return dir + mode.slice(-3).split('').map(n => [ - '---', - '--x', - '-w-', - '-wx', - 'r--', - 'r-x', - 'rw-', - 'rwx', - ][parseInt(n, 10)]).join(''); -}; diff --git a/node_modules/http-server/lib/core/show-dir/size-to-string.js b/node_modules/http-server/lib/core/show-dir/size-to-string.js deleted file mode 100644 index a5fbec9..0000000 --- a/node_modules/http-server/lib/core/show-dir/size-to-string.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -// given a file's stat, return the size of it in string -// humanReadable: (boolean) whether to result is human readable -// si: (boolean) whether to use si (1k = 1000), otherwise 1k = 1024 -// adopted from http://stackoverflow.com/a/14919494/665507 -module.exports = function sizeToString(stat, humanReadable, si) { - if (stat.isDirectory && stat.isDirectory()) { - return ''; - } - - let bytes = stat.size; - const threshold = si ? 1000 : 1024; - - if (!humanReadable || bytes < threshold) { - return `${bytes}B`; - } - - const units = ['k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']; - let u = -1; - do { - bytes /= threshold; - u += 1; - } while (bytes >= threshold); - - let b = bytes.toFixed(1); - if (isNaN(b)) b = '??'; - - return b + units[u]; -}; diff --git a/node_modules/http-server/lib/core/show-dir/sort-files.js b/node_modules/http-server/lib/core/show-dir/sort-files.js deleted file mode 100644 index 67be776..0000000 --- a/node_modules/http-server/lib/core/show-dir/sort-files.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const path = require('path'); - -module.exports = function sortByIsDirectory(dir, paths, cb) { - // take the listing file names in `dir` - // returns directory and file array, each entry is - // of the array a [name, stat] tuple - let pending = paths.length; - const errs = []; - const dirs = []; - const files = []; - - if (!pending) { - cb(errs, dirs, files); - return; - } - - paths.forEach((file) => { - fs.stat(path.join(dir, file), (err, s) => { - if (err) { - errs.push([file, err]); - } else if (s.isDirectory()) { - dirs.push([file, s]); - } else { - files.push([file, s]); - } - - pending -= 1; - if (pending === 0) { - cb(errs, dirs, files); - } - }); - }); -}; diff --git a/node_modules/http-server/lib/core/show-dir/styles.js b/node_modules/http-server/lib/core/show-dir/styles.js deleted file mode 100644 index 85f6259..0000000 --- a/node_modules/http-server/lib/core/show-dir/styles.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const icons = require('./icons.json'); - -const IMG_SIZE = 16; - -let css = `i.icon { display: block; height: ${IMG_SIZE}px; width: ${IMG_SIZE}px; }\n`; -css += 'table tr { white-space: nowrap; }\n'; -css += 'td.perms {}\n'; -css += 'td.file-size { text-align: right; padding-left: 1em; }\n'; -css += 'td.display-name { padding-left: 1em; }\n'; - -Object.keys(icons).forEach((key) => { - css += `i.icon-${key} {\n`; - css += ` background-image: url("data:image/png;base64,${icons[key]}");\n`; - css += '}\n\n'; -}); - -exports.icons = icons; -exports.css = css; diff --git a/node_modules/http-server/lib/core/status-handlers.js b/node_modules/http-server/lib/core/status-handlers.js deleted file mode 100644 index 265b399..0000000 --- a/node_modules/http-server/lib/core/status-handlers.js +++ /dev/null @@ -1,96 +0,0 @@ -'use strict'; - -const he = require('he'); - -// not modified -exports['304'] = (res) => { - res.statusCode = 304; - res.end(); -}; - -// access denied -exports['403'] = (res, next) => { - res.statusCode = 403; - if (typeof next === 'function') { - next(); - } else if (res.writable) { - res.setHeader('content-type', 'text/plain'); - res.end('ACCESS DENIED'); - } -}; - -// disallowed method -exports['405'] = (res, next, opts) => { - res.statusCode = 405; - if (typeof next === 'function') { - next(); - } else { - res.setHeader('allow', (opts && opts.allow) || 'GET, HEAD'); - res.end(); - } -}; - -// not found -exports['404'] = (res, next) => { - res.statusCode = 404; - if (typeof next === 'function') { - next(); - } else if (res.writable) { - res.setHeader('content-type', 'text/plain'); - res.end('File not found. :('); - } -}; - -exports['416'] = (res, next) => { - res.statusCode = 416; - if (typeof next === 'function') { - next(); - } else if (res.writable) { - res.setHeader('content-type', 'text/plain'); - res.end('Requested range not satisfiable'); - } -}; - -// flagrant error -exports['500'] = (res, next, opts) => { - res.statusCode = 500; - res.setHeader('content-type', 'text/html'); - const error = String(opts.error.stack || opts.error || 'No specified error'); - const html = `${[ - '', - '', - ' ', - ' ', - ' 500 Internal Server Error', - ' ', - ' ', - '

', - ` ${he.encode(error)}`, - '

', - ' ', - '', - ].join('\n')}\n`; - res.end(html); -}; - -// bad request -exports['400'] = (res, next, opts) => { - res.statusCode = 400; - res.setHeader('content-type', 'text/html'); - const error = opts && opts.error ? String(opts.error) : 'Malformed request.'; - const html = `${[ - '', - '', - ' ', - ' ', - ' 400 Bad Request', - ' ', - ' ', - '

', - ` ${he.encode(error)}`, - '

', - ' ', - '', - ].join('\n')}\n`; - res.end(html); -}; diff --git a/node_modules/http-server/lib/http-server.js b/node_modules/http-server/lib/http-server.js deleted file mode 100644 index dfe4c47..0000000 --- a/node_modules/http-server/lib/http-server.js +++ /dev/null @@ -1,192 +0,0 @@ -'use strict'; - -var fs = require('fs'), - union = require('union'), - httpServerCore = require('./core'), - auth = require('basic-auth'), - httpProxy = require('http-proxy'), - corser = require('corser'), - secureCompare = require('secure-compare'); - -// -// Remark: backwards compatibility for previous -// case convention of HTTP -// -exports.HttpServer = exports.HTTPServer = HttpServer; - -/** - * Returns a new instance of HttpServer with the - * specified `options`. - */ -exports.createServer = function (options) { - return new HttpServer(options); -}; - -/** - * Constructor function for the HttpServer object - * which is responsible for serving static files along - * with other HTTP-related features. - */ -function HttpServer(options) { - options = options || {}; - - if (options.root) { - this.root = options.root; - } else { - try { - // eslint-disable-next-line no-sync - fs.lstatSync('./public'); - this.root = './public'; - } catch (err) { - this.root = './'; - } - } - - this.headers = options.headers || {}; - this.headers['Accept-Ranges'] = 'bytes'; - - this.cache = ( - // eslint-disable-next-line no-nested-ternary - options.cache === undefined ? 3600 : - // -1 is a special case to turn off caching. - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#Preventing_caching - options.cache === -1 ? 'no-cache, no-store, must-revalidate' : - options.cache // in seconds. - ); - this.showDir = options.showDir !== 'false'; - this.autoIndex = options.autoIndex !== 'false'; - this.showDotfiles = options.showDotfiles; - this.gzip = options.gzip === true; - this.brotli = options.brotli === true; - if (options.ext) { - this.ext = options.ext === true - ? 'html' - : options.ext; - } - this.contentType = options.contentType || - this.ext === 'html' ? 'text/html' : 'application/octet-stream'; - - var before = options.before ? options.before.slice() : []; - - if (options.logFn) { - before.push(function (req, res) { - options.logFn(req, res); - res.emit('next'); - }); - } - - if (options.username || options.password) { - before.push(function (req, res) { - var credentials = auth(req); - - // We perform these outside the if to avoid short-circuiting and giving - // an attacker knowledge of whether the username is correct via a timing - // attack. - if (credentials) { - // if credentials is defined, name and pass are guaranteed to be string - // type - var usernameEqual = secureCompare(options.username.toString(), credentials.name); - var passwordEqual = secureCompare(options.password.toString(), credentials.pass); - if (usernameEqual && passwordEqual) { - return res.emit('next'); - } - } - - res.statusCode = 401; - res.setHeader('WWW-Authenticate', 'Basic realm=""'); - res.end('Access denied'); - }); - } - - if (options.cors) { - this.headers['Access-Control-Allow-Origin'] = '*'; - this.headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Range'; - if (options.corsHeaders) { - options.corsHeaders.split(/\s*,\s*/) - .forEach(function (h) { this.headers['Access-Control-Allow-Headers'] += ', ' + h; }, this); - } - before.push(corser.create(options.corsHeaders ? { - requestHeaders: this.headers['Access-Control-Allow-Headers'].split(/\s*,\s*/) - } : null)); - } - - if (options.robots) { - before.push(function (req, res) { - if (req.url === '/robots.txt') { - res.setHeader('Content-Type', 'text/plain'); - var robots = options.robots === true - ? 'User-agent: *\nDisallow: /' - : options.robots.replace(/\\n/, '\n'); - - return res.end(robots); - } - - res.emit('next'); - }); - } - - before.push(httpServerCore({ - root: this.root, - cache: this.cache, - showDir: this.showDir, - showDotfiles: this.showDotfiles, - autoIndex: this.autoIndex, - defaultExt: this.ext, - gzip: this.gzip, - brotli: this.brotli, - contentType: this.contentType, - mimetypes: options.mimetypes, - handleError: typeof options.proxy !== 'string' - })); - - if (typeof options.proxy === 'string') { - var proxyOptions = options.proxyOptions || {}; - var proxy = httpProxy.createProxyServer(proxyOptions); - before.push(function (req, res) { - proxy.web(req, res, { - target: options.proxy, - changeOrigin: true - }, function (err, req, res) { - if (options.logFn) { - options.logFn(req, res, { - message: err.message, - status: res.statusCode }); - } - res.emit('next'); - }); - }); - } - - var serverOptions = { - before: before, - headers: this.headers, - onError: function (err, req, res) { - if (options.logFn) { - options.logFn(req, res, err); - } - - res.end(); - } - }; - - if (options.https) { - serverOptions.https = options.https; - } - - this.server = serverOptions.https && serverOptions.https.passphrase - // if passphrase is set, shim must be used as union does not support - ? require('./shims/https-server-shim')(serverOptions) - : union.createServer(serverOptions); - - if (options.timeout !== undefined) { - this.server.setTimeout(options.timeout); - } -} - -HttpServer.prototype.listen = function () { - this.server.listen.apply(this.server, arguments); -}; - -HttpServer.prototype.close = function () { - return this.server.close(); -}; diff --git a/node_modules/http-server/lib/shims/https-server-shim.js b/node_modules/http-server/lib/shims/https-server-shim.js deleted file mode 100644 index 30d4fc5..0000000 --- a/node_modules/http-server/lib/shims/https-server-shim.js +++ /dev/null @@ -1,67 +0,0 @@ -/* eslint-disable no-process-env */ -/* eslint-disable no-sync */ -var https = require('https'); -var fs = require('fs'); -var core = require('union/lib/core'); -var RoutingStream = require('union/lib/routing-stream'); - -module.exports = function (options) { - var isArray = Array.isArray(options.after); - var credentials; - - if (!options) { - throw new Error('options is required to create a server'); - } - - function requestHandler(req, res) { - var routingStream = new RoutingStream({ - before: options.before, - buffer: options.buffer, - after: - isArray && - options.after.map(function (After) { - return new After(); - }), - request: req, - response: res, - limit: options.limit, - headers: options.headers - }); - - routingStream.on('error', function (err) { - var fn = options.onError || core.errorHandler; - fn(err, routingStream, routingStream.target, function () { - routingStream.target.emit('next'); - }); - }); - - req.pipe(routingStream); - } - - var serverOptions; - - serverOptions = options.https; - if (!serverOptions.key || !serverOptions.cert) { - throw new Error( - 'Both options key and cert are required.' - ); - } - - credentials = { - key: fs.readFileSync(serverOptions.key), - cert: fs.readFileSync(serverOptions.cert), - passphrase: process.env.NODE_HTTP_SERVER_SSL_PASSPHRASE - }; - - if (serverOptions.ca) { - serverOptions.ca = !Array.isArray(serverOptions.ca) - ? [serverOptions.ca] - : serverOptions.ca; - - credentials.ca = serverOptions.ca.map(function (ca) { - return fs.readFileSync(ca); - }); - } - - return https.createServer(credentials, requestHandler); -}; diff --git a/node_modules/http-server/package.json b/node_modules/http-server/package.json deleted file mode 100644 index 7316ac9..0000000 --- a/node_modules/http-server/package.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "name": "http-server", - "version": "14.1.1", - "description": "A simple zero-configuration command-line http server", - "main": "./lib/http-server", - "repository": { - "type": "git", - "url": "git://github.com/http-party/http-server.git" - }, - "keywords": [ - "cli", - "command", - "static", - "http", - "https", - "http-server", - "https-server", - "server" - ], - "scripts": { - "start": "node ./bin/http-server", - "test": "tap --reporter=spec test/*.test.js", - "test-watch": "tap --reporter=spec --watch test/*.test.js" - }, - "files": [ - "lib", - "bin", - "doc" - ], - "man": "./doc/http-server.1", - "engines": { - "node": ">=12" - }, - "contributors": [ - { - "name": "Charlie Robbins", - "email": "charlie.robbins@gmail.com" - }, - { - "name": "Marak Squires", - "email": "marak.squires@gmail.com" - }, - { - "name": "Charlie McConnell", - "email": "charlie@charlieistheman.com" - }, - { - "name": "Joshua Holbrook", - "email": "josh.holbrook@gmail.com" - }, - { - "name": "Maciej Małecki", - "email": "maciej.malecki@notimplemented.org" - }, - { - "name": "Matthew Bergman", - "email": "mzbphoto@gmail.com" - }, - { - "name": "brad dunbar", - "email": "dunbarb2@gmail.com" - }, - { - "name": "Dominic Tarr" - }, - { - "name": "Travis Person", - "email": "travis.person@gmail.com" - }, - { - "name": "Jinkwon Lee", - "email": "master@bdyne.net" - }, - { - "name": "BigBlueHat", - "email": "byoung@bigbluehat.com" - }, - { - "name": "Daniel Dalton", - "email": "daltond2@hawkmail.newpaltz.edu" - }, - { - "name": "Jade Michael Thornton", - "email": "jademichael@jmthornton.net" - } - ], - "dependencies": { - "basic-auth": "^2.0.1", - "chalk": "^4.1.2", - "corser": "^2.0.1", - "he": "^1.2.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy": "^1.18.1", - "mime": "^1.6.0", - "minimist": "^1.2.6", - "opener": "^1.5.1", - "portfinder": "^1.0.28", - "secure-compare": "3.0.1", - "union": "~0.5.0", - "url-join": "^4.0.1" - }, - "devDependencies": { - "eol": "^0.9.1", - "eslint": "^4.19.1", - "eslint-config-populist": "^4.2.0", - "express": "^4.17.1", - "request": "^2.88.2", - "tap": "^14.11.0" - }, - "bugs": { - "url": "https://github.com/http-party/http-server/issues" - }, - "license": "MIT", - "preferGlobal": true, - "bin": { - "http-server": "./bin/http-server" - } -} diff --git a/node_modules/iconv-lite/.github/dependabot.yml b/node_modules/iconv-lite/.github/dependabot.yml deleted file mode 100644 index e4a0e0a..0000000 --- a/node_modules/iconv-lite/.github/dependabot.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "daily" - allow: - - dependency-type: production diff --git a/node_modules/iconv-lite/.idea/codeStyles/Project.xml b/node_modules/iconv-lite/.idea/codeStyles/Project.xml deleted file mode 100644 index 3f2688c..0000000 --- a/node_modules/iconv-lite/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/iconv-lite/.idea/codeStyles/codeStyleConfig.xml b/node_modules/iconv-lite/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 79ee123..0000000 --- a/node_modules/iconv-lite/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/node_modules/iconv-lite/.idea/iconv-lite.iml b/node_modules/iconv-lite/.idea/iconv-lite.iml deleted file mode 100644 index 0c8867d..0000000 --- a/node_modules/iconv-lite/.idea/iconv-lite.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/iconv-lite/.idea/inspectionProfiles/Project_Default.xml b/node_modules/iconv-lite/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 03d9549..0000000 --- a/node_modules/iconv-lite/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/node_modules/iconv-lite/.idea/modules.xml b/node_modules/iconv-lite/.idea/modules.xml deleted file mode 100644 index 5d24f2e..0000000 --- a/node_modules/iconv-lite/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/node_modules/iconv-lite/.idea/vcs.xml b/node_modules/iconv-lite/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/node_modules/iconv-lite/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/node_modules/iconv-lite/Changelog.md b/node_modules/iconv-lite/Changelog.md deleted file mode 100644 index 464549b..0000000 --- a/node_modules/iconv-lite/Changelog.md +++ /dev/null @@ -1,212 +0,0 @@ -## 0.6.3 / 2021-05-23 - * Fix HKSCS encoding to prefer Big5 codes if both Big5 and HKSCS codes are possible (#264) - - -## 0.6.2 / 2020-07-08 - * Support Uint8Array-s decoding without conversion to Buffers, plus fix an edge case. - - -## 0.6.1 / 2020-06-28 - * Support Uint8Array-s directly when decoding (#246, by @gyzerok) - * Unify package.json version ranges to be strictly semver-compatible (#241) - * Fix minor issue in UTF-32 decoder's endianness detection code. - - -## 0.6.0 / 2020-06-08 - * Updated 'gb18030' encoding to :2005 edition (see https://github.com/whatwg/encoding/issues/22). - * Removed `iconv.extendNodeEncodings()` mechanism. It was deprecated 5 years ago and didn't work - in recent Node versions. - * Reworked Streaming API behavior in browser environments to fix #204. Streaming API will be - excluded by default in browser packs, saving ~100Kb bundle size, unless enabled explicitly using - `iconv.enableStreamingAPI(require('stream'))`. - * Updates to development environment & tests: - * Added ./test/webpack private package to test complex new use cases that need custom environment. - It's tested as a separate job in Travis CI. - * Updated generation code for the new EUC-KR index file format from Encoding Standard. - * Removed Buffer() constructor in tests (#197 by @gabrielschulhof). - - -## 0.5.2 / 2020-06-08 - * Added `iconv.getEncoder()` and `iconv.getDecoder()` methods to typescript definitions (#229). - * Fixed semver version to 6.1.2 to support Node 8.x (by @tanandara). - * Capped iconv version to 2.x as 3.x has dropped support for older Node versions. - * Switched from instanbul to c8 for code coverage. - - -## 0.5.1 / 2020-01-18 - - * Added cp720 encoding (#221, by @kr-deps) - * (minor) Changed Changelog.md formatting to use h2. - - -## 0.5.0 / 2019-06-26 - - * Added UTF-32 encoding, both little-endian and big-endian variants (UTF-32LE, UTF32-BE). If endianness - is not provided for decoding, it's deduced automatically from the stream using a heuristic similar to - what we use in UTF-16. (great work in #216 by @kshetline) - * Several minor updates to README (#217 by @oldj, plus some more) - * Added Node versions 10 and 12 to Travis test harness. - - -## 0.4.24 / 2018-08-22 - - * Added MIK encoding (#196, by @Ivan-Kalatchev) - - -## 0.4.23 / 2018-05-07 - - * Fix deprecation warning in Node v10 due to the last usage of `new Buffer` (#185, by @felixbuenemann) - * Switched from NodeBuffer to Buffer in typings (#155 by @felixfbecker, #186 by @larssn) - - -## 0.4.22 / 2018-05-05 - - * Use older semver style for dependencies to be compatible with Node version 0.10 (#182, by @dougwilson) - * Fix tests to accomodate fixes in Node v10 (#182, by @dougwilson) - - -## 0.4.21 / 2018-04-06 - - * Fix encoding canonicalization (#156) - * Fix the paths in the "browser" field in package.json (#174 by @LMLB) - * Removed "contributors" section in package.json - see Git history instead. - - -## 0.4.20 / 2018-04-06 - - * Updated `new Buffer()` usages with recommended replacements as it's being deprecated in Node v10 (#176, #178 by @ChALkeR) - - -## 0.4.19 / 2017-09-09 - - * Fixed iso8859-1 codec regression in handling untranslatable characters (#162, caused by #147) - * Re-generated windows1255 codec, because it was updated in iconv project - * Fixed grammar in error message when iconv-lite is loaded with encoding other than utf8 - - -## 0.4.18 / 2017-06-13 - - * Fixed CESU-8 regression in Node v8. - - -## 0.4.17 / 2017-04-22 - - * Updated typescript definition file to support Angular 2 AoT mode (#153 by @larssn) - - -## 0.4.16 / 2017-04-22 - - * Added support for React Native (#150) - * Changed iso8859-1 encoding to usine internal 'binary' encoding, as it's the same thing (#147 by @mscdex) - * Fixed typo in Readme (#138 by @jiangzhuo) - * Fixed build for Node v6.10+ by making correct version comparison - * Added a warning if iconv-lite is loaded not as utf-8 (see #142) - - -## 0.4.15 / 2016-11-21 - - * Fixed typescript type definition (#137) - - -## 0.4.14 / 2016-11-20 - - * Preparation for v1.0 - * Added Node v6 and latest Node versions to Travis CI test rig - * Deprecated Node v0.8 support - * Typescript typings (@larssn) - * Fix encoding of Euro character in GB 18030 (inspired by @lygstate) - * Add ms prefix to dbcs windows encodings (@rokoroku) - - -## 0.4.13 / 2015-10-01 - - * Fix silly mistake in deprecation notice. - - -## 0.4.12 / 2015-09-26 - - * Node v4 support: - * Added CESU-8 decoding (#106) - * Added deprecation notice for `extendNodeEncodings` - * Added Travis tests for Node v4 and io.js latest (#105 by @Mithgol) - - -## 0.4.11 / 2015-07-03 - - * Added CESU-8 encoding. - - -## 0.4.10 / 2015-05-26 - - * Changed UTF-16 endianness heuristic to take into account any ASCII chars, not - just spaces. This should minimize the importance of "default" endianness. - - -## 0.4.9 / 2015-05-24 - - * Streamlined BOM handling: strip BOM by default, add BOM when encoding if - addBOM: true. Added docs to Readme. - * UTF16 now uses UTF16-LE by default. - * Fixed minor issue with big5 encoding. - * Added io.js testing on Travis; updated node-iconv version to test against. - Now we just skip testing SBCS encodings that node-iconv doesn't support. - * (internal refactoring) Updated codec interface to use classes. - * Use strict mode in all files. - - -## 0.4.8 / 2015-04-14 - - * added alias UNICODE-1-1-UTF-7 for UTF-7 encoding (#94) - - -## 0.4.7 / 2015-02-05 - - * stop official support of Node.js v0.8. Should still work, but no guarantees. - reason: Packages needed for testing are hard to get on Travis CI. - * work in environment where Object.prototype is monkey patched with enumerable - props (#89). - - -## 0.4.6 / 2015-01-12 - - * fix rare aliases of single-byte encodings (thanks @mscdex) - * double the timeout for dbcs tests to make them less flaky on travis - - -## 0.4.5 / 2014-11-20 - - * fix windows-31j and x-sjis encoding support (@nleush) - * minor fix: undefined variable reference when internal error happens - - -## 0.4.4 / 2014-07-16 - - * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3) - * fixed streaming base64 encoding - - -## 0.4.3 / 2014-06-14 - - * added encodings UTF-16BE and UTF-16 with BOM - - -## 0.4.2 / 2014-06-12 - - * don't throw exception if `extendNodeEncodings()` is called more than once - - -## 0.4.1 / 2014-06-11 - - * codepage 808 added - - -## 0.4.0 / 2014-06-10 - - * code is rewritten from scratch - * all widespread encodings are supported - * streaming interface added - * browserify compatibility added - * (optional) extend core primitive encodings to make usage even simpler - * moved from vows to mocha as the testing framework - - diff --git a/node_modules/iconv-lite/LICENSE b/node_modules/iconv-lite/LICENSE deleted file mode 100644 index d518d83..0000000 --- a/node_modules/iconv-lite/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011 Alexander Shtuchkin - -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/node_modules/iconv-lite/README.md b/node_modules/iconv-lite/README.md deleted file mode 100644 index 3c97f87..0000000 --- a/node_modules/iconv-lite/README.md +++ /dev/null @@ -1,130 +0,0 @@ -## iconv-lite: Pure JS character encoding conversion - - * No need for native code compilation. Quick to install, works on Windows and in sandboxed environments like [Cloud9](http://c9.io). - * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser), - [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others. - * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison). - * Intuitive encode/decode API, including Streaming support. - * In-browser usage via [browserify](https://github.com/substack/node-browserify) or [webpack](https://webpack.js.org/) (~180kb gzip compressed with Buffer shim included). - * Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included. - * React Native is supported (need to install `stream` module to enable Streaming API). - * License: MIT. - -[![NPM Stats](https://nodei.co/npm/iconv-lite.png)](https://npmjs.org/package/iconv-lite/) -[![Build Status](https://travis-ci.org/ashtuchkin/iconv-lite.svg?branch=master)](https://travis-ci.org/ashtuchkin/iconv-lite) -[![npm](https://img.shields.io/npm/v/iconv-lite.svg)](https://npmjs.org/package/iconv-lite/) -[![npm downloads](https://img.shields.io/npm/dm/iconv-lite.svg)](https://npmjs.org/package/iconv-lite/) -[![npm bundle size](https://img.shields.io/bundlephobia/min/iconv-lite.svg)](https://npmjs.org/package/iconv-lite/) - -## Usage -### Basic API -```javascript -var iconv = require('iconv-lite'); - -// Convert from an encoded buffer to a js string. -str = iconv.decode(Buffer.from([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251'); - -// Convert from a js string to an encoded buffer. -buf = iconv.encode("Sample input string", 'win1251'); - -// Check if encoding is supported -iconv.encodingExists("us-ascii") -``` - -### Streaming API -```javascript - -// Decode stream (from binary data stream to js strings) -http.createServer(function(req, res) { - var converterStream = iconv.decodeStream('win1251'); - req.pipe(converterStream); - - converterStream.on('data', function(str) { - console.log(str); // Do something with decoded strings, chunk-by-chunk. - }); -}); - -// Convert encoding streaming example -fs.createReadStream('file-in-win1251.txt') - .pipe(iconv.decodeStream('win1251')) - .pipe(iconv.encodeStream('ucs2')) - .pipe(fs.createWriteStream('file-in-ucs2.txt')); - -// Sugar: all encode/decode streams have .collect(cb) method to accumulate data. -http.createServer(function(req, res) { - req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) { - assert(typeof body == 'string'); - console.log(body); // full request body string - }); -}); -``` - -## Supported encodings - - * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex. - * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap, utf32, utf32-le, and utf32-be. - * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family, - IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library. - Aliases like 'latin1', 'us-ascii' also supported. - * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2312, GBK, GB18030, Big5, Shift_JIS, EUC-JP. - -See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings). - -Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors! - -Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors! - - -## Encoding/decoding speed - -Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0). -Note: your results may vary, so please always check on your hardware. - - operation iconv@2.1.4 iconv-lite@0.4.7 - ---------------------------------------------------------- - encode('win1251') ~96 Mb/s ~320 Mb/s - decode('win1251') ~95 Mb/s ~246 Mb/s - -## BOM handling - - * Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options - (f.ex. `iconv.decode(buf, enc, {stripBOM: false})`). - A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found. - * If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module. - * Encoding: No BOM added, unless overridden by `addBOM: true` option. - -## UTF-16 Encodings - -This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be -smart about endianness in the following ways: - * Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be - overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`. - * Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override. - -## UTF-32 Encodings - -This library supports UTF-32LE, UTF-32BE and UTF-32 encodings. Like the UTF-16 encoding above, UTF-32 defaults to UTF-32LE, but uses BOM and 'spaces heuristics' to determine input endianness. - * The default of UTF-32LE can be overridden with the `defaultEncoding: 'utf-32be'` option. Strips BOM unless `stripBOM: false`. - * Encoding: uses UTF-32LE and writes BOM by default. Use `addBOM: false` to override. (`defaultEncoding: 'utf-32be'` can also be used here to change encoding.) - -## Other notes - -When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding). -Untranslatable characters are set to � or ?. No transliteration is currently supported. -Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77). - -## Testing - -```bash -$ git clone git@github.com:ashtuchkin/iconv-lite.git -$ cd iconv-lite -$ npm install -$ npm test - -$ # To view performance: -$ node test/performance.js - -$ # To view test coverage: -$ npm run coverage -$ open coverage/lcov-report/index.html -``` diff --git a/node_modules/iconv-lite/encodings/dbcs-codec.js b/node_modules/iconv-lite/encodings/dbcs-codec.js deleted file mode 100644 index fa83917..0000000 --- a/node_modules/iconv-lite/encodings/dbcs-codec.js +++ /dev/null @@ -1,597 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. -// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. -// To save memory and loading time, we read table files only when requested. - -exports._dbcs = DBCSCodec; - -var UNASSIGNED = -1, - GB18030_CODE = -2, - SEQ_START = -10, - NODE_START = -1000, - UNASSIGNED_NODE = new Array(0x100), - DEF_CHAR = -1; - -for (var i = 0; i < 0x100; i++) - UNASSIGNED_NODE[i] = UNASSIGNED; - - -// Class DBCSCodec reads and initializes mapping tables. -function DBCSCodec(codecOptions, iconv) { - this.encodingName = codecOptions.encodingName; - if (!codecOptions) - throw new Error("DBCS codec is called without the data.") - if (!codecOptions.table) - throw new Error("Encoding '" + this.encodingName + "' has no data."); - - // Load tables. - var mappingTable = codecOptions.table(); - - - // Decode tables: MBCS -> Unicode. - - // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. - // Trie root is decodeTables[0]. - // Values: >= 0 -> unicode character code. can be > 0xFFFF - // == UNASSIGNED -> unknown/unassigned sequence. - // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. - // <= NODE_START -> index of the next node in our trie to process next byte. - // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. - this.decodeTables = []; - this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. - - // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. - this.decodeTableSeq = []; - - // Actual mapping tables consist of chunks. Use them to fill up decode tables. - for (var i = 0; i < mappingTable.length; i++) - this._addDecodeChunk(mappingTable[i]); - - // Load & create GB18030 tables when needed. - if (typeof codecOptions.gb18030 === 'function') { - this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. - - // Add GB18030 common decode nodes. - var commonThirdByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); - - var commonFourthByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); - - // Fill out the tree - var firstByteNode = this.decodeTables[0]; - for (var i = 0x81; i <= 0xFE; i++) { - var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]]; - for (var j = 0x30; j <= 0x39; j++) { - if (secondByteNode[j] === UNASSIGNED) { - secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; - } else if (secondByteNode[j] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 2"); - } - - var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]]; - for (var k = 0x81; k <= 0xFE; k++) { - if (thirdByteNode[k] === UNASSIGNED) { - thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; - } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { - continue; - } else if (thirdByteNode[k] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 3"); - } - - var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]]; - for (var l = 0x30; l <= 0x39; l++) { - if (fourthByteNode[l] === UNASSIGNED) - fourthByteNode[l] = GB18030_CODE; - } - } - } - } - } - - this.defaultCharUnicode = iconv.defaultCharUnicode; - - - // Encode tables: Unicode -> DBCS. - - // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. - // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. - // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). - // == UNASSIGNED -> no conversion found. Output a default char. - // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. - this.encodeTable = []; - - // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of - // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key - // means end of sequence (needed when one sequence is a strict subsequence of another). - // Objects are kept separately from encodeTable to increase performance. - this.encodeTableSeq = []; - - // Some chars can be decoded, but need not be encoded. - var skipEncodeChars = {}; - if (codecOptions.encodeSkipVals) - for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { - var val = codecOptions.encodeSkipVals[i]; - if (typeof val === 'number') - skipEncodeChars[val] = true; - else - for (var j = val.from; j <= val.to; j++) - skipEncodeChars[j] = true; - } - - // Use decode trie to recursively fill out encode tables. - this._fillEncodeTable(0, 0, skipEncodeChars); - - // Add more encoding pairs when needed. - if (codecOptions.encodeAdd) { - for (var uChar in codecOptions.encodeAdd) - if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) - this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); - } - - this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; - if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; - if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); -} - -DBCSCodec.prototype.encoder = DBCSEncoder; -DBCSCodec.prototype.decoder = DBCSDecoder; - -// Decoder helpers -DBCSCodec.prototype._getDecodeTrieNode = function(addr) { - var bytes = []; - for (; addr > 0; addr >>>= 8) - bytes.push(addr & 0xFF); - if (bytes.length == 0) - bytes.push(0); - - var node = this.decodeTables[0]; - for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. - var val = node[bytes[i]]; - - if (val == UNASSIGNED) { // Create new node. - node[bytes[i]] = NODE_START - this.decodeTables.length; - this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); - } - else if (val <= NODE_START) { // Existing node. - node = this.decodeTables[NODE_START - val]; - } - else - throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); - } - return node; -} - - -DBCSCodec.prototype._addDecodeChunk = function(chunk) { - // First element of chunk is the hex mbcs code where we start. - var curAddr = parseInt(chunk[0], 16); - - // Choose the decoding node where we'll write our chars. - var writeTable = this._getDecodeTrieNode(curAddr); - curAddr = curAddr & 0xFF; - - // Write all other elements of the chunk to the table. - for (var k = 1; k < chunk.length; k++) { - var part = chunk[k]; - if (typeof part === "string") { // String, write as-is. - for (var l = 0; l < part.length;) { - var code = part.charCodeAt(l++); - if (0xD800 <= code && code < 0xDC00) { // Decode surrogate - var codeTrail = part.charCodeAt(l++); - if (0xDC00 <= codeTrail && codeTrail < 0xE000) - writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); - else - throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); - } - else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) - var len = 0xFFF - code + 2; - var seq = []; - for (var m = 0; m < len; m++) - seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. - - writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; - this.decodeTableSeq.push(seq); - } - else - writeTable[curAddr++] = code; // Basic char - } - } - else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. - var charCode = writeTable[curAddr - 1] + 1; - for (var l = 0; l < part; l++) - writeTable[curAddr++] = charCode++; - } - else - throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); - } - if (curAddr > 0xFF) - throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); -} - -// Encoder helpers -DBCSCodec.prototype._getEncodeBucket = function(uCode) { - var high = uCode >> 8; // This could be > 0xFF because of astral characters. - if (this.encodeTable[high] === undefined) - this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. - return this.encodeTable[high]; -} - -DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - if (bucket[low] <= SEQ_START) - this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. - else if (bucket[low] == UNASSIGNED) - bucket[low] = dbcsCode; -} - -DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { - - // Get the root of character tree according to first character of the sequence. - var uCode = seq[0]; - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - - var node; - if (bucket[low] <= SEQ_START) { - // There's already a sequence with - use it. - node = this.encodeTableSeq[SEQ_START-bucket[low]]; - } - else { - // There was no sequence object - allocate a new one. - node = {}; - if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. - bucket[low] = SEQ_START - this.encodeTableSeq.length; - this.encodeTableSeq.push(node); - } - - // Traverse the character tree, allocating new nodes as needed. - for (var j = 1; j < seq.length-1; j++) { - var oldVal = node[uCode]; - if (typeof oldVal === 'object') - node = oldVal; - else { - node = node[uCode] = {} - if (oldVal !== undefined) - node[DEF_CHAR] = oldVal - } - } - - // Set the leaf to given dbcsCode. - uCode = seq[seq.length-1]; - node[uCode] = dbcsCode; -} - -DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { - var node = this.decodeTables[nodeIdx]; - var hasValues = false; - var subNodeEmpty = {}; - for (var i = 0; i < 0x100; i++) { - var uCode = node[i]; - var mbCode = prefix + i; - if (skipEncodeChars[mbCode]) - continue; - - if (uCode >= 0) { - this._setEncodeChar(uCode, mbCode); - hasValues = true; - } else if (uCode <= NODE_START) { - var subNodeIdx = NODE_START - uCode; - if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030). - var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive. - if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) - hasValues = true; - else - subNodeEmpty[subNodeIdx] = true; - } - } else if (uCode <= SEQ_START) { - this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); - hasValues = true; - } - } - return hasValues; -} - - - -// == Encoder ================================================================== - -function DBCSEncoder(options, codec) { - // Encoder state - this.leadSurrogate = -1; - this.seqObj = undefined; - - // Static data - this.encodeTable = codec.encodeTable; - this.encodeTableSeq = codec.encodeTableSeq; - this.defaultCharSingleByte = codec.defCharSB; - this.gb18030 = codec.gb18030; -} - -DBCSEncoder.prototype.write = function(str) { - var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), - leadSurrogate = this.leadSurrogate, - seqObj = this.seqObj, nextChar = -1, - i = 0, j = 0; - - while (true) { - // 0. Get next character. - if (nextChar === -1) { - if (i == str.length) break; - var uCode = str.charCodeAt(i++); - } - else { - var uCode = nextChar; - nextChar = -1; - } - - // 1. Handle surrogates. - if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. - if (uCode < 0xDC00) { // We've got lead surrogate. - if (leadSurrogate === -1) { - leadSurrogate = uCode; - continue; - } else { - leadSurrogate = uCode; - // Double lead surrogate found. - uCode = UNASSIGNED; - } - } else { // We've got trail surrogate. - if (leadSurrogate !== -1) { - uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); - leadSurrogate = -1; - } else { - // Incomplete surrogate pair - only trail surrogate found. - uCode = UNASSIGNED; - } - - } - } - else if (leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. - leadSurrogate = -1; - } - - // 2. Convert uCode character. - var dbcsCode = UNASSIGNED; - if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence - var resCode = seqObj[uCode]; - if (typeof resCode === 'object') { // Sequence continues. - seqObj = resCode; - continue; - - } else if (typeof resCode == 'number') { // Sequence finished. Write it. - dbcsCode = resCode; - - } else if (resCode == undefined) { // Current character is not part of the sequence. - - // Try default character for this sequence - resCode = seqObj[DEF_CHAR]; - if (resCode !== undefined) { - dbcsCode = resCode; // Found. Write it. - nextChar = uCode; // Current character will be written too in the next iteration. - - } else { - // TODO: What if we have no default? (resCode == undefined) - // Then, we should write first char of the sequence as-is and try the rest recursively. - // Didn't do it for now because no encoding has this situation yet. - // Currently, just skip the sequence and write current char. - } - } - seqObj = undefined; - } - else if (uCode >= 0) { // Regular character - var subtable = this.encodeTable[uCode >> 8]; - if (subtable !== undefined) - dbcsCode = subtable[uCode & 0xFF]; - - if (dbcsCode <= SEQ_START) { // Sequence start - seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; - continue; - } - - if (dbcsCode == UNASSIGNED && this.gb18030) { - // Use GB18030 algorithm to find character(s) to write. - var idx = findIdx(this.gb18030.uChars, uCode); - if (idx != -1) { - var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; - newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; - newBuf[j++] = 0x30 + dbcsCode; - continue; - } - } - } - - // 3. Write dbcsCode character. - if (dbcsCode === UNASSIGNED) - dbcsCode = this.defaultCharSingleByte; - - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else if (dbcsCode < 0x10000) { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - else if (dbcsCode < 0x1000000) { - newBuf[j++] = dbcsCode >> 16; - newBuf[j++] = (dbcsCode >> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } else { - newBuf[j++] = dbcsCode >>> 24; - newBuf[j++] = (dbcsCode >>> 16) & 0xFF; - newBuf[j++] = (dbcsCode >>> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } - } - - this.seqObj = seqObj; - this.leadSurrogate = leadSurrogate; - return newBuf.slice(0, j); -} - -DBCSEncoder.prototype.end = function() { - if (this.leadSurrogate === -1 && this.seqObj === undefined) - return; // All clean. Most often case. - - var newBuf = Buffer.alloc(10), j = 0; - - if (this.seqObj) { // We're in the sequence. - var dbcsCode = this.seqObj[DEF_CHAR]; - if (dbcsCode !== undefined) { // Write beginning of the sequence. - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - } else { - // See todo above. - } - this.seqObj = undefined; - } - - if (this.leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - newBuf[j++] = this.defaultCharSingleByte; - this.leadSurrogate = -1; - } - - return newBuf.slice(0, j); -} - -// Export for testing -DBCSEncoder.prototype.findIdx = findIdx; - - -// == Decoder ================================================================== - -function DBCSDecoder(options, codec) { - // Decoder state - this.nodeIdx = 0; - this.prevBytes = []; - - // Static data - this.decodeTables = codec.decodeTables; - this.decodeTableSeq = codec.decodeTableSeq; - this.defaultCharUnicode = codec.defaultCharUnicode; - this.gb18030 = codec.gb18030; -} - -DBCSDecoder.prototype.write = function(buf) { - var newBuf = Buffer.alloc(buf.length*2), - nodeIdx = this.nodeIdx, - prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, - seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence. - uCode; - - for (var i = 0, j = 0; i < buf.length; i++) { - var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset]; - - // Lookup in current trie node. - var uCode = this.decodeTables[nodeIdx][curByte]; - - if (uCode >= 0) { - // Normal character, just use it. - } - else if (uCode === UNASSIGNED) { // Unknown char. - // TODO: Callback with seq. - uCode = this.defaultCharUnicode.charCodeAt(0); - i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again. - } - else if (uCode === GB18030_CODE) { - if (i >= 3) { - var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30); - } else { - var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 + - (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 + - (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 + - (curByte-0x30); - } - var idx = findIdx(this.gb18030.gbChars, ptr); - uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; - } - else if (uCode <= NODE_START) { // Go to next trie node. - nodeIdx = NODE_START - uCode; - continue; - } - else if (uCode <= SEQ_START) { // Output a sequence of chars. - var seq = this.decodeTableSeq[SEQ_START - uCode]; - for (var k = 0; k < seq.length - 1; k++) { - uCode = seq[k]; - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - } - uCode = seq[seq.length-1]; - } - else - throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); - - // Write the character to buffer, handling higher planes using surrogate pair. - if (uCode >= 0x10000) { - uCode -= 0x10000; - var uCodeLead = 0xD800 | (uCode >> 10); - newBuf[j++] = uCodeLead & 0xFF; - newBuf[j++] = uCodeLead >> 8; - - uCode = 0xDC00 | (uCode & 0x3FF); - } - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - - // Reset trie node. - nodeIdx = 0; seqStart = i+1; - } - - this.nodeIdx = nodeIdx; - this.prevBytes = (seqStart >= 0) - ? Array.prototype.slice.call(buf, seqStart) - : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf)); - - return newBuf.slice(0, j).toString('ucs2'); -} - -DBCSDecoder.prototype.end = function() { - var ret = ''; - - // Try to parse all remaining chars. - while (this.prevBytes.length > 0) { - // Skip 1 character in the buffer. - ret += this.defaultCharUnicode; - var bytesArr = this.prevBytes.slice(1); - - // Parse remaining as usual. - this.prevBytes = []; - this.nodeIdx = 0; - if (bytesArr.length > 0) - ret += this.write(bytesArr); - } - - this.prevBytes = []; - this.nodeIdx = 0; - return ret; -} - -// Binary search for GB18030. Returns largest i such that table[i] <= val. -function findIdx(table, val) { - if (table[0] > val) - return -1; - - var l = 0, r = table.length; - while (l < r-1) { // always table[l] <= val < table[r] - var mid = l + ((r-l+1) >> 1); - if (table[mid] <= val) - l = mid; - else - r = mid; - } - return l; -} - diff --git a/node_modules/iconv-lite/encodings/dbcs-data.js b/node_modules/iconv-lite/encodings/dbcs-data.js deleted file mode 100644 index 0d17e58..0000000 --- a/node_modules/iconv-lite/encodings/dbcs-data.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; - -// Description of supported double byte encodings and aliases. -// Tables are not require()-d until they are needed to speed up library load. -// require()-s are direct to support Browserify. - -module.exports = { - - // == Japanese/ShiftJIS ==================================================== - // All japanese encodings are based on JIS X set of standards: - // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. - // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. - // Has several variations in 1978, 1983, 1990 and 1997. - // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. - // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. - // 2 planes, first is superset of 0208, second - revised 0212. - // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) - - // Byte encodings are: - // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte - // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. - // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. - // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. - // 0x00-0x7F - lower part of 0201 - // 0x8E, 0xA1-0xDF - upper part of 0201 - // (0xA1-0xFE)x2 - 0208 plane (94x94). - // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). - // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. - // Used as-is in ISO2022 family. - // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, - // 0201-1976 Roman, 0208-1978, 0208-1983. - // * ISO2022-JP-1: Adds esc seq for 0212-1990. - // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. - // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. - // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. - // - // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. - // - // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html - - 'shiftjis': { - type: '_dbcs', - table: function() { return require('./tables/shiftjis.json') }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - encodeSkipVals: [{from: 0xED40, to: 0xF940}], - }, - 'csshiftjis': 'shiftjis', - 'mskanji': 'shiftjis', - 'sjis': 'shiftjis', - 'windows31j': 'shiftjis', - 'ms31j': 'shiftjis', - 'xsjis': 'shiftjis', - 'windows932': 'shiftjis', - 'ms932': 'shiftjis', - '932': 'shiftjis', - 'cp932': 'shiftjis', - - 'eucjp': { - type: '_dbcs', - table: function() { return require('./tables/eucjp.json') }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - }, - - // TODO: KDDI extension to Shift_JIS - // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. - // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. - - - // == Chinese/GBK ========================================================== - // http://en.wikipedia.org/wiki/GBK - // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder - - // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 - 'gb2312': 'cp936', - 'gb231280': 'cp936', - 'gb23121980': 'cp936', - 'csgb2312': 'cp936', - 'csiso58gb231280': 'cp936', - 'euccn': 'cp936', - - // Microsoft's CP936 is a subset and approximation of GBK. - 'windows936': 'cp936', - 'ms936': 'cp936', - '936': 'cp936', - 'cp936': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json') }, - }, - - // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. - 'gbk': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, - }, - 'xgbk': 'gbk', - 'isoir58': 'gbk', - - // GB18030 is an algorithmic extension of GBK. - // Main source: https://www.w3.org/TR/encoding/#gbk-encoder - // http://icu-project.org/docs/papers/gb18030.html - // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml - // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 - 'gb18030': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, - gb18030: function() { return require('./tables/gb18030-ranges.json') }, - encodeSkipVals: [0x80], - encodeAdd: {'€': 0xA2E3}, - }, - - 'chinese': 'gb18030', - - - // == Korean =============================================================== - // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. - 'windows949': 'cp949', - 'ms949': 'cp949', - '949': 'cp949', - 'cp949': { - type: '_dbcs', - table: function() { return require('./tables/cp949.json') }, - }, - - 'cseuckr': 'cp949', - 'csksc56011987': 'cp949', - 'euckr': 'cp949', - 'isoir149': 'cp949', - 'korean': 'cp949', - 'ksc56011987': 'cp949', - 'ksc56011989': 'cp949', - 'ksc5601': 'cp949', - - - // == Big5/Taiwan/Hong Kong ================================================ - // There are lots of tables for Big5 and cp950. Please see the following links for history: - // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html - // Variations, in roughly number of defined chars: - // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT - // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ - // * Big5-2003 (Taiwan standard) almost superset of cp950. - // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. - // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. - // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. - // Plus, it has 4 combining sequences. - // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 - // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. - // Implementations are not consistent within browsers; sometimes labeled as just big5. - // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. - // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 - // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. - // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt - // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt - // - // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder - // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. - - 'windows950': 'cp950', - 'ms950': 'cp950', - '950': 'cp950', - 'cp950': { - type: '_dbcs', - table: function() { return require('./tables/cp950.json') }, - }, - - // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. - 'big5': 'big5hkscs', - 'big5hkscs': { - type: '_dbcs', - table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) }, - encodeSkipVals: [ - // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of - // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU. - // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter. - 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe, - 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca, - 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62, - 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef, - 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed, - - // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345 - 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce, - ], - }, - - 'cnbig5': 'big5hkscs', - 'csbig5': 'big5hkscs', - 'xxbig5': 'big5hkscs', -}; diff --git a/node_modules/iconv-lite/encodings/index.js b/node_modules/iconv-lite/encodings/index.js deleted file mode 100644 index d95c244..0000000 --- a/node_modules/iconv-lite/encodings/index.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -// Update this array if you add/rename/remove files in this directory. -// We support Browserify by skipping automatic module discovery and requiring modules directly. -var modules = [ - require("./internal"), - require("./utf32"), - require("./utf16"), - require("./utf7"), - require("./sbcs-codec"), - require("./sbcs-data"), - require("./sbcs-data-generated"), - require("./dbcs-codec"), - require("./dbcs-data"), -]; - -// Put all encoding/alias/codec definitions to single object and export it. -for (var i = 0; i < modules.length; i++) { - var module = modules[i]; - for (var enc in module) - if (Object.prototype.hasOwnProperty.call(module, enc)) - exports[enc] = module[enc]; -} diff --git a/node_modules/iconv-lite/encodings/internal.js b/node_modules/iconv-lite/encodings/internal.js deleted file mode 100644 index dc1074f..0000000 --- a/node_modules/iconv-lite/encodings/internal.js +++ /dev/null @@ -1,198 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Export Node.js internal encodings. - -module.exports = { - // Encodings - utf8: { type: "_internal", bomAware: true}, - cesu8: { type: "_internal", bomAware: true}, - unicode11utf8: "utf8", - - ucs2: { type: "_internal", bomAware: true}, - utf16le: "ucs2", - - binary: { type: "_internal" }, - base64: { type: "_internal" }, - hex: { type: "_internal" }, - - // Codec. - _internal: InternalCodec, -}; - -//------------------------------------------------------------------------------ - -function InternalCodec(codecOptions, iconv) { - this.enc = codecOptions.encodingName; - this.bomAware = codecOptions.bomAware; - - if (this.enc === "base64") - this.encoder = InternalEncoderBase64; - else if (this.enc === "cesu8") { - this.enc = "utf8"; // Use utf8 for decoding. - this.encoder = InternalEncoderCesu8; - - // Add decoder for versions of Node not supporting CESU-8 - if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { - this.decoder = InternalDecoderCesu8; - this.defaultCharUnicode = iconv.defaultCharUnicode; - } - } -} - -InternalCodec.prototype.encoder = InternalEncoder; -InternalCodec.prototype.decoder = InternalDecoder; - -//------------------------------------------------------------------------------ - -// We use node.js internal decoder. Its signature is the same as ours. -var StringDecoder = require('string_decoder').StringDecoder; - -if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. - StringDecoder.prototype.end = function() {}; - - -function InternalDecoder(options, codec) { - this.decoder = new StringDecoder(codec.enc); -} - -InternalDecoder.prototype.write = function(buf) { - if (!Buffer.isBuffer(buf)) { - buf = Buffer.from(buf); - } - - return this.decoder.write(buf); -} - -InternalDecoder.prototype.end = function() { - return this.decoder.end(); -} - - -//------------------------------------------------------------------------------ -// Encoder is mostly trivial - -function InternalEncoder(options, codec) { - this.enc = codec.enc; -} - -InternalEncoder.prototype.write = function(str) { - return Buffer.from(str, this.enc); -} - -InternalEncoder.prototype.end = function() { -} - - -//------------------------------------------------------------------------------ -// Except base64 encoder, which must keep its state. - -function InternalEncoderBase64(options, codec) { - this.prevStr = ''; -} - -InternalEncoderBase64.prototype.write = function(str) { - str = this.prevStr + str; - var completeQuads = str.length - (str.length % 4); - this.prevStr = str.slice(completeQuads); - str = str.slice(0, completeQuads); - - return Buffer.from(str, "base64"); -} - -InternalEncoderBase64.prototype.end = function() { - return Buffer.from(this.prevStr, "base64"); -} - - -//------------------------------------------------------------------------------ -// CESU-8 encoder is also special. - -function InternalEncoderCesu8(options, codec) { -} - -InternalEncoderCesu8.prototype.write = function(str) { - var buf = Buffer.alloc(str.length * 3), bufIdx = 0; - for (var i = 0; i < str.length; i++) { - var charCode = str.charCodeAt(i); - // Naive implementation, but it works because CESU-8 is especially easy - // to convert from UTF-16 (which all JS strings are encoded in). - if (charCode < 0x80) - buf[bufIdx++] = charCode; - else if (charCode < 0x800) { - buf[bufIdx++] = 0xC0 + (charCode >>> 6); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - else { // charCode will always be < 0x10000 in javascript. - buf[bufIdx++] = 0xE0 + (charCode >>> 12); - buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - } - return buf.slice(0, bufIdx); -} - -InternalEncoderCesu8.prototype.end = function() { -} - -//------------------------------------------------------------------------------ -// CESU-8 decoder is not implemented in Node v4.0+ - -function InternalDecoderCesu8(options, codec) { - this.acc = 0; - this.contBytes = 0; - this.accBytes = 0; - this.defaultCharUnicode = codec.defaultCharUnicode; -} - -InternalDecoderCesu8.prototype.write = function(buf) { - var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, - res = ''; - for (var i = 0; i < buf.length; i++) { - var curByte = buf[i]; - if ((curByte & 0xC0) !== 0x80) { // Leading byte - if (contBytes > 0) { // Previous code is invalid - res += this.defaultCharUnicode; - contBytes = 0; - } - - if (curByte < 0x80) { // Single-byte code - res += String.fromCharCode(curByte); - } else if (curByte < 0xE0) { // Two-byte code - acc = curByte & 0x1F; - contBytes = 1; accBytes = 1; - } else if (curByte < 0xF0) { // Three-byte code - acc = curByte & 0x0F; - contBytes = 2; accBytes = 1; - } else { // Four or more are not supported for CESU-8. - res += this.defaultCharUnicode; - } - } else { // Continuation byte - if (contBytes > 0) { // We're waiting for it. - acc = (acc << 6) | (curByte & 0x3f); - contBytes--; accBytes++; - if (contBytes === 0) { - // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) - if (accBytes === 2 && acc < 0x80 && acc > 0) - res += this.defaultCharUnicode; - else if (accBytes === 3 && acc < 0x800) - res += this.defaultCharUnicode; - else - // Actually add character. - res += String.fromCharCode(acc); - } - } else { // Unexpected continuation byte - res += this.defaultCharUnicode; - } - } - } - this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; - return res; -} - -InternalDecoderCesu8.prototype.end = function() { - var res = 0; - if (this.contBytes > 0) - res += this.defaultCharUnicode; - return res; -} diff --git a/node_modules/iconv-lite/encodings/sbcs-codec.js b/node_modules/iconv-lite/encodings/sbcs-codec.js deleted file mode 100644 index abac5ff..0000000 --- a/node_modules/iconv-lite/encodings/sbcs-codec.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that -// correspond to encoded bytes (if 128 - then lower half is ASCII). - -exports._sbcs = SBCSCodec; -function SBCSCodec(codecOptions, iconv) { - if (!codecOptions) - throw new Error("SBCS codec is called without the data.") - - // Prepare char buffer for decoding. - if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) - throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); - - if (codecOptions.chars.length === 128) { - var asciiString = ""; - for (var i = 0; i < 128; i++) - asciiString += String.fromCharCode(i); - codecOptions.chars = asciiString + codecOptions.chars; - } - - this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); - - // Encoding buffer. - var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); - - for (var i = 0; i < codecOptions.chars.length; i++) - encodeBuf[codecOptions.chars.charCodeAt(i)] = i; - - this.encodeBuf = encodeBuf; -} - -SBCSCodec.prototype.encoder = SBCSEncoder; -SBCSCodec.prototype.decoder = SBCSDecoder; - - -function SBCSEncoder(options, codec) { - this.encodeBuf = codec.encodeBuf; -} - -SBCSEncoder.prototype.write = function(str) { - var buf = Buffer.alloc(str.length); - for (var i = 0; i < str.length; i++) - buf[i] = this.encodeBuf[str.charCodeAt(i)]; - - return buf; -} - -SBCSEncoder.prototype.end = function() { -} - - -function SBCSDecoder(options, codec) { - this.decodeBuf = codec.decodeBuf; -} - -SBCSDecoder.prototype.write = function(buf) { - // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. - var decodeBuf = this.decodeBuf; - var newBuf = Buffer.alloc(buf.length*2); - var idx1 = 0, idx2 = 0; - for (var i = 0; i < buf.length; i++) { - idx1 = buf[i]*2; idx2 = i*2; - newBuf[idx2] = decodeBuf[idx1]; - newBuf[idx2+1] = decodeBuf[idx1+1]; - } - return newBuf.toString('ucs2'); -} - -SBCSDecoder.prototype.end = function() { -} diff --git a/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/node_modules/iconv-lite/encodings/sbcs-data-generated.js deleted file mode 100644 index 9b48236..0000000 --- a/node_modules/iconv-lite/encodings/sbcs-data-generated.js +++ /dev/null @@ -1,451 +0,0 @@ -"use strict"; - -// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. -module.exports = { - "437": "cp437", - "737": "cp737", - "775": "cp775", - "850": "cp850", - "852": "cp852", - "855": "cp855", - "856": "cp856", - "857": "cp857", - "858": "cp858", - "860": "cp860", - "861": "cp861", - "862": "cp862", - "863": "cp863", - "864": "cp864", - "865": "cp865", - "866": "cp866", - "869": "cp869", - "874": "windows874", - "922": "cp922", - "1046": "cp1046", - "1124": "cp1124", - "1125": "cp1125", - "1129": "cp1129", - "1133": "cp1133", - "1161": "cp1161", - "1162": "cp1162", - "1163": "cp1163", - "1250": "windows1250", - "1251": "windows1251", - "1252": "windows1252", - "1253": "windows1253", - "1254": "windows1254", - "1255": "windows1255", - "1256": "windows1256", - "1257": "windows1257", - "1258": "windows1258", - "28591": "iso88591", - "28592": "iso88592", - "28593": "iso88593", - "28594": "iso88594", - "28595": "iso88595", - "28596": "iso88596", - "28597": "iso88597", - "28598": "iso88598", - "28599": "iso88599", - "28600": "iso885910", - "28601": "iso885911", - "28603": "iso885913", - "28604": "iso885914", - "28605": "iso885915", - "28606": "iso885916", - "windows874": { - "type": "_sbcs", - "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "win874": "windows874", - "cp874": "windows874", - "windows1250": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "win1250": "windows1250", - "cp1250": "windows1250", - "windows1251": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "win1251": "windows1251", - "cp1251": "windows1251", - "windows1252": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "win1252": "windows1252", - "cp1252": "windows1252", - "windows1253": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "win1253": "windows1253", - "cp1253": "windows1253", - "windows1254": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "win1254": "windows1254", - "cp1254": "windows1254", - "windows1255": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "win1255": "windows1255", - "cp1255": "windows1255", - "windows1256": { - "type": "_sbcs", - "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" - }, - "win1256": "windows1256", - "cp1256": "windows1256", - "windows1257": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" - }, - "win1257": "windows1257", - "cp1257": "windows1257", - "windows1258": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "win1258": "windows1258", - "cp1258": "windows1258", - "iso88591": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28591": "iso88591", - "iso88592": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "cp28592": "iso88592", - "iso88593": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" - }, - "cp28593": "iso88593", - "iso88594": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" - }, - "cp28594": "iso88594", - "iso88595": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" - }, - "cp28595": "iso88595", - "iso88596": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" - }, - "cp28596": "iso88596", - "iso88597": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "cp28597": "iso88597", - "iso88598": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "cp28598": "iso88598", - "iso88599": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "cp28599": "iso88599", - "iso885910": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" - }, - "cp28600": "iso885910", - "iso885911": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "cp28601": "iso885911", - "iso885913": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" - }, - "cp28603": "iso885913", - "iso885914": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" - }, - "cp28604": "iso885914", - "iso885915": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28605": "iso885915", - "iso885916": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" - }, - "cp28606": "iso885916", - "cp437": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm437": "cp437", - "csibm437": "cp437", - "cp737": { - "type": "_sbcs", - "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " - }, - "ibm737": "cp737", - "csibm737": "cp737", - "cp775": { - "type": "_sbcs", - "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " - }, - "ibm775": "cp775", - "csibm775": "cp775", - "cp850": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm850": "cp850", - "csibm850": "cp850", - "cp852": { - "type": "_sbcs", - "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " - }, - "ibm852": "cp852", - "csibm852": "cp852", - "cp855": { - "type": "_sbcs", - "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " - }, - "ibm855": "cp855", - "csibm855": "cp855", - "cp856": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm856": "cp856", - "csibm856": "cp856", - "cp857": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " - }, - "ibm857": "cp857", - "csibm857": "cp857", - "cp858": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm858": "cp858", - "csibm858": "cp858", - "cp860": { - "type": "_sbcs", - "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm860": "cp860", - "csibm860": "cp860", - "cp861": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm861": "cp861", - "csibm861": "cp861", - "cp862": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm862": "cp862", - "csibm862": "cp862", - "cp863": { - "type": "_sbcs", - "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm863": "cp863", - "csibm863": "cp863", - "cp864": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" - }, - "ibm864": "cp864", - "csibm864": "cp864", - "cp865": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm865": "cp865", - "csibm865": "cp865", - "cp866": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " - }, - "ibm866": "cp866", - "csibm866": "cp866", - "cp869": { - "type": "_sbcs", - "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " - }, - "ibm869": "cp869", - "csibm869": "cp869", - "cp922": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" - }, - "ibm922": "cp922", - "csibm922": "cp922", - "cp1046": { - "type": "_sbcs", - "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" - }, - "ibm1046": "cp1046", - "csibm1046": "cp1046", - "cp1124": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" - }, - "ibm1124": "cp1124", - "csibm1124": "cp1124", - "cp1125": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " - }, - "ibm1125": "cp1125", - "csibm1125": "cp1125", - "cp1129": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1129": "cp1129", - "csibm1129": "cp1129", - "cp1133": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" - }, - "ibm1133": "cp1133", - "csibm1133": "cp1133", - "cp1161": { - "type": "_sbcs", - "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " - }, - "ibm1161": "cp1161", - "csibm1161": "cp1161", - "cp1162": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "ibm1162": "cp1162", - "csibm1162": "cp1162", - "cp1163": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1163": "cp1163", - "csibm1163": "cp1163", - "maccroatian": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" - }, - "maccyrillic": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "macgreek": { - "type": "_sbcs", - "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" - }, - "maciceland": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macroman": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macromania": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macthai": { - "type": "_sbcs", - "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" - }, - "macturkish": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macukraine": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "koi8r": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8u": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8ru": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8t": { - "type": "_sbcs", - "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "armscii8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" - }, - "rk1048": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "tcvn": { - "type": "_sbcs", - "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" - }, - "georgianacademy": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "georgianps": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "pt154": { - "type": "_sbcs", - "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "viscii": { - "type": "_sbcs", - "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" - }, - "iso646cn": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "iso646jp": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "hproman8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" - }, - "macintosh": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "ascii": { - "type": "_sbcs", - "chars": "��������������������������������������������������������������������������������������������������������������������������������" - }, - "tis620": { - "type": "_sbcs", - "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - } -} \ No newline at end of file diff --git a/node_modules/iconv-lite/encodings/sbcs-data.js b/node_modules/iconv-lite/encodings/sbcs-data.js deleted file mode 100644 index 066f904..0000000 --- a/node_modules/iconv-lite/encodings/sbcs-data.js +++ /dev/null @@ -1,179 +0,0 @@ -"use strict"; - -// Manually added data to be used by sbcs codec in addition to generated one. - -module.exports = { - // Not supported by iconv, not sure why. - "10029": "maccenteuro", - "maccenteuro": { - "type": "_sbcs", - "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" - }, - - "808": "cp808", - "ibm808": "cp808", - "cp808": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " - }, - - "mik": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - - "cp720": { - "type": "_sbcs", - "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0" - }, - - // Aliases of generated encodings. - "ascii8bit": "ascii", - "usascii": "ascii", - "ansix34": "ascii", - "ansix341968": "ascii", - "ansix341986": "ascii", - "csascii": "ascii", - "cp367": "ascii", - "ibm367": "ascii", - "isoir6": "ascii", - "iso646us": "ascii", - "iso646irv": "ascii", - "us": "ascii", - - "latin1": "iso88591", - "latin2": "iso88592", - "latin3": "iso88593", - "latin4": "iso88594", - "latin5": "iso88599", - "latin6": "iso885910", - "latin7": "iso885913", - "latin8": "iso885914", - "latin9": "iso885915", - "latin10": "iso885916", - - "csisolatin1": "iso88591", - "csisolatin2": "iso88592", - "csisolatin3": "iso88593", - "csisolatin4": "iso88594", - "csisolatincyrillic": "iso88595", - "csisolatinarabic": "iso88596", - "csisolatingreek" : "iso88597", - "csisolatinhebrew": "iso88598", - "csisolatin5": "iso88599", - "csisolatin6": "iso885910", - - "l1": "iso88591", - "l2": "iso88592", - "l3": "iso88593", - "l4": "iso88594", - "l5": "iso88599", - "l6": "iso885910", - "l7": "iso885913", - "l8": "iso885914", - "l9": "iso885915", - "l10": "iso885916", - - "isoir14": "iso646jp", - "isoir57": "iso646cn", - "isoir100": "iso88591", - "isoir101": "iso88592", - "isoir109": "iso88593", - "isoir110": "iso88594", - "isoir144": "iso88595", - "isoir127": "iso88596", - "isoir126": "iso88597", - "isoir138": "iso88598", - "isoir148": "iso88599", - "isoir157": "iso885910", - "isoir166": "tis620", - "isoir179": "iso885913", - "isoir199": "iso885914", - "isoir203": "iso885915", - "isoir226": "iso885916", - - "cp819": "iso88591", - "ibm819": "iso88591", - - "cyrillic": "iso88595", - - "arabic": "iso88596", - "arabic8": "iso88596", - "ecma114": "iso88596", - "asmo708": "iso88596", - - "greek" : "iso88597", - "greek8" : "iso88597", - "ecma118" : "iso88597", - "elot928" : "iso88597", - - "hebrew": "iso88598", - "hebrew8": "iso88598", - - "turkish": "iso88599", - "turkish8": "iso88599", - - "thai": "iso885911", - "thai8": "iso885911", - - "celtic": "iso885914", - "celtic8": "iso885914", - "isoceltic": "iso885914", - - "tis6200": "tis620", - "tis62025291": "tis620", - "tis62025330": "tis620", - - "10000": "macroman", - "10006": "macgreek", - "10007": "maccyrillic", - "10079": "maciceland", - "10081": "macturkish", - - "cspc8codepage437": "cp437", - "cspc775baltic": "cp775", - "cspc850multilingual": "cp850", - "cspcp852": "cp852", - "cspc862latinhebrew": "cp862", - "cpgr": "cp869", - - "msee": "cp1250", - "mscyrl": "cp1251", - "msansi": "cp1252", - "msgreek": "cp1253", - "msturk": "cp1254", - "mshebr": "cp1255", - "msarab": "cp1256", - "winbaltrim": "cp1257", - - "cp20866": "koi8r", - "20866": "koi8r", - "ibm878": "koi8r", - "cskoi8r": "koi8r", - - "cp21866": "koi8u", - "21866": "koi8u", - "ibm1168": "koi8u", - - "strk10482002": "rk1048", - - "tcvn5712": "tcvn", - "tcvn57121": "tcvn", - - "gb198880": "iso646cn", - "cn": "iso646cn", - - "csiso14jisc6220ro": "iso646jp", - "jisc62201969ro": "iso646jp", - "jp": "iso646jp", - - "cshproman8": "hproman8", - "r8": "hproman8", - "roman8": "hproman8", - "xroman8": "hproman8", - "ibm1051": "hproman8", - - "mac": "macintosh", - "csmacintosh": "macintosh", -}; - diff --git a/node_modules/iconv-lite/encodings/tables/big5-added.json b/node_modules/iconv-lite/encodings/tables/big5-added.json deleted file mode 100644 index 3c3d3c2..0000000 --- a/node_modules/iconv-lite/encodings/tables/big5-added.json +++ /dev/null @@ -1,122 +0,0 @@ -[ -["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"], -["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"], -["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"], -["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"], -["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"], -["8940","𪎩𡅅"], -["8943","攊"], -["8946","丽滝鵎釟"], -["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"], -["89a1","琑糼緍楆竉刧"], -["89ab","醌碸酞肼"], -["89b0","贋胶𠧧"], -["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"], -["89c1","溚舾甙"], -["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"], -["8a40","𧶄唥"], -["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"], -["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"], -["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"], -["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"], -["8aac","䠋𠆩㿺塳𢶍"], -["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"], -["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"], -["8ac9","𪘁𠸉𢫏𢳉"], -["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"], -["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"], -["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"], -["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"], -["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"], -["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"], -["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"], -["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"], -["8ca1","𣏹椙橃𣱣泿"], -["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"], -["8cc9","顨杫䉶圽"], -["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"], -["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"], -["8d40","𠮟"], -["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"], -["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"], -["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"], -["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"], -["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"], -["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"], -["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"], -["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"], -["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"], -["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"], -["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"], -["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"], -["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"], -["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"], -["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"], -["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"], -["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"], -["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"], -["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"], -["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"], -["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"], -["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"], -["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"], -["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"], -["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"], -["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"], -["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"], -["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"], -["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"], -["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"], -["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"], -["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"], -["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"], -["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"], -["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"], -["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"], -["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"], -["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"], -["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"], -["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"], -["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"], -["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"], -["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"], -["9fae","酙隁酜"], -["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"], -["9fc1","𤤙盖鮝个𠳔莾衂"], -["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"], -["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"], -["9fe7","毺蠘罸"], -["9feb","嘠𪙊蹷齓"], -["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"], -["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"], -["a055","𡠻𦸅"], -["a058","詾𢔛"], -["a05b","惽癧髗鵄鍮鮏蟵"], -["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"], -["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"], -["a0a1","嵗𨯂迚𨸹"], -["a0a6","僙𡵆礆匲阸𠼻䁥"], -["a0ae","矾"], -["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"], -["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"], -["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"], -["a3c0","␀",31,"␡"], -["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23], -["c740","す",58,"ァアィイ"], -["c7a1","ゥ",81,"А",5,"ЁЖ",4], -["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"], -["c8a1","龰冈龱𧘇"], -["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"], -["c8f5","ʃɐɛɔɵœøŋʊɪ"], -["f9fe","■"], -["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"], -["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"], -["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"], -["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"], -["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"], -["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"], -["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"], -["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"], -["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"], -["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"] -] diff --git a/node_modules/iconv-lite/encodings/tables/cp936.json b/node_modules/iconv-lite/encodings/tables/cp936.json deleted file mode 100644 index 49ddb9a..0000000 --- a/node_modules/iconv-lite/encodings/tables/cp936.json +++ /dev/null @@ -1,264 +0,0 @@ -[ -["0","\u0000",127,"€"], -["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"], -["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"], -["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11], -["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"], -["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"], -["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5], -["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"], -["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"], -["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"], -["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"], -["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"], -["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"], -["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4], -["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6], -["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"], -["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7], -["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"], -["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"], -["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"], -["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5], -["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"], -["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6], -["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"], -["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4], -["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4], -["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"], -["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"], -["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6], -["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"], -["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"], -["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"], -["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6], -["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"], -["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"], -["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"], -["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"], -["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"], -["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"], -["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8], -["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"], -["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"], -["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"], -["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"], -["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5], -["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"], -["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"], -["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"], -["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"], -["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5], -["9980","檧檨檪檭",114,"欥欦欨",6], -["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"], -["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"], -["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"], -["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"], -["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"], -["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5], -["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"], -["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"], -["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6], -["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"], -["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"], -["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4], -["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19], -["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"], -["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"], -["a2a1","ⅰ",9], -["a2b1","⒈",19,"⑴",19,"①",9], -["a2e5","㈠",9], -["a2f1","Ⅰ",11], -["a3a1","!"#¥%",88," ̄"], -["a4a1","ぁ",82], -["a5a1","ァ",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"], -["a6ee","︻︼︷︸︱"], -["a6f4","︳︴"], -["a7a1","А",5,"ЁЖ",25], -["a7d1","а",5,"ёж",25], -["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6], -["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"], -["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"], -["a8bd","ńň"], -["a8c0","ɡ"], -["a8c5","ㄅ",36], -["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"], -["a959","℡㈱"], -["a95c","‐"], -["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8], -["a980","﹢",4,"﹨﹩﹪﹫"], -["a996","〇"], -["a9a4","─",75], -["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8], -["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"], -["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4], -["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4], -["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11], -["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"], -["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12], -["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"], -["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"], -["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"], -["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"], -["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"], -["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"], -["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"], -["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"], -["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"], -["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4], -["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"], -["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"], -["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"], -["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9], -["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"], -["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"], -["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"], -["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"], -["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"], -["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16], -["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"], -["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"], -["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"], -["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"], -["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"], -["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"], -["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"], -["bb40","籃",9,"籎",36,"籵",5,"籾",9], -["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"], -["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5], -["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"], -["bd40","紷",54,"絯",7], -["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"], -["be40","継",12,"綧",6,"綯",42], -["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"], -["bf40","緻",62], -["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"], -["c040","繞",35,"纃",23,"纜纝纞"], -["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"], -["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"], -["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"], -["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"], -["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"], -["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"], -["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"], -["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"], -["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"], -["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"], -["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"], -["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"], -["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"], -["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"], -["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"], -["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"], -["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"], -["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"], -["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"], -["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10], -["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"], -["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"], -["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"], -["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"], -["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"], -["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"], -["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"], -["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"], -["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"], -["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9], -["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"], -["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"], -["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"], -["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5], -["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"], -["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"], -["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"], -["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6], -["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"], -["d440","訞",31,"訿",8,"詉",21], -["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"], -["d540","誁",7,"誋",7,"誔",46], -["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"], -["d640","諤",34,"謈",27], -["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"], -["d740","譆",31,"譧",4,"譭",25], -["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"], -["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"], -["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"], -["d940","貮",62], -["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"], -["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"], -["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"], -["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"], -["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"], -["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7], -["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"], -["dd40","軥",62], -["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"], -["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"], -["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"], -["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"], -["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"], -["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"], -["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"], -["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"], -["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"], -["e240","釦",62], -["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"], -["e340","鉆",45,"鉵",16], -["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"], -["e440","銨",5,"銯",24,"鋉",31], -["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"], -["e540","錊",51,"錿",10], -["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"], -["e640","鍬",34,"鎐",27], -["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"], -["e740","鏎",7,"鏗",54], -["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"], -["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"], -["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"], -["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42], -["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"], -["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"], -["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"], -["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"], -["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"], -["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7], -["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"], -["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46], -["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"], -["ee40","頏",62], -["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"], -["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4], -["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"], -["f040","餈",4,"餎餏餑",28,"餯",26], -["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"], -["f140","馌馎馚",10,"馦馧馩",47], -["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"], -["f240","駺",62], -["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"], -["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"], -["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"], -["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5], -["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"], -["f540","魼",62], -["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"], -["f640","鯜",62], -["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"], -["f740","鰼",62], -["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"], -["f840","鳣",62], -["f880","鴢",32], -["f940","鵃",62], -["f980","鶂",32], -["fa40","鶣",62], -["fa80","鷢",32], -["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"], -["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"], -["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6], -["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"], -["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38], -["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"], -["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"] -] diff --git a/node_modules/iconv-lite/encodings/tables/cp949.json b/node_modules/iconv-lite/encodings/tables/cp949.json deleted file mode 100644 index 2022a00..0000000 --- a/node_modules/iconv-lite/encodings/tables/cp949.json +++ /dev/null @@ -1,273 +0,0 @@ -[ -["0","\u0000",127], -["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"], -["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"], -["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"], -["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5], -["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"], -["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18], -["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7], -["8361","긝",18,"긲긳긵긶긹긻긼"], -["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8], -["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8], -["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18], -["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"], -["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4], -["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"], -["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"], -["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"], -["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10], -["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"], -["8741","놞",9,"놩",15], -["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"], -["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4], -["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4], -["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"], -["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"], -["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"], -["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"], -["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15], -["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"], -["8a61","둧",4,"둭",18,"뒁뒂"], -["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"], -["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"], -["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8], -["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18], -["8c41","똀",15,"똒똓똕똖똗똙",4], -["8c61","똞",6,"똦",5,"똭",6,"똵",5], -["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16], -["8d41","뛃",16,"뛕",8], -["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"], -["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"], -["8e41","랟랡",6,"랪랮",5,"랶랷랹",8], -["8e61","럂",4,"럈럊",19], -["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7], -["8f41","뢅",7,"뢎",17], -["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4], -["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5], -["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"], -["9061","륾",5,"릆릈릋릌릏",15], -["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"], -["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5], -["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5], -["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6], -["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"], -["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4], -["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"], -["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"], -["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8], -["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"], -["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8], -["9461","봞",5,"봥",6,"봭",12], -["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24], -["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"], -["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"], -["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14], -["9641","뺸",23,"뻒뻓"], -["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8], -["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44], -["9741","뾃",16,"뾕",8], -["9761","뾞",17,"뾱",7], -["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"], -["9841","쁀",16,"쁒",5,"쁙쁚쁛"], -["9861","쁝쁞쁟쁡",6,"쁪",15], -["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"], -["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"], -["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"], -["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"], -["9a41","숤숥숦숧숪숬숮숰숳숵",16], -["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"], -["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"], -["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8], -["9b61","쌳",17,"썆",7], -["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"], -["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5], -["9c61","쏿",8,"쐉",6,"쐑",9], -["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12], -["9d41","쒪",13,"쒹쒺쒻쒽",8], -["9d61","쓆",25], -["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"], -["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"], -["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"], -["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"], -["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"], -["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"], -["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"], -["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"], -["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13], -["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"], -["a141","좥좦좧좩",18,"좾좿죀죁"], -["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"], -["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"], -["a241","줐줒",5,"줙",18], -["a261","줭",6,"줵",18], -["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"], -["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"], -["a361","즑",6,"즚즜즞",16], -["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"], -["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"], -["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12], -["a481","쨦쨧쨨쨪",28,"ㄱ",93], -["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"], -["a561","쩫",17,"쩾",5,"쪅쪆"], -["a581","쪇",16,"쪙",14,"ⅰ",9], -["a5b0","Ⅰ",9], -["a5c1","Α",16,"Σ",6], -["a5e1","α",16,"σ",6], -["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"], -["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6], -["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7], -["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7], -["a761","쬪",22,"쭂쭃쭄"], -["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"], -["a841","쭭",10,"쭺",14], -["a861","쮉",18,"쮝",6], -["a881","쮤",19,"쮹",11,"ÆЪĦ"], -["a8a6","IJ"], -["a8a8","ĿŁØŒºÞŦŊ"], -["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"], -["a941","쯅",14,"쯕",10], -["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18], -["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"], -["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"], -["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"], -["aa81","챳챴챶",29,"ぁ",82], -["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"], -["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5], -["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85], -["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"], -["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4], -["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25], -["acd1","а",5,"ёж",25], -["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7], -["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"], -["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"], -["ae41","췆",5,"췍췎췏췑",16], -["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4], -["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"], -["af41","츬츭츮츯츲츴츶",19], -["af61","칊",13,"칚칛칝칞칢",5,"칪칬"], -["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"], -["b041","캚",5,"캢캦",5,"캮",12], -["b061","캻",5,"컂",19], -["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"], -["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"], -["b161","켥",6,"켮켲",5,"켹",11], -["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"], -["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"], -["b261","쾎",18,"쾢",5,"쾩"], -["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"], -["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"], -["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5], -["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"], -["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5], -["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"], -["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"], -["b541","킕",14,"킦킧킩킪킫킭",5], -["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4], -["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"], -["b641","턅",7,"턎",17], -["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"], -["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"], -["b741","텮",13,"텽",6,"톅톆톇톉톊"], -["b761","톋",20,"톢톣톥톦톧"], -["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"], -["b841","퇐",7,"퇙",17], -["b861","퇫",8,"퇵퇶퇷퇹",13], -["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"], -["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"], -["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"], -["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"], -["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"], -["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5], -["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"], -["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"], -["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"], -["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"], -["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"], -["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"], -["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"], -["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"], -["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13], -["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"], -["be41","퐸",7,"푁푂푃푅",14], -["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"], -["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"], -["bf41","풞",10,"풪",14], -["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"], -["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"], -["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5], -["c061","픞",25], -["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"], -["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"], -["c161","햌햍햎햏햑",19,"햦햧"], -["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"], -["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"], -["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"], -["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"], -["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4], -["c361","홢",4,"홨홪",5,"홲홳홵",11], -["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"], -["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"], -["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4], -["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"], -["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"], -["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4], -["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"], -["c641","힍힎힏힑",6,"힚힜힞",5], -["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"], -["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"], -["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"], -["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"], -["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"], -["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"], -["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"], -["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"], -["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"], -["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"], -["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"], -["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"], -["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"], -["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"], -["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"], -["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"], -["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"], -["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"], -["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"], -["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"], -["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"], -["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"], -["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"], -["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"], -["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"], -["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"], -["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"], -["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"], -["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"], -["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"], -["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"], -["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"], -["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"], -["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"], -["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"], -["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"], -["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"], -["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"], -["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"], -["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"], -["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"], -["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"], -["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"], -["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"], -["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"], -["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"], -["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"], -["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"], -["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"], -["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"], -["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"], -["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"], -["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"], -["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"], -["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"] -] diff --git a/node_modules/iconv-lite/encodings/tables/cp950.json b/node_modules/iconv-lite/encodings/tables/cp950.json deleted file mode 100644 index d8bc871..0000000 --- a/node_modules/iconv-lite/encodings/tables/cp950.json +++ /dev/null @@ -1,177 +0,0 @@ -[ -["0","\u0000",127], -["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"], -["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"], -["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"], -["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21], -["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10], -["a3a1","ㄐ",25,"˙ˉˊˇˋ"], -["a3e1","€"], -["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"], -["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"], -["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"], -["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"], -["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"], -["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"], -["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"], -["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"], -["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"], -["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"], -["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"], -["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"], -["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"], -["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"], -["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"], -["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"], -["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"], -["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"], -["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"], -["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"], -["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"], -["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"], -["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"], -["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"], -["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"], -["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"], -["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"], -["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"], -["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"], -["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"], -["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"], -["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"], -["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"], -["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"], -["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"], -["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"], -["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"], -["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"], -["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"], -["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"], -["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"], -["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"], -["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"], -["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"], -["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"], -["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"], -["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"], -["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"], -["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"], -["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"], -["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"], -["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"], -["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"], -["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"], -["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"], -["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"], -["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"], -["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"], -["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"], -["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"], -["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"], -["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"], -["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"], -["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"], -["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"], -["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"], -["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"], -["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"], -["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"], -["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"], -["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"], -["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"], -["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"], -["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"], -["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"], -["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"], -["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"], -["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"], -["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"], -["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"], -["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"], -["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"], -["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"], -["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"], -["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"], -["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"], -["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"], -["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"], -["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"], -["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"], -["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"], -["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"], -["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"], -["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"], -["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"], -["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"], -["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"], -["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"], -["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"], -["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"], -["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"], -["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"], -["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"], -["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"], -["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"], -["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"], -["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"], -["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"], -["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"], -["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"], -["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"], -["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"], -["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"], -["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"], -["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"], -["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"], -["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"], -["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"], -["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"], -["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"], -["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"], -["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"], -["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"], -["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"], -["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"], -["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"], -["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"], -["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"], -["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"], -["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"], -["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"], -["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"], -["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"], -["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"], -["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"], -["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"], -["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"], -["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"], -["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"], -["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"], -["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"], -["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"], -["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"], -["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"], -["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"], -["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"], -["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"], -["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"], -["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"], -["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"], -["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"], -["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"], -["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"], -["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"], -["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"], -["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"], -["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"], -["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"], -["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"], -["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"], -["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"], -["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"], -["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"], -["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"], -["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"], -["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"], -["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"] -] diff --git a/node_modules/iconv-lite/encodings/tables/eucjp.json b/node_modules/iconv-lite/encodings/tables/eucjp.json deleted file mode 100644 index 4fa61ca..0000000 --- a/node_modules/iconv-lite/encodings/tables/eucjp.json +++ /dev/null @@ -1,182 +0,0 @@ -[ -["0","\u0000",127], -["8ea1","。",62], -["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"], -["a2a1","◆□■△▲▽▼※〒→←↑↓〓"], -["a2ba","∈∋⊆⊇⊂⊃∪∩"], -["a2ca","∧∨¬⇒⇔∀∃"], -["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], -["a2f2","ʼn♯♭♪†‡¶"], -["a2fe","◯"], -["a3b0","0",9], -["a3c1","A",25], -["a3e1","a",25], -["a4a1","ぁ",82], -["a5a1","ァ",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a7a1","А",5,"ЁЖ",25], -["a7d1","а",5,"ёж",25], -["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], -["ada1","①",19,"Ⅰ",9], -["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], -["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], -["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], -["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"], -["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], -["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"], -["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], -["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"], -["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], -["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"], -["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], -["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"], -["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], -["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"], -["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], -["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"], -["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], -["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"], -["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], -["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"], -["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], -["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"], -["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], -["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"], -["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], -["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"], -["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], -["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"], -["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], -["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"], -["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], -["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"], -["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], -["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], -["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], -["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"], -["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], -["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"], -["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], -["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"], -["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], -["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"], -["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], -["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"], -["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], -["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"], -["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], -["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"], -["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], -["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"], -["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], -["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"], -["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"], -["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"], -["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], -["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"], -["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"], -["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], -["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"], -["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], -["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"], -["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], -["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"], -["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], -["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"], -["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], -["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"], -["f4a1","堯槇遙瑤凜熙"], -["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"], -["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], -["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"], -["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], -["fcf1","ⅰ",9,"¬¦'""], -["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"], -["8fa2c2","¡¦¿"], -["8fa2eb","ºª©®™¤№"], -["8fa6e1","ΆΈΉΊΪ"], -["8fa6e7","Ό"], -["8fa6e9","ΎΫ"], -["8fa6ec","Ώ"], -["8fa6f1","άέήίϊΐόςύϋΰώ"], -["8fa7c2","Ђ",10,"ЎЏ"], -["8fa7f2","ђ",10,"ўџ"], -["8fa9a1","ÆĐ"], -["8fa9a4","Ħ"], -["8fa9a6","IJ"], -["8fa9a8","ŁĿ"], -["8fa9ab","ŊØŒ"], -["8fa9af","ŦÞ"], -["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"], -["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"], -["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"], -["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"], -["8fabbd","ġĥíìïîǐ"], -["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"], -["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"], -["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"], -["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"], -["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"], -["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"], -["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"], -["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"], -["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"], -["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"], -["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"], -["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"], -["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"], -["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"], -["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"], -["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"], -["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"], -["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"], -["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"], -["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"], -["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"], -["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"], -["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"], -["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"], -["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"], -["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"], -["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"], -["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"], -["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"], -["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"], -["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"], -["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"], -["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"], -["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"], -["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"], -["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5], -["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"], -["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"], -["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"], -["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"], -["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"], -["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"], -["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"], -["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"], -["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"], -["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"], -["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"], -["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"], -["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"], -["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"], -["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"], -["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"], -["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"], -["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"], -["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"], -["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"], -["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"], -["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"], -["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4], -["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"], -["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"], -["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"], -["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"] -] diff --git a/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json deleted file mode 100644 index 85c6934..0000000 --- a/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +++ /dev/null @@ -1 +0,0 @@ -{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file diff --git a/node_modules/iconv-lite/encodings/tables/gbk-added.json b/node_modules/iconv-lite/encodings/tables/gbk-added.json deleted file mode 100644 index b742e36..0000000 --- a/node_modules/iconv-lite/encodings/tables/gbk-added.json +++ /dev/null @@ -1,56 +0,0 @@ -[ -["a140","",62], -["a180","",32], -["a240","",62], -["a280","",32], -["a2ab","",5], -["a2e3","€"], -["a2ef",""], -["a2fd",""], -["a340","",62], -["a380","",31," "], -["a440","",62], -["a480","",32], -["a4f4","",10], -["a540","",62], -["a580","",32], -["a5f7","",7], -["a640","",62], -["a680","",32], -["a6b9","",7], -["a6d9","",6], -["a6ec",""], -["a6f3",""], -["a6f6","",8], -["a740","",62], -["a780","",32], -["a7c2","",14], -["a7f2","",12], -["a896","",10], -["a8bc","ḿ"], -["a8bf","ǹ"], -["a8c1",""], -["a8ea","",20], -["a958",""], -["a95b",""], -["a95d",""], -["a989","〾⿰",11], -["a997","",12], -["a9f0","",14], -["aaa1","",93], -["aba1","",93], -["aca1","",93], -["ada1","",93], -["aea1","",93], -["afa1","",93], -["d7fa","",4], -["f8a1","",93], -["f9a1","",93], -["faa1","",93], -["fba1","",93], -["fca1","",93], -["fda1","",93], -["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"], -["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93], -["8135f437",""] -] diff --git a/node_modules/iconv-lite/encodings/tables/shiftjis.json b/node_modules/iconv-lite/encodings/tables/shiftjis.json deleted file mode 100644 index 5a3a43c..0000000 --- a/node_modules/iconv-lite/encodings/tables/shiftjis.json +++ /dev/null @@ -1,125 +0,0 @@ -[ -["0","\u0000",128], -["a1","。",62], -["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"], -["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"], -["81b8","∈∋⊆⊇⊂⊃∪∩"], -["81c8","∧∨¬⇒⇔∀∃"], -["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], -["81f0","ʼn♯♭♪†‡¶"], -["81fc","◯"], -["824f","0",9], -["8260","A",25], -["8281","a",25], -["829f","ぁ",82], -["8340","ァ",62], -["8380","ム",22], -["839f","Α",16,"Σ",6], -["83bf","α",16,"σ",6], -["8440","А",5,"ЁЖ",25], -["8470","а",5,"ёж",7], -["8480","о",17], -["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], -["8740","①",19,"Ⅰ",9], -["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], -["877e","㍻"], -["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], -["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], -["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"], -["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], -["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"], -["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], -["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"], -["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], -["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"], -["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], -["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"], -["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], -["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"], -["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], -["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"], -["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], -["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"], -["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], -["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"], -["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], -["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"], -["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], -["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"], -["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], -["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"], -["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], -["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"], -["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], -["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"], -["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], -["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"], -["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], -["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], -["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], -["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"], -["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], -["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"], -["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], -["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"], -["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], -["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"], -["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], -["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"], -["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], -["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"], -["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], -["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"], -["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], -["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"], -["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], -["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"], -["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"], -["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"], -["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], -["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"], -["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"], -["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], -["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"], -["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], -["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"], -["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], -["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"], -["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], -["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"], -["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], -["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"], -["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"], -["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"], -["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], -["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"], -["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], -["eeef","ⅰ",9,"¬¦'""], -["f040","",62], -["f080","",124], -["f140","",62], -["f180","",124], -["f240","",62], -["f280","",124], -["f340","",62], -["f380","",124], -["f440","",62], -["f480","",124], -["f540","",62], -["f580","",124], -["f640","",62], -["f680","",124], -["f740","",62], -["f780","",124], -["f840","",62], -["f880","",124], -["f940",""], -["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"], -["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"], -["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"], -["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"], -["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"] -] diff --git a/node_modules/iconv-lite/encodings/utf16.js b/node_modules/iconv-lite/encodings/utf16.js deleted file mode 100644 index 97d0669..0000000 --- a/node_modules/iconv-lite/encodings/utf16.js +++ /dev/null @@ -1,197 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js - -// == UTF16-BE codec. ========================================================== - -exports.utf16be = Utf16BECodec; -function Utf16BECodec() { -} - -Utf16BECodec.prototype.encoder = Utf16BEEncoder; -Utf16BECodec.prototype.decoder = Utf16BEDecoder; -Utf16BECodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf16BEEncoder() { -} - -Utf16BEEncoder.prototype.write = function(str) { - var buf = Buffer.from(str, 'ucs2'); - for (var i = 0; i < buf.length; i += 2) { - var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; - } - return buf; -} - -Utf16BEEncoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf16BEDecoder() { - this.overflowByte = -1; -} - -Utf16BEDecoder.prototype.write = function(buf) { - if (buf.length == 0) - return ''; - - var buf2 = Buffer.alloc(buf.length + 1), - i = 0, j = 0; - - if (this.overflowByte !== -1) { - buf2[0] = buf[0]; - buf2[1] = this.overflowByte; - i = 1; j = 2; - } - - for (; i < buf.length-1; i += 2, j+= 2) { - buf2[j] = buf[i+1]; - buf2[j+1] = buf[i]; - } - - this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; - - return buf2.slice(0, j).toString('ucs2'); -} - -Utf16BEDecoder.prototype.end = function() { - this.overflowByte = -1; -} - - -// == UTF-16 codec ============================================================= -// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. -// Defaults to UTF-16LE, as it's prevalent and default in Node. -// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le -// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); - -// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). - -exports.utf16 = Utf16Codec; -function Utf16Codec(codecOptions, iconv) { - this.iconv = iconv; -} - -Utf16Codec.prototype.encoder = Utf16Encoder; -Utf16Codec.prototype.decoder = Utf16Decoder; - - -// -- Encoding (pass-through) - -function Utf16Encoder(options, codec) { - options = options || {}; - if (options.addBOM === undefined) - options.addBOM = true; - this.encoder = codec.iconv.getEncoder('utf-16le', options); -} - -Utf16Encoder.prototype.write = function(str) { - return this.encoder.write(str); -} - -Utf16Encoder.prototype.end = function() { - return this.encoder.end(); -} - - -// -- Decoding - -function Utf16Decoder(options, codec) { - this.decoder = null; - this.initialBufs = []; - this.initialBufsLen = 0; - - this.options = options || {}; - this.iconv = codec.iconv; -} - -Utf16Decoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf); - this.initialBufsLen += buf.length; - - if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below) - return ''; - - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.write(buf); -} - -Utf16Decoder.prototype.end = function() { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - var trail = this.decoder.end(); - if (trail) - resStr += trail; - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - return this.decoder.end(); -} - -function detectEncoding(bufs, defaultEncoding) { - var b = []; - var charsProcessed = 0; - var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE. - - outer_loop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i]; - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]); - if (b.length === 2) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le'; - if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be'; - } - - if (b[0] === 0 && b[1] !== 0) asciiCharsBE++; - if (b[0] !== 0 && b[1] === 0) asciiCharsLE++; - - b.length = 0; - charsProcessed++; - - if (charsProcessed >= 100) { - break outer_loop; - } - } - } - } - - // Make decisions. - // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. - // So, we count ASCII as if it was LE or BE, and decide from that. - if (asciiCharsBE > asciiCharsLE) return 'utf-16be'; - if (asciiCharsBE < asciiCharsLE) return 'utf-16le'; - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || 'utf-16le'; -} - - diff --git a/node_modules/iconv-lite/encodings/utf32.js b/node_modules/iconv-lite/encodings/utf32.js deleted file mode 100644 index 2fa900a..0000000 --- a/node_modules/iconv-lite/encodings/utf32.js +++ /dev/null @@ -1,319 +0,0 @@ -'use strict'; - -var Buffer = require('safer-buffer').Buffer; - -// == UTF32-LE/BE codec. ========================================================== - -exports._utf32 = Utf32Codec; - -function Utf32Codec(codecOptions, iconv) { - this.iconv = iconv; - this.bomAware = true; - this.isLE = codecOptions.isLE; -} - -exports.utf32le = { type: '_utf32', isLE: true }; -exports.utf32be = { type: '_utf32', isLE: false }; - -// Aliases -exports.ucs4le = 'utf32le'; -exports.ucs4be = 'utf32be'; - -Utf32Codec.prototype.encoder = Utf32Encoder; -Utf32Codec.prototype.decoder = Utf32Decoder; - -// -- Encoding - -function Utf32Encoder(options, codec) { - this.isLE = codec.isLE; - this.highSurrogate = 0; -} - -Utf32Encoder.prototype.write = function(str) { - var src = Buffer.from(str, 'ucs2'); - var dst = Buffer.alloc(src.length * 2); - var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE; - var offset = 0; - - for (var i = 0; i < src.length; i += 2) { - var code = src.readUInt16LE(i); - var isHighSurrogate = (0xD800 <= code && code < 0xDC00); - var isLowSurrogate = (0xDC00 <= code && code < 0xE000); - - if (this.highSurrogate) { - if (isHighSurrogate || !isLowSurrogate) { - // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low - // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character - // (technically wrong, but expected by some applications, like Windows file names). - write32.call(dst, this.highSurrogate, offset); - offset += 4; - } - else { - // Create 32-bit value from high and low surrogates; - var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000; - - write32.call(dst, codepoint, offset); - offset += 4; - this.highSurrogate = 0; - - continue; - } - } - - if (isHighSurrogate) - this.highSurrogate = code; - else { - // Even if the current character is a low surrogate, with no previous high surrogate, we'll - // encode it as a semi-invalid stand-alone character for the same reasons expressed above for - // unpaired high surrogates. - write32.call(dst, code, offset); - offset += 4; - this.highSurrogate = 0; - } - } - - if (offset < dst.length) - dst = dst.slice(0, offset); - - return dst; -}; - -Utf32Encoder.prototype.end = function() { - // Treat any leftover high surrogate as a semi-valid independent character. - if (!this.highSurrogate) - return; - - var buf = Buffer.alloc(4); - - if (this.isLE) - buf.writeUInt32LE(this.highSurrogate, 0); - else - buf.writeUInt32BE(this.highSurrogate, 0); - - this.highSurrogate = 0; - - return buf; -}; - -// -- Decoding - -function Utf32Decoder(options, codec) { - this.isLE = codec.isLE; - this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0); - this.overflow = []; -} - -Utf32Decoder.prototype.write = function(src) { - if (src.length === 0) - return ''; - - var i = 0; - var codepoint = 0; - var dst = Buffer.alloc(src.length + 4); - var offset = 0; - var isLE = this.isLE; - var overflow = this.overflow; - var badChar = this.badChar; - - if (overflow.length > 0) { - for (; i < src.length && overflow.length < 4; i++) - overflow.push(src[i]); - - if (overflow.length === 4) { - // NOTE: codepoint is a signed int32 and can be negative. - // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer). - if (isLE) { - codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24); - } else { - codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24); - } - overflow.length = 0; - - offset = _writeCodepoint(dst, offset, codepoint, badChar); - } - } - - // Main loop. Should be as optimized as possible. - for (; i < src.length - 3; i += 4) { - // NOTE: codepoint is a signed int32 and can be negative. - if (isLE) { - codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24); - } else { - codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24); - } - offset = _writeCodepoint(dst, offset, codepoint, badChar); - } - - // Keep overflowing bytes. - for (; i < src.length; i++) { - overflow.push(src[i]); - } - - return dst.slice(0, offset).toString('ucs2'); -}; - -function _writeCodepoint(dst, offset, codepoint, badChar) { - // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations. - if (codepoint < 0 || codepoint > 0x10FFFF) { - // Not a valid Unicode codepoint - codepoint = badChar; - } - - // Ephemeral Planes: Write high surrogate. - if (codepoint >= 0x10000) { - codepoint -= 0x10000; - - var high = 0xD800 | (codepoint >> 10); - dst[offset++] = high & 0xff; - dst[offset++] = high >> 8; - - // Low surrogate is written below. - var codepoint = 0xDC00 | (codepoint & 0x3FF); - } - - // Write BMP char or low surrogate. - dst[offset++] = codepoint & 0xff; - dst[offset++] = codepoint >> 8; - - return offset; -}; - -Utf32Decoder.prototype.end = function() { - this.overflow.length = 0; -}; - -// == UTF-32 Auto codec ============================================================= -// Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic. -// Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32 -// Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'}); - -// Encoder prepends BOM (which can be overridden with (addBOM: false}). - -exports.utf32 = Utf32AutoCodec; -exports.ucs4 = 'utf32'; - -function Utf32AutoCodec(options, iconv) { - this.iconv = iconv; -} - -Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder; -Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder; - -// -- Encoding - -function Utf32AutoEncoder(options, codec) { - options = options || {}; - - if (options.addBOM === undefined) - options.addBOM = true; - - this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options); -} - -Utf32AutoEncoder.prototype.write = function(str) { - return this.encoder.write(str); -}; - -Utf32AutoEncoder.prototype.end = function() { - return this.encoder.end(); -}; - -// -- Decoding - -function Utf32AutoDecoder(options, codec) { - this.decoder = null; - this.initialBufs = []; - this.initialBufsLen = 0; - this.options = options || {}; - this.iconv = codec.iconv; -} - -Utf32AutoDecoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf); - this.initialBufsLen += buf.length; - - if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below) - return ''; - - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.write(buf); -}; - -Utf32AutoDecoder.prototype.end = function() { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - var trail = this.decoder.end(); - if (trail) - resStr += trail; - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.end(); -}; - -function detectEncoding(bufs, defaultEncoding) { - var b = []; - var charsProcessed = 0; - var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE. - var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE. - - outer_loop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i]; - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]); - if (b.length === 4) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) { - return 'utf-32le'; - } - if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) { - return 'utf-32be'; - } - } - - if (b[0] !== 0 || b[1] > 0x10) invalidBE++; - if (b[3] !== 0 || b[2] > 0x10) invalidLE++; - - if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++; - if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++; - - b.length = 0; - charsProcessed++; - - if (charsProcessed >= 100) { - break outer_loop; - } - } - } - } - - // Make decisions. - if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be'; - if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le'; - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || 'utf-32le'; -} diff --git a/node_modules/iconv-lite/encodings/utf7.js b/node_modules/iconv-lite/encodings/utf7.js deleted file mode 100644 index eacae34..0000000 --- a/node_modules/iconv-lite/encodings/utf7.js +++ /dev/null @@ -1,290 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 -// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 - -exports.utf7 = Utf7Codec; -exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 -function Utf7Codec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7Codec.prototype.encoder = Utf7Encoder; -Utf7Codec.prototype.decoder = Utf7Decoder; -Utf7Codec.prototype.bomAware = true; - - -// -- Encoding - -var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; - -function Utf7Encoder(options, codec) { - this.iconv = codec.iconv; -} - -Utf7Encoder.prototype.write = function(str) { - // Naive implementation. - // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". - return Buffer.from(str.replace(nonDirectChars, function(chunk) { - return "+" + (chunk === '+' ? '' : - this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) - + "-"; - }.bind(this))); -} - -Utf7Encoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf7Decoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64Regex = /[A-Za-z0-9\/+]/; -var base64Chars = []; -for (var i = 0; i < 256; i++) - base64Chars[i] = base64Regex.test(String.fromCharCode(i)); - -var plusChar = '+'.charCodeAt(0), - minusChar = '-'.charCodeAt(0), - andChar = '&'.charCodeAt(0); - -Utf7Decoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '+' - if (buf[i] == plusChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64Chars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" - res += "+"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus is absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7Decoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - -// UTF-7-IMAP codec. -// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) -// Differences: -// * Base64 part is started by "&" instead of "+" -// * Direct characters are 0x20-0x7E, except "&" (0x26) -// * In Base64, "," is used instead of "/" -// * Base64 must not be used to represent direct characters. -// * No implicit shift back from Base64 (should always end with '-') -// * String must end in non-shifted position. -// * "-&" while in base64 is not allowed. - - -exports.utf7imap = Utf7IMAPCodec; -function Utf7IMAPCodec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; -Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; -Utf7IMAPCodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf7IMAPEncoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = Buffer.alloc(6); - this.base64AccumIdx = 0; -} - -Utf7IMAPEncoder.prototype.write = function(str) { - var inBase64 = this.inBase64, - base64Accum = this.base64Accum, - base64AccumIdx = this.base64AccumIdx, - buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; - - for (var i = 0; i < str.length; i++) { - var uChar = str.charCodeAt(i); - if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. - if (inBase64) { - if (base64AccumIdx > 0) { - bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - inBase64 = false; - } - - if (!inBase64) { - buf[bufIdx++] = uChar; // Write direct character - - if (uChar === andChar) // Ampersand -> '&-' - buf[bufIdx++] = minusChar; - } - - } else { // Non-direct character - if (!inBase64) { - buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. - inBase64 = true; - } - if (inBase64) { - base64Accum[base64AccumIdx++] = uChar >> 8; - base64Accum[base64AccumIdx++] = uChar & 0xFF; - - if (base64AccumIdx == base64Accum.length) { - bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); - base64AccumIdx = 0; - } - } - } - } - - this.inBase64 = inBase64; - this.base64AccumIdx = base64AccumIdx; - - return buf.slice(0, bufIdx); -} - -Utf7IMAPEncoder.prototype.end = function() { - var buf = Buffer.alloc(10), bufIdx = 0; - if (this.inBase64) { - if (this.base64AccumIdx > 0) { - bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - this.base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - this.inBase64 = false; - } - - return buf.slice(0, bufIdx); -} - - -// -- Decoding - -function Utf7IMAPDecoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64IMAPChars = base64Chars.slice(); -base64IMAPChars[','.charCodeAt(0)] = true; - -Utf7IMAPDecoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '&' - if (buf[i] == andChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64IMAPChars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" - res += "&"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/'); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus may be absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/'); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7IMAPDecoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - diff --git a/node_modules/iconv-lite/lib/bom-handling.js b/node_modules/iconv-lite/lib/bom-handling.js deleted file mode 100644 index 1050872..0000000 --- a/node_modules/iconv-lite/lib/bom-handling.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -var BOMChar = '\uFEFF'; - -exports.PrependBOM = PrependBOMWrapper -function PrependBOMWrapper(encoder, options) { - this.encoder = encoder; - this.addBOM = true; -} - -PrependBOMWrapper.prototype.write = function(str) { - if (this.addBOM) { - str = BOMChar + str; - this.addBOM = false; - } - - return this.encoder.write(str); -} - -PrependBOMWrapper.prototype.end = function() { - return this.encoder.end(); -} - - -//------------------------------------------------------------------------------ - -exports.StripBOM = StripBOMWrapper; -function StripBOMWrapper(decoder, options) { - this.decoder = decoder; - this.pass = false; - this.options = options || {}; -} - -StripBOMWrapper.prototype.write = function(buf) { - var res = this.decoder.write(buf); - if (this.pass || !res) - return res; - - if (res[0] === BOMChar) { - res = res.slice(1); - if (typeof this.options.stripBOM === 'function') - this.options.stripBOM(); - } - - this.pass = true; - return res; -} - -StripBOMWrapper.prototype.end = function() { - return this.decoder.end(); -} - diff --git a/node_modules/iconv-lite/lib/index.d.ts b/node_modules/iconv-lite/lib/index.d.ts deleted file mode 100644 index 99f200f..0000000 --- a/node_modules/iconv-lite/lib/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - * REQUIREMENT: This definition is dependent on the @types/node definition. - * Install with `npm install @types/node --save-dev` - *--------------------------------------------------------------------------------------------*/ - -declare module 'iconv-lite' { - // Basic API - export function decode(buffer: Buffer, encoding: string, options?: Options): string; - - export function encode(content: string, encoding: string, options?: Options): Buffer; - - export function encodingExists(encoding: string): boolean; - - // Stream API - export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; - - export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; - - // Low-level stream APIs - export function getEncoder(encoding: string, options?: Options): EncoderStream; - - export function getDecoder(encoding: string, options?: Options): DecoderStream; -} - -export interface Options { - stripBOM?: boolean; - addBOM?: boolean; - defaultEncoding?: string; -} - -export interface EncoderStream { - write(str: string): Buffer; - end(): Buffer | undefined; -} - -export interface DecoderStream { - write(buf: Buffer): string; - end(): string | undefined; -} diff --git a/node_modules/iconv-lite/lib/index.js b/node_modules/iconv-lite/lib/index.js deleted file mode 100644 index 657701c..0000000 --- a/node_modules/iconv-lite/lib/index.js +++ /dev/null @@ -1,180 +0,0 @@ -"use strict"; - -var Buffer = require("safer-buffer").Buffer; - -var bomHandling = require("./bom-handling"), - iconv = module.exports; - -// All codecs and aliases are kept here, keyed by encoding name/alias. -// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. -iconv.encodings = null; - -// Characters emitted in case of error. -iconv.defaultCharUnicode = '�'; -iconv.defaultCharSingleByte = '?'; - -// Public API. -iconv.encode = function encode(str, encoding, options) { - str = "" + (str || ""); // Ensure string. - - var encoder = iconv.getEncoder(encoding, options); - - var res = encoder.write(str); - var trail = encoder.end(); - - return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; -} - -iconv.decode = function decode(buf, encoding, options) { - if (typeof buf === 'string') { - if (!iconv.skipDecodeWarning) { - console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); - iconv.skipDecodeWarning = true; - } - - buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. - } - - var decoder = iconv.getDecoder(encoding, options); - - var res = decoder.write(buf); - var trail = decoder.end(); - - return trail ? (res + trail) : res; -} - -iconv.encodingExists = function encodingExists(enc) { - try { - iconv.getCodec(enc); - return true; - } catch (e) { - return false; - } -} - -// Legacy aliases to convert functions -iconv.toEncoding = iconv.encode; -iconv.fromEncoding = iconv.decode; - -// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. -iconv._codecDataCache = {}; -iconv.getCodec = function getCodec(encoding) { - if (!iconv.encodings) - iconv.encodings = require("../encodings"); // Lazy load all encoding definitions. - - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - var enc = iconv._canonicalizeEncoding(encoding); - - // Traverse iconv.encodings to find actual codec. - var codecOptions = {}; - while (true) { - var codec = iconv._codecDataCache[enc]; - if (codec) - return codec; - - var codecDef = iconv.encodings[enc]; - - switch (typeof codecDef) { - case "string": // Direct alias to other encoding. - enc = codecDef; - break; - - case "object": // Alias with options. Can be layered. - for (var key in codecDef) - codecOptions[key] = codecDef[key]; - - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - enc = codecDef.type; - break; - - case "function": // Codec itself. - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - // The codec function must load all tables and return object with .encoder and .decoder methods. - // It'll be called only once (for each different options object). - codec = new codecDef(codecOptions, iconv); - - iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. - return codec; - - default: - throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); - } - } -} - -iconv._canonicalizeEncoding = function(encoding) { - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); -} - -iconv.getEncoder = function getEncoder(encoding, options) { - var codec = iconv.getCodec(encoding), - encoder = new codec.encoder(options, codec); - - if (codec.bomAware && options && options.addBOM) - encoder = new bomHandling.PrependBOM(encoder, options); - - return encoder; -} - -iconv.getDecoder = function getDecoder(encoding, options) { - var codec = iconv.getCodec(encoding), - decoder = new codec.decoder(options, codec); - - if (codec.bomAware && !(options && options.stripBOM === false)) - decoder = new bomHandling.StripBOM(decoder, options); - - return decoder; -} - -// Streaming API -// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add -// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default. -// If you would like to enable it explicitly, please add the following code to your app: -// > iconv.enableStreamingAPI(require('stream')); -iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) { - if (iconv.supportsStreams) - return; - - // Dependency-inject stream module to create IconvLite stream classes. - var streams = require("./streams")(stream_module); - - // Not public API yet, but expose the stream classes. - iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream; - iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream; - - // Streaming API. - iconv.encodeStream = function encodeStream(encoding, options) { - return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); - } - - iconv.decodeStream = function decodeStream(encoding, options) { - return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); - } - - iconv.supportsStreams = true; -} - -// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments). -var stream_module; -try { - stream_module = require("stream"); -} catch (e) {} - -if (stream_module && stream_module.Transform) { - iconv.enableStreamingAPI(stream_module); - -} else { - // In rare cases where 'stream' module is not available by default, throw a helpful exception. - iconv.encodeStream = iconv.decodeStream = function() { - throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); - }; -} - -if ("Ā" != "\u0100") { - console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); -} diff --git a/node_modules/iconv-lite/lib/streams.js b/node_modules/iconv-lite/lib/streams.js deleted file mode 100644 index a150648..0000000 --- a/node_modules/iconv-lite/lib/streams.js +++ /dev/null @@ -1,109 +0,0 @@ -"use strict"; - -var Buffer = require("safer-buffer").Buffer; - -// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), -// we opt to dependency-inject it instead of creating a hard dependency. -module.exports = function(stream_module) { - var Transform = stream_module.Transform; - - // == Encoder stream ======================================================= - - function IconvLiteEncoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.decodeStrings = false; // We accept only strings, so we don't need to decode them. - Transform.call(this, options); - } - - IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteEncoderStream } - }); - - IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { - if (typeof chunk != 'string') - return done(new Error("Iconv encoding stream needs strings as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteEncoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteEncoderStream.prototype.collect = function(cb) { - var chunks = []; - this.on('error', cb); - this.on('data', function(chunk) { chunks.push(chunk); }); - this.on('end', function() { - cb(null, Buffer.concat(chunks)); - }); - return this; - } - - - // == Decoder stream ======================================================= - - function IconvLiteDecoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.encoding = this.encoding = 'utf8'; // We output strings. - Transform.call(this, options); - } - - IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteDecoderStream } - }); - - IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { - if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) - return done(new Error("Iconv decoding stream needs buffers as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteDecoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteDecoderStream.prototype.collect = function(cb) { - var res = ''; - this.on('error', cb); - this.on('data', function(chunk) { res += chunk; }); - this.on('end', function() { - cb(null, res); - }); - return this; - } - - return { - IconvLiteEncoderStream: IconvLiteEncoderStream, - IconvLiteDecoderStream: IconvLiteDecoderStream, - }; -}; diff --git a/node_modules/iconv-lite/package.json b/node_modules/iconv-lite/package.json deleted file mode 100644 index d351115..0000000 --- a/node_modules/iconv-lite/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "iconv-lite", - "description": "Convert character encodings in pure javascript.", - "version": "0.6.3", - "license": "MIT", - "keywords": [ - "iconv", - "convert", - "charset", - "icu" - ], - "author": "Alexander Shtuchkin ", - "main": "./lib/index.js", - "typings": "./lib/index.d.ts", - "homepage": "https://github.com/ashtuchkin/iconv-lite", - "bugs": "https://github.com/ashtuchkin/iconv-lite/issues", - "repository": { - "type": "git", - "url": "git://github.com/ashtuchkin/iconv-lite.git" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "coverage": "c8 _mocha --grep .", - "test": "mocha --reporter spec --grep ." - }, - "browser": { - "stream": false - }, - "devDependencies": { - "async": "^3.2.0", - "c8": "^7.2.0", - "errto": "^0.2.1", - "iconv": "^2.3.5", - "mocha": "^3.5.3", - "request": "^2.88.2", - "semver": "^6.3.0", - "unorm": "^1.6.0" - }, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } -} diff --git a/node_modules/lodash/LICENSE b/node_modules/lodash/LICENSE deleted file mode 100644 index 77c42f1..0000000 --- a/node_modules/lodash/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright OpenJS Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -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. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash/README.md b/node_modules/lodash/README.md deleted file mode 100644 index 3ab1a05..0000000 --- a/node_modules/lodash/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# lodash v4.17.21 - -The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. - -## Installation - -Using npm: -```shell -$ npm i -g npm -$ npm i --save lodash -``` - -In Node.js: -```js -// Load the full build. -var _ = require('lodash'); -// Load the core build. -var _ = require('lodash/core'); -// Load the FP build for immutable auto-curried iteratee-first data-last methods. -var fp = require('lodash/fp'); - -// Load method categories. -var array = require('lodash/array'); -var object = require('lodash/fp/object'); - -// Cherry-pick methods for smaller browserify/rollup/webpack bundles. -var at = require('lodash/at'); -var curryN = require('lodash/fp/curryN'); -``` - -See the [package source](https://github.com/lodash/lodash/tree/4.17.21-npm) for more details. - -**Note:**
-Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. - -## Support - -Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.
-Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/node_modules/lodash/_DataView.js b/node_modules/lodash/_DataView.js deleted file mode 100644 index ac2d57c..0000000 --- a/node_modules/lodash/_DataView.js +++ /dev/null @@ -1,7 +0,0 @@ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var DataView = getNative(root, 'DataView'); - -module.exports = DataView; diff --git a/node_modules/lodash/_Hash.js b/node_modules/lodash/_Hash.js deleted file mode 100644 index b504fe3..0000000 --- a/node_modules/lodash/_Hash.js +++ /dev/null @@ -1,32 +0,0 @@ -var hashClear = require('./_hashClear'), - hashDelete = require('./_hashDelete'), - hashGet = require('./_hashGet'), - hashHas = require('./_hashHas'), - hashSet = require('./_hashSet'); - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; - -module.exports = Hash; diff --git a/node_modules/lodash/_LazyWrapper.js b/node_modules/lodash/_LazyWrapper.js deleted file mode 100644 index 81786c7..0000000 --- a/node_modules/lodash/_LazyWrapper.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseCreate = require('./_baseCreate'), - baseLodash = require('./_baseLodash'); - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295; - -/** - * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. - * - * @private - * @constructor - * @param {*} value The value to wrap. - */ -function LazyWrapper(value) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__dir__ = 1; - this.__filtered__ = false; - this.__iteratees__ = []; - this.__takeCount__ = MAX_ARRAY_LENGTH; - this.__views__ = []; -} - -// Ensure `LazyWrapper` is an instance of `baseLodash`. -LazyWrapper.prototype = baseCreate(baseLodash.prototype); -LazyWrapper.prototype.constructor = LazyWrapper; - -module.exports = LazyWrapper; diff --git a/node_modules/lodash/_ListCache.js b/node_modules/lodash/_ListCache.js deleted file mode 100644 index 26895c3..0000000 --- a/node_modules/lodash/_ListCache.js +++ /dev/null @@ -1,32 +0,0 @@ -var listCacheClear = require('./_listCacheClear'), - listCacheDelete = require('./_listCacheDelete'), - listCacheGet = require('./_listCacheGet'), - listCacheHas = require('./_listCacheHas'), - listCacheSet = require('./_listCacheSet'); - -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; - -module.exports = ListCache; diff --git a/node_modules/lodash/_LodashWrapper.js b/node_modules/lodash/_LodashWrapper.js deleted file mode 100644 index c1e4d9d..0000000 --- a/node_modules/lodash/_LodashWrapper.js +++ /dev/null @@ -1,22 +0,0 @@ -var baseCreate = require('./_baseCreate'), - baseLodash = require('./_baseLodash'); - -/** - * The base constructor for creating `lodash` wrapper objects. - * - * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable explicit method chain sequences. - */ -function LodashWrapper(value, chainAll) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__chain__ = !!chainAll; - this.__index__ = 0; - this.__values__ = undefined; -} - -LodashWrapper.prototype = baseCreate(baseLodash.prototype); -LodashWrapper.prototype.constructor = LodashWrapper; - -module.exports = LodashWrapper; diff --git a/node_modules/lodash/_Map.js b/node_modules/lodash/_Map.js deleted file mode 100644 index b73f29a..0000000 --- a/node_modules/lodash/_Map.js +++ /dev/null @@ -1,7 +0,0 @@ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'); - -module.exports = Map; diff --git a/node_modules/lodash/_MapCache.js b/node_modules/lodash/_MapCache.js deleted file mode 100644 index 4a4eea7..0000000 --- a/node_modules/lodash/_MapCache.js +++ /dev/null @@ -1,32 +0,0 @@ -var mapCacheClear = require('./_mapCacheClear'), - mapCacheDelete = require('./_mapCacheDelete'), - mapCacheGet = require('./_mapCacheGet'), - mapCacheHas = require('./_mapCacheHas'), - mapCacheSet = require('./_mapCacheSet'); - -/** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; - -module.exports = MapCache; diff --git a/node_modules/lodash/_Promise.js b/node_modules/lodash/_Promise.js deleted file mode 100644 index 247b9e1..0000000 --- a/node_modules/lodash/_Promise.js +++ /dev/null @@ -1,7 +0,0 @@ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var Promise = getNative(root, 'Promise'); - -module.exports = Promise; diff --git a/node_modules/lodash/_Set.js b/node_modules/lodash/_Set.js deleted file mode 100644 index b3c8dcb..0000000 --- a/node_modules/lodash/_Set.js +++ /dev/null @@ -1,7 +0,0 @@ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var Set = getNative(root, 'Set'); - -module.exports = Set; diff --git a/node_modules/lodash/_SetCache.js b/node_modules/lodash/_SetCache.js deleted file mode 100644 index 6468b06..0000000 --- a/node_modules/lodash/_SetCache.js +++ /dev/null @@ -1,27 +0,0 @@ -var MapCache = require('./_MapCache'), - setCacheAdd = require('./_setCacheAdd'), - setCacheHas = require('./_setCacheHas'); - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; -SetCache.prototype.has = setCacheHas; - -module.exports = SetCache; diff --git a/node_modules/lodash/_Stack.js b/node_modules/lodash/_Stack.js deleted file mode 100644 index 80b2cf1..0000000 --- a/node_modules/lodash/_Stack.js +++ /dev/null @@ -1,27 +0,0 @@ -var ListCache = require('./_ListCache'), - stackClear = require('./_stackClear'), - stackDelete = require('./_stackDelete'), - stackGet = require('./_stackGet'), - stackHas = require('./_stackHas'), - stackSet = require('./_stackSet'); - -/** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; -} - -// Add methods to `Stack`. -Stack.prototype.clear = stackClear; -Stack.prototype['delete'] = stackDelete; -Stack.prototype.get = stackGet; -Stack.prototype.has = stackHas; -Stack.prototype.set = stackSet; - -module.exports = Stack; diff --git a/node_modules/lodash/_Symbol.js b/node_modules/lodash/_Symbol.js deleted file mode 100644 index a013f7c..0000000 --- a/node_modules/lodash/_Symbol.js +++ /dev/null @@ -1,6 +0,0 @@ -var root = require('./_root'); - -/** Built-in value references. */ -var Symbol = root.Symbol; - -module.exports = Symbol; diff --git a/node_modules/lodash/_Uint8Array.js b/node_modules/lodash/_Uint8Array.js deleted file mode 100644 index 2fb30e1..0000000 --- a/node_modules/lodash/_Uint8Array.js +++ /dev/null @@ -1,6 +0,0 @@ -var root = require('./_root'); - -/** Built-in value references. */ -var Uint8Array = root.Uint8Array; - -module.exports = Uint8Array; diff --git a/node_modules/lodash/_WeakMap.js b/node_modules/lodash/_WeakMap.js deleted file mode 100644 index 567f86c..0000000 --- a/node_modules/lodash/_WeakMap.js +++ /dev/null @@ -1,7 +0,0 @@ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var WeakMap = getNative(root, 'WeakMap'); - -module.exports = WeakMap; diff --git a/node_modules/lodash/_apply.js b/node_modules/lodash/_apply.js deleted file mode 100644 index 36436dd..0000000 --- a/node_modules/lodash/_apply.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); -} - -module.exports = apply; diff --git a/node_modules/lodash/_arrayAggregator.js b/node_modules/lodash/_arrayAggregator.js deleted file mode 100644 index d96c3ca..0000000 --- a/node_modules/lodash/_arrayAggregator.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * A specialized version of `baseAggregator` for arrays. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ -function arrayAggregator(array, setter, iteratee, accumulator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - var value = array[index]; - setter(accumulator, value, iteratee(value), array); - } - return accumulator; -} - -module.exports = arrayAggregator; diff --git a/node_modules/lodash/_arrayEach.js b/node_modules/lodash/_arrayEach.js deleted file mode 100644 index 2c5f579..0000000 --- a/node_modules/lodash/_arrayEach.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -module.exports = arrayEach; diff --git a/node_modules/lodash/_arrayEachRight.js b/node_modules/lodash/_arrayEachRight.js deleted file mode 100644 index 976ca5c..0000000 --- a/node_modules/lodash/_arrayEachRight.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A specialized version of `_.forEachRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEachRight(array, iteratee) { - var length = array == null ? 0 : array.length; - - while (length--) { - if (iteratee(array[length], length, array) === false) { - break; - } - } - return array; -} - -module.exports = arrayEachRight; diff --git a/node_modules/lodash/_arrayEvery.js b/node_modules/lodash/_arrayEvery.js deleted file mode 100644 index e26a918..0000000 --- a/node_modules/lodash/_arrayEvery.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * A specialized version of `_.every` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - */ -function arrayEvery(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (!predicate(array[index], index, array)) { - return false; - } - } - return true; -} - -module.exports = arrayEvery; diff --git a/node_modules/lodash/_arrayFilter.js b/node_modules/lodash/_arrayFilter.js deleted file mode 100644 index 75ea254..0000000 --- a/node_modules/lodash/_arrayFilter.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -module.exports = arrayFilter; diff --git a/node_modules/lodash/_arrayIncludes.js b/node_modules/lodash/_arrayIncludes.js deleted file mode 100644 index 3737a6d..0000000 --- a/node_modules/lodash/_arrayIncludes.js +++ /dev/null @@ -1,17 +0,0 @@ -var baseIndexOf = require('./_baseIndexOf'); - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; -} - -module.exports = arrayIncludes; diff --git a/node_modules/lodash/_arrayIncludesWith.js b/node_modules/lodash/_arrayIncludesWith.js deleted file mode 100644 index 235fd97..0000000 --- a/node_modules/lodash/_arrayIncludesWith.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -module.exports = arrayIncludesWith; diff --git a/node_modules/lodash/_arrayLikeKeys.js b/node_modules/lodash/_arrayLikeKeys.js deleted file mode 100644 index b2ec9ce..0000000 --- a/node_modules/lodash/_arrayLikeKeys.js +++ /dev/null @@ -1,49 +0,0 @@ -var baseTimes = require('./_baseTimes'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isBuffer = require('./isBuffer'), - isIndex = require('./_isIndex'), - isTypedArray = require('./isTypedArray'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; -} - -module.exports = arrayLikeKeys; diff --git a/node_modules/lodash/_arrayMap.js b/node_modules/lodash/_arrayMap.js deleted file mode 100644 index 22b2246..0000000 --- a/node_modules/lodash/_arrayMap.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -module.exports = arrayMap; diff --git a/node_modules/lodash/_arrayPush.js b/node_modules/lodash/_arrayPush.js deleted file mode 100644 index 7d742b3..0000000 --- a/node_modules/lodash/_arrayPush.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -module.exports = arrayPush; diff --git a/node_modules/lodash/_arrayReduce.js b/node_modules/lodash/_arrayReduce.js deleted file mode 100644 index de8b79b..0000000 --- a/node_modules/lodash/_arrayReduce.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -module.exports = arrayReduce; diff --git a/node_modules/lodash/_arrayReduceRight.js b/node_modules/lodash/_arrayReduceRight.js deleted file mode 100644 index 22d8976..0000000 --- a/node_modules/lodash/_arrayReduceRight.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * A specialized version of `_.reduceRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the last element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array == null ? 0 : array.length; - if (initAccum && length) { - accumulator = array[--length]; - } - while (length--) { - accumulator = iteratee(accumulator, array[length], length, array); - } - return accumulator; -} - -module.exports = arrayReduceRight; diff --git a/node_modules/lodash/_arraySample.js b/node_modules/lodash/_arraySample.js deleted file mode 100644 index fcab010..0000000 --- a/node_modules/lodash/_arraySample.js +++ /dev/null @@ -1,15 +0,0 @@ -var baseRandom = require('./_baseRandom'); - -/** - * A specialized version of `_.sample` for arrays. - * - * @private - * @param {Array} array The array to sample. - * @returns {*} Returns the random element. - */ -function arraySample(array) { - var length = array.length; - return length ? array[baseRandom(0, length - 1)] : undefined; -} - -module.exports = arraySample; diff --git a/node_modules/lodash/_arraySampleSize.js b/node_modules/lodash/_arraySampleSize.js deleted file mode 100644 index 8c7e364..0000000 --- a/node_modules/lodash/_arraySampleSize.js +++ /dev/null @@ -1,17 +0,0 @@ -var baseClamp = require('./_baseClamp'), - copyArray = require('./_copyArray'), - shuffleSelf = require('./_shuffleSelf'); - -/** - * A specialized version of `_.sampleSize` for arrays. - * - * @private - * @param {Array} array The array to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. - */ -function arraySampleSize(array, n) { - return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); -} - -module.exports = arraySampleSize; diff --git a/node_modules/lodash/_arrayShuffle.js b/node_modules/lodash/_arrayShuffle.js deleted file mode 100644 index 46313a3..0000000 --- a/node_modules/lodash/_arrayShuffle.js +++ /dev/null @@ -1,15 +0,0 @@ -var copyArray = require('./_copyArray'), - shuffleSelf = require('./_shuffleSelf'); - -/** - * A specialized version of `_.shuffle` for arrays. - * - * @private - * @param {Array} array The array to shuffle. - * @returns {Array} Returns the new shuffled array. - */ -function arrayShuffle(array) { - return shuffleSelf(copyArray(array)); -} - -module.exports = arrayShuffle; diff --git a/node_modules/lodash/_arraySome.js b/node_modules/lodash/_arraySome.js deleted file mode 100644 index 6fd02fd..0000000 --- a/node_modules/lodash/_arraySome.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -module.exports = arraySome; diff --git a/node_modules/lodash/_asciiSize.js b/node_modules/lodash/_asciiSize.js deleted file mode 100644 index 11d29c3..0000000 --- a/node_modules/lodash/_asciiSize.js +++ /dev/null @@ -1,12 +0,0 @@ -var baseProperty = require('./_baseProperty'); - -/** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -var asciiSize = baseProperty('length'); - -module.exports = asciiSize; diff --git a/node_modules/lodash/_asciiToArray.js b/node_modules/lodash/_asciiToArray.js deleted file mode 100644 index 8e3dd5b..0000000 --- a/node_modules/lodash/_asciiToArray.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Converts an ASCII `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function asciiToArray(string) { - return string.split(''); -} - -module.exports = asciiToArray; diff --git a/node_modules/lodash/_asciiWords.js b/node_modules/lodash/_asciiWords.js deleted file mode 100644 index d765f0f..0000000 --- a/node_modules/lodash/_asciiWords.js +++ /dev/null @@ -1,15 +0,0 @@ -/** Used to match words composed of alphanumeric characters. */ -var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; - -/** - * Splits an ASCII `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ -function asciiWords(string) { - return string.match(reAsciiWord) || []; -} - -module.exports = asciiWords; diff --git a/node_modules/lodash/_assignMergeValue.js b/node_modules/lodash/_assignMergeValue.js deleted file mode 100644 index cb1185e..0000000 --- a/node_modules/lodash/_assignMergeValue.js +++ /dev/null @@ -1,20 +0,0 @@ -var baseAssignValue = require('./_baseAssignValue'), - eq = require('./eq'); - -/** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignMergeValue(object, key, value) { - if ((value !== undefined && !eq(object[key], value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } -} - -module.exports = assignMergeValue; diff --git a/node_modules/lodash/_assignValue.js b/node_modules/lodash/_assignValue.js deleted file mode 100644 index 4083957..0000000 --- a/node_modules/lodash/_assignValue.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseAssignValue = require('./_baseAssignValue'), - eq = require('./eq'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } -} - -module.exports = assignValue; diff --git a/node_modules/lodash/_assocIndexOf.js b/node_modules/lodash/_assocIndexOf.js deleted file mode 100644 index 5b77a2b..0000000 --- a/node_modules/lodash/_assocIndexOf.js +++ /dev/null @@ -1,21 +0,0 @@ -var eq = require('./eq'); - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} - -module.exports = assocIndexOf; diff --git a/node_modules/lodash/_baseAggregator.js b/node_modules/lodash/_baseAggregator.js deleted file mode 100644 index 4bc9e91..0000000 --- a/node_modules/lodash/_baseAggregator.js +++ /dev/null @@ -1,21 +0,0 @@ -var baseEach = require('./_baseEach'); - -/** - * Aggregates elements of `collection` on `accumulator` with keys transformed - * by `iteratee` and values set by `setter`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ -function baseAggregator(collection, setter, iteratee, accumulator) { - baseEach(collection, function(value, key, collection) { - setter(accumulator, value, iteratee(value), collection); - }); - return accumulator; -} - -module.exports = baseAggregator; diff --git a/node_modules/lodash/_baseAssign.js b/node_modules/lodash/_baseAssign.js deleted file mode 100644 index e5c4a1a..0000000 --- a/node_modules/lodash/_baseAssign.js +++ /dev/null @@ -1,17 +0,0 @@ -var copyObject = require('./_copyObject'), - keys = require('./keys'); - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); -} - -module.exports = baseAssign; diff --git a/node_modules/lodash/_baseAssignIn.js b/node_modules/lodash/_baseAssignIn.js deleted file mode 100644 index 6624f90..0000000 --- a/node_modules/lodash/_baseAssignIn.js +++ /dev/null @@ -1,17 +0,0 @@ -var copyObject = require('./_copyObject'), - keysIn = require('./keysIn'); - -/** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssignIn(object, source) { - return object && copyObject(source, keysIn(source), object); -} - -module.exports = baseAssignIn; diff --git a/node_modules/lodash/_baseAssignValue.js b/node_modules/lodash/_baseAssignValue.js deleted file mode 100644 index d6f66ef..0000000 --- a/node_modules/lodash/_baseAssignValue.js +++ /dev/null @@ -1,25 +0,0 @@ -var defineProperty = require('./_defineProperty'); - -/** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function baseAssignValue(object, key, value) { - if (key == '__proto__' && defineProperty) { - defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } -} - -module.exports = baseAssignValue; diff --git a/node_modules/lodash/_baseAt.js b/node_modules/lodash/_baseAt.js deleted file mode 100644 index 90e4237..0000000 --- a/node_modules/lodash/_baseAt.js +++ /dev/null @@ -1,23 +0,0 @@ -var get = require('./get'); - -/** - * The base implementation of `_.at` without support for individual paths. - * - * @private - * @param {Object} object The object to iterate over. - * @param {string[]} paths The property paths to pick. - * @returns {Array} Returns the picked elements. - */ -function baseAt(object, paths) { - var index = -1, - length = paths.length, - result = Array(length), - skip = object == null; - - while (++index < length) { - result[index] = skip ? undefined : get(object, paths[index]); - } - return result; -} - -module.exports = baseAt; diff --git a/node_modules/lodash/_baseClamp.js b/node_modules/lodash/_baseClamp.js deleted file mode 100644 index a1c5692..0000000 --- a/node_modules/lodash/_baseClamp.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * The base implementation of `_.clamp` which doesn't coerce arguments. - * - * @private - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - */ -function baseClamp(number, lower, upper) { - if (number === number) { - if (upper !== undefined) { - number = number <= upper ? number : upper; - } - if (lower !== undefined) { - number = number >= lower ? number : lower; - } - } - return number; -} - -module.exports = baseClamp; diff --git a/node_modules/lodash/_baseClone.js b/node_modules/lodash/_baseClone.js deleted file mode 100644 index 69f8705..0000000 --- a/node_modules/lodash/_baseClone.js +++ /dev/null @@ -1,166 +0,0 @@ -var Stack = require('./_Stack'), - arrayEach = require('./_arrayEach'), - assignValue = require('./_assignValue'), - baseAssign = require('./_baseAssign'), - baseAssignIn = require('./_baseAssignIn'), - cloneBuffer = require('./_cloneBuffer'), - copyArray = require('./_copyArray'), - copySymbols = require('./_copySymbols'), - copySymbolsIn = require('./_copySymbolsIn'), - getAllKeys = require('./_getAllKeys'), - getAllKeysIn = require('./_getAllKeysIn'), - getTag = require('./_getTag'), - initCloneArray = require('./_initCloneArray'), - initCloneByTag = require('./_initCloneByTag'), - initCloneObject = require('./_initCloneObject'), - isArray = require('./isArray'), - isBuffer = require('./isBuffer'), - isMap = require('./isMap'), - isObject = require('./isObject'), - isSet = require('./isSet'), - keys = require('./keys'), - keysIn = require('./keysIn'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = -cloneableTags[boolTag] = cloneableTags[dateTag] = -cloneableTags[float32Tag] = cloneableTags[float64Tag] = -cloneableTags[int8Tag] = cloneableTags[int16Tag] = -cloneableTags[int32Tag] = cloneableTags[mapTag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[setTag] = -cloneableTags[stringTag] = cloneableTags[symbolTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; - - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : initCloneObject(value); - if (!isDeep) { - return isFlat - ? copySymbolsIn(value, baseAssignIn(result, value)) - : copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? getAllKeysIn : getAllKeys) - : (isFlat ? keysIn : keys); - - var props = isArr ? undefined : keysFunc(value); - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} - -module.exports = baseClone; diff --git a/node_modules/lodash/_baseConforms.js b/node_modules/lodash/_baseConforms.js deleted file mode 100644 index 947e20d..0000000 --- a/node_modules/lodash/_baseConforms.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseConformsTo = require('./_baseConformsTo'), - keys = require('./keys'); - -/** - * The base implementation of `_.conforms` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new spec function. - */ -function baseConforms(source) { - var props = keys(source); - return function(object) { - return baseConformsTo(object, source, props); - }; -} - -module.exports = baseConforms; diff --git a/node_modules/lodash/_baseConformsTo.js b/node_modules/lodash/_baseConformsTo.js deleted file mode 100644 index e449cb8..0000000 --- a/node_modules/lodash/_baseConformsTo.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * The base implementation of `_.conformsTo` which accepts `props` to check. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. - */ -function baseConformsTo(object, source, props) { - var length = props.length; - if (object == null) { - return !length; - } - object = Object(object); - while (length--) { - var key = props[length], - predicate = source[key], - value = object[key]; - - if ((value === undefined && !(key in object)) || !predicate(value)) { - return false; - } - } - return true; -} - -module.exports = baseConformsTo; diff --git a/node_modules/lodash/_baseCreate.js b/node_modules/lodash/_baseCreate.js deleted file mode 100644 index ffa6a52..0000000 --- a/node_modules/lodash/_baseCreate.js +++ /dev/null @@ -1,30 +0,0 @@ -var isObject = require('./isObject'); - -/** Built-in value references. */ -var objectCreate = Object.create; - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ -var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; -}()); - -module.exports = baseCreate; diff --git a/node_modules/lodash/_baseDelay.js b/node_modules/lodash/_baseDelay.js deleted file mode 100644 index 1486d69..0000000 --- a/node_modules/lodash/_baseDelay.js +++ /dev/null @@ -1,21 +0,0 @@ -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * The base implementation of `_.delay` and `_.defer` which accepts `args` - * to provide to `func`. - * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {Array} args The arguments to provide to `func`. - * @returns {number|Object} Returns the timer id or timeout object. - */ -function baseDelay(func, wait, args) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return setTimeout(function() { func.apply(undefined, args); }, wait); -} - -module.exports = baseDelay; diff --git a/node_modules/lodash/_baseDifference.js b/node_modules/lodash/_baseDifference.js deleted file mode 100644 index 343ac19..0000000 --- a/node_modules/lodash/_baseDifference.js +++ /dev/null @@ -1,67 +0,0 @@ -var SetCache = require('./_SetCache'), - arrayIncludes = require('./_arrayIncludes'), - arrayIncludesWith = require('./_arrayIncludesWith'), - arrayMap = require('./_arrayMap'), - baseUnary = require('./_baseUnary'), - cacheHas = require('./_cacheHas'); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of methods like `_.difference` without support - * for excluding multiple arrays or iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Array} values The values to exclude. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - */ -function baseDifference(array, values, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - isCommon = true, - length = array.length, - result = [], - valuesLength = values.length; - - if (!length) { - return result; - } - if (iteratee) { - values = arrayMap(values, baseUnary(iteratee)); - } - if (comparator) { - includes = arrayIncludesWith; - isCommon = false; - } - else if (values.length >= LARGE_ARRAY_SIZE) { - includes = cacheHas; - isCommon = false; - values = new SetCache(values); - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee == null ? value : iteratee(value); - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var valuesIndex = valuesLength; - while (valuesIndex--) { - if (values[valuesIndex] === computed) { - continue outer; - } - } - result.push(value); - } - else if (!includes(values, computed, comparator)) { - result.push(value); - } - } - return result; -} - -module.exports = baseDifference; diff --git a/node_modules/lodash/_baseEach.js b/node_modules/lodash/_baseEach.js deleted file mode 100644 index 512c067..0000000 --- a/node_modules/lodash/_baseEach.js +++ /dev/null @@ -1,14 +0,0 @@ -var baseForOwn = require('./_baseForOwn'), - createBaseEach = require('./_createBaseEach'); - -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = createBaseEach(baseForOwn); - -module.exports = baseEach; diff --git a/node_modules/lodash/_baseEachRight.js b/node_modules/lodash/_baseEachRight.js deleted file mode 100644 index 0a8feec..0000000 --- a/node_modules/lodash/_baseEachRight.js +++ /dev/null @@ -1,14 +0,0 @@ -var baseForOwnRight = require('./_baseForOwnRight'), - createBaseEach = require('./_createBaseEach'); - -/** - * The base implementation of `_.forEachRight` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEachRight = createBaseEach(baseForOwnRight, true); - -module.exports = baseEachRight; diff --git a/node_modules/lodash/_baseEvery.js b/node_modules/lodash/_baseEvery.js deleted file mode 100644 index fa52f7b..0000000 --- a/node_modules/lodash/_baseEvery.js +++ /dev/null @@ -1,21 +0,0 @@ -var baseEach = require('./_baseEach'); - -/** - * The base implementation of `_.every` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` - */ -function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; - }); - return result; -} - -module.exports = baseEvery; diff --git a/node_modules/lodash/_baseExtremum.js b/node_modules/lodash/_baseExtremum.js deleted file mode 100644 index 9d6aa77..0000000 --- a/node_modules/lodash/_baseExtremum.js +++ /dev/null @@ -1,32 +0,0 @@ -var isSymbol = require('./isSymbol'); - -/** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !isSymbol(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; -} - -module.exports = baseExtremum; diff --git a/node_modules/lodash/_baseFill.js b/node_modules/lodash/_baseFill.js deleted file mode 100644 index 46ef9c7..0000000 --- a/node_modules/lodash/_baseFill.js +++ /dev/null @@ -1,32 +0,0 @@ -var toInteger = require('./toInteger'), - toLength = require('./toLength'); - -/** - * The base implementation of `_.fill` without an iteratee call guard. - * - * @private - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - */ -function baseFill(array, value, start, end) { - var length = array.length; - - start = toInteger(start); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : toInteger(end); - if (end < 0) { - end += length; - } - end = start > end ? 0 : toLength(end); - while (start < end) { - array[start++] = value; - } - return array; -} - -module.exports = baseFill; diff --git a/node_modules/lodash/_baseFilter.js b/node_modules/lodash/_baseFilter.js deleted file mode 100644 index 4678477..0000000 --- a/node_modules/lodash/_baseFilter.js +++ /dev/null @@ -1,21 +0,0 @@ -var baseEach = require('./_baseEach'); - -/** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; -} - -module.exports = baseFilter; diff --git a/node_modules/lodash/_baseFindIndex.js b/node_modules/lodash/_baseFindIndex.js deleted file mode 100644 index e3f5d8a..0000000 --- a/node_modules/lodash/_baseFindIndex.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -module.exports = baseFindIndex; diff --git a/node_modules/lodash/_baseFindKey.js b/node_modules/lodash/_baseFindKey.js deleted file mode 100644 index 2e430f3..0000000 --- a/node_modules/lodash/_baseFindKey.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * The base implementation of methods like `_.findKey` and `_.findLastKey`, - * without support for iteratee shorthands, which iterates over `collection` - * using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the found element or its key, else `undefined`. - */ -function baseFindKey(collection, predicate, eachFunc) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = key; - return false; - } - }); - return result; -} - -module.exports = baseFindKey; diff --git a/node_modules/lodash/_baseFlatten.js b/node_modules/lodash/_baseFlatten.js deleted file mode 100644 index 4b1e009..0000000 --- a/node_modules/lodash/_baseFlatten.js +++ /dev/null @@ -1,38 +0,0 @@ -var arrayPush = require('./_arrayPush'), - isFlattenable = require('./_isFlattenable'); - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -module.exports = baseFlatten; diff --git a/node_modules/lodash/_baseFor.js b/node_modules/lodash/_baseFor.js deleted file mode 100644 index d946590..0000000 --- a/node_modules/lodash/_baseFor.js +++ /dev/null @@ -1,16 +0,0 @@ -var createBaseFor = require('./_createBaseFor'); - -/** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); - -module.exports = baseFor; diff --git a/node_modules/lodash/_baseForOwn.js b/node_modules/lodash/_baseForOwn.js deleted file mode 100644 index 503d523..0000000 --- a/node_modules/lodash/_baseForOwn.js +++ /dev/null @@ -1,16 +0,0 @@ -var baseFor = require('./_baseFor'), - keys = require('./keys'); - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); -} - -module.exports = baseForOwn; diff --git a/node_modules/lodash/_baseForOwnRight.js b/node_modules/lodash/_baseForOwnRight.js deleted file mode 100644 index a4b10e6..0000000 --- a/node_modules/lodash/_baseForOwnRight.js +++ /dev/null @@ -1,16 +0,0 @@ -var baseForRight = require('./_baseForRight'), - keys = require('./keys'); - -/** - * The base implementation of `_.forOwnRight` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwnRight(object, iteratee) { - return object && baseForRight(object, iteratee, keys); -} - -module.exports = baseForOwnRight; diff --git a/node_modules/lodash/_baseForRight.js b/node_modules/lodash/_baseForRight.js deleted file mode 100644 index 32842cd..0000000 --- a/node_modules/lodash/_baseForRight.js +++ /dev/null @@ -1,15 +0,0 @@ -var createBaseFor = require('./_createBaseFor'); - -/** - * This function is like `baseFor` except that it iterates over properties - * in the opposite order. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseForRight = createBaseFor(true); - -module.exports = baseForRight; diff --git a/node_modules/lodash/_baseFunctions.js b/node_modules/lodash/_baseFunctions.js deleted file mode 100644 index d23bc9b..0000000 --- a/node_modules/lodash/_baseFunctions.js +++ /dev/null @@ -1,19 +0,0 @@ -var arrayFilter = require('./_arrayFilter'), - isFunction = require('./isFunction'); - -/** - * The base implementation of `_.functions` which creates an array of - * `object` function property names filtered from `props`. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} props The property names to filter. - * @returns {Array} Returns the function names. - */ -function baseFunctions(object, props) { - return arrayFilter(props, function(key) { - return isFunction(object[key]); - }); -} - -module.exports = baseFunctions; diff --git a/node_modules/lodash/_baseGet.js b/node_modules/lodash/_baseGet.js deleted file mode 100644 index a194913..0000000 --- a/node_modules/lodash/_baseGet.js +++ /dev/null @@ -1,24 +0,0 @@ -var castPath = require('./_castPath'), - toKey = require('./_toKey'); - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = castPath(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -module.exports = baseGet; diff --git a/node_modules/lodash/_baseGetAllKeys.js b/node_modules/lodash/_baseGetAllKeys.js deleted file mode 100644 index 8ad204e..0000000 --- a/node_modules/lodash/_baseGetAllKeys.js +++ /dev/null @@ -1,20 +0,0 @@ -var arrayPush = require('./_arrayPush'), - isArray = require('./isArray'); - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); -} - -module.exports = baseGetAllKeys; diff --git a/node_modules/lodash/_baseGetTag.js b/node_modules/lodash/_baseGetTag.js deleted file mode 100644 index b927ccc..0000000 --- a/node_modules/lodash/_baseGetTag.js +++ /dev/null @@ -1,28 +0,0 @@ -var Symbol = require('./_Symbol'), - getRawTag = require('./_getRawTag'), - objectToString = require('./_objectToString'); - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -module.exports = baseGetTag; diff --git a/node_modules/lodash/_baseGt.js b/node_modules/lodash/_baseGt.js deleted file mode 100644 index 502d273..0000000 --- a/node_modules/lodash/_baseGt.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -module.exports = baseGt; diff --git a/node_modules/lodash/_baseHas.js b/node_modules/lodash/_baseHas.js deleted file mode 100644 index 1b73032..0000000 --- a/node_modules/lodash/_baseHas.js +++ /dev/null @@ -1,19 +0,0 @@ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && hasOwnProperty.call(object, key); -} - -module.exports = baseHas; diff --git a/node_modules/lodash/_baseHasIn.js b/node_modules/lodash/_baseHasIn.js deleted file mode 100644 index 2e0d042..0000000 --- a/node_modules/lodash/_baseHasIn.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -module.exports = baseHasIn; diff --git a/node_modules/lodash/_baseInRange.js b/node_modules/lodash/_baseInRange.js deleted file mode 100644 index ec95666..0000000 --- a/node_modules/lodash/_baseInRange.js +++ /dev/null @@ -1,18 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * The base implementation of `_.inRange` which doesn't coerce arguments. - * - * @private - * @param {number} number The number to check. - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. - */ -function baseInRange(number, start, end) { - return number >= nativeMin(start, end) && number < nativeMax(start, end); -} - -module.exports = baseInRange; diff --git a/node_modules/lodash/_baseIndexOf.js b/node_modules/lodash/_baseIndexOf.js deleted file mode 100644 index 167e706..0000000 --- a/node_modules/lodash/_baseIndexOf.js +++ /dev/null @@ -1,20 +0,0 @@ -var baseFindIndex = require('./_baseFindIndex'), - baseIsNaN = require('./_baseIsNaN'), - strictIndexOf = require('./_strictIndexOf'); - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); -} - -module.exports = baseIndexOf; diff --git a/node_modules/lodash/_baseIndexOfWith.js b/node_modules/lodash/_baseIndexOfWith.js deleted file mode 100644 index f815fe0..0000000 --- a/node_modules/lodash/_baseIndexOfWith.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This function is like `baseIndexOf` except that it accepts a comparator. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @param {Function} comparator The comparator invoked per element. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOfWith(array, value, fromIndex, comparator) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (comparator(array[index], value)) { - return index; - } - } - return -1; -} - -module.exports = baseIndexOfWith; diff --git a/node_modules/lodash/_baseIntersection.js b/node_modules/lodash/_baseIntersection.js deleted file mode 100644 index c1d250c..0000000 --- a/node_modules/lodash/_baseIntersection.js +++ /dev/null @@ -1,74 +0,0 @@ -var SetCache = require('./_SetCache'), - arrayIncludes = require('./_arrayIncludes'), - arrayIncludesWith = require('./_arrayIncludesWith'), - arrayMap = require('./_arrayMap'), - baseUnary = require('./_baseUnary'), - cacheHas = require('./_cacheHas'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * The base implementation of methods like `_.intersection`, without support - * for iteratee shorthands, that accepts an array of arrays to inspect. - * - * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of shared values. - */ -function baseIntersection(arrays, iteratee, comparator) { - var includes = comparator ? arrayIncludesWith : arrayIncludes, - length = arrays[0].length, - othLength = arrays.length, - othIndex = othLength, - caches = Array(othLength), - maxLength = Infinity, - result = []; - - while (othIndex--) { - var array = arrays[othIndex]; - if (othIndex && iteratee) { - array = arrayMap(array, baseUnary(iteratee)); - } - maxLength = nativeMin(array.length, maxLength); - caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) - ? new SetCache(othIndex && array) - : undefined; - } - array = arrays[0]; - - var index = -1, - seen = caches[0]; - - outer: - while (++index < length && result.length < maxLength) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (!(seen - ? cacheHas(seen, computed) - : includes(result, computed, comparator) - )) { - othIndex = othLength; - while (--othIndex) { - var cache = caches[othIndex]; - if (!(cache - ? cacheHas(cache, computed) - : includes(arrays[othIndex], computed, comparator)) - ) { - continue outer; - } - } - if (seen) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -module.exports = baseIntersection; diff --git a/node_modules/lodash/_baseInverter.js b/node_modules/lodash/_baseInverter.js deleted file mode 100644 index fbc337f..0000000 --- a/node_modules/lodash/_baseInverter.js +++ /dev/null @@ -1,21 +0,0 @@ -var baseForOwn = require('./_baseForOwn'); - -/** - * The base implementation of `_.invert` and `_.invertBy` which inverts - * `object` with values transformed by `iteratee` and set by `setter`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform values. - * @param {Object} accumulator The initial inverted object. - * @returns {Function} Returns `accumulator`. - */ -function baseInverter(object, setter, iteratee, accumulator) { - baseForOwn(object, function(value, key, object) { - setter(accumulator, iteratee(value), key, object); - }); - return accumulator; -} - -module.exports = baseInverter; diff --git a/node_modules/lodash/_baseInvoke.js b/node_modules/lodash/_baseInvoke.js deleted file mode 100644 index 49bcf3c..0000000 --- a/node_modules/lodash/_baseInvoke.js +++ /dev/null @@ -1,24 +0,0 @@ -var apply = require('./_apply'), - castPath = require('./_castPath'), - last = require('./last'), - parent = require('./_parent'), - toKey = require('./_toKey'); - -/** - * The base implementation of `_.invoke` without support for individual - * method arguments. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {Array} args The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - */ -function baseInvoke(object, path, args) { - path = castPath(path, object); - object = parent(object, path); - var func = object == null ? object : object[toKey(last(path))]; - return func == null ? undefined : apply(func, object, args); -} - -module.exports = baseInvoke; diff --git a/node_modules/lodash/_baseIsArguments.js b/node_modules/lodash/_baseIsArguments.js deleted file mode 100644 index b3562cc..0000000 --- a/node_modules/lodash/_baseIsArguments.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; - -/** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ -function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; -} - -module.exports = baseIsArguments; diff --git a/node_modules/lodash/_baseIsArrayBuffer.js b/node_modules/lodash/_baseIsArrayBuffer.js deleted file mode 100644 index a2c4f30..0000000 --- a/node_modules/lodash/_baseIsArrayBuffer.js +++ /dev/null @@ -1,17 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -var arrayBufferTag = '[object ArrayBuffer]'; - -/** - * The base implementation of `_.isArrayBuffer` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. - */ -function baseIsArrayBuffer(value) { - return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; -} - -module.exports = baseIsArrayBuffer; diff --git a/node_modules/lodash/_baseIsDate.js b/node_modules/lodash/_baseIsDate.js deleted file mode 100644 index ba67c78..0000000 --- a/node_modules/lodash/_baseIsDate.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var dateTag = '[object Date]'; - -/** - * The base implementation of `_.isDate` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - */ -function baseIsDate(value) { - return isObjectLike(value) && baseGetTag(value) == dateTag; -} - -module.exports = baseIsDate; diff --git a/node_modules/lodash/_baseIsEqual.js b/node_modules/lodash/_baseIsEqual.js deleted file mode 100644 index 00a68a4..0000000 --- a/node_modules/lodash/_baseIsEqual.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseIsEqualDeep = require('./_baseIsEqualDeep'), - isObjectLike = require('./isObjectLike'); - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -module.exports = baseIsEqual; diff --git a/node_modules/lodash/_baseIsEqualDeep.js b/node_modules/lodash/_baseIsEqualDeep.js deleted file mode 100644 index e3cfd6a..0000000 --- a/node_modules/lodash/_baseIsEqualDeep.js +++ /dev/null @@ -1,83 +0,0 @@ -var Stack = require('./_Stack'), - equalArrays = require('./_equalArrays'), - equalByTag = require('./_equalByTag'), - equalObjects = require('./_equalObjects'), - getTag = require('./_getTag'), - isArray = require('./isArray'), - isBuffer = require('./isBuffer'), - isTypedArray = require('./isTypedArray'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && isBuffer(object)) { - if (!isBuffer(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new Stack); - return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new Stack); - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -module.exports = baseIsEqualDeep; diff --git a/node_modules/lodash/_baseIsMap.js b/node_modules/lodash/_baseIsMap.js deleted file mode 100644 index 02a4021..0000000 --- a/node_modules/lodash/_baseIsMap.js +++ /dev/null @@ -1,18 +0,0 @@ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]'; - -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; -} - -module.exports = baseIsMap; diff --git a/node_modules/lodash/_baseIsMatch.js b/node_modules/lodash/_baseIsMatch.js deleted file mode 100644 index 72494be..0000000 --- a/node_modules/lodash/_baseIsMatch.js +++ /dev/null @@ -1,62 +0,0 @@ -var Stack = require('./_Stack'), - baseIsEqual = require('./_baseIsEqual'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new Stack; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -module.exports = baseIsMatch; diff --git a/node_modules/lodash/_baseIsNaN.js b/node_modules/lodash/_baseIsNaN.js deleted file mode 100644 index 316f1eb..0000000 --- a/node_modules/lodash/_baseIsNaN.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -module.exports = baseIsNaN; diff --git a/node_modules/lodash/_baseIsNative.js b/node_modules/lodash/_baseIsNative.js deleted file mode 100644 index 8702330..0000000 --- a/node_modules/lodash/_baseIsNative.js +++ /dev/null @@ -1,47 +0,0 @@ -var isFunction = require('./isFunction'), - isMasked = require('./_isMasked'), - isObject = require('./isObject'), - toSource = require('./_toSource'); - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -module.exports = baseIsNative; diff --git a/node_modules/lodash/_baseIsRegExp.js b/node_modules/lodash/_baseIsRegExp.js deleted file mode 100644 index 6cd7c1a..0000000 --- a/node_modules/lodash/_baseIsRegExp.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var regexpTag = '[object RegExp]'; - -/** - * The base implementation of `_.isRegExp` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - */ -function baseIsRegExp(value) { - return isObjectLike(value) && baseGetTag(value) == regexpTag; -} - -module.exports = baseIsRegExp; diff --git a/node_modules/lodash/_baseIsSet.js b/node_modules/lodash/_baseIsSet.js deleted file mode 100644 index 6dee367..0000000 --- a/node_modules/lodash/_baseIsSet.js +++ /dev/null @@ -1,18 +0,0 @@ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return isObjectLike(value) && getTag(value) == setTag; -} - -module.exports = baseIsSet; diff --git a/node_modules/lodash/_baseIsTypedArray.js b/node_modules/lodash/_baseIsTypedArray.js deleted file mode 100644 index 1edb32f..0000000 --- a/node_modules/lodash/_baseIsTypedArray.js +++ /dev/null @@ -1,60 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isLength = require('./isLength'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - -/** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; -} - -module.exports = baseIsTypedArray; diff --git a/node_modules/lodash/_baseIteratee.js b/node_modules/lodash/_baseIteratee.js deleted file mode 100644 index 995c257..0000000 --- a/node_modules/lodash/_baseIteratee.js +++ /dev/null @@ -1,31 +0,0 @@ -var baseMatches = require('./_baseMatches'), - baseMatchesProperty = require('./_baseMatchesProperty'), - identity = require('./identity'), - isArray = require('./isArray'), - property = require('./property'); - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity; - } - if (typeof value == 'object') { - return isArray(value) - ? baseMatchesProperty(value[0], value[1]) - : baseMatches(value); - } - return property(value); -} - -module.exports = baseIteratee; diff --git a/node_modules/lodash/_baseKeys.js b/node_modules/lodash/_baseKeys.js deleted file mode 100644 index 45e9e6f..0000000 --- a/node_modules/lodash/_baseKeys.js +++ /dev/null @@ -1,30 +0,0 @@ -var isPrototype = require('./_isPrototype'), - nativeKeys = require('./_nativeKeys'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -module.exports = baseKeys; diff --git a/node_modules/lodash/_baseKeysIn.js b/node_modules/lodash/_baseKeysIn.js deleted file mode 100644 index ea8a0a1..0000000 --- a/node_modules/lodash/_baseKeysIn.js +++ /dev/null @@ -1,33 +0,0 @@ -var isObject = require('./isObject'), - isPrototype = require('./_isPrototype'), - nativeKeysIn = require('./_nativeKeysIn'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; - - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -module.exports = baseKeysIn; diff --git a/node_modules/lodash/_baseLodash.js b/node_modules/lodash/_baseLodash.js deleted file mode 100644 index f76c790..0000000 --- a/node_modules/lodash/_baseLodash.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * The function whose prototype chain sequence wrappers inherit from. - * - * @private - */ -function baseLodash() { - // No operation performed. -} - -module.exports = baseLodash; diff --git a/node_modules/lodash/_baseLt.js b/node_modules/lodash/_baseLt.js deleted file mode 100644 index 8674d29..0000000 --- a/node_modules/lodash/_baseLt.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ -function baseLt(value, other) { - return value < other; -} - -module.exports = baseLt; diff --git a/node_modules/lodash/_baseMap.js b/node_modules/lodash/_baseMap.js deleted file mode 100644 index 0bf5cea..0000000 --- a/node_modules/lodash/_baseMap.js +++ /dev/null @@ -1,22 +0,0 @@ -var baseEach = require('./_baseEach'), - isArrayLike = require('./isArrayLike'); - -/** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -module.exports = baseMap; diff --git a/node_modules/lodash/_baseMatches.js b/node_modules/lodash/_baseMatches.js deleted file mode 100644 index e56582a..0000000 --- a/node_modules/lodash/_baseMatches.js +++ /dev/null @@ -1,22 +0,0 @@ -var baseIsMatch = require('./_baseIsMatch'), - getMatchData = require('./_getMatchData'), - matchesStrictComparable = require('./_matchesStrictComparable'); - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || baseIsMatch(object, source, matchData); - }; -} - -module.exports = baseMatches; diff --git a/node_modules/lodash/_baseMatchesProperty.js b/node_modules/lodash/_baseMatchesProperty.js deleted file mode 100644 index 24afd89..0000000 --- a/node_modules/lodash/_baseMatchesProperty.js +++ /dev/null @@ -1,33 +0,0 @@ -var baseIsEqual = require('./_baseIsEqual'), - get = require('./get'), - hasIn = require('./hasIn'), - isKey = require('./_isKey'), - isStrictComparable = require('./_isStrictComparable'), - matchesStrictComparable = require('./_matchesStrictComparable'), - toKey = require('./_toKey'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(toKey(path), srcValue); - } - return function(object) { - var objValue = get(object, path); - return (objValue === undefined && objValue === srcValue) - ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); - }; -} - -module.exports = baseMatchesProperty; diff --git a/node_modules/lodash/_baseMean.js b/node_modules/lodash/_baseMean.js deleted file mode 100644 index fa9e00a..0000000 --- a/node_modules/lodash/_baseMean.js +++ /dev/null @@ -1,20 +0,0 @@ -var baseSum = require('./_baseSum'); - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** - * The base implementation of `_.mean` and `_.meanBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the mean. - */ -function baseMean(array, iteratee) { - var length = array == null ? 0 : array.length; - return length ? (baseSum(array, iteratee) / length) : NAN; -} - -module.exports = baseMean; diff --git a/node_modules/lodash/_baseMerge.js b/node_modules/lodash/_baseMerge.js deleted file mode 100644 index c98b5eb..0000000 --- a/node_modules/lodash/_baseMerge.js +++ /dev/null @@ -1,42 +0,0 @@ -var Stack = require('./_Stack'), - assignMergeValue = require('./_assignMergeValue'), - baseFor = require('./_baseFor'), - baseMergeDeep = require('./_baseMergeDeep'), - isObject = require('./isObject'), - keysIn = require('./keysIn'), - safeGet = require('./_safeGet'); - -/** - * The base implementation of `_.merge` without support for multiple sources. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - baseFor(source, function(srcValue, key) { - stack || (stack = new Stack); - if (isObject(srcValue)) { - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) - : undefined; - - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }, keysIn); -} - -module.exports = baseMerge; diff --git a/node_modules/lodash/_baseMergeDeep.js b/node_modules/lodash/_baseMergeDeep.js deleted file mode 100644 index 4679e8d..0000000 --- a/node_modules/lodash/_baseMergeDeep.js +++ /dev/null @@ -1,94 +0,0 @@ -var assignMergeValue = require('./_assignMergeValue'), - cloneBuffer = require('./_cloneBuffer'), - cloneTypedArray = require('./_cloneTypedArray'), - copyArray = require('./_copyArray'), - initCloneObject = require('./_initCloneObject'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isArrayLikeObject = require('./isArrayLikeObject'), - isBuffer = require('./isBuffer'), - isFunction = require('./isFunction'), - isObject = require('./isObject'), - isPlainObject = require('./isPlainObject'), - isTypedArray = require('./isTypedArray'), - safeGet = require('./_safeGet'), - toPlainObject = require('./toPlainObject'); - -/** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = safeGet(object, key), - srcValue = safeGet(source, key), - stacked = stack.get(srcValue); - - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; - - var isCommon = newValue === undefined; - - if (isCommon) { - var isArr = isArray(srcValue), - isBuff = !isArr && isBuffer(srcValue), - isTyped = !isArr && !isBuff && isTypedArray(srcValue); - - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } - else { - newValue = []; - } - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } - else if (!isObject(objValue) || isFunction(objValue)) { - newValue = initCloneObject(srcValue); - } - } - else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - assignMergeValue(object, key, newValue); -} - -module.exports = baseMergeDeep; diff --git a/node_modules/lodash/_baseNth.js b/node_modules/lodash/_baseNth.js deleted file mode 100644 index 0403c2a..0000000 --- a/node_modules/lodash/_baseNth.js +++ /dev/null @@ -1,20 +0,0 @@ -var isIndex = require('./_isIndex'); - -/** - * The base implementation of `_.nth` which doesn't coerce arguments. - * - * @private - * @param {Array} array The array to query. - * @param {number} n The index of the element to return. - * @returns {*} Returns the nth element of `array`. - */ -function baseNth(array, n) { - var length = array.length; - if (!length) { - return; - } - n += n < 0 ? length : 0; - return isIndex(n, length) ? array[n] : undefined; -} - -module.exports = baseNth; diff --git a/node_modules/lodash/_baseOrderBy.js b/node_modules/lodash/_baseOrderBy.js deleted file mode 100644 index 775a017..0000000 --- a/node_modules/lodash/_baseOrderBy.js +++ /dev/null @@ -1,49 +0,0 @@ -var arrayMap = require('./_arrayMap'), - baseGet = require('./_baseGet'), - baseIteratee = require('./_baseIteratee'), - baseMap = require('./_baseMap'), - baseSortBy = require('./_baseSortBy'), - baseUnary = require('./_baseUnary'), - compareMultiple = require('./_compareMultiple'), - identity = require('./identity'), - isArray = require('./isArray'); - -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = arrayMap(iteratees, function(iteratee) { - if (isArray(iteratee)) { - return function(value) { - return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } - } - return iteratee; - }); - } else { - iteratees = [identity]; - } - - var index = -1; - iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); - - var result = baseMap(collection, function(value, key, collection) { - var criteria = arrayMap(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return baseSortBy(result, function(object, other) { - return compareMultiple(object, other, orders); - }); -} - -module.exports = baseOrderBy; diff --git a/node_modules/lodash/_basePick.js b/node_modules/lodash/_basePick.js deleted file mode 100644 index 09b458a..0000000 --- a/node_modules/lodash/_basePick.js +++ /dev/null @@ -1,19 +0,0 @@ -var basePickBy = require('./_basePickBy'), - hasIn = require('./hasIn'); - -/** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ -function basePick(object, paths) { - return basePickBy(object, paths, function(value, path) { - return hasIn(object, path); - }); -} - -module.exports = basePick; diff --git a/node_modules/lodash/_basePickBy.js b/node_modules/lodash/_basePickBy.js deleted file mode 100644 index 85be68c..0000000 --- a/node_modules/lodash/_basePickBy.js +++ /dev/null @@ -1,30 +0,0 @@ -var baseGet = require('./_baseGet'), - baseSet = require('./_baseSet'), - castPath = require('./_castPath'); - -/** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = baseGet(object, path); - - if (predicate(value, path)) { - baseSet(result, castPath(path, object), value); - } - } - return result; -} - -module.exports = basePickBy; diff --git a/node_modules/lodash/_baseProperty.js b/node_modules/lodash/_baseProperty.js deleted file mode 100644 index 496281e..0000000 --- a/node_modules/lodash/_baseProperty.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -module.exports = baseProperty; diff --git a/node_modules/lodash/_basePropertyDeep.js b/node_modules/lodash/_basePropertyDeep.js deleted file mode 100644 index 1e5aae5..0000000 --- a/node_modules/lodash/_basePropertyDeep.js +++ /dev/null @@ -1,16 +0,0 @@ -var baseGet = require('./_baseGet'); - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; -} - -module.exports = basePropertyDeep; diff --git a/node_modules/lodash/_basePropertyOf.js b/node_modules/lodash/_basePropertyOf.js deleted file mode 100644 index 4617399..0000000 --- a/node_modules/lodash/_basePropertyOf.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.propertyOf` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyOf(object) { - return function(key) { - return object == null ? undefined : object[key]; - }; -} - -module.exports = basePropertyOf; diff --git a/node_modules/lodash/_basePullAll.js b/node_modules/lodash/_basePullAll.js deleted file mode 100644 index 305720e..0000000 --- a/node_modules/lodash/_basePullAll.js +++ /dev/null @@ -1,51 +0,0 @@ -var arrayMap = require('./_arrayMap'), - baseIndexOf = require('./_baseIndexOf'), - baseIndexOfWith = require('./_baseIndexOfWith'), - baseUnary = require('./_baseUnary'), - copyArray = require('./_copyArray'); - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/** - * The base implementation of `_.pullAllBy` without support for iteratee - * shorthands. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. - */ -function basePullAll(array, values, iteratee, comparator) { - var indexOf = comparator ? baseIndexOfWith : baseIndexOf, - index = -1, - length = values.length, - seen = array; - - if (array === values) { - values = copyArray(values); - } - if (iteratee) { - seen = arrayMap(array, baseUnary(iteratee)); - } - while (++index < length) { - var fromIndex = 0, - value = values[index], - computed = iteratee ? iteratee(value) : value; - - while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { - if (seen !== array) { - splice.call(seen, fromIndex, 1); - } - splice.call(array, fromIndex, 1); - } - } - return array; -} - -module.exports = basePullAll; diff --git a/node_modules/lodash/_basePullAt.js b/node_modules/lodash/_basePullAt.js deleted file mode 100644 index c3e9e71..0000000 --- a/node_modules/lodash/_basePullAt.js +++ /dev/null @@ -1,37 +0,0 @@ -var baseUnset = require('./_baseUnset'), - isIndex = require('./_isIndex'); - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/** - * The base implementation of `_.pullAt` without support for individual - * indexes or capturing the removed elements. - * - * @private - * @param {Array} array The array to modify. - * @param {number[]} indexes The indexes of elements to remove. - * @returns {Array} Returns `array`. - */ -function basePullAt(array, indexes) { - var length = array ? indexes.length : 0, - lastIndex = length - 1; - - while (length--) { - var index = indexes[length]; - if (length == lastIndex || index !== previous) { - var previous = index; - if (isIndex(index)) { - splice.call(array, index, 1); - } else { - baseUnset(array, index); - } - } - } - return array; -} - -module.exports = basePullAt; diff --git a/node_modules/lodash/_baseRandom.js b/node_modules/lodash/_baseRandom.js deleted file mode 100644 index 94f76a7..0000000 --- a/node_modules/lodash/_baseRandom.js +++ /dev/null @@ -1,18 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor, - nativeRandom = Math.random; - -/** - * The base implementation of `_.random` without support for returning - * floating-point numbers. - * - * @private - * @param {number} lower The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the random number. - */ -function baseRandom(lower, upper) { - return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); -} - -module.exports = baseRandom; diff --git a/node_modules/lodash/_baseRange.js b/node_modules/lodash/_baseRange.js deleted file mode 100644 index 0fb8e41..0000000 --- a/node_modules/lodash/_baseRange.js +++ /dev/null @@ -1,28 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -module.exports = baseRange; diff --git a/node_modules/lodash/_baseReduce.js b/node_modules/lodash/_baseReduce.js deleted file mode 100644 index 5a1f8b5..0000000 --- a/node_modules/lodash/_baseReduce.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -module.exports = baseReduce; diff --git a/node_modules/lodash/_baseRepeat.js b/node_modules/lodash/_baseRepeat.js deleted file mode 100644 index ee44c31..0000000 --- a/node_modules/lodash/_baseRepeat.js +++ /dev/null @@ -1,35 +0,0 @@ -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor; - -/** - * The base implementation of `_.repeat` which doesn't coerce arguments. - * - * @private - * @param {string} string The string to repeat. - * @param {number} n The number of times to repeat the string. - * @returns {string} Returns the repeated string. - */ -function baseRepeat(string, n) { - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - if (n) { - string += string; - } - } while (n); - - return result; -} - -module.exports = baseRepeat; diff --git a/node_modules/lodash/_baseRest.js b/node_modules/lodash/_baseRest.js deleted file mode 100644 index d0dc4bd..0000000 --- a/node_modules/lodash/_baseRest.js +++ /dev/null @@ -1,17 +0,0 @@ -var identity = require('./identity'), - overRest = require('./_overRest'), - setToString = require('./_setToString'); - -/** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ -function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); -} - -module.exports = baseRest; diff --git a/node_modules/lodash/_baseSample.js b/node_modules/lodash/_baseSample.js deleted file mode 100644 index 58582b9..0000000 --- a/node_modules/lodash/_baseSample.js +++ /dev/null @@ -1,15 +0,0 @@ -var arraySample = require('./_arraySample'), - values = require('./values'); - -/** - * The base implementation of `_.sample`. - * - * @private - * @param {Array|Object} collection The collection to sample. - * @returns {*} Returns the random element. - */ -function baseSample(collection) { - return arraySample(values(collection)); -} - -module.exports = baseSample; diff --git a/node_modules/lodash/_baseSampleSize.js b/node_modules/lodash/_baseSampleSize.js deleted file mode 100644 index 5c90ec5..0000000 --- a/node_modules/lodash/_baseSampleSize.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseClamp = require('./_baseClamp'), - shuffleSelf = require('./_shuffleSelf'), - values = require('./values'); - -/** - * The base implementation of `_.sampleSize` without param guards. - * - * @private - * @param {Array|Object} collection The collection to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. - */ -function baseSampleSize(collection, n) { - var array = values(collection); - return shuffleSelf(array, baseClamp(n, 0, array.length)); -} - -module.exports = baseSampleSize; diff --git a/node_modules/lodash/_baseSet.js b/node_modules/lodash/_baseSet.js deleted file mode 100644 index 99f4fbf..0000000 --- a/node_modules/lodash/_baseSet.js +++ /dev/null @@ -1,51 +0,0 @@ -var assignValue = require('./_assignValue'), - castPath = require('./_castPath'), - isIndex = require('./_isIndex'), - isObject = require('./isObject'), - toKey = require('./_toKey'); - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!isObject(object)) { - return object; - } - path = castPath(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = toKey(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = isObject(objValue) - ? objValue - : (isIndex(path[index + 1]) ? [] : {}); - } - } - assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -module.exports = baseSet; diff --git a/node_modules/lodash/_baseSetData.js b/node_modules/lodash/_baseSetData.js deleted file mode 100644 index c409947..0000000 --- a/node_modules/lodash/_baseSetData.js +++ /dev/null @@ -1,17 +0,0 @@ -var identity = require('./identity'), - metaMap = require('./_metaMap'); - -/** - * The base implementation of `setData` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ -var baseSetData = !metaMap ? identity : function(func, data) { - metaMap.set(func, data); - return func; -}; - -module.exports = baseSetData; diff --git a/node_modules/lodash/_baseSetToString.js b/node_modules/lodash/_baseSetToString.js deleted file mode 100644 index 89eaca3..0000000 --- a/node_modules/lodash/_baseSetToString.js +++ /dev/null @@ -1,22 +0,0 @@ -var constant = require('./constant'), - defineProperty = require('./_defineProperty'), - identity = require('./identity'); - -/** - * The base implementation of `setToString` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); -}; - -module.exports = baseSetToString; diff --git a/node_modules/lodash/_baseShuffle.js b/node_modules/lodash/_baseShuffle.js deleted file mode 100644 index 023077a..0000000 --- a/node_modules/lodash/_baseShuffle.js +++ /dev/null @@ -1,15 +0,0 @@ -var shuffleSelf = require('./_shuffleSelf'), - values = require('./values'); - -/** - * The base implementation of `_.shuffle`. - * - * @private - * @param {Array|Object} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. - */ -function baseShuffle(collection) { - return shuffleSelf(values(collection)); -} - -module.exports = baseShuffle; diff --git a/node_modules/lodash/_baseSlice.js b/node_modules/lodash/_baseSlice.js deleted file mode 100644 index 786f6c9..0000000 --- a/node_modules/lodash/_baseSlice.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ -function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; -} - -module.exports = baseSlice; diff --git a/node_modules/lodash/_baseSome.js b/node_modules/lodash/_baseSome.js deleted file mode 100644 index 58f3f44..0000000 --- a/node_modules/lodash/_baseSome.js +++ /dev/null @@ -1,22 +0,0 @@ -var baseEach = require('./_baseEach'); - -/** - * The base implementation of `_.some` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function baseSome(collection, predicate) { - var result; - - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; - }); - return !!result; -} - -module.exports = baseSome; diff --git a/node_modules/lodash/_baseSortBy.js b/node_modules/lodash/_baseSortBy.js deleted file mode 100644 index a25c92e..0000000 --- a/node_modules/lodash/_baseSortBy.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ -function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; -} - -module.exports = baseSortBy; diff --git a/node_modules/lodash/_baseSortedIndex.js b/node_modules/lodash/_baseSortedIndex.js deleted file mode 100644 index 638c366..0000000 --- a/node_modules/lodash/_baseSortedIndex.js +++ /dev/null @@ -1,42 +0,0 @@ -var baseSortedIndexBy = require('./_baseSortedIndexBy'), - identity = require('./identity'), - isSymbol = require('./isSymbol'); - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295, - HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - -/** - * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which - * performs a binary search of `array` to determine the index at which `value` - * should be inserted into `array` in order to maintain its sort order. - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ -function baseSortedIndex(array, value, retHighest) { - var low = 0, - high = array == null ? low : array.length; - - if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { - while (low < high) { - var mid = (low + high) >>> 1, - computed = array[mid]; - - if (computed !== null && !isSymbol(computed) && - (retHighest ? (computed <= value) : (computed < value))) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - return baseSortedIndexBy(array, value, identity, retHighest); -} - -module.exports = baseSortedIndex; diff --git a/node_modules/lodash/_baseSortedIndexBy.js b/node_modules/lodash/_baseSortedIndexBy.js deleted file mode 100644 index c247b37..0000000 --- a/node_modules/lodash/_baseSortedIndexBy.js +++ /dev/null @@ -1,67 +0,0 @@ -var isSymbol = require('./isSymbol'); - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295, - MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor, - nativeMin = Math.min; - -/** - * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` - * which invokes `iteratee` for `value` and each element of `array` to compute - * their sort ranking. The iteratee is invoked with one argument; (value). - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} iteratee The iteratee invoked per element. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ -function baseSortedIndexBy(array, value, iteratee, retHighest) { - var low = 0, - high = array == null ? 0 : array.length; - if (high === 0) { - return 0; - } - - value = iteratee(value); - var valIsNaN = value !== value, - valIsNull = value === null, - valIsSymbol = isSymbol(value), - valIsUndefined = value === undefined; - - while (low < high) { - var mid = nativeFloor((low + high) / 2), - computed = iteratee(array[mid]), - othIsDefined = computed !== undefined, - othIsNull = computed === null, - othIsReflexive = computed === computed, - othIsSymbol = isSymbol(computed); - - if (valIsNaN) { - var setLow = retHighest || othIsReflexive; - } else if (valIsUndefined) { - setLow = othIsReflexive && (retHighest || othIsDefined); - } else if (valIsNull) { - setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); - } else if (valIsSymbol) { - setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); - } else if (othIsNull || othIsSymbol) { - setLow = false; - } else { - setLow = retHighest ? (computed <= value) : (computed < value); - } - if (setLow) { - low = mid + 1; - } else { - high = mid; - } - } - return nativeMin(high, MAX_ARRAY_INDEX); -} - -module.exports = baseSortedIndexBy; diff --git a/node_modules/lodash/_baseSortedUniq.js b/node_modules/lodash/_baseSortedUniq.js deleted file mode 100644 index 802159a..0000000 --- a/node_modules/lodash/_baseSortedUniq.js +++ /dev/null @@ -1,30 +0,0 @@ -var eq = require('./eq'); - -/** - * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseSortedUniq(array, iteratee) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - if (!index || !eq(computed, seen)) { - var seen = computed; - result[resIndex++] = value === 0 ? 0 : value; - } - } - return result; -} - -module.exports = baseSortedUniq; diff --git a/node_modules/lodash/_baseSum.js b/node_modules/lodash/_baseSum.js deleted file mode 100644 index a9e84c1..0000000 --- a/node_modules/lodash/_baseSum.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * The base implementation of `_.sum` and `_.sumBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the sum. - */ -function baseSum(array, iteratee) { - var result, - index = -1, - length = array.length; - - while (++index < length) { - var current = iteratee(array[index]); - if (current !== undefined) { - result = result === undefined ? current : (result + current); - } - } - return result; -} - -module.exports = baseSum; diff --git a/node_modules/lodash/_baseTimes.js b/node_modules/lodash/_baseTimes.js deleted file mode 100644 index 0603fc3..0000000 --- a/node_modules/lodash/_baseTimes.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -module.exports = baseTimes; diff --git a/node_modules/lodash/_baseToNumber.js b/node_modules/lodash/_baseToNumber.js deleted file mode 100644 index 04859f3..0000000 --- a/node_modules/lodash/_baseToNumber.js +++ /dev/null @@ -1,24 +0,0 @@ -var isSymbol = require('./isSymbol'); - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** - * The base implementation of `_.toNumber` which doesn't ensure correct - * conversions of binary, hexadecimal, or octal string values. - * - * @private - * @param {*} value The value to process. - * @returns {number} Returns the number. - */ -function baseToNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - return +value; -} - -module.exports = baseToNumber; diff --git a/node_modules/lodash/_baseToPairs.js b/node_modules/lodash/_baseToPairs.js deleted file mode 100644 index bff1991..0000000 --- a/node_modules/lodash/_baseToPairs.js +++ /dev/null @@ -1,18 +0,0 @@ -var arrayMap = require('./_arrayMap'); - -/** - * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array - * of key-value pairs for `object` corresponding to the property names of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the key-value pairs. - */ -function baseToPairs(object, props) { - return arrayMap(props, function(key) { - return [key, object[key]]; - }); -} - -module.exports = baseToPairs; diff --git a/node_modules/lodash/_baseToString.js b/node_modules/lodash/_baseToString.js deleted file mode 100644 index ada6ad2..0000000 --- a/node_modules/lodash/_baseToString.js +++ /dev/null @@ -1,37 +0,0 @@ -var Symbol = require('./_Symbol'), - arrayMap = require('./_arrayMap'), - isArray = require('./isArray'), - isSymbol = require('./isSymbol'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -module.exports = baseToString; diff --git a/node_modules/lodash/_baseTrim.js b/node_modules/lodash/_baseTrim.js deleted file mode 100644 index 3e2797d..0000000 --- a/node_modules/lodash/_baseTrim.js +++ /dev/null @@ -1,19 +0,0 @@ -var trimmedEndIndex = require('./_trimmedEndIndex'); - -/** Used to match leading whitespace. */ -var reTrimStart = /^\s+/; - -/** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ -function baseTrim(string) { - return string - ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; -} - -module.exports = baseTrim; diff --git a/node_modules/lodash/_baseUnary.js b/node_modules/lodash/_baseUnary.js deleted file mode 100644 index 98639e9..0000000 --- a/node_modules/lodash/_baseUnary.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ -function baseUnary(func) { - return function(value) { - return func(value); - }; -} - -module.exports = baseUnary; diff --git a/node_modules/lodash/_baseUniq.js b/node_modules/lodash/_baseUniq.js deleted file mode 100644 index aea459d..0000000 --- a/node_modules/lodash/_baseUniq.js +++ /dev/null @@ -1,72 +0,0 @@ -var SetCache = require('./_SetCache'), - arrayIncludes = require('./_arrayIncludes'), - arrayIncludesWith = require('./_arrayIncludesWith'), - cacheHas = require('./_cacheHas'), - createSet = require('./_createSet'), - setToArray = require('./_setToArray'); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : createSet(array); - if (set) { - return setToArray(set); - } - isCommon = false; - includes = cacheHas; - seen = new SetCache; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -module.exports = baseUniq; diff --git a/node_modules/lodash/_baseUnset.js b/node_modules/lodash/_baseUnset.js deleted file mode 100644 index eefc6e3..0000000 --- a/node_modules/lodash/_baseUnset.js +++ /dev/null @@ -1,20 +0,0 @@ -var castPath = require('./_castPath'), - last = require('./last'), - parent = require('./_parent'), - toKey = require('./_toKey'); - -/** - * The base implementation of `_.unset`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The property path to unset. - * @returns {boolean} Returns `true` if the property is deleted, else `false`. - */ -function baseUnset(object, path) { - path = castPath(path, object); - object = parent(object, path); - return object == null || delete object[toKey(last(path))]; -} - -module.exports = baseUnset; diff --git a/node_modules/lodash/_baseUpdate.js b/node_modules/lodash/_baseUpdate.js deleted file mode 100644 index 92a6237..0000000 --- a/node_modules/lodash/_baseUpdate.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseGet = require('./_baseGet'), - baseSet = require('./_baseSet'); - -/** - * The base implementation of `_.update`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to update. - * @param {Function} updater The function to produce the updated value. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseUpdate(object, path, updater, customizer) { - return baseSet(object, path, updater(baseGet(object, path)), customizer); -} - -module.exports = baseUpdate; diff --git a/node_modules/lodash/_baseValues.js b/node_modules/lodash/_baseValues.js deleted file mode 100644 index b95faad..0000000 --- a/node_modules/lodash/_baseValues.js +++ /dev/null @@ -1,19 +0,0 @@ -var arrayMap = require('./_arrayMap'); - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); -} - -module.exports = baseValues; diff --git a/node_modules/lodash/_baseWhile.js b/node_modules/lodash/_baseWhile.js deleted file mode 100644 index 07eac61..0000000 --- a/node_modules/lodash/_baseWhile.js +++ /dev/null @@ -1,26 +0,0 @@ -var baseSlice = require('./_baseSlice'); - -/** - * The base implementation of methods like `_.dropWhile` and `_.takeWhile` - * without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to query. - * @param {Function} predicate The function invoked per iteration. - * @param {boolean} [isDrop] Specify dropping elements instead of taking them. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the slice of `array`. - */ -function baseWhile(array, predicate, isDrop, fromRight) { - var length = array.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length) && - predicate(array[index], index, array)) {} - - return isDrop - ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) - : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); -} - -module.exports = baseWhile; diff --git a/node_modules/lodash/_baseWrapperValue.js b/node_modules/lodash/_baseWrapperValue.js deleted file mode 100644 index 443e0df..0000000 --- a/node_modules/lodash/_baseWrapperValue.js +++ /dev/null @@ -1,25 +0,0 @@ -var LazyWrapper = require('./_LazyWrapper'), - arrayPush = require('./_arrayPush'), - arrayReduce = require('./_arrayReduce'); - -/** - * The base implementation of `wrapperValue` which returns the result of - * performing a sequence of actions on the unwrapped `value`, where each - * successive action is supplied the return value of the previous. - * - * @private - * @param {*} value The unwrapped value. - * @param {Array} actions Actions to perform to resolve the unwrapped value. - * @returns {*} Returns the resolved value. - */ -function baseWrapperValue(value, actions) { - var result = value; - if (result instanceof LazyWrapper) { - result = result.value(); - } - return arrayReduce(actions, function(result, action) { - return action.func.apply(action.thisArg, arrayPush([result], action.args)); - }, result); -} - -module.exports = baseWrapperValue; diff --git a/node_modules/lodash/_baseXor.js b/node_modules/lodash/_baseXor.js deleted file mode 100644 index 8e69338..0000000 --- a/node_modules/lodash/_baseXor.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseDifference = require('./_baseDifference'), - baseFlatten = require('./_baseFlatten'), - baseUniq = require('./_baseUniq'); - -/** - * The base implementation of methods like `_.xor`, without support for - * iteratee shorthands, that accepts an array of arrays to inspect. - * - * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. - */ -function baseXor(arrays, iteratee, comparator) { - var length = arrays.length; - if (length < 2) { - return length ? baseUniq(arrays[0]) : []; - } - var index = -1, - result = Array(length); - - while (++index < length) { - var array = arrays[index], - othIndex = -1; - - while (++othIndex < length) { - if (othIndex != index) { - result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); - } - } - } - return baseUniq(baseFlatten(result, 1), iteratee, comparator); -} - -module.exports = baseXor; diff --git a/node_modules/lodash/_baseZipObject.js b/node_modules/lodash/_baseZipObject.js deleted file mode 100644 index 401f85b..0000000 --- a/node_modules/lodash/_baseZipObject.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ -function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; -} - -module.exports = baseZipObject; diff --git a/node_modules/lodash/_cacheHas.js b/node_modules/lodash/_cacheHas.js deleted file mode 100644 index 2dec892..0000000 --- a/node_modules/lodash/_cacheHas.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -module.exports = cacheHas; diff --git a/node_modules/lodash/_castArrayLikeObject.js b/node_modules/lodash/_castArrayLikeObject.js deleted file mode 100644 index 92c75fa..0000000 --- a/node_modules/lodash/_castArrayLikeObject.js +++ /dev/null @@ -1,14 +0,0 @@ -var isArrayLikeObject = require('./isArrayLikeObject'); - -/** - * Casts `value` to an empty array if it's not an array like object. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array|Object} Returns the cast array-like object. - */ -function castArrayLikeObject(value) { - return isArrayLikeObject(value) ? value : []; -} - -module.exports = castArrayLikeObject; diff --git a/node_modules/lodash/_castFunction.js b/node_modules/lodash/_castFunction.js deleted file mode 100644 index 98c91ae..0000000 --- a/node_modules/lodash/_castFunction.js +++ /dev/null @@ -1,14 +0,0 @@ -var identity = require('./identity'); - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : identity; -} - -module.exports = castFunction; diff --git a/node_modules/lodash/_castPath.js b/node_modules/lodash/_castPath.js deleted file mode 100644 index 017e4c1..0000000 --- a/node_modules/lodash/_castPath.js +++ /dev/null @@ -1,21 +0,0 @@ -var isArray = require('./isArray'), - isKey = require('./_isKey'), - stringToPath = require('./_stringToPath'), - toString = require('./toString'); - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if (isArray(value)) { - return value; - } - return isKey(value, object) ? [value] : stringToPath(toString(value)); -} - -module.exports = castPath; diff --git a/node_modules/lodash/_castRest.js b/node_modules/lodash/_castRest.js deleted file mode 100644 index 213c66f..0000000 --- a/node_modules/lodash/_castRest.js +++ /dev/null @@ -1,14 +0,0 @@ -var baseRest = require('./_baseRest'); - -/** - * A `baseRest` alias which can be replaced with `identity` by module - * replacement plugins. - * - * @private - * @type {Function} - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -var castRest = baseRest; - -module.exports = castRest; diff --git a/node_modules/lodash/_castSlice.js b/node_modules/lodash/_castSlice.js deleted file mode 100644 index 071faeb..0000000 --- a/node_modules/lodash/_castSlice.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseSlice = require('./_baseSlice'); - -/** - * Casts `array` to a slice if it's needed. - * - * @private - * @param {Array} array The array to inspect. - * @param {number} start The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the cast slice. - */ -function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return (!start && end >= length) ? array : baseSlice(array, start, end); -} - -module.exports = castSlice; diff --git a/node_modules/lodash/_charsEndIndex.js b/node_modules/lodash/_charsEndIndex.js deleted file mode 100644 index 07908ff..0000000 --- a/node_modules/lodash/_charsEndIndex.js +++ /dev/null @@ -1,19 +0,0 @@ -var baseIndexOf = require('./_baseIndexOf'); - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the last unmatched string symbol. - */ -function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; - - while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; -} - -module.exports = charsEndIndex; diff --git a/node_modules/lodash/_charsStartIndex.js b/node_modules/lodash/_charsStartIndex.js deleted file mode 100644 index b17afd2..0000000 --- a/node_modules/lodash/_charsStartIndex.js +++ /dev/null @@ -1,20 +0,0 @@ -var baseIndexOf = require('./_baseIndexOf'); - -/** - * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the first unmatched string symbol. - */ -function charsStartIndex(strSymbols, chrSymbols) { - var index = -1, - length = strSymbols.length; - - while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; -} - -module.exports = charsStartIndex; diff --git a/node_modules/lodash/_cloneArrayBuffer.js b/node_modules/lodash/_cloneArrayBuffer.js deleted file mode 100644 index c3d8f6e..0000000 --- a/node_modules/lodash/_cloneArrayBuffer.js +++ /dev/null @@ -1,16 +0,0 @@ -var Uint8Array = require('./_Uint8Array'); - -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; -} - -module.exports = cloneArrayBuffer; diff --git a/node_modules/lodash/_cloneBuffer.js b/node_modules/lodash/_cloneBuffer.js deleted file mode 100644 index 27c4810..0000000 --- a/node_modules/lodash/_cloneBuffer.js +++ /dev/null @@ -1,35 +0,0 @@ -var root = require('./_root'); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; - -/** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); - - buffer.copy(result); - return result; -} - -module.exports = cloneBuffer; diff --git a/node_modules/lodash/_cloneDataView.js b/node_modules/lodash/_cloneDataView.js deleted file mode 100644 index 9c9b7b0..0000000 --- a/node_modules/lodash/_cloneDataView.js +++ /dev/null @@ -1,16 +0,0 @@ -var cloneArrayBuffer = require('./_cloneArrayBuffer'); - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -module.exports = cloneDataView; diff --git a/node_modules/lodash/_cloneRegExp.js b/node_modules/lodash/_cloneRegExp.js deleted file mode 100644 index 64a30df..0000000 --- a/node_modules/lodash/_cloneRegExp.js +++ /dev/null @@ -1,17 +0,0 @@ -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -module.exports = cloneRegExp; diff --git a/node_modules/lodash/_cloneSymbol.js b/node_modules/lodash/_cloneSymbol.js deleted file mode 100644 index bede39f..0000000 --- a/node_modules/lodash/_cloneSymbol.js +++ /dev/null @@ -1,18 +0,0 @@ -var Symbol = require('./_Symbol'); - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -module.exports = cloneSymbol; diff --git a/node_modules/lodash/_cloneTypedArray.js b/node_modules/lodash/_cloneTypedArray.js deleted file mode 100644 index 7aad84d..0000000 --- a/node_modules/lodash/_cloneTypedArray.js +++ /dev/null @@ -1,16 +0,0 @@ -var cloneArrayBuffer = require('./_cloneArrayBuffer'); - -/** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} - -module.exports = cloneTypedArray; diff --git a/node_modules/lodash/_compareAscending.js b/node_modules/lodash/_compareAscending.js deleted file mode 100644 index 8dc2791..0000000 --- a/node_modules/lodash/_compareAscending.js +++ /dev/null @@ -1,41 +0,0 @@ -var isSymbol = require('./isSymbol'); - -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = isSymbol(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = isSymbol(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; -} - -module.exports = compareAscending; diff --git a/node_modules/lodash/_compareMultiple.js b/node_modules/lodash/_compareMultiple.js deleted file mode 100644 index ad61f0f..0000000 --- a/node_modules/lodash/_compareMultiple.js +++ /dev/null @@ -1,44 +0,0 @@ -var compareAscending = require('./_compareAscending'); - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; -} - -module.exports = compareMultiple; diff --git a/node_modules/lodash/_composeArgs.js b/node_modules/lodash/_composeArgs.js deleted file mode 100644 index 1ce40f4..0000000 --- a/node_modules/lodash/_composeArgs.js +++ /dev/null @@ -1,39 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates an array that is the composition of partially applied arguments, - * placeholders, and provided arguments into a single array of arguments. - * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to prepend to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. - */ -function composeArgs(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersLength = holders.length, - leftIndex = -1, - leftLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(leftLength + rangeLength), - isUncurried = !isCurried; - - while (++leftIndex < leftLength) { - result[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[holders[argsIndex]] = args[argsIndex]; - } - } - while (rangeLength--) { - result[leftIndex++] = args[argsIndex++]; - } - return result; -} - -module.exports = composeArgs; diff --git a/node_modules/lodash/_composeArgsRight.js b/node_modules/lodash/_composeArgsRight.js deleted file mode 100644 index 8dc588d..0000000 --- a/node_modules/lodash/_composeArgsRight.js +++ /dev/null @@ -1,41 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This function is like `composeArgs` except that the arguments composition - * is tailored for `_.partialRight`. - * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to append to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. - */ -function composeArgsRight(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersIndex = -1, - holdersLength = holders.length, - rightIndex = -1, - rightLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(rangeLength + rightLength), - isUncurried = !isCurried; - - while (++argsIndex < rangeLength) { - result[argsIndex] = args[argsIndex]; - } - var offset = argsIndex; - while (++rightIndex < rightLength) { - result[offset + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[offset + holders[holdersIndex]] = args[argsIndex++]; - } - } - return result; -} - -module.exports = composeArgsRight; diff --git a/node_modules/lodash/_copyArray.js b/node_modules/lodash/_copyArray.js deleted file mode 100644 index cd94d5d..0000000 --- a/node_modules/lodash/_copyArray.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -module.exports = copyArray; diff --git a/node_modules/lodash/_copyObject.js b/node_modules/lodash/_copyObject.js deleted file mode 100644 index 2f2a5c2..0000000 --- a/node_modules/lodash/_copyObject.js +++ /dev/null @@ -1,40 +0,0 @@ -var assignValue = require('./_assignValue'), - baseAssignValue = require('./_baseAssignValue'); - -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ -function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } - } - return object; -} - -module.exports = copyObject; diff --git a/node_modules/lodash/_copySymbols.js b/node_modules/lodash/_copySymbols.js deleted file mode 100644 index c35944a..0000000 --- a/node_modules/lodash/_copySymbols.js +++ /dev/null @@ -1,16 +0,0 @@ -var copyObject = require('./_copyObject'), - getSymbols = require('./_getSymbols'); - -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); -} - -module.exports = copySymbols; diff --git a/node_modules/lodash/_copySymbolsIn.js b/node_modules/lodash/_copySymbolsIn.js deleted file mode 100644 index fdf20a7..0000000 --- a/node_modules/lodash/_copySymbolsIn.js +++ /dev/null @@ -1,16 +0,0 @@ -var copyObject = require('./_copyObject'), - getSymbolsIn = require('./_getSymbolsIn'); - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return copyObject(source, getSymbolsIn(source), object); -} - -module.exports = copySymbolsIn; diff --git a/node_modules/lodash/_coreJsData.js b/node_modules/lodash/_coreJsData.js deleted file mode 100644 index f8e5b4e..0000000 --- a/node_modules/lodash/_coreJsData.js +++ /dev/null @@ -1,6 +0,0 @@ -var root = require('./_root'); - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -module.exports = coreJsData; diff --git a/node_modules/lodash/_countHolders.js b/node_modules/lodash/_countHolders.js deleted file mode 100644 index 718fcda..0000000 --- a/node_modules/lodash/_countHolders.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Gets the number of `placeholder` occurrences in `array`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} placeholder The placeholder to search for. - * @returns {number} Returns the placeholder count. - */ -function countHolders(array, placeholder) { - var length = array.length, - result = 0; - - while (length--) { - if (array[length] === placeholder) { - ++result; - } - } - return result; -} - -module.exports = countHolders; diff --git a/node_modules/lodash/_createAggregator.js b/node_modules/lodash/_createAggregator.js deleted file mode 100644 index 0be42c4..0000000 --- a/node_modules/lodash/_createAggregator.js +++ /dev/null @@ -1,23 +0,0 @@ -var arrayAggregator = require('./_arrayAggregator'), - baseAggregator = require('./_baseAggregator'), - baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); - -/** - * Creates a function like `_.groupBy`. - * - * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} [initializer] The accumulator object initializer. - * @returns {Function} Returns the new aggregator function. - */ -function createAggregator(setter, initializer) { - return function(collection, iteratee) { - var func = isArray(collection) ? arrayAggregator : baseAggregator, - accumulator = initializer ? initializer() : {}; - - return func(collection, setter, baseIteratee(iteratee, 2), accumulator); - }; -} - -module.exports = createAggregator; diff --git a/node_modules/lodash/_createAssigner.js b/node_modules/lodash/_createAssigner.js deleted file mode 100644 index 1f904c5..0000000 --- a/node_modules/lodash/_createAssigner.js +++ /dev/null @@ -1,37 +0,0 @@ -var baseRest = require('./_baseRest'), - isIterateeCall = require('./_isIterateeCall'); - -/** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); -} - -module.exports = createAssigner; diff --git a/node_modules/lodash/_createBaseEach.js b/node_modules/lodash/_createBaseEach.js deleted file mode 100644 index d24fdd1..0000000 --- a/node_modules/lodash/_createBaseEach.js +++ /dev/null @@ -1,32 +0,0 @@ -var isArrayLike = require('./isArrayLike'); - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -module.exports = createBaseEach; diff --git a/node_modules/lodash/_createBaseFor.js b/node_modules/lodash/_createBaseFor.js deleted file mode 100644 index 94cbf29..0000000 --- a/node_modules/lodash/_createBaseFor.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; -} - -module.exports = createBaseFor; diff --git a/node_modules/lodash/_createBind.js b/node_modules/lodash/_createBind.js deleted file mode 100644 index 07cb99f..0000000 --- a/node_modules/lodash/_createBind.js +++ /dev/null @@ -1,28 +0,0 @@ -var createCtor = require('./_createCtor'), - root = require('./_root'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1; - -/** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg`. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createBind(func, bitmask, thisArg) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(isBind ? thisArg : this, arguments); - } - return wrapper; -} - -module.exports = createBind; diff --git a/node_modules/lodash/_createCaseFirst.js b/node_modules/lodash/_createCaseFirst.js deleted file mode 100644 index fe8ea48..0000000 --- a/node_modules/lodash/_createCaseFirst.js +++ /dev/null @@ -1,33 +0,0 @@ -var castSlice = require('./_castSlice'), - hasUnicode = require('./_hasUnicode'), - stringToArray = require('./_stringToArray'), - toString = require('./toString'); - -/** - * Creates a function like `_.lowerFirst`. - * - * @private - * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new case function. - */ -function createCaseFirst(methodName) { - return function(string) { - string = toString(string); - - var strSymbols = hasUnicode(string) - ? stringToArray(string) - : undefined; - - var chr = strSymbols - ? strSymbols[0] - : string.charAt(0); - - var trailing = strSymbols - ? castSlice(strSymbols, 1).join('') - : string.slice(1); - - return chr[methodName]() + trailing; - }; -} - -module.exports = createCaseFirst; diff --git a/node_modules/lodash/_createCompounder.js b/node_modules/lodash/_createCompounder.js deleted file mode 100644 index 8d4cee2..0000000 --- a/node_modules/lodash/_createCompounder.js +++ /dev/null @@ -1,24 +0,0 @@ -var arrayReduce = require('./_arrayReduce'), - deburr = require('./deburr'), - words = require('./words'); - -/** Used to compose unicode capture groups. */ -var rsApos = "['\u2019]"; - -/** Used to match apostrophes. */ -var reApos = RegExp(rsApos, 'g'); - -/** - * Creates a function like `_.camelCase`. - * - * @private - * @param {Function} callback The function to combine each word. - * @returns {Function} Returns the new compounder function. - */ -function createCompounder(callback) { - return function(string) { - return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); - }; -} - -module.exports = createCompounder; diff --git a/node_modules/lodash/_createCtor.js b/node_modules/lodash/_createCtor.js deleted file mode 100644 index 9047aa5..0000000 --- a/node_modules/lodash/_createCtor.js +++ /dev/null @@ -1,37 +0,0 @@ -var baseCreate = require('./_baseCreate'), - isObject = require('./isObject'); - -/** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. - * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. - */ -function createCtor(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - switch (args.length) { - case 0: return new Ctor; - case 1: return new Ctor(args[0]); - case 2: return new Ctor(args[0], args[1]); - case 3: return new Ctor(args[0], args[1], args[2]); - case 4: return new Ctor(args[0], args[1], args[2], args[3]); - case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); - case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); - case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; -} - -module.exports = createCtor; diff --git a/node_modules/lodash/_createCurry.js b/node_modules/lodash/_createCurry.js deleted file mode 100644 index f06c2cd..0000000 --- a/node_modules/lodash/_createCurry.js +++ /dev/null @@ -1,46 +0,0 @@ -var apply = require('./_apply'), - createCtor = require('./_createCtor'), - createHybrid = require('./_createHybrid'), - createRecurry = require('./_createRecurry'), - getHolder = require('./_getHolder'), - replaceHolders = require('./_replaceHolders'), - root = require('./_root'); - -/** - * Creates a function that wraps `func` to enable currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {number} arity The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createCurry(func, bitmask, arity) { - var Ctor = createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length, - placeholder = getHolder(wrapper); - - while (index--) { - args[index] = arguments[index]; - } - var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) - ? [] - : replaceHolders(args, placeholder); - - length -= holders.length; - if (length < arity) { - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, undefined, - args, holders, undefined, undefined, arity - length); - } - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return apply(fn, this, args); - } - return wrapper; -} - -module.exports = createCurry; diff --git a/node_modules/lodash/_createFind.js b/node_modules/lodash/_createFind.js deleted file mode 100644 index 8859ff8..0000000 --- a/node_modules/lodash/_createFind.js +++ /dev/null @@ -1,25 +0,0 @@ -var baseIteratee = require('./_baseIteratee'), - isArrayLike = require('./isArrayLike'), - keys = require('./keys'); - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!isArrayLike(collection)) { - var iteratee = baseIteratee(predicate, 3); - collection = keys(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; -} - -module.exports = createFind; diff --git a/node_modules/lodash/_createFlow.js b/node_modules/lodash/_createFlow.js deleted file mode 100644 index baaddbf..0000000 --- a/node_modules/lodash/_createFlow.js +++ /dev/null @@ -1,78 +0,0 @@ -var LodashWrapper = require('./_LodashWrapper'), - flatRest = require('./_flatRest'), - getData = require('./_getData'), - getFuncName = require('./_getFuncName'), - isArray = require('./isArray'), - isLaziable = require('./_isLaziable'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_CURRY_FLAG = 8, - WRAP_PARTIAL_FLAG = 32, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256; - -/** - * Creates a `_.flow` or `_.flowRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new flow function. - */ -function createFlow(fromRight) { - return flatRest(function(funcs) { - var length = funcs.length, - index = length, - prereq = LodashWrapper.prototype.thru; - - if (fromRight) { - funcs.reverse(); - } - while (index--) { - var func = funcs[index]; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (prereq && !wrapper && getFuncName(func) == 'wrapper') { - var wrapper = new LodashWrapper([], true); - } - } - index = wrapper ? index : length; - while (++index < length) { - func = funcs[index]; - - var funcName = getFuncName(func), - data = funcName == 'wrapper' ? getData(func) : undefined; - - if (data && isLaziable(data[0]) && - data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && - !data[4].length && data[9] == 1 - ) { - wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); - } else { - wrapper = (func.length == 1 && isLaziable(func)) - ? wrapper[funcName]() - : wrapper.thru(func); - } - } - return function() { - var args = arguments, - value = args[0]; - - if (wrapper && args.length == 1 && isArray(value)) { - return wrapper.plant(value).value(); - } - var index = 0, - result = length ? funcs[index].apply(this, args) : value; - - while (++index < length) { - result = funcs[index].call(this, result); - } - return result; - }; - }); -} - -module.exports = createFlow; diff --git a/node_modules/lodash/_createHybrid.js b/node_modules/lodash/_createHybrid.js deleted file mode 100644 index b671bd1..0000000 --- a/node_modules/lodash/_createHybrid.js +++ /dev/null @@ -1,92 +0,0 @@ -var composeArgs = require('./_composeArgs'), - composeArgsRight = require('./_composeArgsRight'), - countHolders = require('./_countHolders'), - createCtor = require('./_createCtor'), - createRecurry = require('./_createRecurry'), - getHolder = require('./_getHolder'), - reorder = require('./_reorder'), - replaceHolders = require('./_replaceHolders'), - root = require('./_root'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_ARY_FLAG = 128, - WRAP_FLIP_FLAG = 512; - -/** - * Creates a function that wraps `func` to invoke it with optional `this` - * binding of `thisArg`, partial application, and currying. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [partialsRight] The arguments to append to those provided - * to the new function. - * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & WRAP_ARY_FLAG, - isBind = bitmask & WRAP_BIND_FLAG, - isBindKey = bitmask & WRAP_BIND_KEY_FLAG, - isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), - isFlip = bitmask & WRAP_FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length; - - while (index--) { - args[index] = arguments[index]; - } - if (isCurried) { - var placeholder = getHolder(wrapper), - holdersCount = countHolders(args, placeholder); - } - if (partials) { - args = composeArgs(args, partials, holders, isCurried); - } - if (partialsRight) { - args = composeArgsRight(args, partialsRight, holdersRight, isCurried); - } - length -= holdersCount; - if (isCurried && length < arity) { - var newHolders = replaceHolders(args, placeholder); - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, thisArg, - args, newHolders, argPos, ary, arity - length - ); - } - var thisBinding = isBind ? thisArg : this, - fn = isBindKey ? thisBinding[func] : func; - - length = args.length; - if (argPos) { - args = reorder(args, argPos); - } else if (isFlip && length > 1) { - args.reverse(); - } - if (isAry && ary < length) { - args.length = ary; - } - if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtor(fn); - } - return fn.apply(thisBinding, args); - } - return wrapper; -} - -module.exports = createHybrid; diff --git a/node_modules/lodash/_createInverter.js b/node_modules/lodash/_createInverter.js deleted file mode 100644 index 6c0c562..0000000 --- a/node_modules/lodash/_createInverter.js +++ /dev/null @@ -1,17 +0,0 @@ -var baseInverter = require('./_baseInverter'); - -/** - * Creates a function like `_.invertBy`. - * - * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} toIteratee The function to resolve iteratees. - * @returns {Function} Returns the new inverter function. - */ -function createInverter(setter, toIteratee) { - return function(object, iteratee) { - return baseInverter(object, setter, toIteratee(iteratee), {}); - }; -} - -module.exports = createInverter; diff --git a/node_modules/lodash/_createMathOperation.js b/node_modules/lodash/_createMathOperation.js deleted file mode 100644 index f1e238a..0000000 --- a/node_modules/lodash/_createMathOperation.js +++ /dev/null @@ -1,38 +0,0 @@ -var baseToNumber = require('./_baseToNumber'), - baseToString = require('./_baseToString'); - -/** - * Creates a function that performs a mathematical operation on two values. - * - * @private - * @param {Function} operator The function to perform the operation. - * @param {number} [defaultValue] The value used for `undefined` arguments. - * @returns {Function} Returns the new mathematical operation function. - */ -function createMathOperation(operator, defaultValue) { - return function(value, other) { - var result; - if (value === undefined && other === undefined) { - return defaultValue; - } - if (value !== undefined) { - result = value; - } - if (other !== undefined) { - if (result === undefined) { - return other; - } - if (typeof value == 'string' || typeof other == 'string') { - value = baseToString(value); - other = baseToString(other); - } else { - value = baseToNumber(value); - other = baseToNumber(other); - } - result = operator(value, other); - } - return result; - }; -} - -module.exports = createMathOperation; diff --git a/node_modules/lodash/_createOver.js b/node_modules/lodash/_createOver.js deleted file mode 100644 index 3b94551..0000000 --- a/node_modules/lodash/_createOver.js +++ /dev/null @@ -1,27 +0,0 @@ -var apply = require('./_apply'), - arrayMap = require('./_arrayMap'), - baseIteratee = require('./_baseIteratee'), - baseRest = require('./_baseRest'), - baseUnary = require('./_baseUnary'), - flatRest = require('./_flatRest'); - -/** - * Creates a function like `_.over`. - * - * @private - * @param {Function} arrayFunc The function to iterate over iteratees. - * @returns {Function} Returns the new over function. - */ -function createOver(arrayFunc) { - return flatRest(function(iteratees) { - iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); - return baseRest(function(args) { - var thisArg = this; - return arrayFunc(iteratees, function(iteratee) { - return apply(iteratee, thisArg, args); - }); - }); - }); -} - -module.exports = createOver; diff --git a/node_modules/lodash/_createPadding.js b/node_modules/lodash/_createPadding.js deleted file mode 100644 index 2124612..0000000 --- a/node_modules/lodash/_createPadding.js +++ /dev/null @@ -1,33 +0,0 @@ -var baseRepeat = require('./_baseRepeat'), - baseToString = require('./_baseToString'), - castSlice = require('./_castSlice'), - hasUnicode = require('./_hasUnicode'), - stringSize = require('./_stringSize'), - stringToArray = require('./_stringToArray'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil; - -/** - * Creates the padding for `string` based on `length`. The `chars` string - * is truncated if the number of characters exceeds `length`. - * - * @private - * @param {number} length The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padding for `string`. - */ -function createPadding(length, chars) { - chars = chars === undefined ? ' ' : baseToString(chars); - - var charsLength = chars.length; - if (charsLength < 2) { - return charsLength ? baseRepeat(chars, length) : chars; - } - var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); - return hasUnicode(chars) - ? castSlice(stringToArray(result), 0, length).join('') - : result.slice(0, length); -} - -module.exports = createPadding; diff --git a/node_modules/lodash/_createPartial.js b/node_modules/lodash/_createPartial.js deleted file mode 100644 index e16c248..0000000 --- a/node_modules/lodash/_createPartial.js +++ /dev/null @@ -1,43 +0,0 @@ -var apply = require('./_apply'), - createCtor = require('./_createCtor'), - root = require('./_root'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1; - -/** - * Creates a function that wraps `func` to invoke it with the `this` binding - * of `thisArg` and `partials` prepended to the arguments it receives. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to - * the new function. - * @returns {Function} Returns the new wrapped function. - */ -function createPartial(func, bitmask, thisArg, partials) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(leftLength + argsLength), - fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return apply(fn, isBind ? thisArg : this, args); - } - return wrapper; -} - -module.exports = createPartial; diff --git a/node_modules/lodash/_createRange.js b/node_modules/lodash/_createRange.js deleted file mode 100644 index 9f52c77..0000000 --- a/node_modules/lodash/_createRange.js +++ /dev/null @@ -1,30 +0,0 @@ -var baseRange = require('./_baseRange'), - isIterateeCall = require('./_isIterateeCall'), - toFinite = require('./toFinite'); - -/** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ -function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); - return baseRange(start, end, step, fromRight); - }; -} - -module.exports = createRange; diff --git a/node_modules/lodash/_createRecurry.js b/node_modules/lodash/_createRecurry.js deleted file mode 100644 index eb29fb2..0000000 --- a/node_modules/lodash/_createRecurry.js +++ /dev/null @@ -1,56 +0,0 @@ -var isLaziable = require('./_isLaziable'), - setData = require('./_setData'), - setWrapToString = require('./_setWrapToString'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64; - -/** - * Creates a function that wraps `func` to continue currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {Function} wrapFunc The function to create the `func` wrapper. - * @param {*} placeholder The placeholder value. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { - var isCurry = bitmask & WRAP_CURRY_FLAG, - newHolders = isCurry ? holders : undefined, - newHoldersRight = isCurry ? undefined : holders, - newPartials = isCurry ? partials : undefined, - newPartialsRight = isCurry ? undefined : partials; - - bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); - - if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { - bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); - } - var newData = [ - func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, - newHoldersRight, argPos, ary, arity - ]; - - var result = wrapFunc.apply(undefined, newData); - if (isLaziable(func)) { - setData(result, newData); - } - result.placeholder = placeholder; - return setWrapToString(result, func, bitmask); -} - -module.exports = createRecurry; diff --git a/node_modules/lodash/_createRelationalOperation.js b/node_modules/lodash/_createRelationalOperation.js deleted file mode 100644 index a17c6b5..0000000 --- a/node_modules/lodash/_createRelationalOperation.js +++ /dev/null @@ -1,20 +0,0 @@ -var toNumber = require('./toNumber'); - -/** - * Creates a function that performs a relational operation on two values. - * - * @private - * @param {Function} operator The function to perform the operation. - * @returns {Function} Returns the new relational operation function. - */ -function createRelationalOperation(operator) { - return function(value, other) { - if (!(typeof value == 'string' && typeof other == 'string')) { - value = toNumber(value); - other = toNumber(other); - } - return operator(value, other); - }; -} - -module.exports = createRelationalOperation; diff --git a/node_modules/lodash/_createRound.js b/node_modules/lodash/_createRound.js deleted file mode 100644 index 88be5df..0000000 --- a/node_modules/lodash/_createRound.js +++ /dev/null @@ -1,35 +0,0 @@ -var root = require('./_root'), - toInteger = require('./toInteger'), - toNumber = require('./toNumber'), - toString = require('./toString'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsFinite = root.isFinite, - nativeMin = Math.min; - -/** - * Creates a function like `_.round`. - * - * @private - * @param {string} methodName The name of the `Math` method to use when rounding. - * @returns {Function} Returns the new round function. - */ -function createRound(methodName) { - var func = Math[methodName]; - return function(number, precision) { - number = toNumber(number); - precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); - if (precision && nativeIsFinite(number)) { - // Shift with exponential notation to avoid floating-point issues. - // See [MDN](https://mdn.io/round#Examples) for more details. - var pair = (toString(number) + 'e').split('e'), - value = func(pair[0] + 'e' + (+pair[1] + precision)); - - pair = (toString(value) + 'e').split('e'); - return +(pair[0] + 'e' + (+pair[1] - precision)); - } - return func(number); - }; -} - -module.exports = createRound; diff --git a/node_modules/lodash/_createSet.js b/node_modules/lodash/_createSet.js deleted file mode 100644 index 0f644ee..0000000 --- a/node_modules/lodash/_createSet.js +++ /dev/null @@ -1,19 +0,0 @@ -var Set = require('./_Set'), - noop = require('./noop'), - setToArray = require('./_setToArray'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { - return new Set(values); -}; - -module.exports = createSet; diff --git a/node_modules/lodash/_createToPairs.js b/node_modules/lodash/_createToPairs.js deleted file mode 100644 index 568417a..0000000 --- a/node_modules/lodash/_createToPairs.js +++ /dev/null @@ -1,30 +0,0 @@ -var baseToPairs = require('./_baseToPairs'), - getTag = require('./_getTag'), - mapToArray = require('./_mapToArray'), - setToPairs = require('./_setToPairs'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Creates a `_.toPairs` or `_.toPairsIn` function. - * - * @private - * @param {Function} keysFunc The function to get the keys of a given object. - * @returns {Function} Returns the new pairs function. - */ -function createToPairs(keysFunc) { - return function(object) { - var tag = getTag(object); - if (tag == mapTag) { - return mapToArray(object); - } - if (tag == setTag) { - return setToPairs(object); - } - return baseToPairs(object, keysFunc(object)); - }; -} - -module.exports = createToPairs; diff --git a/node_modules/lodash/_createWrap.js b/node_modules/lodash/_createWrap.js deleted file mode 100644 index 33f0633..0000000 --- a/node_modules/lodash/_createWrap.js +++ /dev/null @@ -1,106 +0,0 @@ -var baseSetData = require('./_baseSetData'), - createBind = require('./_createBind'), - createCurry = require('./_createCurry'), - createHybrid = require('./_createHybrid'), - createPartial = require('./_createPartial'), - getData = require('./_getData'), - mergeData = require('./_mergeData'), - setData = require('./_setData'), - setWrapToString = require('./_setWrapToString'), - toInteger = require('./toInteger'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that either curries or invokes `func` with optional - * `this` binding and partially applied arguments. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` - * 512 - `_.flip` - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to be partially applied. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; - if (!isBindKey && typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); - partials = holders = undefined; - } - ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); - arity = arity === undefined ? arity : toInteger(arity); - length -= holders ? holders.length : 0; - - if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { - var partialsRight = partials, - holdersRight = holders; - - partials = holders = undefined; - } - var data = isBindKey ? undefined : getData(func); - - var newData = [ - func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, - argPos, ary, arity - ]; - - if (data) { - mergeData(newData, data); - } - func = newData[0]; - bitmask = newData[1]; - thisArg = newData[2]; - partials = newData[3]; - holders = newData[4]; - arity = newData[9] = newData[9] === undefined - ? (isBindKey ? 0 : func.length) - : nativeMax(newData[9] - length, 0); - - if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { - bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); - } - if (!bitmask || bitmask == WRAP_BIND_FLAG) { - var result = createBind(func, bitmask, thisArg); - } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { - result = createCurry(func, bitmask, arity); - } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { - result = createPartial(func, bitmask, thisArg, partials); - } else { - result = createHybrid.apply(undefined, newData); - } - var setter = data ? baseSetData : setData; - return setWrapToString(setter(result, newData), func, bitmask); -} - -module.exports = createWrap; diff --git a/node_modules/lodash/_customDefaultsAssignIn.js b/node_modules/lodash/_customDefaultsAssignIn.js deleted file mode 100644 index 1f49e6f..0000000 --- a/node_modules/lodash/_customDefaultsAssignIn.js +++ /dev/null @@ -1,29 +0,0 @@ -var eq = require('./eq'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used by `_.defaults` to customize its `_.assignIn` use to assign properties - * of source objects to the destination object for all destination properties - * that resolve to `undefined`. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to assign. - * @param {Object} object The parent object of `objValue`. - * @returns {*} Returns the value to assign. - */ -function customDefaultsAssignIn(objValue, srcValue, key, object) { - if (objValue === undefined || - (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { - return srcValue; - } - return objValue; -} - -module.exports = customDefaultsAssignIn; diff --git a/node_modules/lodash/_customDefaultsMerge.js b/node_modules/lodash/_customDefaultsMerge.js deleted file mode 100644 index 4cab317..0000000 --- a/node_modules/lodash/_customDefaultsMerge.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseMerge = require('./_baseMerge'), - isObject = require('./isObject'); - -/** - * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source - * objects into destination objects that are passed thru. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to merge. - * @param {Object} object The parent object of `objValue`. - * @param {Object} source The parent object of `srcValue`. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - * @returns {*} Returns the value to assign. - */ -function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { - if (isObject(objValue) && isObject(srcValue)) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, objValue); - baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); - stack['delete'](srcValue); - } - return objValue; -} - -module.exports = customDefaultsMerge; diff --git a/node_modules/lodash/_customOmitClone.js b/node_modules/lodash/_customOmitClone.js deleted file mode 100644 index 968db2e..0000000 --- a/node_modules/lodash/_customOmitClone.js +++ /dev/null @@ -1,16 +0,0 @@ -var isPlainObject = require('./isPlainObject'); - -/** - * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain - * objects. - * - * @private - * @param {*} value The value to inspect. - * @param {string} key The key of the property to inspect. - * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. - */ -function customOmitClone(value) { - return isPlainObject(value) ? undefined : value; -} - -module.exports = customOmitClone; diff --git a/node_modules/lodash/_deburrLetter.js b/node_modules/lodash/_deburrLetter.js deleted file mode 100644 index 3e531ed..0000000 --- a/node_modules/lodash/_deburrLetter.js +++ /dev/null @@ -1,71 +0,0 @@ -var basePropertyOf = require('./_basePropertyOf'); - -/** Used to map Latin Unicode letters to basic Latin letters. */ -var deburredLetters = { - // Latin-1 Supplement block. - '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', - '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', - '\xc7': 'C', '\xe7': 'c', - '\xd0': 'D', '\xf0': 'd', - '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', - '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', - '\xd1': 'N', '\xf1': 'n', - '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', - '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', - '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', - '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', - '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', - '\xc6': 'Ae', '\xe6': 'ae', - '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss', - // Latin Extended-A block. - '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', - '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', - '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', - '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', - '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', - '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', - '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', - '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', - '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', - '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', - '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', - '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', - '\u0134': 'J', '\u0135': 'j', - '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', - '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', - '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', - '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', - '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', - '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', - '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', - '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', - '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', - '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', - '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', - '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', - '\u0163': 't', '\u0165': 't', '\u0167': 't', - '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', - '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', - '\u0174': 'W', '\u0175': 'w', - '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', - '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', - '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', - '\u0132': 'IJ', '\u0133': 'ij', - '\u0152': 'Oe', '\u0153': 'oe', - '\u0149': "'n", '\u017f': 's' -}; - -/** - * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A - * letters to basic Latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ -var deburrLetter = basePropertyOf(deburredLetters); - -module.exports = deburrLetter; diff --git a/node_modules/lodash/_defineProperty.js b/node_modules/lodash/_defineProperty.js deleted file mode 100644 index b6116d9..0000000 --- a/node_modules/lodash/_defineProperty.js +++ /dev/null @@ -1,11 +0,0 @@ -var getNative = require('./_getNative'); - -var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); - -module.exports = defineProperty; diff --git a/node_modules/lodash/_equalArrays.js b/node_modules/lodash/_equalArrays.js deleted file mode 100644 index 824228c..0000000 --- a/node_modules/lodash/_equalArrays.js +++ /dev/null @@ -1,84 +0,0 @@ -var SetCache = require('./_SetCache'), - arraySome = require('./_arraySome'), - cacheHas = require('./_cacheHas'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function(othValue, othIndex) { - if (!cacheHas(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -module.exports = equalArrays; diff --git a/node_modules/lodash/_equalByTag.js b/node_modules/lodash/_equalByTag.js deleted file mode 100644 index 71919e8..0000000 --- a/node_modules/lodash/_equalByTag.js +++ /dev/null @@ -1,112 +0,0 @@ -var Symbol = require('./_Symbol'), - Uint8Array = require('./_Uint8Array'), - eq = require('./eq'), - equalArrays = require('./_equalArrays'), - mapToArray = require('./_mapToArray'), - setToArray = require('./_setToArray'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = mapToArray; - - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -module.exports = equalByTag; diff --git a/node_modules/lodash/_equalObjects.js b/node_modules/lodash/_equalObjects.js deleted file mode 100644 index cdaacd2..0000000 --- a/node_modules/lodash/_equalObjects.js +++ /dev/null @@ -1,90 +0,0 @@ -var getAllKeys = require('./_getAllKeys'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -module.exports = equalObjects; diff --git a/node_modules/lodash/_escapeHtmlChar.js b/node_modules/lodash/_escapeHtmlChar.js deleted file mode 100644 index 7ca68ee..0000000 --- a/node_modules/lodash/_escapeHtmlChar.js +++ /dev/null @@ -1,21 +0,0 @@ -var basePropertyOf = require('./_basePropertyOf'); - -/** Used to map characters to HTML entities. */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -/** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ -var escapeHtmlChar = basePropertyOf(htmlEscapes); - -module.exports = escapeHtmlChar; diff --git a/node_modules/lodash/_escapeStringChar.js b/node_modules/lodash/_escapeStringChar.js deleted file mode 100644 index 44eca96..0000000 --- a/node_modules/lodash/_escapeStringChar.js +++ /dev/null @@ -1,22 +0,0 @@ -/** Used to escape characters for inclusion in compiled string literals. */ -var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\u2028': 'u2028', - '\u2029': 'u2029' -}; - -/** - * Used by `_.template` to escape characters for inclusion in compiled string literals. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeStringChar(chr) { - return '\\' + stringEscapes[chr]; -} - -module.exports = escapeStringChar; diff --git a/node_modules/lodash/_flatRest.js b/node_modules/lodash/_flatRest.js deleted file mode 100644 index 94ab6cc..0000000 --- a/node_modules/lodash/_flatRest.js +++ /dev/null @@ -1,16 +0,0 @@ -var flatten = require('./flatten'), - overRest = require('./_overRest'), - setToString = require('./_setToString'); - -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); -} - -module.exports = flatRest; diff --git a/node_modules/lodash/_freeGlobal.js b/node_modules/lodash/_freeGlobal.js deleted file mode 100644 index bbec998..0000000 --- a/node_modules/lodash/_freeGlobal.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -module.exports = freeGlobal; diff --git a/node_modules/lodash/_getAllKeys.js b/node_modules/lodash/_getAllKeys.js deleted file mode 100644 index a9ce699..0000000 --- a/node_modules/lodash/_getAllKeys.js +++ /dev/null @@ -1,16 +0,0 @@ -var baseGetAllKeys = require('./_baseGetAllKeys'), - getSymbols = require('./_getSymbols'), - keys = require('./keys'); - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); -} - -module.exports = getAllKeys; diff --git a/node_modules/lodash/_getAllKeysIn.js b/node_modules/lodash/_getAllKeysIn.js deleted file mode 100644 index 1b46678..0000000 --- a/node_modules/lodash/_getAllKeysIn.js +++ /dev/null @@ -1,17 +0,0 @@ -var baseGetAllKeys = require('./_baseGetAllKeys'), - getSymbolsIn = require('./_getSymbolsIn'), - keysIn = require('./keysIn'); - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return baseGetAllKeys(object, keysIn, getSymbolsIn); -} - -module.exports = getAllKeysIn; diff --git a/node_modules/lodash/_getData.js b/node_modules/lodash/_getData.js deleted file mode 100644 index a1fe7b7..0000000 --- a/node_modules/lodash/_getData.js +++ /dev/null @@ -1,15 +0,0 @@ -var metaMap = require('./_metaMap'), - noop = require('./noop'); - -/** - * Gets metadata for `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {*} Returns the metadata for `func`. - */ -var getData = !metaMap ? noop : function(func) { - return metaMap.get(func); -}; - -module.exports = getData; diff --git a/node_modules/lodash/_getFuncName.js b/node_modules/lodash/_getFuncName.js deleted file mode 100644 index 21e15b3..0000000 --- a/node_modules/lodash/_getFuncName.js +++ /dev/null @@ -1,31 +0,0 @@ -var realNames = require('./_realNames'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Gets the name of `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {string} Returns the function name. - */ -function getFuncName(func) { - var result = (func.name + ''), - array = realNames[result], - length = hasOwnProperty.call(realNames, result) ? array.length : 0; - - while (length--) { - var data = array[length], - otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } - } - return result; -} - -module.exports = getFuncName; diff --git a/node_modules/lodash/_getHolder.js b/node_modules/lodash/_getHolder.js deleted file mode 100644 index 65e94b5..0000000 --- a/node_modules/lodash/_getHolder.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Gets the argument placeholder value for `func`. - * - * @private - * @param {Function} func The function to inspect. - * @returns {*} Returns the placeholder value. - */ -function getHolder(func) { - var object = func; - return object.placeholder; -} - -module.exports = getHolder; diff --git a/node_modules/lodash/_getMapData.js b/node_modules/lodash/_getMapData.js deleted file mode 100644 index 17f6303..0000000 --- a/node_modules/lodash/_getMapData.js +++ /dev/null @@ -1,18 +0,0 @@ -var isKeyable = require('./_isKeyable'); - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -module.exports = getMapData; diff --git a/node_modules/lodash/_getMatchData.js b/node_modules/lodash/_getMatchData.js deleted file mode 100644 index 2cc70f9..0000000 --- a/node_modules/lodash/_getMatchData.js +++ /dev/null @@ -1,24 +0,0 @@ -var isStrictComparable = require('./_isStrictComparable'), - keys = require('./keys'); - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = keys(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, isStrictComparable(value)]; - } - return result; -} - -module.exports = getMatchData; diff --git a/node_modules/lodash/_getNative.js b/node_modules/lodash/_getNative.js deleted file mode 100644 index 97a622b..0000000 --- a/node_modules/lodash/_getNative.js +++ /dev/null @@ -1,17 +0,0 @@ -var baseIsNative = require('./_baseIsNative'), - getValue = require('./_getValue'); - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} - -module.exports = getNative; diff --git a/node_modules/lodash/_getPrototype.js b/node_modules/lodash/_getPrototype.js deleted file mode 100644 index e808612..0000000 --- a/node_modules/lodash/_getPrototype.js +++ /dev/null @@ -1,6 +0,0 @@ -var overArg = require('./_overArg'); - -/** Built-in value references. */ -var getPrototype = overArg(Object.getPrototypeOf, Object); - -module.exports = getPrototype; diff --git a/node_modules/lodash/_getRawTag.js b/node_modules/lodash/_getRawTag.js deleted file mode 100644 index 49a95c9..0000000 --- a/node_modules/lodash/_getRawTag.js +++ /dev/null @@ -1,46 +0,0 @@ -var Symbol = require('./_Symbol'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} - -module.exports = getRawTag; diff --git a/node_modules/lodash/_getSymbols.js b/node_modules/lodash/_getSymbols.js deleted file mode 100644 index 7d6eafe..0000000 --- a/node_modules/lodash/_getSymbols.js +++ /dev/null @@ -1,30 +0,0 @@ -var arrayFilter = require('./_arrayFilter'), - stubArray = require('./stubArray'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? stubArray : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return arrayFilter(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -module.exports = getSymbols; diff --git a/node_modules/lodash/_getSymbolsIn.js b/node_modules/lodash/_getSymbolsIn.js deleted file mode 100644 index cec0855..0000000 --- a/node_modules/lodash/_getSymbolsIn.js +++ /dev/null @@ -1,25 +0,0 @@ -var arrayPush = require('./_arrayPush'), - getPrototype = require('./_getPrototype'), - getSymbols = require('./_getSymbols'), - stubArray = require('./stubArray'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { - var result = []; - while (object) { - arrayPush(result, getSymbols(object)); - object = getPrototype(object); - } - return result; -}; - -module.exports = getSymbolsIn; diff --git a/node_modules/lodash/_getTag.js b/node_modules/lodash/_getTag.js deleted file mode 100644 index deaf89d..0000000 --- a/node_modules/lodash/_getTag.js +++ /dev/null @@ -1,58 +0,0 @@ -var DataView = require('./_DataView'), - Map = require('./_Map'), - Promise = require('./_Promise'), - Set = require('./_Set'), - WeakMap = require('./_WeakMap'), - baseGetTag = require('./_baseGetTag'), - toSource = require('./_toSource'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - setTag = '[object Set]', - weakMapTag = '[object WeakMap]'; - -var dataViewTag = '[object DataView]'; - -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - -/** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -var getTag = baseGetTag; - -// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. -if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; -} - -module.exports = getTag; diff --git a/node_modules/lodash/_getValue.js b/node_modules/lodash/_getValue.js deleted file mode 100644 index 5f7d773..0000000 --- a/node_modules/lodash/_getValue.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -module.exports = getValue; diff --git a/node_modules/lodash/_getView.js b/node_modules/lodash/_getView.js deleted file mode 100644 index df1e5d4..0000000 --- a/node_modules/lodash/_getView.js +++ /dev/null @@ -1,33 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * Gets the view, applying any `transforms` to the `start` and `end` positions. - * - * @private - * @param {number} start The start of the view. - * @param {number} end The end of the view. - * @param {Array} transforms The transformations to apply to the view. - * @returns {Object} Returns an object containing the `start` and `end` - * positions of the view. - */ -function getView(start, end, transforms) { - var index = -1, - length = transforms.length; - - while (++index < length) { - var data = transforms[index], - size = data.size; - - switch (data.type) { - case 'drop': start += size; break; - case 'dropRight': end -= size; break; - case 'take': end = nativeMin(end, start + size); break; - case 'takeRight': start = nativeMax(start, end - size); break; - } - } - return { 'start': start, 'end': end }; -} - -module.exports = getView; diff --git a/node_modules/lodash/_getWrapDetails.js b/node_modules/lodash/_getWrapDetails.js deleted file mode 100644 index 3bcc6e4..0000000 --- a/node_modules/lodash/_getWrapDetails.js +++ /dev/null @@ -1,17 +0,0 @@ -/** Used to match wrap detail comments. */ -var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, - reSplitDetails = /,? & /; - -/** - * Extracts wrapper details from the `source` body comment. - * - * @private - * @param {string} source The source to inspect. - * @returns {Array} Returns the wrapper details. - */ -function getWrapDetails(source) { - var match = source.match(reWrapDetails); - return match ? match[1].split(reSplitDetails) : []; -} - -module.exports = getWrapDetails; diff --git a/node_modules/lodash/_hasPath.js b/node_modules/lodash/_hasPath.js deleted file mode 100644 index 93dbde1..0000000 --- a/node_modules/lodash/_hasPath.js +++ /dev/null @@ -1,39 +0,0 @@ -var castPath = require('./_castPath'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isIndex = require('./_isIndex'), - isLength = require('./isLength'), - toKey = require('./_toKey'); - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = castPath(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isArguments(object)); -} - -module.exports = hasPath; diff --git a/node_modules/lodash/_hasUnicode.js b/node_modules/lodash/_hasUnicode.js deleted file mode 100644 index cb6ca15..0000000 --- a/node_modules/lodash/_hasUnicode.js +++ /dev/null @@ -1,26 +0,0 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -module.exports = hasUnicode; diff --git a/node_modules/lodash/_hasUnicodeWord.js b/node_modules/lodash/_hasUnicodeWord.js deleted file mode 100644 index 95d52c4..0000000 --- a/node_modules/lodash/_hasUnicodeWord.js +++ /dev/null @@ -1,15 +0,0 @@ -/** Used to detect strings that need a more robust regexp to match words. */ -var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; - -/** - * Checks if `string` contains a word composed of Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a word is found, else `false`. - */ -function hasUnicodeWord(string) { - return reHasUnicodeWord.test(string); -} - -module.exports = hasUnicodeWord; diff --git a/node_modules/lodash/_hashClear.js b/node_modules/lodash/_hashClear.js deleted file mode 100644 index 5d4b70c..0000000 --- a/node_modules/lodash/_hashClear.js +++ /dev/null @@ -1,15 +0,0 @@ -var nativeCreate = require('./_nativeCreate'); - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; -} - -module.exports = hashClear; diff --git a/node_modules/lodash/_hashDelete.js b/node_modules/lodash/_hashDelete.js deleted file mode 100644 index ea9dabf..0000000 --- a/node_modules/lodash/_hashDelete.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; -} - -module.exports = hashDelete; diff --git a/node_modules/lodash/_hashGet.js b/node_modules/lodash/_hashGet.js deleted file mode 100644 index 1fc2f34..0000000 --- a/node_modules/lodash/_hashGet.js +++ /dev/null @@ -1,30 +0,0 @@ -var nativeCreate = require('./_nativeCreate'); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} - -module.exports = hashGet; diff --git a/node_modules/lodash/_hashHas.js b/node_modules/lodash/_hashHas.js deleted file mode 100644 index 281a551..0000000 --- a/node_modules/lodash/_hashHas.js +++ /dev/null @@ -1,23 +0,0 @@ -var nativeCreate = require('./_nativeCreate'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); -} - -module.exports = hashHas; diff --git a/node_modules/lodash/_hashSet.js b/node_modules/lodash/_hashSet.js deleted file mode 100644 index e105528..0000000 --- a/node_modules/lodash/_hashSet.js +++ /dev/null @@ -1,23 +0,0 @@ -var nativeCreate = require('./_nativeCreate'); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} - -module.exports = hashSet; diff --git a/node_modules/lodash/_initCloneArray.js b/node_modules/lodash/_initCloneArray.js deleted file mode 100644 index 078c15a..0000000 --- a/node_modules/lodash/_initCloneArray.js +++ /dev/null @@ -1,26 +0,0 @@ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -module.exports = initCloneArray; diff --git a/node_modules/lodash/_initCloneByTag.js b/node_modules/lodash/_initCloneByTag.js deleted file mode 100644 index f69a008..0000000 --- a/node_modules/lodash/_initCloneByTag.js +++ /dev/null @@ -1,77 +0,0 @@ -var cloneArrayBuffer = require('./_cloneArrayBuffer'), - cloneDataView = require('./_cloneDataView'), - cloneRegExp = require('./_cloneRegExp'), - cloneSymbol = require('./_cloneSymbol'), - cloneTypedArray = require('./_cloneTypedArray'); - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return cloneSymbol(object); - } -} - -module.exports = initCloneByTag; diff --git a/node_modules/lodash/_initCloneObject.js b/node_modules/lodash/_initCloneObject.js deleted file mode 100644 index 5a13e64..0000000 --- a/node_modules/lodash/_initCloneObject.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseCreate = require('./_baseCreate'), - getPrototype = require('./_getPrototype'), - isPrototype = require('./_isPrototype'); - -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; -} - -module.exports = initCloneObject; diff --git a/node_modules/lodash/_insertWrapDetails.js b/node_modules/lodash/_insertWrapDetails.js deleted file mode 100644 index e790808..0000000 --- a/node_modules/lodash/_insertWrapDetails.js +++ /dev/null @@ -1,23 +0,0 @@ -/** Used to match wrap detail comments. */ -var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; - -/** - * Inserts wrapper `details` in a comment at the top of the `source` body. - * - * @private - * @param {string} source The source to modify. - * @returns {Array} details The details to insert. - * @returns {string} Returns the modified source. - */ -function insertWrapDetails(source, details) { - var length = details.length; - if (!length) { - return source; - } - var lastIndex = length - 1; - details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; - details = details.join(length > 2 ? ', ' : ' '); - return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); -} - -module.exports = insertWrapDetails; diff --git a/node_modules/lodash/_isFlattenable.js b/node_modules/lodash/_isFlattenable.js deleted file mode 100644 index 4cc2c24..0000000 --- a/node_modules/lodash/_isFlattenable.js +++ /dev/null @@ -1,20 +0,0 @@ -var Symbol = require('./_Symbol'), - isArguments = require('./isArguments'), - isArray = require('./isArray'); - -/** Built-in value references. */ -var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -module.exports = isFlattenable; diff --git a/node_modules/lodash/_isIndex.js b/node_modules/lodash/_isIndex.js deleted file mode 100644 index 061cd39..0000000 --- a/node_modules/lodash/_isIndex.js +++ /dev/null @@ -1,25 +0,0 @@ -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); -} - -module.exports = isIndex; diff --git a/node_modules/lodash/_isIterateeCall.js b/node_modules/lodash/_isIterateeCall.js deleted file mode 100644 index a0bb5a9..0000000 --- a/node_modules/lodash/_isIterateeCall.js +++ /dev/null @@ -1,30 +0,0 @@ -var eq = require('./eq'), - isArrayLike = require('./isArrayLike'), - isIndex = require('./_isIndex'), - isObject = require('./isObject'); - -/** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; -} - -module.exports = isIterateeCall; diff --git a/node_modules/lodash/_isKey.js b/node_modules/lodash/_isKey.js deleted file mode 100644 index ff08b06..0000000 --- a/node_modules/lodash/_isKey.js +++ /dev/null @@ -1,29 +0,0 @@ -var isArray = require('./isArray'), - isSymbol = require('./isSymbol'); - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -module.exports = isKey; diff --git a/node_modules/lodash/_isKeyable.js b/node_modules/lodash/_isKeyable.js deleted file mode 100644 index 39f1828..0000000 --- a/node_modules/lodash/_isKeyable.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} - -module.exports = isKeyable; diff --git a/node_modules/lodash/_isLaziable.js b/node_modules/lodash/_isLaziable.js deleted file mode 100644 index a57c4f2..0000000 --- a/node_modules/lodash/_isLaziable.js +++ /dev/null @@ -1,28 +0,0 @@ -var LazyWrapper = require('./_LazyWrapper'), - getData = require('./_getData'), - getFuncName = require('./_getFuncName'), - lodash = require('./wrapperLodash'); - -/** - * Checks if `func` has a lazy counterpart. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` has a lazy counterpart, - * else `false`. - */ -function isLaziable(func) { - var funcName = getFuncName(func), - other = lodash[funcName]; - - if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { - return false; - } - if (func === other) { - return true; - } - var data = getData(other); - return !!data && func === data[0]; -} - -module.exports = isLaziable; diff --git a/node_modules/lodash/_isMaskable.js b/node_modules/lodash/_isMaskable.js deleted file mode 100644 index eb98d09..0000000 --- a/node_modules/lodash/_isMaskable.js +++ /dev/null @@ -1,14 +0,0 @@ -var coreJsData = require('./_coreJsData'), - isFunction = require('./isFunction'), - stubFalse = require('./stubFalse'); - -/** - * Checks if `func` is capable of being masked. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `func` is maskable, else `false`. - */ -var isMaskable = coreJsData ? isFunction : stubFalse; - -module.exports = isMaskable; diff --git a/node_modules/lodash/_isMasked.js b/node_modules/lodash/_isMasked.js deleted file mode 100644 index 4b0f21b..0000000 --- a/node_modules/lodash/_isMasked.js +++ /dev/null @@ -1,20 +0,0 @@ -var coreJsData = require('./_coreJsData'); - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); - -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} - -module.exports = isMasked; diff --git a/node_modules/lodash/_isPrototype.js b/node_modules/lodash/_isPrototype.js deleted file mode 100644 index 0f29498..0000000 --- a/node_modules/lodash/_isPrototype.js +++ /dev/null @@ -1,18 +0,0 @@ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -module.exports = isPrototype; diff --git a/node_modules/lodash/_isStrictComparable.js b/node_modules/lodash/_isStrictComparable.js deleted file mode 100644 index b59f40b..0000000 --- a/node_modules/lodash/_isStrictComparable.js +++ /dev/null @@ -1,15 +0,0 @@ -var isObject = require('./isObject'); - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !isObject(value); -} - -module.exports = isStrictComparable; diff --git a/node_modules/lodash/_iteratorToArray.js b/node_modules/lodash/_iteratorToArray.js deleted file mode 100644 index 4768566..0000000 --- a/node_modules/lodash/_iteratorToArray.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Converts `iterator` to an array. - * - * @private - * @param {Object} iterator The iterator to convert. - * @returns {Array} Returns the converted array. - */ -function iteratorToArray(iterator) { - var data, - result = []; - - while (!(data = iterator.next()).done) { - result.push(data.value); - } - return result; -} - -module.exports = iteratorToArray; diff --git a/node_modules/lodash/_lazyClone.js b/node_modules/lodash/_lazyClone.js deleted file mode 100644 index d8a51f8..0000000 --- a/node_modules/lodash/_lazyClone.js +++ /dev/null @@ -1,23 +0,0 @@ -var LazyWrapper = require('./_LazyWrapper'), - copyArray = require('./_copyArray'); - -/** - * Creates a clone of the lazy wrapper object. - * - * @private - * @name clone - * @memberOf LazyWrapper - * @returns {Object} Returns the cloned `LazyWrapper` object. - */ -function lazyClone() { - var result = new LazyWrapper(this.__wrapped__); - result.__actions__ = copyArray(this.__actions__); - result.__dir__ = this.__dir__; - result.__filtered__ = this.__filtered__; - result.__iteratees__ = copyArray(this.__iteratees__); - result.__takeCount__ = this.__takeCount__; - result.__views__ = copyArray(this.__views__); - return result; -} - -module.exports = lazyClone; diff --git a/node_modules/lodash/_lazyReverse.js b/node_modules/lodash/_lazyReverse.js deleted file mode 100644 index c5b5219..0000000 --- a/node_modules/lodash/_lazyReverse.js +++ /dev/null @@ -1,23 +0,0 @@ -var LazyWrapper = require('./_LazyWrapper'); - -/** - * Reverses the direction of lazy iteration. - * - * @private - * @name reverse - * @memberOf LazyWrapper - * @returns {Object} Returns the new reversed `LazyWrapper` object. - */ -function lazyReverse() { - if (this.__filtered__) { - var result = new LazyWrapper(this); - result.__dir__ = -1; - result.__filtered__ = true; - } else { - result = this.clone(); - result.__dir__ *= -1; - } - return result; -} - -module.exports = lazyReverse; diff --git a/node_modules/lodash/_lazyValue.js b/node_modules/lodash/_lazyValue.js deleted file mode 100644 index 371ca8d..0000000 --- a/node_modules/lodash/_lazyValue.js +++ /dev/null @@ -1,69 +0,0 @@ -var baseWrapperValue = require('./_baseWrapperValue'), - getView = require('./_getView'), - isArray = require('./isArray'); - -/** Used to indicate the type of lazy iteratees. */ -var LAZY_FILTER_FLAG = 1, - LAZY_MAP_FLAG = 2; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Extracts the unwrapped value from its lazy wrapper. - * - * @private - * @name value - * @memberOf LazyWrapper - * @returns {*} Returns the unwrapped value. - */ -function lazyValue() { - var array = this.__wrapped__.value(), - dir = this.__dir__, - isArr = isArray(array), - isRight = dir < 0, - arrLength = isArr ? array.length : 0, - view = getView(0, arrLength, this.__views__), - start = view.start, - end = view.end, - length = end - start, - index = isRight ? end : (start - 1), - iteratees = this.__iteratees__, - iterLength = iteratees.length, - resIndex = 0, - takeCount = nativeMin(length, this.__takeCount__); - - if (!isArr || (!isRight && arrLength == length && takeCount == length)) { - return baseWrapperValue(array, this.__actions__); - } - var result = []; - - outer: - while (length-- && resIndex < takeCount) { - index += dir; - - var iterIndex = -1, - value = array[index]; - - while (++iterIndex < iterLength) { - var data = iteratees[iterIndex], - iteratee = data.iteratee, - type = data.type, - computed = iteratee(value); - - if (type == LAZY_MAP_FLAG) { - value = computed; - } else if (!computed) { - if (type == LAZY_FILTER_FLAG) { - continue outer; - } else { - break outer; - } - } - } - result[resIndex++] = value; - } - return result; -} - -module.exports = lazyValue; diff --git a/node_modules/lodash/_listCacheClear.js b/node_modules/lodash/_listCacheClear.js deleted file mode 100644 index acbe39a..0000000 --- a/node_modules/lodash/_listCacheClear.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; - this.size = 0; -} - -module.exports = listCacheClear; diff --git a/node_modules/lodash/_listCacheDelete.js b/node_modules/lodash/_listCacheDelete.js deleted file mode 100644 index b1384ad..0000000 --- a/node_modules/lodash/_listCacheDelete.js +++ /dev/null @@ -1,35 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; -} - -module.exports = listCacheDelete; diff --git a/node_modules/lodash/_listCacheGet.js b/node_modules/lodash/_listCacheGet.js deleted file mode 100644 index f8192fc..0000000 --- a/node_modules/lodash/_listCacheGet.js +++ /dev/null @@ -1,19 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} - -module.exports = listCacheGet; diff --git a/node_modules/lodash/_listCacheHas.js b/node_modules/lodash/_listCacheHas.js deleted file mode 100644 index 2adf671..0000000 --- a/node_modules/lodash/_listCacheHas.js +++ /dev/null @@ -1,16 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} - -module.exports = listCacheHas; diff --git a/node_modules/lodash/_listCacheSet.js b/node_modules/lodash/_listCacheSet.js deleted file mode 100644 index 5855c95..0000000 --- a/node_modules/lodash/_listCacheSet.js +++ /dev/null @@ -1,26 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -module.exports = listCacheSet; diff --git a/node_modules/lodash/_mapCacheClear.js b/node_modules/lodash/_mapCacheClear.js deleted file mode 100644 index bc9ca20..0000000 --- a/node_modules/lodash/_mapCacheClear.js +++ /dev/null @@ -1,21 +0,0 @@ -var Hash = require('./_Hash'), - ListCache = require('./_ListCache'), - Map = require('./_Map'); - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} - -module.exports = mapCacheClear; diff --git a/node_modules/lodash/_mapCacheDelete.js b/node_modules/lodash/_mapCacheDelete.js deleted file mode 100644 index 946ca3c..0000000 --- a/node_modules/lodash/_mapCacheDelete.js +++ /dev/null @@ -1,18 +0,0 @@ -var getMapData = require('./_getMapData'); - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; -} - -module.exports = mapCacheDelete; diff --git a/node_modules/lodash/_mapCacheGet.js b/node_modules/lodash/_mapCacheGet.js deleted file mode 100644 index f29f55c..0000000 --- a/node_modules/lodash/_mapCacheGet.js +++ /dev/null @@ -1,16 +0,0 @@ -var getMapData = require('./_getMapData'); - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} - -module.exports = mapCacheGet; diff --git a/node_modules/lodash/_mapCacheHas.js b/node_modules/lodash/_mapCacheHas.js deleted file mode 100644 index a1214c0..0000000 --- a/node_modules/lodash/_mapCacheHas.js +++ /dev/null @@ -1,16 +0,0 @@ -var getMapData = require('./_getMapData'); - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); -} - -module.exports = mapCacheHas; diff --git a/node_modules/lodash/_mapCacheSet.js b/node_modules/lodash/_mapCacheSet.js deleted file mode 100644 index 7346849..0000000 --- a/node_modules/lodash/_mapCacheSet.js +++ /dev/null @@ -1,22 +0,0 @@ -var getMapData = require('./_getMapData'); - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; - - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; -} - -module.exports = mapCacheSet; diff --git a/node_modules/lodash/_mapToArray.js b/node_modules/lodash/_mapToArray.js deleted file mode 100644 index fe3dd53..0000000 --- a/node_modules/lodash/_mapToArray.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -module.exports = mapToArray; diff --git a/node_modules/lodash/_matchesStrictComparable.js b/node_modules/lodash/_matchesStrictComparable.js deleted file mode 100644 index f608af9..0000000 --- a/node_modules/lodash/_matchesStrictComparable.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -module.exports = matchesStrictComparable; diff --git a/node_modules/lodash/_memoizeCapped.js b/node_modules/lodash/_memoizeCapped.js deleted file mode 100644 index 7f71c8f..0000000 --- a/node_modules/lodash/_memoizeCapped.js +++ /dev/null @@ -1,26 +0,0 @@ -var memoize = require('./memoize'); - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -module.exports = memoizeCapped; diff --git a/node_modules/lodash/_mergeData.js b/node_modules/lodash/_mergeData.js deleted file mode 100644 index cb570f9..0000000 --- a/node_modules/lodash/_mergeData.js +++ /dev/null @@ -1,90 +0,0 @@ -var composeArgs = require('./_composeArgs'), - composeArgsRight = require('./_composeArgsRight'), - replaceHolders = require('./_replaceHolders'); - -/** Used as the internal argument placeholder. */ -var PLACEHOLDER = '__lodash_placeholder__'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Merges the function metadata of `source` into `data`. - * - * Merging metadata reduces the number of wrappers used to invoke a function. - * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` - * may be applied regardless of execution order. Methods like `_.ary` and - * `_.rearg` modify function arguments, making the order in which they are - * executed important, preventing the merging of metadata. However, we make - * an exception for a safe combined case where curried functions have `_.ary` - * and or `_.rearg` applied. - * - * @private - * @param {Array} data The destination metadata. - * @param {Array} source The source metadata. - * @returns {Array} Returns `data`. - */ -function mergeData(data, source) { - var bitmask = data[1], - srcBitmask = source[1], - newBitmask = bitmask | srcBitmask, - isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); - - var isCombo = - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || - ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); - - // Exit early if metadata can't be merged. - if (!(isCommon || isCombo)) { - return data; - } - // Use source `thisArg` if available. - if (srcBitmask & WRAP_BIND_FLAG) { - data[2] = source[2]; - // Set when currying a bound function. - newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; - } - // Compose partial arguments. - var value = source[3]; - if (value) { - var partials = data[3]; - data[3] = partials ? composeArgs(partials, value, source[4]) : value; - data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; - } - // Compose partial right arguments. - value = source[5]; - if (value) { - partials = data[5]; - data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; - data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; - } - // Use source `argPos` if available. - value = source[7]; - if (value) { - data[7] = value; - } - // Use source `ary` if it's smaller. - if (srcBitmask & WRAP_ARY_FLAG) { - data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); - } - // Use source `arity` if one is not provided. - if (data[9] == null) { - data[9] = source[9]; - } - // Use source `func` and merge bitmasks. - data[0] = source[0]; - data[1] = newBitmask; - - return data; -} - -module.exports = mergeData; diff --git a/node_modules/lodash/_metaMap.js b/node_modules/lodash/_metaMap.js deleted file mode 100644 index 0157a0b..0000000 --- a/node_modules/lodash/_metaMap.js +++ /dev/null @@ -1,6 +0,0 @@ -var WeakMap = require('./_WeakMap'); - -/** Used to store function metadata. */ -var metaMap = WeakMap && new WeakMap; - -module.exports = metaMap; diff --git a/node_modules/lodash/_nativeCreate.js b/node_modules/lodash/_nativeCreate.js deleted file mode 100644 index c7aede8..0000000 --- a/node_modules/lodash/_nativeCreate.js +++ /dev/null @@ -1,6 +0,0 @@ -var getNative = require('./_getNative'); - -/* Built-in method references that are verified to be native. */ -var nativeCreate = getNative(Object, 'create'); - -module.exports = nativeCreate; diff --git a/node_modules/lodash/_nativeKeys.js b/node_modules/lodash/_nativeKeys.js deleted file mode 100644 index 479a104..0000000 --- a/node_modules/lodash/_nativeKeys.js +++ /dev/null @@ -1,6 +0,0 @@ -var overArg = require('./_overArg'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object); - -module.exports = nativeKeys; diff --git a/node_modules/lodash/_nativeKeysIn.js b/node_modules/lodash/_nativeKeysIn.js deleted file mode 100644 index 00ee505..0000000 --- a/node_modules/lodash/_nativeKeysIn.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; -} - -module.exports = nativeKeysIn; diff --git a/node_modules/lodash/_nodeUtil.js b/node_modules/lodash/_nodeUtil.js deleted file mode 100644 index 983d78f..0000000 --- a/node_modules/lodash/_nodeUtil.js +++ /dev/null @@ -1,30 +0,0 @@ -var freeGlobal = require('./_freeGlobal'); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && freeGlobal.process; - -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - // Use `util.types` for Node.js 10+. - var types = freeModule && freeModule.require && freeModule.require('util').types; - - if (types) { - return types; - } - - // Legacy `process.binding('util')` for Node.js < 10. - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} -}()); - -module.exports = nodeUtil; diff --git a/node_modules/lodash/_objectToString.js b/node_modules/lodash/_objectToString.js deleted file mode 100644 index c614ec0..0000000 --- a/node_modules/lodash/_objectToString.js +++ /dev/null @@ -1,22 +0,0 @@ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} - -module.exports = objectToString; diff --git a/node_modules/lodash/_overArg.js b/node_modules/lodash/_overArg.js deleted file mode 100644 index 651c5c5..0000000 --- a/node_modules/lodash/_overArg.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -module.exports = overArg; diff --git a/node_modules/lodash/_overRest.js b/node_modules/lodash/_overRest.js deleted file mode 100644 index c7cdef3..0000000 --- a/node_modules/lodash/_overRest.js +++ /dev/null @@ -1,36 +0,0 @@ -var apply = require('./_apply'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ -function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; -} - -module.exports = overRest; diff --git a/node_modules/lodash/_parent.js b/node_modules/lodash/_parent.js deleted file mode 100644 index f174328..0000000 --- a/node_modules/lodash/_parent.js +++ /dev/null @@ -1,16 +0,0 @@ -var baseGet = require('./_baseGet'), - baseSlice = require('./_baseSlice'); - -/** - * Gets the parent value at `path` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} path The path to get the parent value of. - * @returns {*} Returns the parent value. - */ -function parent(object, path) { - return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); -} - -module.exports = parent; diff --git a/node_modules/lodash/_reEscape.js b/node_modules/lodash/_reEscape.js deleted file mode 100644 index 7f47eda..0000000 --- a/node_modules/lodash/_reEscape.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Used to match template delimiters. */ -var reEscape = /<%-([\s\S]+?)%>/g; - -module.exports = reEscape; diff --git a/node_modules/lodash/_reEvaluate.js b/node_modules/lodash/_reEvaluate.js deleted file mode 100644 index 6adfc31..0000000 --- a/node_modules/lodash/_reEvaluate.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Used to match template delimiters. */ -var reEvaluate = /<%([\s\S]+?)%>/g; - -module.exports = reEvaluate; diff --git a/node_modules/lodash/_reInterpolate.js b/node_modules/lodash/_reInterpolate.js deleted file mode 100644 index d02ff0b..0000000 --- a/node_modules/lodash/_reInterpolate.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Used to match template delimiters. */ -var reInterpolate = /<%=([\s\S]+?)%>/g; - -module.exports = reInterpolate; diff --git a/node_modules/lodash/_realNames.js b/node_modules/lodash/_realNames.js deleted file mode 100644 index aa0d529..0000000 --- a/node_modules/lodash/_realNames.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Used to lookup unminified function names. */ -var realNames = {}; - -module.exports = realNames; diff --git a/node_modules/lodash/_reorder.js b/node_modules/lodash/_reorder.js deleted file mode 100644 index a3502b0..0000000 --- a/node_modules/lodash/_reorder.js +++ /dev/null @@ -1,29 +0,0 @@ -var copyArray = require('./_copyArray'), - isIndex = require('./_isIndex'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Reorder `array` according to the specified indexes where the element at - * the first index is assigned as the first element, the element at - * the second index is assigned as the second element, and so on. - * - * @private - * @param {Array} array The array to reorder. - * @param {Array} indexes The arranged array indexes. - * @returns {Array} Returns `array`. - */ -function reorder(array, indexes) { - var arrLength = array.length, - length = nativeMin(indexes.length, arrLength), - oldArray = copyArray(array); - - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; - } - return array; -} - -module.exports = reorder; diff --git a/node_modules/lodash/_replaceHolders.js b/node_modules/lodash/_replaceHolders.js deleted file mode 100644 index 74360ec..0000000 --- a/node_modules/lodash/_replaceHolders.js +++ /dev/null @@ -1,29 +0,0 @@ -/** Used as the internal argument placeholder. */ -var PLACEHOLDER = '__lodash_placeholder__'; - -/** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ -function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value === placeholder || value === PLACEHOLDER) { - array[index] = PLACEHOLDER; - result[resIndex++] = index; - } - } - return result; -} - -module.exports = replaceHolders; diff --git a/node_modules/lodash/_root.js b/node_modules/lodash/_root.js deleted file mode 100644 index d2852be..0000000 --- a/node_modules/lodash/_root.js +++ /dev/null @@ -1,9 +0,0 @@ -var freeGlobal = require('./_freeGlobal'); - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -module.exports = root; diff --git a/node_modules/lodash/_safeGet.js b/node_modules/lodash/_safeGet.js deleted file mode 100644 index b070897..0000000 --- a/node_modules/lodash/_safeGet.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Gets the value at `key`, unless `key` is "__proto__" or "constructor". - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function safeGet(object, key) { - if (key === 'constructor' && typeof object[key] === 'function') { - return; - } - - if (key == '__proto__') { - return; - } - - return object[key]; -} - -module.exports = safeGet; diff --git a/node_modules/lodash/_setCacheAdd.js b/node_modules/lodash/_setCacheAdd.js deleted file mode 100644 index 1081a74..0000000 --- a/node_modules/lodash/_setCacheAdd.js +++ /dev/null @@ -1,19 +0,0 @@ -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -module.exports = setCacheAdd; diff --git a/node_modules/lodash/_setCacheHas.js b/node_modules/lodash/_setCacheHas.js deleted file mode 100644 index 9a49255..0000000 --- a/node_modules/lodash/_setCacheHas.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -module.exports = setCacheHas; diff --git a/node_modules/lodash/_setData.js b/node_modules/lodash/_setData.js deleted file mode 100644 index e5cf3eb..0000000 --- a/node_modules/lodash/_setData.js +++ /dev/null @@ -1,20 +0,0 @@ -var baseSetData = require('./_baseSetData'), - shortOut = require('./_shortOut'); - -/** - * Sets metadata for `func`. - * - * **Note:** If this function becomes hot, i.e. is invoked a lot in a short - * period of time, it will trip its breaker and transition to an identity - * function to avoid garbage collection pauses in V8. See - * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) - * for more details. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ -var setData = shortOut(baseSetData); - -module.exports = setData; diff --git a/node_modules/lodash/_setToArray.js b/node_modules/lodash/_setToArray.js deleted file mode 100644 index b87f074..0000000 --- a/node_modules/lodash/_setToArray.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -module.exports = setToArray; diff --git a/node_modules/lodash/_setToPairs.js b/node_modules/lodash/_setToPairs.js deleted file mode 100644 index 36ad37a..0000000 --- a/node_modules/lodash/_setToPairs.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Converts `set` to its value-value pairs. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the value-value pairs. - */ -function setToPairs(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = [value, value]; - }); - return result; -} - -module.exports = setToPairs; diff --git a/node_modules/lodash/_setToString.js b/node_modules/lodash/_setToString.js deleted file mode 100644 index 6ca8419..0000000 --- a/node_modules/lodash/_setToString.js +++ /dev/null @@ -1,14 +0,0 @@ -var baseSetToString = require('./_baseSetToString'), - shortOut = require('./_shortOut'); - -/** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var setToString = shortOut(baseSetToString); - -module.exports = setToString; diff --git a/node_modules/lodash/_setWrapToString.js b/node_modules/lodash/_setWrapToString.js deleted file mode 100644 index decdc44..0000000 --- a/node_modules/lodash/_setWrapToString.js +++ /dev/null @@ -1,21 +0,0 @@ -var getWrapDetails = require('./_getWrapDetails'), - insertWrapDetails = require('./_insertWrapDetails'), - setToString = require('./_setToString'), - updateWrapDetails = require('./_updateWrapDetails'); - -/** - * Sets the `toString` method of `wrapper` to mimic the source of `reference` - * with wrapper details in a comment at the top of the source body. - * - * @private - * @param {Function} wrapper The function to modify. - * @param {Function} reference The reference function. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Function} Returns `wrapper`. - */ -function setWrapToString(wrapper, reference, bitmask) { - var source = (reference + ''); - return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); -} - -module.exports = setWrapToString; diff --git a/node_modules/lodash/_shortOut.js b/node_modules/lodash/_shortOut.js deleted file mode 100644 index 3300a07..0000000 --- a/node_modules/lodash/_shortOut.js +++ /dev/null @@ -1,37 +0,0 @@ -/** Used to detect hot functions by number of calls within a span of milliseconds. */ -var HOT_COUNT = 800, - HOT_SPAN = 16; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeNow = Date.now; - -/** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. - * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. - */ -function shortOut(func) { - var count = 0, - lastCalled = 0; - - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; - } - return func.apply(undefined, arguments); - }; -} - -module.exports = shortOut; diff --git a/node_modules/lodash/_shuffleSelf.js b/node_modules/lodash/_shuffleSelf.js deleted file mode 100644 index 8bcc4f5..0000000 --- a/node_modules/lodash/_shuffleSelf.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseRandom = require('./_baseRandom'); - -/** - * A specialized version of `_.shuffle` which mutates and sets the size of `array`. - * - * @private - * @param {Array} array The array to shuffle. - * @param {number} [size=array.length] The size of `array`. - * @returns {Array} Returns `array`. - */ -function shuffleSelf(array, size) { - var index = -1, - length = array.length, - lastIndex = length - 1; - - size = size === undefined ? length : size; - while (++index < size) { - var rand = baseRandom(index, lastIndex), - value = array[rand]; - - array[rand] = array[index]; - array[index] = value; - } - array.length = size; - return array; -} - -module.exports = shuffleSelf; diff --git a/node_modules/lodash/_stackClear.js b/node_modules/lodash/_stackClear.js deleted file mode 100644 index ce8e5a9..0000000 --- a/node_modules/lodash/_stackClear.js +++ /dev/null @@ -1,15 +0,0 @@ -var ListCache = require('./_ListCache'); - -/** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ -function stackClear() { - this.__data__ = new ListCache; - this.size = 0; -} - -module.exports = stackClear; diff --git a/node_modules/lodash/_stackDelete.js b/node_modules/lodash/_stackDelete.js deleted file mode 100644 index ff9887a..0000000 --- a/node_modules/lodash/_stackDelete.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); - - this.size = data.size; - return result; -} - -module.exports = stackDelete; diff --git a/node_modules/lodash/_stackGet.js b/node_modules/lodash/_stackGet.js deleted file mode 100644 index 1cdf004..0000000 --- a/node_modules/lodash/_stackGet.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function stackGet(key) { - return this.__data__.get(key); -} - -module.exports = stackGet; diff --git a/node_modules/lodash/_stackHas.js b/node_modules/lodash/_stackHas.js deleted file mode 100644 index 16a3ad1..0000000 --- a/node_modules/lodash/_stackHas.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function stackHas(key) { - return this.__data__.has(key); -} - -module.exports = stackHas; diff --git a/node_modules/lodash/_stackSet.js b/node_modules/lodash/_stackSet.js deleted file mode 100644 index b790ac5..0000000 --- a/node_modules/lodash/_stackSet.js +++ /dev/null @@ -1,34 +0,0 @@ -var ListCache = require('./_ListCache'), - Map = require('./_Map'), - MapCache = require('./_MapCache'); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ -function stackSet(key, value) { - var data = this.__data__; - if (data instanceof ListCache) { - var pairs = data.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - data = this.__data__ = new MapCache(pairs); - } - data.set(key, value); - this.size = data.size; - return this; -} - -module.exports = stackSet; diff --git a/node_modules/lodash/_strictIndexOf.js b/node_modules/lodash/_strictIndexOf.js deleted file mode 100644 index 0486a49..0000000 --- a/node_modules/lodash/_strictIndexOf.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -module.exports = strictIndexOf; diff --git a/node_modules/lodash/_strictLastIndexOf.js b/node_modules/lodash/_strictLastIndexOf.js deleted file mode 100644 index d7310dc..0000000 --- a/node_modules/lodash/_strictLastIndexOf.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A specialized version of `_.lastIndexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictLastIndexOf(array, value, fromIndex) { - var index = fromIndex + 1; - while (index--) { - if (array[index] === value) { - return index; - } - } - return index; -} - -module.exports = strictLastIndexOf; diff --git a/node_modules/lodash/_stringSize.js b/node_modules/lodash/_stringSize.js deleted file mode 100644 index 17ef462..0000000 --- a/node_modules/lodash/_stringSize.js +++ /dev/null @@ -1,18 +0,0 @@ -var asciiSize = require('./_asciiSize'), - hasUnicode = require('./_hasUnicode'), - unicodeSize = require('./_unicodeSize'); - -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return hasUnicode(string) - ? unicodeSize(string) - : asciiSize(string); -} - -module.exports = stringSize; diff --git a/node_modules/lodash/_stringToArray.js b/node_modules/lodash/_stringToArray.js deleted file mode 100644 index d161158..0000000 --- a/node_modules/lodash/_stringToArray.js +++ /dev/null @@ -1,18 +0,0 @@ -var asciiToArray = require('./_asciiToArray'), - hasUnicode = require('./_hasUnicode'), - unicodeToArray = require('./_unicodeToArray'); - -/** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function stringToArray(string) { - return hasUnicode(string) - ? unicodeToArray(string) - : asciiToArray(string); -} - -module.exports = stringToArray; diff --git a/node_modules/lodash/_stringToPath.js b/node_modules/lodash/_stringToPath.js deleted file mode 100644 index 8f39f8a..0000000 --- a/node_modules/lodash/_stringToPath.js +++ /dev/null @@ -1,27 +0,0 @@ -var memoizeCapped = require('./_memoizeCapped'); - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -module.exports = stringToPath; diff --git a/node_modules/lodash/_toKey.js b/node_modules/lodash/_toKey.js deleted file mode 100644 index c6d645c..0000000 --- a/node_modules/lodash/_toKey.js +++ /dev/null @@ -1,21 +0,0 @@ -var isSymbol = require('./isSymbol'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -module.exports = toKey; diff --git a/node_modules/lodash/_toSource.js b/node_modules/lodash/_toSource.js deleted file mode 100644 index a020b38..0000000 --- a/node_modules/lodash/_toSource.js +++ /dev/null @@ -1,26 +0,0 @@ -/** Used for built-in method references. */ -var funcProto = Function.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -module.exports = toSource; diff --git a/node_modules/lodash/_trimmedEndIndex.js b/node_modules/lodash/_trimmedEndIndex.js deleted file mode 100644 index 139439a..0000000 --- a/node_modules/lodash/_trimmedEndIndex.js +++ /dev/null @@ -1,19 +0,0 @@ -/** Used to match a single whitespace character. */ -var reWhitespace = /\s/; - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ -function trimmedEndIndex(string) { - var index = string.length; - - while (index-- && reWhitespace.test(string.charAt(index))) {} - return index; -} - -module.exports = trimmedEndIndex; diff --git a/node_modules/lodash/_unescapeHtmlChar.js b/node_modules/lodash/_unescapeHtmlChar.js deleted file mode 100644 index a71fecb..0000000 --- a/node_modules/lodash/_unescapeHtmlChar.js +++ /dev/null @@ -1,21 +0,0 @@ -var basePropertyOf = require('./_basePropertyOf'); - -/** Used to map HTML entities to characters. */ -var htmlUnescapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - ''': "'" -}; - -/** - * Used by `_.unescape` to convert HTML entities to characters. - * - * @private - * @param {string} chr The matched character to unescape. - * @returns {string} Returns the unescaped character. - */ -var unescapeHtmlChar = basePropertyOf(htmlUnescapes); - -module.exports = unescapeHtmlChar; diff --git a/node_modules/lodash/_unicodeSize.js b/node_modules/lodash/_unicodeSize.js deleted file mode 100644 index 68137ec..0000000 --- a/node_modules/lodash/_unicodeSize.js +++ /dev/null @@ -1,44 +0,0 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; -} - -module.exports = unicodeSize; diff --git a/node_modules/lodash/_unicodeToArray.js b/node_modules/lodash/_unicodeToArray.js deleted file mode 100644 index 2a725c0..0000000 --- a/node_modules/lodash/_unicodeToArray.js +++ /dev/null @@ -1,40 +0,0 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Converts a Unicode `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function unicodeToArray(string) { - return string.match(reUnicode) || []; -} - -module.exports = unicodeToArray; diff --git a/node_modules/lodash/_unicodeWords.js b/node_modules/lodash/_unicodeWords.js deleted file mode 100644 index e72e6e0..0000000 --- a/node_modules/lodash/_unicodeWords.js +++ /dev/null @@ -1,69 +0,0 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsDingbatRange = '\\u2700-\\u27bf', - rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', - rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', - rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsPunctuationRange = '\\u2000-\\u206f', - rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', - rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', - rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; - -/** Used to compose unicode capture groups. */ -var rsApos = "['\u2019]", - rsBreak = '[' + rsBreakRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsDigits = '\\d+', - rsDingbat = '[' + rsDingbatRange + ']', - rsLower = '[' + rsLowerRange + ']', - rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsUpper = '[' + rsUpperRange + ']', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', - rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', - reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', - rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; - -/** Used to match complex or compound words. */ -var reUnicodeWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', - rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, - rsUpper + '+' + rsOptContrUpper, - rsOrdUpper, - rsOrdLower, - rsDigits, - rsEmoji -].join('|'), 'g'); - -/** - * Splits a Unicode `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ -function unicodeWords(string) { - return string.match(reUnicodeWord) || []; -} - -module.exports = unicodeWords; diff --git a/node_modules/lodash/_updateWrapDetails.js b/node_modules/lodash/_updateWrapDetails.js deleted file mode 100644 index 8759fbd..0000000 --- a/node_modules/lodash/_updateWrapDetails.js +++ /dev/null @@ -1,46 +0,0 @@ -var arrayEach = require('./_arrayEach'), - arrayIncludes = require('./_arrayIncludes'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256, - WRAP_FLIP_FLAG = 512; - -/** Used to associate wrap methods with their bit flags. */ -var wrapFlags = [ - ['ary', WRAP_ARY_FLAG], - ['bind', WRAP_BIND_FLAG], - ['bindKey', WRAP_BIND_KEY_FLAG], - ['curry', WRAP_CURRY_FLAG], - ['curryRight', WRAP_CURRY_RIGHT_FLAG], - ['flip', WRAP_FLIP_FLAG], - ['partial', WRAP_PARTIAL_FLAG], - ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], - ['rearg', WRAP_REARG_FLAG] -]; - -/** - * Updates wrapper `details` based on `bitmask` flags. - * - * @private - * @returns {Array} details The details to modify. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Array} Returns `details`. - */ -function updateWrapDetails(details, bitmask) { - arrayEach(wrapFlags, function(pair) { - var value = '_.' + pair[0]; - if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { - details.push(value); - } - }); - return details.sort(); -} - -module.exports = updateWrapDetails; diff --git a/node_modules/lodash/_wrapperClone.js b/node_modules/lodash/_wrapperClone.js deleted file mode 100644 index 7bb58a2..0000000 --- a/node_modules/lodash/_wrapperClone.js +++ /dev/null @@ -1,23 +0,0 @@ -var LazyWrapper = require('./_LazyWrapper'), - LodashWrapper = require('./_LodashWrapper'), - copyArray = require('./_copyArray'); - -/** - * Creates a clone of `wrapper`. - * - * @private - * @param {Object} wrapper The wrapper to clone. - * @returns {Object} Returns the cloned wrapper. - */ -function wrapperClone(wrapper) { - if (wrapper instanceof LazyWrapper) { - return wrapper.clone(); - } - var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); - result.__actions__ = copyArray(wrapper.__actions__); - result.__index__ = wrapper.__index__; - result.__values__ = wrapper.__values__; - return result; -} - -module.exports = wrapperClone; diff --git a/node_modules/lodash/add.js b/node_modules/lodash/add.js deleted file mode 100644 index f069515..0000000 --- a/node_modules/lodash/add.js +++ /dev/null @@ -1,22 +0,0 @@ -var createMathOperation = require('./_createMathOperation'); - -/** - * Adds two numbers. - * - * @static - * @memberOf _ - * @since 3.4.0 - * @category Math - * @param {number} augend The first number in an addition. - * @param {number} addend The second number in an addition. - * @returns {number} Returns the total. - * @example - * - * _.add(6, 4); - * // => 10 - */ -var add = createMathOperation(function(augend, addend) { - return augend + addend; -}, 0); - -module.exports = add; diff --git a/node_modules/lodash/after.js b/node_modules/lodash/after.js deleted file mode 100644 index 3900c97..0000000 --- a/node_modules/lodash/after.js +++ /dev/null @@ -1,42 +0,0 @@ -var toInteger = require('./toInteger'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * The opposite of `_.before`; this method creates a function that invokes - * `func` once it's called `n` or more times. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {number} n The number of calls before `func` is invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var saves = ['profile', 'settings']; - * - * var done = _.after(saves.length, function() { - * console.log('done saving!'); - * }); - * - * _.forEach(saves, function(type) { - * asyncSave({ 'type': type, 'complete': done }); - * }); - * // => Logs 'done saving!' after the two async saves have completed. - */ -function after(n, func) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; -} - -module.exports = after; diff --git a/node_modules/lodash/array.js b/node_modules/lodash/array.js deleted file mode 100644 index af688d3..0000000 --- a/node_modules/lodash/array.js +++ /dev/null @@ -1,67 +0,0 @@ -module.exports = { - 'chunk': require('./chunk'), - 'compact': require('./compact'), - 'concat': require('./concat'), - 'difference': require('./difference'), - 'differenceBy': require('./differenceBy'), - 'differenceWith': require('./differenceWith'), - 'drop': require('./drop'), - 'dropRight': require('./dropRight'), - 'dropRightWhile': require('./dropRightWhile'), - 'dropWhile': require('./dropWhile'), - 'fill': require('./fill'), - 'findIndex': require('./findIndex'), - 'findLastIndex': require('./findLastIndex'), - 'first': require('./first'), - 'flatten': require('./flatten'), - 'flattenDeep': require('./flattenDeep'), - 'flattenDepth': require('./flattenDepth'), - 'fromPairs': require('./fromPairs'), - 'head': require('./head'), - 'indexOf': require('./indexOf'), - 'initial': require('./initial'), - 'intersection': require('./intersection'), - 'intersectionBy': require('./intersectionBy'), - 'intersectionWith': require('./intersectionWith'), - 'join': require('./join'), - 'last': require('./last'), - 'lastIndexOf': require('./lastIndexOf'), - 'nth': require('./nth'), - 'pull': require('./pull'), - 'pullAll': require('./pullAll'), - 'pullAllBy': require('./pullAllBy'), - 'pullAllWith': require('./pullAllWith'), - 'pullAt': require('./pullAt'), - 'remove': require('./remove'), - 'reverse': require('./reverse'), - 'slice': require('./slice'), - 'sortedIndex': require('./sortedIndex'), - 'sortedIndexBy': require('./sortedIndexBy'), - 'sortedIndexOf': require('./sortedIndexOf'), - 'sortedLastIndex': require('./sortedLastIndex'), - 'sortedLastIndexBy': require('./sortedLastIndexBy'), - 'sortedLastIndexOf': require('./sortedLastIndexOf'), - 'sortedUniq': require('./sortedUniq'), - 'sortedUniqBy': require('./sortedUniqBy'), - 'tail': require('./tail'), - 'take': require('./take'), - 'takeRight': require('./takeRight'), - 'takeRightWhile': require('./takeRightWhile'), - 'takeWhile': require('./takeWhile'), - 'union': require('./union'), - 'unionBy': require('./unionBy'), - 'unionWith': require('./unionWith'), - 'uniq': require('./uniq'), - 'uniqBy': require('./uniqBy'), - 'uniqWith': require('./uniqWith'), - 'unzip': require('./unzip'), - 'unzipWith': require('./unzipWith'), - 'without': require('./without'), - 'xor': require('./xor'), - 'xorBy': require('./xorBy'), - 'xorWith': require('./xorWith'), - 'zip': require('./zip'), - 'zipObject': require('./zipObject'), - 'zipObjectDeep': require('./zipObjectDeep'), - 'zipWith': require('./zipWith') -}; diff --git a/node_modules/lodash/ary.js b/node_modules/lodash/ary.js deleted file mode 100644 index 70c87d0..0000000 --- a/node_modules/lodash/ary.js +++ /dev/null @@ -1,29 +0,0 @@ -var createWrap = require('./_createWrap'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_ARY_FLAG = 128; - -/** - * Creates a function that invokes `func`, with up to `n` arguments, - * ignoring any additional arguments. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to cap arguments for. - * @param {number} [n=func.length] The arity cap. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new capped function. - * @example - * - * _.map(['6', '8', '10'], _.ary(parseInt, 1)); - * // => [6, 8, 10] - */ -function ary(func, n, guard) { - n = guard ? undefined : n; - n = (func && n == null) ? func.length : n; - return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); -} - -module.exports = ary; diff --git a/node_modules/lodash/assign.js b/node_modules/lodash/assign.js deleted file mode 100644 index 909db26..0000000 --- a/node_modules/lodash/assign.js +++ /dev/null @@ -1,58 +0,0 @@ -var assignValue = require('./_assignValue'), - copyObject = require('./_copyObject'), - createAssigner = require('./_createAssigner'), - isArrayLike = require('./isArrayLike'), - isPrototype = require('./_isPrototype'), - keys = require('./keys'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assign({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3 } - */ -var assign = createAssigner(function(object, source) { - if (isPrototype(source) || isArrayLike(source)) { - copyObject(source, keys(source), object); - return; - } - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - assignValue(object, key, source[key]); - } - } -}); - -module.exports = assign; diff --git a/node_modules/lodash/assignIn.js b/node_modules/lodash/assignIn.js deleted file mode 100644 index e663473..0000000 --- a/node_modules/lodash/assignIn.js +++ /dev/null @@ -1,40 +0,0 @@ -var copyObject = require('./_copyObject'), - createAssigner = require('./_createAssigner'), - keysIn = require('./keysIn'); - -/** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assign - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assignIn({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } - */ -var assignIn = createAssigner(function(object, source) { - copyObject(source, keysIn(source), object); -}); - -module.exports = assignIn; diff --git a/node_modules/lodash/assignInWith.js b/node_modules/lodash/assignInWith.js deleted file mode 100644 index 68fcc0b..0000000 --- a/node_modules/lodash/assignInWith.js +++ /dev/null @@ -1,38 +0,0 @@ -var copyObject = require('./_copyObject'), - createAssigner = require('./_createAssigner'), - keysIn = require('./keysIn'); - -/** - * This method is like `_.assignIn` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extendWith - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignWith - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignInWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keysIn(source), object, customizer); -}); - -module.exports = assignInWith; diff --git a/node_modules/lodash/assignWith.js b/node_modules/lodash/assignWith.js deleted file mode 100644 index 7dc6c76..0000000 --- a/node_modules/lodash/assignWith.js +++ /dev/null @@ -1,37 +0,0 @@ -var copyObject = require('./_copyObject'), - createAssigner = require('./_createAssigner'), - keys = require('./keys'); - -/** - * This method is like `_.assign` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignInWith - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var assignWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keys(source), object, customizer); -}); - -module.exports = assignWith; diff --git a/node_modules/lodash/at.js b/node_modules/lodash/at.js deleted file mode 100644 index 781ee9e..0000000 --- a/node_modules/lodash/at.js +++ /dev/null @@ -1,23 +0,0 @@ -var baseAt = require('./_baseAt'), - flatRest = require('./_flatRest'); - -/** - * Creates an array of values corresponding to `paths` of `object`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Array} Returns the picked values. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; - * - * _.at(object, ['a[0].b.c', 'a[1]']); - * // => [3, 4] - */ -var at = flatRest(baseAt); - -module.exports = at; diff --git a/node_modules/lodash/attempt.js b/node_modules/lodash/attempt.js deleted file mode 100644 index 624d015..0000000 --- a/node_modules/lodash/attempt.js +++ /dev/null @@ -1,35 +0,0 @@ -var apply = require('./_apply'), - baseRest = require('./_baseRest'), - isError = require('./isError'); - -/** - * Attempts to invoke `func`, returning either the result or the caught error - * object. Any additional arguments are provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {Function} func The function to attempt. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {*} Returns the `func` result or error object. - * @example - * - * // Avoid throwing errors for invalid selectors. - * var elements = _.attempt(function(selector) { - * return document.querySelectorAll(selector); - * }, '>_>'); - * - * if (_.isError(elements)) { - * elements = []; - * } - */ -var attempt = baseRest(function(func, args) { - try { - return apply(func, undefined, args); - } catch (e) { - return isError(e) ? e : new Error(e); - } -}); - -module.exports = attempt; diff --git a/node_modules/lodash/before.js b/node_modules/lodash/before.js deleted file mode 100644 index a3e0a16..0000000 --- a/node_modules/lodash/before.js +++ /dev/null @@ -1,40 +0,0 @@ -var toInteger = require('./toInteger'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. - */ -function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result; - }; -} - -module.exports = before; diff --git a/node_modules/lodash/bind.js b/node_modules/lodash/bind.js deleted file mode 100644 index b1076e9..0000000 --- a/node_modules/lodash/bind.js +++ /dev/null @@ -1,57 +0,0 @@ -var baseRest = require('./_baseRest'), - createWrap = require('./_createWrap'), - getHolder = require('./_getHolder'), - replaceHolders = require('./_replaceHolders'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_PARTIAL_FLAG = 32; - -/** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and `partials` prepended to the arguments it receives. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" - * property of bound functions. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * function greet(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * // Bound with placeholders. - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' - */ -var bind = baseRest(function(func, thisArg, partials) { - var bitmask = WRAP_BIND_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bind)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(func, bitmask, thisArg, partials, holders); -}); - -// Assign default placeholders. -bind.placeholder = {}; - -module.exports = bind; diff --git a/node_modules/lodash/bindAll.js b/node_modules/lodash/bindAll.js deleted file mode 100644 index a35706d..0000000 --- a/node_modules/lodash/bindAll.js +++ /dev/null @@ -1,41 +0,0 @@ -var arrayEach = require('./_arrayEach'), - baseAssignValue = require('./_baseAssignValue'), - bind = require('./bind'), - flatRest = require('./_flatRest'), - toKey = require('./_toKey'); - -/** - * Binds methods of an object to the object itself, overwriting the existing - * method. - * - * **Note:** This method doesn't set the "length" property of bound functions. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {Object} object The object to bind and assign the bound methods to. - * @param {...(string|string[])} methodNames The object method names to bind. - * @returns {Object} Returns `object`. - * @example - * - * var view = { - * 'label': 'docs', - * 'click': function() { - * console.log('clicked ' + this.label); - * } - * }; - * - * _.bindAll(view, ['click']); - * jQuery(element).on('click', view.click); - * // => Logs 'clicked docs' when clicked. - */ -var bindAll = flatRest(function(object, methodNames) { - arrayEach(methodNames, function(key) { - key = toKey(key); - baseAssignValue(object, key, bind(object[key], object)); - }); - return object; -}); - -module.exports = bindAll; diff --git a/node_modules/lodash/bindKey.js b/node_modules/lodash/bindKey.js deleted file mode 100644 index f7fd64c..0000000 --- a/node_modules/lodash/bindKey.js +++ /dev/null @@ -1,68 +0,0 @@ -var baseRest = require('./_baseRest'), - createWrap = require('./_createWrap'), - getHolder = require('./_getHolder'), - replaceHolders = require('./_replaceHolders'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_PARTIAL_FLAG = 32; - -/** - * Creates a function that invokes the method at `object[key]` with `partials` - * prepended to the arguments it receives. - * - * This method differs from `_.bind` by allowing bound functions to reference - * methods that may be redefined or don't yet exist. See - * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) - * for more details. - * - * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Function - * @param {Object} object The object to invoke the method on. - * @param {string} key The key of the method. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var object = { - * 'user': 'fred', - * 'greet': function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * }; - * - * var bound = _.bindKey(object, 'greet', 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * object.greet = function(greeting, punctuation) { - * return greeting + 'ya ' + this.user + punctuation; - * }; - * - * bound('!'); - * // => 'hiya fred!' - * - * // Bound with placeholders. - * var bound = _.bindKey(object, 'greet', _, '!'); - * bound('hi'); - * // => 'hiya fred!' - */ -var bindKey = baseRest(function(object, key, partials) { - var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bindKey)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(key, bitmask, object, partials, holders); -}); - -// Assign default placeholders. -bindKey.placeholder = {}; - -module.exports = bindKey; diff --git a/node_modules/lodash/camelCase.js b/node_modules/lodash/camelCase.js deleted file mode 100644 index d7390de..0000000 --- a/node_modules/lodash/camelCase.js +++ /dev/null @@ -1,29 +0,0 @@ -var capitalize = require('./capitalize'), - createCompounder = require('./_createCompounder'); - -/** - * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the camel cased string. - * @example - * - * _.camelCase('Foo Bar'); - * // => 'fooBar' - * - * _.camelCase('--foo-bar--'); - * // => 'fooBar' - * - * _.camelCase('__FOO_BAR__'); - * // => 'fooBar' - */ -var camelCase = createCompounder(function(result, word, index) { - word = word.toLowerCase(); - return result + (index ? capitalize(word) : word); -}); - -module.exports = camelCase; diff --git a/node_modules/lodash/capitalize.js b/node_modules/lodash/capitalize.js deleted file mode 100644 index 3e1600e..0000000 --- a/node_modules/lodash/capitalize.js +++ /dev/null @@ -1,23 +0,0 @@ -var toString = require('./toString'), - upperFirst = require('./upperFirst'); - -/** - * Converts the first character of `string` to upper case and the remaining - * to lower case. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to capitalize. - * @returns {string} Returns the capitalized string. - * @example - * - * _.capitalize('FRED'); - * // => 'Fred' - */ -function capitalize(string) { - return upperFirst(toString(string).toLowerCase()); -} - -module.exports = capitalize; diff --git a/node_modules/lodash/castArray.js b/node_modules/lodash/castArray.js deleted file mode 100644 index e470bdb..0000000 --- a/node_modules/lodash/castArray.js +++ /dev/null @@ -1,44 +0,0 @@ -var isArray = require('./isArray'); - -/** - * Casts `value` as an array if it's not one. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Lang - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast array. - * @example - * - * _.castArray(1); - * // => [1] - * - * _.castArray({ 'a': 1 }); - * // => [{ 'a': 1 }] - * - * _.castArray('abc'); - * // => ['abc'] - * - * _.castArray(null); - * // => [null] - * - * _.castArray(undefined); - * // => [undefined] - * - * _.castArray(); - * // => [] - * - * var array = [1, 2, 3]; - * console.log(_.castArray(array) === array); - * // => true - */ -function castArray() { - if (!arguments.length) { - return []; - } - var value = arguments[0]; - return isArray(value) ? value : [value]; -} - -module.exports = castArray; diff --git a/node_modules/lodash/ceil.js b/node_modules/lodash/ceil.js deleted file mode 100644 index 56c8722..0000000 --- a/node_modules/lodash/ceil.js +++ /dev/null @@ -1,26 +0,0 @@ -var createRound = require('./_createRound'); - -/** - * Computes `number` rounded up to `precision`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Math - * @param {number} number The number to round up. - * @param {number} [precision=0] The precision to round up to. - * @returns {number} Returns the rounded up number. - * @example - * - * _.ceil(4.006); - * // => 5 - * - * _.ceil(6.004, 2); - * // => 6.01 - * - * _.ceil(6040, -2); - * // => 6100 - */ -var ceil = createRound('ceil'); - -module.exports = ceil; diff --git a/node_modules/lodash/chain.js b/node_modules/lodash/chain.js deleted file mode 100644 index f6cd647..0000000 --- a/node_modules/lodash/chain.js +++ /dev/null @@ -1,38 +0,0 @@ -var lodash = require('./wrapperLodash'); - -/** - * Creates a `lodash` wrapper instance that wraps `value` with explicit method - * chain sequences enabled. The result of such sequences must be unwrapped - * with `_#value`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Seq - * @param {*} value The value to wrap. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'pebbles', 'age': 1 } - * ]; - * - * var youngest = _ - * .chain(users) - * .sortBy('age') - * .map(function(o) { - * return o.user + ' is ' + o.age; - * }) - * .head() - * .value(); - * // => 'pebbles is 1' - */ -function chain(value) { - var result = lodash(value); - result.__chain__ = true; - return result; -} - -module.exports = chain; diff --git a/node_modules/lodash/chunk.js b/node_modules/lodash/chunk.js deleted file mode 100644 index 5b562fe..0000000 --- a/node_modules/lodash/chunk.js +++ /dev/null @@ -1,50 +0,0 @@ -var baseSlice = require('./_baseSlice'), - isIterateeCall = require('./_isIterateeCall'), - toInteger = require('./toInteger'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * Creates an array of elements split into groups the length of `size`. - * If `array` can't be split evenly, the final chunk will be the remaining - * elements. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to process. - * @param {number} [size=1] The length of each chunk - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the new array of chunks. - * @example - * - * _.chunk(['a', 'b', 'c', 'd'], 2); - * // => [['a', 'b'], ['c', 'd']] - * - * _.chunk(['a', 'b', 'c', 'd'], 3); - * // => [['a', 'b', 'c'], ['d']] - */ -function chunk(array, size, guard) { - if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { - size = 1; - } else { - size = nativeMax(toInteger(size), 0); - } - var length = array == null ? 0 : array.length; - if (!length || size < 1) { - return []; - } - var index = 0, - resIndex = 0, - result = Array(nativeCeil(length / size)); - - while (index < length) { - result[resIndex++] = baseSlice(array, index, (index += size)); - } - return result; -} - -module.exports = chunk; diff --git a/node_modules/lodash/clamp.js b/node_modules/lodash/clamp.js deleted file mode 100644 index 91a72c9..0000000 --- a/node_modules/lodash/clamp.js +++ /dev/null @@ -1,39 +0,0 @@ -var baseClamp = require('./_baseClamp'), - toNumber = require('./toNumber'); - -/** - * Clamps `number` within the inclusive `lower` and `upper` bounds. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Number - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - * @example - * - * _.clamp(-10, -5, 5); - * // => -5 - * - * _.clamp(10, -5, 5); - * // => 5 - */ -function clamp(number, lower, upper) { - if (upper === undefined) { - upper = lower; - lower = undefined; - } - if (upper !== undefined) { - upper = toNumber(upper); - upper = upper === upper ? upper : 0; - } - if (lower !== undefined) { - lower = toNumber(lower); - lower = lower === lower ? lower : 0; - } - return baseClamp(toNumber(number), lower, upper); -} - -module.exports = clamp; diff --git a/node_modules/lodash/clone.js b/node_modules/lodash/clone.js deleted file mode 100644 index dd439d6..0000000 --- a/node_modules/lodash/clone.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseClone = require('./_baseClone'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; - -/** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ -function clone(value) { - return baseClone(value, CLONE_SYMBOLS_FLAG); -} - -module.exports = clone; diff --git a/node_modules/lodash/cloneDeep.js b/node_modules/lodash/cloneDeep.js deleted file mode 100644 index 4425fbe..0000000 --- a/node_modules/lodash/cloneDeep.js +++ /dev/null @@ -1,29 +0,0 @@ -var baseClone = require('./_baseClone'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} - -module.exports = cloneDeep; diff --git a/node_modules/lodash/cloneDeepWith.js b/node_modules/lodash/cloneDeepWith.js deleted file mode 100644 index fd9c6c0..0000000 --- a/node_modules/lodash/cloneDeepWith.js +++ /dev/null @@ -1,40 +0,0 @@ -var baseClone = require('./_baseClone'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.cloneWith` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the deep cloned value. - * @see _.cloneWith - * @example - * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(true); - * } - * } - * - * var el = _.cloneDeepWith(document.body, customizer); - * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 20 - */ -function cloneDeepWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); -} - -module.exports = cloneDeepWith; diff --git a/node_modules/lodash/cloneWith.js b/node_modules/lodash/cloneWith.js deleted file mode 100644 index d2f4e75..0000000 --- a/node_modules/lodash/cloneWith.js +++ /dev/null @@ -1,42 +0,0 @@ -var baseClone = require('./_baseClone'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it accepts `customizer` which - * is invoked to produce the cloned value. If `customizer` returns `undefined`, - * cloning is handled by the method instead. The `customizer` is invoked with - * up to four arguments; (value [, index|key, object, stack]). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the cloned value. - * @see _.cloneDeepWith - * @example - * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(false); - * } - * } - * - * var el = _.cloneWith(document.body, customizer); - * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 0 - */ -function cloneWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); -} - -module.exports = cloneWith; diff --git a/node_modules/lodash/collection.js b/node_modules/lodash/collection.js deleted file mode 100644 index 77fe837..0000000 --- a/node_modules/lodash/collection.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = { - 'countBy': require('./countBy'), - 'each': require('./each'), - 'eachRight': require('./eachRight'), - 'every': require('./every'), - 'filter': require('./filter'), - 'find': require('./find'), - 'findLast': require('./findLast'), - 'flatMap': require('./flatMap'), - 'flatMapDeep': require('./flatMapDeep'), - 'flatMapDepth': require('./flatMapDepth'), - 'forEach': require('./forEach'), - 'forEachRight': require('./forEachRight'), - 'groupBy': require('./groupBy'), - 'includes': require('./includes'), - 'invokeMap': require('./invokeMap'), - 'keyBy': require('./keyBy'), - 'map': require('./map'), - 'orderBy': require('./orderBy'), - 'partition': require('./partition'), - 'reduce': require('./reduce'), - 'reduceRight': require('./reduceRight'), - 'reject': require('./reject'), - 'sample': require('./sample'), - 'sampleSize': require('./sampleSize'), - 'shuffle': require('./shuffle'), - 'size': require('./size'), - 'some': require('./some'), - 'sortBy': require('./sortBy') -}; diff --git a/node_modules/lodash/commit.js b/node_modules/lodash/commit.js deleted file mode 100644 index fe4db71..0000000 --- a/node_modules/lodash/commit.js +++ /dev/null @@ -1,33 +0,0 @@ -var LodashWrapper = require('./_LodashWrapper'); - -/** - * Executes the chain sequence and returns the wrapped result. - * - * @name commit - * @memberOf _ - * @since 3.2.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapped = _(array).push(3); - * - * console.log(array); - * // => [1, 2] - * - * wrapped = wrapped.commit(); - * console.log(array); - * // => [1, 2, 3] - * - * wrapped.last(); - * // => 3 - * - * console.log(array); - * // => [1, 2, 3] - */ -function wrapperCommit() { - return new LodashWrapper(this.value(), this.__chain__); -} - -module.exports = wrapperCommit; diff --git a/node_modules/lodash/compact.js b/node_modules/lodash/compact.js deleted file mode 100644 index 031fab4..0000000 --- a/node_modules/lodash/compact.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ -function compact(array) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value) { - result[resIndex++] = value; - } - } - return result; -} - -module.exports = compact; diff --git a/node_modules/lodash/concat.js b/node_modules/lodash/concat.js deleted file mode 100644 index 1da48a4..0000000 --- a/node_modules/lodash/concat.js +++ /dev/null @@ -1,43 +0,0 @@ -var arrayPush = require('./_arrayPush'), - baseFlatten = require('./_baseFlatten'), - copyArray = require('./_copyArray'), - isArray = require('./isArray'); - -/** - * Creates a new array concatenating `array` with any additional arrays - * and/or values. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to concatenate. - * @param {...*} [values] The values to concatenate. - * @returns {Array} Returns the new concatenated array. - * @example - * - * var array = [1]; - * var other = _.concat(array, 2, [3], [[4]]); - * - * console.log(other); - * // => [1, 2, 3, [4]] - * - * console.log(array); - * // => [1] - */ -function concat() { - var length = arguments.length; - if (!length) { - return []; - } - var args = Array(length - 1), - array = arguments[0], - index = length; - - while (index--) { - args[index - 1] = arguments[index]; - } - return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); -} - -module.exports = concat; diff --git a/node_modules/lodash/cond.js b/node_modules/lodash/cond.js deleted file mode 100644 index 6455598..0000000 --- a/node_modules/lodash/cond.js +++ /dev/null @@ -1,60 +0,0 @@ -var apply = require('./_apply'), - arrayMap = require('./_arrayMap'), - baseIteratee = require('./_baseIteratee'), - baseRest = require('./_baseRest'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that iterates over `pairs` and invokes the corresponding - * function of the first predicate to return truthy. The predicate-function - * pairs are invoked with the `this` binding and arguments of the created - * function. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {Array} pairs The predicate-function pairs. - * @returns {Function} Returns the new composite function. - * @example - * - * var func = _.cond([ - * [_.matches({ 'a': 1 }), _.constant('matches A')], - * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], - * [_.stubTrue, _.constant('no match')] - * ]); - * - * func({ 'a': 1, 'b': 2 }); - * // => 'matches A' - * - * func({ 'a': 0, 'b': 1 }); - * // => 'matches B' - * - * func({ 'a': '1', 'b': '2' }); - * // => 'no match' - */ -function cond(pairs) { - var length = pairs == null ? 0 : pairs.length, - toIteratee = baseIteratee; - - pairs = !length ? [] : arrayMap(pairs, function(pair) { - if (typeof pair[1] != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return [toIteratee(pair[0]), pair[1]]; - }); - - return baseRest(function(args) { - var index = -1; - while (++index < length) { - var pair = pairs[index]; - if (apply(pair[0], this, args)) { - return apply(pair[1], this, args); - } - } - }); -} - -module.exports = cond; diff --git a/node_modules/lodash/conforms.js b/node_modules/lodash/conforms.js deleted file mode 100644 index 5501a94..0000000 --- a/node_modules/lodash/conforms.js +++ /dev/null @@ -1,35 +0,0 @@ -var baseClone = require('./_baseClone'), - baseConforms = require('./_baseConforms'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1; - -/** - * Creates a function that invokes the predicate properties of `source` with - * the corresponding property values of a given object, returning `true` if - * all predicates return truthy, else `false`. - * - * **Note:** The created function is equivalent to `_.conformsTo` with - * `source` partially applied. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new spec function. - * @example - * - * var objects = [ - * { 'a': 2, 'b': 1 }, - * { 'a': 1, 'b': 2 } - * ]; - * - * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); - * // => [{ 'a': 1, 'b': 2 }] - */ -function conforms(source) { - return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); -} - -module.exports = conforms; diff --git a/node_modules/lodash/conformsTo.js b/node_modules/lodash/conformsTo.js deleted file mode 100644 index b8a93eb..0000000 --- a/node_modules/lodash/conformsTo.js +++ /dev/null @@ -1,32 +0,0 @@ -var baseConformsTo = require('./_baseConformsTo'), - keys = require('./keys'); - -/** - * Checks if `object` conforms to `source` by invoking the predicate - * properties of `source` with the corresponding property values of `object`. - * - * **Note:** This method is equivalent to `_.conforms` when `source` is - * partially applied. - * - * @static - * @memberOf _ - * @since 4.14.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * - * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); - * // => true - * - * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); - * // => false - */ -function conformsTo(object, source) { - return source == null || baseConformsTo(object, source, keys(source)); -} - -module.exports = conformsTo; diff --git a/node_modules/lodash/constant.js b/node_modules/lodash/constant.js deleted file mode 100644 index 655ece3..0000000 --- a/node_modules/lodash/constant.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ -function constant(value) { - return function() { - return value; - }; -} - -module.exports = constant; diff --git a/node_modules/lodash/core.js b/node_modules/lodash/core.js deleted file mode 100644 index be1d567..0000000 --- a/node_modules/lodash/core.js +++ /dev/null @@ -1,3877 +0,0 @@ -/** - * @license - * Lodash (Custom Build) - * Build: `lodash core -o ./dist/lodash.core.js` - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -;(function() { - - /** Used as a safe reference for `undefined` in pre-ES5 environments. */ - var undefined; - - /** Used as the semantic version number. */ - var VERSION = '4.17.21'; - - /** Error message constants. */ - var FUNC_ERROR_TEXT = 'Expected a function'; - - /** Used to compose bitmasks for value comparisons. */ - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - - /** Used to compose bitmasks for function metadata. */ - var WRAP_BIND_FLAG = 1, - WRAP_PARTIAL_FLAG = 32; - - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991; - - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - numberTag = '[object Number]', - objectTag = '[object Object]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; - - /** Used to match HTML entities and HTML characters. */ - var reUnescapedHtml = /[&<>"']/g, - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; - - /** Used to map characters to HTML entities. */ - var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; - - /** Detect free variable `global` from Node.js. */ - var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - - /** Detect free variable `self`. */ - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function('return this')(); - - /** Detect free variable `exports`. */ - var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - - /** Detect free variable `module`. */ - var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - - /*--------------------------------------------------------------------------*/ - - /** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ - function arrayPush(array, values) { - array.push.apply(array, values); - return array; - } - - /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; - } - - /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } - - /** - * The base implementation of `_.propertyOf` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - */ - function basePropertyOf(object) { - return function(key) { - return object == null ? undefined : object[key]; - }; - } - - /** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ - function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; - } - - /** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ - function baseValues(object, props) { - return baseMap(props, function(key) { - return object[key]; - }); - } - - /** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - var escapeHtmlChar = basePropertyOf(htmlEscapes); - - /** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ - function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; - } - - /*--------------------------------------------------------------------------*/ - - /** Used for built-in method references. */ - var arrayProto = Array.prototype, - objectProto = Object.prototype; - - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** Used to generate unique IDs. */ - var idCounter = 0; - - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ - var nativeObjectToString = objectProto.toString; - - /** Used to restore the original `_` reference in `_.noConflict`. */ - var oldDash = root._; - - /** Built-in value references. */ - var objectCreate = Object.create, - propertyIsEnumerable = objectProto.propertyIsEnumerable; - - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeIsFinite = root.isFinite, - nativeKeys = overArg(Object.keys, Object), - nativeMax = Math.max; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` object which wraps `value` to enable implicit method - * chain sequences. Methods that operate on and return arrays, collections, - * and functions can be chained together. Methods that retrieve a single value - * or may return a primitive value will automatically end the chain sequence - * and return the unwrapped value. Otherwise, the value must be unwrapped - * with `_#value`. - * - * Explicit chain sequences, which must be unwrapped with `_#value`, may be - * enabled using `_.chain`. - * - * The execution of chained methods is lazy, that is, it's deferred until - * `_#value` is implicitly or explicitly called. - * - * Lazy evaluation allows several methods to support shortcut fusion. - * Shortcut fusion is an optimization to merge iteratee calls; this avoids - * the creation of intermediate arrays and can greatly reduce the number of - * iteratee executions. Sections of a chain sequence qualify for shortcut - * fusion if the section is applied to an array and iteratees accept only - * one argument. The heuristic for whether a section qualifies for shortcut - * fusion is subject to change. - * - * Chaining is supported in custom builds as long as the `_#value` method is - * directly or indirectly included in the build. - * - * In addition to lodash methods, wrappers have `Array` and `String` methods. - * - * The wrapper `Array` methods are: - * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` - * - * The wrapper `String` methods are: - * `replace` and `split` - * - * The wrapper methods that support shortcut fusion are: - * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, - * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, - * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` - * - * The chainable wrapper methods are: - * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, - * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, - * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, - * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, - * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, - * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, - * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, - * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, - * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, - * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, - * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, - * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, - * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, - * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, - * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, - * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, - * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, - * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, - * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, - * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, - * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, - * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, - * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, - * `zipObject`, `zipObjectDeep`, and `zipWith` - * - * The wrapper methods that are **not** chainable by default are: - * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, - * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, - * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, - * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, - * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, - * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, - * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, - * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, - * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, - * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, - * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, - * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, - * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, - * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, - * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, - * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, - * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, - * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, - * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, - * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, - * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, - * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, - * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, - * `upperFirst`, `value`, and `words` - * - * @name _ - * @constructor - * @category Seq - * @param {*} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var wrapped = _([1, 2, 3]); - * - * // Returns an unwrapped value. - * wrapped.reduce(_.add); - * // => 6 - * - * // Returns a wrapped value. - * var squares = wrapped.map(square); - * - * _.isArray(squares); - * // => false - * - * _.isArray(squares.value()); - * // => true - */ - function lodash(value) { - return value instanceof LodashWrapper - ? value - : new LodashWrapper(value); - } - - /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ - var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; - }()); - - /** - * The base constructor for creating `lodash` wrapper objects. - * - * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable explicit method chain sequences. - */ - function LodashWrapper(value, chainAll) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__chain__ = !!chainAll; - } - - LodashWrapper.prototype = baseCreate(lodash.prototype); - LodashWrapper.prototype.constructor = LodashWrapper; - - /*------------------------------------------------------------------------*/ - - /** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } - } - - /** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function baseAssignValue(object, key, value) { - object[key] = value; - } - - /** - * The base implementation of `_.delay` and `_.defer` which accepts `args` - * to provide to `func`. - * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {Array} args The arguments to provide to `func`. - * @returns {number|Object} Returns the timer id or timeout object. - */ - function baseDelay(func, wait, args) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return setTimeout(function() { func.apply(undefined, args); }, wait); - } - - /** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ - var baseEach = createBaseEach(baseForOwn); - - /** - * The base implementation of `_.every` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` - */ - function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; - }); - return result; - } - - /** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ - function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !false) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; - } - - /** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; - } - - /** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ - function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; - } - - /** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseFor = createBaseFor(); - - /** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); - } - - /** - * The base implementation of `_.functions` which creates an array of - * `object` function property names filtered from `props`. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} props The property names to filter. - * @returns {Array} Returns the function names. - */ - function baseFunctions(object, props) { - return baseFilter(props, function(key) { - return isFunction(object[key]); - }); - } - - /** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ - function baseGetTag(value) { - return objectToString(value); - } - - /** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ - function baseGt(value, other) { - return value > other; - } - - /** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ - var baseIsArguments = noop; - - /** - * The base implementation of `_.isDate` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - */ - function baseIsDate(value) { - return isObjectLike(value) && baseGetTag(value) == dateTag; - } - - /** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ - function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); - } - - /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : baseGetTag(object), - othTag = othIsArr ? arrayTag : baseGetTag(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - stack || (stack = []); - var objStack = find(stack, function(entry) { - return entry[0] == object; - }); - var othStack = find(stack, function(entry) { - return entry[0] == other; - }); - if (objStack && othStack) { - return objStack[1] == other; - } - stack.push([object, other]); - stack.push([other, object]); - if (isSameTag && !objIsObj) { - var result = (objIsArr) - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - stack.pop(); - return result; - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - stack.pop(); - return result; - } - } - if (!isSameTag) { - return false; - } - var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack); - stack.pop(); - return result; - } - - /** - * The base implementation of `_.isRegExp` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - */ - function baseIsRegExp(value) { - return isObjectLike(value) && baseGetTag(value) == regexpTag; - } - - /** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ - function baseIteratee(func) { - if (typeof func == 'function') { - return func; - } - if (func == null) { - return identity; - } - return (typeof func == 'object' ? baseMatches : baseProperty)(func); - } - - /** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ - function baseLt(value, other) { - return value < other; - } - - /** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; - } - - /** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ - function baseMatches(source) { - var props = nativeKeys(source); - return function(object) { - var length = props.length; - if (object == null) { - return !length; - } - object = Object(object); - while (length--) { - var key = props[length]; - if (!(key in object && - baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG) - )) { - return false; - } - } - return true; - }; - } - - /** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ - function basePick(object, props) { - object = Object(object); - return reduce(props, function(result, key) { - if (key in object) { - result[key] = object[key]; - } - return result; - }, {}); - } - - /** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ - function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); - } - - /** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; - } - - /** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ - function copyArray(source) { - return baseSlice(source, 0, source.length); - } - - /** - * The base implementation of `_.some` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function baseSome(collection, predicate) { - var result; - - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; - }); - return !!result; - } - - /** - * The base implementation of `wrapperValue` which returns the result of - * performing a sequence of actions on the unwrapped `value`, where each - * successive action is supplied the return value of the previous. - * - * @private - * @param {*} value The unwrapped value. - * @param {Array} actions Actions to perform to resolve the unwrapped value. - * @returns {*} Returns the resolved value. - */ - function baseWrapperValue(value, actions) { - var result = value; - return reduce(actions, function(result, action) { - return action.func.apply(action.thisArg, arrayPush([result], action.args)); - }, result); - } - - /** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ - function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = false; - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = false; - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; - } - - /** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ - function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } - } - return object; - } - - /** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ - function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); - } - - /** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; - } - - /** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; - } - - /** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. - * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. - */ - function createCtor(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; - } - - /** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ - function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!isArrayLike(collection)) { - var iteratee = baseIteratee(predicate, 3); - collection = keys(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; - } - - /** - * Creates a function that wraps `func` to invoke it with the `this` binding - * of `thisArg` and `partials` prepended to the arguments it receives. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to - * the new function. - * @returns {Function} Returns the new wrapped function. - */ - function createPartial(func, bitmask, thisArg, partials) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(leftLength + argsLength), - fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return fn.apply(isBind ? thisArg : this, args); - } - return wrapper; - } - - /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined; - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - var compared; - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!baseSome(other, function(othValue, othIndex) { - if (!indexOf(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - return result; - } - - /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - } - return false; - } - - /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = keys(object), - objLength = objProps.length, - othProps = keys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - var compared; - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - return result; - } - - /** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ - function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); - } - - /** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ - function isFlattenable(value) { - return isArray(value) || isArguments(value); - } - - /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); - } - - /** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ - function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; - } - - /** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; - } - - /** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ - function objectToString(value) { - return nativeObjectToString.call(value); - } - - /** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ - function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return func.apply(this, otherArgs); - }; - } - - /** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ - var setToString = identity; - - /*------------------------------------------------------------------------*/ - - /** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ - function compact(array) { - return baseFilter(array, Boolean); - } - - /** - * Creates a new array concatenating `array` with any additional arrays - * and/or values. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to concatenate. - * @param {...*} [values] The values to concatenate. - * @returns {Array} Returns the new concatenated array. - * @example - * - * var array = [1]; - * var other = _.concat(array, 2, [3], [[4]]); - * - * console.log(other); - * // => [1, 2, 3, [4]] - * - * console.log(array); - * // => [1] - */ - function concat() { - var length = arguments.length; - if (!length) { - return []; - } - var args = Array(length - 1), - array = arguments[0], - index = length; - - while (index--) { - args[index - 1] = arguments[index]; - } - return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); - } - - /** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ - function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseFindIndex(array, baseIteratee(predicate, 3), index); - } - - /** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ - function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; - } - - /** - * Recursively flattens `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flattenDeep([1, [2, [3, [4]], 5]]); - * // => [1, 2, 3, 4, 5] - */ - function flattenDeep(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, INFINITY) : []; - } - - /** - * Gets the first element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias first - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the first element of `array`. - * @example - * - * _.head([1, 2, 3]); - * // => 1 - * - * _.head([]); - * // => undefined - */ - function head(array) { - return (array && array.length) ? array[0] : undefined; - } - - /** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the - * offset from the end of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // Search from the `fromIndex`. - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - */ - function indexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (typeof fromIndex == 'number') { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; - } else { - fromIndex = 0; - } - var index = (fromIndex || 0) - 1, - isReflexive = value === value; - - while (++index < length) { - var other = array[index]; - if ((isReflexive ? other === value : other !== other)) { - return index; - } - } - return -1; - } - - /** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ - function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; - } - - /** - * Creates a slice of `array` from `start` up to, but not including, `end`. - * - * **Note:** This method is used instead of - * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are - * returned. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function slice(array, start, end) { - var length = array == null ? 0 : array.length; - start = start == null ? 0 : +start; - end = end === undefined ? length : +end; - return length ? baseSlice(array, start, end) : []; - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` wrapper instance that wraps `value` with explicit method - * chain sequences enabled. The result of such sequences must be unwrapped - * with `_#value`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Seq - * @param {*} value The value to wrap. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'pebbles', 'age': 1 } - * ]; - * - * var youngest = _ - * .chain(users) - * .sortBy('age') - * .map(function(o) { - * return o.user + ' is ' + o.age; - * }) - * .head() - * .value(); - * // => 'pebbles is 1' - */ - function chain(value) { - var result = lodash(value); - result.__chain__ = true; - return result; - } - - /** - * This method invokes `interceptor` and returns `value`. The interceptor - * is invoked with one argument; (value). The purpose of this method is to - * "tap into" a method chain sequence in order to modify intermediate results. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns `value`. - * @example - * - * _([1, 2, 3]) - * .tap(function(array) { - * // Mutate input array. - * array.pop(); - * }) - * .reverse() - * .value(); - * // => [2, 1] - */ - function tap(value, interceptor) { - interceptor(value); - return value; - } - - /** - * This method is like `_.tap` except that it returns the result of `interceptor`. - * The purpose of this method is to "pass thru" values replacing intermediate - * results in a method chain sequence. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns the result of `interceptor`. - * @example - * - * _(' abc ') - * .chain() - * .trim() - * .thru(function(value) { - * return [value]; - * }) - * .value(); - * // => ['abc'] - */ - function thru(value, interceptor) { - return interceptor(value); - } - - /** - * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. - * - * @name chain - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * // A sequence without explicit chaining. - * _(users).head(); - * // => { 'user': 'barney', 'age': 36 } - * - * // A sequence with explicit chaining. - * _(users) - * .chain() - * .head() - * .pick('user') - * .value(); - * // => { 'user': 'barney' } - */ - function wrapperChain() { - return chain(this); - } - - /** - * Executes the chain sequence to resolve the unwrapped value. - * - * @name value - * @memberOf _ - * @since 0.1.0 - * @alias toJSON, valueOf - * @category Seq - * @returns {*} Returns the resolved unwrapped value. - * @example - * - * _([1, 2, 3]).value(); - * // => [1, 2, 3] - */ - function wrapperValue() { - return baseWrapperValue(this.__wrapped__, this.__actions__); - } - - /*------------------------------------------------------------------------*/ - - /** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * Iteration is stopped once `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * **Note:** This method returns `true` for - * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because - * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of - * elements of empty collections. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.every(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.every(users, 'active'); - * // => false - */ - function every(collection, predicate, guard) { - predicate = guard ? undefined : predicate; - return baseEvery(collection, baseIteratee(predicate)); - } - - /** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ - function filter(collection, predicate) { - return baseFilter(collection, baseIteratee(predicate)); - } - - /** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ - var find = createFind(findIndex); - - /** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ - function forEach(collection, iteratee) { - return baseEach(collection, baseIteratee(iteratee)); - } - - /** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ - function map(collection, iteratee) { - return baseMap(collection, baseIteratee(iteratee)); - } - - /** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ - function reduce(collection, iteratee, accumulator) { - return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach); - } - - /** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ - function size(collection) { - if (collection == null) { - return 0; - } - collection = isArrayLike(collection) ? collection : nativeKeys(collection); - return collection.length; - } - - /** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * Iteration is stopped once `predicate` returns truthy. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.some(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.some(users, 'active'); - * // => true - */ - function some(collection, predicate, guard) { - predicate = guard ? undefined : predicate; - return baseSome(collection, baseIteratee(predicate)); - } - - /** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ - function sortBy(collection, iteratee) { - var index = 0; - iteratee = baseIteratee(iteratee); - - return baseMap(baseMap(collection, function(value, key, collection) { - return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) }; - }).sort(function(object, other) { - return compareAscending(object.criteria, other.criteria) || (object.index - other.index); - }), baseProperty('value')); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. - */ - function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result; - }; - } - - /** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and `partials` prepended to the arguments it receives. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" - * property of bound functions. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * function greet(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * // Bound with placeholders. - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' - */ - var bind = baseRest(function(func, thisArg, partials) { - return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials); - }); - - /** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // => Logs 'deferred' after one millisecond. - */ - var defer = baseRest(function(func, args) { - return baseDelay(func, 1, args); - }); - - /** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => Logs 'later' after one second. - */ - var delay = baseRest(function(func, wait, args) { - return baseDelay(func, toNumber(wait) || 0, args); - }); - - /** - * Creates a function that negates the result of the predicate `func`. The - * `func` predicate is invoked with the `this` binding and arguments of the - * created function. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new negated function. - * @example - * - * function isEven(n) { - * return n % 2 == 0; - * } - * - * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); - * // => [1, 3, 5] - */ - function negate(predicate) { - if (typeof predicate != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function() { - var args = arguments; - return !predicate.apply(this, args); - }; - } - - /** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first invocation. The `func` is - * invoked with the `this` binding and arguments of the created function. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // => `createApplication` is invoked once - */ - function once(func) { - return before(2, func); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ - function clone(value) { - if (!isObject(value)) { - return value; - } - return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value)); - } - - /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ - function eq(value, other) { - return value === other || (value !== value && other !== other); - } - - /** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ - var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); - }; - - /** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ - var isArray = Array.isArray; - - /** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ - function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); - } - - /** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ - function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && baseGetTag(value) == boolTag); - } - - /** - * Checks if `value` is classified as a `Date` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - * - * _.isDate('Mon April 23 2012'); - * // => false - */ - var isDate = baseIsDate; - - /** - * Checks if `value` is an empty object, collection, map, or set. - * - * Objects are considered empty if they have no own enumerable string keyed - * properties. - * - * Array-like values such as `arguments` objects, arrays, buffers, strings, or - * jQuery-like collections are considered empty if they have a `length` of `0`. - * Similarly, maps and sets are considered empty if they have a `size` of `0`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ - function isEmpty(value) { - if (isArrayLike(value) && - (isArray(value) || isString(value) || - isFunction(value.splice) || isArguments(value))) { - return !value.length; - } - return !nativeKeys(value).length; - } - - /** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ - function isEqual(value, other) { - return baseIsEqual(value, other); - } - - /** - * Checks if `value` is a finite primitive number. - * - * **Note:** This method is based on - * [`Number.isFinite`](https://mdn.io/Number/isFinite). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. - * @example - * - * _.isFinite(3); - * // => true - * - * _.isFinite(Number.MIN_VALUE); - * // => true - * - * _.isFinite(Infinity); - * // => false - * - * _.isFinite('3'); - * // => false - */ - function isFinite(value) { - return typeof value == 'number' && nativeIsFinite(value); - } - - /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; - } - - /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ - function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; - } - - /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ - function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); - } - - /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ - function isObjectLike(value) { - return value != null && typeof value == 'object'; - } - - /** - * Checks if `value` is `NaN`. - * - * **Note:** This method is based on - * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as - * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for - * `undefined` and other non-number values. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - * @example - * - * _.isNaN(NaN); - * // => true - * - * _.isNaN(new Number(NaN)); - * // => true - * - * isNaN(undefined); - * // => true - * - * _.isNaN(undefined); - * // => false - */ - function isNaN(value) { - // An `NaN` primitive is the only value that is not equal to itself. - // Perform the `toStringTag` check first to avoid errors with some - // ActiveX objects in IE. - return isNumber(value) && value != +value; - } - - /** - * Checks if `value` is `null`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(void 0); - * // => false - */ - function isNull(value) { - return value === null; - } - - /** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are - * classified as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a number, else `false`. - * @example - * - * _.isNumber(3); - * // => true - * - * _.isNumber(Number.MIN_VALUE); - * // => true - * - * _.isNumber(Infinity); - * // => true - * - * _.isNumber('3'); - * // => false - */ - function isNumber(value) { - return typeof value == 'number' || - (isObjectLike(value) && baseGetTag(value) == numberTag); - } - - /** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - * @example - * - * _.isRegExp(/abc/); - * // => true - * - * _.isRegExp('/abc/'); - * // => false - */ - var isRegExp = baseIsRegExp; - - /** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ - function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); - } - - /** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ - function isUndefined(value) { - return value === undefined; - } - - /** - * Converts `value` to an array. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {Array} Returns the converted array. - * @example - * - * _.toArray({ 'a': 1, 'b': 2 }); - * // => [1, 2] - * - * _.toArray('abc'); - * // => ['a', 'b', 'c'] - * - * _.toArray(1); - * // => [] - * - * _.toArray(null); - * // => [] - */ - function toArray(value) { - if (!isArrayLike(value)) { - return values(value); - } - return value.length ? copyArray(value) : []; - } - - /** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ - var toInteger = Number; - - /** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ - var toNumber = Number; - - /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ - function toString(value) { - if (typeof value == 'string') { - return value; - } - return value == null ? '' : (value + ''); - } - - /*------------------------------------------------------------------------*/ - - /** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assign({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3 } - */ - var assign = createAssigner(function(object, source) { - copyObject(source, nativeKeys(source), object); - }); - - /** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assign - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assignIn({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } - */ - var assignIn = createAssigner(function(object, source) { - copyObject(source, nativeKeysIn(source), object); - }); - - /** - * Creates an object that inherits from the `prototype` object. If a - * `properties` object is given, its own enumerable string keyed properties - * are assigned to the created object. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @returns {Object} Returns the new object. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * function Circle() { - * Shape.call(this); - * } - * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); - * - * var circle = new Circle; - * circle instanceof Circle; - * // => true - * - * circle instanceof Shape; - * // => true - */ - function create(prototype, properties) { - var result = baseCreate(prototype); - return properties == null ? result : assign(result, properties); - } - - /** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - var defaults = baseRest(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; - }); - - /** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ - function has(object, path) { - return object != null && hasOwnProperty.call(object, path); - } - - /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ - var keys = nativeKeys; - - /** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ - var keysIn = nativeKeysIn; - - /** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ - var pick = flatRest(function(object, paths) { - return object == null ? {} : basePick(object, paths); - }); - - /** - * This method is like `_.get` except that if the resolved value is a - * function it's invoked with the `this` binding of its parent object and - * its result is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to resolve. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; - * - * _.result(object, 'a[0].b.c1'); - * // => 3 - * - * _.result(object, 'a[0].b.c2'); - * // => 4 - * - * _.result(object, 'a[0].b.c3', 'default'); - * // => 'default' - * - * _.result(object, 'a[0].b.c3', _.constant('default')); - * // => 'default' - */ - function result(object, path, defaultValue) { - var value = object == null ? undefined : object[path]; - if (value === undefined) { - value = defaultValue; - } - return isFunction(value) ? value.call(object) : value; - } - - /** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ - function values(object) { - return object == null ? [] : baseValues(object, keys(object)); - } - - /*------------------------------------------------------------------------*/ - - /** - * Converts the characters "&", "<", ">", '"', and "'" in `string` to their - * corresponding HTML entities. - * - * **Note:** No other characters are escaped. To escape additional - * characters use a third-party library like [_he_](https://mths.be/he). - * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. See - * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. - * - * When working with HTML you should always - * [quote attribute values](http://wonko.com/post/html-escaping) to reduce - * XSS vectors. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ - function escape(string) { - string = toString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; - } - - /*------------------------------------------------------------------------*/ - - /** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ - function identity(value) { - return value; - } - - /** - * Creates a function that invokes `func` with the arguments of the created - * function. If `func` is a property name, the created function returns the - * property value for a given element. If `func` is an array or object, the - * created function returns `true` for elements that contain the equivalent - * source properties, otherwise it returns `false`. - * - * @static - * @since 4.0.0 - * @memberOf _ - * @category Util - * @param {*} [func=_.identity] The value to convert to a callback. - * @returns {Function} Returns the callback. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); - * // => [{ 'user': 'barney', 'age': 36, 'active': true }] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, _.iteratee(['user', 'fred'])); - * // => [{ 'user': 'fred', 'age': 40 }] - * - * // The `_.property` iteratee shorthand. - * _.map(users, _.iteratee('user')); - * // => ['barney', 'fred'] - * - * // Create custom iteratee shorthands. - * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { - * return !_.isRegExp(func) ? iteratee(func) : function(string) { - * return func.test(string); - * }; - * }); - * - * _.filter(['abc', 'def'], /ef/); - * // => ['def'] - */ - var iteratee = baseIteratee; - - /** - * Creates a function that performs a partial deep comparison between a given - * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. - * - * **Note:** The created function is equivalent to `_.isMatch` with `source` - * partially applied. - * - * Partial comparisons will match empty array and empty object `source` - * values against any array or object value, respectively. See `_.isEqual` - * for a list of supported value comparisons. - * - * **Note:** Multiple values can be checked by combining several matchers - * using `_.overSome` - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - * @example - * - * var objects = [ - * { 'a': 1, 'b': 2, 'c': 3 }, - * { 'a': 4, 'b': 5, 'c': 6 } - * ]; - * - * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); - * // => [{ 'a': 4, 'b': 5, 'c': 6 }] - * - * // Checking for several possible values - * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); - * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] - */ - function matches(source) { - return baseMatches(assign({}, source)); - } - - /** - * Adds all own enumerable string keyed function properties of a source - * object to the destination object. If `object` is a function, then methods - * are added to its prototype as well. - * - * **Note:** Use `_.runInContext` to create a pristine `lodash` function to - * avoid conflicts caused by modifying the original. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {Function|Object} [object=lodash] The destination object. - * @param {Object} source The object of functions to add. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.chain=true] Specify whether mixins are chainable. - * @returns {Function|Object} Returns `object`. - * @example - * - * function vowels(string) { - * return _.filter(string, function(v) { - * return /[aeiou]/i.test(v); - * }); - * } - * - * _.mixin({ 'vowels': vowels }); - * _.vowels('fred'); - * // => ['e'] - * - * _('fred').vowels().value(); - * // => ['e'] - * - * _.mixin({ 'vowels': vowels }, { 'chain': false }); - * _('fred').vowels(); - * // => ['e'] - */ - function mixin(object, source, options) { - var props = keys(source), - methodNames = baseFunctions(source, props); - - if (options == null && - !(isObject(source) && (methodNames.length || !props.length))) { - options = source; - source = object; - object = this; - methodNames = baseFunctions(source, keys(source)); - } - var chain = !(isObject(options) && 'chain' in options) || !!options.chain, - isFunc = isFunction(object); - - baseEach(methodNames, function(methodName) { - var func = source[methodName]; - object[methodName] = func; - if (isFunc) { - object.prototype[methodName] = function() { - var chainAll = this.__chain__; - if (chain || chainAll) { - var result = object(this.__wrapped__), - actions = result.__actions__ = copyArray(this.__actions__); - - actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); - result.__chain__ = chainAll; - return result; - } - return func.apply(object, arrayPush([this.value()], arguments)); - }; - } - }); - - return object; - } - - /** - * Reverts the `_` variable to its previous value and returns a reference to - * the `lodash` function. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @returns {Function} Returns the `lodash` function. - * @example - * - * var lodash = _.noConflict(); - */ - function noConflict() { - if (root._ === this) { - root._ = oldDash; - } - return this; - } - - /** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ - function noop() { - // No operation performed. - } - - /** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ - function uniqueId(prefix) { - var id = ++idCounter; - return toString(prefix) + id; - } - - /*------------------------------------------------------------------------*/ - - /** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ - function max(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseGt) - : undefined; - } - - /** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ - function min(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseLt) - : undefined; - } - - /*------------------------------------------------------------------------*/ - - // Add methods that return wrapped values in chain sequences. - lodash.assignIn = assignIn; - lodash.before = before; - lodash.bind = bind; - lodash.chain = chain; - lodash.compact = compact; - lodash.concat = concat; - lodash.create = create; - lodash.defaults = defaults; - lodash.defer = defer; - lodash.delay = delay; - lodash.filter = filter; - lodash.flatten = flatten; - lodash.flattenDeep = flattenDeep; - lodash.iteratee = iteratee; - lodash.keys = keys; - lodash.map = map; - lodash.matches = matches; - lodash.mixin = mixin; - lodash.negate = negate; - lodash.once = once; - lodash.pick = pick; - lodash.slice = slice; - lodash.sortBy = sortBy; - lodash.tap = tap; - lodash.thru = thru; - lodash.toArray = toArray; - lodash.values = values; - - // Add aliases. - lodash.extend = assignIn; - - // Add methods to `lodash.prototype`. - mixin(lodash, lodash); - - /*------------------------------------------------------------------------*/ - - // Add methods that return unwrapped values in chain sequences. - lodash.clone = clone; - lodash.escape = escape; - lodash.every = every; - lodash.find = find; - lodash.forEach = forEach; - lodash.has = has; - lodash.head = head; - lodash.identity = identity; - lodash.indexOf = indexOf; - lodash.isArguments = isArguments; - lodash.isArray = isArray; - lodash.isBoolean = isBoolean; - lodash.isDate = isDate; - lodash.isEmpty = isEmpty; - lodash.isEqual = isEqual; - lodash.isFinite = isFinite; - lodash.isFunction = isFunction; - lodash.isNaN = isNaN; - lodash.isNull = isNull; - lodash.isNumber = isNumber; - lodash.isObject = isObject; - lodash.isRegExp = isRegExp; - lodash.isString = isString; - lodash.isUndefined = isUndefined; - lodash.last = last; - lodash.max = max; - lodash.min = min; - lodash.noConflict = noConflict; - lodash.noop = noop; - lodash.reduce = reduce; - lodash.result = result; - lodash.size = size; - lodash.some = some; - lodash.uniqueId = uniqueId; - - // Add aliases. - lodash.each = forEach; - lodash.first = head; - - mixin(lodash, (function() { - var source = {}; - baseForOwn(lodash, function(func, methodName) { - if (!hasOwnProperty.call(lodash.prototype, methodName)) { - source[methodName] = func; - } - }); - return source; - }()), { 'chain': false }); - - /*------------------------------------------------------------------------*/ - - /** - * The semantic version number. - * - * @static - * @memberOf _ - * @type {string} - */ - lodash.VERSION = VERSION; - - // Add `Array` methods to `lodash.prototype`. - baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { - var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName], - chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', - retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName); - - lodash.prototype[methodName] = function() { - var args = arguments; - if (retUnwrapped && !this.__chain__) { - var value = this.value(); - return func.apply(isArray(value) ? value : [], args); - } - return this[chainName](function(value) { - return func.apply(isArray(value) ? value : [], args); - }); - }; - }); - - // Add chain sequence methods to the `lodash` wrapper. - lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; - - /*--------------------------------------------------------------------------*/ - - // Some AMD build optimizers, like r.js, check for condition patterns like: - if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { - // Expose Lodash on the global object to prevent errors when Lodash is - // loaded by a script tag in the presence of an AMD loader. - // See http://requirejs.org/docs/errors.html#mismatch for more details. - // Use `_.noConflict` to remove Lodash from the global object. - root._ = lodash; - - // Define as an anonymous module so, through path mapping, it can be - // referenced as the "underscore" module. - define(function() { - return lodash; - }); - } - // Check for `exports` after `define` in case a build optimizer adds it. - else if (freeModule) { - // Export for Node.js. - (freeModule.exports = lodash)._ = lodash; - // Export for CommonJS support. - freeExports._ = lodash; - } - else { - // Export to the global object. - root._ = lodash; - } -}.call(this)); diff --git a/node_modules/lodash/core.min.js b/node_modules/lodash/core.min.js deleted file mode 100644 index e425e4d..0000000 --- a/node_modules/lodash/core.min.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @license - * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE - * Build: `lodash core -o ./dist/lodash.core.js` - */ -;(function(){function n(n){return H(n)&&pn.call(n,"callee")&&!yn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?Z:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function"); -return setTimeout(function(){n.apply(Z,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++et}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!H(t)?n!==n&&t!==t:y(n,t,r,e,b,u))}function y(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){ -return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=T(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=J(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=B(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t, -r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?d:r)(n)}function _(n,t){return nt&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++ei))return false;var c=o.get(n),f=o.get(t);if(c&&f)return c==t&&f==n;for(var c=-1,f=true,a=2&r?[]:Z;++cr?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,mn); -}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!U(n)}function U(n){return!!V(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function V(n){var t=typeof n; -return null!=n&&("object"==t||"function"==t)}function H(n){return null!=n&&typeof n=="object"}function K(n){return typeof n=="number"||H(n)&&"[object Number]"==hn.call(n)}function L(n){return typeof n=="string"||!Nn(n)&&H(n)&&"[object String]"==hn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return null==n?[]:u(n,Dn(n))}function X(n){return n}function Y(n,r,e){var u=Dn(r),o=h(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,Dn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(n); -return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var Z,nn=1/0,tn=/[&<>"']/g,rn=RegExp(tn.source),en=/^(?:0|[1-9]\d*)$/,un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){ -return function(t){return null==n?Z:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,bn=Object.create,yn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return V(t)?bn?bn(t):(n.prototype=t,t=new n,n.prototype=Z,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i; -var mn=function(n,t){return function(r,e){if(null==r)return r;if(!M(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++or&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++re||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r { '4': 1, '6': 2 } - * - * // The `_.property` iteratee shorthand. - * _.countBy(['one', 'two', 'three'], 'length'); - * // => { '3': 2, '5': 1 } - */ -var countBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - ++result[key]; - } else { - baseAssignValue(result, key, 1); - } -}); - -module.exports = countBy; diff --git a/node_modules/lodash/create.js b/node_modules/lodash/create.js deleted file mode 100644 index 919edb8..0000000 --- a/node_modules/lodash/create.js +++ /dev/null @@ -1,43 +0,0 @@ -var baseAssign = require('./_baseAssign'), - baseCreate = require('./_baseCreate'); - -/** - * Creates an object that inherits from the `prototype` object. If a - * `properties` object is given, its own enumerable string keyed properties - * are assigned to the created object. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @returns {Object} Returns the new object. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * function Circle() { - * Shape.call(this); - * } - * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); - * - * var circle = new Circle; - * circle instanceof Circle; - * // => true - * - * circle instanceof Shape; - * // => true - */ -function create(prototype, properties) { - var result = baseCreate(prototype); - return properties == null ? result : baseAssign(result, properties); -} - -module.exports = create; diff --git a/node_modules/lodash/curry.js b/node_modules/lodash/curry.js deleted file mode 100644 index 918db1a..0000000 --- a/node_modules/lodash/curry.js +++ /dev/null @@ -1,57 +0,0 @@ -var createWrap = require('./_createWrap'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_CURRY_FLAG = 8; - -/** - * Creates a function that accepts arguments of `func` and either invokes - * `func` returning its result, if at least `arity` number of arguments have - * been provided, or returns a function that accepts the remaining `func` - * arguments, and so on. The arity of `func` may be specified if `func.length` - * is not sufficient. - * - * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for provided arguments. - * - * **Note:** This method doesn't set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curry(abc); - * - * curried(1)(2)(3); - * // => [1, 2, 3] - * - * curried(1, 2)(3); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // Curried with placeholders. - * curried(1)(_, 3)(2); - * // => [1, 2, 3] - */ -function curry(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curry.placeholder; - return result; -} - -// Assign default placeholders. -curry.placeholder = {}; - -module.exports = curry; diff --git a/node_modules/lodash/curryRight.js b/node_modules/lodash/curryRight.js deleted file mode 100644 index c85b6f3..0000000 --- a/node_modules/lodash/curryRight.js +++ /dev/null @@ -1,54 +0,0 @@ -var createWrap = require('./_createWrap'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_CURRY_RIGHT_FLAG = 16; - -/** - * This method is like `_.curry` except that arguments are applied to `func` - * in the manner of `_.partialRight` instead of `_.partial`. - * - * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for provided arguments. - * - * **Note:** This method doesn't set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curryRight(abc); - * - * curried(3)(2)(1); - * // => [1, 2, 3] - * - * curried(2, 3)(1); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // Curried with placeholders. - * curried(3)(1, _)(2); - * // => [1, 2, 3] - */ -function curryRight(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curryRight.placeholder; - return result; -} - -// Assign default placeholders. -curryRight.placeholder = {}; - -module.exports = curryRight; diff --git a/node_modules/lodash/date.js b/node_modules/lodash/date.js deleted file mode 100644 index cbf5b41..0000000 --- a/node_modules/lodash/date.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - 'now': require('./now') -}; diff --git a/node_modules/lodash/debounce.js b/node_modules/lodash/debounce.js deleted file mode 100644 index 8f751d5..0000000 --- a/node_modules/lodash/debounce.js +++ /dev/null @@ -1,191 +0,0 @@ -var isObject = require('./isObject'), - now = require('./now'), - toNumber = require('./toNumber'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide `options` to indicate whether `func` should be invoked on the - * leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent - * calls to the debounced function return the result of the last `func` - * invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the debounced function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=false] - * Specify invoking on the leading edge of the timeout. - * @param {number} [options.maxWait] - * The maximum time `func` is allowed to be delayed before it's invoked. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // Avoid costly calculations while the window size is in flux. - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // Invoke `sendMail` when clicked, debouncing subsequent calls. - * jQuery(element).on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // Ensure `batchLog` is invoked once after 1 second of debounced calls. - * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); - * var source = new EventSource('/stream'); - * jQuery(source).on('message', debounced); - * - * // Cancel the trailing debounced invocation. - * jQuery(window).on('popstate', debounced.cancel); - */ -function debounce(func, wait, options) { - var lastArgs, - lastThis, - maxWait, - result, - timerId, - lastCallTime, - lastInvokeTime = 0, - leading = false, - maxing = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = toNumber(wait) || 0; - if (isObject(options)) { - leading = !!options.leading; - maxing = 'maxWait' in options; - maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - - function invokeFunc(time) { - var args = lastArgs, - thisArg = lastThis; - - lastArgs = lastThis = undefined; - lastInvokeTime = time; - result = func.apply(thisArg, args); - return result; - } - - function leadingEdge(time) { - // Reset any `maxWait` timer. - lastInvokeTime = time; - // Start the timer for the trailing edge. - timerId = setTimeout(timerExpired, wait); - // Invoke the leading edge. - return leading ? invokeFunc(time) : result; - } - - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime, - timeWaiting = wait - timeSinceLastCall; - - return maxing - ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) - : timeWaiting; - } - - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime; - - // Either this is the first call, activity has stopped and we're at the - // trailing edge, the system time has gone backwards and we're treating - // it as the trailing edge, or we've hit the `maxWait` limit. - return (lastCallTime === undefined || (timeSinceLastCall >= wait) || - (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); - } - - function timerExpired() { - var time = now(); - if (shouldInvoke(time)) { - return trailingEdge(time); - } - // Restart the timer. - timerId = setTimeout(timerExpired, remainingWait(time)); - } - - function trailingEdge(time) { - timerId = undefined; - - // Only invoke if we have `lastArgs` which means `func` has been - // debounced at least once. - if (trailing && lastArgs) { - return invokeFunc(time); - } - lastArgs = lastThis = undefined; - return result; - } - - function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = undefined; - } - - function flush() { - return timerId === undefined ? result : trailingEdge(now()); - } - - function debounced() { - var time = now(), - isInvoking = shouldInvoke(time); - - lastArgs = arguments; - lastThis = this; - lastCallTime = time; - - if (isInvoking) { - if (timerId === undefined) { - return leadingEdge(lastCallTime); - } - if (maxing) { - // Handle invocations in a tight loop. - clearTimeout(timerId); - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === undefined) { - timerId = setTimeout(timerExpired, wait); - } - return result; - } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; -} - -module.exports = debounce; diff --git a/node_modules/lodash/deburr.js b/node_modules/lodash/deburr.js deleted file mode 100644 index f85e314..0000000 --- a/node_modules/lodash/deburr.js +++ /dev/null @@ -1,45 +0,0 @@ -var deburrLetter = require('./_deburrLetter'), - toString = require('./toString'); - -/** Used to match Latin Unicode letters (excluding mathematical operators). */ -var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; - -/** Used to compose unicode character classes. */ -var rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; - -/** Used to compose unicode capture groups. */ -var rsCombo = '[' + rsComboRange + ']'; - -/** - * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and - * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). - */ -var reComboMark = RegExp(rsCombo, 'g'); - -/** - * Deburrs `string` by converting - * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) - * letters to basic Latin letters and removing - * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to deburr. - * @returns {string} Returns the deburred string. - * @example - * - * _.deburr('déjà vu'); - * // => 'deja vu' - */ -function deburr(string) { - string = toString(string); - return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); -} - -module.exports = deburr; diff --git a/node_modules/lodash/defaultTo.js b/node_modules/lodash/defaultTo.js deleted file mode 100644 index 5b33359..0000000 --- a/node_modules/lodash/defaultTo.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Checks `value` to determine whether a default value should be returned in - * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, - * or `undefined`. - * - * @static - * @memberOf _ - * @since 4.14.0 - * @category Util - * @param {*} value The value to check. - * @param {*} defaultValue The default value. - * @returns {*} Returns the resolved value. - * @example - * - * _.defaultTo(1, 10); - * // => 1 - * - * _.defaultTo(undefined, 10); - * // => 10 - */ -function defaultTo(value, defaultValue) { - return (value == null || value !== value) ? defaultValue : value; -} - -module.exports = defaultTo; diff --git a/node_modules/lodash/defaults.js b/node_modules/lodash/defaults.js deleted file mode 100644 index c74df04..0000000 --- a/node_modules/lodash/defaults.js +++ /dev/null @@ -1,64 +0,0 @@ -var baseRest = require('./_baseRest'), - eq = require('./eq'), - isIterateeCall = require('./_isIterateeCall'), - keysIn = require('./keysIn'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = baseRest(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; -}); - -module.exports = defaults; diff --git a/node_modules/lodash/defaultsDeep.js b/node_modules/lodash/defaultsDeep.js deleted file mode 100644 index 9b5fa3e..0000000 --- a/node_modules/lodash/defaultsDeep.js +++ /dev/null @@ -1,30 +0,0 @@ -var apply = require('./_apply'), - baseRest = require('./_baseRest'), - customDefaultsMerge = require('./_customDefaultsMerge'), - mergeWith = require('./mergeWith'); - -/** - * This method is like `_.defaults` except that it recursively assigns - * default properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaults - * @example - * - * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); - * // => { 'a': { 'b': 2, 'c': 3 } } - */ -var defaultsDeep = baseRest(function(args) { - args.push(undefined, customDefaultsMerge); - return apply(mergeWith, undefined, args); -}); - -module.exports = defaultsDeep; diff --git a/node_modules/lodash/defer.js b/node_modules/lodash/defer.js deleted file mode 100644 index f6d6c6f..0000000 --- a/node_modules/lodash/defer.js +++ /dev/null @@ -1,26 +0,0 @@ -var baseDelay = require('./_baseDelay'), - baseRest = require('./_baseRest'); - -/** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // => Logs 'deferred' after one millisecond. - */ -var defer = baseRest(function(func, args) { - return baseDelay(func, 1, args); -}); - -module.exports = defer; diff --git a/node_modules/lodash/delay.js b/node_modules/lodash/delay.js deleted file mode 100644 index bd55479..0000000 --- a/node_modules/lodash/delay.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseDelay = require('./_baseDelay'), - baseRest = require('./_baseRest'), - toNumber = require('./toNumber'); - -/** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => Logs 'later' after one second. - */ -var delay = baseRest(function(func, wait, args) { - return baseDelay(func, toNumber(wait) || 0, args); -}); - -module.exports = delay; diff --git a/node_modules/lodash/difference.js b/node_modules/lodash/difference.js deleted file mode 100644 index fa28bb3..0000000 --- a/node_modules/lodash/difference.js +++ /dev/null @@ -1,33 +0,0 @@ -var baseDifference = require('./_baseDifference'), - baseFlatten = require('./_baseFlatten'), - baseRest = require('./_baseRest'), - isArrayLikeObject = require('./isArrayLikeObject'); - -/** - * Creates an array of `array` values not included in the other given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * **Note:** Unlike `_.pullAll`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @see _.without, _.xor - * @example - * - * _.difference([2, 1], [2, 3]); - * // => [1] - */ -var difference = baseRest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) - : []; -}); - -module.exports = difference; diff --git a/node_modules/lodash/differenceBy.js b/node_modules/lodash/differenceBy.js deleted file mode 100644 index 2cd63e7..0000000 --- a/node_modules/lodash/differenceBy.js +++ /dev/null @@ -1,44 +0,0 @@ -var baseDifference = require('./_baseDifference'), - baseFlatten = require('./_baseFlatten'), - baseIteratee = require('./_baseIteratee'), - baseRest = require('./_baseRest'), - isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'); - -/** - * This method is like `_.difference` except that it accepts `iteratee` which - * is invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). - * - * **Note:** Unlike `_.pullAllBy`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [1.2] - * - * // The `_.property` iteratee shorthand. - * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); - * // => [{ 'x': 2 }] - */ -var differenceBy = baseRest(function(array, values) { - var iteratee = last(values); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)) - : []; -}); - -module.exports = differenceBy; diff --git a/node_modules/lodash/differenceWith.js b/node_modules/lodash/differenceWith.js deleted file mode 100644 index c0233f4..0000000 --- a/node_modules/lodash/differenceWith.js +++ /dev/null @@ -1,40 +0,0 @@ -var baseDifference = require('./_baseDifference'), - baseFlatten = require('./_baseFlatten'), - baseRest = require('./_baseRest'), - isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'); - -/** - * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. The order and - * references of result values are determined by the first array. The comparator - * is invoked with two arguments: (arrVal, othVal). - * - * **Note:** Unlike `_.pullAllWith`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * - * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); - * // => [{ 'x': 2, 'y': 1 }] - */ -var differenceWith = baseRest(function(array, values) { - var comparator = last(values); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) - : []; -}); - -module.exports = differenceWith; diff --git a/node_modules/lodash/divide.js b/node_modules/lodash/divide.js deleted file mode 100644 index 8cae0cd..0000000 --- a/node_modules/lodash/divide.js +++ /dev/null @@ -1,22 +0,0 @@ -var createMathOperation = require('./_createMathOperation'); - -/** - * Divide two numbers. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Math - * @param {number} dividend The first number in a division. - * @param {number} divisor The second number in a division. - * @returns {number} Returns the quotient. - * @example - * - * _.divide(6, 4); - * // => 1.5 - */ -var divide = createMathOperation(function(dividend, divisor) { - return dividend / divisor; -}, 1); - -module.exports = divide; diff --git a/node_modules/lodash/drop.js b/node_modules/lodash/drop.js deleted file mode 100644 index d5c3cba..0000000 --- a/node_modules/lodash/drop.js +++ /dev/null @@ -1,38 +0,0 @@ -var baseSlice = require('./_baseSlice'), - toInteger = require('./toInteger'); - -/** - * Creates a slice of `array` with `n` elements dropped from the beginning. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.drop([1, 2, 3]); - * // => [2, 3] - * - * _.drop([1, 2, 3], 2); - * // => [3] - * - * _.drop([1, 2, 3], 5); - * // => [] - * - * _.drop([1, 2, 3], 0); - * // => [1, 2, 3] - */ -function drop(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - return baseSlice(array, n < 0 ? 0 : n, length); -} - -module.exports = drop; diff --git a/node_modules/lodash/dropRight.js b/node_modules/lodash/dropRight.js deleted file mode 100644 index 441fe99..0000000 --- a/node_modules/lodash/dropRight.js +++ /dev/null @@ -1,39 +0,0 @@ -var baseSlice = require('./_baseSlice'), - toInteger = require('./toInteger'); - -/** - * Creates a slice of `array` with `n` elements dropped from the end. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropRight([1, 2, 3]); - * // => [1, 2] - * - * _.dropRight([1, 2, 3], 2); - * // => [1] - * - * _.dropRight([1, 2, 3], 5); - * // => [] - * - * _.dropRight([1, 2, 3], 0); - * // => [1, 2, 3] - */ -function dropRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, 0, n < 0 ? 0 : n); -} - -module.exports = dropRight; diff --git a/node_modules/lodash/dropRightWhile.js b/node_modules/lodash/dropRightWhile.js deleted file mode 100644 index 9ad36a0..0000000 --- a/node_modules/lodash/dropRightWhile.js +++ /dev/null @@ -1,45 +0,0 @@ -var baseIteratee = require('./_baseIteratee'), - baseWhile = require('./_baseWhile'); - -/** - * Creates a slice of `array` excluding elements dropped from the end. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.dropRightWhile(users, function(o) { return !o.active; }); - * // => objects for ['barney'] - * - * // The `_.matches` iteratee shorthand. - * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); - * // => objects for ['barney', 'fred'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropRightWhile(users, ['active', false]); - * // => objects for ['barney'] - * - * // The `_.property` iteratee shorthand. - * _.dropRightWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] - */ -function dropRightWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, baseIteratee(predicate, 3), true, true) - : []; -} - -module.exports = dropRightWhile; diff --git a/node_modules/lodash/dropWhile.js b/node_modules/lodash/dropWhile.js deleted file mode 100644 index 903ef56..0000000 --- a/node_modules/lodash/dropWhile.js +++ /dev/null @@ -1,45 +0,0 @@ -var baseIteratee = require('./_baseIteratee'), - baseWhile = require('./_baseWhile'); - -/** - * Creates a slice of `array` excluding elements dropped from the beginning. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.dropWhile(users, function(o) { return !o.active; }); - * // => objects for ['pebbles'] - * - * // The `_.matches` iteratee shorthand. - * _.dropWhile(users, { 'user': 'barney', 'active': false }); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropWhile(users, ['active', false]); - * // => objects for ['pebbles'] - * - * // The `_.property` iteratee shorthand. - * _.dropWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] - */ -function dropWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, baseIteratee(predicate, 3), true) - : []; -} - -module.exports = dropWhile; diff --git a/node_modules/lodash/each.js b/node_modules/lodash/each.js deleted file mode 100644 index 8800f42..0000000 --- a/node_modules/lodash/each.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./forEach'); diff --git a/node_modules/lodash/eachRight.js b/node_modules/lodash/eachRight.js deleted file mode 100644 index 3252b2a..0000000 --- a/node_modules/lodash/eachRight.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./forEachRight'); diff --git a/node_modules/lodash/endsWith.js b/node_modules/lodash/endsWith.js deleted file mode 100644 index 76fc866..0000000 --- a/node_modules/lodash/endsWith.js +++ /dev/null @@ -1,43 +0,0 @@ -var baseClamp = require('./_baseClamp'), - baseToString = require('./_baseToString'), - toInteger = require('./toInteger'), - toString = require('./toString'); - -/** - * Checks if `string` ends with the given target string. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search up to. - * @returns {boolean} Returns `true` if `string` ends with `target`, - * else `false`. - * @example - * - * _.endsWith('abc', 'c'); - * // => true - * - * _.endsWith('abc', 'b'); - * // => false - * - * _.endsWith('abc', 'b', 2); - * // => true - */ -function endsWith(string, target, position) { - string = toString(string); - target = baseToString(target); - - var length = string.length; - position = position === undefined - ? length - : baseClamp(toInteger(position), 0, length); - - var end = position; - position -= target.length; - return position >= 0 && string.slice(position, end) == target; -} - -module.exports = endsWith; diff --git a/node_modules/lodash/entries.js b/node_modules/lodash/entries.js deleted file mode 100644 index 7a88df2..0000000 --- a/node_modules/lodash/entries.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./toPairs'); diff --git a/node_modules/lodash/entriesIn.js b/node_modules/lodash/entriesIn.js deleted file mode 100644 index f6c6331..0000000 --- a/node_modules/lodash/entriesIn.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./toPairsIn'); diff --git a/node_modules/lodash/eq.js b/node_modules/lodash/eq.js deleted file mode 100644 index a940688..0000000 --- a/node_modules/lodash/eq.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -module.exports = eq; diff --git a/node_modules/lodash/escape.js b/node_modules/lodash/escape.js deleted file mode 100644 index 9247e00..0000000 --- a/node_modules/lodash/escape.js +++ /dev/null @@ -1,43 +0,0 @@ -var escapeHtmlChar = require('./_escapeHtmlChar'), - toString = require('./toString'); - -/** Used to match HTML entities and HTML characters. */ -var reUnescapedHtml = /[&<>"']/g, - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - -/** - * Converts the characters "&", "<", ">", '"', and "'" in `string` to their - * corresponding HTML entities. - * - * **Note:** No other characters are escaped. To escape additional - * characters use a third-party library like [_he_](https://mths.be/he). - * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. See - * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. - * - * When working with HTML you should always - * [quote attribute values](http://wonko.com/post/html-escaping) to reduce - * XSS vectors. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ -function escape(string) { - string = toString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; -} - -module.exports = escape; diff --git a/node_modules/lodash/escapeRegExp.js b/node_modules/lodash/escapeRegExp.js deleted file mode 100644 index 0a58c69..0000000 --- a/node_modules/lodash/escapeRegExp.js +++ /dev/null @@ -1,32 +0,0 @@ -var toString = require('./toString'); - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, - reHasRegExpChar = RegExp(reRegExpChar.source); - -/** - * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", - * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escapeRegExp('[lodash](https://lodash.com/)'); - * // => '\[lodash\]\(https://lodash\.com/\)' - */ -function escapeRegExp(string) { - string = toString(string); - return (string && reHasRegExpChar.test(string)) - ? string.replace(reRegExpChar, '\\$&') - : string; -} - -module.exports = escapeRegExp; diff --git a/node_modules/lodash/every.js b/node_modules/lodash/every.js deleted file mode 100644 index 25080da..0000000 --- a/node_modules/lodash/every.js +++ /dev/null @@ -1,56 +0,0 @@ -var arrayEvery = require('./_arrayEvery'), - baseEvery = require('./_baseEvery'), - baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'), - isIterateeCall = require('./_isIterateeCall'); - -/** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * Iteration is stopped once `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * **Note:** This method returns `true` for - * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because - * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of - * elements of empty collections. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.every(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.every(users, 'active'); - * // => false - */ -function every(collection, predicate, guard) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; - } - return func(collection, baseIteratee(predicate, 3)); -} - -module.exports = every; diff --git a/node_modules/lodash/extend.js b/node_modules/lodash/extend.js deleted file mode 100644 index e00166c..0000000 --- a/node_modules/lodash/extend.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./assignIn'); diff --git a/node_modules/lodash/extendWith.js b/node_modules/lodash/extendWith.js deleted file mode 100644 index dbdcb3b..0000000 --- a/node_modules/lodash/extendWith.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./assignInWith'); diff --git a/node_modules/lodash/fill.js b/node_modules/lodash/fill.js deleted file mode 100644 index ae13aa1..0000000 --- a/node_modules/lodash/fill.js +++ /dev/null @@ -1,45 +0,0 @@ -var baseFill = require('./_baseFill'), - isIterateeCall = require('./_isIterateeCall'); - -/** - * Fills elements of `array` with `value` from `start` up to, but not - * including, `end`. - * - * **Note:** This method mutates `array`. - * - * @static - * @memberOf _ - * @since 3.2.0 - * @category Array - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.fill(array, 'a'); - * console.log(array); - * // => ['a', 'a', 'a'] - * - * _.fill(Array(3), 2); - * // => [2, 2, 2] - * - * _.fill([4, 6, 8, 10], '*', 1, 3); - * // => [4, '*', '*', 10] - */ -function fill(array, value, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { - start = 0; - end = length; - } - return baseFill(array, value, start, end); -} - -module.exports = fill; diff --git a/node_modules/lodash/filter.js b/node_modules/lodash/filter.js deleted file mode 100644 index 89e0c8c..0000000 --- a/node_modules/lodash/filter.js +++ /dev/null @@ -1,52 +0,0 @@ -var arrayFilter = require('./_arrayFilter'), - baseFilter = require('./_baseFilter'), - baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ -function filter(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, baseIteratee(predicate, 3)); -} - -module.exports = filter; diff --git a/node_modules/lodash/find.js b/node_modules/lodash/find.js deleted file mode 100644 index de732cc..0000000 --- a/node_modules/lodash/find.js +++ /dev/null @@ -1,42 +0,0 @@ -var createFind = require('./_createFind'), - findIndex = require('./findIndex'); - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ -var find = createFind(findIndex); - -module.exports = find; diff --git a/node_modules/lodash/findIndex.js b/node_modules/lodash/findIndex.js deleted file mode 100644 index 4689069..0000000 --- a/node_modules/lodash/findIndex.js +++ /dev/null @@ -1,55 +0,0 @@ -var baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'), - toInteger = require('./toInteger'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ -function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseFindIndex(array, baseIteratee(predicate, 3), index); -} - -module.exports = findIndex; diff --git a/node_modules/lodash/findKey.js b/node_modules/lodash/findKey.js deleted file mode 100644 index cac0248..0000000 --- a/node_modules/lodash/findKey.js +++ /dev/null @@ -1,44 +0,0 @@ -var baseFindKey = require('./_baseFindKey'), - baseForOwn = require('./_baseForOwn'), - baseIteratee = require('./_baseIteratee'); - -/** - * This method is like `_.find` except that it returns the key of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Object - * @param {Object} object The object to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findKey(users, function(o) { return o.age < 40; }); - * // => 'barney' (iteration order is not guaranteed) - * - * // The `_.matches` iteratee shorthand. - * _.findKey(users, { 'age': 1, 'active': true }); - * // => 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findKey(users, ['active', false]); - * // => 'fred' - * - * // The `_.property` iteratee shorthand. - * _.findKey(users, 'active'); - * // => 'barney' - */ -function findKey(object, predicate) { - return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn); -} - -module.exports = findKey; diff --git a/node_modules/lodash/findLast.js b/node_modules/lodash/findLast.js deleted file mode 100644 index 70b4271..0000000 --- a/node_modules/lodash/findLast.js +++ /dev/null @@ -1,25 +0,0 @@ -var createFind = require('./_createFind'), - findLastIndex = require('./findLastIndex'); - -/** - * This method is like `_.find` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=collection.length-1] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * _.findLast([1, 2, 3, 4], function(n) { - * return n % 2 == 1; - * }); - * // => 3 - */ -var findLast = createFind(findLastIndex); - -module.exports = findLast; diff --git a/node_modules/lodash/findLastIndex.js b/node_modules/lodash/findLastIndex.js deleted file mode 100644 index 7da3431..0000000 --- a/node_modules/lodash/findLastIndex.js +++ /dev/null @@ -1,59 +0,0 @@ -var baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'), - toInteger = require('./toInteger'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * This method is like `_.findIndex` except that it iterates over elements - * of `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); - * // => 2 - * - * // The `_.matches` iteratee shorthand. - * _.findLastIndex(users, { 'user': 'barney', 'active': true }); - * // => 0 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastIndex(users, ['active', false]); - * // => 2 - * - * // The `_.property` iteratee shorthand. - * _.findLastIndex(users, 'active'); - * // => 0 - */ -function findLastIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length - 1; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = fromIndex < 0 - ? nativeMax(length + index, 0) - : nativeMin(index, length - 1); - } - return baseFindIndex(array, baseIteratee(predicate, 3), index, true); -} - -module.exports = findLastIndex; diff --git a/node_modules/lodash/findLastKey.js b/node_modules/lodash/findLastKey.js deleted file mode 100644 index 66fb9fb..0000000 --- a/node_modules/lodash/findLastKey.js +++ /dev/null @@ -1,44 +0,0 @@ -var baseFindKey = require('./_baseFindKey'), - baseForOwnRight = require('./_baseForOwnRight'), - baseIteratee = require('./_baseIteratee'); - -/** - * This method is like `_.findKey` except that it iterates over elements of - * a collection in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findLastKey(users, function(o) { return o.age < 40; }); - * // => returns 'pebbles' assuming `_.findKey` returns 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.findLastKey(users, { 'age': 36, 'active': true }); - * // => 'barney' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastKey(users, ['active', false]); - * // => 'fred' - * - * // The `_.property` iteratee shorthand. - * _.findLastKey(users, 'active'); - * // => 'pebbles' - */ -function findLastKey(object, predicate) { - return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight); -} - -module.exports = findLastKey; diff --git a/node_modules/lodash/first.js b/node_modules/lodash/first.js deleted file mode 100644 index 53f4ad1..0000000 --- a/node_modules/lodash/first.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./head'); diff --git a/node_modules/lodash/flake.lock b/node_modules/lodash/flake.lock deleted file mode 100644 index dd03252..0000000 --- a/node_modules/lodash/flake.lock +++ /dev/null @@ -1,40 +0,0 @@ -{ - "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1613582597, - "narHash": "sha256-6LvipIvFuhyorHpUqK3HjySC5Y6gshXHFBhU9EJ4DoM=", - "path": "/nix/store/srvplqq673sqd9vyfhyc5w1p88y1gfm4-source", - "rev": "6b1057b452c55bb3b463f0d7055bc4ec3fd1f381", - "type": "path" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs", - "utils": "utils" - } - }, - "utils": { - "locked": { - "lastModified": 1610051610, - "narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/node_modules/lodash/flake.nix b/node_modules/lodash/flake.nix deleted file mode 100644 index 15a451c..0000000 --- a/node_modules/lodash/flake.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - inputs = { - utils.url = "github:numtide/flake-utils"; - }; - - outputs = { self, nixpkgs, utils }: - utils.lib.eachDefaultSystem (system: - let - pkgs = nixpkgs.legacyPackages."${system}"; - in rec { - devShell = pkgs.mkShell { - nativeBuildInputs = with pkgs; [ - yarn - nodejs-14_x - nodePackages.typescript-language-server - nodePackages.eslint - ]; - }; - }); -} diff --git a/node_modules/lodash/flatMap.js b/node_modules/lodash/flatMap.js deleted file mode 100644 index e668506..0000000 --- a/node_modules/lodash/flatMap.js +++ /dev/null @@ -1,29 +0,0 @@ -var baseFlatten = require('./_baseFlatten'), - map = require('./map'); - -/** - * Creates a flattened array of values by running each element in `collection` - * thru `iteratee` and flattening the mapped results. The iteratee is invoked - * with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [n, n]; - * } - * - * _.flatMap([1, 2], duplicate); - * // => [1, 1, 2, 2] - */ -function flatMap(collection, iteratee) { - return baseFlatten(map(collection, iteratee), 1); -} - -module.exports = flatMap; diff --git a/node_modules/lodash/flatMapDeep.js b/node_modules/lodash/flatMapDeep.js deleted file mode 100644 index 4653d60..0000000 --- a/node_modules/lodash/flatMapDeep.js +++ /dev/null @@ -1,31 +0,0 @@ -var baseFlatten = require('./_baseFlatten'), - map = require('./map'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [[[n, n]]]; - * } - * - * _.flatMapDeep([1, 2], duplicate); - * // => [1, 1, 2, 2] - */ -function flatMapDeep(collection, iteratee) { - return baseFlatten(map(collection, iteratee), INFINITY); -} - -module.exports = flatMapDeep; diff --git a/node_modules/lodash/flatMapDepth.js b/node_modules/lodash/flatMapDepth.js deleted file mode 100644 index 6d72005..0000000 --- a/node_modules/lodash/flatMapDepth.js +++ /dev/null @@ -1,31 +0,0 @@ -var baseFlatten = require('./_baseFlatten'), - map = require('./map'), - toInteger = require('./toInteger'); - -/** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results up to `depth` times. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [[[n, n]]]; - * } - * - * _.flatMapDepth([1, 2], duplicate, 2); - * // => [[1, 1], [2, 2]] - */ -function flatMapDepth(collection, iteratee, depth) { - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(map(collection, iteratee), depth); -} - -module.exports = flatMapDepth; diff --git a/node_modules/lodash/flatten.js b/node_modules/lodash/flatten.js deleted file mode 100644 index 3f09f7f..0000000 --- a/node_modules/lodash/flatten.js +++ /dev/null @@ -1,22 +0,0 @@ -var baseFlatten = require('./_baseFlatten'); - -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; -} - -module.exports = flatten; diff --git a/node_modules/lodash/flattenDeep.js b/node_modules/lodash/flattenDeep.js deleted file mode 100644 index 8ad585c..0000000 --- a/node_modules/lodash/flattenDeep.js +++ /dev/null @@ -1,25 +0,0 @@ -var baseFlatten = require('./_baseFlatten'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Recursively flattens `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flattenDeep([1, [2, [3, [4]], 5]]); - * // => [1, 2, 3, 4, 5] - */ -function flattenDeep(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, INFINITY) : []; -} - -module.exports = flattenDeep; diff --git a/node_modules/lodash/flattenDepth.js b/node_modules/lodash/flattenDepth.js deleted file mode 100644 index 441fdcc..0000000 --- a/node_modules/lodash/flattenDepth.js +++ /dev/null @@ -1,33 +0,0 @@ -var baseFlatten = require('./_baseFlatten'), - toInteger = require('./toInteger'); - -/** - * Recursively flatten `array` up to `depth` times. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Array - * @param {Array} array The array to flatten. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. - * @example - * - * var array = [1, [2, [3, [4]], 5]]; - * - * _.flattenDepth(array, 1); - * // => [1, 2, [3, [4]], 5] - * - * _.flattenDepth(array, 2); - * // => [1, 2, 3, [4], 5] - */ -function flattenDepth(array, depth) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(array, depth); -} - -module.exports = flattenDepth; diff --git a/node_modules/lodash/flip.js b/node_modules/lodash/flip.js deleted file mode 100644 index c28dd78..0000000 --- a/node_modules/lodash/flip.js +++ /dev/null @@ -1,28 +0,0 @@ -var createWrap = require('./_createWrap'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_FLIP_FLAG = 512; - -/** - * Creates a function that invokes `func` with arguments reversed. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new flipped function. - * @example - * - * var flipped = _.flip(function() { - * return _.toArray(arguments); - * }); - * - * flipped('a', 'b', 'c', 'd'); - * // => ['d', 'c', 'b', 'a'] - */ -function flip(func) { - return createWrap(func, WRAP_FLIP_FLAG); -} - -module.exports = flip; diff --git a/node_modules/lodash/floor.js b/node_modules/lodash/floor.js deleted file mode 100644 index ab6dfa2..0000000 --- a/node_modules/lodash/floor.js +++ /dev/null @@ -1,26 +0,0 @@ -var createRound = require('./_createRound'); - -/** - * Computes `number` rounded down to `precision`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Math - * @param {number} number The number to round down. - * @param {number} [precision=0] The precision to round down to. - * @returns {number} Returns the rounded down number. - * @example - * - * _.floor(4.006); - * // => 4 - * - * _.floor(0.046, 2); - * // => 0.04 - * - * _.floor(4060, -2); - * // => 4000 - */ -var floor = createRound('floor'); - -module.exports = floor; diff --git a/node_modules/lodash/flow.js b/node_modules/lodash/flow.js deleted file mode 100644 index 74b6b62..0000000 --- a/node_modules/lodash/flow.js +++ /dev/null @@ -1,27 +0,0 @@ -var createFlow = require('./_createFlow'); - -/** - * Creates a function that returns the result of invoking the given functions - * with the `this` binding of the created function, where each successive - * invocation is supplied the return value of the previous. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {...(Function|Function[])} [funcs] The functions to invoke. - * @returns {Function} Returns the new composite function. - * @see _.flowRight - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flow([_.add, square]); - * addSquare(1, 2); - * // => 9 - */ -var flow = createFlow(); - -module.exports = flow; diff --git a/node_modules/lodash/flowRight.js b/node_modules/lodash/flowRight.js deleted file mode 100644 index 1146141..0000000 --- a/node_modules/lodash/flowRight.js +++ /dev/null @@ -1,26 +0,0 @@ -var createFlow = require('./_createFlow'); - -/** - * This method is like `_.flow` except that it creates a function that - * invokes the given functions from right to left. - * - * @static - * @since 3.0.0 - * @memberOf _ - * @category Util - * @param {...(Function|Function[])} [funcs] The functions to invoke. - * @returns {Function} Returns the new composite function. - * @see _.flow - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flowRight([square, _.add]); - * addSquare(1, 2); - * // => 9 - */ -var flowRight = createFlow(true); - -module.exports = flowRight; diff --git a/node_modules/lodash/forEach.js b/node_modules/lodash/forEach.js deleted file mode 100644 index c64eaa7..0000000 --- a/node_modules/lodash/forEach.js +++ /dev/null @@ -1,41 +0,0 @@ -var arrayEach = require('./_arrayEach'), - baseEach = require('./_baseEach'), - castFunction = require('./_castFunction'), - isArray = require('./isArray'); - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = isArray(collection) ? arrayEach : baseEach; - return func(collection, castFunction(iteratee)); -} - -module.exports = forEach; diff --git a/node_modules/lodash/forEachRight.js b/node_modules/lodash/forEachRight.js deleted file mode 100644 index 7390eba..0000000 --- a/node_modules/lodash/forEachRight.js +++ /dev/null @@ -1,31 +0,0 @@ -var arrayEachRight = require('./_arrayEachRight'), - baseEachRight = require('./_baseEachRight'), - castFunction = require('./_castFunction'), - isArray = require('./isArray'); - -/** - * This method is like `_.forEach` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @alias eachRight - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEach - * @example - * - * _.forEachRight([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `2` then `1`. - */ -function forEachRight(collection, iteratee) { - var func = isArray(collection) ? arrayEachRight : baseEachRight; - return func(collection, castFunction(iteratee)); -} - -module.exports = forEachRight; diff --git a/node_modules/lodash/forIn.js b/node_modules/lodash/forIn.js deleted file mode 100644 index 583a596..0000000 --- a/node_modules/lodash/forIn.js +++ /dev/null @@ -1,39 +0,0 @@ -var baseFor = require('./_baseFor'), - castFunction = require('./_castFunction'), - keysIn = require('./keysIn'); - -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null - ? object - : baseFor(object, castFunction(iteratee), keysIn); -} - -module.exports = forIn; diff --git a/node_modules/lodash/forInRight.js b/node_modules/lodash/forInRight.js deleted file mode 100644 index 4aedf58..0000000 --- a/node_modules/lodash/forInRight.js +++ /dev/null @@ -1,37 +0,0 @@ -var baseForRight = require('./_baseForRight'), - castFunction = require('./_castFunction'), - keysIn = require('./keysIn'); - -/** - * This method is like `_.forIn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forIn - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forInRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. - */ -function forInRight(object, iteratee) { - return object == null - ? object - : baseForRight(object, castFunction(iteratee), keysIn); -} - -module.exports = forInRight; diff --git a/node_modules/lodash/forOwn.js b/node_modules/lodash/forOwn.js deleted file mode 100644 index 94eed84..0000000 --- a/node_modules/lodash/forOwn.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseForOwn = require('./_baseForOwn'), - castFunction = require('./_castFunction'); - -/** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forOwn(object, iteratee) { - return object && baseForOwn(object, castFunction(iteratee)); -} - -module.exports = forOwn; diff --git a/node_modules/lodash/forOwnRight.js b/node_modules/lodash/forOwnRight.js deleted file mode 100644 index 86f338f..0000000 --- a/node_modules/lodash/forOwnRight.js +++ /dev/null @@ -1,34 +0,0 @@ -var baseForOwnRight = require('./_baseForOwnRight'), - castFunction = require('./_castFunction'); - -/** - * This method is like `_.forOwn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwn - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwnRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. - */ -function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, castFunction(iteratee)); -} - -module.exports = forOwnRight; diff --git a/node_modules/lodash/fp.js b/node_modules/lodash/fp.js deleted file mode 100644 index e372dbb..0000000 --- a/node_modules/lodash/fp.js +++ /dev/null @@ -1,2 +0,0 @@ -var _ = require('./lodash.min').runInContext(); -module.exports = require('./fp/_baseConvert')(_, _); diff --git a/node_modules/lodash/fp/F.js b/node_modules/lodash/fp/F.js deleted file mode 100644 index a05a63a..0000000 --- a/node_modules/lodash/fp/F.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./stubFalse'); diff --git a/node_modules/lodash/fp/T.js b/node_modules/lodash/fp/T.js deleted file mode 100644 index e2ba8ea..0000000 --- a/node_modules/lodash/fp/T.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./stubTrue'); diff --git a/node_modules/lodash/fp/__.js b/node_modules/lodash/fp/__.js deleted file mode 100644 index 4af98de..0000000 --- a/node_modules/lodash/fp/__.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./placeholder'); diff --git a/node_modules/lodash/fp/_baseConvert.js b/node_modules/lodash/fp/_baseConvert.js deleted file mode 100644 index 9baf8e1..0000000 --- a/node_modules/lodash/fp/_baseConvert.js +++ /dev/null @@ -1,569 +0,0 @@ -var mapping = require('./_mapping'), - fallbackHolder = require('./placeholder'); - -/** Built-in value reference. */ -var push = Array.prototype.push; - -/** - * Creates a function, with an arity of `n`, that invokes `func` with the - * arguments it receives. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} n The arity of the new function. - * @returns {Function} Returns the new function. - */ -function baseArity(func, n) { - return n == 2 - ? function(a, b) { return func.apply(undefined, arguments); } - : function(a) { return func.apply(undefined, arguments); }; -} - -/** - * Creates a function that invokes `func`, with up to `n` arguments, ignoring - * any additional arguments. - * - * @private - * @param {Function} func The function to cap arguments for. - * @param {number} n The arity cap. - * @returns {Function} Returns the new function. - */ -function baseAry(func, n) { - return n == 2 - ? function(a, b) { return func(a, b); } - : function(a) { return func(a); }; -} - -/** - * Creates a clone of `array`. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the cloned array. - */ -function cloneArray(array) { - var length = array ? array.length : 0, - result = Array(length); - - while (length--) { - result[length] = array[length]; - } - return result; -} - -/** - * Creates a function that clones a given object using the assignment `func`. - * - * @private - * @param {Function} func The assignment function. - * @returns {Function} Returns the new cloner function. - */ -function createCloner(func) { - return function(object) { - return func({}, object); - }; -} - -/** - * A specialized version of `_.spread` which flattens the spread array into - * the arguments of the invoked `func`. - * - * @private - * @param {Function} func The function to spread arguments over. - * @param {number} start The start position of the spread. - * @returns {Function} Returns the new function. - */ -function flatSpread(func, start) { - return function() { - var length = arguments.length, - lastIndex = length - 1, - args = Array(length); - - while (length--) { - args[length] = arguments[length]; - } - var array = args[start], - otherArgs = args.slice(0, start); - - if (array) { - push.apply(otherArgs, array); - } - if (start != lastIndex) { - push.apply(otherArgs, args.slice(start + 1)); - } - return func.apply(this, otherArgs); - }; -} - -/** - * Creates a function that wraps `func` and uses `cloner` to clone the first - * argument it receives. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} cloner The function to clone arguments. - * @returns {Function} Returns the new immutable function. - */ -function wrapImmutable(func, cloner) { - return function() { - var length = arguments.length; - if (!length) { - return; - } - var args = Array(length); - while (length--) { - args[length] = arguments[length]; - } - var result = args[0] = cloner.apply(undefined, args); - func.apply(undefined, args); - return result; - }; -} - -/** - * The base implementation of `convert` which accepts a `util` object of methods - * required to perform conversions. - * - * @param {Object} util The util object. - * @param {string} name The name of the function to convert. - * @param {Function} func The function to convert. - * @param {Object} [options] The options object. - * @param {boolean} [options.cap=true] Specify capping iteratee arguments. - * @param {boolean} [options.curry=true] Specify currying. - * @param {boolean} [options.fixed=true] Specify fixed arity. - * @param {boolean} [options.immutable=true] Specify immutable operations. - * @param {boolean} [options.rearg=true] Specify rearranging arguments. - * @returns {Function|Object} Returns the converted function or object. - */ -function baseConvert(util, name, func, options) { - var isLib = typeof name == 'function', - isObj = name === Object(name); - - if (isObj) { - options = func; - func = name; - name = undefined; - } - if (func == null) { - throw new TypeError; - } - options || (options = {}); - - var config = { - 'cap': 'cap' in options ? options.cap : true, - 'curry': 'curry' in options ? options.curry : true, - 'fixed': 'fixed' in options ? options.fixed : true, - 'immutable': 'immutable' in options ? options.immutable : true, - 'rearg': 'rearg' in options ? options.rearg : true - }; - - var defaultHolder = isLib ? func : fallbackHolder, - forceCurry = ('curry' in options) && options.curry, - forceFixed = ('fixed' in options) && options.fixed, - forceRearg = ('rearg' in options) && options.rearg, - pristine = isLib ? func.runInContext() : undefined; - - var helpers = isLib ? func : { - 'ary': util.ary, - 'assign': util.assign, - 'clone': util.clone, - 'curry': util.curry, - 'forEach': util.forEach, - 'isArray': util.isArray, - 'isError': util.isError, - 'isFunction': util.isFunction, - 'isWeakMap': util.isWeakMap, - 'iteratee': util.iteratee, - 'keys': util.keys, - 'rearg': util.rearg, - 'toInteger': util.toInteger, - 'toPath': util.toPath - }; - - var ary = helpers.ary, - assign = helpers.assign, - clone = helpers.clone, - curry = helpers.curry, - each = helpers.forEach, - isArray = helpers.isArray, - isError = helpers.isError, - isFunction = helpers.isFunction, - isWeakMap = helpers.isWeakMap, - keys = helpers.keys, - rearg = helpers.rearg, - toInteger = helpers.toInteger, - toPath = helpers.toPath; - - var aryMethodKeys = keys(mapping.aryMethod); - - var wrappers = { - 'castArray': function(castArray) { - return function() { - var value = arguments[0]; - return isArray(value) - ? castArray(cloneArray(value)) - : castArray.apply(undefined, arguments); - }; - }, - 'iteratee': function(iteratee) { - return function() { - var func = arguments[0], - arity = arguments[1], - result = iteratee(func, arity), - length = result.length; - - if (config.cap && typeof arity == 'number') { - arity = arity > 2 ? (arity - 2) : 1; - return (length && length <= arity) ? result : baseAry(result, arity); - } - return result; - }; - }, - 'mixin': function(mixin) { - return function(source) { - var func = this; - if (!isFunction(func)) { - return mixin(func, Object(source)); - } - var pairs = []; - each(keys(source), function(key) { - if (isFunction(source[key])) { - pairs.push([key, func.prototype[key]]); - } - }); - - mixin(func, Object(source)); - - each(pairs, function(pair) { - var value = pair[1]; - if (isFunction(value)) { - func.prototype[pair[0]] = value; - } else { - delete func.prototype[pair[0]]; - } - }); - return func; - }; - }, - 'nthArg': function(nthArg) { - return function(n) { - var arity = n < 0 ? 1 : (toInteger(n) + 1); - return curry(nthArg(n), arity); - }; - }, - 'rearg': function(rearg) { - return function(func, indexes) { - var arity = indexes ? indexes.length : 0; - return curry(rearg(func, indexes), arity); - }; - }, - 'runInContext': function(runInContext) { - return function(context) { - return baseConvert(util, runInContext(context), options); - }; - } - }; - - /*--------------------------------------------------------------------------*/ - - /** - * Casts `func` to a function with an arity capped iteratee if needed. - * - * @private - * @param {string} name The name of the function to inspect. - * @param {Function} func The function to inspect. - * @returns {Function} Returns the cast function. - */ - function castCap(name, func) { - if (config.cap) { - var indexes = mapping.iterateeRearg[name]; - if (indexes) { - return iterateeRearg(func, indexes); - } - var n = !isLib && mapping.iterateeAry[name]; - if (n) { - return iterateeAry(func, n); - } - } - return func; - } - - /** - * Casts `func` to a curried function if needed. - * - * @private - * @param {string} name The name of the function to inspect. - * @param {Function} func The function to inspect. - * @param {number} n The arity of `func`. - * @returns {Function} Returns the cast function. - */ - function castCurry(name, func, n) { - return (forceCurry || (config.curry && n > 1)) - ? curry(func, n) - : func; - } - - /** - * Casts `func` to a fixed arity function if needed. - * - * @private - * @param {string} name The name of the function to inspect. - * @param {Function} func The function to inspect. - * @param {number} n The arity cap. - * @returns {Function} Returns the cast function. - */ - function castFixed(name, func, n) { - if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { - var data = mapping.methodSpread[name], - start = data && data.start; - - return start === undefined ? ary(func, n) : flatSpread(func, start); - } - return func; - } - - /** - * Casts `func` to an rearged function if needed. - * - * @private - * @param {string} name The name of the function to inspect. - * @param {Function} func The function to inspect. - * @param {number} n The arity of `func`. - * @returns {Function} Returns the cast function. - */ - function castRearg(name, func, n) { - return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name])) - ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) - : func; - } - - /** - * Creates a clone of `object` by `path`. - * - * @private - * @param {Object} object The object to clone. - * @param {Array|string} path The path to clone by. - * @returns {Object} Returns the cloned object. - */ - function cloneByPath(object, path) { - path = toPath(path); - - var index = -1, - length = path.length, - lastIndex = length - 1, - result = clone(Object(object)), - nested = result; - - while (nested != null && ++index < length) { - var key = path[index], - value = nested[key]; - - if (value != null && - !(isFunction(value) || isError(value) || isWeakMap(value))) { - nested[key] = clone(index == lastIndex ? value : Object(value)); - } - nested = nested[key]; - } - return result; - } - - /** - * Converts `lodash` to an immutable auto-curried iteratee-first data-last - * version with conversion `options` applied. - * - * @param {Object} [options] The options object. See `baseConvert` for more details. - * @returns {Function} Returns the converted `lodash`. - */ - function convertLib(options) { - return _.runInContext.convert(options)(undefined); - } - - /** - * Create a converter function for `func` of `name`. - * - * @param {string} name The name of the function to convert. - * @param {Function} func The function to convert. - * @returns {Function} Returns the new converter function. - */ - function createConverter(name, func) { - var realName = mapping.aliasToReal[name] || name, - methodName = mapping.remap[realName] || realName, - oldOptions = options; - - return function(options) { - var newUtil = isLib ? pristine : helpers, - newFunc = isLib ? pristine[methodName] : func, - newOptions = assign(assign({}, oldOptions), options); - - return baseConvert(newUtil, realName, newFunc, newOptions); - }; - } - - /** - * Creates a function that wraps `func` to invoke its iteratee, with up to `n` - * arguments, ignoring any additional arguments. - * - * @private - * @param {Function} func The function to cap iteratee arguments for. - * @param {number} n The arity cap. - * @returns {Function} Returns the new function. - */ - function iterateeAry(func, n) { - return overArg(func, function(func) { - return typeof func == 'function' ? baseAry(func, n) : func; - }); - } - - /** - * Creates a function that wraps `func` to invoke its iteratee with arguments - * arranged according to the specified `indexes` where the argument value at - * the first index is provided as the first argument, the argument value at - * the second index is provided as the second argument, and so on. - * - * @private - * @param {Function} func The function to rearrange iteratee arguments for. - * @param {number[]} indexes The arranged argument indexes. - * @returns {Function} Returns the new function. - */ - function iterateeRearg(func, indexes) { - return overArg(func, function(func) { - var n = indexes.length; - return baseArity(rearg(baseAry(func, n), indexes), n); - }); - } - - /** - * Creates a function that invokes `func` with its first argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ - function overArg(func, transform) { - return function() { - var length = arguments.length; - if (!length) { - return func(); - } - var args = Array(length); - while (length--) { - args[length] = arguments[length]; - } - var index = config.rearg ? 0 : (length - 1); - args[index] = transform(args[index]); - return func.apply(undefined, args); - }; - } - - /** - * Creates a function that wraps `func` and applys the conversions - * rules by `name`. - * - * @private - * @param {string} name The name of the function to wrap. - * @param {Function} func The function to wrap. - * @returns {Function} Returns the converted function. - */ - function wrap(name, func, placeholder) { - var result, - realName = mapping.aliasToReal[name] || name, - wrapped = func, - wrapper = wrappers[realName]; - - if (wrapper) { - wrapped = wrapper(func); - } - else if (config.immutable) { - if (mapping.mutate.array[realName]) { - wrapped = wrapImmutable(func, cloneArray); - } - else if (mapping.mutate.object[realName]) { - wrapped = wrapImmutable(func, createCloner(func)); - } - else if (mapping.mutate.set[realName]) { - wrapped = wrapImmutable(func, cloneByPath); - } - } - each(aryMethodKeys, function(aryKey) { - each(mapping.aryMethod[aryKey], function(otherName) { - if (realName == otherName) { - var data = mapping.methodSpread[realName], - afterRearg = data && data.afterRearg; - - result = afterRearg - ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) - : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); - - result = castCap(realName, result); - result = castCurry(realName, result, aryKey); - return false; - } - }); - return !result; - }); - - result || (result = wrapped); - if (result == func) { - result = forceCurry ? curry(result, 1) : function() { - return func.apply(this, arguments); - }; - } - result.convert = createConverter(realName, func); - result.placeholder = func.placeholder = placeholder; - - return result; - } - - /*--------------------------------------------------------------------------*/ - - if (!isObj) { - return wrap(name, func, defaultHolder); - } - var _ = func; - - // Convert methods by ary cap. - var pairs = []; - each(aryMethodKeys, function(aryKey) { - each(mapping.aryMethod[aryKey], function(key) { - var func = _[mapping.remap[key] || key]; - if (func) { - pairs.push([key, wrap(key, func, _)]); - } - }); - }); - - // Convert remaining methods. - each(keys(_), function(key) { - var func = _[key]; - if (typeof func == 'function') { - var length = pairs.length; - while (length--) { - if (pairs[length][0] == key) { - return; - } - } - func.convert = createConverter(key, func); - pairs.push([key, func]); - } - }); - - // Assign to `_` leaving `_.prototype` unchanged to allow chaining. - each(pairs, function(pair) { - _[pair[0]] = pair[1]; - }); - - _.convert = convertLib; - _.placeholder = _; - - // Assign aliases. - each(keys(_), function(key) { - each(mapping.realToAlias[key] || [], function(alias) { - _[alias] = _[key]; - }); - }); - - return _; -} - -module.exports = baseConvert; diff --git a/node_modules/lodash/fp/_convertBrowser.js b/node_modules/lodash/fp/_convertBrowser.js deleted file mode 100644 index bde030d..0000000 --- a/node_modules/lodash/fp/_convertBrowser.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseConvert = require('./_baseConvert'); - -/** - * Converts `lodash` to an immutable auto-curried iteratee-first data-last - * version with conversion `options` applied. - * - * @param {Function} lodash The lodash function to convert. - * @param {Object} [options] The options object. See `baseConvert` for more details. - * @returns {Function} Returns the converted `lodash`. - */ -function browserConvert(lodash, options) { - return baseConvert(lodash, lodash, options); -} - -if (typeof _ == 'function' && typeof _.runInContext == 'function') { - _ = browserConvert(_.runInContext()); -} -module.exports = browserConvert; diff --git a/node_modules/lodash/fp/_falseOptions.js b/node_modules/lodash/fp/_falseOptions.js deleted file mode 100644 index 773235e..0000000 --- a/node_modules/lodash/fp/_falseOptions.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - 'cap': false, - 'curry': false, - 'fixed': false, - 'immutable': false, - 'rearg': false -}; diff --git a/node_modules/lodash/fp/_mapping.js b/node_modules/lodash/fp/_mapping.js deleted file mode 100644 index a642ec0..0000000 --- a/node_modules/lodash/fp/_mapping.js +++ /dev/null @@ -1,358 +0,0 @@ -/** Used to map aliases to their real names. */ -exports.aliasToReal = { - - // Lodash aliases. - 'each': 'forEach', - 'eachRight': 'forEachRight', - 'entries': 'toPairs', - 'entriesIn': 'toPairsIn', - 'extend': 'assignIn', - 'extendAll': 'assignInAll', - 'extendAllWith': 'assignInAllWith', - 'extendWith': 'assignInWith', - 'first': 'head', - - // Methods that are curried variants of others. - 'conforms': 'conformsTo', - 'matches': 'isMatch', - 'property': 'get', - - // Ramda aliases. - '__': 'placeholder', - 'F': 'stubFalse', - 'T': 'stubTrue', - 'all': 'every', - 'allPass': 'overEvery', - 'always': 'constant', - 'any': 'some', - 'anyPass': 'overSome', - 'apply': 'spread', - 'assoc': 'set', - 'assocPath': 'set', - 'complement': 'negate', - 'compose': 'flowRight', - 'contains': 'includes', - 'dissoc': 'unset', - 'dissocPath': 'unset', - 'dropLast': 'dropRight', - 'dropLastWhile': 'dropRightWhile', - 'equals': 'isEqual', - 'identical': 'eq', - 'indexBy': 'keyBy', - 'init': 'initial', - 'invertObj': 'invert', - 'juxt': 'over', - 'omitAll': 'omit', - 'nAry': 'ary', - 'path': 'get', - 'pathEq': 'matchesProperty', - 'pathOr': 'getOr', - 'paths': 'at', - 'pickAll': 'pick', - 'pipe': 'flow', - 'pluck': 'map', - 'prop': 'get', - 'propEq': 'matchesProperty', - 'propOr': 'getOr', - 'props': 'at', - 'symmetricDifference': 'xor', - 'symmetricDifferenceBy': 'xorBy', - 'symmetricDifferenceWith': 'xorWith', - 'takeLast': 'takeRight', - 'takeLastWhile': 'takeRightWhile', - 'unapply': 'rest', - 'unnest': 'flatten', - 'useWith': 'overArgs', - 'where': 'conformsTo', - 'whereEq': 'isMatch', - 'zipObj': 'zipObject' -}; - -/** Used to map ary to method names. */ -exports.aryMethod = { - '1': [ - 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', - 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', - 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', - 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse', - 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', - 'uniqueId', 'words', 'zipAll' - ], - '2': [ - 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', - 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', - 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', - 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', - 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', - 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', - 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', - 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', - 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', - 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', - 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', - 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', - 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', - 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', - 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', - 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', - 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', - 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', - 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', - 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', - 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', - 'zipObjectDeep' - ], - '3': [ - 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', - 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', - 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', - 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', - 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', - 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', - 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', - 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', - 'xorWith', 'zipWith' - ], - '4': [ - 'fill', 'setWith', 'updateWith' - ] -}; - -/** Used to map ary to rearg configs. */ -exports.aryRearg = { - '2': [1, 0], - '3': [2, 0, 1], - '4': [3, 2, 0, 1] -}; - -/** Used to map method names to their iteratee ary. */ -exports.iterateeAry = { - 'dropRightWhile': 1, - 'dropWhile': 1, - 'every': 1, - 'filter': 1, - 'find': 1, - 'findFrom': 1, - 'findIndex': 1, - 'findIndexFrom': 1, - 'findKey': 1, - 'findLast': 1, - 'findLastFrom': 1, - 'findLastIndex': 1, - 'findLastIndexFrom': 1, - 'findLastKey': 1, - 'flatMap': 1, - 'flatMapDeep': 1, - 'flatMapDepth': 1, - 'forEach': 1, - 'forEachRight': 1, - 'forIn': 1, - 'forInRight': 1, - 'forOwn': 1, - 'forOwnRight': 1, - 'map': 1, - 'mapKeys': 1, - 'mapValues': 1, - 'partition': 1, - 'reduce': 2, - 'reduceRight': 2, - 'reject': 1, - 'remove': 1, - 'some': 1, - 'takeRightWhile': 1, - 'takeWhile': 1, - 'times': 1, - 'transform': 2 -}; - -/** Used to map method names to iteratee rearg configs. */ -exports.iterateeRearg = { - 'mapKeys': [1], - 'reduceRight': [1, 0] -}; - -/** Used to map method names to rearg configs. */ -exports.methodRearg = { - 'assignInAllWith': [1, 0], - 'assignInWith': [1, 2, 0], - 'assignAllWith': [1, 0], - 'assignWith': [1, 2, 0], - 'differenceBy': [1, 2, 0], - 'differenceWith': [1, 2, 0], - 'getOr': [2, 1, 0], - 'intersectionBy': [1, 2, 0], - 'intersectionWith': [1, 2, 0], - 'isEqualWith': [1, 2, 0], - 'isMatchWith': [2, 1, 0], - 'mergeAllWith': [1, 0], - 'mergeWith': [1, 2, 0], - 'padChars': [2, 1, 0], - 'padCharsEnd': [2, 1, 0], - 'padCharsStart': [2, 1, 0], - 'pullAllBy': [2, 1, 0], - 'pullAllWith': [2, 1, 0], - 'rangeStep': [1, 2, 0], - 'rangeStepRight': [1, 2, 0], - 'setWith': [3, 1, 2, 0], - 'sortedIndexBy': [2, 1, 0], - 'sortedLastIndexBy': [2, 1, 0], - 'unionBy': [1, 2, 0], - 'unionWith': [1, 2, 0], - 'updateWith': [3, 1, 2, 0], - 'xorBy': [1, 2, 0], - 'xorWith': [1, 2, 0], - 'zipWith': [1, 2, 0] -}; - -/** Used to map method names to spread configs. */ -exports.methodSpread = { - 'assignAll': { 'start': 0 }, - 'assignAllWith': { 'start': 0 }, - 'assignInAll': { 'start': 0 }, - 'assignInAllWith': { 'start': 0 }, - 'defaultsAll': { 'start': 0 }, - 'defaultsDeepAll': { 'start': 0 }, - 'invokeArgs': { 'start': 2 }, - 'invokeArgsMap': { 'start': 2 }, - 'mergeAll': { 'start': 0 }, - 'mergeAllWith': { 'start': 0 }, - 'partial': { 'start': 1 }, - 'partialRight': { 'start': 1 }, - 'without': { 'start': 1 }, - 'zipAll': { 'start': 0 } -}; - -/** Used to identify methods which mutate arrays or objects. */ -exports.mutate = { - 'array': { - 'fill': true, - 'pull': true, - 'pullAll': true, - 'pullAllBy': true, - 'pullAllWith': true, - 'pullAt': true, - 'remove': true, - 'reverse': true - }, - 'object': { - 'assign': true, - 'assignAll': true, - 'assignAllWith': true, - 'assignIn': true, - 'assignInAll': true, - 'assignInAllWith': true, - 'assignInWith': true, - 'assignWith': true, - 'defaults': true, - 'defaultsAll': true, - 'defaultsDeep': true, - 'defaultsDeepAll': true, - 'merge': true, - 'mergeAll': true, - 'mergeAllWith': true, - 'mergeWith': true, - }, - 'set': { - 'set': true, - 'setWith': true, - 'unset': true, - 'update': true, - 'updateWith': true - } -}; - -/** Used to map real names to their aliases. */ -exports.realToAlias = (function() { - var hasOwnProperty = Object.prototype.hasOwnProperty, - object = exports.aliasToReal, - result = {}; - - for (var key in object) { - var value = object[key]; - if (hasOwnProperty.call(result, value)) { - result[value].push(key); - } else { - result[value] = [key]; - } - } - return result; -}()); - -/** Used to map method names to other names. */ -exports.remap = { - 'assignAll': 'assign', - 'assignAllWith': 'assignWith', - 'assignInAll': 'assignIn', - 'assignInAllWith': 'assignInWith', - 'curryN': 'curry', - 'curryRightN': 'curryRight', - 'defaultsAll': 'defaults', - 'defaultsDeepAll': 'defaultsDeep', - 'findFrom': 'find', - 'findIndexFrom': 'findIndex', - 'findLastFrom': 'findLast', - 'findLastIndexFrom': 'findLastIndex', - 'getOr': 'get', - 'includesFrom': 'includes', - 'indexOfFrom': 'indexOf', - 'invokeArgs': 'invoke', - 'invokeArgsMap': 'invokeMap', - 'lastIndexOfFrom': 'lastIndexOf', - 'mergeAll': 'merge', - 'mergeAllWith': 'mergeWith', - 'padChars': 'pad', - 'padCharsEnd': 'padEnd', - 'padCharsStart': 'padStart', - 'propertyOf': 'get', - 'rangeStep': 'range', - 'rangeStepRight': 'rangeRight', - 'restFrom': 'rest', - 'spreadFrom': 'spread', - 'trimChars': 'trim', - 'trimCharsEnd': 'trimEnd', - 'trimCharsStart': 'trimStart', - 'zipAll': 'zip' -}; - -/** Used to track methods that skip fixing their arity. */ -exports.skipFixed = { - 'castArray': true, - 'flow': true, - 'flowRight': true, - 'iteratee': true, - 'mixin': true, - 'rearg': true, - 'runInContext': true -}; - -/** Used to track methods that skip rearranging arguments. */ -exports.skipRearg = { - 'add': true, - 'assign': true, - 'assignIn': true, - 'bind': true, - 'bindKey': true, - 'concat': true, - 'difference': true, - 'divide': true, - 'eq': true, - 'gt': true, - 'gte': true, - 'isEqual': true, - 'lt': true, - 'lte': true, - 'matchesProperty': true, - 'merge': true, - 'multiply': true, - 'overArgs': true, - 'partial': true, - 'partialRight': true, - 'propertyOf': true, - 'random': true, - 'range': true, - 'rangeRight': true, - 'subtract': true, - 'zip': true, - 'zipObject': true, - 'zipObjectDeep': true -}; diff --git a/node_modules/lodash/fp/_util.js b/node_modules/lodash/fp/_util.js deleted file mode 100644 index 1dbf36f..0000000 --- a/node_modules/lodash/fp/_util.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - 'ary': require('../ary'), - 'assign': require('../_baseAssign'), - 'clone': require('../clone'), - 'curry': require('../curry'), - 'forEach': require('../_arrayEach'), - 'isArray': require('../isArray'), - 'isError': require('../isError'), - 'isFunction': require('../isFunction'), - 'isWeakMap': require('../isWeakMap'), - 'iteratee': require('../iteratee'), - 'keys': require('../_baseKeys'), - 'rearg': require('../rearg'), - 'toInteger': require('../toInteger'), - 'toPath': require('../toPath') -}; diff --git a/node_modules/lodash/fp/add.js b/node_modules/lodash/fp/add.js deleted file mode 100644 index 816eeec..0000000 --- a/node_modules/lodash/fp/add.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('add', require('../add')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/after.js b/node_modules/lodash/fp/after.js deleted file mode 100644 index 21a0167..0000000 --- a/node_modules/lodash/fp/after.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('after', require('../after')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/all.js b/node_modules/lodash/fp/all.js deleted file mode 100644 index d0839f7..0000000 --- a/node_modules/lodash/fp/all.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./every'); diff --git a/node_modules/lodash/fp/allPass.js b/node_modules/lodash/fp/allPass.js deleted file mode 100644 index 79b73ef..0000000 --- a/node_modules/lodash/fp/allPass.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./overEvery'); diff --git a/node_modules/lodash/fp/always.js b/node_modules/lodash/fp/always.js deleted file mode 100644 index 9887703..0000000 --- a/node_modules/lodash/fp/always.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./constant'); diff --git a/node_modules/lodash/fp/any.js b/node_modules/lodash/fp/any.js deleted file mode 100644 index 900ac25..0000000 --- a/node_modules/lodash/fp/any.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./some'); diff --git a/node_modules/lodash/fp/anyPass.js b/node_modules/lodash/fp/anyPass.js deleted file mode 100644 index 2774ab3..0000000 --- a/node_modules/lodash/fp/anyPass.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./overSome'); diff --git a/node_modules/lodash/fp/apply.js b/node_modules/lodash/fp/apply.js deleted file mode 100644 index 2b75712..0000000 --- a/node_modules/lodash/fp/apply.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./spread'); diff --git a/node_modules/lodash/fp/array.js b/node_modules/lodash/fp/array.js deleted file mode 100644 index fe939c2..0000000 --- a/node_modules/lodash/fp/array.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../array')); diff --git a/node_modules/lodash/fp/ary.js b/node_modules/lodash/fp/ary.js deleted file mode 100644 index 8edf187..0000000 --- a/node_modules/lodash/fp/ary.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('ary', require('../ary')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/assign.js b/node_modules/lodash/fp/assign.js deleted file mode 100644 index 23f47af..0000000 --- a/node_modules/lodash/fp/assign.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assign', require('../assign')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/assignAll.js b/node_modules/lodash/fp/assignAll.js deleted file mode 100644 index b1d36c7..0000000 --- a/node_modules/lodash/fp/assignAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignAll', require('../assign')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/assignAllWith.js b/node_modules/lodash/fp/assignAllWith.js deleted file mode 100644 index 21e836e..0000000 --- a/node_modules/lodash/fp/assignAllWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignAllWith', require('../assignWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/assignIn.js b/node_modules/lodash/fp/assignIn.js deleted file mode 100644 index 6e7c65f..0000000 --- a/node_modules/lodash/fp/assignIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignIn', require('../assignIn')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/assignInAll.js b/node_modules/lodash/fp/assignInAll.js deleted file mode 100644 index 7ba75db..0000000 --- a/node_modules/lodash/fp/assignInAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignInAll', require('../assignIn')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/assignInAllWith.js b/node_modules/lodash/fp/assignInAllWith.js deleted file mode 100644 index e766903..0000000 --- a/node_modules/lodash/fp/assignInAllWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignInAllWith', require('../assignInWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/assignInWith.js b/node_modules/lodash/fp/assignInWith.js deleted file mode 100644 index acb5923..0000000 --- a/node_modules/lodash/fp/assignInWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignInWith', require('../assignInWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/assignWith.js b/node_modules/lodash/fp/assignWith.js deleted file mode 100644 index eb92521..0000000 --- a/node_modules/lodash/fp/assignWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignWith', require('../assignWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/assoc.js b/node_modules/lodash/fp/assoc.js deleted file mode 100644 index 7648820..0000000 --- a/node_modules/lodash/fp/assoc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./set'); diff --git a/node_modules/lodash/fp/assocPath.js b/node_modules/lodash/fp/assocPath.js deleted file mode 100644 index 7648820..0000000 --- a/node_modules/lodash/fp/assocPath.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./set'); diff --git a/node_modules/lodash/fp/at.js b/node_modules/lodash/fp/at.js deleted file mode 100644 index cc39d25..0000000 --- a/node_modules/lodash/fp/at.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('at', require('../at')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/attempt.js b/node_modules/lodash/fp/attempt.js deleted file mode 100644 index 26ca42e..0000000 --- a/node_modules/lodash/fp/attempt.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('attempt', require('../attempt')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/before.js b/node_modules/lodash/fp/before.js deleted file mode 100644 index 7a2de65..0000000 --- a/node_modules/lodash/fp/before.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('before', require('../before')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/bind.js b/node_modules/lodash/fp/bind.js deleted file mode 100644 index 5cbe4f3..0000000 --- a/node_modules/lodash/fp/bind.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('bind', require('../bind')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/bindAll.js b/node_modules/lodash/fp/bindAll.js deleted file mode 100644 index 6b4a4a0..0000000 --- a/node_modules/lodash/fp/bindAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('bindAll', require('../bindAll')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/bindKey.js b/node_modules/lodash/fp/bindKey.js deleted file mode 100644 index 6a46c6b..0000000 --- a/node_modules/lodash/fp/bindKey.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('bindKey', require('../bindKey')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/camelCase.js b/node_modules/lodash/fp/camelCase.js deleted file mode 100644 index 87b77b4..0000000 --- a/node_modules/lodash/fp/camelCase.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('camelCase', require('../camelCase'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/capitalize.js b/node_modules/lodash/fp/capitalize.js deleted file mode 100644 index cac74e1..0000000 --- a/node_modules/lodash/fp/capitalize.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('capitalize', require('../capitalize'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/castArray.js b/node_modules/lodash/fp/castArray.js deleted file mode 100644 index 8681c09..0000000 --- a/node_modules/lodash/fp/castArray.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('castArray', require('../castArray')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/ceil.js b/node_modules/lodash/fp/ceil.js deleted file mode 100644 index f416b72..0000000 --- a/node_modules/lodash/fp/ceil.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('ceil', require('../ceil')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/chain.js b/node_modules/lodash/fp/chain.js deleted file mode 100644 index 604fe39..0000000 --- a/node_modules/lodash/fp/chain.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('chain', require('../chain'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/chunk.js b/node_modules/lodash/fp/chunk.js deleted file mode 100644 index 871ab08..0000000 --- a/node_modules/lodash/fp/chunk.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('chunk', require('../chunk')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/clamp.js b/node_modules/lodash/fp/clamp.js deleted file mode 100644 index 3b06c01..0000000 --- a/node_modules/lodash/fp/clamp.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('clamp', require('../clamp')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/clone.js b/node_modules/lodash/fp/clone.js deleted file mode 100644 index cadb59c..0000000 --- a/node_modules/lodash/fp/clone.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('clone', require('../clone'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/cloneDeep.js b/node_modules/lodash/fp/cloneDeep.js deleted file mode 100644 index a6107aa..0000000 --- a/node_modules/lodash/fp/cloneDeep.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/cloneDeepWith.js b/node_modules/lodash/fp/cloneDeepWith.js deleted file mode 100644 index 6f01e44..0000000 --- a/node_modules/lodash/fp/cloneDeepWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('cloneDeepWith', require('../cloneDeepWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/cloneWith.js b/node_modules/lodash/fp/cloneWith.js deleted file mode 100644 index aa88578..0000000 --- a/node_modules/lodash/fp/cloneWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('cloneWith', require('../cloneWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/collection.js b/node_modules/lodash/fp/collection.js deleted file mode 100644 index fc8b328..0000000 --- a/node_modules/lodash/fp/collection.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../collection')); diff --git a/node_modules/lodash/fp/commit.js b/node_modules/lodash/fp/commit.js deleted file mode 100644 index 130a894..0000000 --- a/node_modules/lodash/fp/commit.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('commit', require('../commit'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/compact.js b/node_modules/lodash/fp/compact.js deleted file mode 100644 index ce8f7a1..0000000 --- a/node_modules/lodash/fp/compact.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('compact', require('../compact'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/complement.js b/node_modules/lodash/fp/complement.js deleted file mode 100644 index 93eb462..0000000 --- a/node_modules/lodash/fp/complement.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./negate'); diff --git a/node_modules/lodash/fp/compose.js b/node_modules/lodash/fp/compose.js deleted file mode 100644 index 1954e94..0000000 --- a/node_modules/lodash/fp/compose.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./flowRight'); diff --git a/node_modules/lodash/fp/concat.js b/node_modules/lodash/fp/concat.js deleted file mode 100644 index e59346a..0000000 --- a/node_modules/lodash/fp/concat.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('concat', require('../concat')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/cond.js b/node_modules/lodash/fp/cond.js deleted file mode 100644 index 6a0120e..0000000 --- a/node_modules/lodash/fp/cond.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('cond', require('../cond'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/conforms.js b/node_modules/lodash/fp/conforms.js deleted file mode 100644 index 3247f64..0000000 --- a/node_modules/lodash/fp/conforms.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./conformsTo'); diff --git a/node_modules/lodash/fp/conformsTo.js b/node_modules/lodash/fp/conformsTo.js deleted file mode 100644 index aa7f41e..0000000 --- a/node_modules/lodash/fp/conformsTo.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('conformsTo', require('../conformsTo')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/constant.js b/node_modules/lodash/fp/constant.js deleted file mode 100644 index 9e406fc..0000000 --- a/node_modules/lodash/fp/constant.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('constant', require('../constant'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/contains.js b/node_modules/lodash/fp/contains.js deleted file mode 100644 index 594722a..0000000 --- a/node_modules/lodash/fp/contains.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./includes'); diff --git a/node_modules/lodash/fp/convert.js b/node_modules/lodash/fp/convert.js deleted file mode 100644 index 4795dc4..0000000 --- a/node_modules/lodash/fp/convert.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseConvert = require('./_baseConvert'), - util = require('./_util'); - -/** - * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last - * version with conversion `options` applied. If `name` is an object its methods - * will be converted. - * - * @param {string} name The name of the function to wrap. - * @param {Function} [func] The function to wrap. - * @param {Object} [options] The options object. See `baseConvert` for more details. - * @returns {Function|Object} Returns the converted function or object. - */ -function convert(name, func, options) { - return baseConvert(util, name, func, options); -} - -module.exports = convert; diff --git a/node_modules/lodash/fp/countBy.js b/node_modules/lodash/fp/countBy.js deleted file mode 100644 index dfa4643..0000000 --- a/node_modules/lodash/fp/countBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('countBy', require('../countBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/create.js b/node_modules/lodash/fp/create.js deleted file mode 100644 index 752025f..0000000 --- a/node_modules/lodash/fp/create.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('create', require('../create')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/curry.js b/node_modules/lodash/fp/curry.js deleted file mode 100644 index b0b4168..0000000 --- a/node_modules/lodash/fp/curry.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('curry', require('../curry')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/curryN.js b/node_modules/lodash/fp/curryN.js deleted file mode 100644 index 2ae7d00..0000000 --- a/node_modules/lodash/fp/curryN.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('curryN', require('../curry')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/curryRight.js b/node_modules/lodash/fp/curryRight.js deleted file mode 100644 index cb619eb..0000000 --- a/node_modules/lodash/fp/curryRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('curryRight', require('../curryRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/curryRightN.js b/node_modules/lodash/fp/curryRightN.js deleted file mode 100644 index 2495afc..0000000 --- a/node_modules/lodash/fp/curryRightN.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('curryRightN', require('../curryRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/date.js b/node_modules/lodash/fp/date.js deleted file mode 100644 index 82cb952..0000000 --- a/node_modules/lodash/fp/date.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../date')); diff --git a/node_modules/lodash/fp/debounce.js b/node_modules/lodash/fp/debounce.js deleted file mode 100644 index 2612229..0000000 --- a/node_modules/lodash/fp/debounce.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('debounce', require('../debounce')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/deburr.js b/node_modules/lodash/fp/deburr.js deleted file mode 100644 index 96463ab..0000000 --- a/node_modules/lodash/fp/deburr.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('deburr', require('../deburr'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/defaultTo.js b/node_modules/lodash/fp/defaultTo.js deleted file mode 100644 index d6b52a4..0000000 --- a/node_modules/lodash/fp/defaultTo.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('defaultTo', require('../defaultTo')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/defaults.js b/node_modules/lodash/fp/defaults.js deleted file mode 100644 index e1a8e6e..0000000 --- a/node_modules/lodash/fp/defaults.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('defaults', require('../defaults')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/defaultsAll.js b/node_modules/lodash/fp/defaultsAll.js deleted file mode 100644 index 238fcc3..0000000 --- a/node_modules/lodash/fp/defaultsAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('defaultsAll', require('../defaults')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/defaultsDeep.js b/node_modules/lodash/fp/defaultsDeep.js deleted file mode 100644 index 1f172ff..0000000 --- a/node_modules/lodash/fp/defaultsDeep.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('defaultsDeep', require('../defaultsDeep')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/defaultsDeepAll.js b/node_modules/lodash/fp/defaultsDeepAll.js deleted file mode 100644 index 6835f2f..0000000 --- a/node_modules/lodash/fp/defaultsDeepAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('defaultsDeepAll', require('../defaultsDeep')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/defer.js b/node_modules/lodash/fp/defer.js deleted file mode 100644 index ec7990f..0000000 --- a/node_modules/lodash/fp/defer.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('defer', require('../defer'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/delay.js b/node_modules/lodash/fp/delay.js deleted file mode 100644 index 556dbd5..0000000 --- a/node_modules/lodash/fp/delay.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('delay', require('../delay')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/difference.js b/node_modules/lodash/fp/difference.js deleted file mode 100644 index 2d03765..0000000 --- a/node_modules/lodash/fp/difference.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('difference', require('../difference')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/differenceBy.js b/node_modules/lodash/fp/differenceBy.js deleted file mode 100644 index 2f91491..0000000 --- a/node_modules/lodash/fp/differenceBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('differenceBy', require('../differenceBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/differenceWith.js b/node_modules/lodash/fp/differenceWith.js deleted file mode 100644 index bcf5ad2..0000000 --- a/node_modules/lodash/fp/differenceWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('differenceWith', require('../differenceWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/dissoc.js b/node_modules/lodash/fp/dissoc.js deleted file mode 100644 index 7ec7be1..0000000 --- a/node_modules/lodash/fp/dissoc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./unset'); diff --git a/node_modules/lodash/fp/dissocPath.js b/node_modules/lodash/fp/dissocPath.js deleted file mode 100644 index 7ec7be1..0000000 --- a/node_modules/lodash/fp/dissocPath.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./unset'); diff --git a/node_modules/lodash/fp/divide.js b/node_modules/lodash/fp/divide.js deleted file mode 100644 index 82048c5..0000000 --- a/node_modules/lodash/fp/divide.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('divide', require('../divide')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/drop.js b/node_modules/lodash/fp/drop.js deleted file mode 100644 index 2fa9b4f..0000000 --- a/node_modules/lodash/fp/drop.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('drop', require('../drop')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/dropLast.js b/node_modules/lodash/fp/dropLast.js deleted file mode 100644 index 174e525..0000000 --- a/node_modules/lodash/fp/dropLast.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dropRight'); diff --git a/node_modules/lodash/fp/dropLastWhile.js b/node_modules/lodash/fp/dropLastWhile.js deleted file mode 100644 index be2a9d2..0000000 --- a/node_modules/lodash/fp/dropLastWhile.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dropRightWhile'); diff --git a/node_modules/lodash/fp/dropRight.js b/node_modules/lodash/fp/dropRight.js deleted file mode 100644 index e98881f..0000000 --- a/node_modules/lodash/fp/dropRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('dropRight', require('../dropRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/dropRightWhile.js b/node_modules/lodash/fp/dropRightWhile.js deleted file mode 100644 index cacaa70..0000000 --- a/node_modules/lodash/fp/dropRightWhile.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('dropRightWhile', require('../dropRightWhile')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/dropWhile.js b/node_modules/lodash/fp/dropWhile.js deleted file mode 100644 index 285f864..0000000 --- a/node_modules/lodash/fp/dropWhile.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('dropWhile', require('../dropWhile')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/each.js b/node_modules/lodash/fp/each.js deleted file mode 100644 index 8800f42..0000000 --- a/node_modules/lodash/fp/each.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./forEach'); diff --git a/node_modules/lodash/fp/eachRight.js b/node_modules/lodash/fp/eachRight.js deleted file mode 100644 index 3252b2a..0000000 --- a/node_modules/lodash/fp/eachRight.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./forEachRight'); diff --git a/node_modules/lodash/fp/endsWith.js b/node_modules/lodash/fp/endsWith.js deleted file mode 100644 index 17dc2a4..0000000 --- a/node_modules/lodash/fp/endsWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('endsWith', require('../endsWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/entries.js b/node_modules/lodash/fp/entries.js deleted file mode 100644 index 7a88df2..0000000 --- a/node_modules/lodash/fp/entries.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./toPairs'); diff --git a/node_modules/lodash/fp/entriesIn.js b/node_modules/lodash/fp/entriesIn.js deleted file mode 100644 index f6c6331..0000000 --- a/node_modules/lodash/fp/entriesIn.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./toPairsIn'); diff --git a/node_modules/lodash/fp/eq.js b/node_modules/lodash/fp/eq.js deleted file mode 100644 index 9a3d21b..0000000 --- a/node_modules/lodash/fp/eq.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('eq', require('../eq')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/equals.js b/node_modules/lodash/fp/equals.js deleted file mode 100644 index e6a5ce0..0000000 --- a/node_modules/lodash/fp/equals.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./isEqual'); diff --git a/node_modules/lodash/fp/escape.js b/node_modules/lodash/fp/escape.js deleted file mode 100644 index 52c1fbb..0000000 --- a/node_modules/lodash/fp/escape.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('escape', require('../escape'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/escapeRegExp.js b/node_modules/lodash/fp/escapeRegExp.js deleted file mode 100644 index 369b2ef..0000000 --- a/node_modules/lodash/fp/escapeRegExp.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/every.js b/node_modules/lodash/fp/every.js deleted file mode 100644 index 95c2776..0000000 --- a/node_modules/lodash/fp/every.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('every', require('../every')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/extend.js b/node_modules/lodash/fp/extend.js deleted file mode 100644 index e00166c..0000000 --- a/node_modules/lodash/fp/extend.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./assignIn'); diff --git a/node_modules/lodash/fp/extendAll.js b/node_modules/lodash/fp/extendAll.js deleted file mode 100644 index cc55b64..0000000 --- a/node_modules/lodash/fp/extendAll.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./assignInAll'); diff --git a/node_modules/lodash/fp/extendAllWith.js b/node_modules/lodash/fp/extendAllWith.js deleted file mode 100644 index 6679d20..0000000 --- a/node_modules/lodash/fp/extendAllWith.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./assignInAllWith'); diff --git a/node_modules/lodash/fp/extendWith.js b/node_modules/lodash/fp/extendWith.js deleted file mode 100644 index dbdcb3b..0000000 --- a/node_modules/lodash/fp/extendWith.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./assignInWith'); diff --git a/node_modules/lodash/fp/fill.js b/node_modules/lodash/fp/fill.js deleted file mode 100644 index b2d47e8..0000000 --- a/node_modules/lodash/fp/fill.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('fill', require('../fill')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/filter.js b/node_modules/lodash/fp/filter.js deleted file mode 100644 index 796d501..0000000 --- a/node_modules/lodash/fp/filter.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('filter', require('../filter')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/find.js b/node_modules/lodash/fp/find.js deleted file mode 100644 index f805d33..0000000 --- a/node_modules/lodash/fp/find.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('find', require('../find')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/findFrom.js b/node_modules/lodash/fp/findFrom.js deleted file mode 100644 index da8275e..0000000 --- a/node_modules/lodash/fp/findFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findFrom', require('../find')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/findIndex.js b/node_modules/lodash/fp/findIndex.js deleted file mode 100644 index 8c15fd1..0000000 --- a/node_modules/lodash/fp/findIndex.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findIndex', require('../findIndex')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/findIndexFrom.js b/node_modules/lodash/fp/findIndexFrom.js deleted file mode 100644 index 32e98cb..0000000 --- a/node_modules/lodash/fp/findIndexFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findIndexFrom', require('../findIndex')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/findKey.js b/node_modules/lodash/fp/findKey.js deleted file mode 100644 index 475bcfa..0000000 --- a/node_modules/lodash/fp/findKey.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findKey', require('../findKey')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/findLast.js b/node_modules/lodash/fp/findLast.js deleted file mode 100644 index 093fe94..0000000 --- a/node_modules/lodash/fp/findLast.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findLast', require('../findLast')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/findLastFrom.js b/node_modules/lodash/fp/findLastFrom.js deleted file mode 100644 index 76c38fb..0000000 --- a/node_modules/lodash/fp/findLastFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findLastFrom', require('../findLast')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/findLastIndex.js b/node_modules/lodash/fp/findLastIndex.js deleted file mode 100644 index 36986df..0000000 --- a/node_modules/lodash/fp/findLastIndex.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findLastIndex', require('../findLastIndex')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/findLastIndexFrom.js b/node_modules/lodash/fp/findLastIndexFrom.js deleted file mode 100644 index 34c8176..0000000 --- a/node_modules/lodash/fp/findLastIndexFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findLastIndexFrom', require('../findLastIndex')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/findLastKey.js b/node_modules/lodash/fp/findLastKey.js deleted file mode 100644 index 5f81b60..0000000 --- a/node_modules/lodash/fp/findLastKey.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findLastKey', require('../findLastKey')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/first.js b/node_modules/lodash/fp/first.js deleted file mode 100644 index 53f4ad1..0000000 --- a/node_modules/lodash/fp/first.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./head'); diff --git a/node_modules/lodash/fp/flatMap.js b/node_modules/lodash/fp/flatMap.js deleted file mode 100644 index d01dc4d..0000000 --- a/node_modules/lodash/fp/flatMap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flatMap', require('../flatMap')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/flatMapDeep.js b/node_modules/lodash/fp/flatMapDeep.js deleted file mode 100644 index 569c42e..0000000 --- a/node_modules/lodash/fp/flatMapDeep.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flatMapDeep', require('../flatMapDeep')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/flatMapDepth.js b/node_modules/lodash/fp/flatMapDepth.js deleted file mode 100644 index 6eb68fd..0000000 --- a/node_modules/lodash/fp/flatMapDepth.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flatMapDepth', require('../flatMapDepth')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/flatten.js b/node_modules/lodash/fp/flatten.js deleted file mode 100644 index 30425d8..0000000 --- a/node_modules/lodash/fp/flatten.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flatten', require('../flatten'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/flattenDeep.js b/node_modules/lodash/fp/flattenDeep.js deleted file mode 100644 index aed5db2..0000000 --- a/node_modules/lodash/fp/flattenDeep.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flattenDeep', require('../flattenDeep'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/flattenDepth.js b/node_modules/lodash/fp/flattenDepth.js deleted file mode 100644 index ad65e37..0000000 --- a/node_modules/lodash/fp/flattenDepth.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flattenDepth', require('../flattenDepth')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/flip.js b/node_modules/lodash/fp/flip.js deleted file mode 100644 index 0547e7b..0000000 --- a/node_modules/lodash/fp/flip.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flip', require('../flip'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/floor.js b/node_modules/lodash/fp/floor.js deleted file mode 100644 index a6cf335..0000000 --- a/node_modules/lodash/fp/floor.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('floor', require('../floor')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/flow.js b/node_modules/lodash/fp/flow.js deleted file mode 100644 index cd83677..0000000 --- a/node_modules/lodash/fp/flow.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flow', require('../flow')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/flowRight.js b/node_modules/lodash/fp/flowRight.js deleted file mode 100644 index 972a5b9..0000000 --- a/node_modules/lodash/fp/flowRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flowRight', require('../flowRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/forEach.js b/node_modules/lodash/fp/forEach.js deleted file mode 100644 index 2f49452..0000000 --- a/node_modules/lodash/fp/forEach.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('forEach', require('../forEach')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/forEachRight.js b/node_modules/lodash/fp/forEachRight.js deleted file mode 100644 index 3ff9733..0000000 --- a/node_modules/lodash/fp/forEachRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('forEachRight', require('../forEachRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/forIn.js b/node_modules/lodash/fp/forIn.js deleted file mode 100644 index 9341749..0000000 --- a/node_modules/lodash/fp/forIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('forIn', require('../forIn')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/forInRight.js b/node_modules/lodash/fp/forInRight.js deleted file mode 100644 index cecf8bb..0000000 --- a/node_modules/lodash/fp/forInRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('forInRight', require('../forInRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/forOwn.js b/node_modules/lodash/fp/forOwn.js deleted file mode 100644 index 246449e..0000000 --- a/node_modules/lodash/fp/forOwn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('forOwn', require('../forOwn')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/forOwnRight.js b/node_modules/lodash/fp/forOwnRight.js deleted file mode 100644 index c5e826e..0000000 --- a/node_modules/lodash/fp/forOwnRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('forOwnRight', require('../forOwnRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/fromPairs.js b/node_modules/lodash/fp/fromPairs.js deleted file mode 100644 index f8cc596..0000000 --- a/node_modules/lodash/fp/fromPairs.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('fromPairs', require('../fromPairs')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/function.js b/node_modules/lodash/fp/function.js deleted file mode 100644 index dfe69b1..0000000 --- a/node_modules/lodash/fp/function.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../function')); diff --git a/node_modules/lodash/fp/functions.js b/node_modules/lodash/fp/functions.js deleted file mode 100644 index 09d1bb1..0000000 --- a/node_modules/lodash/fp/functions.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('functions', require('../functions'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/functionsIn.js b/node_modules/lodash/fp/functionsIn.js deleted file mode 100644 index 2cfeb83..0000000 --- a/node_modules/lodash/fp/functionsIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('functionsIn', require('../functionsIn'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/get.js b/node_modules/lodash/fp/get.js deleted file mode 100644 index 6d3a328..0000000 --- a/node_modules/lodash/fp/get.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('get', require('../get')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/getOr.js b/node_modules/lodash/fp/getOr.js deleted file mode 100644 index 7dbf771..0000000 --- a/node_modules/lodash/fp/getOr.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('getOr', require('../get')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/groupBy.js b/node_modules/lodash/fp/groupBy.js deleted file mode 100644 index fc0bc78..0000000 --- a/node_modules/lodash/fp/groupBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('groupBy', require('../groupBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/gt.js b/node_modules/lodash/fp/gt.js deleted file mode 100644 index 9e57c80..0000000 --- a/node_modules/lodash/fp/gt.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('gt', require('../gt')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/gte.js b/node_modules/lodash/fp/gte.js deleted file mode 100644 index 4584786..0000000 --- a/node_modules/lodash/fp/gte.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('gte', require('../gte')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/has.js b/node_modules/lodash/fp/has.js deleted file mode 100644 index b901298..0000000 --- a/node_modules/lodash/fp/has.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('has', require('../has')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/hasIn.js b/node_modules/lodash/fp/hasIn.js deleted file mode 100644 index b3c3d1a..0000000 --- a/node_modules/lodash/fp/hasIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('hasIn', require('../hasIn')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/head.js b/node_modules/lodash/fp/head.js deleted file mode 100644 index 2694f0a..0000000 --- a/node_modules/lodash/fp/head.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('head', require('../head'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/identical.js b/node_modules/lodash/fp/identical.js deleted file mode 100644 index 85563f4..0000000 --- a/node_modules/lodash/fp/identical.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./eq'); diff --git a/node_modules/lodash/fp/identity.js b/node_modules/lodash/fp/identity.js deleted file mode 100644 index 096415a..0000000 --- a/node_modules/lodash/fp/identity.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('identity', require('../identity'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/inRange.js b/node_modules/lodash/fp/inRange.js deleted file mode 100644 index 202d940..0000000 --- a/node_modules/lodash/fp/inRange.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('inRange', require('../inRange')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/includes.js b/node_modules/lodash/fp/includes.js deleted file mode 100644 index 1146780..0000000 --- a/node_modules/lodash/fp/includes.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('includes', require('../includes')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/includesFrom.js b/node_modules/lodash/fp/includesFrom.js deleted file mode 100644 index 683afdb..0000000 --- a/node_modules/lodash/fp/includesFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('includesFrom', require('../includes')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/indexBy.js b/node_modules/lodash/fp/indexBy.js deleted file mode 100644 index 7e64bc0..0000000 --- a/node_modules/lodash/fp/indexBy.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./keyBy'); diff --git a/node_modules/lodash/fp/indexOf.js b/node_modules/lodash/fp/indexOf.js deleted file mode 100644 index 524658e..0000000 --- a/node_modules/lodash/fp/indexOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('indexOf', require('../indexOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/indexOfFrom.js b/node_modules/lodash/fp/indexOfFrom.js deleted file mode 100644 index d99c822..0000000 --- a/node_modules/lodash/fp/indexOfFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('indexOfFrom', require('../indexOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/init.js b/node_modules/lodash/fp/init.js deleted file mode 100644 index 2f88d8b..0000000 --- a/node_modules/lodash/fp/init.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./initial'); diff --git a/node_modules/lodash/fp/initial.js b/node_modules/lodash/fp/initial.js deleted file mode 100644 index b732ba0..0000000 --- a/node_modules/lodash/fp/initial.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('initial', require('../initial'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/intersection.js b/node_modules/lodash/fp/intersection.js deleted file mode 100644 index 52936d5..0000000 --- a/node_modules/lodash/fp/intersection.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('intersection', require('../intersection')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/intersectionBy.js b/node_modules/lodash/fp/intersectionBy.js deleted file mode 100644 index 72629f2..0000000 --- a/node_modules/lodash/fp/intersectionBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('intersectionBy', require('../intersectionBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/intersectionWith.js b/node_modules/lodash/fp/intersectionWith.js deleted file mode 100644 index e064f40..0000000 --- a/node_modules/lodash/fp/intersectionWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('intersectionWith', require('../intersectionWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/invert.js b/node_modules/lodash/fp/invert.js deleted file mode 100644 index 2d5d1f0..0000000 --- a/node_modules/lodash/fp/invert.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('invert', require('../invert')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/invertBy.js b/node_modules/lodash/fp/invertBy.js deleted file mode 100644 index 63ca97e..0000000 --- a/node_modules/lodash/fp/invertBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('invertBy', require('../invertBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/invertObj.js b/node_modules/lodash/fp/invertObj.js deleted file mode 100644 index f1d842e..0000000 --- a/node_modules/lodash/fp/invertObj.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./invert'); diff --git a/node_modules/lodash/fp/invoke.js b/node_modules/lodash/fp/invoke.js deleted file mode 100644 index fcf17f0..0000000 --- a/node_modules/lodash/fp/invoke.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('invoke', require('../invoke')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/invokeArgs.js b/node_modules/lodash/fp/invokeArgs.js deleted file mode 100644 index d3f2953..0000000 --- a/node_modules/lodash/fp/invokeArgs.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('invokeArgs', require('../invoke')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/invokeArgsMap.js b/node_modules/lodash/fp/invokeArgsMap.js deleted file mode 100644 index eaa9f84..0000000 --- a/node_modules/lodash/fp/invokeArgsMap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('invokeArgsMap', require('../invokeMap')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/invokeMap.js b/node_modules/lodash/fp/invokeMap.js deleted file mode 100644 index 6515fd7..0000000 --- a/node_modules/lodash/fp/invokeMap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('invokeMap', require('../invokeMap')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isArguments.js b/node_modules/lodash/fp/isArguments.js deleted file mode 100644 index 1d93c9e..0000000 --- a/node_modules/lodash/fp/isArguments.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isArguments', require('../isArguments'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isArray.js b/node_modules/lodash/fp/isArray.js deleted file mode 100644 index ba7ade8..0000000 --- a/node_modules/lodash/fp/isArray.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isArray', require('../isArray'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isArrayBuffer.js b/node_modules/lodash/fp/isArrayBuffer.js deleted file mode 100644 index 5088513..0000000 --- a/node_modules/lodash/fp/isArrayBuffer.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isArrayBuffer', require('../isArrayBuffer'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isArrayLike.js b/node_modules/lodash/fp/isArrayLike.js deleted file mode 100644 index 8f1856b..0000000 --- a/node_modules/lodash/fp/isArrayLike.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isArrayLike', require('../isArrayLike'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isArrayLikeObject.js b/node_modules/lodash/fp/isArrayLikeObject.js deleted file mode 100644 index 2108498..0000000 --- a/node_modules/lodash/fp/isArrayLikeObject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isArrayLikeObject', require('../isArrayLikeObject'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isBoolean.js b/node_modules/lodash/fp/isBoolean.js deleted file mode 100644 index 9339f75..0000000 --- a/node_modules/lodash/fp/isBoolean.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isBoolean', require('../isBoolean'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isBuffer.js b/node_modules/lodash/fp/isBuffer.js deleted file mode 100644 index e60b123..0000000 --- a/node_modules/lodash/fp/isBuffer.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isBuffer', require('../isBuffer'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isDate.js b/node_modules/lodash/fp/isDate.js deleted file mode 100644 index dc41d08..0000000 --- a/node_modules/lodash/fp/isDate.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isDate', require('../isDate'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isElement.js b/node_modules/lodash/fp/isElement.js deleted file mode 100644 index 18ee039..0000000 --- a/node_modules/lodash/fp/isElement.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isElement', require('../isElement'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isEmpty.js b/node_modules/lodash/fp/isEmpty.js deleted file mode 100644 index 0f4ae84..0000000 --- a/node_modules/lodash/fp/isEmpty.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isEmpty', require('../isEmpty'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isEqual.js b/node_modules/lodash/fp/isEqual.js deleted file mode 100644 index 4138386..0000000 --- a/node_modules/lodash/fp/isEqual.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isEqual', require('../isEqual')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isEqualWith.js b/node_modules/lodash/fp/isEqualWith.js deleted file mode 100644 index 029ff5c..0000000 --- a/node_modules/lodash/fp/isEqualWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isEqualWith', require('../isEqualWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isError.js b/node_modules/lodash/fp/isError.js deleted file mode 100644 index 3dfd81c..0000000 --- a/node_modules/lodash/fp/isError.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isError', require('../isError'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isFinite.js b/node_modules/lodash/fp/isFinite.js deleted file mode 100644 index 0b647b8..0000000 --- a/node_modules/lodash/fp/isFinite.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isFinite', require('../isFinite'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isFunction.js b/node_modules/lodash/fp/isFunction.js deleted file mode 100644 index ff8e5c4..0000000 --- a/node_modules/lodash/fp/isFunction.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isFunction', require('../isFunction'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isInteger.js b/node_modules/lodash/fp/isInteger.js deleted file mode 100644 index 67af4ff..0000000 --- a/node_modules/lodash/fp/isInteger.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isInteger', require('../isInteger'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isLength.js b/node_modules/lodash/fp/isLength.js deleted file mode 100644 index fc101c5..0000000 --- a/node_modules/lodash/fp/isLength.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isLength', require('../isLength'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isMap.js b/node_modules/lodash/fp/isMap.js deleted file mode 100644 index a209aa6..0000000 --- a/node_modules/lodash/fp/isMap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isMap', require('../isMap'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isMatch.js b/node_modules/lodash/fp/isMatch.js deleted file mode 100644 index 6264ca1..0000000 --- a/node_modules/lodash/fp/isMatch.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isMatch', require('../isMatch')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isMatchWith.js b/node_modules/lodash/fp/isMatchWith.js deleted file mode 100644 index d95f319..0000000 --- a/node_modules/lodash/fp/isMatchWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isMatchWith', require('../isMatchWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isNaN.js b/node_modules/lodash/fp/isNaN.js deleted file mode 100644 index 66a978f..0000000 --- a/node_modules/lodash/fp/isNaN.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isNaN', require('../isNaN'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isNative.js b/node_modules/lodash/fp/isNative.js deleted file mode 100644 index 3d775ba..0000000 --- a/node_modules/lodash/fp/isNative.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isNative', require('../isNative'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isNil.js b/node_modules/lodash/fp/isNil.js deleted file mode 100644 index 5952c02..0000000 --- a/node_modules/lodash/fp/isNil.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isNil', require('../isNil'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isNull.js b/node_modules/lodash/fp/isNull.js deleted file mode 100644 index f201a35..0000000 --- a/node_modules/lodash/fp/isNull.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isNull', require('../isNull'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isNumber.js b/node_modules/lodash/fp/isNumber.js deleted file mode 100644 index a2b5fa0..0000000 --- a/node_modules/lodash/fp/isNumber.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isNumber', require('../isNumber'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isObject.js b/node_modules/lodash/fp/isObject.js deleted file mode 100644 index 231ace0..0000000 --- a/node_modules/lodash/fp/isObject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isObject', require('../isObject'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isObjectLike.js b/node_modules/lodash/fp/isObjectLike.js deleted file mode 100644 index f16082e..0000000 --- a/node_modules/lodash/fp/isObjectLike.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isObjectLike', require('../isObjectLike'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isPlainObject.js b/node_modules/lodash/fp/isPlainObject.js deleted file mode 100644 index b5bea90..0000000 --- a/node_modules/lodash/fp/isPlainObject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isPlainObject', require('../isPlainObject'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isRegExp.js b/node_modules/lodash/fp/isRegExp.js deleted file mode 100644 index 12a1a3d..0000000 --- a/node_modules/lodash/fp/isRegExp.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isRegExp', require('../isRegExp'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isSafeInteger.js b/node_modules/lodash/fp/isSafeInteger.js deleted file mode 100644 index 7230f55..0000000 --- a/node_modules/lodash/fp/isSafeInteger.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isSafeInteger', require('../isSafeInteger'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isSet.js b/node_modules/lodash/fp/isSet.js deleted file mode 100644 index 35c01f6..0000000 --- a/node_modules/lodash/fp/isSet.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isSet', require('../isSet'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isString.js b/node_modules/lodash/fp/isString.js deleted file mode 100644 index 1fd0679..0000000 --- a/node_modules/lodash/fp/isString.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isString', require('../isString'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isSymbol.js b/node_modules/lodash/fp/isSymbol.js deleted file mode 100644 index 3867695..0000000 --- a/node_modules/lodash/fp/isSymbol.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isSymbol', require('../isSymbol'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isTypedArray.js b/node_modules/lodash/fp/isTypedArray.js deleted file mode 100644 index 8567953..0000000 --- a/node_modules/lodash/fp/isTypedArray.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isTypedArray', require('../isTypedArray'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isUndefined.js b/node_modules/lodash/fp/isUndefined.js deleted file mode 100644 index ddbca31..0000000 --- a/node_modules/lodash/fp/isUndefined.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isUndefined', require('../isUndefined'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isWeakMap.js b/node_modules/lodash/fp/isWeakMap.js deleted file mode 100644 index ef60c61..0000000 --- a/node_modules/lodash/fp/isWeakMap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isWeakMap', require('../isWeakMap'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/isWeakSet.js b/node_modules/lodash/fp/isWeakSet.js deleted file mode 100644 index c99bfaa..0000000 --- a/node_modules/lodash/fp/isWeakSet.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isWeakSet', require('../isWeakSet'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/iteratee.js b/node_modules/lodash/fp/iteratee.js deleted file mode 100644 index 9f0f717..0000000 --- a/node_modules/lodash/fp/iteratee.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('iteratee', require('../iteratee')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/join.js b/node_modules/lodash/fp/join.js deleted file mode 100644 index a220e00..0000000 --- a/node_modules/lodash/fp/join.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('join', require('../join')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/juxt.js b/node_modules/lodash/fp/juxt.js deleted file mode 100644 index f71e04e..0000000 --- a/node_modules/lodash/fp/juxt.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./over'); diff --git a/node_modules/lodash/fp/kebabCase.js b/node_modules/lodash/fp/kebabCase.js deleted file mode 100644 index 60737f1..0000000 --- a/node_modules/lodash/fp/kebabCase.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('kebabCase', require('../kebabCase'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/keyBy.js b/node_modules/lodash/fp/keyBy.js deleted file mode 100644 index 9a6a85d..0000000 --- a/node_modules/lodash/fp/keyBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('keyBy', require('../keyBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/keys.js b/node_modules/lodash/fp/keys.js deleted file mode 100644 index e12bb07..0000000 --- a/node_modules/lodash/fp/keys.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('keys', require('../keys'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/keysIn.js b/node_modules/lodash/fp/keysIn.js deleted file mode 100644 index f3eb36a..0000000 --- a/node_modules/lodash/fp/keysIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('keysIn', require('../keysIn'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/lang.js b/node_modules/lodash/fp/lang.js deleted file mode 100644 index 08cc9c1..0000000 --- a/node_modules/lodash/fp/lang.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../lang')); diff --git a/node_modules/lodash/fp/last.js b/node_modules/lodash/fp/last.js deleted file mode 100644 index 0f71699..0000000 --- a/node_modules/lodash/fp/last.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('last', require('../last'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/lastIndexOf.js b/node_modules/lodash/fp/lastIndexOf.js deleted file mode 100644 index ddf39c3..0000000 --- a/node_modules/lodash/fp/lastIndexOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('lastIndexOf', require('../lastIndexOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/lastIndexOfFrom.js b/node_modules/lodash/fp/lastIndexOfFrom.js deleted file mode 100644 index 1ff6a0b..0000000 --- a/node_modules/lodash/fp/lastIndexOfFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('lastIndexOfFrom', require('../lastIndexOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/lowerCase.js b/node_modules/lodash/fp/lowerCase.js deleted file mode 100644 index ea64bc1..0000000 --- a/node_modules/lodash/fp/lowerCase.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('lowerCase', require('../lowerCase'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/lowerFirst.js b/node_modules/lodash/fp/lowerFirst.js deleted file mode 100644 index 539720a..0000000 --- a/node_modules/lodash/fp/lowerFirst.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('lowerFirst', require('../lowerFirst'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/lt.js b/node_modules/lodash/fp/lt.js deleted file mode 100644 index a31d21e..0000000 --- a/node_modules/lodash/fp/lt.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('lt', require('../lt')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/lte.js b/node_modules/lodash/fp/lte.js deleted file mode 100644 index d795d10..0000000 --- a/node_modules/lodash/fp/lte.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('lte', require('../lte')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/map.js b/node_modules/lodash/fp/map.js deleted file mode 100644 index cf98794..0000000 --- a/node_modules/lodash/fp/map.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('map', require('../map')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/mapKeys.js b/node_modules/lodash/fp/mapKeys.js deleted file mode 100644 index 1684587..0000000 --- a/node_modules/lodash/fp/mapKeys.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mapKeys', require('../mapKeys')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/mapValues.js b/node_modules/lodash/fp/mapValues.js deleted file mode 100644 index 4004972..0000000 --- a/node_modules/lodash/fp/mapValues.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mapValues', require('../mapValues')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/matches.js b/node_modules/lodash/fp/matches.js deleted file mode 100644 index 29d1e1e..0000000 --- a/node_modules/lodash/fp/matches.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./isMatch'); diff --git a/node_modules/lodash/fp/matchesProperty.js b/node_modules/lodash/fp/matchesProperty.js deleted file mode 100644 index 4575bd2..0000000 --- a/node_modules/lodash/fp/matchesProperty.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('matchesProperty', require('../matchesProperty')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/math.js b/node_modules/lodash/fp/math.js deleted file mode 100644 index e8f50f7..0000000 --- a/node_modules/lodash/fp/math.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../math')); diff --git a/node_modules/lodash/fp/max.js b/node_modules/lodash/fp/max.js deleted file mode 100644 index a66acac..0000000 --- a/node_modules/lodash/fp/max.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('max', require('../max'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/maxBy.js b/node_modules/lodash/fp/maxBy.js deleted file mode 100644 index d083fd6..0000000 --- a/node_modules/lodash/fp/maxBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('maxBy', require('../maxBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/mean.js b/node_modules/lodash/fp/mean.js deleted file mode 100644 index 3117246..0000000 --- a/node_modules/lodash/fp/mean.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mean', require('../mean'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/meanBy.js b/node_modules/lodash/fp/meanBy.js deleted file mode 100644 index 556f25e..0000000 --- a/node_modules/lodash/fp/meanBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('meanBy', require('../meanBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/memoize.js b/node_modules/lodash/fp/memoize.js deleted file mode 100644 index 638eec6..0000000 --- a/node_modules/lodash/fp/memoize.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('memoize', require('../memoize')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/merge.js b/node_modules/lodash/fp/merge.js deleted file mode 100644 index ac66add..0000000 --- a/node_modules/lodash/fp/merge.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('merge', require('../merge')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/mergeAll.js b/node_modules/lodash/fp/mergeAll.js deleted file mode 100644 index a3674d6..0000000 --- a/node_modules/lodash/fp/mergeAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mergeAll', require('../merge')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/mergeAllWith.js b/node_modules/lodash/fp/mergeAllWith.js deleted file mode 100644 index 4bd4206..0000000 --- a/node_modules/lodash/fp/mergeAllWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mergeAllWith', require('../mergeWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/mergeWith.js b/node_modules/lodash/fp/mergeWith.js deleted file mode 100644 index 00d44d5..0000000 --- a/node_modules/lodash/fp/mergeWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mergeWith', require('../mergeWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/method.js b/node_modules/lodash/fp/method.js deleted file mode 100644 index f4060c6..0000000 --- a/node_modules/lodash/fp/method.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('method', require('../method')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/methodOf.js b/node_modules/lodash/fp/methodOf.js deleted file mode 100644 index 6139905..0000000 --- a/node_modules/lodash/fp/methodOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('methodOf', require('../methodOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/min.js b/node_modules/lodash/fp/min.js deleted file mode 100644 index d12c6b4..0000000 --- a/node_modules/lodash/fp/min.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('min', require('../min'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/minBy.js b/node_modules/lodash/fp/minBy.js deleted file mode 100644 index fdb9e24..0000000 --- a/node_modules/lodash/fp/minBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('minBy', require('../minBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/mixin.js b/node_modules/lodash/fp/mixin.js deleted file mode 100644 index 332e6fb..0000000 --- a/node_modules/lodash/fp/mixin.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mixin', require('../mixin')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/multiply.js b/node_modules/lodash/fp/multiply.js deleted file mode 100644 index 4dcf0b0..0000000 --- a/node_modules/lodash/fp/multiply.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('multiply', require('../multiply')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/nAry.js b/node_modules/lodash/fp/nAry.js deleted file mode 100644 index f262a76..0000000 --- a/node_modules/lodash/fp/nAry.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./ary'); diff --git a/node_modules/lodash/fp/negate.js b/node_modules/lodash/fp/negate.js deleted file mode 100644 index 8b6dc7c..0000000 --- a/node_modules/lodash/fp/negate.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('negate', require('../negate'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/next.js b/node_modules/lodash/fp/next.js deleted file mode 100644 index 140155e..0000000 --- a/node_modules/lodash/fp/next.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('next', require('../next'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/noop.js b/node_modules/lodash/fp/noop.js deleted file mode 100644 index b9e32cc..0000000 --- a/node_modules/lodash/fp/noop.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('noop', require('../noop'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/now.js b/node_modules/lodash/fp/now.js deleted file mode 100644 index 6de2068..0000000 --- a/node_modules/lodash/fp/now.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('now', require('../now'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/nth.js b/node_modules/lodash/fp/nth.js deleted file mode 100644 index da4fda7..0000000 --- a/node_modules/lodash/fp/nth.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('nth', require('../nth')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/nthArg.js b/node_modules/lodash/fp/nthArg.js deleted file mode 100644 index fce3165..0000000 --- a/node_modules/lodash/fp/nthArg.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('nthArg', require('../nthArg')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/number.js b/node_modules/lodash/fp/number.js deleted file mode 100644 index 5c10b88..0000000 --- a/node_modules/lodash/fp/number.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../number')); diff --git a/node_modules/lodash/fp/object.js b/node_modules/lodash/fp/object.js deleted file mode 100644 index ae39a13..0000000 --- a/node_modules/lodash/fp/object.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../object')); diff --git a/node_modules/lodash/fp/omit.js b/node_modules/lodash/fp/omit.js deleted file mode 100644 index fd68529..0000000 --- a/node_modules/lodash/fp/omit.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('omit', require('../omit')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/omitAll.js b/node_modules/lodash/fp/omitAll.js deleted file mode 100644 index 144cf4b..0000000 --- a/node_modules/lodash/fp/omitAll.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./omit'); diff --git a/node_modules/lodash/fp/omitBy.js b/node_modules/lodash/fp/omitBy.js deleted file mode 100644 index 90df738..0000000 --- a/node_modules/lodash/fp/omitBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('omitBy', require('../omitBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/once.js b/node_modules/lodash/fp/once.js deleted file mode 100644 index f8f0a5c..0000000 --- a/node_modules/lodash/fp/once.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('once', require('../once'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/orderBy.js b/node_modules/lodash/fp/orderBy.js deleted file mode 100644 index 848e210..0000000 --- a/node_modules/lodash/fp/orderBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('orderBy', require('../orderBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/over.js b/node_modules/lodash/fp/over.js deleted file mode 100644 index 01eba7b..0000000 --- a/node_modules/lodash/fp/over.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('over', require('../over')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/overArgs.js b/node_modules/lodash/fp/overArgs.js deleted file mode 100644 index 738556f..0000000 --- a/node_modules/lodash/fp/overArgs.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('overArgs', require('../overArgs')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/overEvery.js b/node_modules/lodash/fp/overEvery.js deleted file mode 100644 index 9f5a032..0000000 --- a/node_modules/lodash/fp/overEvery.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('overEvery', require('../overEvery')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/overSome.js b/node_modules/lodash/fp/overSome.js deleted file mode 100644 index 15939d5..0000000 --- a/node_modules/lodash/fp/overSome.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('overSome', require('../overSome')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/pad.js b/node_modules/lodash/fp/pad.js deleted file mode 100644 index f1dea4a..0000000 --- a/node_modules/lodash/fp/pad.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pad', require('../pad')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/padChars.js b/node_modules/lodash/fp/padChars.js deleted file mode 100644 index d6e0804..0000000 --- a/node_modules/lodash/fp/padChars.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('padChars', require('../pad')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/padCharsEnd.js b/node_modules/lodash/fp/padCharsEnd.js deleted file mode 100644 index d4ab79a..0000000 --- a/node_modules/lodash/fp/padCharsEnd.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('padCharsEnd', require('../padEnd')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/padCharsStart.js b/node_modules/lodash/fp/padCharsStart.js deleted file mode 100644 index a08a300..0000000 --- a/node_modules/lodash/fp/padCharsStart.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('padCharsStart', require('../padStart')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/padEnd.js b/node_modules/lodash/fp/padEnd.js deleted file mode 100644 index a8522ec..0000000 --- a/node_modules/lodash/fp/padEnd.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('padEnd', require('../padEnd')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/padStart.js b/node_modules/lodash/fp/padStart.js deleted file mode 100644 index f4ca79d..0000000 --- a/node_modules/lodash/fp/padStart.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('padStart', require('../padStart')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/parseInt.js b/node_modules/lodash/fp/parseInt.js deleted file mode 100644 index 27314cc..0000000 --- a/node_modules/lodash/fp/parseInt.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('parseInt', require('../parseInt')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/partial.js b/node_modules/lodash/fp/partial.js deleted file mode 100644 index 5d46015..0000000 --- a/node_modules/lodash/fp/partial.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('partial', require('../partial')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/partialRight.js b/node_modules/lodash/fp/partialRight.js deleted file mode 100644 index 7f05fed..0000000 --- a/node_modules/lodash/fp/partialRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('partialRight', require('../partialRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/partition.js b/node_modules/lodash/fp/partition.js deleted file mode 100644 index 2ebcacc..0000000 --- a/node_modules/lodash/fp/partition.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('partition', require('../partition')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/path.js b/node_modules/lodash/fp/path.js deleted file mode 100644 index b29cfb2..0000000 --- a/node_modules/lodash/fp/path.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./get'); diff --git a/node_modules/lodash/fp/pathEq.js b/node_modules/lodash/fp/pathEq.js deleted file mode 100644 index 36c027a..0000000 --- a/node_modules/lodash/fp/pathEq.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./matchesProperty'); diff --git a/node_modules/lodash/fp/pathOr.js b/node_modules/lodash/fp/pathOr.js deleted file mode 100644 index 4ab5820..0000000 --- a/node_modules/lodash/fp/pathOr.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./getOr'); diff --git a/node_modules/lodash/fp/paths.js b/node_modules/lodash/fp/paths.js deleted file mode 100644 index 1eb7950..0000000 --- a/node_modules/lodash/fp/paths.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./at'); diff --git a/node_modules/lodash/fp/pick.js b/node_modules/lodash/fp/pick.js deleted file mode 100644 index 197393d..0000000 --- a/node_modules/lodash/fp/pick.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pick', require('../pick')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/pickAll.js b/node_modules/lodash/fp/pickAll.js deleted file mode 100644 index a8ecd46..0000000 --- a/node_modules/lodash/fp/pickAll.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./pick'); diff --git a/node_modules/lodash/fp/pickBy.js b/node_modules/lodash/fp/pickBy.js deleted file mode 100644 index d832d16..0000000 --- a/node_modules/lodash/fp/pickBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pickBy', require('../pickBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/pipe.js b/node_modules/lodash/fp/pipe.js deleted file mode 100644 index b2e1e2c..0000000 --- a/node_modules/lodash/fp/pipe.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./flow'); diff --git a/node_modules/lodash/fp/placeholder.js b/node_modules/lodash/fp/placeholder.js deleted file mode 100644 index 1ce1739..0000000 --- a/node_modules/lodash/fp/placeholder.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * The default argument placeholder value for methods. - * - * @type {Object} - */ -module.exports = {}; diff --git a/node_modules/lodash/fp/plant.js b/node_modules/lodash/fp/plant.js deleted file mode 100644 index eca8f32..0000000 --- a/node_modules/lodash/fp/plant.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('plant', require('../plant'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/pluck.js b/node_modules/lodash/fp/pluck.js deleted file mode 100644 index 0d1e1ab..0000000 --- a/node_modules/lodash/fp/pluck.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./map'); diff --git a/node_modules/lodash/fp/prop.js b/node_modules/lodash/fp/prop.js deleted file mode 100644 index b29cfb2..0000000 --- a/node_modules/lodash/fp/prop.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./get'); diff --git a/node_modules/lodash/fp/propEq.js b/node_modules/lodash/fp/propEq.js deleted file mode 100644 index 36c027a..0000000 --- a/node_modules/lodash/fp/propEq.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./matchesProperty'); diff --git a/node_modules/lodash/fp/propOr.js b/node_modules/lodash/fp/propOr.js deleted file mode 100644 index 4ab5820..0000000 --- a/node_modules/lodash/fp/propOr.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./getOr'); diff --git a/node_modules/lodash/fp/property.js b/node_modules/lodash/fp/property.js deleted file mode 100644 index b29cfb2..0000000 --- a/node_modules/lodash/fp/property.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./get'); diff --git a/node_modules/lodash/fp/propertyOf.js b/node_modules/lodash/fp/propertyOf.js deleted file mode 100644 index f6273ee..0000000 --- a/node_modules/lodash/fp/propertyOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('propertyOf', require('../get')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/props.js b/node_modules/lodash/fp/props.js deleted file mode 100644 index 1eb7950..0000000 --- a/node_modules/lodash/fp/props.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./at'); diff --git a/node_modules/lodash/fp/pull.js b/node_modules/lodash/fp/pull.js deleted file mode 100644 index 8d7084f..0000000 --- a/node_modules/lodash/fp/pull.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pull', require('../pull')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/pullAll.js b/node_modules/lodash/fp/pullAll.js deleted file mode 100644 index 98d5c9a..0000000 --- a/node_modules/lodash/fp/pullAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pullAll', require('../pullAll')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/pullAllBy.js b/node_modules/lodash/fp/pullAllBy.js deleted file mode 100644 index 876bc3b..0000000 --- a/node_modules/lodash/fp/pullAllBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pullAllBy', require('../pullAllBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/pullAllWith.js b/node_modules/lodash/fp/pullAllWith.js deleted file mode 100644 index f71ba4d..0000000 --- a/node_modules/lodash/fp/pullAllWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pullAllWith', require('../pullAllWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/pullAt.js b/node_modules/lodash/fp/pullAt.js deleted file mode 100644 index e8b3bb6..0000000 --- a/node_modules/lodash/fp/pullAt.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pullAt', require('../pullAt')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/random.js b/node_modules/lodash/fp/random.js deleted file mode 100644 index 99d852e..0000000 --- a/node_modules/lodash/fp/random.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('random', require('../random')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/range.js b/node_modules/lodash/fp/range.js deleted file mode 100644 index a6bb591..0000000 --- a/node_modules/lodash/fp/range.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('range', require('../range')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/rangeRight.js b/node_modules/lodash/fp/rangeRight.js deleted file mode 100644 index fdb712f..0000000 --- a/node_modules/lodash/fp/rangeRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('rangeRight', require('../rangeRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/rangeStep.js b/node_modules/lodash/fp/rangeStep.js deleted file mode 100644 index d72dfc2..0000000 --- a/node_modules/lodash/fp/rangeStep.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('rangeStep', require('../range')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/rangeStepRight.js b/node_modules/lodash/fp/rangeStepRight.js deleted file mode 100644 index 8b2a67b..0000000 --- a/node_modules/lodash/fp/rangeStepRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('rangeStepRight', require('../rangeRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/rearg.js b/node_modules/lodash/fp/rearg.js deleted file mode 100644 index 678e02a..0000000 --- a/node_modules/lodash/fp/rearg.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('rearg', require('../rearg')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/reduce.js b/node_modules/lodash/fp/reduce.js deleted file mode 100644 index 4cef0a0..0000000 --- a/node_modules/lodash/fp/reduce.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('reduce', require('../reduce')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/reduceRight.js b/node_modules/lodash/fp/reduceRight.js deleted file mode 100644 index caf5bb5..0000000 --- a/node_modules/lodash/fp/reduceRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('reduceRight', require('../reduceRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/reject.js b/node_modules/lodash/fp/reject.js deleted file mode 100644 index c163273..0000000 --- a/node_modules/lodash/fp/reject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('reject', require('../reject')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/remove.js b/node_modules/lodash/fp/remove.js deleted file mode 100644 index e9d1327..0000000 --- a/node_modules/lodash/fp/remove.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('remove', require('../remove')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/repeat.js b/node_modules/lodash/fp/repeat.js deleted file mode 100644 index 08470f2..0000000 --- a/node_modules/lodash/fp/repeat.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('repeat', require('../repeat')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/replace.js b/node_modules/lodash/fp/replace.js deleted file mode 100644 index 2227db6..0000000 --- a/node_modules/lodash/fp/replace.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('replace', require('../replace')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/rest.js b/node_modules/lodash/fp/rest.js deleted file mode 100644 index c1f3d64..0000000 --- a/node_modules/lodash/fp/rest.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('rest', require('../rest')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/restFrom.js b/node_modules/lodash/fp/restFrom.js deleted file mode 100644 index 714e42b..0000000 --- a/node_modules/lodash/fp/restFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('restFrom', require('../rest')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/result.js b/node_modules/lodash/fp/result.js deleted file mode 100644 index f86ce07..0000000 --- a/node_modules/lodash/fp/result.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('result', require('../result')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/reverse.js b/node_modules/lodash/fp/reverse.js deleted file mode 100644 index 07c9f5e..0000000 --- a/node_modules/lodash/fp/reverse.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('reverse', require('../reverse')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/round.js b/node_modules/lodash/fp/round.js deleted file mode 100644 index 4c0e5c8..0000000 --- a/node_modules/lodash/fp/round.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('round', require('../round')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/sample.js b/node_modules/lodash/fp/sample.js deleted file mode 100644 index 6bea125..0000000 --- a/node_modules/lodash/fp/sample.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sample', require('../sample'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/sampleSize.js b/node_modules/lodash/fp/sampleSize.js deleted file mode 100644 index 359ed6f..0000000 --- a/node_modules/lodash/fp/sampleSize.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sampleSize', require('../sampleSize')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/seq.js b/node_modules/lodash/fp/seq.js deleted file mode 100644 index d8f42b0..0000000 --- a/node_modules/lodash/fp/seq.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../seq')); diff --git a/node_modules/lodash/fp/set.js b/node_modules/lodash/fp/set.js deleted file mode 100644 index 0b56a56..0000000 --- a/node_modules/lodash/fp/set.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('set', require('../set')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/setWith.js b/node_modules/lodash/fp/setWith.js deleted file mode 100644 index 0b58495..0000000 --- a/node_modules/lodash/fp/setWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('setWith', require('../setWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/shuffle.js b/node_modules/lodash/fp/shuffle.js deleted file mode 100644 index aa3a1ca..0000000 --- a/node_modules/lodash/fp/shuffle.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('shuffle', require('../shuffle'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/size.js b/node_modules/lodash/fp/size.js deleted file mode 100644 index 7490136..0000000 --- a/node_modules/lodash/fp/size.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('size', require('../size'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/slice.js b/node_modules/lodash/fp/slice.js deleted file mode 100644 index 15945d3..0000000 --- a/node_modules/lodash/fp/slice.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('slice', require('../slice')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/snakeCase.js b/node_modules/lodash/fp/snakeCase.js deleted file mode 100644 index a0ff780..0000000 --- a/node_modules/lodash/fp/snakeCase.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('snakeCase', require('../snakeCase'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/some.js b/node_modules/lodash/fp/some.js deleted file mode 100644 index a4fa2d0..0000000 --- a/node_modules/lodash/fp/some.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('some', require('../some')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/sortBy.js b/node_modules/lodash/fp/sortBy.js deleted file mode 100644 index e0790ad..0000000 --- a/node_modules/lodash/fp/sortBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortBy', require('../sortBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/sortedIndex.js b/node_modules/lodash/fp/sortedIndex.js deleted file mode 100644 index 364a054..0000000 --- a/node_modules/lodash/fp/sortedIndex.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedIndex', require('../sortedIndex')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/sortedIndexBy.js b/node_modules/lodash/fp/sortedIndexBy.js deleted file mode 100644 index 9593dbd..0000000 --- a/node_modules/lodash/fp/sortedIndexBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedIndexBy', require('../sortedIndexBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/sortedIndexOf.js b/node_modules/lodash/fp/sortedIndexOf.js deleted file mode 100644 index c9084ca..0000000 --- a/node_modules/lodash/fp/sortedIndexOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedIndexOf', require('../sortedIndexOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/sortedLastIndex.js b/node_modules/lodash/fp/sortedLastIndex.js deleted file mode 100644 index 47fe241..0000000 --- a/node_modules/lodash/fp/sortedLastIndex.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedLastIndex', require('../sortedLastIndex')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/sortedLastIndexBy.js b/node_modules/lodash/fp/sortedLastIndexBy.js deleted file mode 100644 index 0f9a347..0000000 --- a/node_modules/lodash/fp/sortedLastIndexBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedLastIndexBy', require('../sortedLastIndexBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/sortedLastIndexOf.js b/node_modules/lodash/fp/sortedLastIndexOf.js deleted file mode 100644 index 0d4d932..0000000 --- a/node_modules/lodash/fp/sortedLastIndexOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedLastIndexOf', require('../sortedLastIndexOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/sortedUniq.js b/node_modules/lodash/fp/sortedUniq.js deleted file mode 100644 index 882d283..0000000 --- a/node_modules/lodash/fp/sortedUniq.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedUniq', require('../sortedUniq'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/sortedUniqBy.js b/node_modules/lodash/fp/sortedUniqBy.js deleted file mode 100644 index 033db91..0000000 --- a/node_modules/lodash/fp/sortedUniqBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedUniqBy', require('../sortedUniqBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/split.js b/node_modules/lodash/fp/split.js deleted file mode 100644 index 14de1a7..0000000 --- a/node_modules/lodash/fp/split.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('split', require('../split')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/spread.js b/node_modules/lodash/fp/spread.js deleted file mode 100644 index 2d11b70..0000000 --- a/node_modules/lodash/fp/spread.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('spread', require('../spread')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/spreadFrom.js b/node_modules/lodash/fp/spreadFrom.js deleted file mode 100644 index 0b630df..0000000 --- a/node_modules/lodash/fp/spreadFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('spreadFrom', require('../spread')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/startCase.js b/node_modules/lodash/fp/startCase.js deleted file mode 100644 index ada98c9..0000000 --- a/node_modules/lodash/fp/startCase.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('startCase', require('../startCase'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/startsWith.js b/node_modules/lodash/fp/startsWith.js deleted file mode 100644 index 985e2f2..0000000 --- a/node_modules/lodash/fp/startsWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('startsWith', require('../startsWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/string.js b/node_modules/lodash/fp/string.js deleted file mode 100644 index 773b037..0000000 --- a/node_modules/lodash/fp/string.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../string')); diff --git a/node_modules/lodash/fp/stubArray.js b/node_modules/lodash/fp/stubArray.js deleted file mode 100644 index cd604cb..0000000 --- a/node_modules/lodash/fp/stubArray.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('stubArray', require('../stubArray'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/stubFalse.js b/node_modules/lodash/fp/stubFalse.js deleted file mode 100644 index 3296664..0000000 --- a/node_modules/lodash/fp/stubFalse.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/stubObject.js b/node_modules/lodash/fp/stubObject.js deleted file mode 100644 index c6c8ec4..0000000 --- a/node_modules/lodash/fp/stubObject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('stubObject', require('../stubObject'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/stubString.js b/node_modules/lodash/fp/stubString.js deleted file mode 100644 index 701051e..0000000 --- a/node_modules/lodash/fp/stubString.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('stubString', require('../stubString'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/stubTrue.js b/node_modules/lodash/fp/stubTrue.js deleted file mode 100644 index 9249082..0000000 --- a/node_modules/lodash/fp/stubTrue.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/subtract.js b/node_modules/lodash/fp/subtract.js deleted file mode 100644 index d32b16d..0000000 --- a/node_modules/lodash/fp/subtract.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('subtract', require('../subtract')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/sum.js b/node_modules/lodash/fp/sum.js deleted file mode 100644 index 5cce12b..0000000 --- a/node_modules/lodash/fp/sum.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sum', require('../sum'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/sumBy.js b/node_modules/lodash/fp/sumBy.js deleted file mode 100644 index c882656..0000000 --- a/node_modules/lodash/fp/sumBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sumBy', require('../sumBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/symmetricDifference.js b/node_modules/lodash/fp/symmetricDifference.js deleted file mode 100644 index 78c16ad..0000000 --- a/node_modules/lodash/fp/symmetricDifference.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./xor'); diff --git a/node_modules/lodash/fp/symmetricDifferenceBy.js b/node_modules/lodash/fp/symmetricDifferenceBy.js deleted file mode 100644 index 298fc7f..0000000 --- a/node_modules/lodash/fp/symmetricDifferenceBy.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./xorBy'); diff --git a/node_modules/lodash/fp/symmetricDifferenceWith.js b/node_modules/lodash/fp/symmetricDifferenceWith.js deleted file mode 100644 index 70bc6fa..0000000 --- a/node_modules/lodash/fp/symmetricDifferenceWith.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./xorWith'); diff --git a/node_modules/lodash/fp/tail.js b/node_modules/lodash/fp/tail.js deleted file mode 100644 index f122f0a..0000000 --- a/node_modules/lodash/fp/tail.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('tail', require('../tail'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/take.js b/node_modules/lodash/fp/take.js deleted file mode 100644 index 9af98a7..0000000 --- a/node_modules/lodash/fp/take.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('take', require('../take')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/takeLast.js b/node_modules/lodash/fp/takeLast.js deleted file mode 100644 index e98c84a..0000000 --- a/node_modules/lodash/fp/takeLast.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./takeRight'); diff --git a/node_modules/lodash/fp/takeLastWhile.js b/node_modules/lodash/fp/takeLastWhile.js deleted file mode 100644 index 5367968..0000000 --- a/node_modules/lodash/fp/takeLastWhile.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./takeRightWhile'); diff --git a/node_modules/lodash/fp/takeRight.js b/node_modules/lodash/fp/takeRight.js deleted file mode 100644 index b82950a..0000000 --- a/node_modules/lodash/fp/takeRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('takeRight', require('../takeRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/takeRightWhile.js b/node_modules/lodash/fp/takeRightWhile.js deleted file mode 100644 index 8ffb0a2..0000000 --- a/node_modules/lodash/fp/takeRightWhile.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('takeRightWhile', require('../takeRightWhile')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/takeWhile.js b/node_modules/lodash/fp/takeWhile.js deleted file mode 100644 index 2813664..0000000 --- a/node_modules/lodash/fp/takeWhile.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('takeWhile', require('../takeWhile')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/tap.js b/node_modules/lodash/fp/tap.js deleted file mode 100644 index d33ad6e..0000000 --- a/node_modules/lodash/fp/tap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('tap', require('../tap')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/template.js b/node_modules/lodash/fp/template.js deleted file mode 100644 index 74857e1..0000000 --- a/node_modules/lodash/fp/template.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('template', require('../template')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/templateSettings.js b/node_modules/lodash/fp/templateSettings.js deleted file mode 100644 index 7bcc0a8..0000000 --- a/node_modules/lodash/fp/templateSettings.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('templateSettings', require('../templateSettings'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/throttle.js b/node_modules/lodash/fp/throttle.js deleted file mode 100644 index 77fff14..0000000 --- a/node_modules/lodash/fp/throttle.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('throttle', require('../throttle')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/thru.js b/node_modules/lodash/fp/thru.js deleted file mode 100644 index d42b3b1..0000000 --- a/node_modules/lodash/fp/thru.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('thru', require('../thru')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/times.js b/node_modules/lodash/fp/times.js deleted file mode 100644 index 0dab06d..0000000 --- a/node_modules/lodash/fp/times.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('times', require('../times')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toArray.js b/node_modules/lodash/fp/toArray.js deleted file mode 100644 index f0c360a..0000000 --- a/node_modules/lodash/fp/toArray.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toArray', require('../toArray'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toFinite.js b/node_modules/lodash/fp/toFinite.js deleted file mode 100644 index 3a47687..0000000 --- a/node_modules/lodash/fp/toFinite.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toFinite', require('../toFinite'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toInteger.js b/node_modules/lodash/fp/toInteger.js deleted file mode 100644 index e0af6a7..0000000 --- a/node_modules/lodash/fp/toInteger.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toInteger', require('../toInteger'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toIterator.js b/node_modules/lodash/fp/toIterator.js deleted file mode 100644 index 65e6baa..0000000 --- a/node_modules/lodash/fp/toIterator.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toIterator', require('../toIterator'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toJSON.js b/node_modules/lodash/fp/toJSON.js deleted file mode 100644 index 2d718d0..0000000 --- a/node_modules/lodash/fp/toJSON.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toJSON', require('../toJSON'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toLength.js b/node_modules/lodash/fp/toLength.js deleted file mode 100644 index b97cdd9..0000000 --- a/node_modules/lodash/fp/toLength.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toLength', require('../toLength'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toLower.js b/node_modules/lodash/fp/toLower.js deleted file mode 100644 index 616ef36..0000000 --- a/node_modules/lodash/fp/toLower.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toLower', require('../toLower'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toNumber.js b/node_modules/lodash/fp/toNumber.js deleted file mode 100644 index d0c6f4d..0000000 --- a/node_modules/lodash/fp/toNumber.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toNumber', require('../toNumber'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toPairs.js b/node_modules/lodash/fp/toPairs.js deleted file mode 100644 index af78378..0000000 --- a/node_modules/lodash/fp/toPairs.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toPairs', require('../toPairs'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toPairsIn.js b/node_modules/lodash/fp/toPairsIn.js deleted file mode 100644 index 66504ab..0000000 --- a/node_modules/lodash/fp/toPairsIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toPairsIn', require('../toPairsIn'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toPath.js b/node_modules/lodash/fp/toPath.js deleted file mode 100644 index b4d5e50..0000000 --- a/node_modules/lodash/fp/toPath.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toPath', require('../toPath'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toPlainObject.js b/node_modules/lodash/fp/toPlainObject.js deleted file mode 100644 index 278bb86..0000000 --- a/node_modules/lodash/fp/toPlainObject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toPlainObject', require('../toPlainObject'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toSafeInteger.js b/node_modules/lodash/fp/toSafeInteger.js deleted file mode 100644 index 367a26f..0000000 --- a/node_modules/lodash/fp/toSafeInteger.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toSafeInteger', require('../toSafeInteger'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toString.js b/node_modules/lodash/fp/toString.js deleted file mode 100644 index cec4f8e..0000000 --- a/node_modules/lodash/fp/toString.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toString', require('../toString'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/toUpper.js b/node_modules/lodash/fp/toUpper.js deleted file mode 100644 index 54f9a56..0000000 --- a/node_modules/lodash/fp/toUpper.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toUpper', require('../toUpper'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/transform.js b/node_modules/lodash/fp/transform.js deleted file mode 100644 index 759d088..0000000 --- a/node_modules/lodash/fp/transform.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('transform', require('../transform')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/trim.js b/node_modules/lodash/fp/trim.js deleted file mode 100644 index e6319a7..0000000 --- a/node_modules/lodash/fp/trim.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('trim', require('../trim')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/trimChars.js b/node_modules/lodash/fp/trimChars.js deleted file mode 100644 index c9294de..0000000 --- a/node_modules/lodash/fp/trimChars.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('trimChars', require('../trim')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/trimCharsEnd.js b/node_modules/lodash/fp/trimCharsEnd.js deleted file mode 100644 index 284bc2f..0000000 --- a/node_modules/lodash/fp/trimCharsEnd.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('trimCharsEnd', require('../trimEnd')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/trimCharsStart.js b/node_modules/lodash/fp/trimCharsStart.js deleted file mode 100644 index ff0ee65..0000000 --- a/node_modules/lodash/fp/trimCharsStart.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('trimCharsStart', require('../trimStart')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/trimEnd.js b/node_modules/lodash/fp/trimEnd.js deleted file mode 100644 index 7190880..0000000 --- a/node_modules/lodash/fp/trimEnd.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('trimEnd', require('../trimEnd')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/trimStart.js b/node_modules/lodash/fp/trimStart.js deleted file mode 100644 index fda902c..0000000 --- a/node_modules/lodash/fp/trimStart.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('trimStart', require('../trimStart')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/truncate.js b/node_modules/lodash/fp/truncate.js deleted file mode 100644 index d265c1d..0000000 --- a/node_modules/lodash/fp/truncate.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('truncate', require('../truncate')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/unapply.js b/node_modules/lodash/fp/unapply.js deleted file mode 100644 index c5dfe77..0000000 --- a/node_modules/lodash/fp/unapply.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./rest'); diff --git a/node_modules/lodash/fp/unary.js b/node_modules/lodash/fp/unary.js deleted file mode 100644 index 286c945..0000000 --- a/node_modules/lodash/fp/unary.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unary', require('../unary'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/unescape.js b/node_modules/lodash/fp/unescape.js deleted file mode 100644 index fddcb46..0000000 --- a/node_modules/lodash/fp/unescape.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unescape', require('../unescape'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/union.js b/node_modules/lodash/fp/union.js deleted file mode 100644 index ef8228d..0000000 --- a/node_modules/lodash/fp/union.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('union', require('../union')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/unionBy.js b/node_modules/lodash/fp/unionBy.js deleted file mode 100644 index 603687a..0000000 --- a/node_modules/lodash/fp/unionBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unionBy', require('../unionBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/unionWith.js b/node_modules/lodash/fp/unionWith.js deleted file mode 100644 index 65bb3a7..0000000 --- a/node_modules/lodash/fp/unionWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unionWith', require('../unionWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/uniq.js b/node_modules/lodash/fp/uniq.js deleted file mode 100644 index bc18524..0000000 --- a/node_modules/lodash/fp/uniq.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('uniq', require('../uniq'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/uniqBy.js b/node_modules/lodash/fp/uniqBy.js deleted file mode 100644 index 634c6a8..0000000 --- a/node_modules/lodash/fp/uniqBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('uniqBy', require('../uniqBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/uniqWith.js b/node_modules/lodash/fp/uniqWith.js deleted file mode 100644 index 0ec601a..0000000 --- a/node_modules/lodash/fp/uniqWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('uniqWith', require('../uniqWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/uniqueId.js b/node_modules/lodash/fp/uniqueId.js deleted file mode 100644 index aa8fc2f..0000000 --- a/node_modules/lodash/fp/uniqueId.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('uniqueId', require('../uniqueId')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/unnest.js b/node_modules/lodash/fp/unnest.js deleted file mode 100644 index 5d34060..0000000 --- a/node_modules/lodash/fp/unnest.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./flatten'); diff --git a/node_modules/lodash/fp/unset.js b/node_modules/lodash/fp/unset.js deleted file mode 100644 index ea203a0..0000000 --- a/node_modules/lodash/fp/unset.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unset', require('../unset')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/unzip.js b/node_modules/lodash/fp/unzip.js deleted file mode 100644 index cc364b3..0000000 --- a/node_modules/lodash/fp/unzip.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unzip', require('../unzip'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/unzipWith.js b/node_modules/lodash/fp/unzipWith.js deleted file mode 100644 index 182eaa1..0000000 --- a/node_modules/lodash/fp/unzipWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unzipWith', require('../unzipWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/update.js b/node_modules/lodash/fp/update.js deleted file mode 100644 index b8ce2cc..0000000 --- a/node_modules/lodash/fp/update.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('update', require('../update')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/updateWith.js b/node_modules/lodash/fp/updateWith.js deleted file mode 100644 index d5e8282..0000000 --- a/node_modules/lodash/fp/updateWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('updateWith', require('../updateWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/upperCase.js b/node_modules/lodash/fp/upperCase.js deleted file mode 100644 index c886f20..0000000 --- a/node_modules/lodash/fp/upperCase.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('upperCase', require('../upperCase'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/upperFirst.js b/node_modules/lodash/fp/upperFirst.js deleted file mode 100644 index d8c04df..0000000 --- a/node_modules/lodash/fp/upperFirst.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('upperFirst', require('../upperFirst'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/useWith.js b/node_modules/lodash/fp/useWith.js deleted file mode 100644 index d8b3df5..0000000 --- a/node_modules/lodash/fp/useWith.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./overArgs'); diff --git a/node_modules/lodash/fp/util.js b/node_modules/lodash/fp/util.js deleted file mode 100644 index 18c00ba..0000000 --- a/node_modules/lodash/fp/util.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../util')); diff --git a/node_modules/lodash/fp/value.js b/node_modules/lodash/fp/value.js deleted file mode 100644 index 555eec7..0000000 --- a/node_modules/lodash/fp/value.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('value', require('../value'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/valueOf.js b/node_modules/lodash/fp/valueOf.js deleted file mode 100644 index f968807..0000000 --- a/node_modules/lodash/fp/valueOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('valueOf', require('../valueOf'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/values.js b/node_modules/lodash/fp/values.js deleted file mode 100644 index 2dfc561..0000000 --- a/node_modules/lodash/fp/values.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('values', require('../values'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/valuesIn.js b/node_modules/lodash/fp/valuesIn.js deleted file mode 100644 index a1b2bb8..0000000 --- a/node_modules/lodash/fp/valuesIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('valuesIn', require('../valuesIn'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/where.js b/node_modules/lodash/fp/where.js deleted file mode 100644 index 3247f64..0000000 --- a/node_modules/lodash/fp/where.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./conformsTo'); diff --git a/node_modules/lodash/fp/whereEq.js b/node_modules/lodash/fp/whereEq.js deleted file mode 100644 index 29d1e1e..0000000 --- a/node_modules/lodash/fp/whereEq.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./isMatch'); diff --git a/node_modules/lodash/fp/without.js b/node_modules/lodash/fp/without.js deleted file mode 100644 index bad9e12..0000000 --- a/node_modules/lodash/fp/without.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('without', require('../without')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/words.js b/node_modules/lodash/fp/words.js deleted file mode 100644 index 4a90141..0000000 --- a/node_modules/lodash/fp/words.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('words', require('../words')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/wrap.js b/node_modules/lodash/fp/wrap.js deleted file mode 100644 index e93bd8a..0000000 --- a/node_modules/lodash/fp/wrap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('wrap', require('../wrap')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/wrapperAt.js b/node_modules/lodash/fp/wrapperAt.js deleted file mode 100644 index 8f0a310..0000000 --- a/node_modules/lodash/fp/wrapperAt.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('wrapperAt', require('../wrapperAt'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/wrapperChain.js b/node_modules/lodash/fp/wrapperChain.js deleted file mode 100644 index 2a48ea2..0000000 --- a/node_modules/lodash/fp/wrapperChain.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('wrapperChain', require('../wrapperChain'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/wrapperLodash.js b/node_modules/lodash/fp/wrapperLodash.js deleted file mode 100644 index a7162d0..0000000 --- a/node_modules/lodash/fp/wrapperLodash.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('wrapperLodash', require('../wrapperLodash'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/wrapperReverse.js b/node_modules/lodash/fp/wrapperReverse.js deleted file mode 100644 index e1481aa..0000000 --- a/node_modules/lodash/fp/wrapperReverse.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('wrapperReverse', require('../wrapperReverse'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/wrapperValue.js b/node_modules/lodash/fp/wrapperValue.js deleted file mode 100644 index 8eb9112..0000000 --- a/node_modules/lodash/fp/wrapperValue.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('wrapperValue', require('../wrapperValue'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/xor.js b/node_modules/lodash/fp/xor.js deleted file mode 100644 index 29e2819..0000000 --- a/node_modules/lodash/fp/xor.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('xor', require('../xor')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/xorBy.js b/node_modules/lodash/fp/xorBy.js deleted file mode 100644 index b355686..0000000 --- a/node_modules/lodash/fp/xorBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('xorBy', require('../xorBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/xorWith.js b/node_modules/lodash/fp/xorWith.js deleted file mode 100644 index 8e05739..0000000 --- a/node_modules/lodash/fp/xorWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('xorWith', require('../xorWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/zip.js b/node_modules/lodash/fp/zip.js deleted file mode 100644 index 69e147a..0000000 --- a/node_modules/lodash/fp/zip.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('zip', require('../zip')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/zipAll.js b/node_modules/lodash/fp/zipAll.js deleted file mode 100644 index efa8ccb..0000000 --- a/node_modules/lodash/fp/zipAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('zipAll', require('../zip')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/zipObj.js b/node_modules/lodash/fp/zipObj.js deleted file mode 100644 index f4a3453..0000000 --- a/node_modules/lodash/fp/zipObj.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./zipObject'); diff --git a/node_modules/lodash/fp/zipObject.js b/node_modules/lodash/fp/zipObject.js deleted file mode 100644 index 462dbb6..0000000 --- a/node_modules/lodash/fp/zipObject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('zipObject', require('../zipObject')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/zipObjectDeep.js b/node_modules/lodash/fp/zipObjectDeep.js deleted file mode 100644 index 53a5d33..0000000 --- a/node_modules/lodash/fp/zipObjectDeep.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('zipObjectDeep', require('../zipObjectDeep')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fp/zipWith.js b/node_modules/lodash/fp/zipWith.js deleted file mode 100644 index c5cf9e2..0000000 --- a/node_modules/lodash/fp/zipWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('zipWith', require('../zipWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/node_modules/lodash/fromPairs.js b/node_modules/lodash/fromPairs.js deleted file mode 100644 index ee7940d..0000000 --- a/node_modules/lodash/fromPairs.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * The inverse of `_.toPairs`; this method returns an object composed - * from key-value `pairs`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} pairs The key-value pairs. - * @returns {Object} Returns the new object. - * @example - * - * _.fromPairs([['a', 1], ['b', 2]]); - * // => { 'a': 1, 'b': 2 } - */ -function fromPairs(pairs) { - var index = -1, - length = pairs == null ? 0 : pairs.length, - result = {}; - - while (++index < length) { - var pair = pairs[index]; - result[pair[0]] = pair[1]; - } - return result; -} - -module.exports = fromPairs; diff --git a/node_modules/lodash/function.js b/node_modules/lodash/function.js deleted file mode 100644 index b0fc6d9..0000000 --- a/node_modules/lodash/function.js +++ /dev/null @@ -1,25 +0,0 @@ -module.exports = { - 'after': require('./after'), - 'ary': require('./ary'), - 'before': require('./before'), - 'bind': require('./bind'), - 'bindKey': require('./bindKey'), - 'curry': require('./curry'), - 'curryRight': require('./curryRight'), - 'debounce': require('./debounce'), - 'defer': require('./defer'), - 'delay': require('./delay'), - 'flip': require('./flip'), - 'memoize': require('./memoize'), - 'negate': require('./negate'), - 'once': require('./once'), - 'overArgs': require('./overArgs'), - 'partial': require('./partial'), - 'partialRight': require('./partialRight'), - 'rearg': require('./rearg'), - 'rest': require('./rest'), - 'spread': require('./spread'), - 'throttle': require('./throttle'), - 'unary': require('./unary'), - 'wrap': require('./wrap') -}; diff --git a/node_modules/lodash/functions.js b/node_modules/lodash/functions.js deleted file mode 100644 index 9722928..0000000 --- a/node_modules/lodash/functions.js +++ /dev/null @@ -1,31 +0,0 @@ -var baseFunctions = require('./_baseFunctions'), - keys = require('./keys'); - -/** - * Creates an array of function property names from own enumerable properties - * of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functionsIn - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functions(new Foo); - * // => ['a', 'b'] - */ -function functions(object) { - return object == null ? [] : baseFunctions(object, keys(object)); -} - -module.exports = functions; diff --git a/node_modules/lodash/functionsIn.js b/node_modules/lodash/functionsIn.js deleted file mode 100644 index f00345d..0000000 --- a/node_modules/lodash/functionsIn.js +++ /dev/null @@ -1,31 +0,0 @@ -var baseFunctions = require('./_baseFunctions'), - keysIn = require('./keysIn'); - -/** - * Creates an array of function property names from own and inherited - * enumerable properties of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functions - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functionsIn(new Foo); - * // => ['a', 'b', 'c'] - */ -function functionsIn(object) { - return object == null ? [] : baseFunctions(object, keysIn(object)); -} - -module.exports = functionsIn; diff --git a/node_modules/lodash/get.js b/node_modules/lodash/get.js deleted file mode 100644 index 8805ff9..0000000 --- a/node_modules/lodash/get.js +++ /dev/null @@ -1,33 +0,0 @@ -var baseGet = require('./_baseGet'); - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; -} - -module.exports = get; diff --git a/node_modules/lodash/groupBy.js b/node_modules/lodash/groupBy.js deleted file mode 100644 index babf4f6..0000000 --- a/node_modules/lodash/groupBy.js +++ /dev/null @@ -1,41 +0,0 @@ -var baseAssignValue = require('./_baseAssignValue'), - createAggregator = require('./_createAggregator'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The order of grouped values - * is determined by the order they occur in `collection`. The corresponding - * value of each key is an array of elements responsible for generating the - * key. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.groupBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': [4.2], '6': [6.1, 6.3] } - * - * // The `_.property` iteratee shorthand. - * _.groupBy(['one', 'two', 'three'], 'length'); - * // => { '3': ['one', 'two'], '5': ['three'] } - */ -var groupBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - result[key].push(value); - } else { - baseAssignValue(result, key, [value]); - } -}); - -module.exports = groupBy; diff --git a/node_modules/lodash/gt.js b/node_modules/lodash/gt.js deleted file mode 100644 index 3a66282..0000000 --- a/node_modules/lodash/gt.js +++ /dev/null @@ -1,29 +0,0 @@ -var baseGt = require('./_baseGt'), - createRelationalOperation = require('./_createRelationalOperation'); - -/** - * Checks if `value` is greater than `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - * @see _.lt - * @example - * - * _.gt(3, 1); - * // => true - * - * _.gt(3, 3); - * // => false - * - * _.gt(1, 3); - * // => false - */ -var gt = createRelationalOperation(baseGt); - -module.exports = gt; diff --git a/node_modules/lodash/gte.js b/node_modules/lodash/gte.js deleted file mode 100644 index 4180a68..0000000 --- a/node_modules/lodash/gte.js +++ /dev/null @@ -1,30 +0,0 @@ -var createRelationalOperation = require('./_createRelationalOperation'); - -/** - * Checks if `value` is greater than or equal to `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than or equal to - * `other`, else `false`. - * @see _.lte - * @example - * - * _.gte(3, 1); - * // => true - * - * _.gte(3, 3); - * // => true - * - * _.gte(1, 3); - * // => false - */ -var gte = createRelationalOperation(function(value, other) { - return value >= other; -}); - -module.exports = gte; diff --git a/node_modules/lodash/has.js b/node_modules/lodash/has.js deleted file mode 100644 index 34df55e..0000000 --- a/node_modules/lodash/has.js +++ /dev/null @@ -1,35 +0,0 @@ -var baseHas = require('./_baseHas'), - hasPath = require('./_hasPath'); - -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && hasPath(object, path, baseHas); -} - -module.exports = has; diff --git a/node_modules/lodash/hasIn.js b/node_modules/lodash/hasIn.js deleted file mode 100644 index 06a3686..0000000 --- a/node_modules/lodash/hasIn.js +++ /dev/null @@ -1,34 +0,0 @@ -var baseHasIn = require('./_baseHasIn'), - hasPath = require('./_hasPath'); - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && hasPath(object, path, baseHasIn); -} - -module.exports = hasIn; diff --git a/node_modules/lodash/head.js b/node_modules/lodash/head.js deleted file mode 100644 index dee9d1f..0000000 --- a/node_modules/lodash/head.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Gets the first element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias first - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the first element of `array`. - * @example - * - * _.head([1, 2, 3]); - * // => 1 - * - * _.head([]); - * // => undefined - */ -function head(array) { - return (array && array.length) ? array[0] : undefined; -} - -module.exports = head; diff --git a/node_modules/lodash/identity.js b/node_modules/lodash/identity.js deleted file mode 100644 index 2d5d963..0000000 --- a/node_modules/lodash/identity.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} - -module.exports = identity; diff --git a/node_modules/lodash/inRange.js b/node_modules/lodash/inRange.js deleted file mode 100644 index f20728d..0000000 --- a/node_modules/lodash/inRange.js +++ /dev/null @@ -1,55 +0,0 @@ -var baseInRange = require('./_baseInRange'), - toFinite = require('./toFinite'), - toNumber = require('./toNumber'); - -/** - * Checks if `n` is between `start` and up to, but not including, `end`. If - * `end` is not specified, it's set to `start` with `start` then set to `0`. - * If `start` is greater than `end` the params are swapped to support - * negative ranges. - * - * @static - * @memberOf _ - * @since 3.3.0 - * @category Number - * @param {number} number The number to check. - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. - * @see _.range, _.rangeRight - * @example - * - * _.inRange(3, 2, 4); - * // => true - * - * _.inRange(4, 8); - * // => true - * - * _.inRange(4, 2); - * // => false - * - * _.inRange(2, 2); - * // => false - * - * _.inRange(1.2, 2); - * // => true - * - * _.inRange(5.2, 4); - * // => false - * - * _.inRange(-3, -2, -6); - * // => true - */ -function inRange(number, start, end) { - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - number = toNumber(number); - return baseInRange(number, start, end); -} - -module.exports = inRange; diff --git a/node_modules/lodash/includes.js b/node_modules/lodash/includes.js deleted file mode 100644 index ae0deed..0000000 --- a/node_modules/lodash/includes.js +++ /dev/null @@ -1,53 +0,0 @@ -var baseIndexOf = require('./_baseIndexOf'), - isArrayLike = require('./isArrayLike'), - isString = require('./isString'), - toInteger = require('./toInteger'), - values = require('./values'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Checks if `value` is in `collection`. If `collection` is a string, it's - * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * is used for equality comparisons. If `fromIndex` is negative, it's used as - * the offset from the end of `collection`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {boolean} Returns `true` if `value` is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'a': 1, 'b': 2 }, 1); - * // => true - * - * _.includes('abcd', 'bc'); - * // => true - */ -function includes(collection, value, fromIndex, guard) { - collection = isArrayLike(collection) ? collection : values(collection); - fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; - - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); - } - return isString(collection) - ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) - : (!!length && baseIndexOf(collection, value, fromIndex) > -1); -} - -module.exports = includes; diff --git a/node_modules/lodash/index.js b/node_modules/lodash/index.js deleted file mode 100644 index 5d063e2..0000000 --- a/node_modules/lodash/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lodash'); \ No newline at end of file diff --git a/node_modules/lodash/indexOf.js b/node_modules/lodash/indexOf.js deleted file mode 100644 index 3c644af..0000000 --- a/node_modules/lodash/indexOf.js +++ /dev/null @@ -1,42 +0,0 @@ -var baseIndexOf = require('./_baseIndexOf'), - toInteger = require('./toInteger'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the - * offset from the end of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // Search from the `fromIndex`. - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - */ -function indexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseIndexOf(array, value, index); -} - -module.exports = indexOf; diff --git a/node_modules/lodash/initial.js b/node_modules/lodash/initial.js deleted file mode 100644 index f47fc50..0000000 --- a/node_modules/lodash/initial.js +++ /dev/null @@ -1,22 +0,0 @@ -var baseSlice = require('./_baseSlice'); - -/** - * Gets all but the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.initial([1, 2, 3]); - * // => [1, 2] - */ -function initial(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 0, -1) : []; -} - -module.exports = initial; diff --git a/node_modules/lodash/intersection.js b/node_modules/lodash/intersection.js deleted file mode 100644 index a94c135..0000000 --- a/node_modules/lodash/intersection.js +++ /dev/null @@ -1,30 +0,0 @@ -var arrayMap = require('./_arrayMap'), - baseIntersection = require('./_baseIntersection'), - baseRest = require('./_baseRest'), - castArrayLikeObject = require('./_castArrayLikeObject'); - -/** - * Creates an array of unique values that are included in all given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * _.intersection([2, 1], [2, 3]); - * // => [2] - */ -var intersection = baseRest(function(arrays) { - var mapped = arrayMap(arrays, castArrayLikeObject); - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped) - : []; -}); - -module.exports = intersection; diff --git a/node_modules/lodash/intersectionBy.js b/node_modules/lodash/intersectionBy.js deleted file mode 100644 index 31461aa..0000000 --- a/node_modules/lodash/intersectionBy.js +++ /dev/null @@ -1,45 +0,0 @@ -var arrayMap = require('./_arrayMap'), - baseIntersection = require('./_baseIntersection'), - baseIteratee = require('./_baseIteratee'), - baseRest = require('./_baseRest'), - castArrayLikeObject = require('./_castArrayLikeObject'), - last = require('./last'); - -/** - * This method is like `_.intersection` except that it accepts `iteratee` - * which is invoked for each element of each `arrays` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [2.1] - * - * // The `_.property` iteratee shorthand. - * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }] - */ -var intersectionBy = baseRest(function(arrays) { - var iteratee = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - if (iteratee === last(mapped)) { - iteratee = undefined; - } else { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, baseIteratee(iteratee, 2)) - : []; -}); - -module.exports = intersectionBy; diff --git a/node_modules/lodash/intersectionWith.js b/node_modules/lodash/intersectionWith.js deleted file mode 100644 index 63cabfa..0000000 --- a/node_modules/lodash/intersectionWith.js +++ /dev/null @@ -1,41 +0,0 @@ -var arrayMap = require('./_arrayMap'), - baseIntersection = require('./_baseIntersection'), - baseRest = require('./_baseRest'), - castArrayLikeObject = require('./_castArrayLikeObject'), - last = require('./last'); - -/** - * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. The order and references - * of result values are determined by the first array. The comparator is - * invoked with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.intersectionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }] - */ -var intersectionWith = baseRest(function(arrays) { - var comparator = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - comparator = typeof comparator == 'function' ? comparator : undefined; - if (comparator) { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, undefined, comparator) - : []; -}); - -module.exports = intersectionWith; diff --git a/node_modules/lodash/invert.js b/node_modules/lodash/invert.js deleted file mode 100644 index 8c47950..0000000 --- a/node_modules/lodash/invert.js +++ /dev/null @@ -1,42 +0,0 @@ -var constant = require('./constant'), - createInverter = require('./_createInverter'), - identity = require('./identity'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * Creates an object composed of the inverted keys and values of `object`. - * If `object` contains duplicate values, subsequent values overwrite - * property assignments of previous values. - * - * @static - * @memberOf _ - * @since 0.7.0 - * @category Object - * @param {Object} object The object to invert. - * @returns {Object} Returns the new inverted object. - * @example - * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; - * - * _.invert(object); - * // => { '1': 'c', '2': 'b' } - */ -var invert = createInverter(function(result, value, key) { - if (value != null && - typeof value.toString != 'function') { - value = nativeObjectToString.call(value); - } - - result[value] = key; -}, constant(identity)); - -module.exports = invert; diff --git a/node_modules/lodash/invertBy.js b/node_modules/lodash/invertBy.js deleted file mode 100644 index 3f4f7e5..0000000 --- a/node_modules/lodash/invertBy.js +++ /dev/null @@ -1,56 +0,0 @@ -var baseIteratee = require('./_baseIteratee'), - createInverter = require('./_createInverter'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * This method is like `_.invert` except that the inverted object is generated - * from the results of running each element of `object` thru `iteratee`. The - * corresponding inverted value of each inverted key is an array of keys - * responsible for generating the inverted value. The iteratee is invoked - * with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.1.0 - * @category Object - * @param {Object} object The object to invert. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Object} Returns the new inverted object. - * @example - * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; - * - * _.invertBy(object); - * // => { '1': ['a', 'c'], '2': ['b'] } - * - * _.invertBy(object, function(value) { - * return 'group' + value; - * }); - * // => { 'group1': ['a', 'c'], 'group2': ['b'] } - */ -var invertBy = createInverter(function(result, value, key) { - if (value != null && - typeof value.toString != 'function') { - value = nativeObjectToString.call(value); - } - - if (hasOwnProperty.call(result, value)) { - result[value].push(key); - } else { - result[value] = [key]; - } -}, baseIteratee); - -module.exports = invertBy; diff --git a/node_modules/lodash/invoke.js b/node_modules/lodash/invoke.js deleted file mode 100644 index 97d51eb..0000000 --- a/node_modules/lodash/invoke.js +++ /dev/null @@ -1,24 +0,0 @@ -var baseInvoke = require('./_baseInvoke'), - baseRest = require('./_baseRest'); - -/** - * Invokes the method at `path` of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - * @example - * - * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; - * - * _.invoke(object, 'a[0].b.c.slice', 1, 3); - * // => [2, 3] - */ -var invoke = baseRest(baseInvoke); - -module.exports = invoke; diff --git a/node_modules/lodash/invokeMap.js b/node_modules/lodash/invokeMap.js deleted file mode 100644 index 8da5126..0000000 --- a/node_modules/lodash/invokeMap.js +++ /dev/null @@ -1,41 +0,0 @@ -var apply = require('./_apply'), - baseEach = require('./_baseEach'), - baseInvoke = require('./_baseInvoke'), - baseRest = require('./_baseRest'), - isArrayLike = require('./isArrayLike'); - -/** - * Invokes the method at `path` of each element in `collection`, returning - * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `path` is a function, it's invoked - * for, and `this` bound to, each element in `collection`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|string} path The path of the method to invoke or - * the function invoked per iteration. - * @param {...*} [args] The arguments to invoke each method with. - * @returns {Array} Returns the array of results. - * @example - * - * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invokeMap([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ -var invokeMap = baseRest(function(collection, path, args) { - var index = -1, - isFunc = typeof path == 'function', - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value) { - result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); - }); - return result; -}); - -module.exports = invokeMap; diff --git a/node_modules/lodash/isArguments.js b/node_modules/lodash/isArguments.js deleted file mode 100644 index 8b9ed66..0000000 --- a/node_modules/lodash/isArguments.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseIsArguments = require('./_baseIsArguments'), - isObjectLike = require('./isObjectLike'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); -}; - -module.exports = isArguments; diff --git a/node_modules/lodash/isArray.js b/node_modules/lodash/isArray.js deleted file mode 100644 index 88ab55f..0000000 --- a/node_modules/lodash/isArray.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -module.exports = isArray; diff --git a/node_modules/lodash/isArrayBuffer.js b/node_modules/lodash/isArrayBuffer.js deleted file mode 100644 index 12904a6..0000000 --- a/node_modules/lodash/isArrayBuffer.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseIsArrayBuffer = require('./_baseIsArrayBuffer'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer; - -/** - * Checks if `value` is classified as an `ArrayBuffer` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. - * @example - * - * _.isArrayBuffer(new ArrayBuffer(2)); - * // => true - * - * _.isArrayBuffer(new Array(2)); - * // => false - */ -var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; - -module.exports = isArrayBuffer; diff --git a/node_modules/lodash/isArrayLike.js b/node_modules/lodash/isArrayLike.js deleted file mode 100644 index 0f96680..0000000 --- a/node_modules/lodash/isArrayLike.js +++ /dev/null @@ -1,33 +0,0 @@ -var isFunction = require('./isFunction'), - isLength = require('./isLength'); - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -module.exports = isArrayLike; diff --git a/node_modules/lodash/isArrayLikeObject.js b/node_modules/lodash/isArrayLikeObject.js deleted file mode 100644 index 6c4812a..0000000 --- a/node_modules/lodash/isArrayLikeObject.js +++ /dev/null @@ -1,33 +0,0 @@ -var isArrayLike = require('./isArrayLike'), - isObjectLike = require('./isObjectLike'); - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -module.exports = isArrayLikeObject; diff --git a/node_modules/lodash/isBoolean.js b/node_modules/lodash/isBoolean.js deleted file mode 100644 index a43ed4b..0000000 --- a/node_modules/lodash/isBoolean.js +++ /dev/null @@ -1,29 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]'; - -/** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ -function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && baseGetTag(value) == boolTag); -} - -module.exports = isBoolean; diff --git a/node_modules/lodash/isBuffer.js b/node_modules/lodash/isBuffer.js deleted file mode 100644 index c103cc7..0000000 --- a/node_modules/lodash/isBuffer.js +++ /dev/null @@ -1,38 +0,0 @@ -var root = require('./_root'), - stubFalse = require('./stubFalse'); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; - -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; - -module.exports = isBuffer; diff --git a/node_modules/lodash/isDate.js b/node_modules/lodash/isDate.js deleted file mode 100644 index 7f0209f..0000000 --- a/node_modules/lodash/isDate.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseIsDate = require('./_baseIsDate'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsDate = nodeUtil && nodeUtil.isDate; - -/** - * Checks if `value` is classified as a `Date` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - * - * _.isDate('Mon April 23 2012'); - * // => false - */ -var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; - -module.exports = isDate; diff --git a/node_modules/lodash/isElement.js b/node_modules/lodash/isElement.js deleted file mode 100644 index 76ae29c..0000000 --- a/node_modules/lodash/isElement.js +++ /dev/null @@ -1,25 +0,0 @@ -var isObjectLike = require('./isObjectLike'), - isPlainObject = require('./isPlainObject'); - -/** - * Checks if `value` is likely a DOM element. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. - * @example - * - * _.isElement(document.body); - * // => true - * - * _.isElement(''); - * // => false - */ -function isElement(value) { - return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); -} - -module.exports = isElement; diff --git a/node_modules/lodash/isEmpty.js b/node_modules/lodash/isEmpty.js deleted file mode 100644 index 3597294..0000000 --- a/node_modules/lodash/isEmpty.js +++ /dev/null @@ -1,77 +0,0 @@ -var baseKeys = require('./_baseKeys'), - getTag = require('./_getTag'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isArrayLike = require('./isArrayLike'), - isBuffer = require('./isBuffer'), - isPrototype = require('./_isPrototype'), - isTypedArray = require('./isTypedArray'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Checks if `value` is an empty object, collection, map, or set. - * - * Objects are considered empty if they have no own enumerable string keyed - * properties. - * - * Array-like values such as `arguments` objects, arrays, buffers, strings, or - * jQuery-like collections are considered empty if they have a `length` of `0`. - * Similarly, maps and sets are considered empty if they have a `size` of `0`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ -function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && - (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || - isBuffer(value) || isTypedArray(value) || isArguments(value))) { - return !value.length; - } - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; - } - if (isPrototype(value)) { - return !baseKeys(value).length; - } - for (var key in value) { - if (hasOwnProperty.call(value, key)) { - return false; - } - } - return true; -} - -module.exports = isEmpty; diff --git a/node_modules/lodash/isEqual.js b/node_modules/lodash/isEqual.js deleted file mode 100644 index 5e23e76..0000000 --- a/node_modules/lodash/isEqual.js +++ /dev/null @@ -1,35 +0,0 @@ -var baseIsEqual = require('./_baseIsEqual'); - -/** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ -function isEqual(value, other) { - return baseIsEqual(value, other); -} - -module.exports = isEqual; diff --git a/node_modules/lodash/isEqualWith.js b/node_modules/lodash/isEqualWith.js deleted file mode 100644 index 21bdc7f..0000000 --- a/node_modules/lodash/isEqualWith.js +++ /dev/null @@ -1,41 +0,0 @@ -var baseIsEqual = require('./_baseIsEqual'); - -/** - * This method is like `_.isEqual` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with up to - * six arguments: (objValue, othValue [, index|key, object, other, stack]). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, othValue) { - * if (isGreeting(objValue) && isGreeting(othValue)) { - * return true; - * } - * } - * - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * _.isEqualWith(array, other, customizer); - * // => true - */ -function isEqualWith(value, other, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; -} - -module.exports = isEqualWith; diff --git a/node_modules/lodash/isError.js b/node_modules/lodash/isError.js deleted file mode 100644 index b4f41e0..0000000 --- a/node_modules/lodash/isError.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'), - isPlainObject = require('./isPlainObject'); - -/** `Object#toString` result references. */ -var domExcTag = '[object DOMException]', - errorTag = '[object Error]'; - -/** - * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, - * `SyntaxError`, `TypeError`, or `URIError` object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, else `false`. - * @example - * - * _.isError(new Error); - * // => true - * - * _.isError(Error); - * // => false - */ -function isError(value) { - if (!isObjectLike(value)) { - return false; - } - var tag = baseGetTag(value); - return tag == errorTag || tag == domExcTag || - (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); -} - -module.exports = isError; diff --git a/node_modules/lodash/isFinite.js b/node_modules/lodash/isFinite.js deleted file mode 100644 index 601842b..0000000 --- a/node_modules/lodash/isFinite.js +++ /dev/null @@ -1,36 +0,0 @@ -var root = require('./_root'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsFinite = root.isFinite; - -/** - * Checks if `value` is a finite primitive number. - * - * **Note:** This method is based on - * [`Number.isFinite`](https://mdn.io/Number/isFinite). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. - * @example - * - * _.isFinite(3); - * // => true - * - * _.isFinite(Number.MIN_VALUE); - * // => true - * - * _.isFinite(Infinity); - * // => false - * - * _.isFinite('3'); - * // => false - */ -function isFinite(value) { - return typeof value == 'number' && nativeIsFinite(value); -} - -module.exports = isFinite; diff --git a/node_modules/lodash/isFunction.js b/node_modules/lodash/isFunction.js deleted file mode 100644 index 907a8cd..0000000 --- a/node_modules/lodash/isFunction.js +++ /dev/null @@ -1,37 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObject = require('./isObject'); - -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - proxyTag = '[object Proxy]'; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} - -module.exports = isFunction; diff --git a/node_modules/lodash/isInteger.js b/node_modules/lodash/isInteger.js deleted file mode 100644 index 66aa87d..0000000 --- a/node_modules/lodash/isInteger.js +++ /dev/null @@ -1,33 +0,0 @@ -var toInteger = require('./toInteger'); - -/** - * Checks if `value` is an integer. - * - * **Note:** This method is based on - * [`Number.isInteger`](https://mdn.io/Number/isInteger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an integer, else `false`. - * @example - * - * _.isInteger(3); - * // => true - * - * _.isInteger(Number.MIN_VALUE); - * // => false - * - * _.isInteger(Infinity); - * // => false - * - * _.isInteger('3'); - * // => false - */ -function isInteger(value) { - return typeof value == 'number' && value == toInteger(value); -} - -module.exports = isInteger; diff --git a/node_modules/lodash/isLength.js b/node_modules/lodash/isLength.js deleted file mode 100644 index 3a95caa..0000000 --- a/node_modules/lodash/isLength.js +++ /dev/null @@ -1,35 +0,0 @@ -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -module.exports = isLength; diff --git a/node_modules/lodash/isMap.js b/node_modules/lodash/isMap.js deleted file mode 100644 index 44f8517..0000000 --- a/node_modules/lodash/isMap.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseIsMap = require('./_baseIsMap'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsMap = nodeUtil && nodeUtil.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; - -module.exports = isMap; diff --git a/node_modules/lodash/isMatch.js b/node_modules/lodash/isMatch.js deleted file mode 100644 index 9773a18..0000000 --- a/node_modules/lodash/isMatch.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseIsMatch = require('./_baseIsMatch'), - getMatchData = require('./_getMatchData'); - -/** - * Performs a partial deep comparison between `object` and `source` to - * determine if `object` contains equivalent property values. - * - * **Note:** This method is equivalent to `_.matches` when `source` is - * partially applied. - * - * Partial comparisons will match empty array and empty object `source` - * values against any array or object value, respectively. See `_.isEqual` - * for a list of supported value comparisons. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * - * _.isMatch(object, { 'b': 2 }); - * // => true - * - * _.isMatch(object, { 'b': 1 }); - * // => false - */ -function isMatch(object, source) { - return object === source || baseIsMatch(object, source, getMatchData(source)); -} - -module.exports = isMatch; diff --git a/node_modules/lodash/isMatchWith.js b/node_modules/lodash/isMatchWith.js deleted file mode 100644 index 187b6a6..0000000 --- a/node_modules/lodash/isMatchWith.js +++ /dev/null @@ -1,41 +0,0 @@ -var baseIsMatch = require('./_baseIsMatch'), - getMatchData = require('./_getMatchData'); - -/** - * This method is like `_.isMatch` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with five - * arguments: (objValue, srcValue, index|key, object, source). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, srcValue) { - * if (isGreeting(objValue) && isGreeting(srcValue)) { - * return true; - * } - * } - * - * var object = { 'greeting': 'hello' }; - * var source = { 'greeting': 'hi' }; - * - * _.isMatchWith(object, source, customizer); - * // => true - */ -function isMatchWith(object, source, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseIsMatch(object, source, getMatchData(source), customizer); -} - -module.exports = isMatchWith; diff --git a/node_modules/lodash/isNaN.js b/node_modules/lodash/isNaN.js deleted file mode 100644 index 7d0d783..0000000 --- a/node_modules/lodash/isNaN.js +++ /dev/null @@ -1,38 +0,0 @@ -var isNumber = require('./isNumber'); - -/** - * Checks if `value` is `NaN`. - * - * **Note:** This method is based on - * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as - * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for - * `undefined` and other non-number values. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - * @example - * - * _.isNaN(NaN); - * // => true - * - * _.isNaN(new Number(NaN)); - * // => true - * - * isNaN(undefined); - * // => true - * - * _.isNaN(undefined); - * // => false - */ -function isNaN(value) { - // An `NaN` primitive is the only value that is not equal to itself. - // Perform the `toStringTag` check first to avoid errors with some - // ActiveX objects in IE. - return isNumber(value) && value != +value; -} - -module.exports = isNaN; diff --git a/node_modules/lodash/isNative.js b/node_modules/lodash/isNative.js deleted file mode 100644 index f0cb8d5..0000000 --- a/node_modules/lodash/isNative.js +++ /dev/null @@ -1,40 +0,0 @@ -var baseIsNative = require('./_baseIsNative'), - isMaskable = require('./_isMaskable'); - -/** Error message constants. */ -var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'; - -/** - * Checks if `value` is a pristine native function. - * - * **Note:** This method can't reliably detect native functions in the presence - * of the core-js package because core-js circumvents this kind of detection. - * Despite multiple requests, the core-js maintainer has made it clear: any - * attempt to fix the detection will be obstructed. As a result, we're left - * with little choice but to throw an error. Unfortunately, this also affects - * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), - * which rely on core-js. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ -function isNative(value) { - if (isMaskable(value)) { - throw new Error(CORE_ERROR_TEXT); - } - return baseIsNative(value); -} - -module.exports = isNative; diff --git a/node_modules/lodash/isNil.js b/node_modules/lodash/isNil.js deleted file mode 100644 index 79f0505..0000000 --- a/node_modules/lodash/isNil.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Checks if `value` is `null` or `undefined`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is nullish, else `false`. - * @example - * - * _.isNil(null); - * // => true - * - * _.isNil(void 0); - * // => true - * - * _.isNil(NaN); - * // => false - */ -function isNil(value) { - return value == null; -} - -module.exports = isNil; diff --git a/node_modules/lodash/isNull.js b/node_modules/lodash/isNull.js deleted file mode 100644 index c0a374d..0000000 --- a/node_modules/lodash/isNull.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Checks if `value` is `null`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(void 0); - * // => false - */ -function isNull(value) { - return value === null; -} - -module.exports = isNull; diff --git a/node_modules/lodash/isNumber.js b/node_modules/lodash/isNumber.js deleted file mode 100644 index cd34ee4..0000000 --- a/node_modules/lodash/isNumber.js +++ /dev/null @@ -1,38 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var numberTag = '[object Number]'; - -/** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are - * classified as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a number, else `false`. - * @example - * - * _.isNumber(3); - * // => true - * - * _.isNumber(Number.MIN_VALUE); - * // => true - * - * _.isNumber(Infinity); - * // => true - * - * _.isNumber('3'); - * // => false - */ -function isNumber(value) { - return typeof value == 'number' || - (isObjectLike(value) && baseGetTag(value) == numberTag); -} - -module.exports = isNumber; diff --git a/node_modules/lodash/isObject.js b/node_modules/lodash/isObject.js deleted file mode 100644 index 1dc8939..0000000 --- a/node_modules/lodash/isObject.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -module.exports = isObject; diff --git a/node_modules/lodash/isObjectLike.js b/node_modules/lodash/isObjectLike.js deleted file mode 100644 index 301716b..0000000 --- a/node_modules/lodash/isObjectLike.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -module.exports = isObjectLike; diff --git a/node_modules/lodash/isPlainObject.js b/node_modules/lodash/isPlainObject.js deleted file mode 100644 index 2387373..0000000 --- a/node_modules/lodash/isPlainObject.js +++ /dev/null @@ -1,62 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - getPrototype = require('./_getPrototype'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; -} - -module.exports = isPlainObject; diff --git a/node_modules/lodash/isRegExp.js b/node_modules/lodash/isRegExp.js deleted file mode 100644 index 76c9b6e..0000000 --- a/node_modules/lodash/isRegExp.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseIsRegExp = require('./_baseIsRegExp'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; - -/** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - * @example - * - * _.isRegExp(/abc/); - * // => true - * - * _.isRegExp('/abc/'); - * // => false - */ -var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; - -module.exports = isRegExp; diff --git a/node_modules/lodash/isSafeInteger.js b/node_modules/lodash/isSafeInteger.js deleted file mode 100644 index 2a48526..0000000 --- a/node_modules/lodash/isSafeInteger.js +++ /dev/null @@ -1,37 +0,0 @@ -var isInteger = require('./isInteger'); - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 - * double precision number which isn't the result of a rounded unsafe integer. - * - * **Note:** This method is based on - * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. - * @example - * - * _.isSafeInteger(3); - * // => true - * - * _.isSafeInteger(Number.MIN_VALUE); - * // => false - * - * _.isSafeInteger(Infinity); - * // => false - * - * _.isSafeInteger('3'); - * // => false - */ -function isSafeInteger(value) { - return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; -} - -module.exports = isSafeInteger; diff --git a/node_modules/lodash/isSet.js b/node_modules/lodash/isSet.js deleted file mode 100644 index ab88bdf..0000000 --- a/node_modules/lodash/isSet.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseIsSet = require('./_baseIsSet'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsSet = nodeUtil && nodeUtil.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; - -module.exports = isSet; diff --git a/node_modules/lodash/isString.js b/node_modules/lodash/isString.js deleted file mode 100644 index 627eb9c..0000000 --- a/node_modules/lodash/isString.js +++ /dev/null @@ -1,30 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isArray = require('./isArray'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); -} - -module.exports = isString; diff --git a/node_modules/lodash/isSymbol.js b/node_modules/lodash/isSymbol.js deleted file mode 100644 index dfb60b9..0000000 --- a/node_modules/lodash/isSymbol.js +++ /dev/null @@ -1,29 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} - -module.exports = isSymbol; diff --git a/node_modules/lodash/isTypedArray.js b/node_modules/lodash/isTypedArray.js deleted file mode 100644 index da3f8dd..0000000 --- a/node_modules/lodash/isTypedArray.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseIsTypedArray = require('./_baseIsTypedArray'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - -module.exports = isTypedArray; diff --git a/node_modules/lodash/isUndefined.js b/node_modules/lodash/isUndefined.js deleted file mode 100644 index 377d121..0000000 --- a/node_modules/lodash/isUndefined.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -module.exports = isUndefined; diff --git a/node_modules/lodash/isWeakMap.js b/node_modules/lodash/isWeakMap.js deleted file mode 100644 index 8d36f66..0000000 --- a/node_modules/lodash/isWeakMap.js +++ /dev/null @@ -1,28 +0,0 @@ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var weakMapTag = '[object WeakMap]'; - -/** - * Checks if `value` is classified as a `WeakMap` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. - * @example - * - * _.isWeakMap(new WeakMap); - * // => true - * - * _.isWeakMap(new Map); - * // => false - */ -function isWeakMap(value) { - return isObjectLike(value) && getTag(value) == weakMapTag; -} - -module.exports = isWeakMap; diff --git a/node_modules/lodash/isWeakSet.js b/node_modules/lodash/isWeakSet.js deleted file mode 100644 index e628b26..0000000 --- a/node_modules/lodash/isWeakSet.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var weakSetTag = '[object WeakSet]'; - -/** - * Checks if `value` is classified as a `WeakSet` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. - * @example - * - * _.isWeakSet(new WeakSet); - * // => true - * - * _.isWeakSet(new Set); - * // => false - */ -function isWeakSet(value) { - return isObjectLike(value) && baseGetTag(value) == weakSetTag; -} - -module.exports = isWeakSet; diff --git a/node_modules/lodash/iteratee.js b/node_modules/lodash/iteratee.js deleted file mode 100644 index 61b73a8..0000000 --- a/node_modules/lodash/iteratee.js +++ /dev/null @@ -1,53 +0,0 @@ -var baseClone = require('./_baseClone'), - baseIteratee = require('./_baseIteratee'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1; - -/** - * Creates a function that invokes `func` with the arguments of the created - * function. If `func` is a property name, the created function returns the - * property value for a given element. If `func` is an array or object, the - * created function returns `true` for elements that contain the equivalent - * source properties, otherwise it returns `false`. - * - * @static - * @since 4.0.0 - * @memberOf _ - * @category Util - * @param {*} [func=_.identity] The value to convert to a callback. - * @returns {Function} Returns the callback. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); - * // => [{ 'user': 'barney', 'age': 36, 'active': true }] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, _.iteratee(['user', 'fred'])); - * // => [{ 'user': 'fred', 'age': 40 }] - * - * // The `_.property` iteratee shorthand. - * _.map(users, _.iteratee('user')); - * // => ['barney', 'fred'] - * - * // Create custom iteratee shorthands. - * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { - * return !_.isRegExp(func) ? iteratee(func) : function(string) { - * return func.test(string); - * }; - * }); - * - * _.filter(['abc', 'def'], /ef/); - * // => ['def'] - */ -function iteratee(func) { - return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); -} - -module.exports = iteratee; diff --git a/node_modules/lodash/join.js b/node_modules/lodash/join.js deleted file mode 100644 index 45de079..0000000 --- a/node_modules/lodash/join.js +++ /dev/null @@ -1,26 +0,0 @@ -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeJoin = arrayProto.join; - -/** - * Converts all elements in `array` into a string separated by `separator`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to convert. - * @param {string} [separator=','] The element separator. - * @returns {string} Returns the joined string. - * @example - * - * _.join(['a', 'b', 'c'], '~'); - * // => 'a~b~c' - */ -function join(array, separator) { - return array == null ? '' : nativeJoin.call(array, separator); -} - -module.exports = join; diff --git a/node_modules/lodash/kebabCase.js b/node_modules/lodash/kebabCase.js deleted file mode 100644 index 8a52be6..0000000 --- a/node_modules/lodash/kebabCase.js +++ /dev/null @@ -1,28 +0,0 @@ -var createCompounder = require('./_createCompounder'); - -/** - * Converts `string` to - * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the kebab cased string. - * @example - * - * _.kebabCase('Foo Bar'); - * // => 'foo-bar' - * - * _.kebabCase('fooBar'); - * // => 'foo-bar' - * - * _.kebabCase('__FOO_BAR__'); - * // => 'foo-bar' - */ -var kebabCase = createCompounder(function(result, word, index) { - return result + (index ? '-' : '') + word.toLowerCase(); -}); - -module.exports = kebabCase; diff --git a/node_modules/lodash/keyBy.js b/node_modules/lodash/keyBy.js deleted file mode 100644 index acc007a..0000000 --- a/node_modules/lodash/keyBy.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseAssignValue = require('./_baseAssignValue'), - createAggregator = require('./_createAggregator'); - -/** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is the last element responsible for generating the key. The - * iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * var array = [ - * { 'dir': 'left', 'code': 97 }, - * { 'dir': 'right', 'code': 100 } - * ]; - * - * _.keyBy(array, function(o) { - * return String.fromCharCode(o.code); - * }); - * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } - * - * _.keyBy(array, 'dir'); - * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } - */ -var keyBy = createAggregator(function(result, value, key) { - baseAssignValue(result, key, value); -}); - -module.exports = keyBy; diff --git a/node_modules/lodash/keys.js b/node_modules/lodash/keys.js deleted file mode 100644 index d143c71..0000000 --- a/node_modules/lodash/keys.js +++ /dev/null @@ -1,37 +0,0 @@ -var arrayLikeKeys = require('./_arrayLikeKeys'), - baseKeys = require('./_baseKeys'), - isArrayLike = require('./isArrayLike'); - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} - -module.exports = keys; diff --git a/node_modules/lodash/keysIn.js b/node_modules/lodash/keysIn.js deleted file mode 100644 index a62308f..0000000 --- a/node_modules/lodash/keysIn.js +++ /dev/null @@ -1,32 +0,0 @@ -var arrayLikeKeys = require('./_arrayLikeKeys'), - baseKeysIn = require('./_baseKeysIn'), - isArrayLike = require('./isArrayLike'); - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); -} - -module.exports = keysIn; diff --git a/node_modules/lodash/lang.js b/node_modules/lodash/lang.js deleted file mode 100644 index a396216..0000000 --- a/node_modules/lodash/lang.js +++ /dev/null @@ -1,58 +0,0 @@ -module.exports = { - 'castArray': require('./castArray'), - 'clone': require('./clone'), - 'cloneDeep': require('./cloneDeep'), - 'cloneDeepWith': require('./cloneDeepWith'), - 'cloneWith': require('./cloneWith'), - 'conformsTo': require('./conformsTo'), - 'eq': require('./eq'), - 'gt': require('./gt'), - 'gte': require('./gte'), - 'isArguments': require('./isArguments'), - 'isArray': require('./isArray'), - 'isArrayBuffer': require('./isArrayBuffer'), - 'isArrayLike': require('./isArrayLike'), - 'isArrayLikeObject': require('./isArrayLikeObject'), - 'isBoolean': require('./isBoolean'), - 'isBuffer': require('./isBuffer'), - 'isDate': require('./isDate'), - 'isElement': require('./isElement'), - 'isEmpty': require('./isEmpty'), - 'isEqual': require('./isEqual'), - 'isEqualWith': require('./isEqualWith'), - 'isError': require('./isError'), - 'isFinite': require('./isFinite'), - 'isFunction': require('./isFunction'), - 'isInteger': require('./isInteger'), - 'isLength': require('./isLength'), - 'isMap': require('./isMap'), - 'isMatch': require('./isMatch'), - 'isMatchWith': require('./isMatchWith'), - 'isNaN': require('./isNaN'), - 'isNative': require('./isNative'), - 'isNil': require('./isNil'), - 'isNull': require('./isNull'), - 'isNumber': require('./isNumber'), - 'isObject': require('./isObject'), - 'isObjectLike': require('./isObjectLike'), - 'isPlainObject': require('./isPlainObject'), - 'isRegExp': require('./isRegExp'), - 'isSafeInteger': require('./isSafeInteger'), - 'isSet': require('./isSet'), - 'isString': require('./isString'), - 'isSymbol': require('./isSymbol'), - 'isTypedArray': require('./isTypedArray'), - 'isUndefined': require('./isUndefined'), - 'isWeakMap': require('./isWeakMap'), - 'isWeakSet': require('./isWeakSet'), - 'lt': require('./lt'), - 'lte': require('./lte'), - 'toArray': require('./toArray'), - 'toFinite': require('./toFinite'), - 'toInteger': require('./toInteger'), - 'toLength': require('./toLength'), - 'toNumber': require('./toNumber'), - 'toPlainObject': require('./toPlainObject'), - 'toSafeInteger': require('./toSafeInteger'), - 'toString': require('./toString') -}; diff --git a/node_modules/lodash/last.js b/node_modules/lodash/last.js deleted file mode 100644 index cad1eaf..0000000 --- a/node_modules/lodash/last.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} - -module.exports = last; diff --git a/node_modules/lodash/lastIndexOf.js b/node_modules/lodash/lastIndexOf.js deleted file mode 100644 index dabfb61..0000000 --- a/node_modules/lodash/lastIndexOf.js +++ /dev/null @@ -1,46 +0,0 @@ -var baseFindIndex = require('./_baseFindIndex'), - baseIsNaN = require('./_baseIsNaN'), - strictLastIndexOf = require('./_strictLastIndexOf'), - toInteger = require('./toInteger'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * This method is like `_.indexOf` except that it iterates over elements of - * `array` from right to left. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.lastIndexOf([1, 2, 1, 2], 2); - * // => 3 - * - * // Search from the `fromIndex`. - * _.lastIndexOf([1, 2, 1, 2], 2, 2); - * // => 1 - */ -function lastIndexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); - } - return value === value - ? strictLastIndexOf(array, value, index) - : baseFindIndex(array, baseIsNaN, index, true); -} - -module.exports = lastIndexOf; diff --git a/node_modules/lodash/lodash.js b/node_modules/lodash/lodash.js deleted file mode 100644 index 4131e93..0000000 --- a/node_modules/lodash/lodash.js +++ /dev/null @@ -1,17209 +0,0 @@ -/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -;(function() { - - /** Used as a safe reference for `undefined` in pre-ES5 environments. */ - var undefined; - - /** Used as the semantic version number. */ - var VERSION = '4.17.21'; - - /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; - - /** Error message constants. */ - var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', - FUNC_ERROR_TEXT = 'Expected a function', - INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'; - - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; - - /** Used as the maximum memoize cache size. */ - var MAX_MEMOIZE_SIZE = 500; - - /** Used as the internal argument placeholder. */ - var PLACEHOLDER = '__lodash_placeholder__'; - - /** Used to compose bitmasks for cloning. */ - var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - - /** Used to compose bitmasks for value comparisons. */ - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - - /** Used to compose bitmasks for function metadata. */ - var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256, - WRAP_FLIP_FLAG = 512; - - /** Used as default options for `_.truncate`. */ - var DEFAULT_TRUNC_LENGTH = 30, - DEFAULT_TRUNC_OMISSION = '...'; - - /** Used to detect hot functions by number of calls within a span of milliseconds. */ - var HOT_COUNT = 800, - HOT_SPAN = 16; - - /** Used to indicate the type of lazy iteratees. */ - var LAZY_FILTER_FLAG = 1, - LAZY_MAP_FLAG = 2, - LAZY_WHILE_FLAG = 3; - - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - - /** Used as references for the maximum length and index of an array. */ - var MAX_ARRAY_LENGTH = 4294967295, - MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, - HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - - /** Used to associate wrap methods with their bit flags. */ - var wrapFlags = [ - ['ary', WRAP_ARY_FLAG], - ['bind', WRAP_BIND_FLAG], - ['bindKey', WRAP_BIND_KEY_FLAG], - ['curry', WRAP_CURRY_FLAG], - ['curryRight', WRAP_CURRY_RIGHT_FLAG], - ['flip', WRAP_FLIP_FLAG], - ['partial', WRAP_PARTIAL_FLAG], - ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], - ['rearg', WRAP_REARG_FLAG] - ]; - - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - domExcTag = '[object DOMException]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - nullTag = '[object Null]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - undefinedTag = '[object Undefined]', - weakMapTag = '[object WeakMap]', - weakSetTag = '[object WeakSet]'; - - var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - - /** Used to match empty string literals in compiled template source. */ - var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - - /** Used to match HTML entities and HTML characters. */ - var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, - reUnescapedHtml = /[&<>"']/g, - reHasEscapedHtml = RegExp(reEscapedHtml.source), - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - - /** Used to match template delimiters. */ - var reEscape = /<%-([\s\S]+?)%>/g, - reEvaluate = /<%([\s\S]+?)%>/g, - reInterpolate = /<%=([\s\S]+?)%>/g; - - /** Used to match property names within property paths. */ - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - - /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, - reHasRegExpChar = RegExp(reRegExpChar.source); - - /** Used to match leading whitespace. */ - var reTrimStart = /^\s+/; - - /** Used to match a single whitespace character. */ - var reWhitespace = /\s/; - - /** Used to match wrap detail comments. */ - var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, - reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, - reSplitDetails = /,? & /; - - /** Used to match words composed of alphanumeric characters. */ - var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; - - /** - * Used to validate the `validate` option in `_.template` variable. - * - * Forbids characters which could potentially change the meaning of the function argument definition: - * - "()," (modification of function parameters) - * - "=" (default value) - * - "[]{}" (destructuring of function parameters) - * - "/" (beginning of a comment) - * - whitespace - */ - var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; - - /** Used to match backslashes in property paths. */ - var reEscapeChar = /\\(\\)?/g; - - /** - * Used to match - * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). - */ - var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - - /** Used to match `RegExp` flags from their coerced string values. */ - var reFlags = /\w*$/; - - /** Used to detect bad signed hexadecimal string values. */ - var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - - /** Used to detect binary string values. */ - var reIsBinary = /^0b[01]+$/i; - - /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; - - /** Used to detect octal string values. */ - var reIsOctal = /^0o[0-7]+$/i; - - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; - - /** Used to match Latin Unicode letters (excluding mathematical operators). */ - var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; - - /** Used to ensure capturing order of template delimiters. */ - var reNoMatch = /($^)/; - - /** Used to match unescaped characters in compiled string literals. */ - var reUnescapedString = /['\n\r\u2028\u2029\\]/g; - - /** Used to compose unicode character classes. */ - var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsDingbatRange = '\\u2700-\\u27bf', - rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', - rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', - rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsPunctuationRange = '\\u2000-\\u206f', - rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', - rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', - rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; - - /** Used to compose unicode capture groups. */ - var rsApos = "['\u2019]", - rsAstral = '[' + rsAstralRange + ']', - rsBreak = '[' + rsBreakRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsDigits = '\\d+', - rsDingbat = '[' + rsDingbatRange + ']', - rsLower = '[' + rsLowerRange + ']', - rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsUpper = '[' + rsUpperRange + ']', - rsZWJ = '\\u200d'; - - /** Used to compose unicode regexes. */ - var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', - rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', - reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', - rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - - /** Used to match apostrophes. */ - var reApos = RegExp(rsApos, 'g'); - - /** - * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and - * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). - */ - var reComboMark = RegExp(rsCombo, 'g'); - - /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ - var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - - /** Used to match complex or compound words. */ - var reUnicodeWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', - rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, - rsUpper + '+' + rsOptContrUpper, - rsOrdUpper, - rsOrdLower, - rsDigits, - rsEmoji - ].join('|'), 'g'); - - /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ - var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - - /** Used to detect strings that need a more robust regexp to match words. */ - var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; - - /** Used to assign default `context` object properties. */ - var contextProps = [ - 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', - 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', - 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', - 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', - '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' - ]; - - /** Used to make template sourceURLs easier to identify. */ - var templateCounter = -1; - - /** Used to identify `toStringTag` values of typed arrays. */ - var typedArrayTags = {}; - typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = - typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = - typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = - typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = - typedArrayTags[uint32Tag] = true; - typedArrayTags[argsTag] = typedArrayTags[arrayTag] = - typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = - typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = - typedArrayTags[errorTag] = typedArrayTags[funcTag] = - typedArrayTags[mapTag] = typedArrayTags[numberTag] = - typedArrayTags[objectTag] = typedArrayTags[regexpTag] = - typedArrayTags[setTag] = typedArrayTags[stringTag] = - typedArrayTags[weakMapTag] = false; - - /** Used to identify `toStringTag` values supported by `_.clone`. */ - var cloneableTags = {}; - cloneableTags[argsTag] = cloneableTags[arrayTag] = - cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = - cloneableTags[boolTag] = cloneableTags[dateTag] = - cloneableTags[float32Tag] = cloneableTags[float64Tag] = - cloneableTags[int8Tag] = cloneableTags[int16Tag] = - cloneableTags[int32Tag] = cloneableTags[mapTag] = - cloneableTags[numberTag] = cloneableTags[objectTag] = - cloneableTags[regexpTag] = cloneableTags[setTag] = - cloneableTags[stringTag] = cloneableTags[symbolTag] = - cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = - cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; - cloneableTags[errorTag] = cloneableTags[funcTag] = - cloneableTags[weakMapTag] = false; - - /** Used to map Latin Unicode letters to basic Latin letters. */ - var deburredLetters = { - // Latin-1 Supplement block. - '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', - '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', - '\xc7': 'C', '\xe7': 'c', - '\xd0': 'D', '\xf0': 'd', - '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', - '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', - '\xd1': 'N', '\xf1': 'n', - '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', - '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', - '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', - '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', - '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', - '\xc6': 'Ae', '\xe6': 'ae', - '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss', - // Latin Extended-A block. - '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', - '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', - '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', - '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', - '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', - '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', - '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', - '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', - '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', - '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', - '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', - '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', - '\u0134': 'J', '\u0135': 'j', - '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', - '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', - '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', - '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', - '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', - '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', - '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', - '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', - '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', - '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', - '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', - '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', - '\u0163': 't', '\u0165': 't', '\u0167': 't', - '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', - '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', - '\u0174': 'W', '\u0175': 'w', - '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', - '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', - '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', - '\u0132': 'IJ', '\u0133': 'ij', - '\u0152': 'Oe', '\u0153': 'oe', - '\u0149': "'n", '\u017f': 's' - }; - - /** Used to map characters to HTML entities. */ - var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; - - /** Used to map HTML entities to characters. */ - var htmlUnescapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - ''': "'" - }; - - /** Used to escape characters for inclusion in compiled string literals. */ - var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - /** Built-in method references without a dependency on `root`. */ - var freeParseFloat = parseFloat, - freeParseInt = parseInt; - - /** Detect free variable `global` from Node.js. */ - var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - - /** Detect free variable `self`. */ - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function('return this')(); - - /** Detect free variable `exports`. */ - var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - - /** Detect free variable `module`. */ - var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - - /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = freeModule && freeModule.exports === freeExports; - - /** Detect free variable `process` from Node.js. */ - var freeProcess = moduleExports && freeGlobal.process; - - /** Used to access faster Node.js helpers. */ - var nodeUtil = (function() { - try { - // Use `util.types` for Node.js 10+. - var types = freeModule && freeModule.require && freeModule.require('util').types; - - if (types) { - return types; - } - - // Legacy `process.binding('util')` for Node.js < 10. - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} - }()); - - /* Node.js helper references. */ - var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, - nodeIsDate = nodeUtil && nodeUtil.isDate, - nodeIsMap = nodeUtil && nodeUtil.isMap, - nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, - nodeIsSet = nodeUtil && nodeUtil.isSet, - nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - - /*--------------------------------------------------------------------------*/ - - /** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ - function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); - } - - /** - * A specialized version of `baseAggregator` for arrays. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ - function arrayAggregator(array, setter, iteratee, accumulator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - var value = array[index]; - setter(accumulator, value, iteratee(value), array); - } - return accumulator; - } - - /** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; - } - - /** - * A specialized version of `_.forEachRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEachRight(array, iteratee) { - var length = array == null ? 0 : array.length; - - while (length--) { - if (iteratee(array[length], length, array) === false) { - break; - } - } - return array; - } - - /** - * A specialized version of `_.every` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - */ - function arrayEvery(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (!predicate(array[index], index, array)) { - return false; - } - } - return true; - } - - /** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; - } - - /** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ - function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; - } - - /** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ - function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; - } - - /** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; - } - - /** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ - function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; - } - - /** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; - } - - /** - * A specialized version of `_.reduceRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the last element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array == null ? 0 : array.length; - if (initAccum && length) { - accumulator = array[--length]; - } - while (length--) { - accumulator = iteratee(accumulator, array[length], length, array); - } - return accumulator; - } - - /** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; - } - - /** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ - var asciiSize = baseProperty('length'); - - /** - * Converts an ASCII `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function asciiToArray(string) { - return string.split(''); - } - - /** - * Splits an ASCII `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ - function asciiWords(string) { - return string.match(reAsciiWord) || []; - } - - /** - * The base implementation of methods like `_.findKey` and `_.findLastKey`, - * without support for iteratee shorthands, which iterates over `collection` - * using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the found element or its key, else `undefined`. - */ - function baseFindKey(collection, predicate, eachFunc) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = key; - return false; - } - }); - return result; - } - - /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; - } - - /** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); - } - - /** - * This function is like `baseIndexOf` except that it accepts a comparator. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @param {Function} comparator The comparator invoked per element. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOfWith(array, value, fromIndex, comparator) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (comparator(array[index], value)) { - return index; - } - } - return -1; - } - - /** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ - function baseIsNaN(value) { - return value !== value; - } - - /** - * The base implementation of `_.mean` and `_.meanBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the mean. - */ - function baseMean(array, iteratee) { - var length = array == null ? 0 : array.length; - return length ? (baseSum(array, iteratee) / length) : NAN; - } - - /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } - - /** - * The base implementation of `_.propertyOf` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - */ - function basePropertyOf(object) { - return function(key) { - return object == null ? undefined : object[key]; - }; - } - - /** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ - function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; - } - - /** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ - function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; - } - - /** - * The base implementation of `_.sum` and `_.sumBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the sum. - */ - function baseSum(array, iteratee) { - var result, - index = -1, - length = array.length; - - while (++index < length) { - var current = iteratee(array[index]); - if (current !== undefined) { - result = result === undefined ? current : (result + current); - } - } - return result; - } - - /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; - } - - /** - * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array - * of key-value pairs for `object` corresponding to the property names of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the key-value pairs. - */ - function baseToPairs(object, props) { - return arrayMap(props, function(key) { - return [key, object[key]]; - }); - } - - /** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ - function baseTrim(string) { - return string - ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; - } - - /** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ - function baseUnary(func) { - return function(value) { - return func(value); - }; - } - - /** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ - function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); - } - - /** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function cacheHas(cache, key) { - return cache.has(key); - } - - /** - * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the first unmatched string symbol. - */ - function charsStartIndex(strSymbols, chrSymbols) { - var index = -1, - length = strSymbols.length; - - while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; - } - - /** - * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the last unmatched string symbol. - */ - function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; - - while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; - } - - /** - * Gets the number of `placeholder` occurrences in `array`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} placeholder The placeholder to search for. - * @returns {number} Returns the placeholder count. - */ - function countHolders(array, placeholder) { - var length = array.length, - result = 0; - - while (length--) { - if (array[length] === placeholder) { - ++result; - } - } - return result; - } - - /** - * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A - * letters to basic Latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ - var deburrLetter = basePropertyOf(deburredLetters); - - /** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - var escapeHtmlChar = basePropertyOf(htmlEscapes); - - /** - * Used by `_.template` to escape characters for inclusion in compiled string literals. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - function escapeStringChar(chr) { - return '\\' + stringEscapes[chr]; - } - - /** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - function getValue(object, key) { - return object == null ? undefined : object[key]; - } - - /** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ - function hasUnicode(string) { - return reHasUnicode.test(string); - } - - /** - * Checks if `string` contains a word composed of Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a word is found, else `false`. - */ - function hasUnicodeWord(string) { - return reHasUnicodeWord.test(string); - } - - /** - * Converts `iterator` to an array. - * - * @private - * @param {Object} iterator The iterator to convert. - * @returns {Array} Returns the converted array. - */ - function iteratorToArray(iterator) { - var data, - result = []; - - while (!(data = iterator.next()).done) { - result.push(data.value); - } - return result; - } - - /** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ - function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; - } - - /** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ - function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; - } - - /** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ - function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value === placeholder || value === PLACEHOLDER) { - array[index] = PLACEHOLDER; - result[resIndex++] = index; - } - } - return result; - } - - /** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ - function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; - } - - /** - * Converts `set` to its value-value pairs. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the value-value pairs. - */ - function setToPairs(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = [value, value]; - }); - return result; - } - - /** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; - } - - /** - * A specialized version of `_.lastIndexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function strictLastIndexOf(array, value, fromIndex) { - var index = fromIndex + 1; - while (index--) { - if (array[index] === value) { - return index; - } - } - return index; - } - - /** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ - function stringSize(string) { - return hasUnicode(string) - ? unicodeSize(string) - : asciiSize(string); - } - - /** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function stringToArray(string) { - return hasUnicode(string) - ? unicodeToArray(string) - : asciiToArray(string); - } - - /** - * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ - function trimmedEndIndex(string) { - var index = string.length; - - while (index-- && reWhitespace.test(string.charAt(index))) {} - return index; - } - - /** - * Used by `_.unescape` to convert HTML entities to characters. - * - * @private - * @param {string} chr The matched character to unescape. - * @returns {string} Returns the unescaped character. - */ - var unescapeHtmlChar = basePropertyOf(htmlUnescapes); - - /** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ - function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; - } - - /** - * Converts a Unicode `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function unicodeToArray(string) { - return string.match(reUnicode) || []; - } - - /** - * Splits a Unicode `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ - function unicodeWords(string) { - return string.match(reUnicodeWord) || []; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Create a new pristine `lodash` function using the `context` object. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Util - * @param {Object} [context=root] The context object. - * @returns {Function} Returns a new `lodash` function. - * @example - * - * _.mixin({ 'foo': _.constant('foo') }); - * - * var lodash = _.runInContext(); - * lodash.mixin({ 'bar': lodash.constant('bar') }); - * - * _.isFunction(_.foo); - * // => true - * _.isFunction(_.bar); - * // => false - * - * lodash.isFunction(lodash.foo); - * // => false - * lodash.isFunction(lodash.bar); - * // => true - * - * // Create a suped-up `defer` in Node.js. - * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; - */ - var runInContext = (function runInContext(context) { - context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); - - /** Built-in constructor references. */ - var Array = context.Array, - Date = context.Date, - Error = context.Error, - Function = context.Function, - Math = context.Math, - Object = context.Object, - RegExp = context.RegExp, - String = context.String, - TypeError = context.TypeError; - - /** Used for built-in method references. */ - var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; - - /** Used to detect overreaching core-js shims. */ - var coreJsData = context['__core-js_shared__']; - - /** Used to resolve the decompiled source of functions. */ - var funcToString = funcProto.toString; - - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** Used to generate unique IDs. */ - var idCounter = 0; - - /** Used to detect methods masquerading as native. */ - var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; - }()); - - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ - var nativeObjectToString = objectProto.toString; - - /** Used to infer the `Object` constructor. */ - var objectCtorString = funcToString.call(Object); - - /** Used to restore the original `_` reference in `_.noConflict`. */ - var oldDash = root._; - - /** Used to detect if a method is native. */ - var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' - ); - - /** Built-in value references. */ - var Buffer = moduleExports ? context.Buffer : undefined, - Symbol = context.Symbol, - Uint8Array = context.Uint8Array, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, - getPrototype = overArg(Object.getPrototypeOf, Object), - objectCreate = Object.create, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice, - spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, - symIterator = Symbol ? Symbol.iterator : undefined, - symToStringTag = Symbol ? Symbol.toStringTag : undefined; - - var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} - }()); - - /** Mocked built-ins. */ - var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, - ctxNow = Date && Date.now !== root.Date.now && Date.now, - ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; - - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeCeil = Math.ceil, - nativeFloor = Math.floor, - nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeIsFinite = context.isFinite, - nativeJoin = arrayProto.join, - nativeKeys = overArg(Object.keys, Object), - nativeMax = Math.max, - nativeMin = Math.min, - nativeNow = Date.now, - nativeParseInt = context.parseInt, - nativeRandom = Math.random, - nativeReverse = arrayProto.reverse; - - /* Built-in method references that are verified to be native. */ - var DataView = getNative(context, 'DataView'), - Map = getNative(context, 'Map'), - Promise = getNative(context, 'Promise'), - Set = getNative(context, 'Set'), - WeakMap = getNative(context, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); - - /** Used to store function metadata. */ - var metaMap = WeakMap && new WeakMap; - - /** Used to lookup unminified function names. */ - var realNames = {}; - - /** Used to detect maps, sets, and weakmaps. */ - var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - - /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` object which wraps `value` to enable implicit method - * chain sequences. Methods that operate on and return arrays, collections, - * and functions can be chained together. Methods that retrieve a single value - * or may return a primitive value will automatically end the chain sequence - * and return the unwrapped value. Otherwise, the value must be unwrapped - * with `_#value`. - * - * Explicit chain sequences, which must be unwrapped with `_#value`, may be - * enabled using `_.chain`. - * - * The execution of chained methods is lazy, that is, it's deferred until - * `_#value` is implicitly or explicitly called. - * - * Lazy evaluation allows several methods to support shortcut fusion. - * Shortcut fusion is an optimization to merge iteratee calls; this avoids - * the creation of intermediate arrays and can greatly reduce the number of - * iteratee executions. Sections of a chain sequence qualify for shortcut - * fusion if the section is applied to an array and iteratees accept only - * one argument. The heuristic for whether a section qualifies for shortcut - * fusion is subject to change. - * - * Chaining is supported in custom builds as long as the `_#value` method is - * directly or indirectly included in the build. - * - * In addition to lodash methods, wrappers have `Array` and `String` methods. - * - * The wrapper `Array` methods are: - * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` - * - * The wrapper `String` methods are: - * `replace` and `split` - * - * The wrapper methods that support shortcut fusion are: - * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, - * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, - * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` - * - * The chainable wrapper methods are: - * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, - * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, - * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, - * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, - * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, - * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, - * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, - * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, - * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, - * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, - * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, - * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, - * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, - * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, - * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, - * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, - * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, - * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, - * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, - * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, - * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, - * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, - * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, - * `zipObject`, `zipObjectDeep`, and `zipWith` - * - * The wrapper methods that are **not** chainable by default are: - * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, - * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, - * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, - * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, - * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, - * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, - * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, - * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, - * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, - * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, - * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, - * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, - * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, - * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, - * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, - * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, - * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, - * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, - * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, - * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, - * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, - * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, - * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, - * `upperFirst`, `value`, and `words` - * - * @name _ - * @constructor - * @category Seq - * @param {*} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var wrapped = _([1, 2, 3]); - * - * // Returns an unwrapped value. - * wrapped.reduce(_.add); - * // => 6 - * - * // Returns a wrapped value. - * var squares = wrapped.map(square); - * - * _.isArray(squares); - * // => false - * - * _.isArray(squares.value()); - * // => true - */ - function lodash(value) { - if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { - if (value instanceof LodashWrapper) { - return value; - } - if (hasOwnProperty.call(value, '__wrapped__')) { - return wrapperClone(value); - } - } - return new LodashWrapper(value); - } - - /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ - var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; - }()); - - /** - * The function whose prototype chain sequence wrappers inherit from. - * - * @private - */ - function baseLodash() { - // No operation performed. - } - - /** - * The base constructor for creating `lodash` wrapper objects. - * - * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable explicit method chain sequences. - */ - function LodashWrapper(value, chainAll) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__chain__ = !!chainAll; - this.__index__ = 0; - this.__values__ = undefined; - } - - /** - * By default, the template delimiters used by lodash are like those in - * embedded Ruby (ERB) as well as ES2015 template strings. Change the - * following template settings to use alternative delimiters. - * - * @static - * @memberOf _ - * @type {Object} - */ - lodash.templateSettings = { - - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - 'escape': reEscape, - - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - 'evaluate': reEvaluate, - - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - 'interpolate': reInterpolate, - - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type {string} - */ - 'variable': '', - - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type {Object} - */ - 'imports': { - - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type {Function} - */ - '_': lodash - } - }; - - // Ensure wrappers are instances of `baseLodash`. - lodash.prototype = baseLodash.prototype; - lodash.prototype.constructor = lodash; - - LodashWrapper.prototype = baseCreate(baseLodash.prototype); - LodashWrapper.prototype.constructor = LodashWrapper; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. - * - * @private - * @constructor - * @param {*} value The value to wrap. - */ - function LazyWrapper(value) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__dir__ = 1; - this.__filtered__ = false; - this.__iteratees__ = []; - this.__takeCount__ = MAX_ARRAY_LENGTH; - this.__views__ = []; - } - - /** - * Creates a clone of the lazy wrapper object. - * - * @private - * @name clone - * @memberOf LazyWrapper - * @returns {Object} Returns the cloned `LazyWrapper` object. - */ - function lazyClone() { - var result = new LazyWrapper(this.__wrapped__); - result.__actions__ = copyArray(this.__actions__); - result.__dir__ = this.__dir__; - result.__filtered__ = this.__filtered__; - result.__iteratees__ = copyArray(this.__iteratees__); - result.__takeCount__ = this.__takeCount__; - result.__views__ = copyArray(this.__views__); - return result; - } - - /** - * Reverses the direction of lazy iteration. - * - * @private - * @name reverse - * @memberOf LazyWrapper - * @returns {Object} Returns the new reversed `LazyWrapper` object. - */ - function lazyReverse() { - if (this.__filtered__) { - var result = new LazyWrapper(this); - result.__dir__ = -1; - result.__filtered__ = true; - } else { - result = this.clone(); - result.__dir__ *= -1; - } - return result; - } - - /** - * Extracts the unwrapped value from its lazy wrapper. - * - * @private - * @name value - * @memberOf LazyWrapper - * @returns {*} Returns the unwrapped value. - */ - function lazyValue() { - var array = this.__wrapped__.value(), - dir = this.__dir__, - isArr = isArray(array), - isRight = dir < 0, - arrLength = isArr ? array.length : 0, - view = getView(0, arrLength, this.__views__), - start = view.start, - end = view.end, - length = end - start, - index = isRight ? end : (start - 1), - iteratees = this.__iteratees__, - iterLength = iteratees.length, - resIndex = 0, - takeCount = nativeMin(length, this.__takeCount__); - - if (!isArr || (!isRight && arrLength == length && takeCount == length)) { - return baseWrapperValue(array, this.__actions__); - } - var result = []; - - outer: - while (length-- && resIndex < takeCount) { - index += dir; - - var iterIndex = -1, - value = array[index]; - - while (++iterIndex < iterLength) { - var data = iteratees[iterIndex], - iteratee = data.iteratee, - type = data.type, - computed = iteratee(value); - - if (type == LAZY_MAP_FLAG) { - value = computed; - } else if (!computed) { - if (type == LAZY_FILTER_FLAG) { - continue outer; - } else { - break outer; - } - } - } - result[resIndex++] = value; - } - return result; - } - - // Ensure `LazyWrapper` is an instance of `baseLodash`. - LazyWrapper.prototype = baseCreate(baseLodash.prototype); - LazyWrapper.prototype.constructor = LazyWrapper; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - - /** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ - function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; - } - - /** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; - } - - /** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; - } - - /** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function hashHas(key) { - var data = this.__data__; - return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); - } - - /** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ - function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; - } - - // Add methods to `Hash`. - Hash.prototype.clear = hashClear; - Hash.prototype['delete'] = hashDelete; - Hash.prototype.get = hashGet; - Hash.prototype.has = hashHas; - Hash.prototype.set = hashSet; - - /*------------------------------------------------------------------------*/ - - /** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - - /** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ - function listCacheClear() { - this.__data__ = []; - this.size = 0; - } - - /** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; - } - - /** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; - } - - /** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; - } - - /** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ - function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; - } - - // Add methods to `ListCache`. - ListCache.prototype.clear = listCacheClear; - ListCache.prototype['delete'] = listCacheDelete; - ListCache.prototype.get = listCacheGet; - ListCache.prototype.has = listCacheHas; - ListCache.prototype.set = listCacheSet; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - - /** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ - function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; - } - - /** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; - } - - /** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function mapCacheGet(key) { - return getMapData(this, key).get(key); - } - - /** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function mapCacheHas(key) { - return getMapData(this, key).has(key); - } - - /** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ - function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; - - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; - } - - // Add methods to `MapCache`. - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype['delete'] = mapCacheDelete; - MapCache.prototype.get = mapCacheGet; - MapCache.prototype.has = mapCacheHas; - MapCache.prototype.set = mapCacheSet; - - /*------------------------------------------------------------------------*/ - - /** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ - function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } - } - - /** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ - function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; - } - - /** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ - function setCacheHas(value) { - return this.__data__.has(value); - } - - // Add methods to `SetCache`. - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; - SetCache.prototype.has = setCacheHas; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; - } - - /** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ - function stackClear() { - this.__data__ = new ListCache; - this.size = 0; - } - - /** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); - - this.size = data.size; - return result; - } - - /** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function stackGet(key) { - return this.__data__.get(key); - } - - /** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function stackHas(key) { - return this.__data__.has(key); - } - - /** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ - function stackSet(key, value) { - var data = this.__data__; - if (data instanceof ListCache) { - var pairs = data.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - data = this.__data__ = new MapCache(pairs); - } - data.set(key, value); - this.size = data.size; - return this; - } - - // Add methods to `Stack`. - Stack.prototype.clear = stackClear; - Stack.prototype['delete'] = stackDelete; - Stack.prototype.get = stackGet; - Stack.prototype.has = stackHas; - Stack.prototype.set = stackSet; - - /*------------------------------------------------------------------------*/ - - /** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ - function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; - } - - /** - * A specialized version of `_.sample` for arrays. - * - * @private - * @param {Array} array The array to sample. - * @returns {*} Returns the random element. - */ - function arraySample(array) { - var length = array.length; - return length ? array[baseRandom(0, length - 1)] : undefined; - } - - /** - * A specialized version of `_.sampleSize` for arrays. - * - * @private - * @param {Array} array The array to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. - */ - function arraySampleSize(array, n) { - return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); - } - - /** - * A specialized version of `_.shuffle` for arrays. - * - * @private - * @param {Array} array The array to shuffle. - * @returns {Array} Returns the new shuffled array. - */ - function arrayShuffle(array) { - return shuffleSelf(copyArray(array)); - } - - /** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function assignMergeValue(object, key, value) { - if ((value !== undefined && !eq(object[key], value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } - } - - /** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } - } - - /** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; - } - - /** - * Aggregates elements of `collection` on `accumulator` with keys transformed - * by `iteratee` and values set by `setter`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ - function baseAggregator(collection, setter, iteratee, accumulator) { - baseEach(collection, function(value, key, collection) { - setter(accumulator, value, iteratee(value), collection); - }); - return accumulator; - } - - /** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ - function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); - } - - /** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ - function baseAssignIn(object, source) { - return object && copyObject(source, keysIn(source), object); - } - - /** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function baseAssignValue(object, key, value) { - if (key == '__proto__' && defineProperty) { - defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } - } - - /** - * The base implementation of `_.at` without support for individual paths. - * - * @private - * @param {Object} object The object to iterate over. - * @param {string[]} paths The property paths to pick. - * @returns {Array} Returns the picked elements. - */ - function baseAt(object, paths) { - var index = -1, - length = paths.length, - result = Array(length), - skip = object == null; - - while (++index < length) { - result[index] = skip ? undefined : get(object, paths[index]); - } - return result; - } - - /** - * The base implementation of `_.clamp` which doesn't coerce arguments. - * - * @private - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - */ - function baseClamp(number, lower, upper) { - if (number === number) { - if (upper !== undefined) { - number = number <= upper ? number : upper; - } - if (lower !== undefined) { - number = number >= lower ? number : lower; - } - } - return number; - } - - /** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ - function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; - - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : initCloneObject(value); - if (!isDeep) { - return isFlat - ? copySymbolsIn(value, baseAssignIn(result, value)) - : copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? getAllKeysIn : getAllKeys) - : (isFlat ? keysIn : keys); - - var props = isArr ? undefined : keysFunc(value); - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; - } - - /** - * The base implementation of `_.conforms` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new spec function. - */ - function baseConforms(source) { - var props = keys(source); - return function(object) { - return baseConformsTo(object, source, props); - }; - } - - /** - * The base implementation of `_.conformsTo` which accepts `props` to check. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. - */ - function baseConformsTo(object, source, props) { - var length = props.length; - if (object == null) { - return !length; - } - object = Object(object); - while (length--) { - var key = props[length], - predicate = source[key], - value = object[key]; - - if ((value === undefined && !(key in object)) || !predicate(value)) { - return false; - } - } - return true; - } - - /** - * The base implementation of `_.delay` and `_.defer` which accepts `args` - * to provide to `func`. - * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {Array} args The arguments to provide to `func`. - * @returns {number|Object} Returns the timer id or timeout object. - */ - function baseDelay(func, wait, args) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return setTimeout(function() { func.apply(undefined, args); }, wait); - } - - /** - * The base implementation of methods like `_.difference` without support - * for excluding multiple arrays or iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Array} values The values to exclude. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - */ - function baseDifference(array, values, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - isCommon = true, - length = array.length, - result = [], - valuesLength = values.length; - - if (!length) { - return result; - } - if (iteratee) { - values = arrayMap(values, baseUnary(iteratee)); - } - if (comparator) { - includes = arrayIncludesWith; - isCommon = false; - } - else if (values.length >= LARGE_ARRAY_SIZE) { - includes = cacheHas; - isCommon = false; - values = new SetCache(values); - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee == null ? value : iteratee(value); - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var valuesIndex = valuesLength; - while (valuesIndex--) { - if (values[valuesIndex] === computed) { - continue outer; - } - } - result.push(value); - } - else if (!includes(values, computed, comparator)) { - result.push(value); - } - } - return result; - } - - /** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ - var baseEach = createBaseEach(baseForOwn); - - /** - * The base implementation of `_.forEachRight` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ - var baseEachRight = createBaseEach(baseForOwnRight, true); - - /** - * The base implementation of `_.every` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` - */ - function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; - }); - return result; - } - - /** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ - function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !isSymbol(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; - } - - /** - * The base implementation of `_.fill` without an iteratee call guard. - * - * @private - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - */ - function baseFill(array, value, start, end) { - var length = array.length; - - start = toInteger(start); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : toInteger(end); - if (end < 0) { - end += length; - } - end = start > end ? 0 : toLength(end); - while (start < end) { - array[start++] = value; - } - return array; - } - - /** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; - } - - /** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ - function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; - } - - /** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseFor = createBaseFor(); - - /** - * This function is like `baseFor` except that it iterates over properties - * in the opposite order. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseForRight = createBaseFor(true); - - /** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); - } - - /** - * The base implementation of `_.forOwnRight` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwnRight(object, iteratee) { - return object && baseForRight(object, iteratee, keys); - } - - /** - * The base implementation of `_.functions` which creates an array of - * `object` function property names filtered from `props`. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} props The property names to filter. - * @returns {Array} Returns the function names. - */ - function baseFunctions(object, props) { - return arrayFilter(props, function(key) { - return isFunction(object[key]); - }); - } - - /** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ - function baseGet(object, path) { - path = castPath(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return (index && index == length) ? object : undefined; - } - - /** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ - function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); - } - - /** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ - function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); - } - - /** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ - function baseGt(value, other) { - return value > other; - } - - /** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ - function baseHas(object, key) { - return object != null && hasOwnProperty.call(object, key); - } - - /** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ - function baseHasIn(object, key) { - return object != null && key in Object(object); - } - - /** - * The base implementation of `_.inRange` which doesn't coerce arguments. - * - * @private - * @param {number} number The number to check. - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. - */ - function baseInRange(number, start, end) { - return number >= nativeMin(start, end) && number < nativeMax(start, end); - } - - /** - * The base implementation of methods like `_.intersection`, without support - * for iteratee shorthands, that accepts an array of arrays to inspect. - * - * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of shared values. - */ - function baseIntersection(arrays, iteratee, comparator) { - var includes = comparator ? arrayIncludesWith : arrayIncludes, - length = arrays[0].length, - othLength = arrays.length, - othIndex = othLength, - caches = Array(othLength), - maxLength = Infinity, - result = []; - - while (othIndex--) { - var array = arrays[othIndex]; - if (othIndex && iteratee) { - array = arrayMap(array, baseUnary(iteratee)); - } - maxLength = nativeMin(array.length, maxLength); - caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) - ? new SetCache(othIndex && array) - : undefined; - } - array = arrays[0]; - - var index = -1, - seen = caches[0]; - - outer: - while (++index < length && result.length < maxLength) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (!(seen - ? cacheHas(seen, computed) - : includes(result, computed, comparator) - )) { - othIndex = othLength; - while (--othIndex) { - var cache = caches[othIndex]; - if (!(cache - ? cacheHas(cache, computed) - : includes(arrays[othIndex], computed, comparator)) - ) { - continue outer; - } - } - if (seen) { - seen.push(computed); - } - result.push(value); - } - } - return result; - } - - /** - * The base implementation of `_.invert` and `_.invertBy` which inverts - * `object` with values transformed by `iteratee` and set by `setter`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform values. - * @param {Object} accumulator The initial inverted object. - * @returns {Function} Returns `accumulator`. - */ - function baseInverter(object, setter, iteratee, accumulator) { - baseForOwn(object, function(value, key, object) { - setter(accumulator, iteratee(value), key, object); - }); - return accumulator; - } - - /** - * The base implementation of `_.invoke` without support for individual - * method arguments. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {Array} args The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - */ - function baseInvoke(object, path, args) { - path = castPath(path, object); - object = parent(object, path); - var func = object == null ? object : object[toKey(last(path))]; - return func == null ? undefined : apply(func, object, args); - } - - /** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ - function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; - } - - /** - * The base implementation of `_.isArrayBuffer` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. - */ - function baseIsArrayBuffer(value) { - return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; - } - - /** - * The base implementation of `_.isDate` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - */ - function baseIsDate(value) { - return isObjectLike(value) && baseGetTag(value) == dateTag; - } - - /** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ - function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); - } - - /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && isBuffer(object)) { - if (!isBuffer(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new Stack); - return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new Stack); - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); - } - - /** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ - function baseIsMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; - } - - /** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ - function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new Stack; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; - } - - /** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ - function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); - } - - /** - * The base implementation of `_.isRegExp` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - */ - function baseIsRegExp(value) { - return isObjectLike(value) && baseGetTag(value) == regexpTag; - } - - /** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ - function baseIsSet(value) { - return isObjectLike(value) && getTag(value) == setTag; - } - - /** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ - function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; - } - - /** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ - function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity; - } - if (typeof value == 'object') { - return isArray(value) - ? baseMatchesProperty(value[0], value[1]) - : baseMatches(value); - } - return property(value); - } - - /** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; - } - - /** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; - - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; - } - - /** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ - function baseLt(value, other) { - return value < other; - } - - /** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; - } - - /** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ - function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || baseIsMatch(object, source, matchData); - }; - } - - /** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ - function baseMatchesProperty(path, srcValue) { - if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(toKey(path), srcValue); - } - return function(object) { - var objValue = get(object, path); - return (objValue === undefined && objValue === srcValue) - ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); - }; - } - - /** - * The base implementation of `_.merge` without support for multiple sources. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ - function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - baseFor(source, function(srcValue, key) { - stack || (stack = new Stack); - if (isObject(srcValue)) { - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) - : undefined; - - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }, keysIn); - } - - /** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ - function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = safeGet(object, key), - srcValue = safeGet(source, key), - stacked = stack.get(srcValue); - - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; - - var isCommon = newValue === undefined; - - if (isCommon) { - var isArr = isArray(srcValue), - isBuff = !isArr && isBuffer(srcValue), - isTyped = !isArr && !isBuff && isTypedArray(srcValue); - - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } - else { - newValue = []; - } - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } - else if (!isObject(objValue) || isFunction(objValue)) { - newValue = initCloneObject(srcValue); - } - } - else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - assignMergeValue(object, key, newValue); - } - - /** - * The base implementation of `_.nth` which doesn't coerce arguments. - * - * @private - * @param {Array} array The array to query. - * @param {number} n The index of the element to return. - * @returns {*} Returns the nth element of `array`. - */ - function baseNth(array, n) { - var length = array.length; - if (!length) { - return; - } - n += n < 0 ? length : 0; - return isIndex(n, length) ? array[n] : undefined; - } - - /** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ - function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = arrayMap(iteratees, function(iteratee) { - if (isArray(iteratee)) { - return function(value) { - return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } - } - return iteratee; - }); - } else { - iteratees = [identity]; - } - - var index = -1; - iteratees = arrayMap(iteratees, baseUnary(getIteratee())); - - var result = baseMap(collection, function(value, key, collection) { - var criteria = arrayMap(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return baseSortBy(result, function(object, other) { - return compareMultiple(object, other, orders); - }); - } - - /** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ - function basePick(object, paths) { - return basePickBy(object, paths, function(value, path) { - return hasIn(object, path); - }); - } - - /** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ - function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = baseGet(object, path); - - if (predicate(value, path)) { - baseSet(result, castPath(path, object), value); - } - } - return result; - } - - /** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ - function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; - } - - /** - * The base implementation of `_.pullAllBy` without support for iteratee - * shorthands. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. - */ - function basePullAll(array, values, iteratee, comparator) { - var indexOf = comparator ? baseIndexOfWith : baseIndexOf, - index = -1, - length = values.length, - seen = array; - - if (array === values) { - values = copyArray(values); - } - if (iteratee) { - seen = arrayMap(array, baseUnary(iteratee)); - } - while (++index < length) { - var fromIndex = 0, - value = values[index], - computed = iteratee ? iteratee(value) : value; - - while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { - if (seen !== array) { - splice.call(seen, fromIndex, 1); - } - splice.call(array, fromIndex, 1); - } - } - return array; - } - - /** - * The base implementation of `_.pullAt` without support for individual - * indexes or capturing the removed elements. - * - * @private - * @param {Array} array The array to modify. - * @param {number[]} indexes The indexes of elements to remove. - * @returns {Array} Returns `array`. - */ - function basePullAt(array, indexes) { - var length = array ? indexes.length : 0, - lastIndex = length - 1; - - while (length--) { - var index = indexes[length]; - if (length == lastIndex || index !== previous) { - var previous = index; - if (isIndex(index)) { - splice.call(array, index, 1); - } else { - baseUnset(array, index); - } - } - } - return array; - } - - /** - * The base implementation of `_.random` without support for returning - * floating-point numbers. - * - * @private - * @param {number} lower The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the random number. - */ - function baseRandom(lower, upper) { - return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); - } - - /** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ - function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; - } - - /** - * The base implementation of `_.repeat` which doesn't coerce arguments. - * - * @private - * @param {string} string The string to repeat. - * @param {number} n The number of times to repeat the string. - * @returns {string} Returns the repeated string. - */ - function baseRepeat(string, n) { - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - if (n) { - string += string; - } - } while (n); - - return result; - } - - /** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ - function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); - } - - /** - * The base implementation of `_.sample`. - * - * @private - * @param {Array|Object} collection The collection to sample. - * @returns {*} Returns the random element. - */ - function baseSample(collection) { - return arraySample(values(collection)); - } - - /** - * The base implementation of `_.sampleSize` without param guards. - * - * @private - * @param {Array|Object} collection The collection to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. - */ - function baseSampleSize(collection, n) { - var array = values(collection); - return shuffleSelf(array, baseClamp(n, 0, array.length)); - } - - /** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ - function baseSet(object, path, value, customizer) { - if (!isObject(object)) { - return object; - } - path = castPath(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = toKey(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = isObject(objValue) - ? objValue - : (isIndex(path[index + 1]) ? [] : {}); - } - } - assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; - } - - /** - * The base implementation of `setData` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ - var baseSetData = !metaMap ? identity : function(func, data) { - metaMap.set(func, data); - return func; - }; - - /** - * The base implementation of `setToString` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ - var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); - }; - - /** - * The base implementation of `_.shuffle`. - * - * @private - * @param {Array|Object} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. - */ - function baseShuffle(collection) { - return shuffleSelf(values(collection)); - } - - /** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; - } - - /** - * The base implementation of `_.some` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function baseSome(collection, predicate) { - var result; - - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; - }); - return !!result; - } - - /** - * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which - * performs a binary search of `array` to determine the index at which `value` - * should be inserted into `array` in order to maintain its sort order. - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ - function baseSortedIndex(array, value, retHighest) { - var low = 0, - high = array == null ? low : array.length; - - if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { - while (low < high) { - var mid = (low + high) >>> 1, - computed = array[mid]; - - if (computed !== null && !isSymbol(computed) && - (retHighest ? (computed <= value) : (computed < value))) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - return baseSortedIndexBy(array, value, identity, retHighest); - } - - /** - * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` - * which invokes `iteratee` for `value` and each element of `array` to compute - * their sort ranking. The iteratee is invoked with one argument; (value). - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} iteratee The iteratee invoked per element. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ - function baseSortedIndexBy(array, value, iteratee, retHighest) { - var low = 0, - high = array == null ? 0 : array.length; - if (high === 0) { - return 0; - } - - value = iteratee(value); - var valIsNaN = value !== value, - valIsNull = value === null, - valIsSymbol = isSymbol(value), - valIsUndefined = value === undefined; - - while (low < high) { - var mid = nativeFloor((low + high) / 2), - computed = iteratee(array[mid]), - othIsDefined = computed !== undefined, - othIsNull = computed === null, - othIsReflexive = computed === computed, - othIsSymbol = isSymbol(computed); - - if (valIsNaN) { - var setLow = retHighest || othIsReflexive; - } else if (valIsUndefined) { - setLow = othIsReflexive && (retHighest || othIsDefined); - } else if (valIsNull) { - setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); - } else if (valIsSymbol) { - setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); - } else if (othIsNull || othIsSymbol) { - setLow = false; - } else { - setLow = retHighest ? (computed <= value) : (computed < value); - } - if (setLow) { - low = mid + 1; - } else { - high = mid; - } - } - return nativeMin(high, MAX_ARRAY_INDEX); - } - - /** - * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ - function baseSortedUniq(array, iteratee) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - if (!index || !eq(computed, seen)) { - var seen = computed; - result[resIndex++] = value === 0 ? 0 : value; - } - } - return result; - } - - /** - * The base implementation of `_.toNumber` which doesn't ensure correct - * conversions of binary, hexadecimal, or octal string values. - * - * @private - * @param {*} value The value to process. - * @returns {number} Returns the number. - */ - function baseToNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - return +value; - } - - /** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ - function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; - } - - /** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ - function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : createSet(array); - if (set) { - return setToArray(set); - } - isCommon = false; - includes = cacheHas; - seen = new SetCache; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; - } - - /** - * The base implementation of `_.unset`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The property path to unset. - * @returns {boolean} Returns `true` if the property is deleted, else `false`. - */ - function baseUnset(object, path) { - path = castPath(path, object); - object = parent(object, path); - return object == null || delete object[toKey(last(path))]; - } - - /** - * The base implementation of `_.update`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to update. - * @param {Function} updater The function to produce the updated value. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ - function baseUpdate(object, path, updater, customizer) { - return baseSet(object, path, updater(baseGet(object, path)), customizer); - } - - /** - * The base implementation of methods like `_.dropWhile` and `_.takeWhile` - * without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to query. - * @param {Function} predicate The function invoked per iteration. - * @param {boolean} [isDrop] Specify dropping elements instead of taking them. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the slice of `array`. - */ - function baseWhile(array, predicate, isDrop, fromRight) { - var length = array.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length) && - predicate(array[index], index, array)) {} - - return isDrop - ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) - : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); - } - - /** - * The base implementation of `wrapperValue` which returns the result of - * performing a sequence of actions on the unwrapped `value`, where each - * successive action is supplied the return value of the previous. - * - * @private - * @param {*} value The unwrapped value. - * @param {Array} actions Actions to perform to resolve the unwrapped value. - * @returns {*} Returns the resolved value. - */ - function baseWrapperValue(value, actions) { - var result = value; - if (result instanceof LazyWrapper) { - result = result.value(); - } - return arrayReduce(actions, function(result, action) { - return action.func.apply(action.thisArg, arrayPush([result], action.args)); - }, result); - } - - /** - * The base implementation of methods like `_.xor`, without support for - * iteratee shorthands, that accepts an array of arrays to inspect. - * - * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. - */ - function baseXor(arrays, iteratee, comparator) { - var length = arrays.length; - if (length < 2) { - return length ? baseUniq(arrays[0]) : []; - } - var index = -1, - result = Array(length); - - while (++index < length) { - var array = arrays[index], - othIndex = -1; - - while (++othIndex < length) { - if (othIndex != index) { - result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); - } - } - } - return baseUniq(baseFlatten(result, 1), iteratee, comparator); - } - - /** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ - function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; - } - - /** - * Casts `value` to an empty array if it's not an array like object. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array|Object} Returns the cast array-like object. - */ - function castArrayLikeObject(value) { - return isArrayLikeObject(value) ? value : []; - } - - /** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ - function castFunction(value) { - return typeof value == 'function' ? value : identity; - } - - /** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ - function castPath(value, object) { - if (isArray(value)) { - return value; - } - return isKey(value, object) ? [value] : stringToPath(toString(value)); - } - - /** - * A `baseRest` alias which can be replaced with `identity` by module - * replacement plugins. - * - * @private - * @type {Function} - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ - var castRest = baseRest; - - /** - * Casts `array` to a slice if it's needed. - * - * @private - * @param {Array} array The array to inspect. - * @param {number} start The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the cast slice. - */ - function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return (!start && end >= length) ? array : baseSlice(array, start, end); - } - - /** - * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). - * - * @private - * @param {number|Object} id The timer id or timeout object of the timer to clear. - */ - var clearTimeout = ctxClearTimeout || function(id) { - return root.clearTimeout(id); - }; - - /** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ - function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); - - buffer.copy(result); - return result; - } - - /** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ - function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; - } - - /** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ - function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); - } - - /** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ - function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; - } - - /** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ - function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; - } - - /** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ - function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); - } - - /** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ - function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = isSymbol(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = isSymbol(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; - } - - /** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ - function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; - } - - /** - * Creates an array that is the composition of partially applied arguments, - * placeholders, and provided arguments into a single array of arguments. - * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to prepend to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. - */ - function composeArgs(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersLength = holders.length, - leftIndex = -1, - leftLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(leftLength + rangeLength), - isUncurried = !isCurried; - - while (++leftIndex < leftLength) { - result[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[holders[argsIndex]] = args[argsIndex]; - } - } - while (rangeLength--) { - result[leftIndex++] = args[argsIndex++]; - } - return result; - } - - /** - * This function is like `composeArgs` except that the arguments composition - * is tailored for `_.partialRight`. - * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to append to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. - */ - function composeArgsRight(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersIndex = -1, - holdersLength = holders.length, - rightIndex = -1, - rightLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(rangeLength + rightLength), - isUncurried = !isCurried; - - while (++argsIndex < rangeLength) { - result[argsIndex] = args[argsIndex]; - } - var offset = argsIndex; - while (++rightIndex < rightLength) { - result[offset + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[offset + holders[holdersIndex]] = args[argsIndex++]; - } - } - return result; - } - - /** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ - function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; - } - - /** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ - function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } - } - return object; - } - - /** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ - function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); - } - - /** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ - function copySymbolsIn(source, object) { - return copyObject(source, getSymbolsIn(source), object); - } - - /** - * Creates a function like `_.groupBy`. - * - * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} [initializer] The accumulator object initializer. - * @returns {Function} Returns the new aggregator function. - */ - function createAggregator(setter, initializer) { - return function(collection, iteratee) { - var func = isArray(collection) ? arrayAggregator : baseAggregator, - accumulator = initializer ? initializer() : {}; - - return func(collection, setter, getIteratee(iteratee, 2), accumulator); - }; - } - - /** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ - function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); - } - - /** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; - } - - /** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; - } - - /** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg`. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createBind(func, bitmask, thisArg) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(isBind ? thisArg : this, arguments); - } - return wrapper; - } - - /** - * Creates a function like `_.lowerFirst`. - * - * @private - * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new case function. - */ - function createCaseFirst(methodName) { - return function(string) { - string = toString(string); - - var strSymbols = hasUnicode(string) - ? stringToArray(string) - : undefined; - - var chr = strSymbols - ? strSymbols[0] - : string.charAt(0); - - var trailing = strSymbols - ? castSlice(strSymbols, 1).join('') - : string.slice(1); - - return chr[methodName]() + trailing; - }; - } - - /** - * Creates a function like `_.camelCase`. - * - * @private - * @param {Function} callback The function to combine each word. - * @returns {Function} Returns the new compounder function. - */ - function createCompounder(callback) { - return function(string) { - return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); - }; - } - - /** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. - * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. - */ - function createCtor(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - switch (args.length) { - case 0: return new Ctor; - case 1: return new Ctor(args[0]); - case 2: return new Ctor(args[0], args[1]); - case 3: return new Ctor(args[0], args[1], args[2]); - case 4: return new Ctor(args[0], args[1], args[2], args[3]); - case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); - case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); - case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; - } - - /** - * Creates a function that wraps `func` to enable currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {number} arity The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createCurry(func, bitmask, arity) { - var Ctor = createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length, - placeholder = getHolder(wrapper); - - while (index--) { - args[index] = arguments[index]; - } - var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) - ? [] - : replaceHolders(args, placeholder); - - length -= holders.length; - if (length < arity) { - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, undefined, - args, holders, undefined, undefined, arity - length); - } - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return apply(fn, this, args); - } - return wrapper; - } - - /** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ - function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!isArrayLike(collection)) { - var iteratee = getIteratee(predicate, 3); - collection = keys(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; - } - - /** - * Creates a `_.flow` or `_.flowRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new flow function. - */ - function createFlow(fromRight) { - return flatRest(function(funcs) { - var length = funcs.length, - index = length, - prereq = LodashWrapper.prototype.thru; - - if (fromRight) { - funcs.reverse(); - } - while (index--) { - var func = funcs[index]; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (prereq && !wrapper && getFuncName(func) == 'wrapper') { - var wrapper = new LodashWrapper([], true); - } - } - index = wrapper ? index : length; - while (++index < length) { - func = funcs[index]; - - var funcName = getFuncName(func), - data = funcName == 'wrapper' ? getData(func) : undefined; - - if (data && isLaziable(data[0]) && - data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && - !data[4].length && data[9] == 1 - ) { - wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); - } else { - wrapper = (func.length == 1 && isLaziable(func)) - ? wrapper[funcName]() - : wrapper.thru(func); - } - } - return function() { - var args = arguments, - value = args[0]; - - if (wrapper && args.length == 1 && isArray(value)) { - return wrapper.plant(value).value(); - } - var index = 0, - result = length ? funcs[index].apply(this, args) : value; - - while (++index < length) { - result = funcs[index].call(this, result); - } - return result; - }; - }); - } - - /** - * Creates a function that wraps `func` to invoke it with optional `this` - * binding of `thisArg`, partial application, and currying. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [partialsRight] The arguments to append to those provided - * to the new function. - * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & WRAP_ARY_FLAG, - isBind = bitmask & WRAP_BIND_FLAG, - isBindKey = bitmask & WRAP_BIND_KEY_FLAG, - isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), - isFlip = bitmask & WRAP_FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length; - - while (index--) { - args[index] = arguments[index]; - } - if (isCurried) { - var placeholder = getHolder(wrapper), - holdersCount = countHolders(args, placeholder); - } - if (partials) { - args = composeArgs(args, partials, holders, isCurried); - } - if (partialsRight) { - args = composeArgsRight(args, partialsRight, holdersRight, isCurried); - } - length -= holdersCount; - if (isCurried && length < arity) { - var newHolders = replaceHolders(args, placeholder); - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, thisArg, - args, newHolders, argPos, ary, arity - length - ); - } - var thisBinding = isBind ? thisArg : this, - fn = isBindKey ? thisBinding[func] : func; - - length = args.length; - if (argPos) { - args = reorder(args, argPos); - } else if (isFlip && length > 1) { - args.reverse(); - } - if (isAry && ary < length) { - args.length = ary; - } - if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtor(fn); - } - return fn.apply(thisBinding, args); - } - return wrapper; - } - - /** - * Creates a function like `_.invertBy`. - * - * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} toIteratee The function to resolve iteratees. - * @returns {Function} Returns the new inverter function. - */ - function createInverter(setter, toIteratee) { - return function(object, iteratee) { - return baseInverter(object, setter, toIteratee(iteratee), {}); - }; - } - - /** - * Creates a function that performs a mathematical operation on two values. - * - * @private - * @param {Function} operator The function to perform the operation. - * @param {number} [defaultValue] The value used for `undefined` arguments. - * @returns {Function} Returns the new mathematical operation function. - */ - function createMathOperation(operator, defaultValue) { - return function(value, other) { - var result; - if (value === undefined && other === undefined) { - return defaultValue; - } - if (value !== undefined) { - result = value; - } - if (other !== undefined) { - if (result === undefined) { - return other; - } - if (typeof value == 'string' || typeof other == 'string') { - value = baseToString(value); - other = baseToString(other); - } else { - value = baseToNumber(value); - other = baseToNumber(other); - } - result = operator(value, other); - } - return result; - }; - } - - /** - * Creates a function like `_.over`. - * - * @private - * @param {Function} arrayFunc The function to iterate over iteratees. - * @returns {Function} Returns the new over function. - */ - function createOver(arrayFunc) { - return flatRest(function(iteratees) { - iteratees = arrayMap(iteratees, baseUnary(getIteratee())); - return baseRest(function(args) { - var thisArg = this; - return arrayFunc(iteratees, function(iteratee) { - return apply(iteratee, thisArg, args); - }); - }); - }); - } - - /** - * Creates the padding for `string` based on `length`. The `chars` string - * is truncated if the number of characters exceeds `length`. - * - * @private - * @param {number} length The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padding for `string`. - */ - function createPadding(length, chars) { - chars = chars === undefined ? ' ' : baseToString(chars); - - var charsLength = chars.length; - if (charsLength < 2) { - return charsLength ? baseRepeat(chars, length) : chars; - } - var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); - return hasUnicode(chars) - ? castSlice(stringToArray(result), 0, length).join('') - : result.slice(0, length); - } - - /** - * Creates a function that wraps `func` to invoke it with the `this` binding - * of `thisArg` and `partials` prepended to the arguments it receives. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to - * the new function. - * @returns {Function} Returns the new wrapped function. - */ - function createPartial(func, bitmask, thisArg, partials) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(leftLength + argsLength), - fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return apply(fn, isBind ? thisArg : this, args); - } - return wrapper; - } - - /** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ - function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); - return baseRange(start, end, step, fromRight); - }; - } - - /** - * Creates a function that performs a relational operation on two values. - * - * @private - * @param {Function} operator The function to perform the operation. - * @returns {Function} Returns the new relational operation function. - */ - function createRelationalOperation(operator) { - return function(value, other) { - if (!(typeof value == 'string' && typeof other == 'string')) { - value = toNumber(value); - other = toNumber(other); - } - return operator(value, other); - }; - } - - /** - * Creates a function that wraps `func` to continue currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {Function} wrapFunc The function to create the `func` wrapper. - * @param {*} placeholder The placeholder value. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { - var isCurry = bitmask & WRAP_CURRY_FLAG, - newHolders = isCurry ? holders : undefined, - newHoldersRight = isCurry ? undefined : holders, - newPartials = isCurry ? partials : undefined, - newPartialsRight = isCurry ? undefined : partials; - - bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); - - if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { - bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); - } - var newData = [ - func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, - newHoldersRight, argPos, ary, arity - ]; - - var result = wrapFunc.apply(undefined, newData); - if (isLaziable(func)) { - setData(result, newData); - } - result.placeholder = placeholder; - return setWrapToString(result, func, bitmask); - } - - /** - * Creates a function like `_.round`. - * - * @private - * @param {string} methodName The name of the `Math` method to use when rounding. - * @returns {Function} Returns the new round function. - */ - function createRound(methodName) { - var func = Math[methodName]; - return function(number, precision) { - number = toNumber(number); - precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); - if (precision && nativeIsFinite(number)) { - // Shift with exponential notation to avoid floating-point issues. - // See [MDN](https://mdn.io/round#Examples) for more details. - var pair = (toString(number) + 'e').split('e'), - value = func(pair[0] + 'e' + (+pair[1] + precision)); - - pair = (toString(value) + 'e').split('e'); - return +(pair[0] + 'e' + (+pair[1] - precision)); - } - return func(number); - }; - } - - /** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ - var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { - return new Set(values); - }; - - /** - * Creates a `_.toPairs` or `_.toPairsIn` function. - * - * @private - * @param {Function} keysFunc The function to get the keys of a given object. - * @returns {Function} Returns the new pairs function. - */ - function createToPairs(keysFunc) { - return function(object) { - var tag = getTag(object); - if (tag == mapTag) { - return mapToArray(object); - } - if (tag == setTag) { - return setToPairs(object); - } - return baseToPairs(object, keysFunc(object)); - }; - } - - /** - * Creates a function that either curries or invokes `func` with optional - * `this` binding and partially applied arguments. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` - * 512 - `_.flip` - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to be partially applied. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; - if (!isBindKey && typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); - partials = holders = undefined; - } - ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); - arity = arity === undefined ? arity : toInteger(arity); - length -= holders ? holders.length : 0; - - if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { - var partialsRight = partials, - holdersRight = holders; - - partials = holders = undefined; - } - var data = isBindKey ? undefined : getData(func); - - var newData = [ - func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, - argPos, ary, arity - ]; - - if (data) { - mergeData(newData, data); - } - func = newData[0]; - bitmask = newData[1]; - thisArg = newData[2]; - partials = newData[3]; - holders = newData[4]; - arity = newData[9] = newData[9] === undefined - ? (isBindKey ? 0 : func.length) - : nativeMax(newData[9] - length, 0); - - if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { - bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); - } - if (!bitmask || bitmask == WRAP_BIND_FLAG) { - var result = createBind(func, bitmask, thisArg); - } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { - result = createCurry(func, bitmask, arity); - } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { - result = createPartial(func, bitmask, thisArg, partials); - } else { - result = createHybrid.apply(undefined, newData); - } - var setter = data ? baseSetData : setData; - return setWrapToString(setter(result, newData), func, bitmask); - } - - /** - * Used by `_.defaults` to customize its `_.assignIn` use to assign properties - * of source objects to the destination object for all destination properties - * that resolve to `undefined`. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to assign. - * @param {Object} object The parent object of `objValue`. - * @returns {*} Returns the value to assign. - */ - function customDefaultsAssignIn(objValue, srcValue, key, object) { - if (objValue === undefined || - (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { - return srcValue; - } - return objValue; - } - - /** - * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source - * objects into destination objects that are passed thru. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to merge. - * @param {Object} object The parent object of `objValue`. - * @param {Object} source The parent object of `srcValue`. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - * @returns {*} Returns the value to assign. - */ - function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { - if (isObject(objValue) && isObject(srcValue)) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, objValue); - baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); - stack['delete'](srcValue); - } - return objValue; - } - - /** - * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain - * objects. - * - * @private - * @param {*} value The value to inspect. - * @param {string} key The key of the property to inspect. - * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. - */ - function customOmitClone(value) { - return isPlainObject(value) ? undefined : value; - } - - /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function(othValue, othIndex) { - if (!cacheHas(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; - } - - /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = mapToArray; - - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; - } - - /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; - } - - /** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ - function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); - } - - /** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ - function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); - } - - /** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ - function getAllKeysIn(object) { - return baseGetAllKeys(object, keysIn, getSymbolsIn); - } - - /** - * Gets metadata for `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {*} Returns the metadata for `func`. - */ - var getData = !metaMap ? noop : function(func) { - return metaMap.get(func); - }; - - /** - * Gets the name of `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {string} Returns the function name. - */ - function getFuncName(func) { - var result = (func.name + ''), - array = realNames[result], - length = hasOwnProperty.call(realNames, result) ? array.length : 0; - - while (length--) { - var data = array[length], - otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } - } - return result; - } - - /** - * Gets the argument placeholder value for `func`. - * - * @private - * @param {Function} func The function to inspect. - * @returns {*} Returns the placeholder value. - */ - function getHolder(func) { - var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; - return object.placeholder; - } - - /** - * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, - * this function returns the custom method, otherwise it returns `baseIteratee`. - * If arguments are provided, the chosen function is invoked with them and - * its result is returned. - * - * @private - * @param {*} [value] The value to convert to an iteratee. - * @param {number} [arity] The arity of the created iteratee. - * @returns {Function} Returns the chosen function or its result. - */ - function getIteratee() { - var result = lodash.iteratee || iteratee; - result = result === iteratee ? baseIteratee : result; - return arguments.length ? result(arguments[0], arguments[1]) : result; - } - - /** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; - } - - /** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ - function getMatchData(object) { - var result = keys(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, isStrictComparable(value)]; - } - return result; - } - - /** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ - function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; - } - - /** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ - function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; - } - - /** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ - var getSymbols = !nativeGetSymbols ? stubArray : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return arrayFilter(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); - }; - - /** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ - var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { - var result = []; - while (object) { - arrayPush(result, getSymbols(object)); - object = getPrototype(object); - } - return result; - }; - - /** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ - var getTag = baseGetTag; - - // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. - if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; - } - - /** - * Gets the view, applying any `transforms` to the `start` and `end` positions. - * - * @private - * @param {number} start The start of the view. - * @param {number} end The end of the view. - * @param {Array} transforms The transformations to apply to the view. - * @returns {Object} Returns an object containing the `start` and `end` - * positions of the view. - */ - function getView(start, end, transforms) { - var index = -1, - length = transforms.length; - - while (++index < length) { - var data = transforms[index], - size = data.size; - - switch (data.type) { - case 'drop': start += size; break; - case 'dropRight': end -= size; break; - case 'take': end = nativeMin(end, start + size); break; - case 'takeRight': start = nativeMax(start, end - size); break; - } - } - return { 'start': start, 'end': end }; - } - - /** - * Extracts wrapper details from the `source` body comment. - * - * @private - * @param {string} source The source to inspect. - * @returns {Array} Returns the wrapper details. - */ - function getWrapDetails(source) { - var match = source.match(reWrapDetails); - return match ? match[1].split(reSplitDetails) : []; - } - - /** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ - function hasPath(object, path, hasFunc) { - path = castPath(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isArguments(object)); - } - - /** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ - function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; - } - - /** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ - function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; - } - - /** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ - function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return cloneSymbol(object); - } - } - - /** - * Inserts wrapper `details` in a comment at the top of the `source` body. - * - * @private - * @param {string} source The source to modify. - * @returns {Array} details The details to insert. - * @returns {string} Returns the modified source. - */ - function insertWrapDetails(source, details) { - var length = details.length; - if (!length) { - return source; - } - var lastIndex = length - 1; - details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; - details = details.join(length > 2 ? ', ' : ' '); - return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); - } - - /** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ - function isFlattenable(value) { - return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); - } - - /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); - } - - /** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ - function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; - } - - /** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ - function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); - } - - /** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ - function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); - } - - /** - * Checks if `func` has a lazy counterpart. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` has a lazy counterpart, - * else `false`. - */ - function isLaziable(func) { - var funcName = getFuncName(func), - other = lodash[funcName]; - - if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { - return false; - } - if (func === other) { - return true; - } - var data = getData(other); - return !!data && func === data[0]; - } - - /** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ - function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); - } - - /** - * Checks if `func` is capable of being masked. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `func` is maskable, else `false`. - */ - var isMaskable = coreJsData ? isFunction : stubFalse; - - /** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ - function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; - } - - /** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ - function isStrictComparable(value) { - return value === value && !isObject(value); - } - - /** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ - function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; - } - - /** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ - function memoizeCapped(func) { - var result = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; - } - - /** - * Merges the function metadata of `source` into `data`. - * - * Merging metadata reduces the number of wrappers used to invoke a function. - * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` - * may be applied regardless of execution order. Methods like `_.ary` and - * `_.rearg` modify function arguments, making the order in which they are - * executed important, preventing the merging of metadata. However, we make - * an exception for a safe combined case where curried functions have `_.ary` - * and or `_.rearg` applied. - * - * @private - * @param {Array} data The destination metadata. - * @param {Array} source The source metadata. - * @returns {Array} Returns `data`. - */ - function mergeData(data, source) { - var bitmask = data[1], - srcBitmask = source[1], - newBitmask = bitmask | srcBitmask, - isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); - - var isCombo = - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || - ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); - - // Exit early if metadata can't be merged. - if (!(isCommon || isCombo)) { - return data; - } - // Use source `thisArg` if available. - if (srcBitmask & WRAP_BIND_FLAG) { - data[2] = source[2]; - // Set when currying a bound function. - newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; - } - // Compose partial arguments. - var value = source[3]; - if (value) { - var partials = data[3]; - data[3] = partials ? composeArgs(partials, value, source[4]) : value; - data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; - } - // Compose partial right arguments. - value = source[5]; - if (value) { - partials = data[5]; - data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; - data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; - } - // Use source `argPos` if available. - value = source[7]; - if (value) { - data[7] = value; - } - // Use source `ary` if it's smaller. - if (srcBitmask & WRAP_ARY_FLAG) { - data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); - } - // Use source `arity` if one is not provided. - if (data[9] == null) { - data[9] = source[9]; - } - // Use source `func` and merge bitmasks. - data[0] = source[0]; - data[1] = newBitmask; - - return data; - } - - /** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; - } - - /** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ - function objectToString(value) { - return nativeObjectToString.call(value); - } - - /** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ - function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; - } - - /** - * Gets the parent value at `path` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} path The path to get the parent value of. - * @returns {*} Returns the parent value. - */ - function parent(object, path) { - return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); - } - - /** - * Reorder `array` according to the specified indexes where the element at - * the first index is assigned as the first element, the element at - * the second index is assigned as the second element, and so on. - * - * @private - * @param {Array} array The array to reorder. - * @param {Array} indexes The arranged array indexes. - * @returns {Array} Returns `array`. - */ - function reorder(array, indexes) { - var arrLength = array.length, - length = nativeMin(indexes.length, arrLength), - oldArray = copyArray(array); - - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; - } - return array; - } - - /** - * Gets the value at `key`, unless `key` is "__proto__" or "constructor". - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - function safeGet(object, key) { - if (key === 'constructor' && typeof object[key] === 'function') { - return; - } - - if (key == '__proto__') { - return; - } - - return object[key]; - } - - /** - * Sets metadata for `func`. - * - * **Note:** If this function becomes hot, i.e. is invoked a lot in a short - * period of time, it will trip its breaker and transition to an identity - * function to avoid garbage collection pauses in V8. See - * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) - * for more details. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ - var setData = shortOut(baseSetData); - - /** - * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). - * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @returns {number|Object} Returns the timer id or timeout object. - */ - var setTimeout = ctxSetTimeout || function(func, wait) { - return root.setTimeout(func, wait); - }; - - /** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ - var setToString = shortOut(baseSetToString); - - /** - * Sets the `toString` method of `wrapper` to mimic the source of `reference` - * with wrapper details in a comment at the top of the source body. - * - * @private - * @param {Function} wrapper The function to modify. - * @param {Function} reference The reference function. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Function} Returns `wrapper`. - */ - function setWrapToString(wrapper, reference, bitmask) { - var source = (reference + ''); - return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); - } - - /** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. - * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. - */ - function shortOut(func) { - var count = 0, - lastCalled = 0; - - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; - } - return func.apply(undefined, arguments); - }; - } - - /** - * A specialized version of `_.shuffle` which mutates and sets the size of `array`. - * - * @private - * @param {Array} array The array to shuffle. - * @param {number} [size=array.length] The size of `array`. - * @returns {Array} Returns `array`. - */ - function shuffleSelf(array, size) { - var index = -1, - length = array.length, - lastIndex = length - 1; - - size = size === undefined ? length : size; - while (++index < size) { - var rand = baseRandom(index, lastIndex), - value = array[rand]; - - array[rand] = array[index]; - array[index] = value; - } - array.length = size; - return array; - } - - /** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ - var stringToPath = memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; - }); - - /** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ - function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; - } - - /** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ - function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; - } - - /** - * Updates wrapper `details` based on `bitmask` flags. - * - * @private - * @returns {Array} details The details to modify. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Array} Returns `details`. - */ - function updateWrapDetails(details, bitmask) { - arrayEach(wrapFlags, function(pair) { - var value = '_.' + pair[0]; - if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { - details.push(value); - } - }); - return details.sort(); - } - - /** - * Creates a clone of `wrapper`. - * - * @private - * @param {Object} wrapper The wrapper to clone. - * @returns {Object} Returns the cloned wrapper. - */ - function wrapperClone(wrapper) { - if (wrapper instanceof LazyWrapper) { - return wrapper.clone(); - } - var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); - result.__actions__ = copyArray(wrapper.__actions__); - result.__index__ = wrapper.__index__; - result.__values__ = wrapper.__values__; - return result; - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates an array of elements split into groups the length of `size`. - * If `array` can't be split evenly, the final chunk will be the remaining - * elements. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to process. - * @param {number} [size=1] The length of each chunk - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the new array of chunks. - * @example - * - * _.chunk(['a', 'b', 'c', 'd'], 2); - * // => [['a', 'b'], ['c', 'd']] - * - * _.chunk(['a', 'b', 'c', 'd'], 3); - * // => [['a', 'b', 'c'], ['d']] - */ - function chunk(array, size, guard) { - if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { - size = 1; - } else { - size = nativeMax(toInteger(size), 0); - } - var length = array == null ? 0 : array.length; - if (!length || size < 1) { - return []; - } - var index = 0, - resIndex = 0, - result = Array(nativeCeil(length / size)); - - while (index < length) { - result[resIndex++] = baseSlice(array, index, (index += size)); - } - return result; - } - - /** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ - function compact(array) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value) { - result[resIndex++] = value; - } - } - return result; - } - - /** - * Creates a new array concatenating `array` with any additional arrays - * and/or values. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to concatenate. - * @param {...*} [values] The values to concatenate. - * @returns {Array} Returns the new concatenated array. - * @example - * - * var array = [1]; - * var other = _.concat(array, 2, [3], [[4]]); - * - * console.log(other); - * // => [1, 2, 3, [4]] - * - * console.log(array); - * // => [1] - */ - function concat() { - var length = arguments.length; - if (!length) { - return []; - } - var args = Array(length - 1), - array = arguments[0], - index = length; - - while (index--) { - args[index - 1] = arguments[index]; - } - return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); - } - - /** - * Creates an array of `array` values not included in the other given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * **Note:** Unlike `_.pullAll`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @see _.without, _.xor - * @example - * - * _.difference([2, 1], [2, 3]); - * // => [1] - */ - var difference = baseRest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) - : []; - }); - - /** - * This method is like `_.difference` except that it accepts `iteratee` which - * is invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). - * - * **Note:** Unlike `_.pullAllBy`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [1.2] - * - * // The `_.property` iteratee shorthand. - * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); - * // => [{ 'x': 2 }] - */ - var differenceBy = baseRest(function(array, values) { - var iteratee = last(values); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) - : []; - }); - - /** - * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. The order and - * references of result values are determined by the first array. The comparator - * is invoked with two arguments: (arrVal, othVal). - * - * **Note:** Unlike `_.pullAllWith`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * - * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); - * // => [{ 'x': 2, 'y': 1 }] - */ - var differenceWith = baseRest(function(array, values) { - var comparator = last(values); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) - : []; - }); - - /** - * Creates a slice of `array` with `n` elements dropped from the beginning. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.drop([1, 2, 3]); - * // => [2, 3] - * - * _.drop([1, 2, 3], 2); - * // => [3] - * - * _.drop([1, 2, 3], 5); - * // => [] - * - * _.drop([1, 2, 3], 0); - * // => [1, 2, 3] - */ - function drop(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - return baseSlice(array, n < 0 ? 0 : n, length); - } - - /** - * Creates a slice of `array` with `n` elements dropped from the end. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropRight([1, 2, 3]); - * // => [1, 2] - * - * _.dropRight([1, 2, 3], 2); - * // => [1] - * - * _.dropRight([1, 2, 3], 5); - * // => [] - * - * _.dropRight([1, 2, 3], 0); - * // => [1, 2, 3] - */ - function dropRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, 0, n < 0 ? 0 : n); - } - - /** - * Creates a slice of `array` excluding elements dropped from the end. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.dropRightWhile(users, function(o) { return !o.active; }); - * // => objects for ['barney'] - * - * // The `_.matches` iteratee shorthand. - * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); - * // => objects for ['barney', 'fred'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropRightWhile(users, ['active', false]); - * // => objects for ['barney'] - * - * // The `_.property` iteratee shorthand. - * _.dropRightWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] - */ - function dropRightWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3), true, true) - : []; - } - - /** - * Creates a slice of `array` excluding elements dropped from the beginning. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.dropWhile(users, function(o) { return !o.active; }); - * // => objects for ['pebbles'] - * - * // The `_.matches` iteratee shorthand. - * _.dropWhile(users, { 'user': 'barney', 'active': false }); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropWhile(users, ['active', false]); - * // => objects for ['pebbles'] - * - * // The `_.property` iteratee shorthand. - * _.dropWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] - */ - function dropWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3), true) - : []; - } - - /** - * Fills elements of `array` with `value` from `start` up to, but not - * including, `end`. - * - * **Note:** This method mutates `array`. - * - * @static - * @memberOf _ - * @since 3.2.0 - * @category Array - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.fill(array, 'a'); - * console.log(array); - * // => ['a', 'a', 'a'] - * - * _.fill(Array(3), 2); - * // => [2, 2, 2] - * - * _.fill([4, 6, 8, 10], '*', 1, 3); - * // => [4, '*', '*', 10] - */ - function fill(array, value, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { - start = 0; - end = length; - } - return baseFill(array, value, start, end); - } - - /** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ - function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseFindIndex(array, getIteratee(predicate, 3), index); - } - - /** - * This method is like `_.findIndex` except that it iterates over elements - * of `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); - * // => 2 - * - * // The `_.matches` iteratee shorthand. - * _.findLastIndex(users, { 'user': 'barney', 'active': true }); - * // => 0 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastIndex(users, ['active', false]); - * // => 2 - * - * // The `_.property` iteratee shorthand. - * _.findLastIndex(users, 'active'); - * // => 0 - */ - function findLastIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length - 1; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = fromIndex < 0 - ? nativeMax(length + index, 0) - : nativeMin(index, length - 1); - } - return baseFindIndex(array, getIteratee(predicate, 3), index, true); - } - - /** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ - function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; - } - - /** - * Recursively flattens `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flattenDeep([1, [2, [3, [4]], 5]]); - * // => [1, 2, 3, 4, 5] - */ - function flattenDeep(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, INFINITY) : []; - } - - /** - * Recursively flatten `array` up to `depth` times. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Array - * @param {Array} array The array to flatten. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. - * @example - * - * var array = [1, [2, [3, [4]], 5]]; - * - * _.flattenDepth(array, 1); - * // => [1, 2, [3, [4]], 5] - * - * _.flattenDepth(array, 2); - * // => [1, 2, 3, [4], 5] - */ - function flattenDepth(array, depth) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(array, depth); - } - - /** - * The inverse of `_.toPairs`; this method returns an object composed - * from key-value `pairs`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} pairs The key-value pairs. - * @returns {Object} Returns the new object. - * @example - * - * _.fromPairs([['a', 1], ['b', 2]]); - * // => { 'a': 1, 'b': 2 } - */ - function fromPairs(pairs) { - var index = -1, - length = pairs == null ? 0 : pairs.length, - result = {}; - - while (++index < length) { - var pair = pairs[index]; - result[pair[0]] = pair[1]; - } - return result; - } - - /** - * Gets the first element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias first - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the first element of `array`. - * @example - * - * _.head([1, 2, 3]); - * // => 1 - * - * _.head([]); - * // => undefined - */ - function head(array) { - return (array && array.length) ? array[0] : undefined; - } - - /** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the - * offset from the end of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // Search from the `fromIndex`. - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - */ - function indexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseIndexOf(array, value, index); - } - - /** - * Gets all but the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.initial([1, 2, 3]); - * // => [1, 2] - */ - function initial(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 0, -1) : []; - } - - /** - * Creates an array of unique values that are included in all given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * _.intersection([2, 1], [2, 3]); - * // => [2] - */ - var intersection = baseRest(function(arrays) { - var mapped = arrayMap(arrays, castArrayLikeObject); - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped) - : []; - }); - - /** - * This method is like `_.intersection` except that it accepts `iteratee` - * which is invoked for each element of each `arrays` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [2.1] - * - * // The `_.property` iteratee shorthand. - * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }] - */ - var intersectionBy = baseRest(function(arrays) { - var iteratee = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - if (iteratee === last(mapped)) { - iteratee = undefined; - } else { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, getIteratee(iteratee, 2)) - : []; - }); - - /** - * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. The order and references - * of result values are determined by the first array. The comparator is - * invoked with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.intersectionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }] - */ - var intersectionWith = baseRest(function(arrays) { - var comparator = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - comparator = typeof comparator == 'function' ? comparator : undefined; - if (comparator) { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, undefined, comparator) - : []; - }); - - /** - * Converts all elements in `array` into a string separated by `separator`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to convert. - * @param {string} [separator=','] The element separator. - * @returns {string} Returns the joined string. - * @example - * - * _.join(['a', 'b', 'c'], '~'); - * // => 'a~b~c' - */ - function join(array, separator) { - return array == null ? '' : nativeJoin.call(array, separator); - } - - /** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ - function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; - } - - /** - * This method is like `_.indexOf` except that it iterates over elements of - * `array` from right to left. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.lastIndexOf([1, 2, 1, 2], 2); - * // => 3 - * - * // Search from the `fromIndex`. - * _.lastIndexOf([1, 2, 1, 2], 2, 2); - * // => 1 - */ - function lastIndexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); - } - return value === value - ? strictLastIndexOf(array, value, index) - : baseFindIndex(array, baseIsNaN, index, true); - } - - /** - * Gets the element at index `n` of `array`. If `n` is negative, the nth - * element from the end is returned. - * - * @static - * @memberOf _ - * @since 4.11.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=0] The index of the element to return. - * @returns {*} Returns the nth element of `array`. - * @example - * - * var array = ['a', 'b', 'c', 'd']; - * - * _.nth(array, 1); - * // => 'b' - * - * _.nth(array, -2); - * // => 'c'; - */ - function nth(array, n) { - return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; - } - - /** - * Removes all given values from `array` using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` - * to remove elements from an array by predicate. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {...*} [values] The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = ['a', 'b', 'c', 'a', 'b', 'c']; - * - * _.pull(array, 'a', 'c'); - * console.log(array); - * // => ['b', 'b'] - */ - var pull = baseRest(pullAll); - - /** - * This method is like `_.pull` except that it accepts an array of values to remove. - * - * **Note:** Unlike `_.difference`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = ['a', 'b', 'c', 'a', 'b', 'c']; - * - * _.pullAll(array, ['a', 'c']); - * console.log(array); - * // => ['b', 'b'] - */ - function pullAll(array, values) { - return (array && array.length && values && values.length) - ? basePullAll(array, values) - : array; - } - - /** - * This method is like `_.pullAll` except that it accepts `iteratee` which is - * invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. The iteratee is invoked with one argument: (value). - * - * **Note:** Unlike `_.differenceBy`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns `array`. - * @example - * - * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; - * - * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); - * console.log(array); - * // => [{ 'x': 2 }] - */ - function pullAllBy(array, values, iteratee) { - return (array && array.length && values && values.length) - ? basePullAll(array, values, getIteratee(iteratee, 2)) - : array; - } - - /** - * This method is like `_.pullAll` except that it accepts `comparator` which - * is invoked to compare elements of `array` to `values`. The comparator is - * invoked with two arguments: (arrVal, othVal). - * - * **Note:** Unlike `_.differenceWith`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.6.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. - * @example - * - * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; - * - * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); - * console.log(array); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] - */ - function pullAllWith(array, values, comparator) { - return (array && array.length && values && values.length) - ? basePullAll(array, values, undefined, comparator) - : array; - } - - /** - * Removes elements from `array` corresponding to `indexes` and returns an - * array of removed elements. - * - * **Note:** Unlike `_.at`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {...(number|number[])} [indexes] The indexes of elements to remove. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = ['a', 'b', 'c', 'd']; - * var pulled = _.pullAt(array, [1, 3]); - * - * console.log(array); - * // => ['a', 'c'] - * - * console.log(pulled); - * // => ['b', 'd'] - */ - var pullAt = flatRest(function(array, indexes) { - var length = array == null ? 0 : array.length, - result = baseAt(array, indexes); - - basePullAt(array, arrayMap(indexes, function(index) { - return isIndex(index, length) ? +index : index; - }).sort(compareAscending)); - - return result; - }); - - /** - * Removes all elements from `array` that `predicate` returns truthy for - * and returns an array of the removed elements. The predicate is invoked - * with three arguments: (value, index, array). - * - * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` - * to pull elements from an array by value. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = [1, 2, 3, 4]; - * var evens = _.remove(array, function(n) { - * return n % 2 == 0; - * }); - * - * console.log(array); - * // => [1, 3] - * - * console.log(evens); - * // => [2, 4] - */ - function remove(array, predicate) { - var result = []; - if (!(array && array.length)) { - return result; - } - var index = -1, - indexes = [], - length = array.length; - - predicate = getIteratee(predicate, 3); - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result.push(value); - indexes.push(index); - } - } - basePullAt(array, indexes); - return result; - } - - /** - * Reverses `array` so that the first element becomes the last, the second - * element becomes the second to last, and so on. - * - * **Note:** This method mutates `array` and is based on - * [`Array#reverse`](https://mdn.io/Array/reverse). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.reverse(array); - * // => [3, 2, 1] - * - * console.log(array); - * // => [3, 2, 1] - */ - function reverse(array) { - return array == null ? array : nativeReverse.call(array); - } - - /** - * Creates a slice of `array` from `start` up to, but not including, `end`. - * - * **Note:** This method is used instead of - * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are - * returned. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function slice(array, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { - start = 0; - end = length; - } - else { - start = start == null ? 0 : toInteger(start); - end = end === undefined ? length : toInteger(end); - } - return baseSlice(array, start, end); - } - - /** - * Uses a binary search to determine the lowest index at which `value` - * should be inserted into `array` in order to maintain its sort order. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * _.sortedIndex([30, 50], 40); - * // => 1 - */ - function sortedIndex(array, value) { - return baseSortedIndex(array, value); - } - - /** - * This method is like `_.sortedIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * var objects = [{ 'x': 4 }, { 'x': 5 }]; - * - * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); - * // => 0 - */ - function sortedIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); - } - - /** - * This method is like `_.indexOf` except that it performs a binary - * search on a sorted `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.sortedIndexOf([4, 5, 5, 5, 6], 5); - * // => 1 - */ - function sortedIndexOf(array, value) { - var length = array == null ? 0 : array.length; - if (length) { - var index = baseSortedIndex(array, value); - if (index < length && eq(array[index], value)) { - return index; - } - } - return -1; - } - - /** - * This method is like `_.sortedIndex` except that it returns the highest - * index at which `value` should be inserted into `array` in order to - * maintain its sort order. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * _.sortedLastIndex([4, 5, 5, 5, 6], 5); - * // => 4 - */ - function sortedLastIndex(array, value) { - return baseSortedIndex(array, value, true); - } - - /** - * This method is like `_.sortedLastIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * var objects = [{ 'x': 4 }, { 'x': 5 }]; - * - * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); - * // => 1 - * - * // The `_.property` iteratee shorthand. - * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); - * // => 1 - */ - function sortedLastIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); - } - - /** - * This method is like `_.lastIndexOf` except that it performs a binary - * search on a sorted `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); - * // => 3 - */ - function sortedLastIndexOf(array, value) { - var length = array == null ? 0 : array.length; - if (length) { - var index = baseSortedIndex(array, value, true) - 1; - if (eq(array[index], value)) { - return index; - } - } - return -1; - } - - /** - * This method is like `_.uniq` except that it's designed and optimized - * for sorted arrays. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.sortedUniq([1, 1, 2]); - * // => [1, 2] - */ - function sortedUniq(array) { - return (array && array.length) - ? baseSortedUniq(array) - : []; - } - - /** - * This method is like `_.uniqBy` except that it's designed and optimized - * for sorted arrays. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); - * // => [1.1, 2.3] - */ - function sortedUniqBy(array, iteratee) { - return (array && array.length) - ? baseSortedUniq(array, getIteratee(iteratee, 2)) - : []; - } - - /** - * Gets all but the first element of `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.tail([1, 2, 3]); - * // => [2, 3] - */ - function tail(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 1, length) : []; - } - - /** - * Creates a slice of `array` with `n` elements taken from the beginning. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.take([1, 2, 3]); - * // => [1] - * - * _.take([1, 2, 3], 2); - * // => [1, 2] - * - * _.take([1, 2, 3], 5); - * // => [1, 2, 3] - * - * _.take([1, 2, 3], 0); - * // => [] - */ - function take(array, n, guard) { - if (!(array && array.length)) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - return baseSlice(array, 0, n < 0 ? 0 : n); - } - - /** - * Creates a slice of `array` with `n` elements taken from the end. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.takeRight([1, 2, 3]); - * // => [3] - * - * _.takeRight([1, 2, 3], 2); - * // => [2, 3] - * - * _.takeRight([1, 2, 3], 5); - * // => [1, 2, 3] - * - * _.takeRight([1, 2, 3], 0); - * // => [] - */ - function takeRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, n < 0 ? 0 : n, length); - } - - /** - * Creates a slice of `array` with elements taken from the end. Elements are - * taken until `predicate` returns falsey. The predicate is invoked with - * three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.takeRightWhile(users, function(o) { return !o.active; }); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.matches` iteratee shorthand. - * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); - * // => objects for ['pebbles'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.takeRightWhile(users, ['active', false]); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.property` iteratee shorthand. - * _.takeRightWhile(users, 'active'); - * // => [] - */ - function takeRightWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3), false, true) - : []; - } - - /** - * Creates a slice of `array` with elements taken from the beginning. Elements - * are taken until `predicate` returns falsey. The predicate is invoked with - * three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.takeWhile(users, function(o) { return !o.active; }); - * // => objects for ['barney', 'fred'] - * - * // The `_.matches` iteratee shorthand. - * _.takeWhile(users, { 'user': 'barney', 'active': false }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.takeWhile(users, ['active', false]); - * // => objects for ['barney', 'fred'] - * - * // The `_.property` iteratee shorthand. - * _.takeWhile(users, 'active'); - * // => [] - */ - function takeWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3)) - : []; - } - - /** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ - var union = baseRest(function(arrays) { - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); - }); - - /** - * This method is like `_.union` except that it accepts `iteratee` which is - * invoked for each element of each `arrays` to generate the criterion by - * which uniqueness is computed. Result values are chosen from the first - * array in which the value occurs. The iteratee is invoked with one argument: - * (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.unionBy([2.1], [1.2, 2.3], Math.floor); - * // => [2.1, 1.2] - * - * // The `_.property` iteratee shorthand. - * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ - var unionBy = baseRest(function(arrays) { - var iteratee = last(arrays); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); - }); - - /** - * This method is like `_.union` except that it accepts `comparator` which - * is invoked to compare elements of `arrays`. Result values are chosen from - * the first array in which the value occurs. The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of combined values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.unionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] - */ - var unionWith = baseRest(function(arrays) { - var comparator = last(arrays); - comparator = typeof comparator == 'function' ? comparator : undefined; - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); - }); - - /** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each element - * is kept. The order of result values is determined by the order they occur - * in the array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.uniq([2, 1, 2]); - * // => [2, 1] - */ - function uniq(array) { - return (array && array.length) ? baseUniq(array) : []; - } - - /** - * This method is like `_.uniq` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * uniqueness is computed. The order of result values is determined by the - * order they occur in the array. The iteratee is invoked with one argument: - * (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.uniqBy([2.1, 1.2, 2.3], Math.floor); - * // => [2.1, 1.2] - * - * // The `_.property` iteratee shorthand. - * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ - function uniqBy(array, iteratee) { - return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; - } - - /** - * This method is like `_.uniq` except that it accepts `comparator` which - * is invoked to compare elements of `array`. The order of result values is - * determined by the order they occur in the array.The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.uniqWith(objects, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] - */ - function uniqWith(array, comparator) { - comparator = typeof comparator == 'function' ? comparator : undefined; - return (array && array.length) ? baseUniq(array, undefined, comparator) : []; - } - - /** - * This method is like `_.zip` except that it accepts an array of grouped - * elements and creates an array regrouping the elements to their pre-zip - * configuration. - * - * @static - * @memberOf _ - * @since 1.2.0 - * @category Array - * @param {Array} array The array of grouped elements to process. - * @returns {Array} Returns the new array of regrouped elements. - * @example - * - * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] - * - * _.unzip(zipped); - * // => [['a', 'b'], [1, 2], [true, false]] - */ - function unzip(array) { - if (!(array && array.length)) { - return []; - } - var length = 0; - array = arrayFilter(array, function(group) { - if (isArrayLikeObject(group)) { - length = nativeMax(group.length, length); - return true; - } - }); - return baseTimes(length, function(index) { - return arrayMap(array, baseProperty(index)); - }); - } - - /** - * This method is like `_.unzip` except that it accepts `iteratee` to specify - * how regrouped values should be combined. The iteratee is invoked with the - * elements of each group: (...group). - * - * @static - * @memberOf _ - * @since 3.8.0 - * @category Array - * @param {Array} array The array of grouped elements to process. - * @param {Function} [iteratee=_.identity] The function to combine - * regrouped values. - * @returns {Array} Returns the new array of regrouped elements. - * @example - * - * var zipped = _.zip([1, 2], [10, 20], [100, 200]); - * // => [[1, 10, 100], [2, 20, 200]] - * - * _.unzipWith(zipped, _.add); - * // => [3, 30, 300] - */ - function unzipWith(array, iteratee) { - if (!(array && array.length)) { - return []; - } - var result = unzip(array); - if (iteratee == null) { - return result; - } - return arrayMap(result, function(group) { - return apply(iteratee, undefined, group); - }); - } - - /** - * Creates an array excluding all given values using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.pull`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...*} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @see _.difference, _.xor - * @example - * - * _.without([2, 1, 2, 3], 1, 2); - * // => [3] - */ - var without = baseRest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, values) - : []; - }); - - /** - * Creates an array of unique values that is the - * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) - * of the given arrays. The order of result values is determined by the order - * they occur in the arrays. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of filtered values. - * @see _.difference, _.without - * @example - * - * _.xor([2, 1], [2, 3]); - * // => [1, 3] - */ - var xor = baseRest(function(arrays) { - return baseXor(arrayFilter(arrays, isArrayLikeObject)); - }); - - /** - * This method is like `_.xor` except that it accepts `iteratee` which is - * invoked for each element of each `arrays` to generate the criterion by - * which by which they're compared. The order of result values is determined - * by the order they occur in the arrays. The iteratee is invoked with one - * argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [1.2, 3.4] - * - * // The `_.property` iteratee shorthand. - * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 2 }] - */ - var xorBy = baseRest(function(arrays) { - var iteratee = last(arrays); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); - }); - - /** - * This method is like `_.xor` except that it accepts `comparator` which is - * invoked to compare elements of `arrays`. The order of result values is - * determined by the order they occur in the arrays. The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.xorWith(objects, others, _.isEqual); - * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] - */ - var xorWith = baseRest(function(arrays) { - var comparator = last(arrays); - comparator = typeof comparator == 'function' ? comparator : undefined; - return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); - }); - - /** - * Creates an array of grouped elements, the first of which contains the - * first elements of the given arrays, the second of which contains the - * second elements of the given arrays, and so on. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @returns {Array} Returns the new array of grouped elements. - * @example - * - * _.zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] - */ - var zip = baseRest(unzip); - - /** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. - * - * @static - * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ - function zipObject(props, values) { - return baseZipObject(props || [], values || [], assignValue); - } - - /** - * This method is like `_.zipObject` except that it supports property paths. - * - * @static - * @memberOf _ - * @since 4.1.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); - * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } - */ - function zipObjectDeep(props, values) { - return baseZipObject(props || [], values || [], baseSet); - } - - /** - * This method is like `_.zip` except that it accepts `iteratee` to specify - * how grouped values should be combined. The iteratee is invoked with the - * elements of each group: (...group). - * - * @static - * @memberOf _ - * @since 3.8.0 - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @param {Function} [iteratee=_.identity] The function to combine - * grouped values. - * @returns {Array} Returns the new array of grouped elements. - * @example - * - * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { - * return a + b + c; - * }); - * // => [111, 222] - */ - var zipWith = baseRest(function(arrays) { - var length = arrays.length, - iteratee = length > 1 ? arrays[length - 1] : undefined; - - iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; - return unzipWith(arrays, iteratee); - }); - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` wrapper instance that wraps `value` with explicit method - * chain sequences enabled. The result of such sequences must be unwrapped - * with `_#value`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Seq - * @param {*} value The value to wrap. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'pebbles', 'age': 1 } - * ]; - * - * var youngest = _ - * .chain(users) - * .sortBy('age') - * .map(function(o) { - * return o.user + ' is ' + o.age; - * }) - * .head() - * .value(); - * // => 'pebbles is 1' - */ - function chain(value) { - var result = lodash(value); - result.__chain__ = true; - return result; - } - - /** - * This method invokes `interceptor` and returns `value`. The interceptor - * is invoked with one argument; (value). The purpose of this method is to - * "tap into" a method chain sequence in order to modify intermediate results. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns `value`. - * @example - * - * _([1, 2, 3]) - * .tap(function(array) { - * // Mutate input array. - * array.pop(); - * }) - * .reverse() - * .value(); - * // => [2, 1] - */ - function tap(value, interceptor) { - interceptor(value); - return value; - } - - /** - * This method is like `_.tap` except that it returns the result of `interceptor`. - * The purpose of this method is to "pass thru" values replacing intermediate - * results in a method chain sequence. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns the result of `interceptor`. - * @example - * - * _(' abc ') - * .chain() - * .trim() - * .thru(function(value) { - * return [value]; - * }) - * .value(); - * // => ['abc'] - */ - function thru(value, interceptor) { - return interceptor(value); - } - - /** - * This method is the wrapper version of `_.at`. - * - * @name at - * @memberOf _ - * @since 1.0.0 - * @category Seq - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; - * - * _(object).at(['a[0].b.c', 'a[1]']).value(); - * // => [3, 4] - */ - var wrapperAt = flatRest(function(paths) { - var length = paths.length, - start = length ? paths[0] : 0, - value = this.__wrapped__, - interceptor = function(object) { return baseAt(object, paths); }; - - if (length > 1 || this.__actions__.length || - !(value instanceof LazyWrapper) || !isIndex(start)) { - return this.thru(interceptor); - } - value = value.slice(start, +start + (length ? 1 : 0)); - value.__actions__.push({ - 'func': thru, - 'args': [interceptor], - 'thisArg': undefined - }); - return new LodashWrapper(value, this.__chain__).thru(function(array) { - if (length && !array.length) { - array.push(undefined); - } - return array; - }); - }); - - /** - * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. - * - * @name chain - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * // A sequence without explicit chaining. - * _(users).head(); - * // => { 'user': 'barney', 'age': 36 } - * - * // A sequence with explicit chaining. - * _(users) - * .chain() - * .head() - * .pick('user') - * .value(); - * // => { 'user': 'barney' } - */ - function wrapperChain() { - return chain(this); - } - - /** - * Executes the chain sequence and returns the wrapped result. - * - * @name commit - * @memberOf _ - * @since 3.2.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapped = _(array).push(3); - * - * console.log(array); - * // => [1, 2] - * - * wrapped = wrapped.commit(); - * console.log(array); - * // => [1, 2, 3] - * - * wrapped.last(); - * // => 3 - * - * console.log(array); - * // => [1, 2, 3] - */ - function wrapperCommit() { - return new LodashWrapper(this.value(), this.__chain__); - } - - /** - * Gets the next value on a wrapped object following the - * [iterator protocol](https://mdn.io/iteration_protocols#iterator). - * - * @name next - * @memberOf _ - * @since 4.0.0 - * @category Seq - * @returns {Object} Returns the next iterator value. - * @example - * - * var wrapped = _([1, 2]); - * - * wrapped.next(); - * // => { 'done': false, 'value': 1 } - * - * wrapped.next(); - * // => { 'done': false, 'value': 2 } - * - * wrapped.next(); - * // => { 'done': true, 'value': undefined } - */ - function wrapperNext() { - if (this.__values__ === undefined) { - this.__values__ = toArray(this.value()); - } - var done = this.__index__ >= this.__values__.length, - value = done ? undefined : this.__values__[this.__index__++]; - - return { 'done': done, 'value': value }; - } - - /** - * Enables the wrapper to be iterable. - * - * @name Symbol.iterator - * @memberOf _ - * @since 4.0.0 - * @category Seq - * @returns {Object} Returns the wrapper object. - * @example - * - * var wrapped = _([1, 2]); - * - * wrapped[Symbol.iterator]() === wrapped; - * // => true - * - * Array.from(wrapped); - * // => [1, 2] - */ - function wrapperToIterator() { - return this; - } - - /** - * Creates a clone of the chain sequence planting `value` as the wrapped value. - * - * @name plant - * @memberOf _ - * @since 3.2.0 - * @category Seq - * @param {*} value The value to plant. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var wrapped = _([1, 2]).map(square); - * var other = wrapped.plant([3, 4]); - * - * other.value(); - * // => [9, 16] - * - * wrapped.value(); - * // => [1, 4] - */ - function wrapperPlant(value) { - var result, - parent = this; - - while (parent instanceof baseLodash) { - var clone = wrapperClone(parent); - clone.__index__ = 0; - clone.__values__ = undefined; - if (result) { - previous.__wrapped__ = clone; - } else { - result = clone; - } - var previous = clone; - parent = parent.__wrapped__; - } - previous.__wrapped__ = value; - return result; - } - - /** - * This method is the wrapper version of `_.reverse`. - * - * **Note:** This method mutates the wrapped array. - * - * @name reverse - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2, 3]; - * - * _(array).reverse().value() - * // => [3, 2, 1] - * - * console.log(array); - * // => [3, 2, 1] - */ - function wrapperReverse() { - var value = this.__wrapped__; - if (value instanceof LazyWrapper) { - var wrapped = value; - if (this.__actions__.length) { - wrapped = new LazyWrapper(this); - } - wrapped = wrapped.reverse(); - wrapped.__actions__.push({ - 'func': thru, - 'args': [reverse], - 'thisArg': undefined - }); - return new LodashWrapper(wrapped, this.__chain__); - } - return this.thru(reverse); - } - - /** - * Executes the chain sequence to resolve the unwrapped value. - * - * @name value - * @memberOf _ - * @since 0.1.0 - * @alias toJSON, valueOf - * @category Seq - * @returns {*} Returns the resolved unwrapped value. - * @example - * - * _([1, 2, 3]).value(); - * // => [1, 2, 3] - */ - function wrapperValue() { - return baseWrapperValue(this.__wrapped__, this.__actions__); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is the number of times the key was returned by `iteratee`. The - * iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.countBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': 1, '6': 2 } - * - * // The `_.property` iteratee shorthand. - * _.countBy(['one', 'two', 'three'], 'length'); - * // => { '3': 2, '5': 1 } - */ - var countBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - ++result[key]; - } else { - baseAssignValue(result, key, 1); - } - }); - - /** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * Iteration is stopped once `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * **Note:** This method returns `true` for - * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because - * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of - * elements of empty collections. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.every(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.every(users, 'active'); - * // => false - */ - function every(collection, predicate, guard) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; - } - return func(collection, getIteratee(predicate, 3)); - } - - /** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ - function filter(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, getIteratee(predicate, 3)); - } - - /** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ - var find = createFind(findIndex); - - /** - * This method is like `_.find` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=collection.length-1] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * _.findLast([1, 2, 3, 4], function(n) { - * return n % 2 == 1; - * }); - * // => 3 - */ - var findLast = createFind(findLastIndex); - - /** - * Creates a flattened array of values by running each element in `collection` - * thru `iteratee` and flattening the mapped results. The iteratee is invoked - * with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [n, n]; - * } - * - * _.flatMap([1, 2], duplicate); - * // => [1, 1, 2, 2] - */ - function flatMap(collection, iteratee) { - return baseFlatten(map(collection, iteratee), 1); - } - - /** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [[[n, n]]]; - * } - * - * _.flatMapDeep([1, 2], duplicate); - * // => [1, 1, 2, 2] - */ - function flatMapDeep(collection, iteratee) { - return baseFlatten(map(collection, iteratee), INFINITY); - } - - /** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results up to `depth` times. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [[[n, n]]]; - * } - * - * _.flatMapDepth([1, 2], duplicate, 2); - * // => [[1, 1], [2, 2]] - */ - function flatMapDepth(collection, iteratee, depth) { - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(map(collection, iteratee), depth); - } - - /** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ - function forEach(collection, iteratee) { - var func = isArray(collection) ? arrayEach : baseEach; - return func(collection, getIteratee(iteratee, 3)); - } - - /** - * This method is like `_.forEach` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @alias eachRight - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEach - * @example - * - * _.forEachRight([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `2` then `1`. - */ - function forEachRight(collection, iteratee) { - var func = isArray(collection) ? arrayEachRight : baseEachRight; - return func(collection, getIteratee(iteratee, 3)); - } - - /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The order of grouped values - * is determined by the order they occur in `collection`. The corresponding - * value of each key is an array of elements responsible for generating the - * key. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.groupBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': [4.2], '6': [6.1, 6.3] } - * - * // The `_.property` iteratee shorthand. - * _.groupBy(['one', 'two', 'three'], 'length'); - * // => { '3': ['one', 'two'], '5': ['three'] } - */ - var groupBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - result[key].push(value); - } else { - baseAssignValue(result, key, [value]); - } - }); - - /** - * Checks if `value` is in `collection`. If `collection` is a string, it's - * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * is used for equality comparisons. If `fromIndex` is negative, it's used as - * the offset from the end of `collection`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {boolean} Returns `true` if `value` is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'a': 1, 'b': 2 }, 1); - * // => true - * - * _.includes('abcd', 'bc'); - * // => true - */ - function includes(collection, value, fromIndex, guard) { - collection = isArrayLike(collection) ? collection : values(collection); - fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; - - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); - } - return isString(collection) - ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) - : (!!length && baseIndexOf(collection, value, fromIndex) > -1); - } - - /** - * Invokes the method at `path` of each element in `collection`, returning - * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `path` is a function, it's invoked - * for, and `this` bound to, each element in `collection`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|string} path The path of the method to invoke or - * the function invoked per iteration. - * @param {...*} [args] The arguments to invoke each method with. - * @returns {Array} Returns the array of results. - * @example - * - * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invokeMap([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ - var invokeMap = baseRest(function(collection, path, args) { - var index = -1, - isFunc = typeof path == 'function', - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value) { - result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); - }); - return result; - }); - - /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is the last element responsible for generating the key. The - * iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * var array = [ - * { 'dir': 'left', 'code': 97 }, - * { 'dir': 'right', 'code': 100 } - * ]; - * - * _.keyBy(array, function(o) { - * return String.fromCharCode(o.code); - * }); - * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } - * - * _.keyBy(array, 'dir'); - * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } - */ - var keyBy = createAggregator(function(result, value, key) { - baseAssignValue(result, key, value); - }); - - /** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ - function map(collection, iteratee) { - var func = isArray(collection) ? arrayMap : baseMap; - return func(collection, getIteratee(iteratee, 3)); - } - - /** - * This method is like `_.sortBy` except that it allows specifying the sort - * orders of the iteratees to sort by. If `orders` is unspecified, all values - * are sorted in ascending order. Otherwise, specify an order of "desc" for - * descending or "asc" for ascending sort order of corresponding values. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] - * The iteratees to sort by. - * @param {string[]} [orders] The sort orders of `iteratees`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 34 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'barney', 'age': 36 } - * ]; - * - * // Sort by `user` in ascending order and by `age` in descending order. - * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] - */ - function orderBy(collection, iteratees, orders, guard) { - if (collection == null) { - return []; - } - if (!isArray(iteratees)) { - iteratees = iteratees == null ? [] : [iteratees]; - } - orders = guard ? undefined : orders; - if (!isArray(orders)) { - orders = orders == null ? [] : [orders]; - } - return baseOrderBy(collection, iteratees, orders); - } - - /** - * Creates an array of elements split into two groups, the first of which - * contains elements `predicate` returns truthy for, the second of which - * contains elements `predicate` returns falsey for. The predicate is - * invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the array of grouped elements. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true }, - * { 'user': 'pebbles', 'age': 1, 'active': false } - * ]; - * - * _.partition(users, function(o) { return o.active; }); - * // => objects for [['fred'], ['barney', 'pebbles']] - * - * // The `_.matches` iteratee shorthand. - * _.partition(users, { 'age': 1, 'active': false }); - * // => objects for [['pebbles'], ['barney', 'fred']] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.partition(users, ['active', false]); - * // => objects for [['barney', 'pebbles'], ['fred']] - * - * // The `_.property` iteratee shorthand. - * _.partition(users, 'active'); - * // => objects for [['fred'], ['barney', 'pebbles']] - */ - var partition = createAggregator(function(result, value, key) { - result[key ? 0 : 1].push(value); - }, function() { return [[], []]; }); - - /** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ - function reduce(collection, iteratee, accumulator) { - var func = isArray(collection) ? arrayReduce : baseReduce, - initAccum = arguments.length < 3; - - return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); - } - - /** - * This method is like `_.reduce` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduce - * @example - * - * var array = [[0, 1], [2, 3], [4, 5]]; - * - * _.reduceRight(array, function(flattened, other) { - * return flattened.concat(other); - * }, []); - * // => [4, 5, 2, 3, 0, 1] - */ - function reduceRight(collection, iteratee, accumulator) { - var func = isArray(collection) ? arrayReduceRight : baseReduce, - initAccum = arguments.length < 3; - - return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); - } - - /** - * The opposite of `_.filter`; this method returns the elements of `collection` - * that `predicate` does **not** return truthy for. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.filter - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true } - * ]; - * - * _.reject(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.reject(users, { 'age': 40, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.reject(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.reject(users, 'active'); - * // => objects for ['barney'] - */ - function reject(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, negate(getIteratee(predicate, 3))); - } - - /** - * Gets a random element from `collection`. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Collection - * @param {Array|Object} collection The collection to sample. - * @returns {*} Returns the random element. - * @example - * - * _.sample([1, 2, 3, 4]); - * // => 2 - */ - function sample(collection) { - var func = isArray(collection) ? arraySample : baseSample; - return func(collection); - } - - /** - * Gets `n` random elements at unique keys from `collection` up to the - * size of `collection`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to sample. - * @param {number} [n=1] The number of elements to sample. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the random elements. - * @example - * - * _.sampleSize([1, 2, 3], 2); - * // => [3, 1] - * - * _.sampleSize([1, 2, 3], 4); - * // => [2, 3, 1] - */ - function sampleSize(collection, n, guard) { - if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { - n = 1; - } else { - n = toInteger(n); - } - var func = isArray(collection) ? arraySampleSize : baseSampleSize; - return func(collection, n); - } - - /** - * Creates an array of shuffled values, using a version of the - * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. - * @example - * - * _.shuffle([1, 2, 3, 4]); - * // => [4, 1, 3, 2] - */ - function shuffle(collection) { - var func = isArray(collection) ? arrayShuffle : baseShuffle; - return func(collection); - } - - /** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ - function size(collection) { - if (collection == null) { - return 0; - } - if (isArrayLike(collection)) { - return isString(collection) ? stringSize(collection) : collection.length; - } - var tag = getTag(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return baseKeys(collection).length; - } - - /** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * Iteration is stopped once `predicate` returns truthy. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.some(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.some(users, 'active'); - * // => true - */ - function some(collection, predicate, guard) { - var func = isArray(collection) ? arraySome : baseSome; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; - } - return func(collection, getIteratee(predicate, 3)); - } - - /** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ - var sortBy = baseRest(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return baseOrderBy(collection, baseFlatten(iteratees, 1), []); - }); - - /*------------------------------------------------------------------------*/ - - /** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ - var now = ctxNow || function() { - return root.Date.now(); - }; - - /*------------------------------------------------------------------------*/ - - /** - * The opposite of `_.before`; this method creates a function that invokes - * `func` once it's called `n` or more times. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {number} n The number of calls before `func` is invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var saves = ['profile', 'settings']; - * - * var done = _.after(saves.length, function() { - * console.log('done saving!'); - * }); - * - * _.forEach(saves, function(type) { - * asyncSave({ 'type': type, 'complete': done }); - * }); - * // => Logs 'done saving!' after the two async saves have completed. - */ - function after(n, func) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; - } - - /** - * Creates a function that invokes `func`, with up to `n` arguments, - * ignoring any additional arguments. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to cap arguments for. - * @param {number} [n=func.length] The arity cap. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new capped function. - * @example - * - * _.map(['6', '8', '10'], _.ary(parseInt, 1)); - * // => [6, 8, 10] - */ - function ary(func, n, guard) { - n = guard ? undefined : n; - n = (func && n == null) ? func.length : n; - return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); - } - - /** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. - */ - function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result; - }; - } - - /** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and `partials` prepended to the arguments it receives. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" - * property of bound functions. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * function greet(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * // Bound with placeholders. - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' - */ - var bind = baseRest(function(func, thisArg, partials) { - var bitmask = WRAP_BIND_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bind)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(func, bitmask, thisArg, partials, holders); - }); - - /** - * Creates a function that invokes the method at `object[key]` with `partials` - * prepended to the arguments it receives. - * - * This method differs from `_.bind` by allowing bound functions to reference - * methods that may be redefined or don't yet exist. See - * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) - * for more details. - * - * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Function - * @param {Object} object The object to invoke the method on. - * @param {string} key The key of the method. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var object = { - * 'user': 'fred', - * 'greet': function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * }; - * - * var bound = _.bindKey(object, 'greet', 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * object.greet = function(greeting, punctuation) { - * return greeting + 'ya ' + this.user + punctuation; - * }; - * - * bound('!'); - * // => 'hiya fred!' - * - * // Bound with placeholders. - * var bound = _.bindKey(object, 'greet', _, '!'); - * bound('hi'); - * // => 'hiya fred!' - */ - var bindKey = baseRest(function(object, key, partials) { - var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bindKey)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(key, bitmask, object, partials, holders); - }); - - /** - * Creates a function that accepts arguments of `func` and either invokes - * `func` returning its result, if at least `arity` number of arguments have - * been provided, or returns a function that accepts the remaining `func` - * arguments, and so on. The arity of `func` may be specified if `func.length` - * is not sufficient. - * - * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for provided arguments. - * - * **Note:** This method doesn't set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curry(abc); - * - * curried(1)(2)(3); - * // => [1, 2, 3] - * - * curried(1, 2)(3); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // Curried with placeholders. - * curried(1)(_, 3)(2); - * // => [1, 2, 3] - */ - function curry(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curry.placeholder; - return result; - } - - /** - * This method is like `_.curry` except that arguments are applied to `func` - * in the manner of `_.partialRight` instead of `_.partial`. - * - * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for provided arguments. - * - * **Note:** This method doesn't set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curryRight(abc); - * - * curried(3)(2)(1); - * // => [1, 2, 3] - * - * curried(2, 3)(1); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // Curried with placeholders. - * curried(3)(1, _)(2); - * // => [1, 2, 3] - */ - function curryRight(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curryRight.placeholder; - return result; - } - - /** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide `options` to indicate whether `func` should be invoked on the - * leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent - * calls to the debounced function return the result of the last `func` - * invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the debounced function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=false] - * Specify invoking on the leading edge of the timeout. - * @param {number} [options.maxWait] - * The maximum time `func` is allowed to be delayed before it's invoked. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // Avoid costly calculations while the window size is in flux. - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // Invoke `sendMail` when clicked, debouncing subsequent calls. - * jQuery(element).on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // Ensure `batchLog` is invoked once after 1 second of debounced calls. - * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); - * var source = new EventSource('/stream'); - * jQuery(source).on('message', debounced); - * - * // Cancel the trailing debounced invocation. - * jQuery(window).on('popstate', debounced.cancel); - */ - function debounce(func, wait, options) { - var lastArgs, - lastThis, - maxWait, - result, - timerId, - lastCallTime, - lastInvokeTime = 0, - leading = false, - maxing = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = toNumber(wait) || 0; - if (isObject(options)) { - leading = !!options.leading; - maxing = 'maxWait' in options; - maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - - function invokeFunc(time) { - var args = lastArgs, - thisArg = lastThis; - - lastArgs = lastThis = undefined; - lastInvokeTime = time; - result = func.apply(thisArg, args); - return result; - } - - function leadingEdge(time) { - // Reset any `maxWait` timer. - lastInvokeTime = time; - // Start the timer for the trailing edge. - timerId = setTimeout(timerExpired, wait); - // Invoke the leading edge. - return leading ? invokeFunc(time) : result; - } - - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime, - timeWaiting = wait - timeSinceLastCall; - - return maxing - ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) - : timeWaiting; - } - - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime; - - // Either this is the first call, activity has stopped and we're at the - // trailing edge, the system time has gone backwards and we're treating - // it as the trailing edge, or we've hit the `maxWait` limit. - return (lastCallTime === undefined || (timeSinceLastCall >= wait) || - (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); - } - - function timerExpired() { - var time = now(); - if (shouldInvoke(time)) { - return trailingEdge(time); - } - // Restart the timer. - timerId = setTimeout(timerExpired, remainingWait(time)); - } - - function trailingEdge(time) { - timerId = undefined; - - // Only invoke if we have `lastArgs` which means `func` has been - // debounced at least once. - if (trailing && lastArgs) { - return invokeFunc(time); - } - lastArgs = lastThis = undefined; - return result; - } - - function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = undefined; - } - - function flush() { - return timerId === undefined ? result : trailingEdge(now()); - } - - function debounced() { - var time = now(), - isInvoking = shouldInvoke(time); - - lastArgs = arguments; - lastThis = this; - lastCallTime = time; - - if (isInvoking) { - if (timerId === undefined) { - return leadingEdge(lastCallTime); - } - if (maxing) { - // Handle invocations in a tight loop. - clearTimeout(timerId); - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === undefined) { - timerId = setTimeout(timerExpired, wait); - } - return result; - } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; - } - - /** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // => Logs 'deferred' after one millisecond. - */ - var defer = baseRest(function(func, args) { - return baseDelay(func, 1, args); - }); - - /** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => Logs 'later' after one second. - */ - var delay = baseRest(function(func, wait, args) { - return baseDelay(func, toNumber(wait) || 0, args); - }); - - /** - * Creates a function that invokes `func` with arguments reversed. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new flipped function. - * @example - * - * var flipped = _.flip(function() { - * return _.toArray(arguments); - * }); - * - * flipped('a', 'b', 'c', 'd'); - * // => ['d', 'c', 'b', 'a'] - */ - function flip(func) { - return createWrap(func, WRAP_FLIP_FLAG); - } - - /** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ - function memoize(func, resolver) { - if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; - } - - // Expose `MapCache`. - memoize.Cache = MapCache; - - /** - * Creates a function that negates the result of the predicate `func`. The - * `func` predicate is invoked with the `this` binding and arguments of the - * created function. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new negated function. - * @example - * - * function isEven(n) { - * return n % 2 == 0; - * } - * - * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); - * // => [1, 3, 5] - */ - function negate(predicate) { - if (typeof predicate != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function() { - var args = arguments; - switch (args.length) { - case 0: return !predicate.call(this); - case 1: return !predicate.call(this, args[0]); - case 2: return !predicate.call(this, args[0], args[1]); - case 3: return !predicate.call(this, args[0], args[1], args[2]); - } - return !predicate.apply(this, args); - }; - } - - /** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first invocation. The `func` is - * invoked with the `this` binding and arguments of the created function. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // => `createApplication` is invoked once - */ - function once(func) { - return before(2, func); - } - - /** - * Creates a function that invokes `func` with its arguments transformed. - * - * @static - * @since 4.0.0 - * @memberOf _ - * @category Function - * @param {Function} func The function to wrap. - * @param {...(Function|Function[])} [transforms=[_.identity]] - * The argument transforms. - * @returns {Function} Returns the new function. - * @example - * - * function doubled(n) { - * return n * 2; - * } - * - * function square(n) { - * return n * n; - * } - * - * var func = _.overArgs(function(x, y) { - * return [x, y]; - * }, [square, doubled]); - * - * func(9, 3); - * // => [81, 6] - * - * func(10, 5); - * // => [100, 10] - */ - var overArgs = castRest(function(func, transforms) { - transforms = (transforms.length == 1 && isArray(transforms[0])) - ? arrayMap(transforms[0], baseUnary(getIteratee())) - : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); - - var funcsLength = transforms.length; - return baseRest(function(args) { - var index = -1, - length = nativeMin(args.length, funcsLength); - - while (++index < length) { - args[index] = transforms[index].call(this, args[index]); - } - return apply(func, this, args); - }); - }); - - /** - * Creates a function that invokes `func` with `partials` prepended to the - * arguments it receives. This method is like `_.bind` except it does **not** - * alter the `this` binding. - * - * The `_.partial.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method doesn't set the "length" property of partially - * applied functions. - * - * @static - * @memberOf _ - * @since 0.2.0 - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * function greet(greeting, name) { - * return greeting + ' ' + name; - * } - * - * var sayHelloTo = _.partial(greet, 'hello'); - * sayHelloTo('fred'); - * // => 'hello fred' - * - * // Partially applied with placeholders. - * var greetFred = _.partial(greet, _, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - */ - var partial = baseRest(function(func, partials) { - var holders = replaceHolders(partials, getHolder(partial)); - return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); - }); - - /** - * This method is like `_.partial` except that partially applied arguments - * are appended to the arguments it receives. - * - * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method doesn't set the "length" property of partially - * applied functions. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * function greet(greeting, name) { - * return greeting + ' ' + name; - * } - * - * var greetFred = _.partialRight(greet, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - * - * // Partially applied with placeholders. - * var sayHelloTo = _.partialRight(greet, 'hello', _); - * sayHelloTo('fred'); - * // => 'hello fred' - */ - var partialRight = baseRest(function(func, partials) { - var holders = replaceHolders(partials, getHolder(partialRight)); - return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); - }); - - /** - * Creates a function that invokes `func` with arguments arranged according - * to the specified `indexes` where the argument value at the first index is - * provided as the first argument, the argument value at the second index is - * provided as the second argument, and so on. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to rearrange arguments for. - * @param {...(number|number[])} indexes The arranged argument indexes. - * @returns {Function} Returns the new function. - * @example - * - * var rearged = _.rearg(function(a, b, c) { - * return [a, b, c]; - * }, [2, 0, 1]); - * - * rearged('b', 'c', 'a') - * // => ['a', 'b', 'c'] - */ - var rearg = flatRest(function(func, indexes) { - return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); - }); - - /** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as - * an array. - * - * **Note:** This method is based on the - * [rest parameter](https://mdn.io/rest_parameters). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.rest(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ - function rest(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = start === undefined ? start : toInteger(start); - return baseRest(func, start); - } - - /** - * Creates a function that invokes `func` with the `this` binding of the - * create function and an array of arguments much like - * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). - * - * **Note:** This method is based on the - * [spread operator](https://mdn.io/spread_operator). - * - * @static - * @memberOf _ - * @since 3.2.0 - * @category Function - * @param {Function} func The function to spread arguments over. - * @param {number} [start=0] The start position of the spread. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.spread(function(who, what) { - * return who + ' says ' + what; - * }); - * - * say(['fred', 'hello']); - * // => 'fred says hello' - * - * var numbers = Promise.all([ - * Promise.resolve(40), - * Promise.resolve(36) - * ]); - * - * numbers.then(_.spread(function(x, y) { - * return x + y; - * })); - * // => a Promise of 76 - */ - function spread(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = start == null ? 0 : nativeMax(toInteger(start), 0); - return baseRest(function(args) { - var array = args[start], - otherArgs = castSlice(args, 0, start); - - if (array) { - arrayPush(otherArgs, array); - } - return apply(func, this, otherArgs); - }); - } - - /** - * Creates a throttled function that only invokes `func` at most once per - * every `wait` milliseconds. The throttled function comes with a `cancel` - * method to cancel delayed `func` invocations and a `flush` method to - * immediately invoke them. Provide `options` to indicate whether `func` - * should be invoked on the leading and/or trailing edge of the `wait` - * timeout. The `func` is invoked with the last arguments provided to the - * throttled function. Subsequent calls to the throttled function return the - * result of the last `func` invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the throttled function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.throttle` and `_.debounce`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to throttle. - * @param {number} [wait=0] The number of milliseconds to throttle invocations to. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=true] - * Specify invoking on the leading edge of the timeout. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new throttled function. - * @example - * - * // Avoid excessively updating the position while scrolling. - * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); - * - * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. - * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); - * jQuery(element).on('click', throttled); - * - * // Cancel the trailing throttled invocation. - * jQuery(window).on('popstate', throttled.cancel); - */ - function throttle(func, wait, options) { - var leading = true, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (isObject(options)) { - leading = 'leading' in options ? !!options.leading : leading; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - return debounce(func, wait, { - 'leading': leading, - 'maxWait': wait, - 'trailing': trailing - }); - } - - /** - * Creates a function that accepts up to one argument, ignoring any - * additional arguments. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - * @example - * - * _.map(['6', '8', '10'], _.unary(parseInt)); - * // => [6, 8, 10] - */ - function unary(func) { - return ary(func, 1); - } - - /** - * Creates a function that provides `value` to `wrapper` as its first - * argument. Any additional arguments provided to the function are appended - * to those provided to the `wrapper`. The wrapper is invoked with the `this` - * binding of the created function. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {*} value The value to wrap. - * @param {Function} [wrapper=identity] The wrapper function. - * @returns {Function} Returns the new function. - * @example - * - * var p = _.wrap(_.escape, function(func, text) { - * return '

' + func(text) + '

'; - * }); - * - * p('fred, barney, & pebbles'); - * // => '

fred, barney, & pebbles

' - */ - function wrap(value, wrapper) { - return partial(castFunction(wrapper), value); - } - - /*------------------------------------------------------------------------*/ - - /** - * Casts `value` as an array if it's not one. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Lang - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast array. - * @example - * - * _.castArray(1); - * // => [1] - * - * _.castArray({ 'a': 1 }); - * // => [{ 'a': 1 }] - * - * _.castArray('abc'); - * // => ['abc'] - * - * _.castArray(null); - * // => [null] - * - * _.castArray(undefined); - * // => [undefined] - * - * _.castArray(); - * // => [] - * - * var array = [1, 2, 3]; - * console.log(_.castArray(array) === array); - * // => true - */ - function castArray() { - if (!arguments.length) { - return []; - } - var value = arguments[0]; - return isArray(value) ? value : [value]; - } - - /** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ - function clone(value) { - return baseClone(value, CLONE_SYMBOLS_FLAG); - } - - /** - * This method is like `_.clone` except that it accepts `customizer` which - * is invoked to produce the cloned value. If `customizer` returns `undefined`, - * cloning is handled by the method instead. The `customizer` is invoked with - * up to four arguments; (value [, index|key, object, stack]). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the cloned value. - * @see _.cloneDeepWith - * @example - * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(false); - * } - * } - * - * var el = _.cloneWith(document.body, customizer); - * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 0 - */ - function cloneWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); - } - - /** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ - function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); - } - - /** - * This method is like `_.cloneWith` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the deep cloned value. - * @see _.cloneWith - * @example - * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(true); - * } - * } - * - * var el = _.cloneDeepWith(document.body, customizer); - * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 20 - */ - function cloneDeepWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); - } - - /** - * Checks if `object` conforms to `source` by invoking the predicate - * properties of `source` with the corresponding property values of `object`. - * - * **Note:** This method is equivalent to `_.conforms` when `source` is - * partially applied. - * - * @static - * @memberOf _ - * @since 4.14.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * - * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); - * // => true - * - * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); - * // => false - */ - function conformsTo(object, source) { - return source == null || baseConformsTo(object, source, keys(source)); - } - - /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ - function eq(value, other) { - return value === other || (value !== value && other !== other); - } - - /** - * Checks if `value` is greater than `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - * @see _.lt - * @example - * - * _.gt(3, 1); - * // => true - * - * _.gt(3, 3); - * // => false - * - * _.gt(1, 3); - * // => false - */ - var gt = createRelationalOperation(baseGt); - - /** - * Checks if `value` is greater than or equal to `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than or equal to - * `other`, else `false`. - * @see _.lte - * @example - * - * _.gte(3, 1); - * // => true - * - * _.gte(3, 3); - * // => true - * - * _.gte(1, 3); - * // => false - */ - var gte = createRelationalOperation(function(value, other) { - return value >= other; - }); - - /** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ - var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); - }; - - /** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ - var isArray = Array.isArray; - - /** - * Checks if `value` is classified as an `ArrayBuffer` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. - * @example - * - * _.isArrayBuffer(new ArrayBuffer(2)); - * // => true - * - * _.isArrayBuffer(new Array(2)); - * // => false - */ - var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; - - /** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ - function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); - } - - /** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ - function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); - } - - /** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ - function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && baseGetTag(value) == boolTag); - } - - /** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ - var isBuffer = nativeIsBuffer || stubFalse; - - /** - * Checks if `value` is classified as a `Date` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - * - * _.isDate('Mon April 23 2012'); - * // => false - */ - var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; - - /** - * Checks if `value` is likely a DOM element. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. - * @example - * - * _.isElement(document.body); - * // => true - * - * _.isElement(''); - * // => false - */ - function isElement(value) { - return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); - } - - /** - * Checks if `value` is an empty object, collection, map, or set. - * - * Objects are considered empty if they have no own enumerable string keyed - * properties. - * - * Array-like values such as `arguments` objects, arrays, buffers, strings, or - * jQuery-like collections are considered empty if they have a `length` of `0`. - * Similarly, maps and sets are considered empty if they have a `size` of `0`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ - function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && - (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || - isBuffer(value) || isTypedArray(value) || isArguments(value))) { - return !value.length; - } - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; - } - if (isPrototype(value)) { - return !baseKeys(value).length; - } - for (var key in value) { - if (hasOwnProperty.call(value, key)) { - return false; - } - } - return true; - } - - /** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ - function isEqual(value, other) { - return baseIsEqual(value, other); - } - - /** - * This method is like `_.isEqual` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with up to - * six arguments: (objValue, othValue [, index|key, object, other, stack]). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, othValue) { - * if (isGreeting(objValue) && isGreeting(othValue)) { - * return true; - * } - * } - * - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * _.isEqualWith(array, other, customizer); - * // => true - */ - function isEqualWith(value, other, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; - } - - /** - * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, - * `SyntaxError`, `TypeError`, or `URIError` object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, else `false`. - * @example - * - * _.isError(new Error); - * // => true - * - * _.isError(Error); - * // => false - */ - function isError(value) { - if (!isObjectLike(value)) { - return false; - } - var tag = baseGetTag(value); - return tag == errorTag || tag == domExcTag || - (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); - } - - /** - * Checks if `value` is a finite primitive number. - * - * **Note:** This method is based on - * [`Number.isFinite`](https://mdn.io/Number/isFinite). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. - * @example - * - * _.isFinite(3); - * // => true - * - * _.isFinite(Number.MIN_VALUE); - * // => true - * - * _.isFinite(Infinity); - * // => false - * - * _.isFinite('3'); - * // => false - */ - function isFinite(value) { - return typeof value == 'number' && nativeIsFinite(value); - } - - /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; - } - - /** - * Checks if `value` is an integer. - * - * **Note:** This method is based on - * [`Number.isInteger`](https://mdn.io/Number/isInteger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an integer, else `false`. - * @example - * - * _.isInteger(3); - * // => true - * - * _.isInteger(Number.MIN_VALUE); - * // => false - * - * _.isInteger(Infinity); - * // => false - * - * _.isInteger('3'); - * // => false - */ - function isInteger(value) { - return typeof value == 'number' && value == toInteger(value); - } - - /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ - function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; - } - - /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ - function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); - } - - /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ - function isObjectLike(value) { - return value != null && typeof value == 'object'; - } - - /** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ - var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; - - /** - * Performs a partial deep comparison between `object` and `source` to - * determine if `object` contains equivalent property values. - * - * **Note:** This method is equivalent to `_.matches` when `source` is - * partially applied. - * - * Partial comparisons will match empty array and empty object `source` - * values against any array or object value, respectively. See `_.isEqual` - * for a list of supported value comparisons. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * - * _.isMatch(object, { 'b': 2 }); - * // => true - * - * _.isMatch(object, { 'b': 1 }); - * // => false - */ - function isMatch(object, source) { - return object === source || baseIsMatch(object, source, getMatchData(source)); - } - - /** - * This method is like `_.isMatch` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with five - * arguments: (objValue, srcValue, index|key, object, source). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, srcValue) { - * if (isGreeting(objValue) && isGreeting(srcValue)) { - * return true; - * } - * } - * - * var object = { 'greeting': 'hello' }; - * var source = { 'greeting': 'hi' }; - * - * _.isMatchWith(object, source, customizer); - * // => true - */ - function isMatchWith(object, source, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseIsMatch(object, source, getMatchData(source), customizer); - } - - /** - * Checks if `value` is `NaN`. - * - * **Note:** This method is based on - * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as - * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for - * `undefined` and other non-number values. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - * @example - * - * _.isNaN(NaN); - * // => true - * - * _.isNaN(new Number(NaN)); - * // => true - * - * isNaN(undefined); - * // => true - * - * _.isNaN(undefined); - * // => false - */ - function isNaN(value) { - // An `NaN` primitive is the only value that is not equal to itself. - // Perform the `toStringTag` check first to avoid errors with some - // ActiveX objects in IE. - return isNumber(value) && value != +value; - } - - /** - * Checks if `value` is a pristine native function. - * - * **Note:** This method can't reliably detect native functions in the presence - * of the core-js package because core-js circumvents this kind of detection. - * Despite multiple requests, the core-js maintainer has made it clear: any - * attempt to fix the detection will be obstructed. As a result, we're left - * with little choice but to throw an error. Unfortunately, this also affects - * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), - * which rely on core-js. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ - function isNative(value) { - if (isMaskable(value)) { - throw new Error(CORE_ERROR_TEXT); - } - return baseIsNative(value); - } - - /** - * Checks if `value` is `null`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(void 0); - * // => false - */ - function isNull(value) { - return value === null; - } - - /** - * Checks if `value` is `null` or `undefined`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is nullish, else `false`. - * @example - * - * _.isNil(null); - * // => true - * - * _.isNil(void 0); - * // => true - * - * _.isNil(NaN); - * // => false - */ - function isNil(value) { - return value == null; - } - - /** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are - * classified as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a number, else `false`. - * @example - * - * _.isNumber(3); - * // => true - * - * _.isNumber(Number.MIN_VALUE); - * // => true - * - * _.isNumber(Infinity); - * // => true - * - * _.isNumber('3'); - * // => false - */ - function isNumber(value) { - return typeof value == 'number' || - (isObjectLike(value) && baseGetTag(value) == numberTag); - } - - /** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ - function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; - } - - /** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - * @example - * - * _.isRegExp(/abc/); - * // => true - * - * _.isRegExp('/abc/'); - * // => false - */ - var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; - - /** - * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 - * double precision number which isn't the result of a rounded unsafe integer. - * - * **Note:** This method is based on - * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. - * @example - * - * _.isSafeInteger(3); - * // => true - * - * _.isSafeInteger(Number.MIN_VALUE); - * // => false - * - * _.isSafeInteger(Infinity); - * // => false - * - * _.isSafeInteger('3'); - * // => false - */ - function isSafeInteger(value) { - return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; - } - - /** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ - var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; - - /** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ - function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); - } - - /** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ - function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); - } - - /** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ - var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - - /** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ - function isUndefined(value) { - return value === undefined; - } - - /** - * Checks if `value` is classified as a `WeakMap` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. - * @example - * - * _.isWeakMap(new WeakMap); - * // => true - * - * _.isWeakMap(new Map); - * // => false - */ - function isWeakMap(value) { - return isObjectLike(value) && getTag(value) == weakMapTag; - } - - /** - * Checks if `value` is classified as a `WeakSet` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. - * @example - * - * _.isWeakSet(new WeakSet); - * // => true - * - * _.isWeakSet(new Set); - * // => false - */ - function isWeakSet(value) { - return isObjectLike(value) && baseGetTag(value) == weakSetTag; - } - - /** - * Checks if `value` is less than `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - * @see _.gt - * @example - * - * _.lt(1, 3); - * // => true - * - * _.lt(3, 3); - * // => false - * - * _.lt(3, 1); - * // => false - */ - var lt = createRelationalOperation(baseLt); - - /** - * Checks if `value` is less than or equal to `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than or equal to - * `other`, else `false`. - * @see _.gte - * @example - * - * _.lte(1, 3); - * // => true - * - * _.lte(3, 3); - * // => true - * - * _.lte(3, 1); - * // => false - */ - var lte = createRelationalOperation(function(value, other) { - return value <= other; - }); - - /** - * Converts `value` to an array. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {Array} Returns the converted array. - * @example - * - * _.toArray({ 'a': 1, 'b': 2 }); - * // => [1, 2] - * - * _.toArray('abc'); - * // => ['a', 'b', 'c'] - * - * _.toArray(1); - * // => [] - * - * _.toArray(null); - * // => [] - */ - function toArray(value) { - if (!value) { - return []; - } - if (isArrayLike(value)) { - return isString(value) ? stringToArray(value) : copyArray(value); - } - if (symIterator && value[symIterator]) { - return iteratorToArray(value[symIterator]()); - } - var tag = getTag(value), - func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); - - return func(value); - } - - /** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ - function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; - } - - /** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ - function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; - } - - /** - * Converts `value` to an integer suitable for use as the length of an - * array-like object. - * - * **Note:** This method is based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toLength(3.2); - * // => 3 - * - * _.toLength(Number.MIN_VALUE); - * // => 0 - * - * _.toLength(Infinity); - * // => 4294967295 - * - * _.toLength('3.2'); - * // => 3 - */ - function toLength(value) { - return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; - } - - /** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ - function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = baseTrim(value); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); - } - - /** - * Converts `value` to a plain object flattening inherited enumerable string - * keyed properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ - function toPlainObject(value) { - return copyObject(value, keysIn(value)); - } - - /** - * Converts `value` to a safe integer. A safe integer can be compared and - * represented correctly. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toSafeInteger(3.2); - * // => 3 - * - * _.toSafeInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toSafeInteger(Infinity); - * // => 9007199254740991 - * - * _.toSafeInteger('3.2'); - * // => 3 - */ - function toSafeInteger(value) { - return value - ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) - : (value === 0 ? value : 0); - } - - /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ - function toString(value) { - return value == null ? '' : baseToString(value); - } - - /*------------------------------------------------------------------------*/ - - /** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assign({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3 } - */ - var assign = createAssigner(function(object, source) { - if (isPrototype(source) || isArrayLike(source)) { - copyObject(source, keys(source), object); - return; - } - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - assignValue(object, key, source[key]); - } - } - }); - - /** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assign - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assignIn({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } - */ - var assignIn = createAssigner(function(object, source) { - copyObject(source, keysIn(source), object); - }); - - /** - * This method is like `_.assignIn` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extendWith - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignWith - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignInWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keysIn(source), object, customizer); - }); - - /** - * This method is like `_.assign` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignInWith - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - var assignWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keys(source), object, customizer); - }); - - /** - * Creates an array of values corresponding to `paths` of `object`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Array} Returns the picked values. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; - * - * _.at(object, ['a[0].b.c', 'a[1]']); - * // => [3, 4] - */ - var at = flatRest(baseAt); - - /** - * Creates an object that inherits from the `prototype` object. If a - * `properties` object is given, its own enumerable string keyed properties - * are assigned to the created object. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @returns {Object} Returns the new object. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * function Circle() { - * Shape.call(this); - * } - * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); - * - * var circle = new Circle; - * circle instanceof Circle; - * // => true - * - * circle instanceof Shape; - * // => true - */ - function create(prototype, properties) { - var result = baseCreate(prototype); - return properties == null ? result : baseAssign(result, properties); - } - - /** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - var defaults = baseRest(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; - }); - - /** - * This method is like `_.defaults` except that it recursively assigns - * default properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaults - * @example - * - * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); - * // => { 'a': { 'b': 2, 'c': 3 } } - */ - var defaultsDeep = baseRest(function(args) { - args.push(undefined, customDefaultsMerge); - return apply(mergeWith, undefined, args); - }); - - /** - * This method is like `_.find` except that it returns the key of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Object - * @param {Object} object The object to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findKey(users, function(o) { return o.age < 40; }); - * // => 'barney' (iteration order is not guaranteed) - * - * // The `_.matches` iteratee shorthand. - * _.findKey(users, { 'age': 1, 'active': true }); - * // => 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findKey(users, ['active', false]); - * // => 'fred' - * - * // The `_.property` iteratee shorthand. - * _.findKey(users, 'active'); - * // => 'barney' - */ - function findKey(object, predicate) { - return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); - } - - /** - * This method is like `_.findKey` except that it iterates over elements of - * a collection in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findLastKey(users, function(o) { return o.age < 40; }); - * // => returns 'pebbles' assuming `_.findKey` returns 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.findLastKey(users, { 'age': 36, 'active': true }); - * // => 'barney' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastKey(users, ['active', false]); - * // => 'fred' - * - * // The `_.property` iteratee shorthand. - * _.findLastKey(users, 'active'); - * // => 'pebbles' - */ - function findLastKey(object, predicate) { - return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); - } - - /** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ - function forIn(object, iteratee) { - return object == null - ? object - : baseFor(object, getIteratee(iteratee, 3), keysIn); - } - - /** - * This method is like `_.forIn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forIn - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forInRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. - */ - function forInRight(object, iteratee) { - return object == null - ? object - : baseForRight(object, getIteratee(iteratee, 3), keysIn); - } - - /** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ - function forOwn(object, iteratee) { - return object && baseForOwn(object, getIteratee(iteratee, 3)); - } - - /** - * This method is like `_.forOwn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwn - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwnRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. - */ - function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, getIteratee(iteratee, 3)); - } - - /** - * Creates an array of function property names from own enumerable properties - * of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functionsIn - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functions(new Foo); - * // => ['a', 'b'] - */ - function functions(object) { - return object == null ? [] : baseFunctions(object, keys(object)); - } - - /** - * Creates an array of function property names from own and inherited - * enumerable properties of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functions - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functionsIn(new Foo); - * // => ['a', 'b', 'c'] - */ - function functionsIn(object) { - return object == null ? [] : baseFunctions(object, keysIn(object)); - } - - /** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ - function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; - } - - /** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ - function has(object, path) { - return object != null && hasPath(object, path, baseHas); - } - - /** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ - function hasIn(object, path) { - return object != null && hasPath(object, path, baseHasIn); - } - - /** - * Creates an object composed of the inverted keys and values of `object`. - * If `object` contains duplicate values, subsequent values overwrite - * property assignments of previous values. - * - * @static - * @memberOf _ - * @since 0.7.0 - * @category Object - * @param {Object} object The object to invert. - * @returns {Object} Returns the new inverted object. - * @example - * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; - * - * _.invert(object); - * // => { '1': 'c', '2': 'b' } - */ - var invert = createInverter(function(result, value, key) { - if (value != null && - typeof value.toString != 'function') { - value = nativeObjectToString.call(value); - } - - result[value] = key; - }, constant(identity)); - - /** - * This method is like `_.invert` except that the inverted object is generated - * from the results of running each element of `object` thru `iteratee`. The - * corresponding inverted value of each inverted key is an array of keys - * responsible for generating the inverted value. The iteratee is invoked - * with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.1.0 - * @category Object - * @param {Object} object The object to invert. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Object} Returns the new inverted object. - * @example - * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; - * - * _.invertBy(object); - * // => { '1': ['a', 'c'], '2': ['b'] } - * - * _.invertBy(object, function(value) { - * return 'group' + value; - * }); - * // => { 'group1': ['a', 'c'], 'group2': ['b'] } - */ - var invertBy = createInverter(function(result, value, key) { - if (value != null && - typeof value.toString != 'function') { - value = nativeObjectToString.call(value); - } - - if (hasOwnProperty.call(result, value)) { - result[value].push(key); - } else { - result[value] = [key]; - } - }, getIteratee); - - /** - * Invokes the method at `path` of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - * @example - * - * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; - * - * _.invoke(object, 'a[0].b.c.slice', 1, 3); - * // => [2, 3] - */ - var invoke = baseRest(baseInvoke); - - /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ - function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); - } - - /** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ - function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); - } - - /** - * The opposite of `_.mapValues`; this method creates an object with the - * same values as `object` and keys generated by running each own enumerable - * string keyed property of `object` thru `iteratee`. The iteratee is invoked - * with three arguments: (value, key, object). - * - * @static - * @memberOf _ - * @since 3.8.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapValues - * @example - * - * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { - * return key + value; - * }); - * // => { 'a1': 1, 'b2': 2 } - */ - function mapKeys(object, iteratee) { - var result = {}; - iteratee = getIteratee(iteratee, 3); - - baseForOwn(object, function(value, key, object) { - baseAssignValue(result, iteratee(value, key, object), value); - }); - return result; - } - - /** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ - function mapValues(object, iteratee) { - var result = {}; - iteratee = getIteratee(iteratee, 3); - - baseForOwn(object, function(value, key, object) { - baseAssignValue(result, key, iteratee(value, key, object)); - }); - return result; - } - - /** - * This method is like `_.assign` except that it recursively merges own and - * inherited enumerable string keyed properties of source objects into the - * destination object. Source properties that resolve to `undefined` are - * skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * var object = { - * 'a': [{ 'b': 2 }, { 'd': 4 }] - * }; - * - * var other = { - * 'a': [{ 'c': 3 }, { 'e': 5 }] - * }; - * - * _.merge(object, other); - * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } - */ - var merge = createAssigner(function(object, source, srcIndex) { - baseMerge(object, source, srcIndex); - }); - - /** - * This method is like `_.merge` except that it accepts `customizer` which - * is invoked to produce the merged values of the destination and source - * properties. If `customizer` returns `undefined`, merging is handled by the - * method instead. The `customizer` is invoked with six arguments: - * (objValue, srcValue, key, object, source, stack). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * function customizer(objValue, srcValue) { - * if (_.isArray(objValue)) { - * return objValue.concat(srcValue); - * } - * } - * - * var object = { 'a': [1], 'b': [2] }; - * var other = { 'a': [3], 'b': [4] }; - * - * _.mergeWith(object, other, customizer); - * // => { 'a': [1, 3], 'b': [2, 4] } - */ - var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { - baseMerge(object, source, srcIndex, customizer); - }); - - /** - * The opposite of `_.pick`; this method creates an object composed of the - * own and inherited enumerable property paths of `object` that are not omitted. - * - * **Note:** This method is considerably slower than `_.pick`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to omit. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.omit(object, ['a', 'c']); - * // => { 'b': '2' } - */ - var omit = flatRest(function(object, paths) { - var result = {}; - if (object == null) { - return result; - } - var isDeep = false; - paths = arrayMap(paths, function(path) { - path = castPath(path, object); - isDeep || (isDeep = path.length > 1); - return path; - }); - copyObject(object, getAllKeysIn(object), result); - if (isDeep) { - result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); - } - var length = paths.length; - while (length--) { - baseUnset(result, paths[length]); - } - return result; - }); - - /** - * The opposite of `_.pickBy`; this method creates an object composed of - * the own and inherited enumerable string keyed properties of `object` that - * `predicate` doesn't return truthy for. The predicate is invoked with two - * arguments: (value, key). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The source object. - * @param {Function} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.omitBy(object, _.isNumber); - * // => { 'b': '2' } - */ - function omitBy(object, predicate) { - return pickBy(object, negate(getIteratee(predicate))); - } - - /** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ - var pick = flatRest(function(object, paths) { - return object == null ? {} : basePick(object, paths); - }); - - /** - * Creates an object composed of the `object` properties `predicate` returns - * truthy for. The predicate is invoked with two arguments: (value, key). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The source object. - * @param {Function} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pickBy(object, _.isNumber); - * // => { 'a': 1, 'c': 3 } - */ - function pickBy(object, predicate) { - if (object == null) { - return {}; - } - var props = arrayMap(getAllKeysIn(object), function(prop) { - return [prop]; - }); - predicate = getIteratee(predicate); - return basePickBy(object, props, function(value, path) { - return predicate(value, path[0]); - }); - } - - /** - * This method is like `_.get` except that if the resolved value is a - * function it's invoked with the `this` binding of its parent object and - * its result is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to resolve. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; - * - * _.result(object, 'a[0].b.c1'); - * // => 3 - * - * _.result(object, 'a[0].b.c2'); - * // => 4 - * - * _.result(object, 'a[0].b.c3', 'default'); - * // => 'default' - * - * _.result(object, 'a[0].b.c3', _.constant('default')); - * // => 'default' - */ - function result(object, path, defaultValue) { - path = castPath(path, object); - - var index = -1, - length = path.length; - - // Ensure the loop is entered when path is empty. - if (!length) { - length = 1; - object = undefined; - } - while (++index < length) { - var value = object == null ? undefined : object[toKey(path[index])]; - if (value === undefined) { - index = length; - value = defaultValue; - } - object = isFunction(value) ? value.call(object) : value; - } - return object; - } - - /** - * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, - * it's created. Arrays are created for missing index properties while objects - * are created for all other missing properties. Use `_.setWith` to customize - * `path` creation. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @returns {Object} Returns `object`. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.set(object, 'a[0].b.c', 4); - * console.log(object.a[0].b.c); - * // => 4 - * - * _.set(object, ['x', '0', 'y', 'z'], 5); - * console.log(object.x[0].y.z); - * // => 5 - */ - function set(object, path, value) { - return object == null ? object : baseSet(object, path, value); - } - - /** - * This method is like `_.set` except that it accepts `customizer` which is - * invoked to produce the objects of `path`. If `customizer` returns `undefined` - * path creation is handled by the method instead. The `customizer` is invoked - * with three arguments: (nsValue, key, nsObject). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * var object = {}; - * - * _.setWith(object, '[0][1]', 'a', Object); - * // => { '0': { '1': 'a' } } - */ - function setWith(object, path, value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return object == null ? object : baseSet(object, path, value, customizer); - } - - /** - * Creates an array of own enumerable string keyed-value pairs for `object` - * which can be consumed by `_.fromPairs`. If `object` is a map or set, its - * entries are returned. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias entries - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the key-value pairs. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.toPairs(new Foo); - * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) - */ - var toPairs = createToPairs(keys); - - /** - * Creates an array of own and inherited enumerable string keyed-value pairs - * for `object` which can be consumed by `_.fromPairs`. If `object` is a map - * or set, its entries are returned. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias entriesIn - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the key-value pairs. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.toPairsIn(new Foo); - * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) - */ - var toPairsIn = createToPairs(keysIn); - - /** - * An alternative to `_.reduce`; this method transforms `object` to a new - * `accumulator` object which is the result of running each of its own - * enumerable string keyed properties thru `iteratee`, with each invocation - * potentially mutating the `accumulator` object. If `accumulator` is not - * provided, a new object with the same `[[Prototype]]` will be used. The - * iteratee is invoked with four arguments: (accumulator, value, key, object). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The custom accumulator value. - * @returns {*} Returns the accumulated value. - * @example - * - * _.transform([2, 3, 4], function(result, n) { - * result.push(n *= n); - * return n % 2 == 0; - * }, []); - * // => [4, 9] - * - * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } - */ - function transform(object, iteratee, accumulator) { - var isArr = isArray(object), - isArrLike = isArr || isBuffer(object) || isTypedArray(object); - - iteratee = getIteratee(iteratee, 4); - if (accumulator == null) { - var Ctor = object && object.constructor; - if (isArrLike) { - accumulator = isArr ? new Ctor : []; - } - else if (isObject(object)) { - accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; - } - else { - accumulator = {}; - } - } - (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { - return iteratee(accumulator, value, index, object); - }); - return accumulator; - } - - /** - * Removes the property at `path` of `object`. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to unset. - * @returns {boolean} Returns `true` if the property is deleted, else `false`. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 7 } }] }; - * _.unset(object, 'a[0].b.c'); - * // => true - * - * console.log(object); - * // => { 'a': [{ 'b': {} }] }; - * - * _.unset(object, ['a', '0', 'b', 'c']); - * // => true - * - * console.log(object); - * // => { 'a': [{ 'b': {} }] }; - */ - function unset(object, path) { - return object == null ? true : baseUnset(object, path); - } - - /** - * This method is like `_.set` except that accepts `updater` to produce the - * value to set. Use `_.updateWith` to customize `path` creation. The `updater` - * is invoked with one argument: (value). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.6.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {Function} updater The function to produce the updated value. - * @returns {Object} Returns `object`. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.update(object, 'a[0].b.c', function(n) { return n * n; }); - * console.log(object.a[0].b.c); - * // => 9 - * - * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); - * console.log(object.x[0].y.z); - * // => 0 - */ - function update(object, path, updater) { - return object == null ? object : baseUpdate(object, path, castFunction(updater)); - } - - /** - * This method is like `_.update` except that it accepts `customizer` which is - * invoked to produce the objects of `path`. If `customizer` returns `undefined` - * path creation is handled by the method instead. The `customizer` is invoked - * with three arguments: (nsValue, key, nsObject). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.6.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {Function} updater The function to produce the updated value. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * var object = {}; - * - * _.updateWith(object, '[0][1]', _.constant('a'), Object); - * // => { '0': { '1': 'a' } } - */ - function updateWith(object, path, updater, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); - } - - /** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ - function values(object) { - return object == null ? [] : baseValues(object, keys(object)); - } - - /** - * Creates an array of the own and inherited enumerable string keyed property - * values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.valuesIn(new Foo); - * // => [1, 2, 3] (iteration order is not guaranteed) - */ - function valuesIn(object) { - return object == null ? [] : baseValues(object, keysIn(object)); - } - - /*------------------------------------------------------------------------*/ - - /** - * Clamps `number` within the inclusive `lower` and `upper` bounds. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Number - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - * @example - * - * _.clamp(-10, -5, 5); - * // => -5 - * - * _.clamp(10, -5, 5); - * // => 5 - */ - function clamp(number, lower, upper) { - if (upper === undefined) { - upper = lower; - lower = undefined; - } - if (upper !== undefined) { - upper = toNumber(upper); - upper = upper === upper ? upper : 0; - } - if (lower !== undefined) { - lower = toNumber(lower); - lower = lower === lower ? lower : 0; - } - return baseClamp(toNumber(number), lower, upper); - } - - /** - * Checks if `n` is between `start` and up to, but not including, `end`. If - * `end` is not specified, it's set to `start` with `start` then set to `0`. - * If `start` is greater than `end` the params are swapped to support - * negative ranges. - * - * @static - * @memberOf _ - * @since 3.3.0 - * @category Number - * @param {number} number The number to check. - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. - * @see _.range, _.rangeRight - * @example - * - * _.inRange(3, 2, 4); - * // => true - * - * _.inRange(4, 8); - * // => true - * - * _.inRange(4, 2); - * // => false - * - * _.inRange(2, 2); - * // => false - * - * _.inRange(1.2, 2); - * // => true - * - * _.inRange(5.2, 4); - * // => false - * - * _.inRange(-3, -2, -6); - * // => true - */ - function inRange(number, start, end) { - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - number = toNumber(number); - return baseInRange(number, start, end); - } - - /** - * Produces a random number between the inclusive `lower` and `upper` bounds. - * If only one argument is provided a number between `0` and the given number - * is returned. If `floating` is `true`, or either `lower` or `upper` are - * floats, a floating-point number is returned instead of an integer. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @memberOf _ - * @since 0.7.0 - * @category Number - * @param {number} [lower=0] The lower bound. - * @param {number} [upper=1] The upper bound. - * @param {boolean} [floating] Specify returning a floating-point number. - * @returns {number} Returns the random number. - * @example - * - * _.random(0, 5); - * // => an integer between 0 and 5 - * - * _.random(5); - * // => also an integer between 0 and 5 - * - * _.random(5, true); - * // => a floating-point number between 0 and 5 - * - * _.random(1.2, 5.2); - * // => a floating-point number between 1.2 and 5.2 - */ - function random(lower, upper, floating) { - if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { - upper = floating = undefined; - } - if (floating === undefined) { - if (typeof upper == 'boolean') { - floating = upper; - upper = undefined; - } - else if (typeof lower == 'boolean') { - floating = lower; - lower = undefined; - } - } - if (lower === undefined && upper === undefined) { - lower = 0; - upper = 1; - } - else { - lower = toFinite(lower); - if (upper === undefined) { - upper = lower; - lower = 0; - } else { - upper = toFinite(upper); - } - } - if (lower > upper) { - var temp = lower; - lower = upper; - upper = temp; - } - if (floating || lower % 1 || upper % 1) { - var rand = nativeRandom(); - return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); - } - return baseRandom(lower, upper); - } - - /*------------------------------------------------------------------------*/ - - /** - * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the camel cased string. - * @example - * - * _.camelCase('Foo Bar'); - * // => 'fooBar' - * - * _.camelCase('--foo-bar--'); - * // => 'fooBar' - * - * _.camelCase('__FOO_BAR__'); - * // => 'fooBar' - */ - var camelCase = createCompounder(function(result, word, index) { - word = word.toLowerCase(); - return result + (index ? capitalize(word) : word); - }); - - /** - * Converts the first character of `string` to upper case and the remaining - * to lower case. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to capitalize. - * @returns {string} Returns the capitalized string. - * @example - * - * _.capitalize('FRED'); - * // => 'Fred' - */ - function capitalize(string) { - return upperFirst(toString(string).toLowerCase()); - } - - /** - * Deburrs `string` by converting - * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) - * letters to basic Latin letters and removing - * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to deburr. - * @returns {string} Returns the deburred string. - * @example - * - * _.deburr('déjà vu'); - * // => 'deja vu' - */ - function deburr(string) { - string = toString(string); - return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); - } - - /** - * Checks if `string` ends with the given target string. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search up to. - * @returns {boolean} Returns `true` if `string` ends with `target`, - * else `false`. - * @example - * - * _.endsWith('abc', 'c'); - * // => true - * - * _.endsWith('abc', 'b'); - * // => false - * - * _.endsWith('abc', 'b', 2); - * // => true - */ - function endsWith(string, target, position) { - string = toString(string); - target = baseToString(target); - - var length = string.length; - position = position === undefined - ? length - : baseClamp(toInteger(position), 0, length); - - var end = position; - position -= target.length; - return position >= 0 && string.slice(position, end) == target; - } - - /** - * Converts the characters "&", "<", ">", '"', and "'" in `string` to their - * corresponding HTML entities. - * - * **Note:** No other characters are escaped. To escape additional - * characters use a third-party library like [_he_](https://mths.be/he). - * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. See - * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. - * - * When working with HTML you should always - * [quote attribute values](http://wonko.com/post/html-escaping) to reduce - * XSS vectors. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ - function escape(string) { - string = toString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; - } - - /** - * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", - * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escapeRegExp('[lodash](https://lodash.com/)'); - * // => '\[lodash\]\(https://lodash\.com/\)' - */ - function escapeRegExp(string) { - string = toString(string); - return (string && reHasRegExpChar.test(string)) - ? string.replace(reRegExpChar, '\\$&') - : string; - } - - /** - * Converts `string` to - * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the kebab cased string. - * @example - * - * _.kebabCase('Foo Bar'); - * // => 'foo-bar' - * - * _.kebabCase('fooBar'); - * // => 'foo-bar' - * - * _.kebabCase('__FOO_BAR__'); - * // => 'foo-bar' - */ - var kebabCase = createCompounder(function(result, word, index) { - return result + (index ? '-' : '') + word.toLowerCase(); - }); - - /** - * Converts `string`, as space separated words, to lower case. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the lower cased string. - * @example - * - * _.lowerCase('--Foo-Bar--'); - * // => 'foo bar' - * - * _.lowerCase('fooBar'); - * // => 'foo bar' - * - * _.lowerCase('__FOO_BAR__'); - * // => 'foo bar' - */ - var lowerCase = createCompounder(function(result, word, index) { - return result + (index ? ' ' : '') + word.toLowerCase(); - }); - - /** - * Converts the first character of `string` to lower case. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.lowerFirst('Fred'); - * // => 'fred' - * - * _.lowerFirst('FRED'); - * // => 'fRED' - */ - var lowerFirst = createCaseFirst('toLowerCase'); - - /** - * Pads `string` on the left and right sides if it's shorter than `length`. - * Padding characters are truncated if they can't be evenly divided by `length`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.pad('abc', 8); - * // => ' abc ' - * - * _.pad('abc', 8, '_-'); - * // => '_-abc_-_' - * - * _.pad('abc', 3); - * // => 'abc' - */ - function pad(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - if (!length || strLength >= length) { - return string; - } - var mid = (length - strLength) / 2; - return ( - createPadding(nativeFloor(mid), chars) + - string + - createPadding(nativeCeil(mid), chars) - ); - } - - /** - * Pads `string` on the right side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.padEnd('abc', 6); - * // => 'abc ' - * - * _.padEnd('abc', 6, '_-'); - * // => 'abc_-_' - * - * _.padEnd('abc', 3); - * // => 'abc' - */ - function padEnd(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - return (length && strLength < length) - ? (string + createPadding(length - strLength, chars)) - : string; - } - - /** - * Pads `string` on the left side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.padStart('abc', 6); - * // => ' abc' - * - * _.padStart('abc', 6, '_-'); - * // => '_-_abc' - * - * _.padStart('abc', 3); - * // => 'abc' - */ - function padStart(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - return (length && strLength < length) - ? (createPadding(length - strLength, chars) + string) - : string; - } - - /** - * Converts `string` to an integer of the specified radix. If `radix` is - * `undefined` or `0`, a `radix` of `10` is used unless `value` is a - * hexadecimal, in which case a `radix` of `16` is used. - * - * **Note:** This method aligns with the - * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category String - * @param {string} string The string to convert. - * @param {number} [radix=10] The radix to interpret `value` by. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {number} Returns the converted integer. - * @example - * - * _.parseInt('08'); - * // => 8 - * - * _.map(['6', '08', '10'], _.parseInt); - * // => [6, 8, 10] - */ - function parseInt(string, radix, guard) { - if (guard || radix == null) { - radix = 0; - } else if (radix) { - radix = +radix; - } - return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); - } - - /** - * Repeats the given string `n` times. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=1] The number of times to repeat the string. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the repeated string. - * @example - * - * _.repeat('*', 3); - * // => '***' - * - * _.repeat('abc', 2); - * // => 'abcabc' - * - * _.repeat('abc', 0); - * // => '' - */ - function repeat(string, n, guard) { - if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { - n = 1; - } else { - n = toInteger(n); - } - return baseRepeat(toString(string), n); - } - - /** - * Replaces matches for `pattern` in `string` with `replacement`. - * - * **Note:** This method is based on - * [`String#replace`](https://mdn.io/String/replace). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to modify. - * @param {RegExp|string} pattern The pattern to replace. - * @param {Function|string} replacement The match replacement. - * @returns {string} Returns the modified string. - * @example - * - * _.replace('Hi Fred', 'Fred', 'Barney'); - * // => 'Hi Barney' - */ - function replace() { - var args = arguments, - string = toString(args[0]); - - return args.length < 3 ? string : string.replace(args[1], args[2]); - } - - /** - * Converts `string` to - * [snake case](https://en.wikipedia.org/wiki/Snake_case). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the snake cased string. - * @example - * - * _.snakeCase('Foo Bar'); - * // => 'foo_bar' - * - * _.snakeCase('fooBar'); - * // => 'foo_bar' - * - * _.snakeCase('--FOO-BAR--'); - * // => 'foo_bar' - */ - var snakeCase = createCompounder(function(result, word, index) { - return result + (index ? '_' : '') + word.toLowerCase(); - }); - - /** - * Splits `string` by `separator`. - * - * **Note:** This method is based on - * [`String#split`](https://mdn.io/String/split). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to split. - * @param {RegExp|string} separator The separator pattern to split by. - * @param {number} [limit] The length to truncate results to. - * @returns {Array} Returns the string segments. - * @example - * - * _.split('a-b-c', '-', 2); - * // => ['a', 'b'] - */ - function split(string, separator, limit) { - if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { - separator = limit = undefined; - } - limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; - if (!limit) { - return []; - } - string = toString(string); - if (string && ( - typeof separator == 'string' || - (separator != null && !isRegExp(separator)) - )) { - separator = baseToString(separator); - if (!separator && hasUnicode(string)) { - return castSlice(stringToArray(string), 0, limit); - } - } - return string.split(separator, limit); - } - - /** - * Converts `string` to - * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). - * - * @static - * @memberOf _ - * @since 3.1.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the start cased string. - * @example - * - * _.startCase('--foo-bar--'); - * // => 'Foo Bar' - * - * _.startCase('fooBar'); - * // => 'Foo Bar' - * - * _.startCase('__FOO_BAR__'); - * // => 'FOO BAR' - */ - var startCase = createCompounder(function(result, word, index) { - return result + (index ? ' ' : '') + upperFirst(word); - }); - - /** - * Checks if `string` starts with the given target string. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {string} [target] The string to search for. - * @param {number} [position=0] The position to search from. - * @returns {boolean} Returns `true` if `string` starts with `target`, - * else `false`. - * @example - * - * _.startsWith('abc', 'a'); - * // => true - * - * _.startsWith('abc', 'b'); - * // => false - * - * _.startsWith('abc', 'b', 1); - * // => true - */ - function startsWith(string, target, position) { - string = toString(string); - position = position == null - ? 0 - : baseClamp(toInteger(position), 0, string.length); - - target = baseToString(target); - return string.slice(position, position + target.length) == target; - } - - /** - * Creates a compiled template function that can interpolate data properties - * in "interpolate" delimiters, HTML-escape interpolated data properties in - * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data - * properties may be accessed as free variables in the template. If a setting - * object is given, it takes precedence over `_.templateSettings` values. - * - * **Note:** In the development build `_.template` utilizes - * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) - * for easier debugging. - * - * For more information on precompiling templates see - * [lodash's custom builds documentation](https://lodash.com/custom-builds). - * - * For more information on Chrome extension sandboxes see - * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category String - * @param {string} [string=''] The template string. - * @param {Object} [options={}] The options object. - * @param {RegExp} [options.escape=_.templateSettings.escape] - * The HTML "escape" delimiter. - * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] - * The "evaluate" delimiter. - * @param {Object} [options.imports=_.templateSettings.imports] - * An object to import into the template as free variables. - * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] - * The "interpolate" delimiter. - * @param {string} [options.sourceURL='lodash.templateSources[n]'] - * The sourceURL of the compiled template. - * @param {string} [options.variable='obj'] - * The data object variable name. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the compiled template function. - * @example - * - * // Use the "interpolate" delimiter to create a compiled template. - * var compiled = _.template('hello <%= user %>!'); - * compiled({ 'user': 'fred' }); - * // => 'hello fred!' - * - * // Use the HTML "escape" delimiter to escape data property values. - * var compiled = _.template('<%- value %>'); - * compiled({ 'value': ' -``` - -(It also works with various module systems, if you prefer that sort of thing - it has a dependency on [vlq](https://github.com/Rich-Harris/vlq).) - -## Usage - -These examples assume you're in node.js, or something similar: - -```js -import MagicString from 'magic-string'; -import fs from 'fs'; - -const s = new MagicString('problems = 99'); - -s.update(0, 8, 'answer'); -s.toString(); // 'answer = 99' - -s.update(11, 13, '42'); // character indices always refer to the original string -s.toString(); // 'answer = 42' - -s.prepend('var ').append(';'); // most methods are chainable -s.toString(); // 'var answer = 42;' - -const map = s.generateMap({ - source: 'source.js', - file: 'converted.js.map', - includeContent: true, -}); // generates a v3 sourcemap - -fs.writeFileSync('converted.js', s.toString()); -fs.writeFileSync('converted.js.map', map.toString()); -``` - -You can pass an options argument: - -```js -const s = new MagicString(someCode, { - // these options will be used if you later call `bundle.addSource( s )` - see below - filename: 'foo.js', - indentExclusionRanges: [ - /*...*/ - ], - // mark source as ignore in DevTools, see below #Bundling - ignoreList: false, - // adjust the incoming position - see below - offset: 0, -}); -``` - -## Properties - -### s.offset - -Sets the offset property to adjust the incoming position for the following APIs: `slice`, `update`, `overwrite`, `appendLeft`, `prependLeft`, `appendRight`, `prependRight`, `move`, `reset`, and `remove`. - -Example usage: - -```ts -const s = new MagicString('hello world', { offset: 0 }); -s.offset = 6; -s.slice() === 'world'; -``` - -## Methods - -### s.addSourcemapLocation( index ) - -Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is `false` (see below). - -### s.append( content ) - -Appends the specified content to the end of the string. Returns `this`. - -### s.appendLeft( index, content ) - -Appends the specified `content` at the `index` in the original string. If a range _ending_ with `index` is subsequently moved, the insert will be moved with it. Returns `this`. See also `s.prependLeft(...)`. - -### s.appendRight( index, content ) - -Appends the specified `content` at the `index` in the original string. If a range _starting_ with `index` is subsequently moved, the insert will be moved with it. Returns `this`. See also `s.prependRight(...)`. - -### s.clone() - -Does what you'd expect. - -### s.generateDecodedMap( options ) - -Generates a sourcemap object with raw mappings in array form, rather than encoded as a string. See `generateMap` documentation below for options details. Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead. - -### s.generateMap( options ) - -Generates a [version 3 sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). All options are, well, optional: - -- `file` - the filename where you plan to write the sourcemap -- `source` - the filename of the file containing the original source -- `includeContent` - whether to include the original content in the map's `sourcesContent` array -- `hires` - whether the mapping should be high-resolution. Hi-res mappings map every single character, meaning (for example) your devtools will always be able to pinpoint the exact location of function calls and so on. With lo-res mappings, devtools may only be able to identify the correct line - but they're quicker to generate and less bulky. You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary instead of per character, suitable for string semantics that are separated by words. If sourcemap locations have been specified with `s.addSourcemapLocation()`, they will be used here. - -The returned sourcemap has two (non-enumerable) methods attached for convenience: - -- `toString` - returns the equivalent of `JSON.stringify(map)` -- `toUrl` - returns a DataURI containing the sourcemap. Useful for doing this sort of thing: - -```js -code += '\n//# sourceMappingURL=' + map.toUrl(); -``` - -### s.hasChanged() - -Indicates if the string has been changed. - -### s.indent( prefix[, options] ) - -Prefixes each line of the string with `prefix`. If `prefix` is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. Returns `this`. - -The `options` argument can have an `exclude` property, which is an array of `[start, end]` character ranges. These ranges will be excluded from the indentation - useful for (e.g.) multiline strings. - -### s.insertLeft( index, content ) - -**DEPRECATED** since 0.17 – use `s.appendLeft(...)` instead - -### s.insertRight( index, content ) - -**DEPRECATED** since 0.17 – use `s.prependRight(...)` instead - -### s.isEmpty() - -Returns true if the resulting source is empty (disregarding white space). - -### s.locate( index ) - -**DEPRECATED** since 0.10 – see [#30](https://github.com/Rich-Harris/magic-string/pull/30) - -### s.locateOrigin( index ) - -**DEPRECATED** since 0.10 – see [#30](https://github.com/Rich-Harris/magic-string/pull/30) - -### s.move( start, end, index ) - -Moves the characters from `start` and `end` to `index`. Returns `this`. - -### s.overwrite( start, end, content[, options] ) - -Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in that range. The same restrictions as `s.remove()` apply. Returns `this`. - -The fourth argument is optional. It can have a `storeName` property — if `true`, the original name will be stored for later inclusion in a sourcemap's `names` array — and a `contentOnly` property which determines whether only the content is overwritten, or anything that was appended/prepended to the range as well. - -It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content. - -### s.prepend( content ) - -Prepends the string with the specified content. Returns `this`. - -### s.prependLeft ( index, content ) - -Same as `s.appendLeft(...)`, except that the inserted content will go _before_ any previous appends or prepends at `index` - -### s.prependRight ( index, content ) - -Same as `s.appendRight(...)`, except that the inserted content will go _before_ any previous appends or prepends at `index` - -### s.replace( regexpOrString, substitution ) - -String replacement with RegExp or string. When using a RegExp, replacer function is also supported. Returns `this`. - -```ts -import MagicString from 'magic-string'; - -const s = new MagicString(source); - -s.replace('foo', 'bar'); -s.replace(/foo/g, 'bar'); -s.replace(/(\w)(\d+)/g, (_, $1, $2) => $1.toUpperCase() + $2); -``` - -The differences from [`String.replace`](<(https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)>): - -- It will always match against the **original string** -- It mutates the magic string state (use `.clone()` to be immutable) - -### s.replaceAll( regexpOrString, substitution ) - -Same as `s.replace`, but replace all matched strings instead of just one. -If `regexpOrString` is a regex, then it must have the global (`g`) flag set, or a `TypeError` is thrown. Matches the behavior of the builtin [`String.property.replaceAll`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll). Returns `this`. - -### s.remove( start, end ) - -Removes the characters from `start` to `end` (of the original string, **not** the generated string). Removing the same content twice, or making removals that partially overlap, will cause an error. Returns `this`. - -### s.reset( start, end ) - -Resets the characters from `start` to `end` (of the original string, **not** the generated string). -It can be used to restore previously removed characters and discard unwanted changes. - -### s.slice( start, end ) - -Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string. Throws error if the indices are for characters that were already removed. - -### s.snip( start, end ) - -Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed. - -### s.toString() - -Returns the generated string. - -### s.trim([ charType ]) - -Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end. Returns `this`. - -### s.trimStart([ charType ]) - -Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start. Returns `this`. - -### s.trimEnd([ charType ]) - -Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end. Returns `this`. - -### s.trimLines() - -Removes empty lines from the start and end. Returns `this`. - -### s.update( start, end, content[, options] ) - -Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. Returns `this`. - -The fourth argument is optional. It can have a `storeName` property — if `true`, the original name will be stored for later inclusion in a sourcemap's `names` array — and an `overwrite` property which defaults to `false` and determines whether anything that was appended/prepended to the range will be overwritten along with the original content. - -`s.update(start, end, content)` is equivalent to `s.overwrite(start, end, content, { contentOnly: true })`. - -## Bundling - -To concatenate several sources, use `MagicString.Bundle`: - -```js -const bundle = new MagicString.Bundle(); - -bundle.addSource({ - filename: 'foo.js', - content: new MagicString('var answer = 42;'), -}); - -bundle.addSource({ - filename: 'bar.js', - content: new MagicString('console.log( answer )'), -}); - -// Sources can be marked as ignore-listed, which provides a hint to debuggers -// to not step into this code and also don't show the source files depending -// on user preferences. -bundle.addSource({ - filename: 'some-3rdparty-library.js', - content: new MagicString('function myLib(){}'), - ignoreList: false, // <-- -}); - -// Advanced: a source can include an `indentExclusionRanges` property -// alongside `filename` and `content`. This will be passed to `s.indent()` -// - see documentation above - -bundle - .indent() // optionally, pass an indent string, otherwise it will be guessed - .prepend('(function () {\n') - .append('}());'); - -bundle.toString(); -// (function () { -// var answer = 42; -// console.log( answer ); -// }()); - -// options are as per `s.generateMap()` above -const map = bundle.generateMap({ - file: 'bundle.js', - includeContent: true, - hires: true, -}); -``` - -As an alternative syntax, if you a) don't have `filename` or `indentExclusionRanges` options, or b) passed those in when you used `new MagicString(...)`, you can simply pass the `MagicString` instance itself: - -```js -const bundle = new MagicString.Bundle(); -const source = new MagicString(someCode, { - filename: 'foo.js', -}); - -bundle.addSource(source); -``` - -## License - -MIT diff --git a/node_modules/magic-string/dist/magic-string.cjs.d.ts b/node_modules/magic-string/dist/magic-string.cjs.d.ts deleted file mode 100644 index 76cc537..0000000 --- a/node_modules/magic-string/dist/magic-string.cjs.d.ts +++ /dev/null @@ -1,289 +0,0 @@ -export interface BundleOptions { - intro?: string; - separator?: string; -} - -export interface SourceMapOptions { - /** - * Whether the mapping should be high-resolution. - * Hi-res mappings map every single character, meaning (for example) your devtools will always - * be able to pinpoint the exact location of function calls and so on. - * With lo-res mappings, devtools may only be able to identify the correct - * line - but they're quicker to generate and less bulky. - * You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary - * instead of per character, suitable for string semantics that are separated by words. - * If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here. - */ - hires?: boolean | 'boundary'; - /** - * The filename where you plan to write the sourcemap. - */ - file?: string; - /** - * The filename of the file containing the original source. - */ - source?: string; - /** - * Whether to include the original content in the map's sourcesContent array. - */ - includeContent?: boolean; -} - -export type SourceMapSegment = - | [number] - | [number, number, number, number] - | [number, number, number, number, number]; - -export interface DecodedSourceMap { - file: string; - sources: string[]; - sourcesContent?: string[]; - names: string[]; - mappings: SourceMapSegment[][]; - x_google_ignoreList?: number[]; -} - -export class SourceMap { - constructor(properties: DecodedSourceMap); - - version: number; - file: string; - sources: string[]; - sourcesContent?: string[]; - names: string[]; - mappings: string; - x_google_ignoreList?: number[]; - debugId?: string; - - /** - * Returns the equivalent of `JSON.stringify(map)` - */ - toString(): string; - /** - * Returns a DataURI containing the sourcemap. Useful for doing this sort of thing: - * `generateMap(options?: SourceMapOptions): SourceMap;` - */ - toUrl(): string; -} - -export class Bundle { - constructor(options?: BundleOptions); - /** - * Adds the specified source to the bundle, which can either be a `MagicString` object directly, - * or an options object that holds a magic string `content` property and optionally provides - * a `filename` for the source within the bundle, as well as an optional `ignoreList` hint - * (which defaults to `false`). The `filename` is used when constructing the source map for the - * bundle, to identify this `source` in the source map's `sources` field. The `ignoreList` hint - * is used to populate the `x_google_ignoreList` extension field in the source map, which is a - * mechanism for tools to signal to debuggers that certain sources should be ignored by default - * (depending on user preferences). - */ - addSource( - source: MagicString | { filename?: string; content: MagicString; ignoreList?: boolean }, - ): this; - append(str: string, options?: BundleOptions): this; - clone(): this; - generateMap( - options?: SourceMapOptions, - ): Omit & { sourcesContent: Array }; - generateDecodedMap( - options?: SourceMapOptions, - ): Omit & { sourcesContent: Array }; - getIndentString(): string; - indent(indentStr?: string): this; - indentExclusionRanges: ExclusionRange | Array; - prepend(str: string): this; - toString(): string; - trimLines(): this; - trim(charType?: string): this; - trimStart(charType?: string): this; - trimEnd(charType?: string): this; - isEmpty(): boolean; - length(): number; -} - -export type ExclusionRange = [number, number]; - -export interface MagicStringOptions { - filename?: string; - indentExclusionRanges?: ExclusionRange | Array; - offset?: number; -} - -export interface IndentOptions { - exclude?: ExclusionRange | Array; - indentStart?: boolean; -} - -export interface OverwriteOptions { - storeName?: boolean; - contentOnly?: boolean; -} - -export interface UpdateOptions { - storeName?: boolean; - overwrite?: boolean; -} - -export default class MagicString { - constructor(str: string, options?: MagicStringOptions); - /** - * Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false. - */ - addSourcemapLocation(char: number): void; - /** - * Appends the specified content to the end of the string. - */ - append(content: string): this; - /** - * Appends the specified content at the index in the original string. - * If a range *ending* with index is subsequently moved, the insert will be moved with it. - * See also `s.prependLeft(...)`. - */ - appendLeft(index: number, content: string): this; - /** - * Appends the specified content at the index in the original string. - * If a range *starting* with index is subsequently moved, the insert will be moved with it. - * See also `s.prependRight(...)`. - */ - appendRight(index: number, content: string): this; - /** - * Does what you'd expect. - */ - clone(): this; - /** - * Generates a version 3 sourcemap. - */ - generateMap(options?: SourceMapOptions): SourceMap; - /** - * Generates a sourcemap object with raw mappings in array form, rather than encoded as a string. - * Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead. - */ - generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap; - getIndentString(): string; - - /** - * Prefixes each line of the string with prefix. - * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. - */ - indent(options?: IndentOptions): this; - /** - * Prefixes each line of the string with prefix. - * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. - * - * The options argument can have an exclude property, which is an array of [start, end] character ranges. - * These ranges will be excluded from the indentation - useful for (e.g.) multiline strings. - */ - indent(indentStr?: string, options?: IndentOptions): this; - indentExclusionRanges: ExclusionRange | Array; - - /** - * Moves the characters from `start` and `end` to `index`. - */ - move(start: number, end: number, index: number): this; - /** - * Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in - * that range. The same restrictions as `s.remove()` apply. - * - * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored - * for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only - * the content is overwritten, or anything that was appended/prepended to the range as well. - * - * It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content. - */ - overwrite( - start: number, - end: number, - content: string, - options?: boolean | OverwriteOptions, - ): this; - /** - * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. - * - * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored - * for later inclusion in a sourcemap's names array — and an overwrite property which determines whether only - * the content is overwritten, or anything that was appended/prepended to the range as well. - */ - update(start: number, end: number, content: string, options?: boolean | UpdateOptions): this; - /** - * Prepends the string with the specified content. - */ - prepend(content: string): this; - /** - * Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index - */ - prependLeft(index: number, content: string): this; - /** - * Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index` - */ - prependRight(index: number, content: string): this; - /** - * Removes the characters from `start` to `end` (of the original string, **not** the generated string). - * Removing the same content twice, or making removals that partially overlap, will cause an error. - */ - remove(start: number, end: number): this; - /** - * Reset the modified characters from `start` to `end` (of the original string, **not** the generated string). - */ - reset(start: number, end: number): this; - /** - * Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string. - * Throws error if the indices are for characters that were already removed. - */ - slice(start: number, end: number): string; - /** - * Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed. - */ - snip(start: number, end: number): this; - /** - * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end. - */ - trim(charType?: string): this; - /** - * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start. - */ - trimStart(charType?: string): this; - /** - * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end. - */ - trimEnd(charType?: string): this; - /** - * Removes empty lines from the start and end. - */ - trimLines(): this; - /** - * String replacement with RegExp or string. - */ - replace( - regex: RegExp | string, - replacement: string | ((substring: string, ...args: any[]) => string), - ): this; - /** - * Same as `s.replace`, but replace all matched strings instead of just one. - */ - replaceAll( - regex: RegExp | string, - replacement: string | ((substring: string, ...args: any[]) => string), - ): this; - - lastChar(): string; - lastLine(): string; - /** - * Returns true if the resulting source is empty (disregarding white space). - */ - isEmpty(): boolean; - length(): number; - - /** - * Indicates if the string has been changed. - */ - hasChanged(): boolean; - - original: string; - /** - * Returns the generated string. - */ - toString(): string; - - offset: number; -} diff --git a/node_modules/magic-string/dist/magic-string.cjs.js b/node_modules/magic-string/dist/magic-string.cjs.js deleted file mode 100644 index c7453eb..0000000 --- a/node_modules/magic-string/dist/magic-string.cjs.js +++ /dev/null @@ -1,1575 +0,0 @@ -'use strict'; - -var sourcemapCodec = require('@jridgewell/sourcemap-codec'); - -class BitSet { - constructor(arg) { - this.bits = arg instanceof BitSet ? arg.bits.slice() : []; - } - - add(n) { - this.bits[n >> 5] |= 1 << (n & 31); - } - - has(n) { - return !!(this.bits[n >> 5] & (1 << (n & 31))); - } -} - -class Chunk { - constructor(start, end, content) { - this.start = start; - this.end = end; - this.original = content; - - this.intro = ''; - this.outro = ''; - - this.content = content; - this.storeName = false; - this.edited = false; - - { - this.previous = null; - this.next = null; - } - } - - appendLeft(content) { - this.outro += content; - } - - appendRight(content) { - this.intro = this.intro + content; - } - - clone() { - const chunk = new Chunk(this.start, this.end, this.original); - - chunk.intro = this.intro; - chunk.outro = this.outro; - chunk.content = this.content; - chunk.storeName = this.storeName; - chunk.edited = this.edited; - - return chunk; - } - - contains(index) { - return this.start < index && index < this.end; - } - - eachNext(fn) { - let chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.next; - } - } - - eachPrevious(fn) { - let chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.previous; - } - } - - edit(content, storeName, contentOnly) { - this.content = content; - if (!contentOnly) { - this.intro = ''; - this.outro = ''; - } - this.storeName = storeName; - - this.edited = true; - - return this; - } - - prependLeft(content) { - this.outro = content + this.outro; - } - - prependRight(content) { - this.intro = content + this.intro; - } - - reset() { - this.intro = ''; - this.outro = ''; - if (this.edited) { - this.content = this.original; - this.storeName = false; - this.edited = false; - } - } - - split(index) { - const sliceIndex = index - this.start; - - const originalBefore = this.original.slice(0, sliceIndex); - const originalAfter = this.original.slice(sliceIndex); - - this.original = originalBefore; - - const newChunk = new Chunk(index, this.end, originalAfter); - newChunk.outro = this.outro; - this.outro = ''; - - this.end = index; - - if (this.edited) { - // after split we should save the edit content record into the correct chunk - // to make sure sourcemap correct - // For example: - // ' test'.trim() - // split -> ' ' + 'test' - // ✔️ edit -> '' + 'test' - // ✖️ edit -> 'test' + '' - // TODO is this block necessary?... - newChunk.edit('', false); - this.content = ''; - } else { - this.content = originalBefore; - } - - newChunk.next = this.next; - if (newChunk.next) newChunk.next.previous = newChunk; - newChunk.previous = this; - this.next = newChunk; - - return newChunk; - } - - toString() { - return this.intro + this.content + this.outro; - } - - trimEnd(rx) { - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) return true; - - const trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - this.split(this.start + trimmed.length).edit('', undefined, true); - if (this.edited) { - // save the change, if it has been edited - this.edit(trimmed, this.storeName, true); - } - } - return true; - } else { - this.edit('', undefined, true); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) return true; - } - } - - trimStart(rx) { - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) return true; - - const trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - const newChunk = this.split(this.end - trimmed.length); - if (this.edited) { - // save the change, if it has been edited - newChunk.edit(trimmed, this.storeName, true); - } - this.edit('', undefined, true); - } - return true; - } else { - this.edit('', undefined, true); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) return true; - } - } -} - -function getBtoa() { - if (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') { - return (str) => globalThis.btoa(unescape(encodeURIComponent(str))); - } else if (typeof Buffer === 'function') { - return (str) => Buffer.from(str, 'utf-8').toString('base64'); - } else { - return () => { - throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); - }; - } -} - -const btoa = /*#__PURE__*/ getBtoa(); - -class SourceMap { - constructor(properties) { - this.version = 3; - this.file = properties.file; - this.sources = properties.sources; - this.sourcesContent = properties.sourcesContent; - this.names = properties.names; - this.mappings = sourcemapCodec.encode(properties.mappings); - if (typeof properties.x_google_ignoreList !== 'undefined') { - this.x_google_ignoreList = properties.x_google_ignoreList; - } - if (typeof properties.debugId !== 'undefined') { - this.debugId = properties.debugId; - } - } - - toString() { - return JSON.stringify(this); - } - - toUrl() { - return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); - } -} - -function guessIndent(code) { - const lines = code.split('\n'); - - const tabbed = lines.filter((line) => /^\t+/.test(line)); - const spaced = lines.filter((line) => /^ {2,}/.test(line)); - - if (tabbed.length === 0 && spaced.length === 0) { - return null; - } - - // More lines tabbed than spaced? Assume tabs, and - // default to tabs in the case of a tie (or nothing - // to go on) - if (tabbed.length >= spaced.length) { - return '\t'; - } - - // Otherwise, we need to guess the multiple - const min = spaced.reduce((previous, current) => { - const numSpaces = /^ +/.exec(current)[0].length; - return Math.min(numSpaces, previous); - }, Infinity); - - return new Array(min + 1).join(' '); -} - -function getRelativePath(from, to) { - const fromParts = from.split(/[/\\]/); - const toParts = to.split(/[/\\]/); - - fromParts.pop(); // get dirname - - while (fromParts[0] === toParts[0]) { - fromParts.shift(); - toParts.shift(); - } - - if (fromParts.length) { - let i = fromParts.length; - while (i--) fromParts[i] = '..'; - } - - return fromParts.concat(toParts).join('/'); -} - -const toString = Object.prototype.toString; - -function isObject(thing) { - return toString.call(thing) === '[object Object]'; -} - -function getLocator(source) { - const originalLines = source.split('\n'); - const lineOffsets = []; - - for (let i = 0, pos = 0; i < originalLines.length; i++) { - lineOffsets.push(pos); - pos += originalLines[i].length + 1; - } - - return function locate(index) { - let i = 0; - let j = lineOffsets.length; - while (i < j) { - const m = (i + j) >> 1; - if (index < lineOffsets[m]) { - j = m; - } else { - i = m + 1; - } - } - const line = i - 1; - const column = index - lineOffsets[line]; - return { line, column }; - }; -} - -const wordRegex = /\w/; - -class Mappings { - constructor(hires) { - this.hires = hires; - this.generatedCodeLine = 0; - this.generatedCodeColumn = 0; - this.raw = []; - this.rawSegments = this.raw[this.generatedCodeLine] = []; - this.pending = null; - } - - addEdit(sourceIndex, content, loc, nameIndex) { - if (content.length) { - const contentLengthMinusOne = content.length - 1; - let contentLineEnd = content.indexOf('\n', 0); - let previousContentLineEnd = -1; - // Loop through each line in the content and add a segment, but stop if the last line is empty, - // else code afterwards would fill one line too many - while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) { - const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - if (nameIndex >= 0) { - segment.push(nameIndex); - } - this.rawSegments.push(segment); - - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - - previousContentLineEnd = contentLineEnd; - contentLineEnd = content.indexOf('\n', contentLineEnd + 1); - } - - const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - if (nameIndex >= 0) { - segment.push(nameIndex); - } - this.rawSegments.push(segment); - - this.advance(content.slice(previousContentLineEnd + 1)); - } else if (this.pending) { - this.rawSegments.push(this.pending); - this.advance(content); - } - - this.pending = null; - } - - addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { - let originalCharIndex = chunk.start; - let first = true; - // when iterating each char, check if it's in a word boundary - let charInHiresBoundary = false; - - while (originalCharIndex < chunk.end) { - if (original[originalCharIndex] === '\n') { - loc.line += 1; - loc.column = 0; - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - first = true; - charInHiresBoundary = false; - } else { - if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { - const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - - if (this.hires === 'boundary') { - // in hires "boundary", group segments per word boundary than per char - if (wordRegex.test(original[originalCharIndex])) { - // for first char in the boundary found, start the boundary by pushing a segment - if (!charInHiresBoundary) { - this.rawSegments.push(segment); - charInHiresBoundary = true; - } - } else { - // for non-word char, end the boundary by pushing a segment - this.rawSegments.push(segment); - charInHiresBoundary = false; - } - } else { - this.rawSegments.push(segment); - } - } - - loc.column += 1; - this.generatedCodeColumn += 1; - first = false; - } - - originalCharIndex += 1; - } - - this.pending = null; - } - - advance(str) { - if (!str) return; - - const lines = str.split('\n'); - - if (lines.length > 1) { - for (let i = 0; i < lines.length - 1; i++) { - this.generatedCodeLine++; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - } - this.generatedCodeColumn = 0; - } - - this.generatedCodeColumn += lines[lines.length - 1].length; - } -} - -const n = '\n'; - -const warned = { - insertLeft: false, - insertRight: false, - storeName: false, -}; - -class MagicString { - constructor(string, options = {}) { - const chunk = new Chunk(0, string.length, string); - - Object.defineProperties(this, { - original: { writable: true, value: string }, - outro: { writable: true, value: '' }, - intro: { writable: true, value: '' }, - firstChunk: { writable: true, value: chunk }, - lastChunk: { writable: true, value: chunk }, - lastSearchedChunk: { writable: true, value: chunk }, - byStart: { writable: true, value: {} }, - byEnd: { writable: true, value: {} }, - filename: { writable: true, value: options.filename }, - indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, - sourcemapLocations: { writable: true, value: new BitSet() }, - storedNames: { writable: true, value: {} }, - indentStr: { writable: true, value: undefined }, - ignoreList: { writable: true, value: options.ignoreList }, - offset: { writable: true, value: options.offset || 0 }, - }); - - this.byStart[0] = chunk; - this.byEnd[string.length] = chunk; - } - - addSourcemapLocation(char) { - this.sourcemapLocations.add(char); - } - - append(content) { - if (typeof content !== 'string') throw new TypeError('outro content must be a string'); - - this.outro += content; - return this; - } - - appendLeft(index, content) { - index = index + this.offset; - - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byEnd[index]; - - if (chunk) { - chunk.appendLeft(content); - } else { - this.intro += content; - } - return this; - } - - appendRight(index, content) { - index = index + this.offset; - - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byStart[index]; - - if (chunk) { - chunk.appendRight(content); - } else { - this.outro += content; - } - return this; - } - - clone() { - const cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset }); - - let originalChunk = this.firstChunk; - let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); - - while (originalChunk) { - cloned.byStart[clonedChunk.start] = clonedChunk; - cloned.byEnd[clonedChunk.end] = clonedChunk; - - const nextOriginalChunk = originalChunk.next; - const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); - - if (nextClonedChunk) { - clonedChunk.next = nextClonedChunk; - nextClonedChunk.previous = clonedChunk; - - clonedChunk = nextClonedChunk; - } - - originalChunk = nextOriginalChunk; - } - - cloned.lastChunk = clonedChunk; - - if (this.indentExclusionRanges) { - cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); - } - - cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); - - cloned.intro = this.intro; - cloned.outro = this.outro; - - return cloned; - } - - generateDecodedMap(options) { - options = options || {}; - - const sourceIndex = 0; - const names = Object.keys(this.storedNames); - const mappings = new Mappings(options.hires); - - const locate = getLocator(this.original); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.firstChunk.eachNext((chunk) => { - const loc = locate(chunk.start); - - if (chunk.intro.length) mappings.advance(chunk.intro); - - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1, - ); - } else { - mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); - } - - if (chunk.outro.length) mappings.advance(chunk.outro); - }); - - return { - file: options.file ? options.file.split(/[/\\]/).pop() : undefined, - sources: [ - options.source ? getRelativePath(options.file || '', options.source) : options.file || '', - ], - sourcesContent: options.includeContent ? [this.original] : undefined, - names, - mappings: mappings.raw, - x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, - }; - } - - generateMap(options) { - return new SourceMap(this.generateDecodedMap(options)); - } - - _ensureindentStr() { - if (this.indentStr === undefined) { - this.indentStr = guessIndent(this.original); - } - } - - _getRawIndentString() { - this._ensureindentStr(); - return this.indentStr; - } - - getIndentString() { - this._ensureindentStr(); - return this.indentStr === null ? '\t' : this.indentStr; - } - - indent(indentStr, options) { - const pattern = /^[^\r\n]/gm; - - if (isObject(indentStr)) { - options = indentStr; - indentStr = undefined; - } - - if (indentStr === undefined) { - this._ensureindentStr(); - indentStr = this.indentStr || '\t'; - } - - if (indentStr === '') return this; // noop - - options = options || {}; - - // Process exclusion ranges - const isExcluded = {}; - - if (options.exclude) { - const exclusions = - typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; - exclusions.forEach((exclusion) => { - for (let i = exclusion[0]; i < exclusion[1]; i += 1) { - isExcluded[i] = true; - } - }); - } - - let shouldIndentNextCharacter = options.indentStart !== false; - const replacer = (match) => { - if (shouldIndentNextCharacter) return `${indentStr}${match}`; - shouldIndentNextCharacter = true; - return match; - }; - - this.intro = this.intro.replace(pattern, replacer); - - let charIndex = 0; - let chunk = this.firstChunk; - - while (chunk) { - const end = chunk.end; - - if (chunk.edited) { - if (!isExcluded[charIndex]) { - chunk.content = chunk.content.replace(pattern, replacer); - - if (chunk.content.length) { - shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; - } - } - } else { - charIndex = chunk.start; - - while (charIndex < end) { - if (!isExcluded[charIndex]) { - const char = this.original[charIndex]; - - if (char === '\n') { - shouldIndentNextCharacter = true; - } else if (char !== '\r' && shouldIndentNextCharacter) { - shouldIndentNextCharacter = false; - - if (charIndex === chunk.start) { - chunk.prependRight(indentStr); - } else { - this._splitChunk(chunk, charIndex); - chunk = chunk.next; - chunk.prependRight(indentStr); - } - } - } - - charIndex += 1; - } - } - - charIndex = chunk.end; - chunk = chunk.next; - } - - this.outro = this.outro.replace(pattern, replacer); - - return this; - } - - insert() { - throw new Error( - 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', - ); - } - - insertLeft(index, content) { - if (!warned.insertLeft) { - console.warn( - 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', - ); - warned.insertLeft = true; - } - - return this.appendLeft(index, content); - } - - insertRight(index, content) { - if (!warned.insertRight) { - console.warn( - 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', - ); - warned.insertRight = true; - } - - return this.prependRight(index, content); - } - - move(start, end, index) { - start = start + this.offset; - end = end + this.offset; - index = index + this.offset; - - if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); - - this._split(start); - this._split(end); - this._split(index); - - const first = this.byStart[start]; - const last = this.byEnd[end]; - - const oldLeft = first.previous; - const oldRight = last.next; - - const newRight = this.byStart[index]; - if (!newRight && last === this.lastChunk) return this; - const newLeft = newRight ? newRight.previous : this.lastChunk; - - if (oldLeft) oldLeft.next = oldRight; - if (oldRight) oldRight.previous = oldLeft; - - if (newLeft) newLeft.next = first; - if (newRight) newRight.previous = last; - - if (!first.previous) this.firstChunk = last.next; - if (!last.next) { - this.lastChunk = first.previous; - this.lastChunk.next = null; - } - - first.previous = newLeft; - last.next = newRight || null; - - if (!newLeft) this.firstChunk = first; - if (!newRight) this.lastChunk = last; - return this; - } - - overwrite(start, end, content, options) { - options = options || {}; - return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); - } - - update(start, end, content, options) { - start = start + this.offset; - end = end + this.offset; - - if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); - - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - if (end > this.original.length) throw new Error('end is out of bounds'); - if (start === end) - throw new Error( - 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', - ); - - this._split(start); - this._split(end); - - if (options === true) { - if (!warned.storeName) { - console.warn( - 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', - ); - warned.storeName = true; - } - - options = { storeName: true }; - } - const storeName = options !== undefined ? options.storeName : false; - const overwrite = options !== undefined ? options.overwrite : false; - - if (storeName) { - const original = this.original.slice(start, end); - Object.defineProperty(this.storedNames, original, { - writable: true, - value: true, - enumerable: true, - }); - } - - const first = this.byStart[start]; - const last = this.byEnd[end]; - - if (first) { - let chunk = first; - while (chunk !== last) { - if (chunk.next !== this.byStart[chunk.end]) { - throw new Error('Cannot overwrite across a split point'); - } - chunk = chunk.next; - chunk.edit('', false); - } - - first.edit(content, storeName, !overwrite); - } else { - // must be inserting at the end - const newChunk = new Chunk(start, end, '').edit(content, storeName); - - // TODO last chunk in the array may not be the last chunk, if it's moved... - last.next = newChunk; - newChunk.previous = last; - } - return this; - } - - prepend(content) { - if (typeof content !== 'string') throw new TypeError('outro content must be a string'); - - this.intro = content + this.intro; - return this; - } - - prependLeft(index, content) { - index = index + this.offset; - - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byEnd[index]; - - if (chunk) { - chunk.prependLeft(content); - } else { - this.intro = content + this.intro; - } - return this; - } - - prependRight(index, content) { - index = index + this.offset; - - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byStart[index]; - - if (chunk) { - chunk.prependRight(content); - } else { - this.outro = content + this.outro; - } - return this; - } - - remove(start, end) { - start = start + this.offset; - end = end + this.offset; - - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - if (start === end) return this; - - if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); - if (start > end) throw new Error('end must be greater than start'); - - this._split(start); - this._split(end); - - let chunk = this.byStart[start]; - - while (chunk) { - chunk.intro = ''; - chunk.outro = ''; - chunk.edit(''); - - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; - } - - reset(start, end) { - start = start + this.offset; - end = end + this.offset; - - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - if (start === end) return this; - - if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); - if (start > end) throw new Error('end must be greater than start'); - - this._split(start); - this._split(end); - - let chunk = this.byStart[start]; - - while (chunk) { - chunk.reset(); - - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; - } - - lastChar() { - if (this.outro.length) return this.outro[this.outro.length - 1]; - let chunk = this.lastChunk; - do { - if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; - if (chunk.content.length) return chunk.content[chunk.content.length - 1]; - if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; - } while ((chunk = chunk.previous)); - if (this.intro.length) return this.intro[this.intro.length - 1]; - return ''; - } - - lastLine() { - let lineIndex = this.outro.lastIndexOf(n); - if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); - let lineStr = this.outro; - let chunk = this.lastChunk; - do { - if (chunk.outro.length > 0) { - lineIndex = chunk.outro.lastIndexOf(n); - if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; - lineStr = chunk.outro + lineStr; - } - - if (chunk.content.length > 0) { - lineIndex = chunk.content.lastIndexOf(n); - if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; - lineStr = chunk.content + lineStr; - } - - if (chunk.intro.length > 0) { - lineIndex = chunk.intro.lastIndexOf(n); - if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; - lineStr = chunk.intro + lineStr; - } - } while ((chunk = chunk.previous)); - lineIndex = this.intro.lastIndexOf(n); - if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; - return this.intro + lineStr; - } - - slice(start = 0, end = this.original.length - this.offset) { - start = start + this.offset; - end = end + this.offset; - - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - let result = ''; - - // find start chunk - let chunk = this.firstChunk; - while (chunk && (chunk.start > start || chunk.end <= start)) { - // found end chunk before start - if (chunk.start < end && chunk.end >= end) { - return result; - } - - chunk = chunk.next; - } - - if (chunk && chunk.edited && chunk.start !== start) - throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); - - const startChunk = chunk; - while (chunk) { - if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { - result += chunk.intro; - } - - const containsEnd = chunk.start < end && chunk.end >= end; - if (containsEnd && chunk.edited && chunk.end !== end) - throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); - - const sliceStart = startChunk === chunk ? start - chunk.start : 0; - const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; - - result += chunk.content.slice(sliceStart, sliceEnd); - - if (chunk.outro && (!containsEnd || chunk.end === end)) { - result += chunk.outro; - } - - if (containsEnd) { - break; - } - - chunk = chunk.next; - } - - return result; - } - - // TODO deprecate this? not really very useful - snip(start, end) { - const clone = this.clone(); - clone.remove(0, start); - clone.remove(end, clone.original.length); - - return clone; - } - - _split(index) { - if (this.byStart[index] || this.byEnd[index]) return; - - let chunk = this.lastSearchedChunk; - const searchForward = index > chunk.end; - - while (chunk) { - if (chunk.contains(index)) return this._splitChunk(chunk, index); - - chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; - } - } - - _splitChunk(chunk, index) { - if (chunk.edited && chunk.content.length) { - // zero-length edited chunks are a special case (overlapping replacements) - const loc = getLocator(this.original)(index); - throw new Error( - `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, - ); - } - - const newChunk = chunk.split(index); - - this.byEnd[index] = chunk; - this.byStart[index] = newChunk; - this.byEnd[newChunk.end] = newChunk; - - if (chunk === this.lastChunk) this.lastChunk = newChunk; - - this.lastSearchedChunk = chunk; - return true; - } - - toString() { - let str = this.intro; - - let chunk = this.firstChunk; - while (chunk) { - str += chunk.toString(); - chunk = chunk.next; - } - - return str + this.outro; - } - - isEmpty() { - let chunk = this.firstChunk; - do { - if ( - (chunk.intro.length && chunk.intro.trim()) || - (chunk.content.length && chunk.content.trim()) || - (chunk.outro.length && chunk.outro.trim()) - ) - return false; - } while ((chunk = chunk.next)); - return true; - } - - length() { - let chunk = this.firstChunk; - let length = 0; - do { - length += chunk.intro.length + chunk.content.length + chunk.outro.length; - } while ((chunk = chunk.next)); - return length; - } - - trimLines() { - return this.trim('[\\r\\n]'); - } - - trim(charType) { - return this.trimStart(charType).trimEnd(charType); - } - - trimEndAborted(charType) { - const rx = new RegExp((charType || '\\s') + '+$'); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) return true; - - let chunk = this.lastChunk; - - do { - const end = chunk.end; - const aborted = chunk.trimEnd(rx); - - // if chunk was trimmed, we have a new lastChunk - if (chunk.end !== end) { - if (this.lastChunk === chunk) { - this.lastChunk = chunk.next; - } - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) return true; - chunk = chunk.previous; - } while (chunk); - - return false; - } - - trimEnd(charType) { - this.trimEndAborted(charType); - return this; - } - trimStartAborted(charType) { - const rx = new RegExp('^' + (charType || '\\s') + '+'); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) return true; - - let chunk = this.firstChunk; - - do { - const end = chunk.end; - const aborted = chunk.trimStart(rx); - - if (chunk.end !== end) { - // special case... - if (chunk === this.lastChunk) this.lastChunk = chunk.next; - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) return true; - chunk = chunk.next; - } while (chunk); - - return false; - } - - trimStart(charType) { - this.trimStartAborted(charType); - return this; - } - - hasChanged() { - return this.original !== this.toString(); - } - - _replaceRegexp(searchValue, replacement) { - function getReplacement(match, str) { - if (typeof replacement === 'string') { - return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter - if (i === '$') return '$'; - if (i === '&') return match[0]; - const num = +i; - if (num < match.length) return match[+i]; - return `$${i}`; - }); - } else { - return replacement(...match, match.index, str, match.groups); - } - } - function matchAll(re, str) { - let match; - const matches = []; - while ((match = re.exec(str))) { - matches.push(match); - } - return matches; - } - if (searchValue.global) { - const matches = matchAll(searchValue, this.original); - matches.forEach((match) => { - if (match.index != null) { - const replacement = getReplacement(match, this.original); - if (replacement !== match[0]) { - this.overwrite(match.index, match.index + match[0].length, replacement); - } - } - }); - } else { - const match = this.original.match(searchValue); - if (match && match.index != null) { - const replacement = getReplacement(match, this.original); - if (replacement !== match[0]) { - this.overwrite(match.index, match.index + match[0].length, replacement); - } - } - } - return this; - } - - _replaceString(string, replacement) { - const { original } = this; - const index = original.indexOf(string); - - if (index !== -1) { - this.overwrite(index, index + string.length, replacement); - } - - return this; - } - - replace(searchValue, replacement) { - if (typeof searchValue === 'string') { - return this._replaceString(searchValue, replacement); - } - - return this._replaceRegexp(searchValue, replacement); - } - - _replaceAllString(string, replacement) { - const { original } = this; - const stringLength = string.length; - for ( - let index = original.indexOf(string); - index !== -1; - index = original.indexOf(string, index + stringLength) - ) { - const previous = original.slice(index, index + stringLength); - if (previous !== replacement) this.overwrite(index, index + stringLength, replacement); - } - - return this; - } - - replaceAll(searchValue, replacement) { - if (typeof searchValue === 'string') { - return this._replaceAllString(searchValue, replacement); - } - - if (!searchValue.global) { - throw new TypeError( - 'MagicString.prototype.replaceAll called with a non-global RegExp argument', - ); - } - - return this._replaceRegexp(searchValue, replacement); - } -} - -const hasOwnProp = Object.prototype.hasOwnProperty; - -class Bundle { - constructor(options = {}) { - this.intro = options.intro || ''; - this.separator = options.separator !== undefined ? options.separator : '\n'; - this.sources = []; - this.uniqueSources = []; - this.uniqueSourceIndexByFilename = {}; - } - - addSource(source) { - if (source instanceof MagicString) { - return this.addSource({ - content: source, - filename: source.filename, - separator: this.separator, - }); - } - - if (!isObject(source) || !source.content) { - throw new Error( - 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`', - ); - } - - ['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => { - if (!hasOwnProp.call(source, option)) source[option] = source.content[option]; - }); - - if (source.separator === undefined) { - // TODO there's a bunch of this sort of thing, needs cleaning up - source.separator = this.separator; - } - - if (source.filename) { - if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) { - this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length; - this.uniqueSources.push({ filename: source.filename, content: source.content.original }); - } else { - const uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]]; - if (source.content.original !== uniqueSource.content) { - throw new Error(`Illegal source: same filename (${source.filename}), different contents`); - } - } - } - - this.sources.push(source); - return this; - } - - append(str, options) { - this.addSource({ - content: new MagicString(str), - separator: (options && options.separator) || '', - }); - - return this; - } - - clone() { - const bundle = new Bundle({ - intro: this.intro, - separator: this.separator, - }); - - this.sources.forEach((source) => { - bundle.addSource({ - filename: source.filename, - content: source.content.clone(), - separator: source.separator, - }); - }); - - return bundle; - } - - generateDecodedMap(options = {}) { - const names = []; - let x_google_ignoreList = undefined; - this.sources.forEach((source) => { - Object.keys(source.content.storedNames).forEach((name) => { - if (!~names.indexOf(name)) names.push(name); - }); - }); - - const mappings = new Mappings(options.hires); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.sources.forEach((source, i) => { - if (i > 0) { - mappings.advance(this.separator); - } - - const sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1; - const magicString = source.content; - const locate = getLocator(magicString.original); - - if (magicString.intro) { - mappings.advance(magicString.intro); - } - - magicString.firstChunk.eachNext((chunk) => { - const loc = locate(chunk.start); - - if (chunk.intro.length) mappings.advance(chunk.intro); - - if (source.filename) { - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1, - ); - } else { - mappings.addUneditedChunk( - sourceIndex, - chunk, - magicString.original, - loc, - magicString.sourcemapLocations, - ); - } - } else { - mappings.advance(chunk.content); - } - - if (chunk.outro.length) mappings.advance(chunk.outro); - }); - - if (magicString.outro) { - mappings.advance(magicString.outro); - } - - if (source.ignoreList && sourceIndex !== -1) { - if (x_google_ignoreList === undefined) { - x_google_ignoreList = []; - } - x_google_ignoreList.push(sourceIndex); - } - }); - - return { - file: options.file ? options.file.split(/[/\\]/).pop() : undefined, - sources: this.uniqueSources.map((source) => { - return options.file ? getRelativePath(options.file, source.filename) : source.filename; - }), - sourcesContent: this.uniqueSources.map((source) => { - return options.includeContent ? source.content : null; - }), - names, - mappings: mappings.raw, - x_google_ignoreList, - }; - } - - generateMap(options) { - return new SourceMap(this.generateDecodedMap(options)); - } - - getIndentString() { - const indentStringCounts = {}; - - this.sources.forEach((source) => { - const indentStr = source.content._getRawIndentString(); - - if (indentStr === null) return; - - if (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0; - indentStringCounts[indentStr] += 1; - }); - - return ( - Object.keys(indentStringCounts).sort((a, b) => { - return indentStringCounts[a] - indentStringCounts[b]; - })[0] || '\t' - ); - } - - indent(indentStr) { - if (!arguments.length) { - indentStr = this.getIndentString(); - } - - if (indentStr === '') return this; // noop - - let trailingNewline = !this.intro || this.intro.slice(-1) === '\n'; - - this.sources.forEach((source, i) => { - const separator = source.separator !== undefined ? source.separator : this.separator; - const indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator)); - - source.content.indent(indentStr, { - exclude: source.indentExclusionRanges, - indentStart, //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator ) - }); - - trailingNewline = source.content.lastChar() === '\n'; - }); - - if (this.intro) { - this.intro = - indentStr + - this.intro.replace(/^[^\n]/gm, (match, index) => { - return index > 0 ? indentStr + match : match; - }); - } - - return this; - } - - prepend(str) { - this.intro = str + this.intro; - return this; - } - - toString() { - const body = this.sources - .map((source, i) => { - const separator = source.separator !== undefined ? source.separator : this.separator; - const str = (i > 0 ? separator : '') + source.content.toString(); - - return str; - }) - .join(''); - - return this.intro + body; - } - - isEmpty() { - if (this.intro.length && this.intro.trim()) return false; - if (this.sources.some((source) => !source.content.isEmpty())) return false; - return true; - } - - length() { - return this.sources.reduce( - (length, source) => length + source.content.length(), - this.intro.length, - ); - } - - trimLines() { - return this.trim('[\\r\\n]'); - } - - trim(charType) { - return this.trimStart(charType).trimEnd(charType); - } - - trimStart(charType) { - const rx = new RegExp('^' + (charType || '\\s') + '+'); - this.intro = this.intro.replace(rx, ''); - - if (!this.intro) { - let source; - let i = 0; - - do { - source = this.sources[i++]; - if (!source) { - break; - } - } while (!source.content.trimStartAborted(charType)); - } - - return this; - } - - trimEnd(charType) { - const rx = new RegExp((charType || '\\s') + '+$'); - - let source; - let i = this.sources.length - 1; - - do { - source = this.sources[i--]; - if (!source) { - this.intro = this.intro.replace(rx, ''); - break; - } - } while (!source.content.trimEndAborted(charType)); - - return this; - } -} - -MagicString.Bundle = Bundle; -MagicString.SourceMap = SourceMap; -MagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121 - -module.exports = MagicString; -//# sourceMappingURL=magic-string.cjs.js.map diff --git a/node_modules/magic-string/dist/magic-string.cjs.js.map b/node_modules/magic-string/dist/magic-string.cjs.js.map deleted file mode 100644 index e8df93f..0000000 --- a/node_modules/magic-string/dist/magic-string.cjs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"magic-string.cjs.js","sources":["../src/BitSet.js","../src/Chunk.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js","../src/index-legacy.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\tif (DEBUG) {\n\t\t\t// we make these non-enumerable, for sanity while debugging\n\t\t\tObject.defineProperties(this, {\n\t\t\t\tprevious: { writable: true, value: null },\n\t\t\t\tnext: { writable: true, value: null },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\treset() {\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\t\tif (this.edited) {\n\t\t\tthis.content = this.original;\n\t\t\tthis.storeName = false;\n\t\t\tthis.edited = false;\n\t\t}\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + ''\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nfunction getBtoa() {\n\tif (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') {\n\t\treturn (str) => globalThis.btoa(unescape(encodeURIComponent(str)));\n\t} else if (typeof Buffer === 'function') {\n\t\treturn (str) => Buffer.from(str, 'utf-8').toString('base64');\n\t} else {\n\t\treturn () => {\n\t\t\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n\t\t};\n\t}\n}\n\nconst btoa = /*#__PURE__*/ getBtoa();\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t\tif (typeof properties.x_google_ignoreList !== 'undefined') {\n\t\t\tthis.x_google_ignoreList = properties.x_google_ignoreList;\n\t\t}\n\t\tif (typeof properties.debugId !== 'undefined') {\n\t\t\tthis.debugId = properties.debugId;\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","const wordRegex = /\\w/;\n\nexport default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst contentLengthMinusOne = content.length - 1;\n\t\t\tlet contentLineEnd = content.indexOf('\\n', 0);\n\t\t\tlet previousContentLineEnd = -1;\n\t\t\t// Loop through each line in the content and add a segment, but stop if the last line is empty,\n\t\t\t// else code afterwards would fill one line too many\n\t\t\twhile (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\t\tif (nameIndex >= 0) {\n\t\t\t\t\tsegment.push(nameIndex);\n\t\t\t\t}\n\t\t\t\tthis.rawSegments.push(segment);\n\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\n\t\t\t\tpreviousContentLineEnd = contentLineEnd;\n\t\t\t\tcontentLineEnd = content.indexOf('\\n', contentLineEnd + 1);\n\t\t\t}\n\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\n\t\t\tthis.advance(content.slice(previousContentLineEnd + 1));\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t\tthis.advance(content);\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\t\t// when iterating each char, check if it's in a word boundary\n\t\tlet charInHiresBoundary = false;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t\tcharInHiresBoundary = false;\n\t\t\t} else {\n\t\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\n\t\t\t\t\tif (this.hires === 'boundary') {\n\t\t\t\t\t\t// in hires \"boundary\", group segments per word boundary than per char\n\t\t\t\t\t\tif (wordRegex.test(original[originalCharIndex])) {\n\t\t\t\t\t\t\t// for first char in the boundary found, start the boundary by pushing a segment\n\t\t\t\t\t\t\tif (!charInHiresBoundary) {\n\t\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\t\tcharInHiresBoundary = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// for non-word char, end the boundary by pushing a segment\n\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\tcharInHiresBoundary = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: undefined },\n\t\t\tignoreList: { writable: true, value: options.ignoreList },\n\t\t\toffset: { writable: true, value: options.offset || 0 },\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: [\n\t\t\t\toptions.source ? getRelativePath(options.file || '', options.source) : options.file || '',\n\t\t\t],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : undefined,\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\t_ensureindentStr() {\n\t\tif (this.indentStr === undefined) {\n\t\t\tthis.indentStr = guessIndent(this.original);\n\t\t}\n\t}\n\n\t_getRawIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr;\n\t}\n\n\tgetIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tif (indentStr === undefined) {\n\t\t\tthis._ensureindentStr();\n\t\t\tindentStr = this.indentStr || '\\t';\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',\n\t\t\t);\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',\n\t\t\t);\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\t\tindex = index + this.offset;\n\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\toptions = options || {};\n\t\treturn this.update(start, end, content, { ...options, overwrite: !options.contentOnly });\n\t}\n\n\tupdate(start, end, content, options) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',\n\t\t\t);\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',\n\t\t\t\t);\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst overwrite = options !== undefined ? options.overwrite : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, {\n\t\t\t\twritable: true,\n\t\t\t\tvalue: true,\n\t\t\t\tenumerable: true,\n\t\t\t});\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, !overwrite);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\treset(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('reset');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.reset();\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('reset');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length - this.offset) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`,\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n\n\thasChanged() {\n\t\treturn this.original !== this.toString();\n\t}\n\n\t_replaceRegexp(searchValue, replacement) {\n\t\tfunction getReplacement(match, str) {\n\t\t\tif (typeof replacement === 'string') {\n\t\t\t\treturn replacement.replace(/\\$(\\$|&|\\d+)/g, (_, i) => {\n\t\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter\n\t\t\t\t\tif (i === '$') return '$';\n\t\t\t\t\tif (i === '&') return match[0];\n\t\t\t\t\tconst num = +i;\n\t\t\t\t\tif (num < match.length) return match[+i];\n\t\t\t\t\treturn `$${i}`;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn replacement(...match, match.index, str, match.groups);\n\t\t\t}\n\t\t}\n\t\tfunction matchAll(re, str) {\n\t\t\tlet match;\n\t\t\tconst matches = [];\n\t\t\twhile ((match = re.exec(str))) {\n\t\t\t\tmatches.push(match);\n\t\t\t}\n\t\t\treturn matches;\n\t\t}\n\t\tif (searchValue.global) {\n\t\t\tconst matches = matchAll(searchValue, this.original);\n\t\t\tmatches.forEach((match) => {\n\t\t\t\tif (match.index != null) {\n\t\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tconst match = this.original.match(searchValue);\n\t\t\tif (match && match.index != null) {\n\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t_replaceString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst index = original.indexOf(string);\n\n\t\tif (index !== -1) {\n\t\t\tthis.overwrite(index, index + string.length, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplace(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceString(searchValue, replacement);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n\n\t_replaceAllString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst stringLength = string.length;\n\t\tfor (\n\t\t\tlet index = original.indexOf(string);\n\t\t\tindex !== -1;\n\t\t\tindex = original.indexOf(string, index + stringLength)\n\t\t) {\n\t\t\tconst previous = original.slice(index, index + stringLength);\n\t\t\tif (previous !== replacement) this.overwrite(index, index + stringLength, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplaceAll(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceAllString(searchValue, replacement);\n\t\t}\n\n\t\tif (!searchValue.global) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'MagicString.prototype.replaceAll called with a non-global RegExp argument',\n\t\t\t);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tlet x_google_ignoreList = undefined;\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\n\t\t\tif (source.ignoreList && sourceIndex !== -1) {\n\t\t\t\tif (x_google_ignoreList === undefined) {\n\t\t\t\t\tx_google_ignoreList = [];\n\t\t\t\t}\n\t\t\t\tx_google_ignoreList.push(sourceIndex);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content._getRawIndentString();\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length,\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport Bundle from './Bundle.js';\nimport SourceMap from './SourceMap.js';\n\nMagicString.Bundle = Bundle;\nMagicString.SourceMap = SourceMap;\nMagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121\n\nexport default MagicString;\n"],"names":["encode"],"mappings":";;;;AAAe,MAAM,MAAM,CAAC;AAC5B,CAAC,WAAW,CAAC,GAAG,EAAE;AAClB,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,YAAY,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;AAC5D,EAAE;AACF;AACA,CAAC,GAAG,CAAC,CAAC,EAAE;AACR,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;AACrC,EAAE;AACF;AACA,CAAC,GAAG,CAAC,CAAC,EAAE;AACR,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AACjD,EAAE;AACF;;ACZe,MAAM,KAAK,CAAC;AAC3B,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;AAClC,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;AACpB,EAAE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;AAChB,EAAE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;;AAEzB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AACjB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;;AAEjB,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;AACxB,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;AACxB,EAAE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;;AAErB,EAMS;AACT,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;AACvB,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;AACnB,GAAE;AACF,EAAC;;AAED,CAAC,UAAU,CAAC,OAAO,EAAE;AACrB,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACvB,EAAC;;AAED,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;AACnC,EAAC;;AAED,CAAC,KAAK,GAAG;AACT,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;;AAE9D,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC1B,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC1B,EAAE,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;AAC9B,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAA;AAClC,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE5B,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,QAAQ,CAAC,KAAK,EAAE;AACjB,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAA;AAC/C,EAAC;;AAED,CAAC,QAAQ,CAAC,EAAE,EAAE;AACd,EAAE,IAAI,KAAK,GAAG,IAAI,CAAA;AAClB,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;AACZ,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;AACF,EAAC;;AAED,CAAC,YAAY,CAAC,EAAE,EAAE;AAClB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAA;AAClB,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;AACZ,GAAG,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAA;AACzB,GAAE;AACF,EAAC;;AAED,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE;AACvC,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;AACxB,EAAE,IAAI,CAAC,WAAW,EAAE;AACpB,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AAClB,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AAClB,GAAE;AACF,EAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;;AAE5B,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;;AAEpB,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACnC,EAAC;;AAED,CAAC,YAAY,CAAC,OAAO,EAAE;AACvB,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACnC,EAAC;;AAED,CAAC,KAAK,GAAG;AACT,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AACjB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AACjB,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;AACnB,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAA;AAC/B,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;AACzB,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;AACtB,GAAE;AACF,EAAC;;AAED,CAAC,KAAK,CAAC,KAAK,EAAE;AACd,EAAE,MAAM,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;;AAEvC,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAA;AAC3D,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;;AAEvD,EAAE,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAA;;AAEhC,EAAE,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,CAAA;AAC5D,EAAE,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC7B,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;;AAEjB,EAAE,IAAI,CAAC,GAAG,GAAG,KAAK,CAAA;;AAElB,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;AAC3B,GAAG,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;AACpB,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,OAAO,GAAG,cAAc,CAAA;AAChC,GAAE;;AAEF,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;AAC3B,EAAE,IAAI,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;AACtD,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;AAC1B,EAAE,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;;AAEtB,EAAE,OAAO,QAAQ,CAAA;AACjB,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AAC/C,EAAC;;AAED,CAAC,OAAO,CAAC,EAAE,EAAE;AACb,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;;AAE9C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;AACtB,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;AACjC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;AACrE,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;AACrB;AACA,KAAK,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;AAC7C,KAAI;AACJ,IAAG;AACH,GAAG,OAAO,IAAI,CAAA;AACd,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;;AAEjC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AAC1C,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;AACrC,GAAE;AACF,EAAC;;AAED,CAAC,SAAS,CAAC,EAAE,EAAE;AACf,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;;AAE9C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;AACtB,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;AACjC,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC1D,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;AACrB;AACA,KAAK,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;AACjD,KAAI;AACJ,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;AAClC,IAAG;AACH,GAAG,OAAO,IAAI,CAAA;AACd,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;;AAEjC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AAC1C,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;AACrC,GAAE;AACF,EAAC;AACD;;ACrLA,SAAS,OAAO,GAAG;AACnB,CAAC,IAAI,OAAO,UAAU,KAAK,WAAW,IAAI,OAAO,UAAU,CAAC,IAAI,KAAK,UAAU,EAAE;AACjF,EAAE,OAAO,CAAC,GAAG,KAAK,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACrE,EAAE,MAAM,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;AAC1C,EAAE,OAAO,CAAC,GAAG,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC/D,EAAE,MAAM;AACR,EAAE,OAAO,MAAM;AACf,GAAG,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;AAC9F,GAAG,CAAC;AACJ,EAAE;AACF,CAAC;AACD;AACA,MAAM,IAAI,iBAAiB,OAAO,EAAE,CAAC;AACrC;AACe,MAAM,SAAS,CAAC;AAC/B,CAAC,WAAW,CAAC,UAAU,EAAE;AACzB,EAAE,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;AACnB,EAAE,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;AAC9B,EAAE,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AACpC,EAAE,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;AAClD,EAAE,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;AAChC,EAAE,IAAI,CAAC,QAAQ,GAAGA,qBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9C,EAAE,IAAI,OAAO,UAAU,CAAC,mBAAmB,KAAK,WAAW,EAAE;AAC7D,GAAG,IAAI,CAAC,mBAAmB,GAAG,UAAU,CAAC,mBAAmB,CAAC;AAC7D,GAAG;AACH,EAAE,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,WAAW,EAAE;AACjD,GAAG,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AACrC,GAAG;AACH,EAAE;AACF;AACA,CAAC,QAAQ,GAAG;AACZ,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC9B,EAAE;AACF;AACA,CAAC,KAAK,GAAG;AACT,EAAE,OAAO,6CAA6C,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC/E,EAAE;AACF;;ACvCe,SAAS,WAAW,CAAC,IAAI,EAAE;AAC1C,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC;AACA,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5D;AACA,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;AACjD,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA;AACA;AACA;AACA,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE;AACrC,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA;AACA,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK;AAClD,EAAE,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAClD,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AACvC,EAAE,EAAE,QAAQ,CAAC,CAAC;AACd;AACA,CAAC,OAAO,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrC;;ACxBe,SAAS,eAAe,CAAC,IAAI,EAAE,EAAE,EAAE;AAClD,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACnC;AACA,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;AACjB;AACA,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE;AACrC,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC;AACpB,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;AAClB,EAAE;AACF;AACA,CAAC,IAAI,SAAS,CAAC,MAAM,EAAE;AACvB,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;AAC3B,EAAE,OAAO,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAClC,EAAE;AACF;AACA,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5C;;ACjBA,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C;AACe,SAAS,QAAQ,CAAC,KAAK,EAAE;AACxC,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,iBAAiB,CAAC;AACnD;;ACJe,SAAS,UAAU,CAAC,MAAM,EAAE;AAC3C,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC1C,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AACxB;AACA,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACzD,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB,EAAE,GAAG,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AACrC,EAAE;AACF;AACA,CAAC,OAAO,SAAS,MAAM,CAAC,KAAK,EAAE;AAC/B,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;AACZ,EAAE,IAAI,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC;AAC7B,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE;AAChB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC1B,GAAG,IAAI,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE;AAC/B,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,IAAI,MAAM;AACV,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,IAAI;AACJ,GAAG;AACH,EAAE,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;AACrB,EAAE,MAAM,MAAM,GAAG,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3C,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1B,EAAE,CAAC;AACH;;ACxBA,MAAM,SAAS,GAAG,IAAI,CAAC;AACvB;AACe,MAAM,QAAQ,CAAC;AAC9B,CAAC,WAAW,CAAC,KAAK,EAAE;AACpB,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACrB,EAAE,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;AAC7B,EAAE,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AAC/B,EAAE,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;AAChB,EAAE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC;AAC3D,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,EAAE;AACF;AACA,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE;AAC/C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;AACtB,GAAG,MAAM,qBAAqB,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AACpD,GAAG,IAAI,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AACjD,GAAG,IAAI,sBAAsB,GAAG,CAAC,CAAC,CAAC;AACnC;AACA;AACA,GAAG,OAAO,cAAc,IAAI,CAAC,IAAI,qBAAqB,GAAG,cAAc,EAAE;AACzE,IAAI,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AAClF,IAAI,IAAI,SAAS,IAAI,CAAC,EAAE;AACxB,KAAK,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC7B,KAAK;AACL,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACnC;AACA,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;AAChC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;AAC7D,IAAI,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AACjC;AACA,IAAI,sBAAsB,GAAG,cAAc,CAAC;AAC5C,IAAI,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,CAAC,CAAC,CAAC;AAC/D,IAAI;AACJ;AACA,GAAG,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AACjF,GAAG,IAAI,SAAS,IAAI,CAAC,EAAE;AACvB,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC5B,IAAI;AACJ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAClC;AACA,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC;AAC3D,GAAG,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;AAC3B,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACvC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACzB,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,EAAE;AACF;AACA,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,kBAAkB,EAAE;AACzE,EAAE,IAAI,iBAAiB,GAAG,KAAK,CAAC,KAAK,CAAC;AACtC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC;AACnB;AACA,EAAE,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAClC;AACA,EAAE,OAAO,iBAAiB,GAAG,KAAK,CAAC,GAAG,EAAE;AACxC,GAAG,IAAI,QAAQ,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE;AAC7C,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC;AAClB,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;AACnB,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;AAChC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;AAC7D,IAAI,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AACjC,IAAI,KAAK,GAAG,IAAI,CAAC;AACjB,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAChC,IAAI,MAAM;AACV,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK,IAAI,kBAAkB,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;AAC1E,KAAK,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AACnF;AACA,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,UAAU,EAAE;AACpC;AACA,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,EAAE;AACvD;AACA,OAAO,IAAI,CAAC,mBAAmB,EAAE;AACjC,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACvC,QAAQ,mBAAmB,GAAG,IAAI,CAAC;AACnC,QAAQ;AACR,OAAO,MAAM;AACb;AACA,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACtC,OAAO,mBAAmB,GAAG,KAAK,CAAC;AACnC,OAAO;AACP,MAAM,MAAM;AACZ,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACrC,MAAM;AACN,KAAK;AACL;AACA,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;AACpB,IAAI,IAAI,CAAC,mBAAmB,IAAI,CAAC,CAAC;AAClC,IAAI,KAAK,GAAG,KAAK,CAAC;AAClB,IAAI;AACJ;AACA,GAAG,iBAAiB,IAAI,CAAC,CAAC;AAC1B,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,EAAE;AACF;AACA,CAAC,OAAO,CAAC,GAAG,EAAE;AACd,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO;AACnB;AACA,EAAE,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC;AACA,EAAE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AACxB,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AAC9C,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;AAC7B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;AAC7D,IAAI;AACJ,GAAG,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AAChC,GAAG;AACH;AACA,EAAE,IAAI,CAAC,mBAAmB,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;AAC7D,EAAE;AACF;;ACtGA,MAAM,CAAC,GAAG,IAAI,CAAA;;AAEd,MAAM,MAAM,GAAG;AACf,CAAC,UAAU,EAAE,KAAK;AAClB,CAAC,WAAW,EAAE,KAAK;AACnB,CAAC,SAAS,EAAE,KAAK;AACjB,CAAC,CAAA;;AAEc,MAAM,WAAW,CAAC;AACjC,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE;AACnC,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;;AAEnD,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE;AAChC,GAAG,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE;AAC9C,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACvC,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACvC,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AAC/C,GAAG,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AAC9C,GAAG,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AACtD,GAAG,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACzC,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACvC,GAAG,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE;AACxD,GAAG,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,qBAAqB,EAAE;AAClF,GAAG,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,MAAM,EAAE,EAAE;AAC9D,GAAG,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AAC7C,GAAG,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;AAClD,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,EAAE;AAC5D,GAAG,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE;AACzD,GAAG,CAAC,CAAA;;AAMJ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;AACzB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAA;AACnC,EAAC;;AAED,CAAC,oBAAoB,CAAC,IAAI,EAAE;AAC5B,EAAE,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AACnC,EAAC;;AAED,CAAC,MAAM,CAAC,OAAO,EAAE;AACjB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAA;;AAExF,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACvB,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE;AAC5B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;AAC5B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACxB,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEnC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;AAC7B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACxB,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,KAAK,GAAG;AACT,EAAE,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;;AAEjG,EAAE,IAAI,aAAa,GAAG,IAAI,CAAC,UAAU,CAAA;AACrC,EAAE,IAAI,WAAW,IAAI,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,iBAAiB,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC,CAAA;;AAE1F,EAAE,OAAO,aAAa,EAAE;AACxB,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,WAAW,CAAA;AAClD,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAA;;AAE9C,GAAG,MAAM,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAA;AAC/C,GAAG,MAAM,eAAe,GAAG,iBAAiB,IAAI,iBAAiB,CAAC,KAAK,EAAE,CAAA;;AAEzE,GAAG,IAAI,eAAe,EAAE;AACxB,IAAI,WAAW,CAAC,IAAI,GAAG,eAAe,CAAA;AACtC,IAAI,eAAe,CAAC,QAAQ,GAAG,WAAW,CAAA;;AAE1C,IAAI,WAAW,GAAG,eAAe,CAAA;AACjC,IAAG;;AAEH,GAAG,aAAa,GAAG,iBAAiB,CAAA;AACpC,GAAE;;AAEF,EAAE,MAAM,CAAC,SAAS,GAAG,WAAW,CAAA;;AAEhC,EAAE,IAAI,IAAI,CAAC,qBAAqB,EAAE;AAClC,GAAG,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAA;AACpE,GAAE;;AAEF,EAAE,MAAM,CAAC,kBAAkB,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;;AAEjE,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC3B,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;;AAE3B,EAAE,OAAO,MAAM,CAAA;AACf,EAAC;;AAED,CAAC,kBAAkB,CAAC,OAAO,EAAE;AAC7B,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;;AAEzB,EAAE,MAAM,WAAW,GAAG,CAAC,CAAA;AACvB,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;AAC7C,EAAE,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAE9C,EAAE,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;;AAE1C,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AAClB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/B,GAAE;;AAEF,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,KAAK;AACtC,GAAG,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAElC,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAExD,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;AACrB,IAAI,QAAQ,CAAC,OAAO;AACpB,KAAK,WAAW;AAChB,KAAK,KAAK,CAAC,OAAO;AAClB,KAAK,GAAG;AACR,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACzD,KAAK,CAAA;AACL,IAAI,MAAM;AACV,IAAI,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAA;AAC9F,IAAG;;AAEH,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AACxD,GAAG,CAAC,CAAA;;AAEJ,EAAE,OAAO;AACT,GAAG,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,SAAS;AACrE,GAAG,OAAO,EAAE;AACZ,IAAI,OAAO,CAAC,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE;AAC7F,IAAI;AACJ,GAAG,cAAc,EAAE,OAAO,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,SAAS;AACvE,GAAG,KAAK;AACR,GAAG,QAAQ,EAAE,QAAQ,CAAC,GAAG;AACzB,GAAG,mBAAmB,EAAE,IAAI,CAAC,UAAU,GAAG,CAAC,WAAW,CAAC,GAAG,SAAS;AACnE,GAAG,CAAA;AACH,EAAC;;AAED,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAA;AACxD,EAAC;;AAED,CAAC,gBAAgB,GAAG;AACpB,EAAE,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;AACpC,GAAG,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC9C,GAAE;AACF,EAAC;;AAED,CAAC,mBAAmB,GAAG;AACvB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAA;AACzB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAA;AACvB,EAAC;;AAED,CAAC,eAAe,GAAG;AACnB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAA;AACzB,EAAE,OAAO,IAAI,CAAC,SAAS,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,SAAS,CAAA;AACxD,EAAC;;AAED,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE;AAC5B,EAAE,MAAM,OAAO,GAAG,YAAY,CAAA;;AAE9B,EAAE,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE;AAC3B,GAAG,OAAO,GAAG,SAAS,CAAA;AACtB,GAAG,SAAS,GAAG,SAAS,CAAA;AACxB,GAAE;;AAEF,EAAE,IAAI,SAAS,KAAK,SAAS,EAAE;AAC/B,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAA;AAC1B,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAA;AACrC,GAAE;;AAEF,EAAE,IAAI,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC;;AAEpC,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;;AAEzB;AACA,EAAE,MAAM,UAAU,GAAG,EAAE,CAAA;;AAEvB,EAAE,IAAI,OAAO,CAAC,OAAO,EAAE;AACvB,GAAG,MAAM,UAAU;AACnB,IAAI,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;AAChF,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,KAAK;AACrC,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;AACzD,KAAK,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;AACzB,KAAI;AACJ,IAAI,CAAC,CAAA;AACL,GAAE;;AAEF,EAAE,IAAI,yBAAyB,GAAG,OAAO,CAAC,WAAW,KAAK,KAAK,CAAA;AAC/D,EAAE,MAAM,QAAQ,GAAG,CAAC,KAAK,KAAK;AAC9B,GAAG,IAAI,yBAAyB,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;AAC/D,GAAG,yBAAyB,GAAG,IAAI,CAAA;AACnC,GAAG,OAAO,KAAK,CAAA;AACf,GAAG,CAAA;;AAEH,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;AAEpD,EAAE,IAAI,SAAS,GAAG,CAAC,CAAA;AACnB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;;AAE7B,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;;AAExB,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;AACrB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;AAChC,KAAK,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;AAE7D,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;AAC/B,MAAM,yBAAyB,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAA;AAClF,MAAK;AACL,KAAI;AACJ,IAAI,MAAM;AACV,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAA;;AAE3B,IAAI,OAAO,SAAS,GAAG,GAAG,EAAE;AAC5B,KAAK,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;AACjC,MAAM,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;;AAE3C,MAAM,IAAI,IAAI,KAAK,IAAI,EAAE;AACzB,OAAO,yBAAyB,GAAG,IAAI,CAAA;AACvC,OAAO,MAAM,IAAI,IAAI,KAAK,IAAI,IAAI,yBAAyB,EAAE;AAC7D,OAAO,yBAAyB,GAAG,KAAK,CAAA;;AAExC,OAAO,IAAI,SAAS,KAAK,KAAK,CAAC,KAAK,EAAE;AACtC,QAAQ,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;AACrC,QAAQ,MAAM;AACd,QAAQ,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;AAC1C,QAAQ,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AAC1B,QAAQ,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;AACrC,QAAO;AACP,OAAM;AACN,MAAK;;AAEL,KAAK,SAAS,IAAI,CAAC,CAAA;AACnB,KAAI;AACJ,IAAG;;AAEH,GAAG,SAAS,GAAG,KAAK,CAAC,GAAG,CAAA;AACxB,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;AAEpD,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,MAAM,GAAG;AACV,EAAE,MAAM,IAAI,KAAK;AACjB,GAAG,iFAAiF;AACpF,GAAG,CAAA;AACH,EAAC;;AAED,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE;AAC5B,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;AAC1B,GAAG,OAAO,CAAC,IAAI;AACf,IAAI,oFAAoF;AACxF,IAAI,CAAA;AACJ,GAAG,MAAM,CAAC,UAAU,GAAG,IAAI,CAAA;AAC3B,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;AACxC,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7B,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE;AAC3B,GAAG,OAAO,CAAC,IAAI;AACf,IAAI,uFAAuF;AAC3F,IAAI,CAAA;AACJ,GAAG,MAAM,CAAC,WAAW,GAAG,IAAI,CAAA;AAC5B,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;AAC1C,EAAC;;AAED,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE;AACzB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;AACzB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;;AAI9F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAClB,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACnC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;;AAE9B,EAAE,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAA;AAChC,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAA;;AAE5B,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACtC,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,KAAK,IAAI,CAAC,SAAS,EAAE,OAAO,IAAI,CAAA;AACvD,EAAE,MAAM,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAA;;AAE/D,EAAE,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAA;AACtC,EAAE,IAAI,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAA;;AAE3C,EAAE,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,GAAG,KAAK,CAAA;AACnC,EAAE,IAAI,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;;AAExC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAA;AAClD,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;AAClB,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAA;AAClC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAA;AAC7B,GAAE;;AAEF,EAAE,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAA;AAC1B,EAAE,IAAI,CAAC,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAA;;AAE9B,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;AACvC,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;AAGtC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;AACzC,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;AACzB,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;AAC1F,EAAC;;AAED,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;AACtC,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;;AAE9F,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;AACzE,EAAE,IAAI,KAAK,KAAK,GAAG;AACnB,GAAG,MAAM,IAAI,KAAK;AAClB,IAAI,+EAA+E;AACnF,IAAI,CAAA;;AAIJ,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;AAElB,EAAE,IAAI,OAAO,KAAK,IAAI,EAAE;AACxB,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;AAC1B,IAAI,OAAO,CAAC,IAAI;AAChB,KAAK,+HAA+H;AACpI,KAAK,CAAA;AACL,IAAI,MAAM,CAAC,SAAS,GAAG,IAAI,CAAA;AAC3B,IAAG;;AAEH,GAAG,OAAO,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAA;AAChC,GAAE;AACF,EAAE,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAA;AACrE,EAAE,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAA;;AAErE,EAAE,IAAI,SAAS,EAAE;AACjB,GAAG,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;AACnD,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE;AACrD,IAAI,QAAQ,EAAE,IAAI;AAClB,IAAI,KAAK,EAAE,IAAI;AACf,IAAI,UAAU,EAAE,IAAI;AACpB,IAAI,CAAC,CAAA;AACL,GAAE;;AAEF,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACnC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;;AAE9B,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,IAAI,KAAK,GAAG,KAAK,CAAA;AACpB,GAAG,OAAO,KAAK,KAAK,IAAI,EAAE;AAC1B,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;AAChD,KAAK,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;AAC7D,KAAI;AACJ,IAAI,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACtB,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;AACzB,IAAG;;AAEH,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,CAAA;AAC7C,GAAG,MAAM;AACT;AACA,GAAG,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;;AAEtE;AACA,GAAG,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;AACvB,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;AAC3B,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,OAAO,CAAC,OAAO,EAAE;AAClB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAA;;AAExF,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACnC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;AAC7B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACpC,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE;AAC9B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEnC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;AAC9B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACpC,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE;AACpB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,KAAK,KAAK,GAAG,EAAE,OAAO,IAAI,CAAA;;AAEhC,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;AAC5F,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;;AAIpE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;AAElB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;AACnB,GAAG,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;AACnB,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;;AAEjB,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;AAC3D,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE;AACnB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,KAAK,KAAK,GAAG,EAAE,OAAO,IAAI,CAAA;;AAEhC,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;AAC5F,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;;AAIpE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;AAElB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,KAAK,CAAC,KAAK,EAAE,CAAA;;AAEhB,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;AAC3D,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACjE,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;AAC5B,EAAE,GAAG;AACL,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACrE,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAC3E,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACrE,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,QAAQ,GAAE;AACpC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACjE,EAAE,OAAO,EAAE,CAAA;AACX,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC3C,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,CAAA;AAC/D,EAAE,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AAC1B,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;AAC5B,EAAE,GAAG;AACL,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/B,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC1C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AAC5E,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,OAAO,CAAA;AACnC,IAAG;;AAEH,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;AACjC,IAAI,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC5C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AAC9E,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,GAAG,OAAO,CAAA;AACrC,IAAG;;AAEH,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/B,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC1C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AAC5E,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,OAAO,CAAA;AACnC,IAAG;AACH,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,QAAQ,GAAE;AACpC,EAAE,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AACvC,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AACzE,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;AAC7B,EAAC;;AAED,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;AAC5D,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,MAAM,GAAG,EAAE,CAAA;;AAEjB;AACA,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,OAAO,KAAK,KAAK,KAAK,CAAC,KAAK,GAAG,KAAK,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE;AAC/D;AACA,GAAG,IAAI,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE;AAC9C,IAAI,OAAO,MAAM,CAAA;AACjB,IAAG;;AAEH,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK;AACpD,GAAG,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAA;;AAEnF,EAAE,MAAM,UAAU,GAAG,KAAK,CAAA;AAC1B,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,UAAU,KAAK,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,EAAE;AACvE,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAA;AACzB,IAAG;;AAEH,GAAG,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAAG,CAAA;AAC5D,GAAG,IAAI,WAAW,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG;AACvD,IAAI,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAA;;AAEhF,GAAG,MAAM,UAAU,GAAG,UAAU,KAAK,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAA;AACpE,GAAG,MAAM,QAAQ,GAAG,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAA;;AAE/F,GAAG,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;;AAEtD,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE;AAC3D,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAA;AACzB,IAAG;;AAEH,GAAG,IAAI,WAAW,EAAE;AACpB,IAAI,MAAK;AACT,IAAG;;AAEH,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,OAAO,MAAM,CAAA;AACf,EAAC;;AAED;AACA,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE;AAClB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAA;AAC5B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;AACxB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;;AAE1C,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,MAAM,CAAC,KAAK,EAAE;AACf,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAM;;AAItD,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAA;AACpC,EAAE,MAAM,aAAa,GAAG,KAAK,GAAG,KAAK,CAAC,GAAG,CAAA;;AAEzC,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;;AAEnE,GAAG,KAAK,GAAG,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AAC5E,GAAE;AACF,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE;AAC3B,EAAE,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;AAC5C;AACA,GAAG,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAA;AAC/C,GAAG,MAAM,IAAI,KAAK;AAClB,IAAI,CAAC,mDAAmD,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;AACzG,IAAI,CAAA;AACJ,GAAE;;AAEF,EAAE,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAErC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;AAC3B,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAA;AAChC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAA;;AAErC,EAAE,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;;AAEzD,EAAE,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAA;AAEhC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAA;;AAEtB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAA;AAC1B,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK,CAAA;AACzB,EAAC;;AAED,CAAC,OAAO,GAAG;AACX,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,GAAG;AACL,GAAG;AACH,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;AAC7C,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;AAClD,KAAK,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;AAC7C;AACA,IAAI,OAAO,KAAK,CAAA;AAChB,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,IAAI,GAAE;AAChC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,MAAM,GAAG;AACV,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,IAAI,MAAM,GAAG,CAAC,CAAA;AAChB,EAAE,GAAG;AACL,GAAG,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAA;AAC3E,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,IAAI,GAAE;AAChC,EAAE,OAAO,MAAM,CAAA;AACf,EAAC;;AAED,CAAC,SAAS,GAAG;AACb,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AAC9B,EAAC;;AAED,CAAC,IAAI,CAAC,QAAQ,EAAE;AAChB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;AACnD,EAAC;;AAED,CAAC,cAAc,CAAC,QAAQ,EAAE;AAC1B,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAA;;AAEnD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;;AAE5B,EAAE,GAAG;AACL,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;AACxB,GAAG,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;;AAEpC;AACA,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE;AAClC,KAAK,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAA;AAChC,KAAI;;AAEJ,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AACjC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC/C,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC3C,IAAG;;AAEH,GAAG,IAAI,OAAO,EAAE,OAAO,IAAI,CAAA;AAC3B,GAAG,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAA;AACzB,GAAG,QAAQ,KAAK,EAAC;;AAEjB,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,OAAO,CAAC,QAAQ,EAAE;AACnB,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;AAC/B,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;AACD,CAAC,gBAAgB,CAAC,QAAQ,EAAE;AAC5B,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAA;;AAExD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;;AAE7B,EAAE,GAAG;AACL,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;AACxB,GAAG,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;;AAEtC,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;AAC1B;AACA,IAAI,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAA;;AAE7D,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AACjC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC/C,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC3C,IAAG;;AAEH,GAAG,IAAI,OAAO,EAAE,OAAO,IAAI,CAAA;AAC3B,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAG,QAAQ,KAAK,EAAC;;AAEjB,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,SAAS,CAAC,QAAQ,EAAE;AACrB,EAAE,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AACjC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,UAAU,GAAG;AACd,EAAE,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAA;AAC1C,EAAC;;AAED,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE;AAC1C,EAAE,SAAS,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE;AACtC,GAAG,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;AACxC,IAAI,OAAO,WAAW,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK;AAC1D;AACA,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,GAAG,CAAA;AAC9B,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAA;AACnC,KAAK,MAAM,GAAG,GAAG,CAAC,CAAC,CAAA;AACnB,KAAK,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;AAC7C,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AACnB,KAAK,CAAC,CAAA;AACN,IAAI,MAAM;AACV,IAAI,OAAO,WAAW,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;AAChE,IAAG;AACH,GAAE;AACF,EAAE,SAAS,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE;AAC7B,GAAG,IAAI,KAAK,CAAA;AACZ,GAAG,MAAM,OAAO,GAAG,EAAE,CAAA;AACrB,GAAG,QAAQ,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;AAClC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACvB,IAAG;AACH,GAAG,OAAO,OAAO,CAAA;AACjB,GAAE;AACF,EAAE,IAAI,WAAW,CAAC,MAAM,EAAE;AAC1B,GAAG,MAAM,OAAO,GAAG,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;AACvD,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK;AAC9B,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;AAC7B,KAAK,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC7D,KAAK,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;AACnC,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC7E,MAAK;AACL,KAAI;AACJ,IAAI,CAAC,CAAA;AACL,GAAG,MAAM;AACT,GAAG,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;AACjD,GAAG,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;AACrC,IAAI,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC5D,IAAI,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;AAClC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC5E,KAAI;AACJ,IAAG;AACH,GAAE;AACF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;AACrC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;AAC3B,EAAE,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;;AAExC,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;AACpB,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC5D,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,EAAE;AACnC,EAAE,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;AACvC,GAAG,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACvD,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACtD,EAAC;;AAED,CAAC,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE;AACxC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;AAC3B,EAAE,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAA;AACpC,EAAE;AACF,GAAG,IAAI,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;AACvC,GAAG,KAAK,KAAK,CAAC,CAAC;AACf,GAAG,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,YAAY,CAAA;AACxD,IAAI;AACJ,GAAG,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,CAAC,CAAA;AAC/D,GAAG,IAAI,QAAQ,KAAK,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,EAAE,WAAW,CAAC,CAAA;AACzF,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE;AACtC,EAAE,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;AACvC,GAAG,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AAC1D,GAAE;;AAEF,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;AAC3B,GAAG,MAAM,IAAI,SAAS;AACtB,IAAI,2EAA2E;AAC/E,IAAI,CAAA;AACJ,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACtD,EAAC;AACD;;AC33BA,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD;AACe,MAAM,MAAM,CAAC;AAC5B,CAAC,WAAW,CAAC,OAAO,GAAG,EAAE,EAAE;AAC3B,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;AACnC,EAAE,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;AAC9E,EAAE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;AACpB,EAAE,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;AAC1B,EAAE,IAAI,CAAC,2BAA2B,GAAG,EAAE,CAAC;AACxC,EAAE;AACF;AACA,CAAC,SAAS,CAAC,MAAM,EAAE;AACnB,EAAE,IAAI,MAAM,YAAY,WAAW,EAAE;AACrC,GAAG,OAAO,IAAI,CAAC,SAAS,CAAC;AACzB,IAAI,OAAO,EAAE,MAAM;AACnB,IAAI,QAAQ,EAAE,MAAM,CAAC,QAAQ;AAC7B,IAAI,SAAS,EAAE,IAAI,CAAC,SAAS;AAC7B,IAAI,CAAC,CAAC;AACN,GAAG;AACH;AACA,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;AAC5C,GAAG,MAAM,IAAI,KAAK;AAClB,IAAI,sIAAsI;AAC1I,IAAI,CAAC;AACL,GAAG;AACH;AACA,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACvF,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACjF,GAAG,CAAC,CAAC;AACL;AACA,EAAE,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,EAAE;AACtC;AACA,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACrC,GAAG;AACH;AACA,EAAE,IAAI,MAAM,CAAC,QAAQ,EAAE;AACvB,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE;AAC5E,IAAI,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;AAClF,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC7F,IAAI,MAAM;AACV,IAAI,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC/F,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,KAAK,YAAY,CAAC,OAAO,EAAE;AAC1D,KAAK,MAAM,IAAI,KAAK,CAAC,CAAC,+BAA+B,EAAE,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC,CAAC;AAC/F,KAAK;AACL,IAAI;AACJ,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE;AACtB,EAAE,IAAI,CAAC,SAAS,CAAC;AACjB,GAAG,OAAO,EAAE,IAAI,WAAW,CAAC,GAAG,CAAC;AAChC,GAAG,SAAS,EAAE,CAAC,OAAO,IAAI,OAAO,CAAC,SAAS,KAAK,EAAE;AAClD,GAAG,CAAC,CAAC;AACL;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,KAAK,GAAG;AACT,EAAE,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC;AAC5B,GAAG,KAAK,EAAE,IAAI,CAAC,KAAK;AACpB,GAAG,SAAS,EAAE,IAAI,CAAC,SAAS;AAC5B,GAAG,CAAC,CAAC;AACL;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACnC,GAAG,MAAM,CAAC,SAAS,CAAC;AACpB,IAAI,QAAQ,EAAE,MAAM,CAAC,QAAQ;AAC7B,IAAI,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE;AACnC,IAAI,SAAS,EAAE,MAAM,CAAC,SAAS;AAC/B,IAAI,CAAC,CAAC;AACN,GAAG,CAAC,CAAC;AACL;AACA,EAAE,OAAO,MAAM,CAAC;AAChB,EAAE;AACF;AACA,CAAC,kBAAkB,CAAC,OAAO,GAAG,EAAE,EAAE;AAClC,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;AACnB,EAAE,IAAI,mBAAmB,GAAG,SAAS,CAAC;AACtC,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACnC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK;AAC7D,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChD,IAAI,CAAC,CAAC;AACN,GAAG,CAAC,CAAC;AACL;AACA,EAAE,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC/C;AACA,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AAClB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChC,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;AACtC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE;AACd,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACrC,IAAI;AACJ;AACA,GAAG,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAChG,GAAG,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;AACtC,GAAG,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;AACnD;AACA,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;AAC1B,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACxC,IAAI;AACJ;AACA,GAAG,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,KAAK;AAC9C,IAAI,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACpC;AACA,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1D;AACA,IAAI,IAAI,MAAM,CAAC,QAAQ,EAAE;AACzB,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE;AACvB,MAAM,QAAQ,CAAC,OAAO;AACtB,OAAO,WAAW;AAClB,OAAO,KAAK,CAAC,OAAO;AACpB,OAAO,GAAG;AACV,OAAO,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC3D,OAAO,CAAC;AACR,MAAM,MAAM;AACZ,MAAM,QAAQ,CAAC,gBAAgB;AAC/B,OAAO,WAAW;AAClB,OAAO,KAAK;AACZ,OAAO,WAAW,CAAC,QAAQ;AAC3B,OAAO,GAAG;AACV,OAAO,WAAW,CAAC,kBAAkB;AACrC,OAAO,CAAC;AACR,MAAM;AACN,KAAK,MAAM;AACX,KAAK,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACrC,KAAK;AACL;AACA,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1D,IAAI,CAAC,CAAC;AACN;AACA,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;AAC1B,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACxC,IAAI;AACJ;AACA,GAAG,IAAI,MAAM,CAAC,UAAU,IAAI,WAAW,KAAK,CAAC,CAAC,EAAE;AAChD,IAAI,IAAI,mBAAmB,KAAK,SAAS,EAAE;AAC3C,KAAK,mBAAmB,GAAG,EAAE,CAAC;AAC9B,KAAK;AACL,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC1C,IAAI;AACJ,GAAG,CAAC,CAAC;AACL;AACA,EAAE,OAAO;AACT,GAAG,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,SAAS;AACrE,GAAG,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK;AAC/C,IAAI,OAAO,OAAO,CAAC,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3F,IAAI,CAAC;AACL,GAAG,cAAc,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK;AACtD,IAAI,OAAO,OAAO,CAAC,cAAc,GAAG,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;AAC1D,IAAI,CAAC;AACL,GAAG,KAAK;AACR,GAAG,QAAQ,EAAE,QAAQ,CAAC,GAAG;AACzB,GAAG,mBAAmB;AACtB,GAAG,CAAC;AACJ,EAAE;AACF;AACA,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;AACzD,EAAE;AACF;AACA,CAAC,eAAe,GAAG;AACnB,EAAE,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAChC;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACnC,GAAG,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;AAC1D;AACA,GAAG,IAAI,SAAS,KAAK,IAAI,EAAE,OAAO;AAClC;AACA,GAAG,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AACzE,GAAG,kBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACtC,GAAG,CAAC,CAAC;AACL;AACA,EAAE;AACF,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;AAClD,IAAI,OAAO,kBAAkB,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACzD,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI;AAChB,IAAI;AACJ,EAAE;AACF;AACA,CAAC,MAAM,CAAC,SAAS,EAAE;AACnB,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;AACzB,GAAG,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;AACtC,GAAG;AACH;AACA,EAAE,IAAI,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC;AACpC;AACA,EAAE,IAAI,eAAe,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AACrE;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;AACtC,GAAG,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACxF,GAAG,MAAM,WAAW,GAAG,eAAe,KAAK,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AAC9E;AACA,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE;AACpC,IAAI,OAAO,EAAE,MAAM,CAAC,qBAAqB;AACzC,IAAI,WAAW;AACf,IAAI,CAAC,CAAC;AACN;AACA,GAAG,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC;AACxD,GAAG,CAAC,CAAC;AACL;AACA,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AAClB,GAAG,IAAI,CAAC,KAAK;AACb,IAAI,SAAS;AACb,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK;AACrD,KAAK,OAAO,KAAK,GAAG,CAAC,GAAG,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AAClD,KAAK,CAAC,CAAC;AACP,GAAG;AACH;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,OAAO,CAAC,GAAG,EAAE;AACd,EAAE,IAAI,CAAC,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;AAChC,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,QAAQ,GAAG;AACZ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO;AAC3B,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;AACvB,IAAI,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACzF,IAAI,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,EAAE,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;AACrE;AACA,IAAI,OAAO,GAAG,CAAC;AACf,IAAI,CAAC;AACL,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;AACb;AACA,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AAC3B,EAAE;AACF;AACA,CAAC,OAAO,GAAG;AACX,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,OAAO,KAAK,CAAC;AAC3D,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,KAAK,CAAC;AAC7E,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,MAAM,GAAG;AACV,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM;AAC5B,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE;AACvD,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM;AACpB,GAAG,CAAC;AACJ,EAAE;AACF;AACA,CAAC,SAAS,GAAG;AACb,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC/B,EAAE;AACF;AACA,CAAC,IAAI,CAAC,QAAQ,EAAE;AAChB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACpD,EAAE;AACF;AACA,CAAC,SAAS,CAAC,QAAQ,EAAE;AACrB,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;AACzD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1C;AACA,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACnB,GAAG,IAAI,MAAM,CAAC;AACd,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AACb;AACA,GAAG,GAAG;AACN,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,KAAK,MAAM;AACX,KAAK;AACL,IAAI,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE;AACxD,GAAG;AACH;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,OAAO,CAAC,QAAQ,EAAE;AACnB,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;AACpD;AACA,EAAE,IAAI,MAAM,CAAC;AACb,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AAClC;AACA,EAAE,GAAG;AACL,GAAG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;AAC9B,GAAG,IAAI,CAAC,MAAM,EAAE;AAChB,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC5C,IAAI,MAAM;AACV,IAAI;AACJ,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;AACrD;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;;ACpSA,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;AAC5B,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC;AAClC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/magic-string/dist/magic-string.es.d.mts b/node_modules/magic-string/dist/magic-string.es.d.mts deleted file mode 100644 index 76cc537..0000000 --- a/node_modules/magic-string/dist/magic-string.es.d.mts +++ /dev/null @@ -1,289 +0,0 @@ -export interface BundleOptions { - intro?: string; - separator?: string; -} - -export interface SourceMapOptions { - /** - * Whether the mapping should be high-resolution. - * Hi-res mappings map every single character, meaning (for example) your devtools will always - * be able to pinpoint the exact location of function calls and so on. - * With lo-res mappings, devtools may only be able to identify the correct - * line - but they're quicker to generate and less bulky. - * You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary - * instead of per character, suitable for string semantics that are separated by words. - * If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here. - */ - hires?: boolean | 'boundary'; - /** - * The filename where you plan to write the sourcemap. - */ - file?: string; - /** - * The filename of the file containing the original source. - */ - source?: string; - /** - * Whether to include the original content in the map's sourcesContent array. - */ - includeContent?: boolean; -} - -export type SourceMapSegment = - | [number] - | [number, number, number, number] - | [number, number, number, number, number]; - -export interface DecodedSourceMap { - file: string; - sources: string[]; - sourcesContent?: string[]; - names: string[]; - mappings: SourceMapSegment[][]; - x_google_ignoreList?: number[]; -} - -export class SourceMap { - constructor(properties: DecodedSourceMap); - - version: number; - file: string; - sources: string[]; - sourcesContent?: string[]; - names: string[]; - mappings: string; - x_google_ignoreList?: number[]; - debugId?: string; - - /** - * Returns the equivalent of `JSON.stringify(map)` - */ - toString(): string; - /** - * Returns a DataURI containing the sourcemap. Useful for doing this sort of thing: - * `generateMap(options?: SourceMapOptions): SourceMap;` - */ - toUrl(): string; -} - -export class Bundle { - constructor(options?: BundleOptions); - /** - * Adds the specified source to the bundle, which can either be a `MagicString` object directly, - * or an options object that holds a magic string `content` property and optionally provides - * a `filename` for the source within the bundle, as well as an optional `ignoreList` hint - * (which defaults to `false`). The `filename` is used when constructing the source map for the - * bundle, to identify this `source` in the source map's `sources` field. The `ignoreList` hint - * is used to populate the `x_google_ignoreList` extension field in the source map, which is a - * mechanism for tools to signal to debuggers that certain sources should be ignored by default - * (depending on user preferences). - */ - addSource( - source: MagicString | { filename?: string; content: MagicString; ignoreList?: boolean }, - ): this; - append(str: string, options?: BundleOptions): this; - clone(): this; - generateMap( - options?: SourceMapOptions, - ): Omit & { sourcesContent: Array }; - generateDecodedMap( - options?: SourceMapOptions, - ): Omit & { sourcesContent: Array }; - getIndentString(): string; - indent(indentStr?: string): this; - indentExclusionRanges: ExclusionRange | Array; - prepend(str: string): this; - toString(): string; - trimLines(): this; - trim(charType?: string): this; - trimStart(charType?: string): this; - trimEnd(charType?: string): this; - isEmpty(): boolean; - length(): number; -} - -export type ExclusionRange = [number, number]; - -export interface MagicStringOptions { - filename?: string; - indentExclusionRanges?: ExclusionRange | Array; - offset?: number; -} - -export interface IndentOptions { - exclude?: ExclusionRange | Array; - indentStart?: boolean; -} - -export interface OverwriteOptions { - storeName?: boolean; - contentOnly?: boolean; -} - -export interface UpdateOptions { - storeName?: boolean; - overwrite?: boolean; -} - -export default class MagicString { - constructor(str: string, options?: MagicStringOptions); - /** - * Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false. - */ - addSourcemapLocation(char: number): void; - /** - * Appends the specified content to the end of the string. - */ - append(content: string): this; - /** - * Appends the specified content at the index in the original string. - * If a range *ending* with index is subsequently moved, the insert will be moved with it. - * See also `s.prependLeft(...)`. - */ - appendLeft(index: number, content: string): this; - /** - * Appends the specified content at the index in the original string. - * If a range *starting* with index is subsequently moved, the insert will be moved with it. - * See also `s.prependRight(...)`. - */ - appendRight(index: number, content: string): this; - /** - * Does what you'd expect. - */ - clone(): this; - /** - * Generates a version 3 sourcemap. - */ - generateMap(options?: SourceMapOptions): SourceMap; - /** - * Generates a sourcemap object with raw mappings in array form, rather than encoded as a string. - * Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead. - */ - generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap; - getIndentString(): string; - - /** - * Prefixes each line of the string with prefix. - * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. - */ - indent(options?: IndentOptions): this; - /** - * Prefixes each line of the string with prefix. - * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. - * - * The options argument can have an exclude property, which is an array of [start, end] character ranges. - * These ranges will be excluded from the indentation - useful for (e.g.) multiline strings. - */ - indent(indentStr?: string, options?: IndentOptions): this; - indentExclusionRanges: ExclusionRange | Array; - - /** - * Moves the characters from `start` and `end` to `index`. - */ - move(start: number, end: number, index: number): this; - /** - * Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in - * that range. The same restrictions as `s.remove()` apply. - * - * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored - * for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only - * the content is overwritten, or anything that was appended/prepended to the range as well. - * - * It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content. - */ - overwrite( - start: number, - end: number, - content: string, - options?: boolean | OverwriteOptions, - ): this; - /** - * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. - * - * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored - * for later inclusion in a sourcemap's names array — and an overwrite property which determines whether only - * the content is overwritten, or anything that was appended/prepended to the range as well. - */ - update(start: number, end: number, content: string, options?: boolean | UpdateOptions): this; - /** - * Prepends the string with the specified content. - */ - prepend(content: string): this; - /** - * Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index - */ - prependLeft(index: number, content: string): this; - /** - * Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index` - */ - prependRight(index: number, content: string): this; - /** - * Removes the characters from `start` to `end` (of the original string, **not** the generated string). - * Removing the same content twice, or making removals that partially overlap, will cause an error. - */ - remove(start: number, end: number): this; - /** - * Reset the modified characters from `start` to `end` (of the original string, **not** the generated string). - */ - reset(start: number, end: number): this; - /** - * Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string. - * Throws error if the indices are for characters that were already removed. - */ - slice(start: number, end: number): string; - /** - * Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed. - */ - snip(start: number, end: number): this; - /** - * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end. - */ - trim(charType?: string): this; - /** - * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start. - */ - trimStart(charType?: string): this; - /** - * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end. - */ - trimEnd(charType?: string): this; - /** - * Removes empty lines from the start and end. - */ - trimLines(): this; - /** - * String replacement with RegExp or string. - */ - replace( - regex: RegExp | string, - replacement: string | ((substring: string, ...args: any[]) => string), - ): this; - /** - * Same as `s.replace`, but replace all matched strings instead of just one. - */ - replaceAll( - regex: RegExp | string, - replacement: string | ((substring: string, ...args: any[]) => string), - ): this; - - lastChar(): string; - lastLine(): string; - /** - * Returns true if the resulting source is empty (disregarding white space). - */ - isEmpty(): boolean; - length(): number; - - /** - * Indicates if the string has been changed. - */ - hasChanged(): boolean; - - original: string; - /** - * Returns the generated string. - */ - toString(): string; - - offset: number; -} diff --git a/node_modules/magic-string/dist/magic-string.es.mjs b/node_modules/magic-string/dist/magic-string.es.mjs deleted file mode 100644 index 76f3642..0000000 --- a/node_modules/magic-string/dist/magic-string.es.mjs +++ /dev/null @@ -1,1569 +0,0 @@ -import { encode } from '@jridgewell/sourcemap-codec'; - -class BitSet { - constructor(arg) { - this.bits = arg instanceof BitSet ? arg.bits.slice() : []; - } - - add(n) { - this.bits[n >> 5] |= 1 << (n & 31); - } - - has(n) { - return !!(this.bits[n >> 5] & (1 << (n & 31))); - } -} - -class Chunk { - constructor(start, end, content) { - this.start = start; - this.end = end; - this.original = content; - - this.intro = ''; - this.outro = ''; - - this.content = content; - this.storeName = false; - this.edited = false; - - { - this.previous = null; - this.next = null; - } - } - - appendLeft(content) { - this.outro += content; - } - - appendRight(content) { - this.intro = this.intro + content; - } - - clone() { - const chunk = new Chunk(this.start, this.end, this.original); - - chunk.intro = this.intro; - chunk.outro = this.outro; - chunk.content = this.content; - chunk.storeName = this.storeName; - chunk.edited = this.edited; - - return chunk; - } - - contains(index) { - return this.start < index && index < this.end; - } - - eachNext(fn) { - let chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.next; - } - } - - eachPrevious(fn) { - let chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.previous; - } - } - - edit(content, storeName, contentOnly) { - this.content = content; - if (!contentOnly) { - this.intro = ''; - this.outro = ''; - } - this.storeName = storeName; - - this.edited = true; - - return this; - } - - prependLeft(content) { - this.outro = content + this.outro; - } - - prependRight(content) { - this.intro = content + this.intro; - } - - reset() { - this.intro = ''; - this.outro = ''; - if (this.edited) { - this.content = this.original; - this.storeName = false; - this.edited = false; - } - } - - split(index) { - const sliceIndex = index - this.start; - - const originalBefore = this.original.slice(0, sliceIndex); - const originalAfter = this.original.slice(sliceIndex); - - this.original = originalBefore; - - const newChunk = new Chunk(index, this.end, originalAfter); - newChunk.outro = this.outro; - this.outro = ''; - - this.end = index; - - if (this.edited) { - // after split we should save the edit content record into the correct chunk - // to make sure sourcemap correct - // For example: - // ' test'.trim() - // split -> ' ' + 'test' - // ✔️ edit -> '' + 'test' - // ✖️ edit -> 'test' + '' - // TODO is this block necessary?... - newChunk.edit('', false); - this.content = ''; - } else { - this.content = originalBefore; - } - - newChunk.next = this.next; - if (newChunk.next) newChunk.next.previous = newChunk; - newChunk.previous = this; - this.next = newChunk; - - return newChunk; - } - - toString() { - return this.intro + this.content + this.outro; - } - - trimEnd(rx) { - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) return true; - - const trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - this.split(this.start + trimmed.length).edit('', undefined, true); - if (this.edited) { - // save the change, if it has been edited - this.edit(trimmed, this.storeName, true); - } - } - return true; - } else { - this.edit('', undefined, true); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) return true; - } - } - - trimStart(rx) { - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) return true; - - const trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - const newChunk = this.split(this.end - trimmed.length); - if (this.edited) { - // save the change, if it has been edited - newChunk.edit(trimmed, this.storeName, true); - } - this.edit('', undefined, true); - } - return true; - } else { - this.edit('', undefined, true); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) return true; - } - } -} - -function getBtoa() { - if (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') { - return (str) => globalThis.btoa(unescape(encodeURIComponent(str))); - } else if (typeof Buffer === 'function') { - return (str) => Buffer.from(str, 'utf-8').toString('base64'); - } else { - return () => { - throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); - }; - } -} - -const btoa = /*#__PURE__*/ getBtoa(); - -class SourceMap { - constructor(properties) { - this.version = 3; - this.file = properties.file; - this.sources = properties.sources; - this.sourcesContent = properties.sourcesContent; - this.names = properties.names; - this.mappings = encode(properties.mappings); - if (typeof properties.x_google_ignoreList !== 'undefined') { - this.x_google_ignoreList = properties.x_google_ignoreList; - } - if (typeof properties.debugId !== 'undefined') { - this.debugId = properties.debugId; - } - } - - toString() { - return JSON.stringify(this); - } - - toUrl() { - return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); - } -} - -function guessIndent(code) { - const lines = code.split('\n'); - - const tabbed = lines.filter((line) => /^\t+/.test(line)); - const spaced = lines.filter((line) => /^ {2,}/.test(line)); - - if (tabbed.length === 0 && spaced.length === 0) { - return null; - } - - // More lines tabbed than spaced? Assume tabs, and - // default to tabs in the case of a tie (or nothing - // to go on) - if (tabbed.length >= spaced.length) { - return '\t'; - } - - // Otherwise, we need to guess the multiple - const min = spaced.reduce((previous, current) => { - const numSpaces = /^ +/.exec(current)[0].length; - return Math.min(numSpaces, previous); - }, Infinity); - - return new Array(min + 1).join(' '); -} - -function getRelativePath(from, to) { - const fromParts = from.split(/[/\\]/); - const toParts = to.split(/[/\\]/); - - fromParts.pop(); // get dirname - - while (fromParts[0] === toParts[0]) { - fromParts.shift(); - toParts.shift(); - } - - if (fromParts.length) { - let i = fromParts.length; - while (i--) fromParts[i] = '..'; - } - - return fromParts.concat(toParts).join('/'); -} - -const toString = Object.prototype.toString; - -function isObject(thing) { - return toString.call(thing) === '[object Object]'; -} - -function getLocator(source) { - const originalLines = source.split('\n'); - const lineOffsets = []; - - for (let i = 0, pos = 0; i < originalLines.length; i++) { - lineOffsets.push(pos); - pos += originalLines[i].length + 1; - } - - return function locate(index) { - let i = 0; - let j = lineOffsets.length; - while (i < j) { - const m = (i + j) >> 1; - if (index < lineOffsets[m]) { - j = m; - } else { - i = m + 1; - } - } - const line = i - 1; - const column = index - lineOffsets[line]; - return { line, column }; - }; -} - -const wordRegex = /\w/; - -class Mappings { - constructor(hires) { - this.hires = hires; - this.generatedCodeLine = 0; - this.generatedCodeColumn = 0; - this.raw = []; - this.rawSegments = this.raw[this.generatedCodeLine] = []; - this.pending = null; - } - - addEdit(sourceIndex, content, loc, nameIndex) { - if (content.length) { - const contentLengthMinusOne = content.length - 1; - let contentLineEnd = content.indexOf('\n', 0); - let previousContentLineEnd = -1; - // Loop through each line in the content and add a segment, but stop if the last line is empty, - // else code afterwards would fill one line too many - while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) { - const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - if (nameIndex >= 0) { - segment.push(nameIndex); - } - this.rawSegments.push(segment); - - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - - previousContentLineEnd = contentLineEnd; - contentLineEnd = content.indexOf('\n', contentLineEnd + 1); - } - - const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - if (nameIndex >= 0) { - segment.push(nameIndex); - } - this.rawSegments.push(segment); - - this.advance(content.slice(previousContentLineEnd + 1)); - } else if (this.pending) { - this.rawSegments.push(this.pending); - this.advance(content); - } - - this.pending = null; - } - - addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { - let originalCharIndex = chunk.start; - let first = true; - // when iterating each char, check if it's in a word boundary - let charInHiresBoundary = false; - - while (originalCharIndex < chunk.end) { - if (original[originalCharIndex] === '\n') { - loc.line += 1; - loc.column = 0; - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - first = true; - charInHiresBoundary = false; - } else { - if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { - const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - - if (this.hires === 'boundary') { - // in hires "boundary", group segments per word boundary than per char - if (wordRegex.test(original[originalCharIndex])) { - // for first char in the boundary found, start the boundary by pushing a segment - if (!charInHiresBoundary) { - this.rawSegments.push(segment); - charInHiresBoundary = true; - } - } else { - // for non-word char, end the boundary by pushing a segment - this.rawSegments.push(segment); - charInHiresBoundary = false; - } - } else { - this.rawSegments.push(segment); - } - } - - loc.column += 1; - this.generatedCodeColumn += 1; - first = false; - } - - originalCharIndex += 1; - } - - this.pending = null; - } - - advance(str) { - if (!str) return; - - const lines = str.split('\n'); - - if (lines.length > 1) { - for (let i = 0; i < lines.length - 1; i++) { - this.generatedCodeLine++; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - } - this.generatedCodeColumn = 0; - } - - this.generatedCodeColumn += lines[lines.length - 1].length; - } -} - -const n = '\n'; - -const warned = { - insertLeft: false, - insertRight: false, - storeName: false, -}; - -class MagicString { - constructor(string, options = {}) { - const chunk = new Chunk(0, string.length, string); - - Object.defineProperties(this, { - original: { writable: true, value: string }, - outro: { writable: true, value: '' }, - intro: { writable: true, value: '' }, - firstChunk: { writable: true, value: chunk }, - lastChunk: { writable: true, value: chunk }, - lastSearchedChunk: { writable: true, value: chunk }, - byStart: { writable: true, value: {} }, - byEnd: { writable: true, value: {} }, - filename: { writable: true, value: options.filename }, - indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, - sourcemapLocations: { writable: true, value: new BitSet() }, - storedNames: { writable: true, value: {} }, - indentStr: { writable: true, value: undefined }, - ignoreList: { writable: true, value: options.ignoreList }, - offset: { writable: true, value: options.offset || 0 }, - }); - - this.byStart[0] = chunk; - this.byEnd[string.length] = chunk; - } - - addSourcemapLocation(char) { - this.sourcemapLocations.add(char); - } - - append(content) { - if (typeof content !== 'string') throw new TypeError('outro content must be a string'); - - this.outro += content; - return this; - } - - appendLeft(index, content) { - index = index + this.offset; - - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byEnd[index]; - - if (chunk) { - chunk.appendLeft(content); - } else { - this.intro += content; - } - return this; - } - - appendRight(index, content) { - index = index + this.offset; - - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byStart[index]; - - if (chunk) { - chunk.appendRight(content); - } else { - this.outro += content; - } - return this; - } - - clone() { - const cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset }); - - let originalChunk = this.firstChunk; - let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); - - while (originalChunk) { - cloned.byStart[clonedChunk.start] = clonedChunk; - cloned.byEnd[clonedChunk.end] = clonedChunk; - - const nextOriginalChunk = originalChunk.next; - const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); - - if (nextClonedChunk) { - clonedChunk.next = nextClonedChunk; - nextClonedChunk.previous = clonedChunk; - - clonedChunk = nextClonedChunk; - } - - originalChunk = nextOriginalChunk; - } - - cloned.lastChunk = clonedChunk; - - if (this.indentExclusionRanges) { - cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); - } - - cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); - - cloned.intro = this.intro; - cloned.outro = this.outro; - - return cloned; - } - - generateDecodedMap(options) { - options = options || {}; - - const sourceIndex = 0; - const names = Object.keys(this.storedNames); - const mappings = new Mappings(options.hires); - - const locate = getLocator(this.original); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.firstChunk.eachNext((chunk) => { - const loc = locate(chunk.start); - - if (chunk.intro.length) mappings.advance(chunk.intro); - - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1, - ); - } else { - mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); - } - - if (chunk.outro.length) mappings.advance(chunk.outro); - }); - - return { - file: options.file ? options.file.split(/[/\\]/).pop() : undefined, - sources: [ - options.source ? getRelativePath(options.file || '', options.source) : options.file || '', - ], - sourcesContent: options.includeContent ? [this.original] : undefined, - names, - mappings: mappings.raw, - x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, - }; - } - - generateMap(options) { - return new SourceMap(this.generateDecodedMap(options)); - } - - _ensureindentStr() { - if (this.indentStr === undefined) { - this.indentStr = guessIndent(this.original); - } - } - - _getRawIndentString() { - this._ensureindentStr(); - return this.indentStr; - } - - getIndentString() { - this._ensureindentStr(); - return this.indentStr === null ? '\t' : this.indentStr; - } - - indent(indentStr, options) { - const pattern = /^[^\r\n]/gm; - - if (isObject(indentStr)) { - options = indentStr; - indentStr = undefined; - } - - if (indentStr === undefined) { - this._ensureindentStr(); - indentStr = this.indentStr || '\t'; - } - - if (indentStr === '') return this; // noop - - options = options || {}; - - // Process exclusion ranges - const isExcluded = {}; - - if (options.exclude) { - const exclusions = - typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; - exclusions.forEach((exclusion) => { - for (let i = exclusion[0]; i < exclusion[1]; i += 1) { - isExcluded[i] = true; - } - }); - } - - let shouldIndentNextCharacter = options.indentStart !== false; - const replacer = (match) => { - if (shouldIndentNextCharacter) return `${indentStr}${match}`; - shouldIndentNextCharacter = true; - return match; - }; - - this.intro = this.intro.replace(pattern, replacer); - - let charIndex = 0; - let chunk = this.firstChunk; - - while (chunk) { - const end = chunk.end; - - if (chunk.edited) { - if (!isExcluded[charIndex]) { - chunk.content = chunk.content.replace(pattern, replacer); - - if (chunk.content.length) { - shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; - } - } - } else { - charIndex = chunk.start; - - while (charIndex < end) { - if (!isExcluded[charIndex]) { - const char = this.original[charIndex]; - - if (char === '\n') { - shouldIndentNextCharacter = true; - } else if (char !== '\r' && shouldIndentNextCharacter) { - shouldIndentNextCharacter = false; - - if (charIndex === chunk.start) { - chunk.prependRight(indentStr); - } else { - this._splitChunk(chunk, charIndex); - chunk = chunk.next; - chunk.prependRight(indentStr); - } - } - } - - charIndex += 1; - } - } - - charIndex = chunk.end; - chunk = chunk.next; - } - - this.outro = this.outro.replace(pattern, replacer); - - return this; - } - - insert() { - throw new Error( - 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', - ); - } - - insertLeft(index, content) { - if (!warned.insertLeft) { - console.warn( - 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', - ); - warned.insertLeft = true; - } - - return this.appendLeft(index, content); - } - - insertRight(index, content) { - if (!warned.insertRight) { - console.warn( - 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', - ); - warned.insertRight = true; - } - - return this.prependRight(index, content); - } - - move(start, end, index) { - start = start + this.offset; - end = end + this.offset; - index = index + this.offset; - - if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); - - this._split(start); - this._split(end); - this._split(index); - - const first = this.byStart[start]; - const last = this.byEnd[end]; - - const oldLeft = first.previous; - const oldRight = last.next; - - const newRight = this.byStart[index]; - if (!newRight && last === this.lastChunk) return this; - const newLeft = newRight ? newRight.previous : this.lastChunk; - - if (oldLeft) oldLeft.next = oldRight; - if (oldRight) oldRight.previous = oldLeft; - - if (newLeft) newLeft.next = first; - if (newRight) newRight.previous = last; - - if (!first.previous) this.firstChunk = last.next; - if (!last.next) { - this.lastChunk = first.previous; - this.lastChunk.next = null; - } - - first.previous = newLeft; - last.next = newRight || null; - - if (!newLeft) this.firstChunk = first; - if (!newRight) this.lastChunk = last; - return this; - } - - overwrite(start, end, content, options) { - options = options || {}; - return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); - } - - update(start, end, content, options) { - start = start + this.offset; - end = end + this.offset; - - if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); - - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - if (end > this.original.length) throw new Error('end is out of bounds'); - if (start === end) - throw new Error( - 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', - ); - - this._split(start); - this._split(end); - - if (options === true) { - if (!warned.storeName) { - console.warn( - 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', - ); - warned.storeName = true; - } - - options = { storeName: true }; - } - const storeName = options !== undefined ? options.storeName : false; - const overwrite = options !== undefined ? options.overwrite : false; - - if (storeName) { - const original = this.original.slice(start, end); - Object.defineProperty(this.storedNames, original, { - writable: true, - value: true, - enumerable: true, - }); - } - - const first = this.byStart[start]; - const last = this.byEnd[end]; - - if (first) { - let chunk = first; - while (chunk !== last) { - if (chunk.next !== this.byStart[chunk.end]) { - throw new Error('Cannot overwrite across a split point'); - } - chunk = chunk.next; - chunk.edit('', false); - } - - first.edit(content, storeName, !overwrite); - } else { - // must be inserting at the end - const newChunk = new Chunk(start, end, '').edit(content, storeName); - - // TODO last chunk in the array may not be the last chunk, if it's moved... - last.next = newChunk; - newChunk.previous = last; - } - return this; - } - - prepend(content) { - if (typeof content !== 'string') throw new TypeError('outro content must be a string'); - - this.intro = content + this.intro; - return this; - } - - prependLeft(index, content) { - index = index + this.offset; - - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byEnd[index]; - - if (chunk) { - chunk.prependLeft(content); - } else { - this.intro = content + this.intro; - } - return this; - } - - prependRight(index, content) { - index = index + this.offset; - - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byStart[index]; - - if (chunk) { - chunk.prependRight(content); - } else { - this.outro = content + this.outro; - } - return this; - } - - remove(start, end) { - start = start + this.offset; - end = end + this.offset; - - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - if (start === end) return this; - - if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); - if (start > end) throw new Error('end must be greater than start'); - - this._split(start); - this._split(end); - - let chunk = this.byStart[start]; - - while (chunk) { - chunk.intro = ''; - chunk.outro = ''; - chunk.edit(''); - - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; - } - - reset(start, end) { - start = start + this.offset; - end = end + this.offset; - - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - if (start === end) return this; - - if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); - if (start > end) throw new Error('end must be greater than start'); - - this._split(start); - this._split(end); - - let chunk = this.byStart[start]; - - while (chunk) { - chunk.reset(); - - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; - } - - lastChar() { - if (this.outro.length) return this.outro[this.outro.length - 1]; - let chunk = this.lastChunk; - do { - if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; - if (chunk.content.length) return chunk.content[chunk.content.length - 1]; - if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; - } while ((chunk = chunk.previous)); - if (this.intro.length) return this.intro[this.intro.length - 1]; - return ''; - } - - lastLine() { - let lineIndex = this.outro.lastIndexOf(n); - if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); - let lineStr = this.outro; - let chunk = this.lastChunk; - do { - if (chunk.outro.length > 0) { - lineIndex = chunk.outro.lastIndexOf(n); - if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; - lineStr = chunk.outro + lineStr; - } - - if (chunk.content.length > 0) { - lineIndex = chunk.content.lastIndexOf(n); - if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; - lineStr = chunk.content + lineStr; - } - - if (chunk.intro.length > 0) { - lineIndex = chunk.intro.lastIndexOf(n); - if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; - lineStr = chunk.intro + lineStr; - } - } while ((chunk = chunk.previous)); - lineIndex = this.intro.lastIndexOf(n); - if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; - return this.intro + lineStr; - } - - slice(start = 0, end = this.original.length - this.offset) { - start = start + this.offset; - end = end + this.offset; - - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - let result = ''; - - // find start chunk - let chunk = this.firstChunk; - while (chunk && (chunk.start > start || chunk.end <= start)) { - // found end chunk before start - if (chunk.start < end && chunk.end >= end) { - return result; - } - - chunk = chunk.next; - } - - if (chunk && chunk.edited && chunk.start !== start) - throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); - - const startChunk = chunk; - while (chunk) { - if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { - result += chunk.intro; - } - - const containsEnd = chunk.start < end && chunk.end >= end; - if (containsEnd && chunk.edited && chunk.end !== end) - throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); - - const sliceStart = startChunk === chunk ? start - chunk.start : 0; - const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; - - result += chunk.content.slice(sliceStart, sliceEnd); - - if (chunk.outro && (!containsEnd || chunk.end === end)) { - result += chunk.outro; - } - - if (containsEnd) { - break; - } - - chunk = chunk.next; - } - - return result; - } - - // TODO deprecate this? not really very useful - snip(start, end) { - const clone = this.clone(); - clone.remove(0, start); - clone.remove(end, clone.original.length); - - return clone; - } - - _split(index) { - if (this.byStart[index] || this.byEnd[index]) return; - - let chunk = this.lastSearchedChunk; - const searchForward = index > chunk.end; - - while (chunk) { - if (chunk.contains(index)) return this._splitChunk(chunk, index); - - chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; - } - } - - _splitChunk(chunk, index) { - if (chunk.edited && chunk.content.length) { - // zero-length edited chunks are a special case (overlapping replacements) - const loc = getLocator(this.original)(index); - throw new Error( - `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, - ); - } - - const newChunk = chunk.split(index); - - this.byEnd[index] = chunk; - this.byStart[index] = newChunk; - this.byEnd[newChunk.end] = newChunk; - - if (chunk === this.lastChunk) this.lastChunk = newChunk; - - this.lastSearchedChunk = chunk; - return true; - } - - toString() { - let str = this.intro; - - let chunk = this.firstChunk; - while (chunk) { - str += chunk.toString(); - chunk = chunk.next; - } - - return str + this.outro; - } - - isEmpty() { - let chunk = this.firstChunk; - do { - if ( - (chunk.intro.length && chunk.intro.trim()) || - (chunk.content.length && chunk.content.trim()) || - (chunk.outro.length && chunk.outro.trim()) - ) - return false; - } while ((chunk = chunk.next)); - return true; - } - - length() { - let chunk = this.firstChunk; - let length = 0; - do { - length += chunk.intro.length + chunk.content.length + chunk.outro.length; - } while ((chunk = chunk.next)); - return length; - } - - trimLines() { - return this.trim('[\\r\\n]'); - } - - trim(charType) { - return this.trimStart(charType).trimEnd(charType); - } - - trimEndAborted(charType) { - const rx = new RegExp((charType || '\\s') + '+$'); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) return true; - - let chunk = this.lastChunk; - - do { - const end = chunk.end; - const aborted = chunk.trimEnd(rx); - - // if chunk was trimmed, we have a new lastChunk - if (chunk.end !== end) { - if (this.lastChunk === chunk) { - this.lastChunk = chunk.next; - } - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) return true; - chunk = chunk.previous; - } while (chunk); - - return false; - } - - trimEnd(charType) { - this.trimEndAborted(charType); - return this; - } - trimStartAborted(charType) { - const rx = new RegExp('^' + (charType || '\\s') + '+'); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) return true; - - let chunk = this.firstChunk; - - do { - const end = chunk.end; - const aborted = chunk.trimStart(rx); - - if (chunk.end !== end) { - // special case... - if (chunk === this.lastChunk) this.lastChunk = chunk.next; - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) return true; - chunk = chunk.next; - } while (chunk); - - return false; - } - - trimStart(charType) { - this.trimStartAborted(charType); - return this; - } - - hasChanged() { - return this.original !== this.toString(); - } - - _replaceRegexp(searchValue, replacement) { - function getReplacement(match, str) { - if (typeof replacement === 'string') { - return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter - if (i === '$') return '$'; - if (i === '&') return match[0]; - const num = +i; - if (num < match.length) return match[+i]; - return `$${i}`; - }); - } else { - return replacement(...match, match.index, str, match.groups); - } - } - function matchAll(re, str) { - let match; - const matches = []; - while ((match = re.exec(str))) { - matches.push(match); - } - return matches; - } - if (searchValue.global) { - const matches = matchAll(searchValue, this.original); - matches.forEach((match) => { - if (match.index != null) { - const replacement = getReplacement(match, this.original); - if (replacement !== match[0]) { - this.overwrite(match.index, match.index + match[0].length, replacement); - } - } - }); - } else { - const match = this.original.match(searchValue); - if (match && match.index != null) { - const replacement = getReplacement(match, this.original); - if (replacement !== match[0]) { - this.overwrite(match.index, match.index + match[0].length, replacement); - } - } - } - return this; - } - - _replaceString(string, replacement) { - const { original } = this; - const index = original.indexOf(string); - - if (index !== -1) { - this.overwrite(index, index + string.length, replacement); - } - - return this; - } - - replace(searchValue, replacement) { - if (typeof searchValue === 'string') { - return this._replaceString(searchValue, replacement); - } - - return this._replaceRegexp(searchValue, replacement); - } - - _replaceAllString(string, replacement) { - const { original } = this; - const stringLength = string.length; - for ( - let index = original.indexOf(string); - index !== -1; - index = original.indexOf(string, index + stringLength) - ) { - const previous = original.slice(index, index + stringLength); - if (previous !== replacement) this.overwrite(index, index + stringLength, replacement); - } - - return this; - } - - replaceAll(searchValue, replacement) { - if (typeof searchValue === 'string') { - return this._replaceAllString(searchValue, replacement); - } - - if (!searchValue.global) { - throw new TypeError( - 'MagicString.prototype.replaceAll called with a non-global RegExp argument', - ); - } - - return this._replaceRegexp(searchValue, replacement); - } -} - -const hasOwnProp = Object.prototype.hasOwnProperty; - -class Bundle { - constructor(options = {}) { - this.intro = options.intro || ''; - this.separator = options.separator !== undefined ? options.separator : '\n'; - this.sources = []; - this.uniqueSources = []; - this.uniqueSourceIndexByFilename = {}; - } - - addSource(source) { - if (source instanceof MagicString) { - return this.addSource({ - content: source, - filename: source.filename, - separator: this.separator, - }); - } - - if (!isObject(source) || !source.content) { - throw new Error( - 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`', - ); - } - - ['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => { - if (!hasOwnProp.call(source, option)) source[option] = source.content[option]; - }); - - if (source.separator === undefined) { - // TODO there's a bunch of this sort of thing, needs cleaning up - source.separator = this.separator; - } - - if (source.filename) { - if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) { - this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length; - this.uniqueSources.push({ filename: source.filename, content: source.content.original }); - } else { - const uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]]; - if (source.content.original !== uniqueSource.content) { - throw new Error(`Illegal source: same filename (${source.filename}), different contents`); - } - } - } - - this.sources.push(source); - return this; - } - - append(str, options) { - this.addSource({ - content: new MagicString(str), - separator: (options && options.separator) || '', - }); - - return this; - } - - clone() { - const bundle = new Bundle({ - intro: this.intro, - separator: this.separator, - }); - - this.sources.forEach((source) => { - bundle.addSource({ - filename: source.filename, - content: source.content.clone(), - separator: source.separator, - }); - }); - - return bundle; - } - - generateDecodedMap(options = {}) { - const names = []; - let x_google_ignoreList = undefined; - this.sources.forEach((source) => { - Object.keys(source.content.storedNames).forEach((name) => { - if (!~names.indexOf(name)) names.push(name); - }); - }); - - const mappings = new Mappings(options.hires); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.sources.forEach((source, i) => { - if (i > 0) { - mappings.advance(this.separator); - } - - const sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1; - const magicString = source.content; - const locate = getLocator(magicString.original); - - if (magicString.intro) { - mappings.advance(magicString.intro); - } - - magicString.firstChunk.eachNext((chunk) => { - const loc = locate(chunk.start); - - if (chunk.intro.length) mappings.advance(chunk.intro); - - if (source.filename) { - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1, - ); - } else { - mappings.addUneditedChunk( - sourceIndex, - chunk, - magicString.original, - loc, - magicString.sourcemapLocations, - ); - } - } else { - mappings.advance(chunk.content); - } - - if (chunk.outro.length) mappings.advance(chunk.outro); - }); - - if (magicString.outro) { - mappings.advance(magicString.outro); - } - - if (source.ignoreList && sourceIndex !== -1) { - if (x_google_ignoreList === undefined) { - x_google_ignoreList = []; - } - x_google_ignoreList.push(sourceIndex); - } - }); - - return { - file: options.file ? options.file.split(/[/\\]/).pop() : undefined, - sources: this.uniqueSources.map((source) => { - return options.file ? getRelativePath(options.file, source.filename) : source.filename; - }), - sourcesContent: this.uniqueSources.map((source) => { - return options.includeContent ? source.content : null; - }), - names, - mappings: mappings.raw, - x_google_ignoreList, - }; - } - - generateMap(options) { - return new SourceMap(this.generateDecodedMap(options)); - } - - getIndentString() { - const indentStringCounts = {}; - - this.sources.forEach((source) => { - const indentStr = source.content._getRawIndentString(); - - if (indentStr === null) return; - - if (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0; - indentStringCounts[indentStr] += 1; - }); - - return ( - Object.keys(indentStringCounts).sort((a, b) => { - return indentStringCounts[a] - indentStringCounts[b]; - })[0] || '\t' - ); - } - - indent(indentStr) { - if (!arguments.length) { - indentStr = this.getIndentString(); - } - - if (indentStr === '') return this; // noop - - let trailingNewline = !this.intro || this.intro.slice(-1) === '\n'; - - this.sources.forEach((source, i) => { - const separator = source.separator !== undefined ? source.separator : this.separator; - const indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator)); - - source.content.indent(indentStr, { - exclude: source.indentExclusionRanges, - indentStart, //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator ) - }); - - trailingNewline = source.content.lastChar() === '\n'; - }); - - if (this.intro) { - this.intro = - indentStr + - this.intro.replace(/^[^\n]/gm, (match, index) => { - return index > 0 ? indentStr + match : match; - }); - } - - return this; - } - - prepend(str) { - this.intro = str + this.intro; - return this; - } - - toString() { - const body = this.sources - .map((source, i) => { - const separator = source.separator !== undefined ? source.separator : this.separator; - const str = (i > 0 ? separator : '') + source.content.toString(); - - return str; - }) - .join(''); - - return this.intro + body; - } - - isEmpty() { - if (this.intro.length && this.intro.trim()) return false; - if (this.sources.some((source) => !source.content.isEmpty())) return false; - return true; - } - - length() { - return this.sources.reduce( - (length, source) => length + source.content.length(), - this.intro.length, - ); - } - - trimLines() { - return this.trim('[\\r\\n]'); - } - - trim(charType) { - return this.trimStart(charType).trimEnd(charType); - } - - trimStart(charType) { - const rx = new RegExp('^' + (charType || '\\s') + '+'); - this.intro = this.intro.replace(rx, ''); - - if (!this.intro) { - let source; - let i = 0; - - do { - source = this.sources[i++]; - if (!source) { - break; - } - } while (!source.content.trimStartAborted(charType)); - } - - return this; - } - - trimEnd(charType) { - const rx = new RegExp((charType || '\\s') + '+$'); - - let source; - let i = this.sources.length - 1; - - do { - source = this.sources[i--]; - if (!source) { - this.intro = this.intro.replace(rx, ''); - break; - } - } while (!source.content.trimEndAborted(charType)); - - return this; - } -} - -export { Bundle, SourceMap, MagicString as default }; -//# sourceMappingURL=magic-string.es.mjs.map diff --git a/node_modules/magic-string/dist/magic-string.es.mjs.map b/node_modules/magic-string/dist/magic-string.es.mjs.map deleted file mode 100644 index 0d69915..0000000 --- a/node_modules/magic-string/dist/magic-string.es.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"magic-string.es.mjs","sources":["../src/BitSet.js","../src/Chunk.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\tif (DEBUG) {\n\t\t\t// we make these non-enumerable, for sanity while debugging\n\t\t\tObject.defineProperties(this, {\n\t\t\t\tprevious: { writable: true, value: null },\n\t\t\t\tnext: { writable: true, value: null },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\treset() {\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\t\tif (this.edited) {\n\t\t\tthis.content = this.original;\n\t\t\tthis.storeName = false;\n\t\t\tthis.edited = false;\n\t\t}\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + ''\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nfunction getBtoa() {\n\tif (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') {\n\t\treturn (str) => globalThis.btoa(unescape(encodeURIComponent(str)));\n\t} else if (typeof Buffer === 'function') {\n\t\treturn (str) => Buffer.from(str, 'utf-8').toString('base64');\n\t} else {\n\t\treturn () => {\n\t\t\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n\t\t};\n\t}\n}\n\nconst btoa = /*#__PURE__*/ getBtoa();\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t\tif (typeof properties.x_google_ignoreList !== 'undefined') {\n\t\t\tthis.x_google_ignoreList = properties.x_google_ignoreList;\n\t\t}\n\t\tif (typeof properties.debugId !== 'undefined') {\n\t\t\tthis.debugId = properties.debugId;\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","const wordRegex = /\\w/;\n\nexport default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst contentLengthMinusOne = content.length - 1;\n\t\t\tlet contentLineEnd = content.indexOf('\\n', 0);\n\t\t\tlet previousContentLineEnd = -1;\n\t\t\t// Loop through each line in the content and add a segment, but stop if the last line is empty,\n\t\t\t// else code afterwards would fill one line too many\n\t\t\twhile (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\t\tif (nameIndex >= 0) {\n\t\t\t\t\tsegment.push(nameIndex);\n\t\t\t\t}\n\t\t\t\tthis.rawSegments.push(segment);\n\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\n\t\t\t\tpreviousContentLineEnd = contentLineEnd;\n\t\t\t\tcontentLineEnd = content.indexOf('\\n', contentLineEnd + 1);\n\t\t\t}\n\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\n\t\t\tthis.advance(content.slice(previousContentLineEnd + 1));\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t\tthis.advance(content);\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\t\t// when iterating each char, check if it's in a word boundary\n\t\tlet charInHiresBoundary = false;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t\tcharInHiresBoundary = false;\n\t\t\t} else {\n\t\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\n\t\t\t\t\tif (this.hires === 'boundary') {\n\t\t\t\t\t\t// in hires \"boundary\", group segments per word boundary than per char\n\t\t\t\t\t\tif (wordRegex.test(original[originalCharIndex])) {\n\t\t\t\t\t\t\t// for first char in the boundary found, start the boundary by pushing a segment\n\t\t\t\t\t\t\tif (!charInHiresBoundary) {\n\t\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\t\tcharInHiresBoundary = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// for non-word char, end the boundary by pushing a segment\n\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\tcharInHiresBoundary = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: undefined },\n\t\t\tignoreList: { writable: true, value: options.ignoreList },\n\t\t\toffset: { writable: true, value: options.offset || 0 },\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: [\n\t\t\t\toptions.source ? getRelativePath(options.file || '', options.source) : options.file || '',\n\t\t\t],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : undefined,\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\t_ensureindentStr() {\n\t\tif (this.indentStr === undefined) {\n\t\t\tthis.indentStr = guessIndent(this.original);\n\t\t}\n\t}\n\n\t_getRawIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr;\n\t}\n\n\tgetIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tif (indentStr === undefined) {\n\t\t\tthis._ensureindentStr();\n\t\t\tindentStr = this.indentStr || '\\t';\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',\n\t\t\t);\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',\n\t\t\t);\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\t\tindex = index + this.offset;\n\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\toptions = options || {};\n\t\treturn this.update(start, end, content, { ...options, overwrite: !options.contentOnly });\n\t}\n\n\tupdate(start, end, content, options) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',\n\t\t\t);\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',\n\t\t\t\t);\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst overwrite = options !== undefined ? options.overwrite : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, {\n\t\t\t\twritable: true,\n\t\t\t\tvalue: true,\n\t\t\t\tenumerable: true,\n\t\t\t});\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, !overwrite);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\treset(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('reset');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.reset();\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('reset');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length - this.offset) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`,\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n\n\thasChanged() {\n\t\treturn this.original !== this.toString();\n\t}\n\n\t_replaceRegexp(searchValue, replacement) {\n\t\tfunction getReplacement(match, str) {\n\t\t\tif (typeof replacement === 'string') {\n\t\t\t\treturn replacement.replace(/\\$(\\$|&|\\d+)/g, (_, i) => {\n\t\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter\n\t\t\t\t\tif (i === '$') return '$';\n\t\t\t\t\tif (i === '&') return match[0];\n\t\t\t\t\tconst num = +i;\n\t\t\t\t\tif (num < match.length) return match[+i];\n\t\t\t\t\treturn `$${i}`;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn replacement(...match, match.index, str, match.groups);\n\t\t\t}\n\t\t}\n\t\tfunction matchAll(re, str) {\n\t\t\tlet match;\n\t\t\tconst matches = [];\n\t\t\twhile ((match = re.exec(str))) {\n\t\t\t\tmatches.push(match);\n\t\t\t}\n\t\t\treturn matches;\n\t\t}\n\t\tif (searchValue.global) {\n\t\t\tconst matches = matchAll(searchValue, this.original);\n\t\t\tmatches.forEach((match) => {\n\t\t\t\tif (match.index != null) {\n\t\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tconst match = this.original.match(searchValue);\n\t\t\tif (match && match.index != null) {\n\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t_replaceString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst index = original.indexOf(string);\n\n\t\tif (index !== -1) {\n\t\t\tthis.overwrite(index, index + string.length, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplace(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceString(searchValue, replacement);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n\n\t_replaceAllString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst stringLength = string.length;\n\t\tfor (\n\t\t\tlet index = original.indexOf(string);\n\t\t\tindex !== -1;\n\t\t\tindex = original.indexOf(string, index + stringLength)\n\t\t) {\n\t\t\tconst previous = original.slice(index, index + stringLength);\n\t\t\tif (previous !== replacement) this.overwrite(index, index + stringLength, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplaceAll(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceAllString(searchValue, replacement);\n\t\t}\n\n\t\tif (!searchValue.global) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'MagicString.prototype.replaceAll called with a non-global RegExp argument',\n\t\t\t);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tlet x_google_ignoreList = undefined;\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\n\t\t\tif (source.ignoreList && sourceIndex !== -1) {\n\t\t\t\tif (x_google_ignoreList === undefined) {\n\t\t\t\t\tx_google_ignoreList = [];\n\t\t\t\t}\n\t\t\t\tx_google_ignoreList.push(sourceIndex);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content._getRawIndentString();\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length,\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n"],"names":[],"mappings":";;AAAe,MAAM,MAAM,CAAC;AAC5B,CAAC,WAAW,CAAC,GAAG,EAAE;AAClB,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,YAAY,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;AAC5D,EAAE;AACF;AACA,CAAC,GAAG,CAAC,CAAC,EAAE;AACR,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;AACrC,EAAE;AACF;AACA,CAAC,GAAG,CAAC,CAAC,EAAE;AACR,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AACjD,EAAE;AACF;;ACZe,MAAM,KAAK,CAAC;AAC3B,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;AAClC,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;AACpB,EAAE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;AAChB,EAAE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;;AAEzB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AACjB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;;AAEjB,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;AACxB,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;AACxB,EAAE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;;AAErB,EAMS;AACT,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;AACvB,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;AACnB,GAAE;AACF,EAAC;;AAED,CAAC,UAAU,CAAC,OAAO,EAAE;AACrB,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACvB,EAAC;;AAED,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;AACnC,EAAC;;AAED,CAAC,KAAK,GAAG;AACT,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;;AAE9D,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC1B,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC1B,EAAE,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;AAC9B,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAA;AAClC,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE5B,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,QAAQ,CAAC,KAAK,EAAE;AACjB,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAA;AAC/C,EAAC;;AAED,CAAC,QAAQ,CAAC,EAAE,EAAE;AACd,EAAE,IAAI,KAAK,GAAG,IAAI,CAAA;AAClB,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;AACZ,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;AACF,EAAC;;AAED,CAAC,YAAY,CAAC,EAAE,EAAE;AAClB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAA;AAClB,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;AACZ,GAAG,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAA;AACzB,GAAE;AACF,EAAC;;AAED,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE;AACvC,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;AACxB,EAAE,IAAI,CAAC,WAAW,EAAE;AACpB,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AAClB,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AAClB,GAAE;AACF,EAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;;AAE5B,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;;AAEpB,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACnC,EAAC;;AAED,CAAC,YAAY,CAAC,OAAO,EAAE;AACvB,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACnC,EAAC;;AAED,CAAC,KAAK,GAAG;AACT,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AACjB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AACjB,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;AACnB,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAA;AAC/B,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;AACzB,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;AACtB,GAAE;AACF,EAAC;;AAED,CAAC,KAAK,CAAC,KAAK,EAAE;AACd,EAAE,MAAM,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;;AAEvC,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAA;AAC3D,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;;AAEvD,EAAE,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAA;;AAEhC,EAAE,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,CAAA;AAC5D,EAAE,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC7B,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;;AAEjB,EAAE,IAAI,CAAC,GAAG,GAAG,KAAK,CAAA;;AAElB,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;AAC3B,GAAG,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;AACpB,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,OAAO,GAAG,cAAc,CAAA;AAChC,GAAE;;AAEF,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;AAC3B,EAAE,IAAI,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;AACtD,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;AAC1B,EAAE,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;;AAEtB,EAAE,OAAO,QAAQ,CAAA;AACjB,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AAC/C,EAAC;;AAED,CAAC,OAAO,CAAC,EAAE,EAAE;AACb,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;;AAE9C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;AACtB,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;AACjC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;AACrE,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;AACrB;AACA,KAAK,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;AAC7C,KAAI;AACJ,IAAG;AACH,GAAG,OAAO,IAAI,CAAA;AACd,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;;AAEjC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AAC1C,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;AACrC,GAAE;AACF,EAAC;;AAED,CAAC,SAAS,CAAC,EAAE,EAAE;AACf,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;;AAE9C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;AACtB,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;AACjC,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC1D,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;AACrB;AACA,KAAK,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;AACjD,KAAI;AACJ,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;AAClC,IAAG;AACH,GAAG,OAAO,IAAI,CAAA;AACd,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;;AAEjC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AAC1C,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;AACrC,GAAE;AACF,EAAC;AACD;;ACrLA,SAAS,OAAO,GAAG;AACnB,CAAC,IAAI,OAAO,UAAU,KAAK,WAAW,IAAI,OAAO,UAAU,CAAC,IAAI,KAAK,UAAU,EAAE;AACjF,EAAE,OAAO,CAAC,GAAG,KAAK,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACrE,EAAE,MAAM,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;AAC1C,EAAE,OAAO,CAAC,GAAG,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC/D,EAAE,MAAM;AACR,EAAE,OAAO,MAAM;AACf,GAAG,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;AAC9F,GAAG,CAAC;AACJ,EAAE;AACF,CAAC;AACD;AACA,MAAM,IAAI,iBAAiB,OAAO,EAAE,CAAC;AACrC;AACe,MAAM,SAAS,CAAC;AAC/B,CAAC,WAAW,CAAC,UAAU,EAAE;AACzB,EAAE,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;AACnB,EAAE,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;AAC9B,EAAE,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AACpC,EAAE,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;AAClD,EAAE,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;AAChC,EAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9C,EAAE,IAAI,OAAO,UAAU,CAAC,mBAAmB,KAAK,WAAW,EAAE;AAC7D,GAAG,IAAI,CAAC,mBAAmB,GAAG,UAAU,CAAC,mBAAmB,CAAC;AAC7D,GAAG;AACH,EAAE,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,WAAW,EAAE;AACjD,GAAG,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AACrC,GAAG;AACH,EAAE;AACF;AACA,CAAC,QAAQ,GAAG;AACZ,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC9B,EAAE;AACF;AACA,CAAC,KAAK,GAAG;AACT,EAAE,OAAO,6CAA6C,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC/E,EAAE;AACF;;ACvCe,SAAS,WAAW,CAAC,IAAI,EAAE;AAC1C,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC;AACA,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5D;AACA,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;AACjD,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA;AACA;AACA;AACA,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE;AACrC,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA;AACA,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK;AAClD,EAAE,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAClD,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AACvC,EAAE,EAAE,QAAQ,CAAC,CAAC;AACd;AACA,CAAC,OAAO,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrC;;ACxBe,SAAS,eAAe,CAAC,IAAI,EAAE,EAAE,EAAE;AAClD,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACnC;AACA,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;AACjB;AACA,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE;AACrC,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC;AACpB,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;AAClB,EAAE;AACF;AACA,CAAC,IAAI,SAAS,CAAC,MAAM,EAAE;AACvB,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;AAC3B,EAAE,OAAO,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAClC,EAAE;AACF;AACA,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5C;;ACjBA,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C;AACe,SAAS,QAAQ,CAAC,KAAK,EAAE;AACxC,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,iBAAiB,CAAC;AACnD;;ACJe,SAAS,UAAU,CAAC,MAAM,EAAE;AAC3C,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC1C,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AACxB;AACA,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACzD,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB,EAAE,GAAG,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AACrC,EAAE;AACF;AACA,CAAC,OAAO,SAAS,MAAM,CAAC,KAAK,EAAE;AAC/B,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;AACZ,EAAE,IAAI,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC;AAC7B,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE;AAChB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC1B,GAAG,IAAI,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE;AAC/B,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,IAAI,MAAM;AACV,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,IAAI;AACJ,GAAG;AACH,EAAE,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;AACrB,EAAE,MAAM,MAAM,GAAG,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3C,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1B,EAAE,CAAC;AACH;;ACxBA,MAAM,SAAS,GAAG,IAAI,CAAC;AACvB;AACe,MAAM,QAAQ,CAAC;AAC9B,CAAC,WAAW,CAAC,KAAK,EAAE;AACpB,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACrB,EAAE,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;AAC7B,EAAE,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AAC/B,EAAE,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;AAChB,EAAE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC;AAC3D,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,EAAE;AACF;AACA,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE;AAC/C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;AACtB,GAAG,MAAM,qBAAqB,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AACpD,GAAG,IAAI,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AACjD,GAAG,IAAI,sBAAsB,GAAG,CAAC,CAAC,CAAC;AACnC;AACA;AACA,GAAG,OAAO,cAAc,IAAI,CAAC,IAAI,qBAAqB,GAAG,cAAc,EAAE;AACzE,IAAI,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AAClF,IAAI,IAAI,SAAS,IAAI,CAAC,EAAE;AACxB,KAAK,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC7B,KAAK;AACL,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACnC;AACA,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;AAChC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;AAC7D,IAAI,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AACjC;AACA,IAAI,sBAAsB,GAAG,cAAc,CAAC;AAC5C,IAAI,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,CAAC,CAAC,CAAC;AAC/D,IAAI;AACJ;AACA,GAAG,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AACjF,GAAG,IAAI,SAAS,IAAI,CAAC,EAAE;AACvB,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC5B,IAAI;AACJ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAClC;AACA,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC;AAC3D,GAAG,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;AAC3B,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACvC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACzB,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,EAAE;AACF;AACA,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,kBAAkB,EAAE;AACzE,EAAE,IAAI,iBAAiB,GAAG,KAAK,CAAC,KAAK,CAAC;AACtC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC;AACnB;AACA,EAAE,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAClC;AACA,EAAE,OAAO,iBAAiB,GAAG,KAAK,CAAC,GAAG,EAAE;AACxC,GAAG,IAAI,QAAQ,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE;AAC7C,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC;AAClB,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;AACnB,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;AAChC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;AAC7D,IAAI,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AACjC,IAAI,KAAK,GAAG,IAAI,CAAC;AACjB,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAChC,IAAI,MAAM;AACV,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK,IAAI,kBAAkB,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;AAC1E,KAAK,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AACnF;AACA,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,UAAU,EAAE;AACpC;AACA,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,EAAE;AACvD;AACA,OAAO,IAAI,CAAC,mBAAmB,EAAE;AACjC,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACvC,QAAQ,mBAAmB,GAAG,IAAI,CAAC;AACnC,QAAQ;AACR,OAAO,MAAM;AACb;AACA,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACtC,OAAO,mBAAmB,GAAG,KAAK,CAAC;AACnC,OAAO;AACP,MAAM,MAAM;AACZ,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACrC,MAAM;AACN,KAAK;AACL;AACA,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;AACpB,IAAI,IAAI,CAAC,mBAAmB,IAAI,CAAC,CAAC;AAClC,IAAI,KAAK,GAAG,KAAK,CAAC;AAClB,IAAI;AACJ;AACA,GAAG,iBAAiB,IAAI,CAAC,CAAC;AAC1B,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,EAAE;AACF;AACA,CAAC,OAAO,CAAC,GAAG,EAAE;AACd,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO;AACnB;AACA,EAAE,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC;AACA,EAAE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AACxB,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AAC9C,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;AAC7B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;AAC7D,IAAI;AACJ,GAAG,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AAChC,GAAG;AACH;AACA,EAAE,IAAI,CAAC,mBAAmB,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;AAC7D,EAAE;AACF;;ACtGA,MAAM,CAAC,GAAG,IAAI,CAAA;;AAEd,MAAM,MAAM,GAAG;AACf,CAAC,UAAU,EAAE,KAAK;AAClB,CAAC,WAAW,EAAE,KAAK;AACnB,CAAC,SAAS,EAAE,KAAK;AACjB,CAAC,CAAA;;AAEc,MAAM,WAAW,CAAC;AACjC,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE;AACnC,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;;AAEnD,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE;AAChC,GAAG,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE;AAC9C,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACvC,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACvC,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AAC/C,GAAG,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AAC9C,GAAG,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AACtD,GAAG,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACzC,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACvC,GAAG,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE;AACxD,GAAG,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,qBAAqB,EAAE;AAClF,GAAG,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,MAAM,EAAE,EAAE;AAC9D,GAAG,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AAC7C,GAAG,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;AAClD,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,EAAE;AAC5D,GAAG,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE;AACzD,GAAG,CAAC,CAAA;;AAMJ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;AACzB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAA;AACnC,EAAC;;AAED,CAAC,oBAAoB,CAAC,IAAI,EAAE;AAC5B,EAAE,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AACnC,EAAC;;AAED,CAAC,MAAM,CAAC,OAAO,EAAE;AACjB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAA;;AAExF,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACvB,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE;AAC5B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;AAC5B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACxB,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEnC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;AAC7B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACxB,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,KAAK,GAAG;AACT,EAAE,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;;AAEjG,EAAE,IAAI,aAAa,GAAG,IAAI,CAAC,UAAU,CAAA;AACrC,EAAE,IAAI,WAAW,IAAI,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,iBAAiB,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC,CAAA;;AAE1F,EAAE,OAAO,aAAa,EAAE;AACxB,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,WAAW,CAAA;AAClD,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAA;;AAE9C,GAAG,MAAM,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAA;AAC/C,GAAG,MAAM,eAAe,GAAG,iBAAiB,IAAI,iBAAiB,CAAC,KAAK,EAAE,CAAA;;AAEzE,GAAG,IAAI,eAAe,EAAE;AACxB,IAAI,WAAW,CAAC,IAAI,GAAG,eAAe,CAAA;AACtC,IAAI,eAAe,CAAC,QAAQ,GAAG,WAAW,CAAA;;AAE1C,IAAI,WAAW,GAAG,eAAe,CAAA;AACjC,IAAG;;AAEH,GAAG,aAAa,GAAG,iBAAiB,CAAA;AACpC,GAAE;;AAEF,EAAE,MAAM,CAAC,SAAS,GAAG,WAAW,CAAA;;AAEhC,EAAE,IAAI,IAAI,CAAC,qBAAqB,EAAE;AAClC,GAAG,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAA;AACpE,GAAE;;AAEF,EAAE,MAAM,CAAC,kBAAkB,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;;AAEjE,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC3B,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;;AAE3B,EAAE,OAAO,MAAM,CAAA;AACf,EAAC;;AAED,CAAC,kBAAkB,CAAC,OAAO,EAAE;AAC7B,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;;AAEzB,EAAE,MAAM,WAAW,GAAG,CAAC,CAAA;AACvB,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;AAC7C,EAAE,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAE9C,EAAE,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;;AAE1C,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AAClB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/B,GAAE;;AAEF,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,KAAK;AACtC,GAAG,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAElC,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAExD,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;AACrB,IAAI,QAAQ,CAAC,OAAO;AACpB,KAAK,WAAW;AAChB,KAAK,KAAK,CAAC,OAAO;AAClB,KAAK,GAAG;AACR,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACzD,KAAK,CAAA;AACL,IAAI,MAAM;AACV,IAAI,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAA;AAC9F,IAAG;;AAEH,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AACxD,GAAG,CAAC,CAAA;;AAEJ,EAAE,OAAO;AACT,GAAG,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,SAAS;AACrE,GAAG,OAAO,EAAE;AACZ,IAAI,OAAO,CAAC,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE;AAC7F,IAAI;AACJ,GAAG,cAAc,EAAE,OAAO,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,SAAS;AACvE,GAAG,KAAK;AACR,GAAG,QAAQ,EAAE,QAAQ,CAAC,GAAG;AACzB,GAAG,mBAAmB,EAAE,IAAI,CAAC,UAAU,GAAG,CAAC,WAAW,CAAC,GAAG,SAAS;AACnE,GAAG,CAAA;AACH,EAAC;;AAED,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAA;AACxD,EAAC;;AAED,CAAC,gBAAgB,GAAG;AACpB,EAAE,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;AACpC,GAAG,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC9C,GAAE;AACF,EAAC;;AAED,CAAC,mBAAmB,GAAG;AACvB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAA;AACzB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAA;AACvB,EAAC;;AAED,CAAC,eAAe,GAAG;AACnB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAA;AACzB,EAAE,OAAO,IAAI,CAAC,SAAS,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,SAAS,CAAA;AACxD,EAAC;;AAED,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE;AAC5B,EAAE,MAAM,OAAO,GAAG,YAAY,CAAA;;AAE9B,EAAE,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE;AAC3B,GAAG,OAAO,GAAG,SAAS,CAAA;AACtB,GAAG,SAAS,GAAG,SAAS,CAAA;AACxB,GAAE;;AAEF,EAAE,IAAI,SAAS,KAAK,SAAS,EAAE;AAC/B,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAA;AAC1B,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAA;AACrC,GAAE;;AAEF,EAAE,IAAI,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC;;AAEpC,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;;AAEzB;AACA,EAAE,MAAM,UAAU,GAAG,EAAE,CAAA;;AAEvB,EAAE,IAAI,OAAO,CAAC,OAAO,EAAE;AACvB,GAAG,MAAM,UAAU;AACnB,IAAI,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;AAChF,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,KAAK;AACrC,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;AACzD,KAAK,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;AACzB,KAAI;AACJ,IAAI,CAAC,CAAA;AACL,GAAE;;AAEF,EAAE,IAAI,yBAAyB,GAAG,OAAO,CAAC,WAAW,KAAK,KAAK,CAAA;AAC/D,EAAE,MAAM,QAAQ,GAAG,CAAC,KAAK,KAAK;AAC9B,GAAG,IAAI,yBAAyB,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;AAC/D,GAAG,yBAAyB,GAAG,IAAI,CAAA;AACnC,GAAG,OAAO,KAAK,CAAA;AACf,GAAG,CAAA;;AAEH,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;AAEpD,EAAE,IAAI,SAAS,GAAG,CAAC,CAAA;AACnB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;;AAE7B,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;;AAExB,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;AACrB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;AAChC,KAAK,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;AAE7D,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;AAC/B,MAAM,yBAAyB,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAA;AAClF,MAAK;AACL,KAAI;AACJ,IAAI,MAAM;AACV,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAA;;AAE3B,IAAI,OAAO,SAAS,GAAG,GAAG,EAAE;AAC5B,KAAK,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;AACjC,MAAM,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;;AAE3C,MAAM,IAAI,IAAI,KAAK,IAAI,EAAE;AACzB,OAAO,yBAAyB,GAAG,IAAI,CAAA;AACvC,OAAO,MAAM,IAAI,IAAI,KAAK,IAAI,IAAI,yBAAyB,EAAE;AAC7D,OAAO,yBAAyB,GAAG,KAAK,CAAA;;AAExC,OAAO,IAAI,SAAS,KAAK,KAAK,CAAC,KAAK,EAAE;AACtC,QAAQ,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;AACrC,QAAQ,MAAM;AACd,QAAQ,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;AAC1C,QAAQ,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AAC1B,QAAQ,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;AACrC,QAAO;AACP,OAAM;AACN,MAAK;;AAEL,KAAK,SAAS,IAAI,CAAC,CAAA;AACnB,KAAI;AACJ,IAAG;;AAEH,GAAG,SAAS,GAAG,KAAK,CAAC,GAAG,CAAA;AACxB,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;AAEpD,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,MAAM,GAAG;AACV,EAAE,MAAM,IAAI,KAAK;AACjB,GAAG,iFAAiF;AACpF,GAAG,CAAA;AACH,EAAC;;AAED,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE;AAC5B,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;AAC1B,GAAG,OAAO,CAAC,IAAI;AACf,IAAI,oFAAoF;AACxF,IAAI,CAAA;AACJ,GAAG,MAAM,CAAC,UAAU,GAAG,IAAI,CAAA;AAC3B,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;AACxC,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7B,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE;AAC3B,GAAG,OAAO,CAAC,IAAI;AACf,IAAI,uFAAuF;AAC3F,IAAI,CAAA;AACJ,GAAG,MAAM,CAAC,WAAW,GAAG,IAAI,CAAA;AAC5B,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;AAC1C,EAAC;;AAED,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE;AACzB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;AACzB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;;AAI9F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAClB,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACnC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;;AAE9B,EAAE,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAA;AAChC,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAA;;AAE5B,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACtC,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,KAAK,IAAI,CAAC,SAAS,EAAE,OAAO,IAAI,CAAA;AACvD,EAAE,MAAM,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAA;;AAE/D,EAAE,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAA;AACtC,EAAE,IAAI,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAA;;AAE3C,EAAE,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,GAAG,KAAK,CAAA;AACnC,EAAE,IAAI,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;;AAExC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAA;AAClD,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;AAClB,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAA;AAClC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAA;AAC7B,GAAE;;AAEF,EAAE,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAA;AAC1B,EAAE,IAAI,CAAC,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAA;;AAE9B,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;AACvC,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;AAGtC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;AACzC,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;AACzB,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;AAC1F,EAAC;;AAED,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;AACtC,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;;AAE9F,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;AACzE,EAAE,IAAI,KAAK,KAAK,GAAG;AACnB,GAAG,MAAM,IAAI,KAAK;AAClB,IAAI,+EAA+E;AACnF,IAAI,CAAA;;AAIJ,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;AAElB,EAAE,IAAI,OAAO,KAAK,IAAI,EAAE;AACxB,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;AAC1B,IAAI,OAAO,CAAC,IAAI;AAChB,KAAK,+HAA+H;AACpI,KAAK,CAAA;AACL,IAAI,MAAM,CAAC,SAAS,GAAG,IAAI,CAAA;AAC3B,IAAG;;AAEH,GAAG,OAAO,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAA;AAChC,GAAE;AACF,EAAE,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAA;AACrE,EAAE,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAA;;AAErE,EAAE,IAAI,SAAS,EAAE;AACjB,GAAG,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;AACnD,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE;AACrD,IAAI,QAAQ,EAAE,IAAI;AAClB,IAAI,KAAK,EAAE,IAAI;AACf,IAAI,UAAU,EAAE,IAAI;AACpB,IAAI,CAAC,CAAA;AACL,GAAE;;AAEF,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACnC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;;AAE9B,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,IAAI,KAAK,GAAG,KAAK,CAAA;AACpB,GAAG,OAAO,KAAK,KAAK,IAAI,EAAE;AAC1B,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;AAChD,KAAK,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;AAC7D,KAAI;AACJ,IAAI,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACtB,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;AACzB,IAAG;;AAEH,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,CAAA;AAC7C,GAAG,MAAM;AACT;AACA,GAAG,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;;AAEtE;AACA,GAAG,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;AACvB,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;AAC3B,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,OAAO,CAAC,OAAO,EAAE;AAClB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAA;;AAExF,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACnC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;AAC7B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACpC,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE;AAC9B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEnC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;AAC9B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACpC,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE;AACpB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,KAAK,KAAK,GAAG,EAAE,OAAO,IAAI,CAAA;;AAEhC,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;AAC5F,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;;AAIpE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;AAElB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;AACnB,GAAG,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;AACnB,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;;AAEjB,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;AAC3D,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE;AACnB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,KAAK,KAAK,GAAG,EAAE,OAAO,IAAI,CAAA;;AAEhC,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;AAC5F,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;;AAIpE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;AAElB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,KAAK,CAAC,KAAK,EAAE,CAAA;;AAEhB,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;AAC3D,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACjE,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;AAC5B,EAAE,GAAG;AACL,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACrE,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAC3E,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACrE,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,QAAQ,GAAE;AACpC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACjE,EAAE,OAAO,EAAE,CAAA;AACX,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC3C,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,CAAA;AAC/D,EAAE,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AAC1B,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;AAC5B,EAAE,GAAG;AACL,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/B,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC1C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AAC5E,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,OAAO,CAAA;AACnC,IAAG;;AAEH,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;AACjC,IAAI,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC5C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AAC9E,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,GAAG,OAAO,CAAA;AACrC,IAAG;;AAEH,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/B,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC1C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AAC5E,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,OAAO,CAAA;AACnC,IAAG;AACH,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,QAAQ,GAAE;AACpC,EAAE,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AACvC,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AACzE,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;AAC7B,EAAC;;AAED,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;AAC5D,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,MAAM,GAAG,EAAE,CAAA;;AAEjB;AACA,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,OAAO,KAAK,KAAK,KAAK,CAAC,KAAK,GAAG,KAAK,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE;AAC/D;AACA,GAAG,IAAI,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE;AAC9C,IAAI,OAAO,MAAM,CAAA;AACjB,IAAG;;AAEH,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK;AACpD,GAAG,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAA;;AAEnF,EAAE,MAAM,UAAU,GAAG,KAAK,CAAA;AAC1B,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,UAAU,KAAK,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,EAAE;AACvE,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAA;AACzB,IAAG;;AAEH,GAAG,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAAG,CAAA;AAC5D,GAAG,IAAI,WAAW,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG;AACvD,IAAI,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAA;;AAEhF,GAAG,MAAM,UAAU,GAAG,UAAU,KAAK,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAA;AACpE,GAAG,MAAM,QAAQ,GAAG,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAA;;AAE/F,GAAG,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;;AAEtD,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE;AAC3D,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAA;AACzB,IAAG;;AAEH,GAAG,IAAI,WAAW,EAAE;AACpB,IAAI,MAAK;AACT,IAAG;;AAEH,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,OAAO,MAAM,CAAA;AACf,EAAC;;AAED;AACA,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE;AAClB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAA;AAC5B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;AACxB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;;AAE1C,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,MAAM,CAAC,KAAK,EAAE;AACf,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAM;;AAItD,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAA;AACpC,EAAE,MAAM,aAAa,GAAG,KAAK,GAAG,KAAK,CAAC,GAAG,CAAA;;AAEzC,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;;AAEnE,GAAG,KAAK,GAAG,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AAC5E,GAAE;AACF,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE;AAC3B,EAAE,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;AAC5C;AACA,GAAG,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAA;AAC/C,GAAG,MAAM,IAAI,KAAK;AAClB,IAAI,CAAC,mDAAmD,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;AACzG,IAAI,CAAA;AACJ,GAAE;;AAEF,EAAE,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAErC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;AAC3B,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAA;AAChC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAA;;AAErC,EAAE,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;;AAEzD,EAAE,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAA;AAEhC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAA;;AAEtB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAA;AAC1B,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK,CAAA;AACzB,EAAC;;AAED,CAAC,OAAO,GAAG;AACX,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,GAAG;AACL,GAAG;AACH,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;AAC7C,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;AAClD,KAAK,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;AAC7C;AACA,IAAI,OAAO,KAAK,CAAA;AAChB,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,IAAI,GAAE;AAChC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,MAAM,GAAG;AACV,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,IAAI,MAAM,GAAG,CAAC,CAAA;AAChB,EAAE,GAAG;AACL,GAAG,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAA;AAC3E,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,IAAI,GAAE;AAChC,EAAE,OAAO,MAAM,CAAA;AACf,EAAC;;AAED,CAAC,SAAS,GAAG;AACb,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AAC9B,EAAC;;AAED,CAAC,IAAI,CAAC,QAAQ,EAAE;AAChB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;AACnD,EAAC;;AAED,CAAC,cAAc,CAAC,QAAQ,EAAE;AAC1B,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAA;;AAEnD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;;AAE5B,EAAE,GAAG;AACL,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;AACxB,GAAG,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;;AAEpC;AACA,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE;AAClC,KAAK,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAA;AAChC,KAAI;;AAEJ,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AACjC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC/C,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC3C,IAAG;;AAEH,GAAG,IAAI,OAAO,EAAE,OAAO,IAAI,CAAA;AAC3B,GAAG,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAA;AACzB,GAAG,QAAQ,KAAK,EAAC;;AAEjB,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,OAAO,CAAC,QAAQ,EAAE;AACnB,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;AAC/B,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;AACD,CAAC,gBAAgB,CAAC,QAAQ,EAAE;AAC5B,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAA;;AAExD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;;AAE7B,EAAE,GAAG;AACL,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;AACxB,GAAG,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;;AAEtC,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;AAC1B;AACA,IAAI,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAA;;AAE7D,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AACjC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC/C,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC3C,IAAG;;AAEH,GAAG,IAAI,OAAO,EAAE,OAAO,IAAI,CAAA;AAC3B,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAG,QAAQ,KAAK,EAAC;;AAEjB,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,SAAS,CAAC,QAAQ,EAAE;AACrB,EAAE,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AACjC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,UAAU,GAAG;AACd,EAAE,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAA;AAC1C,EAAC;;AAED,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE;AAC1C,EAAE,SAAS,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE;AACtC,GAAG,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;AACxC,IAAI,OAAO,WAAW,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK;AAC1D;AACA,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,GAAG,CAAA;AAC9B,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAA;AACnC,KAAK,MAAM,GAAG,GAAG,CAAC,CAAC,CAAA;AACnB,KAAK,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;AAC7C,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AACnB,KAAK,CAAC,CAAA;AACN,IAAI,MAAM;AACV,IAAI,OAAO,WAAW,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;AAChE,IAAG;AACH,GAAE;AACF,EAAE,SAAS,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE;AAC7B,GAAG,IAAI,KAAK,CAAA;AACZ,GAAG,MAAM,OAAO,GAAG,EAAE,CAAA;AACrB,GAAG,QAAQ,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;AAClC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACvB,IAAG;AACH,GAAG,OAAO,OAAO,CAAA;AACjB,GAAE;AACF,EAAE,IAAI,WAAW,CAAC,MAAM,EAAE;AAC1B,GAAG,MAAM,OAAO,GAAG,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;AACvD,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK;AAC9B,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;AAC7B,KAAK,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC7D,KAAK,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;AACnC,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC7E,MAAK;AACL,KAAI;AACJ,IAAI,CAAC,CAAA;AACL,GAAG,MAAM;AACT,GAAG,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;AACjD,GAAG,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;AACrC,IAAI,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC5D,IAAI,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;AAClC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC5E,KAAI;AACJ,IAAG;AACH,GAAE;AACF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;AACrC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;AAC3B,EAAE,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;;AAExC,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;AACpB,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC5D,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,EAAE;AACnC,EAAE,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;AACvC,GAAG,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACvD,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACtD,EAAC;;AAED,CAAC,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE;AACxC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;AAC3B,EAAE,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAA;AACpC,EAAE;AACF,GAAG,IAAI,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;AACvC,GAAG,KAAK,KAAK,CAAC,CAAC;AACf,GAAG,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,YAAY,CAAA;AACxD,IAAI;AACJ,GAAG,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,CAAC,CAAA;AAC/D,GAAG,IAAI,QAAQ,KAAK,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,EAAE,WAAW,CAAC,CAAA;AACzF,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE;AACtC,EAAE,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;AACvC,GAAG,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AAC1D,GAAE;;AAEF,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;AAC3B,GAAG,MAAM,IAAI,SAAS;AACtB,IAAI,2EAA2E;AAC/E,IAAI,CAAA;AACJ,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACtD,EAAC;AACD;;AC33BA,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD;AACe,MAAM,MAAM,CAAC;AAC5B,CAAC,WAAW,CAAC,OAAO,GAAG,EAAE,EAAE;AAC3B,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;AACnC,EAAE,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;AAC9E,EAAE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;AACpB,EAAE,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;AAC1B,EAAE,IAAI,CAAC,2BAA2B,GAAG,EAAE,CAAC;AACxC,EAAE;AACF;AACA,CAAC,SAAS,CAAC,MAAM,EAAE;AACnB,EAAE,IAAI,MAAM,YAAY,WAAW,EAAE;AACrC,GAAG,OAAO,IAAI,CAAC,SAAS,CAAC;AACzB,IAAI,OAAO,EAAE,MAAM;AACnB,IAAI,QAAQ,EAAE,MAAM,CAAC,QAAQ;AAC7B,IAAI,SAAS,EAAE,IAAI,CAAC,SAAS;AAC7B,IAAI,CAAC,CAAC;AACN,GAAG;AACH;AACA,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;AAC5C,GAAG,MAAM,IAAI,KAAK;AAClB,IAAI,sIAAsI;AAC1I,IAAI,CAAC;AACL,GAAG;AACH;AACA,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACvF,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACjF,GAAG,CAAC,CAAC;AACL;AACA,EAAE,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,EAAE;AACtC;AACA,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACrC,GAAG;AACH;AACA,EAAE,IAAI,MAAM,CAAC,QAAQ,EAAE;AACvB,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE;AAC5E,IAAI,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;AAClF,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC7F,IAAI,MAAM;AACV,IAAI,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC/F,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,KAAK,YAAY,CAAC,OAAO,EAAE;AAC1D,KAAK,MAAM,IAAI,KAAK,CAAC,CAAC,+BAA+B,EAAE,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC,CAAC;AAC/F,KAAK;AACL,IAAI;AACJ,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE;AACtB,EAAE,IAAI,CAAC,SAAS,CAAC;AACjB,GAAG,OAAO,EAAE,IAAI,WAAW,CAAC,GAAG,CAAC;AAChC,GAAG,SAAS,EAAE,CAAC,OAAO,IAAI,OAAO,CAAC,SAAS,KAAK,EAAE;AAClD,GAAG,CAAC,CAAC;AACL;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,KAAK,GAAG;AACT,EAAE,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC;AAC5B,GAAG,KAAK,EAAE,IAAI,CAAC,KAAK;AACpB,GAAG,SAAS,EAAE,IAAI,CAAC,SAAS;AAC5B,GAAG,CAAC,CAAC;AACL;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACnC,GAAG,MAAM,CAAC,SAAS,CAAC;AACpB,IAAI,QAAQ,EAAE,MAAM,CAAC,QAAQ;AAC7B,IAAI,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE;AACnC,IAAI,SAAS,EAAE,MAAM,CAAC,SAAS;AAC/B,IAAI,CAAC,CAAC;AACN,GAAG,CAAC,CAAC;AACL;AACA,EAAE,OAAO,MAAM,CAAC;AAChB,EAAE;AACF;AACA,CAAC,kBAAkB,CAAC,OAAO,GAAG,EAAE,EAAE;AAClC,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;AACnB,EAAE,IAAI,mBAAmB,GAAG,SAAS,CAAC;AACtC,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACnC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK;AAC7D,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChD,IAAI,CAAC,CAAC;AACN,GAAG,CAAC,CAAC;AACL;AACA,EAAE,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC/C;AACA,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AAClB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChC,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;AACtC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE;AACd,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACrC,IAAI;AACJ;AACA,GAAG,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAChG,GAAG,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;AACtC,GAAG,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;AACnD;AACA,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;AAC1B,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACxC,IAAI;AACJ;AACA,GAAG,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,KAAK;AAC9C,IAAI,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACpC;AACA,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1D;AACA,IAAI,IAAI,MAAM,CAAC,QAAQ,EAAE;AACzB,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE;AACvB,MAAM,QAAQ,CAAC,OAAO;AACtB,OAAO,WAAW;AAClB,OAAO,KAAK,CAAC,OAAO;AACpB,OAAO,GAAG;AACV,OAAO,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC3D,OAAO,CAAC;AACR,MAAM,MAAM;AACZ,MAAM,QAAQ,CAAC,gBAAgB;AAC/B,OAAO,WAAW;AAClB,OAAO,KAAK;AACZ,OAAO,WAAW,CAAC,QAAQ;AAC3B,OAAO,GAAG;AACV,OAAO,WAAW,CAAC,kBAAkB;AACrC,OAAO,CAAC;AACR,MAAM;AACN,KAAK,MAAM;AACX,KAAK,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACrC,KAAK;AACL;AACA,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1D,IAAI,CAAC,CAAC;AACN;AACA,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;AAC1B,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACxC,IAAI;AACJ;AACA,GAAG,IAAI,MAAM,CAAC,UAAU,IAAI,WAAW,KAAK,CAAC,CAAC,EAAE;AAChD,IAAI,IAAI,mBAAmB,KAAK,SAAS,EAAE;AAC3C,KAAK,mBAAmB,GAAG,EAAE,CAAC;AAC9B,KAAK;AACL,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC1C,IAAI;AACJ,GAAG,CAAC,CAAC;AACL;AACA,EAAE,OAAO;AACT,GAAG,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,SAAS;AACrE,GAAG,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK;AAC/C,IAAI,OAAO,OAAO,CAAC,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3F,IAAI,CAAC;AACL,GAAG,cAAc,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK;AACtD,IAAI,OAAO,OAAO,CAAC,cAAc,GAAG,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;AAC1D,IAAI,CAAC;AACL,GAAG,KAAK;AACR,GAAG,QAAQ,EAAE,QAAQ,CAAC,GAAG;AACzB,GAAG,mBAAmB;AACtB,GAAG,CAAC;AACJ,EAAE;AACF;AACA,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;AACzD,EAAE;AACF;AACA,CAAC,eAAe,GAAG;AACnB,EAAE,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAChC;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACnC,GAAG,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;AAC1D;AACA,GAAG,IAAI,SAAS,KAAK,IAAI,EAAE,OAAO;AAClC;AACA,GAAG,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AACzE,GAAG,kBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACtC,GAAG,CAAC,CAAC;AACL;AACA,EAAE;AACF,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;AAClD,IAAI,OAAO,kBAAkB,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACzD,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI;AAChB,IAAI;AACJ,EAAE;AACF;AACA,CAAC,MAAM,CAAC,SAAS,EAAE;AACnB,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;AACzB,GAAG,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;AACtC,GAAG;AACH;AACA,EAAE,IAAI,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC;AACpC;AACA,EAAE,IAAI,eAAe,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AACrE;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;AACtC,GAAG,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACxF,GAAG,MAAM,WAAW,GAAG,eAAe,KAAK,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AAC9E;AACA,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE;AACpC,IAAI,OAAO,EAAE,MAAM,CAAC,qBAAqB;AACzC,IAAI,WAAW;AACf,IAAI,CAAC,CAAC;AACN;AACA,GAAG,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC;AACxD,GAAG,CAAC,CAAC;AACL;AACA,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AAClB,GAAG,IAAI,CAAC,KAAK;AACb,IAAI,SAAS;AACb,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK;AACrD,KAAK,OAAO,KAAK,GAAG,CAAC,GAAG,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AAClD,KAAK,CAAC,CAAC;AACP,GAAG;AACH;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,OAAO,CAAC,GAAG,EAAE;AACd,EAAE,IAAI,CAAC,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;AAChC,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,QAAQ,GAAG;AACZ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO;AAC3B,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;AACvB,IAAI,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACzF,IAAI,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,EAAE,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;AACrE;AACA,IAAI,OAAO,GAAG,CAAC;AACf,IAAI,CAAC;AACL,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;AACb;AACA,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AAC3B,EAAE;AACF;AACA,CAAC,OAAO,GAAG;AACX,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,OAAO,KAAK,CAAC;AAC3D,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,KAAK,CAAC;AAC7E,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,MAAM,GAAG;AACV,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM;AAC5B,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE;AACvD,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM;AACpB,GAAG,CAAC;AACJ,EAAE;AACF;AACA,CAAC,SAAS,GAAG;AACb,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC/B,EAAE;AACF;AACA,CAAC,IAAI,CAAC,QAAQ,EAAE;AAChB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACpD,EAAE;AACF;AACA,CAAC,SAAS,CAAC,QAAQ,EAAE;AACrB,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;AACzD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1C;AACA,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACnB,GAAG,IAAI,MAAM,CAAC;AACd,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AACb;AACA,GAAG,GAAG;AACN,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,KAAK,MAAM;AACX,KAAK;AACL,IAAI,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE;AACxD,GAAG;AACH;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,OAAO,CAAC,QAAQ,EAAE;AACnB,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;AACpD;AACA,EAAE,IAAI,MAAM,CAAC;AACb,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AAClC;AACA,EAAE,GAAG;AACL,GAAG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;AAC9B,GAAG,IAAI,CAAC,MAAM,EAAE;AAChB,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC5C,IAAI,MAAM;AACV,IAAI;AACJ,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;AACrD;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;;;;"} \ No newline at end of file diff --git a/node_modules/magic-string/dist/magic-string.umd.js b/node_modules/magic-string/dist/magic-string.umd.js deleted file mode 100644 index bb2be85..0000000 --- a/node_modules/magic-string/dist/magic-string.umd.js +++ /dev/null @@ -1,1672 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.MagicString = factory()); -})(this, (function () { 'use strict'; - - class BitSet { - constructor(arg) { - this.bits = arg instanceof BitSet ? arg.bits.slice() : []; - } - - add(n) { - this.bits[n >> 5] |= 1 << (n & 31); - } - - has(n) { - return !!(this.bits[n >> 5] & (1 << (n & 31))); - } - } - - class Chunk { - constructor(start, end, content) { - this.start = start; - this.end = end; - this.original = content; - - this.intro = ''; - this.outro = ''; - - this.content = content; - this.storeName = false; - this.edited = false; - - { - this.previous = null; - this.next = null; - } - } - - appendLeft(content) { - this.outro += content; - } - - appendRight(content) { - this.intro = this.intro + content; - } - - clone() { - const chunk = new Chunk(this.start, this.end, this.original); - - chunk.intro = this.intro; - chunk.outro = this.outro; - chunk.content = this.content; - chunk.storeName = this.storeName; - chunk.edited = this.edited; - - return chunk; - } - - contains(index) { - return this.start < index && index < this.end; - } - - eachNext(fn) { - let chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.next; - } - } - - eachPrevious(fn) { - let chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.previous; - } - } - - edit(content, storeName, contentOnly) { - this.content = content; - if (!contentOnly) { - this.intro = ''; - this.outro = ''; - } - this.storeName = storeName; - - this.edited = true; - - return this; - } - - prependLeft(content) { - this.outro = content + this.outro; - } - - prependRight(content) { - this.intro = content + this.intro; - } - - reset() { - this.intro = ''; - this.outro = ''; - if (this.edited) { - this.content = this.original; - this.storeName = false; - this.edited = false; - } - } - - split(index) { - const sliceIndex = index - this.start; - - const originalBefore = this.original.slice(0, sliceIndex); - const originalAfter = this.original.slice(sliceIndex); - - this.original = originalBefore; - - const newChunk = new Chunk(index, this.end, originalAfter); - newChunk.outro = this.outro; - this.outro = ''; - - this.end = index; - - if (this.edited) { - // after split we should save the edit content record into the correct chunk - // to make sure sourcemap correct - // For example: - // ' test'.trim() - // split -> ' ' + 'test' - // ✔️ edit -> '' + 'test' - // ✖️ edit -> 'test' + '' - // TODO is this block necessary?... - newChunk.edit('', false); - this.content = ''; - } else { - this.content = originalBefore; - } - - newChunk.next = this.next; - if (newChunk.next) newChunk.next.previous = newChunk; - newChunk.previous = this; - this.next = newChunk; - - return newChunk; - } - - toString() { - return this.intro + this.content + this.outro; - } - - trimEnd(rx) { - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) return true; - - const trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - this.split(this.start + trimmed.length).edit('', undefined, true); - if (this.edited) { - // save the change, if it has been edited - this.edit(trimmed, this.storeName, true); - } - } - return true; - } else { - this.edit('', undefined, true); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) return true; - } - } - - trimStart(rx) { - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) return true; - - const trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - const newChunk = this.split(this.end - trimmed.length); - if (this.edited) { - // save the change, if it has been edited - newChunk.edit(trimmed, this.storeName, true); - } - this.edit('', undefined, true); - } - return true; - } else { - this.edit('', undefined, true); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) return true; - } - } - } - - const comma = ','.charCodeAt(0); - const semicolon = ';'.charCodeAt(0); - const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - const intToChar = new Uint8Array(64); // 64 possible chars. - const charToInt = new Uint8Array(128); // z is 122 in ASCII - for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; - } - function encodeInteger(builder, num, relative) { - let delta = num - relative; - delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; - do { - let clamped = delta & 0b011111; - delta >>>= 5; - if (delta > 0) - clamped |= 0b100000; - builder.write(intToChar[clamped]); - } while (delta > 0); - return num; - } - - const bufLength = 1024 * 16; - // Provide a fallback for older environments. - const td = typeof TextDecoder !== 'undefined' - ? /* #__PURE__ */ new TextDecoder() - : typeof Buffer !== 'undefined' - ? { - decode(buf) { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - }, - } - : { - decode(buf) { - let out = ''; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - }, - }; - class StringWriter { - constructor() { - this.pos = 0; - this.out = ''; - this.buffer = new Uint8Array(bufLength); - } - write(v) { - const { buffer } = this; - buffer[this.pos++] = v; - if (this.pos === bufLength) { - this.out += td.decode(buffer); - this.pos = 0; - } - } - flush() { - const { buffer, out, pos } = this; - return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; - } - } - function encode(decoded) { - const writer = new StringWriter(); - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) - writer.write(semicolon); - if (line.length === 0) - continue; - let genColumn = 0; - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - if (j > 0) - writer.write(comma); - genColumn = encodeInteger(writer, segment[0], genColumn); - if (segment.length === 1) - continue; - sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); - sourceLine = encodeInteger(writer, segment[2], sourceLine); - sourceColumn = encodeInteger(writer, segment[3], sourceColumn); - if (segment.length === 4) - continue; - namesIndex = encodeInteger(writer, segment[4], namesIndex); - } - } - return writer.flush(); - } - - function getBtoa() { - if (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') { - return (str) => globalThis.btoa(unescape(encodeURIComponent(str))); - } else if (typeof Buffer === 'function') { - return (str) => Buffer.from(str, 'utf-8').toString('base64'); - } else { - return () => { - throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); - }; - } - } - - const btoa = /*#__PURE__*/ getBtoa(); - - class SourceMap { - constructor(properties) { - this.version = 3; - this.file = properties.file; - this.sources = properties.sources; - this.sourcesContent = properties.sourcesContent; - this.names = properties.names; - this.mappings = encode(properties.mappings); - if (typeof properties.x_google_ignoreList !== 'undefined') { - this.x_google_ignoreList = properties.x_google_ignoreList; - } - if (typeof properties.debugId !== 'undefined') { - this.debugId = properties.debugId; - } - } - - toString() { - return JSON.stringify(this); - } - - toUrl() { - return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); - } - } - - function guessIndent(code) { - const lines = code.split('\n'); - - const tabbed = lines.filter((line) => /^\t+/.test(line)); - const spaced = lines.filter((line) => /^ {2,}/.test(line)); - - if (tabbed.length === 0 && spaced.length === 0) { - return null; - } - - // More lines tabbed than spaced? Assume tabs, and - // default to tabs in the case of a tie (or nothing - // to go on) - if (tabbed.length >= spaced.length) { - return '\t'; - } - - // Otherwise, we need to guess the multiple - const min = spaced.reduce((previous, current) => { - const numSpaces = /^ +/.exec(current)[0].length; - return Math.min(numSpaces, previous); - }, Infinity); - - return new Array(min + 1).join(' '); - } - - function getRelativePath(from, to) { - const fromParts = from.split(/[/\\]/); - const toParts = to.split(/[/\\]/); - - fromParts.pop(); // get dirname - - while (fromParts[0] === toParts[0]) { - fromParts.shift(); - toParts.shift(); - } - - if (fromParts.length) { - let i = fromParts.length; - while (i--) fromParts[i] = '..'; - } - - return fromParts.concat(toParts).join('/'); - } - - const toString = Object.prototype.toString; - - function isObject(thing) { - return toString.call(thing) === '[object Object]'; - } - - function getLocator(source) { - const originalLines = source.split('\n'); - const lineOffsets = []; - - for (let i = 0, pos = 0; i < originalLines.length; i++) { - lineOffsets.push(pos); - pos += originalLines[i].length + 1; - } - - return function locate(index) { - let i = 0; - let j = lineOffsets.length; - while (i < j) { - const m = (i + j) >> 1; - if (index < lineOffsets[m]) { - j = m; - } else { - i = m + 1; - } - } - const line = i - 1; - const column = index - lineOffsets[line]; - return { line, column }; - }; - } - - const wordRegex = /\w/; - - class Mappings { - constructor(hires) { - this.hires = hires; - this.generatedCodeLine = 0; - this.generatedCodeColumn = 0; - this.raw = []; - this.rawSegments = this.raw[this.generatedCodeLine] = []; - this.pending = null; - } - - addEdit(sourceIndex, content, loc, nameIndex) { - if (content.length) { - const contentLengthMinusOne = content.length - 1; - let contentLineEnd = content.indexOf('\n', 0); - let previousContentLineEnd = -1; - // Loop through each line in the content and add a segment, but stop if the last line is empty, - // else code afterwards would fill one line too many - while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) { - const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - if (nameIndex >= 0) { - segment.push(nameIndex); - } - this.rawSegments.push(segment); - - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - - previousContentLineEnd = contentLineEnd; - contentLineEnd = content.indexOf('\n', contentLineEnd + 1); - } - - const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - if (nameIndex >= 0) { - segment.push(nameIndex); - } - this.rawSegments.push(segment); - - this.advance(content.slice(previousContentLineEnd + 1)); - } else if (this.pending) { - this.rawSegments.push(this.pending); - this.advance(content); - } - - this.pending = null; - } - - addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { - let originalCharIndex = chunk.start; - let first = true; - // when iterating each char, check if it's in a word boundary - let charInHiresBoundary = false; - - while (originalCharIndex < chunk.end) { - if (original[originalCharIndex] === '\n') { - loc.line += 1; - loc.column = 0; - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - first = true; - charInHiresBoundary = false; - } else { - if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { - const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - - if (this.hires === 'boundary') { - // in hires "boundary", group segments per word boundary than per char - if (wordRegex.test(original[originalCharIndex])) { - // for first char in the boundary found, start the boundary by pushing a segment - if (!charInHiresBoundary) { - this.rawSegments.push(segment); - charInHiresBoundary = true; - } - } else { - // for non-word char, end the boundary by pushing a segment - this.rawSegments.push(segment); - charInHiresBoundary = false; - } - } else { - this.rawSegments.push(segment); - } - } - - loc.column += 1; - this.generatedCodeColumn += 1; - first = false; - } - - originalCharIndex += 1; - } - - this.pending = null; - } - - advance(str) { - if (!str) return; - - const lines = str.split('\n'); - - if (lines.length > 1) { - for (let i = 0; i < lines.length - 1; i++) { - this.generatedCodeLine++; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - } - this.generatedCodeColumn = 0; - } - - this.generatedCodeColumn += lines[lines.length - 1].length; - } - } - - const n = '\n'; - - const warned = { - insertLeft: false, - insertRight: false, - storeName: false, - }; - - class MagicString { - constructor(string, options = {}) { - const chunk = new Chunk(0, string.length, string); - - Object.defineProperties(this, { - original: { writable: true, value: string }, - outro: { writable: true, value: '' }, - intro: { writable: true, value: '' }, - firstChunk: { writable: true, value: chunk }, - lastChunk: { writable: true, value: chunk }, - lastSearchedChunk: { writable: true, value: chunk }, - byStart: { writable: true, value: {} }, - byEnd: { writable: true, value: {} }, - filename: { writable: true, value: options.filename }, - indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, - sourcemapLocations: { writable: true, value: new BitSet() }, - storedNames: { writable: true, value: {} }, - indentStr: { writable: true, value: undefined }, - ignoreList: { writable: true, value: options.ignoreList }, - offset: { writable: true, value: options.offset || 0 }, - }); - - this.byStart[0] = chunk; - this.byEnd[string.length] = chunk; - } - - addSourcemapLocation(char) { - this.sourcemapLocations.add(char); - } - - append(content) { - if (typeof content !== 'string') throw new TypeError('outro content must be a string'); - - this.outro += content; - return this; - } - - appendLeft(index, content) { - index = index + this.offset; - - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byEnd[index]; - - if (chunk) { - chunk.appendLeft(content); - } else { - this.intro += content; - } - return this; - } - - appendRight(index, content) { - index = index + this.offset; - - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byStart[index]; - - if (chunk) { - chunk.appendRight(content); - } else { - this.outro += content; - } - return this; - } - - clone() { - const cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset }); - - let originalChunk = this.firstChunk; - let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); - - while (originalChunk) { - cloned.byStart[clonedChunk.start] = clonedChunk; - cloned.byEnd[clonedChunk.end] = clonedChunk; - - const nextOriginalChunk = originalChunk.next; - const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); - - if (nextClonedChunk) { - clonedChunk.next = nextClonedChunk; - nextClonedChunk.previous = clonedChunk; - - clonedChunk = nextClonedChunk; - } - - originalChunk = nextOriginalChunk; - } - - cloned.lastChunk = clonedChunk; - - if (this.indentExclusionRanges) { - cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); - } - - cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); - - cloned.intro = this.intro; - cloned.outro = this.outro; - - return cloned; - } - - generateDecodedMap(options) { - options = options || {}; - - const sourceIndex = 0; - const names = Object.keys(this.storedNames); - const mappings = new Mappings(options.hires); - - const locate = getLocator(this.original); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.firstChunk.eachNext((chunk) => { - const loc = locate(chunk.start); - - if (chunk.intro.length) mappings.advance(chunk.intro); - - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1, - ); - } else { - mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); - } - - if (chunk.outro.length) mappings.advance(chunk.outro); - }); - - return { - file: options.file ? options.file.split(/[/\\]/).pop() : undefined, - sources: [ - options.source ? getRelativePath(options.file || '', options.source) : options.file || '', - ], - sourcesContent: options.includeContent ? [this.original] : undefined, - names, - mappings: mappings.raw, - x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, - }; - } - - generateMap(options) { - return new SourceMap(this.generateDecodedMap(options)); - } - - _ensureindentStr() { - if (this.indentStr === undefined) { - this.indentStr = guessIndent(this.original); - } - } - - _getRawIndentString() { - this._ensureindentStr(); - return this.indentStr; - } - - getIndentString() { - this._ensureindentStr(); - return this.indentStr === null ? '\t' : this.indentStr; - } - - indent(indentStr, options) { - const pattern = /^[^\r\n]/gm; - - if (isObject(indentStr)) { - options = indentStr; - indentStr = undefined; - } - - if (indentStr === undefined) { - this._ensureindentStr(); - indentStr = this.indentStr || '\t'; - } - - if (indentStr === '') return this; // noop - - options = options || {}; - - // Process exclusion ranges - const isExcluded = {}; - - if (options.exclude) { - const exclusions = - typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; - exclusions.forEach((exclusion) => { - for (let i = exclusion[0]; i < exclusion[1]; i += 1) { - isExcluded[i] = true; - } - }); - } - - let shouldIndentNextCharacter = options.indentStart !== false; - const replacer = (match) => { - if (shouldIndentNextCharacter) return `${indentStr}${match}`; - shouldIndentNextCharacter = true; - return match; - }; - - this.intro = this.intro.replace(pattern, replacer); - - let charIndex = 0; - let chunk = this.firstChunk; - - while (chunk) { - const end = chunk.end; - - if (chunk.edited) { - if (!isExcluded[charIndex]) { - chunk.content = chunk.content.replace(pattern, replacer); - - if (chunk.content.length) { - shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; - } - } - } else { - charIndex = chunk.start; - - while (charIndex < end) { - if (!isExcluded[charIndex]) { - const char = this.original[charIndex]; - - if (char === '\n') { - shouldIndentNextCharacter = true; - } else if (char !== '\r' && shouldIndentNextCharacter) { - shouldIndentNextCharacter = false; - - if (charIndex === chunk.start) { - chunk.prependRight(indentStr); - } else { - this._splitChunk(chunk, charIndex); - chunk = chunk.next; - chunk.prependRight(indentStr); - } - } - } - - charIndex += 1; - } - } - - charIndex = chunk.end; - chunk = chunk.next; - } - - this.outro = this.outro.replace(pattern, replacer); - - return this; - } - - insert() { - throw new Error( - 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', - ); - } - - insertLeft(index, content) { - if (!warned.insertLeft) { - console.warn( - 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', - ); - warned.insertLeft = true; - } - - return this.appendLeft(index, content); - } - - insertRight(index, content) { - if (!warned.insertRight) { - console.warn( - 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', - ); - warned.insertRight = true; - } - - return this.prependRight(index, content); - } - - move(start, end, index) { - start = start + this.offset; - end = end + this.offset; - index = index + this.offset; - - if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); - - this._split(start); - this._split(end); - this._split(index); - - const first = this.byStart[start]; - const last = this.byEnd[end]; - - const oldLeft = first.previous; - const oldRight = last.next; - - const newRight = this.byStart[index]; - if (!newRight && last === this.lastChunk) return this; - const newLeft = newRight ? newRight.previous : this.lastChunk; - - if (oldLeft) oldLeft.next = oldRight; - if (oldRight) oldRight.previous = oldLeft; - - if (newLeft) newLeft.next = first; - if (newRight) newRight.previous = last; - - if (!first.previous) this.firstChunk = last.next; - if (!last.next) { - this.lastChunk = first.previous; - this.lastChunk.next = null; - } - - first.previous = newLeft; - last.next = newRight || null; - - if (!newLeft) this.firstChunk = first; - if (!newRight) this.lastChunk = last; - return this; - } - - overwrite(start, end, content, options) { - options = options || {}; - return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); - } - - update(start, end, content, options) { - start = start + this.offset; - end = end + this.offset; - - if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); - - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - if (end > this.original.length) throw new Error('end is out of bounds'); - if (start === end) - throw new Error( - 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', - ); - - this._split(start); - this._split(end); - - if (options === true) { - if (!warned.storeName) { - console.warn( - 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', - ); - warned.storeName = true; - } - - options = { storeName: true }; - } - const storeName = options !== undefined ? options.storeName : false; - const overwrite = options !== undefined ? options.overwrite : false; - - if (storeName) { - const original = this.original.slice(start, end); - Object.defineProperty(this.storedNames, original, { - writable: true, - value: true, - enumerable: true, - }); - } - - const first = this.byStart[start]; - const last = this.byEnd[end]; - - if (first) { - let chunk = first; - while (chunk !== last) { - if (chunk.next !== this.byStart[chunk.end]) { - throw new Error('Cannot overwrite across a split point'); - } - chunk = chunk.next; - chunk.edit('', false); - } - - first.edit(content, storeName, !overwrite); - } else { - // must be inserting at the end - const newChunk = new Chunk(start, end, '').edit(content, storeName); - - // TODO last chunk in the array may not be the last chunk, if it's moved... - last.next = newChunk; - newChunk.previous = last; - } - return this; - } - - prepend(content) { - if (typeof content !== 'string') throw new TypeError('outro content must be a string'); - - this.intro = content + this.intro; - return this; - } - - prependLeft(index, content) { - index = index + this.offset; - - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byEnd[index]; - - if (chunk) { - chunk.prependLeft(content); - } else { - this.intro = content + this.intro; - } - return this; - } - - prependRight(index, content) { - index = index + this.offset; - - if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - - this._split(index); - - const chunk = this.byStart[index]; - - if (chunk) { - chunk.prependRight(content); - } else { - this.outro = content + this.outro; - } - return this; - } - - remove(start, end) { - start = start + this.offset; - end = end + this.offset; - - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - if (start === end) return this; - - if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); - if (start > end) throw new Error('end must be greater than start'); - - this._split(start); - this._split(end); - - let chunk = this.byStart[start]; - - while (chunk) { - chunk.intro = ''; - chunk.outro = ''; - chunk.edit(''); - - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; - } - - reset(start, end) { - start = start + this.offset; - end = end + this.offset; - - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - if (start === end) return this; - - if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); - if (start > end) throw new Error('end must be greater than start'); - - this._split(start); - this._split(end); - - let chunk = this.byStart[start]; - - while (chunk) { - chunk.reset(); - - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; - } - - lastChar() { - if (this.outro.length) return this.outro[this.outro.length - 1]; - let chunk = this.lastChunk; - do { - if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; - if (chunk.content.length) return chunk.content[chunk.content.length - 1]; - if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; - } while ((chunk = chunk.previous)); - if (this.intro.length) return this.intro[this.intro.length - 1]; - return ''; - } - - lastLine() { - let lineIndex = this.outro.lastIndexOf(n); - if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); - let lineStr = this.outro; - let chunk = this.lastChunk; - do { - if (chunk.outro.length > 0) { - lineIndex = chunk.outro.lastIndexOf(n); - if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; - lineStr = chunk.outro + lineStr; - } - - if (chunk.content.length > 0) { - lineIndex = chunk.content.lastIndexOf(n); - if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; - lineStr = chunk.content + lineStr; - } - - if (chunk.intro.length > 0) { - lineIndex = chunk.intro.lastIndexOf(n); - if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; - lineStr = chunk.intro + lineStr; - } - } while ((chunk = chunk.previous)); - lineIndex = this.intro.lastIndexOf(n); - if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; - return this.intro + lineStr; - } - - slice(start = 0, end = this.original.length - this.offset) { - start = start + this.offset; - end = end + this.offset; - - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - - let result = ''; - - // find start chunk - let chunk = this.firstChunk; - while (chunk && (chunk.start > start || chunk.end <= start)) { - // found end chunk before start - if (chunk.start < end && chunk.end >= end) { - return result; - } - - chunk = chunk.next; - } - - if (chunk && chunk.edited && chunk.start !== start) - throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); - - const startChunk = chunk; - while (chunk) { - if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { - result += chunk.intro; - } - - const containsEnd = chunk.start < end && chunk.end >= end; - if (containsEnd && chunk.edited && chunk.end !== end) - throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); - - const sliceStart = startChunk === chunk ? start - chunk.start : 0; - const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; - - result += chunk.content.slice(sliceStart, sliceEnd); - - if (chunk.outro && (!containsEnd || chunk.end === end)) { - result += chunk.outro; - } - - if (containsEnd) { - break; - } - - chunk = chunk.next; - } - - return result; - } - - // TODO deprecate this? not really very useful - snip(start, end) { - const clone = this.clone(); - clone.remove(0, start); - clone.remove(end, clone.original.length); - - return clone; - } - - _split(index) { - if (this.byStart[index] || this.byEnd[index]) return; - - let chunk = this.lastSearchedChunk; - const searchForward = index > chunk.end; - - while (chunk) { - if (chunk.contains(index)) return this._splitChunk(chunk, index); - - chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; - } - } - - _splitChunk(chunk, index) { - if (chunk.edited && chunk.content.length) { - // zero-length edited chunks are a special case (overlapping replacements) - const loc = getLocator(this.original)(index); - throw new Error( - `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, - ); - } - - const newChunk = chunk.split(index); - - this.byEnd[index] = chunk; - this.byStart[index] = newChunk; - this.byEnd[newChunk.end] = newChunk; - - if (chunk === this.lastChunk) this.lastChunk = newChunk; - - this.lastSearchedChunk = chunk; - return true; - } - - toString() { - let str = this.intro; - - let chunk = this.firstChunk; - while (chunk) { - str += chunk.toString(); - chunk = chunk.next; - } - - return str + this.outro; - } - - isEmpty() { - let chunk = this.firstChunk; - do { - if ( - (chunk.intro.length && chunk.intro.trim()) || - (chunk.content.length && chunk.content.trim()) || - (chunk.outro.length && chunk.outro.trim()) - ) - return false; - } while ((chunk = chunk.next)); - return true; - } - - length() { - let chunk = this.firstChunk; - let length = 0; - do { - length += chunk.intro.length + chunk.content.length + chunk.outro.length; - } while ((chunk = chunk.next)); - return length; - } - - trimLines() { - return this.trim('[\\r\\n]'); - } - - trim(charType) { - return this.trimStart(charType).trimEnd(charType); - } - - trimEndAborted(charType) { - const rx = new RegExp((charType || '\\s') + '+$'); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) return true; - - let chunk = this.lastChunk; - - do { - const end = chunk.end; - const aborted = chunk.trimEnd(rx); - - // if chunk was trimmed, we have a new lastChunk - if (chunk.end !== end) { - if (this.lastChunk === chunk) { - this.lastChunk = chunk.next; - } - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) return true; - chunk = chunk.previous; - } while (chunk); - - return false; - } - - trimEnd(charType) { - this.trimEndAborted(charType); - return this; - } - trimStartAborted(charType) { - const rx = new RegExp('^' + (charType || '\\s') + '+'); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) return true; - - let chunk = this.firstChunk; - - do { - const end = chunk.end; - const aborted = chunk.trimStart(rx); - - if (chunk.end !== end) { - // special case... - if (chunk === this.lastChunk) this.lastChunk = chunk.next; - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) return true; - chunk = chunk.next; - } while (chunk); - - return false; - } - - trimStart(charType) { - this.trimStartAborted(charType); - return this; - } - - hasChanged() { - return this.original !== this.toString(); - } - - _replaceRegexp(searchValue, replacement) { - function getReplacement(match, str) { - if (typeof replacement === 'string') { - return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter - if (i === '$') return '$'; - if (i === '&') return match[0]; - const num = +i; - if (num < match.length) return match[+i]; - return `$${i}`; - }); - } else { - return replacement(...match, match.index, str, match.groups); - } - } - function matchAll(re, str) { - let match; - const matches = []; - while ((match = re.exec(str))) { - matches.push(match); - } - return matches; - } - if (searchValue.global) { - const matches = matchAll(searchValue, this.original); - matches.forEach((match) => { - if (match.index != null) { - const replacement = getReplacement(match, this.original); - if (replacement !== match[0]) { - this.overwrite(match.index, match.index + match[0].length, replacement); - } - } - }); - } else { - const match = this.original.match(searchValue); - if (match && match.index != null) { - const replacement = getReplacement(match, this.original); - if (replacement !== match[0]) { - this.overwrite(match.index, match.index + match[0].length, replacement); - } - } - } - return this; - } - - _replaceString(string, replacement) { - const { original } = this; - const index = original.indexOf(string); - - if (index !== -1) { - this.overwrite(index, index + string.length, replacement); - } - - return this; - } - - replace(searchValue, replacement) { - if (typeof searchValue === 'string') { - return this._replaceString(searchValue, replacement); - } - - return this._replaceRegexp(searchValue, replacement); - } - - _replaceAllString(string, replacement) { - const { original } = this; - const stringLength = string.length; - for ( - let index = original.indexOf(string); - index !== -1; - index = original.indexOf(string, index + stringLength) - ) { - const previous = original.slice(index, index + stringLength); - if (previous !== replacement) this.overwrite(index, index + stringLength, replacement); - } - - return this; - } - - replaceAll(searchValue, replacement) { - if (typeof searchValue === 'string') { - return this._replaceAllString(searchValue, replacement); - } - - if (!searchValue.global) { - throw new TypeError( - 'MagicString.prototype.replaceAll called with a non-global RegExp argument', - ); - } - - return this._replaceRegexp(searchValue, replacement); - } - } - - const hasOwnProp = Object.prototype.hasOwnProperty; - - class Bundle { - constructor(options = {}) { - this.intro = options.intro || ''; - this.separator = options.separator !== undefined ? options.separator : '\n'; - this.sources = []; - this.uniqueSources = []; - this.uniqueSourceIndexByFilename = {}; - } - - addSource(source) { - if (source instanceof MagicString) { - return this.addSource({ - content: source, - filename: source.filename, - separator: this.separator, - }); - } - - if (!isObject(source) || !source.content) { - throw new Error( - 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`', - ); - } - - ['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => { - if (!hasOwnProp.call(source, option)) source[option] = source.content[option]; - }); - - if (source.separator === undefined) { - // TODO there's a bunch of this sort of thing, needs cleaning up - source.separator = this.separator; - } - - if (source.filename) { - if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) { - this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length; - this.uniqueSources.push({ filename: source.filename, content: source.content.original }); - } else { - const uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]]; - if (source.content.original !== uniqueSource.content) { - throw new Error(`Illegal source: same filename (${source.filename}), different contents`); - } - } - } - - this.sources.push(source); - return this; - } - - append(str, options) { - this.addSource({ - content: new MagicString(str), - separator: (options && options.separator) || '', - }); - - return this; - } - - clone() { - const bundle = new Bundle({ - intro: this.intro, - separator: this.separator, - }); - - this.sources.forEach((source) => { - bundle.addSource({ - filename: source.filename, - content: source.content.clone(), - separator: source.separator, - }); - }); - - return bundle; - } - - generateDecodedMap(options = {}) { - const names = []; - let x_google_ignoreList = undefined; - this.sources.forEach((source) => { - Object.keys(source.content.storedNames).forEach((name) => { - if (!~names.indexOf(name)) names.push(name); - }); - }); - - const mappings = new Mappings(options.hires); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.sources.forEach((source, i) => { - if (i > 0) { - mappings.advance(this.separator); - } - - const sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1; - const magicString = source.content; - const locate = getLocator(magicString.original); - - if (magicString.intro) { - mappings.advance(magicString.intro); - } - - magicString.firstChunk.eachNext((chunk) => { - const loc = locate(chunk.start); - - if (chunk.intro.length) mappings.advance(chunk.intro); - - if (source.filename) { - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1, - ); - } else { - mappings.addUneditedChunk( - sourceIndex, - chunk, - magicString.original, - loc, - magicString.sourcemapLocations, - ); - } - } else { - mappings.advance(chunk.content); - } - - if (chunk.outro.length) mappings.advance(chunk.outro); - }); - - if (magicString.outro) { - mappings.advance(magicString.outro); - } - - if (source.ignoreList && sourceIndex !== -1) { - if (x_google_ignoreList === undefined) { - x_google_ignoreList = []; - } - x_google_ignoreList.push(sourceIndex); - } - }); - - return { - file: options.file ? options.file.split(/[/\\]/).pop() : undefined, - sources: this.uniqueSources.map((source) => { - return options.file ? getRelativePath(options.file, source.filename) : source.filename; - }), - sourcesContent: this.uniqueSources.map((source) => { - return options.includeContent ? source.content : null; - }), - names, - mappings: mappings.raw, - x_google_ignoreList, - }; - } - - generateMap(options) { - return new SourceMap(this.generateDecodedMap(options)); - } - - getIndentString() { - const indentStringCounts = {}; - - this.sources.forEach((source) => { - const indentStr = source.content._getRawIndentString(); - - if (indentStr === null) return; - - if (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0; - indentStringCounts[indentStr] += 1; - }); - - return ( - Object.keys(indentStringCounts).sort((a, b) => { - return indentStringCounts[a] - indentStringCounts[b]; - })[0] || '\t' - ); - } - - indent(indentStr) { - if (!arguments.length) { - indentStr = this.getIndentString(); - } - - if (indentStr === '') return this; // noop - - let trailingNewline = !this.intro || this.intro.slice(-1) === '\n'; - - this.sources.forEach((source, i) => { - const separator = source.separator !== undefined ? source.separator : this.separator; - const indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator)); - - source.content.indent(indentStr, { - exclude: source.indentExclusionRanges, - indentStart, //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator ) - }); - - trailingNewline = source.content.lastChar() === '\n'; - }); - - if (this.intro) { - this.intro = - indentStr + - this.intro.replace(/^[^\n]/gm, (match, index) => { - return index > 0 ? indentStr + match : match; - }); - } - - return this; - } - - prepend(str) { - this.intro = str + this.intro; - return this; - } - - toString() { - const body = this.sources - .map((source, i) => { - const separator = source.separator !== undefined ? source.separator : this.separator; - const str = (i > 0 ? separator : '') + source.content.toString(); - - return str; - }) - .join(''); - - return this.intro + body; - } - - isEmpty() { - if (this.intro.length && this.intro.trim()) return false; - if (this.sources.some((source) => !source.content.isEmpty())) return false; - return true; - } - - length() { - return this.sources.reduce( - (length, source) => length + source.content.length(), - this.intro.length, - ); - } - - trimLines() { - return this.trim('[\\r\\n]'); - } - - trim(charType) { - return this.trimStart(charType).trimEnd(charType); - } - - trimStart(charType) { - const rx = new RegExp('^' + (charType || '\\s') + '+'); - this.intro = this.intro.replace(rx, ''); - - if (!this.intro) { - let source; - let i = 0; - - do { - source = this.sources[i++]; - if (!source) { - break; - } - } while (!source.content.trimStartAborted(charType)); - } - - return this; - } - - trimEnd(charType) { - const rx = new RegExp((charType || '\\s') + '+$'); - - let source; - let i = this.sources.length - 1; - - do { - source = this.sources[i--]; - if (!source) { - this.intro = this.intro.replace(rx, ''); - break; - } - } while (!source.content.trimEndAborted(charType)); - - return this; - } - } - - MagicString.Bundle = Bundle; - MagicString.SourceMap = SourceMap; - MagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121 - - return MagicString; - -})); -//# sourceMappingURL=magic-string.umd.js.map diff --git a/node_modules/magic-string/dist/magic-string.umd.js.map b/node_modules/magic-string/dist/magic-string.umd.js.map deleted file mode 100644 index 5d36fdf..0000000 --- a/node_modules/magic-string/dist/magic-string.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"magic-string.umd.js","sources":["../src/BitSet.js","../src/Chunk.js","../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js","../src/index-legacy.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\tif (DEBUG) {\n\t\t\t// we make these non-enumerable, for sanity while debugging\n\t\t\tObject.defineProperties(this, {\n\t\t\t\tprevious: { writable: true, value: null },\n\t\t\t\tnext: { writable: true, value: null },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\treset() {\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\t\tif (this.edited) {\n\t\t\tthis.content = this.original;\n\t\t\tthis.storeName = false;\n\t\t\tthis.edited = false;\n\t\t}\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + ''\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","const comma = ','.charCodeAt(0);\nconst semicolon = ';'.charCodeAt(0);\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n return relative + value;\n}\nfunction encodeInteger(builder, num, relative) {\n let delta = num - relative;\n delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;\n do {\n let clamped = delta & 0b011111;\n delta >>>= 5;\n if (delta > 0)\n clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n return num;\n}\nfunction hasMoreVlq(reader, max) {\n if (reader.pos >= max)\n return false;\n return reader.peek() !== comma;\n}\n\nconst bufLength = 1024 * 16;\n// Provide a fallback for older environments.\nconst td = typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf) {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\nclass StringWriter {\n constructor() {\n this.pos = 0;\n this.out = '';\n this.buffer = new Uint8Array(bufLength);\n }\n write(v) {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n flush() {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n}\nclass StringReader {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n\nconst EMPTY = [];\nfunction decodeOriginalScopes(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes = [];\n const stack = [];\n let line = 0;\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop();\n last[2] = line;\n last[3] = column;\n continue;\n }\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 0b0001;\n const scope = (hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]);\n let vars = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n scopes.push(scope);\n stack.push(scope);\n }\n return scopes;\n}\nfunction encodeOriginalScopes(scopes) {\n const writer = new StringWriter();\n for (let i = 0; i < scopes.length;) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n return writer.flush();\n}\nfunction _encodeOriginalScopes(scopes, index, writer, state) {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n if (index > 0)\n writer.write(comma);\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6)\n encodeInteger(writer, scope[5], 0);\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n for (index++; index < scopes.length;) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n return index;\n}\nfunction decodeGeneratedRanges(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges = [];\n const stack = [];\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop();\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n let callsite = null;\n let bindings = EMPTY;\n let range;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(reader, definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0);\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];\n }\n else {\n range = [genLine, genColumn, 0, 0];\n }\n range.isScope = !!hasScope;\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(reader, sameSource && prevLine === callsiteLine ? callsiteColumn : 0);\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges;\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n }\n else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n ranges.push(range);\n stack.push(range);\n }\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n return ranges;\n}\nfunction encodeGeneratedRanges(ranges) {\n if (ranges.length === 0)\n return '';\n const writer = new StringWriter();\n for (let i = 0; i < ranges.length;) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n return writer.flush();\n}\nfunction _encodeGeneratedRanges(ranges, index, writer, state) {\n const range = ranges[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings, } = range;\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n }\n else if (index > 0) {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, range[1], state[1]);\n const fields = (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, fields, 0);\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n }\n else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1)\n encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);\n encodeInteger(writer, expRange[0], 0);\n }\n }\n }\n for (index++; index < ranges.length;) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n }\n else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n return index;\n}\nfunction catchupLine(writer, lastLine, line) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n\nfunction decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(';');\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol)\n sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n }\n else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n }\n else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted)\n sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\nfunction encode(decoded) {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0)\n writer.write(semicolon);\n if (line.length === 0)\n continue;\n let genColumn = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0)\n writer.write(comma);\n genColumn = encodeInteger(writer, segment[0], genColumn);\n if (segment.length === 1)\n continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n if (segment.length === 4)\n continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n return writer.flush();\n}\n\nexport { decode, decodeGeneratedRanges, decodeOriginalScopes, encode, encodeGeneratedRanges, encodeOriginalScopes };\n//# sourceMappingURL=sourcemap-codec.mjs.map\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nfunction getBtoa() {\n\tif (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') {\n\t\treturn (str) => globalThis.btoa(unescape(encodeURIComponent(str)));\n\t} else if (typeof Buffer === 'function') {\n\t\treturn (str) => Buffer.from(str, 'utf-8').toString('base64');\n\t} else {\n\t\treturn () => {\n\t\t\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n\t\t};\n\t}\n}\n\nconst btoa = /*#__PURE__*/ getBtoa();\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t\tif (typeof properties.x_google_ignoreList !== 'undefined') {\n\t\t\tthis.x_google_ignoreList = properties.x_google_ignoreList;\n\t\t}\n\t\tif (typeof properties.debugId !== 'undefined') {\n\t\t\tthis.debugId = properties.debugId;\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","const wordRegex = /\\w/;\n\nexport default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst contentLengthMinusOne = content.length - 1;\n\t\t\tlet contentLineEnd = content.indexOf('\\n', 0);\n\t\t\tlet previousContentLineEnd = -1;\n\t\t\t// Loop through each line in the content and add a segment, but stop if the last line is empty,\n\t\t\t// else code afterwards would fill one line too many\n\t\t\twhile (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\t\tif (nameIndex >= 0) {\n\t\t\t\t\tsegment.push(nameIndex);\n\t\t\t\t}\n\t\t\t\tthis.rawSegments.push(segment);\n\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\n\t\t\t\tpreviousContentLineEnd = contentLineEnd;\n\t\t\t\tcontentLineEnd = content.indexOf('\\n', contentLineEnd + 1);\n\t\t\t}\n\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\n\t\t\tthis.advance(content.slice(previousContentLineEnd + 1));\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t\tthis.advance(content);\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\t\t// when iterating each char, check if it's in a word boundary\n\t\tlet charInHiresBoundary = false;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t\tcharInHiresBoundary = false;\n\t\t\t} else {\n\t\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\n\t\t\t\t\tif (this.hires === 'boundary') {\n\t\t\t\t\t\t// in hires \"boundary\", group segments per word boundary than per char\n\t\t\t\t\t\tif (wordRegex.test(original[originalCharIndex])) {\n\t\t\t\t\t\t\t// for first char in the boundary found, start the boundary by pushing a segment\n\t\t\t\t\t\t\tif (!charInHiresBoundary) {\n\t\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\t\tcharInHiresBoundary = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// for non-word char, end the boundary by pushing a segment\n\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\tcharInHiresBoundary = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: undefined },\n\t\t\tignoreList: { writable: true, value: options.ignoreList },\n\t\t\toffset: { writable: true, value: options.offset || 0 },\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: [\n\t\t\t\toptions.source ? getRelativePath(options.file || '', options.source) : options.file || '',\n\t\t\t],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : undefined,\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\t_ensureindentStr() {\n\t\tif (this.indentStr === undefined) {\n\t\t\tthis.indentStr = guessIndent(this.original);\n\t\t}\n\t}\n\n\t_getRawIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr;\n\t}\n\n\tgetIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tif (indentStr === undefined) {\n\t\t\tthis._ensureindentStr();\n\t\t\tindentStr = this.indentStr || '\\t';\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',\n\t\t\t);\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',\n\t\t\t);\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\t\tindex = index + this.offset;\n\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\toptions = options || {};\n\t\treturn this.update(start, end, content, { ...options, overwrite: !options.contentOnly });\n\t}\n\n\tupdate(start, end, content, options) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',\n\t\t\t);\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',\n\t\t\t\t);\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst overwrite = options !== undefined ? options.overwrite : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, {\n\t\t\t\twritable: true,\n\t\t\t\tvalue: true,\n\t\t\t\tenumerable: true,\n\t\t\t});\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, !overwrite);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\treset(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('reset');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.reset();\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('reset');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length - this.offset) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`,\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n\n\thasChanged() {\n\t\treturn this.original !== this.toString();\n\t}\n\n\t_replaceRegexp(searchValue, replacement) {\n\t\tfunction getReplacement(match, str) {\n\t\t\tif (typeof replacement === 'string') {\n\t\t\t\treturn replacement.replace(/\\$(\\$|&|\\d+)/g, (_, i) => {\n\t\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter\n\t\t\t\t\tif (i === '$') return '$';\n\t\t\t\t\tif (i === '&') return match[0];\n\t\t\t\t\tconst num = +i;\n\t\t\t\t\tif (num < match.length) return match[+i];\n\t\t\t\t\treturn `$${i}`;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn replacement(...match, match.index, str, match.groups);\n\t\t\t}\n\t\t}\n\t\tfunction matchAll(re, str) {\n\t\t\tlet match;\n\t\t\tconst matches = [];\n\t\t\twhile ((match = re.exec(str))) {\n\t\t\t\tmatches.push(match);\n\t\t\t}\n\t\t\treturn matches;\n\t\t}\n\t\tif (searchValue.global) {\n\t\t\tconst matches = matchAll(searchValue, this.original);\n\t\t\tmatches.forEach((match) => {\n\t\t\t\tif (match.index != null) {\n\t\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tconst match = this.original.match(searchValue);\n\t\t\tif (match && match.index != null) {\n\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t_replaceString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst index = original.indexOf(string);\n\n\t\tif (index !== -1) {\n\t\t\tthis.overwrite(index, index + string.length, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplace(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceString(searchValue, replacement);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n\n\t_replaceAllString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst stringLength = string.length;\n\t\tfor (\n\t\t\tlet index = original.indexOf(string);\n\t\t\tindex !== -1;\n\t\t\tindex = original.indexOf(string, index + stringLength)\n\t\t) {\n\t\t\tconst previous = original.slice(index, index + stringLength);\n\t\t\tif (previous !== replacement) this.overwrite(index, index + stringLength, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplaceAll(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceAllString(searchValue, replacement);\n\t\t}\n\n\t\tif (!searchValue.global) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'MagicString.prototype.replaceAll called with a non-global RegExp argument',\n\t\t\t);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tlet x_google_ignoreList = undefined;\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\n\t\t\tif (source.ignoreList && sourceIndex !== -1) {\n\t\t\t\tif (x_google_ignoreList === undefined) {\n\t\t\t\t\tx_google_ignoreList = [];\n\t\t\t\t}\n\t\t\t\tx_google_ignoreList.push(sourceIndex);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content._getRawIndentString();\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length,\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport Bundle from './Bundle.js';\nimport SourceMap from './SourceMap.js';\n\nMagicString.Bundle = Bundle;\nMagicString.SourceMap = SourceMap;\nMagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121\n\nexport default MagicString;\n"],"names":[],"mappings":";;;;;;CAAe,MAAM,MAAM,CAAC;CAC5B,CAAC,WAAW,CAAC,GAAG,EAAE;CAClB,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,YAAY,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;CAC5D,EAAE;AACF;CACA,CAAC,GAAG,CAAC,CAAC,EAAE;CACR,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;CACrC,EAAE;AACF;CACA,CAAC,GAAG,CAAC,CAAC,EAAE;CACR,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;CACjD,EAAE;CACF;;CCZe,MAAM,KAAK,CAAC;CAC3B,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;CAClC,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;CACpB,EAAE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;CAChB,EAAE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;;CAEzB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;CACjB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;;CAEjB,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;CACxB,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;CACxB,EAAE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;;CAErB,EAMS;CACT,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;CACvB,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;CACnB,GAAE;CACF,EAAC;;CAED,CAAC,UAAU,CAAC,OAAO,EAAE;CACrB,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;CACvB,EAAC;;CAED,CAAC,WAAW,CAAC,OAAO,EAAE;CACtB,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;CACnC,EAAC;;CAED,CAAC,KAAK,GAAG;CACT,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;;CAE9D,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;CAC1B,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;CAC1B,EAAE,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;CAC9B,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAA;CAClC,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;;CAE5B,EAAE,OAAO,KAAK,CAAA;CACd,EAAC;;CAED,CAAC,QAAQ,CAAC,KAAK,EAAE;CACjB,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAA;CAC/C,EAAC;;CAED,CAAC,QAAQ,CAAC,EAAE,EAAE;CACd,EAAE,IAAI,KAAK,GAAG,IAAI,CAAA;CAClB,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;CACZ,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACrB,GAAE;CACF,EAAC;;CAED,CAAC,YAAY,CAAC,EAAE,EAAE;CAClB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAA;CAClB,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;CACZ,GAAG,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAA;CACzB,GAAE;CACF,EAAC;;CAED,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE;CACvC,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;CACxB,EAAE,IAAI,CAAC,WAAW,EAAE;CACpB,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;CAClB,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;CAClB,GAAE;CACF,EAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;;CAE5B,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;;CAEpB,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,WAAW,CAAC,OAAO,EAAE;CACtB,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CACnC,EAAC;;CAED,CAAC,YAAY,CAAC,OAAO,EAAE;CACvB,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CACnC,EAAC;;CAED,CAAC,KAAK,GAAG;CACT,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;CACjB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;CACjB,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;CACnB,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAA;CAC/B,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;CACzB,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;CACtB,GAAE;CACF,EAAC;;CAED,CAAC,KAAK,CAAC,KAAK,EAAE;CACd,EAAE,MAAM,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;;CAEvC,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAA;CAC3D,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;;CAEvD,EAAE,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAA;;CAEhC,EAAE,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,CAAA;CAC5D,EAAE,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;CAC7B,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;;CAEjB,EAAE,IAAI,CAAC,GAAG,GAAG,KAAK,CAAA;;CAElB,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;CACnB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;CAC3B,GAAG,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;CACpB,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,OAAO,GAAG,cAAc,CAAA;CAChC,GAAE;;CAEF,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;CAC3B,EAAE,IAAI,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;CACtD,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;CAC1B,EAAE,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;;CAEtB,EAAE,OAAO,QAAQ,CAAA;CACjB,EAAC;;CAED,CAAC,QAAQ,GAAG;CACZ,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CAC/C,EAAC;;CAED,CAAC,OAAO,CAAC,EAAE,EAAE;CACb,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;CACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;CAEpC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;;CAE9C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;CACtB,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;CACjC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;CACrE,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;CACrB;CACA,KAAK,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;CAC7C,KAAI;CACJ,IAAG;CACH,GAAG,OAAO,IAAI,CAAA;CACd,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;;CAEjC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;CAC1C,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;CACrC,GAAE;CACF,EAAC;;CAED,CAAC,SAAS,CAAC,EAAE,EAAE;CACf,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;CACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;CAEpC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;;CAE9C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;CACtB,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;CACjC,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CAC1D,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;CACrB;CACA,KAAK,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;CACjD,KAAI;CACJ,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;CAClC,IAAG;CACH,GAAG,OAAO,IAAI,CAAA;CACd,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;;CAEjC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;CAC1C,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;CACrC,GAAE;CACF,EAAC;CACD;;CCvLA,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CACpC,MAAM,KAAK,GAAG,kEAAkE,CAAC;CACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;CACrC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;CACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACvC,IAAI,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CAClC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACrB,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACrB,CAAC;CAkBD,SAAS,aAAa,CAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE;CAC/C,IAAI,IAAI,KAAK,GAAG,GAAG,GAAG,QAAQ,CAAC;CAC/B,IAAI,KAAK,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC;CACvD,IAAI,GAAG;CACP,QAAQ,IAAI,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;CACvC,QAAQ,KAAK,MAAM,CAAC,CAAC;CACrB,QAAQ,IAAI,KAAK,GAAG,CAAC;CACrB,YAAY,OAAO,IAAI,QAAQ,CAAC;CAChC,QAAQ,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;CAC1C,KAAK,QAAQ,KAAK,GAAG,CAAC,EAAE;CACxB,IAAI,OAAO,GAAG,CAAC;CACf,CAAC;AAMD;CACA,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;CAC5B;CACA,MAAM,EAAE,GAAG,OAAO,WAAW,KAAK,WAAW;CAC7C,sBAAsB,IAAI,WAAW,EAAE;CACvC,MAAM,OAAO,MAAM,KAAK,WAAW;CACnC,UAAU;CACV,YAAY,MAAM,CAAC,GAAG,EAAE;CACxB,gBAAgB,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;CACpF,gBAAgB,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;CACtC,aAAa;CACb,SAAS;CACT,UAAU;CACV,YAAY,MAAM,CAAC,GAAG,EAAE;CACxB,gBAAgB,IAAI,GAAG,GAAG,EAAE,CAAC;CAC7B,gBAAgB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACrD,oBAAoB,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;CACvD,iBAAiB;CACjB,gBAAgB,OAAO,GAAG,CAAC;CAC3B,aAAa;CACb,SAAS,CAAC;CACV,MAAM,YAAY,CAAC;CACnB,IAAI,WAAW,GAAG;CAClB,QAAQ,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;CACrB,QAAQ,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;CACtB,QAAQ,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC;CAChD,KAAK;CACL,IAAI,KAAK,CAAC,CAAC,EAAE;CACb,QAAQ,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAChC,QAAQ,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;CAC/B,QAAQ,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE;CACpC,YAAY,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CAC1C,YAAY,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;CACzB,SAAS;CACT,KAAK;CACL,IAAI,KAAK,GAAG;CACZ,QAAQ,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;CAC1C,QAAQ,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;CACxE,KAAK;CACL,CAAC;CAoTD,SAAS,MAAM,CAAC,OAAO,EAAE;CACzB,IAAI,MAAM,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;CACtC,IAAI,IAAI,YAAY,GAAG,CAAC,CAAC;CACzB,IAAI,IAAI,UAAU,GAAG,CAAC,CAAC;CACvB,IAAI,IAAI,YAAY,GAAG,CAAC,CAAC;CACzB,IAAI,IAAI,UAAU,GAAG,CAAC,CAAC;CACvB,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CAC7C,QAAQ,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAChC,QAAQ,IAAI,CAAC,GAAG,CAAC;CACjB,YAAY,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;CACpC,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;CAC7B,YAAY,SAAS;CACrB,QAAQ,IAAI,SAAS,GAAG,CAAC,CAAC;CAC1B,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CAC9C,YAAY,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;CACpC,YAAY,IAAI,CAAC,GAAG,CAAC;CACrB,gBAAgB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;CACpC,YAAY,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;CACrE,YAAY,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;CACpC,gBAAgB,SAAS;CACzB,YAAY,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;CAC3E,YAAY,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;CACvE,YAAY,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;CAC3E,YAAY,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;CACpC,gBAAgB,SAAS;CACzB,YAAY,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;CACvE,SAAS;CACT,KAAK;CACL,IAAI,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;CAC1B;;CClaA,SAAS,OAAO,GAAG;CACnB,CAAC,IAAI,OAAO,UAAU,KAAK,WAAW,IAAI,OAAO,UAAU,CAAC,IAAI,KAAK,UAAU,EAAE;CACjF,EAAE,OAAO,CAAC,GAAG,KAAK,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrE,EAAE,MAAM,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;CAC1C,EAAE,OAAO,CAAC,GAAG,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;CAC/D,EAAE,MAAM;CACR,EAAE,OAAO,MAAM;CACf,GAAG,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;CAC9F,GAAG,CAAC;CACJ,EAAE;CACF,CAAC;AACD;CACA,MAAM,IAAI,iBAAiB,OAAO,EAAE,CAAC;AACrC;CACe,MAAM,SAAS,CAAC;CAC/B,CAAC,WAAW,CAAC,UAAU,EAAE;CACzB,EAAE,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;CACnB,EAAE,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;CAC9B,EAAE,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;CACpC,EAAE,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;CAClD,EAAE,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;CAChC,EAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;CAC9C,EAAE,IAAI,OAAO,UAAU,CAAC,mBAAmB,KAAK,WAAW,EAAE;CAC7D,GAAG,IAAI,CAAC,mBAAmB,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAC7D,GAAG;CACH,EAAE,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,WAAW,EAAE;CACjD,GAAG,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;CACrC,GAAG;CACH,EAAE;AACF;CACA,CAAC,QAAQ,GAAG;CACZ,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;CAC9B,EAAE;AACF;CACA,CAAC,KAAK,GAAG;CACT,EAAE,OAAO,6CAA6C,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;CAC/E,EAAE;CACF;;CCvCe,SAAS,WAAW,CAAC,IAAI,EAAE;CAC1C,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC;CACA,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;CAC1D,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5D;CACA,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;CACjD,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA;CACA;CACA;CACA,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE;CACrC,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA;CACA,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK;CAClD,EAAE,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;CAClD,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;CACvC,EAAE,EAAE,QAAQ,CAAC,CAAC;AACd;CACA,CAAC,OAAO,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;CACrC;;CCxBe,SAAS,eAAe,CAAC,IAAI,EAAE,EAAE,EAAE;CAClD,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;CACvC,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACnC;CACA,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;AACjB;CACA,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE;CACrC,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC;CACpB,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;CAClB,EAAE;AACF;CACA,CAAC,IAAI,SAAS,CAAC,MAAM,EAAE;CACvB,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;CAC3B,EAAE,OAAO,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAClC,EAAE;AACF;CACA,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;CAC5C;;CCjBA,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C;CACe,SAAS,QAAQ,CAAC,KAAK,EAAE;CACxC,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,iBAAiB,CAAC;CACnD;;CCJe,SAAS,UAAU,CAAC,MAAM,EAAE;CAC3C,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;CAC1C,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AACxB;CACA,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACzD,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;CACxB,EAAE,GAAG,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;CACrC,EAAE;AACF;CACA,CAAC,OAAO,SAAS,MAAM,CAAC,KAAK,EAAE;CAC/B,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;CACZ,EAAE,IAAI,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC;CAC7B,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE;CAChB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CAC1B,GAAG,IAAI,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE;CAC/B,IAAI,CAAC,GAAG,CAAC,CAAC;CACV,IAAI,MAAM;CACV,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACd,IAAI;CACJ,GAAG;CACH,EAAE,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;CACrB,EAAE,MAAM,MAAM,GAAG,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;CAC3C,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;CAC1B,EAAE,CAAC;CACH;;CCxBA,MAAM,SAAS,GAAG,IAAI,CAAC;AACvB;CACe,MAAM,QAAQ,CAAC;CAC9B,CAAC,WAAW,CAAC,KAAK,EAAE;CACpB,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;CACrB,EAAE,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;CAC7B,EAAE,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;CAC/B,EAAE,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;CAChB,EAAE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC;CAC3D,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;CACtB,EAAE;AACF;CACA,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE;CAC/C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;CACtB,GAAG,MAAM,qBAAqB,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;CACpD,GAAG,IAAI,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;CACjD,GAAG,IAAI,sBAAsB,GAAG,CAAC,CAAC,CAAC;CACnC;CACA;CACA,GAAG,OAAO,cAAc,IAAI,CAAC,IAAI,qBAAqB,GAAG,cAAc,EAAE;CACzE,IAAI,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAClF,IAAI,IAAI,SAAS,IAAI,CAAC,EAAE;CACxB,KAAK,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;CAC7B,KAAK;CACL,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACnC;CACA,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;CAChC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;CAC7D,IAAI,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AACjC;CACA,IAAI,sBAAsB,GAAG,cAAc,CAAC;CAC5C,IAAI,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,CAAC,CAAC,CAAC;CAC/D,IAAI;AACJ;CACA,GAAG,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACjF,GAAG,IAAI,SAAS,IAAI,CAAC,EAAE;CACvB,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;CAC5B,IAAI;CACJ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAClC;CACA,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC;CAC3D,GAAG,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;CAC3B,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;CACvC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;CACzB,GAAG;AACH;CACA,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;CACtB,EAAE;AACF;CACA,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,kBAAkB,EAAE;CACzE,EAAE,IAAI,iBAAiB,GAAG,KAAK,CAAC,KAAK,CAAC;CACtC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC;CACnB;CACA,EAAE,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAClC;CACA,EAAE,OAAO,iBAAiB,GAAG,KAAK,CAAC,GAAG,EAAE;CACxC,GAAG,IAAI,QAAQ,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE;CAC7C,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC;CAClB,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;CACnB,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;CAChC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;CAC7D,IAAI,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;CACjC,IAAI,KAAK,GAAG,IAAI,CAAC;CACjB,IAAI,mBAAmB,GAAG,KAAK,CAAC;CAChC,IAAI,MAAM;CACV,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK,IAAI,kBAAkB,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;CAC1E,KAAK,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AACnF;CACA,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,UAAU,EAAE;CACpC;CACA,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,EAAE;CACvD;CACA,OAAO,IAAI,CAAC,mBAAmB,EAAE;CACjC,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;CACvC,QAAQ,mBAAmB,GAAG,IAAI,CAAC;CACnC,QAAQ;CACR,OAAO,MAAM;CACb;CACA,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;CACtC,OAAO,mBAAmB,GAAG,KAAK,CAAC;CACnC,OAAO;CACP,MAAM,MAAM;CACZ,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;CACrC,MAAM;CACN,KAAK;AACL;CACA,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;CACpB,IAAI,IAAI,CAAC,mBAAmB,IAAI,CAAC,CAAC;CAClC,IAAI,KAAK,GAAG,KAAK,CAAC;CAClB,IAAI;AACJ;CACA,GAAG,iBAAiB,IAAI,CAAC,CAAC;CAC1B,GAAG;AACH;CACA,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;CACtB,EAAE;AACF;CACA,CAAC,OAAO,CAAC,GAAG,EAAE;CACd,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO;AACnB;CACA,EAAE,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC;CACA,EAAE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;CACxB,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;CAC9C,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;CAC7B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;CAC7D,IAAI;CACJ,GAAG,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;CAChC,GAAG;AACH;CACA,EAAE,IAAI,CAAC,mBAAmB,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;CAC7D,EAAE;CACF;;CCtGA,MAAM,CAAC,GAAG,IAAI,CAAA;;CAEd,MAAM,MAAM,GAAG;CACf,CAAC,UAAU,EAAE,KAAK;CAClB,CAAC,WAAW,EAAE,KAAK;CACnB,CAAC,SAAS,EAAE,KAAK;CACjB,CAAC,CAAA;;CAEc,MAAM,WAAW,CAAC;CACjC,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE;CACnC,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;;CAEnD,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE;CAChC,GAAG,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE;CAC9C,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;CACvC,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;CACvC,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;CAC/C,GAAG,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;CAC9C,GAAG,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;CACtD,GAAG,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;CACzC,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;CACvC,GAAG,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE;CACxD,GAAG,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,qBAAqB,EAAE;CAClF,GAAG,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,MAAM,EAAE,EAAE;CAC9D,GAAG,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;CAC7C,GAAG,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;CAClD,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,EAAE;CAC5D,GAAG,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE;CACzD,GAAG,CAAC,CAAA;;CAMJ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;CACzB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAA;CACnC,EAAC;;CAED,CAAC,oBAAoB,CAAC,IAAI,EAAE;CAC5B,EAAE,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;CACnC,EAAC;;CAED,CAAC,MAAM,CAAC,OAAO,EAAE;CACjB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAA;;CAExF,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;CACvB,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE;CAC5B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;CAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;CAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;CAEjC,EAAE,IAAI,KAAK,EAAE;CACb,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;CAC5B,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;CACxB,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;CAC7B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;CAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;CAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;CAEnC,EAAE,IAAI,KAAK,EAAE;CACb,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;CAC7B,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;CACxB,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,KAAK,GAAG;CACT,EAAE,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;;CAEjG,EAAE,IAAI,aAAa,GAAG,IAAI,CAAC,UAAU,CAAA;CACrC,EAAE,IAAI,WAAW,IAAI,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,iBAAiB,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC,CAAA;;CAE1F,EAAE,OAAO,aAAa,EAAE;CACxB,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,WAAW,CAAA;CAClD,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAA;;CAE9C,GAAG,MAAM,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAA;CAC/C,GAAG,MAAM,eAAe,GAAG,iBAAiB,IAAI,iBAAiB,CAAC,KAAK,EAAE,CAAA;;CAEzE,GAAG,IAAI,eAAe,EAAE;CACxB,IAAI,WAAW,CAAC,IAAI,GAAG,eAAe,CAAA;CACtC,IAAI,eAAe,CAAC,QAAQ,GAAG,WAAW,CAAA;;CAE1C,IAAI,WAAW,GAAG,eAAe,CAAA;CACjC,IAAG;;CAEH,GAAG,aAAa,GAAG,iBAAiB,CAAA;CACpC,GAAE;;CAEF,EAAE,MAAM,CAAC,SAAS,GAAG,WAAW,CAAA;;CAEhC,EAAE,IAAI,IAAI,CAAC,qBAAqB,EAAE;CAClC,GAAG,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAA;CACpE,GAAE;;CAEF,EAAE,MAAM,CAAC,kBAAkB,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;;CAEjE,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;CAC3B,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;;CAE3B,EAAE,OAAO,MAAM,CAAA;CACf,EAAC;;CAED,CAAC,kBAAkB,CAAC,OAAO,EAAE;CAC7B,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;;CAEzB,EAAE,MAAM,WAAW,GAAG,CAAC,CAAA;CACvB,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;CAC7C,EAAE,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;CAE9C,EAAE,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;;CAE1C,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;CAClB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;CAC/B,GAAE;;CAEF,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,KAAK;CACtC,GAAG,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;CAElC,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;CAExD,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;CACrB,IAAI,QAAQ,CAAC,OAAO;CACpB,KAAK,WAAW;CAChB,KAAK,KAAK,CAAC,OAAO;CAClB,KAAK,GAAG;CACR,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;CACzD,KAAK,CAAA;CACL,IAAI,MAAM;CACV,IAAI,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAA;CAC9F,IAAG;;CAEH,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;CACxD,GAAG,CAAC,CAAA;;CAEJ,EAAE,OAAO;CACT,GAAG,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,SAAS;CACrE,GAAG,OAAO,EAAE;CACZ,IAAI,OAAO,CAAC,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE;CAC7F,IAAI;CACJ,GAAG,cAAc,EAAE,OAAO,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,SAAS;CACvE,GAAG,KAAK;CACR,GAAG,QAAQ,EAAE,QAAQ,CAAC,GAAG;CACzB,GAAG,mBAAmB,EAAE,IAAI,CAAC,UAAU,GAAG,CAAC,WAAW,CAAC,GAAG,SAAS;CACnE,GAAG,CAAA;CACH,EAAC;;CAED,CAAC,WAAW,CAAC,OAAO,EAAE;CACtB,EAAE,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAA;CACxD,EAAC;;CAED,CAAC,gBAAgB,GAAG;CACpB,EAAE,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;CACpC,GAAG,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;CAC9C,GAAE;CACF,EAAC;;CAED,CAAC,mBAAmB,GAAG;CACvB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAA;CACzB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAA;CACvB,EAAC;;CAED,CAAC,eAAe,GAAG;CACnB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAA;CACzB,EAAE,OAAO,IAAI,CAAC,SAAS,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,SAAS,CAAA;CACxD,EAAC;;CAED,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE;CAC5B,EAAE,MAAM,OAAO,GAAG,YAAY,CAAA;;CAE9B,EAAE,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE;CAC3B,GAAG,OAAO,GAAG,SAAS,CAAA;CACtB,GAAG,SAAS,GAAG,SAAS,CAAA;CACxB,GAAE;;CAEF,EAAE,IAAI,SAAS,KAAK,SAAS,EAAE;CAC/B,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAA;CAC1B,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAA;CACrC,GAAE;;CAEF,EAAE,IAAI,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC;;CAEpC,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;;CAEzB;CACA,EAAE,MAAM,UAAU,GAAG,EAAE,CAAA;;CAEvB,EAAE,IAAI,OAAO,CAAC,OAAO,EAAE;CACvB,GAAG,MAAM,UAAU;CACnB,IAAI,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;CAChF,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,KAAK;CACrC,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;CACzD,KAAK,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;CACzB,KAAI;CACJ,IAAI,CAAC,CAAA;CACL,GAAE;;CAEF,EAAE,IAAI,yBAAyB,GAAG,OAAO,CAAC,WAAW,KAAK,KAAK,CAAA;CAC/D,EAAE,MAAM,QAAQ,GAAG,CAAC,KAAK,KAAK;CAC9B,GAAG,IAAI,yBAAyB,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;CAC/D,GAAG,yBAAyB,GAAG,IAAI,CAAA;CACnC,GAAG,OAAO,KAAK,CAAA;CACf,GAAG,CAAA;;CAEH,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;CAEpD,EAAE,IAAI,SAAS,GAAG,CAAC,CAAA;CACnB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;;CAE7B,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;;CAExB,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;CACrB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;CAChC,KAAK,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;CAE7D,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;CAC/B,MAAM,yBAAyB,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAA;CAClF,MAAK;CACL,KAAI;CACJ,IAAI,MAAM;CACV,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAA;;CAE3B,IAAI,OAAO,SAAS,GAAG,GAAG,EAAE;CAC5B,KAAK,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;CACjC,MAAM,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;;CAE3C,MAAM,IAAI,IAAI,KAAK,IAAI,EAAE;CACzB,OAAO,yBAAyB,GAAG,IAAI,CAAA;CACvC,OAAO,MAAM,IAAI,IAAI,KAAK,IAAI,IAAI,yBAAyB,EAAE;CAC7D,OAAO,yBAAyB,GAAG,KAAK,CAAA;;CAExC,OAAO,IAAI,SAAS,KAAK,KAAK,CAAC,KAAK,EAAE;CACtC,QAAQ,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;CACrC,QAAQ,MAAM;CACd,QAAQ,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;CAC1C,QAAQ,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CAC1B,QAAQ,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;CACrC,QAAO;CACP,OAAM;CACN,MAAK;;CAEL,KAAK,SAAS,IAAI,CAAC,CAAA;CACnB,KAAI;CACJ,IAAG;;CAEH,GAAG,SAAS,GAAG,KAAK,CAAC,GAAG,CAAA;CACxB,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACrB,GAAE;;CAEF,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;CAEpD,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,MAAM,GAAG;CACV,EAAE,MAAM,IAAI,KAAK;CACjB,GAAG,iFAAiF;CACpF,GAAG,CAAA;CACH,EAAC;;CAED,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE;CAC5B,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;CAC1B,GAAG,OAAO,CAAC,IAAI;CACf,IAAI,oFAAoF;CACxF,IAAI,CAAA;CACJ,GAAG,MAAM,CAAC,UAAU,GAAG,IAAI,CAAA;CAC3B,GAAE;;CAEF,EAAE,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;CACxC,EAAC;;CAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;CAC7B,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE;CAC3B,GAAG,OAAO,CAAC,IAAI;CACf,IAAI,uFAAuF;CAC3F,IAAI,CAAA;CACJ,GAAG,MAAM,CAAC,WAAW,GAAG,IAAI,CAAA;CAC5B,GAAE;;CAEF,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;CAC1C,EAAC;;CAED,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE;CACzB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;CAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;CACzB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;CAE7B,EAAE,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;;CAI9F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;CACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;CAClB,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;CACnC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;;CAE9B,EAAE,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAA;CAChC,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAA;;CAE5B,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;CACtC,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,KAAK,IAAI,CAAC,SAAS,EAAE,OAAO,IAAI,CAAA;CACvD,EAAE,MAAM,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAA;;CAE/D,EAAE,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAA;CACtC,EAAE,IAAI,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAA;;CAE3C,EAAE,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,GAAG,KAAK,CAAA;CACnC,EAAE,IAAI,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;;CAExC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAA;CAClD,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;CAClB,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAA;CAClC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAA;CAC7B,GAAE;;CAEF,EAAE,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAA;CAC1B,EAAE,IAAI,CAAC,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAA;;CAE9B,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;CACvC,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;CAGtC,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;CACzC,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;CACzB,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;CAC1F,EAAC;;CAED,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;CACtC,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;CAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;CAEzB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;;CAE9F,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;CAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAC9C,GAAE;;CAEF,EAAE,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;CACzE,EAAE,IAAI,KAAK,KAAK,GAAG;CACnB,GAAG,MAAM,IAAI,KAAK;CAClB,IAAI,+EAA+E;CACnF,IAAI,CAAA;;CAIJ,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;CACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;CAElB,EAAE,IAAI,OAAO,KAAK,IAAI,EAAE;CACxB,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;CAC1B,IAAI,OAAO,CAAC,IAAI;CAChB,KAAK,+HAA+H;CACpI,KAAK,CAAA;CACL,IAAI,MAAM,CAAC,SAAS,GAAG,IAAI,CAAA;CAC3B,IAAG;;CAEH,GAAG,OAAO,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAA;CAChC,GAAE;CACF,EAAE,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAA;CACrE,EAAE,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAA;;CAErE,EAAE,IAAI,SAAS,EAAE;CACjB,GAAG,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;CACnD,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE;CACrD,IAAI,QAAQ,EAAE,IAAI;CAClB,IAAI,KAAK,EAAE,IAAI;CACf,IAAI,UAAU,EAAE,IAAI;CACpB,IAAI,CAAC,CAAA;CACL,GAAE;;CAEF,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;CACnC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;;CAE9B,EAAE,IAAI,KAAK,EAAE;CACb,GAAG,IAAI,KAAK,GAAG,KAAK,CAAA;CACpB,GAAG,OAAO,KAAK,KAAK,IAAI,EAAE;CAC1B,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;CAChD,KAAK,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;CAC7D,KAAI;CACJ,IAAI,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACtB,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;CACzB,IAAG;;CAEH,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,CAAA;CAC7C,GAAG,MAAM;CACT;CACA,GAAG,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;;CAEtE;CACA,GAAG,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;CACvB,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;CAC3B,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,OAAO,CAAC,OAAO,EAAE;CAClB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAA;;CAExF,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CACnC,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;CAC7B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;CAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;CAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;CAEjC,EAAE,IAAI,KAAK,EAAE;CACb,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;CAC7B,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CACpC,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE;CAC9B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;CAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;CAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;CAEnC,EAAE,IAAI,KAAK,EAAE;CACb,GAAG,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;CAC9B,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CACpC,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE;CACpB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;CAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;CAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;CAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAC9C,GAAE;;CAEF,EAAE,IAAI,KAAK,KAAK,GAAG,EAAE,OAAO,IAAI,CAAA;;CAEhC,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;CAC5F,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;;CAIpE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;CACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;CAElB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;CAEjC,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;CACnB,GAAG,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;CACnB,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;;CAEjB,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;CAC3D,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE;CACnB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;CAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;CAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;CAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAC9C,GAAE;;CAEF,EAAE,IAAI,KAAK,KAAK,GAAG,EAAE,OAAO,IAAI,CAAA;;CAEhC,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;CAC5F,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;;CAIpE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;CACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;CAElB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;CAEjC,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,KAAK,CAAC,KAAK,EAAE,CAAA;;CAEhB,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;CAC3D,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,QAAQ,GAAG;CACZ,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;CACjE,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;CAC5B,EAAE,GAAG;CACL,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;CACrE,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;CAC3E,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;CACrE,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,QAAQ,GAAE;CACpC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;CACjE,EAAE,OAAO,EAAE,CAAA;CACX,EAAC;;CAED,CAAC,QAAQ,GAAG;CACZ,EAAE,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;CAC3C,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,CAAA;CAC/D,EAAE,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CAC1B,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;CAC5B,EAAE,GAAG;CACL,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;CAC/B,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;CAC1C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;CAC5E,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,OAAO,CAAA;CACnC,IAAG;;CAEH,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;CACjC,IAAI,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;CAC5C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;CAC9E,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,GAAG,OAAO,CAAA;CACrC,IAAG;;CAEH,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;CAC/B,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;CAC1C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;CAC5E,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,OAAO,CAAA;CACnC,IAAG;CACH,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,QAAQ,GAAE;CACpC,EAAE,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;CACvC,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;CACzE,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;CAC7B,EAAC;;CAED,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;CAC5D,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;CAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;CAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;CAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAC9C,GAAE;;CAEF,EAAE,IAAI,MAAM,GAAG,EAAE,CAAA;;CAEjB;CACA,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;CAC7B,EAAE,OAAO,KAAK,KAAK,KAAK,CAAC,KAAK,GAAG,KAAK,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE;CAC/D;CACA,GAAG,IAAI,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE;CAC9C,IAAI,OAAO,MAAM,CAAA;CACjB,IAAG;;CAEH,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACrB,GAAE;;CAEF,EAAE,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK;CACpD,GAAG,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAA;;CAEnF,EAAE,MAAM,UAAU,GAAG,KAAK,CAAA;CAC1B,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,UAAU,KAAK,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,EAAE;CACvE,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAA;CACzB,IAAG;;CAEH,GAAG,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAAG,CAAA;CAC5D,GAAG,IAAI,WAAW,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG;CACvD,IAAI,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAA;;CAEhF,GAAG,MAAM,UAAU,GAAG,UAAU,KAAK,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAA;CACpE,GAAG,MAAM,QAAQ,GAAG,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAA;;CAE/F,GAAG,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;;CAEtD,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE;CAC3D,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAA;CACzB,IAAG;;CAEH,GAAG,IAAI,WAAW,EAAE;CACpB,IAAI,MAAK;CACT,IAAG;;CAEH,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACrB,GAAE;;CAEF,EAAE,OAAO,MAAM,CAAA;CACf,EAAC;;CAED;CACA,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE;CAClB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAA;CAC5B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;CACxB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;;CAE1C,EAAE,OAAO,KAAK,CAAA;CACd,EAAC;;CAED,CAAC,MAAM,CAAC,KAAK,EAAE;CACf,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAM;;CAItD,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAA;CACpC,EAAE,MAAM,aAAa,GAAG,KAAK,GAAG,KAAK,CAAC,GAAG,CAAA;;CAEzC,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;;CAEnE,GAAG,KAAK,GAAG,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;CAC5E,GAAE;CACF,EAAC;;CAED,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE;CAC3B,EAAE,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;CAC5C;CACA,GAAG,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAA;CAC/C,GAAG,MAAM,IAAI,KAAK;CAClB,IAAI,CAAC,mDAAmD,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;CACzG,IAAI,CAAA;CACJ,GAAE;;CAEF,EAAE,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;CAErC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;CAC3B,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAA;CAChC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAA;;CAErC,EAAE,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;;CAEzD,EAAE,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAA;CAEhC,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,QAAQ,GAAG;CACZ,EAAE,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAA;;CAEtB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;CAC7B,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAA;CAC1B,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACrB,GAAE;;CAEF,EAAE,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK,CAAA;CACzB,EAAC;;CAED,CAAC,OAAO,GAAG;CACX,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;CAC7B,EAAE,GAAG;CACL,GAAG;CACH,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;CAC7C,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;CAClD,KAAK,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;CAC7C;CACA,IAAI,OAAO,KAAK,CAAA;CAChB,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,IAAI,GAAE;CAChC,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,MAAM,GAAG;CACV,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;CAC7B,EAAE,IAAI,MAAM,GAAG,CAAC,CAAA;CAChB,EAAE,GAAG;CACL,GAAG,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAA;CAC3E,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,IAAI,GAAE;CAChC,EAAE,OAAO,MAAM,CAAA;CACf,EAAC;;CAED,CAAC,SAAS,GAAG;CACb,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;CAC9B,EAAC;;CAED,CAAC,IAAI,CAAC,QAAQ,EAAE;CAChB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;CACnD,EAAC;;CAED,CAAC,cAAc,CAAC,QAAQ,EAAE;CAC1B,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAA;;CAEnD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;CACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;CAEpC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;;CAE5B,EAAE,GAAG;CACL,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;CACxB,GAAG,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;;CAEpC;CACA,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;CAC1B,IAAI,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE;CAClC,KAAK,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAA;CAChC,KAAI;;CAEJ,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;CACjC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;CAC/C,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;CAC3C,IAAG;;CAEH,GAAG,IAAI,OAAO,EAAE,OAAO,IAAI,CAAA;CAC3B,GAAG,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAA;CACzB,GAAG,QAAQ,KAAK,EAAC;;CAEjB,EAAE,OAAO,KAAK,CAAA;CACd,EAAC;;CAED,CAAC,OAAO,CAAC,QAAQ,EAAE;CACnB,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;CAC/B,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;CACD,CAAC,gBAAgB,CAAC,QAAQ,EAAE;CAC5B,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAA;;CAExD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;CACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;CAEpC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;;CAE7B,EAAE,GAAG;CACL,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;CACxB,GAAG,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;;CAEtC,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;CAC1B;CACA,IAAI,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAA;;CAE7D,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;CACjC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;CAC/C,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;CAC3C,IAAG;;CAEH,GAAG,IAAI,OAAO,EAAE,OAAO,IAAI,CAAA;CAC3B,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACrB,GAAG,QAAQ,KAAK,EAAC;;CAEjB,EAAE,OAAO,KAAK,CAAA;CACd,EAAC;;CAED,CAAC,SAAS,CAAC,QAAQ,EAAE;CACrB,EAAE,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAA;CACjC,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,UAAU,GAAG;CACd,EAAE,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAA;CAC1C,EAAC;;CAED,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE;CAC1C,EAAE,SAAS,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE;CACtC,GAAG,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;CACxC,IAAI,OAAO,WAAW,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK;CAC1D;CACA,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,GAAG,CAAA;CAC9B,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAA;CACnC,KAAK,MAAM,GAAG,GAAG,CAAC,CAAC,CAAA;CACnB,KAAK,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;CAC7C,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;CACnB,KAAK,CAAC,CAAA;CACN,IAAI,MAAM;CACV,IAAI,OAAO,WAAW,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAChE,IAAG;CACH,GAAE;CACF,EAAE,SAAS,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE;CAC7B,GAAG,IAAI,KAAK,CAAA;CACZ,GAAG,MAAM,OAAO,GAAG,EAAE,CAAA;CACrB,GAAG,QAAQ,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;CAClC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;CACvB,IAAG;CACH,GAAG,OAAO,OAAO,CAAA;CACjB,GAAE;CACF,EAAE,IAAI,WAAW,CAAC,MAAM,EAAE;CAC1B,GAAG,MAAM,OAAO,GAAG,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;CACvD,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK;CAC9B,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;CAC7B,KAAK,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;CAC7D,KAAK,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;CACnC,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;CAC7E,MAAK;CACL,KAAI;CACJ,IAAI,CAAC,CAAA;CACL,GAAG,MAAM;CACT,GAAG,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;CACjD,GAAG,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;CACrC,IAAI,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;CAC5D,IAAI,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;CAClC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;CAC5E,KAAI;CACJ,IAAG;CACH,GAAE;CACF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;CACrC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;CAC3B,EAAE,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;;CAExC,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;CACpB,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;CAC5D,GAAE;;CAEF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,EAAE;CACnC,EAAE,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;CACvC,GAAG,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;CACvD,GAAE;;CAEF,EAAE,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;CACtD,EAAC;;CAED,CAAC,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE;CACxC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;CAC3B,EAAE,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAA;CACpC,EAAE;CACF,GAAG,IAAI,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;CACvC,GAAG,KAAK,KAAK,CAAC,CAAC;CACf,GAAG,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,YAAY,CAAA;CACxD,IAAI;CACJ,GAAG,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,CAAC,CAAA;CAC/D,GAAG,IAAI,QAAQ,KAAK,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,EAAE,WAAW,CAAC,CAAA;CACzF,GAAE;;CAEF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE;CACtC,EAAE,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;CACvC,GAAG,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;CAC1D,GAAE;;CAEF,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;CAC3B,GAAG,MAAM,IAAI,SAAS;CACtB,IAAI,2EAA2E;CAC/E,IAAI,CAAA;CACJ,GAAE;;CAEF,EAAE,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;CACtD,EAAC;CACD;;CC33BA,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD;CACe,MAAM,MAAM,CAAC;CAC5B,CAAC,WAAW,CAAC,OAAO,GAAG,EAAE,EAAE;CAC3B,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;CACnC,EAAE,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;CAC9E,EAAE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;CACpB,EAAE,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;CAC1B,EAAE,IAAI,CAAC,2BAA2B,GAAG,EAAE,CAAC;CACxC,EAAE;AACF;CACA,CAAC,SAAS,CAAC,MAAM,EAAE;CACnB,EAAE,IAAI,MAAM,YAAY,WAAW,EAAE;CACrC,GAAG,OAAO,IAAI,CAAC,SAAS,CAAC;CACzB,IAAI,OAAO,EAAE,MAAM;CACnB,IAAI,QAAQ,EAAE,MAAM,CAAC,QAAQ;CAC7B,IAAI,SAAS,EAAE,IAAI,CAAC,SAAS;CAC7B,IAAI,CAAC,CAAC;CACN,GAAG;AACH;CACA,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;CAC5C,GAAG,MAAM,IAAI,KAAK;CAClB,IAAI,sIAAsI;CAC1I,IAAI,CAAC;CACL,GAAG;AACH;CACA,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;CACvF,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;CACjF,GAAG,CAAC,CAAC;AACL;CACA,EAAE,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,EAAE;CACtC;CACA,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;CACrC,GAAG;AACH;CACA,EAAE,IAAI,MAAM,CAAC,QAAQ,EAAE;CACvB,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE;CAC5E,IAAI,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;CAClF,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;CAC7F,IAAI,MAAM;CACV,IAAI,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC/F,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,KAAK,YAAY,CAAC,OAAO,EAAE;CAC1D,KAAK,MAAM,IAAI,KAAK,CAAC,CAAC,+BAA+B,EAAE,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC,CAAC;CAC/F,KAAK;CACL,IAAI;CACJ,GAAG;AACH;CACA,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;CAC5B,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE;CACtB,EAAE,IAAI,CAAC,SAAS,CAAC;CACjB,GAAG,OAAO,EAAE,IAAI,WAAW,CAAC,GAAG,CAAC;CAChC,GAAG,SAAS,EAAE,CAAC,OAAO,IAAI,OAAO,CAAC,SAAS,KAAK,EAAE;CAClD,GAAG,CAAC,CAAC;AACL;CACA,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA,CAAC,KAAK,GAAG;CACT,EAAE,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC;CAC5B,GAAG,KAAK,EAAE,IAAI,CAAC,KAAK;CACpB,GAAG,SAAS,EAAE,IAAI,CAAC,SAAS;CAC5B,GAAG,CAAC,CAAC;AACL;CACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;CACnC,GAAG,MAAM,CAAC,SAAS,CAAC;CACpB,IAAI,QAAQ,EAAE,MAAM,CAAC,QAAQ;CAC7B,IAAI,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE;CACnC,IAAI,SAAS,EAAE,MAAM,CAAC,SAAS;CAC/B,IAAI,CAAC,CAAC;CACN,GAAG,CAAC,CAAC;AACL;CACA,EAAE,OAAO,MAAM,CAAC;CAChB,EAAE;AACF;CACA,CAAC,kBAAkB,CAAC,OAAO,GAAG,EAAE,EAAE;CAClC,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;CACnB,EAAE,IAAI,mBAAmB,GAAG,SAAS,CAAC;CACtC,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;CACnC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK;CAC7D,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CAChD,IAAI,CAAC,CAAC;CACN,GAAG,CAAC,CAAC;AACL;CACA,EAAE,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC/C;CACA,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;CAClB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;CAChC,GAAG;AACH;CACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;CACtC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE;CACd,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;CACrC,IAAI;AACJ;CACA,GAAG,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;CAChG,GAAG,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;CACtC,GAAG,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;AACnD;CACA,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;CAC1B,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;CACxC,IAAI;AACJ;CACA,GAAG,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,KAAK;CAC9C,IAAI,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACpC;CACA,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1D;CACA,IAAI,IAAI,MAAM,CAAC,QAAQ,EAAE;CACzB,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE;CACvB,MAAM,QAAQ,CAAC,OAAO;CACtB,OAAO,WAAW;CAClB,OAAO,KAAK,CAAC,OAAO;CACpB,OAAO,GAAG;CACV,OAAO,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;CAC3D,OAAO,CAAC;CACR,MAAM,MAAM;CACZ,MAAM,QAAQ,CAAC,gBAAgB;CAC/B,OAAO,WAAW;CAClB,OAAO,KAAK;CACZ,OAAO,WAAW,CAAC,QAAQ;CAC3B,OAAO,GAAG;CACV,OAAO,WAAW,CAAC,kBAAkB;CACrC,OAAO,CAAC;CACR,MAAM;CACN,KAAK,MAAM;CACX,KAAK,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;CACrC,KAAK;AACL;CACA,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;CAC1D,IAAI,CAAC,CAAC;AACN;CACA,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;CAC1B,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;CACxC,IAAI;AACJ;CACA,GAAG,IAAI,MAAM,CAAC,UAAU,IAAI,WAAW,KAAK,CAAC,CAAC,EAAE;CAChD,IAAI,IAAI,mBAAmB,KAAK,SAAS,EAAE;CAC3C,KAAK,mBAAmB,GAAG,EAAE,CAAC;CAC9B,KAAK;CACL,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;CAC1C,IAAI;CACJ,GAAG,CAAC,CAAC;AACL;CACA,EAAE,OAAO;CACT,GAAG,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,SAAS;CACrE,GAAG,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK;CAC/C,IAAI,OAAO,OAAO,CAAC,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;CAC3F,IAAI,CAAC;CACL,GAAG,cAAc,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK;CACtD,IAAI,OAAO,OAAO,CAAC,cAAc,GAAG,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;CAC1D,IAAI,CAAC;CACL,GAAG,KAAK;CACR,GAAG,QAAQ,EAAE,QAAQ,CAAC,GAAG;CACzB,GAAG,mBAAmB;CACtB,GAAG,CAAC;CACJ,EAAE;AACF;CACA,CAAC,WAAW,CAAC,OAAO,EAAE;CACtB,EAAE,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;CACzD,EAAE;AACF;CACA,CAAC,eAAe,GAAG;CACnB,EAAE,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAChC;CACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;CACnC,GAAG,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;AAC1D;CACA,GAAG,IAAI,SAAS,KAAK,IAAI,EAAE,OAAO;AAClC;CACA,GAAG,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;CACzE,GAAG,kBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;CACtC,GAAG,CAAC,CAAC;AACL;CACA,EAAE;CACF,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;CAClD,IAAI,OAAO,kBAAkB,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;CACzD,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI;CAChB,IAAI;CACJ,EAAE;AACF;CACA,CAAC,MAAM,CAAC,SAAS,EAAE;CACnB,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;CACzB,GAAG,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;CACtC,GAAG;AACH;CACA,EAAE,IAAI,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC;AACpC;CACA,EAAE,IAAI,eAAe,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AACrE;CACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;CACtC,GAAG,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;CACxF,GAAG,MAAM,WAAW,GAAG,eAAe,KAAK,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AAC9E;CACA,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE;CACpC,IAAI,OAAO,EAAE,MAAM,CAAC,qBAAqB;CACzC,IAAI,WAAW;CACf,IAAI,CAAC,CAAC;AACN;CACA,GAAG,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC;CACxD,GAAG,CAAC,CAAC;AACL;CACA,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;CAClB,GAAG,IAAI,CAAC,KAAK;CACb,IAAI,SAAS;CACb,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK;CACrD,KAAK,OAAO,KAAK,GAAG,CAAC,GAAG,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;CAClD,KAAK,CAAC,CAAC;CACP,GAAG;AACH;CACA,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA,CAAC,OAAO,CAAC,GAAG,EAAE;CACd,EAAE,IAAI,CAAC,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;CAChC,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA,CAAC,QAAQ,GAAG;CACZ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO;CAC3B,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;CACvB,IAAI,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;CACzF,IAAI,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,EAAE,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;AACrE;CACA,IAAI,OAAO,GAAG,CAAC;CACf,IAAI,CAAC;CACL,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;AACb;CACA,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;CAC3B,EAAE;AACF;CACA,CAAC,OAAO,GAAG;CACX,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,OAAO,KAAK,CAAC;CAC3D,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,KAAK,CAAC;CAC7E,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA,CAAC,MAAM,GAAG;CACV,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM;CAC5B,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE;CACvD,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM;CACpB,GAAG,CAAC;CACJ,EAAE;AACF;CACA,CAAC,SAAS,GAAG;CACb,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;CAC/B,EAAE;AACF;CACA,CAAC,IAAI,CAAC,QAAQ,EAAE;CAChB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;CACpD,EAAE;AACF;CACA,CAAC,SAAS,CAAC,QAAQ,EAAE;CACrB,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;CACzD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1C;CACA,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;CACnB,GAAG,IAAI,MAAM,CAAC;CACd,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AACb;CACA,GAAG,GAAG;CACN,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;CAC/B,IAAI,IAAI,CAAC,MAAM,EAAE;CACjB,KAAK,MAAM;CACX,KAAK;CACL,IAAI,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE;CACxD,GAAG;AACH;CACA,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA,CAAC,OAAO,CAAC,QAAQ,EAAE;CACnB,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;AACpD;CACA,EAAE,IAAI,MAAM,CAAC;CACb,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AAClC;CACA,EAAE,GAAG;CACL,GAAG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;CAC9B,GAAG,IAAI,CAAC,MAAM,EAAE;CAChB,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;CAC5C,IAAI,MAAM;CACV,IAAI;CACJ,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;AACrD;CACA,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;CACF;;CCpSA,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;CAC5B,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC;CAClC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC;;;;;;;;","x_google_ignoreList":[2]} \ No newline at end of file diff --git a/node_modules/magic-string/package.json b/node_modules/magic-string/package.json deleted file mode 100644 index 3296eb3..0000000 --- a/node_modules/magic-string/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "magic-string", - "version": "0.30.17", - "description": "Modify strings, generate sourcemaps", - "keywords": [ - "string", - "string manipulation", - "sourcemap", - "templating", - "transpilation" - ], - "repository": "https://github.com/rich-harris/magic-string", - "license": "MIT", - "author": "Rich Harris", - "main": "./dist/magic-string.cjs.js", - "module": "./dist/magic-string.es.mjs", - "sideEffects": false, - "jsnext:main": "./dist/magic-string.es.mjs", - "types": "./dist/magic-string.cjs.d.ts", - "exports": { - "./package.json": "./package.json", - ".": { - "import": "./dist/magic-string.es.mjs", - "require": "./dist/magic-string.cjs.js" - } - }, - "files": [ - "dist/*", - "index.d.ts", - "README.md" - ], - "devDependencies": { - "@eslint/js": "^9.16.0", - "@rollup/plugin-node-resolve": "^15.3.0", - "@rollup/plugin-replace": "^5.0.7", - "benchmark": "^2.1.4", - "bumpp": "^9.9.1", - "conventional-changelog-cli": "^3.0.0", - "eslint": "^9.16.0", - "prettier": "^3.4.2", - "publint": "^0.2.12", - "rollup": "^3.29.5", - "source-map-js": "^1.2.1", - "source-map-support": "^0.5.21", - "vitest": "^2.1.8" - }, - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" - }, - "scripts": { - "build": "rollup -c", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", - "format": "prettier --single-quote --print-width 100 --use-tabs --write .", - "lint": "eslint src test && publint", - "lint:fix": "eslint src test --fix", - "release": "bumpp -x \"npm run changelog\" --all --commit --tag --push && npm publish", - "pretest": "npm run build", - "test": "vitest run", - "test:dev": "vitest", - "bench": "npm run build && node benchmark/index.mjs", - "watch": "rollup -cw" - } -} \ No newline at end of file diff --git a/node_modules/math-intrinsics/.eslintrc b/node_modules/math-intrinsics/.eslintrc deleted file mode 100644 index d90a1bc..0000000 --- a/node_modules/math-intrinsics/.eslintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "eqeqeq": ["error", "allow-null"], - "id-length": "off", - "new-cap": ["error", { - "capIsNewExceptions": [ - "RequireObjectCoercible", - "ToObject", - ], - }], - }, -} diff --git a/node_modules/math-intrinsics/.github/FUNDING.yml b/node_modules/math-intrinsics/.github/FUNDING.yml deleted file mode 100644 index 868f4ff..0000000 --- a/node_modules/math-intrinsics/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/math-intrinsics -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/math-intrinsics/CHANGELOG.md b/node_modules/math-intrinsics/CHANGELOG.md deleted file mode 100644 index 9cf48f5..0000000 --- a/node_modules/math-intrinsics/CHANGELOG.md +++ /dev/null @@ -1,24 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.1.0](https://github.com/es-shims/math-intrinsics/compare/v1.0.0...v1.1.0) - 2024-12-18 - -### Commits - -- [New] add `round` [`7cfb044`](https://github.com/es-shims/math-intrinsics/commit/7cfb04460c0fbdf1ca101eecbac3f59d11994130) -- [Tests] add attw [`e96be8f`](https://github.com/es-shims/math-intrinsics/commit/e96be8fbf58449eafe976446a0470e6ea561ad8d) -- [Dev Deps] update `@types/tape` [`30d0023`](https://github.com/es-shims/math-intrinsics/commit/30d00234ce8a3fa0094a61cd55d6686eb91e36ec) - -## v1.0.0 - 2024-12-11 - -### Commits - -- Initial implementation, tests, readme, types [`b898caa`](https://github.com/es-shims/math-intrinsics/commit/b898caae94e9994a94a42b8740f7bbcfd0a868fe) -- Initial commit [`02745b0`](https://github.com/es-shims/math-intrinsics/commit/02745b03a62255af8a332771987b55d127538d9c) -- [New] add `constants/maxArrayLength`, `mod` [`b978178`](https://github.com/es-shims/math-intrinsics/commit/b978178a57685bd23ed1c7efe2137f3784f5fcc5) -- npm init [`a39fc57`](https://github.com/es-shims/math-intrinsics/commit/a39fc57e5639a645d0bd52a0dc56202480223be2) -- Only apps should have lockfiles [`9451580`](https://github.com/es-shims/math-intrinsics/commit/94515800fb34db4f3cc7e99290042d45609ac7bd) diff --git a/node_modules/math-intrinsics/LICENSE b/node_modules/math-intrinsics/LICENSE deleted file mode 100644 index 34995e7..0000000 --- a/node_modules/math-intrinsics/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 ECMAScript Shims - -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/node_modules/math-intrinsics/README.md b/node_modules/math-intrinsics/README.md deleted file mode 100644 index 4a66dcf..0000000 --- a/node_modules/math-intrinsics/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# math-intrinsics [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -ES Math-related intrinsics and helpers, robustly cached. - - - `abs` - - `floor` - - `isFinite` - - `isInteger` - - `isNaN` - - `isNegativeZero` - - `max` - - `min` - - `mod` - - `pow` - - `round` - - `sign` - - `constants/maxArrayLength` - - `constants/maxSafeInteger` - - `constants/maxValue` - - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -[package-url]: https://npmjs.org/package/math-intrinsics -[npm-version-svg]: https://versionbadg.es/es-shims/math-intrinsics.svg -[deps-svg]: https://david-dm.org/es-shims/math-intrinsics.svg -[deps-url]: https://david-dm.org/es-shims/math-intrinsics -[dev-deps-svg]: https://david-dm.org/es-shims/math-intrinsics/dev-status.svg -[dev-deps-url]: https://david-dm.org/es-shims/math-intrinsics#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/math-intrinsics.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/math-intrinsics.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/es-object.svg -[downloads-url]: https://npm-stat.com/charts.html?package=math-intrinsics -[codecov-image]: https://codecov.io/gh/es-shims/math-intrinsics/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/es-shims/math-intrinsics/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/math-intrinsics -[actions-url]: https://github.com/es-shims/math-intrinsics/actions diff --git a/node_modules/math-intrinsics/abs.d.ts b/node_modules/math-intrinsics/abs.d.ts deleted file mode 100644 index 14ad9c6..0000000 --- a/node_modules/math-intrinsics/abs.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Math.abs; \ No newline at end of file diff --git a/node_modules/math-intrinsics/abs.js b/node_modules/math-intrinsics/abs.js deleted file mode 100644 index a751424..0000000 --- a/node_modules/math-intrinsics/abs.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./abs')} */ -module.exports = Math.abs; diff --git a/node_modules/math-intrinsics/constants/maxArrayLength.d.ts b/node_modules/math-intrinsics/constants/maxArrayLength.d.ts deleted file mode 100644 index b92d46b..0000000 --- a/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const MAX_ARRAY_LENGTH: 4294967295; - -export = MAX_ARRAY_LENGTH; \ No newline at end of file diff --git a/node_modules/math-intrinsics/constants/maxArrayLength.js b/node_modules/math-intrinsics/constants/maxArrayLength.js deleted file mode 100644 index cfc6aff..0000000 --- a/node_modules/math-intrinsics/constants/maxArrayLength.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./maxArrayLength')} */ -module.exports = 4294967295; // Math.pow(2, 32) - 1; diff --git a/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts b/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts deleted file mode 100644 index fee3f62..0000000 --- a/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const MAX_SAFE_INTEGER: 9007199254740991; - -export = MAX_SAFE_INTEGER; \ No newline at end of file diff --git a/node_modules/math-intrinsics/constants/maxSafeInteger.js b/node_modules/math-intrinsics/constants/maxSafeInteger.js deleted file mode 100644 index b568ad3..0000000 --- a/node_modules/math-intrinsics/constants/maxSafeInteger.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -/** @type {import('./maxSafeInteger')} */ -// eslint-disable-next-line no-extra-parens -module.exports = /** @type {import('./maxSafeInteger')} */ (Number.MAX_SAFE_INTEGER) || 9007199254740991; // Math.pow(2, 53) - 1; diff --git a/node_modules/math-intrinsics/constants/maxValue.d.ts b/node_modules/math-intrinsics/constants/maxValue.d.ts deleted file mode 100644 index 292cb82..0000000 --- a/node_modules/math-intrinsics/constants/maxValue.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const MAX_VALUE: 1.7976931348623157e+308; - -export = MAX_VALUE; diff --git a/node_modules/math-intrinsics/constants/maxValue.js b/node_modules/math-intrinsics/constants/maxValue.js deleted file mode 100644 index a2202dc..0000000 --- a/node_modules/math-intrinsics/constants/maxValue.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -/** @type {import('./maxValue')} */ -// eslint-disable-next-line no-extra-parens -module.exports = /** @type {import('./maxValue')} */ (Number.MAX_VALUE) || 1.7976931348623157e+308; diff --git a/node_modules/math-intrinsics/floor.d.ts b/node_modules/math-intrinsics/floor.d.ts deleted file mode 100644 index 9265236..0000000 --- a/node_modules/math-intrinsics/floor.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Math.floor; \ No newline at end of file diff --git a/node_modules/math-intrinsics/floor.js b/node_modules/math-intrinsics/floor.js deleted file mode 100644 index ab0e5d7..0000000 --- a/node_modules/math-intrinsics/floor.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./floor')} */ -module.exports = Math.floor; diff --git a/node_modules/math-intrinsics/isFinite.d.ts b/node_modules/math-intrinsics/isFinite.d.ts deleted file mode 100644 index 6daae33..0000000 --- a/node_modules/math-intrinsics/isFinite.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function isFinite(x: unknown): x is number | bigint; - -export = isFinite; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isFinite.js b/node_modules/math-intrinsics/isFinite.js deleted file mode 100644 index b201a5a..0000000 --- a/node_modules/math-intrinsics/isFinite.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -var $isNaN = require('./isNaN'); - -/** @type {import('./isFinite')} */ -module.exports = function isFinite(x) { - return (typeof x === 'number' || typeof x === 'bigint') - && !$isNaN(x) - && x !== Infinity - && x !== -Infinity; -}; - diff --git a/node_modules/math-intrinsics/isInteger.d.ts b/node_modules/math-intrinsics/isInteger.d.ts deleted file mode 100644 index 13935a8..0000000 --- a/node_modules/math-intrinsics/isInteger.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function isInteger(argument: unknown): argument is number; - -export = isInteger; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isInteger.js b/node_modules/math-intrinsics/isInteger.js deleted file mode 100644 index 4b1b9a5..0000000 --- a/node_modules/math-intrinsics/isInteger.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -var $abs = require('./abs'); -var $floor = require('./floor'); - -var $isNaN = require('./isNaN'); -var $isFinite = require('./isFinite'); - -/** @type {import('./isInteger')} */ -module.exports = function isInteger(argument) { - if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { - return false; - } - var absValue = $abs(argument); - return $floor(absValue) === absValue; -}; diff --git a/node_modules/math-intrinsics/isNaN.d.ts b/node_modules/math-intrinsics/isNaN.d.ts deleted file mode 100644 index c1d4c55..0000000 --- a/node_modules/math-intrinsics/isNaN.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Number.isNaN; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isNaN.js b/node_modules/math-intrinsics/isNaN.js deleted file mode 100644 index e36475c..0000000 --- a/node_modules/math-intrinsics/isNaN.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -/** @type {import('./isNaN')} */ -module.exports = Number.isNaN || function isNaN(a) { - return a !== a; -}; diff --git a/node_modules/math-intrinsics/isNegativeZero.d.ts b/node_modules/math-intrinsics/isNegativeZero.d.ts deleted file mode 100644 index 7ad8819..0000000 --- a/node_modules/math-intrinsics/isNegativeZero.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function isNegativeZero(x: unknown): boolean; - -export = isNegativeZero; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isNegativeZero.js b/node_modules/math-intrinsics/isNegativeZero.js deleted file mode 100644 index b69adcc..0000000 --- a/node_modules/math-intrinsics/isNegativeZero.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -/** @type {import('./isNegativeZero')} */ -module.exports = function isNegativeZero(x) { - return x === 0 && 1 / x === 1 / -0; -}; diff --git a/node_modules/math-intrinsics/max.d.ts b/node_modules/math-intrinsics/max.d.ts deleted file mode 100644 index ad6f43e..0000000 --- a/node_modules/math-intrinsics/max.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Math.max; \ No newline at end of file diff --git a/node_modules/math-intrinsics/max.js b/node_modules/math-intrinsics/max.js deleted file mode 100644 index edb55df..0000000 --- a/node_modules/math-intrinsics/max.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./max')} */ -module.exports = Math.max; diff --git a/node_modules/math-intrinsics/min.d.ts b/node_modules/math-intrinsics/min.d.ts deleted file mode 100644 index fd90f2d..0000000 --- a/node_modules/math-intrinsics/min.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Math.min; \ No newline at end of file diff --git a/node_modules/math-intrinsics/min.js b/node_modules/math-intrinsics/min.js deleted file mode 100644 index 5a4a7c7..0000000 --- a/node_modules/math-intrinsics/min.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./min')} */ -module.exports = Math.min; diff --git a/node_modules/math-intrinsics/mod.d.ts b/node_modules/math-intrinsics/mod.d.ts deleted file mode 100644 index 549dbd4..0000000 --- a/node_modules/math-intrinsics/mod.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function mod(number: number, modulo: number): number; - -export = mod; \ No newline at end of file diff --git a/node_modules/math-intrinsics/mod.js b/node_modules/math-intrinsics/mod.js deleted file mode 100644 index 4a98362..0000000 --- a/node_modules/math-intrinsics/mod.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var $floor = require('./floor'); - -/** @type {import('./mod')} */ -module.exports = function mod(number, modulo) { - var remain = number % modulo; - return $floor(remain >= 0 ? remain : remain + modulo); -}; diff --git a/node_modules/math-intrinsics/package.json b/node_modules/math-intrinsics/package.json deleted file mode 100644 index 0676273..0000000 --- a/node_modules/math-intrinsics/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "math-intrinsics", - "version": "1.1.0", - "description": "ES Math-related intrinsics and helpers, robustly cached.", - "main": false, - "exports": { - "./abs": "./abs.js", - "./floor": "./floor.js", - "./isFinite": "./isFinite.js", - "./isInteger": "./isInteger.js", - "./isNaN": "./isNaN.js", - "./isNegativeZero": "./isNegativeZero.js", - "./max": "./max.js", - "./min": "./min.js", - "./mod": "./mod.js", - "./pow": "./pow.js", - "./sign": "./sign.js", - "./round": "./round.js", - "./constants/maxArrayLength": "./constants/maxArrayLength.js", - "./constants/maxSafeInteger": "./constants/maxSafeInteger.js", - "./constants/maxValue": "./constants/maxValue.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "nyc tape 'test/**/*.js'", - "posttest": "npx npm@'>= 10.2' audit --production", - "prelint": "evalmd README.md && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc && attw -P", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/es-shims/math-intrinsics.git" - }, - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/es-shims/math-intrinsics/issues" - }, - "homepage": "https://github.com/es-shims/math-intrinsics#readme", - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.1", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.2", - "@types/for-each": "^0.3.3", - "@types/object-inspect": "^1.13.0", - "@types/tape": "^5.8.0", - "auto-changelog": "^2.5.0", - "eclint": "^2.8.1", - "es-value-fixtures": "^1.5.0", - "eslint": "^8.8.0", - "evalmd": "^0.0.19", - "for-each": "^0.3.3", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "object-inspect": "^1.13.3", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/math-intrinsics/pow.d.ts b/node_modules/math-intrinsics/pow.d.ts deleted file mode 100644 index 5873c44..0000000 --- a/node_modules/math-intrinsics/pow.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Math.pow; \ No newline at end of file diff --git a/node_modules/math-intrinsics/pow.js b/node_modules/math-intrinsics/pow.js deleted file mode 100644 index c0a4103..0000000 --- a/node_modules/math-intrinsics/pow.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./pow')} */ -module.exports = Math.pow; diff --git a/node_modules/math-intrinsics/round.d.ts b/node_modules/math-intrinsics/round.d.ts deleted file mode 100644 index da1fde3..0000000 --- a/node_modules/math-intrinsics/round.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Math.round; \ No newline at end of file diff --git a/node_modules/math-intrinsics/round.js b/node_modules/math-intrinsics/round.js deleted file mode 100644 index b792156..0000000 --- a/node_modules/math-intrinsics/round.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./round')} */ -module.exports = Math.round; diff --git a/node_modules/math-intrinsics/sign.d.ts b/node_modules/math-intrinsics/sign.d.ts deleted file mode 100644 index c49ceca..0000000 --- a/node_modules/math-intrinsics/sign.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function sign(x: number): number; - -export = sign; \ No newline at end of file diff --git a/node_modules/math-intrinsics/sign.js b/node_modules/math-intrinsics/sign.js deleted file mode 100644 index 9e5173c..0000000 --- a/node_modules/math-intrinsics/sign.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var $isNaN = require('./isNaN'); - -/** @type {import('./sign')} */ -module.exports = function sign(number) { - if ($isNaN(number) || number === 0) { - return number; - } - return number < 0 ? -1 : +1; -}; diff --git a/node_modules/math-intrinsics/test/index.js b/node_modules/math-intrinsics/test/index.js deleted file mode 100644 index 0f90a5d..0000000 --- a/node_modules/math-intrinsics/test/index.js +++ /dev/null @@ -1,192 +0,0 @@ -'use strict'; - -var test = require('tape'); -var v = require('es-value-fixtures'); -var forEach = require('for-each'); -var inspect = require('object-inspect'); - -var abs = require('../abs'); -var floor = require('../floor'); -var isFinite = require('../isFinite'); -var isInteger = require('../isInteger'); -var isNaN = require('../isNaN'); -var isNegativeZero = require('../isNegativeZero'); -var max = require('../max'); -var min = require('../min'); -var mod = require('../mod'); -var pow = require('../pow'); -var round = require('../round'); -var sign = require('../sign'); - -var maxArrayLength = require('../constants/maxArrayLength'); -var maxSafeInteger = require('../constants/maxSafeInteger'); -var maxValue = require('../constants/maxValue'); - -test('abs', function (t) { - t.equal(abs(-1), 1, 'abs(-1) === 1'); - t.equal(abs(+1), 1, 'abs(+1) === 1'); - t.equal(abs(+0), +0, 'abs(+0) === +0'); - t.equal(abs(-0), +0, 'abs(-0) === +0'); - - t.end(); -}); - -test('floor', function (t) { - t.equal(floor(-1.1), -2, 'floor(-1.1) === -2'); - t.equal(floor(+1.1), 1, 'floor(+1.1) === 1'); - t.equal(floor(+0), +0, 'floor(+0) === +0'); - t.equal(floor(-0), -0, 'floor(-0) === -0'); - t.equal(floor(-Infinity), -Infinity, 'floor(-Infinity) === -Infinity'); - t.equal(floor(Number(Infinity)), Number(Infinity), 'floor(+Infinity) === +Infinity'); - t.equal(floor(NaN), NaN, 'floor(NaN) === NaN'); - t.equal(floor(0), +0, 'floor(0) === +0'); - t.equal(floor(-0), -0, 'floor(-0) === -0'); - t.equal(floor(1), 1, 'floor(1) === 1'); - t.equal(floor(-1), -1, 'floor(-1) === -1'); - t.equal(floor(1.1), 1, 'floor(1.1) === 1'); - t.equal(floor(-1.1), -2, 'floor(-1.1) === -2'); - t.equal(floor(maxValue), maxValue, 'floor(maxValue) === maxValue'); - t.equal(floor(maxSafeInteger), maxSafeInteger, 'floor(maxSafeInteger) === maxSafeInteger'); - - t.end(); -}); - -test('isFinite', function (t) { - t.equal(isFinite(0), true, 'isFinite(+0) === true'); - t.equal(isFinite(-0), true, 'isFinite(-0) === true'); - t.equal(isFinite(1), true, 'isFinite(1) === true'); - t.equal(isFinite(Infinity), false, 'isFinite(Infinity) === false'); - t.equal(isFinite(-Infinity), false, 'isFinite(-Infinity) === false'); - t.equal(isFinite(NaN), false, 'isFinite(NaN) === false'); - - forEach(v.nonNumbers, function (nonNumber) { - t.equal(isFinite(nonNumber), false, 'isFinite(' + inspect(nonNumber) + ') === false'); - }); - - t.end(); -}); - -test('isInteger', function (t) { - forEach([].concat( - // @ts-expect-error TS sucks with concat - v.nonNumbers, - v.nonIntegerNumbers - ), function (nonInteger) { - t.equal(isInteger(nonInteger), false, 'isInteger(' + inspect(nonInteger) + ') === false'); - }); - - t.end(); -}); - -test('isNaN', function (t) { - forEach([].concat( - // @ts-expect-error TS sucks with concat - v.nonNumbers, - v.infinities, - v.zeroes, - v.integerNumbers - ), function (nonNaN) { - t.equal(isNaN(nonNaN), false, 'isNaN(' + inspect(nonNaN) + ') === false'); - }); - - t.equal(isNaN(NaN), true, 'isNaN(NaN) === true'); - - t.end(); -}); - -test('isNegativeZero', function (t) { - t.equal(isNegativeZero(-0), true, 'isNegativeZero(-0) === true'); - t.equal(isNegativeZero(+0), false, 'isNegativeZero(+0) === false'); - t.equal(isNegativeZero(1), false, 'isNegativeZero(1) === false'); - t.equal(isNegativeZero(-1), false, 'isNegativeZero(-1) === false'); - t.equal(isNegativeZero(NaN), false, 'isNegativeZero(NaN) === false'); - t.equal(isNegativeZero(Infinity), false, 'isNegativeZero(Infinity) === false'); - t.equal(isNegativeZero(-Infinity), false, 'isNegativeZero(-Infinity) === false'); - - forEach(v.nonNumbers, function (nonNumber) { - t.equal(isNegativeZero(nonNumber), false, 'isNegativeZero(' + inspect(nonNumber) + ') === false'); - }); - - t.end(); -}); - -test('max', function (t) { - t.equal(max(1, 2), 2, 'max(1, 2) === 2'); - t.equal(max(1, 2, 3), 3, 'max(1, 2, 3) === 3'); - t.equal(max(1, 2, 3, 4), 4, 'max(1, 2, 3, 4) === 4'); - t.equal(max(1, 2, 3, 4, 5), 5, 'max(1, 2, 3, 4, 5) === 5'); - t.equal(max(1, 2, 3, 4, 5, 6), 6, 'max(1, 2, 3, 4, 5, 6) === 6'); - t.equal(max(1, 2, 3, 4, 5, 6, 7), 7, 'max(1, 2, 3, 4, 5, 6, 7) === 7'); - - t.end(); -}); - -test('min', function (t) { - t.equal(min(1, 2), 1, 'min(1, 2) === 1'); - t.equal(min(1, 2, 3), 1, 'min(1, 2, 3) === 1'); - t.equal(min(1, 2, 3, 4), 1, 'min(1, 2, 3, 4) === 1'); - t.equal(min(1, 2, 3, 4, 5), 1, 'min(1, 2, 3, 4, 5) === 1'); - t.equal(min(1, 2, 3, 4, 5, 6), 1, 'min(1, 2, 3, 4, 5, 6) === 1'); - - t.end(); -}); - -test('mod', function (t) { - t.equal(mod(1, 2), 1, 'mod(1, 2) === 1'); - t.equal(mod(2, 2), 0, 'mod(2, 2) === 0'); - t.equal(mod(3, 2), 1, 'mod(3, 2) === 1'); - t.equal(mod(4, 2), 0, 'mod(4, 2) === 0'); - t.equal(mod(5, 2), 1, 'mod(5, 2) === 1'); - t.equal(mod(6, 2), 0, 'mod(6, 2) === 0'); - t.equal(mod(7, 2), 1, 'mod(7, 2) === 1'); - t.equal(mod(8, 2), 0, 'mod(8, 2) === 0'); - t.equal(mod(9, 2), 1, 'mod(9, 2) === 1'); - t.equal(mod(10, 2), 0, 'mod(10, 2) === 0'); - t.equal(mod(11, 2), 1, 'mod(11, 2) === 1'); - - t.end(); -}); - -test('pow', function (t) { - t.equal(pow(2, 2), 4, 'pow(2, 2) === 4'); - t.equal(pow(2, 3), 8, 'pow(2, 3) === 8'); - t.equal(pow(2, 4), 16, 'pow(2, 4) === 16'); - t.equal(pow(2, 5), 32, 'pow(2, 5) === 32'); - t.equal(pow(2, 6), 64, 'pow(2, 6) === 64'); - t.equal(pow(2, 7), 128, 'pow(2, 7) === 128'); - t.equal(pow(2, 8), 256, 'pow(2, 8) === 256'); - t.equal(pow(2, 9), 512, 'pow(2, 9) === 512'); - t.equal(pow(2, 10), 1024, 'pow(2, 10) === 1024'); - - t.end(); -}); - -test('round', function (t) { - t.equal(round(1.1), 1, 'round(1.1) === 1'); - t.equal(round(1.5), 2, 'round(1.5) === 2'); - t.equal(round(1.9), 2, 'round(1.9) === 2'); - - t.end(); -}); - -test('sign', function (t) { - t.equal(sign(-1), -1, 'sign(-1) === -1'); - t.equal(sign(+1), +1, 'sign(+1) === +1'); - t.equal(sign(+0), +0, 'sign(+0) === +0'); - t.equal(sign(-0), -0, 'sign(-0) === -0'); - t.equal(sign(NaN), NaN, 'sign(NaN) === NaN'); - t.equal(sign(Infinity), +1, 'sign(Infinity) === +1'); - t.equal(sign(-Infinity), -1, 'sign(-Infinity) === -1'); - t.equal(sign(maxValue), +1, 'sign(maxValue) === +1'); - t.equal(sign(maxSafeInteger), +1, 'sign(maxSafeInteger) === +1'); - - t.end(); -}); - -test('constants', function (t) { - t.equal(typeof maxArrayLength, 'number', 'typeof maxArrayLength === "number"'); - t.equal(typeof maxSafeInteger, 'number', 'typeof maxSafeInteger === "number"'); - t.equal(typeof maxValue, 'number', 'typeof maxValue === "number"'); - - t.end(); -}); diff --git a/node_modules/math-intrinsics/tsconfig.json b/node_modules/math-intrinsics/tsconfig.json deleted file mode 100644 index b131000..0000000 --- a/node_modules/math-intrinsics/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", -} diff --git a/node_modules/mime/.npmignore b/node_modules/mime/.npmignore deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/mime/CHANGELOG.md b/node_modules/mime/CHANGELOG.md deleted file mode 100644 index f127535..0000000 --- a/node_modules/mime/CHANGELOG.md +++ /dev/null @@ -1,164 +0,0 @@ -# Changelog - -## v1.6.0 (24/11/2017) -*No changelog for this release.* - ---- - -## v2.0.4 (24/11/2017) -- [**closed**] Switch to mime-score module for resolving extension contention issues. [#182](https://github.com/broofa/node-mime/issues/182) -- [**closed**] Update mime-db to 1.31.0 in v1.x branch [#181](https://github.com/broofa/node-mime/issues/181) - ---- - -## v1.5.0 (22/11/2017) -- [**closed**] need ES5 version ready in npm package [#179](https://github.com/broofa/node-mime/issues/179) -- [**closed**] mime-db no trace of iWork - pages / numbers / etc. [#178](https://github.com/broofa/node-mime/issues/178) -- [**closed**] How it works in brownser ? [#176](https://github.com/broofa/node-mime/issues/176) -- [**closed**] Missing `./Mime` [#175](https://github.com/broofa/node-mime/issues/175) -- [**closed**] Vulnerable Regular Expression [#167](https://github.com/broofa/node-mime/issues/167) - ---- - -## v2.0.3 (25/09/2017) -*No changelog for this release.* - ---- - -## v1.4.1 (25/09/2017) -- [**closed**] Issue when bundling with webpack [#172](https://github.com/broofa/node-mime/issues/172) - ---- - -## v2.0.2 (15/09/2017) -- [**V2**] fs.readFileSync is not a function [#165](https://github.com/broofa/node-mime/issues/165) -- [**closed**] The extension for video/quicktime should map to .mov, not .qt [#164](https://github.com/broofa/node-mime/issues/164) -- [**V2**] [v2 Feedback request] Mime class API [#163](https://github.com/broofa/node-mime/issues/163) -- [**V2**] [v2 Feedback request] Resolving conflicts over extensions [#162](https://github.com/broofa/node-mime/issues/162) -- [**V2**] Allow callers to load module with official, full, or no defined types. [#161](https://github.com/broofa/node-mime/issues/161) -- [**V2**] Use "facets" to resolve extension conflicts [#160](https://github.com/broofa/node-mime/issues/160) -- [**V2**] Remove fs and path dependencies [#152](https://github.com/broofa/node-mime/issues/152) -- [**V2**] Default content-type should not be application/octet-stream [#139](https://github.com/broofa/node-mime/issues/139) -- [**V2**] reset mime-types [#124](https://github.com/broofa/node-mime/issues/124) -- [**V2**] Extensionless paths should return null or false [#113](https://github.com/broofa/node-mime/issues/113) - ---- - -## v2.0.1 (14/09/2017) -- [**closed**] Changelog for v2.0 does not mention breaking changes [#171](https://github.com/broofa/node-mime/issues/171) -- [**closed**] MIME breaking with 'class' declaration as it is without 'use strict mode' [#170](https://github.com/broofa/node-mime/issues/170) - ---- - -## v2.0.0 (12/09/2017) -- [**closed**] woff and woff2 [#168](https://github.com/broofa/node-mime/issues/168) - ---- - -## v1.4.0 (28/08/2017) -- [**closed**] support for ac3 voc files [#159](https://github.com/broofa/node-mime/issues/159) -- [**closed**] Help understanding change from application/xml to text/xml [#158](https://github.com/broofa/node-mime/issues/158) -- [**closed**] no longer able to override mimetype [#157](https://github.com/broofa/node-mime/issues/157) -- [**closed**] application/vnd.adobe.photoshop [#147](https://github.com/broofa/node-mime/issues/147) -- [**closed**] Directories should appear as something other than application/octet-stream [#135](https://github.com/broofa/node-mime/issues/135) -- [**closed**] requested features [#131](https://github.com/broofa/node-mime/issues/131) -- [**closed**] Make types.json loading optional? [#129](https://github.com/broofa/node-mime/issues/129) -- [**closed**] Cannot find module './types.json' [#120](https://github.com/broofa/node-mime/issues/120) -- [**V2**] .wav files show up as "audio/x-wav" instead of "audio/x-wave" [#118](https://github.com/broofa/node-mime/issues/118) -- [**closed**] Don't be a pain in the ass for node community [#108](https://github.com/broofa/node-mime/issues/108) -- [**closed**] don't make default_type global [#78](https://github.com/broofa/node-mime/issues/78) -- [**closed**] mime.extension() fails if the content-type is parameterized [#74](https://github.com/broofa/node-mime/issues/74) - ---- - -## v1.3.6 (11/05/2017) -- [**closed**] .md should be text/markdown as of March 2016 [#154](https://github.com/broofa/node-mime/issues/154) -- [**closed**] Error while installing mime [#153](https://github.com/broofa/node-mime/issues/153) -- [**closed**] application/manifest+json [#149](https://github.com/broofa/node-mime/issues/149) -- [**closed**] Dynamic adaptive streaming over HTTP (DASH) file extension typo [#141](https://github.com/broofa/node-mime/issues/141) -- [**closed**] charsets image/png undefined [#140](https://github.com/broofa/node-mime/issues/140) -- [**closed**] Mime-db dependency out of date [#130](https://github.com/broofa/node-mime/issues/130) -- [**closed**] how to support plist? [#126](https://github.com/broofa/node-mime/issues/126) -- [**closed**] how does .types file format look like? [#123](https://github.com/broofa/node-mime/issues/123) -- [**closed**] Feature: support for expanding MIME patterns [#121](https://github.com/broofa/node-mime/issues/121) -- [**closed**] DEBUG_MIME doesn't work [#117](https://github.com/broofa/node-mime/issues/117) - ---- - -## v1.3.4 (06/02/2015) -*No changelog for this release.* - ---- - -## v1.3.3 (06/02/2015) -*No changelog for this release.* - ---- - -## v1.3.1 (05/02/2015) -- [**closed**] Consider adding support for Handlebars .hbs file ending [#111](https://github.com/broofa/node-mime/issues/111) -- [**closed**] Consider adding support for hjson. [#110](https://github.com/broofa/node-mime/issues/110) -- [**closed**] Add mime type for Opus audio files [#94](https://github.com/broofa/node-mime/issues/94) -- [**closed**] Consider making the `Requesting New Types` information more visible [#77](https://github.com/broofa/node-mime/issues/77) - ---- - -## v1.3.0 (05/02/2015) -- [**closed**] Add common name? [#114](https://github.com/broofa/node-mime/issues/114) -- [**closed**] application/x-yaml [#104](https://github.com/broofa/node-mime/issues/104) -- [**closed**] Add mime type for WOFF file format 2.0 [#102](https://github.com/broofa/node-mime/issues/102) -- [**closed**] application/x-msi for .msi [#99](https://github.com/broofa/node-mime/issues/99) -- [**closed**] Add mimetype for gettext translation files [#98](https://github.com/broofa/node-mime/issues/98) -- [**closed**] collaborators [#88](https://github.com/broofa/node-mime/issues/88) -- [**closed**] getting errot in installation of mime module...any1 can help? [#87](https://github.com/broofa/node-mime/issues/87) -- [**closed**] should application/json's charset be utf8? [#86](https://github.com/broofa/node-mime/issues/86) -- [**closed**] Add "license" and "licenses" to package.json [#81](https://github.com/broofa/node-mime/issues/81) -- [**closed**] lookup with extension-less file on Windows returns wrong type [#68](https://github.com/broofa/node-mime/issues/68) - ---- - -## v1.2.11 (15/08/2013) -- [**closed**] Update mime.types [#65](https://github.com/broofa/node-mime/issues/65) -- [**closed**] Publish a new version [#63](https://github.com/broofa/node-mime/issues/63) -- [**closed**] README should state upfront that "application/octet-stream" is default for unknown extension [#55](https://github.com/broofa/node-mime/issues/55) -- [**closed**] Suggested improvement to the charset API [#52](https://github.com/broofa/node-mime/issues/52) - ---- - -## v1.2.10 (25/07/2013) -- [**closed**] Mime type for woff files should be application/font-woff and not application/x-font-woff [#62](https://github.com/broofa/node-mime/issues/62) -- [**closed**] node.types in conflict with mime.types [#51](https://github.com/broofa/node-mime/issues/51) - ---- - -## v1.2.9 (17/01/2013) -- [**closed**] Please update "mime" NPM [#49](https://github.com/broofa/node-mime/issues/49) -- [**closed**] Please add semicolon [#46](https://github.com/broofa/node-mime/issues/46) -- [**closed**] parse full mime types [#43](https://github.com/broofa/node-mime/issues/43) - ---- - -## v1.2.8 (10/01/2013) -- [**closed**] /js directory mime is application/javascript. Is it correct? [#47](https://github.com/broofa/node-mime/issues/47) -- [**closed**] Add mime types for lua code. [#45](https://github.com/broofa/node-mime/issues/45) - ---- - -## v1.2.7 (19/10/2012) -- [**closed**] cannot install 1.2.7 via npm [#41](https://github.com/broofa/node-mime/issues/41) -- [**closed**] Transfer ownership to @broofa [#36](https://github.com/broofa/node-mime/issues/36) -- [**closed**] it's wrong to set charset to UTF-8 for text [#30](https://github.com/broofa/node-mime/issues/30) -- [**closed**] Allow multiple instances of MIME types container [#27](https://github.com/broofa/node-mime/issues/27) - ---- - -## v1.2.5 (16/02/2012) -- [**closed**] When looking up a types, check hasOwnProperty [#23](https://github.com/broofa/node-mime/issues/23) -- [**closed**] Bump version to 1.2.2 [#18](https://github.com/broofa/node-mime/issues/18) -- [**closed**] No license [#16](https://github.com/broofa/node-mime/issues/16) -- [**closed**] Some types missing that are used by html5/css3 [#13](https://github.com/broofa/node-mime/issues/13) -- [**closed**] npm install fails for 1.2.1 [#12](https://github.com/broofa/node-mime/issues/12) -- [**closed**] image/pjpeg + image/x-png [#10](https://github.com/broofa/node-mime/issues/10) -- [**closed**] symlink [#8](https://github.com/broofa/node-mime/issues/8) -- [**closed**] gzip [#2](https://github.com/broofa/node-mime/issues/2) -- [**closed**] ALL CAPS filenames return incorrect mime type [#1](https://github.com/broofa/node-mime/issues/1) diff --git a/node_modules/mime/LICENSE b/node_modules/mime/LICENSE deleted file mode 100644 index d3f46f7..0000000 --- a/node_modules/mime/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer - -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/node_modules/mime/README.md b/node_modules/mime/README.md deleted file mode 100644 index 506fbe5..0000000 --- a/node_modules/mime/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# mime - -Comprehensive MIME type mapping API based on mime-db module. - -## Install - -Install with [npm](http://github.com/isaacs/npm): - - npm install mime - -## Contributing / Testing - - npm run test - -## Command Line - - mime [path_string] - -E.g. - - > mime scripts/jquery.js - application/javascript - -## API - Queries - -### mime.lookup(path) -Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. - -```js -var mime = require('mime'); - -mime.lookup('/path/to/file.txt'); // => 'text/plain' -mime.lookup('file.txt'); // => 'text/plain' -mime.lookup('.TXT'); // => 'text/plain' -mime.lookup('htm'); // => 'text/html' -``` - -### mime.default_type -Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) - -### mime.extension(type) -Get the default extension for `type` - -```js -mime.extension('text/html'); // => 'html' -mime.extension('application/octet-stream'); // => 'bin' -``` - -### mime.charsets.lookup() - -Map mime-type to charset - -```js -mime.charsets.lookup('text/plain'); // => 'UTF-8' -``` - -(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) - -## API - Defining Custom Types - -Custom type mappings can be added on a per-project basis via the following APIs. - -### mime.define() - -Add custom mime/extension mappings - -```js -mime.define({ - 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], - 'application/x-my-type': ['x-mt', 'x-mtt'], - // etc ... -}); - -mime.lookup('x-sft'); // => 'text/x-some-format' -``` - -The first entry in the extensions array is returned by `mime.extension()`. E.g. - -```js -mime.extension('text/x-some-format'); // => 'x-sf' -``` - -### mime.load(filepath) - -Load mappings from an Apache ".types" format file - -```js -mime.load('./my_project.types'); -``` -The .types file format is simple - See the `types` dir for examples. diff --git a/node_modules/mime/cli.js b/node_modules/mime/cli.js deleted file mode 100644 index 20b1ffe..0000000 --- a/node_modules/mime/cli.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node - -var mime = require('./mime.js'); -var file = process.argv[2]; -var type = mime.lookup(file); - -process.stdout.write(type + '\n'); - diff --git a/node_modules/mime/mime.js b/node_modules/mime/mime.js deleted file mode 100644 index d7efbde..0000000 --- a/node_modules/mime/mime.js +++ /dev/null @@ -1,108 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -function Mime() { - // Map of extension -> mime type - this.types = Object.create(null); - - // Map of mime type -> extension - this.extensions = Object.create(null); -} - -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * @param map (Object) type definitions - */ -Mime.prototype.define = function (map) { - for (var type in map) { - var exts = map[type]; - for (var i = 0; i < exts.length; i++) { - if (process.env.DEBUG_MIME && this.types[exts[i]]) { - console.warn((this._loading || "define()").replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + - this.types[exts[i]] + ' to ' + type); - } - - this.types[exts[i]] = type; - } - - // Default extension is the first one we encounter - if (!this.extensions[type]) { - this.extensions[type] = exts[0]; - } - } -}; - -/** - * Load an Apache2-style ".types" file - * - * This may be called multiple times (it's expected). Where files declare - * overlapping types/extensions, the last file wins. - * - * @param file (String) path of file to load. - */ -Mime.prototype.load = function(file) { - this._loading = file; - // Read file and split into lines - var map = {}, - content = fs.readFileSync(file, 'ascii'), - lines = content.split(/[\r\n]+/); - - lines.forEach(function(line) { - // Clean up whitespace/comments, and split into fields - var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); - map[fields.shift()] = fields; - }); - - this.define(map); - - this._loading = null; -}; - -/** - * Lookup a mime type based on extension - */ -Mime.prototype.lookup = function(path, fallback) { - var ext = path.replace(/^.*[\.\/\\]/, '').toLowerCase(); - - return this.types[ext] || fallback || this.default_type; -}; - -/** - * Return file extension associated with a mime type - */ -Mime.prototype.extension = function(mimeType) { - var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); - return this.extensions[type]; -}; - -// Default instance -var mime = new Mime(); - -// Define built-in types -mime.define(require('./types.json')); - -// Default type -mime.default_type = mime.lookup('bin'); - -// -// Additional API specific to the default instance -// - -mime.Mime = Mime; - -/** - * Lookup a charset based on mime type. - */ -mime.charsets = { - lookup: function(mimeType, fallback) { - // Assume text types are utf8 - return (/^text\/|^application\/(javascript|json)/).test(mimeType) ? 'UTF-8' : fallback; - } -}; - -module.exports = mime; diff --git a/node_modules/mime/package.json b/node_modules/mime/package.json deleted file mode 100644 index 6bd24bc..0000000 --- a/node_modules/mime/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "author": { - "name": "Robert Kieffer", - "url": "http://github.com/broofa", - "email": "robert@broofa.com" - }, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - }, - "contributors": [ - { - "name": "Benjamin Thomas", - "url": "http://github.com/bentomas", - "email": "benjamin@benjaminthomas.org" - } - ], - "description": "A comprehensive library for mime-type mapping", - "license": "MIT", - "dependencies": {}, - "devDependencies": { - "github-release-notes": "0.13.1", - "mime-db": "1.31.0", - "mime-score": "1.1.0" - }, - "scripts": { - "prepare": "node src/build.js", - "changelog": "gren changelog --tags=all --generate --override", - "test": "node src/test.js" - }, - "keywords": [ - "util", - "mime" - ], - "main": "mime.js", - "name": "mime", - "repository": { - "url": "https://github.com/broofa/node-mime", - "type": "git" - }, - "version": "1.6.0" -} diff --git a/node_modules/mime/src/build.js b/node_modules/mime/src/build.js deleted file mode 100644 index 4928e48..0000000 --- a/node_modules/mime/src/build.js +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - -const fs = require('fs'); -const path = require('path'); -const mimeScore = require('mime-score'); - -let db = require('mime-db'); -let chalk = require('chalk'); - -const STANDARD_FACET_SCORE = 900; - -const byExtension = {}; - -// Clear out any conflict extensions in mime-db -for (let type in db) { - let entry = db[type]; - entry.type = type; - - if (!entry.extensions) continue; - - entry.extensions.forEach(ext => { - if (ext in byExtension) { - const e0 = entry; - const e1 = byExtension[ext]; - e0.pri = mimeScore(e0.type, e0.source); - e1.pri = mimeScore(e1.type, e1.source); - - let drop = e0.pri < e1.pri ? e0 : e1; - let keep = e0.pri >= e1.pri ? e0 : e1; - drop.extensions = drop.extensions.filter(e => e !== ext); - - console.log(`${ext}: Keeping ${chalk.green(keep.type)} (${keep.pri}), dropping ${chalk.red(drop.type)} (${drop.pri})`); - } - byExtension[ext] = entry; - }); -} - -function writeTypesFile(types, path) { - fs.writeFileSync(path, JSON.stringify(types)); -} - -// Segregate into standard and non-standard types based on facet per -// https://tools.ietf.org/html/rfc6838#section-3.1 -const types = {}; - -Object.keys(db).sort().forEach(k => { - const entry = db[k]; - types[entry.type] = entry.extensions; -}); - -writeTypesFile(types, path.join(__dirname, '..', 'types.json')); diff --git a/node_modules/mime/src/test.js b/node_modules/mime/src/test.js deleted file mode 100644 index 42958a2..0000000 --- a/node_modules/mime/src/test.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Usage: node test.js - */ - -var mime = require('../mime'); -var assert = require('assert'); -var path = require('path'); - -// -// Test mime lookups -// - -assert.equal('text/plain', mime.lookup('text.txt')); // normal file -assert.equal('text/plain', mime.lookup('TEXT.TXT')); // uppercase -assert.equal('text/plain', mime.lookup('dir/text.txt')); // dir + file -assert.equal('text/plain', mime.lookup('.text.txt')); // hidden file -assert.equal('text/plain', mime.lookup('.txt')); // nameless -assert.equal('text/plain', mime.lookup('txt')); // extension-only -assert.equal('text/plain', mime.lookup('/txt')); // extension-less () -assert.equal('text/plain', mime.lookup('\\txt')); // Windows, extension-less -assert.equal('application/octet-stream', mime.lookup('text.nope')); // unrecognized -assert.equal('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default - -// -// Test extensions -// - -assert.equal('txt', mime.extension(mime.types.text)); -assert.equal('html', mime.extension(mime.types.htm)); -assert.equal('bin', mime.extension('application/octet-stream')); -assert.equal('bin', mime.extension('application/octet-stream ')); -assert.equal('html', mime.extension(' text/html; charset=UTF-8')); -assert.equal('html', mime.extension('text/html; charset=UTF-8 ')); -assert.equal('html', mime.extension('text/html; charset=UTF-8')); -assert.equal('html', mime.extension('text/html ; charset=UTF-8')); -assert.equal('html', mime.extension('text/html;charset=UTF-8')); -assert.equal('html', mime.extension('text/Html;charset=UTF-8')); -assert.equal(undefined, mime.extension('unrecognized')); - -// -// Test node.types lookups -// - -assert.equal('font/woff', mime.lookup('file.woff')); -assert.equal('application/octet-stream', mime.lookup('file.buffer')); -// TODO: Uncomment once #157 is resolved -// assert.equal('audio/mp4', mime.lookup('file.m4a')); -assert.equal('font/otf', mime.lookup('file.otf')); - -// -// Test charsets -// - -assert.equal('UTF-8', mime.charsets.lookup('text/plain')); -assert.equal('UTF-8', mime.charsets.lookup(mime.types.js)); -assert.equal('UTF-8', mime.charsets.lookup(mime.types.json)); -assert.equal(undefined, mime.charsets.lookup(mime.types.bin)); -assert.equal('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); - -console.log('\nAll tests passed'); diff --git a/node_modules/mime/types.json b/node_modules/mime/types.json deleted file mode 100644 index bec78ab..0000000 --- a/node_modules/mime/types.json +++ /dev/null @@ -1 +0,0 @@ -{"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":[],"application/font-woff2":[],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/vtt":["vtt"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]} \ No newline at end of file diff --git a/node_modules/minimist/.eslintrc b/node_modules/minimist/.eslintrc deleted file mode 100644 index bd1a5e0..0000000 --- a/node_modules/minimist/.eslintrc +++ /dev/null @@ -1,29 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb/eslint-config/node/0.4", - - "rules": { - "array-element-newline": 0, - "complexity": 0, - "func-style": [2, "declaration"], - "max-lines-per-function": 0, - "max-nested-callbacks": 1, - "max-statements-per-line": 1, - "max-statements": 0, - "multiline-comment-style": 0, - "no-continue": 1, - "no-param-reassign": 1, - "no-restricted-syntax": 1, - "object-curly-newline": 0, - }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "camelcase": 0, - }, - }, - ] -} diff --git a/node_modules/minimist/.github/FUNDING.yml b/node_modules/minimist/.github/FUNDING.yml deleted file mode 100644 index a936622..0000000 --- a/node_modules/minimist/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/minimist -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/minimist/.nycrc b/node_modules/minimist/.nycrc deleted file mode 100644 index 55c3d29..0000000 --- a/node_modules/minimist/.nycrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "example", - "test" - ] -} diff --git a/node_modules/minimist/CHANGELOG.md b/node_modules/minimist/CHANGELOG.md deleted file mode 100644 index c9a1e15..0000000 --- a/node_modules/minimist/CHANGELOG.md +++ /dev/null @@ -1,298 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.2.8](https://github.com/minimistjs/minimist/compare/v1.2.7...v1.2.8) - 2023-02-09 - -### Merged - -- [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17) -- [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12) -- [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10) - -### Fixed - -- [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15) -- [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8) -- [Fix] Fix long option followed by single dash [`#15`](https://github.com/minimistjs/minimist/issues/15) -- [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9) -- [Fix] Fix handling of short option with non-trivial equals [`#5`](https://github.com/minimistjs/minimist/issues/5) -- [Tests] Remove duplicate test [`#8`](https://github.com/minimistjs/minimist/issues/8) -- [Fix] opt.string works with multiple aliases [`#9`](https://github.com/minimistjs/minimist/issues/9) - -### Commits - -- Merge tag 'v0.2.3' [`a026794`](https://github.com/minimistjs/minimist/commit/a0267947c7870fc5847cf2d437fbe33f392767da) -- [eslint] fix indentation and whitespace [`5368ca4`](https://github.com/minimistjs/minimist/commit/5368ca4147e974138a54cc0dc4cea8f756546b70) -- [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7) -- [eslint] more cleanup [`62fde7d`](https://github.com/minimistjs/minimist/commit/62fde7d935f83417fb046741531a9e2346a36976) -- [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1) -- [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c) -- [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91) -- [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4) -- [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982) -- [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0) -- [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07) -- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b) -- [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa) -- [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e) -- Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf) -- isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11) -- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79) -- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`3124ed3`](https://github.com/minimistjs/minimist/commit/3124ed3e46306301ebb3c834874ce0241555c2c4) -- [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6) -- [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c) -- [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a) -- [actions] Avoid 0.6 tests due to build failures [`ba92fe6`](https://github.com/minimistjs/minimist/commit/ba92fe6ebbdc0431cca9a2ea8f27beb492f5e4ec) -- [Dev Deps] update `tape` [`950eaa7`](https://github.com/minimistjs/minimist/commit/950eaa74f112e04d23e9c606c67472c46739b473) -- [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b) -- Merge tag 'v0.2.2' [`980d7ac`](https://github.com/minimistjs/minimist/commit/980d7ac61a0b4bd552711251ac107d506b23e41f) - -## [v1.2.7](https://github.com/minimistjs/minimist/compare/v1.2.6...v1.2.7) - 2022-10-10 - -### Commits - -- [meta] add `auto-changelog` [`0ebf4eb`](https://github.com/minimistjs/minimist/commit/0ebf4ebcd5f7787a5524d31a849ef41316b83c3c) -- [actions] add reusable workflows [`e115b63`](https://github.com/minimistjs/minimist/commit/e115b63fa9d3909f33b00a2db647ff79068388de) -- [eslint] add eslint; rules to enable later are warnings [`f58745b`](https://github.com/minimistjs/minimist/commit/f58745b9bb84348e1be72af7dbba5840c7c13013) -- [Dev Deps] switch from `covert` to `nyc` [`ab03356`](https://github.com/minimistjs/minimist/commit/ab033567b9c8b31117cb026dc7f1e592ce455c65) -- [readme] rename and add badges [`236f4a0`](https://github.com/minimistjs/minimist/commit/236f4a07e4ebe5ee44f1496ec6974991ab293ffd) -- [meta] create FUNDING.yml; add `funding` in package.json [`783a49b`](https://github.com/minimistjs/minimist/commit/783a49bfd47e8335d3098a8cac75662cf71eb32a) -- [meta] use `npmignore` to autogenerate an npmignore file [`f81ece6`](https://github.com/minimistjs/minimist/commit/f81ece6aaec2fa14e69ff4f1e0407a8c4e2635a2) -- Only apps should have lockfiles [`56cad44`](https://github.com/minimistjs/minimist/commit/56cad44c7f879b9bb5ec18fcc349308024a89bfc) -- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`49c5f9f`](https://github.com/minimistjs/minimist/commit/49c5f9fb7e6a92db9eb340cc679de92fb3aacded) -- [Tests] add `aud` in `posttest` [`228ae93`](https://github.com/minimistjs/minimist/commit/228ae938f3cd9db9dfd8bd7458b076a7b2aef280) -- [meta] add `safe-publish-latest` [`01fc23f`](https://github.com/minimistjs/minimist/commit/01fc23f5104f85c75059972e01dd33796ab529ff) -- [meta] update repo URLs [`6b164c7`](https://github.com/minimistjs/minimist/commit/6b164c7d68e0b6bf32f894699effdfb7c63041dd) - -## [v1.2.6](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.6) - 2022-03-21 - -### Commits - -- test from prototype pollution PR [`bc8ecee`](https://github.com/minimistjs/minimist/commit/bc8ecee43875261f4f17eb20b1243d3ed15e70eb) -- isConstructorOrProto adapted from PR [`c2b9819`](https://github.com/minimistjs/minimist/commit/c2b981977fa834b223b408cfb860f933c9811e4d) -- security notice for additional prototype pollution issue [`ef88b93`](https://github.com/minimistjs/minimist/commit/ef88b9325f77b5ee643ccfc97e2ebda577e4c4e2) - -## [v1.2.5](https://github.com/minimistjs/minimist/compare/v1.2.4...v1.2.5) - 2020-03-12 - -## [v1.2.4](https://github.com/minimistjs/minimist/compare/v1.2.3...v1.2.4) - 2020-03-11 - -### Commits - -- security notice [`4cf1354`](https://github.com/minimistjs/minimist/commit/4cf1354839cb972e38496d35e12f806eea92c11f) -- additional test for constructor prototype pollution [`1043d21`](https://github.com/minimistjs/minimist/commit/1043d212c3caaf871966e710f52cfdf02f9eea4b) - -## [v1.2.3](https://github.com/minimistjs/minimist/compare/v1.2.2...v1.2.3) - 2020-03-10 - -### Commits - -- more failing proto pollution tests [`13c01a5`](https://github.com/minimistjs/minimist/commit/13c01a5327736903704984b7f65616b8476850cc) -- even more aggressive checks for protocol pollution [`38a4d1c`](https://github.com/minimistjs/minimist/commit/38a4d1caead72ef99e824bb420a2528eec03d9ab) - -## [v1.2.2](https://github.com/minimistjs/minimist/compare/v1.2.1...v1.2.2) - 2020-03-10 - -### Commits - -- failing test for protocol pollution [`0efed03`](https://github.com/minimistjs/minimist/commit/0efed0340ec8433638758f7ca0c77cb20a0bfbab) -- cleanup [`67d3722`](https://github.com/minimistjs/minimist/commit/67d3722413448d00a62963d2d30c34656a92d7e2) -- console.dir -> console.log [`47acf72`](https://github.com/minimistjs/minimist/commit/47acf72c715a630bf9ea013867f47f1dd69dfc54) -- don't assign onto __proto__ [`63e7ed0`](https://github.com/minimistjs/minimist/commit/63e7ed05aa4b1889ec2f3b196426db4500cbda94) - -## [v1.2.1](https://github.com/minimistjs/minimist/compare/v1.2.0...v1.2.1) - 2020-03-10 - -### Merged - -- move the `opts['--']` example back where it belongs [`#63`](https://github.com/minimistjs/minimist/pull/63) - -### Commits - -- add test [`6be5dae`](https://github.com/minimistjs/minimist/commit/6be5dae35a32a987bcf4137fcd6c19c5200ee909) -- fix bad boolean regexp [`ac3fc79`](https://github.com/minimistjs/minimist/commit/ac3fc796e63b95128fdbdf67ea7fad71bd59aa76) - -## [v1.2.0](https://github.com/minimistjs/minimist/compare/v1.1.3...v1.2.0) - 2015-08-24 - -### Commits - -- failing -k=v short test [`63416b8`](https://github.com/minimistjs/minimist/commit/63416b8cd1d0d70e4714564cce465a36e4dd26d7) -- kv short fix [`6bbe145`](https://github.com/minimistjs/minimist/commit/6bbe14529166245e86424f220a2321442fe88dc3) -- failing kv short test [`f72ab7f`](https://github.com/minimistjs/minimist/commit/f72ab7f4572adc52902c9b6873cc969192f01b10) -- fixed kv test [`f5a48c3`](https://github.com/minimistjs/minimist/commit/f5a48c3e50e40ca54f00c8e84de4b4d6e9897fa8) -- enforce space between arg key and value [`86b321a`](https://github.com/minimistjs/minimist/commit/86b321affe648a8e016c095a4f0efa9d9074f502) - -## [v1.1.3](https://github.com/minimistjs/minimist/compare/v1.1.2...v1.1.3) - 2015-08-06 - -### Commits - -- add failing test - boolean alias array [`0fa3c5b`](https://github.com/minimistjs/minimist/commit/0fa3c5b3dd98551ddecf5392831b4c21211743fc) -- fix boolean values with multiple aliases [`9c0a6e7`](https://github.com/minimistjs/minimist/commit/9c0a6e7de25a273b11bbf9a7464f0bd833779795) - -## [v1.1.2](https://github.com/minimistjs/minimist/compare/v1.1.1...v1.1.2) - 2015-07-22 - -### Commits - -- Convert boolean arguments to boolean values [`8f3dc27`](https://github.com/minimistjs/minimist/commit/8f3dc27cf833f1d54671b6d0bcb55c2fe19672a9) -- use non-ancient npm, node 0.12 and iojs [`61ed1d0`](https://github.com/minimistjs/minimist/commit/61ed1d034b9ec7282764ce76f3992b1a0b4906ae) -- an older npm for 0.8 [`25cf778`](https://github.com/minimistjs/minimist/commit/25cf778b1220e7838a526832ad6972f75244054f) - -## [v1.1.1](https://github.com/minimistjs/minimist/compare/v1.1.0...v1.1.1) - 2015-03-10 - -### Commits - -- check that they type of a value is a boolean, not just that it is currently set to a boolean [`6863198`](https://github.com/minimistjs/minimist/commit/6863198e36139830ff1f20ffdceaddd93f2c1db9) -- upgrade tape, fix type issues from old tape version [`806712d`](https://github.com/minimistjs/minimist/commit/806712df91604ed02b8e39aa372b84aea659ee34) -- test for setting a boolean to a null default [`8c444fe`](https://github.com/minimistjs/minimist/commit/8c444fe89384ded7d441c120915ea60620b01dd3) -- if the previous value was a boolean, without an default (or with an alias) don't make an array either [`e5f419a`](https://github.com/minimistjs/minimist/commit/e5f419a3b5b3bc3f9e5ac71b7040621af70ed2dd) - -## [v1.1.0](https://github.com/minimistjs/minimist/compare/v1.0.0...v1.1.0) - 2014-08-10 - -### Commits - -- add support for handling "unknown" options not registered with the parser. [`6f3cc5d`](https://github.com/minimistjs/minimist/commit/6f3cc5d4e84524932a6ef2ce3592acc67cdd4383) -- reformat package.json [`02ed371`](https://github.com/minimistjs/minimist/commit/02ed37115194d3697ff358e8e25e5e66bab1d9f8) -- coverage script [`e5531ba`](https://github.com/minimistjs/minimist/commit/e5531ba0479da3b8138d3d8cac545d84ccb1c8df) -- extra fn to get 100% coverage again [`a6972da`](https://github.com/minimistjs/minimist/commit/a6972da89e56bf77642f8ec05a13b6558db93498) - -## [v1.0.0](https://github.com/minimistjs/minimist/compare/v0.2.3...v1.0.0) - 2014-08-10 - -### Commits - -- added stopEarly option [`471c7e4`](https://github.com/minimistjs/minimist/commit/471c7e4a7e910fc7ad8f9df850a186daf32c64e9) -- fix list [`fef6ae7`](https://github.com/minimistjs/minimist/commit/fef6ae79c38b9dc1c49569abb7cd04eb965eac5e) - -## [v0.2.3](https://github.com/minimistjs/minimist/compare/v0.2.2...v0.2.3) - 2023-02-09 - -### Merged - -- [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17) -- [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12) -- [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10) - -### Fixed - -- [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15) -- [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8) -- [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9) - -### Commits - -- [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7) -- [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1) -- [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982) -- isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11) -- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79) -- [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b) - -## [v0.2.2](https://github.com/minimistjs/minimist/compare/v0.2.1...v0.2.2) - 2022-10-10 - -### Commits - -- [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c) -- [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91) -- [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4) -- [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0) -- [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07) -- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b) -- [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa) -- [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e) -- Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf) -- [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6) -- [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c) -- [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a) - -## [v0.2.1](https://github.com/minimistjs/minimist/compare/v0.2.0...v0.2.1) - 2020-03-12 - -## [v0.2.0](https://github.com/minimistjs/minimist/compare/v0.1.0...v0.2.0) - 2014-06-19 - -### Commits - -- support all-boolean mode [`450a97f`](https://github.com/minimistjs/minimist/commit/450a97f6e2bc85c7a4a13185c19a818d9a5ebe69) - -## [v0.1.0](https://github.com/minimistjs/minimist/compare/v0.0.10...v0.1.0) - 2014-05-12 - -### Commits - -- Provide a mechanism to segregate -- arguments [`ce4a1e6`](https://github.com/minimistjs/minimist/commit/ce4a1e63a7e8d5ab88d2a3768adefa6af98a445a) -- documented argv['--'] [`14db0e6`](https://github.com/minimistjs/minimist/commit/14db0e6dbc6d2b9e472adaa54dad7004b364634f) -- Adding a test-case for notFlags segregation [`715c1e3`](https://github.com/minimistjs/minimist/commit/715c1e3714be223f998f6c537af6b505f0236c16) - -## [v0.0.10](https://github.com/minimistjs/minimist/compare/v0.0.9...v0.0.10) - 2014-05-11 - -### Commits - -- dedicated boolean test [`46e448f`](https://github.com/minimistjs/minimist/commit/46e448f9f513cfeb2bcc8b688b9b47ba1e515c2b) -- dedicated num test [`9bf2d36`](https://github.com/minimistjs/minimist/commit/9bf2d36f1d3b8795be90b8f7de0a937f098aa394) -- aliased values treated as strings [`1ab743b`](https://github.com/minimistjs/minimist/commit/1ab743bad4484d69f1259bed42f9531de01119de) -- cover the case of already numbers, at 100% coverage [`b2bb044`](https://github.com/minimistjs/minimist/commit/b2bb04436599d77a2ce029e8e555e25b3aa55d13) -- another test for higher coverage [`3662624`](https://github.com/minimistjs/minimist/commit/3662624be976d5489d486a856849c048d13be903) - -## [v0.0.9](https://github.com/minimistjs/minimist/compare/v0.0.8...v0.0.9) - 2014-05-08 - -### Commits - -- Eliminate `longest` fn. [`824f642`](https://github.com/minimistjs/minimist/commit/824f642038d1b02ede68b6261d1d65163390929a) - -## [v0.0.8](https://github.com/minimistjs/minimist/compare/v0.0.7...v0.0.8) - 2014-02-20 - -### Commits - -- return '' if flag is string and empty [`fa63ed4`](https://github.com/minimistjs/minimist/commit/fa63ed4651a4ef4eefddce34188e0d98d745a263) -- handle joined single letters [`66c248f`](https://github.com/minimistjs/minimist/commit/66c248f0241d4d421d193b022e9e365f11178534) - -## [v0.0.7](https://github.com/minimistjs/minimist/compare/v0.0.6...v0.0.7) - 2014-02-08 - -### Commits - -- another swap of .test for .match [`d1da408`](https://github.com/minimistjs/minimist/commit/d1da40819acbe846d89a5c02721211e3c1260dde) - -## [v0.0.6](https://github.com/minimistjs/minimist/compare/v0.0.5...v0.0.6) - 2014-02-08 - -### Commits - -- use .test() instead of .match() to not crash on non-string values in the arguments array [`7e0d1ad`](https://github.com/minimistjs/minimist/commit/7e0d1add8c9e5b9b20a4d3d0f9a94d824c578da1) - -## [v0.0.5](https://github.com/minimistjs/minimist/compare/v0.0.4...v0.0.5) - 2013-09-18 - -### Commits - -- Improve '--' handling. [`b11822c`](https://github.com/minimistjs/minimist/commit/b11822c09cc9d2460f30384d12afc0b953c037a4) - -## [v0.0.4](https://github.com/minimistjs/minimist/compare/v0.0.3...v0.0.4) - 2013-09-17 - -## [v0.0.3](https://github.com/minimistjs/minimist/compare/v0.0.2...v0.0.3) - 2013-09-12 - -### Commits - -- failing test for single dash preceeding a double dash [`b465514`](https://github.com/minimistjs/minimist/commit/b465514b82c9ae28972d714facd951deb2ad762b) -- fix for the dot test [`6a095f1`](https://github.com/minimistjs/minimist/commit/6a095f1d364c8fab2d6753d2291a0649315d297a) - -## [v0.0.2](https://github.com/minimistjs/minimist/compare/v0.0.1...v0.0.2) - 2013-08-28 - -### Commits - -- allow dotted aliases & defaults [`321c33e`](https://github.com/minimistjs/minimist/commit/321c33e755485faaeb44eeb1c05d33b2e0a5a7c4) -- use a better version of ff [`e40f611`](https://github.com/minimistjs/minimist/commit/e40f61114cf7be6f7947f7b3eed345853a67dbbb) - -## [v0.0.1](https://github.com/minimistjs/minimist/compare/v0.0.0...v0.0.1) - 2013-06-25 - -### Commits - -- remove trailing commas [`6ff0fa0`](https://github.com/minimistjs/minimist/commit/6ff0fa055064f15dbe06d50b89d5173a6796e1db) - -## v0.0.0 - 2013-06-25 - -### Commits - -- half of the parse test ported [`3079326`](https://github.com/minimistjs/minimist/commit/307932601325087de6cf94188eb798ffc4f3088a) -- stripped down code and a passing test from optimist [`7cced88`](https://github.com/minimistjs/minimist/commit/7cced88d82e399d1a03ed23eb667f04d3f320d10) -- ported parse tests completely over [`9448754`](https://github.com/minimistjs/minimist/commit/944875452e0820df6830b1408c26a0f7d3e1db04) -- docs, package.json [`a5bf46a`](https://github.com/minimistjs/minimist/commit/a5bf46ac9bb3bd114a9c340276c62c1091e538d5) -- move more short tests into short.js [`503edb5`](https://github.com/minimistjs/minimist/commit/503edb5c41d89c0d40831ee517154fc13b0f18b9) -- default bool test was wrong, not the code [`1b9f5db`](https://github.com/minimistjs/minimist/commit/1b9f5db4741b49962846081b68518de824992097) -- passing long tests ripped out of parse.js [`7972c4a`](https://github.com/minimistjs/minimist/commit/7972c4aff1f4803079e1668006658e2a761a0428) -- badges [`84c0370`](https://github.com/minimistjs/minimist/commit/84c037063664d42878aace715fe6572ce01b6f3b) -- all the tests now ported, some failures [`64239ed`](https://github.com/minimistjs/minimist/commit/64239edfe92c711c4eb0da254fcdfad2a5fdb605) -- failing short test [`f8a5341`](https://github.com/minimistjs/minimist/commit/f8a534112dd1138d2fad722def56a848480c446f) -- fixed the numeric test [`6b034f3`](https://github.com/minimistjs/minimist/commit/6b034f37c79342c60083ed97fd222e16928aac51) diff --git a/node_modules/minimist/LICENSE b/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/minimist/README.md b/node_modules/minimist/README.md deleted file mode 100644 index 74da323..0000000 --- a/node_modules/minimist/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# minimist [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.log(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ - _: ['foo', 'bar', 'baz'], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' -} -``` - -# security - -Previous versions had a prototype pollution bug that could cause privilege -escalation in some circumstances when handling untrusted user input. - -Please use version 1.2.6 or later: - -* https://security.snyk.io/vuln/SNYK-JS-MINIMIST-2429795 (version <=1.2.5) -* https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 (version <=1.2.3) - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a boolean, string or array of strings to always treat as -booleans. if `true` will treat all double hyphenated arguments without equal signs -as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values -* `opts.stopEarly` - when true, populate `argv._` with everything after the -first non-option -* `opts['--']` - when true, populate `argv._` with everything before the `--` -and `argv['--']` with everything after the `--`. Here's an example: - - ``` - > require('./')('one two three -- four five --six'.split(' '), { '--': true }) - { - _: ['one', 'two', 'three'], - '--': ['four', 'five', '--six'] - } - ``` - - Note that with `opts['--']` set, parsing for arguments still stops after the - `--`. - -* `opts.unknown` - a function which is invoked with a command line parameter not -defined in the `opts` configuration object. If the function returns `false`, the -unknown option is not added to `argv`. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT - -[package-url]: https://npmjs.org/package/minimist -[npm-version-svg]: https://versionbadg.es/minimistjs/minimist.svg -[npm-badge-png]: https://nodei.co/npm/minimist.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/minimist.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/minimist.svg -[downloads-url]: https://npm-stat.com/charts.html?package=minimist -[codecov-image]: https://codecov.io/gh/minimistjs/minimist/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/minimistjs/minimist/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/minimistjs/minimist -[actions-url]: https://github.com/minimistjs/minimist/actions diff --git a/node_modules/minimist/example/parse.js b/node_modules/minimist/example/parse.js deleted file mode 100644 index 9d90ffb..0000000 --- a/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -var argv = require('../')(process.argv.slice(2)); -console.log(argv); diff --git a/node_modules/minimist/index.js b/node_modules/minimist/index.js deleted file mode 100644 index f020f39..0000000 --- a/node_modules/minimist/index.js +++ /dev/null @@ -1,263 +0,0 @@ -'use strict'; - -function hasKey(obj, keys) { - var o = obj; - keys.slice(0, -1).forEach(function (key) { - o = o[key] || {}; - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function isNumber(x) { - if (typeof x === 'number') { return true; } - if ((/^0x[0-9a-f]+$/i).test(x)) { return true; } - return (/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/).test(x); -} - -function isConstructorOrProto(obj, key) { - return (key === 'constructor' && typeof obj[key] === 'function') || key === '__proto__'; -} - -module.exports = function (args, opts) { - if (!opts) { opts = {}; } - - var flags = { - bools: {}, - strings: {}, - unknownFn: null, - }; - - if (typeof opts.unknown === 'function') { - flags.unknownFn = opts.unknown; - } - - if (typeof opts.boolean === 'boolean' && opts.boolean) { - flags.allBools = true; - } else { - [].concat(opts.boolean).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - } - - var aliases = {}; - - function aliasIsBoolean(key) { - return aliases[key].some(function (x) { - return flags.bools[x]; - }); - } - - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - if (aliases[key]) { - [].concat(aliases[key]).forEach(function (k) { - flags.strings[k] = true; - }); - } - }); - - var defaults = opts.default || {}; - - var argv = { _: [] }; - - function argDefined(key, arg) { - return (flags.allBools && (/^--[^=]+$/).test(arg)) - || flags.strings[key] - || flags.bools[key] - || aliases[key]; - } - - function setKey(obj, keys, value) { - var o = obj; - for (var i = 0; i < keys.length - 1; i++) { - var key = keys[i]; - if (isConstructorOrProto(o, key)) { return; } - if (o[key] === undefined) { o[key] = {}; } - if ( - o[key] === Object.prototype - || o[key] === Number.prototype - || o[key] === String.prototype - ) { - o[key] = {}; - } - if (o[key] === Array.prototype) { o[key] = []; } - o = o[key]; - } - - var lastKey = keys[keys.length - 1]; - if (isConstructorOrProto(o, lastKey)) { return; } - if ( - o === Object.prototype - || o === Number.prototype - || o === String.prototype - ) { - o = {}; - } - if (o === Array.prototype) { o = []; } - if (o[lastKey] === undefined || flags.bools[lastKey] || typeof o[lastKey] === 'boolean') { - o[lastKey] = value; - } else if (Array.isArray(o[lastKey])) { - o[lastKey].push(value); - } else { - o[lastKey] = [o[lastKey], value]; - } - } - - function setArg(key, val, arg) { - if (arg && flags.unknownFn && !argDefined(key, arg)) { - if (flags.unknownFn(arg) === false) { return; } - } - - var value = !flags.strings[key] && isNumber(val) - ? Number(val) - : val; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--') + 1); - args = args.slice(0, args.indexOf('--')); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - var key; - var next; - - if ((/^--.+=/).test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - key = m[1]; - var value = m[2]; - if (flags.bools[key]) { - value = value !== 'false'; - } - setArg(key, value, arg); - } else if ((/^--no-.+/).test(arg)) { - key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false, arg); - } else if ((/^--.+/).test(arg)) { - key = arg.match(/^--(.+)/)[1]; - next = args[i + 1]; - if ( - next !== undefined - && !(/^(-|--)[^-]/).test(next) - && !flags.bools[key] - && !flags.allBools - && (aliases[key] ? !aliasIsBoolean(key) : true) - ) { - setArg(key, next, arg); - i += 1; - } else if ((/^(true|false)$/).test(next)) { - setArg(key, next === 'true', arg); - i += 1; - } else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } else if ((/^-[^-]+/).test(arg)) { - var letters = arg.slice(1, -1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - - if (next === '-') { - setArg(letters[j], next, arg); - continue; - } - - if ((/[A-Za-z]/).test(letters[j]) && next[0] === '=') { - setArg(letters[j], next.slice(1), arg); - broken = true; - break; - } - - if ( - (/[A-Za-z]/).test(letters[j]) - && (/-?\d+(\.\d*)?(e-?\d+)?$/).test(next) - ) { - setArg(letters[j], next, arg); - broken = true; - break; - } - - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], arg.slice(j + 2), arg); - broken = true; - break; - } else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); - } - } - - key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if ( - args[i + 1] - && !(/^(-|--)[^-]/).test(args[i + 1]) - && !flags.bools[key] - && (aliases[key] ? !aliasIsBoolean(key) : true) - ) { - setArg(key, args[i + 1], arg); - i += 1; - } else if (args[i + 1] && (/^(true|false)$/).test(args[i + 1])) { - setArg(key, args[i + 1] === 'true', arg); - i += 1; - } else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - } else { - if (!flags.unknownFn || flags.unknownFn(arg) !== false) { - argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg)); - } - if (opts.stopEarly) { - argv._.push.apply(argv._, args.slice(i + 1)); - break; - } - } - } - - Object.keys(defaults).forEach(function (k) { - if (!hasKey(argv, k.split('.'))) { - setKey(argv, k.split('.'), defaults[k]); - - (aliases[k] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[k]); - }); - } - }); - - if (opts['--']) { - argv['--'] = notFlags.slice(); - } else { - notFlags.forEach(function (k) { - argv._.push(k); - }); - } - - return argv; -}; diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json deleted file mode 100644 index c10a334..0000000 --- a/node_modules/minimist/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "minimist", - "version": "1.2.8", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "@ljharb/eslint-config": "^21.0.1", - "aud": "^2.0.2", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.6.3" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=auto", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "lint": "eslint --ext=js,mjs .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/minimistjs/minimist.git" - }, - "homepage": "https://github.com/minimistjs/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } -} diff --git a/node_modules/minimist/test/all_bool.js b/node_modules/minimist/test/all_bool.js deleted file mode 100644 index befa0c9..0000000 --- a/node_modules/minimist/test/all_bool.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('flag boolean true (default all --args to boolean)', function (t) { - var argv = parse(['moo', '--honk', 'cow'], { - boolean: true, - }); - - t.deepEqual(argv, { - honk: true, - _: ['moo', 'cow'], - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); - -test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { - var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { - boolean: true, - }); - - t.deepEqual(argv, { - honk: true, - tacos: 'good', - p: 55, - _: ['moo', 'cow'], - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); diff --git a/node_modules/minimist/test/bool.js b/node_modules/minimist/test/bool.js deleted file mode 100644 index e58d47e..0000000 --- a/node_modules/minimist/test/bool.js +++ /dev/null @@ -1,177 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false }, - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'], - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse(['-x', '-z', 'one', 'two', 'three'], { - boolean: ['x', 'y', 'z'], - }); - - t.deepEqual(argv, { - x: true, - y: false, - z: true, - _: ['one', 'two', 'three'], - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); -test('boolean and alias with chainable api', function (t) { - var aliased = ['-h', 'derp']; - var regular = ['--herp', 'derp']; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' }, - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' }, - }); - var expected = { - herp: true, - h: true, - _: ['derp'], - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = ['-h', 'derp']; - var regular = ['--herp', 'derp']; - var opts = { - alias: { h: 'herp' }, - boolean: 'herp', - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - _: ['derp'], - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias array with options hash', function (t) { - var aliased = ['-h', 'derp']; - var regular = ['--herp', 'derp']; - var alt = ['--harp', 'derp']; - var opts = { - alias: { h: ['herp', 'harp'] }, - boolean: 'h', - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var altPropertyArgv = parse(alt, opts); - var expected = { - harp: true, - herp: true, - h: true, - _: ['derp'], - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.same(altPropertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = ['-h', 'true']; - var regular = ['--herp', 'true']; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - _: [], - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function (t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool', - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool', - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); - -test('boolean --boool=true', function (t) { - var parsed = parse(['--boool=true'], { - default: { - boool: false, - }, - boolean: ['boool'], - }); - - t.same(parsed.boool, true); - t.end(); -}); - -test('boolean --boool=false', function (t) { - var parsed = parse(['--boool=false'], { - default: { - boool: true, - }, - boolean: ['boool'], - }); - - t.same(parsed.boool, false); - t.end(); -}); - -test('boolean using something similar to true', function (t) { - var opts = { boolean: 'h' }; - var result = parse(['-h', 'true.txt'], opts); - var expected = { - h: true, - _: ['true.txt'], - }; - - t.same(result, expected); - t.end(); -}); diff --git a/node_modules/minimist/test/dash.js b/node_modules/minimist/test/dash.js deleted file mode 100644 index 7078817..0000000 --- a/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(6); - t.deepEqual(parse(['-n', '-']), { n: '-', _: [] }); - t.deepEqual(parse(['--nnn', '-']), { nnn: '-', _: [] }); - t.deepEqual(parse(['-']), { _: ['-'] }); - t.deepEqual(parse(['-f-']), { f: '-', _: [] }); - t.deepEqual( - parse(['-b', '-'], { boolean: 'b' }), - { b: true, _: ['-'] } - ); - t.deepEqual( - parse(['-s', '-'], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(2); - t.deepEqual(parse(['-a', '--', 'b']), { a: true, _: ['b'] }); - t.deepEqual(parse(['--a', '--', 'b']), { a: true, _: ['b'] }); -}); - -test('move arguments after the -- into their own `--` array', function (t) { - t.plan(1); - t.deepEqual( - parse(['--name', 'John', 'before', '--', 'after'], { '--': true }), - { name: 'John', _: ['before'], '--': ['after'] } - ); -}); - -test('--- option value', function (t) { - // A multi-dash value is largely an edge case, but check the behaviour is as expected, - // and in particular the same for short option and long option (as made consistent in Jan 2023). - t.plan(2); - t.deepEqual(parse(['-n', '---']), { n: '---', _: [] }); - t.deepEqual(parse(['--nnn', '---']), { nnn: '---', _: [] }); -}); - diff --git a/node_modules/minimist/test/default_bool.js b/node_modules/minimist/test/default_bool.js deleted file mode 100644 index 4e9f625..0000000 --- a/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true }, - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false }, - }); - t.equal(argv.somefalse, false); - t.end(); -}); - -test('boolean default to null', function (t) { - var argv = parse([], { - boolean: 'maybe', - default: { maybe: null }, - }); - t.equal(argv.maybe, null); - - var argvLong = parse(['--maybe'], { - boolean: 'maybe', - default: { maybe: null }, - }); - t.equal(argvLong.maybe, true); - t.end(); -}); diff --git a/node_modules/minimist/test/dotted.js b/node_modules/minimist/test/dotted.js deleted file mode 100644 index 126ff03..0000000 --- a/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], { default: { 'a.b': 11 }, alias: { 'a.b': 'aa.bb' } }); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', { default: { 'a.b': 11 }, alias: { 'a.b': 'aa.bb' } }); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); - -test('dotted default with no alias', function (t) { - var argv = parse('', { default: { 'a.b': 11 } }); - t.equal(argv.a.b, 11); - t.end(); -}); diff --git a/node_modules/minimist/test/kv_short.js b/node_modules/minimist/test/kv_short.js deleted file mode 100644 index 6d1b53a..0000000 --- a/node_modules/minimist/test/kv_short.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('short -k=v', function (t) { - t.plan(1); - - var argv = parse(['-b=123']); - t.deepEqual(argv, { b: 123, _: [] }); -}); - -test('multi short -k=v', function (t) { - t.plan(1); - - var argv = parse(['-a=whatever', '-b=robots']); - t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); -}); - -test('short with embedded equals -k=a=b', function (t) { - t.plan(1); - - var argv = parse(['-k=a=b']); - t.deepEqual(argv, { k: 'a=b', _: [] }); -}); - -test('short with later equals like -ab=c', function (t) { - t.plan(1); - - var argv = parse(['-ab=c']); - t.deepEqual(argv, { a: true, b: 'c', _: [] }); -}); diff --git a/node_modules/minimist/test/long.js b/node_modules/minimist/test/long.js deleted file mode 100644 index 9fef51f..0000000 --- a/node_modules/minimist/test/long.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse(['--bool']), - { bool: true, _: [] }, - 'long boolean' - ); - t.deepEqual( - parse(['--pow', 'xixxle']), - { pow: 'xixxle', _: [] }, - 'long capture sp' - ); - t.deepEqual( - parse(['--pow=xixxle']), - { pow: 'xixxle', _: [] }, - 'long capture eq' - ); - t.deepEqual( - parse(['--host', 'localhost', '--port', '555']), - { host: 'localhost', port: 555, _: [] }, - 'long captures sp' - ); - t.deepEqual( - parse(['--host=localhost', '--port=555']), - { host: 'localhost', port: 555, _: [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/node_modules/minimist/test/num.js b/node_modules/minimist/test/num.js deleted file mode 100644 index 074393e..0000000 --- a/node_modules/minimist/test/num.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789', - ]); - t.deepEqual(argv, { - x: 1234, - y: 5.67, - z: 1e7, - w: '10f', - hex: 0xdeadbeef, - _: [789], - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('already a number', function (t) { - var argv = parse(['-x', 1234, 789]); - t.deepEqual(argv, { x: 1234, _: [789] }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); diff --git a/node_modules/minimist/test/parse.js b/node_modules/minimist/test/parse.js deleted file mode 100644 index 65d9d90..0000000 --- a/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,209 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse(['--no-moo']), - { moo: false, _: [] }, - 'no' - ); - t.deepEqual( - parse(['-v', 'a', '-v', 'b', '-v', 'c']), - { v: ['a', 'b', 'c'], _: [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek', - ]), - { - c: true, - a: true, - t: true, - s: 'woo', - h: 'awesome', - b: true, - bool: true, - key: 'value', - multi: ['quux', 'baz'], - meep: false, - name: 'meowmers', - _: ['bare', '--not-a-flag', 'eek'], - } - ); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse(['-t', 'moo'], { boolean: 't' }); - t.deepEqual(argv, { t: true, _: ['moo'] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: ['t', 'verbose'], - default: { verbose: true }, - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'], - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('newlines in params', function (t) { - var args = parse(['-s', 'X\nX']); - t.deepEqual(args, { _: [], s: 'X\nX' }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse(['--s=X\nX']); - t.deepEqual(args, { _: [], s: 'X\nX' }); - t.end(); -}); - -test('strings', function (t) { - var s = parse(['-s', '0001234'], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse(['-x', '56'], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([' ', ' '], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function (t) { - var s = parse(['-s'], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse(['--str'], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse(['-art'], { - string: ['a', 't'], - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - -test('string and alias', function (t) { - var x = parse(['--str', '000123'], { - string: 's', - alias: { s: 'str' }, - }); - - t.equal(x.str, '000123'); - t.equal(typeof x.str, 'string'); - t.equal(x.s, '000123'); - t.equal(typeof x.s, 'string'); - - var y = parse(['-s', '000123'], { - string: 'str', - alias: { str: 's' }, - }); - - t.equal(y.str, '000123'); - t.equal(typeof y.str, 'string'); - t.equal(y.s, '000123'); - t.equal(typeof y.s, 'string'); - - var z = parse(['-s123'], { - alias: { str: ['s', 'S'] }, - string: ['str'], - }); - - t.deepEqual( - z, - { _: [], s: '123', S: '123', str: '123' }, - 'opt.string works with multiple aliases' - ); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - parse(['-I/foo/bar/baz']), - { I: '/foo/bar/baz', _: [] } - ); - t.same( - parse(['-xyz/foo/bar/baz']), - { x: true, y: true, z: '/foo/bar/baz', _: [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse(['-f', '11', '--zoom', '55'], { - alias: { z: 'zoom' }, - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse(['-f', '11', '--zoom', '55'], { - alias: { z: ['zm', 'zoom'] }, - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop', - ]); - - t.same(argv.foo, { - bar: 3, - baz: 4, - quux: { - quibble: 5, - o_O: true, - }, - }); - t.same(argv.beep, { boop: true }); - t.end(); -}); diff --git a/node_modules/minimist/test/parse_modified.js b/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 32965d1..0000000 --- a/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions', function (t) { - t.plan(1); - - var argv = parse(['-b', '123'], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: [123] }); -}); diff --git a/node_modules/minimist/test/proto.js b/node_modules/minimist/test/proto.js deleted file mode 100644 index 6e629dd..0000000 --- a/node_modules/minimist/test/proto.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -/* eslint no-proto: 0 */ - -var parse = require('../'); -var test = require('tape'); - -test('proto pollution', function (t) { - var argv = parse(['--__proto__.x', '123']); - t.equal({}.x, undefined); - t.equal(argv.__proto__.x, undefined); - t.equal(argv.x, undefined); - t.end(); -}); - -test('proto pollution (array)', function (t) { - var argv = parse(['--x', '4', '--x', '5', '--x.__proto__.z', '789']); - t.equal({}.z, undefined); - t.deepEqual(argv.x, [4, 5]); - t.equal(argv.x.z, undefined); - t.equal(argv.x.__proto__.z, undefined); - t.end(); -}); - -test('proto pollution (number)', function (t) { - var argv = parse(['--x', '5', '--x.__proto__.z', '100']); - t.equal({}.z, undefined); - t.equal((4).z, undefined); - t.equal(argv.x, 5); - t.equal(argv.x.z, undefined); - t.end(); -}); - -test('proto pollution (string)', function (t) { - var argv = parse(['--x', 'abc', '--x.__proto__.z', 'def']); - t.equal({}.z, undefined); - t.equal('...'.z, undefined); - t.equal(argv.x, 'abc'); - t.equal(argv.x.z, undefined); - t.end(); -}); - -test('proto pollution (constructor)', function (t) { - var argv = parse(['--constructor.prototype.y', '123']); - t.equal({}.y, undefined); - t.equal(argv.y, undefined); - t.end(); -}); - -test('proto pollution (constructor function)', function (t) { - var argv = parse(['--_.concat.constructor.prototype.y', '123']); - function fnToBeTested() {} - t.equal(fnToBeTested.y, undefined); - t.equal(argv.y, undefined); - t.end(); -}); - -// powered by snyk - https://github.com/backstage/backstage/issues/10343 -test('proto pollution (constructor function) snyk', function (t) { - var argv = parse('--_.constructor.constructor.prototype.foo bar'.split(' ')); - t.equal(function () {}.foo, undefined); - t.equal(argv.y, undefined); - t.end(); -}); diff --git a/node_modules/minimist/test/short.js b/node_modules/minimist/test/short.js deleted file mode 100644 index 4a7b843..0000000 --- a/node_modules/minimist/test/short.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse(['-n123']), { n: 123, _: [] }); - t.deepEqual( - parse(['-123', '456']), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse(['-b']), - { b: true, _: [] }, - 'short boolean' - ); - t.deepEqual( - parse(['foo', 'bar', 'baz']), - { _: ['foo', 'bar', 'baz'] }, - 'bare' - ); - t.deepEqual( - parse(['-cats']), - { c: true, a: true, t: true, s: true, _: [] }, - 'group' - ); - t.deepEqual( - parse(['-cats', 'meow']), - { c: true, a: true, t: true, s: 'meow', _: [] }, - 'short group next' - ); - t.deepEqual( - parse(['-h', 'localhost']), - { h: 'localhost', _: [] }, - 'short capture' - ); - t.deepEqual( - parse(['-h', 'localhost', '-p', '555']), - { h: 'localhost', p: 555, _: [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse(['-h', 'localhost', '-fp', '555', 'script.js']), - { - f: true, p: 555, h: 'localhost', - _: ['script.js'], - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse(['-h', 'localhost', '-fp', '555', 'script.js']), - { - f: true, p: 555, h: 'localhost', - _: ['script.js'], - } - ); - t.end(); -}); diff --git a/node_modules/minimist/test/stop_early.js b/node_modules/minimist/test/stop_early.js deleted file mode 100644 index 52a6a91..0000000 --- a/node_modules/minimist/test/stop_early.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('stops parsing on the first non-option when stopEarly is set', function (t) { - var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { - stopEarly: true, - }); - - t.deepEqual(argv, { - aaa: 'bbb', - _: ['ccc', '--ddd'], - }); - - t.end(); -}); diff --git a/node_modules/minimist/test/unknown.js b/node_modules/minimist/test/unknown.js deleted file mode 100644 index 4f2e0ca..0000000 --- a/node_modules/minimist/test/unknown.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('boolean and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['-h', 'true', '--derp', 'true']; - var regular = ['--herp', 'true', '-d', 'true']; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - unknown: unknownFn, - }; - parse(aliased, opts); - parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('flag boolean true any double hyphen argument is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { - boolean: true, - unknown: unknownFn, - }); - t.same(unknown, ['--tacos=good', 'cow', '-p']); - t.same(argv, { - honk: true, - _: [], - }); - t.end(); -}); - -test('string and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['-h', 'hello', '--derp', 'goodbye']; - var regular = ['--herp', 'hello', '-d', 'moon']; - var opts = { - alias: { h: 'herp' }, - string: 'h', - unknown: unknownFn, - }; - parse(aliased, opts); - parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('default and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['-h', 'hello']; - var regular = ['--herp', 'hello']; - var opts = { - default: { h: 'bar' }, - alias: { h: 'herp' }, - unknown: unknownFn, - }; - parse(aliased, opts); - parse(regular, opts); - - t.same(unknown, []); - t.end(); - unknownFn(); // exercise fn for 100% coverage -}); - -test('value following -- is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['--bad', '--', 'good', 'arg']; - var opts = { - '--': true, - unknown: unknownFn, - }; - var argv = parse(aliased, opts); - - t.same(unknown, ['--bad']); - t.same(argv, { - '--': ['good', 'arg'], - _: [], - }); - t.end(); -}); diff --git a/node_modules/minimist/test/whitespace.js b/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 4fdaf1d..0000000 --- a/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace', function (t) { - t.plan(1); - var x = parse(['-x', '\t']).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/mkdirp/LICENSE b/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1ae..0000000 --- a/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -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/node_modules/mkdirp/bin/cmd.js b/node_modules/mkdirp/bin/cmd.js deleted file mode 100644 index d95de15..0000000 --- a/node_modules/mkdirp/bin/cmd.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var mkdirp = require('../'); -var minimist = require('minimist'); -var fs = require('fs'); - -var argv = minimist(process.argv.slice(2), { - alias: { m: 'mode', h: 'help' }, - string: [ 'mode' ] -}); -if (argv.help) { - fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); - return; -} - -var paths = argv._.slice(); -var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; - -(function next () { - if (paths.length === 0) return; - var p = paths.shift(); - - if (mode === undefined) mkdirp(p, cb) - else mkdirp(p, mode, cb) - - function cb (err) { - if (err) { - console.error(err.message); - process.exit(1); - } - else next(); - } -})(); diff --git a/node_modules/mkdirp/bin/usage.txt b/node_modules/mkdirp/bin/usage.txt deleted file mode 100644 index f952aa2..0000000 --- a/node_modules/mkdirp/bin/usage.txt +++ /dev/null @@ -1,12 +0,0 @@ -usage: mkdirp [DIR1,DIR2..] {OPTIONS} - - Create each supplied directory including any necessary parent directories that - don't yet exist. - - If the directory already exists, do nothing. - -OPTIONS are: - - -m, --mode If a directory needs to be created, set the mode as an octal - permission string. - diff --git a/node_modules/mkdirp/index.js b/node_modules/mkdirp/index.js deleted file mode 100644 index 0890ac3..0000000 --- a/node_modules/mkdirp/index.js +++ /dev/null @@ -1,102 +0,0 @@ -var path = require('path'); -var fs = require('fs'); -var _0777 = parseInt('0777', 8); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, opts, f, made) { - if (typeof opts === 'function') { - f = opts; - opts = {}; - } - else if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 - } - if (!made) made = null; - - var cb = f || /* istanbul ignore next */ function () {}; - p = path.resolve(p); - - xfs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - /* istanbul ignore if */ - if (path.dirname(p) === p) return cb(er); - mkdirP(path.dirname(p), opts, function (er, made) { - /* istanbul ignore if */ - if (er) cb(er, made); - else mkdirP(p, opts, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 - } - if (!made) made = null; - - p = path.resolve(p); - - try { - xfs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), opts, made); - sync(p, opts, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = xfs.statSync(p); - } - catch (err1) /* istanbul ignore next */ { - throw err0; - } - /* istanbul ignore if */ - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/node_modules/mkdirp/package.json b/node_modules/mkdirp/package.json deleted file mode 100644 index 951e58d..0000000 --- a/node_modules/mkdirp/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.5.6", - "publishConfig": { - "tag": "legacy" - }, - "author": "James Halliday (http://substack.net)", - "main": "index.js", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "https://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": { - "minimist": "^1.2.6" - }, - "devDependencies": { - "tap": "^16.0.1" - }, - "bin": "bin/cmd.js", - "license": "MIT", - "files": [ - "bin", - "index.js" - ] -} diff --git a/node_modules/mkdirp/readme.markdown b/node_modules/mkdirp/readme.markdown deleted file mode 100644 index fc314bf..0000000 --- a/node_modules/mkdirp/readme.markdown +++ /dev/null @@ -1,100 +0,0 @@ -# mkdirp - -Like `mkdir -p`, but in node.js! - -[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) - -# example - -## pow.js - -```js -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); -``` - -Output - -``` -pow! -``` - -And now /tmp/foo/bar/baz exists, huzzah! - -# methods - -```js -var mkdirp = require('mkdirp'); -``` - -## mkdirp(dir, opts, cb) - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `opts.mode`. If `opts` is a non-object, it will be treated as -the `opts.mode`. - -If `opts.mode` isn't specified, it defaults to `0777`. - -`cb(err, made)` fires with the error or the first directory `made` -that had to be created, if any. - -You can optionally pass in an alternate `fs` implementation by passing in -`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and -`opts.fs.stat(path, cb)`. - -## mkdirp.sync(dir, opts) - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `opts.mode`. If `opts` is a non-object, it will be -treated as the `opts.mode`. - -If `opts.mode` isn't specified, it defaults to `0777`. - -Returns the first directory that had to be created, if any. - -You can optionally pass in an alternate `fs` implementation by passing in -`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and -`opts.fs.statSync(path)`. - -# usage - -This package also ships with a `mkdirp` command. - -``` -usage: mkdirp [DIR1,DIR2..] {OPTIONS} - - Create each supplied directory including any necessary parent directories that - don't yet exist. - - If the directory already exists, do nothing. - -OPTIONS are: - - -m, --mode If a directory needs to be created, set the mode as an octal - permission string. - -``` - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install mkdirp -``` - -to get the library, or - -``` -npm install -g mkdirp -``` - -to get the command. - -# license - -MIT diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js deleted file mode 100644 index ea734fb..0000000 --- a/node_modules/ms/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function (val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} diff --git a/node_modules/ms/license.md b/node_modules/ms/license.md deleted file mode 100644 index fa5d39b..0000000 --- a/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Vercel, Inc. - -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/node_modules/ms/package.json b/node_modules/ms/package.json deleted file mode 100644 index 4997189..0000000 --- a/node_modules/ms/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "ms", - "version": "2.1.3", - "description": "Tiny millisecond conversion utility", - "repository": "vercel/ms", - "main": "./index", - "files": [ - "index.js" - ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "license": "MIT", - "devDependencies": { - "eslint": "4.18.2", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1", - "prettier": "2.0.5" - } -} diff --git a/node_modules/ms/readme.md b/node_modules/ms/readme.md deleted file mode 100644 index 0fc1abb..0000000 --- a/node_modules/ms/readme.md +++ /dev/null @@ -1,59 +0,0 @@ -# ms - -![CI](https://github.com/vercel/ms/workflows/CI/badge.svg) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -ms('-3 days') // -259200000 -ms('-1h') // -3600000 -ms('-200') // -200 -``` - -### Convert from Milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(-3 * 60000) // "-3m" -ms(ms('10 hours')) // "10h" -``` - -### Time Format Written-Out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(-3 * 60000, { long: true }) // "-3 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [Node.js](https://nodejs.org) and in the browser -- If a number is supplied to `ms`, a string with a unit is returned -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) -- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned - -## Related Packages - -- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. - -## Caught a Bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/node_modules/nanoid/.devcontainer.json b/node_modules/nanoid/.devcontainer.json deleted file mode 100644 index 7fd5ba1..0000000 --- a/node_modules/nanoid/.devcontainer.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "image": "localhost/ai-opensource:latest", - "forwardPorts": [], - "mounts": [ - { - "source": "pnpm-store", - "target": "/home/ai/.local/share/pnpm/store", - "type": "volume" - }, - { - "source": "shell-history", - "target": "/home/ai/.local/share/history/", - "type": "volume" - } - ], - "workspaceMount": "", - "runArgs": [ - "--userns=keep-id:uid=1000,gid=1000", - "--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}:Z", - "--network=host", - "--ulimit=host" - ] -} diff --git a/node_modules/nanoid/LICENSE b/node_modules/nanoid/LICENSE deleted file mode 100644 index 37f56aa..0000000 --- a/node_modules/nanoid/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright 2017 Andrey Sitnik - -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/node_modules/nanoid/README.md b/node_modules/nanoid/README.md deleted file mode 100644 index f4c8c13..0000000 --- a/node_modules/nanoid/README.md +++ /dev/null @@ -1,554 +0,0 @@ -# Nano ID - -Nano ID logo by Anton Lovchikov - -**English** | [Русский](./README.ru.md) | [简体中文](./README.zh-CN.md) | [Bahasa Indonesia](./README.id-ID.md) - -A tiny, secure, URL-friendly, unique string ID generator for JavaScript. - -> “An amazing level of senseless perfectionism, -> which is simply impossible not to respect.” - -* **Small.** 130 bytes (minified and gzipped). No dependencies. - [Size Limit] controls the size. -* **Fast.** It is 2 times faster than UUID. -* **Safe.** It uses hardware random generator. Can be used in clusters. -* **Short IDs.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`). - So ID size was reduced from 36 to 21 symbols. -* **Portable.** Nano ID was ported - to [20 programming languages](#other-programming-languages). - -```js -import { nanoid } from 'nanoid' -model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT" -``` - -Supports modern browsers, IE [with Babel], Node.js and React Native. - -[online tool]: https://gitpod.io/#https://github.com/ai/nanoid/ -[with Babel]: https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/ -[Size Limit]: https://github.com/ai/size-limit - - - Sponsored by Evil Martians - - -## Table of Contents - -* [Comparison with UUID](#comparison-with-uuid) -* [Benchmark](#benchmark) -* [Security](#security) -* [API](#api) - * [Blocking](#blocking) - * [Async](#async) - * [Non-Secure](#non-secure) - * [Custom Alphabet or Size](#custom-alphabet-or-size) - * [Custom Random Bytes Generator](#custom-random-bytes-generator) -* [Usage](#usage) - * [IE](#ie) - * [React](#react) - * [React Native](#react-native) - * [Rollup](#rollup) - * [PouchDB and CouchDB](#pouchdb-and-couchdb) - * [Mongoose](#mongoose) - * [Web Workers](#web-workers) - * [CLI](#cli) - * [Other Programming Languages](#other-programming-languages) -* [Tools](#tools) - - -## Comparison with UUID - -Nano ID is quite comparable to UUID v4 (random-based). -It has a similar number of random bits in the ID -(126 in Nano ID and 122 in UUID), so it has a similar collision probability: - -> For there to be a one in a billion chance of duplication, -> 103 trillion version 4 IDs must be generated. - -There are three main differences between Nano ID and UUID v4: - -1. Nano ID uses a bigger alphabet, so a similar number of random bits - are packed in just 21 symbols instead of 36. -2. Nano ID code is **4 times less** than `uuid/v4` package: - 130 bytes instead of 483. -3. Because of memory allocation tricks, Nano ID is **2 times** faster than UUID. - - -## Benchmark - -```rust -$ node ./test/benchmark.js -crypto.randomUUID 25,603,857 ops/sec -@napi-rs/uuid 9,973,819 ops/sec -uid/secure 8,234,798 ops/sec -@lukeed/uuid 7,464,706 ops/sec -nanoid 5,616,592 ops/sec -customAlphabet 3,115,207 ops/sec -uuid v4 1,535,753 ops/sec -secure-random-string 388,226 ops/sec -uid-safe.sync 363,489 ops/sec -cuid 187,343 ops/sec -shortid 45,758 ops/sec - -Async: -nanoid/async 96,094 ops/sec -async customAlphabet 97,184 ops/sec -async secure-random-string 92,794 ops/sec -uid-safe 90,684 ops/sec - -Non-secure: -uid 67,376,692 ops/sec -nanoid/non-secure 2,849,639 ops/sec -rndm 2,674,806 ops/sec -``` - -Test configuration: ThinkPad X1 Carbon Gen 9, Fedora 34, Node.js 16.10. - - -## Security - -*See a good article about random generators theory: -[Secure random values (in Node.js)]* - -* **Unpredictability.** Instead of using the unsafe `Math.random()`, Nano ID - uses the `crypto` module in Node.js and the Web Crypto API in browsers. - These modules use unpredictable hardware random generator. -* **Uniformity.** `random % alphabet` is a popular mistake to make when coding - an ID generator. The distribution will not be even; there will be a lower - chance for some symbols to appear compared to others. So, it will reduce - the number of tries when brute-forcing. Nano ID uses a [better algorithm] - and is tested for uniformity. - - Nano ID uniformity - -* **Well-documented:** all Nano ID hacks are documented. See comments - in [the source]. -* **Vulnerabilities:** to report a security vulnerability, please use - the [Tidelift security contact](https://tidelift.com/security). - Tidelift will coordinate the fix and disclosure. - -[Secure random values (in Node.js)]: https://gist.github.com/joepie91/7105003c3b26e65efcea63f3db82dfba -[better algorithm]: https://github.com/ai/nanoid/blob/main/index.js -[the source]: https://github.com/ai/nanoid/blob/main/index.js - - -## Install - -```bash -npm install --save nanoid -``` - -For quick hacks, you can load Nano ID from CDN. Though, it is not recommended -to be used in production because of the lower loading performance. - -```js -import { nanoid } from 'https://cdn.jsdelivr.net/npm/nanoid/nanoid.js' -``` - -Nano ID provides ES modules. You do not need to do anything to use Nano ID -as ESM in webpack, Rollup, Parcel, or Node.js. - -```js -import { nanoid } from 'nanoid' -``` - -In Node.js you can use CommonJS import: - -```js -const { nanoid } = require('nanoid') -``` - - -## API - -Nano ID has 3 APIs: normal (blocking), asynchronous, and non-secure. - -By default, Nano ID uses URL-friendly symbols (`A-Za-z0-9_-`) and returns an ID -with 21 characters (to have a collision probability similar to UUID v4). - - -### Blocking - -The safe and easiest way to use Nano ID. - -In rare cases could block CPU from other work while noise collection -for hardware random generator. - -```js -import { nanoid } from 'nanoid' -model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT" -``` - -If you want to reduce the ID size (and increase collisions probability), -you can pass the size as an argument. - -```js -nanoid(10) //=> "IRFa-VaY2b" -``` - -Don’t forget to check the safety of your ID size -in our [ID collision probability] calculator. - -You can also use a [custom alphabet](#custom-alphabet-or-size) -or a [random generator](#custom-random-bytes-generator). - -[ID collision probability]: https://zelark.github.io/nano-id-cc/ - - -### Async - -To generate hardware random bytes, CPU collects electromagnetic noise. -For most cases, entropy will be already collected. - -In the synchronous API during the noise collection, the CPU is busy and -cannot do anything useful (for instance, process another HTTP request). - -Using the asynchronous API of Nano ID, another code can run during -the entropy collection. - -```js -import { nanoid } from 'nanoid/async' - -async function createUser () { - user.id = await nanoid() -} -``` - -Read more about entropy collection in [`crypto.randomBytes`] docs. - -Unfortunately, you will lose Web Crypto API advantages in a browser -if you use the asynchronous API. So, currently, in the browser, you are limited -with either security (`nanoid`), asynchronous behavior (`nanoid/async`), -or non-secure behavior (`nanoid/non-secure`) that will be explained -in the next part of the documentation. - -[`crypto.randomBytes`]: https://nodejs.org/api/crypto.html#crypto_crypto_randombytes_size_callback - - -### Non-Secure - -By default, Nano ID uses hardware random bytes generation for security -and low collision probability. If you are not so concerned with security, -you can use the faster non-secure generator. - -```js -import { nanoid } from 'nanoid/non-secure' -const id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ" -``` - - -### Custom Alphabet or Size - -`customAlphabet` allows you to create `nanoid` with your own alphabet -and ID size. - -```js -import { customAlphabet } from 'nanoid' -const nanoid = customAlphabet('1234567890abcdef', 10) -model.id = nanoid() //=> "4f90d13a42" -``` - -```js -import { customAlphabet } from 'nanoid/async' -const nanoid = customAlphabet('1234567890abcdef', 10) -async function createUser () { - user.id = await nanoid() -} -``` - -```js -import { customAlphabet } from 'nanoid/non-secure' -const nanoid = customAlphabet('1234567890abcdef', 10) -user.id = nanoid() -``` - -Check the safety of your custom alphabet and ID size in our -[ID collision probability] calculator. For more alphabets, check out the options -in [`nanoid-dictionary`]. - -Alphabet must contain 256 symbols or less. -Otherwise, the security of the internal generator algorithm is not guaranteed. - -In addition to setting a default size, you can change the ID size when calling -the function: - -```js -import { customAlphabet } from 'nanoid' -const nanoid = customAlphabet('1234567890abcdef', 10) -model.id = nanoid(5) //=> "f01a2" -``` - -[ID collision probability]: https://alex7kom.github.io/nano-nanoid-cc/ -[`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionary - - -### Custom Random Bytes Generator - -`customRandom` allows you to create a `nanoid` and replace alphabet -and the default random bytes generator. - -In this example, a seed-based generator is used: - -```js -import { customRandom } from 'nanoid' - -const rng = seedrandom(seed) -const nanoid = customRandom('abcdef', 10, size => { - return (new Uint8Array(size)).map(() => 256 * rng()) -}) - -nanoid() //=> "fbaefaadeb" -``` - -`random` callback must accept the array size and return an array -with random numbers. - -If you want to use the same URL-friendly symbols with `customRandom`, -you can get the default alphabet using the `urlAlphabet`. - -```js -const { customRandom, urlAlphabet } = require('nanoid') -const nanoid = customRandom(urlAlphabet, 10, random) -``` - -Asynchronous and non-secure APIs are not available for `customRandom`. - -Note, that between Nano ID versions we may change random generator -call sequence. If you are using seed-based generators, we do not guarantee -the same result. - - -## Usage - -### IE - -If you support IE, you need to [transpile `node_modules`] by Babel -and add `crypto` alias. Moreover, `UInt8Array` in IE actually -is not an array and to cope with it, you have to convert it to an array -manually: - -```js -// polyfills.js -if (!window.crypto && window.msCrypto) { - window.crypto = window.msCrypto - - const getRandomValuesDef = window.crypto.getRandomValues - - window.crypto.getRandomValues = function (array) { - const values = getRandomValuesDef.call(window.crypto, array) - const result = [] - - for (let i = 0; i < array.length; i++) { - result[i] = values[i]; - } - - return result - }; -} -``` - -```js -import './polyfills.js' -import { nanoid } from 'nanoid' -``` - -[transpile `node_modules`]: https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/ - - -### React - -There’s no correct way to use Nano ID for React `key` prop -since it should be consistent among renders. - -```jsx -function Todos({todos}) { - return ( -
    - {todos.map(todo => ( -
  • /* DON’T DO IT */ - {todo.text} -
  • - ))} -
- ) -} -``` - -You should rather try to reach for stable ID inside your list item. - -```jsx -const todoItems = todos.map((todo) => -
  • - {todo.text} -
  • -) -``` - -In case you don’t have stable IDs you'd rather use index as `key` -instead of `nanoid()`: - -```jsx -const todoItems = todos.map((text, index) => -
  • /* Still not recommended but preferred over nanoid(). - Only do this if items have no stable IDs. */ - {text} -
  • -) -``` - - -### React Native - -React Native does not have built-in random generator. The following polyfill -works for plain React Native and Expo starting with `39.x`. - -1. Check [`react-native-get-random-values`] docs and install it. -2. Import it before Nano ID. - -```js -import 'react-native-get-random-values' -import { nanoid } from 'nanoid' -``` - -[`react-native-get-random-values`]: https://github.com/LinusU/react-native-get-random-values - - -### Rollup - -For Rollup you will need [`@rollup/plugin-node-resolve`] to bundle browser version -of this library.: - -```js - plugins: [ - nodeResolve({ - browser: true - }) - ] -``` - -[`@rollup/plugin-node-resolve`]: https://github.com/rollup/plugins/tree/master/packages/node-resolve - - -### PouchDB and CouchDB - -In PouchDB and CouchDB, IDs can’t start with an underscore `_`. -A prefix is required to prevent this issue, as Nano ID might use a `_` -at the start of the ID by default. - -Override the default ID with the following option: - -```js -db.put({ - _id: 'id' + nanoid(), - … -}) -``` - - -### Mongoose - -```js -const mySchema = new Schema({ - _id: { - type: String, - default: () => nanoid() - } -}) -``` - - -### Web Workers - -Web Workers do not have access to a secure random generator. - -Security is important in IDs when IDs should be unpredictable. -For instance, in "access by URL" link generation. -If you do not need unpredictable IDs, but you need to use Web Workers, -you can use the non‑secure ID generator. - -```js -import { nanoid } from 'nanoid/non-secure' -nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ" -``` - -Note: non-secure IDs are more prone to collision attacks. - - -### CLI - -You can get unique ID in terminal by calling `npx nanoid`. You need only -Node.js in the system. You do not need Nano ID to be installed anywhere. - -```sh -$ npx nanoid -npx: installed 1 in 0.63s -LZfXLFzPPR4NNrgjlWDxn -``` - -Size of generated ID can be specified with `--size` (or `-s`) option: - -```sh -$ npx nanoid --size 10 -L3til0JS4z -``` - -Custom alphabet can be specified with `--alphabet` (or `-a`) option -(note that in this case `--size` is required): - -```sh -$ npx nanoid --alphabet abc --size 15 -bccbcabaabaccab -``` - -### Other Programming Languages - -Nano ID was ported to many languages. You can use these ports to have -the same ID generator on the client and server side. - -* [C#](https://github.com/codeyu/nanoid-net) -* [C++](https://github.com/mcmikecreations/nanoid_cpp) -* [Clojure and ClojureScript](https://github.com/zelark/nano-id) -* [ColdFusion/CFML](https://github.com/JamoCA/cfml-nanoid) -* [Crystal](https://github.com/mamantoha/nanoid.cr) -* [Dart & Flutter](https://github.com/pd4d10/nanoid-dart) -* [Deno](https://github.com/ianfabs/nanoid) -* [Go](https://github.com/matoous/go-nanoid) -* [Elixir](https://github.com/railsmechanic/nanoid) -* [Haskell](https://github.com/MichelBoucey/NanoID) -* [Janet](https://sr.ht/~statianzo/janet-nanoid/) -* [Java](https://github.com/aventrix/jnanoid) -* [Nim](https://github.com/icyphox/nanoid.nim) -* [OCaml](https://github.com/routineco/ocaml-nanoid) -* [Perl](https://github.com/tkzwtks/Nanoid-perl) -* [PHP](https://github.com/hidehalo/nanoid-php) -* [Python](https://github.com/puyuan/py-nanoid) - with [dictionaries](https://pypi.org/project/nanoid-dictionary) -* [Postgres Extension](https://github.com/spa5k/uids-postgres) -* [R](https://github.com/hrbrmstr/nanoid) (with dictionaries) -* [Ruby](https://github.com/radeno/nanoid.rb) -* [Rust](https://github.com/nikolay-govorov/nanoid) -* [Swift](https://github.com/antiflasher/NanoID) -* [Unison](https://share.unison-lang.org/latest/namespaces/hojberg/nanoid) -* [V](https://github.com/invipal/nanoid) -* [Zig](https://github.com/SasLuca/zig-nanoid) - -For other environments, [CLI] is available to generate IDs from a command line. - -[CLI]: #cli - - -## Tools - -* [ID size calculator] shows collision probability when adjusting - the ID alphabet or size. -* [`nanoid-dictionary`] with popular alphabets to use with [`customAlphabet`]. -* [`nanoid-good`] to be sure that your ID doesn’t contain any obscene words. - -[`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionary -[ID size calculator]: https://zelark.github.io/nano-id-cc/ -[`customAlphabet`]: #custom-alphabet-or-size -[`nanoid-good`]: https://github.com/y-gagar1n/nanoid-good diff --git a/node_modules/nanoid/async/index.browser.cjs b/node_modules/nanoid/async/index.browser.cjs deleted file mode 100644 index 80d1871..0000000 --- a/node_modules/nanoid/async/index.browser.cjs +++ /dev/null @@ -1,69 +0,0 @@ -let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes)) - -let customAlphabet = (alphabet, defaultSize = 21) => { - // First, a bitmask is necessary to generate the ID. The bitmask makes bytes - // values closer to the alphabet size. The bitmask calculates the closest - // `2^31 - 1` number, which exceeds the alphabet size. - // For example, the bitmask for the alphabet size 30 is 31 (00011111). - // `Math.clz32` is not used, because it is not available in browsers. - let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 - // Though, the bitmask solution is not perfect since the bytes exceeding - // the alphabet size are refused. Therefore, to reliably generate the ID, - // the random bytes redundancy has to be satisfied. - - // Note: every hardware random generator call is performance expensive, - // because the system call for entropy collection takes a lot of time. - // So, to avoid additional system calls, extra bytes are requested in advance. - - // Next, a step determines how many random bytes to generate. - // The number of random bytes gets decided upon the ID size, mask, - // alphabet size, and magic number 1.6 (using 1.6 peaks at performance - // according to benchmarks). - - // `-~f => Math.ceil(f)` if f is a float - // `-~i => i + 1` if i is an integer - let step = -~((1.6 * mask * defaultSize) / alphabet.length) - - return async (size = defaultSize) => { - let id = '' - while (true) { - let bytes = crypto.getRandomValues(new Uint8Array(step)) - // A compact alternative for `for (var i = 0; i < step; i++)`. - let i = step | 0 - while (i--) { - // Adding `|| ''` refuses a random byte that exceeds the alphabet size. - id += alphabet[bytes[i] & mask] || '' - if (id.length === size) return id - } - } - } -} - -let nanoid = async (size = 21) => { - let id = '' - let bytes = crypto.getRandomValues(new Uint8Array((size |= 0))) - - // A compact alternative for `for (var i = 0; i < step; i++)`. - while (size--) { - // It is incorrect to use bytes exceeding the alphabet size. - // The following mask reduces the random byte in the 0-255 value - // range to the 0-63 value range. Therefore, adding hacks, such - // as empty string fallback or magic numbers, is unneccessary because - // the bitmask trims bytes down to the alphabet size. - let byte = bytes[size] & 63 - if (byte < 36) { - // `0-9a-z` - id += byte.toString(36) - } else if (byte < 62) { - // `A-Z` - id += (byte - 26).toString(36).toUpperCase() - } else if (byte < 63) { - id += '_' - } else { - id += '-' - } - } - return id -} - -module.exports = { nanoid, customAlphabet, random } diff --git a/node_modules/nanoid/async/index.browser.js b/node_modules/nanoid/async/index.browser.js deleted file mode 100644 index aeffb3f..0000000 --- a/node_modules/nanoid/async/index.browser.js +++ /dev/null @@ -1,69 +0,0 @@ -let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes)) - -let customAlphabet = (alphabet, defaultSize = 21) => { - // First, a bitmask is necessary to generate the ID. The bitmask makes bytes - // values closer to the alphabet size. The bitmask calculates the closest - // `2^31 - 1` number, which exceeds the alphabet size. - // For example, the bitmask for the alphabet size 30 is 31 (00011111). - // `Math.clz32` is not used, because it is not available in browsers. - let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 - // Though, the bitmask solution is not perfect since the bytes exceeding - // the alphabet size are refused. Therefore, to reliably generate the ID, - // the random bytes redundancy has to be satisfied. - - // Note: every hardware random generator call is performance expensive, - // because the system call for entropy collection takes a lot of time. - // So, to avoid additional system calls, extra bytes are requested in advance. - - // Next, a step determines how many random bytes to generate. - // The number of random bytes gets decided upon the ID size, mask, - // alphabet size, and magic number 1.6 (using 1.6 peaks at performance - // according to benchmarks). - - // `-~f => Math.ceil(f)` if f is a float - // `-~i => i + 1` if i is an integer - let step = -~((1.6 * mask * defaultSize) / alphabet.length) - - return async (size = defaultSize) => { - let id = '' - while (true) { - let bytes = crypto.getRandomValues(new Uint8Array(step)) - // A compact alternative for `for (var i = 0; i < step; i++)`. - let i = step | 0 - while (i--) { - // Adding `|| ''` refuses a random byte that exceeds the alphabet size. - id += alphabet[bytes[i] & mask] || '' - if (id.length === size) return id - } - } - } -} - -let nanoid = async (size = 21) => { - let id = '' - let bytes = crypto.getRandomValues(new Uint8Array((size |= 0))) - - // A compact alternative for `for (var i = 0; i < step; i++)`. - while (size--) { - // It is incorrect to use bytes exceeding the alphabet size. - // The following mask reduces the random byte in the 0-255 value - // range to the 0-63 value range. Therefore, adding hacks, such - // as empty string fallback or magic numbers, is unneccessary because - // the bitmask trims bytes down to the alphabet size. - let byte = bytes[size] & 63 - if (byte < 36) { - // `0-9a-z` - id += byte.toString(36) - } else if (byte < 62) { - // `A-Z` - id += (byte - 26).toString(36).toUpperCase() - } else if (byte < 63) { - id += '_' - } else { - id += '-' - } - } - return id -} - -export { nanoid, customAlphabet, random } diff --git a/node_modules/nanoid/async/index.cjs b/node_modules/nanoid/async/index.cjs deleted file mode 100644 index f1b0ad0..0000000 --- a/node_modules/nanoid/async/index.cjs +++ /dev/null @@ -1,71 +0,0 @@ -let crypto = require('crypto') - -let { urlAlphabet } = require('../url-alphabet/index.cjs') - -// `crypto.randomFill()` is a little faster than `crypto.randomBytes()`, -// because it is possible to use in combination with `Buffer.allocUnsafe()`. -let random = bytes => - new Promise((resolve, reject) => { - // `Buffer.allocUnsafe()` is faster because it doesn’t flush the memory. - // Memory flushing is unnecessary since the buffer allocation itself resets - // the memory with the new bytes. - crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => { - if (err) { - reject(err) - } else { - resolve(buf) - } - }) - }) - -let customAlphabet = (alphabet, defaultSize = 21) => { - // First, a bitmask is necessary to generate the ID. The bitmask makes bytes - // values closer to the alphabet size. The bitmask calculates the closest - // `2^31 - 1` number, which exceeds the alphabet size. - // For example, the bitmask for the alphabet size 30 is 31 (00011111). - let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 - // Though, the bitmask solution is not perfect since the bytes exceeding - // the alphabet size are refused. Therefore, to reliably generate the ID, - // the random bytes redundancy has to be satisfied. - - // Note: every hardware random generator call is performance expensive, - // because the system call for entropy collection takes a lot of time. - // So, to avoid additional system calls, extra bytes are requested in advance. - - // Next, a step determines how many random bytes to generate. - // The number of random bytes gets decided upon the ID size, mask, - // alphabet size, and magic number 1.6 (using 1.6 peaks at performance - // according to benchmarks). - let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) - - let tick = (id, size = defaultSize) => - random(step).then(bytes => { - // A compact alternative for `for (var i = 0; i < step; i++)`. - let i = step - while (i--) { - // Adding `|| ''` refuses a random byte that exceeds the alphabet size. - id += alphabet[bytes[i] & mask] || '' - if (id.length >= size) return id - } - return tick(id, size) - }) - - return size => tick('', size) -} - -let nanoid = (size = 21) => - random((size |= 0)).then(bytes => { - let id = '' - // A compact alternative for `for (var i = 0; i < step; i++)`. - while (size--) { - // It is incorrect to use bytes exceeding the alphabet size. - // The following mask reduces the random byte in the 0-255 value - // range to the 0-63 value range. Therefore, adding hacks, such - // as empty string fallback or magic numbers, is unneccessary because - // the bitmask trims bytes down to the alphabet size. - id += urlAlphabet[bytes[size] & 63] - } - return id - }) - -module.exports = { nanoid, customAlphabet, random } diff --git a/node_modules/nanoid/async/index.d.ts b/node_modules/nanoid/async/index.d.ts deleted file mode 100644 index 9e91965..0000000 --- a/node_modules/nanoid/async/index.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Generate secure URL-friendly unique ID. The non-blocking version. - * - * By default, the ID will have 21 symbols to have a collision probability - * similar to UUID v4. - * - * ```js - * import { nanoid } from 'nanoid/async' - * nanoid().then(id => { - * model.id = id - * }) - * ``` - * - * @param size Size of the ID. The default size is 21. - * @returns A promise with a random string. - */ -export function nanoid(size?: number): Promise - -/** - * A low-level function. - * Generate secure unique ID with custom alphabet. The non-blocking version. - * - * Alphabet must contain 256 symbols or less. Otherwise, the generator - * will not be secure. - * - * @param alphabet Alphabet used to generate the ID. - * @param defaultSize Size of the ID. The default size is 21. - * @returns A function that returns a promise with a random string. - * - * ```js - * import { customAlphabet } from 'nanoid/async' - * const nanoid = customAlphabet('0123456789абвгдеё', 5) - * nanoid().then(id => { - * model.id = id //=> "8ё56а" - * }) - * ``` - */ -export function customAlphabet( - alphabet: string, - defaultSize?: number -): (size?: number) => Promise - -/** - * Generate an array of random bytes collected from hardware noise. - * - * ```js - * import { random } from 'nanoid/async' - * random(5).then(bytes => { - * bytes //=> [10, 67, 212, 67, 89] - * }) - * ``` - * - * @param bytes Size of the array. - * @returns A promise with a random bytes array. - */ -export function random(bytes: number): Promise diff --git a/node_modules/nanoid/async/index.js b/node_modules/nanoid/async/index.js deleted file mode 100644 index 7f2eae9..0000000 --- a/node_modules/nanoid/async/index.js +++ /dev/null @@ -1,71 +0,0 @@ -import crypto from 'crypto' - -import { urlAlphabet } from '../url-alphabet/index.js' - -// `crypto.randomFill()` is a little faster than `crypto.randomBytes()`, -// because it is possible to use in combination with `Buffer.allocUnsafe()`. -let random = bytes => - new Promise((resolve, reject) => { - // `Buffer.allocUnsafe()` is faster because it doesn’t flush the memory. - // Memory flushing is unnecessary since the buffer allocation itself resets - // the memory with the new bytes. - crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => { - if (err) { - reject(err) - } else { - resolve(buf) - } - }) - }) - -let customAlphabet = (alphabet, defaultSize = 21) => { - // First, a bitmask is necessary to generate the ID. The bitmask makes bytes - // values closer to the alphabet size. The bitmask calculates the closest - // `2^31 - 1` number, which exceeds the alphabet size. - // For example, the bitmask for the alphabet size 30 is 31 (00011111). - let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 - // Though, the bitmask solution is not perfect since the bytes exceeding - // the alphabet size are refused. Therefore, to reliably generate the ID, - // the random bytes redundancy has to be satisfied. - - // Note: every hardware random generator call is performance expensive, - // because the system call for entropy collection takes a lot of time. - // So, to avoid additional system calls, extra bytes are requested in advance. - - // Next, a step determines how many random bytes to generate. - // The number of random bytes gets decided upon the ID size, mask, - // alphabet size, and magic number 1.6 (using 1.6 peaks at performance - // according to benchmarks). - let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) - - let tick = (id, size = defaultSize) => - random(step).then(bytes => { - // A compact alternative for `for (var i = 0; i < step; i++)`. - let i = step - while (i--) { - // Adding `|| ''` refuses a random byte that exceeds the alphabet size. - id += alphabet[bytes[i] & mask] || '' - if (id.length >= size) return id - } - return tick(id, size) - }) - - return size => tick('', size) -} - -let nanoid = (size = 21) => - random((size |= 0)).then(bytes => { - let id = '' - // A compact alternative for `for (var i = 0; i < step; i++)`. - while (size--) { - // It is incorrect to use bytes exceeding the alphabet size. - // The following mask reduces the random byte in the 0-255 value - // range to the 0-63 value range. Therefore, adding hacks, such - // as empty string fallback or magic numbers, is unneccessary because - // the bitmask trims bytes down to the alphabet size. - id += urlAlphabet[bytes[size] & 63] - } - return id - }) - -export { nanoid, customAlphabet, random } diff --git a/node_modules/nanoid/async/index.native.js b/node_modules/nanoid/async/index.native.js deleted file mode 100644 index a765de9..0000000 --- a/node_modules/nanoid/async/index.native.js +++ /dev/null @@ -1,57 +0,0 @@ -import { getRandomBytesAsync } from 'expo-random' - -import { urlAlphabet } from '../url-alphabet/index.js' - -let random = getRandomBytesAsync - -let customAlphabet = (alphabet, defaultSize = 21) => { - // First, a bitmask is necessary to generate the ID. The bitmask makes bytes - // values closer to the alphabet size. The bitmask calculates the closest - // `2^31 - 1` number, which exceeds the alphabet size. - // For example, the bitmask for the alphabet size 30 is 31 (00011111). - let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 - // Though, the bitmask solution is not perfect since the bytes exceeding - // the alphabet size are refused. Therefore, to reliably generate the ID, - // the random bytes redundancy has to be satisfied. - - // Note: every hardware random generator call is performance expensive, - // because the system call for entropy collection takes a lot of time. - // So, to avoid additional system calls, extra bytes are requested in advance. - - // Next, a step determines how many random bytes to generate. - // The number of random bytes gets decided upon the ID size, mask, - // alphabet size, and magic number 1.6 (using 1.6 peaks at performance - // according to benchmarks). - let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) - - let tick = (id, size = defaultSize) => - random(step).then(bytes => { - // A compact alternative for `for (var i = 0; i < step; i++)`. - let i = step - while (i--) { - // Adding `|| ''` refuses a random byte that exceeds the alphabet size. - id += alphabet[bytes[i] & mask] || '' - if (id.length >= size) return id - } - return tick(id, size) - }) - - return size => tick('', size) -} - -let nanoid = (size = 21) => - random((size |= 0)).then(bytes => { - let id = '' - // A compact alternative for `for (var i = 0; i < step; i++)`. - while (size--) { - // It is incorrect to use bytes exceeding the alphabet size. - // The following mask reduces the random byte in the 0-255 value - // range to the 0-63 value range. Therefore, adding hacks, such - // as empty string fallback or magic numbers, is unneccessary because - // the bitmask trims bytes down to the alphabet size. - id += urlAlphabet[bytes[size] & 63] - } - return id - }) - -export { nanoid, customAlphabet, random } diff --git a/node_modules/nanoid/async/package.json b/node_modules/nanoid/async/package.json deleted file mode 100644 index 578cdb4..0000000 --- a/node_modules/nanoid/async/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "module", - "main": "index.cjs", - "module": "index.js", - "react-native": { - "./index.js": "./index.native.js" - }, - "browser": { - "./index.js": "./index.browser.js", - "./index.cjs": "./index.browser.cjs" - } -} \ No newline at end of file diff --git a/node_modules/nanoid/bin/nanoid.cjs b/node_modules/nanoid/bin/nanoid.cjs deleted file mode 100644 index c76db0f..0000000 --- a/node_modules/nanoid/bin/nanoid.cjs +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env node - -let { nanoid, customAlphabet } = require('..') - -function print(msg) { - process.stdout.write(msg + '\n') -} - -function error(msg) { - process.stderr.write(msg + '\n') - process.exit(1) -} - -if (process.argv.includes('--help') || process.argv.includes('-h')) { - print(` - Usage - $ nanoid [options] - - Options - -s, --size Generated ID size - -a, --alphabet Alphabet to use - -h, --help Show this help - - Examples - $ nanoid --s 15 - S9sBF77U6sDB8Yg - - $ nanoid --size 10 --alphabet abc - bcabababca`) - process.exit() -} - -let alphabet, size -for (let i = 2; i < process.argv.length; i++) { - let arg = process.argv[i] - if (arg === '--size' || arg === '-s') { - size = Number(process.argv[i + 1]) - i += 1 - if (Number.isNaN(size) || size <= 0) { - error('Size must be positive integer') - } - } else if (arg === '--alphabet' || arg === '-a') { - alphabet = process.argv[i + 1] - i += 1 - } else { - error('Unknown argument ' + arg) - } -} - -if (alphabet) { - let customNanoid = customAlphabet(alphabet, size) - print(customNanoid()) -} else { - print(nanoid(size)) -} diff --git a/node_modules/nanoid/index.browser.cjs b/node_modules/nanoid/index.browser.cjs deleted file mode 100644 index d21a91f..0000000 --- a/node_modules/nanoid/index.browser.cjs +++ /dev/null @@ -1,72 +0,0 @@ -// This file replaces `index.js` in bundlers like webpack or Rollup, -// according to `browser` config in `package.json`. - -let { urlAlphabet } = require('./url-alphabet/index.cjs') - -let random = bytes => crypto.getRandomValues(new Uint8Array(bytes)) - -let customRandom = (alphabet, defaultSize, getRandom) => { - // First, a bitmask is necessary to generate the ID. The bitmask makes bytes - // values closer to the alphabet size. The bitmask calculates the closest - // `2^31 - 1` number, which exceeds the alphabet size. - // For example, the bitmask for the alphabet size 30 is 31 (00011111). - // `Math.clz32` is not used, because it is not available in browsers. - let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 - // Though, the bitmask solution is not perfect since the bytes exceeding - // the alphabet size are refused. Therefore, to reliably generate the ID, - // the random bytes redundancy has to be satisfied. - - // Note: every hardware random generator call is performance expensive, - // because the system call for entropy collection takes a lot of time. - // So, to avoid additional system calls, extra bytes are requested in advance. - - // Next, a step determines how many random bytes to generate. - // The number of random bytes gets decided upon the ID size, mask, - // alphabet size, and magic number 1.6 (using 1.6 peaks at performance - // according to benchmarks). - - // `-~f => Math.ceil(f)` if f is a float - // `-~i => i + 1` if i is an integer - let step = -~((1.6 * mask * defaultSize) / alphabet.length) - - return (size = defaultSize) => { - let id = '' - while (true) { - let bytes = getRandom(step) - // A compact alternative for `for (var i = 0; i < step; i++)`. - let j = step | 0 - while (j--) { - // Adding `|| ''` refuses a random byte that exceeds the alphabet size. - id += alphabet[bytes[j] & mask] || '' - if (id.length === size) return id - } - } - } -} - -let customAlphabet = (alphabet, size = 21) => - customRandom(alphabet, size, random) - -let nanoid = (size = 21) => - crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => { - // It is incorrect to use bytes exceeding the alphabet size. - // The following mask reduces the random byte in the 0-255 value - // range to the 0-63 value range. Therefore, adding hacks, such - // as empty string fallback or magic numbers, is unneccessary because - // the bitmask trims bytes down to the alphabet size. - byte &= 63 - if (byte < 36) { - // `0-9a-z` - id += byte.toString(36) - } else if (byte < 62) { - // `A-Z` - id += (byte - 26).toString(36).toUpperCase() - } else if (byte > 62) { - id += '-' - } else { - id += '_' - } - return id - }, '') - -module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/node_modules/nanoid/index.browser.js b/node_modules/nanoid/index.browser.js deleted file mode 100644 index 732e504..0000000 --- a/node_modules/nanoid/index.browser.js +++ /dev/null @@ -1,72 +0,0 @@ -// This file replaces `index.js` in bundlers like webpack or Rollup, -// according to `browser` config in `package.json`. - -import { urlAlphabet } from './url-alphabet/index.js' - -let random = bytes => crypto.getRandomValues(new Uint8Array(bytes)) - -let customRandom = (alphabet, defaultSize, getRandom) => { - // First, a bitmask is necessary to generate the ID. The bitmask makes bytes - // values closer to the alphabet size. The bitmask calculates the closest - // `2^31 - 1` number, which exceeds the alphabet size. - // For example, the bitmask for the alphabet size 30 is 31 (00011111). - // `Math.clz32` is not used, because it is not available in browsers. - let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 - // Though, the bitmask solution is not perfect since the bytes exceeding - // the alphabet size are refused. Therefore, to reliably generate the ID, - // the random bytes redundancy has to be satisfied. - - // Note: every hardware random generator call is performance expensive, - // because the system call for entropy collection takes a lot of time. - // So, to avoid additional system calls, extra bytes are requested in advance. - - // Next, a step determines how many random bytes to generate. - // The number of random bytes gets decided upon the ID size, mask, - // alphabet size, and magic number 1.6 (using 1.6 peaks at performance - // according to benchmarks). - - // `-~f => Math.ceil(f)` if f is a float - // `-~i => i + 1` if i is an integer - let step = -~((1.6 * mask * defaultSize) / alphabet.length) - - return (size = defaultSize) => { - let id = '' - while (true) { - let bytes = getRandom(step) - // A compact alternative for `for (var i = 0; i < step; i++)`. - let j = step | 0 - while (j--) { - // Adding `|| ''` refuses a random byte that exceeds the alphabet size. - id += alphabet[bytes[j] & mask] || '' - if (id.length === size) return id - } - } - } -} - -let customAlphabet = (alphabet, size = 21) => - customRandom(alphabet, size, random) - -let nanoid = (size = 21) => - crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => { - // It is incorrect to use bytes exceeding the alphabet size. - // The following mask reduces the random byte in the 0-255 value - // range to the 0-63 value range. Therefore, adding hacks, such - // as empty string fallback or magic numbers, is unneccessary because - // the bitmask trims bytes down to the alphabet size. - byte &= 63 - if (byte < 36) { - // `0-9a-z` - id += byte.toString(36) - } else if (byte < 62) { - // `A-Z` - id += (byte - 26).toString(36).toUpperCase() - } else if (byte > 62) { - id += '-' - } else { - id += '_' - } - return id - }, '') - -export { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/node_modules/nanoid/index.cjs b/node_modules/nanoid/index.cjs deleted file mode 100644 index c20e374..0000000 --- a/node_modules/nanoid/index.cjs +++ /dev/null @@ -1,85 +0,0 @@ -let crypto = require('crypto') - -let { urlAlphabet } = require('./url-alphabet/index.cjs') - -// It is best to make fewer, larger requests to the crypto module to -// avoid system call overhead. So, random numbers are generated in a -// pool. The pool is a Buffer that is larger than the initial random -// request size by this multiplier. The pool is enlarged if subsequent -// requests exceed the maximum buffer size. -const POOL_SIZE_MULTIPLIER = 128 -let pool, poolOffset - -let fillPool = bytes => { - if (!pool || pool.length < bytes) { - pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER) - crypto.randomFillSync(pool) - poolOffset = 0 - } else if (poolOffset + bytes > pool.length) { - crypto.randomFillSync(pool) - poolOffset = 0 - } - poolOffset += bytes -} - -let random = bytes => { - // `|=` convert `bytes` to number to prevent `valueOf` abusing and pool pollution - fillPool((bytes |= 0)) - return pool.subarray(poolOffset - bytes, poolOffset) -} - -let customRandom = (alphabet, defaultSize, getRandom) => { - // First, a bitmask is necessary to generate the ID. The bitmask makes bytes - // values closer to the alphabet size. The bitmask calculates the closest - // `2^31 - 1` number, which exceeds the alphabet size. - // For example, the bitmask for the alphabet size 30 is 31 (00011111). - let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 - // Though, the bitmask solution is not perfect since the bytes exceeding - // the alphabet size are refused. Therefore, to reliably generate the ID, - // the random bytes redundancy has to be satisfied. - - // Note: every hardware random generator call is performance expensive, - // because the system call for entropy collection takes a lot of time. - // So, to avoid additional system calls, extra bytes are requested in advance. - - // Next, a step determines how many random bytes to generate. - // The number of random bytes gets decided upon the ID size, mask, - // alphabet size, and magic number 1.6 (using 1.6 peaks at performance - // according to benchmarks). - let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) - - return (size = defaultSize) => { - let id = '' - while (true) { - let bytes = getRandom(step) - // A compact alternative for `for (let i = 0; i < step; i++)`. - let i = step - while (i--) { - // Adding `|| ''` refuses a random byte that exceeds the alphabet size. - id += alphabet[bytes[i] & mask] || '' - if (id.length === size) return id - } - } - } -} - -let customAlphabet = (alphabet, size = 21) => - customRandom(alphabet, size, random) - -let nanoid = (size = 21) => { - // `|=` convert `size` to number to prevent `valueOf` abusing and pool pollution - fillPool((size |= 0)) - let id = '' - // We are reading directly from the random pool to avoid creating new array - for (let i = poolOffset - size; i < poolOffset; i++) { - // It is incorrect to use bytes exceeding the alphabet size. - // The following mask reduces the random byte in the 0-255 value - // range to the 0-63 value range. Therefore, adding hacks, such - // as empty string fallback or magic numbers, is unneccessary because - // the bitmask trims bytes down to the alphabet size. - id += urlAlphabet[pool[i] & 63] - } - return id -} - -module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/node_modules/nanoid/index.d.cts b/node_modules/nanoid/index.d.cts deleted file mode 100644 index 3e111a3..0000000 --- a/node_modules/nanoid/index.d.cts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Generate secure URL-friendly unique ID. - * - * By default, the ID will have 21 symbols to have a collision probability - * similar to UUID v4. - * - * ```js - * import { nanoid } from 'nanoid' - * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" - * ``` - * - * @param size Size of the ID. The default size is 21. - * @returns A random string. - */ -export function nanoid(size?: number): string - -/** - * Generate secure unique ID with custom alphabet. - * - * Alphabet must contain 256 symbols or less. Otherwise, the generator - * will not be secure. - * - * @param alphabet Alphabet used to generate the ID. - * @param defaultSize Size of the ID. The default size is 21. - * @returns A random string generator. - * - * ```js - * const { customAlphabet } = require('nanoid') - * const nanoid = customAlphabet('0123456789абвгдеё', 5) - * nanoid() //=> "8ё56а" - * ``` - */ -export function customAlphabet( - alphabet: string, - defaultSize?: number -): (size?: number) => string - -/** - * Generate unique ID with custom random generator and alphabet. - * - * Alphabet must contain 256 symbols or less. Otherwise, the generator - * will not be secure. - * - * ```js - * import { customRandom } from 'nanoid/format' - * - * const nanoid = customRandom('abcdef', 5, size => { - * const random = [] - * for (let i = 0; i < size; i++) { - * random.push(randomByte()) - * } - * return random - * }) - * - * nanoid() //=> "fbaef" - * ``` - * - * @param alphabet Alphabet used to generate a random string. - * @param size Size of the random string. - * @param random A random bytes generator. - * @returns A random string generator. - */ -export function customRandom( - alphabet: string, - size: number, - random: (bytes: number) => Uint8Array -): () => string - -/** - * URL safe symbols. - * - * ```js - * import { urlAlphabet } from 'nanoid' - * const nanoid = customAlphabet(urlAlphabet, 10) - * nanoid() //=> "Uakgb_J5m9" - * ``` - */ -export const urlAlphabet: string - -/** - * Generate an array of random bytes collected from hardware noise. - * - * ```js - * import { customRandom, random } from 'nanoid' - * const nanoid = customRandom("abcdef", 5, random) - * ``` - * - * @param bytes Size of the array. - * @returns An array of random bytes. - */ -export function random(bytes: number): Uint8Array diff --git a/node_modules/nanoid/index.d.ts b/node_modules/nanoid/index.d.ts deleted file mode 100644 index 3e111a3..0000000 --- a/node_modules/nanoid/index.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Generate secure URL-friendly unique ID. - * - * By default, the ID will have 21 symbols to have a collision probability - * similar to UUID v4. - * - * ```js - * import { nanoid } from 'nanoid' - * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" - * ``` - * - * @param size Size of the ID. The default size is 21. - * @returns A random string. - */ -export function nanoid(size?: number): string - -/** - * Generate secure unique ID with custom alphabet. - * - * Alphabet must contain 256 symbols or less. Otherwise, the generator - * will not be secure. - * - * @param alphabet Alphabet used to generate the ID. - * @param defaultSize Size of the ID. The default size is 21. - * @returns A random string generator. - * - * ```js - * const { customAlphabet } = require('nanoid') - * const nanoid = customAlphabet('0123456789абвгдеё', 5) - * nanoid() //=> "8ё56а" - * ``` - */ -export function customAlphabet( - alphabet: string, - defaultSize?: number -): (size?: number) => string - -/** - * Generate unique ID with custom random generator and alphabet. - * - * Alphabet must contain 256 symbols or less. Otherwise, the generator - * will not be secure. - * - * ```js - * import { customRandom } from 'nanoid/format' - * - * const nanoid = customRandom('abcdef', 5, size => { - * const random = [] - * for (let i = 0; i < size; i++) { - * random.push(randomByte()) - * } - * return random - * }) - * - * nanoid() //=> "fbaef" - * ``` - * - * @param alphabet Alphabet used to generate a random string. - * @param size Size of the random string. - * @param random A random bytes generator. - * @returns A random string generator. - */ -export function customRandom( - alphabet: string, - size: number, - random: (bytes: number) => Uint8Array -): () => string - -/** - * URL safe symbols. - * - * ```js - * import { urlAlphabet } from 'nanoid' - * const nanoid = customAlphabet(urlAlphabet, 10) - * nanoid() //=> "Uakgb_J5m9" - * ``` - */ -export const urlAlphabet: string - -/** - * Generate an array of random bytes collected from hardware noise. - * - * ```js - * import { customRandom, random } from 'nanoid' - * const nanoid = customRandom("abcdef", 5, random) - * ``` - * - * @param bytes Size of the array. - * @returns An array of random bytes. - */ -export function random(bytes: number): Uint8Array diff --git a/node_modules/nanoid/index.js b/node_modules/nanoid/index.js deleted file mode 100644 index 5203a4c..0000000 --- a/node_modules/nanoid/index.js +++ /dev/null @@ -1,85 +0,0 @@ -import crypto from 'crypto' - -import { urlAlphabet } from './url-alphabet/index.js' - -// It is best to make fewer, larger requests to the crypto module to -// avoid system call overhead. So, random numbers are generated in a -// pool. The pool is a Buffer that is larger than the initial random -// request size by this multiplier. The pool is enlarged if subsequent -// requests exceed the maximum buffer size. -const POOL_SIZE_MULTIPLIER = 128 -let pool, poolOffset - -let fillPool = bytes => { - if (!pool || pool.length < bytes) { - pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER) - crypto.randomFillSync(pool) - poolOffset = 0 - } else if (poolOffset + bytes > pool.length) { - crypto.randomFillSync(pool) - poolOffset = 0 - } - poolOffset += bytes -} - -let random = bytes => { - // `|=` convert `bytes` to number to prevent `valueOf` abusing and pool pollution - fillPool((bytes |= 0)) - return pool.subarray(poolOffset - bytes, poolOffset) -} - -let customRandom = (alphabet, defaultSize, getRandom) => { - // First, a bitmask is necessary to generate the ID. The bitmask makes bytes - // values closer to the alphabet size. The bitmask calculates the closest - // `2^31 - 1` number, which exceeds the alphabet size. - // For example, the bitmask for the alphabet size 30 is 31 (00011111). - let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 - // Though, the bitmask solution is not perfect since the bytes exceeding - // the alphabet size are refused. Therefore, to reliably generate the ID, - // the random bytes redundancy has to be satisfied. - - // Note: every hardware random generator call is performance expensive, - // because the system call for entropy collection takes a lot of time. - // So, to avoid additional system calls, extra bytes are requested in advance. - - // Next, a step determines how many random bytes to generate. - // The number of random bytes gets decided upon the ID size, mask, - // alphabet size, and magic number 1.6 (using 1.6 peaks at performance - // according to benchmarks). - let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) - - return (size = defaultSize) => { - let id = '' - while (true) { - let bytes = getRandom(step) - // A compact alternative for `for (let i = 0; i < step; i++)`. - let i = step - while (i--) { - // Adding `|| ''` refuses a random byte that exceeds the alphabet size. - id += alphabet[bytes[i] & mask] || '' - if (id.length === size) return id - } - } - } -} - -let customAlphabet = (alphabet, size = 21) => - customRandom(alphabet, size, random) - -let nanoid = (size = 21) => { - // `|=` convert `size` to number to prevent `valueOf` abusing and pool pollution - fillPool((size |= 0)) - let id = '' - // We are reading directly from the random pool to avoid creating new array - for (let i = poolOffset - size; i < poolOffset; i++) { - // It is incorrect to use bytes exceeding the alphabet size. - // The following mask reduces the random byte in the 0-255 value - // range to the 0-63 value range. Therefore, adding hacks, such - // as empty string fallback or magic numbers, is unneccessary because - // the bitmask trims bytes down to the alphabet size. - id += urlAlphabet[pool[i] & 63] - } - return id -} - -export { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/node_modules/nanoid/nanoid.js b/node_modules/nanoid/nanoid.js deleted file mode 100644 index ec242ea..0000000 --- a/node_modules/nanoid/nanoid.js +++ /dev/null @@ -1 +0,0 @@ -export let nanoid=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e<63?"_":"-"),""); \ No newline at end of file diff --git a/node_modules/nanoid/non-secure/index.cjs b/node_modules/nanoid/non-secure/index.cjs deleted file mode 100644 index d51fcb6..0000000 --- a/node_modules/nanoid/non-secure/index.cjs +++ /dev/null @@ -1,34 +0,0 @@ -// This alphabet uses `A-Za-z0-9_-` symbols. -// The order of characters is optimized for better gzip and brotli compression. -// References to the same file (works both for gzip and brotli): -// `'use`, `andom`, and `rict'` -// References to the brotli default dictionary: -// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf` -let urlAlphabet = - 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' - -let customAlphabet = (alphabet, defaultSize = 21) => { - return (size = defaultSize) => { - let id = '' - // A compact alternative for `for (var i = 0; i < step; i++)`. - let i = size | 0 - while (i--) { - // `| 0` is more compact and faster than `Math.floor()`. - id += alphabet[(Math.random() * alphabet.length) | 0] - } - return id - } -} - -let nanoid = (size = 21) => { - let id = '' - // A compact alternative for `for (var i = 0; i < step; i++)`. - let i = size | 0 - while (i--) { - // `| 0` is more compact and faster than `Math.floor()`. - id += urlAlphabet[(Math.random() * 64) | 0] - } - return id -} - -module.exports = { nanoid, customAlphabet } diff --git a/node_modules/nanoid/non-secure/index.d.ts b/node_modules/nanoid/non-secure/index.d.ts deleted file mode 100644 index 4965322..0000000 --- a/node_modules/nanoid/non-secure/index.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Generate URL-friendly unique ID. This method uses the non-secure - * predictable random generator with bigger collision probability. - * - * ```js - * import { nanoid } from 'nanoid/non-secure' - * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" - * ``` - * - * @param size Size of the ID. The default size is 21. - * @returns A random string. - */ -export function nanoid(size?: number): string - -/** - * Generate a unique ID based on a custom alphabet. - * This method uses the non-secure predictable random generator - * with bigger collision probability. - * - * @param alphabet Alphabet used to generate the ID. - * @param defaultSize Size of the ID. The default size is 21. - * @returns A random string generator. - * - * ```js - * import { customAlphabet } from 'nanoid/non-secure' - * const nanoid = customAlphabet('0123456789абвгдеё', 5) - * model.id = //=> "8ё56а" - * ``` - */ -export function customAlphabet( - alphabet: string, - defaultSize?: number -): (size?: number) => string diff --git a/node_modules/nanoid/non-secure/index.js b/node_modules/nanoid/non-secure/index.js deleted file mode 100644 index fcb3e25..0000000 --- a/node_modules/nanoid/non-secure/index.js +++ /dev/null @@ -1,34 +0,0 @@ -// This alphabet uses `A-Za-z0-9_-` symbols. -// The order of characters is optimized for better gzip and brotli compression. -// References to the same file (works both for gzip and brotli): -// `'use`, `andom`, and `rict'` -// References to the brotli default dictionary: -// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf` -let urlAlphabet = - 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' - -let customAlphabet = (alphabet, defaultSize = 21) => { - return (size = defaultSize) => { - let id = '' - // A compact alternative for `for (var i = 0; i < step; i++)`. - let i = size | 0 - while (i--) { - // `| 0` is more compact and faster than `Math.floor()`. - id += alphabet[(Math.random() * alphabet.length) | 0] - } - return id - } -} - -let nanoid = (size = 21) => { - let id = '' - // A compact alternative for `for (var i = 0; i < step; i++)`. - let i = size | 0 - while (i--) { - // `| 0` is more compact and faster than `Math.floor()`. - id += urlAlphabet[(Math.random() * 64) | 0] - } - return id -} - -export { nanoid, customAlphabet } diff --git a/node_modules/nanoid/non-secure/package.json b/node_modules/nanoid/non-secure/package.json deleted file mode 100644 index 9930d6a..0000000 --- a/node_modules/nanoid/non-secure/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "module", - "main": "index.cjs", - "module": "index.js", - "react-native": "index.js" -} \ No newline at end of file diff --git a/node_modules/nanoid/package.json b/node_modules/nanoid/package.json deleted file mode 100644 index b238dca..0000000 --- a/node_modules/nanoid/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "nanoid", - "version": "3.3.8", - "description": "A tiny (116 bytes), secure URL-friendly unique string ID generator", - "keywords": [ - "uuid", - "random", - "id", - "url" - ], - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "author": "Andrey Sitnik ", - "license": "MIT", - "repository": "ai/nanoid", - "browser": { - "./index.js": "./index.browser.js", - "./async/index.js": "./async/index.browser.js", - "./async/index.cjs": "./async/index.browser.cjs", - "./index.cjs": "./index.browser.cjs" - }, - "react-native": "index.js", - "bin": "./bin/nanoid.cjs", - "sideEffects": false, - "types": "./index.d.ts", - "type": "module", - "main": "index.cjs", - "module": "index.js", - "exports": { - ".": { - "browser": "./index.browser.js", - "require": { - "types": "./index.d.cts", - "default": "./index.cjs" - }, - "import": { - "types": "./index.d.ts", - "default": "./index.js" - }, - "default": "./index.js" - }, - "./package.json": "./package.json", - "./async/package.json": "./async/package.json", - "./async": { - "browser": "./async/index.browser.js", - "require": { - "types": "./index.d.cts", - "default": "./async/index.cjs" - }, - "import": { - "types": "./index.d.ts", - "default": "./async/index.js" - }, - "default": "./async/index.js" - }, - "./non-secure/package.json": "./non-secure/package.json", - "./non-secure": { - "require": { - "types": "./index.d.cts", - "default": "./non-secure/index.cjs" - }, - "import": { - "types": "./index.d.ts", - "default": "./non-secure/index.js" - }, - "default": "./non-secure/index.js" - }, - "./url-alphabet/package.json": "./url-alphabet/package.json", - "./url-alphabet": { - "require": { - "types": "./index.d.cts", - "default": "./url-alphabet/index.cjs" - }, - "import": { - "types": "./index.d.ts", - "default": "./url-alphabet/index.js" - }, - "default": "./url-alphabet/index.js" - } - } -} \ No newline at end of file diff --git a/node_modules/nanoid/url-alphabet/index.cjs b/node_modules/nanoid/url-alphabet/index.cjs deleted file mode 100644 index a332f0b..0000000 --- a/node_modules/nanoid/url-alphabet/index.cjs +++ /dev/null @@ -1,7 +0,0 @@ -// This alphabet uses `A-Za-z0-9_-` symbols. -// The order of characters is optimized for better gzip and brotli compression. -// Same as in non-secure/index.js -let urlAlphabet = - 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' - -module.exports = { urlAlphabet } diff --git a/node_modules/nanoid/url-alphabet/index.js b/node_modules/nanoid/url-alphabet/index.js deleted file mode 100644 index 27efec8..0000000 --- a/node_modules/nanoid/url-alphabet/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// This alphabet uses `A-Za-z0-9_-` symbols. -// The order of characters is optimized for better gzip and brotli compression. -// Same as in non-secure/index.js -let urlAlphabet = - 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' - -export { urlAlphabet } diff --git a/node_modules/nanoid/url-alphabet/package.json b/node_modules/nanoid/url-alphabet/package.json deleted file mode 100644 index 9930d6a..0000000 --- a/node_modules/nanoid/url-alphabet/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "module", - "main": "index.cjs", - "module": "index.js", - "react-native": "index.js" -} \ No newline at end of file diff --git a/node_modules/object-inspect/.eslintrc b/node_modules/object-inspect/.eslintrc deleted file mode 100644 index 21f9039..0000000 --- a/node_modules/object-inspect/.eslintrc +++ /dev/null @@ -1,53 +0,0 @@ -{ - "root": true, - "extends": "@ljharb", - "rules": { - "complexity": 0, - "func-style": [2, "declaration"], - "indent": [2, 4], - "max-lines": 1, - "max-lines-per-function": 1, - "max-params": [2, 4], - "max-statements": 0, - "max-statements-per-line": [2, { "max": 2 }], - "no-magic-numbers": 0, - "no-param-reassign": 1, - "strict": 0, // TODO - }, - "overrides": [ - { - "files": ["test/**", "test-*", "example/**"], - "extends": "@ljharb/eslint-config/tests", - "rules": { - "id-length": 0, - }, - }, - { - "files": ["example/**"], - "rules": { - "no-console": 0, - }, - }, - { - "files": ["test/browser/**"], - "env": { - "browser": true, - }, - }, - { - "files": ["test/bigint*"], - "rules": { - "new-cap": [2, { "capIsNewExceptions": ["BigInt"] }], - }, - }, - { - "files": "index.js", - "globals": { - "HTMLElement": false, - }, - "rules": { - "no-use-before-define": 1, - }, - }, - ], -} diff --git a/node_modules/object-inspect/.github/FUNDING.yml b/node_modules/object-inspect/.github/FUNDING.yml deleted file mode 100644 index 730276b..0000000 --- a/node_modules/object-inspect/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/object-inspect -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/object-inspect/.nycrc b/node_modules/object-inspect/.nycrc deleted file mode 100644 index 58a5db7..0000000 --- a/node_modules/object-inspect/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "instrumentation": false, - "sourceMap": false, - "reporter": ["text-summary", "text", "html", "json"], - "exclude": [ - "coverage", - "example", - "test", - "test-core-js.js" - ] -} diff --git a/node_modules/object-inspect/CHANGELOG.md b/node_modules/object-inspect/CHANGELOG.md deleted file mode 100644 index bdf9002..0000000 --- a/node_modules/object-inspect/CHANGELOG.md +++ /dev/null @@ -1,424 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.13.4](https://github.com/inspect-js/object-inspect/compare/v1.13.3...v1.13.4) - 2025-02-04 - -### Commits - -- [Fix] avoid being fooled by a `Symbol.toStringTag` [`fa5870d`](https://github.com/inspect-js/object-inspect/commit/fa5870da468a525d2f20193700f70752f506cbf7) -- [Tests] fix tests in node v6.0 - v6.4 [`2abfe1b`](https://github.com/inspect-js/object-inspect/commit/2abfe1bc3c69f9293c07c5cd65a9d7d87a628b84) -- [Dev Deps] update `es-value-fixtures`, `for-each`, `has-symbols` [`3edfb01`](https://github.com/inspect-js/object-inspect/commit/3edfb01cc8cce220fba0dfdfe2dc8bc955758cdd) - -## [v1.13.3](https://github.com/inspect-js/object-inspect/compare/v1.13.2...v1.13.3) - 2024-11-09 - -### Commits - -- [actions] split out node 10-20, and 20+ [`44395a8`](https://github.com/inspect-js/object-inspect/commit/44395a8fc1deda6718a5e125e86b9ffcaa1c7580) -- [Fix] `quoteStyle`: properly escape only the containing quotes [`5137f8f`](https://github.com/inspect-js/object-inspect/commit/5137f8f7bea69a7fc671bb683fd35f244f38fc52) -- [Refactor] clean up `quoteStyle` code [`450680c`](https://github.com/inspect-js/object-inspect/commit/450680cd50de4e689ee3b8e1d6db3a1bcf3fc18c) -- [Tests] add `quoteStyle` escaping tests [`e997c59`](https://github.com/inspect-js/object-inspect/commit/e997c595aeaea84fd98ca35d7e1c3b5ab3ae26e0) -- [Dev Deps] update `auto-changelog`, `es-value-fixtures`, `tape` [`d5a469c`](https://github.com/inspect-js/object-inspect/commit/d5a469c99ec07ccaeafc36ac4b36a93285086d48) -- [Tests] replace `aud` with `npm audit` [`fb7815f`](https://github.com/inspect-js/object-inspect/commit/fb7815f9b72cae277a04f65bbb0543f85b88be62) -- [Dev Deps] update `mock-property` [`11c817b`](https://github.com/inspect-js/object-inspect/commit/11c817bf10392aa017755962ba6bc89d731359ee) - -## [v1.13.2](https://github.com/inspect-js/object-inspect/compare/v1.13.1...v1.13.2) - 2024-06-21 - -### Commits - -- [readme] update badges [`8a51e6b`](https://github.com/inspect-js/object-inspect/commit/8a51e6bedaf389ec40cc4659e9df53e8543d176e) -- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`ef05f58`](https://github.com/inspect-js/object-inspect/commit/ef05f58c9761a41416ab907299bf0fa79517014b) -- [Dev Deps] update `error-cause`, `has-tostringtag`, `tape` [`c0c6c26`](https://github.com/inspect-js/object-inspect/commit/c0c6c26c44cee6671f7c5d43d2b91d27c5c00d90) -- [Fix] Don't throw when `global` is not defined [`d4d0965`](https://github.com/inspect-js/object-inspect/commit/d4d096570f7dbd0e03266a96de11d05eb7b63e0f) -- [meta] add missing `engines.node` [`17a352a`](https://github.com/inspect-js/object-inspect/commit/17a352af6fe1ba6b70a19081674231eb1a50c940) -- [Dev Deps] update `globalthis` [`9c08884`](https://github.com/inspect-js/object-inspect/commit/9c08884aa662a149e2f11403f413927736b97da7) -- [Dev Deps] update `error-cause` [`6af352d`](https://github.com/inspect-js/object-inspect/commit/6af352d7c3929a4cc4c55768c27bf547a5e900f4) -- [Dev Deps] update `npmignore` [`94e617d`](https://github.com/inspect-js/object-inspect/commit/94e617d38831722562fa73dff4c895746861d267) -- [Dev Deps] update `mock-property` [`2ac24d7`](https://github.com/inspect-js/object-inspect/commit/2ac24d7e58cd388ad093c33249e413e05bbfd6c3) -- [Dev Deps] update `tape` [`46125e5`](https://github.com/inspect-js/object-inspect/commit/46125e58f1d1dcfb170ed3d1ea69da550ea8d77b) - -## [v1.13.1](https://github.com/inspect-js/object-inspect/compare/v1.13.0...v1.13.1) - 2023-10-19 - -### Commits - -- [Fix] in IE 8, global can !== window despite them being prototypes of each other [`30d0859`](https://github.com/inspect-js/object-inspect/commit/30d0859dc4606cf75c2410edcd5d5c6355f8d372) - -## [v1.13.0](https://github.com/inspect-js/object-inspect/compare/v1.12.3...v1.13.0) - 2023-10-14 - -### Commits - -- [New] add special handling for the global object [`431bab2`](https://github.com/inspect-js/object-inspect/commit/431bab21a490ee51d35395966a504501e8c685da) -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`fd4f619`](https://github.com/inspect-js/object-inspect/commit/fd4f6193562b4b0e95dcf5c0201b4e8cbbc4f58d) -- [Dev Deps] update `mock-property`, `tape` [`b453f6c`](https://github.com/inspect-js/object-inspect/commit/b453f6ceeebf8a1b738a1029754092e0367a4134) -- [Dev Deps] update `error-cause` [`e8ffc57`](https://github.com/inspect-js/object-inspect/commit/e8ffc577d73b92bb6a4b00c44f14e3319e374888) -- [Dev Deps] update `tape` [`054b8b9`](https://github.com/inspect-js/object-inspect/commit/054b8b9b98633284cf989e582450ebfbbe53503c) -- [Dev Deps] temporarily remove `aud` due to breaking change in transitive deps [`2476845`](https://github.com/inspect-js/object-inspect/commit/2476845e0678dd290c541c81cd3dec8420782c52) -- [Dev Deps] pin `glob`, since v10.3.8+ requires a broken `jackspeak` [`383fa5e`](https://github.com/inspect-js/object-inspect/commit/383fa5eebc0afd705cc778a4b49d8e26452e49a8) -- [Dev Deps] pin `jackspeak` since 2.1.2+ depends on npm aliases, which kill the install process in npm < 6 [`68c244c`](https://github.com/inspect-js/object-inspect/commit/68c244c5174cdd877e5dcb8ee90aa3f44b2f25be) - -## [v1.12.3](https://github.com/inspect-js/object-inspect/compare/v1.12.2...v1.12.3) - 2023-01-12 - -### Commits - -- [Fix] in eg FF 24, collections lack forEach [`75fc226`](https://github.com/inspect-js/object-inspect/commit/75fc22673c82d45f28322b1946bb0eb41b672b7f) -- [actions] update rebase action to use reusable workflow [`250a277`](https://github.com/inspect-js/object-inspect/commit/250a277a095e9dacc029ab8454dcfc15de549dcd) -- [Dev Deps] update `aud`, `es-value-fixtures`, `tape` [`66a19b3`](https://github.com/inspect-js/object-inspect/commit/66a19b3209ccc3c5ef4b34c3cb0160e65d1ce9d5) -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `error-cause` [`c43d332`](https://github.com/inspect-js/object-inspect/commit/c43d3324b48384a16fd3dc444e5fc589d785bef3) -- [Tests] add `@pkgjs/support` to `postlint` [`e2618d2`](https://github.com/inspect-js/object-inspect/commit/e2618d22a7a3fa361b6629b53c1752fddc9c4d80) - -## [v1.12.2](https://github.com/inspect-js/object-inspect/compare/v1.12.1...v1.12.2) - 2022-05-26 - -### Commits - -- [Fix] use `util.inspect` for a custom inspection symbol method [`e243bf2`](https://github.com/inspect-js/object-inspect/commit/e243bf2eda6c4403ac6f1146fddb14d12e9646c1) -- [meta] add support info [`ca20ba3`](https://github.com/inspect-js/object-inspect/commit/ca20ba35713c17068ca912a86c542f5e8acb656c) -- [Fix] ignore `cause` in node v16.9 and v16.10 where it has a bug [`86aa553`](https://github.com/inspect-js/object-inspect/commit/86aa553a4a455562c2c56f1540f0bf857b9d314b) - -## [v1.12.1](https://github.com/inspect-js/object-inspect/compare/v1.12.0...v1.12.1) - 2022-05-21 - -### Commits - -- [Tests] use `mock-property` [`4ec8893`](https://github.com/inspect-js/object-inspect/commit/4ec8893ea9bfd28065ca3638cf6762424bf44352) -- [meta] use `npmignore` to autogenerate an npmignore file [`07f868c`](https://github.com/inspect-js/object-inspect/commit/07f868c10bd25a9d18686528339bb749c211fc9a) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`b05244b`](https://github.com/inspect-js/object-inspect/commit/b05244b4f331e00c43b3151bc498041be77ccc91) -- [Dev Deps] update `@ljharb/eslint-config`, `error-cause`, `es-value-fixtures`, `functions-have-names`, `tape` [`d037398`](https://github.com/inspect-js/object-inspect/commit/d037398dcc5d531532e4c19c4a711ed677f579c1) -- [Fix] properly handle callable regexes in older engines [`848fe48`](https://github.com/inspect-js/object-inspect/commit/848fe48bd6dd0064ba781ee6f3c5e54a94144c37) - -## [v1.12.0](https://github.com/inspect-js/object-inspect/compare/v1.11.1...v1.12.0) - 2021-12-18 - -### Commits - -- [New] add `numericSeparator` boolean option [`2d2d537`](https://github.com/inspect-js/object-inspect/commit/2d2d537f5359a4300ce1c10241369f8024f89e11) -- [Robustness] cache more prototype methods [`191533d`](https://github.com/inspect-js/object-inspect/commit/191533da8aec98a05eadd73a5a6e979c9c8653e8) -- [New] ensure an Error’s `cause` is displayed [`53bc2ce`](https://github.com/inspect-js/object-inspect/commit/53bc2cee4e5a9cc4986f3cafa22c0685f340715e) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`bc164b6`](https://github.com/inspect-js/object-inspect/commit/bc164b6e2e7d36b263970f16f54de63048b84a36) -- [Robustness] cache `RegExp.prototype.test` [`a314ab8`](https://github.com/inspect-js/object-inspect/commit/a314ab8271b905cbabc594c82914d2485a8daf12) -- [meta] fix auto-changelog settings [`5ed0983`](https://github.com/inspect-js/object-inspect/commit/5ed0983be72f73e32e2559997517a95525c7e20d) - -## [v1.11.1](https://github.com/inspect-js/object-inspect/compare/v1.11.0...v1.11.1) - 2021-12-05 - -### Commits - -- [meta] add `auto-changelog` [`7dbdd22`](https://github.com/inspect-js/object-inspect/commit/7dbdd228401d6025d8b7391476d88aee9ea9bbdf) -- [actions] reuse common workflows [`c8823bc`](https://github.com/inspect-js/object-inspect/commit/c8823bc0a8790729680709d45fb6e652432e91aa) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`7532b12`](https://github.com/inspect-js/object-inspect/commit/7532b120598307497b712890f75af8056f6d37a6) -- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`94abb5d`](https://github.com/inspect-js/object-inspect/commit/94abb5d4e745bf33253942dea86b3e538d2ff6c6) -- [actions] update codecov uploader [`5ed5102`](https://github.com/inspect-js/object-inspect/commit/5ed51025267a00e53b1341357315490ac4eb0874) -- [Dev Deps] update `eslint`, `tape` [`37b2ad2`](https://github.com/inspect-js/object-inspect/commit/37b2ad26c08d94bfd01d5d07069a0b28ef4e2ad7) -- [meta] add `sideEffects` flag [`d341f90`](https://github.com/inspect-js/object-inspect/commit/d341f905ef8bffa6a694cda6ddc5ba343532cd4f) - -## [v1.11.0](https://github.com/inspect-js/object-inspect/compare/v1.10.3...v1.11.0) - 2021-07-12 - -### Commits - -- [New] `customInspect`: add `symbol` option, to mimic modern util.inspect behavior [`e973a6e`](https://github.com/inspect-js/object-inspect/commit/e973a6e21f8140c5837cf25e9d89bdde88dc3120) -- [Dev Deps] update `eslint` [`05f1cb3`](https://github.com/inspect-js/object-inspect/commit/05f1cb3cbcfe1f238e8b51cf9bc294305b7ed793) - -## [v1.10.3](https://github.com/inspect-js/object-inspect/compare/v1.10.2...v1.10.3) - 2021-05-07 - -### Commits - -- [Fix] handle core-js Symbol shams [`4acfc2c`](https://github.com/inspect-js/object-inspect/commit/4acfc2c4b503498759120eb517abad6d51c9c5d6) -- [readme] update badges [`95c323a`](https://github.com/inspect-js/object-inspect/commit/95c323ad909d6cbabb95dd6015c190ba6db9c1f2) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`cb38f48`](https://github.com/inspect-js/object-inspect/commit/cb38f485de6ec7a95109b5a9bbd0a1deba2f6611) - -## [v1.10.2](https://github.com/inspect-js/object-inspect/compare/v1.10.1...v1.10.2) - 2021-04-17 - -### Commits - -- [Fix] use a robust check for a boxed Symbol [`87f12d6`](https://github.com/inspect-js/object-inspect/commit/87f12d6e69ce530be04659c81a4cd502943acac5) - -## [v1.10.1](https://github.com/inspect-js/object-inspect/compare/v1.10.0...v1.10.1) - 2021-04-17 - -### Commits - -- [Fix] use a robust check for a boxed bigint [`d5ca829`](https://github.com/inspect-js/object-inspect/commit/d5ca8298b6d2e5c7b9334a5b21b96ed95d225c91) - -## [v1.10.0](https://github.com/inspect-js/object-inspect/compare/v1.9.0...v1.10.0) - 2021-04-17 - -### Commits - -- [Tests] increase coverage [`d8abb8a`](https://github.com/inspect-js/object-inspect/commit/d8abb8a62c2f084919df994a433b346e0d87a227) -- [actions] use `node/install` instead of `node/run`; use `codecov` action [`4bfec2e`](https://github.com/inspect-js/object-inspect/commit/4bfec2e30aaef6ddef6cbb1448306f9f8b9520b7) -- [New] respect `Symbol.toStringTag` on objects [`799b58f`](https://github.com/inspect-js/object-inspect/commit/799b58f536a45e4484633a8e9daeb0330835f175) -- [Fix] do not allow Symbol.toStringTag to masquerade as builtins [`d6c5b37`](https://github.com/inspect-js/object-inspect/commit/d6c5b37d7e94427796b82432fb0c8964f033a6ab) -- [New] add `WeakRef` support [`b6d898e`](https://github.com/inspect-js/object-inspect/commit/b6d898ee21868c780a7ee66b28532b5b34ed7f09) -- [meta] do not publish github action workflow files [`918cdfc`](https://github.com/inspect-js/object-inspect/commit/918cdfc4b6fe83f559ff6ef04fe66201e3ff5cbd) -- [meta] create `FUNDING.yml` [`0bb5fc5`](https://github.com/inspect-js/object-inspect/commit/0bb5fc516dbcd2cd728bd89cee0b580acc5ce301) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`22c8dc0`](https://github.com/inspect-js/object-inspect/commit/22c8dc0cac113d70f4781e49a950070923a671be) -- [meta] use `prepublishOnly` script for npm 7+ [`e52ee09`](https://github.com/inspect-js/object-inspect/commit/e52ee09e8050b8dbac94ef57f786675567728223) -- [Dev Deps] update `eslint` [`7c4e6fd`](https://github.com/inspect-js/object-inspect/commit/7c4e6fdedcd27cc980e13c9ad834d05a96f3d40c) - -## [v1.9.0](https://github.com/inspect-js/object-inspect/compare/v1.8.0...v1.9.0) - 2020-11-30 - -### Commits - -- [Tests] migrate tests to Github Actions [`d262251`](https://github.com/inspect-js/object-inspect/commit/d262251e13e16d3490b5473672f6b6d6ff86675d) -- [New] add enumerable own Symbols to plain object output [`ee60c03`](https://github.com/inspect-js/object-inspect/commit/ee60c033088cff9d33baa71e59a362a541b48284) -- [Tests] add passing tests [`01ac3e4`](https://github.com/inspect-js/object-inspect/commit/01ac3e4b5a30f97875a63dc9b1416b3bd626afc9) -- [actions] add "Require Allow Edits" action [`c2d7746`](https://github.com/inspect-js/object-inspect/commit/c2d774680cde4ca4af332d84d4121b26f798ba9e) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js` [`70058de`](https://github.com/inspect-js/object-inspect/commit/70058de1579fc54d1d15ed6c2dbe246637ce70ff) -- [Fix] hex characters in strings should be uppercased, to match node `assert` [`6ab8faa`](https://github.com/inspect-js/object-inspect/commit/6ab8faaa0abc08fe7a8e2afd8b39c6f1f0e00113) -- [Tests] run `nyc` on all tests [`4c47372`](https://github.com/inspect-js/object-inspect/commit/4c473727879ddc8e28b599202551ddaaf07b6210) -- [Tests] node 0.8 has an unpredictable property order; fix `groups` test by removing property [`f192069`](https://github.com/inspect-js/object-inspect/commit/f192069a978a3b60e6f0e0d45ac7df260ab9a778) -- [New] add enumerable properties to Function inspect result, per node’s `assert` [`fd38e1b`](https://github.com/inspect-js/object-inspect/commit/fd38e1bc3e2a1dc82091ce3e021917462eee64fc) -- [Tests] fix tests for node < 10, due to regex match `groups` [`2ac6462`](https://github.com/inspect-js/object-inspect/commit/2ac6462cc4f72eaa0b63a8cfee9aabe3008b2330) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`44b59e2`](https://github.com/inspect-js/object-inspect/commit/44b59e2676a7f825ef530dfd19dafb599e3b9456) -- [Robustness] cache `Symbol.prototype.toString` [`f3c2074`](https://github.com/inspect-js/object-inspect/commit/f3c2074d8f32faf8292587c07c9678ea931703dd) -- [Dev Deps] update `eslint` [`9411294`](https://github.com/inspect-js/object-inspect/commit/94112944b9245e3302e25453277876402d207e7f) -- [meta] `require-allow-edits` no longer requires an explicit github token [`36c0220`](https://github.com/inspect-js/object-inspect/commit/36c02205de3c2b0e84d53777c5c9fd54a36c48ab) -- [actions] update rebase checkout action to v2 [`55a39a6`](https://github.com/inspect-js/object-inspect/commit/55a39a64e944f19c6a7d8efddf3df27700f20d14) -- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`f59fd3c`](https://github.com/inspect-js/object-inspect/commit/f59fd3cf406c3a7c7ece140904a80bbc6bacfcca) -- [Dev Deps] update `eslint` [`a492bec`](https://github.com/inspect-js/object-inspect/commit/a492becec644b0155c9c4bc1caf6f9fac11fb2c7) - -## [v1.8.0](https://github.com/inspect-js/object-inspect/compare/v1.7.0...v1.8.0) - 2020-06-18 - -### Fixed - -- [New] add `indent` option [`#27`](https://github.com/inspect-js/object-inspect/issues/27) - -### Commits - -- [Tests] add codecov [`4324cbb`](https://github.com/inspect-js/object-inspect/commit/4324cbb1a2bd7710822a4151ff373570db22453e) -- [New] add `maxStringLength` option [`b3995cb`](https://github.com/inspect-js/object-inspect/commit/b3995cb71e15b5ee127a3094c43994df9d973502) -- [New] add `customInspect` option, to disable custom inspect methods [`28b9179`](https://github.com/inspect-js/object-inspect/commit/28b9179ee802bb3b90810100c11637db90c2fb6d) -- [Tests] add Date and RegExp tests [`3b28eca`](https://github.com/inspect-js/object-inspect/commit/3b28eca57b0367aeadffac604ea09e8bdae7d97b) -- [actions] add automatic rebasing / merge commit blocking [`0d9c6c0`](https://github.com/inspect-js/object-inspect/commit/0d9c6c044e83475ff0bfffb9d35b149834c83a2e) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape`; add `aud` [`7c204f2`](https://github.com/inspect-js/object-inspect/commit/7c204f22b9e41bc97147f4d32d4cb045b17769a6) -- [readme] fix repo URLs, remove testling [`34ca9a0`](https://github.com/inspect-js/object-inspect/commit/34ca9a0dabfe75bd311f806a326fadad029909a3) -- [Fix] when truncating a deep array, note it as `[Array]` instead of just `[Object]` [`f74c82d`](https://github.com/inspect-js/object-inspect/commit/f74c82dd0b35386445510deb250f34c41be3ec0e) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`1a8a5ea`](https://github.com/inspect-js/object-inspect/commit/1a8a5ea069ea2bee89d77caedad83ffa23d35711) -- [Fix] do not be fooled by a function’s own `toString` method [`7cb5c65`](https://github.com/inspect-js/object-inspect/commit/7cb5c657a976f94715c19c10556a30f15bb7d5d7) -- [patch] indicate explicitly that anon functions are anonymous, to match node [`81ebdd4`](https://github.com/inspect-js/object-inspect/commit/81ebdd4215005144074bbdff3f6bafa01407910a) -- [Dev Deps] loosen the `core-js` dep [`e7472e8`](https://github.com/inspect-js/object-inspect/commit/e7472e8e242117670560bd995830c2a4d12080f5) -- [Dev Deps] update `tape` [`699827e`](https://github.com/inspect-js/object-inspect/commit/699827e6b37258b5203c33c78c009bf4b0e6a66d) -- [meta] add `safe-publish-latest` [`c5d2868`](https://github.com/inspect-js/object-inspect/commit/c5d2868d6eb33c472f37a20f89ceef2787046088) -- [Dev Deps] update `@ljharb/eslint-config` [`9199501`](https://github.com/inspect-js/object-inspect/commit/919950195d486114ccebacbdf9d74d7f382693b0) - -## [v1.7.0](https://github.com/inspect-js/object-inspect/compare/v1.6.0...v1.7.0) - 2019-11-10 - -### Commits - -- [Tests] use shared travis-ci configs [`19899ed`](https://github.com/inspect-js/object-inspect/commit/19899edbf31f4f8809acf745ce34ad1ce1bfa63b) -- [Tests] add linting [`a00f057`](https://github.com/inspect-js/object-inspect/commit/a00f057d917f66ea26dd37769c6b810ec4af97e8) -- [Tests] lint last file [`2698047`](https://github.com/inspect-js/object-inspect/commit/2698047b58af1e2e88061598ef37a75f228dddf6) -- [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`589e87a`](https://github.com/inspect-js/object-inspect/commit/589e87a99cadcff4b600e6a303418e9d922836e8) -- [New] add support for `WeakMap` and `WeakSet` [`3ddb3e4`](https://github.com/inspect-js/object-inspect/commit/3ddb3e4e0c8287130c61a12e0ed9c104b1549306) -- [meta] clean up license so github can detect it properly [`27527bb`](https://github.com/inspect-js/object-inspect/commit/27527bb801520c9610c68cc3b55d6f20a2bee56d) -- [Tests] cover `util.inspect.custom` [`36d47b9`](https://github.com/inspect-js/object-inspect/commit/36d47b9c59056a57ef2f1491602c726359561800) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape` [`b614eaa`](https://github.com/inspect-js/object-inspect/commit/b614eaac901da0e5c69151f534671f990a94cace) -- [Tests] fix coverage thresholds [`7b7b176`](https://github.com/inspect-js/object-inspect/commit/7b7b176e15f8bd6e8b2f261ff5a493c2fe78d9c2) -- [Tests] bigint tests now can run on unflagged node [`063af31`](https://github.com/inspect-js/object-inspect/commit/063af31ce9cd13c202e3b67c07ba06dc9b7c0f81) -- [Refactor] add early bailout to `isMap` and `isSet` checks [`fc51047`](https://github.com/inspect-js/object-inspect/commit/fc5104714a3671d37e225813db79470d6335683b) -- [meta] add `funding` field [`7f9953a`](https://github.com/inspect-js/object-inspect/commit/7f9953a113eec7b064a6393cf9f90ba15f1d131b) -- [Tests] Fix invalid strict-mode syntax with hexadecimal [`a8b5425`](https://github.com/inspect-js/object-inspect/commit/a8b542503b4af1599a275209a1a99f5fdedb1ead) -- [Dev Deps] update `@ljharb/eslint-config` [`98df157`](https://github.com/inspect-js/object-inspect/commit/98df1577314d9188a3fc3f17fdcf2fba697ae1bd) -- add copyright to LICENSE [`bb69fd0`](https://github.com/inspect-js/object-inspect/commit/bb69fd017a062d299e44da1f9b2c7dcd67f621e6) -- [Tests] use `npx aud` in `posttest` [`4838353`](https://github.com/inspect-js/object-inspect/commit/4838353593974cf7f905b9ef04c03c094f0cdbe2) -- [Tests] move `0.6` to allowed failures, because it won‘t build on travis [`1bff32a`](https://github.com/inspect-js/object-inspect/commit/1bff32aa52e8aea687f0856b28ba754b3e43ebf7) - -## [v1.6.0](https://github.com/inspect-js/object-inspect/compare/v1.5.0...v1.6.0) - 2018-05-02 - -### Commits - -- [New] add support for boxed BigInt primitives [`356c66a`](https://github.com/inspect-js/object-inspect/commit/356c66a410e7aece7162c8319880a5ef647beaa9) -- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`c77b65b`](https://github.com/inspect-js/object-inspect/commit/c77b65bba593811b906b9ec57561c5cba92e2db3) -- [New] Add support for upcoming `BigInt` [`1ac548e`](https://github.com/inspect-js/object-inspect/commit/1ac548e4b27e26466c28c9a5e63e5d4e0591c31f) -- [Tests] run bigint tests in CI with --harmony-bigint flag [`d31b738`](https://github.com/inspect-js/object-inspect/commit/d31b73831880254b5c6cf5691cda9a149fbc5f04) -- [Dev Deps] update `core-js`, `tape` [`ff9eff6`](https://github.com/inspect-js/object-inspect/commit/ff9eff67113341ee1aaf80c1c22d683f43bfbccf) -- [Docs] fix example to use `safer-buffer` [`48cae12`](https://github.com/inspect-js/object-inspect/commit/48cae12a73ec6cacc955175bc56bbe6aee6a211f) - -## [v1.5.0](https://github.com/inspect-js/object-inspect/compare/v1.4.1...v1.5.0) - 2017-12-25 - -### Commits - -- [New] add `quoteStyle` option [`f5a72d2`](https://github.com/inspect-js/object-inspect/commit/f5a72d26edb3959b048f74c056ca7100a6b091e4) -- [Tests] add more test coverage [`30ebe4e`](https://github.com/inspect-js/object-inspect/commit/30ebe4e1fa943b99ecbb85be7614256d536e2759) -- [Tests] require 0.6 to pass [`99a008c`](https://github.com/inspect-js/object-inspect/commit/99a008ccace189a60fd7da18bf00e32c9572b980) - -## [v1.4.1](https://github.com/inspect-js/object-inspect/compare/v1.4.0...v1.4.1) - 2017-12-19 - -### Commits - -- [Tests] up to `node` `v9.3`, `v8.9`, `v6.12` [`6674476`](https://github.com/inspect-js/object-inspect/commit/6674476cc56acaac1bde96c84fed5ef631911906) -- [Fix] `inspect(Object(-0))` should be “Object(-0)”, not “Object(0)” [`d0a031f`](https://github.com/inspect-js/object-inspect/commit/d0a031f1cbb3024ee9982bfe364dd18a7e4d1bd3) - -## [v1.4.0](https://github.com/inspect-js/object-inspect/compare/v1.3.0...v1.4.0) - 2017-10-24 - -### Commits - -- [Tests] add `npm run coverage` [`3b48fb2`](https://github.com/inspect-js/object-inspect/commit/3b48fb25db037235eeb808f0b2830aad7aa36f70) -- [Tests] remove commented-out osx builds [`71e24db`](https://github.com/inspect-js/object-inspect/commit/71e24db8ad6ee3b9b381c5300b0475f2ba595a73) -- [New] add support for `util.inspect.custom`, in node only. [`20cca77`](https://github.com/inspect-js/object-inspect/commit/20cca7762d7e17f15b21a90793dff84acce155df) -- [Tests] up to `node` `v8.6`; use `nvm install-latest-npm` to ensure new npm doesn’t break old node [`252952d`](https://github.com/inspect-js/object-inspect/commit/252952d230d8065851dd3d4d5fe8398aae068529) -- [Tests] up to `node` `v8.8` [`4aa868d`](https://github.com/inspect-js/object-inspect/commit/4aa868d3a62914091d489dd6ec6eed194ee67cd3) -- [Dev Deps] update `core-js`, `tape` [`59483d1`](https://github.com/inspect-js/object-inspect/commit/59483d1df418f852f51fa0db7b24aa6b0209a27a) - -## [v1.3.0](https://github.com/inspect-js/object-inspect/compare/v1.2.2...v1.3.0) - 2017-07-31 - -### Fixed - -- [Fix] Map/Set: work around core-js bug < v2.5.0 [`#9`](https://github.com/inspect-js/object-inspect/issues/9) - -### Commits - -- [New] add support for arrays with additional object keys [`0d19937`](https://github.com/inspect-js/object-inspect/commit/0d199374ee37959e51539616666f420ccb29acb9) -- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`; fix new npm breaking on older nodes [`e24784a`](https://github.com/inspect-js/object-inspect/commit/e24784a90c49117787157a12a63897c49cf89bbb) -- Only apps should have lockfiles [`c6faebc`](https://github.com/inspect-js/object-inspect/commit/c6faebcb2ee486a889a4a1c4d78c0776c7576185) -- [Dev Deps] update `tape` [`7345a0a`](https://github.com/inspect-js/object-inspect/commit/7345a0aeba7e91b888a079c10004d17696a7f586) - -## [v1.2.2](https://github.com/inspect-js/object-inspect/compare/v1.2.1...v1.2.2) - 2017-03-24 - -### Commits - -- [Tests] up to `node` `v7.7`, `v6.10`, `v4.8`; improve test matrix [`a2ddc15`](https://github.com/inspect-js/object-inspect/commit/a2ddc15a1f2c65af18076eea1c0eb9cbceb478a0) -- [Tests] up to `node` `v7.0`, `v6.9`, `v5.12`, `v4.6`, `io.js` `v3.3`; improve test matrix [`a48949f`](https://github.com/inspect-js/object-inspect/commit/a48949f6b574b2d4d2298109d8e8d0eb3e7a83e7) -- [Performance] check for primitive types as early as possible. [`3b8092a`](https://github.com/inspect-js/object-inspect/commit/3b8092a2a4deffd0575f94334f00194e2d48dad3) -- [Refactor] remove unneeded `else`s. [`7255034`](https://github.com/inspect-js/object-inspect/commit/725503402e08de4f96f6bf2d8edef44ac36f26b6) -- [Refactor] avoid recreating `lowbyte` function every time. [`81edd34`](https://github.com/inspect-js/object-inspect/commit/81edd3475bd15bdd18e84de7472033dcf5004aaa) -- [Fix] differentiate -0 from 0 [`521d345`](https://github.com/inspect-js/object-inspect/commit/521d3456b009da7bf1c5785c8a9df5a9f8718264) -- [Refactor] move object key gathering into separate function [`aca6265`](https://github.com/inspect-js/object-inspect/commit/aca626536eaeef697196c6e9db3e90e7e0355b6a) -- [Refactor] consolidate wrapping logic for boxed primitives into a function. [`4e440cd`](https://github.com/inspect-js/object-inspect/commit/4e440cd9065df04802a2a1dead03f48c353ca301) -- [Robustness] use `typeof` instead of comparing to literal `undefined` [`5ca6f60`](https://github.com/inspect-js/object-inspect/commit/5ca6f601937506daff8ed2fcf686363b55807b69) -- [Refactor] consolidate Map/Set notations. [`4e576e5`](https://github.com/inspect-js/object-inspect/commit/4e576e5d7ed2f9ec3fb7f37a0d16732eb10758a9) -- [Tests] ensure that this function remains anonymous, despite ES6 name inference. [`7540ae5`](https://github.com/inspect-js/object-inspect/commit/7540ae591278756db614fa4def55ca413150e1a3) -- [Refactor] explicitly coerce Error objects to strings. [`7f4ca84`](https://github.com/inspect-js/object-inspect/commit/7f4ca8424ee8dc2c0ca5a422d94f7fac40327261) -- [Refactor] split up `var` declarations for debuggability [`6f2c11e`](https://github.com/inspect-js/object-inspect/commit/6f2c11e6a85418586a00292dcec5e97683f89bc3) -- [Robustness] cache `Object.prototype.toString` [`df44a20`](https://github.com/inspect-js/object-inspect/commit/df44a20adfccf31529d60d1df2079bfc3c836e27) -- [Dev Deps] update `tape` [`3ec714e`](https://github.com/inspect-js/object-inspect/commit/3ec714eba57bc3f58a6eb4fca1376f49e70d300a) -- [Dev Deps] update `tape` [`beb72d9`](https://github.com/inspect-js/object-inspect/commit/beb72d969653747d7cde300393c28755375329b0) - -## [v1.2.1](https://github.com/inspect-js/object-inspect/compare/v1.2.0...v1.2.1) - 2016-04-09 - -### Fixed - -- [Fix] fix Boolean `false` object inspection. [`#7`](https://github.com/substack/object-inspect/pull/7) - -## [v1.2.0](https://github.com/inspect-js/object-inspect/compare/v1.1.0...v1.2.0) - 2016-04-09 - -### Fixed - -- [New] add support for inspecting String/Number/Boolean objects. [`#6`](https://github.com/inspect-js/object-inspect/issues/6) - -### Commits - -- [Dev Deps] update `tape` [`742caa2`](https://github.com/inspect-js/object-inspect/commit/742caa262cf7af4c815d4821c8bd0129c1446432) - -## [v1.1.0](https://github.com/inspect-js/object-inspect/compare/1.0.2...v1.1.0) - 2015-12-14 - -### Merged - -- [New] add ES6 Map/Set support. [`#4`](https://github.com/inspect-js/object-inspect/pull/4) - -### Fixed - -- [New] add ES6 Map/Set support. [`#3`](https://github.com/inspect-js/object-inspect/issues/3) - -### Commits - -- Update `travis.yml` to test on bunches of `iojs` and `node` versions. [`4c1fd65`](https://github.com/inspect-js/object-inspect/commit/4c1fd65cc3bd95307e854d114b90478324287fd2) -- [Dev Deps] update `tape` [`88a907e`](https://github.com/inspect-js/object-inspect/commit/88a907e33afbe408e4b5d6e4e42a33143f88848c) - -## [1.0.2](https://github.com/inspect-js/object-inspect/compare/1.0.1...1.0.2) - 2015-08-07 - -### Commits - -- [Fix] Cache `Object.prototype.hasOwnProperty` in case it's deleted later. [`1d0075d`](https://github.com/inspect-js/object-inspect/commit/1d0075d3091dc82246feeb1f9871cb2b8ed227b3) -- [Dev Deps] Update `tape` [`ca8d5d7`](https://github.com/inspect-js/object-inspect/commit/ca8d5d75635ddbf76f944e628267581e04958457) -- gitignore node_modules since this is a reusable modules. [`ed41407`](https://github.com/inspect-js/object-inspect/commit/ed41407811743ca530cdeb28f982beb96026af82) - -## [1.0.1](https://github.com/inspect-js/object-inspect/compare/1.0.0...1.0.1) - 2015-07-19 - -### Commits - -- Make `inspect` work with symbol primitives and objects, including in node 0.11 and 0.12. [`ddf1b94`](https://github.com/inspect-js/object-inspect/commit/ddf1b94475ab951f1e3bccdc0a48e9073cfbfef4) -- bump tape [`103d674`](https://github.com/inspect-js/object-inspect/commit/103d67496b504bdcfdd765d303a773f87ec106e2) -- use newer travis config [`d497276`](https://github.com/inspect-js/object-inspect/commit/d497276c1da14234bb5098a59cf20de75fbc316a) - -## [1.0.0](https://github.com/inspect-js/object-inspect/compare/0.4.0...1.0.0) - 2014-08-05 - -### Commits - -- error inspect works properly [`260a22d`](https://github.com/inspect-js/object-inspect/commit/260a22d134d3a8a482c67d52091c6040c34f4299) -- seen coverage [`57269e8`](https://github.com/inspect-js/object-inspect/commit/57269e8baa992a7439047f47325111fdcbcb8417) -- htmlelement instance coverage [`397ffe1`](https://github.com/inspect-js/object-inspect/commit/397ffe10a1980350868043ef9de65686d438979f) -- more element coverage [`6905cc2`](https://github.com/inspect-js/object-inspect/commit/6905cc2f7df35600177e613b0642b4df5efd3eca) -- failing test for type errors [`385b615`](https://github.com/inspect-js/object-inspect/commit/385b6152e49b51b68449a662f410b084ed7c601a) -- fn name coverage [`edc906d`](https://github.com/inspect-js/object-inspect/commit/edc906d40fca6b9194d304062c037ee8e398c4c2) -- server-side element test [`362d1d3`](https://github.com/inspect-js/object-inspect/commit/362d1d3e86f187651c29feeb8478110afada385b) -- custom inspect fn [`e89b0f6`](https://github.com/inspect-js/object-inspect/commit/e89b0f6fe6d5e03681282af83732a509160435a6) -- fixed browser test [`b530882`](https://github.com/inspect-js/object-inspect/commit/b5308824a1c8471c5617e394766a03a6977102a9) -- depth test, matches node [`1cfd9e0`](https://github.com/inspect-js/object-inspect/commit/1cfd9e0285a4ae1dff44101ad482915d9bf47e48) -- exercise hasOwnProperty path [`8d753fb`](https://github.com/inspect-js/object-inspect/commit/8d753fb362a534fa1106e4d80f2ee9bea06a66d9) -- more cases covered for errors [`c5c46a5`](https://github.com/inspect-js/object-inspect/commit/c5c46a569ec4606583497e8550f0d8c7ad39a4a4) -- \W obj key test case [`b0eceee`](https://github.com/inspect-js/object-inspect/commit/b0eceeea6e0eb94d686c1046e99b9e25e5005f75) -- coverage for explicit depth param [`e12b91c`](https://github.com/inspect-js/object-inspect/commit/e12b91cd59683362f3a0e80f46481a0211e26c15) - -## [0.4.0](https://github.com/inspect-js/object-inspect/compare/0.3.1...0.4.0) - 2014-03-21 - -### Commits - -- passing lowbyte interpolation test [`b847511`](https://github.com/inspect-js/object-inspect/commit/b8475114f5def7e7961c5353d48d3d8d9a520985) -- lowbyte test [`4a2b0e1`](https://github.com/inspect-js/object-inspect/commit/4a2b0e142667fc933f195472759385ac08f3946c) - -## [0.3.1](https://github.com/inspect-js/object-inspect/compare/0.3.0...0.3.1) - 2014-03-04 - -### Commits - -- sort keys [`a07b19c`](https://github.com/inspect-js/object-inspect/commit/a07b19cc3b1521a82d4fafb6368b7a9775428a05) - -## [0.3.0](https://github.com/inspect-js/object-inspect/compare/0.2.0...0.3.0) - 2014-03-04 - -### Commits - -- [] and {} instead of [ ] and { } [`654c44b`](https://github.com/inspect-js/object-inspect/commit/654c44b2865811f3519e57bb8526e0821caf5c6b) - -## [0.2.0](https://github.com/inspect-js/object-inspect/compare/0.1.3...0.2.0) - 2014-03-04 - -### Commits - -- failing holes test [`99cdfad`](https://github.com/inspect-js/object-inspect/commit/99cdfad03c6474740275a75636fe6ca86c77737a) -- regex already work [`e324033`](https://github.com/inspect-js/object-inspect/commit/e324033267025995ec97d32ed0a65737c99477a6) -- failing undef/null test [`1f88a00`](https://github.com/inspect-js/object-inspect/commit/1f88a00265d3209719dda8117b7e6360b4c20943) -- holes in the all example [`7d345f3`](https://github.com/inspect-js/object-inspect/commit/7d345f3676dcbe980cff89a4f6c243269ebbb709) -- check for .inspect(), fixes Buffer use-case [`c3f7546`](https://github.com/inspect-js/object-inspect/commit/c3f75466dbca125347d49847c05262c292f12b79) -- fixes for holes [`ce25f73`](https://github.com/inspect-js/object-inspect/commit/ce25f736683de4b92ff27dc5471218415e2d78d8) -- weird null behavior [`405c1ea`](https://github.com/inspect-js/object-inspect/commit/405c1ea72cd5a8cf3b498c3eaa903d01b9fbcab5) -- tape is actually a devDependency, upgrade [`703b0ce`](https://github.com/inspect-js/object-inspect/commit/703b0ce6c5817b4245a082564bccd877e0bb6990) -- put date in the example [`a342219`](https://github.com/inspect-js/object-inspect/commit/a3422190eeaa013215f46df2d0d37b48595ac058) -- passing the null test [`4ab737e`](https://github.com/inspect-js/object-inspect/commit/4ab737ebf862a75d247ebe51e79307a34d6380d4) - -## [0.1.3](https://github.com/inspect-js/object-inspect/compare/0.1.1...0.1.3) - 2013-07-26 - -### Commits - -- special isElement() check [`882768a`](https://github.com/inspect-js/object-inspect/commit/882768a54035d30747be9de1baf14e5aa0daa128) -- oh right old IEs don't have indexOf either [`36d1275`](https://github.com/inspect-js/object-inspect/commit/36d12756c38b08a74370b0bb696c809e529913a5) - -## [0.1.1](https://github.com/inspect-js/object-inspect/compare/0.1.0...0.1.1) - 2013-07-26 - -### Commits - -- tests! [`4422fd9`](https://github.com/inspect-js/object-inspect/commit/4422fd95532c2745aa6c4f786f35f1090be29998) -- fix for ie<9, doesn't have hasOwnProperty [`6b7d611`](https://github.com/inspect-js/object-inspect/commit/6b7d61183050f6da801ea04473211da226482613) -- fix for all IEs: no f.name [`4e0c2f6`](https://github.com/inspect-js/object-inspect/commit/4e0c2f6dfd01c306d067d7163319acc97c94ee50) -- badges [`5ed0d88`](https://github.com/inspect-js/object-inspect/commit/5ed0d88e4e407f9cb327fa4a146c17921f9680f3) - -## [0.1.0](https://github.com/inspect-js/object-inspect/compare/0.0.0...0.1.0) - 2013-07-26 - -### Commits - -- [Function] for functions [`ad5c485`](https://github.com/inspect-js/object-inspect/commit/ad5c485098fc83352cb540a60b2548ca56820e0b) - -## 0.0.0 - 2013-07-26 - -### Commits - -- working browser example [`34be6b6`](https://github.com/inspect-js/object-inspect/commit/34be6b6548f9ce92bdc3c27572857ba0c4a1218d) -- package.json etc [`cad51f2`](https://github.com/inspect-js/object-inspect/commit/cad51f23fc6bcf1a456ed6abe16088256c2f632f) -- docs complete [`b80cce2`](https://github.com/inspect-js/object-inspect/commit/b80cce2490c4e7183a9ee11ea89071f0abec4446) -- circular example [`4b4a7b9`](https://github.com/inspect-js/object-inspect/commit/4b4a7b92209e4e6b4630976cb6bcd17d14165a59) -- string rep [`7afb479`](https://github.com/inspect-js/object-inspect/commit/7afb479baa798d27f09e0a178b72ea327f60f5c8) diff --git a/node_modules/object-inspect/LICENSE b/node_modules/object-inspect/LICENSE deleted file mode 100644 index ca64cc1..0000000 --- a/node_modules/object-inspect/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013 James Halliday - -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/node_modules/object-inspect/example/all.js b/node_modules/object-inspect/example/all.js deleted file mode 100644 index 2f3355c..0000000 --- a/node_modules/object-inspect/example/all.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var Buffer = require('safer-buffer').Buffer; - -var holes = ['a', 'b']; -holes[4] = 'e'; -holes[6] = 'g'; - -var obj = { - a: 1, - b: [3, 4, undefined, null], - c: undefined, - d: null, - e: { - regex: /^x/i, - buf: Buffer.from('abc'), - holes: holes - }, - now: new Date() -}; -obj.self = obj; -console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/circular.js b/node_modules/object-inspect/example/circular.js deleted file mode 100644 index 487a7c1..0000000 --- a/node_modules/object-inspect/example/circular.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var obj = { a: 1, b: [3, 4] }; -obj.c = obj; -console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/fn.js b/node_modules/object-inspect/example/fn.js deleted file mode 100644 index 9b5db8d..0000000 --- a/node_modules/object-inspect/example/fn.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var obj = [1, 2, function f(n) { return n + 5; }, 4]; -console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/inspect.js b/node_modules/object-inspect/example/inspect.js deleted file mode 100644 index e2df7c9..0000000 --- a/node_modules/object-inspect/example/inspect.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -/* eslint-env browser */ -var inspect = require('../'); - -var d = document.createElement('div'); -d.setAttribute('id', 'beep'); -d.innerHTML = 'woooiiiii'; - -console.log(inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }])); diff --git a/node_modules/object-inspect/index.js b/node_modules/object-inspect/index.js deleted file mode 100644 index a4b2d4c..0000000 --- a/node_modules/object-inspect/index.js +++ /dev/null @@ -1,544 +0,0 @@ -var hasMap = typeof Map === 'function' && Map.prototype; -var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; -var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; -var mapForEach = hasMap && Map.prototype.forEach; -var hasSet = typeof Set === 'function' && Set.prototype; -var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; -var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; -var setForEach = hasSet && Set.prototype.forEach; -var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; -var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; -var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; -var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; -var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; -var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; -var booleanValueOf = Boolean.prototype.valueOf; -var objectToString = Object.prototype.toString; -var functionToString = Function.prototype.toString; -var $match = String.prototype.match; -var $slice = String.prototype.slice; -var $replace = String.prototype.replace; -var $toUpperCase = String.prototype.toUpperCase; -var $toLowerCase = String.prototype.toLowerCase; -var $test = RegExp.prototype.test; -var $concat = Array.prototype.concat; -var $join = Array.prototype.join; -var $arrSlice = Array.prototype.slice; -var $floor = Math.floor; -var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; -var gOPS = Object.getOwnPropertySymbols; -var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; -var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; -// ie, `has-tostringtag/shams -var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') - ? Symbol.toStringTag - : null; -var isEnumerable = Object.prototype.propertyIsEnumerable; - -var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( - [].__proto__ === Array.prototype // eslint-disable-line no-proto - ? function (O) { - return O.__proto__; // eslint-disable-line no-proto - } - : null -); - -function addNumericSeparator(num, str) { - if ( - num === Infinity - || num === -Infinity - || num !== num - || (num && num > -1000 && num < 1000) - || $test.call(/e/, str) - ) { - return str; - } - var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; - if (typeof num === 'number') { - var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) - if (int !== num) { - var intStr = String(int); - var dec = $slice.call(str, intStr.length + 1); - return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); - } - } - return $replace.call(str, sepRegex, '$&_'); -} - -var utilInspect = require('./util.inspect'); -var inspectCustom = utilInspect.custom; -var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; - -var quotes = { - __proto__: null, - 'double': '"', - single: "'" -}; -var quoteREs = { - __proto__: null, - 'double': /(["\\])/g, - single: /(['\\])/g -}; - -module.exports = function inspect_(obj, options, depth, seen) { - var opts = options || {}; - - if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) { - throw new TypeError('option "quoteStyle" must be "single" or "double"'); - } - if ( - has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' - ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity - : opts.maxStringLength !== null - ) - ) { - throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); - } - var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; - if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { - throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); - } - - if ( - has(opts, 'indent') - && opts.indent !== null - && opts.indent !== '\t' - && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) - ) { - throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); - } - if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { - throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); - } - var numericSeparator = opts.numericSeparator; - - if (typeof obj === 'undefined') { - return 'undefined'; - } - if (obj === null) { - return 'null'; - } - if (typeof obj === 'boolean') { - return obj ? 'true' : 'false'; - } - - if (typeof obj === 'string') { - return inspectString(obj, opts); - } - if (typeof obj === 'number') { - if (obj === 0) { - return Infinity / obj > 0 ? '0' : '-0'; - } - var str = String(obj); - return numericSeparator ? addNumericSeparator(obj, str) : str; - } - if (typeof obj === 'bigint') { - var bigIntStr = String(obj) + 'n'; - return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; - } - - var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; - if (typeof depth === 'undefined') { depth = 0; } - if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { - return isArray(obj) ? '[Array]' : '[Object]'; - } - - var indent = getIndent(opts, depth); - - if (typeof seen === 'undefined') { - seen = []; - } else if (indexOf(seen, obj) >= 0) { - return '[Circular]'; - } - - function inspect(value, from, noIndent) { - if (from) { - seen = $arrSlice.call(seen); - seen.push(from); - } - if (noIndent) { - var newOpts = { - depth: opts.depth - }; - if (has(opts, 'quoteStyle')) { - newOpts.quoteStyle = opts.quoteStyle; - } - return inspect_(value, newOpts, depth + 1, seen); - } - return inspect_(value, opts, depth + 1, seen); - } - - if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable - var name = nameOf(obj); - var keys = arrObjKeys(obj, inspect); - return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); - } - if (isSymbol(obj)) { - var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); - return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; - } - if (isElement(obj)) { - var s = '<' + $toLowerCase.call(String(obj.nodeName)); - var attrs = obj.attributes || []; - for (var i = 0; i < attrs.length; i++) { - s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); - } - s += '>'; - if (obj.childNodes && obj.childNodes.length) { s += '...'; } - s += ''; - return s; - } - if (isArray(obj)) { - if (obj.length === 0) { return '[]'; } - var xs = arrObjKeys(obj, inspect); - if (indent && !singleLineValues(xs)) { - return '[' + indentedJoin(xs, indent) + ']'; - } - return '[ ' + $join.call(xs, ', ') + ' ]'; - } - if (isError(obj)) { - var parts = arrObjKeys(obj, inspect); - if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { - return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; - } - if (parts.length === 0) { return '[' + String(obj) + ']'; } - return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; - } - if (typeof obj === 'object' && customInspect) { - if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { - return utilInspect(obj, { depth: maxDepth - depth }); - } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { - return obj.inspect(); - } - } - if (isMap(obj)) { - var mapParts = []; - if (mapForEach) { - mapForEach.call(obj, function (value, key) { - mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); - }); - } - return collectionOf('Map', mapSize.call(obj), mapParts, indent); - } - if (isSet(obj)) { - var setParts = []; - if (setForEach) { - setForEach.call(obj, function (value) { - setParts.push(inspect(value, obj)); - }); - } - return collectionOf('Set', setSize.call(obj), setParts, indent); - } - if (isWeakMap(obj)) { - return weakCollectionOf('WeakMap'); - } - if (isWeakSet(obj)) { - return weakCollectionOf('WeakSet'); - } - if (isWeakRef(obj)) { - return weakCollectionOf('WeakRef'); - } - if (isNumber(obj)) { - return markBoxed(inspect(Number(obj))); - } - if (isBigInt(obj)) { - return markBoxed(inspect(bigIntValueOf.call(obj))); - } - if (isBoolean(obj)) { - return markBoxed(booleanValueOf.call(obj)); - } - if (isString(obj)) { - return markBoxed(inspect(String(obj))); - } - // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other - /* eslint-env browser */ - if (typeof window !== 'undefined' && obj === window) { - return '{ [object Window] }'; - } - if ( - (typeof globalThis !== 'undefined' && obj === globalThis) - || (typeof global !== 'undefined' && obj === global) - ) { - return '{ [object globalThis] }'; - } - if (!isDate(obj) && !isRegExp(obj)) { - var ys = arrObjKeys(obj, inspect); - var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; - var protoTag = obj instanceof Object ? '' : 'null prototype'; - var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; - var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; - var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); - if (ys.length === 0) { return tag + '{}'; } - if (indent) { - return tag + '{' + indentedJoin(ys, indent) + '}'; - } - return tag + '{ ' + $join.call(ys, ', ') + ' }'; - } - return String(obj); -}; - -function wrapQuotes(s, defaultStyle, opts) { - var style = opts.quoteStyle || defaultStyle; - var quoteChar = quotes[style]; - return quoteChar + s + quoteChar; -} - -function quote(s) { - return $replace.call(String(s), /"/g, '"'); -} - -function canTrustToString(obj) { - return !toStringTag || !(typeof obj === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined')); -} -function isArray(obj) { return toStr(obj) === '[object Array]' && canTrustToString(obj); } -function isDate(obj) { return toStr(obj) === '[object Date]' && canTrustToString(obj); } -function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && canTrustToString(obj); } -function isError(obj) { return toStr(obj) === '[object Error]' && canTrustToString(obj); } -function isString(obj) { return toStr(obj) === '[object String]' && canTrustToString(obj); } -function isNumber(obj) { return toStr(obj) === '[object Number]' && canTrustToString(obj); } -function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && canTrustToString(obj); } - -// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives -function isSymbol(obj) { - if (hasShammedSymbols) { - return obj && typeof obj === 'object' && obj instanceof Symbol; - } - if (typeof obj === 'symbol') { - return true; - } - if (!obj || typeof obj !== 'object' || !symToString) { - return false; - } - try { - symToString.call(obj); - return true; - } catch (e) {} - return false; -} - -function isBigInt(obj) { - if (!obj || typeof obj !== 'object' || !bigIntValueOf) { - return false; - } - try { - bigIntValueOf.call(obj); - return true; - } catch (e) {} - return false; -} - -var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; -function has(obj, key) { - return hasOwn.call(obj, key); -} - -function toStr(obj) { - return objectToString.call(obj); -} - -function nameOf(f) { - if (f.name) { return f.name; } - var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); - if (m) { return m[1]; } - return null; -} - -function indexOf(xs, x) { - if (xs.indexOf) { return xs.indexOf(x); } - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) { return i; } - } - return -1; -} - -function isMap(x) { - if (!mapSize || !x || typeof x !== 'object') { - return false; - } - try { - mapSize.call(x); - try { - setSize.call(x); - } catch (s) { - return true; - } - return x instanceof Map; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakMap(x) { - if (!weakMapHas || !x || typeof x !== 'object') { - return false; - } - try { - weakMapHas.call(x, weakMapHas); - try { - weakSetHas.call(x, weakSetHas); - } catch (s) { - return true; - } - return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakRef(x) { - if (!weakRefDeref || !x || typeof x !== 'object') { - return false; - } - try { - weakRefDeref.call(x); - return true; - } catch (e) {} - return false; -} - -function isSet(x) { - if (!setSize || !x || typeof x !== 'object') { - return false; - } - try { - setSize.call(x); - try { - mapSize.call(x); - } catch (m) { - return true; - } - return x instanceof Set; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakSet(x) { - if (!weakSetHas || !x || typeof x !== 'object') { - return false; - } - try { - weakSetHas.call(x, weakSetHas); - try { - weakMapHas.call(x, weakMapHas); - } catch (s) { - return true; - } - return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isElement(x) { - if (!x || typeof x !== 'object') { return false; } - if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { - return true; - } - return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; -} - -function inspectString(str, opts) { - if (str.length > opts.maxStringLength) { - var remaining = str.length - opts.maxStringLength; - var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); - return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; - } - var quoteRE = quoteREs[opts.quoteStyle || 'single']; - quoteRE.lastIndex = 0; - // eslint-disable-next-line no-control-regex - var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte); - return wrapQuotes(s, 'single', opts); -} - -function lowbyte(c) { - var n = c.charCodeAt(0); - var x = { - 8: 'b', - 9: 't', - 10: 'n', - 12: 'f', - 13: 'r' - }[n]; - if (x) { return '\\' + x; } - return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); -} - -function markBoxed(str) { - return 'Object(' + str + ')'; -} - -function weakCollectionOf(type) { - return type + ' { ? }'; -} - -function collectionOf(type, size, entries, indent) { - var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); - return type + ' (' + size + ') {' + joinedEntries + '}'; -} - -function singleLineValues(xs) { - for (var i = 0; i < xs.length; i++) { - if (indexOf(xs[i], '\n') >= 0) { - return false; - } - } - return true; -} - -function getIndent(opts, depth) { - var baseIndent; - if (opts.indent === '\t') { - baseIndent = '\t'; - } else if (typeof opts.indent === 'number' && opts.indent > 0) { - baseIndent = $join.call(Array(opts.indent + 1), ' '); - } else { - return null; - } - return { - base: baseIndent, - prev: $join.call(Array(depth + 1), baseIndent) - }; -} - -function indentedJoin(xs, indent) { - if (xs.length === 0) { return ''; } - var lineJoiner = '\n' + indent.prev + indent.base; - return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; -} - -function arrObjKeys(obj, inspect) { - var isArr = isArray(obj); - var xs = []; - if (isArr) { - xs.length = obj.length; - for (var i = 0; i < obj.length; i++) { - xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; - } - } - var syms = typeof gOPS === 'function' ? gOPS(obj) : []; - var symMap; - if (hasShammedSymbols) { - symMap = {}; - for (var k = 0; k < syms.length; k++) { - symMap['$' + syms[k]] = syms[k]; - } - } - - for (var key in obj) { // eslint-disable-line no-restricted-syntax - if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue - if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue - if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { - // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section - continue; // eslint-disable-line no-restricted-syntax, no-continue - } else if ($test.call(/[^\w$]/, key)) { - xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); - } else { - xs.push(key + ': ' + inspect(obj[key], obj)); - } - } - if (typeof gOPS === 'function') { - for (var j = 0; j < syms.length; j++) { - if (isEnumerable.call(obj, syms[j])) { - xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); - } - } - } - return xs; -} diff --git a/node_modules/object-inspect/package-support.json b/node_modules/object-inspect/package-support.json deleted file mode 100644 index 5cc12d0..0000000 --- a/node_modules/object-inspect/package-support.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "versions": [ - { - "version": "*", - "target": { - "node": "all" - }, - "response": { - "type": "time-permitting" - }, - "backing": { - "npm-funding": true, - "donations": [ - "https://github.com/ljharb", - "https://tidelift.com/funding/github/npm/object-inspect" - ] - } - } - ] -} diff --git a/node_modules/object-inspect/package.json b/node_modules/object-inspect/package.json deleted file mode 100644 index 9fd97ff..0000000 --- a/node_modules/object-inspect/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "name": "object-inspect", - "version": "1.13.4", - "description": "string representations of objects in node and the browser", - "main": "index.js", - "sideEffects": false, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.1", - "@pkgjs/support": "^0.0.6", - "auto-changelog": "^2.5.0", - "core-js": "^2.6.12", - "error-cause": "^1.0.8", - "es-value-fixtures": "^1.7.1", - "eslint": "=8.8.0", - "for-each": "^0.3.4", - "functions-have-names": "^1.2.3", - "glob": "=10.3.7", - "globalthis": "^1.0.4", - "has-symbols": "^1.1.0", - "has-tostringtag": "^1.0.2", - "in-publish": "^2.0.1", - "jackspeak": "=2.1.1", - "make-arrow-function": "^1.2.0", - "mock-property": "^1.1.0", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "safer-buffer": "^2.1.2", - "semver": "^6.3.1", - "string.prototype.repeat": "^1.0.0", - "tape": "^5.9.0" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "pretest": "npm run lint", - "lint": "eslint --ext=js,mjs .", - "postlint": "npx @pkgjs/support validate", - "test": "npm run tests-only && npm run test:corejs", - "tests-only": "nyc tape 'test/*.js'", - "test:corejs": "nyc tape test-core-js.js 'test/*.js'", - "posttest": "npx npm@'>=10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "testling": { - "files": [ - "test/*.js", - "test/browser/*.js" - ], - "browsers": [ - "ie/6..latest", - "chrome/latest", - "firefox/latest", - "safari/latest", - "opera/latest", - "iphone/latest", - "ipad/latest", - "android/latest" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/inspect-js/object-inspect.git" - }, - "homepage": "https://github.com/inspect-js/object-inspect", - "keywords": [ - "inspect", - "util.inspect", - "object", - "stringify", - "pretty" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "browser": { - "./util.inspect.js": false - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows", - "./test-core-js.js" - ] - }, - "support": true, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/object-inspect/readme.markdown b/node_modules/object-inspect/readme.markdown deleted file mode 100644 index f91617d..0000000 --- a/node_modules/object-inspect/readme.markdown +++ /dev/null @@ -1,84 +0,0 @@ -# object-inspect [![Version Badge][npm-version-svg]][package-url] - -string representations of objects in node and the browser - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -# example - -## circular - -``` js -var inspect = require('object-inspect'); -var obj = { a: 1, b: [3,4] }; -obj.c = obj; -console.log(inspect(obj)); -``` - -## dom element - -``` js -var inspect = require('object-inspect'); - -var d = document.createElement('div'); -d.setAttribute('id', 'beep'); -d.innerHTML = 'woooiiiii'; - -console.log(inspect([ d, { a: 3, b : 4, c: [5,6,[7,[8,[9]]]] } ])); -``` - -output: - -``` -[
    ...
    , { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [ ... ] ] ] ] } ] -``` - -# methods - -``` js -var inspect = require('object-inspect') -``` - -## var s = inspect(obj, opts={}) - -Return a string `s` with the string representation of `obj` up to a depth of `opts.depth`. - -Additional options: - - `quoteStyle`: must be "single" or "double", if present. Default `'single'` for strings, `'double'` for HTML elements. - - `maxStringLength`: must be `0`, a positive integer, `Infinity`, or `null`, if present. Default `Infinity`. - - `customInspect`: When `true`, a custom inspect method function will be invoked (either undere the `util.inspect.custom` symbol, or the `inspect` property). When the string `'symbol'`, only the symbol method will be invoked. Default `true`. - - `indent`: must be "\t", `null`, or a positive integer. Default `null`. - - `numericSeparator`: must be a boolean, if present. Default `false`. If `true`, all numbers will be printed with numeric separators (eg, `1234.5678` will be printed as `'1_234.567_8'`) - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install object-inspect -``` - -# license - -MIT - -[package-url]: https://npmjs.org/package/object-inspect -[npm-version-svg]: https://versionbadg.es/inspect-js/object-inspect.svg -[deps-svg]: https://david-dm.org/inspect-js/object-inspect.svg -[deps-url]: https://david-dm.org/inspect-js/object-inspect -[dev-deps-svg]: https://david-dm.org/inspect-js/object-inspect/dev-status.svg -[dev-deps-url]: https://david-dm.org/inspect-js/object-inspect#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/object-inspect.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/object-inspect.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/object-inspect.svg -[downloads-url]: https://npm-stat.com/charts.html?package=object-inspect -[codecov-image]: https://codecov.io/gh/inspect-js/object-inspect/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/inspect-js/object-inspect/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/object-inspect -[actions-url]: https://github.com/inspect-js/object-inspect/actions diff --git a/node_modules/object-inspect/test-core-js.js b/node_modules/object-inspect/test-core-js.js deleted file mode 100644 index e53c400..0000000 --- a/node_modules/object-inspect/test-core-js.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -require('core-js'); - -var inspect = require('./'); -var test = require('tape'); - -test('Maps', function (t) { - t.equal(inspect(new Map([[1, 2]])), 'Map (1) {1 => 2}'); - t.end(); -}); - -test('WeakMaps', function (t) { - t.equal(inspect(new WeakMap([[{}, 2]])), 'WeakMap { ? }'); - t.end(); -}); - -test('Sets', function (t) { - t.equal(inspect(new Set([[1, 2]])), 'Set (1) {[ 1, 2 ]}'); - t.end(); -}); - -test('WeakSets', function (t) { - t.equal(inspect(new WeakSet([[1, 2]])), 'WeakSet { ? }'); - t.end(); -}); diff --git a/node_modules/object-inspect/test/bigint.js b/node_modules/object-inspect/test/bigint.js deleted file mode 100644 index 4ecc31d..0000000 --- a/node_modules/object-inspect/test/bigint.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var test = require('tape'); -var hasToStringTag = require('has-tostringtag/shams')(); - -test('bigint', { skip: typeof BigInt === 'undefined' }, function (t) { - t.test('primitives', function (st) { - st.plan(3); - - st.equal(inspect(BigInt(-256)), '-256n'); - st.equal(inspect(BigInt(0)), '0n'); - st.equal(inspect(BigInt(256)), '256n'); - }); - - t.test('objects', function (st) { - st.plan(3); - - st.equal(inspect(Object(BigInt(-256))), 'Object(-256n)'); - st.equal(inspect(Object(BigInt(0))), 'Object(0n)'); - st.equal(inspect(Object(BigInt(256))), 'Object(256n)'); - }); - - t.test('syntactic primitives', function (st) { - st.plan(3); - - /* eslint-disable no-new-func */ - st.equal(inspect(Function('return -256n')()), '-256n'); - st.equal(inspect(Function('return 0n')()), '0n'); - st.equal(inspect(Function('return 256n')()), '256n'); - }); - - t.test('toStringTag', { skip: !hasToStringTag }, function (st) { - st.plan(1); - - var faker = {}; - faker[Symbol.toStringTag] = 'BigInt'; - st.equal( - inspect(faker), - '{ [Symbol(Symbol.toStringTag)]: \'BigInt\' }', - 'object lying about being a BigInt inspects as an object' - ); - }); - - t.test('numericSeparator', function (st) { - st.equal(inspect(BigInt(0), { numericSeparator: false }), '0n', '0n, numericSeparator false'); - st.equal(inspect(BigInt(0), { numericSeparator: true }), '0n', '0n, numericSeparator true'); - - st.equal(inspect(BigInt(1234), { numericSeparator: false }), '1234n', '1234n, numericSeparator false'); - st.equal(inspect(BigInt(1234), { numericSeparator: true }), '1_234n', '1234n, numericSeparator true'); - st.equal(inspect(BigInt(-1234), { numericSeparator: false }), '-1234n', '1234n, numericSeparator false'); - st.equal(inspect(BigInt(-1234), { numericSeparator: true }), '-1_234n', '1234n, numericSeparator true'); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/browser/dom.js b/node_modules/object-inspect/test/browser/dom.js deleted file mode 100644 index 210c0b2..0000000 --- a/node_modules/object-inspect/test/browser/dom.js +++ /dev/null @@ -1,15 +0,0 @@ -var inspect = require('../../'); -var test = require('tape'); - -test('dom element', function (t) { - t.plan(1); - - var d = document.createElement('div'); - d.setAttribute('id', 'beep'); - d.innerHTML = 'woooiiiii'; - - t.equal( - inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }]), - '[
    ...
    , { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [Object] ] ] ] } ]' - ); -}); diff --git a/node_modules/object-inspect/test/circular.js b/node_modules/object-inspect/test/circular.js deleted file mode 100644 index 5df4233..0000000 --- a/node_modules/object-inspect/test/circular.js +++ /dev/null @@ -1,16 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('circular', function (t) { - t.plan(2); - var obj = { a: 1, b: [3, 4] }; - obj.c = obj; - t.equal(inspect(obj), '{ a: 1, b: [ 3, 4 ], c: [Circular] }'); - - var double = {}; - double.a = [double]; - double.b = {}; - double.b.inner = double.b; - double.b.obj = double; - t.equal(inspect(double), '{ a: [ [Circular] ], b: { inner: [Circular], obj: [Circular] } }'); -}); diff --git a/node_modules/object-inspect/test/deep.js b/node_modules/object-inspect/test/deep.js deleted file mode 100644 index 99ce32a..0000000 --- a/node_modules/object-inspect/test/deep.js +++ /dev/null @@ -1,12 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('deep', function (t) { - t.plan(4); - var obj = [[[[[[500]]]]]]; - t.equal(inspect(obj), '[ [ [ [ [ [Array] ] ] ] ] ]'); - t.equal(inspect(obj, { depth: 4 }), '[ [ [ [ [Array] ] ] ] ]'); - t.equal(inspect(obj, { depth: 2 }), '[ [ [Array] ] ]'); - - t.equal(inspect([[[{ a: 1 }]]], { depth: 3 }), '[ [ [ [Object] ] ] ]'); -}); diff --git a/node_modules/object-inspect/test/element.js b/node_modules/object-inspect/test/element.js deleted file mode 100644 index 47fa9e2..0000000 --- a/node_modules/object-inspect/test/element.js +++ /dev/null @@ -1,53 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('element', function (t) { - t.plan(3); - var elem = { - nodeName: 'div', - attributes: [{ name: 'class', value: 'row' }], - getAttribute: function (key) { return key; }, - childNodes: [] - }; - var obj = [1, elem, 3]; - t.deepEqual(inspect(obj), '[ 1,
    , 3 ]'); - t.deepEqual(inspect(obj, { quoteStyle: 'single' }), "[ 1,
    , 3 ]"); - t.deepEqual(inspect(obj, { quoteStyle: 'double' }), '[ 1,
    , 3 ]'); -}); - -test('element no attr', function (t) { - t.plan(1); - var elem = { - nodeName: 'div', - getAttribute: function (key) { return key; }, - childNodes: [] - }; - var obj = [1, elem, 3]; - t.deepEqual(inspect(obj), '[ 1,
    , 3 ]'); -}); - -test('element with contents', function (t) { - t.plan(1); - var elem = { - nodeName: 'div', - getAttribute: function (key) { return key; }, - childNodes: [{ nodeName: 'b' }] - }; - var obj = [1, elem, 3]; - t.deepEqual(inspect(obj), '[ 1,
    ...
    , 3 ]'); -}); - -test('element instance', function (t) { - t.plan(1); - var h = global.HTMLElement; - global.HTMLElement = function (name, attr) { - this.nodeName = name; - this.attributes = attr; - }; - global.HTMLElement.prototype.getAttribute = function () {}; - - var elem = new global.HTMLElement('div', []); - var obj = [1, elem, 3]; - t.deepEqual(inspect(obj), '[ 1,
    , 3 ]'); - global.HTMLElement = h; -}); diff --git a/node_modules/object-inspect/test/err.js b/node_modules/object-inspect/test/err.js deleted file mode 100644 index cc1d884..0000000 --- a/node_modules/object-inspect/test/err.js +++ /dev/null @@ -1,48 +0,0 @@ -var test = require('tape'); -var ErrorWithCause = require('error-cause/Error'); - -var inspect = require('../'); - -test('type error', function (t) { - t.plan(1); - var aerr = new TypeError(); - aerr.foo = 555; - aerr.bar = [1, 2, 3]; - - var berr = new TypeError('tuv'); - berr.baz = 555; - - var cerr = new SyntaxError(); - cerr.message = 'whoa'; - cerr['a-b'] = 5; - - var withCause = new ErrorWithCause('foo', { cause: 'bar' }); - var withCausePlus = new ErrorWithCause('foo', { cause: 'bar' }); - withCausePlus.foo = 'bar'; - var withUndefinedCause = new ErrorWithCause('foo', { cause: undefined }); - var withEnumerableCause = new Error('foo'); - withEnumerableCause.cause = 'bar'; - - var obj = [ - new TypeError(), - new TypeError('xxx'), - aerr, - berr, - cerr, - withCause, - withCausePlus, - withUndefinedCause, - withEnumerableCause - ]; - t.equal(inspect(obj), '[ ' + [ - '[TypeError]', - '[TypeError: xxx]', - '{ [TypeError] foo: 555, bar: [ 1, 2, 3 ] }', - '{ [TypeError: tuv] baz: 555 }', - '{ [SyntaxError: whoa] message: \'whoa\', \'a-b\': 5 }', - 'cause' in Error.prototype ? '[Error: foo]' : '{ [Error: foo] [cause]: \'bar\' }', - '{ [Error: foo] ' + ('cause' in Error.prototype ? '' : '[cause]: \'bar\', ') + 'foo: \'bar\' }', - 'cause' in Error.prototype ? '[Error: foo]' : '{ [Error: foo] [cause]: undefined }', - '{ [Error: foo] cause: \'bar\' }' - ].join(', ') + ' ]'); -}); diff --git a/node_modules/object-inspect/test/fakes.js b/node_modules/object-inspect/test/fakes.js deleted file mode 100644 index a65c08c..0000000 --- a/node_modules/object-inspect/test/fakes.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var test = require('tape'); -var hasToStringTag = require('has-tostringtag/shams')(); -var forEach = require('for-each'); - -test('fakes', { skip: !hasToStringTag }, function (t) { - forEach([ - 'Array', - 'Boolean', - 'Date', - 'Error', - 'Number', - 'RegExp', - 'String' - ], function (expected) { - var faker = {}; - faker[Symbol.toStringTag] = expected; - - t.equal( - inspect(faker), - '{ [Symbol(Symbol.toStringTag)]: \'' + expected + '\' }', - 'faker masquerading as ' + expected + ' is not shown as one' - ); - }); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/fn.js b/node_modules/object-inspect/test/fn.js deleted file mode 100644 index de3ca62..0000000 --- a/node_modules/object-inspect/test/fn.js +++ /dev/null @@ -1,76 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); -var arrow = require('make-arrow-function')(); -var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); - -test('function', function (t) { - t.plan(1); - var obj = [1, 2, function f(n) { return n; }, 4]; - t.equal(inspect(obj), '[ 1, 2, [Function: f], 4 ]'); -}); - -test('function name', function (t) { - t.plan(1); - var f = (function () { - return function () {}; - }()); - f.toString = function toStr() { return 'function xxx () {}'; }; - var obj = [1, 2, f, 4]; - t.equal(inspect(obj), '[ 1, 2, [Function (anonymous)] { toString: [Function: toStr] }, 4 ]'); -}); - -test('anon function', function (t) { - var f = (function () { - return function () {}; - }()); - var obj = [1, 2, f, 4]; - t.equal(inspect(obj), '[ 1, 2, [Function (anonymous)], 4 ]'); - - t.end(); -}); - -test('arrow function', { skip: !arrow }, function (t) { - t.equal(inspect(arrow), '[Function (anonymous)]'); - - t.end(); -}); - -test('truly nameless function', { skip: !arrow || !functionsHaveConfigurableNames }, function (t) { - function f() {} - Object.defineProperty(f, 'name', { value: false }); - t.equal(f.name, false); - t.equal( - inspect(f), - '[Function: f]', - 'named function with falsy `.name` does not hide its original name' - ); - - function g() {} - Object.defineProperty(g, 'name', { value: true }); - t.equal(g.name, true); - t.equal( - inspect(g), - '[Function: true]', - 'named function with truthy `.name` hides its original name' - ); - - var anon = function () {}; // eslint-disable-line func-style - Object.defineProperty(anon, 'name', { value: null }); - t.equal(anon.name, null); - t.equal( - inspect(anon), - '[Function (anonymous)]', - 'anon function with falsy `.name` does not hide its anonymity' - ); - - var anon2 = function () {}; // eslint-disable-line func-style - Object.defineProperty(anon2, 'name', { value: 1 }); - t.equal(anon2.name, 1); - t.equal( - inspect(anon2), - '[Function: 1]', - 'anon function with truthy `.name` hides its anonymity' - ); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/global.js b/node_modules/object-inspect/test/global.js deleted file mode 100644 index c57216a..0000000 --- a/node_modules/object-inspect/test/global.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var inspect = require('../'); - -var test = require('tape'); -var globalThis = require('globalthis')(); - -test('global object', function (t) { - /* eslint-env browser */ - var expected = typeof window === 'undefined' ? 'globalThis' : 'Window'; - t.equal( - inspect([globalThis]), - '[ { [object ' + expected + '] } ]' - ); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/has.js b/node_modules/object-inspect/test/has.js deleted file mode 100644 index 01800de..0000000 --- a/node_modules/object-inspect/test/has.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var test = require('tape'); -var mockProperty = require('mock-property'); - -test('when Object#hasOwnProperty is deleted', function (t) { - t.plan(1); - var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays - - t.teardown(mockProperty(Array.prototype, 1, { value: 2 })); // this is needed to account for "in" vs "hasOwnProperty" - t.teardown(mockProperty(Object.prototype, 'hasOwnProperty', { 'delete': true })); - - t.equal(inspect(arr), '[ 1, , 3 ]'); -}); diff --git a/node_modules/object-inspect/test/holes.js b/node_modules/object-inspect/test/holes.js deleted file mode 100644 index 87fc8c8..0000000 --- a/node_modules/object-inspect/test/holes.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var inspect = require('../'); - -var xs = ['a', 'b']; -xs[5] = 'f'; -xs[7] = 'j'; -xs[8] = 'k'; - -test('holes', function (t) { - t.plan(1); - t.equal( - inspect(xs), - "[ 'a', 'b', , , , 'f', , 'j', 'k' ]" - ); -}); diff --git a/node_modules/object-inspect/test/indent-option.js b/node_modules/object-inspect/test/indent-option.js deleted file mode 100644 index 89d8fce..0000000 --- a/node_modules/object-inspect/test/indent-option.js +++ /dev/null @@ -1,271 +0,0 @@ -var test = require('tape'); -var forEach = require('for-each'); - -var inspect = require('../'); - -test('bad indent options', function (t) { - forEach([ - undefined, - true, - false, - -1, - 1.2, - Infinity, - -Infinity, - NaN - ], function (indent) { - t['throws']( - function () { inspect('', { indent: indent }); }, - TypeError, - inspect(indent) + ' is invalid' - ); - }); - - t.end(); -}); - -test('simple object with indent', function (t) { - t.plan(2); - - var obj = { a: 1, b: 2 }; - - var expectedSpaces = [ - '{', - ' a: 1,', - ' b: 2', - '}' - ].join('\n'); - var expectedTabs = [ - '{', - ' a: 1,', - ' b: 2', - '}' - ].join('\n'); - - t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); - t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); -}); - -test('two deep object with indent', function (t) { - t.plan(2); - - var obj = { a: 1, b: { c: 3, d: 4 } }; - - var expectedSpaces = [ - '{', - ' a: 1,', - ' b: {', - ' c: 3,', - ' d: 4', - ' }', - '}' - ].join('\n'); - var expectedTabs = [ - '{', - ' a: 1,', - ' b: {', - ' c: 3,', - ' d: 4', - ' }', - '}' - ].join('\n'); - - t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); - t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); -}); - -test('simple array with all single line elements', function (t) { - t.plan(2); - - var obj = [1, 2, 3, 'asdf\nsdf']; - - var expected = '[ 1, 2, 3, \'asdf\\nsdf\' ]'; - - t.equal(inspect(obj, { indent: 2 }), expected, 'two'); - t.equal(inspect(obj, { indent: '\t' }), expected, 'tabs'); -}); - -test('array with complex elements', function (t) { - t.plan(2); - - var obj = [1, { a: 1, b: { c: 1 } }, 'asdf\nsdf']; - - var expectedSpaces = [ - '[', - ' 1,', - ' {', - ' a: 1,', - ' b: {', - ' c: 1', - ' }', - ' },', - ' \'asdf\\nsdf\'', - ']' - ].join('\n'); - var expectedTabs = [ - '[', - ' 1,', - ' {', - ' a: 1,', - ' b: {', - ' c: 1', - ' }', - ' },', - ' \'asdf\\nsdf\'', - ']' - ].join('\n'); - - t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); - t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); -}); - -test('values', function (t) { - t.plan(2); - var obj = [{}, [], { 'a-b': 5 }]; - - var expectedSpaces = [ - '[', - ' {},', - ' [],', - ' {', - ' \'a-b\': 5', - ' }', - ']' - ].join('\n'); - var expectedTabs = [ - '[', - ' {},', - ' [],', - ' {', - ' \'a-b\': 5', - ' }', - ']' - ].join('\n'); - - t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); - t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); -}); - -test('Map', { skip: typeof Map !== 'function' }, function (t) { - var map = new Map(); - map.set({ a: 1 }, ['b']); - map.set(3, NaN); - - var expectedStringSpaces = [ - 'Map (2) {', - ' { a: 1 } => [ \'b\' ],', - ' 3 => NaN', - '}' - ].join('\n'); - var expectedStringTabs = [ - 'Map (2) {', - ' { a: 1 } => [ \'b\' ],', - ' 3 => NaN', - '}' - ].join('\n'); - var expectedStringTabsDoubleQuotes = [ - 'Map (2) {', - ' { a: 1 } => [ "b" ],', - ' 3 => NaN', - '}' - ].join('\n'); - - t.equal( - inspect(map, { indent: 2 }), - expectedStringSpaces, - 'Map keys are not indented (two)' - ); - t.equal( - inspect(map, { indent: '\t' }), - expectedStringTabs, - 'Map keys are not indented (tabs)' - ); - t.equal( - inspect(map, { indent: '\t', quoteStyle: 'double' }), - expectedStringTabsDoubleQuotes, - 'Map keys are not indented (tabs + double quotes)' - ); - - t.equal(inspect(new Map(), { indent: 2 }), 'Map (0) {}', 'empty Map should show as empty (two)'); - t.equal(inspect(new Map(), { indent: '\t' }), 'Map (0) {}', 'empty Map should show as empty (tabs)'); - - var nestedMap = new Map(); - nestedMap.set(nestedMap, map); - var expectedNestedSpaces = [ - 'Map (1) {', - ' [Circular] => Map (2) {', - ' { a: 1 } => [ \'b\' ],', - ' 3 => NaN', - ' }', - '}' - ].join('\n'); - var expectedNestedTabs = [ - 'Map (1) {', - ' [Circular] => Map (2) {', - ' { a: 1 } => [ \'b\' ],', - ' 3 => NaN', - ' }', - '}' - ].join('\n'); - t.equal(inspect(nestedMap, { indent: 2 }), expectedNestedSpaces, 'Map containing a Map should work (two)'); - t.equal(inspect(nestedMap, { indent: '\t' }), expectedNestedTabs, 'Map containing a Map should work (tabs)'); - - t.end(); -}); - -test('Set', { skip: typeof Set !== 'function' }, function (t) { - var set = new Set(); - set.add({ a: 1 }); - set.add(['b']); - var expectedStringSpaces = [ - 'Set (2) {', - ' {', - ' a: 1', - ' },', - ' [ \'b\' ]', - '}' - ].join('\n'); - var expectedStringTabs = [ - 'Set (2) {', - ' {', - ' a: 1', - ' },', - ' [ \'b\' ]', - '}' - ].join('\n'); - t.equal(inspect(set, { indent: 2 }), expectedStringSpaces, 'new Set([{ a: 1 }, ["b"]]) should show size and contents (two)'); - t.equal(inspect(set, { indent: '\t' }), expectedStringTabs, 'new Set([{ a: 1 }, ["b"]]) should show size and contents (tabs)'); - - t.equal(inspect(new Set(), { indent: 2 }), 'Set (0) {}', 'empty Set should show as empty (two)'); - t.equal(inspect(new Set(), { indent: '\t' }), 'Set (0) {}', 'empty Set should show as empty (tabs)'); - - var nestedSet = new Set(); - nestedSet.add(set); - nestedSet.add(nestedSet); - var expectedNestedSpaces = [ - 'Set (2) {', - ' Set (2) {', - ' {', - ' a: 1', - ' },', - ' [ \'b\' ]', - ' },', - ' [Circular]', - '}' - ].join('\n'); - var expectedNestedTabs = [ - 'Set (2) {', - ' Set (2) {', - ' {', - ' a: 1', - ' },', - ' [ \'b\' ]', - ' },', - ' [Circular]', - '}' - ].join('\n'); - t.equal(inspect(nestedSet, { indent: 2 }), expectedNestedSpaces, 'Set containing a Set should work (two)'); - t.equal(inspect(nestedSet, { indent: '\t' }), expectedNestedTabs, 'Set containing a Set should work (tabs)'); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/inspect.js b/node_modules/object-inspect/test/inspect.js deleted file mode 100644 index 1abf81b..0000000 --- a/node_modules/object-inspect/test/inspect.js +++ /dev/null @@ -1,139 +0,0 @@ -var test = require('tape'); -var hasSymbols = require('has-symbols/shams')(); -var utilInspect = require('../util.inspect'); -var repeat = require('string.prototype.repeat'); - -var inspect = require('..'); - -test('inspect', function (t) { - t.plan(5); - - var obj = [{ inspect: function xyzInspect() { return '!XYZ¡'; } }, []]; - var stringResult = '[ !XYZ¡, [] ]'; - var falseResult = '[ { inspect: [Function: xyzInspect] }, [] ]'; - - t.equal(inspect(obj), stringResult); - t.equal(inspect(obj, { customInspect: true }), stringResult); - t.equal(inspect(obj, { customInspect: 'symbol' }), falseResult); - t.equal(inspect(obj, { customInspect: false }), falseResult); - t['throws']( - function () { inspect(obj, { customInspect: 'not a boolean or "symbol"' }); }, - TypeError, - '`customInspect` must be a boolean or the string "symbol"' - ); -}); - -test('inspect custom symbol', { skip: !hasSymbols || !utilInspect || !utilInspect.custom }, function (t) { - t.plan(4); - - var obj = { inspect: function stringInspect() { return 'string'; } }; - obj[utilInspect.custom] = function custom() { return 'symbol'; }; - - var symbolResult = '[ symbol, [] ]'; - var stringResult = '[ string, [] ]'; - var falseResult = '[ { inspect: [Function: stringInspect]' + (utilInspect.custom ? ', [' + inspect(utilInspect.custom) + ']: [Function: custom]' : '') + ' }, [] ]'; - - var symbolStringFallback = utilInspect.custom ? symbolResult : stringResult; - var symbolFalseFallback = utilInspect.custom ? symbolResult : falseResult; - - t.equal(inspect([obj, []]), symbolStringFallback); - t.equal(inspect([obj, []], { customInspect: true }), symbolStringFallback); - t.equal(inspect([obj, []], { customInspect: 'symbol' }), symbolFalseFallback); - t.equal(inspect([obj, []], { customInspect: false }), falseResult); -}); - -test('symbols', { skip: !hasSymbols }, function (t) { - t.plan(2); - - var obj = { a: 1 }; - obj[Symbol('test')] = 2; - obj[Symbol.iterator] = 3; - Object.defineProperty(obj, Symbol('non-enum'), { - enumerable: false, - value: 4 - }); - - if (typeof Symbol.iterator === 'symbol') { - t.equal(inspect(obj), '{ a: 1, [Symbol(test)]: 2, [Symbol(Symbol.iterator)]: 3 }', 'object with symbols'); - t.equal(inspect([obj, []]), '[ { a: 1, [Symbol(test)]: 2, [Symbol(Symbol.iterator)]: 3 }, [] ]', 'object with symbols in array'); - } else { - // symbol sham key ordering is unreliable - t.match( - inspect(obj), - /^(?:{ a: 1, \[Symbol\(test\)\]: 2, \[Symbol\(Symbol.iterator\)\]: 3 }|{ a: 1, \[Symbol\(Symbol.iterator\)\]: 3, \[Symbol\(test\)\]: 2 })$/, - 'object with symbols (nondeterministic symbol sham key ordering)' - ); - t.match( - inspect([obj, []]), - /^\[ (?:{ a: 1, \[Symbol\(test\)\]: 2, \[Symbol\(Symbol.iterator\)\]: 3 }|{ a: 1, \[Symbol\(Symbol.iterator\)\]: 3, \[Symbol\(test\)\]: 2 }), \[\] \]$/, - 'object with symbols in array (nondeterministic symbol sham key ordering)' - ); - } -}); - -test('maxStringLength', function (t) { - t['throws']( - function () { inspect('', { maxStringLength: -1 }); }, - TypeError, - 'maxStringLength must be >= 0, or Infinity, not negative' - ); - - var str = repeat('a', 1e8); - - t.equal( - inspect([str], { maxStringLength: 10 }), - '[ \'aaaaaaaaaa\'... 99999990 more characters ]', - 'maxStringLength option limits output' - ); - - t.equal( - inspect(['f'], { maxStringLength: null }), - '[ \'\'... 1 more character ]', - 'maxStringLength option accepts `null`' - ); - - t.equal( - inspect([str], { maxStringLength: Infinity }), - '[ \'' + str + '\' ]', - 'maxStringLength option accepts ∞' - ); - - t.end(); -}); - -test('inspect options', { skip: !utilInspect.custom }, function (t) { - var obj = {}; - obj[utilInspect.custom] = function () { - return JSON.stringify(arguments); - }; - t.equal( - inspect(obj), - utilInspect(obj, { depth: 5 }), - 'custom symbols will use node\'s inspect' - ); - t.equal( - inspect(obj, { depth: 2 }), - utilInspect(obj, { depth: 2 }), - 'a reduced depth will be passed to node\'s inspect' - ); - t.equal( - inspect({ d1: obj }, { depth: 3 }), - '{ d1: ' + utilInspect(obj, { depth: 2 }) + ' }', - 'deep objects will receive a reduced depth' - ); - t.equal( - inspect({ d1: obj }, { depth: 1 }), - '{ d1: [Object] }', - 'unlike nodejs inspect, customInspect will not be used once the depth is exceeded.' - ); - t.end(); -}); - -test('inspect URL', { skip: typeof URL === 'undefined' }, function (t) { - t.match( - inspect(new URL('https://nodejs.org')), - /nodejs\.org/, // Different environments stringify it differently - 'url can be inspected' - ); - t.end(); -}); diff --git a/node_modules/object-inspect/test/lowbyte.js b/node_modules/object-inspect/test/lowbyte.js deleted file mode 100644 index 68a345d..0000000 --- a/node_modules/object-inspect/test/lowbyte.js +++ /dev/null @@ -1,12 +0,0 @@ -var test = require('tape'); -var inspect = require('../'); - -var obj = { x: 'a\r\nb', y: '\x05! \x1f \x12' }; - -test('interpolate low bytes', function (t) { - t.plan(1); - t.equal( - inspect(obj), - "{ x: 'a\\r\\nb', y: '\\x05! \\x1F \\x12' }" - ); -}); diff --git a/node_modules/object-inspect/test/number.js b/node_modules/object-inspect/test/number.js deleted file mode 100644 index 8f287e8..0000000 --- a/node_modules/object-inspect/test/number.js +++ /dev/null @@ -1,58 +0,0 @@ -var test = require('tape'); -var v = require('es-value-fixtures'); -var forEach = require('for-each'); - -var inspect = require('../'); - -test('negative zero', function (t) { - t.equal(inspect(0), '0', 'inspect(0) === "0"'); - t.equal(inspect(Object(0)), 'Object(0)', 'inspect(Object(0)) === "Object(0)"'); - - t.equal(inspect(-0), '-0', 'inspect(-0) === "-0"'); - t.equal(inspect(Object(-0)), 'Object(-0)', 'inspect(Object(-0)) === "Object(-0)"'); - - t.end(); -}); - -test('numericSeparator', function (t) { - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { inspect(true, { numericSeparator: nonBoolean }); }, - TypeError, - inspect(nonBoolean) + ' is not a boolean' - ); - }); - - t.test('3 digit numbers', function (st) { - var failed = false; - for (var i = -999; i < 1000; i += 1) { - var actual = inspect(i); - var actualSepNo = inspect(i, { numericSeparator: false }); - var actualSepYes = inspect(i, { numericSeparator: true }); - var expected = String(i); - if (actual !== expected || actualSepNo !== expected || actualSepYes !== expected) { - failed = true; - t.equal(actual, expected); - t.equal(actualSepNo, expected); - t.equal(actualSepYes, expected); - } - } - - st.notOk(failed, 'all 3 digit numbers passed'); - - st.end(); - }); - - t.equal(inspect(1e3), '1000', '1000'); - t.equal(inspect(1e3, { numericSeparator: false }), '1000', '1000, numericSeparator false'); - t.equal(inspect(1e3, { numericSeparator: true }), '1_000', '1000, numericSeparator true'); - t.equal(inspect(-1e3), '-1000', '-1000'); - t.equal(inspect(-1e3, { numericSeparator: false }), '-1000', '-1000, numericSeparator false'); - t.equal(inspect(-1e3, { numericSeparator: true }), '-1_000', '-1000, numericSeparator true'); - - t.equal(inspect(1234.5678, { numericSeparator: true }), '1_234.567_8', 'fractional numbers get separators'); - t.equal(inspect(1234.56789, { numericSeparator: true }), '1_234.567_89', 'fractional numbers get separators'); - t.equal(inspect(1234.567891, { numericSeparator: true }), '1_234.567_891', 'fractional numbers get separators'); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/quoteStyle.js b/node_modules/object-inspect/test/quoteStyle.js deleted file mode 100644 index da23e63..0000000 --- a/node_modules/object-inspect/test/quoteStyle.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var test = require('tape'); - -test('quoteStyle option', function (t) { - t['throws'](function () { inspect(null, { quoteStyle: false }); }, 'false is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: true }); }, 'true is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: '' }); }, '"" is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: {} }); }, '{} is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: [] }); }, '[] is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: 42 }); }, '42 is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: NaN }); }, 'NaN is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: function () {} }); }, 'a function is not a valid value'); - - t.equal(inspect('"', { quoteStyle: 'single' }), '\'"\'', 'double quote, quoteStyle: "single"'); - t.equal(inspect('"', { quoteStyle: 'double' }), '"\\""', 'double quote, quoteStyle: "double"'); - - t.equal(inspect('\'', { quoteStyle: 'single' }), '\'\\\'\'', 'single quote, quoteStyle: "single"'); - t.equal(inspect('\'', { quoteStyle: 'double' }), '"\'"', 'single quote, quoteStyle: "double"'); - - t.equal(inspect('`', { quoteStyle: 'single' }), '\'`\'', 'backtick, quoteStyle: "single"'); - t.equal(inspect('`', { quoteStyle: 'double' }), '"`"', 'backtick, quoteStyle: "double"'); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/toStringTag.js b/node_modules/object-inspect/test/toStringTag.js deleted file mode 100644 index 95f8270..0000000 --- a/node_modules/object-inspect/test/toStringTag.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -var test = require('tape'); -var hasToStringTag = require('has-tostringtag/shams')(); - -var inspect = require('../'); - -test('Symbol.toStringTag', { skip: !hasToStringTag }, function (t) { - t.plan(4); - - var obj = { a: 1 }; - t.equal(inspect(obj), '{ a: 1 }', 'object, no Symbol.toStringTag'); - - obj[Symbol.toStringTag] = 'foo'; - t.equal(inspect(obj), '{ a: 1, [Symbol(Symbol.toStringTag)]: \'foo\' }', 'object with Symbol.toStringTag'); - - t.test('null objects', { skip: 'toString' in { __proto__: null } }, function (st) { - st.plan(2); - - var dict = { __proto__: null, a: 1 }; - st.equal(inspect(dict), '[Object: null prototype] { a: 1 }', 'null object with Symbol.toStringTag'); - - dict[Symbol.toStringTag] = 'Dict'; - st.equal(inspect(dict), '[Dict: null prototype] { a: 1, [Symbol(Symbol.toStringTag)]: \'Dict\' }', 'null object with Symbol.toStringTag'); - }); - - t.test('instances', function (st) { - st.plan(4); - - function C() { - this.a = 1; - } - st.equal(Object.prototype.toString.call(new C()), '[object Object]', 'instance, no toStringTag, Object.prototype.toString'); - st.equal(inspect(new C()), 'C { a: 1 }', 'instance, no toStringTag'); - - C.prototype[Symbol.toStringTag] = 'Class!'; - st.equal(Object.prototype.toString.call(new C()), '[object Class!]', 'instance, with toStringTag, Object.prototype.toString'); - st.equal(inspect(new C()), 'C [Class!] { a: 1 }', 'instance, with toStringTag'); - }); -}); diff --git a/node_modules/object-inspect/test/undef.js b/node_modules/object-inspect/test/undef.js deleted file mode 100644 index e3f4961..0000000 --- a/node_modules/object-inspect/test/undef.js +++ /dev/null @@ -1,12 +0,0 @@ -var test = require('tape'); -var inspect = require('../'); - -var obj = { a: 1, b: [3, 4, undefined, null], c: undefined, d: null }; - -test('undef and null', function (t) { - t.plan(1); - t.equal( - inspect(obj), - '{ a: 1, b: [ 3, 4, undefined, null ], c: undefined, d: null }' - ); -}); diff --git a/node_modules/object-inspect/test/values.js b/node_modules/object-inspect/test/values.js deleted file mode 100644 index 15986cd..0000000 --- a/node_modules/object-inspect/test/values.js +++ /dev/null @@ -1,261 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var test = require('tape'); -var mockProperty = require('mock-property'); -var hasSymbols = require('has-symbols/shams')(); -var hasToStringTag = require('has-tostringtag/shams')(); -var forEach = require('for-each'); -var semver = require('semver'); - -test('values', function (t) { - t.plan(1); - var obj = [{}, [], { 'a-b': 5 }]; - t.equal(inspect(obj), '[ {}, [], { \'a-b\': 5 } ]'); -}); - -test('arrays with properties', function (t) { - t.plan(1); - var arr = [3]; - arr.foo = 'bar'; - var obj = [1, 2, arr]; - obj.baz = 'quux'; - obj.index = -1; - t.equal(inspect(obj), '[ 1, 2, [ 3, foo: \'bar\' ], baz: \'quux\', index: -1 ]'); -}); - -test('has', function (t) { - t.plan(1); - t.teardown(mockProperty(Object.prototype, 'hasOwnProperty', { 'delete': true })); - - t.equal(inspect({ a: 1, b: 2 }), '{ a: 1, b: 2 }'); -}); - -test('indexOf seen', function (t) { - t.plan(1); - var xs = [1, 2, 3, {}]; - xs.push(xs); - - var seen = []; - seen.indexOf = undefined; - - t.equal( - inspect(xs, {}, 0, seen), - '[ 1, 2, 3, {}, [Circular] ]' - ); -}); - -test('seen seen', function (t) { - t.plan(1); - var xs = [1, 2, 3]; - - var seen = [xs]; - seen.indexOf = undefined; - - t.equal( - inspect(xs, {}, 0, seen), - '[Circular]' - ); -}); - -test('seen seen seen', function (t) { - t.plan(1); - var xs = [1, 2, 3]; - - var seen = [5, xs]; - seen.indexOf = undefined; - - t.equal( - inspect(xs, {}, 0, seen), - '[Circular]' - ); -}); - -test('symbols', { skip: !hasSymbols }, function (t) { - var sym = Symbol('foo'); - t.equal(inspect(sym), 'Symbol(foo)', 'Symbol("foo") should be "Symbol(foo)"'); - if (typeof sym === 'symbol') { - // Symbol shams are incapable of differentiating boxed from unboxed symbols - t.equal(inspect(Object(sym)), 'Object(Symbol(foo))', 'Object(Symbol("foo")) should be "Object(Symbol(foo))"'); - } - - t.test('toStringTag', { skip: !hasToStringTag }, function (st) { - st.plan(1); - - var faker = {}; - faker[Symbol.toStringTag] = 'Symbol'; - st.equal( - inspect(faker), - '{ [Symbol(Symbol.toStringTag)]: \'Symbol\' }', - 'object lying about being a Symbol inspects as an object' - ); - }); - - t.end(); -}); - -test('Map', { skip: typeof Map !== 'function' }, function (t) { - var map = new Map(); - map.set({ a: 1 }, ['b']); - map.set(3, NaN); - var expectedString = 'Map (2) {' + inspect({ a: 1 }) + ' => ' + inspect(['b']) + ', 3 => NaN}'; - t.equal(inspect(map), expectedString, 'new Map([[{ a: 1 }, ["b"]], [3, NaN]]) should show size and contents'); - t.equal(inspect(new Map()), 'Map (0) {}', 'empty Map should show as empty'); - - var nestedMap = new Map(); - nestedMap.set(nestedMap, map); - t.equal(inspect(nestedMap), 'Map (1) {[Circular] => ' + expectedString + '}', 'Map containing a Map should work'); - - t.end(); -}); - -test('WeakMap', { skip: typeof WeakMap !== 'function' }, function (t) { - var map = new WeakMap(); - map.set({ a: 1 }, ['b']); - var expectedString = 'WeakMap { ? }'; - t.equal(inspect(map), expectedString, 'new WeakMap([[{ a: 1 }, ["b"]]]) should not show size or contents'); - t.equal(inspect(new WeakMap()), 'WeakMap { ? }', 'empty WeakMap should not show as empty'); - - t.end(); -}); - -test('Set', { skip: typeof Set !== 'function' }, function (t) { - var set = new Set(); - set.add({ a: 1 }); - set.add(['b']); - var expectedString = 'Set (2) {' + inspect({ a: 1 }) + ', ' + inspect(['b']) + '}'; - t.equal(inspect(set), expectedString, 'new Set([{ a: 1 }, ["b"]]) should show size and contents'); - t.equal(inspect(new Set()), 'Set (0) {}', 'empty Set should show as empty'); - - var nestedSet = new Set(); - nestedSet.add(set); - nestedSet.add(nestedSet); - t.equal(inspect(nestedSet), 'Set (2) {' + expectedString + ', [Circular]}', 'Set containing a Set should work'); - - t.end(); -}); - -test('WeakSet', { skip: typeof WeakSet !== 'function' }, function (t) { - var map = new WeakSet(); - map.add({ a: 1 }); - var expectedString = 'WeakSet { ? }'; - t.equal(inspect(map), expectedString, 'new WeakSet([{ a: 1 }]) should not show size or contents'); - t.equal(inspect(new WeakSet()), 'WeakSet { ? }', 'empty WeakSet should not show as empty'); - - t.end(); -}); - -test('WeakRef', { skip: typeof WeakRef !== 'function' }, function (t) { - var ref = new WeakRef({ a: 1 }); - var expectedString = 'WeakRef { ? }'; - t.equal(inspect(ref), expectedString, 'new WeakRef({ a: 1 }) should not show contents'); - - t.end(); -}); - -test('FinalizationRegistry', { skip: typeof FinalizationRegistry !== 'function' }, function (t) { - var registry = new FinalizationRegistry(function () {}); - var expectedString = 'FinalizationRegistry [FinalizationRegistry] {}'; - t.equal(inspect(registry), expectedString, 'new FinalizationRegistry(function () {}) should work normallys'); - - t.end(); -}); - -test('Strings', function (t) { - var str = 'abc'; - - t.equal(inspect(str), "'" + str + "'", 'primitive string shows as such'); - t.equal(inspect(str, { quoteStyle: 'single' }), "'" + str + "'", 'primitive string shows as such, single quoted'); - t.equal(inspect(str, { quoteStyle: 'double' }), '"' + str + '"', 'primitive string shows as such, double quoted'); - t.equal(inspect(Object(str)), 'Object(' + inspect(str) + ')', 'String object shows as such'); - t.equal(inspect(Object(str), { quoteStyle: 'single' }), 'Object(' + inspect(str, { quoteStyle: 'single' }) + ')', 'String object shows as such, single quoted'); - t.equal(inspect(Object(str), { quoteStyle: 'double' }), 'Object(' + inspect(str, { quoteStyle: 'double' }) + ')', 'String object shows as such, double quoted'); - - t.end(); -}); - -test('Numbers', function (t) { - var num = 42; - - t.equal(inspect(num), String(num), 'primitive number shows as such'); - t.equal(inspect(Object(num)), 'Object(' + inspect(num) + ')', 'Number object shows as such'); - - t.end(); -}); - -test('Booleans', function (t) { - t.equal(inspect(true), String(true), 'primitive true shows as such'); - t.equal(inspect(Object(true)), 'Object(' + inspect(true) + ')', 'Boolean object true shows as such'); - - t.equal(inspect(false), String(false), 'primitive false shows as such'); - t.equal(inspect(Object(false)), 'Object(' + inspect(false) + ')', 'Boolean false object shows as such'); - - t.end(); -}); - -test('Date', function (t) { - var now = new Date(); - t.equal(inspect(now), String(now), 'Date shows properly'); - t.equal(inspect(new Date(NaN)), 'Invalid Date', 'Invalid Date shows properly'); - - t.end(); -}); - -test('RegExps', function (t) { - t.equal(inspect(/a/g), '/a/g', 'regex shows properly'); - t.equal(inspect(new RegExp('abc', 'i')), '/abc/i', 'new RegExp shows properly'); - - var match = 'abc abc'.match(/[ab]+/); - delete match.groups; // for node < 10 - t.equal(inspect(match), '[ \'ab\', index: 0, input: \'abc abc\' ]', 'RegExp match object shows properly'); - - t.end(); -}); - -test('Proxies', { skip: typeof Proxy !== 'function' || !hasToStringTag }, function (t) { - var target = { proxy: true }; - var fake = new Proxy(target, { has: function () { return false; } }); - - // needed to work around a weird difference in node v6.0 - v6.4 where non-present properties are not logged - var isNode60 = semver.satisfies(process.version, '6.0 - 6.4'); - - forEach([ - 'Boolean', - 'Number', - 'String', - 'Symbol', - 'Date' - ], function (tag) { - target[Symbol.toStringTag] = tag; - - t.equal( - inspect(fake), - '{ ' + (isNode60 ? '' : 'proxy: true, ') + '[Symbol(Symbol.toStringTag)]: \'' + tag + '\' }', - 'Proxy for + ' + tag + ' shows as the target, which has no slots' - ); - }); - - t.end(); -}); - -test('fakers', { skip: !hasToStringTag }, function (t) { - var target = { proxy: false }; - - forEach([ - 'Boolean', - 'Number', - 'String', - 'Symbol', - 'Date' - ], function (tag) { - target[Symbol.toStringTag] = tag; - - t.equal( - inspect(target), - '{ proxy: false, [Symbol(Symbol.toStringTag)]: \'' + tag + '\' }', - 'Object pretending to be ' + tag + ' does not trick us' - ); - }); - - t.end(); -}); diff --git a/node_modules/object-inspect/util.inspect.js b/node_modules/object-inspect/util.inspect.js deleted file mode 100644 index 7784fab..0000000 --- a/node_modules/object-inspect/util.inspect.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('util').inspect; diff --git a/node_modules/opener/LICENSE.txt b/node_modules/opener/LICENSE.txt deleted file mode 100644 index f74bd13..0000000 --- a/node_modules/opener/LICENSE.txt +++ /dev/null @@ -1,47 +0,0 @@ -Dual licensed under WTFPL and MIT: - ---- - -Copyright © 2012–2020 Domenic Denicola - -This work is free. You can redistribute it and/or modify it under the -terms of the Do What The Fuck You Want To Public License, Version 2, -as published by Sam Hocevar. See below for more details. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - ---- - -The MIT License (MIT) - -Copyright © 2012–2020 Domenic Denicola - -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/node_modules/opener/README.md b/node_modules/opener/README.md deleted file mode 100644 index 51cc1a2..0000000 --- a/node_modules/opener/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# It Opens Stuff - -That is, in your desktop environment. This will make *actual windows pop up*, with stuff in them: - -```bash -npm install opener -g - -opener http://google.com -opener ./my-file.txt -opener firefox -opener npm run lint -``` - -Also if you want to use it programmatically you can do that too: - -```js -var opener = require("opener"); - -opener("http://google.com"); -opener("./my-file.txt"); -opener("firefox"); -opener("npm run lint"); -``` - -Plus, it returns the child process created, so you can do things like let your script exit while the window stays open: - -```js -var editor = opener("documentation.odt"); -editor.unref(); -// These other unrefs may be necessary if your OS's opener process -// exits before the process it started is complete. -editor.stdin.unref(); -editor.stdout.unref(); -editor.stderr.unref(); -``` - -## Use It for Good - -Like opening the user's browser with a test harness in your package's test script: - -```json -{ - "scripts": { - "test": "opener ./test/runner.html" - }, - "devDependencies": { - "opener": "*" - } -} -``` - -## Why - -Because Windows has `start`, Macs have `open`, and *nix has `xdg-open`. At least [according to some person on StackOverflow](http://stackoverflow.com/q/1480971/3191). And I like things that work on all three. Like Node.js. And Opener. diff --git a/node_modules/opener/bin/opener-bin.js b/node_modules/opener/bin/opener-bin.js deleted file mode 100644 index a051ea8..0000000 --- a/node_modules/opener/bin/opener-bin.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -"use strict"; - -var opener = require(".."); - -opener(process.argv.slice(2), function (error) { - if (error) { - throw error; - } -}); diff --git a/node_modules/opener/lib/opener.js b/node_modules/opener/lib/opener.js deleted file mode 100644 index 08888c6..0000000 --- a/node_modules/opener/lib/opener.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -var childProcess = require("child_process"); -var os = require("os"); - -module.exports = function opener(args, options, callback) { - var platform = process.platform; - - // Attempt to detect Windows Subystem for Linux (WSL). WSL itself as Linux (which works in most cases), but in - // this specific case we need to treat it as actually being Windows. The "Windows-way" of opening things through - // cmd.exe works just fine here, whereas using xdg-open does not, since there is no X Windows in WSL. - if (platform === "linux" && os.release().indexOf("Microsoft") !== -1) { - platform = "win32"; - } - - // http://stackoverflow.com/q/1480971/3191, but see below for Windows. - var command; - switch (platform) { - case "win32": { - command = "cmd.exe"; - break; - } - case "darwin": { - command = "open"; - break; - } - default: { - command = "xdg-open"; - break; - } - } - - if (typeof args === "string") { - args = [args]; - } - - if (typeof options === "function") { - callback = options; - options = {}; - } - - if (options && typeof options === "object" && options.command) { - if (platform === "win32") { - // *always* use cmd on windows - args = [options.command].concat(args); - } else { - command = options.command; - } - } - - if (platform === "win32") { - // On Windows, we really want to use the "start" command. But, the rules regarding arguments with spaces, and - // escaping them with quotes, can get really arcane. So the easiest way to deal with this is to pass off the - // responsibility to "cmd /c", which has that logic built in. - // - // Furthermore, if "cmd /c" double-quoted the first parameter, then "start" will interpret it as a window title, - // so we need to add a dummy empty-string window title: http://stackoverflow.com/a/154090/3191 - // - // Additionally, on Windows ampersand and caret need to be escaped when passed to "start" - args = args.map(function (value) { - return value.replace(/[&^]/g, "^$&"); - }); - args = ["/c", "start", "\"\""].concat(args); - } - - return childProcess.execFile(command, args, options, callback); -}; diff --git a/node_modules/opener/package.json b/node_modules/opener/package.json deleted file mode 100644 index 0af377d..0000000 --- a/node_modules/opener/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "opener", - "description": "Opens stuff, like webpages and files and executables, cross-platform", - "version": "1.5.2", - "author": "Domenic Denicola (https://domenic.me/)", - "license": "(WTFPL OR MIT)", - "repository": "domenic/opener", - "main": "lib/opener.js", - "bin": "bin/opener-bin.js", - "files": [ - "lib/", - "bin/" - ], - "scripts": { - "lint": "eslint ." - }, - "devDependencies": { - "eslint": "^7.7.0" - } -} diff --git a/node_modules/picocolors/LICENSE b/node_modules/picocolors/LICENSE deleted file mode 100644 index 46c9b95..0000000 --- a/node_modules/picocolors/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -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. diff --git a/node_modules/picocolors/README.md b/node_modules/picocolors/README.md deleted file mode 100644 index 8e47aa8..0000000 --- a/node_modules/picocolors/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# picocolors - -The tiniest and the fastest library for terminal output formatting with ANSI colors. - -```javascript -import pc from "picocolors" - -console.log( - pc.green(`How are ${pc.italic(`you`)} doing?`) -) -``` - -- **No dependencies.** -- **14 times** smaller and **2 times** faster than chalk. -- Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist. -- Node.js v6+ & browsers support. Support for both CJS and ESM projects. -- TypeScript type declarations included. -- [`NO_COLOR`](https://no-color.org/) friendly. - -## Docs -Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub. diff --git a/node_modules/picocolors/package.json b/node_modules/picocolors/package.json deleted file mode 100644 index 372d4b6..0000000 --- a/node_modules/picocolors/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "picocolors", - "version": "1.1.1", - "main": "./picocolors.js", - "types": "./picocolors.d.ts", - "browser": { - "./picocolors.js": "./picocolors.browser.js" - }, - "sideEffects": false, - "description": "The tiniest and the fastest library for terminal output formatting with ANSI colors", - "files": [ - "picocolors.*", - "types.d.ts" - ], - "keywords": [ - "terminal", - "colors", - "formatting", - "cli", - "console" - ], - "author": "Alexey Raspopov", - "repository": "alexeyraspopov/picocolors", - "license": "ISC" -} diff --git a/node_modules/picocolors/picocolors.browser.js b/node_modules/picocolors/picocolors.browser.js deleted file mode 100644 index 9dcf637..0000000 --- a/node_modules/picocolors/picocolors.browser.js +++ /dev/null @@ -1,4 +0,0 @@ -var x=String; -var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}}; -module.exports=create(); -module.exports.createColors = create; diff --git a/node_modules/picocolors/picocolors.d.ts b/node_modules/picocolors/picocolors.d.ts deleted file mode 100644 index 94e146a..0000000 --- a/node_modules/picocolors/picocolors.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Colors } from "./types" - -declare const picocolors: Colors & { createColors: (enabled?: boolean) => Colors } - -export = picocolors diff --git a/node_modules/picocolors/picocolors.js b/node_modules/picocolors/picocolors.js deleted file mode 100644 index e32df85..0000000 --- a/node_modules/picocolors/picocolors.js +++ /dev/null @@ -1,75 +0,0 @@ -let p = process || {}, argv = p.argv || [], env = p.env || {} -let isColorSupported = - !(!!env.NO_COLOR || argv.includes("--no-color")) && - (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI) - -let formatter = (open, close, replace = open) => - input => { - let string = "" + input, index = string.indexOf(close, open.length) - return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close - } - -let replaceClose = (string, close, replace, index) => { - let result = "", cursor = 0 - do { - result += string.substring(cursor, index) + replace - cursor = index + close.length - index = string.indexOf(close, cursor) - } while (~index) - return result + string.substring(cursor) -} - -let createColors = (enabled = isColorSupported) => { - let f = enabled ? formatter : () => String - return { - isColorSupported: enabled, - reset: f("\x1b[0m", "\x1b[0m"), - bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"), - dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"), - italic: f("\x1b[3m", "\x1b[23m"), - underline: f("\x1b[4m", "\x1b[24m"), - inverse: f("\x1b[7m", "\x1b[27m"), - hidden: f("\x1b[8m", "\x1b[28m"), - strikethrough: f("\x1b[9m", "\x1b[29m"), - - black: f("\x1b[30m", "\x1b[39m"), - red: f("\x1b[31m", "\x1b[39m"), - green: f("\x1b[32m", "\x1b[39m"), - yellow: f("\x1b[33m", "\x1b[39m"), - blue: f("\x1b[34m", "\x1b[39m"), - magenta: f("\x1b[35m", "\x1b[39m"), - cyan: f("\x1b[36m", "\x1b[39m"), - white: f("\x1b[37m", "\x1b[39m"), - gray: f("\x1b[90m", "\x1b[39m"), - - bgBlack: f("\x1b[40m", "\x1b[49m"), - bgRed: f("\x1b[41m", "\x1b[49m"), - bgGreen: f("\x1b[42m", "\x1b[49m"), - bgYellow: f("\x1b[43m", "\x1b[49m"), - bgBlue: f("\x1b[44m", "\x1b[49m"), - bgMagenta: f("\x1b[45m", "\x1b[49m"), - bgCyan: f("\x1b[46m", "\x1b[49m"), - bgWhite: f("\x1b[47m", "\x1b[49m"), - - blackBright: f("\x1b[90m", "\x1b[39m"), - redBright: f("\x1b[91m", "\x1b[39m"), - greenBright: f("\x1b[92m", "\x1b[39m"), - yellowBright: f("\x1b[93m", "\x1b[39m"), - blueBright: f("\x1b[94m", "\x1b[39m"), - magentaBright: f("\x1b[95m", "\x1b[39m"), - cyanBright: f("\x1b[96m", "\x1b[39m"), - whiteBright: f("\x1b[97m", "\x1b[39m"), - - bgBlackBright: f("\x1b[100m", "\x1b[49m"), - bgRedBright: f("\x1b[101m", "\x1b[49m"), - bgGreenBright: f("\x1b[102m", "\x1b[49m"), - bgYellowBright: f("\x1b[103m", "\x1b[49m"), - bgBlueBright: f("\x1b[104m", "\x1b[49m"), - bgMagentaBright: f("\x1b[105m", "\x1b[49m"), - bgCyanBright: f("\x1b[106m", "\x1b[49m"), - bgWhiteBright: f("\x1b[107m", "\x1b[49m"), - } -} - -module.exports = createColors() -module.exports.createColors = createColors diff --git a/node_modules/picocolors/types.d.ts b/node_modules/picocolors/types.d.ts deleted file mode 100644 index cd1aec4..0000000 --- a/node_modules/picocolors/types.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -export type Formatter = (input: string | number | null | undefined) => string - -export interface Colors { - isColorSupported: boolean - - reset: Formatter - bold: Formatter - dim: Formatter - italic: Formatter - underline: Formatter - inverse: Formatter - hidden: Formatter - strikethrough: Formatter - - black: Formatter - red: Formatter - green: Formatter - yellow: Formatter - blue: Formatter - magenta: Formatter - cyan: Formatter - white: Formatter - gray: Formatter - - bgBlack: Formatter - bgRed: Formatter - bgGreen: Formatter - bgYellow: Formatter - bgBlue: Formatter - bgMagenta: Formatter - bgCyan: Formatter - bgWhite: Formatter - - blackBright: Formatter - redBright: Formatter - greenBright: Formatter - yellowBright: Formatter - blueBright: Formatter - magentaBright: Formatter - cyanBright: Formatter - whiteBright: Formatter - - bgBlackBright: Formatter - bgRedBright: Formatter - bgGreenBright: Formatter - bgYellowBright: Formatter - bgBlueBright: Formatter - bgMagentaBright: Formatter - bgCyanBright: Formatter - bgWhiteBright: Formatter -} diff --git a/node_modules/portfinder/LICENSE b/node_modules/portfinder/LICENSE deleted file mode 100644 index d26f4a2..0000000 --- a/node_modules/portfinder/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -node-portfinder - -Copyright (c) 2012 Charlie Robbins - -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. \ No newline at end of file diff --git a/node_modules/portfinder/README.md b/node_modules/portfinder/README.md deleted file mode 100644 index a6a9d8d..0000000 --- a/node_modules/portfinder/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# node-portfinder [![CI](https://github.com/http-party/node-portfinder/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/http-party/node-portfinder/actions/workflows/ci.yml) - -## Installation - -``` bash - $ npm install portfinder -``` - -## Usage -The `portfinder` module has a simple interface: - -``` js - var portfinder = require('portfinder'); - - portfinder.getPort(function (err, port) { - // - // `port` is guaranteed to be a free port - // in this scope. - // - }); -``` - -Or with promise (if `Promise`s are supported) : - -``` js - const portfinder = require('portfinder'); - - portfinder.getPortPromise() - .then((port) => { - // - // `port` is guaranteed to be a free port - // in this scope. - // - }) - .catch((err) => { - // - // Could not get a free port, `err` contains the reason. - // - }); -``` - -If `portfinder.getPortPromise()` is called on a Node version without Promise (<4), it will throw an Error unless [Bluebird](http://bluebirdjs.com/docs/getting-started.html) or any Promise pollyfill is used. - -### Ports search scope - -By default `portfinder` will start searching from `8000` and scan until maximum port number (`65535`) is reached. - -You can change this globally by setting: - -```js -portfinder.setBasePort(3000); // default: 8000 -portfinder.setHighestPort(3333); // default: 65535 -``` - -or by passing optional options object on each invocation: - -```js -portfinder.getPort({ - port: 3000, // minimum port - stopPort: 3333 // maximum port -}, callback); -``` - -## Run Tests -``` bash - $ npm test -``` - -#### Author: [Charlie Robbins][0] -#### Author/Maintainer: [Erik Trom][1] -#### License: MIT/X11 -[0]: http://nodejitsu.com -[1]: https://github.com/eriktrom diff --git a/node_modules/portfinder/lib/portfinder.d.ts b/node_modules/portfinder/lib/portfinder.d.ts deleted file mode 100644 index a57b999..0000000 --- a/node_modules/portfinder/lib/portfinder.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * portfinder.js typescript definitions. - * - * (C) 2011, Charlie Robbins - */ - -type PortfinderCallback = (err: Error, port: number) => void; - -interface PortFinderOptions { - /** - * Host to find available port on. - */ - host?: string; - /** - * search start port (equals to port when not provided) - * This exists because getPort and getPortPromise mutates port state in - * recursive calls and doesn't have a way to retrieve begininng port while - * searching. - */ - startPort?: number; - /** - * Minimum port (takes precedence over `basePort`). - */ - port?: number; - /** - * Maximum port - */ - stopPort?: number; -} - -/** - * The lowest port to begin any port search from. - */ -export let basePort: number; - -/** - * Set the lowest port to begin any port search from. - */ -export function setBasePort(port: number): void; - -/** - * The highest port to end any port search from. - */ -export let highestPort: number; - -/** - * Set the higheset port to end any port search from. - */ -export function setHighestPort(port: number): void; - -/** - * Responds with a unbound port on the current machine. - */ -export function getPort(callback: PortfinderCallback): void; -export function getPort(options: PortFinderOptions, callback: PortfinderCallback): void; - -export function getPorts(count: number, options: PortFinderOptions, callback: (err: Error, ports: Array) => void): void; - -/** - * Responds a promise of an unbound port on the current machine. - */ -export function getPortPromise(options?: PortFinderOptions): Promise; diff --git a/node_modules/portfinder/lib/portfinder.js b/node_modules/portfinder/lib/portfinder.js deleted file mode 100644 index 2bc65e2..0000000 --- a/node_modules/portfinder/lib/portfinder.js +++ /dev/null @@ -1,503 +0,0 @@ -/* - * portfinder.js: A simple tool to find an open port on the current machine. - * - * (C) 2011, Charlie Robbins - * - */ - -"use strict"; - -var fs = require('fs'), - os = require('os'), - net = require('net'), - path = require('path'), - _async = require('async'), - debug = require('debug'), - mkdirp = require('mkdirp').mkdirp; - -var debugTestPort = debug('portfinder:testPort'), - debugGetPort = debug('portfinder:getPort'), - debugDefaultHosts = debug('portfinder:defaultHosts'); - -var internals = {}; - -internals.testPort = function(options, callback) { - if (!callback) { - callback = options; - options = {}; - } - - options.server = options.server || net.createServer(function () { - // - // Create an empty listener for the port testing server. - // - }); - - debugTestPort("entered testPort(): trying", options.host, "port", options.port); - - function onListen () { - debugTestPort("done w/ testPort(): OK", options.host, "port", options.port); - - options.server.removeListener('error', onError); - options.server.close(); - callback(null, options.port); - } - - function onError (err) { - debugTestPort("done w/ testPort(): failed", options.host, "w/ port", options.port, "with error", err.code); - - options.server.removeListener('listening', onListen); - - if (!(err.code == 'EADDRINUSE' || err.code == 'EACCES')) { - return callback(err); - } - - var nextPort = exports.nextPort(options.port); - - if (nextPort > exports.highestPort) { - return callback(new Error('No open ports available')); - } - - internals.testPort({ - port: nextPort, - host: options.host, - server: options.server - }, callback); - } - - options.server.once('error', onError); - options.server.once('listening', onListen); - - if (options.host) { - options.server.listen(options.port, options.host); - } else { - /* - Judgement of service without host - example: - express().listen(options.port) - */ - options.server.listen(options.port); - } -}; - -// -// ### @basePort {Number} -// The lowest port to begin any port search from -// -exports.basePort = 8000; - -// -// ### function setBasePort (port) -// #### @port {Number} The new base port -// -exports.setBasePort = function (port) { - exports.basePort = port; -} - -// -// ### @highestPort {Number} -// Largest port number is an unsigned short 2**16 -1=65335 -// -exports.highestPort = 65535; - -// -// ### function setHighestPort (port) -// #### @port {Number} The new highest port -// -exports.setHighestPort = function (port) { - exports.highestPort = port; -} - -// -// ### @basePath {string} -// Default path to begin any socket search from -// -exports.basePath = '/tmp/portfinder' - -// -// ### function getPort (options, callback) -// #### @options {Object} Settings to use when finding the necessary port -// #### @callback {function} Continuation to respond to when complete. -// Responds with a unbound port on the current machine. -// -exports.getPort = function (options, callback) { - if (!callback) { - callback = options; - options = {}; - - } - - options.port = Number(options.port) || Number(exports.basePort); - options.host = options.host || null; - options.stopPort = Number(options.stopPort) || Number(exports.highestPort); - - if(!options.startPort) { - options.startPort = Number(options.port); - if(options.startPort < 0) { - throw Error('Provided options.startPort(' + options.startPort + ') is less than 0, which are cannot be bound.'); - } - if(options.stopPort < options.startPort) { - throw Error('Provided options.stopPort(' + options.stopPort + 'is less than options.startPort (' + options.startPort + ')'); - } - } - - if (options.host) { - if (exports._defaultHosts.indexOf(options.host) !== -1) { - exports._defaultHosts.push(options.host) - } - } - - var openPorts = [], currentHost; - return _async.eachSeries(exports._defaultHosts, function(host, next) { - debugGetPort("in eachSeries() iteration callback: host is", host); - - return internals.testPort({ host: host, port: options.port }, function(err, port) { - if (err) { - debugGetPort("in eachSeries() iteration callback testPort() callback", "with an err:", err.code); - currentHost = host; - return next(err); - } else { - debugGetPort("in eachSeries() iteration callback testPort() callback", - "with a success for port", port); - openPorts.push(port); - return next(); - } - }); - }, function(err) { - - if (err) { - debugGetPort("in eachSeries() result callback: err is", err); - // If we get EADDRNOTAVAIL it means the host is not bindable, so remove it - // from exports._defaultHosts and start over. For ubuntu, we use EINVAL for the same - if (err.code === 'EADDRNOTAVAIL' || err.code === 'EINVAL') { - if (options.host === currentHost) { - // if bad address matches host given by user, tell them - // - // NOTE: We may need to one day handle `my-non-existent-host.local` if users - // report frustration with passing in hostnames that DONT map to bindable - // hosts, without showing them a good error. - var msg = 'Provided host ' + options.host + ' could NOT be bound. Please provide a different host address or hostname'; - return callback(Error(msg)); - } else { - var idx = exports._defaultHosts.indexOf(currentHost); - exports._defaultHosts.splice(idx, 1); - return exports.getPort(options, callback); - } - } else { - // error is not accounted for, file ticket, handle special case - return callback(err); - } - } - - // sort so we can compare first host to last host - openPorts.sort(function(a, b) { - return a - b; - }); - - debugGetPort("in eachSeries() result callback: openPorts is", openPorts); - - if (openPorts[0] === openPorts[openPorts.length-1]) { - // if first === last, we found an open port - if(openPorts[0] <= options.stopPort) { - return callback(null, openPorts[0]); - } - else { - var msg = 'No open ports found in between '+ options.startPort + ' and ' + options.stopPort; - return callback(Error(msg)); - } - } else { - // otherwise, try again, using sorted port, aka, highest open for >= 1 host - return exports.getPort({ port: openPorts.pop(), host: options.host, startPort: options.startPort, stopPort: options.stopPort }, callback); - } - - }); -}; - -// -// ### function getPortPromise (options) -// #### @options {Object} Settings to use when finding the necessary port -// Responds a promise to an unbound port on the current machine. -// -exports.getPortPromise = function (options) { - if (typeof Promise !== 'function') { - throw Error('Native promise support is not available in this version of node.' + - 'Please install a polyfill and assign Promise to global.Promise before calling this method'); - } - if (!options) { - options = {}; - } - return new Promise(function(resolve, reject) { - exports.getPort(options, function(err, port) { - if (err) { - return reject(err); - } - resolve(port); - }); - }); -} - -// -// ### function getPorts (count, options, callback) -// #### @count {Number} The number of ports to find -// #### @options {Object} Settings to use when finding the necessary port -// #### @callback {function} Continuation to respond to when complete. -// Responds with an array of unbound ports on the current machine. -// -exports.getPorts = function (count, options, callback) { - if (!callback) { - callback = options; - options = {}; - } - - var lastPort = null; - _async.timesSeries(count, function(index, asyncCallback) { - if (lastPort) { - options.port = exports.nextPort(lastPort); - } - - exports.getPort(options, function (err, port) { - if (err) { - asyncCallback(err); - } else { - lastPort = port; - asyncCallback(null, port); - } - }); - }, callback); -}; - -// -// ### function getSocket (options, callback) -// #### @options {Object} Settings to use when finding the necessary port -// #### @callback {function} Continuation to respond to when complete. -// Responds with a unbound socket using the specified directory and base -// name on the current machine. -// -exports.getSocket = function (options, callback) { - if (!callback) { - callback = options; - options = {}; - } - - options.mod = options.mod || parseInt(755, 8); - options.path = options.path || exports.basePath + '.sock'; - - // - // Tests the specified socket - // - function testSocket () { - fs.stat(options.path, function (err) { - // - // If file we're checking doesn't exist (thus, stating it emits ENOENT), - // we should be OK with listening on this socket. - // - if (err) { - if (err.code == 'ENOENT') { - callback(null, options.path); - } - else { - callback(err); - } - } - else { - // - // This file exists, so it isn't possible to listen on it. Lets try - // next socket. - // - options.path = exports.nextSocket(options.path); - exports.getSocket(options, callback); - } - }); - } - - // - // Create the target `dir` then test connection - // against the socket. - // - function createAndTestSocket (dir) { - mkdirp(dir, options.mod, function (err) { - if (err) { - return callback(err); - } - - options.exists = true; - testSocket(); - }); - } - - // - // Check if the parent directory of the target - // socket path exists. If it does, test connection - // against the socket. Otherwise, create the directory - // then test connection. - // - function checkAndTestSocket () { - var dir = path.dirname(options.path); - - fs.stat(dir, function (err, stats) { - if (err || !stats.isDirectory()) { - return createAndTestSocket(dir); - } - - options.exists = true; - testSocket(); - }); - } - - // - // If it has been explicitly stated that the - // target `options.path` already exists, then - // simply test the socket. - // - return options.exists - ? testSocket() - : checkAndTestSocket(); -}; - -// -// ### function nextPort (port) -// #### @port {Number} Port to increment from. -// Gets the next port in sequence from the -// specified `port`. -// -exports.nextPort = function (port) { - return port + 1; -}; - -// -// ### function nextSocket (socketPath) -// #### @socketPath {string} Path to increment from -// Gets the next socket path in sequence from the -// specified `socketPath`. -// -exports.nextSocket = function (socketPath) { - var dir = path.dirname(socketPath), - name = path.basename(socketPath, '.sock'), - match = name.match(/^([a-zA-z]+)(\d*)$/i), - index = parseInt(match[2]), - base = match[1]; - if (isNaN(index)) { - index = 0; - } - - index += 1; - return path.join(dir, base + index + '.sock'); -}; - -/** - * @desc List of internal hostnames provided by your machine. A user - * provided hostname may also be provided when calling portfinder.getPort, - * which would then be added to the default hosts we lookup and return here. - * - * @return {array} - * - * Long Form Explantion: - * - * - Input: (os.networkInterfaces() w/ MacOS 10.11.5+ and running a VM) - * - * { lo0: - * [ { address: '::1', - * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', - * family: 'IPv6', - * mac: '00:00:00:00:00:00', - * scopeid: 0, - * internal: true }, - * { address: '127.0.0.1', - * netmask: '255.0.0.0', - * family: 'IPv4', - * mac: '00:00:00:00:00:00', - * internal: true }, - * { address: 'fe80::1', - * netmask: 'ffff:ffff:ffff:ffff::', - * family: 'IPv6', - * mac: '00:00:00:00:00:00', - * scopeid: 1, - * internal: true } ], - * en0: - * [ { address: 'fe80::a299:9bff:fe17:766d', - * netmask: 'ffff:ffff:ffff:ffff::', - * family: 'IPv6', - * mac: 'a0:99:9b:17:76:6d', - * scopeid: 4, - * internal: false }, - * { address: '10.0.1.22', - * netmask: '255.255.255.0', - * family: 'IPv4', - * mac: 'a0:99:9b:17:76:6d', - * internal: false } ], - * awdl0: - * [ { address: 'fe80::48a8:37ff:fe34:aaef', - * netmask: 'ffff:ffff:ffff:ffff::', - * family: 'IPv6', - * mac: '4a:a8:37:34:aa:ef', - * scopeid: 8, - * internal: false } ], - * vnic0: - * [ { address: '10.211.55.2', - * netmask: '255.255.255.0', - * family: 'IPv4', - * mac: '00:1c:42:00:00:08', - * internal: false } ], - * vnic1: - * [ { address: '10.37.129.2', - * netmask: '255.255.255.0', - * family: 'IPv4', - * mac: '00:1c:42:00:00:09', - * internal: false } ] } - * - * - Output: - * - * [ - * '0.0.0.0', - * '::1', - * '127.0.0.1', - * 'fe80::1', - * '10.0.1.22', - * 'fe80::48a8:37ff:fe34:aaef', - * '10.211.55.2', - * '10.37.129.2' - * ] - * - * Note we export this so we can use it in our tests, otherwise this API is private - */ -exports._defaultHosts = (function() { - var interfaces = {}; - try{ - interfaces = os.networkInterfaces(); - } - catch(e) { - // As of October 2016, Windows Subsystem for Linux (WSL) does not support - // the os.networkInterfaces() call and throws instead. For this platform, - // assume 0.0.0.0 as the only address - // - // - https://github.com/Microsoft/BashOnWindows/issues/468 - // - // - Workaround is a mix of good work from the community: - // - https://github.com/http-party/node-portfinder/commit/8d7e30a648ff5034186551fa8a6652669dec2f2f - // - https://github.com/yarnpkg/yarn/pull/772/files - if (e.syscall === 'uv_interface_addresses') { - // swallow error because we're just going to use defaults - // documented @ https://github.com/nodejs/node/blob/4b65a65e75f48ff447cabd5500ce115fb5ad4c57/doc/api/net.md#L231 - } else { - throw e; - } - } - - var interfaceNames = Object.keys(interfaces), - hiddenButImportantHost = '0.0.0.0', // !important - dont remove, hence the naming :) - results = [hiddenButImportantHost]; - for (var i = 0; i < interfaceNames.length; i++) { - var _interface = interfaces[interfaceNames[i]]; - for (var j = 0; j < _interface.length; j++) { - var curr = _interface[j]; - results.push(curr.address); - } - } - - // add null value, For createServer function, do not use host. - results.push(null); - - debugDefaultHosts("exports._defaultHosts is: %o", results); - - return results; -}()); diff --git a/node_modules/portfinder/package.json b/node_modules/portfinder/package.json deleted file mode 100644 index 0893684..0000000 --- a/node_modules/portfinder/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "portfinder", - "description": "A simple tool to find an open port on the current machine", - "version": "1.0.32", - "author": "Charlie Robbins ", - "repository": { - "type": "git", - "url": "git@github.com:http-party/node-portfinder.git" - }, - "keywords": [ - "http", - "ports", - "utilities" - ], - "files": [ - "lib" - ], - "dependencies": { - "async": "^2.6.4", - "debug": "^3.2.7", - "mkdirp": "^0.5.6" - }, - "devDependencies": { - "vows": "^0.8.3" - }, - "main": "./lib/portfinder", - "types": "./lib/portfinder.d.ts", - "scripts": { - "test": "vows test/*-test.js --spec" - }, - "engines": { - "node": ">= 0.12.0" - }, - "license": "MIT" -} diff --git a/node_modules/postcss/LICENSE b/node_modules/postcss/LICENSE deleted file mode 100644 index da057b4..0000000 --- a/node_modules/postcss/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright 2013 Andrey Sitnik - -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/node_modules/postcss/README.md b/node_modules/postcss/README.md deleted file mode 100644 index 939a802..0000000 --- a/node_modules/postcss/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# PostCSS - -Philosopher’s stone, logo of PostCSS - -PostCSS is a tool for transforming styles with JS plugins. -These plugins can lint your CSS, support variables and mixins, -transpile future CSS syntax, inline images, and more. - -PostCSS is used by industry leaders including Wikipedia, Twitter, Alibaba, -and JetBrains. The [Autoprefixer] and [Stylelint] PostCSS plugins is one of the most popular CSS tools. - ---- - -  Made at Evil Martians, product consulting for developer tools. - ---- - -[Abstract Syntax Tree]: https://en.wikipedia.org/wiki/Abstract_syntax_tree -[Evil Martians]: https://evilmartians.com/?utm_source=postcss -[Autoprefixer]: https://github.com/postcss/autoprefixer -[Stylelint]: https://stylelint.io/ -[plugins]: https://github.com/postcss/postcss#plugins - - -## Docs -Read full docs **[here](https://postcss.org/)**. diff --git a/node_modules/postcss/lib/at-rule.d.ts b/node_modules/postcss/lib/at-rule.d.ts deleted file mode 100644 index b2a0e0f..0000000 --- a/node_modules/postcss/lib/at-rule.d.ts +++ /dev/null @@ -1,140 +0,0 @@ -import Container, { - ContainerProps, - ContainerWithChildren -} from './container.js' - -declare namespace AtRule { - export interface AtRuleRaws extends Record { - /** - * The space symbols after the last child of the node to the end of the node. - */ - after?: string - - /** - * The space between the at-rule name and its parameters. - */ - afterName?: string - - /** - * The space symbols before the node. It also stores `*` - * and `_` symbols before the declaration (IE hack). - */ - before?: string - - /** - * The symbols between the last parameter and `{` for rules. - */ - between?: string - - /** - * The rule’s selector with comments. - */ - params?: { - raw: string - value: string - } - - /** - * Contains `true` if the last child has an (optional) semicolon. - */ - semicolon?: boolean - } - - export interface AtRuleProps extends ContainerProps { - /** Name of the at-rule. */ - name: string - /** Parameters following the name of the at-rule. */ - params?: number | string - /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ - raws?: AtRuleRaws - } - - // eslint-disable-next-line @typescript-eslint/no-use-before-define - export { AtRule_ as default } -} - -/** - * Represents an at-rule. - * - * ```js - * Once (root, { AtRule }) { - * let media = new AtRule({ name: 'media', params: 'print' }) - * media.append(…) - * root.append(media) - * } - * ``` - * - * If it’s followed in the CSS by a `{}` block, this node will have - * a nodes property representing its children. - * - * ```js - * const root = postcss.parse('@charset "UTF-8"; @media print {}') - * - * const charset = root.first - * charset.type //=> 'atrule' - * charset.nodes //=> undefined - * - * const media = root.last - * media.nodes //=> [] - * ``` - */ -declare class AtRule_ extends Container { - /** - * An array containing the layer’s children. - * - * ```js - * const root = postcss.parse('@layer example { a { color: black } }') - * const layer = root.first - * layer.nodes.length //=> 1 - * layer.nodes[0].selector //=> 'a' - * ``` - * - * Can be `undefinded` if the at-rule has no body. - * - * ```js - * const root = postcss.parse('@layer a, b, c;') - * const layer = root.first - * layer.nodes //=> undefined - * ``` - */ - nodes: Container['nodes'] - parent: ContainerWithChildren | undefined - - raws: AtRule.AtRuleRaws - type: 'atrule' - constructor(defaults?: AtRule.AtRuleProps) - assign(overrides: AtRule.AtRuleProps | object): this - - clone(overrides?: Partial): this - - cloneAfter(overrides?: Partial): this - - cloneBefore(overrides?: Partial): this - /** - * The at-rule’s name immediately follows the `@`. - * - * ```js - * const root = postcss.parse('@media print {}') - * const media = root.first - * media.name //=> 'media' - * ``` - */ - get name(): string - set name(value: string) - /** - * The at-rule’s parameters, the values that follow the at-rule’s name - * but precede any `{}` block. - * - * ```js - * const root = postcss.parse('@media print, screen {}') - * const media = root.first - * media.params //=> 'print, screen' - * ``` - */ - get params(): string - set params(value: string) -} - -declare class AtRule extends AtRule_ {} - -export = AtRule diff --git a/node_modules/postcss/lib/at-rule.js b/node_modules/postcss/lib/at-rule.js deleted file mode 100644 index 9486447..0000000 --- a/node_modules/postcss/lib/at-rule.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict' - -let Container = require('./container') - -class AtRule extends Container { - constructor(defaults) { - super(defaults) - this.type = 'atrule' - } - - append(...children) { - if (!this.proxyOf.nodes) this.nodes = [] - return super.append(...children) - } - - prepend(...children) { - if (!this.proxyOf.nodes) this.nodes = [] - return super.prepend(...children) - } -} - -module.exports = AtRule -AtRule.default = AtRule - -Container.registerAtRule(AtRule) diff --git a/node_modules/postcss/lib/comment.d.ts b/node_modules/postcss/lib/comment.d.ts deleted file mode 100644 index 2b1a156..0000000 --- a/node_modules/postcss/lib/comment.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import Container from './container.js' -import Node, { NodeProps } from './node.js' - -declare namespace Comment { - export interface CommentRaws extends Record { - /** - * The space symbols before the node. - */ - before?: string - - /** - * The space symbols between `/*` and the comment’s text. - */ - left?: string - - /** - * The space symbols between the comment’s text. - */ - right?: string - } - - export interface CommentProps extends NodeProps { - /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ - raws?: CommentRaws - /** Content of the comment. */ - text: string - } - - // eslint-disable-next-line @typescript-eslint/no-use-before-define - export { Comment_ as default } -} - -/** - * It represents a class that handles - * [CSS comments](https://developer.mozilla.org/en-US/docs/Web/CSS/Comments) - * - * ```js - * Once (root, { Comment }) { - * const note = new Comment({ text: 'Note: …' }) - * root.append(note) - * } - * ``` - * - * Remember that CSS comments inside selectors, at-rule parameters, - * or declaration values will be stored in the `raws` properties - * explained above. - */ -declare class Comment_ extends Node { - parent: Container | undefined - raws: Comment.CommentRaws - type: 'comment' - constructor(defaults?: Comment.CommentProps) - - assign(overrides: Comment.CommentProps | object): this - - clone(overrides?: Partial): this - cloneAfter(overrides?: Partial): this - cloneBefore(overrides?: Partial): this - /** - * The comment's text. - */ - get text(): string - set text(value: string) -} - -declare class Comment extends Comment_ {} - -export = Comment diff --git a/node_modules/postcss/lib/comment.js b/node_modules/postcss/lib/comment.js deleted file mode 100644 index c566506..0000000 --- a/node_modules/postcss/lib/comment.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' - -let Node = require('./node') - -class Comment extends Node { - constructor(defaults) { - super(defaults) - this.type = 'comment' - } -} - -module.exports = Comment -Comment.default = Comment diff --git a/node_modules/postcss/lib/container.d.ts b/node_modules/postcss/lib/container.d.ts deleted file mode 100644 index 692bd69..0000000 --- a/node_modules/postcss/lib/container.d.ts +++ /dev/null @@ -1,483 +0,0 @@ -import AtRule from './at-rule.js' -import Comment from './comment.js' -import Declaration from './declaration.js' -import Node, { ChildNode, ChildProps, NodeProps } from './node.js' -import Rule from './rule.js' - -declare namespace Container { - export class ContainerWithChildren< - Child extends Node = ChildNode - > extends Container_ { - nodes: Child[] - } - - export interface ValueOptions { - /** - * String that’s used to narrow down values and speed up the regexp search. - */ - fast?: string - - /** - * An array of property names. - */ - props?: readonly string[] - } - - export interface ContainerProps extends NodeProps { - nodes?: readonly (ChildProps | Node)[] - } - - /** - * All types that can be passed into container methods to create or add a new - * child node. - */ - export type NewChild = - | ChildProps - | Node - | readonly ChildProps[] - | readonly Node[] - | readonly string[] - | string - | undefined - - // eslint-disable-next-line @typescript-eslint/no-use-before-define - export { Container_ as default } -} - -/** - * The `Root`, `AtRule`, and `Rule` container nodes - * inherit some common methods to help work with their children. - * - * Note that all containers can store any content. If you write a rule inside - * a rule, PostCSS will parse it. - */ -declare abstract class Container_ extends Node { - /** - * An array containing the container’s children. - * - * ```js - * const root = postcss.parse('a { color: black }') - * root.nodes.length //=> 1 - * root.nodes[0].selector //=> 'a' - * root.nodes[0].nodes[0].prop //=> 'color' - * ``` - */ - nodes: Child[] | undefined - - /** - * An internal method that converts a {@link NewChild} into a list of actual - * child nodes that can then be added to this container. - * - * This ensures that the nodes' parent is set to this container, that they use - * the correct prototype chain, and that they're marked as dirty. - * - * @param mnodes The new node or nodes to add. - * @param sample A node from whose raws the new node's `before` raw should be - * taken. - * @param type This should be set to `'prepend'` if the new nodes will be - * inserted at the beginning of the container. - * @hidden - */ - protected normalize( - nodes: Container.NewChild, - sample: Node | undefined, - type?: 'prepend' | false - ): Child[] - - /** - * Inserts new nodes to the end of the container. - * - * ```js - * const decl1 = new Declaration({ prop: 'color', value: 'black' }) - * const decl2 = new Declaration({ prop: 'background-color', value: 'white' }) - * rule.append(decl1, decl2) - * - * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule - * root.append({ selector: 'a' }) // rule - * rule.append({ prop: 'color', value: 'black' }) // declaration - * rule.append({ text: 'Comment' }) // comment - * - * root.append('a {}') - * root.first.append('color: black; z-index: 1') - * ``` - * - * @param nodes New nodes. - * @return This node for methods chain. - */ - append(...nodes: Container.NewChild[]): this - assign(overrides: Container.ContainerProps | object): this - clone(overrides?: Partial): this - cloneAfter(overrides?: Partial): this - - cloneBefore(overrides?: Partial): this - - /** - * Iterates through the container’s immediate children, - * calling `callback` for each child. - * - * Returning `false` in the callback will break iteration. - * - * This method only iterates through the container’s immediate children. - * If you need to recursively iterate through all the container’s descendant - * nodes, use `Container#walk`. - * - * Unlike the for `{}`-cycle or `Array#forEach` this iterator is safe - * if you are mutating the array of child nodes during iteration. - * PostCSS will adjust the current index to match the mutations. - * - * ```js - * const root = postcss.parse('a { color: black; z-index: 1 }') - * const rule = root.first - * - * for (const decl of rule.nodes) { - * decl.cloneBefore({ prop: '-webkit-' + decl.prop }) - * // Cycle will be infinite, because cloneBefore moves the current node - * // to the next index - * } - * - * rule.each(decl => { - * decl.cloneBefore({ prop: '-webkit-' + decl.prop }) - * // Will be executed only for color and z-index - * }) - * ``` - * - * @param callback Iterator receives each node and index. - * @return Returns `false` if iteration was broke. - */ - each( - callback: (node: Child, index: number) => false | void - ): false | undefined - /** - * Returns `true` if callback returns `true` - * for all of the container’s children. - * - * ```js - * const noPrefixes = rule.every(i => i.prop[0] !== '-') - * ``` - * - * @param condition Iterator returns true or false. - * @return Is every child pass condition. - */ - every( - condition: (node: Child, index: number, nodes: Child[]) => boolean - ): boolean - - /** - * Returns a `child`’s index within the `Container#nodes` array. - * - * ```js - * rule.index( rule.nodes[2] ) //=> 2 - * ``` - * - * @param child Child of the current container. - * @return Child index. - */ - index(child: Child | number): number - /** - * Insert new node after old node within the container. - * - * @param oldNode Child or child’s index. - * @param newNode New node. - * @return This node for methods chain. - */ - insertAfter(oldNode: Child | number, newNode: Container.NewChild): this - - /** - * Insert new node before old node within the container. - * - * ```js - * rule.insertBefore(decl, decl.clone({ prop: '-webkit-' + decl.prop })) - * ``` - * - * @param oldNode Child or child’s index. - * @param newNode New node. - * @return This node for methods chain. - */ - insertBefore(oldNode: Child | number, newNode: Container.NewChild): this - - /** - * Traverses the container’s descendant nodes, calling callback - * for each comment node. - * - * Like `Container#each`, this method is safe - * to use if you are mutating arrays during iteration. - * - * ```js - * root.walkComments(comment => { - * comment.remove() - * }) - * ``` - * - * @param callback Iterator receives each node and index. - * @return Returns `false` if iteration was broke. - */ - - /** - * Inserts new nodes to the start of the container. - * - * ```js - * const decl1 = new Declaration({ prop: 'color', value: 'black' }) - * const decl2 = new Declaration({ prop: 'background-color', value: 'white' }) - * rule.prepend(decl1, decl2) - * - * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule - * root.append({ selector: 'a' }) // rule - * rule.append({ prop: 'color', value: 'black' }) // declaration - * rule.append({ text: 'Comment' }) // comment - * - * root.append('a {}') - * root.first.append('color: black; z-index: 1') - * ``` - * - * @param nodes New nodes. - * @return This node for methods chain. - */ - prepend(...nodes: Container.NewChild[]): this - /** - * Add child to the end of the node. - * - * ```js - * rule.push(new Declaration({ prop: 'color', value: 'black' })) - * ``` - * - * @param child New node. - * @return This node for methods chain. - */ - push(child: Child): this - - /** - * Removes all children from the container - * and cleans their parent properties. - * - * ```js - * rule.removeAll() - * rule.nodes.length //=> 0 - * ``` - * - * @return This node for methods chain. - */ - removeAll(): this - - /** - * Removes node from the container and cleans the parent properties - * from the node and its children. - * - * ```js - * rule.nodes.length //=> 5 - * rule.removeChild(decl) - * rule.nodes.length //=> 4 - * decl.parent //=> undefined - * ``` - * - * @param child Child or child’s index. - * @return This node for methods chain. - */ - removeChild(child: Child | number): this - - replaceValues( - pattern: RegExp | string, - replaced: { (substring: string, ...args: any[]): string } | string - ): this - - /** - * Passes all declaration values within the container that match pattern - * through callback, replacing those values with the returned result - * of callback. - * - * This method is useful if you are using a custom unit or function - * and need to iterate through all values. - * - * ```js - * root.replaceValues(/\d+rem/, { fast: 'rem' }, string => { - * return 15 * parseInt(string) + 'px' - * }) - * ``` - * - * @param pattern Replace pattern. - * @param {object} options Options to speed up the search. - * @param replaced String to replace pattern or callback - * that returns a new value. The callback - * will receive the same arguments - * as those passed to a function parameter - * of `String#replace`. - * @return This node for methods chain. - */ - replaceValues( - pattern: RegExp | string, - options: Container.ValueOptions, - replaced: { (substring: string, ...args: any[]): string } | string - ): this - - /** - * Returns `true` if callback returns `true` for (at least) one - * of the container’s children. - * - * ```js - * const hasPrefix = rule.some(i => i.prop[0] === '-') - * ``` - * - * @param condition Iterator returns true or false. - * @return Is some child pass condition. - */ - some( - condition: (node: Child, index: number, nodes: Child[]) => boolean - ): boolean - - /** - * Traverses the container’s descendant nodes, calling callback - * for each node. - * - * Like container.each(), this method is safe to use - * if you are mutating arrays during iteration. - * - * If you only need to iterate through the container’s immediate children, - * use `Container#each`. - * - * ```js - * root.walk(node => { - * // Traverses all descendant nodes. - * }) - * ``` - * - * @param callback Iterator receives each node and index. - * @return Returns `false` if iteration was broke. - */ - walk( - callback: (node: ChildNode, index: number) => false | void - ): false | undefined - - /** - * Traverses the container’s descendant nodes, calling callback - * for each at-rule node. - * - * If you pass a filter, iteration will only happen over at-rules - * that have matching names. - * - * Like `Container#each`, this method is safe - * to use if you are mutating arrays during iteration. - * - * ```js - * root.walkAtRules(rule => { - * if (isOld(rule.name)) rule.remove() - * }) - * - * let first = false - * root.walkAtRules('charset', rule => { - * if (!first) { - * first = true - * } else { - * rule.remove() - * } - * }) - * ``` - * - * @param name String or regular expression to filter at-rules by name. - * @param callback Iterator receives each node and index. - * @return Returns `false` if iteration was broke. - */ - walkAtRules( - nameFilter: RegExp | string, - callback: (atRule: AtRule, index: number) => false | void - ): false | undefined - - walkAtRules( - callback: (atRule: AtRule, index: number) => false | void - ): false | undefined - walkComments( - callback: (comment: Comment, indexed: number) => false | void - ): false | undefined - - walkComments( - callback: (comment: Comment, indexed: number) => false | void - ): false | undefined - - /** - * Traverses the container’s descendant nodes, calling callback - * for each declaration node. - * - * If you pass a filter, iteration will only happen over declarations - * with matching properties. - * - * ```js - * root.walkDecls(decl => { - * checkPropertySupport(decl.prop) - * }) - * - * root.walkDecls('border-radius', decl => { - * decl.remove() - * }) - * - * root.walkDecls(/^background/, decl => { - * decl.value = takeFirstColorFromGradient(decl.value) - * }) - * ``` - * - * Like `Container#each`, this method is safe - * to use if you are mutating arrays during iteration. - * - * @param prop String or regular expression to filter declarations - * by property name. - * @param callback Iterator receives each node and index. - * @return Returns `false` if iteration was broke. - */ - walkDecls( - propFilter: RegExp | string, - callback: (decl: Declaration, index: number) => false | void - ): false | undefined - - walkDecls( - callback: (decl: Declaration, index: number) => false | void - ): false | undefined - - /** - * Traverses the container’s descendant nodes, calling callback - * for each rule node. - * - * If you pass a filter, iteration will only happen over rules - * with matching selectors. - * - * Like `Container#each`, this method is safe - * to use if you are mutating arrays during iteration. - * - * ```js - * const selectors = [] - * root.walkRules(rule => { - * selectors.push(rule.selector) - * }) - * console.log(`Your CSS uses ${ selectors.length } selectors`) - * ``` - * - * @param selector String or regular expression to filter rules by selector. - * @param callback Iterator receives each node and index. - * @return Returns `false` if iteration was broke. - */ - walkRules( - selectorFilter: RegExp | string, - callback: (rule: Rule, index: number) => false | void - ): false | undefined - walkRules( - callback: (rule: Rule, index: number) => false | void - ): false | undefined - /** - * The container’s first child. - * - * ```js - * rule.first === rules.nodes[0] - * ``` - */ - get first(): Child | undefined - /** - * The container’s last child. - * - * ```js - * rule.last === rule.nodes[rule.nodes.length - 1] - * ``` - */ - get last(): Child | undefined -} - -declare class Container< - Child extends Node = ChildNode -> extends Container_ {} - -export = Container diff --git a/node_modules/postcss/lib/container.js b/node_modules/postcss/lib/container.js deleted file mode 100644 index 8b9e1ef..0000000 --- a/node_modules/postcss/lib/container.js +++ /dev/null @@ -1,447 +0,0 @@ -'use strict' - -let Comment = require('./comment') -let Declaration = require('./declaration') -let Node = require('./node') -let { isClean, my } = require('./symbols') - -let AtRule, parse, Root, Rule - -function cleanSource(nodes) { - return nodes.map(i => { - if (i.nodes) i.nodes = cleanSource(i.nodes) - delete i.source - return i - }) -} - -function markTreeDirty(node) { - node[isClean] = false - if (node.proxyOf.nodes) { - for (let i of node.proxyOf.nodes) { - markTreeDirty(i) - } - } -} - -class Container extends Node { - append(...children) { - for (let child of children) { - let nodes = this.normalize(child, this.last) - for (let node of nodes) this.proxyOf.nodes.push(node) - } - - this.markDirty() - - return this - } - - cleanRaws(keepBetween) { - super.cleanRaws(keepBetween) - if (this.nodes) { - for (let node of this.nodes) node.cleanRaws(keepBetween) - } - } - - each(callback) { - if (!this.proxyOf.nodes) return undefined - let iterator = this.getIterator() - - let index, result - while (this.indexes[iterator] < this.proxyOf.nodes.length) { - index = this.indexes[iterator] - result = callback(this.proxyOf.nodes[index], index) - if (result === false) break - - this.indexes[iterator] += 1 - } - - delete this.indexes[iterator] - return result - } - - every(condition) { - return this.nodes.every(condition) - } - - getIterator() { - if (!this.lastEach) this.lastEach = 0 - if (!this.indexes) this.indexes = {} - - this.lastEach += 1 - let iterator = this.lastEach - this.indexes[iterator] = 0 - - return iterator - } - - getProxyProcessor() { - return { - get(node, prop) { - if (prop === 'proxyOf') { - return node - } else if (!node[prop]) { - return node[prop] - } else if ( - prop === 'each' || - (typeof prop === 'string' && prop.startsWith('walk')) - ) { - return (...args) => { - return node[prop]( - ...args.map(i => { - if (typeof i === 'function') { - return (child, index) => i(child.toProxy(), index) - } else { - return i - } - }) - ) - } - } else if (prop === 'every' || prop === 'some') { - return cb => { - return node[prop]((child, ...other) => - cb(child.toProxy(), ...other) - ) - } - } else if (prop === 'root') { - return () => node.root().toProxy() - } else if (prop === 'nodes') { - return node.nodes.map(i => i.toProxy()) - } else if (prop === 'first' || prop === 'last') { - return node[prop].toProxy() - } else { - return node[prop] - } - }, - - set(node, prop, value) { - if (node[prop] === value) return true - node[prop] = value - if (prop === 'name' || prop === 'params' || prop === 'selector') { - node.markDirty() - } - return true - } - } - } - - index(child) { - if (typeof child === 'number') return child - if (child.proxyOf) child = child.proxyOf - return this.proxyOf.nodes.indexOf(child) - } - - insertAfter(exist, add) { - let existIndex = this.index(exist) - let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse() - existIndex = this.index(exist) - for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node) - - let index - for (let id in this.indexes) { - index = this.indexes[id] - if (existIndex < index) { - this.indexes[id] = index + nodes.length - } - } - - this.markDirty() - - return this - } - - insertBefore(exist, add) { - let existIndex = this.index(exist) - let type = existIndex === 0 ? 'prepend' : false - let nodes = this.normalize( - add, - this.proxyOf.nodes[existIndex], - type - ).reverse() - existIndex = this.index(exist) - for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node) - - let index - for (let id in this.indexes) { - index = this.indexes[id] - if (existIndex <= index) { - this.indexes[id] = index + nodes.length - } - } - - this.markDirty() - - return this - } - - normalize(nodes, sample) { - if (typeof nodes === 'string') { - nodes = cleanSource(parse(nodes).nodes) - } else if (typeof nodes === 'undefined') { - nodes = [] - } else if (Array.isArray(nodes)) { - nodes = nodes.slice(0) - for (let i of nodes) { - if (i.parent) i.parent.removeChild(i, 'ignore') - } - } else if (nodes.type === 'root' && this.type !== 'document') { - nodes = nodes.nodes.slice(0) - for (let i of nodes) { - if (i.parent) i.parent.removeChild(i, 'ignore') - } - } else if (nodes.type) { - nodes = [nodes] - } else if (nodes.prop) { - if (typeof nodes.value === 'undefined') { - throw new Error('Value field is missed in node creation') - } else if (typeof nodes.value !== 'string') { - nodes.value = String(nodes.value) - } - nodes = [new Declaration(nodes)] - } else if (nodes.selector || nodes.selectors) { - nodes = [new Rule(nodes)] - } else if (nodes.name) { - nodes = [new AtRule(nodes)] - } else if (nodes.text) { - nodes = [new Comment(nodes)] - } else { - throw new Error('Unknown node type in node creation') - } - - let processed = nodes.map(i => { - /* c8 ignore next */ - if (!i[my]) Container.rebuild(i) - i = i.proxyOf - if (i.parent) i.parent.removeChild(i) - if (i[isClean]) markTreeDirty(i) - - if (!i.raws) i.raws = {} - if (typeof i.raws.before === 'undefined') { - if (sample && typeof sample.raws.before !== 'undefined') { - i.raws.before = sample.raws.before.replace(/\S/g, '') - } - } - i.parent = this.proxyOf - return i - }) - - return processed - } - - prepend(...children) { - children = children.reverse() - for (let child of children) { - let nodes = this.normalize(child, this.first, 'prepend').reverse() - for (let node of nodes) this.proxyOf.nodes.unshift(node) - for (let id in this.indexes) { - this.indexes[id] = this.indexes[id] + nodes.length - } - } - - this.markDirty() - - return this - } - - push(child) { - child.parent = this - this.proxyOf.nodes.push(child) - return this - } - - removeAll() { - for (let node of this.proxyOf.nodes) node.parent = undefined - this.proxyOf.nodes = [] - - this.markDirty() - - return this - } - - removeChild(child) { - child = this.index(child) - this.proxyOf.nodes[child].parent = undefined - this.proxyOf.nodes.splice(child, 1) - - let index - for (let id in this.indexes) { - index = this.indexes[id] - if (index >= child) { - this.indexes[id] = index - 1 - } - } - - this.markDirty() - - return this - } - - replaceValues(pattern, opts, callback) { - if (!callback) { - callback = opts - opts = {} - } - - this.walkDecls(decl => { - if (opts.props && !opts.props.includes(decl.prop)) return - if (opts.fast && !decl.value.includes(opts.fast)) return - - decl.value = decl.value.replace(pattern, callback) - }) - - this.markDirty() - - return this - } - - some(condition) { - return this.nodes.some(condition) - } - - walk(callback) { - return this.each((child, i) => { - let result - try { - result = callback(child, i) - } catch (e) { - throw child.addToError(e) - } - if (result !== false && child.walk) { - result = child.walk(callback) - } - - return result - }) - } - - walkAtRules(name, callback) { - if (!callback) { - callback = name - return this.walk((child, i) => { - if (child.type === 'atrule') { - return callback(child, i) - } - }) - } - if (name instanceof RegExp) { - return this.walk((child, i) => { - if (child.type === 'atrule' && name.test(child.name)) { - return callback(child, i) - } - }) - } - return this.walk((child, i) => { - if (child.type === 'atrule' && child.name === name) { - return callback(child, i) - } - }) - } - - walkComments(callback) { - return this.walk((child, i) => { - if (child.type === 'comment') { - return callback(child, i) - } - }) - } - - walkDecls(prop, callback) { - if (!callback) { - callback = prop - return this.walk((child, i) => { - if (child.type === 'decl') { - return callback(child, i) - } - }) - } - if (prop instanceof RegExp) { - return this.walk((child, i) => { - if (child.type === 'decl' && prop.test(child.prop)) { - return callback(child, i) - } - }) - } - return this.walk((child, i) => { - if (child.type === 'decl' && child.prop === prop) { - return callback(child, i) - } - }) - } - - walkRules(selector, callback) { - if (!callback) { - callback = selector - - return this.walk((child, i) => { - if (child.type === 'rule') { - return callback(child, i) - } - }) - } - if (selector instanceof RegExp) { - return this.walk((child, i) => { - if (child.type === 'rule' && selector.test(child.selector)) { - return callback(child, i) - } - }) - } - return this.walk((child, i) => { - if (child.type === 'rule' && child.selector === selector) { - return callback(child, i) - } - }) - } - - get first() { - if (!this.proxyOf.nodes) return undefined - return this.proxyOf.nodes[0] - } - - get last() { - if (!this.proxyOf.nodes) return undefined - return this.proxyOf.nodes[this.proxyOf.nodes.length - 1] - } -} - -Container.registerParse = dependant => { - parse = dependant -} - -Container.registerRule = dependant => { - Rule = dependant -} - -Container.registerAtRule = dependant => { - AtRule = dependant -} - -Container.registerRoot = dependant => { - Root = dependant -} - -module.exports = Container -Container.default = Container - -/* c8 ignore start */ -Container.rebuild = node => { - if (node.type === 'atrule') { - Object.setPrototypeOf(node, AtRule.prototype) - } else if (node.type === 'rule') { - Object.setPrototypeOf(node, Rule.prototype) - } else if (node.type === 'decl') { - Object.setPrototypeOf(node, Declaration.prototype) - } else if (node.type === 'comment') { - Object.setPrototypeOf(node, Comment.prototype) - } else if (node.type === 'root') { - Object.setPrototypeOf(node, Root.prototype) - } - - node[my] = true - - if (node.nodes) { - node.nodes.forEach(child => { - Container.rebuild(child) - }) - } -} -/* c8 ignore stop */ diff --git a/node_modules/postcss/lib/css-syntax-error.d.ts b/node_modules/postcss/lib/css-syntax-error.d.ts deleted file mode 100644 index e540d84..0000000 --- a/node_modules/postcss/lib/css-syntax-error.d.ts +++ /dev/null @@ -1,248 +0,0 @@ -import { FilePosition } from './input.js' - -declare namespace CssSyntaxError { - /** - * A position that is part of a range. - */ - export interface RangePosition { - /** - * The column number in the input. - */ - column: number - - /** - * The line number in the input. - */ - line: number - } - - // eslint-disable-next-line @typescript-eslint/no-use-before-define - export { CssSyntaxError_ as default } -} - -/** - * The CSS parser throws this error for broken CSS. - * - * Custom parsers can throw this error for broken custom syntax using - * the `Node#error` method. - * - * PostCSS will use the input source map to detect the original error location. - * If you wrote a Sass file, compiled it to CSS and then parsed it with PostCSS, - * PostCSS will show the original position in the Sass file. - * - * If you need the position in the PostCSS input - * (e.g., to debug the previous compiler), use `error.input.file`. - * - * ```js - * // Raising error from plugin - * throw node.error('Unknown variable', { plugin: 'postcss-vars' }) - * ``` - * - * ```js - * // Catching and checking syntax error - * try { - * postcss.parse('a{') - * } catch (error) { - * if (error.name === 'CssSyntaxError') { - * error //=> CssSyntaxError - * } - * } - * ``` - */ -declare class CssSyntaxError_ extends Error { - /** - * Source column of the error. - * - * ```js - * error.column //=> 1 - * error.input.column //=> 4 - * ``` - * - * PostCSS will use the input source map to detect the original location. - * If you need the position in the PostCSS input, use `error.input.column`. - */ - column?: number - - /** - * Source column of the error's end, exclusive. Provided if the error pertains - * to a range. - * - * ```js - * error.endColumn //=> 1 - * error.input.endColumn //=> 4 - * ``` - * - * PostCSS will use the input source map to detect the original location. - * If you need the position in the PostCSS input, use `error.input.endColumn`. - */ - endColumn?: number - - /** - * Source line of the error's end, exclusive. Provided if the error pertains - * to a range. - * - * ```js - * error.endLine //=> 3 - * error.input.endLine //=> 4 - * ``` - * - * PostCSS will use the input source map to detect the original location. - * If you need the position in the PostCSS input, use `error.input.endLine`. - */ - endLine?: number - - /** - * Absolute path to the broken file. - * - * ```js - * error.file //=> 'a.sass' - * error.input.file //=> 'a.css' - * ``` - * - * PostCSS will use the input source map to detect the original location. - * If you need the position in the PostCSS input, use `error.input.file`. - */ - file?: string - - /** - * Input object with PostCSS internal information - * about input file. If input has source map - * from previous tool, PostCSS will use origin - * (for example, Sass) source. You can use this - * object to get PostCSS input source. - * - * ```js - * error.input.file //=> 'a.css' - * error.file //=> 'a.sass' - * ``` - */ - input?: FilePosition - - /** - * Source line of the error. - * - * ```js - * error.line //=> 2 - * error.input.line //=> 4 - * ``` - * - * PostCSS will use the input source map to detect the original location. - * If you need the position in the PostCSS input, use `error.input.line`. - */ - line?: number - - /** - * Full error text in the GNU error format - * with plugin, file, line and column. - * - * ```js - * error.message //=> 'a.css:1:1: Unclosed block' - * ``` - */ - message: string - - /** - * Always equal to `'CssSyntaxError'`. You should always check error type - * by `error.name === 'CssSyntaxError'` - * instead of `error instanceof CssSyntaxError`, - * because npm could have several PostCSS versions. - * - * ```js - * if (error.name === 'CssSyntaxError') { - * error //=> CssSyntaxError - * } - * ``` - */ - name: 'CssSyntaxError' - - /** - * Plugin name, if error came from plugin. - * - * ```js - * error.plugin //=> 'postcss-vars' - * ``` - */ - plugin?: string - - /** - * Error message. - * - * ```js - * error.message //=> 'Unclosed block' - * ``` - */ - reason: string - - /** - * Source code of the broken file. - * - * ```js - * error.source //=> 'a { b {} }' - * error.input.source //=> 'a b { }' - * ``` - */ - source?: string - - stack: string - - /** - * Instantiates a CSS syntax error. Can be instantiated for a single position - * or for a range. - * @param message Error message. - * @param lineOrStartPos If for a single position, the line number, or if for - * a range, the inclusive start position of the error. - * @param columnOrEndPos If for a single position, the column number, or if for - * a range, the exclusive end position of the error. - * @param source Source code of the broken file. - * @param file Absolute path to the broken file. - * @param plugin PostCSS plugin name, if error came from plugin. - */ - constructor( - message: string, - lineOrStartPos?: CssSyntaxError.RangePosition | number, - columnOrEndPos?: CssSyntaxError.RangePosition | number, - source?: string, - file?: string, - plugin?: string - ) - - /** - * Returns a few lines of CSS source that caused the error. - * - * If the CSS has an input source map without `sourceContent`, - * this method will return an empty string. - * - * ```js - * error.showSourceCode() //=> " 4 | } - * // 5 | a { - * // > 6 | bad - * // | ^ - * // 7 | } - * // 8 | b {" - * ``` - * - * @param color Whether arrow will be colored red by terminal - * color codes. By default, PostCSS will detect - * color support by `process.stdout.isTTY` - * and `process.env.NODE_DISABLE_COLORS`. - * @return Few lines of CSS source that caused the error. - */ - showSourceCode(color?: boolean): string - - /** - * Returns error position, message and source code of the broken part. - * - * ```js - * error.toString() //=> "CssSyntaxError: app.css:1:1: Unclosed block - * // > 1 | a { - * // | ^" - * ``` - * - * @return Error position, message and source code. - */ - toString(): string -} - -declare class CssSyntaxError extends CssSyntaxError_ {} - -export = CssSyntaxError diff --git a/node_modules/postcss/lib/css-syntax-error.js b/node_modules/postcss/lib/css-syntax-error.js deleted file mode 100644 index 275a4f6..0000000 --- a/node_modules/postcss/lib/css-syntax-error.js +++ /dev/null @@ -1,133 +0,0 @@ -'use strict' - -let pico = require('picocolors') - -let terminalHighlight = require('./terminal-highlight') - -class CssSyntaxError extends Error { - constructor(message, line, column, source, file, plugin) { - super(message) - this.name = 'CssSyntaxError' - this.reason = message - - if (file) { - this.file = file - } - if (source) { - this.source = source - } - if (plugin) { - this.plugin = plugin - } - if (typeof line !== 'undefined' && typeof column !== 'undefined') { - if (typeof line === 'number') { - this.line = line - this.column = column - } else { - this.line = line.line - this.column = line.column - this.endLine = column.line - this.endColumn = column.column - } - } - - this.setMessage() - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, CssSyntaxError) - } - } - - setMessage() { - this.message = this.plugin ? this.plugin + ': ' : '' - this.message += this.file ? this.file : '' - if (typeof this.line !== 'undefined') { - this.message += ':' + this.line + ':' + this.column - } - this.message += ': ' + this.reason - } - - showSourceCode(color) { - if (!this.source) return '' - - let css = this.source - if (color == null) color = pico.isColorSupported - - let aside = text => text - let mark = text => text - let highlight = text => text - if (color) { - let { bold, gray, red } = pico.createColors(true) - mark = text => bold(red(text)) - aside = text => gray(text) - if (terminalHighlight) { - highlight = text => terminalHighlight(text) - } - } - - let lines = css.split(/\r?\n/) - let start = Math.max(this.line - 3, 0) - let end = Math.min(this.line + 2, lines.length) - let maxWidth = String(end).length - - return lines - .slice(start, end) - .map((line, index) => { - let number = start + 1 + index - let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | ' - if (number === this.line) { - if (line.length > 160) { - let padding = 20 - let subLineStart = Math.max(0, this.column - padding) - let subLineEnd = Math.max( - this.column + padding, - this.endColumn + padding - ) - let subLine = line.slice(subLineStart, subLineEnd) - - let spacing = - aside(gutter.replace(/\d/g, ' ')) + - line - .slice(0, Math.min(this.column - 1, padding - 1)) - .replace(/[^\t]/g, ' ') - - return ( - mark('>') + - aside(gutter) + - highlight(subLine) + - '\n ' + - spacing + - mark('^') - ) - } - - let spacing = - aside(gutter.replace(/\d/g, ' ')) + - line.slice(0, this.column - 1).replace(/[^\t]/g, ' ') - - return ( - mark('>') + - aside(gutter) + - highlight(line) + - '\n ' + - spacing + - mark('^') - ) - } - - return ' ' + aside(gutter) + highlight(line) - }) - .join('\n') - } - - toString() { - let code = this.showSourceCode() - if (code) { - code = '\n\n' + code + '\n' - } - return this.name + ': ' + this.message + code - } -} - -module.exports = CssSyntaxError -CssSyntaxError.default = CssSyntaxError diff --git a/node_modules/postcss/lib/declaration.d.ts b/node_modules/postcss/lib/declaration.d.ts deleted file mode 100644 index e707ad6..0000000 --- a/node_modules/postcss/lib/declaration.d.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { ContainerWithChildren } from './container.js' -import Node from './node.js' - -declare namespace Declaration { - export interface DeclarationRaws extends Record { - /** - * The space symbols before the node. It also stores `*` - * and `_` symbols before the declaration (IE hack). - */ - before?: string - - /** - * The symbols between the property and value for declarations. - */ - between?: string - - /** - * The content of the important statement, if it is not just `!important`. - */ - important?: string - - /** - * Declaration value with comments. - */ - value?: { - raw: string - value: string - } - } - - export interface DeclarationProps { - /** Whether the declaration has an `!important` annotation. */ - important?: boolean - /** Name of the declaration. */ - prop: string - /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ - raws?: DeclarationRaws - /** Value of the declaration. */ - value: string - } - - // eslint-disable-next-line @typescript-eslint/no-use-before-define - export { Declaration_ as default } -} - -/** - * It represents a class that handles - * [CSS declarations](https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax#css_declarations) - * - * ```js - * Once (root, { Declaration }) { - * const color = new Declaration({ prop: 'color', value: 'black' }) - * root.append(color) - * } - * ``` - * - * ```js - * const root = postcss.parse('a { color: black }') - * const decl = root.first?.first - * - * decl.type //=> 'decl' - * decl.toString() //=> ' color: black' - * ``` - */ -declare class Declaration_ extends Node { - parent: ContainerWithChildren | undefined - raws: Declaration.DeclarationRaws - - type: 'decl' - - constructor(defaults?: Declaration.DeclarationProps) - assign(overrides: Declaration.DeclarationProps | object): this - - clone(overrides?: Partial): this - - cloneAfter(overrides?: Partial): this - - cloneBefore(overrides?: Partial): this - /** - * It represents a specificity of the declaration. - * - * If true, the CSS declaration will have an - * [important](https://developer.mozilla.org/en-US/docs/Web/CSS/important) - * specifier. - * - * ```js - * const root = postcss.parse('a { color: black !important; color: red }') - * - * root.first.first.important //=> true - * root.first.last.important //=> undefined - * ``` - */ - get important(): boolean - - set important(value: boolean) - /** - * The property name for a CSS declaration. - * - * ```js - * const root = postcss.parse('a { color: black }') - * const decl = root.first.first - * - * decl.prop //=> 'color' - * ``` - */ - get prop(): string - - set prop(value: string) - /** - * The property value for a CSS declaration. - * - * Any CSS comments inside the value string will be filtered out. - * CSS comments present in the source value will be available in - * the `raws` property. - * - * Assigning new `value` would ignore the comments in `raws` - * property while compiling node to string. - * - * ```js - * const root = postcss.parse('a { color: black }') - * const decl = root.first.first - * - * decl.value //=> 'black' - * ``` - */ - get value(): string - set value(value: string) - /** - * It represents a getter that returns `true` if a declaration starts with - * `--` or `$`, which are used to declare variables in CSS and SASS/SCSS. - * - * ```js - * const root = postcss.parse(':root { --one: 1 }') - * const one = root.first.first - * - * one.variable //=> true - * ``` - * - * ```js - * const root = postcss.parse('$one: 1') - * const one = root.first - * - * one.variable //=> true - * ``` - */ - get variable(): boolean -} - -declare class Declaration extends Declaration_ {} - -export = Declaration diff --git a/node_modules/postcss/lib/declaration.js b/node_modules/postcss/lib/declaration.js deleted file mode 100644 index a04bdec..0000000 --- a/node_modules/postcss/lib/declaration.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict' - -let Node = require('./node') - -class Declaration extends Node { - constructor(defaults) { - if ( - defaults && - typeof defaults.value !== 'undefined' && - typeof defaults.value !== 'string' - ) { - defaults = { ...defaults, value: String(defaults.value) } - } - super(defaults) - this.type = 'decl' - } - - get variable() { - return this.prop.startsWith('--') || this.prop[0] === '$' - } -} - -module.exports = Declaration -Declaration.default = Declaration diff --git a/node_modules/postcss/lib/document.d.ts b/node_modules/postcss/lib/document.d.ts deleted file mode 100644 index f9e8063..0000000 --- a/node_modules/postcss/lib/document.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -import Container, { ContainerProps } from './container.js' -import { ProcessOptions } from './postcss.js' -import Result from './result.js' -import Root from './root.js' - -declare namespace Document { - export interface DocumentProps extends ContainerProps { - nodes?: readonly Root[] - - /** - * Information to generate byte-to-byte equal node string as it was - * in the origin input. - * - * Every parser saves its own properties. - */ - raws?: Record - } - - // eslint-disable-next-line @typescript-eslint/no-use-before-define - export { Document_ as default } -} - -/** - * Represents a file and contains all its parsed nodes. - * - * **Experimental:** some aspects of this node could change within minor - * or patch version releases. - * - * ```js - * const document = htmlParser( - * '' - * ) - * document.type //=> 'document' - * document.nodes.length //=> 2 - * ``` - */ -declare class Document_ extends Container { - nodes: Root[] - parent: undefined - type: 'document' - - constructor(defaults?: Document.DocumentProps) - - assign(overrides: Document.DocumentProps | object): this - clone(overrides?: Partial): this - cloneAfter(overrides?: Partial): this - cloneBefore(overrides?: Partial): this - - /** - * Returns a `Result` instance representing the document’s CSS roots. - * - * ```js - * const root1 = postcss.parse(css1, { from: 'a.css' }) - * const root2 = postcss.parse(css2, { from: 'b.css' }) - * const document = postcss.document() - * document.append(root1) - * document.append(root2) - * const result = document.toResult({ to: 'all.css', map: true }) - * ``` - * - * @param opts Options. - * @return Result with current document’s CSS. - */ - toResult(options?: ProcessOptions): Result -} - -declare class Document extends Document_ {} - -export = Document diff --git a/node_modules/postcss/lib/document.js b/node_modules/postcss/lib/document.js deleted file mode 100644 index 4468991..0000000 --- a/node_modules/postcss/lib/document.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict' - -let Container = require('./container') - -let LazyResult, Processor - -class Document extends Container { - constructor(defaults) { - // type needs to be passed to super, otherwise child roots won't be normalized correctly - super({ type: 'document', ...defaults }) - - if (!this.nodes) { - this.nodes = [] - } - } - - toResult(opts = {}) { - let lazy = new LazyResult(new Processor(), this, opts) - - return lazy.stringify() - } -} - -Document.registerLazyResult = dependant => { - LazyResult = dependant -} - -Document.registerProcessor = dependant => { - Processor = dependant -} - -module.exports = Document -Document.default = Document diff --git a/node_modules/postcss/lib/fromJSON.d.ts b/node_modules/postcss/lib/fromJSON.d.ts deleted file mode 100644 index e1deedb..0000000 --- a/node_modules/postcss/lib/fromJSON.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { JSONHydrator } from './postcss.js' - -interface FromJSON extends JSONHydrator { - default: FromJSON -} - -declare const fromJSON: FromJSON - -export = fromJSON diff --git a/node_modules/postcss/lib/fromJSON.js b/node_modules/postcss/lib/fromJSON.js deleted file mode 100644 index c9ac1a8..0000000 --- a/node_modules/postcss/lib/fromJSON.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict' - -let AtRule = require('./at-rule') -let Comment = require('./comment') -let Declaration = require('./declaration') -let Input = require('./input') -let PreviousMap = require('./previous-map') -let Root = require('./root') -let Rule = require('./rule') - -function fromJSON(json, inputs) { - if (Array.isArray(json)) return json.map(n => fromJSON(n)) - - let { inputs: ownInputs, ...defaults } = json - if (ownInputs) { - inputs = [] - for (let input of ownInputs) { - let inputHydrated = { ...input, __proto__: Input.prototype } - if (inputHydrated.map) { - inputHydrated.map = { - ...inputHydrated.map, - __proto__: PreviousMap.prototype - } - } - inputs.push(inputHydrated) - } - } - if (defaults.nodes) { - defaults.nodes = json.nodes.map(n => fromJSON(n, inputs)) - } - if (defaults.source) { - let { inputId, ...source } = defaults.source - defaults.source = source - if (inputId != null) { - defaults.source.input = inputs[inputId] - } - } - if (defaults.type === 'root') { - return new Root(defaults) - } else if (defaults.type === 'decl') { - return new Declaration(defaults) - } else if (defaults.type === 'rule') { - return new Rule(defaults) - } else if (defaults.type === 'comment') { - return new Comment(defaults) - } else if (defaults.type === 'atrule') { - return new AtRule(defaults) - } else { - throw new Error('Unknown node type: ' + json.type) - } -} - -module.exports = fromJSON -fromJSON.default = fromJSON diff --git a/node_modules/postcss/lib/input.d.ts b/node_modules/postcss/lib/input.d.ts deleted file mode 100644 index e45f7e9..0000000 --- a/node_modules/postcss/lib/input.d.ts +++ /dev/null @@ -1,208 +0,0 @@ -import { CssSyntaxError, ProcessOptions } from './postcss.js' -import PreviousMap from './previous-map.js' - -declare namespace Input { - export interface FilePosition { - /** - * Column of inclusive start position in source file. - */ - column: number - - /** - * Column of exclusive end position in source file. - */ - endColumn?: number - - /** - * Line of exclusive end position in source file. - */ - endLine?: number - - /** - * Absolute path to the source file. - */ - file?: string - - /** - * Line of inclusive start position in source file. - */ - line: number - - /** - * Source code. - */ - source?: string - - /** - * URL for the source file. - */ - url: string - } - - // eslint-disable-next-line @typescript-eslint/no-use-before-define - export { Input_ as default } -} - -/** - * Represents the source CSS. - * - * ```js - * const root = postcss.parse(css, { from: file }) - * const input = root.source.input - * ``` - */ -declare class Input_ { - /** - * Input CSS source. - * - * ```js - * const input = postcss.parse('a{}', { from: file }).input - * input.css //=> "a{}" - * ``` - */ - css: string - - /** - * Input source with support for non-CSS documents. - * - * ```js - * const input = postcss.parse('a{}', { from: file, document: '' }).input - * input.document //=> "" - * input.css //=> "a{}" - * ``` - */ - document: string - - /** - * The absolute path to the CSS source file defined - * with the `from` option. - * - * ```js - * const root = postcss.parse(css, { from: 'a.css' }) - * root.source.input.file //=> '/home/ai/a.css' - * ``` - */ - file?: string - - /** - * The flag to indicate whether or not the source code has Unicode BOM. - */ - hasBOM: boolean - - /** - * The unique ID of the CSS source. It will be created if `from` option - * is not provided (because PostCSS does not know the file path). - * - * ```js - * const root = postcss.parse(css) - * root.source.input.file //=> undefined - * root.source.input.id //=> "" - * ``` - */ - id?: string - - /** - * The input source map passed from a compilation step before PostCSS - * (for example, from Sass compiler). - * - * ```js - * root.source.input.map.consumer().sources //=> ['a.sass'] - * ``` - */ - map: PreviousMap - - /** - * @param css Input CSS source. - * @param opts Process options. - */ - constructor(css: string, opts?: ProcessOptions) - - error( - message: string, - start: - | { - column: number - line: number - } - | { - offset: number - }, - end: - | { - column: number - line: number - } - | { - offset: number - }, - opts?: { plugin?: CssSyntaxError['plugin'] } - ): CssSyntaxError - - /** - * Returns `CssSyntaxError` with information about the error and its position. - */ - error( - message: string, - line: number, - column: number, - opts?: { plugin?: CssSyntaxError['plugin'] } - ): CssSyntaxError - - error( - message: string, - offset: number, - opts?: { plugin?: CssSyntaxError['plugin'] } - ): CssSyntaxError - - /** - * Converts source offset to line and column. - * - * @param offset Source offset. - */ - fromOffset(offset: number): { col: number; line: number } | null - /** - * Reads the input source map and returns a symbol position - * in the input source (e.g., in a Sass file that was compiled - * to CSS before being passed to PostCSS). Optionally takes an - * end position, exclusive. - * - * ```js - * root.source.input.origin(1, 1) //=> { file: 'a.css', line: 3, column: 1 } - * root.source.input.origin(1, 1, 1, 4) - * //=> { file: 'a.css', line: 3, column: 1, endLine: 3, endColumn: 4 } - * ``` - * - * @param line Line for inclusive start position in input CSS. - * @param column Column for inclusive start position in input CSS. - * @param endLine Line for exclusive end position in input CSS. - * @param endColumn Column for exclusive end position in input CSS. - * - * @return Position in input source. - */ - origin( - line: number, - column: number, - endLine?: number, - endColumn?: number - ): false | Input.FilePosition - /** Converts this to a JSON-friendly object representation. */ - toJSON(): object - - /** - * The CSS source identifier. Contains `Input#file` if the user - * set the `from` option, or `Input#id` if they did not. - * - * ```js - * const root = postcss.parse(css, { from: 'a.css' }) - * root.source.input.from //=> "/home/ai/a.css" - * - * const root = postcss.parse(css) - * root.source.input.from //=> "" - * ``` - */ - get from(): string -} - -declare class Input extends Input_ {} - -export = Input diff --git a/node_modules/postcss/lib/input.js b/node_modules/postcss/lib/input.js deleted file mode 100644 index 0306efc..0000000 --- a/node_modules/postcss/lib/input.js +++ /dev/null @@ -1,251 +0,0 @@ -'use strict' - -let { nanoid } = require('nanoid/non-secure') -let { isAbsolute, resolve } = require('path') -let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') -let { fileURLToPath, pathToFileURL } = require('url') - -let CssSyntaxError = require('./css-syntax-error') -let PreviousMap = require('./previous-map') -let terminalHighlight = require('./terminal-highlight') - -let fromOffsetCache = Symbol('fromOffsetCache') - -let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator) -let pathAvailable = Boolean(resolve && isAbsolute) - -class Input { - constructor(css, opts = {}) { - if ( - css === null || - typeof css === 'undefined' || - (typeof css === 'object' && !css.toString) - ) { - throw new Error(`PostCSS received ${css} instead of CSS string`) - } - - this.css = css.toString() - - if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') { - this.hasBOM = true - this.css = this.css.slice(1) - } else { - this.hasBOM = false - } - - this.document = this.css - if (opts.document) this.document = opts.document.toString() - - if (opts.from) { - if ( - !pathAvailable || - /^\w+:\/\//.test(opts.from) || - isAbsolute(opts.from) - ) { - this.file = opts.from - } else { - this.file = resolve(opts.from) - } - } - - if (pathAvailable && sourceMapAvailable) { - let map = new PreviousMap(this.css, opts) - if (map.text) { - this.map = map - let file = map.consumer().file - if (!this.file && file) this.file = this.mapResolve(file) - } - } - - if (!this.file) { - this.id = '' - } - if (this.map) this.map.file = this.from - } - - error(message, line, column, opts = {}) { - let endColumn, endLine, result - - if (line && typeof line === 'object') { - let start = line - let end = column - if (typeof start.offset === 'number') { - let pos = this.fromOffset(start.offset) - line = pos.line - column = pos.col - } else { - line = start.line - column = start.column - } - if (typeof end.offset === 'number') { - let pos = this.fromOffset(end.offset) - endLine = pos.line - endColumn = pos.col - } else { - endLine = end.line - endColumn = end.column - } - } else if (!column) { - let pos = this.fromOffset(line) - line = pos.line - column = pos.col - } - - let origin = this.origin(line, column, endLine, endColumn) - if (origin) { - result = new CssSyntaxError( - message, - origin.endLine === undefined - ? origin.line - : { column: origin.column, line: origin.line }, - origin.endLine === undefined - ? origin.column - : { column: origin.endColumn, line: origin.endLine }, - origin.source, - origin.file, - opts.plugin - ) - } else { - result = new CssSyntaxError( - message, - endLine === undefined ? line : { column, line }, - endLine === undefined ? column : { column: endColumn, line: endLine }, - this.css, - this.file, - opts.plugin - ) - } - - result.input = { column, endColumn, endLine, line, source: this.css } - if (this.file) { - if (pathToFileURL) { - result.input.url = pathToFileURL(this.file).toString() - } - result.input.file = this.file - } - - return result - } - - fromOffset(offset) { - let lastLine, lineToIndex - if (!this[fromOffsetCache]) { - let lines = this.css.split('\n') - lineToIndex = new Array(lines.length) - let prevIndex = 0 - - for (let i = 0, l = lines.length; i < l; i++) { - lineToIndex[i] = prevIndex - prevIndex += lines[i].length + 1 - } - - this[fromOffsetCache] = lineToIndex - } else { - lineToIndex = this[fromOffsetCache] - } - lastLine = lineToIndex[lineToIndex.length - 1] - - let min = 0 - if (offset >= lastLine) { - min = lineToIndex.length - 1 - } else { - let max = lineToIndex.length - 2 - let mid - while (min < max) { - mid = min + ((max - min) >> 1) - if (offset < lineToIndex[mid]) { - max = mid - 1 - } else if (offset >= lineToIndex[mid + 1]) { - min = mid + 1 - } else { - min = mid - break - } - } - } - return { - col: offset - lineToIndex[min] + 1, - line: min + 1 - } - } - - mapResolve(file) { - if (/^\w+:\/\//.test(file)) { - return file - } - return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file) - } - - origin(line, column, endLine, endColumn) { - if (!this.map) return false - let consumer = this.map.consumer() - - let from = consumer.originalPositionFor({ column, line }) - if (!from.source) return false - - let to - if (typeof endLine === 'number') { - to = consumer.originalPositionFor({ column: endColumn, line: endLine }) - } - - let fromUrl - - if (isAbsolute(from.source)) { - fromUrl = pathToFileURL(from.source) - } else { - fromUrl = new URL( - from.source, - this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile) - ) - } - - let result = { - column: from.column, - endColumn: to && to.column, - endLine: to && to.line, - line: from.line, - url: fromUrl.toString() - } - - if (fromUrl.protocol === 'file:') { - if (fileURLToPath) { - result.file = fileURLToPath(fromUrl) - } else { - /* c8 ignore next 2 */ - throw new Error(`file: protocol is not available in this PostCSS build`) - } - } - - let source = consumer.sourceContentFor(from.source) - if (source) result.source = source - - return result - } - - toJSON() { - let json = {} - for (let name of ['hasBOM', 'css', 'file', 'id']) { - if (this[name] != null) { - json[name] = this[name] - } - } - if (this.map) { - json.map = { ...this.map } - if (json.map.consumerCache) { - json.map.consumerCache = undefined - } - } - return json - } - - get from() { - return this.file || this.id - } -} - -module.exports = Input -Input.default = Input - -if (terminalHighlight && terminalHighlight.registerInput) { - terminalHighlight.registerInput(Input) -} diff --git a/node_modules/postcss/lib/lazy-result.d.ts b/node_modules/postcss/lib/lazy-result.d.ts deleted file mode 100644 index dd291aa..0000000 --- a/node_modules/postcss/lib/lazy-result.d.ts +++ /dev/null @@ -1,190 +0,0 @@ -import Document from './document.js' -import { SourceMap } from './postcss.js' -import Processor from './processor.js' -import Result, { Message, ResultOptions } from './result.js' -import Root from './root.js' -import Warning from './warning.js' - -declare namespace LazyResult { - // eslint-disable-next-line @typescript-eslint/no-use-before-define - export { LazyResult_ as default } -} - -/** - * A Promise proxy for the result of PostCSS transformations. - * - * A `LazyResult` instance is returned by `Processor#process`. - * - * ```js - * const lazy = postcss([autoprefixer]).process(css) - * ``` - */ -declare class LazyResult_ - implements PromiseLike> -{ - /** - * Processes input CSS through synchronous and asynchronous plugins - * and calls onRejected for each error thrown in any plugin. - * - * It implements standard Promise API. - * - * ```js - * postcss([autoprefixer]).process(css).then(result => { - * console.log(result.css) - * }).catch(error => { - * console.error(error) - * }) - * ``` - */ - catch: Promise>['catch'] - - /** - * Processes input CSS through synchronous and asynchronous plugins - * and calls onFinally on any error or when all plugins will finish work. - * - * It implements standard Promise API. - * - * ```js - * postcss([autoprefixer]).process(css).finally(() => { - * console.log('processing ended') - * }) - * ``` - */ - finally: Promise>['finally'] - - /** - * Processes input CSS through synchronous and asynchronous plugins - * and calls `onFulfilled` with a Result instance. If a plugin throws - * an error, the `onRejected` callback will be executed. - * - * It implements standard Promise API. - * - * ```js - * postcss([autoprefixer]).process(css, { from: cssPath }).then(result => { - * console.log(result.css) - * }) - * ``` - */ - then: Promise>['then'] - - /** - * @param processor Processor used for this transformation. - * @param css CSS to parse and transform. - * @param opts Options from the `Processor#process` or `Root#toResult`. - */ - constructor(processor: Processor, css: string, opts: ResultOptions) - - /** - * Run plugin in async way and return `Result`. - * - * @return Result with output content. - */ - async(): Promise> - - /** - * Run plugin in sync way and return `Result`. - * - * @return Result with output content. - */ - sync(): Result - - /** - * Alias for the `LazyResult#css` property. - * - * ```js - * lazy + '' === lazy.css - * ``` - * - * @return Output CSS. - */ - toString(): string - - /** - * Processes input CSS through synchronous plugins - * and calls `Result#warnings`. - * - * @return Warnings from plugins. - */ - warnings(): Warning[] - - /** - * An alias for the `css` property. Use it with syntaxes - * that generate non-CSS output. - * - * This property will only work with synchronous plugins. - * If the processor contains any asynchronous plugins - * it will throw an error. - * - * PostCSS runners should always use `LazyResult#then`. - */ - get content(): string - - /** - * Processes input CSS through synchronous plugins, converts `Root` - * to a CSS string and returns `Result#css`. - * - * This property will only work with synchronous plugins. - * If the processor contains any asynchronous plugins - * it will throw an error. - * - * PostCSS runners should always use `LazyResult#then`. - */ - get css(): string - - /** - * Processes input CSS through synchronous plugins - * and returns `Result#map`. - * - * This property will only work with synchronous plugins. - * If the processor contains any asynchronous plugins - * it will throw an error. - * - * PostCSS runners should always use `LazyResult#then`. - */ - get map(): SourceMap - - /** - * Processes input CSS through synchronous plugins - * and returns `Result#messages`. - * - * This property will only work with synchronous plugins. If the processor - * contains any asynchronous plugins it will throw an error. - * - * PostCSS runners should always use `LazyResult#then`. - */ - get messages(): Message[] - - /** - * Options from the `Processor#process` call. - */ - get opts(): ResultOptions - - /** - * Returns a `Processor` instance, which will be used - * for CSS transformations. - */ - get processor(): Processor - - /** - * Processes input CSS through synchronous plugins - * and returns `Result#root`. - * - * This property will only work with synchronous plugins. If the processor - * contains any asynchronous plugins it will throw an error. - * - * PostCSS runners should always use `LazyResult#then`. - */ - get root(): RootNode - - /** - * Returns the default string description of an object. - * Required to implement the Promise interface. - */ - get [Symbol.toStringTag](): string -} - -declare class LazyResult< - RootNode = Document | Root -> extends LazyResult_ {} - -export = LazyResult diff --git a/node_modules/postcss/lib/lazy-result.js b/node_modules/postcss/lib/lazy-result.js deleted file mode 100644 index e27701d..0000000 --- a/node_modules/postcss/lib/lazy-result.js +++ /dev/null @@ -1,550 +0,0 @@ -'use strict' - -let Container = require('./container') -let Document = require('./document') -let MapGenerator = require('./map-generator') -let parse = require('./parse') -let Result = require('./result') -let Root = require('./root') -let stringify = require('./stringify') -let { isClean, my } = require('./symbols') -let warnOnce = require('./warn-once') - -const TYPE_TO_CLASS_NAME = { - atrule: 'AtRule', - comment: 'Comment', - decl: 'Declaration', - document: 'Document', - root: 'Root', - rule: 'Rule' -} - -const PLUGIN_PROPS = { - AtRule: true, - AtRuleExit: true, - Comment: true, - CommentExit: true, - Declaration: true, - DeclarationExit: true, - Document: true, - DocumentExit: true, - Once: true, - OnceExit: true, - postcssPlugin: true, - prepare: true, - Root: true, - RootExit: true, - Rule: true, - RuleExit: true -} - -const NOT_VISITORS = { - Once: true, - postcssPlugin: true, - prepare: true -} - -const CHILDREN = 0 - -function isPromise(obj) { - return typeof obj === 'object' && typeof obj.then === 'function' -} - -function getEvents(node) { - let key = false - let type = TYPE_TO_CLASS_NAME[node.type] - if (node.type === 'decl') { - key = node.prop.toLowerCase() - } else if (node.type === 'atrule') { - key = node.name.toLowerCase() - } - - if (key && node.append) { - return [ - type, - type + '-' + key, - CHILDREN, - type + 'Exit', - type + 'Exit-' + key - ] - } else if (key) { - return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key] - } else if (node.append) { - return [type, CHILDREN, type + 'Exit'] - } else { - return [type, type + 'Exit'] - } -} - -function toStack(node) { - let events - if (node.type === 'document') { - events = ['Document', CHILDREN, 'DocumentExit'] - } else if (node.type === 'root') { - events = ['Root', CHILDREN, 'RootExit'] - } else { - events = getEvents(node) - } - - return { - eventIndex: 0, - events, - iterator: 0, - node, - visitorIndex: 0, - visitors: [] - } -} - -function cleanMarks(node) { - node[isClean] = false - if (node.nodes) node.nodes.forEach(i => cleanMarks(i)) - return node -} - -let postcss = {} - -class LazyResult { - constructor(processor, css, opts) { - this.stringified = false - this.processed = false - - let root - if ( - typeof css === 'object' && - css !== null && - (css.type === 'root' || css.type === 'document') - ) { - root = cleanMarks(css) - } else if (css instanceof LazyResult || css instanceof Result) { - root = cleanMarks(css.root) - if (css.map) { - if (typeof opts.map === 'undefined') opts.map = {} - if (!opts.map.inline) opts.map.inline = false - opts.map.prev = css.map - } - } else { - let parser = parse - if (opts.syntax) parser = opts.syntax.parse - if (opts.parser) parser = opts.parser - if (parser.parse) parser = parser.parse - - try { - root = parser(css, opts) - } catch (error) { - this.processed = true - this.error = error - } - - if (root && !root[my]) { - /* c8 ignore next 2 */ - Container.rebuild(root) - } - } - - this.result = new Result(processor, root, opts) - this.helpers = { ...postcss, postcss, result: this.result } - this.plugins = this.processor.plugins.map(plugin => { - if (typeof plugin === 'object' && plugin.prepare) { - return { ...plugin, ...plugin.prepare(this.result) } - } else { - return plugin - } - }) - } - - async() { - if (this.error) return Promise.reject(this.error) - if (this.processed) return Promise.resolve(this.result) - if (!this.processing) { - this.processing = this.runAsync() - } - return this.processing - } - - catch(onRejected) { - return this.async().catch(onRejected) - } - - finally(onFinally) { - return this.async().then(onFinally, onFinally) - } - - getAsyncError() { - throw new Error('Use process(css).then(cb) to work with async plugins') - } - - handleError(error, node) { - let plugin = this.result.lastPlugin - try { - if (node) node.addToError(error) - this.error = error - if (error.name === 'CssSyntaxError' && !error.plugin) { - error.plugin = plugin.postcssPlugin - error.setMessage() - } else if (plugin.postcssVersion) { - if (process.env.NODE_ENV !== 'production') { - let pluginName = plugin.postcssPlugin - let pluginVer = plugin.postcssVersion - let runtimeVer = this.result.processor.version - let a = pluginVer.split('.') - let b = runtimeVer.split('.') - - if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { - // eslint-disable-next-line no-console - console.error( - 'Unknown error from PostCSS plugin. Your current PostCSS ' + - 'version is ' + - runtimeVer + - ', but ' + - pluginName + - ' uses ' + - pluginVer + - '. Perhaps this is the source of the error below.' - ) - } - } - } - } catch (err) { - /* c8 ignore next 3 */ - // eslint-disable-next-line no-console - if (console && console.error) console.error(err) - } - return error - } - - prepareVisitors() { - this.listeners = {} - let add = (plugin, type, cb) => { - if (!this.listeners[type]) this.listeners[type] = [] - this.listeners[type].push([plugin, cb]) - } - for (let plugin of this.plugins) { - if (typeof plugin === 'object') { - for (let event in plugin) { - if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) { - throw new Error( - `Unknown event ${event} in ${plugin.postcssPlugin}. ` + - `Try to update PostCSS (${this.processor.version} now).` - ) - } - if (!NOT_VISITORS[event]) { - if (typeof plugin[event] === 'object') { - for (let filter in plugin[event]) { - if (filter === '*') { - add(plugin, event, plugin[event][filter]) - } else { - add( - plugin, - event + '-' + filter.toLowerCase(), - plugin[event][filter] - ) - } - } - } else if (typeof plugin[event] === 'function') { - add(plugin, event, plugin[event]) - } - } - } - } - } - this.hasListener = Object.keys(this.listeners).length > 0 - } - - async runAsync() { - this.plugin = 0 - for (let i = 0; i < this.plugins.length; i++) { - let plugin = this.plugins[i] - let promise = this.runOnRoot(plugin) - if (isPromise(promise)) { - try { - await promise - } catch (error) { - throw this.handleError(error) - } - } - } - - this.prepareVisitors() - if (this.hasListener) { - let root = this.result.root - while (!root[isClean]) { - root[isClean] = true - let stack = [toStack(root)] - while (stack.length > 0) { - let promise = this.visitTick(stack) - if (isPromise(promise)) { - try { - await promise - } catch (e) { - let node = stack[stack.length - 1].node - throw this.handleError(e, node) - } - } - } - } - - if (this.listeners.OnceExit) { - for (let [plugin, visitor] of this.listeners.OnceExit) { - this.result.lastPlugin = plugin - try { - if (root.type === 'document') { - let roots = root.nodes.map(subRoot => - visitor(subRoot, this.helpers) - ) - - await Promise.all(roots) - } else { - await visitor(root, this.helpers) - } - } catch (e) { - throw this.handleError(e) - } - } - } - } - - this.processed = true - return this.stringify() - } - - runOnRoot(plugin) { - this.result.lastPlugin = plugin - try { - if (typeof plugin === 'object' && plugin.Once) { - if (this.result.root.type === 'document') { - let roots = this.result.root.nodes.map(root => - plugin.Once(root, this.helpers) - ) - - if (isPromise(roots[0])) { - return Promise.all(roots) - } - - return roots - } - - return plugin.Once(this.result.root, this.helpers) - } else if (typeof plugin === 'function') { - return plugin(this.result.root, this.result) - } - } catch (error) { - throw this.handleError(error) - } - } - - stringify() { - if (this.error) throw this.error - if (this.stringified) return this.result - this.stringified = true - - this.sync() - - let opts = this.result.opts - let str = stringify - if (opts.syntax) str = opts.syntax.stringify - if (opts.stringifier) str = opts.stringifier - if (str.stringify) str = str.stringify - - let map = new MapGenerator(str, this.result.root, this.result.opts) - let data = map.generate() - this.result.css = data[0] - this.result.map = data[1] - - return this.result - } - - sync() { - if (this.error) throw this.error - if (this.processed) return this.result - this.processed = true - - if (this.processing) { - throw this.getAsyncError() - } - - for (let plugin of this.plugins) { - let promise = this.runOnRoot(plugin) - if (isPromise(promise)) { - throw this.getAsyncError() - } - } - - this.prepareVisitors() - if (this.hasListener) { - let root = this.result.root - while (!root[isClean]) { - root[isClean] = true - this.walkSync(root) - } - if (this.listeners.OnceExit) { - if (root.type === 'document') { - for (let subRoot of root.nodes) { - this.visitSync(this.listeners.OnceExit, subRoot) - } - } else { - this.visitSync(this.listeners.OnceExit, root) - } - } - } - - return this.result - } - - then(onFulfilled, onRejected) { - if (process.env.NODE_ENV !== 'production') { - if (!('from' in this.opts)) { - warnOnce( - 'Without `from` option PostCSS could generate wrong source map ' + - 'and will not find Browserslist config. Set it to CSS file path ' + - 'or to `undefined` to prevent this warning.' - ) - } - } - return this.async().then(onFulfilled, onRejected) - } - - toString() { - return this.css - } - - visitSync(visitors, node) { - for (let [plugin, visitor] of visitors) { - this.result.lastPlugin = plugin - let promise - try { - promise = visitor(node, this.helpers) - } catch (e) { - throw this.handleError(e, node.proxyOf) - } - if (node.type !== 'root' && node.type !== 'document' && !node.parent) { - return true - } - if (isPromise(promise)) { - throw this.getAsyncError() - } - } - } - - visitTick(stack) { - let visit = stack[stack.length - 1] - let { node, visitors } = visit - - if (node.type !== 'root' && node.type !== 'document' && !node.parent) { - stack.pop() - return - } - - if (visitors.length > 0 && visit.visitorIndex < visitors.length) { - let [plugin, visitor] = visitors[visit.visitorIndex] - visit.visitorIndex += 1 - if (visit.visitorIndex === visitors.length) { - visit.visitors = [] - visit.visitorIndex = 0 - } - this.result.lastPlugin = plugin - try { - return visitor(node.toProxy(), this.helpers) - } catch (e) { - throw this.handleError(e, node) - } - } - - if (visit.iterator !== 0) { - let iterator = visit.iterator - let child - while ((child = node.nodes[node.indexes[iterator]])) { - node.indexes[iterator] += 1 - if (!child[isClean]) { - child[isClean] = true - stack.push(toStack(child)) - return - } - } - visit.iterator = 0 - delete node.indexes[iterator] - } - - let events = visit.events - while (visit.eventIndex < events.length) { - let event = events[visit.eventIndex] - visit.eventIndex += 1 - if (event === CHILDREN) { - if (node.nodes && node.nodes.length) { - node[isClean] = true - visit.iterator = node.getIterator() - } - return - } else if (this.listeners[event]) { - visit.visitors = this.listeners[event] - return - } - } - stack.pop() - } - - walkSync(node) { - node[isClean] = true - let events = getEvents(node) - for (let event of events) { - if (event === CHILDREN) { - if (node.nodes) { - node.each(child => { - if (!child[isClean]) this.walkSync(child) - }) - } - } else { - let visitors = this.listeners[event] - if (visitors) { - if (this.visitSync(visitors, node.toProxy())) return - } - } - } - } - - warnings() { - return this.sync().warnings() - } - - get content() { - return this.stringify().content - } - - get css() { - return this.stringify().css - } - - get map() { - return this.stringify().map - } - - get messages() { - return this.sync().messages - } - - get opts() { - return this.result.opts - } - - get processor() { - return this.result.processor - } - - get root() { - return this.sync().root - } - - get [Symbol.toStringTag]() { - return 'LazyResult' - } -} - -LazyResult.registerPostcss = dependant => { - postcss = dependant -} - -module.exports = LazyResult -LazyResult.default = LazyResult - -Root.registerLazyResult(LazyResult) -Document.registerLazyResult(LazyResult) diff --git a/node_modules/postcss/lib/list.d.ts b/node_modules/postcss/lib/list.d.ts deleted file mode 100644 index e262ad3..0000000 --- a/node_modules/postcss/lib/list.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -declare namespace list { - type List = { - /** - * Safely splits comma-separated values (such as those for `transition-*` - * and `background` properties). - * - * ```js - * Once (root, { list }) { - * list.comma('black, linear-gradient(white, black)') - * //=> ['black', 'linear-gradient(white, black)'] - * } - * ``` - * - * @param str Comma-separated values. - * @return Split values. - */ - comma(str: string): string[] - - default: List - - /** - * Safely splits space-separated values (such as those for `background`, - * `border-radius`, and other shorthand properties). - * - * ```js - * Once (root, { list }) { - * list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)'] - * } - * ``` - * - * @param str Space-separated values. - * @return Split values. - */ - space(str: string): string[] - - /** - * Safely splits values. - * - * ```js - * Once (root, { list }) { - * list.split('1px calc(10% + 1px)', [' ', '\n', '\t']) //=> ['1px', 'calc(10% + 1px)'] - * } - * ``` - * - * @param string separated values. - * @param separators array of separators. - * @param last boolean indicator. - * @return Split values. - */ - split( - string: string, - separators: readonly string[], - last: boolean - ): string[] - } -} - -declare const list: list.List - -export = list diff --git a/node_modules/postcss/lib/list.js b/node_modules/postcss/lib/list.js deleted file mode 100644 index 1b31f98..0000000 --- a/node_modules/postcss/lib/list.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict' - -let list = { - comma(string) { - return list.split(string, [','], true) - }, - - space(string) { - let spaces = [' ', '\n', '\t'] - return list.split(string, spaces) - }, - - split(string, separators, last) { - let array = [] - let current = '' - let split = false - - let func = 0 - let inQuote = false - let prevQuote = '' - let escape = false - - for (let letter of string) { - if (escape) { - escape = false - } else if (letter === '\\') { - escape = true - } else if (inQuote) { - if (letter === prevQuote) { - inQuote = false - } - } else if (letter === '"' || letter === "'") { - inQuote = true - prevQuote = letter - } else if (letter === '(') { - func += 1 - } else if (letter === ')') { - if (func > 0) func -= 1 - } else if (func === 0) { - if (separators.includes(letter)) split = true - } - - if (split) { - if (current !== '') array.push(current.trim()) - current = '' - split = false - } else { - current += letter - } - } - - if (last || current !== '') array.push(current.trim()) - return array - } -} - -module.exports = list -list.default = list diff --git a/node_modules/postcss/lib/map-generator.js b/node_modules/postcss/lib/map-generator.js deleted file mode 100644 index 89069d3..0000000 --- a/node_modules/postcss/lib/map-generator.js +++ /dev/null @@ -1,368 +0,0 @@ -'use strict' - -let { dirname, relative, resolve, sep } = require('path') -let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') -let { pathToFileURL } = require('url') - -let Input = require('./input') - -let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator) -let pathAvailable = Boolean(dirname && resolve && relative && sep) - -class MapGenerator { - constructor(stringify, root, opts, cssString) { - this.stringify = stringify - this.mapOpts = opts.map || {} - this.root = root - this.opts = opts - this.css = cssString - this.originalCSS = cssString - this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute - - this.memoizedFileURLs = new Map() - this.memoizedPaths = new Map() - this.memoizedURLs = new Map() - } - - addAnnotation() { - let content - - if (this.isInline()) { - content = - 'data:application/json;base64,' + this.toBase64(this.map.toString()) - } else if (typeof this.mapOpts.annotation === 'string') { - content = this.mapOpts.annotation - } else if (typeof this.mapOpts.annotation === 'function') { - content = this.mapOpts.annotation(this.opts.to, this.root) - } else { - content = this.outputFile() + '.map' - } - let eol = '\n' - if (this.css.includes('\r\n')) eol = '\r\n' - - this.css += eol + '/*# sourceMappingURL=' + content + ' */' - } - - applyPrevMaps() { - for (let prev of this.previous()) { - let from = this.toUrl(this.path(prev.file)) - let root = prev.root || dirname(prev.file) - let map - - if (this.mapOpts.sourcesContent === false) { - map = new SourceMapConsumer(prev.text) - if (map.sourcesContent) { - map.sourcesContent = null - } - } else { - map = prev.consumer() - } - - this.map.applySourceMap(map, from, this.toUrl(this.path(root))) - } - } - - clearAnnotation() { - if (this.mapOpts.annotation === false) return - - if (this.root) { - let node - for (let i = this.root.nodes.length - 1; i >= 0; i--) { - node = this.root.nodes[i] - if (node.type !== 'comment') continue - if (node.text.startsWith('# sourceMappingURL=')) { - this.root.removeChild(i) - } - } - } else if (this.css) { - this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, '') - } - } - - generate() { - this.clearAnnotation() - if (pathAvailable && sourceMapAvailable && this.isMap()) { - return this.generateMap() - } else { - let result = '' - this.stringify(this.root, i => { - result += i - }) - return [result] - } - } - - generateMap() { - if (this.root) { - this.generateString() - } else if (this.previous().length === 1) { - let prev = this.previous()[0].consumer() - prev.file = this.outputFile() - this.map = SourceMapGenerator.fromSourceMap(prev, { - ignoreInvalidMapping: true - }) - } else { - this.map = new SourceMapGenerator({ - file: this.outputFile(), - ignoreInvalidMapping: true - }) - this.map.addMapping({ - generated: { column: 0, line: 1 }, - original: { column: 0, line: 1 }, - source: this.opts.from - ? this.toUrl(this.path(this.opts.from)) - : '' - }) - } - - if (this.isSourcesContent()) this.setSourcesContent() - if (this.root && this.previous().length > 0) this.applyPrevMaps() - if (this.isAnnotation()) this.addAnnotation() - - if (this.isInline()) { - return [this.css] - } else { - return [this.css, this.map] - } - } - - generateString() { - this.css = '' - this.map = new SourceMapGenerator({ - file: this.outputFile(), - ignoreInvalidMapping: true - }) - - let line = 1 - let column = 1 - - let noSource = '' - let mapping = { - generated: { column: 0, line: 0 }, - original: { column: 0, line: 0 }, - source: '' - } - - let last, lines - this.stringify(this.root, (str, node, type) => { - this.css += str - - if (node && type !== 'end') { - mapping.generated.line = line - mapping.generated.column = column - 1 - if (node.source && node.source.start) { - mapping.source = this.sourcePath(node) - mapping.original.line = node.source.start.line - mapping.original.column = node.source.start.column - 1 - this.map.addMapping(mapping) - } else { - mapping.source = noSource - mapping.original.line = 1 - mapping.original.column = 0 - this.map.addMapping(mapping) - } - } - - lines = str.match(/\n/g) - if (lines) { - line += lines.length - last = str.lastIndexOf('\n') - column = str.length - last - } else { - column += str.length - } - - if (node && type !== 'start') { - let p = node.parent || { raws: {} } - let childless = - node.type === 'decl' || (node.type === 'atrule' && !node.nodes) - if (!childless || node !== p.last || p.raws.semicolon) { - if (node.source && node.source.end) { - mapping.source = this.sourcePath(node) - mapping.original.line = node.source.end.line - mapping.original.column = node.source.end.column - 1 - mapping.generated.line = line - mapping.generated.column = column - 2 - this.map.addMapping(mapping) - } else { - mapping.source = noSource - mapping.original.line = 1 - mapping.original.column = 0 - mapping.generated.line = line - mapping.generated.column = column - 1 - this.map.addMapping(mapping) - } - } - } - }) - } - - isAnnotation() { - if (this.isInline()) { - return true - } - if (typeof this.mapOpts.annotation !== 'undefined') { - return this.mapOpts.annotation - } - if (this.previous().length) { - return this.previous().some(i => i.annotation) - } - return true - } - - isInline() { - if (typeof this.mapOpts.inline !== 'undefined') { - return this.mapOpts.inline - } - - let annotation = this.mapOpts.annotation - if (typeof annotation !== 'undefined' && annotation !== true) { - return false - } - - if (this.previous().length) { - return this.previous().some(i => i.inline) - } - return true - } - - isMap() { - if (typeof this.opts.map !== 'undefined') { - return !!this.opts.map - } - return this.previous().length > 0 - } - - isSourcesContent() { - if (typeof this.mapOpts.sourcesContent !== 'undefined') { - return this.mapOpts.sourcesContent - } - if (this.previous().length) { - return this.previous().some(i => i.withContent()) - } - return true - } - - outputFile() { - if (this.opts.to) { - return this.path(this.opts.to) - } else if (this.opts.from) { - return this.path(this.opts.from) - } else { - return 'to.css' - } - } - - path(file) { - if (this.mapOpts.absolute) return file - if (file.charCodeAt(0) === 60 /* `<` */) return file - if (/^\w+:\/\//.test(file)) return file - let cached = this.memoizedPaths.get(file) - if (cached) return cached - - let from = this.opts.to ? dirname(this.opts.to) : '.' - - if (typeof this.mapOpts.annotation === 'string') { - from = dirname(resolve(from, this.mapOpts.annotation)) - } - - let path = relative(from, file) - this.memoizedPaths.set(file, path) - - return path - } - - previous() { - if (!this.previousMaps) { - this.previousMaps = [] - if (this.root) { - this.root.walk(node => { - if (node.source && node.source.input.map) { - let map = node.source.input.map - if (!this.previousMaps.includes(map)) { - this.previousMaps.push(map) - } - } - }) - } else { - let input = new Input(this.originalCSS, this.opts) - if (input.map) this.previousMaps.push(input.map) - } - } - - return this.previousMaps - } - - setSourcesContent() { - let already = {} - if (this.root) { - this.root.walk(node => { - if (node.source) { - let from = node.source.input.from - if (from && !already[from]) { - already[from] = true - let fromUrl = this.usesFileUrls - ? this.toFileUrl(from) - : this.toUrl(this.path(from)) - this.map.setSourceContent(fromUrl, node.source.input.css) - } - } - }) - } else if (this.css) { - let from = this.opts.from - ? this.toUrl(this.path(this.opts.from)) - : '' - this.map.setSourceContent(from, this.css) - } - } - - sourcePath(node) { - if (this.mapOpts.from) { - return this.toUrl(this.mapOpts.from) - } else if (this.usesFileUrls) { - return this.toFileUrl(node.source.input.from) - } else { - return this.toUrl(this.path(node.source.input.from)) - } - } - - toBase64(str) { - if (Buffer) { - return Buffer.from(str).toString('base64') - } else { - return window.btoa(unescape(encodeURIComponent(str))) - } - } - - toFileUrl(path) { - let cached = this.memoizedFileURLs.get(path) - if (cached) return cached - - if (pathToFileURL) { - let fileURL = pathToFileURL(path).toString() - this.memoizedFileURLs.set(path, fileURL) - - return fileURL - } else { - throw new Error( - '`map.absolute` option is not available in this PostCSS build' - ) - } - } - - toUrl(path) { - let cached = this.memoizedURLs.get(path) - if (cached) return cached - - if (sep === '\\') { - path = path.replace(/\\/g, '/') - } - - let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent) - this.memoizedURLs.set(path, url) - - return url - } -} - -module.exports = MapGenerator diff --git a/node_modules/postcss/lib/no-work-result.d.ts b/node_modules/postcss/lib/no-work-result.d.ts deleted file mode 100644 index 8039076..0000000 --- a/node_modules/postcss/lib/no-work-result.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import LazyResult from './lazy-result.js' -import { SourceMap } from './postcss.js' -import Processor from './processor.js' -import Result, { Message, ResultOptions } from './result.js' -import Root from './root.js' -import Warning from './warning.js' - -declare namespace NoWorkResult { - // eslint-disable-next-line @typescript-eslint/no-use-before-define - export { NoWorkResult_ as default } -} - -/** - * A Promise proxy for the result of PostCSS transformations. - * This lazy result instance doesn't parse css unless `NoWorkResult#root` or `Result#root` - * are accessed. See the example below for details. - * A `NoWork` instance is returned by `Processor#process` ONLY when no plugins defined. - * - * ```js - * const noWorkResult = postcss().process(css) // No plugins are defined. - * // CSS is not parsed - * let root = noWorkResult.root // now css is parsed because we accessed the root - * ``` - */ -declare class NoWorkResult_ implements LazyResult { - catch: Promise>['catch'] - finally: Promise>['finally'] - then: Promise>['then'] - constructor(processor: Processor, css: string, opts: ResultOptions) - async(): Promise> - sync(): Result - toString(): string - warnings(): Warning[] - get content(): string - get css(): string - get map(): SourceMap - get messages(): Message[] - get opts(): ResultOptions - get processor(): Processor - get root(): Root - get [Symbol.toStringTag](): string -} - -declare class NoWorkResult extends NoWorkResult_ {} - -export = NoWorkResult diff --git a/node_modules/postcss/lib/no-work-result.js b/node_modules/postcss/lib/no-work-result.js deleted file mode 100644 index a84d843..0000000 --- a/node_modules/postcss/lib/no-work-result.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict' - -let MapGenerator = require('./map-generator') -let parse = require('./parse') -const Result = require('./result') -let stringify = require('./stringify') -let warnOnce = require('./warn-once') - -class NoWorkResult { - constructor(processor, css, opts) { - css = css.toString() - this.stringified = false - - this._processor = processor - this._css = css - this._opts = opts - this._map = undefined - let root - - let str = stringify - this.result = new Result(this._processor, root, this._opts) - this.result.css = css - - let self = this - Object.defineProperty(this.result, 'root', { - get() { - return self.root - } - }) - - let map = new MapGenerator(str, root, this._opts, css) - if (map.isMap()) { - let [generatedCSS, generatedMap] = map.generate() - if (generatedCSS) { - this.result.css = generatedCSS - } - if (generatedMap) { - this.result.map = generatedMap - } - } else { - map.clearAnnotation() - this.result.css = map.css - } - } - - async() { - if (this.error) return Promise.reject(this.error) - return Promise.resolve(this.result) - } - - catch(onRejected) { - return this.async().catch(onRejected) - } - - finally(onFinally) { - return this.async().then(onFinally, onFinally) - } - - sync() { - if (this.error) throw this.error - return this.result - } - - then(onFulfilled, onRejected) { - if (process.env.NODE_ENV !== 'production') { - if (!('from' in this._opts)) { - warnOnce( - 'Without `from` option PostCSS could generate wrong source map ' + - 'and will not find Browserslist config. Set it to CSS file path ' + - 'or to `undefined` to prevent this warning.' - ) - } - } - - return this.async().then(onFulfilled, onRejected) - } - - toString() { - return this._css - } - - warnings() { - return [] - } - - get content() { - return this.result.css - } - - get css() { - return this.result.css - } - - get map() { - return this.result.map - } - - get messages() { - return [] - } - - get opts() { - return this.result.opts - } - - get processor() { - return this.result.processor - } - - get root() { - if (this._root) { - return this._root - } - - let root - let parser = parse - - try { - root = parser(this._css, this._opts) - } catch (error) { - this.error = error - } - - if (this.error) { - throw this.error - } else { - this._root = root - return root - } - } - - get [Symbol.toStringTag]() { - return 'NoWorkResult' - } -} - -module.exports = NoWorkResult -NoWorkResult.default = NoWorkResult diff --git a/node_modules/postcss/lib/node.d.ts b/node_modules/postcss/lib/node.d.ts deleted file mode 100644 index 3597670..0000000 --- a/node_modules/postcss/lib/node.d.ts +++ /dev/null @@ -1,541 +0,0 @@ -import AtRule = require('./at-rule.js') - -import { AtRuleProps } from './at-rule.js' -import Comment, { CommentProps } from './comment.js' -import Container, { NewChild } from './container.js' -import CssSyntaxError from './css-syntax-error.js' -import Declaration, { DeclarationProps } from './declaration.js' -import Document from './document.js' -import Input from './input.js' -import { Stringifier, Syntax } from './postcss.js' -import Result from './result.js' -import Root from './root.js' -import Rule, { RuleProps } from './rule.js' -import Warning, { WarningOptions } from './warning.js' - -declare namespace Node { - export type ChildNode = AtRule.default | Comment | Declaration | Rule - - export type AnyNode = - | AtRule.default - | Comment - | Declaration - | Document - | Root - | Rule - - export type ChildProps = - | AtRuleProps - | CommentProps - | DeclarationProps - | RuleProps - - export interface Position { - /** - * Source line in file. In contrast to `offset` it starts from 1. - */ - column: number - - /** - * Source column in file. - */ - line: number - - /** - * Source offset in file. It starts from 0. - */ - offset: number - } - - export interface Range { - /** - * End position, exclusive. - */ - end: Position - - /** - * Start position, inclusive. - */ - start: Position - } - - /** - * Source represents an interface for the {@link Node.source} property. - */ - export interface Source { - /** - * The inclusive ending position for the source - * code of a node. - */ - end?: Position - - /** - * The source file from where a node has originated. - */ - input: Input - - /** - * The inclusive starting position for the source - * code of a node. - */ - start?: Position - } - - /** - * Interface represents an interface for an object received - * as parameter by Node class constructor. - */ - export interface NodeProps { - source?: Source - } - - export interface NodeErrorOptions { - /** - * An ending index inside a node's string that should be highlighted as - * source of error. - */ - endIndex?: number - /** - * An index inside a node's string that should be highlighted as source - * of error. - */ - index?: number - /** - * Plugin name that created this error. PostCSS will set it automatically. - */ - plugin?: string - /** - * A word inside a node's string, that should be highlighted as source - * of error. - */ - word?: string - } - - // eslint-disable-next-line @typescript-eslint/no-shadow - class Node extends Node_ {} - export { Node as default } -} - -/** - * It represents an abstract class that handles common - * methods for other CSS abstract syntax tree nodes. - * - * Any node that represents CSS selector or value should - * not extend the `Node` class. - */ -declare abstract class Node_ { - /** - * It represents parent of the current node. - * - * ```js - * root.nodes[0].parent === root //=> true - * ``` - */ - parent: Container | Document | undefined - - /** - * It represents unnecessary whitespace and characters present - * in the css source code. - * - * Information to generate byte-to-byte equal node string as it was - * in the origin input. - * - * The properties of the raws object are decided by parser, - * the default parser uses the following properties: - * - * * `before`: the space symbols before the node. It also stores `*` - * and `_` symbols before the declaration (IE hack). - * * `after`: the space symbols after the last child of the node - * to the end of the node. - * * `between`: the symbols between the property and value - * for declarations, selector and `{` for rules, or last parameter - * and `{` for at-rules. - * * `semicolon`: contains true if the last child has - * an (optional) semicolon. - * * `afterName`: the space between the at-rule name and its parameters. - * * `left`: the space symbols between `/*` and the comment’s text. - * * `right`: the space symbols between the comment’s text - * and */. - * - `important`: the content of the important statement, - * if it is not just `!important`. - * - * PostCSS filters out the comments inside selectors, declaration values - * and at-rule parameters but it stores the origin content in raws. - * - * ```js - * const root = postcss.parse('a {\n color:black\n}') - * root.first.first.raws //=> { before: '\n ', between: ':' } - * ``` - */ - raws: any - - /** - * It represents information related to origin of a node and is required - * for generating source maps. - * - * The nodes that are created manually using the public APIs - * provided by PostCSS will have `source` undefined and - * will be absent in the source map. - * - * For this reason, the plugin developer should consider - * duplicating nodes as the duplicate node will have the - * same source as the original node by default or assign - * source to a node created manually. - * - * ```js - * decl.source.input.from //=> '/home/ai/source.css' - * decl.source.start //=> { line: 10, column: 2 } - * decl.source.end //=> { line: 10, column: 12 } - * ``` - * - * ```js - * // Incorrect method, source not specified! - * const prefixed = postcss.decl({ - * prop: '-moz-' + decl.prop, - * value: decl.value - * }) - * - * // Correct method, source is inherited when duplicating. - * const prefixed = decl.clone({ - * prop: '-moz-' + decl.prop - * }) - * ``` - * - * ```js - * if (atrule.name === 'add-link') { - * const rule = postcss.rule({ - * selector: 'a', - * source: atrule.source - * }) - * - * atrule.parent.insertBefore(atrule, rule) - * } - * ``` - */ - source?: Node.Source - - /** - * It represents type of a node in - * an abstract syntax tree. - * - * A type of node helps in identification of a node - * and perform operation based on it's type. - * - * ```js - * const declaration = new Declaration({ - * prop: 'color', - * value: 'black' - * }) - * - * declaration.type //=> 'decl' - * ``` - */ - type: string - - constructor(defaults?: object) - - /** - * If this node isn't already dirty, marks it and its ancestors as such. This - * indicates to the LazyResult processor that the {@link Root} has been - * modified by the current plugin and may need to be processed again by other - * plugins. - */ - protected markDirty(): void - - /** - * Insert new node after current node to current node’s parent. - * - * Just alias for `node.parent.insertAfter(node, add)`. - * - * ```js - * decl.after('color: black') - * ``` - * - * @param newNode New node. - * @return This node for methods chain. - */ - after( - newNode: Node | Node.ChildProps | readonly Node[] | string | undefined - ): this - - /** - * It assigns properties to an existing node instance. - * - * ```js - * decl.assign({ prop: 'word-wrap', value: 'break-word' }) - * ``` - * - * @param overrides New properties to override the node. - * - * @return `this` for method chaining. - */ - assign(overrides: object): this - - /** - * Insert new node before current node to current node’s parent. - * - * Just alias for `node.parent.insertBefore(node, add)`. - * - * ```js - * decl.before('content: ""') - * ``` - * - * @param newNode New node. - * @return This node for methods chain. - */ - before( - newNode: Node | Node.ChildProps | readonly Node[] | string | undefined - ): this - - /** - * Clear the code style properties for the node and its children. - * - * ```js - * node.raws.before //=> ' ' - * node.cleanRaws() - * node.raws.before //=> undefined - * ``` - * - * @param keepBetween Keep the `raws.between` symbols. - */ - cleanRaws(keepBetween?: boolean): void - - /** - * It creates clone of an existing node, which includes all the properties - * and their values, that includes `raws` but not `type`. - * - * ```js - * decl.raws.before //=> "\n " - * const cloned = decl.clone({ prop: '-moz-' + decl.prop }) - * cloned.raws.before //=> "\n " - * cloned.toString() //=> -moz-transform: scale(0) - * ``` - * - * @param overrides New properties to override in the clone. - * - * @return Duplicate of the node instance. - */ - clone(overrides?: object): this - - /** - * Shortcut to clone the node and insert the resulting cloned node - * after the current node. - * - * @param overrides New properties to override in the clone. - * @return New node. - */ - cloneAfter(overrides?: object): this - - /** - * Shortcut to clone the node and insert the resulting cloned node - * before the current node. - * - * ```js - * decl.cloneBefore({ prop: '-moz-' + decl.prop }) - * ``` - * - * @param overrides Mew properties to override in the clone. - * - * @return New node - */ - cloneBefore(overrides?: object): this - - /** - * It creates an instance of the class `CssSyntaxError` and parameters passed - * to this method are assigned to the error instance. - * - * The error instance will have description for the - * error, original position of the node in the - * source, showing line and column number. - * - * If any previous map is present, it would be used - * to get original position of the source. - * - * The Previous Map here is referred to the source map - * generated by previous compilation, example: Less, - * Stylus and Sass. - * - * This method returns the error instance instead of - * throwing it. - * - * ```js - * if (!variables[name]) { - * throw decl.error(`Unknown variable ${name}`, { word: name }) - * // CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black - * // color: $black - * // a - * // ^ - * // background: white - * } - * ``` - * - * @param message Description for the error instance. - * @param options Options for the error instance. - * - * @return Error instance is returned. - */ - error(message: string, options?: Node.NodeErrorOptions): CssSyntaxError - - /** - * Returns the next child of the node’s parent. - * Returns `undefined` if the current node is the last child. - * - * ```js - * if (comment.text === 'delete next') { - * const next = comment.next() - * if (next) { - * next.remove() - * } - * } - * ``` - * - * @return Next node. - */ - next(): Node.ChildNode | undefined - - /** - * Get the position for a word or an index inside the node. - * - * @param opts Options. - * @return Position. - */ - positionBy(opts?: Pick): Node.Position - - /** - * Convert string index to line/column. - * - * @param index The symbol number in the node’s string. - * @return Symbol position in file. - */ - positionInside(index: number): Node.Position - - /** - * Returns the previous child of the node’s parent. - * Returns `undefined` if the current node is the first child. - * - * ```js - * const annotation = decl.prev() - * if (annotation.type === 'comment') { - * readAnnotation(annotation.text) - * } - * ``` - * - * @return Previous node. - */ - prev(): Node.ChildNode | undefined - - /** - * Get the range for a word or start and end index inside the node. - * The start index is inclusive; the end index is exclusive. - * - * @param opts Options. - * @return Range. - */ - rangeBy( - opts?: Pick - ): Node.Range - - /** - * Returns a `raws` value. If the node is missing - * the code style property (because the node was manually built or cloned), - * PostCSS will try to autodetect the code style property by looking - * at other nodes in the tree. - * - * ```js - * const root = postcss.parse('a { background: white }') - * root.nodes[0].append({ prop: 'color', value: 'black' }) - * root.nodes[0].nodes[1].raws.before //=> undefined - * root.nodes[0].nodes[1].raw('before') //=> ' ' - * ``` - * - * @param prop Name of code style property. - * @param defaultType Name of default value, it can be missed - * if the value is the same as prop. - * @return {string} Code style value. - */ - raw(prop: string, defaultType?: string): string - - /** - * It removes the node from its parent and deletes its parent property. - * - * ```js - * if (decl.prop.match(/^-webkit-/)) { - * decl.remove() - * } - * ``` - * - * @return `this` for method chaining. - */ - remove(): this - - /** - * Inserts node(s) before the current node and removes the current node. - * - * ```js - * AtRule: { - * mixin: atrule => { - * atrule.replaceWith(mixinRules[atrule.params]) - * } - * } - * ``` - * - * @param nodes Mode(s) to replace current one. - * @return Current node to methods chain. - */ - replaceWith(...nodes: NewChild[]): this - - /** - * Finds the Root instance of the node’s tree. - * - * ```js - * root.nodes[0].nodes[0].root() === root - * ``` - * - * @return Root parent. - */ - root(): Root - - /** - * Fix circular links on `JSON.stringify()`. - * - * @return Cleaned object. - */ - toJSON(): object - - /** - * It compiles the node to browser readable cascading style sheets string - * depending on it's type. - * - * ```js - * new Rule({ selector: 'a' }).toString() //=> "a {}" - * ``` - * - * @param stringifier A syntax to use in string generation. - * @return CSS string of this node. - */ - toString(stringifier?: Stringifier | Syntax): string - - /** - * It is a wrapper for {@link Result#warn}, providing convenient - * way of generating warnings. - * - * ```js - * Declaration: { - * bad: (decl, { result }) => { - * decl.warn(result, 'Deprecated property: bad') - * } - * } - * ``` - * - * @param result The `Result` instance that will receive the warning. - * @param message Description for the warning. - * @param options Options for the warning. - * - * @return `Warning` instance is returned - */ - warn(result: Result, message: string, options?: WarningOptions): Warning -} - -declare class Node extends Node_ {} - -export = Node diff --git a/node_modules/postcss/lib/node.js b/node_modules/postcss/lib/node.js deleted file mode 100644 index f6d28a3..0000000 --- a/node_modules/postcss/lib/node.js +++ /dev/null @@ -1,434 +0,0 @@ -'use strict' - -let CssSyntaxError = require('./css-syntax-error') -let Stringifier = require('./stringifier') -let stringify = require('./stringify') -let { isClean, my } = require('./symbols') - -function cloneNode(obj, parent) { - let cloned = new obj.constructor() - - for (let i in obj) { - if (!Object.prototype.hasOwnProperty.call(obj, i)) { - /* c8 ignore next 2 */ - continue - } - if (i === 'proxyCache') continue - let value = obj[i] - let type = typeof value - - if (i === 'parent' && type === 'object') { - if (parent) cloned[i] = parent - } else if (i === 'source') { - cloned[i] = value - } else if (Array.isArray(value)) { - cloned[i] = value.map(j => cloneNode(j, cloned)) - } else { - if (type === 'object' && value !== null) value = cloneNode(value) - cloned[i] = value - } - } - - return cloned -} - -function sourceOffset(inputCSS, position) { - // Not all custom syntaxes support `offset` in `source.start` and `source.end` - if ( - position && - typeof position.offset !== 'undefined' - ) { - return position.offset; - } - - let column = 1 - let line = 1 - let offset = 0 - - for (let i = 0; i < inputCSS.length; i++) { - if (line === position.line && column === position.column) { - offset = i - break - } - - if (inputCSS[i] === '\n') { - column = 1 - line += 1 - } else { - column += 1 - } - } - - return offset -} - -class Node { - constructor(defaults = {}) { - this.raws = {} - this[isClean] = false - this[my] = true - - for (let name in defaults) { - if (name === 'nodes') { - this.nodes = [] - for (let node of defaults[name]) { - if (typeof node.clone === 'function') { - this.append(node.clone()) - } else { - this.append(node) - } - } - } else { - this[name] = defaults[name] - } - } - } - - addToError(error) { - error.postcssNode = this - if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { - let s = this.source - error.stack = error.stack.replace( - /\n\s{4}at /, - `$&${s.input.from}:${s.start.line}:${s.start.column}$&` - ) - } - return error - } - - after(add) { - this.parent.insertAfter(this, add) - return this - } - - assign(overrides = {}) { - for (let name in overrides) { - this[name] = overrides[name] - } - return this - } - - before(add) { - this.parent.insertBefore(this, add) - return this - } - - cleanRaws(keepBetween) { - delete this.raws.before - delete this.raws.after - if (!keepBetween) delete this.raws.between - } - - clone(overrides = {}) { - let cloned = cloneNode(this) - for (let name in overrides) { - cloned[name] = overrides[name] - } - return cloned - } - - cloneAfter(overrides = {}) { - let cloned = this.clone(overrides) - this.parent.insertAfter(this, cloned) - return cloned - } - - cloneBefore(overrides = {}) { - let cloned = this.clone(overrides) - this.parent.insertBefore(this, cloned) - return cloned - } - - error(message, opts = {}) { - if (this.source) { - let { end, start } = this.rangeBy(opts) - return this.source.input.error( - message, - { column: start.column, line: start.line }, - { column: end.column, line: end.line }, - opts - ) - } - return new CssSyntaxError(message) - } - - getProxyProcessor() { - return { - get(node, prop) { - if (prop === 'proxyOf') { - return node - } else if (prop === 'root') { - return () => node.root().toProxy() - } else { - return node[prop] - } - }, - - set(node, prop, value) { - if (node[prop] === value) return true - node[prop] = value - if ( - prop === 'prop' || - prop === 'value' || - prop === 'name' || - prop === 'params' || - prop === 'important' || - /* c8 ignore next */ - prop === 'text' - ) { - node.markDirty() - } - return true - } - } - } - - /* c8 ignore next 3 */ - markClean() { - this[isClean] = true - } - - markDirty() { - if (this[isClean]) { - this[isClean] = false - let next = this - while ((next = next.parent)) { - next[isClean] = false - } - } - } - - next() { - if (!this.parent) return undefined - let index = this.parent.index(this) - return this.parent.nodes[index + 1] - } - - positionBy(opts) { - let pos = this.source.start - if (opts.index) { - pos = this.positionInside(opts.index) - } else if (opts.word) { - let inputString = ('document' in this.source.input) - ? this.source.input.document - : this.source.input.css - let stringRepresentation = inputString.slice( - sourceOffset(inputString, this.source.start), - sourceOffset(inputString, this.source.end) - ) - let index = stringRepresentation.indexOf(opts.word) - if (index !== -1) pos = this.positionInside(index) - } - return pos - } - - positionInside(index) { - let column = this.source.start.column - let line = this.source.start.line - let inputString = ('document' in this.source.input) - ? this.source.input.document - : this.source.input.css - let offset = sourceOffset(inputString, this.source.start) - let end = offset + index - - for (let i = offset; i < end; i++) { - if (inputString[i] === '\n') { - column = 1 - line += 1 - } else { - column += 1 - } - } - - return { column, line } - } - - prev() { - if (!this.parent) return undefined - let index = this.parent.index(this) - return this.parent.nodes[index - 1] - } - - rangeBy(opts) { - let start = { - column: this.source.start.column, - line: this.source.start.line - } - let end = this.source.end - ? { - column: this.source.end.column + 1, - line: this.source.end.line - } - : { - column: start.column + 1, - line: start.line - } - - if (opts.word) { - let inputString = ('document' in this.source.input) - ? this.source.input.document - : this.source.input.css - let stringRepresentation = inputString.slice( - sourceOffset(inputString, this.source.start), - sourceOffset(inputString, this.source.end) - ) - let index = stringRepresentation.indexOf(opts.word) - if (index !== -1) { - start = this.positionInside(index) - end = this.positionInside( - index + opts.word.length, - ) - } - } else { - if (opts.start) { - start = { - column: opts.start.column, - line: opts.start.line - } - } else if (opts.index) { - start = this.positionInside(opts.index) - } - - if (opts.end) { - end = { - column: opts.end.column, - line: opts.end.line - } - } else if (typeof opts.endIndex === 'number') { - end = this.positionInside(opts.endIndex) - } else if (opts.index) { - end = this.positionInside(opts.index + 1) - } - } - - if ( - end.line < start.line || - (end.line === start.line && end.column <= start.column) - ) { - end = { column: start.column + 1, line: start.line } - } - - return { end, start } - } - - raw(prop, defaultType) { - let str = new Stringifier() - return str.raw(this, prop, defaultType) - } - - remove() { - if (this.parent) { - this.parent.removeChild(this) - } - this.parent = undefined - return this - } - - replaceWith(...nodes) { - if (this.parent) { - let bookmark = this - let foundSelf = false - for (let node of nodes) { - if (node === this) { - foundSelf = true - } else if (foundSelf) { - this.parent.insertAfter(bookmark, node) - bookmark = node - } else { - this.parent.insertBefore(bookmark, node) - } - } - - if (!foundSelf) { - this.remove() - } - } - - return this - } - - root() { - let result = this - while (result.parent && result.parent.type !== 'document') { - result = result.parent - } - return result - } - - toJSON(_, inputs) { - let fixed = {} - let emitInputs = inputs == null - inputs = inputs || new Map() - let inputsNextIndex = 0 - - for (let name in this) { - if (!Object.prototype.hasOwnProperty.call(this, name)) { - /* c8 ignore next 2 */ - continue - } - if (name === 'parent' || name === 'proxyCache') continue - let value = this[name] - - if (Array.isArray(value)) { - fixed[name] = value.map(i => { - if (typeof i === 'object' && i.toJSON) { - return i.toJSON(null, inputs) - } else { - return i - } - }) - } else if (typeof value === 'object' && value.toJSON) { - fixed[name] = value.toJSON(null, inputs) - } else if (name === 'source') { - let inputId = inputs.get(value.input) - if (inputId == null) { - inputId = inputsNextIndex - inputs.set(value.input, inputsNextIndex) - inputsNextIndex++ - } - fixed[name] = { - end: value.end, - inputId, - start: value.start - } - } else { - fixed[name] = value - } - } - - if (emitInputs) { - fixed.inputs = [...inputs.keys()].map(input => input.toJSON()) - } - - return fixed - } - - toProxy() { - if (!this.proxyCache) { - this.proxyCache = new Proxy(this, this.getProxyProcessor()) - } - return this.proxyCache - } - - toString(stringifier = stringify) { - if (stringifier.stringify) stringifier = stringifier.stringify - let result = '' - stringifier(this, i => { - result += i - }) - return result - } - - warn(result, text, opts) { - let data = { node: this } - for (let i in opts) data[i] = opts[i] - return result.warn(text, data) - } - - get proxyOf() { - return this - } -} - -module.exports = Node -Node.default = Node diff --git a/node_modules/postcss/lib/parse.d.ts b/node_modules/postcss/lib/parse.d.ts deleted file mode 100644 index 4c943a4..0000000 --- a/node_modules/postcss/lib/parse.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Parser } from './postcss.js' - -interface Parse extends Parser { - default: Parse -} - -declare const parse: Parse - -export = parse diff --git a/node_modules/postcss/lib/parse.js b/node_modules/postcss/lib/parse.js deleted file mode 100644 index 00a1037..0000000 --- a/node_modules/postcss/lib/parse.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict' - -let Container = require('./container') -let Input = require('./input') -let Parser = require('./parser') - -function parse(css, opts) { - let input = new Input(css, opts) - let parser = new Parser(input) - try { - parser.parse() - } catch (e) { - if (process.env.NODE_ENV !== 'production') { - if (e.name === 'CssSyntaxError' && opts && opts.from) { - if (/\.scss$/i.test(opts.from)) { - e.message += - '\nYou tried to parse SCSS with ' + - 'the standard CSS parser; ' + - 'try again with the postcss-scss parser' - } else if (/\.sass/i.test(opts.from)) { - e.message += - '\nYou tried to parse Sass with ' + - 'the standard CSS parser; ' + - 'try again with the postcss-sass parser' - } else if (/\.less$/i.test(opts.from)) { - e.message += - '\nYou tried to parse Less with ' + - 'the standard CSS parser; ' + - 'try again with the postcss-less parser' - } - } - } - throw e - } - - return parser.root -} - -module.exports = parse -parse.default = parse - -Container.registerParse(parse) diff --git a/node_modules/postcss/lib/parser.js b/node_modules/postcss/lib/parser.js deleted file mode 100644 index 8a04411..0000000 --- a/node_modules/postcss/lib/parser.js +++ /dev/null @@ -1,609 +0,0 @@ -'use strict' - -let AtRule = require('./at-rule') -let Comment = require('./comment') -let Declaration = require('./declaration') -let Root = require('./root') -let Rule = require('./rule') -let tokenizer = require('./tokenize') - -const SAFE_COMMENT_NEIGHBOR = { - empty: true, - space: true -} - -function findLastWithPosition(tokens) { - for (let i = tokens.length - 1; i >= 0; i--) { - let token = tokens[i] - let pos = token[3] || token[2] - if (pos) return pos - } -} - -class Parser { - constructor(input) { - this.input = input - - this.root = new Root() - this.current = this.root - this.spaces = '' - this.semicolon = false - - this.createTokenizer() - this.root.source = { input, start: { column: 1, line: 1, offset: 0 } } - } - - atrule(token) { - let node = new AtRule() - node.name = token[1].slice(1) - if (node.name === '') { - this.unnamedAtrule(node, token) - } - this.init(node, token[2]) - - let type - let prev - let shift - let last = false - let open = false - let params = [] - let brackets = [] - - while (!this.tokenizer.endOfFile()) { - token = this.tokenizer.nextToken() - type = token[0] - - if (type === '(' || type === '[') { - brackets.push(type === '(' ? ')' : ']') - } else if (type === '{' && brackets.length > 0) { - brackets.push('}') - } else if (type === brackets[brackets.length - 1]) { - brackets.pop() - } - - if (brackets.length === 0) { - if (type === ';') { - node.source.end = this.getPosition(token[2]) - node.source.end.offset++ - this.semicolon = true - break - } else if (type === '{') { - open = true - break - } else if (type === '}') { - if (params.length > 0) { - shift = params.length - 1 - prev = params[shift] - while (prev && prev[0] === 'space') { - prev = params[--shift] - } - if (prev) { - node.source.end = this.getPosition(prev[3] || prev[2]) - node.source.end.offset++ - } - } - this.end(token) - break - } else { - params.push(token) - } - } else { - params.push(token) - } - - if (this.tokenizer.endOfFile()) { - last = true - break - } - } - - node.raws.between = this.spacesAndCommentsFromEnd(params) - if (params.length) { - node.raws.afterName = this.spacesAndCommentsFromStart(params) - this.raw(node, 'params', params) - if (last) { - token = params[params.length - 1] - node.source.end = this.getPosition(token[3] || token[2]) - node.source.end.offset++ - this.spaces = node.raws.between - node.raws.between = '' - } - } else { - node.raws.afterName = '' - node.params = '' - } - - if (open) { - node.nodes = [] - this.current = node - } - } - - checkMissedSemicolon(tokens) { - let colon = this.colon(tokens) - if (colon === false) return - - let founded = 0 - let token - for (let j = colon - 1; j >= 0; j--) { - token = tokens[j] - if (token[0] !== 'space') { - founded += 1 - if (founded === 2) break - } - } - // If the token is a word, e.g. `!important`, `red` or any other valid property's value. - // Then we need to return the colon after that word token. [3] is the "end" colon of that word. - // And because we need it after that one we do +1 to get the next one. - throw this.input.error( - 'Missed semicolon', - token[0] === 'word' ? token[3] + 1 : token[2] - ) - } - - colon(tokens) { - let brackets = 0 - let prev, token, type - for (let [i, element] of tokens.entries()) { - token = element - type = token[0] - - if (type === '(') { - brackets += 1 - } - if (type === ')') { - brackets -= 1 - } - if (brackets === 0 && type === ':') { - if (!prev) { - this.doubleColon(token) - } else if (prev[0] === 'word' && prev[1] === 'progid') { - continue - } else { - return i - } - } - - prev = token - } - return false - } - - comment(token) { - let node = new Comment() - this.init(node, token[2]) - node.source.end = this.getPosition(token[3] || token[2]) - node.source.end.offset++ - - let text = token[1].slice(2, -2) - if (/^\s*$/.test(text)) { - node.text = '' - node.raws.left = text - node.raws.right = '' - } else { - let match = text.match(/^(\s*)([^]*\S)(\s*)$/) - node.text = match[2] - node.raws.left = match[1] - node.raws.right = match[3] - } - } - - createTokenizer() { - this.tokenizer = tokenizer(this.input) - } - - decl(tokens, customProperty) { - let node = new Declaration() - this.init(node, tokens[0][2]) - - let last = tokens[tokens.length - 1] - if (last[0] === ';') { - this.semicolon = true - tokens.pop() - } - - node.source.end = this.getPosition( - last[3] || last[2] || findLastWithPosition(tokens) - ) - node.source.end.offset++ - - while (tokens[0][0] !== 'word') { - if (tokens.length === 1) this.unknownWord(tokens) - node.raws.before += tokens.shift()[1] - } - node.source.start = this.getPosition(tokens[0][2]) - - node.prop = '' - while (tokens.length) { - let type = tokens[0][0] - if (type === ':' || type === 'space' || type === 'comment') { - break - } - node.prop += tokens.shift()[1] - } - - node.raws.between = '' - - let token - while (tokens.length) { - token = tokens.shift() - - if (token[0] === ':') { - node.raws.between += token[1] - break - } else { - if (token[0] === 'word' && /\w/.test(token[1])) { - this.unknownWord([token]) - } - node.raws.between += token[1] - } - } - - if (node.prop[0] === '_' || node.prop[0] === '*') { - node.raws.before += node.prop[0] - node.prop = node.prop.slice(1) - } - - let firstSpaces = [] - let next - while (tokens.length) { - next = tokens[0][0] - if (next !== 'space' && next !== 'comment') break - firstSpaces.push(tokens.shift()) - } - - this.precheckMissedSemicolon(tokens) - - for (let i = tokens.length - 1; i >= 0; i--) { - token = tokens[i] - if (token[1].toLowerCase() === '!important') { - node.important = true - let string = this.stringFrom(tokens, i) - string = this.spacesFromEnd(tokens) + string - if (string !== ' !important') node.raws.important = string - break - } else if (token[1].toLowerCase() === 'important') { - let cache = tokens.slice(0) - let str = '' - for (let j = i; j > 0; j--) { - let type = cache[j][0] - if (str.trim().startsWith('!') && type !== 'space') { - break - } - str = cache.pop()[1] + str - } - if (str.trim().startsWith('!')) { - node.important = true - node.raws.important = str - tokens = cache - } - } - - if (token[0] !== 'space' && token[0] !== 'comment') { - break - } - } - - let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment') - - if (hasWord) { - node.raws.between += firstSpaces.map(i => i[1]).join('') - firstSpaces = [] - } - this.raw(node, 'value', firstSpaces.concat(tokens), customProperty) - - if (node.value.includes(':') && !customProperty) { - this.checkMissedSemicolon(tokens) - } - } - - doubleColon(token) { - throw this.input.error( - 'Double colon', - { offset: token[2] }, - { offset: token[2] + token[1].length } - ) - } - - emptyRule(token) { - let node = new Rule() - this.init(node, token[2]) - node.selector = '' - node.raws.between = '' - this.current = node - } - - end(token) { - if (this.current.nodes && this.current.nodes.length) { - this.current.raws.semicolon = this.semicolon - } - this.semicolon = false - - this.current.raws.after = (this.current.raws.after || '') + this.spaces - this.spaces = '' - - if (this.current.parent) { - this.current.source.end = this.getPosition(token[2]) - this.current.source.end.offset++ - this.current = this.current.parent - } else { - this.unexpectedClose(token) - } - } - - endFile() { - if (this.current.parent) this.unclosedBlock() - if (this.current.nodes && this.current.nodes.length) { - this.current.raws.semicolon = this.semicolon - } - this.current.raws.after = (this.current.raws.after || '') + this.spaces - this.root.source.end = this.getPosition(this.tokenizer.position()) - } - - freeSemicolon(token) { - this.spaces += token[1] - if (this.current.nodes) { - let prev = this.current.nodes[this.current.nodes.length - 1] - if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) { - prev.raws.ownSemicolon = this.spaces - this.spaces = '' - } - } - } - - // Helpers - - getPosition(offset) { - let pos = this.input.fromOffset(offset) - return { - column: pos.col, - line: pos.line, - offset - } - } - - init(node, offset) { - this.current.push(node) - node.source = { - input: this.input, - start: this.getPosition(offset) - } - node.raws.before = this.spaces - this.spaces = '' - if (node.type !== 'comment') this.semicolon = false - } - - other(start) { - let end = false - let type = null - let colon = false - let bracket = null - let brackets = [] - let customProperty = start[1].startsWith('--') - - let tokens = [] - let token = start - while (token) { - type = token[0] - tokens.push(token) - - if (type === '(' || type === '[') { - if (!bracket) bracket = token - brackets.push(type === '(' ? ')' : ']') - } else if (customProperty && colon && type === '{') { - if (!bracket) bracket = token - brackets.push('}') - } else if (brackets.length === 0) { - if (type === ';') { - if (colon) { - this.decl(tokens, customProperty) - return - } else { - break - } - } else if (type === '{') { - this.rule(tokens) - return - } else if (type === '}') { - this.tokenizer.back(tokens.pop()) - end = true - break - } else if (type === ':') { - colon = true - } - } else if (type === brackets[brackets.length - 1]) { - brackets.pop() - if (brackets.length === 0) bracket = null - } - - token = this.tokenizer.nextToken() - } - - if (this.tokenizer.endOfFile()) end = true - if (brackets.length > 0) this.unclosedBracket(bracket) - - if (end && colon) { - if (!customProperty) { - while (tokens.length) { - token = tokens[tokens.length - 1][0] - if (token !== 'space' && token !== 'comment') break - this.tokenizer.back(tokens.pop()) - } - } - this.decl(tokens, customProperty) - } else { - this.unknownWord(tokens) - } - } - - parse() { - let token - while (!this.tokenizer.endOfFile()) { - token = this.tokenizer.nextToken() - - switch (token[0]) { - case 'space': - this.spaces += token[1] - break - - case ';': - this.freeSemicolon(token) - break - - case '}': - this.end(token) - break - - case 'comment': - this.comment(token) - break - - case 'at-word': - this.atrule(token) - break - - case '{': - this.emptyRule(token) - break - - default: - this.other(token) - break - } - } - this.endFile() - } - - precheckMissedSemicolon(/* tokens */) { - // Hook for Safe Parser - } - - raw(node, prop, tokens, customProperty) { - let token, type - let length = tokens.length - let value = '' - let clean = true - let next, prev - - for (let i = 0; i < length; i += 1) { - token = tokens[i] - type = token[0] - if (type === 'space' && i === length - 1 && !customProperty) { - clean = false - } else if (type === 'comment') { - prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty' - next = tokens[i + 1] ? tokens[i + 1][0] : 'empty' - if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) { - if (value.slice(-1) === ',') { - clean = false - } else { - value += token[1] - } - } else { - clean = false - } - } else { - value += token[1] - } - } - if (!clean) { - let raw = tokens.reduce((all, i) => all + i[1], '') - node.raws[prop] = { raw, value } - } - node[prop] = value - } - - rule(tokens) { - tokens.pop() - - let node = new Rule() - this.init(node, tokens[0][2]) - - node.raws.between = this.spacesAndCommentsFromEnd(tokens) - this.raw(node, 'selector', tokens) - this.current = node - } - - spacesAndCommentsFromEnd(tokens) { - let lastTokenType - let spaces = '' - while (tokens.length) { - lastTokenType = tokens[tokens.length - 1][0] - if (lastTokenType !== 'space' && lastTokenType !== 'comment') break - spaces = tokens.pop()[1] + spaces - } - return spaces - } - - // Errors - - spacesAndCommentsFromStart(tokens) { - let next - let spaces = '' - while (tokens.length) { - next = tokens[0][0] - if (next !== 'space' && next !== 'comment') break - spaces += tokens.shift()[1] - } - return spaces - } - - spacesFromEnd(tokens) { - let lastTokenType - let spaces = '' - while (tokens.length) { - lastTokenType = tokens[tokens.length - 1][0] - if (lastTokenType !== 'space') break - spaces = tokens.pop()[1] + spaces - } - return spaces - } - - stringFrom(tokens, from) { - let result = '' - for (let i = from; i < tokens.length; i++) { - result += tokens[i][1] - } - tokens.splice(from, tokens.length - from) - return result - } - - unclosedBlock() { - let pos = this.current.source.start - throw this.input.error('Unclosed block', pos.line, pos.column) - } - - unclosedBracket(bracket) { - throw this.input.error( - 'Unclosed bracket', - { offset: bracket[2] }, - { offset: bracket[2] + 1 } - ) - } - - unexpectedClose(token) { - throw this.input.error( - 'Unexpected }', - { offset: token[2] }, - { offset: token[2] + 1 } - ) - } - - unknownWord(tokens) { - throw this.input.error( - 'Unknown word', - { offset: tokens[0][2] }, - { offset: tokens[0][2] + tokens[0][1].length } - ) - } - - unnamedAtrule(node, token) { - throw this.input.error( - 'At-rule without name', - { offset: token[2] }, - { offset: token[2] + token[1].length } - ) - } -} - -module.exports = Parser diff --git a/node_modules/postcss/lib/postcss.d.mts b/node_modules/postcss/lib/postcss.d.mts deleted file mode 100644 index 4cf5b49..0000000 --- a/node_modules/postcss/lib/postcss.d.mts +++ /dev/null @@ -1,69 +0,0 @@ -export { - // postcss function / namespace - default, - - // Value exports from postcss.mjs - stringify, - fromJSON, - // @ts-expect-error This value exists, but it’s untyped. - plugin, - parse, - list, - document, - comment, - atRule, - rule, - decl, - root, - CssSyntaxError, - Declaration, - Container, - Processor, - Document, - Comment, - Warning, - AtRule, - Result, - Input, - Rule, - Root, - Node, - - // Type-only exports - AcceptedPlugin, - AnyNode, - AtRuleProps, - Builder, - ChildNode, - ChildProps, - CommentProps, - ContainerProps, - DeclarationProps, - DocumentProps, - FilePosition, - Helpers, - JSONHydrator, - Message, - NodeErrorOptions, - NodeProps, - OldPlugin, - Parser, - Plugin, - PluginCreator, - Position, - Postcss, - ProcessOptions, - RootProps, - RuleProps, - Source, - SourceMap, - SourceMapOptions, - Stringifier, - Syntax, - TransformCallback, - Transformer, - WarningOptions, - - // This is a class, but it’s not re-exported. That’s why it’s exported as type-only here. - type LazyResult -} from './postcss.js' diff --git a/node_modules/postcss/lib/postcss.d.ts b/node_modules/postcss/lib/postcss.d.ts deleted file mode 100644 index c5e3605..0000000 --- a/node_modules/postcss/lib/postcss.d.ts +++ /dev/null @@ -1,458 +0,0 @@ -import { RawSourceMap, SourceMapGenerator } from 'source-map-js' - -import AtRule, { AtRuleProps } from './at-rule.js' -import Comment, { CommentProps } from './comment.js' -import Container, { ContainerProps, NewChild } from './container.js' -import CssSyntaxError from './css-syntax-error.js' -import Declaration, { DeclarationProps } from './declaration.js' -import Document, { DocumentProps } from './document.js' -import Input, { FilePosition } from './input.js' -import LazyResult from './lazy-result.js' -import list from './list.js' -import Node, { - AnyNode, - ChildNode, - ChildProps, - NodeErrorOptions, - NodeProps, - Position, - Source -} from './node.js' -import Processor from './processor.js' -import Result, { Message } from './result.js' -import Root, { RootProps } from './root.js' -import Rule, { RuleProps } from './rule.js' -import Warning, { WarningOptions } from './warning.js' - -type DocumentProcessor = ( - document: Document, - helper: postcss.Helpers -) => Promise | void -type RootProcessor = ( - root: Root, - helper: postcss.Helpers -) => Promise | void -type DeclarationProcessor = ( - decl: Declaration, - helper: postcss.Helpers -) => Promise | void -type RuleProcessor = ( - rule: Rule, - helper: postcss.Helpers -) => Promise | void -type AtRuleProcessor = ( - atRule: AtRule, - helper: postcss.Helpers -) => Promise | void -type CommentProcessor = ( - comment: Comment, - helper: postcss.Helpers -) => Promise | void - -interface Processors { - /** - * Will be called on all`AtRule` nodes. - * - * Will be called again on node or children changes. - */ - AtRule?: { [name: string]: AtRuleProcessor } | AtRuleProcessor - - /** - * Will be called on all `AtRule` nodes, when all children will be processed. - * - * Will be called again on node or children changes. - */ - AtRuleExit?: { [name: string]: AtRuleProcessor } | AtRuleProcessor - - /** - * Will be called on all `Comment` nodes. - * - * Will be called again on node or children changes. - */ - Comment?: CommentProcessor - - /** - * Will be called on all `Comment` nodes after listeners - * for `Comment` event. - * - * Will be called again on node or children changes. - */ - CommentExit?: CommentProcessor - - /** - * Will be called on all `Declaration` nodes after listeners - * for `Declaration` event. - * - * Will be called again on node or children changes. - */ - Declaration?: { [prop: string]: DeclarationProcessor } | DeclarationProcessor - - /** - * Will be called on all `Declaration` nodes. - * - * Will be called again on node or children changes. - */ - DeclarationExit?: - | { [prop: string]: DeclarationProcessor } - | DeclarationProcessor - - /** - * Will be called on `Document` node. - * - * Will be called again on children changes. - */ - Document?: DocumentProcessor - - /** - * Will be called on `Document` node, when all children will be processed. - * - * Will be called again on children changes. - */ - DocumentExit?: DocumentProcessor - - /** - * Will be called on `Root` node once. - */ - Once?: RootProcessor - - /** - * Will be called on `Root` node once, when all children will be processed. - */ - OnceExit?: RootProcessor - - /** - * Will be called on `Root` node. - * - * Will be called again on children changes. - */ - Root?: RootProcessor - - /** - * Will be called on `Root` node, when all children will be processed. - * - * Will be called again on children changes. - */ - RootExit?: RootProcessor - - /** - * Will be called on all `Rule` nodes. - * - * Will be called again on node or children changes. - */ - Rule?: RuleProcessor - - /** - * Will be called on all `Rule` nodes, when all children will be processed. - * - * Will be called again on node or children changes. - */ - RuleExit?: RuleProcessor -} - -declare namespace postcss { - export { - AnyNode, - AtRule, - AtRuleProps, - ChildNode, - ChildProps, - Comment, - CommentProps, - Container, - ContainerProps, - CssSyntaxError, - Declaration, - DeclarationProps, - Document, - DocumentProps, - FilePosition, - Input, - LazyResult, - list, - Message, - NewChild, - Node, - NodeErrorOptions, - NodeProps, - Position, - Processor, - Result, - Root, - RootProps, - Rule, - RuleProps, - Source, - Warning, - WarningOptions - } - - export type SourceMap = { - toJSON(): RawSourceMap - } & SourceMapGenerator - - export type Helpers = { postcss: Postcss; result: Result } & Postcss - - export interface Plugin extends Processors { - postcssPlugin: string - prepare?: (result: Result) => Processors - } - - export interface PluginCreator { - (opts?: PluginOptions): Plugin | Processor - postcss: true - } - - export interface Transformer extends TransformCallback { - postcssPlugin: string - postcssVersion: string - } - - export interface TransformCallback { - (root: Root, result: Result): Promise | void - } - - export interface OldPlugin extends Transformer { - (opts?: T): Transformer - postcss: Transformer - } - - export type AcceptedPlugin = - | { - postcss: Processor | TransformCallback - } - | OldPlugin - | Plugin - | PluginCreator - | Processor - | TransformCallback - - export interface Parser { - ( - css: { toString(): string } | string, - opts?: Pick - ): RootNode - } - - export interface Builder { - (part: string, node?: AnyNode, type?: 'end' | 'start'): void - } - - export interface Stringifier { - (node: AnyNode, builder: Builder): void - } - - export interface JSONHydrator { - (data: object): Node - (data: object[]): Node[] - } - - export interface Syntax { - /** - * Function to generate AST by string. - */ - parse?: Parser - - /** - * Class to generate string by AST. - */ - stringify?: Stringifier - } - - export interface SourceMapOptions { - /** - * Use absolute path in generated source map. - */ - absolute?: boolean - - /** - * Indicates that PostCSS should add annotation comments to the CSS. - * By default, PostCSS will always add a comment with a path - * to the source map. PostCSS will not add annotations to CSS files - * that do not contain any comments. - * - * By default, PostCSS presumes that you want to save the source map as - * `opts.to + '.map'` and will use this path in the annotation comment. - * A different path can be set by providing a string value for annotation. - * - * If you have set `inline: true`, annotation cannot be disabled. - */ - annotation?: ((file: string, root: Root) => string) | boolean | string - - /** - * Override `from` in map’s sources. - */ - from?: string - - /** - * Indicates that the source map should be embedded in the output CSS - * as a Base64-encoded comment. By default, it is `true`. - * But if all previous maps are external, not inline, PostCSS will not embed - * the map even if you do not set this option. - * - * If you have an inline source map, the result.map property will be empty, - * as the source map will be contained within the text of `result.css`. - */ - inline?: boolean - - /** - * Source map content from a previous processing step (e.g., Sass). - * - * PostCSS will try to read the previous source map - * automatically (based on comments within the source CSS), but you can use - * this option to identify it manually. - * - * If desired, you can omit the previous map with prev: `false`. - */ - prev?: ((file: string) => string) | boolean | object | string - - /** - * Indicates that PostCSS should set the origin content (e.g., Sass source) - * of the source map. By default, it is true. But if all previous maps do not - * contain sources content, PostCSS will also leave it out even if you - * do not set this option. - */ - sourcesContent?: boolean - } - - export interface ProcessOptions { - /** - * Input file if it is not simple CSS file, but HTML with - - `; -} - -const ERR_LOAD_URL = "ERR_LOAD_URL"; -const ERR_LOAD_PUBLIC_URL = "ERR_LOAD_PUBLIC_URL"; -const debugLoad = createDebugger("vite:load"); -const debugTransform = createDebugger("vite:transform"); -const debugCache$1 = createDebugger("vite:cache"); -function transformRequest(environment, url, options = {}) { - if (!options.ssr) { - options = { ...options, ssr: environment.config.consumer === "server" }; - } - if (environment._closing && environment.config.dev.recoverable) - throwClosedServerError(); - const cacheKey = `${options.html ? "html:" : ""}${url}`; - const timestamp = Date.now(); - const pending = environment._pendingRequests.get(cacheKey); - if (pending) { - return environment.moduleGraph.getModuleByUrl(removeTimestampQuery(url)).then((module) => { - if (!module || pending.timestamp > module.lastInvalidationTimestamp) { - return pending.request; - } else { - pending.abort(); - return transformRequest(environment, url, options); - } - }); - } - const request = doTransform(environment, url, options, timestamp); - let cleared = false; - const clearCache = () => { - if (!cleared) { - environment._pendingRequests.delete(cacheKey); - cleared = true; - } - }; - environment._pendingRequests.set(cacheKey, { - request, - timestamp, - abort: clearCache - }); - return request.finally(clearCache); -} -async function doTransform(environment, url, options, timestamp) { - url = removeTimestampQuery(url); - const { pluginContainer } = environment; - let module = await environment.moduleGraph.getModuleByUrl(url); - if (module) { - const cached = await getCachedTransformResult( - environment, - url, - module, - timestamp - ); - if (cached) return cached; - } - const resolved = module ? undefined : await pluginContainer.resolveId(url, undefined) ?? undefined; - const id = module?.id ?? resolved?.id ?? url; - module ??= environment.moduleGraph.getModuleById(id); - if (module) { - await environment.moduleGraph._ensureEntryFromUrl(url, undefined, resolved); - const cached = await getCachedTransformResult( - environment, - url, - module, - timestamp - ); - if (cached) return cached; - } - const result = loadAndTransform( - environment, - id, - url, - options, - timestamp, - module, - resolved - ); - const { depsOptimizer } = environment; - if (!depsOptimizer?.isOptimizedDepFile(id)) { - environment._registerRequestProcessing(id, () => result); - } - return result; -} -async function getCachedTransformResult(environment, url, module, timestamp) { - const prettyUrl = debugCache$1 ? prettifyUrl(url, environment.config.root) : ""; - const softInvalidatedTransformResult = await handleModuleSoftInvalidation( - environment, - module, - timestamp - ); - if (softInvalidatedTransformResult) { - debugCache$1?.(`[memory-hmr] ${prettyUrl}`); - return softInvalidatedTransformResult; - } - const cached = module.transformResult; - if (cached) { - debugCache$1?.(`[memory] ${prettyUrl}`); - return cached; - } -} -async function loadAndTransform(environment, id, url, options, timestamp, mod, resolved) { - const { config, pluginContainer, logger } = environment; - const prettyUrl = debugLoad || debugTransform ? prettifyUrl(url, config.root) : ""; - const moduleGraph = environment.moduleGraph; - let code = null; - let map = null; - const loadStart = debugLoad ? performance.now() : 0; - const loadResult = await pluginContainer.load(id); - if (loadResult == null) { - const file = cleanUrl(id); - if (options.html && !id.endsWith(".html")) { - return null; - } - if (environment.config.consumer === "server" || isFileLoadingAllowed(environment.getTopLevelConfig(), file)) { - try { - code = await fsp.readFile(file, "utf-8"); - debugLoad?.(`${timeFrom(loadStart)} [fs] ${prettyUrl}`); - } catch (e) { - if (e.code !== "ENOENT") { - if (e.code === "EISDIR") { - e.message = `${e.message} ${file}`; - } - throw e; - } - } - if (code != null && environment.pluginContainer.watcher) { - ensureWatchedFile( - environment.pluginContainer.watcher, - file, - config.root - ); - } - } - if (code) { - try { - const extracted = await extractSourcemapFromFile(code, file); - if (extracted) { - code = extracted.code; - map = extracted.map; - } - } catch (e) { - logger.warn(`Failed to load source map for ${file}. -${e}`, { - timestamp: true - }); - } - } - } else { - debugLoad?.(`${timeFrom(loadStart)} [plugin] ${prettyUrl}`); - if (isObject$2(loadResult)) { - code = loadResult.code; - map = loadResult.map; - } else { - code = loadResult; - } - } - if (code == null) { - const isPublicFile = checkPublicFile(url, environment.getTopLevelConfig()); - let publicDirName = path$d.relative(config.root, config.publicDir); - if (publicDirName[0] !== ".") publicDirName = "/" + publicDirName; - const msg = isPublicFile ? `This file is in ${publicDirName} and will be copied as-is during build without going through the plugin transforms, and therefore should not be imported from source code. It can only be referenced via HTML tags.` : `Does the file exist?`; - const importerMod = moduleGraph.idToModuleMap.get(id)?.importers.values().next().value; - const importer = importerMod?.file || importerMod?.url; - const err = new Error( - `Failed to load url ${url} (resolved id: ${id})${importer ? ` in ${importer}` : ""}. ${msg}` - ); - err.code = isPublicFile ? ERR_LOAD_PUBLIC_URL : ERR_LOAD_URL; - throw err; - } - if (environment._closing && environment.config.dev.recoverable) - throwClosedServerError(); - mod ??= await moduleGraph._ensureEntryFromUrl(url, undefined, resolved); - const transformStart = debugTransform ? performance.now() : 0; - const transformResult = await pluginContainer.transform(code, id, { - inMap: map - }); - const originalCode = code; - if (transformResult.code === originalCode) { - debugTransform?.( - timeFrom(transformStart) + colors$1.dim(` [skipped] ${prettyUrl}`) - ); - } else { - debugTransform?.(`${timeFrom(transformStart)} ${prettyUrl}`); - code = transformResult.code; - map = transformResult.map; - } - let normalizedMap; - if (typeof map === "string") { - normalizedMap = JSON.parse(map); - } else if (map) { - normalizedMap = map; - } else { - normalizedMap = null; - } - if (normalizedMap && "version" in normalizedMap && mod.file) { - if (normalizedMap.mappings) { - await injectSourcesContent(normalizedMap, mod.file, logger); - } - const sourcemapPath = `${mod.file}.map`; - applySourcemapIgnoreList( - normalizedMap, - sourcemapPath, - config.server.sourcemapIgnoreList, - logger - ); - if (path$d.isAbsolute(mod.file)) { - let modDirname; - for (let sourcesIndex = 0; sourcesIndex < normalizedMap.sources.length; ++sourcesIndex) { - const sourcePath = normalizedMap.sources[sourcesIndex]; - if (sourcePath) { - if (path$d.isAbsolute(sourcePath)) { - modDirname ??= path$d.dirname(mod.file); - normalizedMap.sources[sourcesIndex] = path$d.relative( - modDirname, - sourcePath - ); - } - } - } - } - } - if (environment._closing && environment.config.dev.recoverable) - throwClosedServerError(); - const topLevelConfig = environment.getTopLevelConfig(); - const result = environment.config.dev.moduleRunnerTransform ? await ssrTransform(code, normalizedMap, url, originalCode, { - json: { - stringify: topLevelConfig.json.stringify === true && topLevelConfig.json.namedExports !== true - } - }) : { - code, - map: normalizedMap, - etag: getEtag(code, { weak: true }) - }; - if (timestamp > mod.lastInvalidationTimestamp) - moduleGraph.updateModuleTransformResult(mod, result); - return result; -} -async function handleModuleSoftInvalidation(environment, mod, timestamp) { - const transformResult = mod.invalidationState; - mod.invalidationState = undefined; - if (!transformResult || transformResult === "HARD_INVALIDATED") return; - if (mod.transformResult) { - throw new Error( - `Internal server error: Soft-invalidated module "${mod.url}" should not have existing transform result` - ); - } - let result; - if (transformResult.ssr) { - result = transformResult; - } else { - await init; - const source = transformResult.code; - const s = new MagicString(source); - const [imports] = parse$e(source, mod.id || undefined); - for (const imp of imports) { - let rawUrl = source.slice(imp.s, imp.e); - if (rawUrl === "import.meta") continue; - const hasQuotes = rawUrl[0] === '"' || rawUrl[0] === "'"; - if (hasQuotes) { - rawUrl = rawUrl.slice(1, -1); - } - const urlWithoutTimestamp = removeTimestampQuery(rawUrl); - const hmrUrl = unwrapId$1( - stripBase( - removeImportQuery(urlWithoutTimestamp), - environment.config.base - ) - ); - for (const importedMod of mod.importedModules) { - if (importedMod.url !== hmrUrl) continue; - if (importedMod.lastHMRTimestamp > 0) { - const replacedUrl = injectQuery( - urlWithoutTimestamp, - `t=${importedMod.lastHMRTimestamp}` - ); - const start = hasQuotes ? imp.s + 1 : imp.s; - const end = hasQuotes ? imp.e - 1 : imp.e; - s.overwrite(start, end, replacedUrl); - } - if (imp.d === -1 && environment.config.dev.preTransformRequests) { - environment.warmupRequest(hmrUrl); - } - break; - } - } - const code = s.toString(); - result = { - ...transformResult, - code, - etag: getEtag(code, { weak: true }) - }; - } - if (timestamp > mod.lastInvalidationTimestamp) - environment.moduleGraph.updateModuleTransformResult(mod, result); - return result; -} - -const ALLOWED_META_NAME = [ - "msapplication-tileimage", - "msapplication-square70x70logo", - "msapplication-square150x150logo", - "msapplication-wide310x150logo", - "msapplication-square310x310logo", - "msapplication-config", - "twitter:image" -]; -const ALLOWED_META_PROPERTY = [ - "og:image", - "og:image:url", - "og:image:secure_url", - "og:audio", - "og:audio:secure_url", - "og:video", - "og:video:secure_url" -]; -const DEFAULT_HTML_ASSET_SOURCES = { - audio: { - srcAttributes: ["src"] - }, - embed: { - srcAttributes: ["src"] - }, - img: { - srcAttributes: ["src"], - srcsetAttributes: ["srcset"] - }, - image: { - srcAttributes: ["href", "xlink:href"] - }, - input: { - srcAttributes: ["src"] - }, - link: { - srcAttributes: ["href"], - srcsetAttributes: ["imagesrcset"] - }, - object: { - srcAttributes: ["data"] - }, - source: { - srcAttributes: ["src"], - srcsetAttributes: ["srcset"] - }, - track: { - srcAttributes: ["src"] - }, - use: { - srcAttributes: ["href", "xlink:href"] - }, - video: { - srcAttributes: ["src", "poster"] - }, - meta: { - srcAttributes: ["content"], - filter({ attributes }) { - if (attributes.name && ALLOWED_META_NAME.includes(attributes.name.trim().toLowerCase())) { - return true; - } - if (attributes.property && ALLOWED_META_PROPERTY.includes(attributes.property.trim().toLowerCase())) { - return true; - } - return false; - } - } -}; -function getNodeAssetAttributes(node) { - const matched = DEFAULT_HTML_ASSET_SOURCES[node.nodeName]; - if (!matched) return []; - const attributes = {}; - for (const attr of node.attrs) { - attributes[getAttrKey(attr)] = attr.value; - } - if ("vite-ignore" in attributes) { - return [ - { - type: "remove", - key: "vite-ignore", - value: "", - attributes, - location: node.sourceCodeLocation.attrs["vite-ignore"] - } - ]; - } - const actions = []; - function handleAttributeKey(key, type) { - const value = attributes[key]; - if (!value) return; - if (matched.filter && !matched.filter({ key, value, attributes })) return; - const location = node.sourceCodeLocation.attrs[key]; - actions.push({ type, key, value, attributes, location }); - } - matched.srcAttributes?.forEach((key) => handleAttributeKey(key, "src")); - matched.srcsetAttributes?.forEach((key) => handleAttributeKey(key, "srcset")); - return actions; -} -function getAttrKey(attr) { - return attr.prefix === undefined ? attr.name : `${attr.prefix}:${attr.name}`; -} - -const modulePreloadPolyfillId = "vite/modulepreload-polyfill"; -const resolvedModulePreloadPolyfillId = "\0" + modulePreloadPolyfillId + ".js"; -function modulePreloadPolyfillPlugin(config) { - let polyfillString; - return { - name: "vite:modulepreload-polyfill", - resolveId(id) { - if (id === modulePreloadPolyfillId) { - return resolvedModulePreloadPolyfillId; - } - }, - load(id) { - if (id === resolvedModulePreloadPolyfillId) { - if (config.command !== "build" || this.environment.config.consumer !== "client") { - return ""; - } - if (!polyfillString) { - polyfillString = `${isModernFlag}&&(${polyfill.toString()}());`; - } - return { code: polyfillString, moduleSideEffects: true }; - } - } - }; -} -function polyfill() { - const relList = document.createElement("link").relList; - if (relList && relList.supports && relList.supports("modulepreload")) { - return; - } - for (const link of document.querySelectorAll('link[rel="modulepreload"]')) { - processPreload(link); - } - new MutationObserver((mutations) => { - for (const mutation of mutations) { - if (mutation.type !== "childList") { - continue; - } - for (const node of mutation.addedNodes) { - if (node.tagName === "LINK" && node.rel === "modulepreload") - processPreload(node); - } - } - }).observe(document, { childList: true, subtree: true }); - function getFetchOpts(link) { - const fetchOpts = {}; - if (link.integrity) fetchOpts.integrity = link.integrity; - if (link.referrerPolicy) fetchOpts.referrerPolicy = link.referrerPolicy; - if (link.crossOrigin === "use-credentials") - fetchOpts.credentials = "include"; - else if (link.crossOrigin === "anonymous") fetchOpts.credentials = "omit"; - else fetchOpts.credentials = "same-origin"; - return fetchOpts; - } - function processPreload(link) { - if (link.ep) - return; - link.ep = true; - const fetchOpts = getFetchOpts(link); - fetch(link.href, fetchOpts); - } -} - -const htmlProxyRE$1 = /\?html-proxy=?(?:&inline-css)?(?:&style-attr)?&index=(\d+)\.(?:js|css)$/; -const isHtmlProxyRE = /\?html-proxy\b/; -const inlineCSSRE$1 = /__VITE_INLINE_CSS__([a-z\d]{8}_\d+)__/g; -const inlineImportRE = /(?]*type\s*=\s*(?:"importmap"|'importmap'|importmap)[^>]*>.*?<\/script>/is; -const moduleScriptRE = /[ \t]*]*type\s*=\s*(?:"module"|'module'|module)[^>]*>/i; -const modulePreloadLinkRE = /[ \t]*]*rel\s*=\s*(?:"modulepreload"|'modulepreload'|modulepreload)[\s\S]*?\/>/i; -const importMapAppendRE = new RegExp( - [moduleScriptRE, modulePreloadLinkRE].map((r) => r.source).join("|"), - "i" -); -const isHTMLProxy = (id) => isHtmlProxyRE.test(id); -const isHTMLRequest = (request) => htmlLangRE.test(request); -const htmlProxyMap = /* @__PURE__ */ new WeakMap(); -const htmlProxyResult = /* @__PURE__ */ new Map(); -function htmlInlineProxyPlugin(config) { - htmlProxyMap.set(config, /* @__PURE__ */ new Map()); - return { - name: "vite:html-inline-proxy", - resolveId(id) { - if (isHTMLProxy(id)) { - return id; - } - }, - load(id) { - const proxyMatch = htmlProxyRE$1.exec(id); - if (proxyMatch) { - const index = Number(proxyMatch[1]); - const file = cleanUrl(id); - const url = file.replace(normalizePath$3(config.root), ""); - const result = htmlProxyMap.get(config).get(url)?.[index]; - if (result) { - return { ...result, moduleSideEffects: true }; - } else { - throw new Error(`No matching HTML proxy module found from ${id}`); - } - } - } - }; -} -function addToHTMLProxyCache(config, filePath, index, result) { - if (!htmlProxyMap.get(config)) { - htmlProxyMap.set(config, /* @__PURE__ */ new Map()); - } - if (!htmlProxyMap.get(config).get(filePath)) { - htmlProxyMap.get(config).set(filePath, []); - } - htmlProxyMap.get(config).get(filePath)[index] = result; -} -function addToHTMLProxyTransformResult(hash, code) { - htmlProxyResult.set(hash, code); -} -const noInlineLinkRels = /* @__PURE__ */ new Set([ - "icon", - "apple-touch-icon", - "apple-touch-startup-image", - "manifest" -]); -const isAsyncScriptMap = /* @__PURE__ */ new WeakMap(); -function nodeIsElement(node) { - return node.nodeName[0] !== "#"; -} -function traverseNodes(node, visitor) { - if (node.nodeName === "template") { - node = node.content; - } - visitor(node); - if (nodeIsElement(node) || node.nodeName === "#document" || node.nodeName === "#document-fragment") { - node.childNodes.forEach((childNode) => traverseNodes(childNode, visitor)); - } -} -async function traverseHtml(html, filePath, visitor) { - const { parse } = await import('./dep-DcIXjcop.js'); - const ast = parse(html, { - scriptingEnabled: false, - // parse inside